@sensiblestats/widget-react 0.115.0 → 0.117.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 +12 -0
- package/dist/index.cjs +1216 -1108
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1194 -1086
- package/dist/index.js.map +1 -1
- package/dist/styles.css +10 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1459,7 +1459,7 @@ function parseOddsFormat(value) {
|
|
|
1459
1459
|
}
|
|
1460
1460
|
|
|
1461
1461
|
// src/version.generated.ts
|
|
1462
|
-
var WIDGET_REACT_VERSION = "0.
|
|
1462
|
+
var WIDGET_REACT_VERSION = "0.117.0";
|
|
1463
1463
|
|
|
1464
1464
|
// src/config.ts
|
|
1465
1465
|
function normalizeUi(cfg) {
|
|
@@ -4141,8 +4141,8 @@ function createPinStore(storageKey, sessionId, onChange) {
|
|
|
4141
4141
|
// src/monitorTiles.ts
|
|
4142
4142
|
function atBreak(m) {
|
|
4143
4143
|
if (isBasketball(m)) {
|
|
4144
|
-
const
|
|
4145
|
-
return
|
|
4144
|
+
const status2 = m.basketball?.statusText;
|
|
4145
|
+
return status2 === "Half" || (status2?.startsWith("End of ") ?? false);
|
|
4146
4146
|
}
|
|
4147
4147
|
return m.liveStatus === "HalfTime";
|
|
4148
4148
|
}
|
|
@@ -4182,6 +4182,32 @@ function orderTiles(pins, snapshot, seedOf) {
|
|
|
4182
4182
|
return a.index - b.index;
|
|
4183
4183
|
}).map((x) => x.tile);
|
|
4184
4184
|
}
|
|
4185
|
+
function marketRank(m) {
|
|
4186
|
+
if (m.status === "gone") return LAST;
|
|
4187
|
+
if (m.isSettled || m.phase === "fullTime") return FULL_TIME;
|
|
4188
|
+
if (m.phase === "live") return LIVE;
|
|
4189
|
+
if (m.phase === "preMatch") return PRE_MATCH;
|
|
4190
|
+
return LAST;
|
|
4191
|
+
}
|
|
4192
|
+
function marketKickoffMs(m) {
|
|
4193
|
+
const iso = m.kickoffUtc ?? m.card?.kickoffUtc;
|
|
4194
|
+
const ms = iso ? Date.parse(iso) : NaN;
|
|
4195
|
+
return Number.isNaN(ms) ? Infinity : ms;
|
|
4196
|
+
}
|
|
4197
|
+
function orderTrendMarkets(pins, snapshot) {
|
|
4198
|
+
const markets = snapshot?.markets ?? [];
|
|
4199
|
+
return pins.map((pin, index) => ({ market: markets.find((m) => m.key === pin.key), index })).filter((x) => x.market !== void 0).sort((a, b) => {
|
|
4200
|
+
const ra = marketRank(a.market);
|
|
4201
|
+
const rb = marketRank(b.market);
|
|
4202
|
+
if (ra !== rb) return ra - rb;
|
|
4203
|
+
if (ra === PRE_MATCH) {
|
|
4204
|
+
const ka = marketKickoffMs(a.market);
|
|
4205
|
+
const kb = marketKickoffMs(b.market);
|
|
4206
|
+
if (ka !== kb) return ka < kb ? -1 : 1;
|
|
4207
|
+
}
|
|
4208
|
+
return a.index - b.index;
|
|
4209
|
+
}).map((x) => x.market);
|
|
4210
|
+
}
|
|
4185
4211
|
|
|
4186
4212
|
// src/useTabs.ts
|
|
4187
4213
|
import { useState as useState4 } from "react";
|
|
@@ -4230,6 +4256,7 @@ function useLiveMonitor(opts) {
|
|
|
4230
4256
|
const [lastViewedPrices, setLastViewedPrices] = useState5({});
|
|
4231
4257
|
const [openMarket, setOpenMarket] = useState5({});
|
|
4232
4258
|
const [selectedMatchKey, setSelectedMatchKey] = useState5(null);
|
|
4259
|
+
const [selectedTrendKey, selectTrend] = useState5(null);
|
|
4233
4260
|
const [marketOdds, setMarketOdds] = useState5({});
|
|
4234
4261
|
const pinsRef = useRef5(pins);
|
|
4235
4262
|
pinsRef.current = pins;
|
|
@@ -4593,6 +4620,8 @@ function useLiveMonitor(opts) {
|
|
|
4593
4620
|
pinMatch,
|
|
4594
4621
|
selectedMatchKey,
|
|
4595
4622
|
selectMatch,
|
|
4623
|
+
selectedTrendKey,
|
|
4624
|
+
selectTrend,
|
|
4596
4625
|
chatDot,
|
|
4597
4626
|
markChatActivity,
|
|
4598
4627
|
matchesDot,
|
|
@@ -5604,7 +5633,7 @@ function forget(memory3, key, flight) {
|
|
|
5604
5633
|
function useBuilderGrid({ conversation, locale, memory: memory3, initial }) {
|
|
5605
5634
|
const [seed] = useState16(() => memory3 && conversation && initial ? memory3.cachedGrid(gridKey(locale, initial)) : void 0);
|
|
5606
5635
|
const [grid, setGrid] = useState16(seed ?? null);
|
|
5607
|
-
const [
|
|
5636
|
+
const [status2, setStatus] = useState16(seed ? "ready" : "idle");
|
|
5608
5637
|
const [confirmed, setConfirmed] = useState16(false);
|
|
5609
5638
|
const [answered, setAnswered] = useState16(seed && initial ? { req: initial, locale } : null);
|
|
5610
5639
|
const seq = useRef16(0);
|
|
@@ -5700,7 +5729,7 @@ function useBuilderGrid({ conversation, locale, memory: memory3, initial }) {
|
|
|
5700
5729
|
}
|
|
5701
5730
|
}, [conversation, locale, memory3, stopWaiting]);
|
|
5702
5731
|
const answeredFor = answered && answered.locale === locale ? answered.req : null;
|
|
5703
|
-
return { grid, answeredFor, status, confirmed, request };
|
|
5732
|
+
return { grid, answeredFor, status: status2, confirmed, request };
|
|
5704
5733
|
}
|
|
5705
5734
|
|
|
5706
5735
|
// src/components/AddToSlipButton.tsx
|
|
@@ -8260,7 +8289,7 @@ function Ladder2({ vm, ld, ui, slip, nowMs }) {
|
|
|
8260
8289
|
}
|
|
8261
8290
|
function InjuryReport({ ir, ui }) {
|
|
8262
8291
|
const nfl = ui.nfl;
|
|
8263
|
-
const
|
|
8292
|
+
const status2 = (raw) => {
|
|
8264
8293
|
switch (raw.toLowerCase()) {
|
|
8265
8294
|
case "out":
|
|
8266
8295
|
return nfl.out;
|
|
@@ -8280,7 +8309,7 @@ function InjuryReport({ ir, ui }) {
|
|
|
8280
8309
|
ir.players.map((p, i) => /* @__PURE__ */ jsxs33("div", { className: "ss-w-nfl-inj-row", children: [
|
|
8281
8310
|
/* @__PURE__ */ jsx37("span", { className: "ss-w-nfl-inj-nm", children: p.name }),
|
|
8282
8311
|
/* @__PURE__ */ jsx37("span", { className: "ss-w-nfl-inj-pos", children: p.position ?? "" }),
|
|
8283
|
-
/* @__PURE__ */ jsx37("span", { className: "ss-w-nfl-inj-st", "data-status": p.status.toLowerCase(), children:
|
|
8312
|
+
/* @__PURE__ */ jsx37("span", { className: "ss-w-nfl-inj-st", "data-status": p.status.toLowerCase(), children: status2(p.status) })
|
|
8284
8313
|
] }, `${p.name}:${i}`)),
|
|
8285
8314
|
ir.morePlayers > 0 ? /* @__PURE__ */ jsx37("p", { className: "ss-w-nfl-note", children: fillNfl(nfl.morePlayers, { n: ir.morePlayers }) }) : null
|
|
8286
8315
|
] });
|
|
@@ -10197,7 +10226,8 @@ function usePreKickoff(match) {
|
|
|
10197
10226
|
}
|
|
10198
10227
|
function usePropsOpen(match, monitor, descriptor) {
|
|
10199
10228
|
const sport = descriptor.sport === "americanfootball" ? "americanfootball" : void 0;
|
|
10200
|
-
const
|
|
10229
|
+
const beforeKickoff = usePreKickoff(match);
|
|
10230
|
+
const pre = descriptor.sport === "basketball" ? match.phase === "preMatch" : beforeKickoff;
|
|
10201
10231
|
const live = descriptor.sport === "basketball" && match.phase === "live";
|
|
10202
10232
|
const open = pre || live;
|
|
10203
10233
|
useEffect31(() => {
|
|
@@ -10834,7 +10864,7 @@ function NflMonitorCard({ match, monitor, ui, slip }) {
|
|
|
10834
10864
|
const f = match.americanFootball;
|
|
10835
10865
|
if (!f) return /* @__PURE__ */ jsx78(UnavailableCard, { match, monitor, ui, sport: "americanfootball" });
|
|
10836
10866
|
const live = match.phase === "live";
|
|
10837
|
-
const
|
|
10867
|
+
const status2 = live ? liveLabel2(f) : null;
|
|
10838
10868
|
const scored = live || match.phase === "fullTime";
|
|
10839
10869
|
const kickoff = match.phase === "preMatch" && match.kickoffUtc ? ui.bettingKickoff(match.kickoffUtc) : void 0;
|
|
10840
10870
|
const through = playedThrough(f);
|
|
@@ -10844,14 +10874,14 @@ function NflMonitorCard({ match, monitor, ui, slip }) {
|
|
|
10844
10874
|
return /* @__PURE__ */ jsxs73("div", { className: "ss-w-mon-item ss-w-mon-item--nfl", children: [
|
|
10845
10875
|
/* @__PURE__ */ jsxs73("div", { className: "ss-w-mon", children: [
|
|
10846
10876
|
/* @__PURE__ */ jsxs73("div", { className: "ss-w-mon-top", children: [
|
|
10847
|
-
|
|
10877
|
+
status2 && /* @__PURE__ */ jsxs73(Fragment19, { children: [
|
|
10848
10878
|
/* @__PURE__ */ jsxs73("span", { className: "ss-w-fandash-live-pill", children: [
|
|
10849
10879
|
/* @__PURE__ */ jsx78("span", { className: "ss-w-fandash-live-dot", "aria-hidden": "true" }),
|
|
10850
10880
|
ui.liveLabel
|
|
10851
10881
|
] }),
|
|
10852
|
-
/* @__PURE__ */ jsx78("span", { className: "ss-w-mon-min", children:
|
|
10882
|
+
/* @__PURE__ */ jsx78("span", { className: "ss-w-mon-min", children: status2 })
|
|
10853
10883
|
] }),
|
|
10854
|
-
live && !
|
|
10884
|
+
live && !status2 && f.statusText && /* @__PURE__ */ jsx78("span", { className: "ss-w-mon-pill", children: f.statusText }),
|
|
10855
10885
|
match.phase === "fullTime" && /* @__PURE__ */ jsx78("span", { className: "ss-w-mon-pill", children: f.statusText ?? ui.fullTimeLabel }),
|
|
10856
10886
|
match.phase === "postponed" && /* @__PURE__ */ jsx78("span", { className: "ss-w-mon-pill", children: f.statusText ?? ui.postponedLabel }),
|
|
10857
10887
|
kickoff && /* @__PURE__ */ jsxs73("span", { className: "ss-w-mon-pill", children: [
|
|
@@ -10882,7 +10912,7 @@ function NflMonitorCard({ match, monitor, ui, slip }) {
|
|
|
10882
10912
|
{ abbreviation: f.homeAbbreviation, scores: f.homePeriods, total: match.homeScore }
|
|
10883
10913
|
].map((row) => /* @__PURE__ */ jsxs73("tr", { children: [
|
|
10884
10914
|
/* @__PURE__ */ jsx78("th", { scope: "row", children: row.abbreviation }),
|
|
10885
|
-
columns.map((i) => /* @__PURE__ */ jsx78("td", { className: live &&
|
|
10915
|
+
columns.map((i) => /* @__PURE__ */ jsx78("td", { className: live && status2 && i === (f.period ?? 0) - 1 ? "ss-w-nbamon-cur" : void 0, children: cell(played(i) ? row.scores[i] : null) }, i)),
|
|
10886
10916
|
/* @__PURE__ */ jsx78("td", { className: "ss-w-nbamon-total", children: row.total ?? 0 })
|
|
10887
10917
|
] }, row.abbreviation)) })
|
|
10888
10918
|
] })
|
|
@@ -10968,7 +10998,7 @@ function rowsFor(m) {
|
|
|
10968
10998
|
{ key: "away", mark: /* @__PURE__ */ jsx79(Crest, { kind: "team", url: m.awayCrestUrl ?? void 0, name: m.awayTeamName ?? void 0 }), name: m.awayTeamName ?? "", score: away, muted: false }
|
|
10969
10999
|
];
|
|
10970
11000
|
}
|
|
10971
|
-
function
|
|
11001
|
+
function useStripScroll(selectedKey) {
|
|
10972
11002
|
const stripRef = useRef26(null);
|
|
10973
11003
|
useEffect33(() => {
|
|
10974
11004
|
const strip = stripRef.current;
|
|
@@ -10979,13 +11009,17 @@ function ScoreboardStrip({ tiles, selectedKey, onSelect, ui }) {
|
|
|
10979
11009
|
const padding = parseFloat(getComputedStyle(strip).paddingLeft) || 0;
|
|
10980
11010
|
strip.scrollLeft = left - padding;
|
|
10981
11011
|
}, [selectedKey]);
|
|
11012
|
+
return stripRef;
|
|
11013
|
+
}
|
|
11014
|
+
function ScoreboardStrip({ tiles, selectedKey, onSelect, ui }) {
|
|
11015
|
+
const stripRef = useStripScroll(selectedKey);
|
|
10982
11016
|
return /* @__PURE__ */ jsx79("div", { className: "ss-w-strip", ref: stripRef, children: tiles.map((tile) => {
|
|
10983
11017
|
const m = tile.match;
|
|
10984
11018
|
if (!m) return null;
|
|
10985
11019
|
const nba = isBasketball(m);
|
|
10986
11020
|
const sport = sportOf11(m.sport);
|
|
10987
11021
|
const inPlay = m.phase === "live" && !atBreak(m) && !(isAmericanFootball(m) && m.americanFootball?.period == null);
|
|
10988
|
-
const
|
|
11022
|
+
const status2 = nba ? nbaStatus(m, ui) : isAmericanFootball(m) ? nflStatus(m, ui) : footballStatus(m, ui);
|
|
10989
11023
|
const selected = tile.pin.key === selectedKey;
|
|
10990
11024
|
return /* @__PURE__ */ jsxs74(
|
|
10991
11025
|
"button",
|
|
@@ -10997,7 +11031,7 @@ function ScoreboardStrip({ tiles, selectedKey, onSelect, ui }) {
|
|
|
10997
11031
|
children: [
|
|
10998
11032
|
/* @__PURE__ */ jsxs74("span", { className: inPlay ? "ss-w-strip-status ss-w-strip-status--live" : "ss-w-strip-status", children: [
|
|
10999
11033
|
inPlay && /* @__PURE__ */ jsx79("span", { className: "ss-w-strip-dot", "aria-hidden": "true" }),
|
|
11000
|
-
/* @__PURE__ */ jsx79("span", { className: "ss-w-strip-when", children:
|
|
11034
|
+
/* @__PURE__ */ jsx79("span", { className: "ss-w-strip-when", children: status2 }),
|
|
11001
11035
|
sport && /* @__PURE__ */ jsx79("span", { className: "ss-w-strip-sport", children: SPORTS7[sport].label })
|
|
11002
11036
|
] }),
|
|
11003
11037
|
rowsFor(m).map((row) => /* @__PURE__ */ jsxs74("span", { className: row.muted ? "ss-w-strip-row ss-w-strip-row--muted" : "ss-w-strip-row", children: [
|
|
@@ -11012,6 +11046,64 @@ function ScoreboardStrip({ tiles, selectedKey, onSelect, ui }) {
|
|
|
11012
11046
|
}) });
|
|
11013
11047
|
}
|
|
11014
11048
|
|
|
11049
|
+
// src/components/TrendsStrip.tsx
|
|
11050
|
+
import { SPORTS as SPORTS8, sportOf as sportOf12 } from "@sensiblestats/widget-sdk";
|
|
11051
|
+
import { jsx as jsx80, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
11052
|
+
function status(m, ui) {
|
|
11053
|
+
if (m.isSettled || m.phase === "fullTime") return ui.fullTimeLabel;
|
|
11054
|
+
if (m.isSuspended) return ui.suspendedLabel;
|
|
11055
|
+
if (m.phase === "live") return m.minuteLabel ?? "";
|
|
11056
|
+
if (m.phase === "postponed") return ui.postponedLabel;
|
|
11057
|
+
const iso = m.kickoffUtc ?? m.card?.kickoffUtc;
|
|
11058
|
+
if (!iso) return "";
|
|
11059
|
+
const k = ui.bettingKickoff(iso);
|
|
11060
|
+
return `${k.dayLabel} ${k.time}`;
|
|
11061
|
+
}
|
|
11062
|
+
function TrendTileButton({ tile, selected, onSelect, ui }) {
|
|
11063
|
+
const { oddsFormat } = useOddsSettings();
|
|
11064
|
+
const { market: m, vm } = tile;
|
|
11065
|
+
const inPlay = m.phase === "live" && !m.isSuspended && !m.isSettled;
|
|
11066
|
+
const sport = sportOf12(m.card?.sport ?? void 0);
|
|
11067
|
+
const home = vm?.homeTeamName ?? m.homeTeamName ?? "";
|
|
11068
|
+
const away = vm?.awayTeamName ?? m.awayTeamName ?? "";
|
|
11069
|
+
const score = m.phase !== "preMatch" && typeof m.homeScore === "number" ? `${m.homeScore}\u2013${m.awayScore ?? 0}` : null;
|
|
11070
|
+
const row = vm?.mainRows[0];
|
|
11071
|
+
const price = row ? formatOdds(row.priceForms, oddsFormat) : null;
|
|
11072
|
+
return /* @__PURE__ */ jsxs75(
|
|
11073
|
+
"button",
|
|
11074
|
+
{
|
|
11075
|
+
type: "button",
|
|
11076
|
+
className: "ss-w-strip-tile ss-w-strip-tile--trend",
|
|
11077
|
+
"aria-pressed": selected,
|
|
11078
|
+
onClick: () => onSelect(m.key),
|
|
11079
|
+
children: [
|
|
11080
|
+
/* @__PURE__ */ jsxs75("span", { className: inPlay ? "ss-w-strip-status ss-w-strip-status--live" : "ss-w-strip-status", children: [
|
|
11081
|
+
inPlay && /* @__PURE__ */ jsx80("span", { className: "ss-w-strip-dot", "aria-hidden": "true" }),
|
|
11082
|
+
/* @__PURE__ */ jsx80("span", { className: "ss-w-strip-when", children: status(m, ui) }),
|
|
11083
|
+
score ? /* @__PURE__ */ jsx80("span", { className: "ss-w-strip-tscore", children: score }) : sport && /* @__PURE__ */ jsx80("span", { className: "ss-w-strip-sport", children: SPORTS8[sport].label })
|
|
11084
|
+
] }),
|
|
11085
|
+
/* @__PURE__ */ jsxs75("span", { className: "ss-w-strip-fixture", title: `${home} \u2013 ${away}`, children: [
|
|
11086
|
+
/* @__PURE__ */ jsx80(Crest, { kind: "team", url: vm?.homeCrest ?? m.homeCrestUrl ?? void 0, name: home || void 0 }),
|
|
11087
|
+
/* @__PURE__ */ jsx80(Crest, { kind: "team", url: vm?.awayCrest ?? m.awayCrestUrl ?? void 0, name: away || void 0 }),
|
|
11088
|
+
/* @__PURE__ */ jsx80("span", { className: "ss-w-strip-name", children: home && away ? `${home} \u2013 ${away}` : home || away || "\u2013" })
|
|
11089
|
+
] }),
|
|
11090
|
+
vm?.market && /* @__PURE__ */ jsx80("span", { className: "ss-w-strip-market", children: vm.market }),
|
|
11091
|
+
row && price ? /* @__PURE__ */ jsxs75("span", { className: "ss-w-strip-row ss-w-strip-row--price", children: [
|
|
11092
|
+
/* @__PURE__ */ jsx80("span", { className: "ss-w-strip-name", children: row.selection }),
|
|
11093
|
+
/* @__PURE__ */ jsxs75("span", { className: "ss-w-strip-price", children: [
|
|
11094
|
+
row.movementDirection && /* @__PURE__ */ jsx80("span", { className: "ss-w-move-arrow", "aria-hidden": "true", children: row.movementDirection === "shortened" ? "\u25BC" : "\u25B2" }),
|
|
11095
|
+
price
|
|
11096
|
+
] })
|
|
11097
|
+
] }) : /* @__PURE__ */ jsx80("span", { className: "ss-w-strip-market", children: ui.oddsUnavailable })
|
|
11098
|
+
]
|
|
11099
|
+
}
|
|
11100
|
+
);
|
|
11101
|
+
}
|
|
11102
|
+
function TrendsStrip({ tiles, selectedKey, onSelect, ui }) {
|
|
11103
|
+
const stripRef = useStripScroll(selectedKey);
|
|
11104
|
+
return /* @__PURE__ */ jsx80("div", { className: "ss-w-strip", ref: stripRef, children: tiles.map((tile) => /* @__PURE__ */ jsx80(TrendTileButton, { tile, selected: tile.market.key === selectedKey, onSelect, ui }, tile.market.key)) });
|
|
11105
|
+
}
|
|
11106
|
+
|
|
11015
11107
|
// src/monitorSeed.ts
|
|
11016
11108
|
import { matchKey as matchKey4 } from "@sensiblestats/widget-sdk";
|
|
11017
11109
|
function buildSeedIndex(groups) {
|
|
@@ -11060,13 +11152,13 @@ function seedFor(pin, index, states, stale, now) {
|
|
|
11060
11152
|
}
|
|
11061
11153
|
|
|
11062
11154
|
// src/components/MonitorTabs.tsx
|
|
11063
|
-
import { Fragment as Fragment20, jsx as
|
|
11155
|
+
import { Fragment as Fragment20, jsx as jsx81, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
11064
11156
|
function OddsLiveStrip({ m, ui }) {
|
|
11065
11157
|
const showScore = m.phase !== "preMatch" && typeof m.homeScore === "number";
|
|
11066
11158
|
const stale = m.status === "stale";
|
|
11067
11159
|
if (!showScore && !m.minuteLabel && !(m.isSuspended && !m.isSettled) && !m.isSettled && !stale) return null;
|
|
11068
|
-
return /* @__PURE__ */
|
|
11069
|
-
showScore && /* @__PURE__ */
|
|
11160
|
+
return /* @__PURE__ */ jsxs76("div", { className: "ss-w-mk-live", children: [
|
|
11161
|
+
showScore && /* @__PURE__ */ jsxs76("b", { className: "ss-w-mk-live-score", children: [
|
|
11070
11162
|
m.homeTeamName,
|
|
11071
11163
|
" ",
|
|
11072
11164
|
m.homeScore,
|
|
@@ -11075,10 +11167,10 @@ function OddsLiveStrip({ m, ui }) {
|
|
|
11075
11167
|
" ",
|
|
11076
11168
|
m.awayTeamName
|
|
11077
11169
|
] }),
|
|
11078
|
-
m.minuteLabel && /* @__PURE__ */
|
|
11079
|
-
m.isSuspended && !m.isSettled && /* @__PURE__ */
|
|
11080
|
-
m.isSettled && /* @__PURE__ */
|
|
11081
|
-
stale && /* @__PURE__ */
|
|
11170
|
+
m.minuteLabel && /* @__PURE__ */ jsx81("span", { className: "ss-w-mon-min", children: m.minuteLabel }),
|
|
11171
|
+
m.isSuspended && !m.isSettled && /* @__PURE__ */ jsx81("span", { className: "ss-w-mon-susp", children: ui.suspendedLabel }),
|
|
11172
|
+
m.isSettled && /* @__PURE__ */ jsx81("span", { className: "ss-w-mon-pill", children: ui.fullTimeLabel }),
|
|
11173
|
+
stale && /* @__PURE__ */ jsx81("span", { className: "ss-w-mon-asof", children: ui.asOf(new Date(m.asOfUtc).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" })) })
|
|
11082
11174
|
] });
|
|
11083
11175
|
}
|
|
11084
11176
|
function MatchesPanel({ monitor, ui, slip, onAsk, discovery }) {
|
|
@@ -11088,15 +11180,15 @@ function MatchesPanel({ monitor, ui, slip, onAsk, discovery }) {
|
|
|
11088
11180
|
monitor.snapshot,
|
|
11089
11181
|
(pin) => discovery ? seedFor(pin, seedIndex, discovery.states, discovery.stale, /* @__PURE__ */ new Date()) : void 0
|
|
11090
11182
|
);
|
|
11091
|
-
if (tiles.length === 0) return /* @__PURE__ */
|
|
11183
|
+
if (tiles.length === 0) return /* @__PURE__ */ jsx81("div", { className: "ss-w-mon-empty", children: ui.emptyMatchesTab });
|
|
11092
11184
|
const selected = tiles.find((t) => t.pin.key === monitor.selectedMatchKey) ?? tiles[0];
|
|
11093
11185
|
const m = selected.match;
|
|
11094
|
-
return /* @__PURE__ */
|
|
11095
|
-
tiles.filter((t) => t.match).length >= 2 && /* @__PURE__ */
|
|
11096
|
-
/* @__PURE__ */
|
|
11097
|
-
!m && /* @__PURE__ */
|
|
11098
|
-
m && (sportKeyOf(m.sport) === "americanfootball" ? /* @__PURE__ */
|
|
11099
|
-
/* @__PURE__ */
|
|
11186
|
+
return /* @__PURE__ */ jsxs76(Fragment20, { children: [
|
|
11187
|
+
tiles.filter((t) => t.match).length >= 2 && /* @__PURE__ */ jsx81(ScoreboardStrip, { tiles, selectedKey: selected.pin.key, onSelect: monitor.selectMatch, ui }),
|
|
11188
|
+
/* @__PURE__ */ jsxs76("div", { className: "ss-w-mon-list", children: [
|
|
11189
|
+
!m && /* @__PURE__ */ jsx81(MonitorSkeleton, { pin: selected.pin, monitor, ui }),
|
|
11190
|
+
m && (sportKeyOf(m.sport) === "americanfootball" ? /* @__PURE__ */ jsx81(NflMonitorCard, { match: m, monitor, ui, slip }) : isBasketball(m) ? /* @__PURE__ */ jsx81(NbaMonitorCard, { match: m, monitor, ui, slip }) : /* @__PURE__ */ jsxs76("div", { className: "ss-w-mon-item", children: [
|
|
11191
|
+
/* @__PURE__ */ jsx81(
|
|
11100
11192
|
MonitorMatchCard,
|
|
11101
11193
|
{
|
|
11102
11194
|
match: m,
|
|
@@ -11107,7 +11199,7 @@ function MatchesPanel({ monitor, ui, slip, onAsk, discovery }) {
|
|
|
11107
11199
|
onAsk
|
|
11108
11200
|
}
|
|
11109
11201
|
),
|
|
11110
|
-
/* @__PURE__ */
|
|
11202
|
+
/* @__PURE__ */ jsx81(MarketAccordion, { match: m, monitor, ui, slip })
|
|
11111
11203
|
] }))
|
|
11112
11204
|
] })
|
|
11113
11205
|
] });
|
|
@@ -11124,16 +11216,22 @@ function withSinceViewMovement(vm, prev) {
|
|
|
11124
11216
|
}
|
|
11125
11217
|
function TrendsPanel({ monitor, ui, slip }) {
|
|
11126
11218
|
const slipState = useSlipState();
|
|
11127
|
-
const
|
|
11128
|
-
|
|
11129
|
-
|
|
11130
|
-
|
|
11131
|
-
|
|
11132
|
-
|
|
11133
|
-
|
|
11219
|
+
const tiles = orderTrendMarkets(monitor.pins, monitor.snapshot).map((market) => ({
|
|
11220
|
+
market,
|
|
11221
|
+
vm: market.card ? withSinceViewMovement(toMarketOddsVM(market.card), monitor.lastViewedPrices[market.key]) : void 0
|
|
11222
|
+
}));
|
|
11223
|
+
if (tiles.length === 0) return /* @__PURE__ */ jsx81("div", { className: "ss-w-mon-empty", children: ui.emptyTrendsTab });
|
|
11224
|
+
const selected = tiles.find((t) => t.market.key === monitor.selectedTrendKey) ?? tiles[0];
|
|
11225
|
+
const m = selected.market;
|
|
11226
|
+
const pin = monitor.pins.find((p) => p.key === m.key);
|
|
11227
|
+
return /* @__PURE__ */ jsxs76(Fragment20, { children: [
|
|
11228
|
+
tiles.length >= 2 && monitor.selectTrend && /* @__PURE__ */ jsx81(TrendsStrip, { tiles, selectedKey: m.key, onSelect: monitor.selectTrend, ui }),
|
|
11229
|
+
/* @__PURE__ */ jsx81("div", { className: "ss-w-mon-list", children: /* @__PURE__ */ jsxs76("div", { className: "ss-w-mon-oddspin", "data-settled": m.isSettled || void 0, children: [
|
|
11230
|
+
/* @__PURE__ */ jsx81(OddsLiveStrip, { m, ui }),
|
|
11231
|
+
selected.vm && /* @__PURE__ */ jsx81(
|
|
11134
11232
|
MarketOddsCardList,
|
|
11135
11233
|
{
|
|
11136
|
-
cards: [
|
|
11234
|
+
cards: [selected.vm],
|
|
11137
11235
|
ui,
|
|
11138
11236
|
slip,
|
|
11139
11237
|
monitor,
|
|
@@ -11141,10 +11239,10 @@ function TrendsPanel({ monitor, ui, slip }) {
|
|
|
11141
11239
|
inSlipIds: slipState?.added
|
|
11142
11240
|
}
|
|
11143
11241
|
),
|
|
11144
|
-
m.history && /* @__PURE__ */
|
|
11145
|
-
!m.card && !m.history && /* @__PURE__ */
|
|
11146
|
-
] }, m.key)
|
|
11147
|
-
|
|
11242
|
+
m.history && /* @__PURE__ */ jsx81(OddsMovementCardList, { cards: [toOddsMovementVM(m.history)], ui }),
|
|
11243
|
+
!m.card && !m.history && /* @__PURE__ */ jsx81("div", { className: "ss-w-mon-empty-card", children: ui.oddsUnavailable })
|
|
11244
|
+
] }, m.key) })
|
|
11245
|
+
] });
|
|
11148
11246
|
}
|
|
11149
11247
|
|
|
11150
11248
|
// src/components/TodayPanel.tsx
|
|
@@ -11232,25 +11330,25 @@ function useStarTap(starLeague) {
|
|
|
11232
11330
|
}
|
|
11233
11331
|
|
|
11234
11332
|
// src/components/LeagueTile.tsx
|
|
11235
|
-
import { jsx as
|
|
11333
|
+
import { jsx as jsx82, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
11236
11334
|
var STAR_PATH = "M12 2.5l2.9 5.9 6.5.95-4.7 4.58 1.1 6.47L12 17.35 6.1 20.4l1.1-6.47L2.5 9.35l6.5-.95z";
|
|
11237
11335
|
function LeagueTile({ group, starClickable: starClickable2, disambiguate, onOpen, starTap, ui }) {
|
|
11238
11336
|
const onStarClick = () => {
|
|
11239
11337
|
void starTap.tap(group.competitionId, !group.isStarred);
|
|
11240
11338
|
};
|
|
11241
|
-
return /* @__PURE__ */
|
|
11242
|
-
/* @__PURE__ */
|
|
11243
|
-
/* @__PURE__ */
|
|
11244
|
-
/* @__PURE__ */
|
|
11339
|
+
return /* @__PURE__ */ jsxs77("div", { className: "ss-w-today-tile", children: [
|
|
11340
|
+
/* @__PURE__ */ jsxs77("button", { type: "button", className: "ss-w-today-tile-body", onClick: onOpen, children: [
|
|
11341
|
+
/* @__PURE__ */ jsx82(Crest, { url: group.competitionImagePath ?? void 0, name: group.competitionName, kind: "comp" }),
|
|
11342
|
+
/* @__PURE__ */ jsxs77("span", { className: "ss-w-today-tile-name", children: [
|
|
11245
11343
|
group.competitionName,
|
|
11246
|
-
disambiguate && group.competitionCountry ? /* @__PURE__ */
|
|
11344
|
+
disambiguate && group.competitionCountry ? /* @__PURE__ */ jsxs77("span", { className: "ss-w-today-tile-country", children: [
|
|
11247
11345
|
" (",
|
|
11248
11346
|
group.competitionCountry,
|
|
11249
11347
|
")"
|
|
11250
11348
|
] }) : null
|
|
11251
11349
|
] })
|
|
11252
11350
|
] }),
|
|
11253
|
-
sportKeyOf(group.sport) === "football" && /* @__PURE__ */
|
|
11351
|
+
sportKeyOf(group.sport) === "football" && /* @__PURE__ */ jsx82(
|
|
11254
11352
|
"button",
|
|
11255
11353
|
{
|
|
11256
11354
|
type: "button",
|
|
@@ -11259,7 +11357,7 @@ function LeagueTile({ group, starClickable: starClickable2, disambiguate, onOpen
|
|
|
11259
11357
|
"aria-label": group.isStarred ? ui.starOffLabel : ui.starOnLabel,
|
|
11260
11358
|
disabled: !starClickable2 || starTap.pendingId !== null,
|
|
11261
11359
|
onClick: onStarClick,
|
|
11262
|
-
children: /* @__PURE__ */
|
|
11360
|
+
children: /* @__PURE__ */ jsx82("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ jsx82(
|
|
11263
11361
|
"path",
|
|
11264
11362
|
{
|
|
11265
11363
|
d: STAR_PATH,
|
|
@@ -11281,7 +11379,7 @@ import { matchKey as matchKey5 } from "@sensiblestats/widget-sdk";
|
|
|
11281
11379
|
|
|
11282
11380
|
// src/components/FixtureRow.tsx
|
|
11283
11381
|
import { slipSportOf as slipSportOf8 } from "@sensiblestats/widget-sdk";
|
|
11284
|
-
import { jsx as
|
|
11382
|
+
import { jsx as jsx83, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
11285
11383
|
function splitAtFirstSpace(label) {
|
|
11286
11384
|
const i = label.indexOf(" ");
|
|
11287
11385
|
return i > 0 && i < label.length - 1 ? [label.slice(0, i), label.slice(i + 1)] : null;
|
|
@@ -11295,9 +11393,9 @@ function kickoffLabel(kickoffUnix) {
|
|
|
11295
11393
|
return `${`${d.getHours()}`.padStart(2, "0")}:${`${d.getMinutes()}`.padStart(2, "0")}`;
|
|
11296
11394
|
}
|
|
11297
11395
|
function Side2({ name, crest, abbr, away = false }) {
|
|
11298
|
-
return /* @__PURE__ */
|
|
11299
|
-
abbr ? /* @__PURE__ */
|
|
11300
|
-
/* @__PURE__ */
|
|
11396
|
+
return /* @__PURE__ */ jsxs78("span", { className: away ? "ss-w-drow-side ss-w-drow-side--away" : "ss-w-drow-side", children: [
|
|
11397
|
+
abbr ? /* @__PURE__ */ jsx83("span", { className: "ss-w-drow-crest ss-w-drow-crest--abbr", children: abbr }) : crest ? /* @__PURE__ */ jsx83("img", { className: "ss-w-drow-crest", src: crest, alt: "" }) : null,
|
|
11398
|
+
/* @__PURE__ */ jsx83("span", { className: "ss-w-drow-nm", children: name })
|
|
11301
11399
|
] });
|
|
11302
11400
|
}
|
|
11303
11401
|
function FixtureRow({ match, state, stale, ui, monitor }) {
|
|
@@ -11317,14 +11415,14 @@ function FixtureRow({ match, state, stale, ui, monitor }) {
|
|
|
11317
11415
|
liveTone ? "ss-w-drow-when--live" : null,
|
|
11318
11416
|
twoLines ? "ss-w-drow-when--two" : null
|
|
11319
11417
|
].filter(Boolean).join(" ");
|
|
11320
|
-
return /* @__PURE__ */
|
|
11321
|
-
/* @__PURE__ */
|
|
11322
|
-
/* @__PURE__ */
|
|
11323
|
-
/* @__PURE__ */
|
|
11324
|
-
/* @__PURE__ */
|
|
11325
|
-
/* @__PURE__ */
|
|
11418
|
+
return /* @__PURE__ */ jsxs78("div", { className: liveTone ? "ss-w-drow ss-w-drow--live" : "ss-w-drow", children: [
|
|
11419
|
+
/* @__PURE__ */ jsx83("span", { className: whenClass, children: twoLines ? twoLines.map((line, i) => /* @__PURE__ */ jsx83("span", { children: line }, i)) : when }),
|
|
11420
|
+
/* @__PURE__ */ jsxs78("span", { className: "ss-w-drow-fx", children: [
|
|
11421
|
+
/* @__PURE__ */ jsx83(Side2, { name: match.homeTeamName, crest: match.homeTeamImagePath, abbr: isUsSport ? match.homeTeamAbbr ?? void 0 : void 0 }),
|
|
11422
|
+
/* @__PURE__ */ jsx83("span", { className: hasScore ? "ss-w-drow-sc" : "ss-w-drow-sc ss-w-drow-sc--idle", children: score ?? "\u2013" }),
|
|
11423
|
+
/* @__PURE__ */ jsx83(Side2, { name: match.awayTeamName, crest: match.awayTeamImagePath, abbr: isUsSport ? match.awayTeamAbbr ?? void 0 : void 0, away: true })
|
|
11326
11424
|
] }),
|
|
11327
|
-
/* @__PURE__ */
|
|
11425
|
+
/* @__PURE__ */ jsx83(
|
|
11328
11426
|
PinToggle,
|
|
11329
11427
|
{
|
|
11330
11428
|
ui,
|
|
@@ -11336,7 +11434,7 @@ function FixtureRow({ match, state, stale, ui, monitor }) {
|
|
|
11336
11434
|
}
|
|
11337
11435
|
|
|
11338
11436
|
// src/components/LeagueDetail.tsx
|
|
11339
|
-
import { jsx as
|
|
11437
|
+
import { jsx as jsx84, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
11340
11438
|
var STAR_PATH2 = "M12 2.5l2.9 5.9 6.5.95-4.7 4.58 1.1 6.47L12 17.35 6.1 20.4l1.1-6.47L2.5 9.35l6.5-.95z";
|
|
11341
11439
|
function LeagueDetail({ group, position, states, stale, ui, monitor, starTap, onBack, onPrev, onNext }) {
|
|
11342
11440
|
const [toast, setToast] = useState47(null);
|
|
@@ -11355,12 +11453,12 @@ function LeagueDetail({ group, position, states, stale, ui, monitor, starTap, on
|
|
|
11355
11453
|
if (ok) setToast(next ? ui.starredToast : ui.unstarredToast);
|
|
11356
11454
|
});
|
|
11357
11455
|
};
|
|
11358
|
-
return /* @__PURE__ */
|
|
11359
|
-
/* @__PURE__ */
|
|
11360
|
-
/* @__PURE__ */
|
|
11361
|
-
/* @__PURE__ */
|
|
11362
|
-
/* @__PURE__ */
|
|
11363
|
-
sportKeyOf(group.sport) === "football" && /* @__PURE__ */
|
|
11456
|
+
return /* @__PURE__ */ jsxs79("div", { className: "ss-w-today-detail", children: [
|
|
11457
|
+
/* @__PURE__ */ jsxs79("div", { className: "ss-w-today-detail-head", children: [
|
|
11458
|
+
/* @__PURE__ */ jsx84("button", { type: "button", className: "ss-w-today-detail-back", "aria-label": ui.back, onClick: onBack, children: /* @__PURE__ */ jsx84(ChevronIcon, {}) }),
|
|
11459
|
+
/* @__PURE__ */ jsx84(Crest, { url: group.competitionImagePath ?? void 0, name: group.competitionName, kind: "comp" }),
|
|
11460
|
+
/* @__PURE__ */ jsx84("span", { className: "ss-w-today-detail-name", children: group.competitionName }),
|
|
11461
|
+
sportKeyOf(group.sport) === "football" && /* @__PURE__ */ jsx84(
|
|
11364
11462
|
"button",
|
|
11365
11463
|
{
|
|
11366
11464
|
type: "button",
|
|
@@ -11369,7 +11467,7 @@ function LeagueDetail({ group, position, states, stale, ui, monitor, starTap, on
|
|
|
11369
11467
|
"aria-label": group.isStarred ? ui.starOffLabel : ui.starOnLabel,
|
|
11370
11468
|
disabled: starTap.pendingId !== null,
|
|
11371
11469
|
onClick: onStarClick,
|
|
11372
|
-
children: /* @__PURE__ */
|
|
11470
|
+
children: /* @__PURE__ */ jsx84("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ jsx84(
|
|
11373
11471
|
"path",
|
|
11374
11472
|
{
|
|
11375
11473
|
d: STAR_PATH2,
|
|
@@ -11383,8 +11481,8 @@ function LeagueDetail({ group, position, states, stale, ui, monitor, starTap, on
|
|
|
11383
11481
|
}
|
|
11384
11482
|
)
|
|
11385
11483
|
] }),
|
|
11386
|
-
/* @__PURE__ */
|
|
11387
|
-
/* @__PURE__ */
|
|
11484
|
+
/* @__PURE__ */ jsxs79("div", { className: "ss-w-today-detail-nav", children: [
|
|
11485
|
+
/* @__PURE__ */ jsx84(
|
|
11388
11486
|
"button",
|
|
11389
11487
|
{
|
|
11390
11488
|
type: "button",
|
|
@@ -11392,11 +11490,11 @@ function LeagueDetail({ group, position, states, stale, ui, monitor, starTap, on
|
|
|
11392
11490
|
"aria-label": ui.prevLeagueLabel,
|
|
11393
11491
|
disabled: position.index <= 1,
|
|
11394
11492
|
onClick: onPrev,
|
|
11395
|
-
children: /* @__PURE__ */
|
|
11493
|
+
children: /* @__PURE__ */ jsx84(ChevronIcon, {})
|
|
11396
11494
|
}
|
|
11397
11495
|
),
|
|
11398
|
-
/* @__PURE__ */
|
|
11399
|
-
/* @__PURE__ */
|
|
11496
|
+
/* @__PURE__ */ jsx84("span", { className: "ss-w-today-detail-pos", children: ui.leagueDetailPosition(position.index, position.total) }),
|
|
11497
|
+
/* @__PURE__ */ jsx84(
|
|
11400
11498
|
"button",
|
|
11401
11499
|
{
|
|
11402
11500
|
type: "button",
|
|
@@ -11404,13 +11502,13 @@ function LeagueDetail({ group, position, states, stale, ui, monitor, starTap, on
|
|
|
11404
11502
|
"aria-label": ui.nextLeagueLabel,
|
|
11405
11503
|
disabled: position.index >= position.total,
|
|
11406
11504
|
onClick: onNext,
|
|
11407
|
-
children: /* @__PURE__ */
|
|
11505
|
+
children: /* @__PURE__ */ jsx84(ChevronIcon, {})
|
|
11408
11506
|
}
|
|
11409
11507
|
)
|
|
11410
11508
|
] }),
|
|
11411
|
-
/* @__PURE__ */
|
|
11412
|
-
/* @__PURE__ */
|
|
11413
|
-
own.map((m) => /* @__PURE__ */
|
|
11509
|
+
/* @__PURE__ */ jsxs79("div", { className: "ss-w-today-detail-body", children: [
|
|
11510
|
+
/* @__PURE__ */ jsx84("span", { className: "ss-w-today-detail-count", children: own.length }),
|
|
11511
|
+
own.map((m) => /* @__PURE__ */ jsx84(
|
|
11414
11512
|
FixtureRow,
|
|
11415
11513
|
{
|
|
11416
11514
|
match: m,
|
|
@@ -11422,13 +11520,13 @@ function LeagueDetail({ group, position, states, stale, ui, monitor, starTap, on
|
|
|
11422
11520
|
matchKey5(m.sport, m.matchId)
|
|
11423
11521
|
))
|
|
11424
11522
|
] }),
|
|
11425
|
-
toast !== null && /* @__PURE__ */
|
|
11523
|
+
toast !== null && /* @__PURE__ */ jsx84("p", { className: "ss-w-today-toast", role: "status", "aria-live": "polite", children: toast })
|
|
11426
11524
|
] });
|
|
11427
11525
|
}
|
|
11428
11526
|
|
|
11429
11527
|
// src/components/LeagueRowGroup.tsx
|
|
11430
11528
|
import { matchKey as matchKey6 } from "@sensiblestats/widget-sdk";
|
|
11431
|
-
import { jsx as
|
|
11529
|
+
import { jsx as jsx85, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
11432
11530
|
var ROW_CAP_PER_LEAGUE = 3;
|
|
11433
11531
|
var SECTION_ROW_BUDGET = 12;
|
|
11434
11532
|
function rowsFor2(group, states, stale) {
|
|
@@ -11444,20 +11542,20 @@ function LeagueRowGroup({ group, states, stale, cap: cap2, starClickable: starCl
|
|
|
11444
11542
|
const onStarClick = () => {
|
|
11445
11543
|
void starTap.tap(group.competitionId, !group.isStarred);
|
|
11446
11544
|
};
|
|
11447
|
-
return /* @__PURE__ */
|
|
11448
|
-
/* @__PURE__ */
|
|
11449
|
-
/* @__PURE__ */
|
|
11450
|
-
/* @__PURE__ */
|
|
11451
|
-
/* @__PURE__ */
|
|
11545
|
+
return /* @__PURE__ */ jsxs80("div", { className: "ss-w-today-rowgroup", children: [
|
|
11546
|
+
/* @__PURE__ */ jsxs80("div", { className: "ss-w-today-rowgroup-head", children: [
|
|
11547
|
+
/* @__PURE__ */ jsxs80("button", { type: "button", className: "ss-w-today-rowgroup-head-body", onClick: onOpen, children: [
|
|
11548
|
+
/* @__PURE__ */ jsx85(Crest, { url: group.competitionImagePath ?? void 0, name: group.competitionName, kind: "comp" }),
|
|
11549
|
+
/* @__PURE__ */ jsxs80("span", { className: "ss-w-today-rowgroup-name", children: [
|
|
11452
11550
|
group.competitionName,
|
|
11453
|
-
disambiguate && group.competitionCountry ? /* @__PURE__ */
|
|
11551
|
+
disambiguate && group.competitionCountry ? /* @__PURE__ */ jsxs80("span", { className: "ss-w-today-tile-country", children: [
|
|
11454
11552
|
" (",
|
|
11455
11553
|
group.competitionCountry,
|
|
11456
11554
|
")"
|
|
11457
11555
|
] }) : null
|
|
11458
11556
|
] })
|
|
11459
11557
|
] }),
|
|
11460
|
-
sportKeyOf(group.sport) === "football" && /* @__PURE__ */
|
|
11558
|
+
sportKeyOf(group.sport) === "football" && /* @__PURE__ */ jsx85(
|
|
11461
11559
|
"button",
|
|
11462
11560
|
{
|
|
11463
11561
|
type: "button",
|
|
@@ -11466,7 +11564,7 @@ function LeagueRowGroup({ group, states, stale, cap: cap2, starClickable: starCl
|
|
|
11466
11564
|
"aria-label": group.isStarred ? ui.starOffLabel : ui.starOnLabel,
|
|
11467
11565
|
disabled: !starClickable2 || starTap.pendingId !== null,
|
|
11468
11566
|
onClick: onStarClick,
|
|
11469
|
-
children: /* @__PURE__ */
|
|
11567
|
+
children: /* @__PURE__ */ jsx85("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ jsx85(
|
|
11470
11568
|
"path",
|
|
11471
11569
|
{
|
|
11472
11570
|
d: STAR_PATH3,
|
|
@@ -11480,7 +11578,7 @@ function LeagueRowGroup({ group, states, stale, cap: cap2, starClickable: starCl
|
|
|
11480
11578
|
}
|
|
11481
11579
|
)
|
|
11482
11580
|
] }),
|
|
11483
|
-
/* @__PURE__ */
|
|
11581
|
+
/* @__PURE__ */ jsx85("div", { className: "ss-w-today-rowgroup-rows", children: shown2.map((m) => /* @__PURE__ */ jsx85(
|
|
11484
11582
|
FixtureRow,
|
|
11485
11583
|
{
|
|
11486
11584
|
match: m,
|
|
@@ -11491,7 +11589,7 @@ function LeagueRowGroup({ group, states, stale, cap: cap2, starClickable: starCl
|
|
|
11491
11589
|
},
|
|
11492
11590
|
matchKey6(m.sport, m.matchId)
|
|
11493
11591
|
)) }),
|
|
11494
|
-
overflow > 0 && /* @__PURE__ */
|
|
11592
|
+
overflow > 0 && /* @__PURE__ */ jsx85("button", { type: "button", className: "ss-w-today-rowgroup-seeall", onClick: onOpen, children: ui.seeAllFixturesLabel(sorted.length) })
|
|
11495
11593
|
] });
|
|
11496
11594
|
}
|
|
11497
11595
|
|
|
@@ -11499,8 +11597,8 @@ function LeagueRowGroup({ group, states, stale, cap: cap2, starClickable: starCl
|
|
|
11499
11597
|
import { useCallback as useCallback22, useRef as useRef28 } from "react";
|
|
11500
11598
|
|
|
11501
11599
|
// src/components/games/ui/icons.tsx
|
|
11502
|
-
import { jsx as
|
|
11503
|
-
var svg = (size, children, fill = false) => /* @__PURE__ */
|
|
11600
|
+
import { jsx as jsx86 } from "react/jsx-runtime";
|
|
11601
|
+
var svg = (size, children, fill = false) => /* @__PURE__ */ jsx86(
|
|
11504
11602
|
"svg",
|
|
11505
11603
|
{
|
|
11506
11604
|
width: size,
|
|
@@ -11515,25 +11613,25 @@ var svg = (size, children, fill = false) => /* @__PURE__ */ jsx85(
|
|
|
11515
11613
|
children
|
|
11516
11614
|
}
|
|
11517
11615
|
);
|
|
11518
|
-
var IconChevronLeft = ({ size = 20 }) => svg(size, /* @__PURE__ */
|
|
11519
|
-
var IconLock = ({ size = 14 }) => svg(size, [/* @__PURE__ */
|
|
11520
|
-
var IconCheck = ({ size = 14 }) => svg(size, /* @__PURE__ */
|
|
11521
|
-
var IconClose = ({ size = 16 }) => svg(size, /* @__PURE__ */
|
|
11522
|
-
var IconSearch = ({ size = 18 }) => svg(size, [/* @__PURE__ */
|
|
11523
|
-
var IconPlus = ({ size = 20 }) => svg(size, /* @__PURE__ */
|
|
11524
|
-
var IconBulb = ({ size = 16 }) => svg(size, [/* @__PURE__ */
|
|
11525
|
-
var IconArrowUp = ({ size = 12 }) => svg(size, /* @__PURE__ */
|
|
11526
|
-
var IconArrowDown = ({ size = 12 }) => svg(size, /* @__PURE__ */
|
|
11527
|
-
var IconCalendar = ({ size = 18 }) => svg(size, [/* @__PURE__ */
|
|
11528
|
-
var IconShield = ({ size = 18 }) => svg(size, /* @__PURE__ */
|
|
11529
|
-
var IconFlag = ({ size = 18 }) => svg(size, /* @__PURE__ */
|
|
11530
|
-
var IconBall = ({ size = 18 }) => svg(size, [/* @__PURE__ */
|
|
11531
|
-
var IconBoot = ({ size = 18 }) => svg(size, /* @__PURE__ */
|
|
11532
|
-
var IconGloves = ({ size = 18 }) => svg(size, /* @__PURE__ */
|
|
11533
|
-
var IconFlame = ({ size = 16 }) => svg(size, /* @__PURE__ */
|
|
11616
|
+
var IconChevronLeft = ({ size = 20 }) => svg(size, /* @__PURE__ */ jsx86("path", { d: "M15 18l-6-6 6-6" }));
|
|
11617
|
+
var IconLock = ({ size = 14 }) => svg(size, [/* @__PURE__ */ jsx86("rect", { x: "5", y: "11", width: "14", height: "10", rx: "2" }, "a"), /* @__PURE__ */ jsx86("path", { d: "M8 11V7a4 4 0 0 1 8 0v4" }, "b")]);
|
|
11618
|
+
var IconCheck = ({ size = 14 }) => svg(size, /* @__PURE__ */ jsx86("path", { d: "M5 12l5 5 9-10" }));
|
|
11619
|
+
var IconClose = ({ size = 16 }) => svg(size, /* @__PURE__ */ jsx86("path", { d: "M6 6l12 12M18 6L6 18" }));
|
|
11620
|
+
var IconSearch = ({ size = 18 }) => svg(size, [/* @__PURE__ */ jsx86("circle", { cx: "11", cy: "11", r: "7" }, "a"), /* @__PURE__ */ jsx86("path", { d: "M20 20l-3.5-3.5" }, "b")]);
|
|
11621
|
+
var IconPlus = ({ size = 20 }) => svg(size, /* @__PURE__ */ jsx86("path", { d: "M12 5v14M5 12h14" }));
|
|
11622
|
+
var IconBulb = ({ size = 16 }) => svg(size, [/* @__PURE__ */ jsx86("path", { d: "M9 18h6M10 21h4" }, "a"), /* @__PURE__ */ jsx86("path", { d: "M12 3a6 6 0 0 0-3.5 10.9V16h7v-2.1A6 6 0 0 0 12 3z" }, "b")]);
|
|
11623
|
+
var IconArrowUp = ({ size = 12 }) => svg(size, /* @__PURE__ */ jsx86("path", { d: "M12 19V5M5 12l7-7 7 7" }));
|
|
11624
|
+
var IconArrowDown = ({ size = 12 }) => svg(size, /* @__PURE__ */ jsx86("path", { d: "M12 5v14M19 12l-7 7-7-7" }));
|
|
11625
|
+
var IconCalendar = ({ size = 18 }) => svg(size, [/* @__PURE__ */ jsx86("rect", { x: "4", y: "5", width: "16", height: "15", rx: "2" }, "a"), /* @__PURE__ */ jsx86("path", { d: "M4 10h16M9 3v4M15 3v4" }, "b")]);
|
|
11626
|
+
var IconShield = ({ size = 18 }) => svg(size, /* @__PURE__ */ jsx86("path", { d: "M12 3l7 3v6c0 5-3 8-7 9-4-1-7-4-7-9V6z" }));
|
|
11627
|
+
var IconFlag = ({ size = 18 }) => svg(size, /* @__PURE__ */ jsx86("path", { d: "M5 21V4M5 4h12l-2 4 2 4H5" }));
|
|
11628
|
+
var IconBall = ({ size = 18 }) => svg(size, [/* @__PURE__ */ jsx86("circle", { cx: "12", cy: "12", r: "9" }, "a"), /* @__PURE__ */ jsx86("path", { d: "M12 7l4 3-1.5 4.5h-5L8 10z" }, "b")]);
|
|
11629
|
+
var IconBoot = ({ size = 18 }) => svg(size, /* @__PURE__ */ jsx86("path", { d: "M4 6h6l1 6 8 3v3H4z" }));
|
|
11630
|
+
var IconGloves = ({ size = 18 }) => svg(size, /* @__PURE__ */ jsx86("path", { d: "M7 21v-8l-2-3V6a1.5 1.5 0 0 1 3 0v3V4a1.5 1.5 0 0 1 3 0v5V3.5a1.5 1.5 0 0 1 3 0V9V5a1.5 1.5 0 0 1 3 0v9l-2 3v4z" }));
|
|
11631
|
+
var IconFlame = ({ size = 16 }) => svg(size, /* @__PURE__ */ jsx86("path", { d: "M12 3c1 4 5 5 5 10a5 5 0 0 1-10 0c0-3 2-4 2-7 1.5 1 2 2 2 3 1-2 1-4 1-6z" }), true);
|
|
11534
11632
|
|
|
11535
11633
|
// src/components/games/ui/SearchField.tsx
|
|
11536
|
-
import { jsx as
|
|
11634
|
+
import { jsx as jsx87, jsxs as jsxs81 } from "react/jsx-runtime";
|
|
11537
11635
|
function SearchField({ id, label, labelHidden = false, placeholder, value, onChange, disabled, inputRef, onKeyDown, clearLabel }) {
|
|
11538
11636
|
const localRef = useRef28(null);
|
|
11539
11637
|
const setInputRef = useCallback22((node) => {
|
|
@@ -11541,11 +11639,11 @@ function SearchField({ id, label, labelHidden = false, placeholder, value, onCha
|
|
|
11541
11639
|
if (typeof inputRef === "function") inputRef(node);
|
|
11542
11640
|
else if (inputRef) inputRef.current = node;
|
|
11543
11641
|
}, [inputRef]);
|
|
11544
|
-
return /* @__PURE__ */
|
|
11545
|
-
/* @__PURE__ */
|
|
11546
|
-
/* @__PURE__ */
|
|
11547
|
-
/* @__PURE__ */
|
|
11548
|
-
/* @__PURE__ */
|
|
11642
|
+
return /* @__PURE__ */ jsxs81("div", { className: "ss-g-search", children: [
|
|
11643
|
+
/* @__PURE__ */ jsx87("label", { htmlFor: id, className: labelHidden ? "ss-g-sr" : "ss-g-search-label", children: label }),
|
|
11644
|
+
/* @__PURE__ */ jsxs81("div", { className: "ss-g-search-box", children: [
|
|
11645
|
+
/* @__PURE__ */ jsx87(IconSearch, {}),
|
|
11646
|
+
/* @__PURE__ */ jsx87(
|
|
11549
11647
|
"input",
|
|
11550
11648
|
{
|
|
11551
11649
|
id,
|
|
@@ -11559,7 +11657,7 @@ function SearchField({ id, label, labelHidden = false, placeholder, value, onCha
|
|
|
11559
11657
|
onChange: (e) => onChange(e.target.value)
|
|
11560
11658
|
}
|
|
11561
11659
|
),
|
|
11562
|
-
clearLabel && value.length > 0 ? /* @__PURE__ */
|
|
11660
|
+
clearLabel && value.length > 0 ? /* @__PURE__ */ jsx87(
|
|
11563
11661
|
"button",
|
|
11564
11662
|
{
|
|
11565
11663
|
type: "button",
|
|
@@ -11569,7 +11667,7 @@ function SearchField({ id, label, labelHidden = false, placeholder, value, onCha
|
|
|
11569
11667
|
onChange("");
|
|
11570
11668
|
localRef.current?.focus();
|
|
11571
11669
|
},
|
|
11572
|
-
children: /* @__PURE__ */
|
|
11670
|
+
children: /* @__PURE__ */ jsx87(IconClose, { size: 11 })
|
|
11573
11671
|
}
|
|
11574
11672
|
) : null
|
|
11575
11673
|
] })
|
|
@@ -11577,7 +11675,7 @@ function SearchField({ id, label, labelHidden = false, placeholder, value, onCha
|
|
|
11577
11675
|
}
|
|
11578
11676
|
|
|
11579
11677
|
// src/components/TodayPanel.tsx
|
|
11580
|
-
import { Fragment as Fragment21, jsx as
|
|
11678
|
+
import { Fragment as Fragment21, jsx as jsx88, jsxs as jsxs82 } from "react/jsx-runtime";
|
|
11581
11679
|
function TodayPanel({ discovery, ui, monitor }) {
|
|
11582
11680
|
const { groups, states, stale, starLeague } = discovery;
|
|
11583
11681
|
const searchId = useId2();
|
|
@@ -11634,12 +11732,12 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
11634
11732
|
if (selectedCompetitionId !== null && openGroup === void 0) setSelectedCompetitionId(null);
|
|
11635
11733
|
}, [selectedCompetitionId, openGroup]);
|
|
11636
11734
|
const liveRows = stale ? [] : visibleGroups.flatMap((group) => group.matches.filter((m) => isTreatedLive(states.get(matchKey7(m.sport, m.matchId)), stale)).map((match) => ({ match, rank: group.rank }))).sort((a, b) => a.rank - b.rank);
|
|
11637
|
-
const liveBand = liveRows.length > 0 && /* @__PURE__ */
|
|
11638
|
-
/* @__PURE__ */
|
|
11639
|
-
/* @__PURE__ */
|
|
11735
|
+
const liveBand = liveRows.length > 0 && /* @__PURE__ */ jsxs82(Fragment21, { children: [
|
|
11736
|
+
/* @__PURE__ */ jsxs82("div", { className: "ss-w-sec-head", children: [
|
|
11737
|
+
/* @__PURE__ */ jsx88("span", { className: "ss-w-sec-dot", "aria-hidden": "true" }),
|
|
11640
11738
|
ui.sectionLive
|
|
11641
11739
|
] }),
|
|
11642
|
-
/* @__PURE__ */
|
|
11740
|
+
/* @__PURE__ */ jsx88("div", { className: "ss-w-today-live", children: liveRows.map(({ match }) => /* @__PURE__ */ jsx88(
|
|
11643
11741
|
FixtureRow,
|
|
11644
11742
|
{
|
|
11645
11743
|
match,
|
|
@@ -11652,10 +11750,10 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
11652
11750
|
)) })
|
|
11653
11751
|
] });
|
|
11654
11752
|
if (openGroup !== void 0) {
|
|
11655
|
-
return /* @__PURE__ */
|
|
11656
|
-
stale && /* @__PURE__ */
|
|
11753
|
+
return /* @__PURE__ */ jsx88("div", { className: "ss-w-today-root", children: /* @__PURE__ */ jsxs82("div", { className: "ss-w-mon-list", children: [
|
|
11754
|
+
stale && /* @__PURE__ */ jsx88("div", { className: "ss-w-stale", children: ui.staleStates }),
|
|
11657
11755
|
liveBand,
|
|
11658
|
-
/* @__PURE__ */
|
|
11756
|
+
/* @__PURE__ */ jsx88(
|
|
11659
11757
|
LeagueDetail,
|
|
11660
11758
|
{
|
|
11661
11759
|
group: openGroup,
|
|
@@ -11676,11 +11774,11 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
11676
11774
|
}
|
|
11677
11775
|
const searching = query.trim().length > 0;
|
|
11678
11776
|
const searchResults = searching ? placement.order.filter((g) => matchesQuery(g, query)) : [];
|
|
11679
|
-
return /* @__PURE__ */
|
|
11680
|
-
/* @__PURE__ */
|
|
11681
|
-
stale && /* @__PURE__ */
|
|
11777
|
+
return /* @__PURE__ */ jsxs82("div", { className: "ss-w-today-root", children: [
|
|
11778
|
+
/* @__PURE__ */ jsxs82("div", { className: "ss-w-mon-list", children: [
|
|
11779
|
+
stale && /* @__PURE__ */ jsx88("div", { className: "ss-w-stale", children: ui.staleStates }),
|
|
11682
11780
|
!searching && liveBand,
|
|
11683
|
-
/* @__PURE__ */
|
|
11781
|
+
/* @__PURE__ */ jsx88(
|
|
11684
11782
|
SearchField,
|
|
11685
11783
|
{
|
|
11686
11784
|
id: searchId,
|
|
@@ -11692,19 +11790,19 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
11692
11790
|
clearLabel: ui.clearSearchLabel
|
|
11693
11791
|
}
|
|
11694
11792
|
),
|
|
11695
|
-
searching ? searchResults.length === 0 ? /* @__PURE__ */
|
|
11696
|
-
/* @__PURE__ */
|
|
11697
|
-
/* @__PURE__ */
|
|
11698
|
-
/* @__PURE__ */
|
|
11793
|
+
searching ? searchResults.length === 0 ? /* @__PURE__ */ jsx88("div", { className: "ss-w-today-empty", children: ui.noLeagueResults }) : /* @__PURE__ */ jsx88(Fragment21, { children: searchResults.map((group) => /* @__PURE__ */ jsxs82("div", { className: "ss-w-today-search-block", children: [
|
|
11794
|
+
/* @__PURE__ */ jsxs82("div", { className: "ss-w-today-search-group", children: [
|
|
11795
|
+
/* @__PURE__ */ jsx88(Crest, { url: group.competitionImagePath ?? void 0, name: group.competitionName, kind: "comp" }),
|
|
11796
|
+
/* @__PURE__ */ jsxs82("span", { className: "ss-w-today-search-group-name", children: [
|
|
11699
11797
|
group.competitionName,
|
|
11700
|
-
(nameCounts[group.competitionName] ?? 0) > 1 && group.competitionCountry ? /* @__PURE__ */
|
|
11798
|
+
(nameCounts[group.competitionName] ?? 0) > 1 && group.competitionCountry ? /* @__PURE__ */ jsxs82("span", { className: "ss-w-today-tile-country", children: [
|
|
11701
11799
|
" (",
|
|
11702
11800
|
group.competitionCountry,
|
|
11703
11801
|
")"
|
|
11704
11802
|
] }) : null
|
|
11705
11803
|
] })
|
|
11706
11804
|
] }),
|
|
11707
|
-
matchingFixtures(group, query).map((match) => /* @__PURE__ */
|
|
11805
|
+
matchingFixtures(group, query).map((match) => /* @__PURE__ */ jsx88(
|
|
11708
11806
|
"div",
|
|
11709
11807
|
{
|
|
11710
11808
|
role: "button",
|
|
@@ -11718,7 +11816,7 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
11718
11816
|
setSelectedCompetitionId(group.competitionId);
|
|
11719
11817
|
}
|
|
11720
11818
|
},
|
|
11721
|
-
children: /* @__PURE__ */
|
|
11819
|
+
children: /* @__PURE__ */ jsx88(
|
|
11722
11820
|
FixtureRow,
|
|
11723
11821
|
{
|
|
11724
11822
|
match,
|
|
@@ -11731,13 +11829,13 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
11731
11829
|
},
|
|
11732
11830
|
matchKey7(match.sport, match.matchId)
|
|
11733
11831
|
))
|
|
11734
|
-
] }, group.competitionId)) }) : /* @__PURE__ */
|
|
11735
|
-
/* @__PURE__ */
|
|
11832
|
+
] }, group.competitionId)) }) : /* @__PURE__ */ jsxs82(Fragment21, { children: [
|
|
11833
|
+
/* @__PURE__ */ jsxs82("div", { className: "ss-w-today-sec", children: [
|
|
11736
11834
|
placement.personal ? ui.yourLeagues : ui.topLeagues,
|
|
11737
|
-
!placement.personal && /* @__PURE__ */
|
|
11835
|
+
!placement.personal && /* @__PURE__ */ jsx88("span", { className: "ss-w-today-sec-sub", children: ui.topLeaguesSub })
|
|
11738
11836
|
] }),
|
|
11739
|
-
/* @__PURE__ */
|
|
11740
|
-
rowedCandidates.map((group) => /* @__PURE__ */
|
|
11837
|
+
/* @__PURE__ */ jsxs82("div", { className: "ss-w-today-rowsection", children: [
|
|
11838
|
+
rowedCandidates.map((group) => /* @__PURE__ */ jsx88(
|
|
11741
11839
|
LeagueRowGroup,
|
|
11742
11840
|
{
|
|
11743
11841
|
group,
|
|
@@ -11753,7 +11851,7 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
11753
11851
|
},
|
|
11754
11852
|
group.competitionId
|
|
11755
11853
|
)),
|
|
11756
|
-
tiledCandidates.length > 0 && /* @__PURE__ */
|
|
11854
|
+
tiledCandidates.length > 0 && /* @__PURE__ */ jsx88("div", { className: "ss-w-today-tiles", children: tiledCandidates.map((group) => /* @__PURE__ */ jsx88(
|
|
11757
11855
|
LeagueTile,
|
|
11758
11856
|
{
|
|
11759
11857
|
group,
|
|
@@ -11766,8 +11864,8 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
11766
11864
|
group.competitionId
|
|
11767
11865
|
)) })
|
|
11768
11866
|
] }),
|
|
11769
|
-
/* @__PURE__ */
|
|
11770
|
-
/* @__PURE__ */
|
|
11867
|
+
/* @__PURE__ */ jsx88("div", { className: "ss-w-today-sec", children: ui.allLeagues }),
|
|
11868
|
+
/* @__PURE__ */ jsx88("div", { className: "ss-w-today-tiles", children: placement.others.map((group) => /* @__PURE__ */ jsx88(
|
|
11771
11869
|
LeagueTile,
|
|
11772
11870
|
{
|
|
11773
11871
|
group,
|
|
@@ -11781,7 +11879,7 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
11781
11879
|
)) })
|
|
11782
11880
|
] })
|
|
11783
11881
|
] }),
|
|
11784
|
-
toast !== null && /* @__PURE__ */
|
|
11882
|
+
toast !== null && /* @__PURE__ */ jsx88("p", { className: "ss-w-today-toast", role: "status", "aria-live": "polite", children: toast === "starred" ? ui.starredToast : ui.unstarredToast })
|
|
11785
11883
|
] });
|
|
11786
11884
|
}
|
|
11787
11885
|
|
|
@@ -11789,9 +11887,9 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
11789
11887
|
import { useEffect as useEffect39, useState as useState63 } from "react";
|
|
11790
11888
|
|
|
11791
11889
|
// src/components/GamesLoginWall.tsx
|
|
11792
|
-
import { jsx as
|
|
11890
|
+
import { jsx as jsx89 } from "react/jsx-runtime";
|
|
11793
11891
|
function GamesLoginWall({ ui }) {
|
|
11794
|
-
return /* @__PURE__ */
|
|
11892
|
+
return /* @__PURE__ */ jsx89("div", { className: "ss-w-mon-list", children: /* @__PURE__ */ jsx89("div", { className: "ss-w-games-wall", children: /* @__PURE__ */ jsx89("p", { children: ui.gamesLoginRequired }) }) });
|
|
11795
11893
|
}
|
|
11796
11894
|
|
|
11797
11895
|
// src/components/GamesHub.tsx
|
|
@@ -11811,74 +11909,74 @@ function splitName(full) {
|
|
|
11811
11909
|
}
|
|
11812
11910
|
|
|
11813
11911
|
// src/components/GameTileArt.tsx
|
|
11814
|
-
import { Fragment as Fragment22, jsx as
|
|
11912
|
+
import { Fragment as Fragment22, jsx as jsx90, jsxs as jsxs83 } from "react/jsx-runtime";
|
|
11815
11913
|
function GameTileArt({ gameId }) {
|
|
11816
|
-
return /* @__PURE__ */
|
|
11914
|
+
return /* @__PURE__ */ jsx90("svg", { className: "ss-g-art", viewBox: "0 0 120 74", "aria-hidden": "true", children: ART[gameId] ?? ART.default });
|
|
11817
11915
|
}
|
|
11818
|
-
var head = (cx, cy, r, cls = "ss-g-art-fg") => /* @__PURE__ */
|
|
11819
|
-
/* @__PURE__ */
|
|
11820
|
-
/* @__PURE__ */
|
|
11916
|
+
var head = (cx, cy, r, cls = "ss-g-art-fg") => /* @__PURE__ */ jsxs83("g", { className: cls, children: [
|
|
11917
|
+
/* @__PURE__ */ jsx90("circle", { cx, cy: cy - r * 0.3, r: r * 0.45 }),
|
|
11918
|
+
/* @__PURE__ */ jsx90("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` })
|
|
11821
11919
|
] });
|
|
11822
11920
|
var ART = {
|
|
11823
|
-
"mystery-tiger": /* @__PURE__ */
|
|
11921
|
+
"mystery-tiger": /* @__PURE__ */ jsxs83(Fragment22, { children: [
|
|
11824
11922
|
head(60, 38, 26, "ss-g-art-fg"),
|
|
11825
|
-
/* @__PURE__ */
|
|
11923
|
+
/* @__PURE__ */ jsx90("text", { x: "60", y: "36", className: "ss-g-art-q", textAnchor: "middle", children: "?" })
|
|
11826
11924
|
] }),
|
|
11827
|
-
"higher-or-lower": /* @__PURE__ */
|
|
11925
|
+
"higher-or-lower": /* @__PURE__ */ jsxs83(Fragment22, { children: [
|
|
11828
11926
|
head(32, 38, 20),
|
|
11829
11927
|
head(88, 38, 20),
|
|
11830
|
-
/* @__PURE__ */
|
|
11831
|
-
/* @__PURE__ */
|
|
11928
|
+
/* @__PURE__ */ jsx90("circle", { cx: "60", cy: "37", r: "11", className: "ss-g-art-accent" }),
|
|
11929
|
+
/* @__PURE__ */ jsx90("path", { d: "M57 33l3-3 3 3M57 41l3 3 3-3", className: "ss-g-art-ink" })
|
|
11832
11930
|
] }),
|
|
11833
|
-
"guess-the-xi": /* @__PURE__ */
|
|
11834
|
-
/* @__PURE__ */
|
|
11835
|
-
[[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__ */
|
|
11931
|
+
"guess-the-xi": /* @__PURE__ */ jsxs83(Fragment22, { children: [
|
|
11932
|
+
/* @__PURE__ */ jsx90("rect", { x: "8", y: "4", width: "104", height: "66", rx: "6", className: "ss-g-art-pitch" }),
|
|
11933
|
+
[[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__ */ jsx90("circle", { cx: x, cy: y, r: "4", className: a ? "ss-g-art-accent" : "ss-g-art-dot" }, i))
|
|
11836
11934
|
] }),
|
|
11837
|
-
"daily-quiz": /* @__PURE__ */
|
|
11838
|
-
"career-path": /* @__PURE__ */
|
|
11839
|
-
/* @__PURE__ */
|
|
11840
|
-
/* @__PURE__ */
|
|
11841
|
-
/* @__PURE__ */
|
|
11842
|
-
/* @__PURE__ */
|
|
11843
|
-
/* @__PURE__ */
|
|
11935
|
+
"daily-quiz": /* @__PURE__ */ jsx90(Fragment22, { children: [[14, 8], [62, 8], [14, 40], [62, 40]].map(([x, y], i) => /* @__PURE__ */ jsx90("rect", { x, y, width: "44", height: "26", rx: "5", className: i === 1 ? "ss-g-art-correct" : "ss-g-art-block" }, i)) }),
|
|
11936
|
+
"career-path": /* @__PURE__ */ jsxs83(Fragment22, { children: [
|
|
11937
|
+
/* @__PURE__ */ jsx90("path", { d: "M18 22h24v10c0 7-5 11-12 13-7-2-12-6-12-13z", className: "ss-g-art-fg" }),
|
|
11938
|
+
/* @__PURE__ */ jsx90("path", { d: "M48 37h8M84 37h8", className: "ss-g-art-line" }),
|
|
11939
|
+
/* @__PURE__ */ jsx90("path", { d: "M60 22h24v10c0 7-5 11-12 13-7-2-12-6-12-13z", className: "ss-g-art-fg" }),
|
|
11940
|
+
/* @__PURE__ */ jsx90("rect", { x: "96", y: "22", width: "18", height: "26", rx: "4", className: "ss-g-art-dash" }),
|
|
11941
|
+
/* @__PURE__ */ jsx90("text", { x: "105", y: "40", className: "ss-g-art-q", textAnchor: "middle", children: "?" })
|
|
11844
11942
|
] }),
|
|
11845
|
-
"beat-the-grid": /* @__PURE__ */
|
|
11846
|
-
"matchday-predictor": /* @__PURE__ */
|
|
11847
|
-
/* @__PURE__ */
|
|
11848
|
-
/* @__PURE__ */
|
|
11849
|
-
/* @__PURE__ */
|
|
11850
|
-
/* @__PURE__ */
|
|
11943
|
+
"beat-the-grid": /* @__PURE__ */ jsx90(Fragment22, { children: [0, 1, 2].flatMap((r) => [0, 1, 2].map((c) => /* @__PURE__ */ jsx90("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}`))) }),
|
|
11944
|
+
"matchday-predictor": /* @__PURE__ */ jsxs83(Fragment22, { children: [
|
|
11945
|
+
/* @__PURE__ */ jsx90("path", { d: "M10 20h20v9c0 6-4 9-10 11-6-2-10-5-10-11z", className: "ss-g-art-fg" }),
|
|
11946
|
+
/* @__PURE__ */ jsx90("rect", { x: "38", y: "22", width: "18", height: "24", rx: "4", className: "ss-g-art-accent-stroke" }),
|
|
11947
|
+
/* @__PURE__ */ jsx90("rect", { x: "64", y: "22", width: "18", height: "24", rx: "4", className: "ss-g-art-dash" }),
|
|
11948
|
+
/* @__PURE__ */ jsx90("path", { d: "M90 20h20v9c0 6-4 9-10 11-6-2-10-5-10-11z", className: "ss-g-art-fg" })
|
|
11851
11949
|
] }),
|
|
11852
|
-
"starting-xi": /* @__PURE__ */
|
|
11853
|
-
/* @__PURE__ */
|
|
11854
|
-
[[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__ */
|
|
11950
|
+
"starting-xi": /* @__PURE__ */ jsxs83(Fragment22, { children: [
|
|
11951
|
+
/* @__PURE__ */ jsx90("rect", { x: "8", y: "4", width: "104", height: "66", rx: "6", className: "ss-g-art-pitch" }),
|
|
11952
|
+
[[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__ */ jsx90("circle", { cx: x, cy: y, r: "5", className: i < 7 ? "ss-g-art-accent" : "ss-g-art-dash" }, i))
|
|
11855
11953
|
] }),
|
|
11856
|
-
"stat-ladder": /* @__PURE__ */
|
|
11857
|
-
"fan-motm": /* @__PURE__ */
|
|
11858
|
-
/* @__PURE__ */
|
|
11954
|
+
"stat-ladder": /* @__PURE__ */ jsx90(Fragment22, { children: [[20, 70], [34, 52], [48, 34]].map(([y, w], i) => /* @__PURE__ */ jsx90("rect", { x: "24", y, width: w, height: "12", rx: "3", className: i === 1 ? "ss-g-art-accent" : "ss-g-art-block" }, i)) }),
|
|
11955
|
+
"fan-motm": /* @__PURE__ */ jsxs83(Fragment22, { children: [
|
|
11956
|
+
/* @__PURE__ */ jsx90("circle", { cx: "60", cy: "37", r: "26", className: "ss-g-art-accent-stroke" }),
|
|
11859
11957
|
head(60, 40, 18),
|
|
11860
|
-
/* @__PURE__ */
|
|
11958
|
+
/* @__PURE__ */ jsx90("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" })
|
|
11861
11959
|
] }),
|
|
11862
|
-
default: /* @__PURE__ */
|
|
11960
|
+
default: /* @__PURE__ */ jsx90("circle", { cx: "60", cy: "37", r: "22", className: "ss-g-art-fg" })
|
|
11863
11961
|
};
|
|
11864
11962
|
|
|
11865
11963
|
// src/components/games/ui/Chip.tsx
|
|
11866
|
-
import { jsx as
|
|
11964
|
+
import { jsx as jsx91, jsxs as jsxs84 } from "react/jsx-runtime";
|
|
11867
11965
|
function Chip({ variant = "neutral", icon, children, className }) {
|
|
11868
|
-
return /* @__PURE__ */
|
|
11966
|
+
return /* @__PURE__ */ jsxs84("span", { className: `ss-g-chip ss-g-chip--${variant}${className ? ` ${className}` : ""}`, children: [
|
|
11869
11967
|
icon,
|
|
11870
11968
|
children
|
|
11871
11969
|
] });
|
|
11872
11970
|
}
|
|
11873
11971
|
function StatStack({ value, label }) {
|
|
11874
|
-
return /* @__PURE__ */
|
|
11875
|
-
/* @__PURE__ */
|
|
11876
|
-
/* @__PURE__ */
|
|
11972
|
+
return /* @__PURE__ */ jsxs84("span", { className: "ss-g-statstack", children: [
|
|
11973
|
+
/* @__PURE__ */ jsx91("span", { className: "ss-g-statstack-v", children: value }),
|
|
11974
|
+
/* @__PURE__ */ jsx91("span", { className: "ss-g-statstack-l", children: label })
|
|
11877
11975
|
] });
|
|
11878
11976
|
}
|
|
11879
11977
|
|
|
11880
11978
|
// src/components/GameTile.tsx
|
|
11881
|
-
import { Fragment as Fragment23, jsx as
|
|
11979
|
+
import { Fragment as Fragment23, jsx as jsx92, jsxs as jsxs85 } from "react/jsx-runtime";
|
|
11882
11980
|
function tileStatus(game, ui) {
|
|
11883
11981
|
switch (game.status) {
|
|
11884
11982
|
case "locked":
|
|
@@ -11899,41 +11997,41 @@ function tileStatus(game, ui) {
|
|
|
11899
11997
|
}
|
|
11900
11998
|
var DISABLED = /* @__PURE__ */ new Set(["locked", "voided"]);
|
|
11901
11999
|
function GameTile({ game, onOpen, ui, variant = "tile" }) {
|
|
11902
|
-
const
|
|
12000
|
+
const status2 = tileStatus(game, ui);
|
|
11903
12001
|
const disabled = DISABLED.has(game.status);
|
|
11904
12002
|
const title = gameTitle(game, ui.games.titles);
|
|
11905
|
-
const body = variant === "hero" ? /* @__PURE__ */
|
|
11906
|
-
/* @__PURE__ */
|
|
11907
|
-
/* @__PURE__ */
|
|
11908
|
-
|
|
11909
|
-
/* @__PURE__ */
|
|
11910
|
-
/* @__PURE__ */
|
|
11911
|
-
|
|
11912
|
-
|
|
12003
|
+
const body = variant === "hero" ? /* @__PURE__ */ jsxs85(Fragment23, { children: [
|
|
12004
|
+
/* @__PURE__ */ jsxs85("span", { className: "ss-g-hero-text", children: [
|
|
12005
|
+
/* @__PURE__ */ jsx92("span", { className: "ss-g-hero-eyebrow", children: ui.games.dailyChallenge }),
|
|
12006
|
+
status2.tone === "new" && /* @__PURE__ */ jsx92(Chip, { variant: "badge", children: ui.games.newToday }),
|
|
12007
|
+
/* @__PURE__ */ jsx92("span", { className: "ss-g-hero-title", children: title }),
|
|
12008
|
+
/* @__PURE__ */ jsx92("span", { className: "ss-g-hero-sub", children: ui.games.taglines[game.gameId] ?? "" }),
|
|
12009
|
+
status2.tone === "success" ? /* @__PURE__ */ jsx92("span", { className: "ss-g-tile-status", "data-tone": "success", children: status2.text }) : /* @__PURE__ */ jsxs85("span", { className: "ss-g-hero-cta", children: [
|
|
12010
|
+
status2.tone === "accent" ? ui.games.resume : ui.games.playNow,
|
|
11913
12011
|
" \u2192"
|
|
11914
12012
|
] })
|
|
11915
12013
|
] }),
|
|
11916
|
-
/* @__PURE__ */
|
|
11917
|
-
] }) : variant === "wide" ? /* @__PURE__ */
|
|
11918
|
-
/* @__PURE__ */
|
|
11919
|
-
/* @__PURE__ */
|
|
11920
|
-
/* @__PURE__ */
|
|
11921
|
-
/* @__PURE__ */
|
|
11922
|
-
|
|
12014
|
+
/* @__PURE__ */ jsx92("span", { className: "ss-g-hero-art", children: /* @__PURE__ */ jsx92(GameTileArt, { gameId: game.gameId }) })
|
|
12015
|
+
] }) : variant === "wide" ? /* @__PURE__ */ jsxs85(Fragment23, { children: [
|
|
12016
|
+
/* @__PURE__ */ jsx92("span", { className: "ss-g-wide-art", children: /* @__PURE__ */ jsx92(GameTileArt, { gameId: game.gameId }) }),
|
|
12017
|
+
/* @__PURE__ */ jsxs85("span", { className: "ss-g-wide-text", children: [
|
|
12018
|
+
/* @__PURE__ */ jsx92("span", { className: "ss-g-tile-title", children: title }),
|
|
12019
|
+
/* @__PURE__ */ jsx92("span", { className: "ss-g-tile-status", "data-tone": status2.tone, children: status2.text }),
|
|
12020
|
+
status2.tone === "new" && /* @__PURE__ */ jsx92(Chip, { variant: "badge", children: ui.games.newToday })
|
|
11923
12021
|
] }),
|
|
11924
|
-
/* @__PURE__ */
|
|
11925
|
-
] }) : /* @__PURE__ */
|
|
11926
|
-
/* @__PURE__ */
|
|
11927
|
-
/* @__PURE__ */
|
|
11928
|
-
/* @__PURE__ */
|
|
12022
|
+
/* @__PURE__ */ jsx92("span", { className: "ss-g-wide-chev", children: /* @__PURE__ */ jsx92(IconChevronLeft, { size: 18 }) })
|
|
12023
|
+
] }) : /* @__PURE__ */ jsxs85(Fragment23, { children: [
|
|
12024
|
+
/* @__PURE__ */ jsx92("span", { className: "ss-g-tile-art", children: /* @__PURE__ */ jsx92(GameTileArt, { gameId: game.gameId }) }),
|
|
12025
|
+
/* @__PURE__ */ jsx92("span", { className: "ss-g-tile-title", children: title }),
|
|
12026
|
+
/* @__PURE__ */ jsx92("span", { className: "ss-g-tile-status", "data-tone": status2.tone, children: status2.text })
|
|
11929
12027
|
] });
|
|
11930
12028
|
const cls = `ss-g-tile ss-g-tile--${variant}`;
|
|
11931
|
-
if (disabled) return /* @__PURE__ */
|
|
11932
|
-
return /* @__PURE__ */
|
|
12029
|
+
if (disabled) return /* @__PURE__ */ jsx92("div", { className: cls, "data-disabled": true, "aria-disabled": "true", children: body });
|
|
12030
|
+
return /* @__PURE__ */ jsx92("button", { type: "button", className: cls, "aria-label": `${title} \u2014 ${status2.text}`, onClick: () => onOpen(game), children: body });
|
|
11933
12031
|
}
|
|
11934
12032
|
|
|
11935
12033
|
// src/components/GamesHub.tsx
|
|
11936
|
-
import { Fragment as Fragment24, jsx as
|
|
12034
|
+
import { Fragment as Fragment24, jsx as jsx93, jsxs as jsxs86 } from "react/jsx-runtime";
|
|
11937
12035
|
var PLAYABLE = /* @__PURE__ */ new Set(["available", "in_progress"]);
|
|
11938
12036
|
var DONE = /* @__PURE__ */ new Set(["played", "graded"]);
|
|
11939
12037
|
function pickHeroGame(games) {
|
|
@@ -11959,49 +12057,49 @@ function GamesHub({ games, myWeeklyRow, weeklyPrize, onOpen, ui }) {
|
|
|
11959
12057
|
const kickoffs = fixtures.map((g) => g.kickoffUtc).filter((k) => !!k).sort();
|
|
11960
12058
|
const todayPts = games.filter((g) => DONE.has(g.status)).reduce((s, g) => s + (g.score ?? 0), 0);
|
|
11961
12059
|
const dash = "\u2014";
|
|
11962
|
-
return /* @__PURE__ */
|
|
11963
|
-
/* @__PURE__ */
|
|
11964
|
-
/* @__PURE__ */
|
|
11965
|
-
/* @__PURE__ */
|
|
11966
|
-
/* @__PURE__ */
|
|
11967
|
-
myWeeklyRow ? /* @__PURE__ */
|
|
11968
|
-
/* @__PURE__ */
|
|
12060
|
+
return /* @__PURE__ */ jsxs86("div", { className: "ss-g-hub", children: [
|
|
12061
|
+
/* @__PURE__ */ jsxs86("div", { className: "ss-g-stats", children: [
|
|
12062
|
+
/* @__PURE__ */ jsxs86("div", { className: "ss-g-stat", children: [
|
|
12063
|
+
/* @__PURE__ */ jsx93("span", { className: "ss-g-stat-l", children: ui.games.statStreak }),
|
|
12064
|
+
/* @__PURE__ */ jsxs86("span", { className: "ss-g-stat-v", "data-testid": "stat-streak", children: [
|
|
12065
|
+
myWeeklyRow ? /* @__PURE__ */ jsxs86(Fragment24, { children: [
|
|
12066
|
+
/* @__PURE__ */ jsx93(IconFlame, {}),
|
|
11969
12067
|
myWeeklyRow.currentStreak
|
|
11970
12068
|
] }) : dash,
|
|
11971
|
-
myWeeklyRow && /* @__PURE__ */
|
|
12069
|
+
myWeeklyRow && /* @__PURE__ */ jsx93("small", { children: ui.games.unitDays })
|
|
11972
12070
|
] })
|
|
11973
12071
|
] }),
|
|
11974
|
-
/* @__PURE__ */
|
|
11975
|
-
/* @__PURE__ */
|
|
11976
|
-
/* @__PURE__ */
|
|
12072
|
+
/* @__PURE__ */ jsxs86("div", { className: "ss-g-stat", children: [
|
|
12073
|
+
/* @__PURE__ */ jsx93("span", { className: "ss-g-stat-l", children: ui.games.statToday }),
|
|
12074
|
+
/* @__PURE__ */ jsxs86("span", { className: "ss-g-stat-v ss-g-stat-v--accent", "data-testid": "stat-today", children: [
|
|
11977
12075
|
ui.games.formatPts(todayPts),
|
|
11978
|
-
/* @__PURE__ */
|
|
12076
|
+
/* @__PURE__ */ jsx93("small", { children: ui.games.unitPts })
|
|
11979
12077
|
] })
|
|
11980
12078
|
] }),
|
|
11981
|
-
/* @__PURE__ */
|
|
11982
|
-
/* @__PURE__ */
|
|
11983
|
-
/* @__PURE__ */
|
|
12079
|
+
/* @__PURE__ */ jsxs86("div", { className: "ss-g-stat", children: [
|
|
12080
|
+
/* @__PURE__ */ jsx93("span", { className: "ss-g-stat-l", children: ui.games.statRank }),
|
|
12081
|
+
/* @__PURE__ */ jsxs86("span", { className: "ss-g-stat-v", "data-testid": "stat-rank", children: [
|
|
11984
12082
|
myWeeklyRow ? `#${myWeeklyRow.rank}` : dash,
|
|
11985
|
-
myWeeklyRow && /* @__PURE__ */
|
|
12083
|
+
myWeeklyRow && /* @__PURE__ */ jsx93("small", { children: ui.games.thisWeek })
|
|
11986
12084
|
] })
|
|
11987
12085
|
] })
|
|
11988
12086
|
] }),
|
|
11989
|
-
weeklyPrize && /* @__PURE__ */
|
|
11990
|
-
hero && /* @__PURE__ */
|
|
11991
|
-
(grid.length > 0 || wide) && /* @__PURE__ */
|
|
11992
|
-
/* @__PURE__ */
|
|
11993
|
-
/* @__PURE__ */
|
|
11994
|
-
/* @__PURE__ */
|
|
12087
|
+
weeklyPrize && /* @__PURE__ */ jsx93(Chip, { variant: "accent", className: "ss-g-prize", children: weeklyPrize }),
|
|
12088
|
+
hero && /* @__PURE__ */ jsx93(GameTile, { game: hero, onOpen, ui, variant: "hero" }),
|
|
12089
|
+
(grid.length > 0 || wide) && /* @__PURE__ */ jsxs86("section", { className: "ss-g-sec", children: [
|
|
12090
|
+
/* @__PURE__ */ jsxs86("div", { className: "ss-g-sec-head", children: [
|
|
12091
|
+
/* @__PURE__ */ jsx93("h3", { children: ui.games.dailyGames }),
|
|
12092
|
+
/* @__PURE__ */ jsx93("span", { children: ui.games.newSetAtMidnight })
|
|
11995
12093
|
] }),
|
|
11996
|
-
grid.length > 0 && /* @__PURE__ */
|
|
11997
|
-
wide && /* @__PURE__ */
|
|
12094
|
+
grid.length > 0 && /* @__PURE__ */ jsx93("div", { className: "ss-g-grid", children: grid.map((g) => /* @__PURE__ */ jsx93(GameTile, { game: g, onOpen, ui }, tileKey(g))) }),
|
|
12095
|
+
wide && /* @__PURE__ */ jsx93(GameTile, { game: wide, onOpen, ui, variant: "wide" })
|
|
11998
12096
|
] }),
|
|
11999
|
-
fixtures.length > 0 && /* @__PURE__ */
|
|
12000
|
-
/* @__PURE__ */
|
|
12001
|
-
/* @__PURE__ */
|
|
12002
|
-
kickoffs[0] && /* @__PURE__ */
|
|
12097
|
+
fixtures.length > 0 && /* @__PURE__ */ jsxs86("section", { className: "ss-g-sec", children: [
|
|
12098
|
+
/* @__PURE__ */ jsxs86("div", { className: "ss-g-sec-head", children: [
|
|
12099
|
+
/* @__PURE__ */ jsx93("h3", { children: ui.games.matchdayGames }),
|
|
12100
|
+
kickoffs[0] && /* @__PURE__ */ jsx93("span", { children: ui.games.kickoffAt(ui.games.formatDayTime(kickoffs[0])) })
|
|
12003
12101
|
] }),
|
|
12004
|
-
/* @__PURE__ */
|
|
12102
|
+
/* @__PURE__ */ jsx93("div", { className: "ss-g-grid", children: fixtures.map((g) => /* @__PURE__ */ jsx93(GameTile, { game: g, onOpen, ui }, tileKey(g))) })
|
|
12005
12103
|
] })
|
|
12006
12104
|
] });
|
|
12007
12105
|
}
|
|
@@ -12294,7 +12392,7 @@ function isNationCode(flag) {
|
|
|
12294
12392
|
|
|
12295
12393
|
// src/components/games/PlayerAvatar.tsx
|
|
12296
12394
|
import { useState as useState51 } from "react";
|
|
12297
|
-
import { jsx as
|
|
12395
|
+
import { jsx as jsx94 } from "react/jsx-runtime";
|
|
12298
12396
|
function initialsOf(name) {
|
|
12299
12397
|
const parts = name.trim().split(/\s+/).filter(Boolean);
|
|
12300
12398
|
const first = parts[0];
|
|
@@ -12313,39 +12411,39 @@ function PlayerAvatar({
|
|
|
12313
12411
|
}) {
|
|
12314
12412
|
const [failed, setFailed] = useState51(false);
|
|
12315
12413
|
const showImage = Boolean(imagePath) && !isPlaceholderImage(imagePath) && !failed;
|
|
12316
|
-
return /* @__PURE__ */
|
|
12414
|
+
return /* @__PURE__ */ jsx94("div", { className, "aria-hidden": "true", children: showImage ? /* @__PURE__ */ jsx94("img", { src: imagePath, alt: "", loading: "lazy", onError: () => setFailed(true) }) : /* @__PURE__ */ jsx94("span", { className: "ss-w-av-initials", children: initialsOf(name) }) });
|
|
12317
12415
|
}
|
|
12318
12416
|
|
|
12319
12417
|
// src/components/games/ui/GameHeader.tsx
|
|
12320
|
-
import { jsx as
|
|
12418
|
+
import { jsx as jsx95, jsxs as jsxs87 } from "react/jsx-runtime";
|
|
12321
12419
|
function GameHeader({ title, eyebrow, right, onBack, backLabel }) {
|
|
12322
|
-
return /* @__PURE__ */
|
|
12323
|
-
onBack && /* @__PURE__ */
|
|
12324
|
-
/* @__PURE__ */
|
|
12325
|
-
eyebrow && /* @__PURE__ */
|
|
12326
|
-
/* @__PURE__ */
|
|
12420
|
+
return /* @__PURE__ */ jsxs87("div", { className: "ss-g-head", children: [
|
|
12421
|
+
onBack && /* @__PURE__ */ jsx95("button", { type: "button", className: "ss-g-back", "aria-label": backLabel, onClick: onBack, children: /* @__PURE__ */ jsx95(IconChevronLeft, {}) }),
|
|
12422
|
+
/* @__PURE__ */ jsxs87("div", { className: "ss-g-head-text", children: [
|
|
12423
|
+
eyebrow && /* @__PURE__ */ jsx95("span", { className: "ss-g-eyebrow", children: eyebrow }),
|
|
12424
|
+
/* @__PURE__ */ jsx95("h2", { className: "ss-g-title", children: title })
|
|
12327
12425
|
] }),
|
|
12328
|
-
right && /* @__PURE__ */
|
|
12426
|
+
right && /* @__PURE__ */ jsx95("div", { className: "ss-g-head-right", children: right })
|
|
12329
12427
|
] });
|
|
12330
12428
|
}
|
|
12331
12429
|
|
|
12332
12430
|
// src/components/games/ui/SegmentProgress.tsx
|
|
12333
|
-
import { jsx as
|
|
12431
|
+
import { jsx as jsx96, jsxs as jsxs88 } from "react/jsx-runtime";
|
|
12334
12432
|
function SegmentProgress({ segments, ariaLabel, leftLabel, rightLabel, right }) {
|
|
12335
|
-
return /* @__PURE__ */
|
|
12336
|
-
/* @__PURE__ */
|
|
12337
|
-
(leftLabel || rightLabel) && /* @__PURE__ */
|
|
12338
|
-
/* @__PURE__ */
|
|
12339
|
-
/* @__PURE__ */
|
|
12433
|
+
return /* @__PURE__ */ jsxs88("div", { className: "ss-g-progress", children: [
|
|
12434
|
+
/* @__PURE__ */ jsxs88("div", { className: "ss-g-progress-main", children: [
|
|
12435
|
+
(leftLabel || rightLabel) && /* @__PURE__ */ jsxs88("div", { className: "ss-g-progress-labels", children: [
|
|
12436
|
+
/* @__PURE__ */ jsx96("span", { children: leftLabel }),
|
|
12437
|
+
/* @__PURE__ */ jsx96("span", { className: "ss-g-progress-rl", children: rightLabel })
|
|
12340
12438
|
] }),
|
|
12341
|
-
/* @__PURE__ */
|
|
12439
|
+
/* @__PURE__ */ jsx96(
|
|
12342
12440
|
"div",
|
|
12343
12441
|
{
|
|
12344
12442
|
className: "ss-g-segs",
|
|
12345
12443
|
role: "img",
|
|
12346
12444
|
"aria-label": ariaLabel,
|
|
12347
12445
|
style: { gridTemplateColumns: `repeat(${segments.length}, minmax(0, 1fr))` },
|
|
12348
|
-
children: segments.map((s, i) => /* @__PURE__ */
|
|
12446
|
+
children: segments.map((s, i) => /* @__PURE__ */ jsx96("span", { className: "ss-g-seg", "data-state": s }, i))
|
|
12349
12447
|
}
|
|
12350
12448
|
)
|
|
12351
12449
|
] }),
|
|
@@ -12354,12 +12452,12 @@ function SegmentProgress({ segments, ariaLabel, leftLabel, rightLabel, right })
|
|
|
12354
12452
|
}
|
|
12355
12453
|
|
|
12356
12454
|
// src/components/games/ui/AnswerTray.tsx
|
|
12357
|
-
import { Fragment as Fragment25, jsx as
|
|
12455
|
+
import { Fragment as Fragment25, jsx as jsx97, jsxs as jsxs89 } from "react/jsx-runtime";
|
|
12358
12456
|
function AnswerTray({ id, label, placeholder, optionsLabel, options, query, onQuery, onPick, disabled, minQuery = 0 }) {
|
|
12359
12457
|
const needle = query.trim().toLowerCase();
|
|
12360
12458
|
const shown2 = needle.length < minQuery ? [] : needle ? options.filter((o) => o.name.toLowerCase().includes(needle)) : options;
|
|
12361
|
-
return /* @__PURE__ */
|
|
12362
|
-
/* @__PURE__ */
|
|
12459
|
+
return /* @__PURE__ */ jsxs89(Fragment25, { children: [
|
|
12460
|
+
/* @__PURE__ */ jsx97(
|
|
12363
12461
|
SearchField,
|
|
12364
12462
|
{
|
|
12365
12463
|
id,
|
|
@@ -12371,9 +12469,9 @@ function AnswerTray({ id, label, placeholder, optionsLabel, options, query, onQu
|
|
|
12371
12469
|
disabled
|
|
12372
12470
|
}
|
|
12373
12471
|
),
|
|
12374
|
-
shown2.length > 0 && /* @__PURE__ */
|
|
12472
|
+
shown2.length > 0 && /* @__PURE__ */ jsx97("div", { className: "ss-g-tray", role: "listbox", "aria-label": optionsLabel, children: shown2.map((o) => {
|
|
12375
12473
|
const { first, last } = splitName(o.name);
|
|
12376
|
-
return /* @__PURE__ */
|
|
12474
|
+
return /* @__PURE__ */ jsxs89(
|
|
12377
12475
|
"button",
|
|
12378
12476
|
{
|
|
12379
12477
|
type: "button",
|
|
@@ -12384,10 +12482,10 @@ function AnswerTray({ id, label, placeholder, optionsLabel, options, query, onQu
|
|
|
12384
12482
|
disabled,
|
|
12385
12483
|
onClick: () => onPick(o.id),
|
|
12386
12484
|
children: [
|
|
12387
|
-
/* @__PURE__ */
|
|
12388
|
-
/* @__PURE__ */
|
|
12389
|
-
first && /* @__PURE__ */
|
|
12390
|
-
/* @__PURE__ */
|
|
12485
|
+
/* @__PURE__ */ jsx97(PlayerAvatar, { className: "ss-g-tray-av", name: o.name, imagePath: o.imagePath }),
|
|
12486
|
+
/* @__PURE__ */ jsxs89("span", { className: "ss-g-tray-name", "aria-hidden": "true", children: [
|
|
12487
|
+
first && /* @__PURE__ */ jsx97("span", { className: "ss-g-tray-first", children: first }),
|
|
12488
|
+
/* @__PURE__ */ jsx97("span", { className: "ss-g-tray-last", children: last })
|
|
12391
12489
|
] })
|
|
12392
12490
|
]
|
|
12393
12491
|
},
|
|
@@ -12398,59 +12496,59 @@ function AnswerTray({ id, label, placeholder, optionsLabel, options, query, onQu
|
|
|
12398
12496
|
}
|
|
12399
12497
|
|
|
12400
12498
|
// src/components/games/ui/FooterBar.tsx
|
|
12401
|
-
import { jsx as
|
|
12499
|
+
import { jsx as jsx98 } from "react/jsx-runtime";
|
|
12402
12500
|
function FooterBar({ children }) {
|
|
12403
|
-
return /* @__PURE__ */
|
|
12501
|
+
return /* @__PURE__ */ jsx98("div", { className: "ss-g-footer", children });
|
|
12404
12502
|
}
|
|
12405
12503
|
|
|
12406
12504
|
// src/components/games/ui/Silhouette.tsx
|
|
12407
|
-
import { jsx as
|
|
12505
|
+
import { jsx as jsx99, jsxs as jsxs90 } from "react/jsx-runtime";
|
|
12408
12506
|
function Silhouette({ size, variant = "default" }) {
|
|
12409
|
-
return /* @__PURE__ */
|
|
12410
|
-
/* @__PURE__ */
|
|
12411
|
-
/* @__PURE__ */
|
|
12412
|
-
/* @__PURE__ */
|
|
12507
|
+
return /* @__PURE__ */ jsxs90("span", { className: `ss-g-sil ss-g-sil--${variant}`, style: { width: size, height: size }, "aria-hidden": "true", children: [
|
|
12508
|
+
/* @__PURE__ */ jsxs90("svg", { width: size * 0.86, height: size * 0.86, viewBox: "0 0 100 100", children: [
|
|
12509
|
+
/* @__PURE__ */ jsx99("circle", { cx: "50", cy: "40", r: "19", fill: "currentColor" }),
|
|
12510
|
+
/* @__PURE__ */ jsx99("path", { d: "M12 100c0-23 17-38 38-38s38 15 38 38z", fill: "currentColor" })
|
|
12413
12511
|
] }),
|
|
12414
|
-
variant === "mystery" && /* @__PURE__ */
|
|
12512
|
+
variant === "mystery" && /* @__PURE__ */ jsx99("span", { className: "ss-g-sil-q", children: "?" })
|
|
12415
12513
|
] });
|
|
12416
12514
|
}
|
|
12417
12515
|
|
|
12418
12516
|
// src/components/games/ui/GameButton.tsx
|
|
12419
|
-
import { jsx as
|
|
12517
|
+
import { jsx as jsx100 } from "react/jsx-runtime";
|
|
12420
12518
|
function GameButton({ variant = "primary", block = false, className, type = "button", ...rest }) {
|
|
12421
12519
|
const cls = `ss-g-btn ss-g-btn--${variant}${block ? " ss-g-btn--block" : ""}${className ? ` ${className}` : ""}`;
|
|
12422
|
-
return /* @__PURE__ */
|
|
12520
|
+
return /* @__PURE__ */ jsx100("button", { type, className: cls, ...rest });
|
|
12423
12521
|
}
|
|
12424
12522
|
|
|
12425
12523
|
// src/components/games/ui/ResultCard.tsx
|
|
12426
|
-
import { jsx as
|
|
12524
|
+
import { jsx as jsx101, jsxs as jsxs91 } from "react/jsx-runtime";
|
|
12427
12525
|
function ResultCard({ tone, title, score, detail, onBack, ui }) {
|
|
12428
|
-
return /* @__PURE__ */
|
|
12429
|
-
/* @__PURE__ */
|
|
12430
|
-
score !== void 0 && /* @__PURE__ */
|
|
12431
|
-
/* @__PURE__ */
|
|
12526
|
+
return /* @__PURE__ */ jsxs91("div", { className: "ss-g-result", "data-tone": tone, role: "status", children: [
|
|
12527
|
+
/* @__PURE__ */ jsx101("span", { className: "ss-g-result-title", children: title }),
|
|
12528
|
+
score !== void 0 && /* @__PURE__ */ jsxs91("span", { className: "ss-g-result-score", children: [
|
|
12529
|
+
/* @__PURE__ */ jsx101("span", { className: "ss-g-result-num", children: score }),
|
|
12432
12530
|
ui.games.unitPts
|
|
12433
12531
|
] }),
|
|
12434
|
-
detail && /* @__PURE__ */
|
|
12435
|
-
onBack && /* @__PURE__ */
|
|
12532
|
+
detail && /* @__PURE__ */ jsx101("span", { className: "ss-g-result-detail", children: detail }),
|
|
12533
|
+
onBack && /* @__PURE__ */ jsx101(GameButton, { variant: "outline", onClick: onBack, children: ui.games.backToGames })
|
|
12436
12534
|
] });
|
|
12437
12535
|
}
|
|
12438
12536
|
|
|
12439
12537
|
// src/components/games/ui/PointsLadderRow.tsx
|
|
12440
|
-
import { jsx as
|
|
12538
|
+
import { jsx as jsx102, jsxs as jsxs92 } from "react/jsx-runtime";
|
|
12441
12539
|
function PointsLadderRow({ ladder, guessesUsed, ui }) {
|
|
12442
12540
|
if (!ladder || ladder.length === 0) return null;
|
|
12443
12541
|
const now = ladder[Math.min(guessesUsed, ladder.length - 1)];
|
|
12444
12542
|
const next = ladder[guessesUsed + 1];
|
|
12445
12543
|
if (now === void 0) return null;
|
|
12446
|
-
return /* @__PURE__ */
|
|
12447
|
-
/* @__PURE__ */
|
|
12448
|
-
next !== void 0 && next !== now && /* @__PURE__ */
|
|
12544
|
+
return /* @__PURE__ */ jsxs92("div", { className: "ss-g-worth", "data-testid": "points-ladder", children: [
|
|
12545
|
+
/* @__PURE__ */ jsx102("span", { className: "ss-g-worth-now", children: ui.games.worthNow(now) }),
|
|
12546
|
+
next !== void 0 && next !== now && /* @__PURE__ */ jsx102("span", { className: "ss-g-worth-next", children: ui.games.worthAfterMiss(next) })
|
|
12449
12547
|
] });
|
|
12450
12548
|
}
|
|
12451
12549
|
|
|
12452
12550
|
// src/components/games/MysteryTigerGame.tsx
|
|
12453
|
-
import { Fragment as Fragment26, jsx as
|
|
12551
|
+
import { Fragment as Fragment26, jsx as jsx103, jsxs as jsxs93 } from "react/jsx-runtime";
|
|
12454
12552
|
function parseClientState(json) {
|
|
12455
12553
|
if (!json) return null;
|
|
12456
12554
|
try {
|
|
@@ -12572,22 +12670,22 @@ function MysteryTigerGame({
|
|
|
12572
12670
|
setQuery("");
|
|
12573
12671
|
onSubmit(JSON.stringify({ guesses: newGuesses }));
|
|
12574
12672
|
}
|
|
12575
|
-
const headerRight = !config ? void 0 : isOver ? /* @__PURE__ */
|
|
12673
|
+
const headerRight = !config ? void 0 : isOver ? /* @__PURE__ */ jsxs93(Chip, { variant: "accent", children: [
|
|
12576
12674
|
score,
|
|
12577
12675
|
" ",
|
|
12578
12676
|
ui.games.unitPts
|
|
12579
|
-
] }) : /* @__PURE__ */
|
|
12677
|
+
] }) : /* @__PURE__ */ jsx103("span", { "data-testid": "mt-chip", children: /* @__PURE__ */ jsxs93(Chip, { children: [
|
|
12580
12678
|
ui.games.guess,
|
|
12581
12679
|
" ",
|
|
12582
|
-
/* @__PURE__ */
|
|
12680
|
+
/* @__PURE__ */ jsx103("span", { className: "ss-g-num", children: guessesUsed + 1 }),
|
|
12583
12681
|
" / ",
|
|
12584
12682
|
totalGuesses
|
|
12585
12683
|
] }) });
|
|
12586
12684
|
const segments = Array.from({ length: totalGuesses }, (_, i) => i < guessesUsed ? "done" : i === guessesUsed ? "current" : "todo");
|
|
12587
12685
|
const cols = { gridTemplateColumns: `minmax(0, 1fr) repeat(${keys.length}, 42px)` };
|
|
12588
12686
|
const known = deriveKnownAttributes(guessResults, keys);
|
|
12589
|
-
return /* @__PURE__ */
|
|
12590
|
-
/* @__PURE__ */
|
|
12687
|
+
return /* @__PURE__ */ jsxs93("div", { className: "ss-g-screen ss-g-mt", "data-game": "mystery-tiger", "data-testid": "game-screen-mystery-tiger", children: [
|
|
12688
|
+
/* @__PURE__ */ jsx103(
|
|
12591
12689
|
GameHeader,
|
|
12592
12690
|
{
|
|
12593
12691
|
title: gameTitle({ gameId: "mystery-tiger" }, ui.games.titles),
|
|
@@ -12597,41 +12695,41 @@ function MysteryTigerGame({
|
|
|
12597
12695
|
backLabel: ui.back
|
|
12598
12696
|
}
|
|
12599
12697
|
),
|
|
12600
|
-
!config && /* @__PURE__ */
|
|
12601
|
-
config && /* @__PURE__ */
|
|
12602
|
-
/* @__PURE__ */
|
|
12603
|
-
!isOver && /* @__PURE__ */
|
|
12604
|
-
/* @__PURE__ */
|
|
12605
|
-
/* @__PURE__ */
|
|
12606
|
-
revealName ? /* @__PURE__ */
|
|
12607
|
-
revealName && /* @__PURE__ */
|
|
12698
|
+
!config && /* @__PURE__ */ jsx103("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading }),
|
|
12699
|
+
config && /* @__PURE__ */ jsxs93(Fragment26, { children: [
|
|
12700
|
+
/* @__PURE__ */ jsxs93("div", { className: "ss-g-body", children: [
|
|
12701
|
+
!isOver && /* @__PURE__ */ jsx103(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed, ui }),
|
|
12702
|
+
/* @__PURE__ */ jsxs93("div", { className: `ss-g-mt-card${isOver ? " ss-g-mt-card--reveal" : ""}`, children: [
|
|
12703
|
+
/* @__PURE__ */ jsxs93("div", { className: "ss-g-mt-portrait", children: [
|
|
12704
|
+
revealName ? /* @__PURE__ */ jsx103(PlayerAvatar, { className: "ss-g-mt-photo", name: revealName, imagePath: clientState?.revealedPlayerImagePath }) : /* @__PURE__ */ jsx103(Silhouette, { size: 150, variant: "mystery" }),
|
|
12705
|
+
revealName && /* @__PURE__ */ jsx103("span", { className: "ss-g-mt-reveal-name", children: revealName })
|
|
12608
12706
|
] }),
|
|
12609
|
-
/* @__PURE__ */
|
|
12610
|
-
/* @__PURE__ */
|
|
12611
|
-
/* @__PURE__ */
|
|
12707
|
+
/* @__PURE__ */ jsx103("div", { className: "ss-g-mt-known", style: { gridTemplateColumns: `repeat(${keys.length}, minmax(0, 1fr))` }, children: known.map((k) => /* @__PURE__ */ jsxs93("div", { className: "ss-g-mt-known-cell", children: [
|
|
12708
|
+
/* @__PURE__ */ jsx103("span", { className: "ss-g-mt-lab", children: t.labels[k.key] }),
|
|
12709
|
+
/* @__PURE__ */ jsx103("span", { className: "ss-g-mt-known-v", "data-state": k.state, "data-testid": `known-${k.key}`, children: k.text })
|
|
12612
12710
|
] }, k.key)) })
|
|
12613
12711
|
] }),
|
|
12614
|
-
!isOver && /* @__PURE__ */
|
|
12615
|
-
guessResults.length > 0 && /* @__PURE__ */
|
|
12616
|
-
/* @__PURE__ */
|
|
12617
|
-
/* @__PURE__ */
|
|
12618
|
-
keys.map((k) => /* @__PURE__ */
|
|
12712
|
+
!isOver && /* @__PURE__ */ jsx103(SegmentProgress, { segments, ariaLabel: t.progress(guessesUsed, totalGuesses) }),
|
|
12713
|
+
guessResults.length > 0 && /* @__PURE__ */ jsxs93("div", { className: "ss-g-mt-table", children: [
|
|
12714
|
+
/* @__PURE__ */ jsxs93("div", { className: "ss-g-mt-thead", style: cols, children: [
|
|
12715
|
+
/* @__PURE__ */ jsx103("span", { children: t.yourGuesses }),
|
|
12716
|
+
keys.map((k) => /* @__PURE__ */ jsx103("span", { children: t.labels[k] }, k))
|
|
12619
12717
|
] }),
|
|
12620
12718
|
guessResults.map((gr, i) => {
|
|
12621
12719
|
const name = config.squadPlayers.find((p) => p.id === gr.playerId)?.name ?? `#${gr.playerId}`;
|
|
12622
12720
|
const { first, last } = splitName(name);
|
|
12623
|
-
return /* @__PURE__ */
|
|
12624
|
-
/* @__PURE__ */
|
|
12625
|
-
/* @__PURE__ */
|
|
12626
|
-
/* @__PURE__ */
|
|
12627
|
-
first && /* @__PURE__ */
|
|
12628
|
-
/* @__PURE__ */
|
|
12721
|
+
return /* @__PURE__ */ jsxs93("div", { className: "ss-g-mt-row", style: cols, children: [
|
|
12722
|
+
/* @__PURE__ */ jsxs93("div", { className: "ss-g-mt-who", children: [
|
|
12723
|
+
/* @__PURE__ */ jsx103(PlayerAvatar, { className: "ss-g-mt-av", name }),
|
|
12724
|
+
/* @__PURE__ */ jsxs93("span", { className: "ss-g-mt-names", children: [
|
|
12725
|
+
first && /* @__PURE__ */ jsx103("span", { className: "ss-g-mt-first", children: first }),
|
|
12726
|
+
/* @__PURE__ */ jsx103("span", { className: "ss-g-mt-last", children: last })
|
|
12629
12727
|
] })
|
|
12630
12728
|
] }),
|
|
12631
12729
|
keys.map((key) => {
|
|
12632
12730
|
const v = gr[key];
|
|
12633
12731
|
const arrow = directionArrow(v);
|
|
12634
|
-
return /* @__PURE__ */
|
|
12732
|
+
return /* @__PURE__ */ jsxs93(
|
|
12635
12733
|
"div",
|
|
12636
12734
|
{
|
|
12637
12735
|
className: "ss-g-mt-cell",
|
|
@@ -12639,8 +12737,8 @@ function MysteryTigerGame({
|
|
|
12639
12737
|
"data-verdict": v.verdict,
|
|
12640
12738
|
"aria-label": `${t.labels[key]}: ${v.value ?? v.verdict}${v.direction ? ` ${v.direction}` : ""}`,
|
|
12641
12739
|
children: [
|
|
12642
|
-
/* @__PURE__ */
|
|
12643
|
-
arrow && /* @__PURE__ */
|
|
12740
|
+
/* @__PURE__ */ jsx103("span", { className: "ss-g-mt-cell-v", "aria-hidden": "true", children: tileFace(key, v) }),
|
|
12741
|
+
arrow && /* @__PURE__ */ jsx103("span", { className: "ss-g-mt-cell-dir", "aria-hidden": "true", children: arrow })
|
|
12644
12742
|
]
|
|
12645
12743
|
},
|
|
12646
12744
|
key
|
|
@@ -12649,25 +12747,25 @@ function MysteryTigerGame({
|
|
|
12649
12747
|
] }, gr.playerId);
|
|
12650
12748
|
})
|
|
12651
12749
|
] }),
|
|
12652
|
-
!isOver && /* @__PURE__ */
|
|
12653
|
-
/* @__PURE__ */
|
|
12654
|
-
/* @__PURE__ */
|
|
12750
|
+
!isOver && /* @__PURE__ */ jsxs93("div", { className: "ss-g-mt-legend", children: [
|
|
12751
|
+
/* @__PURE__ */ jsxs93("span", { children: [
|
|
12752
|
+
/* @__PURE__ */ jsx103("i", { className: "ss-g-mt-sw", "data-verdict": "exact" }),
|
|
12655
12753
|
t.legendMatch
|
|
12656
12754
|
] }),
|
|
12657
|
-
/* @__PURE__ */
|
|
12658
|
-
/* @__PURE__ */
|
|
12755
|
+
/* @__PURE__ */ jsxs93("span", { children: [
|
|
12756
|
+
/* @__PURE__ */ jsx103("i", { className: "ss-g-mt-sw", "data-verdict": "near" }),
|
|
12659
12757
|
t.legendClose
|
|
12660
12758
|
] }),
|
|
12661
|
-
/* @__PURE__ */
|
|
12759
|
+
/* @__PURE__ */ jsxs93("span", { children: [
|
|
12662
12760
|
"\u25B2 ",
|
|
12663
12761
|
t.legendHigher
|
|
12664
12762
|
] })
|
|
12665
12763
|
] }),
|
|
12666
|
-
clientState?.hintLine && !isOver && /* @__PURE__ */
|
|
12667
|
-
/* @__PURE__ */
|
|
12668
|
-
/* @__PURE__ */
|
|
12764
|
+
clientState?.hintLine && !isOver && /* @__PURE__ */ jsxs93("div", { className: "ss-g-mt-hint", children: [
|
|
12765
|
+
/* @__PURE__ */ jsx103(IconBulb, {}),
|
|
12766
|
+
/* @__PURE__ */ jsx103("span", { children: clientState.hintLine })
|
|
12669
12767
|
] }),
|
|
12670
|
-
isOver && /* @__PURE__ */
|
|
12768
|
+
isOver && /* @__PURE__ */ jsx103(
|
|
12671
12769
|
ResultCard,
|
|
12672
12770
|
{
|
|
12673
12771
|
tone: clientState?.solved ? "win" : clientState?.failed ? "lose" : "neutral",
|
|
@@ -12679,7 +12777,7 @@ function MysteryTigerGame({
|
|
|
12679
12777
|
}
|
|
12680
12778
|
)
|
|
12681
12779
|
] }),
|
|
12682
|
-
!isOver && /* @__PURE__ */
|
|
12780
|
+
!isOver && /* @__PURE__ */ jsx103(FooterBar, { children: /* @__PURE__ */ jsx103(
|
|
12683
12781
|
AnswerTray,
|
|
12684
12782
|
{
|
|
12685
12783
|
id: inputId,
|
|
@@ -12698,7 +12796,7 @@ function MysteryTigerGame({
|
|
|
12698
12796
|
}
|
|
12699
12797
|
|
|
12700
12798
|
// src/components/games/HigherOrLowerGame.tsx
|
|
12701
|
-
import { Fragment as Fragment27, jsx as
|
|
12799
|
+
import { Fragment as Fragment27, jsx as jsx104, jsxs as jsxs94 } from "react/jsx-runtime";
|
|
12702
12800
|
var POINTS_PER_CORRECT = 10;
|
|
12703
12801
|
function parseClientState2(json) {
|
|
12704
12802
|
if (!json) return null;
|
|
@@ -12710,11 +12808,11 @@ function parseClientState2(json) {
|
|
|
12710
12808
|
}
|
|
12711
12809
|
function PlayerCard2({ name, imagePath, highlight, children }) {
|
|
12712
12810
|
const { first, last } = splitName(name);
|
|
12713
|
-
return /* @__PURE__ */
|
|
12714
|
-
/* @__PURE__ */
|
|
12715
|
-
/* @__PURE__ */
|
|
12716
|
-
first && /* @__PURE__ */
|
|
12717
|
-
/* @__PURE__ */
|
|
12811
|
+
return /* @__PURE__ */ jsxs94("div", { className: `ss-g-hl-card${highlight ? " ss-g-hl-card--b" : ""}`, children: [
|
|
12812
|
+
/* @__PURE__ */ jsx104("div", { className: "ss-g-hl-photo-wrap", children: imagePath ? /* @__PURE__ */ jsx104(PlayerAvatar, { className: "ss-g-hl-photo", name, imagePath }) : /* @__PURE__ */ jsx104(Silhouette, { size: 150 }) }),
|
|
12813
|
+
/* @__PURE__ */ jsxs94("div", { className: "ss-g-hl-info", children: [
|
|
12814
|
+
first && /* @__PURE__ */ jsx104("span", { className: "ss-g-hl-first", children: first }),
|
|
12815
|
+
/* @__PURE__ */ jsx104("span", { className: "ss-g-hl-surname", children: last }),
|
|
12718
12816
|
children
|
|
12719
12817
|
] })
|
|
12720
12818
|
] });
|
|
@@ -12746,47 +12844,47 @@ function HigherOrLowerGame({
|
|
|
12746
12844
|
const newAnswers = [...prevAnswers, { pairIndex: currentPair.pairIndex, pick }];
|
|
12747
12845
|
onSubmit(JSON.stringify({ answers: newAnswers }));
|
|
12748
12846
|
}
|
|
12749
|
-
return /* @__PURE__ */
|
|
12750
|
-
/* @__PURE__ */
|
|
12847
|
+
return /* @__PURE__ */ jsxs94("div", { className: "ss-g-screen ss-g-hl", "data-game": "higher-or-lower", "data-testid": "game-screen-higher-or-lower", children: [
|
|
12848
|
+
/* @__PURE__ */ jsx104(
|
|
12751
12849
|
GameHeader,
|
|
12752
12850
|
{
|
|
12753
12851
|
title: gameTitle({ gameId: "higher-or-lower" }, ui.games.titles),
|
|
12754
12852
|
eyebrow: t.eyebrow(POINTS_PER_CORRECT),
|
|
12755
|
-
right: config ? /* @__PURE__ */
|
|
12853
|
+
right: config ? /* @__PURE__ */ jsx104(StatStack, { value: runLength, label: t.streak }) : void 0,
|
|
12756
12854
|
onBack,
|
|
12757
12855
|
backLabel: ui.back
|
|
12758
12856
|
}
|
|
12759
12857
|
),
|
|
12760
|
-
!config && /* @__PURE__ */
|
|
12761
|
-
config && /* @__PURE__ */
|
|
12762
|
-
/* @__PURE__ */
|
|
12763
|
-
/* @__PURE__ */
|
|
12764
|
-
/* @__PURE__ */
|
|
12765
|
-
/* @__PURE__ */
|
|
12766
|
-
/* @__PURE__ */
|
|
12858
|
+
!config && /* @__PURE__ */ jsx104("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading }),
|
|
12859
|
+
config && /* @__PURE__ */ jsxs94(Fragment27, { children: [
|
|
12860
|
+
/* @__PURE__ */ jsxs94("div", { className: "ss-g-body", children: [
|
|
12861
|
+
/* @__PURE__ */ jsxs94("div", { className: "ss-g-hl-prompt", "data-testid": "hol-prompt", children: [
|
|
12862
|
+
/* @__PURE__ */ jsx104("span", { className: "ss-g-hl-prompt-q", children: t.whoHadMore }),
|
|
12863
|
+
/* @__PURE__ */ jsx104("span", { className: "ss-g-hl-prompt-stat", children: config.statLabel }),
|
|
12864
|
+
/* @__PURE__ */ jsx104("span", { className: "ss-g-hl-prompt-season", children: t.season(config.seasonLabel) })
|
|
12767
12865
|
] }),
|
|
12768
|
-
currentPair && /* @__PURE__ */
|
|
12769
|
-
/* @__PURE__ */
|
|
12770
|
-
/* @__PURE__ */
|
|
12771
|
-
/* @__PURE__ */
|
|
12866
|
+
currentPair && /* @__PURE__ */ jsxs94("div", { className: "ss-g-hl-pair", children: [
|
|
12867
|
+
/* @__PURE__ */ jsxs94(PlayerCard2, { name: currentPair.playerAName, imagePath: currentPair.playerAImagePath, children: [
|
|
12868
|
+
/* @__PURE__ */ jsx104("span", { className: "ss-g-hl-value", children: currentPair.playerAValue }),
|
|
12869
|
+
/* @__PURE__ */ jsx104("span", { className: "ss-g-hl-stat", children: config.statLabel })
|
|
12772
12870
|
] }),
|
|
12773
|
-
/* @__PURE__ */
|
|
12774
|
-
/* @__PURE__ */
|
|
12775
|
-
/* @__PURE__ */
|
|
12776
|
-
/* @__PURE__ */
|
|
12871
|
+
/* @__PURE__ */ jsx104("span", { className: "ss-g-hl-vs", "aria-hidden": "true", children: t.vs }),
|
|
12872
|
+
/* @__PURE__ */ jsx104(PlayerCard2, { name: currentPair.playerBName, imagePath: currentPair.playerBImagePath, highlight: true, children: /* @__PURE__ */ jsxs94("div", { className: "ss-g-hl-btns", children: [
|
|
12873
|
+
/* @__PURE__ */ jsxs94(GameButton, { variant: "primary", disabled: submitting, onClick: () => handlePick("higher"), children: [
|
|
12874
|
+
/* @__PURE__ */ jsx104(IconArrowUp, { size: 16 }),
|
|
12777
12875
|
t.higher
|
|
12778
12876
|
] }),
|
|
12779
|
-
/* @__PURE__ */
|
|
12780
|
-
/* @__PURE__ */
|
|
12877
|
+
/* @__PURE__ */ jsxs94(GameButton, { variant: "outline", disabled: submitting, onClick: () => handlePick("lower"), children: [
|
|
12878
|
+
/* @__PURE__ */ jsx104(IconArrowDown, { size: 16 }),
|
|
12781
12879
|
t.lower
|
|
12782
12880
|
] })
|
|
12783
12881
|
] }) })
|
|
12784
12882
|
] }),
|
|
12785
|
-
lastAnswer && lastAnswerPair && /* @__PURE__ */
|
|
12786
|
-
lastAnswer.wasCorrect ? /* @__PURE__ */
|
|
12883
|
+
lastAnswer && lastAnswerPair && /* @__PURE__ */ jsxs94("p", { className: "ss-g-hl-feedback", "data-testid": "hol-last", "data-correct": lastAnswer.wasCorrect ? "true" : "false", children: [
|
|
12884
|
+
lastAnswer.wasCorrect ? /* @__PURE__ */ jsx104(IconCheck, {}) : /* @__PURE__ */ jsx104(IconClose, {}),
|
|
12787
12885
|
t.lastAnswer(splitName(lastAnswerPair.playerBName).last, lastAnswer.playerBValue)
|
|
12788
12886
|
] }),
|
|
12789
|
-
isOver && /* @__PURE__ */
|
|
12887
|
+
isOver && /* @__PURE__ */ jsx104(
|
|
12790
12888
|
ResultCard,
|
|
12791
12889
|
{
|
|
12792
12890
|
tone: runEndedWrong ? "lose" : allPairsAnswered ? "win" : "neutral",
|
|
@@ -12798,15 +12896,15 @@ function HigherOrLowerGame({
|
|
|
12798
12896
|
}
|
|
12799
12897
|
)
|
|
12800
12898
|
] }),
|
|
12801
|
-
!isOver && /* @__PURE__ */
|
|
12802
|
-
/* @__PURE__ */
|
|
12899
|
+
!isOver && /* @__PURE__ */ jsx104(FooterBar, { children: /* @__PURE__ */ jsxs94("div", { className: "ss-g-hl-foot", children: [
|
|
12900
|
+
/* @__PURE__ */ jsx104("div", { className: "ss-g-hl-dots", role: "img", "aria-label": t.answersSoFar(answeredCount, config.pairs.length), children: config.pairs.map((p, i) => {
|
|
12803
12901
|
const a = answeredPairs[i];
|
|
12804
|
-
return /* @__PURE__ */
|
|
12902
|
+
return /* @__PURE__ */ jsx104("span", { className: "ss-g-hl-dot", "data-state": a ? a.wasCorrect ? "correct" : "wrong" : "todo" }, p.pairIndex);
|
|
12805
12903
|
}) }),
|
|
12806
|
-
/* @__PURE__ */
|
|
12807
|
-
/* @__PURE__ */
|
|
12904
|
+
/* @__PURE__ */ jsxs94("span", { className: "ss-g-hl-pts", children: [
|
|
12905
|
+
/* @__PURE__ */ jsx104("span", { "data-testid": "hol-score", children: score }),
|
|
12808
12906
|
" ",
|
|
12809
|
-
/* @__PURE__ */
|
|
12907
|
+
/* @__PURE__ */ jsx104("span", { className: "ss-g-hl-pts-unit", children: ui.games.unitPts })
|
|
12810
12908
|
] })
|
|
12811
12909
|
] }) })
|
|
12812
12910
|
] })
|
|
@@ -12818,17 +12916,17 @@ import { useState as useState54, useId as useId4 } from "react";
|
|
|
12818
12916
|
|
|
12819
12917
|
// src/components/games/ui/CrestShield.tsx
|
|
12820
12918
|
import { useState as useState53 } from "react";
|
|
12821
|
-
import { jsx as
|
|
12919
|
+
import { jsx as jsx105 } from "react/jsx-runtime";
|
|
12822
12920
|
function CrestShield({ src, name, size = 28 }) {
|
|
12823
12921
|
const [failed, setFailed] = useState53(false);
|
|
12824
12922
|
if (src && !isPlaceholderImage(src) && !failed) {
|
|
12825
|
-
return /* @__PURE__ */
|
|
12923
|
+
return /* @__PURE__ */ jsx105("img", { className: "ss-g-crest", src, alt: name, width: size, height: size, loading: "lazy", onError: () => setFailed(true) });
|
|
12826
12924
|
}
|
|
12827
|
-
return /* @__PURE__ */
|
|
12925
|
+
return /* @__PURE__ */ jsx105("svg", { className: "ss-g-crest ss-g-crest--ph", width: size, height: size * 32 / 28, viewBox: "0 0 28 32", role: "img", "aria-label": name, children: /* @__PURE__ */ jsx105("path", { d: "M2 3h24v12c0 9-6 14-12 17C8 29 2 24 2 15z", fill: "currentColor" }) });
|
|
12828
12926
|
}
|
|
12829
12927
|
|
|
12830
12928
|
// src/components/games/CareerPathGame.tsx
|
|
12831
|
-
import { Fragment as Fragment28, jsx as
|
|
12929
|
+
import { Fragment as Fragment28, jsx as jsx106, jsxs as jsxs95 } from "react/jsx-runtime";
|
|
12832
12930
|
function parseClientState3(json) {
|
|
12833
12931
|
if (!json) return null;
|
|
12834
12932
|
try {
|
|
@@ -12858,9 +12956,9 @@ function CareerPathGame({
|
|
|
12858
12956
|
const alreadyGuessedIds = new Set(clientState?.guessResults.map((g) => g.playerId) ?? []);
|
|
12859
12957
|
const isOver = result?.alreadyPlayed === true || clientState?.solved === true || clientState?.failed === true;
|
|
12860
12958
|
if (!config) {
|
|
12861
|
-
return /* @__PURE__ */
|
|
12862
|
-
/* @__PURE__ */
|
|
12863
|
-
/* @__PURE__ */
|
|
12959
|
+
return /* @__PURE__ */ jsxs95("div", { className: "ss-g-screen", "data-game": "career-path", "data-testid": "game-screen-career-path", children: [
|
|
12960
|
+
/* @__PURE__ */ jsx106(GameHeader, { title, eyebrow: s.eyebrow, onBack, backLabel: ui.back }),
|
|
12961
|
+
/* @__PURE__ */ jsx106("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
12864
12962
|
] });
|
|
12865
12963
|
}
|
|
12866
12964
|
const visiblePath = clientState?.visiblePath ?? config.initialPath;
|
|
@@ -12874,61 +12972,61 @@ function CareerPathGame({
|
|
|
12874
12972
|
setQuery("");
|
|
12875
12973
|
onSubmit(JSON.stringify({ guesses: newGuesses }));
|
|
12876
12974
|
}
|
|
12877
|
-
const right = !isOver && clientState ? /* @__PURE__ */
|
|
12975
|
+
const right = !isOver && clientState ? /* @__PURE__ */ jsx106("span", { "data-testid": "cp-guess-chip", children: /* @__PURE__ */ jsxs95(Chip, { variant: "neutral", children: [
|
|
12878
12976
|
ui.games.guess,
|
|
12879
12977
|
" ",
|
|
12880
|
-
/* @__PURE__ */
|
|
12978
|
+
/* @__PURE__ */ jsx106("span", { className: "ss-g-num", children: clientState.guessesUsed + 1 }),
|
|
12881
12979
|
" / ",
|
|
12882
12980
|
clientState.guessesUsed + clientState.guessesRemaining
|
|
12883
12981
|
] }) }) : void 0;
|
|
12884
12982
|
const outcome = clientState?.solved ? s.solved : clientState?.failed ? s.failed : ui.games.done;
|
|
12885
|
-
return /* @__PURE__ */
|
|
12886
|
-
/* @__PURE__ */
|
|
12887
|
-
/* @__PURE__ */
|
|
12888
|
-
!isOver && /* @__PURE__ */
|
|
12889
|
-
/* @__PURE__ */
|
|
12890
|
-
isOver && clientState?.revealedPlayerName ? /* @__PURE__ */
|
|
12891
|
-
/* @__PURE__ */
|
|
12892
|
-
/* @__PURE__ */
|
|
12893
|
-
clientState?.hintLine ? /* @__PURE__ */
|
|
12894
|
-
/* @__PURE__ */
|
|
12895
|
-
/* @__PURE__ */
|
|
12983
|
+
return /* @__PURE__ */ jsxs95("div", { className: "ss-g-screen", "data-game": "career-path", "data-testid": "game-screen-career-path", children: [
|
|
12984
|
+
/* @__PURE__ */ jsx106(GameHeader, { title, eyebrow: s.eyebrow, right, onBack, backLabel: ui.back }),
|
|
12985
|
+
/* @__PURE__ */ jsxs95("div", { className: "ss-g-body", children: [
|
|
12986
|
+
!isOver && /* @__PURE__ */ jsx106(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed: clientState?.guessesUsed ?? 0, ui }),
|
|
12987
|
+
/* @__PURE__ */ jsxs95("div", { className: "ss-g-cp-card", children: [
|
|
12988
|
+
isOver && clientState?.revealedPlayerName ? /* @__PURE__ */ jsx106(PlayerAvatar, { className: "ss-g-cp-photo", name: clientState.revealedPlayerName, imagePath: clientState.revealedPlayerImagePath }) : /* @__PURE__ */ jsx106(Silhouette, { size: 64, variant: isOver ? "default" : "mystery" }),
|
|
12989
|
+
/* @__PURE__ */ jsxs95("div", { className: "ss-g-cp-card-text", children: [
|
|
12990
|
+
/* @__PURE__ */ jsx106("span", { className: "ss-g-cp-card-title", children: isOver && clientState?.revealedPlayerName ? clientState.revealedPlayerName : s.mysteryPlayer }),
|
|
12991
|
+
clientState?.hintLine ? /* @__PURE__ */ jsx106("span", { className: "ss-g-cp-hint", children: clientState.hintLine }) : !isOver ? /* @__PURE__ */ jsxs95("span", { className: "ss-g-cp-locks", children: [
|
|
12992
|
+
/* @__PURE__ */ jsx106(Chip, { variant: "lock", icon: /* @__PURE__ */ jsx106(IconLock, { size: 11 }), children: s.lockPosition }),
|
|
12993
|
+
/* @__PURE__ */ jsx106(Chip, { variant: "lock", icon: /* @__PURE__ */ jsx106(IconLock, { size: 11 }), children: s.lockNationality })
|
|
12896
12994
|
] }) : null
|
|
12897
12995
|
] })
|
|
12898
12996
|
] }),
|
|
12899
|
-
/* @__PURE__ */
|
|
12997
|
+
/* @__PURE__ */ jsxs95("ol", { className: "ss-g-cp-line", children: [
|
|
12900
12998
|
visiblePath.map((spell, i) => {
|
|
12901
12999
|
const years = i === 0 ? s.firstClub : spellYears(spell);
|
|
12902
|
-
return /* @__PURE__ */
|
|
12903
|
-
/* @__PURE__ */
|
|
12904
|
-
/* @__PURE__ */
|
|
12905
|
-
/* @__PURE__ */
|
|
13000
|
+
return /* @__PURE__ */ jsxs95("li", { className: "ss-g-cp-step", children: [
|
|
13001
|
+
/* @__PURE__ */ jsxs95("span", { className: "ss-g-cp-rail", children: [
|
|
13002
|
+
/* @__PURE__ */ jsx106("span", { className: "ss-g-cp-tile", children: /* @__PURE__ */ jsx106(CrestShield, { src: spell.crestUrl, name: spell.clubName, size: 30 }) }),
|
|
13003
|
+
/* @__PURE__ */ jsx106("span", { className: "ss-g-cp-conn", "aria-hidden": "true" })
|
|
12906
13004
|
] }),
|
|
12907
|
-
/* @__PURE__ */
|
|
12908
|
-
/* @__PURE__ */
|
|
12909
|
-
/* @__PURE__ */
|
|
12910
|
-
/* @__PURE__ */
|
|
12911
|
-
spell.isLoan && /* @__PURE__ */
|
|
13005
|
+
/* @__PURE__ */ jsxs95("span", { className: "ss-g-cp-step-text", children: [
|
|
13006
|
+
/* @__PURE__ */ jsx106("span", { className: "ss-g-cp-club", children: spell.clubName }),
|
|
13007
|
+
/* @__PURE__ */ jsxs95("span", { className: "ss-g-cp-sub", children: [
|
|
13008
|
+
/* @__PURE__ */ jsx106("span", { className: "ss-g-cp-years", children: years }),
|
|
13009
|
+
spell.isLoan && /* @__PURE__ */ jsxs95(Fragment28, { children: [
|
|
12912
13010
|
years ? " \xB7 " : "",
|
|
12913
|
-
/* @__PURE__ */
|
|
13011
|
+
/* @__PURE__ */ jsx106("span", { className: "ss-g-cp-loan", children: s.loan })
|
|
12914
13012
|
] })
|
|
12915
13013
|
] })
|
|
12916
13014
|
] })
|
|
12917
13015
|
] }, `${spell.clubName}-${i}`);
|
|
12918
13016
|
}),
|
|
12919
|
-
hidden > 0 && /* @__PURE__ */
|
|
12920
|
-
/* @__PURE__ */
|
|
12921
|
-
/* @__PURE__ */
|
|
12922
|
-
hidden > 1 && /* @__PURE__ */
|
|
13017
|
+
hidden > 0 && /* @__PURE__ */ jsxs95("li", { className: "ss-g-cp-step ss-g-cp-step--hidden", children: [
|
|
13018
|
+
/* @__PURE__ */ jsxs95("span", { className: "ss-g-cp-rail", children: [
|
|
13019
|
+
/* @__PURE__ */ jsx106("span", { className: "ss-g-cp-tile ss-g-cp-tile--locked", children: /* @__PURE__ */ jsx106(IconLock, { size: 18 }) }),
|
|
13020
|
+
hidden > 1 && /* @__PURE__ */ jsx106("span", { className: "ss-g-cp-conn ss-g-cp-conn--faint", "aria-hidden": "true" })
|
|
12923
13021
|
] }),
|
|
12924
|
-
/* @__PURE__ */
|
|
13022
|
+
/* @__PURE__ */ jsx106("span", { className: "ss-g-cp-step-text", children: /* @__PURE__ */ jsx106("span", { className: "ss-g-cp-sub", children: s.nextClubHidden }) })
|
|
12925
13023
|
] }),
|
|
12926
|
-
hidden > 1 && /* @__PURE__ */
|
|
12927
|
-
/* @__PURE__ */
|
|
12928
|
-
/* @__PURE__ */
|
|
13024
|
+
hidden > 1 && /* @__PURE__ */ jsxs95("li", { className: "ss-g-cp-step ss-g-cp-step--more", children: [
|
|
13025
|
+
/* @__PURE__ */ jsx106("span", { className: "ss-g-cp-rail", children: /* @__PURE__ */ jsx106("span", { className: "ss-g-cp-tile ss-g-cp-tile--faint", children: /* @__PURE__ */ jsx106(IconLock, { size: 18 }) }) }),
|
|
13026
|
+
/* @__PURE__ */ jsx106("span", { className: "ss-g-cp-step-text", children: /* @__PURE__ */ jsx106("span", { className: "ss-g-cp-sub", children: s.moreClubs(hidden - 1) }) })
|
|
12929
13027
|
] })
|
|
12930
13028
|
] }),
|
|
12931
|
-
isOver && /* @__PURE__ */
|
|
13029
|
+
isOver && /* @__PURE__ */ jsx106(
|
|
12932
13030
|
ResultCard,
|
|
12933
13031
|
{
|
|
12934
13032
|
tone: clientState?.solved ? "win" : clientState?.failed ? "lose" : "neutral",
|
|
@@ -12940,7 +13038,7 @@ function CareerPathGame({
|
|
|
12940
13038
|
}
|
|
12941
13039
|
)
|
|
12942
13040
|
] }),
|
|
12943
|
-
!isOver && /* @__PURE__ */
|
|
13041
|
+
!isOver && /* @__PURE__ */ jsx106(FooterBar, { children: /* @__PURE__ */ jsx106(
|
|
12944
13042
|
AnswerTray,
|
|
12945
13043
|
{
|
|
12946
13044
|
id: inputId,
|
|
@@ -12962,13 +13060,13 @@ function CareerPathGame({
|
|
|
12962
13060
|
import React, { useEffect as useEffect37, useId as useId5, useRef as useRef30, useState as useState55 } from "react";
|
|
12963
13061
|
|
|
12964
13062
|
// src/components/games/ui/OptionList.tsx
|
|
12965
|
-
import { jsx as
|
|
13063
|
+
import { jsx as jsx107 } from "react/jsx-runtime";
|
|
12966
13064
|
function OptionList({ label, options, onPick }) {
|
|
12967
|
-
return /* @__PURE__ */
|
|
13065
|
+
return /* @__PURE__ */ jsx107("div", { className: "ss-g-opts", role: "listbox", "aria-label": label, children: options.map((o) => /* @__PURE__ */ jsx107("button", { type: "button", role: "option", "aria-selected": false, className: "ss-g-opt", onClick: () => onPick(o.key), children: o.content }, o.key)) });
|
|
12968
13066
|
}
|
|
12969
13067
|
|
|
12970
13068
|
// src/components/games/BeatTheGridGame.tsx
|
|
12971
|
-
import { Fragment as Fragment29, jsx as
|
|
13069
|
+
import { Fragment as Fragment29, jsx as jsx108, jsxs as jsxs96 } from "react/jsx-runtime";
|
|
12972
13070
|
function criterionIconKind(label, key) {
|
|
12973
13071
|
const l = (key ?? label).toLowerCase();
|
|
12974
13072
|
if (l.includes("app")) return "calendar";
|
|
@@ -12986,34 +13084,34 @@ function rowAbbrev(label, map, key) {
|
|
|
12986
13084
|
function CriterionIcon({ kind }) {
|
|
12987
13085
|
switch (kind) {
|
|
12988
13086
|
case "calendar":
|
|
12989
|
-
return /* @__PURE__ */
|
|
13087
|
+
return /* @__PURE__ */ jsx108(IconCalendar, {});
|
|
12990
13088
|
case "ball":
|
|
12991
|
-
return /* @__PURE__ */
|
|
13089
|
+
return /* @__PURE__ */ jsx108(IconBall, {});
|
|
12992
13090
|
case "boot":
|
|
12993
|
-
return /* @__PURE__ */
|
|
13091
|
+
return /* @__PURE__ */ jsx108(IconBoot, {});
|
|
12994
13092
|
case "gloves":
|
|
12995
|
-
return /* @__PURE__ */
|
|
13093
|
+
return /* @__PURE__ */ jsx108(IconGloves, {});
|
|
12996
13094
|
case "shield":
|
|
12997
|
-
return /* @__PURE__ */
|
|
13095
|
+
return /* @__PURE__ */ jsx108(IconShield, {});
|
|
12998
13096
|
default:
|
|
12999
|
-
return /* @__PURE__ */
|
|
13097
|
+
return /* @__PURE__ */ jsx108(IconFlag, {});
|
|
13000
13098
|
}
|
|
13001
13099
|
}
|
|
13002
13100
|
function HeaderVisual({ label, textKey: iKey, meta }) {
|
|
13003
13101
|
if (!meta) {
|
|
13004
|
-
return /* @__PURE__ */
|
|
13102
|
+
return /* @__PURE__ */ jsx108(CriterionIcon, { kind: criterionIconKind(label, iKey) });
|
|
13005
13103
|
}
|
|
13006
13104
|
switch (meta.kind) {
|
|
13007
13105
|
case "club":
|
|
13008
|
-
return /* @__PURE__ */
|
|
13106
|
+
return /* @__PURE__ */ jsx108(CrestShield, { src: meta.imageUrl, name: label, size: 24 });
|
|
13009
13107
|
case "coach":
|
|
13010
|
-
return /* @__PURE__ */
|
|
13108
|
+
return /* @__PURE__ */ jsx108(PlayerAvatar, { name: label, imagePath: meta.imageUrl, className: "ss-g-btg-coach-av" });
|
|
13011
13109
|
case "country":
|
|
13012
|
-
return /* @__PURE__ */
|
|
13110
|
+
return /* @__PURE__ */ jsx108("span", { className: "ss-g-btg-hdr-flag", "aria-hidden": "true", children: nationalityFlag(meta.country ?? label) });
|
|
13013
13111
|
case "position":
|
|
13014
|
-
return /* @__PURE__ */
|
|
13112
|
+
return /* @__PURE__ */ jsx108(Fragment29, {});
|
|
13015
13113
|
default:
|
|
13016
|
-
return /* @__PURE__ */
|
|
13114
|
+
return /* @__PURE__ */ jsx108(CriterionIcon, { kind: criterionIconKind(label, iKey) });
|
|
13017
13115
|
}
|
|
13018
13116
|
}
|
|
13019
13117
|
function parseClientState4(json) {
|
|
@@ -13057,12 +13155,12 @@ function SearchSheet({
|
|
|
13057
13155
|
const filtered = playerPool.filter(
|
|
13058
13156
|
(p) => !alreadyFilledIds.has(p.id) && p.name.toLowerCase().includes(query.toLowerCase())
|
|
13059
13157
|
);
|
|
13060
|
-
return /* @__PURE__ */
|
|
13061
|
-
/* @__PURE__ */
|
|
13062
|
-
/* @__PURE__ */
|
|
13063
|
-
/* @__PURE__ */
|
|
13064
|
-
/* @__PURE__ */
|
|
13065
|
-
/* @__PURE__ */
|
|
13158
|
+
return /* @__PURE__ */ jsxs96("div", { className: "ss-g-btg-sheet", "data-testid": "btg-search-sheet", children: [
|
|
13159
|
+
/* @__PURE__ */ jsxs96("div", { className: "ss-g-btg-sheet-hdr", children: [
|
|
13160
|
+
/* @__PURE__ */ jsx108(Chip, { variant: "neutral", children: rowLabel }),
|
|
13161
|
+
/* @__PURE__ */ jsx108("span", { className: "ss-g-btg-sheet-x", "aria-hidden": "true", children: /* @__PURE__ */ jsx108(IconClose, { size: 12 }) }),
|
|
13162
|
+
/* @__PURE__ */ jsx108(Chip, { variant: "accent", children: colLabel }),
|
|
13163
|
+
/* @__PURE__ */ jsx108(
|
|
13066
13164
|
"button",
|
|
13067
13165
|
{
|
|
13068
13166
|
type: "button",
|
|
@@ -13070,12 +13168,12 @@ function SearchSheet({
|
|
|
13070
13168
|
"data-testid": "btg-sheet-dismiss",
|
|
13071
13169
|
"aria-label": s.closeSearch,
|
|
13072
13170
|
onClick: onDismiss,
|
|
13073
|
-
children: /* @__PURE__ */
|
|
13171
|
+
children: /* @__PURE__ */ jsx108(IconClose, {})
|
|
13074
13172
|
}
|
|
13075
13173
|
)
|
|
13076
13174
|
] }),
|
|
13077
|
-
playerPool.length === 0 ? /* @__PURE__ */
|
|
13078
|
-
/* @__PURE__ */
|
|
13175
|
+
playerPool.length === 0 ? /* @__PURE__ */ jsx108("div", { className: "ss-g-btg-sheet-empty", children: s.emptyPool }) : /* @__PURE__ */ jsxs96(Fragment29, { children: [
|
|
13176
|
+
/* @__PURE__ */ jsx108(
|
|
13079
13177
|
SearchField,
|
|
13080
13178
|
{
|
|
13081
13179
|
id: inputId,
|
|
@@ -13087,16 +13185,16 @@ function SearchSheet({
|
|
|
13087
13185
|
inputRef
|
|
13088
13186
|
}
|
|
13089
13187
|
),
|
|
13090
|
-
query.length > 0 && filtered.length > 0 && /* @__PURE__ */
|
|
13188
|
+
query.length > 0 && filtered.length > 0 && /* @__PURE__ */ jsx108(
|
|
13091
13189
|
OptionList,
|
|
13092
13190
|
{
|
|
13093
13191
|
label: s.searchLabel(rowLabel, colLabel),
|
|
13094
13192
|
options: filtered.map((p) => ({
|
|
13095
13193
|
key: p.id,
|
|
13096
|
-
content: /* @__PURE__ */
|
|
13097
|
-
/* @__PURE__ */
|
|
13098
|
-
/* @__PURE__ */
|
|
13099
|
-
/* @__PURE__ */
|
|
13194
|
+
content: /* @__PURE__ */ jsxs96(Fragment29, { children: [
|
|
13195
|
+
/* @__PURE__ */ jsx108(PlayerAvatar, { name: p.name, imagePath: p.imagePath, className: "ss-g-opt-av" }),
|
|
13196
|
+
/* @__PURE__ */ jsx108("span", { className: "ss-g-btg-result-name", children: p.name }),
|
|
13197
|
+
/* @__PURE__ */ jsx108("span", { className: "ss-g-btg-result-plus", "aria-hidden": "true", children: /* @__PURE__ */ jsx108(IconPlus, { size: 18 }) })
|
|
13100
13198
|
] })
|
|
13101
13199
|
})),
|
|
13102
13200
|
onPick: (k) => onPick(row, col, Number(k))
|
|
@@ -13134,9 +13232,9 @@ function BeatTheGridGame({
|
|
|
13134
13232
|
onSubmit(JSON.stringify({ cells: newCells }));
|
|
13135
13233
|
}
|
|
13136
13234
|
if (!config) {
|
|
13137
|
-
return /* @__PURE__ */
|
|
13138
|
-
/* @__PURE__ */
|
|
13139
|
-
/* @__PURE__ */
|
|
13235
|
+
return /* @__PURE__ */ jsxs96("div", { className: "ss-g-screen", "data-game": "beat-the-grid", "data-testid": "game-screen-beat-the-grid", children: [
|
|
13236
|
+
/* @__PURE__ */ jsx108(GameHeader, { title, eyebrow: s.eyebrow, onBack, backLabel: ui.back }),
|
|
13237
|
+
/* @__PURE__ */ jsx108("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
13140
13238
|
] });
|
|
13141
13239
|
}
|
|
13142
13240
|
const rows = config.rows;
|
|
@@ -13149,20 +13247,20 @@ function BeatTheGridGame({
|
|
|
13149
13247
|
(_, i) => i < correctCount ? "correct" : i < correctCount + wrongCount ? "wrong" : "todo"
|
|
13150
13248
|
);
|
|
13151
13249
|
const totalScore = clientState?.totalScore ?? result?.score ?? 0;
|
|
13152
|
-
return /* @__PURE__ */
|
|
13153
|
-
/* @__PURE__ */
|
|
13154
|
-
/* @__PURE__ */
|
|
13250
|
+
return /* @__PURE__ */ jsxs96("div", { className: "ss-g-screen", "data-game": "beat-the-grid", "data-testid": "game-screen-beat-the-grid", children: [
|
|
13251
|
+
/* @__PURE__ */ jsx108(GameHeader, { title, eyebrow: s.eyebrow, onBack, backLabel: ui.back }),
|
|
13252
|
+
/* @__PURE__ */ jsx108(
|
|
13155
13253
|
SegmentProgress,
|
|
13156
13254
|
{
|
|
13157
13255
|
segments,
|
|
13158
13256
|
ariaLabel: s.progressAria(filledCells.length, total),
|
|
13159
13257
|
leftLabel: s.filled(filledCells.length, total),
|
|
13160
13258
|
rightLabel: s.toGo(Math.max(0, total - filledCells.length)),
|
|
13161
|
-
right: /* @__PURE__ */
|
|
13259
|
+
right: /* @__PURE__ */ jsx108(Chip, { variant: "accent", children: `${totalScore} ${ui.games.unitPts}` })
|
|
13162
13260
|
}
|
|
13163
13261
|
),
|
|
13164
|
-
/* @__PURE__ */
|
|
13165
|
-
/* @__PURE__ */
|
|
13262
|
+
/* @__PURE__ */ jsxs96("div", { className: "ss-g-body", children: [
|
|
13263
|
+
/* @__PURE__ */ jsxs96(
|
|
13166
13264
|
"div",
|
|
13167
13265
|
{
|
|
13168
13266
|
className: activeCell !== null ? "ss-g-btg-grid ss-g-btg-grid--fit" : "ss-g-btg-grid",
|
|
@@ -13172,31 +13270,31 @@ function BeatTheGridGame({
|
|
|
13172
13270
|
},
|
|
13173
13271
|
role: "grid",
|
|
13174
13272
|
children: [
|
|
13175
|
-
/* @__PURE__ */
|
|
13273
|
+
/* @__PURE__ */ jsx108("div", { className: "ss-g-btg-corner" }),
|
|
13176
13274
|
cols.map((col, colIdx) => {
|
|
13177
13275
|
const colMeta = config.colsMeta?.[colIdx];
|
|
13178
|
-
return /* @__PURE__ */
|
|
13179
|
-
/* @__PURE__ */
|
|
13180
|
-
/* @__PURE__ */
|
|
13276
|
+
return /* @__PURE__ */ jsxs96("div", { className: "ss-g-btg-colhdr", "data-meta": colMeta ? "true" : void 0, children: [
|
|
13277
|
+
/* @__PURE__ */ jsx108(HeaderVisual, { label: col, textKey: config.colsI18n?.[colIdx]?.key, meta: colMeta }),
|
|
13278
|
+
/* @__PURE__ */ jsx108("span", { children: col })
|
|
13181
13279
|
] }, col);
|
|
13182
13280
|
}),
|
|
13183
13281
|
rows.map((rowLabel, rowIdx) => {
|
|
13184
13282
|
const rowMeta = config.rowsMeta?.[rowIdx];
|
|
13185
13283
|
const abbr = rowAbbrev(rowLabel, s.rowAbbrev, config.rowsI18n?.[rowIdx]?.key);
|
|
13186
|
-
const rowHeaderContent = rowMeta ? /* @__PURE__ */
|
|
13187
|
-
/* @__PURE__ */
|
|
13188
|
-
/* @__PURE__ */
|
|
13189
|
-
] }) : abbr === rowLabel ? /* @__PURE__ */
|
|
13190
|
-
/* @__PURE__ */
|
|
13191
|
-
/* @__PURE__ */
|
|
13284
|
+
const rowHeaderContent = rowMeta ? /* @__PURE__ */ jsxs96(Fragment29, { children: [
|
|
13285
|
+
/* @__PURE__ */ jsx108(HeaderVisual, { label: rowLabel, textKey: config.rowsI18n?.[rowIdx]?.key, meta: rowMeta }),
|
|
13286
|
+
/* @__PURE__ */ jsx108("span", { children: rowLabel })
|
|
13287
|
+
] }) : abbr === rowLabel ? /* @__PURE__ */ jsx108("span", { children: rowLabel }) : /* @__PURE__ */ jsxs96(Fragment29, { children: [
|
|
13288
|
+
/* @__PURE__ */ jsx108("span", { "aria-hidden": "true", children: abbr }),
|
|
13289
|
+
/* @__PURE__ */ jsx108("span", { className: "ss-g-sr", children: rowLabel })
|
|
13192
13290
|
] });
|
|
13193
|
-
return /* @__PURE__ */
|
|
13194
|
-
/* @__PURE__ */
|
|
13291
|
+
return /* @__PURE__ */ jsxs96(React.Fragment, { children: [
|
|
13292
|
+
/* @__PURE__ */ jsx108("div", { className: "ss-g-btg-rowhdr", "data-meta": rowMeta ? "true" : void 0, children: rowHeaderContent }),
|
|
13195
13293
|
cols.map((colLabel, colIdx) => {
|
|
13196
13294
|
const filled = findCellResult(filledCells, rowIdx, colIdx);
|
|
13197
13295
|
const isActive = activeCell?.row === rowIdx && activeCell?.col === colIdx;
|
|
13198
13296
|
const state = filled ? filled.isCorrect ? "correct" : "wrong" : isActive ? "active" : "empty";
|
|
13199
|
-
return /* @__PURE__ */
|
|
13297
|
+
return /* @__PURE__ */ jsx108(
|
|
13200
13298
|
"button",
|
|
13201
13299
|
{
|
|
13202
13300
|
type: "button",
|
|
@@ -13207,20 +13305,20 @@ function BeatTheGridGame({
|
|
|
13207
13305
|
className: "ss-g-btg-cell",
|
|
13208
13306
|
disabled: isLocked2 || submitting,
|
|
13209
13307
|
onClick: () => handleCellClick(rowIdx, colIdx),
|
|
13210
|
-
children: filled ? /* @__PURE__ */
|
|
13211
|
-
/* @__PURE__ */
|
|
13308
|
+
children: filled ? /* @__PURE__ */ jsxs96(Fragment29, { children: [
|
|
13309
|
+
/* @__PURE__ */ jsx108(
|
|
13212
13310
|
"span",
|
|
13213
13311
|
{
|
|
13214
13312
|
className: `ss-g-btg-badge ss-g-btg-badge--${filled.isCorrect ? "correct" : "wrong"}`,
|
|
13215
13313
|
role: "img",
|
|
13216
13314
|
"aria-label": filled.isCorrect ? s.correct : s.wrong,
|
|
13217
|
-
children: filled.isCorrect ? /* @__PURE__ */
|
|
13315
|
+
children: filled.isCorrect ? /* @__PURE__ */ jsx108(IconCheck, { size: 11 }) : /* @__PURE__ */ jsx108(IconClose, { size: 11 })
|
|
13218
13316
|
}
|
|
13219
13317
|
),
|
|
13220
|
-
/* @__PURE__ */
|
|
13318
|
+
/* @__PURE__ */ jsx108("span", { className: "ss-g-btg-rarity", children: filled.rarityScore }),
|
|
13221
13319
|
(() => {
|
|
13222
13320
|
const entry = playerPool.find((p) => p.id === filled.playerId);
|
|
13223
|
-
return /* @__PURE__ */
|
|
13321
|
+
return /* @__PURE__ */ jsx108(
|
|
13224
13322
|
PlayerAvatar,
|
|
13225
13323
|
{
|
|
13226
13324
|
name: entry?.name ?? "",
|
|
@@ -13229,8 +13327,8 @@ function BeatTheGridGame({
|
|
|
13229
13327
|
}
|
|
13230
13328
|
);
|
|
13231
13329
|
})(),
|
|
13232
|
-
/* @__PURE__ */
|
|
13233
|
-
] }) : /* @__PURE__ */
|
|
13330
|
+
/* @__PURE__ */ jsx108("span", { className: "ss-g-btg-name", children: shortName(playerPool.find((p) => p.id === filled.playerId)?.name) })
|
|
13331
|
+
] }) : /* @__PURE__ */ jsx108("span", { className: "ss-g-btg-plus", "aria-hidden": "true", children: /* @__PURE__ */ jsx108(IconPlus, { size: 22 }) })
|
|
13234
13332
|
},
|
|
13235
13333
|
`cell-${rowIdx}-${colIdx}`
|
|
13236
13334
|
);
|
|
@@ -13240,7 +13338,7 @@ function BeatTheGridGame({
|
|
|
13240
13338
|
]
|
|
13241
13339
|
}
|
|
13242
13340
|
),
|
|
13243
|
-
isLocked2 && /* @__PURE__ */
|
|
13341
|
+
isLocked2 && /* @__PURE__ */ jsx108(
|
|
13244
13342
|
ResultCard,
|
|
13245
13343
|
{
|
|
13246
13344
|
tone: "neutral",
|
|
@@ -13252,7 +13350,7 @@ function BeatTheGridGame({
|
|
|
13252
13350
|
}
|
|
13253
13351
|
)
|
|
13254
13352
|
] }),
|
|
13255
|
-
activeCell !== null && /* @__PURE__ */
|
|
13353
|
+
activeCell !== null && /* @__PURE__ */ jsx108("div", { className: "ss-g-btg-pin", children: /* @__PURE__ */ jsx108(
|
|
13256
13354
|
SearchSheet,
|
|
13257
13355
|
{
|
|
13258
13356
|
row: activeCell.row,
|
|
@@ -13274,18 +13372,18 @@ function BeatTheGridGame({
|
|
|
13274
13372
|
import { useState as useState56, useId as useId6 } from "react";
|
|
13275
13373
|
|
|
13276
13374
|
// src/components/games/ui/PitchSvg.tsx
|
|
13277
|
-
import { Fragment as Fragment30, jsx as
|
|
13375
|
+
import { Fragment as Fragment30, jsx as jsx109, jsxs as jsxs97 } from "react/jsx-runtime";
|
|
13278
13376
|
function PitchSvg({ variant }) {
|
|
13279
|
-
return /* @__PURE__ */
|
|
13280
|
-
/* @__PURE__ */
|
|
13281
|
-
variant === "full" ? /* @__PURE__ */
|
|
13282
|
-
/* @__PURE__ */
|
|
13283
|
-
/* @__PURE__ */
|
|
13284
|
-
/* @__PURE__ */
|
|
13285
|
-
/* @__PURE__ */
|
|
13286
|
-
] }) : /* @__PURE__ */
|
|
13287
|
-
/* @__PURE__ */
|
|
13288
|
-
/* @__PURE__ */
|
|
13377
|
+
return /* @__PURE__ */ jsxs97("svg", { className: "ss-g-pitch-svg", viewBox: variant === "full" ? "0 0 100 150" : "0 0 100 100", preserveAspectRatio: "none", "aria-hidden": "true", children: [
|
|
13378
|
+
/* @__PURE__ */ jsx109("rect", { x: "4", y: "4", width: "92", height: variant === "full" ? 142 : 92, fill: "none" }),
|
|
13379
|
+
variant === "full" ? /* @__PURE__ */ jsxs97(Fragment30, { children: [
|
|
13380
|
+
/* @__PURE__ */ jsx109("line", { x1: "4", y1: "75", x2: "96", y2: "75" }),
|
|
13381
|
+
/* @__PURE__ */ jsx109("circle", { cx: "50", cy: "75", r: "12", fill: "none" }),
|
|
13382
|
+
/* @__PURE__ */ jsx109("rect", { x: "26", y: "4", width: "48", height: "20", fill: "none" }),
|
|
13383
|
+
/* @__PURE__ */ jsx109("rect", { x: "26", y: "126", width: "48", height: "20", fill: "none" })
|
|
13384
|
+
] }) : /* @__PURE__ */ jsxs97(Fragment30, { children: [
|
|
13385
|
+
/* @__PURE__ */ jsx109("path", { d: "M38 4a12 12 0 0 0 24 0", fill: "none" }),
|
|
13386
|
+
/* @__PURE__ */ jsx109("rect", { x: "26", y: "76", width: "48", height: "20", fill: "none" })
|
|
13289
13387
|
] })
|
|
13290
13388
|
] });
|
|
13291
13389
|
}
|
|
@@ -13341,7 +13439,7 @@ function positionsBySlot(formation, rowsAttackFirst) {
|
|
|
13341
13439
|
}
|
|
13342
13440
|
|
|
13343
13441
|
// src/components/games/GuessTheXiGame.tsx
|
|
13344
|
-
import { Fragment as Fragment31, jsx as
|
|
13442
|
+
import { Fragment as Fragment31, jsx as jsx110, jsxs as jsxs98 } from "react/jsx-runtime";
|
|
13345
13443
|
var MAX_GUESSES2 = 3;
|
|
13346
13444
|
function parseClientState5(json) {
|
|
13347
13445
|
if (!json) return null;
|
|
@@ -13391,31 +13489,31 @@ function GuessTheXiGame({
|
|
|
13391
13489
|
const wrongGuesses = (clientState?.guessHistory ?? []).filter((g) => !g.wasCorrect);
|
|
13392
13490
|
const guessesLeft = Math.max(0, MAX_GUESSES2 - (clientState?.guessesUsed ?? 0));
|
|
13393
13491
|
const teamName = (id) => config?.teamPool.find((tm) => tm.teamId === id)?.teamName ?? `#${id}`;
|
|
13394
|
-
return /* @__PURE__ */
|
|
13395
|
-
/* @__PURE__ */
|
|
13492
|
+
return /* @__PURE__ */ jsxs98("div", { className: "ss-g-screen ss-g-gxi", "data-game": "guess-the-xi", "data-testid": "game-screen-guess-the-xi", children: [
|
|
13493
|
+
/* @__PURE__ */ jsx110(
|
|
13396
13494
|
GameHeader,
|
|
13397
13495
|
{
|
|
13398
13496
|
title: gameTitle({ gameId: "guess-the-xi" }, ui.games.titles),
|
|
13399
13497
|
eyebrow: config?.poolLabel,
|
|
13400
|
-
right: formation ? /* @__PURE__ */
|
|
13498
|
+
right: formation ? /* @__PURE__ */ jsx110(Chip, { variant: "accent", children: formation }) : void 0,
|
|
13401
13499
|
onBack,
|
|
13402
13500
|
backLabel: ui.back
|
|
13403
13501
|
}
|
|
13404
13502
|
),
|
|
13405
|
-
!config && /* @__PURE__ */
|
|
13406
|
-
config && /* @__PURE__ */
|
|
13407
|
-
/* @__PURE__ */
|
|
13408
|
-
!isOver && /* @__PURE__ */
|
|
13409
|
-
rows.length > 0 && /* @__PURE__ */
|
|
13410
|
-
/* @__PURE__ */
|
|
13411
|
-
/* @__PURE__ */
|
|
13503
|
+
!config && /* @__PURE__ */ jsx110("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading }),
|
|
13504
|
+
config && /* @__PURE__ */ jsxs98(Fragment31, { children: [
|
|
13505
|
+
/* @__PURE__ */ jsxs98("div", { className: "ss-g-body", children: [
|
|
13506
|
+
!isOver && /* @__PURE__ */ jsx110(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed: clientState?.guessHistory.length ?? 0, ui }),
|
|
13507
|
+
rows.length > 0 && /* @__PURE__ */ jsxs98("div", { className: "ss-g-gxi-pitch", role: "group", "aria-label": t.pitchLabel, children: [
|
|
13508
|
+
/* @__PURE__ */ jsx110(PitchSvg, { variant: "full" }),
|
|
13509
|
+
/* @__PURE__ */ jsx110("div", { className: "ss-g-gxi-rows", children: rows.map((row, r) => /* @__PURE__ */ jsx110("div", { className: "ss-g-gxi-row", children: row.map((pos, c) => {
|
|
13412
13510
|
const posLabel = pos.slot ? posBySlot.get(pos.slot) ?? "" : "";
|
|
13413
13511
|
const name = pos.slot ? nameBySlot.get(pos.slot) : void 0;
|
|
13414
13512
|
const lineupEntry = pos.slot ? lineupBySlot.get(pos.slot) : void 0;
|
|
13415
13513
|
const flag = nationalityFlag(pos.nationality);
|
|
13416
13514
|
if (lineupEntry) {
|
|
13417
|
-
return /* @__PURE__ */
|
|
13418
|
-
/* @__PURE__ */
|
|
13515
|
+
return /* @__PURE__ */ jsxs98("div", { className: "ss-g-gxi-node", "data-revealed": "true", children: [
|
|
13516
|
+
/* @__PURE__ */ jsx110(
|
|
13419
13517
|
PlayerAvatar,
|
|
13420
13518
|
{
|
|
13421
13519
|
name: lineupEntry.name,
|
|
@@ -13423,11 +13521,11 @@ function GuessTheXiGame({
|
|
|
13423
13521
|
className: "ss-g-gxi-disc ss-g-gxi-disc--photo"
|
|
13424
13522
|
}
|
|
13425
13523
|
),
|
|
13426
|
-
/* @__PURE__ */
|
|
13524
|
+
/* @__PURE__ */ jsx110("span", { className: "ss-g-gxi-pos ss-g-gxi-pos--name", children: splitName(lineupEntry.name).last })
|
|
13427
13525
|
] }, `${pos.slot}-${c}`);
|
|
13428
13526
|
}
|
|
13429
|
-
return /* @__PURE__ */
|
|
13430
|
-
/* @__PURE__ */
|
|
13527
|
+
return /* @__PURE__ */ jsxs98("div", { className: "ss-g-gxi-node", "data-revealed": name ? "true" : void 0, children: [
|
|
13528
|
+
/* @__PURE__ */ jsx110(
|
|
13431
13529
|
"span",
|
|
13432
13530
|
{
|
|
13433
13531
|
className: "ss-g-gxi-disc",
|
|
@@ -13438,22 +13536,22 @@ function GuessTheXiGame({
|
|
|
13438
13536
|
children: flag
|
|
13439
13537
|
}
|
|
13440
13538
|
),
|
|
13441
|
-
name ? /* @__PURE__ */
|
|
13539
|
+
name ? /* @__PURE__ */ jsx110("span", { className: "ss-g-gxi-pos ss-g-gxi-pos--name", children: splitName(name).last }) : posLabel && /* @__PURE__ */ jsx110("span", { className: "ss-g-gxi-pos", children: posLabel })
|
|
13442
13540
|
] }, `${pos.slot}-${c}`);
|
|
13443
13541
|
}) }, r)) })
|
|
13444
13542
|
] }),
|
|
13445
|
-
!isOver && wrongGuesses.length > 0 && /* @__PURE__ */
|
|
13446
|
-
/* @__PURE__ */
|
|
13543
|
+
!isOver && wrongGuesses.length > 0 && /* @__PURE__ */ jsxs98("div", { className: "ss-g-gxi-wrong", children: [
|
|
13544
|
+
/* @__PURE__ */ jsx110("span", { className: "ss-g-gxi-wrong-l", children: t.notThem }),
|
|
13447
13545
|
wrongGuesses.map((g) => {
|
|
13448
13546
|
const crestUrl = config?.teamPool.find((tm) => tm.teamId === g.teamId)?.crestUrl;
|
|
13449
|
-
return /* @__PURE__ */
|
|
13450
|
-
/* @__PURE__ */
|
|
13451
|
-
/* @__PURE__ */
|
|
13547
|
+
return /* @__PURE__ */ jsxs98("span", { className: "ss-g-gxi-wrong-chip", children: [
|
|
13548
|
+
/* @__PURE__ */ jsx110(CrestShield, { src: crestUrl, name: teamName(g.teamId), size: 18 }),
|
|
13549
|
+
/* @__PURE__ */ jsx110("s", { children: teamName(g.teamId) })
|
|
13452
13550
|
] }, g.teamId);
|
|
13453
13551
|
})
|
|
13454
13552
|
] }),
|
|
13455
|
-
isOver && /* @__PURE__ */
|
|
13456
|
-
/* @__PURE__ */
|
|
13553
|
+
isOver && /* @__PURE__ */ jsxs98(Fragment31, { children: [
|
|
13554
|
+
/* @__PURE__ */ jsx110(
|
|
13457
13555
|
ResultCard,
|
|
13458
13556
|
{
|
|
13459
13557
|
tone: solved ? "win" : failed ? "lose" : "neutral",
|
|
@@ -13464,29 +13562,29 @@ function GuessTheXiGame({
|
|
|
13464
13562
|
ui
|
|
13465
13563
|
}
|
|
13466
13564
|
),
|
|
13467
|
-
(solved || failed) && clientState?.answer && /* @__PURE__ */
|
|
13468
|
-
/* @__PURE__ */
|
|
13469
|
-
/* @__PURE__ */
|
|
13470
|
-
/* @__PURE__ */
|
|
13565
|
+
(solved || failed) && clientState?.answer && /* @__PURE__ */ jsxs98("div", { className: "ss-g-gxi-answer", "data-testid": "gxi-answer-reveal", children: [
|
|
13566
|
+
/* @__PURE__ */ jsx110("span", { className: "ss-g-gxi-answer-label", children: t.theAnswer }),
|
|
13567
|
+
/* @__PURE__ */ jsx110(CrestShield, { src: clientState.answer.crestUrl, name: clientState.answer.teamName, size: 32 }),
|
|
13568
|
+
/* @__PURE__ */ jsx110("span", { className: "ss-g-gxi-answer-name", children: clientState.answer.teamName })
|
|
13471
13569
|
] })
|
|
13472
13570
|
] })
|
|
13473
13571
|
] }),
|
|
13474
|
-
!isOver && /* @__PURE__ */
|
|
13475
|
-
query.length > 0 && filtered.length > 0 && /* @__PURE__ */
|
|
13572
|
+
!isOver && /* @__PURE__ */ jsxs98(FooterBar, { children: [
|
|
13573
|
+
query.length > 0 && filtered.length > 0 && /* @__PURE__ */ jsx110(
|
|
13476
13574
|
OptionList,
|
|
13477
13575
|
{
|
|
13478
13576
|
label: t.optionsLabel,
|
|
13479
13577
|
options: filtered.map((tm) => ({
|
|
13480
13578
|
key: tm.teamId,
|
|
13481
|
-
content: /* @__PURE__ */
|
|
13482
|
-
/* @__PURE__ */
|
|
13483
|
-
/* @__PURE__ */
|
|
13579
|
+
content: /* @__PURE__ */ jsxs98(Fragment31, { children: [
|
|
13580
|
+
/* @__PURE__ */ jsx110(CrestShield, { src: tm.crestUrl, name: tm.teamName, size: 28 }),
|
|
13581
|
+
/* @__PURE__ */ jsx110("span", { children: tm.teamName })
|
|
13484
13582
|
] })
|
|
13485
13583
|
})),
|
|
13486
13584
|
onPick: (k) => handlePick(Number(k))
|
|
13487
13585
|
}
|
|
13488
13586
|
),
|
|
13489
|
-
/* @__PURE__ */
|
|
13587
|
+
/* @__PURE__ */ jsx110(
|
|
13490
13588
|
SearchField,
|
|
13491
13589
|
{
|
|
13492
13590
|
id: inputId,
|
|
@@ -13504,7 +13602,7 @@ function GuessTheXiGame({
|
|
|
13504
13602
|
|
|
13505
13603
|
// src/components/games/DailyQuizGame.tsx
|
|
13506
13604
|
import { useState as useState57 } from "react";
|
|
13507
|
-
import { Fragment as Fragment32, jsx as
|
|
13605
|
+
import { Fragment as Fragment32, jsx as jsx111, jsxs as jsxs99 } from "react/jsx-runtime";
|
|
13508
13606
|
function parseClientState6(json) {
|
|
13509
13607
|
if (!json) return null;
|
|
13510
13608
|
try {
|
|
@@ -13525,13 +13623,13 @@ function OptionName({ text }) {
|
|
|
13525
13623
|
const tokens = base.split(/\s+/).filter(Boolean);
|
|
13526
13624
|
const isPlainName = tokens.length >= 1 && tokens.length <= 4 && tokens.every((t) => NAME_TOKEN.test(t));
|
|
13527
13625
|
if (!isPlainName || base === "") {
|
|
13528
|
-
return /* @__PURE__ */
|
|
13626
|
+
return /* @__PURE__ */ jsx111("span", { className: "ss-g-dq-opt-name", children: /* @__PURE__ */ jsx111("span", { className: "ss-g-dq-opt-full", children: text }) });
|
|
13529
13627
|
}
|
|
13530
13628
|
const { first, last } = splitName(base);
|
|
13531
|
-
return /* @__PURE__ */
|
|
13532
|
-
first && /* @__PURE__ */
|
|
13533
|
-
/* @__PURE__ */
|
|
13534
|
-
suffix && /* @__PURE__ */
|
|
13629
|
+
return /* @__PURE__ */ jsxs99("span", { className: "ss-g-dq-opt-name", children: [
|
|
13630
|
+
first && /* @__PURE__ */ jsx111("span", { className: "ss-g-dq-opt-first", children: first }),
|
|
13631
|
+
/* @__PURE__ */ jsx111("span", { className: "ss-g-dq-opt-last", children: last }),
|
|
13632
|
+
suffix && /* @__PURE__ */ jsx111("span", { className: "ss-g-dq-opt-suffix", children: suffix })
|
|
13535
13633
|
] });
|
|
13536
13634
|
}
|
|
13537
13635
|
function DailyQuizGame({
|
|
@@ -13550,9 +13648,9 @@ function DailyQuizGame({
|
|
|
13550
13648
|
const results2 = clientState?.results ?? [];
|
|
13551
13649
|
const isRevealed = results2.length > 0 || result?.alreadyPlayed === true;
|
|
13552
13650
|
if (!config) {
|
|
13553
|
-
return /* @__PURE__ */
|
|
13554
|
-
/* @__PURE__ */
|
|
13555
|
-
/* @__PURE__ */
|
|
13651
|
+
return /* @__PURE__ */ jsxs99("div", { className: "ss-g-screen", "data-game": "daily-quiz", "data-testid": "game-screen-daily-quiz", children: [
|
|
13652
|
+
/* @__PURE__ */ jsx111(GameHeader, { title, onBack, backLabel: ui.back }),
|
|
13653
|
+
/* @__PURE__ */ jsx111("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
13556
13654
|
] });
|
|
13557
13655
|
}
|
|
13558
13656
|
const questions = config.questions;
|
|
@@ -13587,11 +13685,11 @@ function DailyQuizGame({
|
|
|
13587
13685
|
return r.isCorrect ? "correct" : "wrong";
|
|
13588
13686
|
});
|
|
13589
13687
|
const correctCount = results2.filter((r) => r.isCorrect).length;
|
|
13590
|
-
return /* @__PURE__ */
|
|
13591
|
-
/* @__PURE__ */
|
|
13592
|
-
/* @__PURE__ */
|
|
13593
|
-
/* @__PURE__ */
|
|
13594
|
-
/* @__PURE__ */
|
|
13688
|
+
return /* @__PURE__ */ jsxs99("div", { className: "ss-g-screen", "data-game": "daily-quiz", "data-testid": "game-screen-daily-quiz", children: [
|
|
13689
|
+
/* @__PURE__ */ jsx111(GameHeader, { title, eyebrow: s.results, onBack, backLabel: ui.back }),
|
|
13690
|
+
/* @__PURE__ */ jsx111(SegmentProgress, { segments: segments2, ariaLabel: s.results }),
|
|
13691
|
+
/* @__PURE__ */ jsxs99("div", { className: "ss-g-body", children: [
|
|
13692
|
+
/* @__PURE__ */ jsx111(
|
|
13595
13693
|
ResultCard,
|
|
13596
13694
|
{
|
|
13597
13695
|
tone: "neutral",
|
|
@@ -13604,15 +13702,15 @@ function DailyQuizGame({
|
|
|
13604
13702
|
questions.map((q) => {
|
|
13605
13703
|
const r = findResult(results2, q.index);
|
|
13606
13704
|
const picked = selections.get(q.index);
|
|
13607
|
-
return /* @__PURE__ */
|
|
13608
|
-
/* @__PURE__ */
|
|
13609
|
-
r && /* @__PURE__ */
|
|
13705
|
+
return /* @__PURE__ */ jsxs99("div", { className: "ss-g-dq-rq", children: [
|
|
13706
|
+
/* @__PURE__ */ jsx111("div", { className: "ss-g-dq-rq-stem", children: q.stem }),
|
|
13707
|
+
r && /* @__PURE__ */ jsx111("div", { className: "ss-g-dq-rq-opts", children: q.options.map((opt, optIdx) => {
|
|
13610
13708
|
let cls = "ss-g-dq-rq-opt";
|
|
13611
13709
|
if (optIdx === r.correctOptionIndex) cls += " ss-g-dq-rq-opt--correct";
|
|
13612
13710
|
else if (optIdx === picked && !r.isCorrect) cls += " ss-g-dq-rq-opt--wrong";
|
|
13613
|
-
return /* @__PURE__ */
|
|
13711
|
+
return /* @__PURE__ */ jsx111("span", { className: cls, children: opt }, optIdx);
|
|
13614
13712
|
}) }),
|
|
13615
|
-
r?.revealText && /* @__PURE__ */
|
|
13713
|
+
r?.revealText && /* @__PURE__ */ jsx111("div", { className: "ss-g-dq-why", children: r.revealText })
|
|
13616
13714
|
] }, q.index);
|
|
13617
13715
|
})
|
|
13618
13716
|
] })
|
|
@@ -13620,16 +13718,16 @@ function DailyQuizGame({
|
|
|
13620
13718
|
}
|
|
13621
13719
|
const segments = questions.map((_, i) => i < page ? "done" : i === page ? "current" : "todo");
|
|
13622
13720
|
const selectedIdx = current ? selections.get(current.index) : void 0;
|
|
13623
|
-
return /* @__PURE__ */
|
|
13624
|
-
/* @__PURE__ */
|
|
13625
|
-
/* @__PURE__ */
|
|
13626
|
-
/* @__PURE__ */
|
|
13627
|
-
/* @__PURE__ */
|
|
13628
|
-
/* @__PURE__ */
|
|
13721
|
+
return /* @__PURE__ */ jsxs99("div", { className: "ss-g-screen", "data-game": "daily-quiz", "data-testid": "game-screen-daily-quiz", children: [
|
|
13722
|
+
/* @__PURE__ */ jsx111(GameHeader, { title, eyebrow: s.questionOf(page + 1, total), onBack, backLabel: ui.back }),
|
|
13723
|
+
/* @__PURE__ */ jsx111(SegmentProgress, { segments, ariaLabel: s.progressAria(page + 1, total) }),
|
|
13724
|
+
/* @__PURE__ */ jsx111("div", { className: "ss-g-body", children: current && /* @__PURE__ */ jsxs99(Fragment32, { children: [
|
|
13725
|
+
/* @__PURE__ */ jsx111("h3", { className: "ss-g-dq-stem", children: current.stem }),
|
|
13726
|
+
/* @__PURE__ */ jsx111("div", { className: "ss-g-dq-opts", children: current.options.map((opt, optIdx) => {
|
|
13629
13727
|
const selected = optIdx === selectedIdx;
|
|
13630
13728
|
const imagePath = current.optionImagePaths?.[optIdx] ?? void 0;
|
|
13631
13729
|
const playerName = opt;
|
|
13632
|
-
return /* @__PURE__ */
|
|
13730
|
+
return /* @__PURE__ */ jsxs99(
|
|
13633
13731
|
"button",
|
|
13634
13732
|
{
|
|
13635
13733
|
type: "button",
|
|
@@ -13638,25 +13736,25 @@ function DailyQuizGame({
|
|
|
13638
13736
|
disabled: submitting,
|
|
13639
13737
|
onClick: () => handleSelect(current.index, optIdx),
|
|
13640
13738
|
children: [
|
|
13641
|
-
current.optionImagePaths && /* @__PURE__ */
|
|
13642
|
-
/* @__PURE__ */
|
|
13643
|
-
/* @__PURE__ */
|
|
13739
|
+
current.optionImagePaths && /* @__PURE__ */ jsx111(PlayerAvatar, { name: playerName, imagePath, className: "ss-g-dq-opt-av" }),
|
|
13740
|
+
/* @__PURE__ */ jsx111("span", { className: "ss-g-dq-badge", "aria-hidden": "true", children: selected ? /* @__PURE__ */ jsx111(IconCheck, {}) : String.fromCharCode(65 + optIdx) }),
|
|
13741
|
+
/* @__PURE__ */ jsx111(OptionName, { text: opt })
|
|
13644
13742
|
]
|
|
13645
13743
|
},
|
|
13646
13744
|
optIdx
|
|
13647
13745
|
);
|
|
13648
13746
|
}) })
|
|
13649
13747
|
] }) }),
|
|
13650
|
-
/* @__PURE__ */
|
|
13651
|
-
page > 0 && /* @__PURE__ */
|
|
13652
|
-
isLast ? /* @__PURE__ */
|
|
13748
|
+
/* @__PURE__ */ jsx111(FooterBar, { children: /* @__PURE__ */ jsxs99("div", { className: "ss-g-dq-nav", children: [
|
|
13749
|
+
page > 0 && /* @__PURE__ */ jsx111(GameButton, { variant: "outline", onClick: goPrev, disabled: submitting, children: s.previous }),
|
|
13750
|
+
isLast ? /* @__PURE__ */ jsx111(GameButton, { variant: "primary", block: true, onClick: handleSubmit, disabled: !currentAnswered || !allAnswered || submitting, children: submitting ? s.submitting : s.submit }) : /* @__PURE__ */ jsx111(GameButton, { variant: "primary", block: true, onClick: goNext, disabled: !currentAnswered || submitting, children: s.next })
|
|
13653
13751
|
] }) })
|
|
13654
13752
|
] });
|
|
13655
13753
|
}
|
|
13656
13754
|
|
|
13657
13755
|
// src/components/games/MatchdayPredictorGame.tsx
|
|
13658
13756
|
import { useId as useId7, useState as useState58 } from "react";
|
|
13659
|
-
import { jsx as
|
|
13757
|
+
import { jsx as jsx112, jsxs as jsxs100 } from "react/jsx-runtime";
|
|
13660
13758
|
var SCORER_SEARCH_THRESHOLD = 9;
|
|
13661
13759
|
function parseClientState7(json) {
|
|
13662
13760
|
if (!json) return null;
|
|
@@ -13674,7 +13772,7 @@ function isLocked(kickoffUtc) {
|
|
|
13674
13772
|
}
|
|
13675
13773
|
}
|
|
13676
13774
|
function IconMinus() {
|
|
13677
|
-
return /* @__PURE__ */
|
|
13775
|
+
return /* @__PURE__ */ jsx112(
|
|
13678
13776
|
"svg",
|
|
13679
13777
|
{
|
|
13680
13778
|
width: 18,
|
|
@@ -13685,20 +13783,20 @@ function IconMinus() {
|
|
|
13685
13783
|
strokeWidth: 2.2,
|
|
13686
13784
|
strokeLinecap: "round",
|
|
13687
13785
|
"aria-hidden": "true",
|
|
13688
|
-
children: /* @__PURE__ */
|
|
13786
|
+
children: /* @__PURE__ */ jsx112("path", { d: "M5 12h14" })
|
|
13689
13787
|
}
|
|
13690
13788
|
);
|
|
13691
13789
|
}
|
|
13692
13790
|
function TeamBadge({ team, label }) {
|
|
13693
|
-
return /* @__PURE__ */
|
|
13694
|
-
/* @__PURE__ */
|
|
13695
|
-
/* @__PURE__ */
|
|
13696
|
-
/* @__PURE__ */
|
|
13791
|
+
return /* @__PURE__ */ jsxs100("div", { className: "ss-g-mp-team", children: [
|
|
13792
|
+
/* @__PURE__ */ jsx112(CrestShield, { name: team.name, size: 44 }),
|
|
13793
|
+
/* @__PURE__ */ jsx112("span", { className: "ss-g-mp-team-name", children: team.name }),
|
|
13794
|
+
/* @__PURE__ */ jsx112("span", { className: "ss-g-mp-team-side", children: label })
|
|
13697
13795
|
] });
|
|
13698
13796
|
}
|
|
13699
13797
|
function ScoreCard({ home, away, h, a, t, edit }) {
|
|
13700
|
-
const col = (side, team, value) => /* @__PURE__ */
|
|
13701
|
-
edit && /* @__PURE__ */
|
|
13798
|
+
const col = (side, team, value) => /* @__PURE__ */ jsxs100("div", { className: "ss-g-mp-col", children: [
|
|
13799
|
+
edit && /* @__PURE__ */ jsx112(
|
|
13702
13800
|
"button",
|
|
13703
13801
|
{
|
|
13704
13802
|
type: "button",
|
|
@@ -13706,11 +13804,11 @@ function ScoreCard({ home, away, h, a, t, edit }) {
|
|
|
13706
13804
|
"aria-label": t.goalsUp(team.name),
|
|
13707
13805
|
disabled: edit.disabled,
|
|
13708
13806
|
onClick: () => edit.onStep(side, 1),
|
|
13709
|
-
children: /* @__PURE__ */
|
|
13807
|
+
children: /* @__PURE__ */ jsx112(IconPlus, { size: 18 })
|
|
13710
13808
|
}
|
|
13711
13809
|
),
|
|
13712
|
-
/* @__PURE__ */
|
|
13713
|
-
edit && /* @__PURE__ */
|
|
13810
|
+
/* @__PURE__ */ jsx112("span", { className: "ss-g-mp-digit", "data-testid": "mp-digit", "data-active": edit ? String(edit.active === side) : "false", children: value }),
|
|
13811
|
+
edit && /* @__PURE__ */ jsx112(
|
|
13714
13812
|
"button",
|
|
13715
13813
|
{
|
|
13716
13814
|
type: "button",
|
|
@@ -13718,27 +13816,27 @@ function ScoreCard({ home, away, h, a, t, edit }) {
|
|
|
13718
13816
|
"aria-label": t.goalsDown(team.name),
|
|
13719
13817
|
disabled: edit.disabled || value <= 0,
|
|
13720
13818
|
onClick: () => edit.onStep(side, -1),
|
|
13721
|
-
children: /* @__PURE__ */
|
|
13819
|
+
children: /* @__PURE__ */ jsx112(IconMinus, {})
|
|
13722
13820
|
}
|
|
13723
13821
|
)
|
|
13724
13822
|
] });
|
|
13725
|
-
return /* @__PURE__ */
|
|
13726
|
-
/* @__PURE__ */
|
|
13727
|
-
/* @__PURE__ */
|
|
13823
|
+
return /* @__PURE__ */ jsxs100("div", { className: "ss-g-mp-card", children: [
|
|
13824
|
+
/* @__PURE__ */ jsx112(TeamBadge, { team: home, label: t.home }),
|
|
13825
|
+
/* @__PURE__ */ jsxs100("div", { className: "ss-g-mp-scores", children: [
|
|
13728
13826
|
col("home", home, h),
|
|
13729
|
-
/* @__PURE__ */
|
|
13827
|
+
/* @__PURE__ */ jsx112("span", { className: "ss-g-mp-dash", "aria-hidden": "true", children: "\u2013" }),
|
|
13730
13828
|
col("away", away, a)
|
|
13731
13829
|
] }),
|
|
13732
|
-
/* @__PURE__ */
|
|
13830
|
+
/* @__PURE__ */ jsx112(TeamBadge, { team: away, label: t.away })
|
|
13733
13831
|
] });
|
|
13734
13832
|
}
|
|
13735
13833
|
function OutcomeRow({ label, ok, detail, t }) {
|
|
13736
|
-
return /* @__PURE__ */
|
|
13737
|
-
/* @__PURE__ */
|
|
13738
|
-
/* @__PURE__ */
|
|
13739
|
-
ok ? /* @__PURE__ */
|
|
13740
|
-
/* @__PURE__ */
|
|
13741
|
-
detail ? /* @__PURE__ */
|
|
13834
|
+
return /* @__PURE__ */ jsxs100("li", { className: "ss-g-mp-row", "data-testid": "mp-row", "data-ok": String(ok), children: [
|
|
13835
|
+
/* @__PURE__ */ jsx112("span", { className: "ss-g-mp-row-k", children: label }),
|
|
13836
|
+
/* @__PURE__ */ jsxs100("span", { className: "ss-g-mp-row-v", children: [
|
|
13837
|
+
ok ? /* @__PURE__ */ jsx112(IconCheck, {}) : /* @__PURE__ */ jsx112(IconClose, { size: 14 }),
|
|
13838
|
+
/* @__PURE__ */ jsx112("span", { className: "ss-g-sr", children: ok ? t.correct : t.incorrect }),
|
|
13839
|
+
detail ? /* @__PURE__ */ jsx112("span", { className: "ss-g-mp-row-d", children: detail }) : null
|
|
13742
13840
|
] })
|
|
13743
13841
|
] });
|
|
13744
13842
|
}
|
|
@@ -13759,12 +13857,12 @@ function MatchdayPredictorGame({
|
|
|
13759
13857
|
const searchId = useId7();
|
|
13760
13858
|
const clientState = parseClientState7(result?.clientStateJson);
|
|
13761
13859
|
const alreadyPlayed = result?.alreadyPlayed === true;
|
|
13762
|
-
const header = /* @__PURE__ */
|
|
13860
|
+
const header = /* @__PURE__ */ jsx112(
|
|
13763
13861
|
GameHeader,
|
|
13764
13862
|
{
|
|
13765
13863
|
title: gameTitle({ gameId: "matchday-predictor" }, ui.games.titles),
|
|
13766
13864
|
eyebrow: config ? t.eyebrow(config.homeTeam.name, config.awayTeam.name) : void 0,
|
|
13767
|
-
right: config ? /* @__PURE__ */
|
|
13865
|
+
right: config ? /* @__PURE__ */ jsx112(Chip, { icon: /* @__PURE__ */ jsx112(IconLock, {}), children: ui.games.formatDayTime(config.kickoffUtc) }) : void 0,
|
|
13768
13866
|
onBack,
|
|
13769
13867
|
backLabel: ui.back
|
|
13770
13868
|
}
|
|
@@ -13772,10 +13870,10 @@ function MatchdayPredictorGame({
|
|
|
13772
13870
|
if (alreadyPlayed && clientState) {
|
|
13773
13871
|
if (!clientState.graded) {
|
|
13774
13872
|
const scorer = config?.scorerPool.find((p) => p.playerId === clientState.predictedFirstScorerPlayerId) ?? null;
|
|
13775
|
-
return /* @__PURE__ */
|
|
13873
|
+
return /* @__PURE__ */ jsxs100("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
|
|
13776
13874
|
header,
|
|
13777
|
-
/* @__PURE__ */
|
|
13778
|
-
config && /* @__PURE__ */
|
|
13875
|
+
/* @__PURE__ */ jsxs100("div", { className: "ss-g-body", children: [
|
|
13876
|
+
config && /* @__PURE__ */ jsx112(
|
|
13779
13877
|
ScoreCard,
|
|
13780
13878
|
{
|
|
13781
13879
|
home: config.homeTeam,
|
|
@@ -13785,7 +13883,7 @@ function MatchdayPredictorGame({
|
|
|
13785
13883
|
t
|
|
13786
13884
|
}
|
|
13787
13885
|
),
|
|
13788
|
-
/* @__PURE__ */
|
|
13886
|
+
/* @__PURE__ */ jsx112(
|
|
13789
13887
|
ResultCard,
|
|
13790
13888
|
{
|
|
13791
13889
|
tone: "neutral",
|
|
@@ -13802,28 +13900,28 @@ function MatchdayPredictorGame({
|
|
|
13802
13900
|
}
|
|
13803
13901
|
)
|
|
13804
13902
|
] }),
|
|
13805
|
-
/* @__PURE__ */
|
|
13903
|
+
/* @__PURE__ */ jsx112(FooterBar, { children: /* @__PURE__ */ jsx112("p", { className: "ss-g-mp-fun", children: t.forFun }) })
|
|
13806
13904
|
] });
|
|
13807
13905
|
}
|
|
13808
13906
|
const r = clientState.result;
|
|
13809
|
-
return /* @__PURE__ */
|
|
13907
|
+
return /* @__PURE__ */ jsxs100("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
|
|
13810
13908
|
header,
|
|
13811
|
-
/* @__PURE__ */
|
|
13812
|
-
config && /* @__PURE__ */
|
|
13813
|
-
/* @__PURE__ */
|
|
13814
|
-
/* @__PURE__ */
|
|
13815
|
-
/* @__PURE__ */
|
|
13816
|
-
/* @__PURE__ */
|
|
13817
|
-
!clientState.firstScorerVoid && /* @__PURE__ */
|
|
13909
|
+
/* @__PURE__ */ jsxs100("div", { className: "ss-g-body", children: [
|
|
13910
|
+
config && /* @__PURE__ */ jsx112(ScoreCard, { home: config.homeTeam, away: config.awayTeam, h: r.homeScore, a: r.awayScore, t }),
|
|
13911
|
+
/* @__PURE__ */ jsx112(ResultCard, { tone: "neutral", title: t.fullTime(r.homeScore, r.awayScore), onBack, ui }),
|
|
13912
|
+
/* @__PURE__ */ jsxs100("ul", { className: "ss-g-mp-rows", children: [
|
|
13913
|
+
/* @__PURE__ */ jsx112(OutcomeRow, { label: t.exactScore, ok: clientState.exactScoreCorrect, t }),
|
|
13914
|
+
/* @__PURE__ */ jsx112(OutcomeRow, { label: t.outcome, ok: clientState.outcomeCorrect, t }),
|
|
13915
|
+
!clientState.firstScorerVoid && /* @__PURE__ */ jsx112(OutcomeRow, { label: t.firstScorerRow, ok: clientState.firstScorerCorrect, detail: r.firstScorerName, t })
|
|
13818
13916
|
] })
|
|
13819
13917
|
] }),
|
|
13820
|
-
/* @__PURE__ */
|
|
13918
|
+
/* @__PURE__ */ jsx112(FooterBar, { children: /* @__PURE__ */ jsx112("p", { className: "ss-g-mp-fun", children: t.forFun }) })
|
|
13821
13919
|
] });
|
|
13822
13920
|
}
|
|
13823
13921
|
if (!config) {
|
|
13824
|
-
return /* @__PURE__ */
|
|
13922
|
+
return /* @__PURE__ */ jsxs100("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
|
|
13825
13923
|
header,
|
|
13826
|
-
/* @__PURE__ */
|
|
13924
|
+
/* @__PURE__ */ jsx112("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
13827
13925
|
] });
|
|
13828
13926
|
}
|
|
13829
13927
|
const locked = isLocked(config.kickoffUtc);
|
|
@@ -13847,10 +13945,10 @@ function MatchdayPredictorGame({
|
|
|
13847
13945
|
const showSearch = pool.length > SCORER_SEARCH_THRESHOLD;
|
|
13848
13946
|
const q = query.trim().toLowerCase();
|
|
13849
13947
|
const visible = showSearch && q ? pool.filter((p) => p.playerName.toLowerCase().includes(q)) : pool;
|
|
13850
|
-
return /* @__PURE__ */
|
|
13948
|
+
return /* @__PURE__ */ jsxs100("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
|
|
13851
13949
|
header,
|
|
13852
|
-
/* @__PURE__ */
|
|
13853
|
-
/* @__PURE__ */
|
|
13950
|
+
/* @__PURE__ */ jsxs100("div", { className: "ss-g-body", children: [
|
|
13951
|
+
/* @__PURE__ */ jsx112(
|
|
13854
13952
|
ScoreCard,
|
|
13855
13953
|
{
|
|
13856
13954
|
home: config.homeTeam,
|
|
@@ -13861,12 +13959,12 @@ function MatchdayPredictorGame({
|
|
|
13861
13959
|
edit: { disabled, active: lastEdited, onStep: step }
|
|
13862
13960
|
}
|
|
13863
13961
|
),
|
|
13864
|
-
pool.length > 0 && /* @__PURE__ */
|
|
13865
|
-
/* @__PURE__ */
|
|
13866
|
-
/* @__PURE__ */
|
|
13867
|
-
/* @__PURE__ */
|
|
13962
|
+
pool.length > 0 && /* @__PURE__ */ jsxs100("section", { className: "ss-g-mp-scorer", children: [
|
|
13963
|
+
/* @__PURE__ */ jsxs100("div", { className: "ss-g-mp-sec-head", children: [
|
|
13964
|
+
/* @__PURE__ */ jsx112("h3", { children: t.firstScorer }),
|
|
13965
|
+
/* @__PURE__ */ jsx112("span", { children: t.optional })
|
|
13868
13966
|
] }),
|
|
13869
|
-
showSearch && /* @__PURE__ */
|
|
13967
|
+
showSearch && /* @__PURE__ */ jsx112(
|
|
13870
13968
|
SearchField,
|
|
13871
13969
|
{
|
|
13872
13970
|
id: searchId,
|
|
@@ -13878,9 +13976,9 @@ function MatchdayPredictorGame({
|
|
|
13878
13976
|
disabled
|
|
13879
13977
|
}
|
|
13880
13978
|
),
|
|
13881
|
-
/* @__PURE__ */
|
|
13979
|
+
/* @__PURE__ */ jsx112("div", { className: "ss-g-mp-grid", children: visible.map((p) => {
|
|
13882
13980
|
const selected = firstScorerPlayerId === p.playerId;
|
|
13883
|
-
return /* @__PURE__ */
|
|
13981
|
+
return /* @__PURE__ */ jsxs100(
|
|
13884
13982
|
"button",
|
|
13885
13983
|
{
|
|
13886
13984
|
type: "button",
|
|
@@ -13890,15 +13988,15 @@ function MatchdayPredictorGame({
|
|
|
13890
13988
|
disabled,
|
|
13891
13989
|
onClick: () => setFirstScorerPlayerId((id) => id === p.playerId ? null : p.playerId),
|
|
13892
13990
|
children: [
|
|
13893
|
-
selected && /* @__PURE__ */
|
|
13894
|
-
/* @__PURE__ */
|
|
13895
|
-
/* @__PURE__ */
|
|
13991
|
+
selected && /* @__PURE__ */ jsx112("span", { className: "ss-g-mp-pcheck", children: /* @__PURE__ */ jsx112(IconCheck, { size: 12 }) }),
|
|
13992
|
+
/* @__PURE__ */ jsx112(Silhouette, { size: 52, variant: selected ? "selected" : "default" }),
|
|
13993
|
+
/* @__PURE__ */ jsx112("span", { className: "ss-g-mp-pname", children: splitName(p.playerName).last })
|
|
13896
13994
|
]
|
|
13897
13995
|
},
|
|
13898
13996
|
p.playerId
|
|
13899
13997
|
);
|
|
13900
13998
|
}) }),
|
|
13901
|
-
/* @__PURE__ */
|
|
13999
|
+
/* @__PURE__ */ jsxs100(
|
|
13902
14000
|
"button",
|
|
13903
14001
|
{
|
|
13904
14002
|
type: "button",
|
|
@@ -13907,24 +14005,24 @@ function MatchdayPredictorGame({
|
|
|
13907
14005
|
disabled,
|
|
13908
14006
|
onClick: () => setFirstScorerPlayerId(null),
|
|
13909
14007
|
children: [
|
|
13910
|
-
/* @__PURE__ */
|
|
14008
|
+
/* @__PURE__ */ jsx112("span", { className: "ss-g-mp-radio", "aria-hidden": "true" }),
|
|
13911
14009
|
t.noScorer
|
|
13912
14010
|
]
|
|
13913
14011
|
}
|
|
13914
14012
|
)
|
|
13915
14013
|
] }),
|
|
13916
|
-
locked && /* @__PURE__ */
|
|
14014
|
+
locked && /* @__PURE__ */ jsx112("p", { className: "ss-g-mp-closed", children: t.closed })
|
|
13917
14015
|
] }),
|
|
13918
|
-
/* @__PURE__ */
|
|
13919
|
-
/* @__PURE__ */
|
|
13920
|
-
/* @__PURE__ */
|
|
14016
|
+
/* @__PURE__ */ jsxs100(FooterBar, { children: [
|
|
14017
|
+
/* @__PURE__ */ jsx112(GameButton, { variant: "primary", block: true, disabled, onClick: handleSubmit, children: submitting ? t.saving : t.save }),
|
|
14018
|
+
/* @__PURE__ */ jsx112("p", { className: "ss-g-mp-fun", children: t.forFun })
|
|
13921
14019
|
] })
|
|
13922
14020
|
] });
|
|
13923
14021
|
}
|
|
13924
14022
|
|
|
13925
14023
|
// src/components/games/StartingXiGame.tsx
|
|
13926
14024
|
import { useId as useId8, useState as useState59 } from "react";
|
|
13927
|
-
import { Fragment as Fragment33, jsx as
|
|
14025
|
+
import { Fragment as Fragment33, jsx as jsx113, jsxs as jsxs101 } from "react/jsx-runtime";
|
|
13928
14026
|
var POINTS_PER_STARTER = 8;
|
|
13929
14027
|
var XI_SIZE = 11;
|
|
13930
14028
|
var DEFAULT_FORMATION = "4-3-3";
|
|
@@ -13973,20 +14071,20 @@ function StartingXiGame({
|
|
|
13973
14071
|
const searchId = useId8();
|
|
13974
14072
|
const clientState = parseClientState8(result?.clientStateJson);
|
|
13975
14073
|
const alreadyPlayed = result?.alreadyPlayed === true;
|
|
13976
|
-
const header = /* @__PURE__ */
|
|
14074
|
+
const header = /* @__PURE__ */ jsx113(
|
|
13977
14075
|
GameHeader,
|
|
13978
14076
|
{
|
|
13979
14077
|
title: gameTitle({ gameId: "starting-xi" }, ui.games.titles),
|
|
13980
14078
|
eyebrow: t.eyebrow,
|
|
13981
|
-
right: /* @__PURE__ */
|
|
14079
|
+
right: /* @__PURE__ */ jsx113(Chip, { variant: "accent", children: t.perStarter(POINTS_PER_STARTER) }),
|
|
13982
14080
|
onBack,
|
|
13983
14081
|
backLabel: ui.back
|
|
13984
14082
|
}
|
|
13985
14083
|
);
|
|
13986
14084
|
function statusScreen(title, score) {
|
|
13987
|
-
return /* @__PURE__ */
|
|
14085
|
+
return /* @__PURE__ */ jsxs101("div", { className: "ss-g-screen", "data-game": "starting-xi", "data-testid": "game-screen-starting-xi", children: [
|
|
13988
14086
|
header,
|
|
13989
|
-
/* @__PURE__ */
|
|
14087
|
+
/* @__PURE__ */ jsx113("div", { className: "ss-g-body", children: /* @__PURE__ */ jsx113(ResultCard, { tone: "neutral", title, score, onBack, ui }) })
|
|
13990
14088
|
] });
|
|
13991
14089
|
}
|
|
13992
14090
|
if (alreadyPlayed) {
|
|
@@ -13995,9 +14093,9 @@ function StartingXiGame({
|
|
|
13995
14093
|
if (clientState.status === "graded") return statusScreen(t.gradedLine(clientState.correctCount), clientState.score);
|
|
13996
14094
|
}
|
|
13997
14095
|
if (!config) {
|
|
13998
|
-
return /* @__PURE__ */
|
|
14096
|
+
return /* @__PURE__ */ jsxs101("div", { className: "ss-g-screen", "data-game": "starting-xi", "data-testid": "game-screen-starting-xi", children: [
|
|
13999
14097
|
header,
|
|
14000
|
-
/* @__PURE__ */
|
|
14098
|
+
/* @__PURE__ */ jsx113("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
14001
14099
|
] });
|
|
14002
14100
|
}
|
|
14003
14101
|
const { formation, slots } = formationSlots(config.formation);
|
|
@@ -14032,27 +14130,27 @@ function StartingXiGame({
|
|
|
14032
14130
|
onSubmit(JSON.stringify({ predictedPlayerIds: slotPlayers }));
|
|
14033
14131
|
}
|
|
14034
14132
|
const segments = slotPlayers.map((p) => p !== null ? "current" : "todo");
|
|
14035
|
-
return /* @__PURE__ */
|
|
14133
|
+
return /* @__PURE__ */ jsxs101("div", { className: "ss-g-screen", "data-game": "starting-xi", "data-testid": "game-screen-starting-xi", children: [
|
|
14036
14134
|
header,
|
|
14037
|
-
/* @__PURE__ */
|
|
14135
|
+
/* @__PURE__ */ jsx113(
|
|
14038
14136
|
SegmentProgress,
|
|
14039
14137
|
{
|
|
14040
14138
|
segments,
|
|
14041
14139
|
ariaLabel: t.picked(pickedCount),
|
|
14042
14140
|
leftLabel: t.picked(pickedCount),
|
|
14043
14141
|
rightLabel: t.toGo(XI_SIZE - pickedCount),
|
|
14044
|
-
right: /* @__PURE__ */
|
|
14142
|
+
right: /* @__PURE__ */ jsx113(Chip, { children: formation })
|
|
14045
14143
|
}
|
|
14046
14144
|
),
|
|
14047
|
-
/* @__PURE__ */
|
|
14048
|
-
/* @__PURE__ */
|
|
14049
|
-
/* @__PURE__ */
|
|
14145
|
+
/* @__PURE__ */ jsxs101("div", { className: "ss-g-body", children: [
|
|
14146
|
+
/* @__PURE__ */ jsxs101("div", { className: "ss-g-xi-pitch", children: [
|
|
14147
|
+
/* @__PURE__ */ jsx113(PitchSvg, { variant: "half" }),
|
|
14050
14148
|
slots.map((s) => {
|
|
14051
14149
|
const playerId = slotPlayers[s.index] ?? null;
|
|
14052
14150
|
const player = playerId !== null ? byId.get(playerId) ?? null : null;
|
|
14053
14151
|
const name = player?.playerName ?? "";
|
|
14054
14152
|
const state = player ? "filled" : active === s.index ? "active" : "empty";
|
|
14055
|
-
return /* @__PURE__ */
|
|
14153
|
+
return /* @__PURE__ */ jsxs101(
|
|
14056
14154
|
"button",
|
|
14057
14155
|
{
|
|
14058
14156
|
type: "button",
|
|
@@ -14064,21 +14162,21 @@ function StartingXiGame({
|
|
|
14064
14162
|
disabled: submitting,
|
|
14065
14163
|
onClick: () => tapSlot(s.index),
|
|
14066
14164
|
children: [
|
|
14067
|
-
/* @__PURE__ */
|
|
14068
|
-
/* @__PURE__ */
|
|
14165
|
+
/* @__PURE__ */ jsx113("span", { className: "ss-g-xi-ring", "aria-hidden": "true", children: player ? player.jerseyNumber ?? "" : /* @__PURE__ */ jsx113(IconPlus, { size: 18 }) }),
|
|
14166
|
+
/* @__PURE__ */ jsx113("span", { className: "ss-g-xi-tag", "aria-hidden": "true", children: player ? splitName(name).last : s.label })
|
|
14069
14167
|
]
|
|
14070
14168
|
},
|
|
14071
14169
|
s.index
|
|
14072
14170
|
);
|
|
14073
14171
|
})
|
|
14074
14172
|
] }),
|
|
14075
|
-
/* @__PURE__ */
|
|
14076
|
-
/* @__PURE__ */
|
|
14077
|
-
/* @__PURE__ */
|
|
14078
|
-
/* @__PURE__ */
|
|
14079
|
-
] }) : /* @__PURE__ */
|
|
14080
|
-
activeSlot && /* @__PURE__ */
|
|
14081
|
-
/* @__PURE__ */
|
|
14173
|
+
/* @__PURE__ */ jsxs101("div", { className: "ss-g-xi-picker", children: [
|
|
14174
|
+
/* @__PURE__ */ jsx113("div", { className: "ss-g-xi-picker-head", children: activeSlot ? /* @__PURE__ */ jsxs101(Fragment33, { children: [
|
|
14175
|
+
/* @__PURE__ */ jsx113(Chip, { variant: "badge", children: activeSlot.label }),
|
|
14176
|
+
/* @__PURE__ */ jsx113("strong", { children: t.pickFor(activeSlot.label) })
|
|
14177
|
+
] }) : /* @__PURE__ */ jsx113("strong", { children: t.allPicked }) }),
|
|
14178
|
+
activeSlot && /* @__PURE__ */ jsxs101(Fragment33, { children: [
|
|
14179
|
+
/* @__PURE__ */ jsx113(
|
|
14082
14180
|
SearchField,
|
|
14083
14181
|
{
|
|
14084
14182
|
id: searchId,
|
|
@@ -14090,18 +14188,18 @@ function StartingXiGame({
|
|
|
14090
14188
|
disabled: submitting
|
|
14091
14189
|
}
|
|
14092
14190
|
),
|
|
14093
|
-
/* @__PURE__ */
|
|
14094
|
-
/* @__PURE__ */
|
|
14095
|
-
/* @__PURE__ */
|
|
14096
|
-
/* @__PURE__ */
|
|
14191
|
+
/* @__PURE__ */ jsx113("ul", { className: "ss-g-xi-list", children: available.map((p) => /* @__PURE__ */ jsx113("li", { children: /* @__PURE__ */ jsxs101("button", { type: "button", className: "ss-g-xi-opt", disabled: submitting, onClick: () => pick(p.playerId), children: [
|
|
14192
|
+
/* @__PURE__ */ jsx113("span", { className: "ss-g-xi-opt-no", "aria-hidden": "true", children: p.jerseyNumber ?? "" }),
|
|
14193
|
+
/* @__PURE__ */ jsx113("span", { className: "ss-g-xi-opt-name", children: p.playerName }),
|
|
14194
|
+
/* @__PURE__ */ jsx113("span", { className: "ss-g-xi-opt-pos", children: p.positionName })
|
|
14097
14195
|
] }) }, p.playerId)) })
|
|
14098
14196
|
] })
|
|
14099
14197
|
] })
|
|
14100
14198
|
] }),
|
|
14101
|
-
/* @__PURE__ */
|
|
14102
|
-
/* @__PURE__ */
|
|
14103
|
-
/* @__PURE__ */
|
|
14104
|
-
/* @__PURE__ */
|
|
14199
|
+
/* @__PURE__ */ jsxs101(FooterBar, { children: [
|
|
14200
|
+
/* @__PURE__ */ jsx113(GameButton, { variant: "primary", block: true, disabled: !canSubmit, onClick: handleSubmit, children: submitting ? t.submitting : t.submit }),
|
|
14201
|
+
/* @__PURE__ */ jsxs101("p", { className: "ss-g-xi-lock", children: [
|
|
14202
|
+
/* @__PURE__ */ jsx113(IconLock, {}),
|
|
14105
14203
|
lockAtUtc ? t.locksAt(ui.games.formatDayTime(lockAtUtc)) : t.locksSoon
|
|
14106
14204
|
] })
|
|
14107
14205
|
] })
|
|
@@ -14110,7 +14208,7 @@ function StartingXiGame({
|
|
|
14110
14208
|
|
|
14111
14209
|
// src/components/games/StatLadderGame.tsx
|
|
14112
14210
|
import { useId as useId9, useState as useState60 } from "react";
|
|
14113
|
-
import { jsx as
|
|
14211
|
+
import { jsx as jsx114, jsxs as jsxs102 } from "react/jsx-runtime";
|
|
14114
14212
|
function ladderClue(ladder) {
|
|
14115
14213
|
const mystery = ladder.find((r) => r.rank === 2);
|
|
14116
14214
|
if (!mystery) return null;
|
|
@@ -14132,9 +14230,9 @@ function parseClientState9(json) {
|
|
|
14132
14230
|
}
|
|
14133
14231
|
function NameStack({ name }) {
|
|
14134
14232
|
const { first, last } = splitName(name);
|
|
14135
|
-
return /* @__PURE__ */
|
|
14136
|
-
first && /* @__PURE__ */
|
|
14137
|
-
/* @__PURE__ */
|
|
14233
|
+
return /* @__PURE__ */ jsxs102("span", { className: "ss-g-sl-name", children: [
|
|
14234
|
+
first && /* @__PURE__ */ jsx114("small", { children: `${first[0]}.` }),
|
|
14235
|
+
/* @__PURE__ */ jsx114("b", { children: last })
|
|
14138
14236
|
] });
|
|
14139
14237
|
}
|
|
14140
14238
|
function StatLadderGame({
|
|
@@ -14151,11 +14249,11 @@ function StatLadderGame({
|
|
|
14151
14249
|
const searchId = useId9();
|
|
14152
14250
|
const clientState = parseClientState9(result?.clientStateJson);
|
|
14153
14251
|
const revealed = clientState != null;
|
|
14154
|
-
const header = /* @__PURE__ */
|
|
14252
|
+
const header = /* @__PURE__ */ jsx114(GameHeader, { title: gameTitle({ gameId: "stat-ladder" }, ui.games.titles), eyebrow: t.eyebrow, onBack, backLabel: ui.back });
|
|
14155
14253
|
if (!config) {
|
|
14156
|
-
return /* @__PURE__ */
|
|
14254
|
+
return /* @__PURE__ */ jsxs102("div", { className: "ss-g-screen", "data-game": "stat-ladder", "data-testid": "game-screen-stat-ladder", children: [
|
|
14157
14255
|
header,
|
|
14158
|
-
/* @__PURE__ */
|
|
14256
|
+
/* @__PURE__ */ jsx114("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
14159
14257
|
] });
|
|
14160
14258
|
}
|
|
14161
14259
|
const question = t.question(config.statLabel);
|
|
@@ -14167,45 +14265,45 @@ function StatLadderGame({
|
|
|
14167
14265
|
if (selectedId === null || submitting || revealed) return;
|
|
14168
14266
|
onSubmit(JSON.stringify({ guessedPlayerId: selectedId }));
|
|
14169
14267
|
}
|
|
14170
|
-
return /* @__PURE__ */
|
|
14268
|
+
return /* @__PURE__ */ jsxs102("div", { className: "ss-g-screen", "data-game": "stat-ladder", "data-testid": "game-screen-stat-ladder", children: [
|
|
14171
14269
|
header,
|
|
14172
|
-
/* @__PURE__ */
|
|
14173
|
-
!revealed && /* @__PURE__ */
|
|
14174
|
-
/* @__PURE__ */
|
|
14175
|
-
/* @__PURE__ */
|
|
14176
|
-
/* @__PURE__ */
|
|
14270
|
+
/* @__PURE__ */ jsxs102("div", { className: "ss-g-body", children: [
|
|
14271
|
+
!revealed && /* @__PURE__ */ jsx114(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed: 0, ui }),
|
|
14272
|
+
/* @__PURE__ */ jsxs102("div", { className: "ss-g-sl-prompt", children: [
|
|
14273
|
+
/* @__PURE__ */ jsx114(Chip, { variant: "accent", icon: /* @__PURE__ */ jsx114(IconShield, { size: 14 }), className: "ss-g-sl-stat", children: config.statLabel }),
|
|
14274
|
+
/* @__PURE__ */ jsxs102("h3", { className: "ss-g-sl-q", children: [
|
|
14177
14275
|
question.pre,
|
|
14178
|
-
/* @__PURE__ */
|
|
14276
|
+
/* @__PURE__ */ jsx114("em", { children: question.emph }),
|
|
14179
14277
|
question.post
|
|
14180
14278
|
] })
|
|
14181
14279
|
] }),
|
|
14182
|
-
/* @__PURE__ */
|
|
14183
|
-
(rung) => rung.rank === 2 ? /* @__PURE__ */
|
|
14280
|
+
/* @__PURE__ */ jsx114("ol", { className: "ss-g-sl-rungs", children: rungs.map(
|
|
14281
|
+
(rung) => rung.rank === 2 ? /* @__PURE__ */ jsxs102(
|
|
14184
14282
|
"li",
|
|
14185
14283
|
{
|
|
14186
14284
|
className: "ss-g-sl-rung ss-g-sl-rung--mystery",
|
|
14187
14285
|
"data-testid": "sl-mystery-rung",
|
|
14188
14286
|
"data-result": revealed ? clientState.isCorrect ? "correct" : "wrong" : void 0,
|
|
14189
14287
|
children: [
|
|
14190
|
-
/* @__PURE__ */
|
|
14191
|
-
revealed ? /* @__PURE__ */
|
|
14192
|
-
revealed ? /* @__PURE__ */
|
|
14193
|
-
/* @__PURE__ */
|
|
14288
|
+
/* @__PURE__ */ jsx114("span", { className: "ss-g-sl-rank", children: "2" }),
|
|
14289
|
+
revealed ? /* @__PURE__ */ jsx114(PlayerAvatar, { name: clientState.revealedRank2.playerName, className: "ss-g-sl-av" }) : /* @__PURE__ */ jsx114(Silhouette, { size: 52, variant: "mystery" }),
|
|
14290
|
+
revealed ? /* @__PURE__ */ jsx114(NameStack, { name: clientState.revealedRank2.playerName }) : /* @__PURE__ */ jsx114("span", { className: "ss-g-sl-who", children: t.whoSecond }),
|
|
14291
|
+
/* @__PURE__ */ jsx114("span", { className: "ss-g-sl-val ss-g-sl-val--mystery", children: rung.statValue })
|
|
14194
14292
|
]
|
|
14195
14293
|
},
|
|
14196
14294
|
rung.rank
|
|
14197
|
-
) : /* @__PURE__ */
|
|
14198
|
-
/* @__PURE__ */
|
|
14199
|
-
/* @__PURE__ */
|
|
14200
|
-
/* @__PURE__ */
|
|
14201
|
-
/* @__PURE__ */
|
|
14295
|
+
) : /* @__PURE__ */ jsxs102("li", { className: "ss-g-sl-rung", children: [
|
|
14296
|
+
/* @__PURE__ */ jsx114("span", { className: "ss-g-sl-rank", children: rung.rank }),
|
|
14297
|
+
/* @__PURE__ */ jsx114(PlayerAvatar, { name: rung.playerName ?? "?", className: "ss-g-sl-av" }),
|
|
14298
|
+
/* @__PURE__ */ jsx114(NameStack, { name: rung.playerName ?? "?" }),
|
|
14299
|
+
/* @__PURE__ */ jsx114("span", { className: "ss-g-sl-val", children: rung.statValue })
|
|
14202
14300
|
] }, rung.rank)
|
|
14203
14301
|
) }),
|
|
14204
|
-
clue && /* @__PURE__ */
|
|
14205
|
-
/* @__PURE__ */
|
|
14206
|
-
/* @__PURE__ */
|
|
14302
|
+
clue && /* @__PURE__ */ jsxs102("p", { className: "ss-g-sl-clue", children: [
|
|
14303
|
+
/* @__PURE__ */ jsx114(IconBulb, {}),
|
|
14304
|
+
/* @__PURE__ */ jsx114("span", { children: t.clue(clue, config.statLabel) })
|
|
14207
14305
|
] }),
|
|
14208
|
-
!revealed && /* @__PURE__ */
|
|
14306
|
+
!revealed && /* @__PURE__ */ jsx114("ul", { className: "ss-g-sl-pool", children: pool.map((p) => /* @__PURE__ */ jsx114("li", { children: /* @__PURE__ */ jsxs102(
|
|
14209
14307
|
"button",
|
|
14210
14308
|
{
|
|
14211
14309
|
type: "button",
|
|
@@ -14218,13 +14316,13 @@ function StatLadderGame({
|
|
|
14218
14316
|
setQuery(p.playerName);
|
|
14219
14317
|
},
|
|
14220
14318
|
children: [
|
|
14221
|
-
/* @__PURE__ */
|
|
14222
|
-
/* @__PURE__ */
|
|
14223
|
-
selectedId === p.playerId && /* @__PURE__ */
|
|
14319
|
+
/* @__PURE__ */ jsx114(PlayerAvatar, { name: p.playerName, className: "ss-g-sl-opt-av" }),
|
|
14320
|
+
/* @__PURE__ */ jsx114("span", { className: "ss-g-sl-opt-name", children: p.playerName }),
|
|
14321
|
+
selectedId === p.playerId && /* @__PURE__ */ jsx114(IconCheck, {})
|
|
14224
14322
|
]
|
|
14225
14323
|
}
|
|
14226
14324
|
) }, p.playerId)) }),
|
|
14227
|
-
revealed && /* @__PURE__ */
|
|
14325
|
+
revealed && /* @__PURE__ */ jsx114(
|
|
14228
14326
|
ResultCard,
|
|
14229
14327
|
{
|
|
14230
14328
|
tone: clientState.isCorrect ? "win" : "lose",
|
|
@@ -14235,8 +14333,8 @@ function StatLadderGame({
|
|
|
14235
14333
|
}
|
|
14236
14334
|
)
|
|
14237
14335
|
] }),
|
|
14238
|
-
!revealed && /* @__PURE__ */
|
|
14239
|
-
/* @__PURE__ */
|
|
14336
|
+
!revealed && /* @__PURE__ */ jsx114(FooterBar, { children: /* @__PURE__ */ jsxs102("div", { className: "ss-g-sl-guess", children: [
|
|
14337
|
+
/* @__PURE__ */ jsx114(
|
|
14240
14338
|
SearchField,
|
|
14241
14339
|
{
|
|
14242
14340
|
id: searchId,
|
|
@@ -14251,13 +14349,13 @@ function StatLadderGame({
|
|
|
14251
14349
|
disabled: submitting
|
|
14252
14350
|
}
|
|
14253
14351
|
),
|
|
14254
|
-
/* @__PURE__ */
|
|
14352
|
+
/* @__PURE__ */ jsx114(GameButton, { variant: "primary", disabled: selectedId === null || submitting, onClick: guess, children: t.guess })
|
|
14255
14353
|
] }) })
|
|
14256
14354
|
] });
|
|
14257
14355
|
}
|
|
14258
14356
|
|
|
14259
14357
|
// src/components/games/FanMotmGame.tsx
|
|
14260
|
-
import { jsx as
|
|
14358
|
+
import { jsx as jsx115, jsxs as jsxs103 } from "react/jsx-runtime";
|
|
14261
14359
|
function parseClientState10(json) {
|
|
14262
14360
|
if (!json) return null;
|
|
14263
14361
|
try {
|
|
@@ -14278,20 +14376,20 @@ function FanMotmGame({
|
|
|
14278
14376
|
const clientState = parseClientState10(result?.clientStateJson);
|
|
14279
14377
|
const alreadyVoted = result?.alreadyPlayed === true;
|
|
14280
14378
|
const pickedId = clientState?.pickedPlayerId ?? null;
|
|
14281
|
-
const header = /* @__PURE__ */
|
|
14379
|
+
const header = /* @__PURE__ */ jsx115(
|
|
14282
14380
|
GameHeader,
|
|
14283
14381
|
{
|
|
14284
14382
|
title: t.title,
|
|
14285
14383
|
eyebrow: t.eyebrow,
|
|
14286
|
-
right: alreadyVoted ? /* @__PURE__ */
|
|
14384
|
+
right: alreadyVoted ? /* @__PURE__ */ jsx115(Chip, { variant: "success", icon: /* @__PURE__ */ jsx115(IconCheck, {}), children: t.voted }) : void 0,
|
|
14287
14385
|
onBack,
|
|
14288
14386
|
backLabel: ui.back
|
|
14289
14387
|
}
|
|
14290
14388
|
);
|
|
14291
14389
|
if (!config) {
|
|
14292
|
-
return /* @__PURE__ */
|
|
14390
|
+
return /* @__PURE__ */ jsxs103("div", { className: "ss-g-screen", "data-game": "fan-motm", "data-testid": "game-screen-fan-motm", children: [
|
|
14293
14391
|
header,
|
|
14294
|
-
/* @__PURE__ */
|
|
14392
|
+
/* @__PURE__ */ jsx115("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
14295
14393
|
] });
|
|
14296
14394
|
}
|
|
14297
14395
|
const picked = config.candidates.find((c) => c.playerId === pickedId) ?? null;
|
|
@@ -14299,12 +14397,12 @@ function FanMotmGame({
|
|
|
14299
14397
|
if (alreadyVoted || submitting) return;
|
|
14300
14398
|
onSubmit(JSON.stringify({ pickedPlayerId: candidateId }));
|
|
14301
14399
|
}
|
|
14302
|
-
return /* @__PURE__ */
|
|
14400
|
+
return /* @__PURE__ */ jsxs103("div", { className: "ss-g-screen", "data-game": "fan-motm", "data-testid": "game-screen-fan-motm", children: [
|
|
14303
14401
|
header,
|
|
14304
|
-
/* @__PURE__ */
|
|
14305
|
-
/* @__PURE__ */
|
|
14402
|
+
/* @__PURE__ */ jsxs103("div", { className: "ss-g-body", children: [
|
|
14403
|
+
/* @__PURE__ */ jsx115("ul", { className: "ss-g-motm-list", children: config.candidates.map((c) => {
|
|
14306
14404
|
const isVoted = alreadyVoted && pickedId === c.playerId;
|
|
14307
|
-
return /* @__PURE__ */
|
|
14405
|
+
return /* @__PURE__ */ jsx115("li", { children: /* @__PURE__ */ jsxs103(
|
|
14308
14406
|
"button",
|
|
14309
14407
|
{
|
|
14310
14408
|
type: "button",
|
|
@@ -14313,24 +14411,24 @@ function FanMotmGame({
|
|
|
14313
14411
|
disabled: alreadyVoted || submitting,
|
|
14314
14412
|
onClick: () => handleVote(c.playerId),
|
|
14315
14413
|
children: [
|
|
14316
|
-
/* @__PURE__ */
|
|
14317
|
-
/* @__PURE__ */
|
|
14318
|
-
isVoted && /* @__PURE__ */
|
|
14414
|
+
/* @__PURE__ */ jsx115(PlayerAvatar, { name: c.playerName, className: "ss-g-motm-av" }),
|
|
14415
|
+
/* @__PURE__ */ jsx115("span", { className: "ss-g-motm-name", children: c.playerName }),
|
|
14416
|
+
isVoted && /* @__PURE__ */ jsx115(Chip, { variant: "accent", className: "ss-g-motm-pill", children: t.yourVote })
|
|
14319
14417
|
]
|
|
14320
14418
|
}
|
|
14321
14419
|
) }, c.playerId);
|
|
14322
14420
|
}) }),
|
|
14323
|
-
alreadyVoted && picked && /* @__PURE__ */
|
|
14421
|
+
alreadyVoted && picked && /* @__PURE__ */ jsx115(ResultCard, { tone: "neutral", title: t.youVoted(picked.playerName), detail: t.thanks, onBack, ui })
|
|
14324
14422
|
] }),
|
|
14325
|
-
/* @__PURE__ */
|
|
14326
|
-
!alreadyVoted && /* @__PURE__ */
|
|
14327
|
-
/* @__PURE__ */
|
|
14423
|
+
/* @__PURE__ */ jsxs103(FooterBar, { children: [
|
|
14424
|
+
!alreadyVoted && /* @__PURE__ */ jsx115("p", { className: "ss-g-motm-foot", children: t.tapToVote }),
|
|
14425
|
+
/* @__PURE__ */ jsx115("p", { className: "ss-g-motm-fun", children: t.forFun })
|
|
14328
14426
|
] })
|
|
14329
14427
|
] });
|
|
14330
14428
|
}
|
|
14331
14429
|
|
|
14332
14430
|
// src/components/GameScreenHost.tsx
|
|
14333
|
-
import { jsx as
|
|
14431
|
+
import { jsx as jsx116 } from "react/jsx-runtime";
|
|
14334
14432
|
var FIXTURE_GAME_IDS = /* @__PURE__ */ new Set([
|
|
14335
14433
|
"matchday-predictor",
|
|
14336
14434
|
"starting-xi",
|
|
@@ -14406,7 +14504,7 @@ function GameScreenHost({
|
|
|
14406
14504
|
function renderScreen() {
|
|
14407
14505
|
switch (gameId) {
|
|
14408
14506
|
case "mystery-tiger":
|
|
14409
|
-
return /* @__PURE__ */
|
|
14507
|
+
return /* @__PURE__ */ jsx116(
|
|
14410
14508
|
MysteryTigerGame,
|
|
14411
14509
|
{
|
|
14412
14510
|
...sharedProps,
|
|
@@ -14414,7 +14512,7 @@ function GameScreenHost({
|
|
|
14414
14512
|
}
|
|
14415
14513
|
);
|
|
14416
14514
|
case "higher-or-lower":
|
|
14417
|
-
return /* @__PURE__ */
|
|
14515
|
+
return /* @__PURE__ */ jsx116(
|
|
14418
14516
|
HigherOrLowerGame,
|
|
14419
14517
|
{
|
|
14420
14518
|
...sharedProps,
|
|
@@ -14422,7 +14520,7 @@ function GameScreenHost({
|
|
|
14422
14520
|
}
|
|
14423
14521
|
);
|
|
14424
14522
|
case "career-path":
|
|
14425
|
-
return /* @__PURE__ */
|
|
14523
|
+
return /* @__PURE__ */ jsx116(
|
|
14426
14524
|
CareerPathGame,
|
|
14427
14525
|
{
|
|
14428
14526
|
...sharedProps,
|
|
@@ -14431,7 +14529,7 @@ function GameScreenHost({
|
|
|
14431
14529
|
);
|
|
14432
14530
|
case "beat-the-grid": {
|
|
14433
14531
|
const btgConfig = safeParseConfig(configJson);
|
|
14434
|
-
return /* @__PURE__ */
|
|
14532
|
+
return /* @__PURE__ */ jsx116(
|
|
14435
14533
|
BeatTheGridGame,
|
|
14436
14534
|
{
|
|
14437
14535
|
...sharedProps,
|
|
@@ -14441,7 +14539,7 @@ function GameScreenHost({
|
|
|
14441
14539
|
);
|
|
14442
14540
|
}
|
|
14443
14541
|
case "guess-the-xi":
|
|
14444
|
-
return /* @__PURE__ */
|
|
14542
|
+
return /* @__PURE__ */ jsx116(
|
|
14445
14543
|
GuessTheXiGame,
|
|
14446
14544
|
{
|
|
14447
14545
|
...sharedProps,
|
|
@@ -14449,7 +14547,7 @@ function GameScreenHost({
|
|
|
14449
14547
|
}
|
|
14450
14548
|
);
|
|
14451
14549
|
case "daily-quiz":
|
|
14452
|
-
return /* @__PURE__ */
|
|
14550
|
+
return /* @__PURE__ */ jsx116(
|
|
14453
14551
|
DailyQuizGame,
|
|
14454
14552
|
{
|
|
14455
14553
|
...sharedProps,
|
|
@@ -14457,7 +14555,7 @@ function GameScreenHost({
|
|
|
14457
14555
|
}
|
|
14458
14556
|
);
|
|
14459
14557
|
case "matchday-predictor":
|
|
14460
|
-
return /* @__PURE__ */
|
|
14558
|
+
return /* @__PURE__ */ jsx116(
|
|
14461
14559
|
MatchdayPredictorGame,
|
|
14462
14560
|
{
|
|
14463
14561
|
...sharedProps,
|
|
@@ -14465,7 +14563,7 @@ function GameScreenHost({
|
|
|
14465
14563
|
}
|
|
14466
14564
|
);
|
|
14467
14565
|
case "starting-xi":
|
|
14468
|
-
return /* @__PURE__ */
|
|
14566
|
+
return /* @__PURE__ */ jsx116(
|
|
14469
14567
|
StartingXiGame,
|
|
14470
14568
|
{
|
|
14471
14569
|
...sharedProps,
|
|
@@ -14473,7 +14571,7 @@ function GameScreenHost({
|
|
|
14473
14571
|
}
|
|
14474
14572
|
);
|
|
14475
14573
|
case "stat-ladder":
|
|
14476
|
-
return /* @__PURE__ */
|
|
14574
|
+
return /* @__PURE__ */ jsx116(
|
|
14477
14575
|
StatLadderGame,
|
|
14478
14576
|
{
|
|
14479
14577
|
...sharedProps,
|
|
@@ -14481,7 +14579,7 @@ function GameScreenHost({
|
|
|
14481
14579
|
}
|
|
14482
14580
|
);
|
|
14483
14581
|
case "fan-motm":
|
|
14484
|
-
return /* @__PURE__ */
|
|
14582
|
+
return /* @__PURE__ */ jsx116(
|
|
14485
14583
|
FanMotmGame,
|
|
14486
14584
|
{
|
|
14487
14585
|
...sharedProps,
|
|
@@ -14489,17 +14587,17 @@ function GameScreenHost({
|
|
|
14489
14587
|
}
|
|
14490
14588
|
);
|
|
14491
14589
|
default:
|
|
14492
|
-
return /* @__PURE__ */
|
|
14590
|
+
return /* @__PURE__ */ jsx116("div", { className: "ss-g-screen", "data-testid": `game-screen-${gameId}`, children: /* @__PURE__ */ jsx116(GameHeader, { title: gameTitle({ gameId }, ui.games.titles), onBack, backLabel: ui.back }) });
|
|
14493
14591
|
}
|
|
14494
14592
|
}
|
|
14495
|
-
return /* @__PURE__ */
|
|
14593
|
+
return /* @__PURE__ */ jsx116("div", { className: "ss-w-gscreen", "data-testid": "gscreen", "data-lock-at": lockAtUtc ?? void 0, children: renderScreen() });
|
|
14496
14594
|
}
|
|
14497
14595
|
|
|
14498
14596
|
// src/components/Leaderboard.tsx
|
|
14499
14597
|
import { useState as useState62 } from "react";
|
|
14500
14598
|
|
|
14501
14599
|
// src/components/LeaderboardRow.tsx
|
|
14502
|
-
import { jsx as
|
|
14600
|
+
import { jsx as jsx117, jsxs as jsxs104 } from "react/jsx-runtime";
|
|
14503
14601
|
function formatPoints(n) {
|
|
14504
14602
|
return n.toLocaleString("en");
|
|
14505
14603
|
}
|
|
@@ -14508,14 +14606,14 @@ function LeaderboardWeeklyRow({
|
|
|
14508
14606
|
isMe
|
|
14509
14607
|
}) {
|
|
14510
14608
|
const rankClass = `ss-w-lb2-rank${row.rank <= 3 ? " ss-w-lb2-rank--top3" : ""}`;
|
|
14511
|
-
return /* @__PURE__ */
|
|
14512
|
-
/* @__PURE__ */
|
|
14609
|
+
return /* @__PURE__ */ jsxs104("div", { className: `ss-w-lb2-row${isMe ? " ss-w-lb2-row--you" : ""}`, children: [
|
|
14610
|
+
/* @__PURE__ */ jsxs104("span", { className: rankClass, children: [
|
|
14513
14611
|
"#",
|
|
14514
14612
|
row.rank
|
|
14515
14613
|
] }),
|
|
14516
|
-
/* @__PURE__ */
|
|
14517
|
-
/* @__PURE__ */
|
|
14518
|
-
row.currentStreak > 0 && /* @__PURE__ */
|
|
14614
|
+
/* @__PURE__ */ jsx117("span", { className: "ss-w-lb2-handle", children: row.handle }),
|
|
14615
|
+
/* @__PURE__ */ jsx117("span", { className: "ss-w-lb2-points", children: formatPoints(row.points) }),
|
|
14616
|
+
row.currentStreak > 0 && /* @__PURE__ */ jsxs104("span", { className: "ss-w-lb2-streak", children: [
|
|
14519
14617
|
"\u{1F525} ",
|
|
14520
14618
|
row.currentStreak
|
|
14521
14619
|
] })
|
|
@@ -14526,18 +14624,18 @@ function LeaderboardAllTimeRow({
|
|
|
14526
14624
|
isMe
|
|
14527
14625
|
}) {
|
|
14528
14626
|
const rankClass = `ss-w-lb2-rank${row.rank <= 3 ? " ss-w-lb2-rank--top3" : ""}`;
|
|
14529
|
-
return /* @__PURE__ */
|
|
14530
|
-
/* @__PURE__ */
|
|
14627
|
+
return /* @__PURE__ */ jsxs104("div", { className: `ss-w-lb2-row${isMe ? " ss-w-lb2-row--you" : ""}`, children: [
|
|
14628
|
+
/* @__PURE__ */ jsxs104("span", { className: rankClass, children: [
|
|
14531
14629
|
"#",
|
|
14532
14630
|
row.rank
|
|
14533
14631
|
] }),
|
|
14534
|
-
/* @__PURE__ */
|
|
14535
|
-
/* @__PURE__ */
|
|
14632
|
+
/* @__PURE__ */ jsx117("span", { className: "ss-w-lb2-handle", children: row.handle }),
|
|
14633
|
+
/* @__PURE__ */ jsx117("span", { className: "ss-w-lb2-points", children: formatPoints(row.allTimePoints) })
|
|
14536
14634
|
] });
|
|
14537
14635
|
}
|
|
14538
14636
|
|
|
14539
14637
|
// src/components/LeaderboardEmpty.tsx
|
|
14540
|
-
import { jsx as
|
|
14638
|
+
import { jsx as jsx118, jsxs as jsxs105 } from "react/jsx-runtime";
|
|
14541
14639
|
function LeaderboardEmpty({
|
|
14542
14640
|
segment,
|
|
14543
14641
|
lastWeek,
|
|
@@ -14546,36 +14644,36 @@ function LeaderboardEmpty({
|
|
|
14546
14644
|
ui
|
|
14547
14645
|
}) {
|
|
14548
14646
|
if (segment === "alltime") {
|
|
14549
|
-
return /* @__PURE__ */
|
|
14550
|
-
/* @__PURE__ */
|
|
14551
|
-
/* @__PURE__ */
|
|
14647
|
+
return /* @__PURE__ */ jsxs105("div", { className: "ss-w-lb-empty ss-w-lb-empty--alltime", children: [
|
|
14648
|
+
/* @__PURE__ */ jsx118("div", { className: "ss-w-lb-empty-icon", "aria-hidden": "true", children: "\u{1F4CA}" }),
|
|
14649
|
+
/* @__PURE__ */ jsx118("p", { className: "ss-w-lb-empty-body", children: ui.leaderboardAllTimeEmpty })
|
|
14552
14650
|
] });
|
|
14553
14651
|
}
|
|
14554
14652
|
const fresh = lastWeek != null;
|
|
14555
14653
|
const title = fresh ? ui.leaderboardEmptyFreshTitle : ui.leaderboardEmptyColdTitle;
|
|
14556
14654
|
const body = fresh ? ui.leaderboardEmptyFreshBody : ui.leaderboardEmptyColdBody;
|
|
14557
|
-
return /* @__PURE__ */
|
|
14558
|
-
weeklyPrize && /* @__PURE__ */
|
|
14559
|
-
/* @__PURE__ */
|
|
14560
|
-
/* @__PURE__ */
|
|
14655
|
+
return /* @__PURE__ */ jsxs105("div", { className: "ss-w-lb-empty", children: [
|
|
14656
|
+
weeklyPrize && /* @__PURE__ */ jsxs105("div", { className: "ss-w-prize", children: [
|
|
14657
|
+
/* @__PURE__ */ jsx118("span", { className: "ss-w-prize-icon", "aria-hidden": "true", children: "\u{1F3C6}" }),
|
|
14658
|
+
/* @__PURE__ */ jsx118("div", { className: "ss-w-prize-body", children: /* @__PURE__ */ jsx118("span", { className: "ss-w-prize-text", children: weeklyPrize }) })
|
|
14561
14659
|
] }),
|
|
14562
|
-
/* @__PURE__ */
|
|
14563
|
-
/* @__PURE__ */
|
|
14564
|
-
/* @__PURE__ */
|
|
14565
|
-
/* @__PURE__ */
|
|
14566
|
-
onPlay && /* @__PURE__ */
|
|
14660
|
+
/* @__PURE__ */ jsxs105("div", { className: "ss-w-lb-empty-hero", children: [
|
|
14661
|
+
/* @__PURE__ */ jsx118("div", { className: "ss-w-lb-empty-icon", "aria-hidden": "true", children: fresh ? "\u{1F3C6}" : "\u{1F3AE}" }),
|
|
14662
|
+
/* @__PURE__ */ jsx118("h4", { className: "ss-w-lb-empty-title", children: title }),
|
|
14663
|
+
/* @__PURE__ */ jsx118("p", { className: "ss-w-lb-empty-body", children: body }),
|
|
14664
|
+
onPlay && /* @__PURE__ */ jsx118("button", { type: "button", className: "ss-w-lb-empty-cta", onClick: onPlay, children: ui.leaderboardEmptyCta })
|
|
14567
14665
|
] }),
|
|
14568
|
-
fresh && lastWeek && /* @__PURE__ */
|
|
14569
|
-
/* @__PURE__ */
|
|
14570
|
-
/* @__PURE__ */
|
|
14571
|
-
/* @__PURE__ */
|
|
14572
|
-
/* @__PURE__ */
|
|
14666
|
+
fresh && lastWeek && /* @__PURE__ */ jsxs105("div", { className: "ss-w-lb-last", children: [
|
|
14667
|
+
/* @__PURE__ */ jsx118("span", { className: "ss-w-lb-last-label", children: ui.leaderboardLastWeekLabel }),
|
|
14668
|
+
/* @__PURE__ */ jsx118("span", { className: "ss-w-lb-last-champ", "aria-hidden": "true", children: "\u{1F947}" }),
|
|
14669
|
+
/* @__PURE__ */ jsx118("span", { className: "ss-w-lb-last-handle", children: lastWeek.handle }),
|
|
14670
|
+
/* @__PURE__ */ jsx118("span", { className: "ss-w-lb-last-points", children: formatPoints(lastWeek.points) })
|
|
14573
14671
|
] })
|
|
14574
14672
|
] });
|
|
14575
14673
|
}
|
|
14576
14674
|
|
|
14577
14675
|
// src/components/Leaderboard.tsx
|
|
14578
|
-
import { Fragment as Fragment34, jsx as
|
|
14676
|
+
import { Fragment as Fragment34, jsx as jsx119, jsxs as jsxs106 } from "react/jsx-runtime";
|
|
14579
14677
|
function Leaderboard({
|
|
14580
14678
|
data,
|
|
14581
14679
|
ui,
|
|
@@ -14585,9 +14683,9 @@ function Leaderboard({
|
|
|
14585
14683
|
const myRow = segment === "weekly" ? data.myWeeklyRow : data.myAllTimeRow;
|
|
14586
14684
|
const offBoard = myRow !== null && myRow !== void 0 && myRow.rank === -1;
|
|
14587
14685
|
const isEmpty = segment === "weekly" ? data.weeklyTop.length === 0 : data.allTimeTop.length === 0;
|
|
14588
|
-
return /* @__PURE__ */
|
|
14589
|
-
/* @__PURE__ */
|
|
14590
|
-
/* @__PURE__ */
|
|
14686
|
+
return /* @__PURE__ */ jsxs106("div", { className: "ss-w-lb2", children: [
|
|
14687
|
+
/* @__PURE__ */ jsxs106("div", { className: "ss-w-seg", children: [
|
|
14688
|
+
/* @__PURE__ */ jsx119(
|
|
14591
14689
|
"button",
|
|
14592
14690
|
{
|
|
14593
14691
|
type: "button",
|
|
@@ -14597,7 +14695,7 @@ function Leaderboard({
|
|
|
14597
14695
|
children: ui.leaderboardThisWeek
|
|
14598
14696
|
}
|
|
14599
14697
|
),
|
|
14600
|
-
/* @__PURE__ */
|
|
14698
|
+
/* @__PURE__ */ jsx119(
|
|
14601
14699
|
"button",
|
|
14602
14700
|
{
|
|
14603
14701
|
type: "button",
|
|
@@ -14608,7 +14706,7 @@ function Leaderboard({
|
|
|
14608
14706
|
}
|
|
14609
14707
|
)
|
|
14610
14708
|
] }),
|
|
14611
|
-
isEmpty ? /* @__PURE__ */
|
|
14709
|
+
isEmpty ? /* @__PURE__ */ jsx119(
|
|
14612
14710
|
LeaderboardEmpty,
|
|
14613
14711
|
{
|
|
14614
14712
|
segment,
|
|
@@ -14617,15 +14715,15 @@ function Leaderboard({
|
|
|
14617
14715
|
onPlay,
|
|
14618
14716
|
ui
|
|
14619
14717
|
}
|
|
14620
|
-
) : /* @__PURE__ */
|
|
14621
|
-
/* @__PURE__ */
|
|
14718
|
+
) : /* @__PURE__ */ jsxs106(Fragment34, { children: [
|
|
14719
|
+
/* @__PURE__ */ jsx119("div", { className: "ss-w-lb2-rows", children: segment === "weekly" ? data.weeklyTop.map((row) => /* @__PURE__ */ jsx119(
|
|
14622
14720
|
LeaderboardWeeklyRow,
|
|
14623
14721
|
{
|
|
14624
14722
|
row,
|
|
14625
14723
|
isMe: row.operatorUserId === data.myWeeklyRow?.operatorUserId
|
|
14626
14724
|
},
|
|
14627
14725
|
row.operatorUserId
|
|
14628
|
-
)) : data.allTimeTop.map((row) => /* @__PURE__ */
|
|
14726
|
+
)) : data.allTimeTop.map((row) => /* @__PURE__ */ jsx119(
|
|
14629
14727
|
LeaderboardAllTimeRow,
|
|
14630
14728
|
{
|
|
14631
14729
|
row,
|
|
@@ -14633,18 +14731,18 @@ function Leaderboard({
|
|
|
14633
14731
|
},
|
|
14634
14732
|
row.operatorUserId
|
|
14635
14733
|
)) }),
|
|
14636
|
-
/* @__PURE__ */
|
|
14637
|
-
myRow != null && (offBoard ? /* @__PURE__ */
|
|
14638
|
-
segment === "weekly" && data.myWeeklyRow && /* @__PURE__ */
|
|
14639
|
-
segment === "alltime" && data.myAllTimeRow && /* @__PURE__ */
|
|
14734
|
+
/* @__PURE__ */ jsx119("div", { className: "ss-w-kitline", children: "\u{1F3BD}" }),
|
|
14735
|
+
myRow != null && (offBoard ? /* @__PURE__ */ jsx119("div", { className: "ss-w-lbgap", children: ui.leaderboardOffBoard }) : /* @__PURE__ */ jsxs106("div", { className: "ss-w-lb2-rows", children: [
|
|
14736
|
+
segment === "weekly" && data.myWeeklyRow && /* @__PURE__ */ jsx119(LeaderboardWeeklyRow, { row: data.myWeeklyRow, isMe: true }),
|
|
14737
|
+
segment === "alltime" && data.myAllTimeRow && /* @__PURE__ */ jsx119(LeaderboardAllTimeRow, { row: data.myAllTimeRow, isMe: true })
|
|
14640
14738
|
] })),
|
|
14641
|
-
segment === "alltime" && data.myAllTimeRow && !offBoard && /* @__PURE__ */
|
|
14739
|
+
segment === "alltime" && data.myAllTimeRow && !offBoard && /* @__PURE__ */ jsx119("div", { className: "ss-w-lb2-rows", children: /* @__PURE__ */ jsx119("div", { className: "ss-w-lb2-row", children: /* @__PURE__ */ jsx119("span", { className: "ss-w-lb2-handle", children: formatPoints(data.allTimeTop.reduce((s, r) => s + r.allTimePoints, 0)) }) }) })
|
|
14642
14740
|
] })
|
|
14643
14741
|
] });
|
|
14644
14742
|
}
|
|
14645
14743
|
|
|
14646
14744
|
// src/components/LeaderboardPanel.tsx
|
|
14647
|
-
import { jsx as
|
|
14745
|
+
import { jsx as jsx120 } from "react/jsx-runtime";
|
|
14648
14746
|
var EMPTY_PAYLOAD = {
|
|
14649
14747
|
week: "",
|
|
14650
14748
|
weeklyTop: [],
|
|
@@ -14655,9 +14753,9 @@ var EMPTY_PAYLOAD = {
|
|
|
14655
14753
|
lastWeek: null
|
|
14656
14754
|
};
|
|
14657
14755
|
function LeaderboardPanel({ loggedIn, data, loading, onPlay, ui }) {
|
|
14658
|
-
if (!loggedIn) return /* @__PURE__ */
|
|
14659
|
-
if (data === null && loading) return /* @__PURE__ */
|
|
14660
|
-
return /* @__PURE__ */
|
|
14756
|
+
if (!loggedIn) return /* @__PURE__ */ jsx120(GamesLoginWall, { ui });
|
|
14757
|
+
if (data === null && loading) return /* @__PURE__ */ jsx120("div", { className: "ss-w-mon-list" });
|
|
14758
|
+
return /* @__PURE__ */ jsx120("div", { className: "ss-w-mon-list", children: /* @__PURE__ */ jsx120(Leaderboard, { data: data ?? EMPTY_PAYLOAD, ui, onPlay }) });
|
|
14661
14759
|
}
|
|
14662
14760
|
|
|
14663
14761
|
// src/components/games/ui/fonts.ts
|
|
@@ -14674,7 +14772,7 @@ function ensureGamesFonts(doc = document) {
|
|
|
14674
14772
|
}
|
|
14675
14773
|
|
|
14676
14774
|
// src/components/GamesPanel.tsx
|
|
14677
|
-
import { jsx as
|
|
14775
|
+
import { jsx as jsx121, jsxs as jsxs107 } from "react/jsx-runtime";
|
|
14678
14776
|
function GamesPanel({
|
|
14679
14777
|
loggedIn,
|
|
14680
14778
|
games,
|
|
@@ -14689,9 +14787,9 @@ function GamesPanel({
|
|
|
14689
14787
|
useEffect39(() => {
|
|
14690
14788
|
ensureGamesFonts();
|
|
14691
14789
|
}, []);
|
|
14692
|
-
if (!loggedIn) return /* @__PURE__ */
|
|
14790
|
+
if (!loggedIn) return /* @__PURE__ */ jsx121(GamesLoginWall, { ui });
|
|
14693
14791
|
if (selected !== null) {
|
|
14694
|
-
return /* @__PURE__ */
|
|
14792
|
+
return /* @__PURE__ */ jsx121("div", { className: "ss-w-gscreen-wrap", lang: ui.games.lang, children: /* @__PURE__ */ jsx121(
|
|
14695
14793
|
GameScreenHost,
|
|
14696
14794
|
{
|
|
14697
14795
|
selected,
|
|
@@ -14705,9 +14803,9 @@ function GamesPanel({
|
|
|
14705
14803
|
}
|
|
14706
14804
|
) });
|
|
14707
14805
|
}
|
|
14708
|
-
return /* @__PURE__ */
|
|
14709
|
-
/* @__PURE__ */
|
|
14710
|
-
/* @__PURE__ */
|
|
14806
|
+
return /* @__PURE__ */ jsxs107("div", { className: "ss-g-hub-wrap", lang: ui.games.lang, children: [
|
|
14807
|
+
/* @__PURE__ */ jsxs107("div", { className: "ss-w-seg", children: [
|
|
14808
|
+
/* @__PURE__ */ jsx121(
|
|
14711
14809
|
"button",
|
|
14712
14810
|
{
|
|
14713
14811
|
type: "button",
|
|
@@ -14717,7 +14815,7 @@ function GamesPanel({
|
|
|
14717
14815
|
children: ui.gamesPlaySegment
|
|
14718
14816
|
}
|
|
14719
14817
|
),
|
|
14720
|
-
/* @__PURE__ */
|
|
14818
|
+
/* @__PURE__ */ jsx121(
|
|
14721
14819
|
"button",
|
|
14722
14820
|
{
|
|
14723
14821
|
type: "button",
|
|
@@ -14728,7 +14826,7 @@ function GamesPanel({
|
|
|
14728
14826
|
}
|
|
14729
14827
|
)
|
|
14730
14828
|
] }),
|
|
14731
|
-
segment === "play" ? /* @__PURE__ */
|
|
14829
|
+
segment === "play" ? /* @__PURE__ */ jsx121("div", { "data-testid": "games-hub", lang: ui.games.lang, children: /* @__PURE__ */ jsx121(
|
|
14732
14830
|
GamesHub,
|
|
14733
14831
|
{
|
|
14734
14832
|
games,
|
|
@@ -14736,7 +14834,7 @@ function GamesPanel({
|
|
|
14736
14834
|
myWeeklyRow: leaderboard?.myWeeklyRow ?? null,
|
|
14737
14835
|
ui
|
|
14738
14836
|
}
|
|
14739
|
-
) }) : /* @__PURE__ */
|
|
14837
|
+
) }) : /* @__PURE__ */ jsx121(
|
|
14740
14838
|
LeaderboardPanel,
|
|
14741
14839
|
{
|
|
14742
14840
|
loggedIn,
|
|
@@ -14754,7 +14852,7 @@ import { useEffect as useEffect42, useRef as useRef33, useState as useState66 }
|
|
|
14754
14852
|
|
|
14755
14853
|
// src/components/FavouriteChips.tsx
|
|
14756
14854
|
import { useEffect as useEffect40, useState as useState64 } from "react";
|
|
14757
|
-
import { Fragment as Fragment35, jsx as
|
|
14855
|
+
import { Fragment as Fragment35, jsx as jsx122, jsxs as jsxs108 } from "react/jsx-runtime";
|
|
14758
14856
|
async function toggleWithNotice(controller, kind, id, onNotice) {
|
|
14759
14857
|
const outcome = await controller.toggle(kind, id);
|
|
14760
14858
|
if (outcome === "at_cap") onNotice({ type: "cap", kind });
|
|
@@ -14763,27 +14861,27 @@ async function toggleWithNotice(controller, kind, id, onNotice) {
|
|
|
14763
14861
|
}
|
|
14764
14862
|
function FavCrest({ entity: entity2, sport }) {
|
|
14765
14863
|
const url = sport === "football" && entity2.kind !== "player" ? entity2.imageUrl : void 0;
|
|
14766
|
-
return /* @__PURE__ */
|
|
14864
|
+
return /* @__PURE__ */ jsx122(Crest, { url, name: entity2.name, kind: entity2.kind === "competition" ? "comp" : "team" });
|
|
14767
14865
|
}
|
|
14768
14866
|
function PlayerTeam({ entity: entity2, ui }) {
|
|
14769
14867
|
if (entity2.kind !== "player") return null;
|
|
14770
|
-
return /* @__PURE__ */
|
|
14868
|
+
return /* @__PURE__ */ jsx122("span", { className: "ss-w-fav-sub", children: entity2.teamName || ui.favNoTeam });
|
|
14771
14869
|
}
|
|
14772
14870
|
function Chip2({ entity: entity2, sport, ui, busy, onRemove }) {
|
|
14773
|
-
return /* @__PURE__ */
|
|
14774
|
-
/* @__PURE__ */
|
|
14775
|
-
/* @__PURE__ */
|
|
14776
|
-
/* @__PURE__ */
|
|
14777
|
-
/* @__PURE__ */
|
|
14871
|
+
return /* @__PURE__ */ jsxs108("li", { className: "ss-w-fav-chip", children: [
|
|
14872
|
+
/* @__PURE__ */ jsx122(FavCrest, { entity: entity2, sport }),
|
|
14873
|
+
/* @__PURE__ */ jsxs108("span", { className: "ss-w-fav-name", children: [
|
|
14874
|
+
/* @__PURE__ */ jsx122("span", { className: "ss-w-fav-title", children: entity2.name }),
|
|
14875
|
+
/* @__PURE__ */ jsx122(PlayerTeam, { entity: entity2, ui })
|
|
14778
14876
|
] }),
|
|
14779
|
-
/* @__PURE__ */
|
|
14877
|
+
/* @__PURE__ */ jsx122("button", { type: "button", className: "ss-w-fav-x", "aria-label": ui.favRemove(entity2.name), disabled: busy, onClick: onRemove, children: "\xD7" })
|
|
14780
14878
|
] });
|
|
14781
14879
|
}
|
|
14782
14880
|
function Group({ title, entities, sport, ui, controller, onNotice }) {
|
|
14783
14881
|
if (entities.length === 0) return null;
|
|
14784
|
-
return /* @__PURE__ */
|
|
14785
|
-
/* @__PURE__ */
|
|
14786
|
-
/* @__PURE__ */
|
|
14882
|
+
return /* @__PURE__ */ jsxs108("section", { className: "ss-w-fav-group", children: [
|
|
14883
|
+
/* @__PURE__ */ jsx122("h3", { className: "ss-w-fav-h", children: title }),
|
|
14884
|
+
/* @__PURE__ */ jsx122("ul", { className: "ss-w-fav-chips", children: entities.map((e) => /* @__PURE__ */ jsx122(
|
|
14787
14885
|
Chip2,
|
|
14788
14886
|
{
|
|
14789
14887
|
entity: e,
|
|
@@ -14819,20 +14917,20 @@ function FavouriteChips({ controller, ui, sport, sportLabel, onNotice }) {
|
|
|
14819
14917
|
if (!await controller.clear()) onNotice({ type: "error" });
|
|
14820
14918
|
else onNotice(null);
|
|
14821
14919
|
};
|
|
14822
|
-
return /* @__PURE__ */
|
|
14823
|
-
total === 0 ? /* @__PURE__ */
|
|
14824
|
-
sport === "football" ? /* @__PURE__ */
|
|
14825
|
-
/* @__PURE__ */
|
|
14826
|
-
/* @__PURE__ */
|
|
14827
|
-
data.suggestions.length > 0 ? /* @__PURE__ */
|
|
14828
|
-
/* @__PURE__ */
|
|
14829
|
-
/* @__PURE__ */
|
|
14830
|
-
/* @__PURE__ */
|
|
14831
|
-
/* @__PURE__ */
|
|
14832
|
-
/* @__PURE__ */
|
|
14833
|
-
/* @__PURE__ */
|
|
14920
|
+
return /* @__PURE__ */ jsxs108(Fragment35, { children: [
|
|
14921
|
+
total === 0 ? /* @__PURE__ */ jsx122("p", { className: "ss-w-fav-empty", children: ui.favEmpty }) : null,
|
|
14922
|
+
sport === "football" ? /* @__PURE__ */ jsx122(Group, { title: ui.favLeagues, entities: data.competitions, sport, ui, controller, onNotice }) : null,
|
|
14923
|
+
/* @__PURE__ */ jsx122(Group, { title: ui.favTeams, entities: data.teams, sport, ui, controller, onNotice }),
|
|
14924
|
+
/* @__PURE__ */ jsx122(Group, { title: ui.favPlayers, entities: data.players, sport, ui, controller, onNotice }),
|
|
14925
|
+
data.suggestions.length > 0 ? /* @__PURE__ */ jsxs108("section", { className: "ss-w-fav-group", children: [
|
|
14926
|
+
/* @__PURE__ */ jsx122("h3", { className: "ss-w-fav-h", children: ui.favFromActivity }),
|
|
14927
|
+
/* @__PURE__ */ jsx122("ul", { className: "ss-w-fav-chips", children: data.suggestions.map((e) => /* @__PURE__ */ jsxs108("li", { className: "ss-w-fav-chip ss-w-fav-chip--suggest", children: [
|
|
14928
|
+
/* @__PURE__ */ jsx122(FavCrest, { entity: e, sport }),
|
|
14929
|
+
/* @__PURE__ */ jsxs108("span", { className: "ss-w-fav-name", children: [
|
|
14930
|
+
/* @__PURE__ */ jsx122("span", { className: "ss-w-fav-title", children: e.name }),
|
|
14931
|
+
/* @__PURE__ */ jsx122(PlayerTeam, { entity: e, ui })
|
|
14834
14932
|
] }),
|
|
14835
|
-
/* @__PURE__ */
|
|
14933
|
+
/* @__PURE__ */ jsx122(
|
|
14836
14934
|
"button",
|
|
14837
14935
|
{
|
|
14838
14936
|
type: "button",
|
|
@@ -14847,19 +14945,19 @@ function FavouriteChips({ controller, ui, sport, sportLabel, onNotice }) {
|
|
|
14847
14945
|
)
|
|
14848
14946
|
] }, `${e.kind}:${e.id}`)) })
|
|
14849
14947
|
] }) : null,
|
|
14850
|
-
total > 0 ? confirming ? /* @__PURE__ */
|
|
14851
|
-
/* @__PURE__ */
|
|
14852
|
-
/* @__PURE__ */
|
|
14948
|
+
total > 0 ? confirming ? /* @__PURE__ */ jsxs108("div", { className: "ss-w-fav-confirm", "data-fav-confirm": "", role: "group", "aria-label": ui.favClearConfirm(sportLabel), children: [
|
|
14949
|
+
/* @__PURE__ */ jsx122("span", { className: "ss-w-fav-confirm-text", children: ui.favClearConfirm(sportLabel) }),
|
|
14950
|
+
/* @__PURE__ */ jsx122("button", { type: "button", className: "ss-w-fav-danger", onClick: () => {
|
|
14853
14951
|
void clear();
|
|
14854
14952
|
}, children: ui.favClear }),
|
|
14855
|
-
/* @__PURE__ */
|
|
14856
|
-
] }) : /* @__PURE__ */
|
|
14953
|
+
/* @__PURE__ */ jsx122("button", { type: "button", className: "ss-w-fav-cancel", onClick: () => setConfirming(false), children: ui.favClearCancel })
|
|
14954
|
+
] }) : /* @__PURE__ */ jsx122("div", { children: /* @__PURE__ */ jsx122("button", { type: "button", className: "ss-w-fav-danger", onClick: () => setConfirming(true), children: ui.favClear }) }) : null
|
|
14857
14955
|
] });
|
|
14858
14956
|
}
|
|
14859
14957
|
|
|
14860
14958
|
// src/components/FavouritesSearch.tsx
|
|
14861
14959
|
import { useEffect as useEffect41, useRef as useRef32, useState as useState65 } from "react";
|
|
14862
|
-
import { jsx as
|
|
14960
|
+
import { jsx as jsx123, jsxs as jsxs109 } from "react/jsx-runtime";
|
|
14863
14961
|
var MIN_LETTERS = 2;
|
|
14864
14962
|
var MAX_LENGTH = 64;
|
|
14865
14963
|
var DEBOUNCE_MS = 250;
|
|
@@ -14888,8 +14986,8 @@ function FavouritesSearch({ controller, ui, sport, onNotice }) {
|
|
|
14888
14986
|
clearTimeout(timer);
|
|
14889
14987
|
};
|
|
14890
14988
|
}, [trimmed, sport, queryKey]);
|
|
14891
|
-
return /* @__PURE__ */
|
|
14892
|
-
/* @__PURE__ */
|
|
14989
|
+
return /* @__PURE__ */ jsxs109("div", { className: "ss-w-fav-search", children: [
|
|
14990
|
+
/* @__PURE__ */ jsx123(
|
|
14893
14991
|
"input",
|
|
14894
14992
|
{
|
|
14895
14993
|
type: "search",
|
|
@@ -14902,17 +15000,17 @@ function FavouritesSearch({ controller, ui, sport, onNotice }) {
|
|
|
14902
15000
|
onChange: (e) => setQuery(e.target.value)
|
|
14903
15001
|
}
|
|
14904
15002
|
),
|
|
14905
|
-
trimmed.length > 0 && trimmed.length < MIN_LETTERS ? /* @__PURE__ */
|
|
14906
|
-
settled && results2.length === 0 ? /* @__PURE__ */
|
|
14907
|
-
results2.length > 0 ? /* @__PURE__ */
|
|
15003
|
+
trimmed.length > 0 && trimmed.length < MIN_LETTERS ? /* @__PURE__ */ jsx123("p", { className: "ss-w-fav-hint", children: ui.favSearchMin }) : null,
|
|
15004
|
+
settled && results2.length === 0 ? /* @__PURE__ */ jsx123("p", { className: "ss-w-fav-hint", children: ui.favNoResults }) : null,
|
|
15005
|
+
results2.length > 0 ? /* @__PURE__ */ jsx123("ul", { className: "ss-w-fav-results", children: results2.map((e) => {
|
|
14908
15006
|
const starred = controller.isStarred(e.kind, e.id);
|
|
14909
|
-
return /* @__PURE__ */
|
|
14910
|
-
/* @__PURE__ */
|
|
14911
|
-
/* @__PURE__ */
|
|
14912
|
-
/* @__PURE__ */
|
|
14913
|
-
e.kind === "player" ? /* @__PURE__ */
|
|
15007
|
+
return /* @__PURE__ */ jsxs109("li", { className: "ss-w-fav-row", children: [
|
|
15008
|
+
/* @__PURE__ */ jsx123(FavCrest, { entity: e, sport }),
|
|
15009
|
+
/* @__PURE__ */ jsxs109("span", { className: "ss-w-fav-name", children: [
|
|
15010
|
+
/* @__PURE__ */ jsx123("span", { className: "ss-w-fav-title", children: e.name }),
|
|
15011
|
+
e.kind === "player" ? /* @__PURE__ */ jsx123(PlayerTeam, { entity: e, ui }) : /* @__PURE__ */ jsx123("span", { className: "ss-w-fav-kind", children: e.kind === "competition" ? ui.favKindLeague : ui.favKindTeam })
|
|
14914
15012
|
] }),
|
|
14915
|
-
/* @__PURE__ */
|
|
15013
|
+
/* @__PURE__ */ jsx123(
|
|
14916
15014
|
"button",
|
|
14917
15015
|
{
|
|
14918
15016
|
type: "button",
|
|
@@ -14932,7 +15030,7 @@ function FavouritesSearch({ controller, ui, sport, onNotice }) {
|
|
|
14932
15030
|
}
|
|
14933
15031
|
|
|
14934
15032
|
// src/components/FavouritesPanel.tsx
|
|
14935
|
-
import { jsx as
|
|
15033
|
+
import { jsx as jsx124, jsxs as jsxs110 } from "react/jsx-runtime";
|
|
14936
15034
|
function capitalised(sport) {
|
|
14937
15035
|
return sport.charAt(0).toUpperCase() + sport.slice(1);
|
|
14938
15036
|
}
|
|
@@ -14949,8 +15047,8 @@ function FavouritesPanel({ controller, ui, sport, sports, onSportChange }) {
|
|
|
14949
15047
|
const sportLabel = sports.find((s) => s.sport === sport)?.label ?? capitalised(sport);
|
|
14950
15048
|
const kindLabel2 = (kind) => kind === "competition" ? ui.favKindLeague : kind === "team" ? ui.favKindTeam : ui.favKindPlayer;
|
|
14951
15049
|
const noticeText = notice === null ? null : notice.type === "cap" ? ui.favAtCap(kindLabel2(notice.kind)) : ui.favError;
|
|
14952
|
-
return /* @__PURE__ */
|
|
14953
|
-
sports.length > 1 ? /* @__PURE__ */
|
|
15050
|
+
return /* @__PURE__ */ jsxs110("div", { className: "ss-w-mon-list ss-w-fav", children: [
|
|
15051
|
+
sports.length > 1 ? /* @__PURE__ */ jsx124("div", { className: "ss-w-dash-sports", role: "group", "aria-label": ui.sportGroupLabel, children: sports.map((s) => /* @__PURE__ */ jsx124(
|
|
14954
15052
|
"button",
|
|
14955
15053
|
{
|
|
14956
15054
|
type: "button",
|
|
@@ -14961,17 +15059,17 @@ function FavouritesPanel({ controller, ui, sport, sports, onSportChange }) {
|
|
|
14961
15059
|
},
|
|
14962
15060
|
s.sport
|
|
14963
15061
|
)) }) : null,
|
|
14964
|
-
/* @__PURE__ */
|
|
14965
|
-
/* @__PURE__ */
|
|
14966
|
-
noticeText ? /* @__PURE__ */
|
|
14967
|
-
controller.status === "error" && !controller.data ? /* @__PURE__ */
|
|
14968
|
-
/* @__PURE__ */
|
|
15062
|
+
/* @__PURE__ */ jsx124("p", { className: controller.scope === "browser" ? "ss-w-fav-saved ss-w-fav-saved--browser" : "ss-w-fav-saved", children: controller.scope === "account" ? ui.favSavedAccount : ui.favSavedBrowser }),
|
|
15063
|
+
/* @__PURE__ */ jsx124(FavouritesSearch, { controller, ui, sport, onNotice: setNotice }),
|
|
15064
|
+
noticeText ? /* @__PURE__ */ jsx124("p", { className: "ss-w-fav-notice", role: "status", children: noticeText }) : null,
|
|
15065
|
+
controller.status === "error" && !controller.data ? /* @__PURE__ */ jsx124("p", { className: "ss-w-fav-notice", role: "status", children: ui.favError }) : null,
|
|
15066
|
+
/* @__PURE__ */ jsx124(FavouriteChips, { controller, ui, sport, sportLabel, onNotice: setNotice })
|
|
14969
15067
|
] });
|
|
14970
15068
|
}
|
|
14971
15069
|
|
|
14972
15070
|
// src/components/dashboard/v8/SentenceBuilder.tsx
|
|
14973
15071
|
import { useEffect as useEffect43, useRef as useRef34, useState as useState67 } from "react";
|
|
14974
|
-
import { Fragment as Fragment36, jsx as
|
|
15072
|
+
import { Fragment as Fragment36, jsx as jsx125, jsxs as jsxs111 } from "react/jsx-runtime";
|
|
14975
15073
|
var TOTALS = ["any", "3", "5", "10", "20", "50"];
|
|
14976
15074
|
var BASE_LEGS = [1, 2, 3, 4];
|
|
14977
15075
|
var isTotal = (v) => TOTALS.includes(v);
|
|
@@ -15025,7 +15123,7 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
15025
15123
|
...anonymousUserId ? { anonymousUserId } : {}
|
|
15026
15124
|
});
|
|
15027
15125
|
const [first] = useState67(() => requestFor(view));
|
|
15028
|
-
const { grid, status, confirmed, request } = useBuilderGrid({ conversation, locale: ui.presets.lang, memory: memory3, initial: first });
|
|
15126
|
+
const { grid, status: status2, confirmed, request } = useBuilderGrid({ conversation, locale: ui.presets.lang, memory: memory3, initial: first });
|
|
15029
15127
|
const lastRequest = useRef34(first);
|
|
15030
15128
|
useEffect43(() => {
|
|
15031
15129
|
void request(lastRequest.current);
|
|
@@ -15056,15 +15154,15 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
15056
15154
|
...BASE_LEGS,
|
|
15057
15155
|
...[preset.legs, suggested].filter((n) => n !== null && n > 4)
|
|
15058
15156
|
])).sort((a, b) => a - b);
|
|
15059
|
-
const ready =
|
|
15157
|
+
const ready = status2 === "ready" && grid !== null;
|
|
15060
15158
|
const rows = ready && grid.status === "ok" ? legsOf(grid, sport) : null;
|
|
15061
15159
|
const rowSlip = rows ? guardLegsPreMatch(slip, rows, ui) : slip;
|
|
15062
15160
|
useNextKickoffRender(rows ? rows.map((l) => l.kickoffUtc) : []);
|
|
15063
15161
|
const [startedNote, setStartedNote] = useState67(false);
|
|
15064
15162
|
const anyStarted = rows !== null && rows.some((l) => !preMatchOpen(l.kickoffUtc, Date.now()));
|
|
15065
15163
|
useEffect43(() => {
|
|
15066
|
-
if (startedNote &&
|
|
15067
|
-
}, [startedNote,
|
|
15164
|
+
if (startedNote && status2 === "ready" && !anyStarted) setStartedNote(false);
|
|
15165
|
+
}, [startedNote, status2, anyStarted]);
|
|
15068
15166
|
const market = rows?.[0]?.market;
|
|
15069
15167
|
const [seen, setSeen] = useState67(null);
|
|
15070
15168
|
useEffect43(() => {
|
|
@@ -15072,7 +15170,7 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
15072
15170
|
}, [market]);
|
|
15073
15171
|
const marketName = view.marketKey === null ? null : marketOptions?.find((m) => m.key === view.marketKey)?.label ?? market ?? seen;
|
|
15074
15172
|
const paused = ready && grid.status === "paused";
|
|
15075
|
-
const coolOff =
|
|
15173
|
+
const coolOff = status2 === "ready" && grid === null;
|
|
15076
15174
|
const empty2 = ready && (grid.status === "miss" || grid.status === "ok" && (rows === null || rows.length === 0));
|
|
15077
15175
|
const widened = view.widen || ready && grid.widened;
|
|
15078
15176
|
const singles = view.legs === 1;
|
|
@@ -15096,13 +15194,13 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
15096
15194
|
const nextWhen = nextAtMs !== null && nextAtMs > Date.now() ? kickoffText(ui, preset.nextGamesAtUtc) : null;
|
|
15097
15195
|
const phrase = preset.nextGamesAtUtc == null ? nextGames : null;
|
|
15098
15196
|
const mineGames = gamesOptions?.find((o) => o.id === view.gamesId)?.mine === true;
|
|
15099
|
-
return /* @__PURE__ */
|
|
15197
|
+
return /* @__PURE__ */ jsx125("section", { className: "ss-w-v8-sec ss-w-v8-builder", "data-testid": "v8-builder", "aria-busy": status2 === "loading" || void 0, children: conversation && paused ? /* @__PURE__ */ jsx125("p", { className: "ss-w-v8-builder-note", "data-kind": "paused", children: nextWhen ? ui.v8PausedNext(nextWhen) : /* @__PURE__ */ jsxs111(Fragment36, { children: [
|
|
15100
15198
|
ui.v8Paused,
|
|
15101
|
-
phrase ? /* @__PURE__ */
|
|
15102
|
-
] }) }) : conversation ? /* @__PURE__ */
|
|
15103
|
-
marketOptions ? /* @__PURE__ */
|
|
15104
|
-
/* @__PURE__ */
|
|
15105
|
-
/* @__PURE__ */
|
|
15199
|
+
phrase ? /* @__PURE__ */ jsx125("span", { className: "ss-w-v8-builder-next", "data-testid": "v8-next-games", children: phrase }) : null
|
|
15200
|
+
] }) }) : conversation ? /* @__PURE__ */ jsxs111(Fragment36, { children: [
|
|
15201
|
+
marketOptions ? /* @__PURE__ */ jsxs111("div", { className: "ss-w-v8-builder-ln", children: [
|
|
15202
|
+
/* @__PURE__ */ jsx125("span", { className: "ss-w-v8-builder-w", children: ui.v8BuilderShow }),
|
|
15203
|
+
/* @__PURE__ */ jsx125("div", { className: "ss-w-v8-slot", "data-mine": marketOptions.find((m) => m.key === view.marketKey)?.usual || void 0, children: /* @__PURE__ */ jsxs111(
|
|
15106
15204
|
"select",
|
|
15107
15205
|
{
|
|
15108
15206
|
className: "ss-w-v8-select",
|
|
@@ -15113,18 +15211,18 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
15113
15211
|
if (picked !== view.marketKey) ask({ ...view, marketKey: picked });
|
|
15114
15212
|
},
|
|
15115
15213
|
children: [
|
|
15116
|
-
marketOptions.map((m) => /* @__PURE__ */
|
|
15117
|
-
/* @__PURE__ */
|
|
15214
|
+
marketOptions.map((m) => /* @__PURE__ */ jsx125("option", { value: m.key, children: m.usual ? `${ui.v8UsualPrefix}${m.label}` : m.label }, m.key)),
|
|
15215
|
+
/* @__PURE__ */ jsx125("option", { value: ALL_MARKETS, children: ui.v8AllMarkets })
|
|
15118
15216
|
]
|
|
15119
15217
|
}
|
|
15120
15218
|
) })
|
|
15121
|
-
] }) : marketName ? /* @__PURE__ */
|
|
15122
|
-
/* @__PURE__ */
|
|
15123
|
-
/* @__PURE__ */
|
|
15219
|
+
] }) : marketName ? /* @__PURE__ */ jsxs111("div", { className: "ss-w-v8-builder-ln", children: [
|
|
15220
|
+
/* @__PURE__ */ jsx125("span", { className: "ss-w-v8-builder-w", children: ui.v8BuilderShow }),
|
|
15221
|
+
/* @__PURE__ */ jsx125("span", { className: "ss-w-v8-builder-market", children: marketName })
|
|
15124
15222
|
] }) : null,
|
|
15125
|
-
/* @__PURE__ */
|
|
15126
|
-
/* @__PURE__ */
|
|
15127
|
-
gamesOptions ? /* @__PURE__ */
|
|
15223
|
+
/* @__PURE__ */ jsxs111("div", { className: "ss-w-v8-builder-ln", children: [
|
|
15224
|
+
/* @__PURE__ */ jsx125("span", { className: "ss-w-v8-builder-w", children: ui.v8BuilderIn }),
|
|
15225
|
+
gamesOptions ? /* @__PURE__ */ jsx125("div", { className: "ss-w-v8-slot", "data-mine": mineGames || void 0, children: /* @__PURE__ */ jsx125(
|
|
15128
15226
|
"select",
|
|
15129
15227
|
{
|
|
15130
15228
|
className: "ss-w-v8-select",
|
|
@@ -15134,16 +15232,16 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
15134
15232
|
const picked = gamesOptions.find((o) => o.id === e.target.value);
|
|
15135
15233
|
if (picked && picked.id !== view.gamesId) pickGames(picked);
|
|
15136
15234
|
},
|
|
15137
|
-
children: /* @__PURE__ */
|
|
15235
|
+
children: /* @__PURE__ */ jsx125(GamesOptions, { options: gamesOptions, ui })
|
|
15138
15236
|
}
|
|
15139
|
-
) }) : /* @__PURE__ */
|
|
15237
|
+
) }) : /* @__PURE__ */ jsx125("button", { type: "button", className: "ss-w-v8-builder-btn", "aria-pressed": view.widen, disabled: view.widen && !canNarrow, onClick: () => {
|
|
15140
15238
|
const next = { ...view, widen: canNarrow ? !view.widen : true, matchIds: canNarrow && view.widen && view.matchIds.length === 0 ? preset.matchIds : view.matchIds };
|
|
15141
15239
|
ask(next);
|
|
15142
15240
|
}, children: ui.v8UseAllGames })
|
|
15143
15241
|
] }),
|
|
15144
|
-
/* @__PURE__ */
|
|
15145
|
-
/* @__PURE__ */
|
|
15146
|
-
/* @__PURE__ */
|
|
15242
|
+
/* @__PURE__ */ jsxs111("div", { className: "ss-w-v8-builder-ln", children: [
|
|
15243
|
+
/* @__PURE__ */ jsx125("span", { className: "ss-w-v8-builder-w", children: ui.v8BuilderAs }),
|
|
15244
|
+
/* @__PURE__ */ jsx125("div", { className: "ss-w-v8-builder-btns", role: "group", "aria-label": ui.v8BuilderAs, children: legButtons.map((n) => /* @__PURE__ */ jsx125(
|
|
15147
15245
|
"button",
|
|
15148
15246
|
{
|
|
15149
15247
|
type: "button",
|
|
@@ -15158,9 +15256,9 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
15158
15256
|
n
|
|
15159
15257
|
)) })
|
|
15160
15258
|
] }),
|
|
15161
|
-
view.legs > 1 ? /* @__PURE__ */
|
|
15162
|
-
/* @__PURE__ */
|
|
15163
|
-
/* @__PURE__ */
|
|
15259
|
+
view.legs > 1 ? /* @__PURE__ */ jsxs111("div", { className: "ss-w-v8-builder-ln ss-w-v8-builder-ln--total", children: [
|
|
15260
|
+
/* @__PURE__ */ jsx125("span", { className: "ss-w-v8-builder-w", children: ui.v8BuilderTotal }),
|
|
15261
|
+
/* @__PURE__ */ jsx125("div", { className: "ss-w-v8-builder-btns", role: "group", "aria-label": ui.v8BuilderTotal, children: totals.map((t) => /* @__PURE__ */ jsx125(
|
|
15164
15262
|
"button",
|
|
15165
15263
|
{
|
|
15166
15264
|
type: "button",
|
|
@@ -15174,31 +15272,31 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
15174
15272
|
t
|
|
15175
15273
|
)) })
|
|
15176
15274
|
] }) : null,
|
|
15177
|
-
ready && singles && widenedNote && !empty2 ? /* @__PURE__ */
|
|
15178
|
-
ready && !widenedNote && !empty2 && preset.widenedForMarket === true && onOpeningChoice ? /* @__PURE__ */
|
|
15179
|
-
startedNote ? /* @__PURE__ */
|
|
15180
|
-
|
|
15181
|
-
|
|
15182
|
-
/* @__PURE__ */
|
|
15183
|
-
/* @__PURE__ */
|
|
15275
|
+
ready && singles && widenedNote && !empty2 ? /* @__PURE__ */ jsx125("p", { className: "ss-w-v8-builder-note", "data-kind": "widened", children: ui.v8SinglesWidened(marketName) }) : null,
|
|
15276
|
+
ready && !widenedNote && !empty2 && preset.widenedForMarket === true && onOpeningChoice ? /* @__PURE__ */ jsx125("p", { className: "ss-w-v8-builder-note", children: ui.v8Widened }) : null,
|
|
15277
|
+
startedNote ? /* @__PURE__ */ jsx125("p", { className: "ss-w-v8-builder-note", "data-kind": "started", role: "status", children: ui.slipStarted }) : null,
|
|
15278
|
+
status2 === "loading" ? /* @__PURE__ */ jsx125("p", { className: "ss-w-v8-builder-note", "data-kind": "loading", children: ui.v8BuilderLoading }) : null,
|
|
15279
|
+
status2 === "error" ? /* @__PURE__ */ jsxs111(Fragment36, { children: [
|
|
15280
|
+
/* @__PURE__ */ jsx125("p", { className: "ss-w-v8-builder-note", "data-kind": "error", children: ui.v8BuilderError }),
|
|
15281
|
+
/* @__PURE__ */ jsx125("button", { type: "button", className: "ss-w-v8-builder-btn", onClick: () => {
|
|
15184
15282
|
setStartedNote(false);
|
|
15185
15283
|
void request(lastRequest.current);
|
|
15186
15284
|
}, children: ui.v8BuilderRetry })
|
|
15187
15285
|
] }) : null,
|
|
15188
|
-
empty2 && singles && (widened || !canWiden) ? /* @__PURE__ */
|
|
15189
|
-
empty2 && !singles ? /* @__PURE__ */
|
|
15190
|
-
/* @__PURE__ */
|
|
15191
|
-
gamesOptions && allGames && !widened ? /* @__PURE__ */
|
|
15286
|
+
empty2 && singles && (widened || !canWiden) ? /* @__PURE__ */ jsx125("p", { className: "ss-w-v8-builder-note", "data-kind": "no-prices", children: ui.v8NoPrices(marketName) }) : null,
|
|
15287
|
+
empty2 && !singles ? /* @__PURE__ */ jsxs111(Fragment36, { children: [
|
|
15288
|
+
/* @__PURE__ */ jsx125("p", { className: "ss-w-v8-builder-note", "data-kind": "miss", children: ui.v8Miss }),
|
|
15289
|
+
gamesOptions && allGames && !widened ? /* @__PURE__ */ jsx125("button", { type: "button", className: "ss-w-v8-builder-btn", onClick: () => pickGames(allGames), children: ui.v8UseAllGames }) : null
|
|
15192
15290
|
] }) : null,
|
|
15193
|
-
rows && rows.length > 0 ? /* @__PURE__ */
|
|
15194
|
-
/* @__PURE__ */
|
|
15195
|
-
/* @__PURE__ */
|
|
15196
|
-
grid && grid.requestedLegs > 1 ? /* @__PURE__ */
|
|
15291
|
+
rows && rows.length > 0 ? /* @__PURE__ */ jsxs111(Fragment36, { children: [
|
|
15292
|
+
/* @__PURE__ */ jsxs111("div", { className: "ss-w-v8-builder-rows", children: [
|
|
15293
|
+
/* @__PURE__ */ jsx125("ol", { className: "ss-w-combo-legs", role: "list", children: rows.map((leg) => /* @__PURE__ */ jsx125(ComboLegRow, { leg, addToSlipEnabled: !!slip.onAddToSlip, ui, slip: rowSlip, hold: !confirmed, closed: !preMatchOpen(leg.kickoffUtc, Date.now()) }, leg.key)) }),
|
|
15294
|
+
grid && grid.requestedLegs > 1 ? /* @__PURE__ */ jsx125(AddAllToSlipButton, { legs: rows, slip: rowSlip, ui, labels: { add: ui.v8AddAll, done: ui.allInSlip }, combo, sizeless: true, hold: !confirmed, onStartedGame: () => {
|
|
15197
15295
|
setStartedNote(true);
|
|
15198
15296
|
void request(lastRequest.current);
|
|
15199
15297
|
} }) : null
|
|
15200
15298
|
] }),
|
|
15201
|
-
quotedAt ? /* @__PURE__ */
|
|
15299
|
+
quotedAt ? /* @__PURE__ */ jsx125("p", { className: "ss-w-v8-builder-note", "data-testid": "v8-asof", children: ui.v8PricesAsOf(fmtHhMm(quotedAt, ui.locale)) }) : null
|
|
15202
15300
|
] }) : null
|
|
15203
15301
|
] }) : null });
|
|
15204
15302
|
}
|
|
@@ -15206,25 +15304,25 @@ function GamesOptions({ options, ui }) {
|
|
|
15206
15304
|
const top = options.filter((o) => o.group !== "league" && o.group !== "game");
|
|
15207
15305
|
const leagues = options.filter((o) => o.group === "league");
|
|
15208
15306
|
const games = options.filter((o) => o.group === "game");
|
|
15209
|
-
return /* @__PURE__ */
|
|
15210
|
-
top.map((o) => /* @__PURE__ */
|
|
15211
|
-
leagues.length > 0 ? /* @__PURE__ */
|
|
15212
|
-
games.length > 0 ? /* @__PURE__ */
|
|
15307
|
+
return /* @__PURE__ */ jsxs111(Fragment36, { children: [
|
|
15308
|
+
top.map((o) => /* @__PURE__ */ jsx125("option", { value: o.id, children: o.label }, o.id)),
|
|
15309
|
+
leagues.length > 0 ? /* @__PURE__ */ jsx125("optgroup", { label: ui.v8LeaguesGroup, children: leagues.map((o) => /* @__PURE__ */ jsx125("option", { value: o.id, children: o.label }, o.id)) }) : null,
|
|
15310
|
+
games.length > 0 ? /* @__PURE__ */ jsx125("optgroup", { label: ui.v8GamesGroup, children: games.map((o) => {
|
|
15213
15311
|
const at = kickoffText(ui, o.startsAtUtc);
|
|
15214
|
-
return /* @__PURE__ */
|
|
15312
|
+
return /* @__PURE__ */ jsx125("option", { value: o.id, children: at ? `${o.label} \xB7 ${at}` : o.label }, o.id);
|
|
15215
15313
|
}) }) : null
|
|
15216
15314
|
] });
|
|
15217
15315
|
}
|
|
15218
15316
|
|
|
15219
15317
|
// src/components/BuilderPanel.tsx
|
|
15220
|
-
import { jsx as
|
|
15318
|
+
import { jsx as jsx126, jsxs as jsxs112 } from "react/jsx-runtime";
|
|
15221
15319
|
function BuilderPanel({ options, sport, onSportChange, ui, slip, onCoolOff }) {
|
|
15222
15320
|
const ctx = usePersonalGreeting();
|
|
15223
15321
|
const scope = useSportScope();
|
|
15224
15322
|
const active = options.find((o) => o.sport === sport) ?? options[0];
|
|
15225
15323
|
if (!active) return null;
|
|
15226
|
-
return /* @__PURE__ */
|
|
15227
|
-
options.length > 1 ? /* @__PURE__ */
|
|
15324
|
+
return /* @__PURE__ */ jsxs112("div", { className: "ss-w-mon-list ss-w-builder-tab", children: [
|
|
15325
|
+
options.length > 1 ? /* @__PURE__ */ jsx126("div", { className: "ss-w-dash-sports", role: "group", "aria-label": ui.sportGroupLabel, children: options.map((o) => /* @__PURE__ */ jsx126(
|
|
15228
15326
|
"button",
|
|
15229
15327
|
{
|
|
15230
15328
|
type: "button",
|
|
@@ -15235,7 +15333,7 @@ function BuilderPanel({ options, sport, onSportChange, ui, slip, onCoolOff }) {
|
|
|
15235
15333
|
},
|
|
15236
15334
|
o.sport
|
|
15237
15335
|
)) }) : null,
|
|
15238
|
-
/* @__PURE__ */
|
|
15336
|
+
/* @__PURE__ */ jsx126("div", { className: "ss-w-v8", children: /* @__PURE__ */ jsx126(
|
|
15239
15337
|
SentenceBuilder,
|
|
15240
15338
|
{
|
|
15241
15339
|
preset: active.preset,
|
|
@@ -15254,7 +15352,7 @@ function BuilderPanel({ options, sport, onSportChange, ui, slip, onCoolOff }) {
|
|
|
15254
15352
|
}
|
|
15255
15353
|
|
|
15256
15354
|
// src/components/Fixtures.tsx
|
|
15257
|
-
import { jsx as
|
|
15355
|
+
import { jsx as jsx127, jsxs as jsxs113 } from "react/jsx-runtime";
|
|
15258
15356
|
function groupByRound(fixtures) {
|
|
15259
15357
|
const groups = [];
|
|
15260
15358
|
for (const fx of fixtures) {
|
|
@@ -15266,31 +15364,31 @@ function groupByRound(fixtures) {
|
|
|
15266
15364
|
}
|
|
15267
15365
|
function Fixtures({ fixtures, loading, ui }) {
|
|
15268
15366
|
if (fixtures.length === 0) {
|
|
15269
|
-
if (loading) return /* @__PURE__ */
|
|
15270
|
-
return /* @__PURE__ */
|
|
15367
|
+
if (loading) return /* @__PURE__ */ jsx127("div", { className: "ss-w-mon-list" });
|
|
15368
|
+
return /* @__PURE__ */ jsx127("div", { className: "ss-w-mon-empty", children: ui.clubFixturesEmpty });
|
|
15271
15369
|
}
|
|
15272
|
-
return /* @__PURE__ */
|
|
15273
|
-
group.round && /* @__PURE__ */
|
|
15370
|
+
return /* @__PURE__ */ jsx127("div", { className: "ss-w-mon-list", children: groupByRound(fixtures).map((group, gi) => /* @__PURE__ */ jsxs113("div", { children: [
|
|
15371
|
+
group.round && /* @__PURE__ */ jsx127("div", { className: "ss-w-club-eyebrow", children: group.round }),
|
|
15274
15372
|
group.items.map((fx) => {
|
|
15275
15373
|
const played = fx.homeScore !== null && fx.awayScore !== null;
|
|
15276
15374
|
const kickoff = fx.matchDateTime ? ui.bettingKickoff(fx.matchDateTime) : null;
|
|
15277
|
-
return /* @__PURE__ */
|
|
15278
|
-
/* @__PURE__ */
|
|
15279
|
-
fx.competitionName && /* @__PURE__ */
|
|
15280
|
-
!played && kickoff && /* @__PURE__ */
|
|
15375
|
+
return /* @__PURE__ */ jsxs113("div", { className: "ss-w-mon", children: [
|
|
15376
|
+
/* @__PURE__ */ jsxs113("div", { className: "ss-w-mon-top", children: [
|
|
15377
|
+
fx.competitionName && /* @__PURE__ */ jsx127("span", { className: "ss-w-mon-comp", children: fx.competitionName }),
|
|
15378
|
+
!played && kickoff && /* @__PURE__ */ jsxs113("span", { className: "ss-w-mon-pill", children: [
|
|
15281
15379
|
kickoff.dayLabel,
|
|
15282
15380
|
" \xB7 ",
|
|
15283
15381
|
kickoff.time
|
|
15284
15382
|
] })
|
|
15285
15383
|
] }),
|
|
15286
|
-
/* @__PURE__ */
|
|
15287
|
-
/* @__PURE__ */
|
|
15288
|
-
played ? /* @__PURE__ */
|
|
15384
|
+
/* @__PURE__ */ jsxs113("div", { className: "ss-w-mon-main", children: [
|
|
15385
|
+
/* @__PURE__ */ jsx127("span", { className: "ss-w-mon-side", children: /* @__PURE__ */ jsx127("span", { className: "ss-w-mon-name", children: fx.homeTeamName }) }),
|
|
15386
|
+
played ? /* @__PURE__ */ jsxs113("span", { className: "ss-w-mon-score", children: [
|
|
15289
15387
|
fx.homeScore,
|
|
15290
|
-
/* @__PURE__ */
|
|
15388
|
+
/* @__PURE__ */ jsx127("i", { children: "-" }),
|
|
15291
15389
|
fx.awayScore
|
|
15292
|
-
] }) : /* @__PURE__ */
|
|
15293
|
-
/* @__PURE__ */
|
|
15390
|
+
] }) : /* @__PURE__ */ jsx127("span", { className: "ss-w-mon-vs", children: "vs" }),
|
|
15391
|
+
/* @__PURE__ */ jsx127("span", { className: "ss-w-mon-side ss-w-mon-side--away", children: /* @__PURE__ */ jsx127("span", { className: "ss-w-mon-name", children: fx.awayTeamName }) })
|
|
15294
15392
|
] })
|
|
15295
15393
|
] }, fx.id);
|
|
15296
15394
|
})
|
|
@@ -15298,7 +15396,7 @@ function Fixtures({ fixtures, loading, ui }) {
|
|
|
15298
15396
|
}
|
|
15299
15397
|
|
|
15300
15398
|
// src/components/Standings.tsx
|
|
15301
|
-
import { jsx as
|
|
15399
|
+
import { jsx as jsx128, jsxs as jsxs114 } from "react/jsx-runtime";
|
|
15302
15400
|
function groupByTable(rows) {
|
|
15303
15401
|
const groups = [];
|
|
15304
15402
|
for (const row of rows) {
|
|
@@ -15309,30 +15407,30 @@ function groupByTable(rows) {
|
|
|
15309
15407
|
return groups;
|
|
15310
15408
|
}
|
|
15311
15409
|
function Standings({ standings, loading, ui }) {
|
|
15312
|
-
if (standings === null && loading) return /* @__PURE__ */
|
|
15313
|
-
if (standings === null || standings.length === 0) return /* @__PURE__ */
|
|
15314
|
-
return /* @__PURE__ */
|
|
15315
|
-
group.table && /* @__PURE__ */
|
|
15316
|
-
/* @__PURE__ */
|
|
15317
|
-
/* @__PURE__ */
|
|
15318
|
-
/* @__PURE__ */
|
|
15319
|
-
/* @__PURE__ */
|
|
15320
|
-
/* @__PURE__ */
|
|
15321
|
-
/* @__PURE__ */
|
|
15322
|
-
/* @__PURE__ */
|
|
15323
|
-
/* @__PURE__ */
|
|
15324
|
-
/* @__PURE__ */
|
|
15325
|
-
/* @__PURE__ */
|
|
15410
|
+
if (standings === null && loading) return /* @__PURE__ */ jsx128("div", { className: "ss-w-mon-list" });
|
|
15411
|
+
if (standings === null || standings.length === 0) return /* @__PURE__ */ jsx128("div", { className: "ss-w-mon-empty", children: ui.clubStandingsEmpty });
|
|
15412
|
+
return /* @__PURE__ */ jsx128("div", { className: "ss-w-mon-list", children: groupByTable(standings).map((group, gi) => /* @__PURE__ */ jsxs114("div", { className: "ss-w-table-wrap", children: [
|
|
15413
|
+
group.table && /* @__PURE__ */ jsx128("div", { className: "ss-w-club-eyebrow", children: group.table }),
|
|
15414
|
+
/* @__PURE__ */ jsxs114("table", { className: "ss-w-md-table", children: [
|
|
15415
|
+
/* @__PURE__ */ jsx128("thead", { children: /* @__PURE__ */ jsxs114("tr", { children: [
|
|
15416
|
+
/* @__PURE__ */ jsx128("th", { children: "#" }),
|
|
15417
|
+
/* @__PURE__ */ jsx128("th", { children: ui.standingsColClub }),
|
|
15418
|
+
/* @__PURE__ */ jsx128("th", { children: ui.standingsColPlayed }),
|
|
15419
|
+
/* @__PURE__ */ jsx128("th", { children: ui.standingsColWon }),
|
|
15420
|
+
/* @__PURE__ */ jsx128("th", { children: ui.standingsColDrawn }),
|
|
15421
|
+
/* @__PURE__ */ jsx128("th", { children: ui.standingsColLost }),
|
|
15422
|
+
/* @__PURE__ */ jsx128("th", { children: ui.standingsColGoalDiff }),
|
|
15423
|
+
/* @__PURE__ */ jsx128("th", { children: ui.standingsColPoints })
|
|
15326
15424
|
] }) }),
|
|
15327
|
-
/* @__PURE__ */
|
|
15328
|
-
/* @__PURE__ */
|
|
15329
|
-
/* @__PURE__ */
|
|
15330
|
-
/* @__PURE__ */
|
|
15331
|
-
/* @__PURE__ */
|
|
15332
|
-
/* @__PURE__ */
|
|
15333
|
-
/* @__PURE__ */
|
|
15334
|
-
/* @__PURE__ */
|
|
15335
|
-
/* @__PURE__ */
|
|
15425
|
+
/* @__PURE__ */ jsx128("tbody", { children: group.items.map((row) => /* @__PURE__ */ jsxs114("tr", { children: [
|
|
15426
|
+
/* @__PURE__ */ jsx128("td", { children: row.position }),
|
|
15427
|
+
/* @__PURE__ */ jsx128("td", { children: row.teamName }),
|
|
15428
|
+
/* @__PURE__ */ jsx128("td", { children: row.playedGames }),
|
|
15429
|
+
/* @__PURE__ */ jsx128("td", { children: row.wins }),
|
|
15430
|
+
/* @__PURE__ */ jsx128("td", { children: row.draws }),
|
|
15431
|
+
/* @__PURE__ */ jsx128("td", { children: row.losses }),
|
|
15432
|
+
/* @__PURE__ */ jsx128("td", { children: row.goalDifference }),
|
|
15433
|
+
/* @__PURE__ */ jsx128("td", { children: row.points })
|
|
15336
15434
|
] }, row.teamId)) })
|
|
15337
15435
|
] })
|
|
15338
15436
|
] }, `${gi}-${group.table ?? "none"}`)) });
|
|
@@ -15390,7 +15488,7 @@ function statsEyebrow(ui, season, competition, matches) {
|
|
|
15390
15488
|
}
|
|
15391
15489
|
|
|
15392
15490
|
// src/components/SquadStats.tsx
|
|
15393
|
-
import { jsx as
|
|
15491
|
+
import { jsx as jsx129, jsxs as jsxs115 } from "react/jsx-runtime";
|
|
15394
15492
|
function leader(stats, pick) {
|
|
15395
15493
|
let best = null;
|
|
15396
15494
|
for (const p of stats) {
|
|
@@ -15404,53 +15502,53 @@ function ratingClass(rating) {
|
|
|
15404
15502
|
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";
|
|
15405
15503
|
}
|
|
15406
15504
|
function SquadStats({ stats, loading, ui, onSelectPlayer }) {
|
|
15407
|
-
if (stats === null && loading) return /* @__PURE__ */
|
|
15408
|
-
if (stats === null || stats.length === 0) return /* @__PURE__ */
|
|
15505
|
+
if (stats === null && loading) return /* @__PURE__ */ jsx129("div", { className: "ss-w-mon-list" });
|
|
15506
|
+
if (stats === null || stats.length === 0) return /* @__PURE__ */ jsx129("div", { className: "ss-w-mon-empty", children: ui.clubSquadStatsEmpty });
|
|
15409
15507
|
const scorer = leader(stats, (p) => p.goals);
|
|
15410
15508
|
const assister = leader(stats, (p) => p.assists);
|
|
15411
15509
|
const footer = [
|
|
15412
15510
|
scorer && ui.squadTopScorer(scorer.playerName, scorer.goals),
|
|
15413
15511
|
assister && ui.squadTopAssists(assister.playerName, assister.assists)
|
|
15414
15512
|
].filter((part) => !!part).join(" \xB7 ");
|
|
15415
|
-
return /* @__PURE__ */
|
|
15416
|
-
/* @__PURE__ */
|
|
15417
|
-
/* @__PURE__ */
|
|
15418
|
-
/* @__PURE__ */
|
|
15419
|
-
/* @__PURE__ */
|
|
15420
|
-
/* @__PURE__ */
|
|
15421
|
-
/* @__PURE__ */
|
|
15422
|
-
/* @__PURE__ */
|
|
15423
|
-
/* @__PURE__ */
|
|
15424
|
-
/* @__PURE__ */
|
|
15425
|
-
/* @__PURE__ */
|
|
15426
|
-
/* @__PURE__ */
|
|
15513
|
+
return /* @__PURE__ */ jsxs115("div", { className: "ss-w-mon-list ss-w-sq-stats", children: [
|
|
15514
|
+
/* @__PURE__ */ jsxs115("div", { className: "ss-w-sq-card", children: [
|
|
15515
|
+
/* @__PURE__ */ jsxs115("div", { className: "ss-w-sq-row ss-w-sq-head", "aria-hidden": "true", children: [
|
|
15516
|
+
/* @__PURE__ */ jsx129("span", { className: "ss-w-sq-name" }),
|
|
15517
|
+
/* @__PURE__ */ jsx129("span", { className: "ss-w-sq-pos", children: ui.statHeadPos }),
|
|
15518
|
+
/* @__PURE__ */ jsx129("span", { className: "ss-w-sq-c30", children: ui.statColApps }),
|
|
15519
|
+
/* @__PURE__ */ jsx129("span", { className: "ss-w-sq-c36", children: ui.statHeadMins }),
|
|
15520
|
+
/* @__PURE__ */ jsx129("span", { className: "ss-w-sq-c20", children: ui.statHeadGoals }),
|
|
15521
|
+
/* @__PURE__ */ jsx129("span", { className: "ss-w-sq-c20", children: ui.statHeadAssists }),
|
|
15522
|
+
/* @__PURE__ */ jsx129("span", { className: "ss-w-sq-c20 ss-w-sq-yr", children: ui.statHeadYellow }),
|
|
15523
|
+
/* @__PURE__ */ jsx129("span", { className: "ss-w-sq-c20 ss-w-sq-yr", children: ui.statHeadRed }),
|
|
15524
|
+
/* @__PURE__ */ jsx129("span", { className: "ss-w-sq-c36", children: ui.statHeadRating })
|
|
15427
15525
|
] }),
|
|
15428
|
-
stats.map((p) => /* @__PURE__ */
|
|
15429
|
-
/* @__PURE__ */
|
|
15430
|
-
p.jerseyNumber !== null && /* @__PURE__ */
|
|
15431
|
-
/* @__PURE__ */
|
|
15526
|
+
stats.map((p) => /* @__PURE__ */ jsxs115("button", { type: "button", className: "ss-w-sq-row ss-w-sq-tap", onClick: () => onSelectPlayer(p.playerId), children: [
|
|
15527
|
+
/* @__PURE__ */ jsxs115("span", { className: "ss-w-sq-player", children: [
|
|
15528
|
+
p.jerseyNumber !== null && /* @__PURE__ */ jsx129("span", { className: "ss-w-sq-badge", children: p.jerseyNumber }),
|
|
15529
|
+
/* @__PURE__ */ jsx129("span", { className: "ss-w-sq-name ss-w-sq-name-1", children: p.playerName })
|
|
15432
15530
|
] }),
|
|
15433
|
-
/* @__PURE__ */
|
|
15434
|
-
/* @__PURE__ */
|
|
15435
|
-
/* @__PURE__ */
|
|
15436
|
-
/* @__PURE__ */
|
|
15437
|
-
/* @__PURE__ */
|
|
15438
|
-
/* @__PURE__ */
|
|
15439
|
-
/* @__PURE__ */
|
|
15440
|
-
/* @__PURE__ */
|
|
15531
|
+
/* @__PURE__ */ jsx129("span", { className: "ss-w-sq-pos", children: positionShort(p.positionCode, p.positionName) }),
|
|
15532
|
+
/* @__PURE__ */ jsx129("span", { className: "ss-w-sq-c30", children: p.appearances }),
|
|
15533
|
+
/* @__PURE__ */ jsx129("span", { className: "ss-w-sq-c36", children: p.minutesPlayed }),
|
|
15534
|
+
/* @__PURE__ */ jsx129("span", { className: "ss-w-sq-c20", children: p.goals }),
|
|
15535
|
+
/* @__PURE__ */ jsx129("span", { className: "ss-w-sq-c20", children: p.assists }),
|
|
15536
|
+
/* @__PURE__ */ jsx129("span", { className: "ss-w-sq-c20 ss-w-sq-yr", children: p.yellowCards }),
|
|
15537
|
+
/* @__PURE__ */ jsx129("span", { className: "ss-w-sq-c20 ss-w-sq-yr", children: p.redCards }),
|
|
15538
|
+
/* @__PURE__ */ jsx129("span", { className: ratingClass(p.averageRating), children: p.averageRating === null ? "\u2013" : p.averageRating.toFixed(1) })
|
|
15441
15539
|
] }, p.playerId))
|
|
15442
15540
|
] }),
|
|
15443
|
-
footer !== "" && /* @__PURE__ */
|
|
15541
|
+
footer !== "" && /* @__PURE__ */ jsx129("div", { className: "ss-w-sq-foot", children: footer })
|
|
15444
15542
|
] });
|
|
15445
15543
|
}
|
|
15446
15544
|
|
|
15447
15545
|
// src/components/Squad.tsx
|
|
15448
|
-
import { Fragment as Fragment37, jsx as
|
|
15546
|
+
import { Fragment as Fragment37, jsx as jsx130, jsxs as jsxs116 } from "react/jsx-runtime";
|
|
15449
15547
|
function Squad({ squad, loading, ui, view, onToggleView, stats, statsLoading, seasonName = null, competitionName = null, matchesPlayed = null, onSelectPlayer }) {
|
|
15450
15548
|
const eyebrow = view === "stats" ? statsEyebrow(ui, seasonName, competitionName, matchesPlayed) : null;
|
|
15451
|
-
const toggle = /* @__PURE__ */
|
|
15452
|
-
eyebrow !== null && /* @__PURE__ */
|
|
15453
|
-
/* @__PURE__ */
|
|
15549
|
+
const toggle = /* @__PURE__ */ jsxs116("div", { className: "ss-w-sq-bar", children: [
|
|
15550
|
+
eyebrow !== null && /* @__PURE__ */ jsx130("div", { className: "ss-w-sq-eyebrow", children: eyebrow }),
|
|
15551
|
+
/* @__PURE__ */ jsx130("div", { className: "ss-w-sq-seg", role: "group", children: ["roster", "stats"].map((v) => /* @__PURE__ */ jsx130(
|
|
15454
15552
|
"button",
|
|
15455
15553
|
{
|
|
15456
15554
|
type: "button",
|
|
@@ -15465,26 +15563,26 @@ function Squad({ squad, loading, ui, view, onToggleView, stats, statsLoading, se
|
|
|
15465
15563
|
)) })
|
|
15466
15564
|
] });
|
|
15467
15565
|
if (view === "stats") {
|
|
15468
|
-
return /* @__PURE__ */
|
|
15566
|
+
return /* @__PURE__ */ jsxs116(Fragment37, { children: [
|
|
15469
15567
|
toggle,
|
|
15470
|
-
/* @__PURE__ */
|
|
15568
|
+
/* @__PURE__ */ jsx130(SquadStats, { stats, loading: statsLoading, ui, onSelectPlayer })
|
|
15471
15569
|
] });
|
|
15472
15570
|
}
|
|
15473
|
-
if (squad === null && loading) return /* @__PURE__ */
|
|
15571
|
+
if (squad === null && loading) return /* @__PURE__ */ jsxs116(Fragment37, { children: [
|
|
15474
15572
|
toggle,
|
|
15475
|
-
/* @__PURE__ */
|
|
15573
|
+
/* @__PURE__ */ jsx130("div", { className: "ss-w-mon-list" })
|
|
15476
15574
|
] });
|
|
15477
|
-
if (squad === null || squad.length === 0) return /* @__PURE__ */
|
|
15575
|
+
if (squad === null || squad.length === 0) return /* @__PURE__ */ jsxs116(Fragment37, { children: [
|
|
15478
15576
|
toggle,
|
|
15479
|
-
/* @__PURE__ */
|
|
15577
|
+
/* @__PURE__ */ jsx130("div", { className: "ss-w-mon-empty", children: ui.clubSquadEmpty })
|
|
15480
15578
|
] });
|
|
15481
|
-
return /* @__PURE__ */
|
|
15579
|
+
return /* @__PURE__ */ jsxs116(Fragment37, { children: [
|
|
15482
15580
|
toggle,
|
|
15483
|
-
/* @__PURE__ */
|
|
15484
|
-
group.positionName && /* @__PURE__ */
|
|
15485
|
-
group.items.map((p) => /* @__PURE__ */
|
|
15486
|
-
/* @__PURE__ */
|
|
15487
|
-
/* @__PURE__ */
|
|
15581
|
+
/* @__PURE__ */ jsx130("div", { className: "ss-w-mon-list", children: groupByPosition(squad).map((group, gi) => /* @__PURE__ */ jsxs116("div", { children: [
|
|
15582
|
+
group.positionName && /* @__PURE__ */ jsx130("div", { className: "ss-w-club-eyebrow", children: positionLabel(ui, group.positionName) }),
|
|
15583
|
+
group.items.map((p) => /* @__PURE__ */ jsxs116("button", { type: "button", className: "ss-w-sq-row ss-w-sq-tap", onClick: () => onSelectPlayer(p.playerId), children: [
|
|
15584
|
+
/* @__PURE__ */ jsx130("span", { className: "ss-w-sq-num", children: p.jerseyNumber ?? "" }),
|
|
15585
|
+
/* @__PURE__ */ jsx130("span", { className: "ss-w-sq-name", children: p.playerName })
|
|
15488
15586
|
] }, p.playerId))
|
|
15489
15587
|
] }, `${gi}-${group.positionName ?? "none"}`)) })
|
|
15490
15588
|
] });
|
|
@@ -15492,18 +15590,18 @@ function Squad({ squad, loading, ui, view, onToggleView, stats, statsLoading, se
|
|
|
15492
15590
|
|
|
15493
15591
|
// src/components/PlayerPhoto.tsx
|
|
15494
15592
|
import { useState as useState68 } from "react";
|
|
15495
|
-
import { jsx as
|
|
15593
|
+
import { jsx as jsx131 } from "react/jsx-runtime";
|
|
15496
15594
|
function PlayerPhoto({ photoUrl, jerseyNumber, size }) {
|
|
15497
15595
|
const [failed, setFailed] = useState68(false);
|
|
15498
15596
|
const box = { width: size, height: size };
|
|
15499
15597
|
if (photoUrl && !failed) {
|
|
15500
|
-
return /* @__PURE__ */
|
|
15598
|
+
return /* @__PURE__ */ jsx131("img", { className: "ss-w-pd-photo", style: box, src: photoUrl, alt: "", "aria-hidden": "true", onError: () => setFailed(true) });
|
|
15501
15599
|
}
|
|
15502
|
-
return /* @__PURE__ */
|
|
15600
|
+
return /* @__PURE__ */ jsx131("span", { className: "ss-w-pd-photo ss-w-pd-avatar", style: { ...box, fontSize: Math.round(size * 0.35) }, "aria-hidden": "true", children: jerseyNumber ?? "" });
|
|
15503
15601
|
}
|
|
15504
15602
|
|
|
15505
15603
|
// src/components/MiniPitch.tsx
|
|
15506
|
-
import { jsx as
|
|
15604
|
+
import { jsx as jsx132 } from "react/jsx-runtime";
|
|
15507
15605
|
var SPOT = {
|
|
15508
15606
|
GK: [50, 90],
|
|
15509
15607
|
CB: [50, 75],
|
|
@@ -15525,12 +15623,12 @@ var SPOT = {
|
|
|
15525
15623
|
function MiniPitch({ positionCode }) {
|
|
15526
15624
|
const spot = SPOT[positionCode?.trim().toUpperCase() ?? ""];
|
|
15527
15625
|
if (spot === void 0) return null;
|
|
15528
|
-
return /* @__PURE__ */
|
|
15626
|
+
return /* @__PURE__ */ jsx132("div", { className: "ss-w-pd-pitch", "aria-hidden": "true", children: /* @__PURE__ */ jsx132("div", { className: "ss-w-pd-pitch-dot", style: { left: `${spot[0]}%`, top: `${spot[1]}%` } }) });
|
|
15529
15627
|
}
|
|
15530
15628
|
|
|
15531
15629
|
// src/components/PerformanceBars.tsx
|
|
15532
15630
|
import { useState as useState69 } from "react";
|
|
15533
|
-
import { jsx as
|
|
15631
|
+
import { jsx as jsx133, jsxs as jsxs117 } from "react/jsx-runtime";
|
|
15534
15632
|
var GROUPS = ["shooting", "passing", "possession", "defending"];
|
|
15535
15633
|
function finite3(v) {
|
|
15536
15634
|
return typeof v === "number" && Number.isFinite(v) ? v : null;
|
|
@@ -15582,33 +15680,33 @@ function PerformanceBars({ performance, competitionName, strings }) {
|
|
|
15582
15680
|
const cards = GROUPS.map((g) => {
|
|
15583
15681
|
const rows = labelled.filter((m) => m.group === g && valueOf(m, mode) !== null);
|
|
15584
15682
|
if (rows.length === 0) return null;
|
|
15585
|
-
return /* @__PURE__ */
|
|
15586
|
-
/* @__PURE__ */
|
|
15683
|
+
return /* @__PURE__ */ jsxs117("div", { className: "ss-w-pd-card ss-w-pd-perf-card", children: [
|
|
15684
|
+
/* @__PURE__ */ jsx133("div", { className: "ss-w-pd-perf-group", children: groupTitle(strings, g) }),
|
|
15587
15685
|
rows.map((m) => {
|
|
15588
15686
|
const v = valueOf(m, mode);
|
|
15589
15687
|
const rank2 = performance.ranked ? rankOf(m, mode) : null;
|
|
15590
|
-
return /* @__PURE__ */
|
|
15591
|
-
/* @__PURE__ */
|
|
15592
|
-
/* @__PURE__ */
|
|
15593
|
-
/* @__PURE__ */
|
|
15688
|
+
return /* @__PURE__ */ jsxs117("div", { className: "ss-w-pd-bar-row", children: [
|
|
15689
|
+
/* @__PURE__ */ jsxs117("div", { className: "ss-w-pd-bar-top", children: [
|
|
15690
|
+
/* @__PURE__ */ jsx133("span", { className: "ss-w-pd-bar-label", children: strings.perfMetric[m.key] }),
|
|
15691
|
+
/* @__PURE__ */ jsx133("span", { className: "ss-w-pd-bar-value", children: format(m, v, mode) })
|
|
15594
15692
|
] }),
|
|
15595
|
-
rank2 !== null && /* @__PURE__ */
|
|
15693
|
+
rank2 !== null && /* @__PURE__ */ jsx133("div", { className: "ss-w-pd-track", children: /* @__PURE__ */ jsx133("div", { className: `ss-w-pd-fill ss-w-pd-fill--${band(rank2)}`, style: { width: `${rank2}%` } }) })
|
|
15596
15694
|
] }, m.key);
|
|
15597
15695
|
})
|
|
15598
15696
|
] }, g);
|
|
15599
15697
|
});
|
|
15600
|
-
return /* @__PURE__ */
|
|
15601
|
-
/* @__PURE__ */
|
|
15602
|
-
/* @__PURE__ */
|
|
15603
|
-
/* @__PURE__ */
|
|
15698
|
+
return /* @__PURE__ */ jsxs117("div", { children: [
|
|
15699
|
+
/* @__PURE__ */ jsxs117("div", { className: "ss-w-pd-perf-head", children: [
|
|
15700
|
+
/* @__PURE__ */ jsx133("div", { className: "ss-w-pd-eyebrow", children: strings.perfTitle }),
|
|
15701
|
+
/* @__PURE__ */ jsx133("div", { className: "ss-w-pd-seg", role: "group", children: ["total", "per90"].map((m) => /* @__PURE__ */ jsx133("button", { type: "button", className: "ss-w-pd-seg-btn", "aria-pressed": mode === m, onClick: () => setMode(m), children: m === "total" ? strings.perfTotal : strings.perfPer90 }, m)) })
|
|
15604
15702
|
] }),
|
|
15605
|
-
subtitle !== null && /* @__PURE__ */
|
|
15606
|
-
/* @__PURE__ */
|
|
15703
|
+
subtitle !== null && /* @__PURE__ */ jsx133("div", { className: "ss-w-pd-perf-sub", children: subtitle }),
|
|
15704
|
+
/* @__PURE__ */ jsx133("div", { className: "ss-w-pd-perf-cards", children: cards })
|
|
15607
15705
|
] });
|
|
15608
15706
|
}
|
|
15609
15707
|
|
|
15610
15708
|
// src/components/PlayerDetail.tsx
|
|
15611
|
-
import { Fragment as Fragment38, jsx as
|
|
15709
|
+
import { Fragment as Fragment38, jsx as jsx134, jsxs as jsxs118 } from "react/jsx-runtime";
|
|
15612
15710
|
var DASH = "\u2014";
|
|
15613
15711
|
function ageFrom(dobMs) {
|
|
15614
15712
|
if (dobMs === null) return DASH;
|
|
@@ -15628,16 +15726,16 @@ function ratingTone(rounded) {
|
|
|
15628
15726
|
return "neg";
|
|
15629
15727
|
}
|
|
15630
15728
|
function Bio({ label, value }) {
|
|
15631
|
-
return /* @__PURE__ */
|
|
15632
|
-
/* @__PURE__ */
|
|
15729
|
+
return /* @__PURE__ */ jsxs118("div", { className: "ss-w-pd-bio-item", children: [
|
|
15730
|
+
/* @__PURE__ */ jsx134("span", { className: "ss-w-pd-faint", children: label }),
|
|
15633
15731
|
" ",
|
|
15634
|
-
/* @__PURE__ */
|
|
15732
|
+
/* @__PURE__ */ jsx134("span", { children: value })
|
|
15635
15733
|
] });
|
|
15636
15734
|
}
|
|
15637
15735
|
function Tile({ label, value, pos }) {
|
|
15638
|
-
return /* @__PURE__ */
|
|
15639
|
-
/* @__PURE__ */
|
|
15640
|
-
/* @__PURE__ */
|
|
15736
|
+
return /* @__PURE__ */ jsxs118("div", { className: "ss-w-pd-tile", children: [
|
|
15737
|
+
/* @__PURE__ */ jsx134("div", { className: "ss-w-pd-tile-label", children: label }),
|
|
15738
|
+
/* @__PURE__ */ jsx134("div", { className: pos ? "ss-w-pd-tile-value ss-w-pd-pos-ink" : "ss-w-pd-tile-value", children: value })
|
|
15641
15739
|
] });
|
|
15642
15740
|
}
|
|
15643
15741
|
function AvailabilityCard({ ui, next, availability }) {
|
|
@@ -15653,12 +15751,12 @@ function AvailabilityCard({ ui, next, availability }) {
|
|
|
15653
15751
|
pill = availability.status === "injured" ? { text: ui.availabilityInjured, tone: "neg" } : availability.status === "suspended" ? { text: ui.availabilitySuspended, tone: "warn" } : { text: ui.availabilityUnavailable, tone: "warn" };
|
|
15654
15752
|
}
|
|
15655
15753
|
}
|
|
15656
|
-
return /* @__PURE__ */
|
|
15657
|
-
/* @__PURE__ */
|
|
15658
|
-
next !== null && /* @__PURE__ */
|
|
15659
|
-
note !== null && /* @__PURE__ */
|
|
15754
|
+
return /* @__PURE__ */ jsxs118("div", { className: "ss-w-pd-card ss-w-pd-avail", children: [
|
|
15755
|
+
/* @__PURE__ */ jsxs118("div", { className: "ss-w-pd-avail-text", children: [
|
|
15756
|
+
next !== null && /* @__PURE__ */ jsx134("div", { className: "ss-w-pd-avail-next", children: ui.availabilityNext(next.opponentName, next.isHome, validMs(next.kickoffUnixMs)) }),
|
|
15757
|
+
note !== null && /* @__PURE__ */ jsx134("div", { className: "ss-w-pd-avail-note", children: note })
|
|
15660
15758
|
] }),
|
|
15661
|
-
pill !== null && /* @__PURE__ */
|
|
15759
|
+
pill !== null && /* @__PURE__ */ jsx134("div", { className: `ss-w-pd-pill ss-w-pd-pill--${pill.tone}`, children: pill.text })
|
|
15662
15760
|
] });
|
|
15663
15761
|
}
|
|
15664
15762
|
function MatchRow({ ui, row }) {
|
|
@@ -15672,28 +15770,28 @@ function MatchRow({ ui, row }) {
|
|
|
15672
15770
|
const sub = [`${ui.resultLetter[row.result]} ${row.goalsFor}\u2013${row.goalsAgainst}`, `${row.minutes}\u2032`, ...extras].join(" \xB7 ");
|
|
15673
15771
|
const rating = typeof row.rating === "number" && Number.isFinite(row.rating) ? Math.round(row.rating * 10) / 10 : null;
|
|
15674
15772
|
const pillTone = row.result === "W" ? "pos" : row.result === "L" ? "neg" : "draw";
|
|
15675
|
-
return /* @__PURE__ */
|
|
15676
|
-
/* @__PURE__ */
|
|
15677
|
-
/* @__PURE__ */
|
|
15678
|
-
/* @__PURE__ */
|
|
15679
|
-
/* @__PURE__ */
|
|
15773
|
+
return /* @__PURE__ */ jsxs118("div", { className: "ss-w-pd-match", children: [
|
|
15774
|
+
/* @__PURE__ */ jsx134("div", { className: "ss-w-pd-match-date", children: date === null ? "" : ui.logShortDate(date) }),
|
|
15775
|
+
/* @__PURE__ */ jsxs118("div", { className: "ss-w-pd-match-main", children: [
|
|
15776
|
+
/* @__PURE__ */ jsx134("div", { className: "ss-w-pd-match-opp", children: ui.matchLogOpponent(row.opponentName, row.isHome) }),
|
|
15777
|
+
/* @__PURE__ */ jsx134("div", { className: "ss-w-pd-match-sub", children: sub })
|
|
15680
15778
|
] }),
|
|
15681
|
-
/* @__PURE__ */
|
|
15682
|
-
rating === null ? /* @__PURE__ */
|
|
15779
|
+
/* @__PURE__ */ jsx134("div", { className: `ss-w-pd-pill ss-w-pd-pill--${pillTone}`, children: ui.resultLetter[row.result] }),
|
|
15780
|
+
rating === null ? /* @__PURE__ */ jsx134("div", { className: "ss-w-pd-chip-empty" }) : /* @__PURE__ */ jsx134("div", { className: `ss-w-pd-chip ss-w-pd-chip--${ratingTone(rating)}`, children: rating.toFixed(1) })
|
|
15683
15781
|
] });
|
|
15684
15782
|
}
|
|
15685
15783
|
function PlayerDetail({ detail, loading, ui, seasonName, onClose }) {
|
|
15686
|
-
const back = /* @__PURE__ */
|
|
15687
|
-
/* @__PURE__ */
|
|
15784
|
+
const back = /* @__PURE__ */ jsxs118("button", { type: "button", className: "ss-w-pd-back", onClick: onClose, children: [
|
|
15785
|
+
/* @__PURE__ */ jsx134("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__ */ jsx134("path", { d: "M15 18l-6-6 6-6" }) }),
|
|
15688
15786
|
ui.clubPlayerBack
|
|
15689
15787
|
] });
|
|
15690
15788
|
if (detail === null) {
|
|
15691
|
-
return loading ? /* @__PURE__ */
|
|
15692
|
-
/* @__PURE__ */
|
|
15693
|
-
/* @__PURE__ */
|
|
15694
|
-
] }) : /* @__PURE__ */
|
|
15695
|
-
/* @__PURE__ */
|
|
15696
|
-
/* @__PURE__ */
|
|
15789
|
+
return loading ? /* @__PURE__ */ jsxs118(Fragment38, { children: [
|
|
15790
|
+
/* @__PURE__ */ jsx134("div", { className: "ss-w-pd-bar", children: back }),
|
|
15791
|
+
/* @__PURE__ */ jsx134("div", { className: "ss-w-mon-list" })
|
|
15792
|
+
] }) : /* @__PURE__ */ jsxs118(Fragment38, { children: [
|
|
15793
|
+
/* @__PURE__ */ jsx134("div", { className: "ss-w-pd-bar", children: back }),
|
|
15794
|
+
/* @__PURE__ */ jsx134("div", { className: "ss-w-mon-empty", children: ui.clubPlayerDetailEmpty })
|
|
15697
15795
|
] });
|
|
15698
15796
|
}
|
|
15699
15797
|
const s = detail.seasonStats;
|
|
@@ -15706,41 +15804,41 @@ function PlayerDetail({ detail, loading, ui, seasonName, onClose }) {
|
|
|
15706
15804
|
const next = detail.nextFixture ?? null;
|
|
15707
15805
|
const availability = detail.availability ?? null;
|
|
15708
15806
|
const log = detail.matchLog ?? [];
|
|
15709
|
-
return /* @__PURE__ */
|
|
15710
|
-
/* @__PURE__ */
|
|
15711
|
-
/* @__PURE__ */
|
|
15712
|
-
/* @__PURE__ */
|
|
15713
|
-
/* @__PURE__ */
|
|
15714
|
-
/* @__PURE__ */
|
|
15715
|
-
/* @__PURE__ */
|
|
15716
|
-
subLine !== "" && /* @__PURE__ */
|
|
15717
|
-
/* @__PURE__ */
|
|
15718
|
-
/* @__PURE__ */
|
|
15719
|
-
/* @__PURE__ */
|
|
15720
|
-
foot !== null && /* @__PURE__ */
|
|
15721
|
-
/* @__PURE__ */
|
|
15807
|
+
return /* @__PURE__ */ jsxs118(Fragment38, { children: [
|
|
15808
|
+
/* @__PURE__ */ jsx134("div", { className: "ss-w-pd-bar", children: back }),
|
|
15809
|
+
/* @__PURE__ */ jsxs118("div", { className: "ss-w-mon-list ss-w-pd-list", children: [
|
|
15810
|
+
/* @__PURE__ */ jsxs118("div", { className: "ss-w-pd-card ss-w-pd-profile", children: [
|
|
15811
|
+
/* @__PURE__ */ jsx134(PlayerPhoto, { photoUrl: detail.photoUrl, jerseyNumber: detail.jerseyNumber, size: 52 }, detail.photoUrl ?? ""),
|
|
15812
|
+
/* @__PURE__ */ jsxs118("div", { className: "ss-w-pd-profile-main", children: [
|
|
15813
|
+
/* @__PURE__ */ jsx134("div", { className: "ss-w-pd-name", children: detail.playerName }),
|
|
15814
|
+
subLine !== "" && /* @__PURE__ */ jsx134("div", { className: "ss-w-pd-sub", children: subLine }),
|
|
15815
|
+
/* @__PURE__ */ jsxs118("div", { className: "ss-w-pd-bio", children: [
|
|
15816
|
+
/* @__PURE__ */ jsx134(Bio, { label: ui.detailAge, value: ageFrom(detail.dateOfBirthUnixMs) }),
|
|
15817
|
+
/* @__PURE__ */ jsx134(Bio, { label: ui.detailHeight, value: detail.heightCm === null ? DASH : `${detail.heightCm} cm` }),
|
|
15818
|
+
foot !== null && /* @__PURE__ */ jsx134(Bio, { label: ui.detailFoot, value: foot }),
|
|
15819
|
+
/* @__PURE__ */ jsx134(Bio, { label: ui.detailNatShort, value: detail.nationality ?? DASH })
|
|
15722
15820
|
] })
|
|
15723
15821
|
] }),
|
|
15724
|
-
/* @__PURE__ */
|
|
15822
|
+
/* @__PURE__ */ jsx134(MiniPitch, { positionCode: detail.positionCode })
|
|
15725
15823
|
] }),
|
|
15726
|
-
(next !== null || availability !== null) && /* @__PURE__ */
|
|
15727
|
-
/* @__PURE__ */
|
|
15728
|
-
eyebrow !== null && /* @__PURE__ */
|
|
15729
|
-
/* @__PURE__ */
|
|
15730
|
-
/* @__PURE__ */
|
|
15731
|
-
/* @__PURE__ */
|
|
15732
|
-
typeof s.starts === "number" && /* @__PURE__ */
|
|
15733
|
-
/* @__PURE__ */
|
|
15734
|
-
/* @__PURE__ */
|
|
15735
|
-
rating !== null && /* @__PURE__ */
|
|
15736
|
-
/* @__PURE__ */
|
|
15737
|
-
/* @__PURE__ */
|
|
15824
|
+
(next !== null || availability !== null) && /* @__PURE__ */ jsx134(AvailabilityCard, { ui, next, availability }),
|
|
15825
|
+
/* @__PURE__ */ jsxs118("div", { children: [
|
|
15826
|
+
eyebrow !== null && /* @__PURE__ */ jsx134("div", { className: "ss-w-pd-eyebrow ss-w-pd-eyebrow--block", children: eyebrow }),
|
|
15827
|
+
/* @__PURE__ */ jsxs118("div", { className: "ss-w-pd-tiles", children: [
|
|
15828
|
+
/* @__PURE__ */ jsx134(Tile, { label: ui.statColGoals, value: String(s.goals) }),
|
|
15829
|
+
/* @__PURE__ */ jsx134(Tile, { label: ui.statColAssists, value: String(s.assists) }),
|
|
15830
|
+
typeof s.starts === "number" && /* @__PURE__ */ jsx134(Tile, { label: ui.detailStarted, value: String(s.starts) }),
|
|
15831
|
+
/* @__PURE__ */ jsx134(Tile, { label: ui.detailMatches, value: String(s.appearances) }),
|
|
15832
|
+
/* @__PURE__ */ jsx134(Tile, { label: ui.statColMinutes, value: String(s.minutesPlayed) }),
|
|
15833
|
+
rating !== null && /* @__PURE__ */ jsx134(Tile, { label: ui.statColRating, value: rating.toFixed(2), pos: Math.round(rating * 100) / 100 >= 7 }),
|
|
15834
|
+
/* @__PURE__ */ jsx134(Tile, { label: ui.detailYellows, value: String(s.yellowCards) }),
|
|
15835
|
+
/* @__PURE__ */ jsx134(Tile, { label: ui.detailReds, value: String(s.redCards) })
|
|
15738
15836
|
] })
|
|
15739
15837
|
] }),
|
|
15740
|
-
detail.performance != null && /* @__PURE__ */
|
|
15741
|
-
log.length > 0 && /* @__PURE__ */
|
|
15742
|
-
/* @__PURE__ */
|
|
15743
|
-
/* @__PURE__ */
|
|
15838
|
+
detail.performance != null && /* @__PURE__ */ jsx134(PerformanceBars, { performance: detail.performance, competitionName: competition, strings: ui }),
|
|
15839
|
+
log.length > 0 && /* @__PURE__ */ jsxs118("div", { children: [
|
|
15840
|
+
/* @__PURE__ */ jsx134("div", { className: "ss-w-pd-eyebrow ss-w-pd-eyebrow--block", children: ui.matchLogTitle }),
|
|
15841
|
+
/* @__PURE__ */ jsx134("div", { className: "ss-w-pd-card ss-w-pd-log", children: log.map((row) => /* @__PURE__ */ jsx134(MatchRow, { ui, row }, row.matchId)) })
|
|
15744
15842
|
] })
|
|
15745
15843
|
] })
|
|
15746
15844
|
] });
|
|
@@ -15748,7 +15846,7 @@ function PlayerDetail({ detail, loading, ui, seasonName, onClose }) {
|
|
|
15748
15846
|
|
|
15749
15847
|
// src/components/PresetTools.tsx
|
|
15750
15848
|
import { useEffect as useEffect44, useId as useId10, useRef as useRef35, useState as useState70 } from "react";
|
|
15751
|
-
import { Fragment as Fragment39, jsx as
|
|
15849
|
+
import { Fragment as Fragment39, jsx as jsx135, jsxs as jsxs119 } from "react/jsx-runtime";
|
|
15752
15850
|
var FOCUSABLE = 'button:not([disabled]), [href], input:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
15753
15851
|
function PresetToolModal({ title, closeLabel, onClose, children, footer, className }) {
|
|
15754
15852
|
const dialogRef = useRef35(null);
|
|
@@ -15786,45 +15884,45 @@ function PresetToolModal({ title, closeLabel, onClose, children, footer, classNa
|
|
|
15786
15884
|
first.focus();
|
|
15787
15885
|
}
|
|
15788
15886
|
};
|
|
15789
|
-
return /* @__PURE__ */
|
|
15790
|
-
/* @__PURE__ */
|
|
15791
|
-
/* @__PURE__ */
|
|
15792
|
-
/* @__PURE__ */
|
|
15887
|
+
return /* @__PURE__ */ jsx135("div", { className: className ? `ss-w-tool-backdrop ${className}` : "ss-w-tool-backdrop", children: /* @__PURE__ */ jsxs119("div", { ref: dialogRef, className: "ss-w-tool", role: "dialog", "aria-modal": "true", "aria-labelledby": titleId, tabIndex: -1, onKeyDown: trapTab, children: [
|
|
15888
|
+
/* @__PURE__ */ jsxs119("div", { className: "ss-w-tool-head", children: [
|
|
15889
|
+
/* @__PURE__ */ jsx135("h2", { id: titleId, className: "ss-w-tool-title", children: title }),
|
|
15890
|
+
/* @__PURE__ */ jsx135("button", { type: "button", className: "ss-w-tool-close", "aria-label": closeLabel, onClick: onClose, children: /* @__PURE__ */ jsx135(CloseIcon, {}) })
|
|
15793
15891
|
] }),
|
|
15794
|
-
/* @__PURE__ */
|
|
15795
|
-
footer ? /* @__PURE__ */
|
|
15892
|
+
/* @__PURE__ */ jsx135("div", { className: "ss-w-tool-body", children }),
|
|
15893
|
+
footer ? /* @__PURE__ */ jsx135("div", { className: "ss-w-tool-foot", children: footer }) : null
|
|
15796
15894
|
] }) });
|
|
15797
15895
|
}
|
|
15798
15896
|
function SendButton({ label, display, disabled, onClick }) {
|
|
15799
|
-
return /* @__PURE__ */
|
|
15897
|
+
return /* @__PURE__ */ jsx135("button", { type: "button", className: "ss-w-tool-send", "aria-label": `${label}: ${display}`, disabled, onClick, children: label });
|
|
15800
15898
|
}
|
|
15801
15899
|
function PickList({ picks, formatKickoff }) {
|
|
15802
15900
|
const { oddsFormat } = useOddsSettings();
|
|
15803
|
-
return /* @__PURE__ */
|
|
15804
|
-
/* @__PURE__ */
|
|
15901
|
+
return /* @__PURE__ */ jsx135("ul", { className: "ss-w-tool-picks", role: "list", children: picks.map((p) => /* @__PURE__ */ jsxs119("li", { className: "ss-w-tool-pick", children: [
|
|
15902
|
+
/* @__PURE__ */ jsxs119("span", { className: "ss-w-tool-pick-match", children: [
|
|
15805
15903
|
p.homeTeamName,
|
|
15806
15904
|
" \u2013 ",
|
|
15807
15905
|
p.awayTeamName
|
|
15808
15906
|
] }),
|
|
15809
|
-
/* @__PURE__ */
|
|
15907
|
+
/* @__PURE__ */ jsxs119("span", { className: "ss-w-tool-pick-sel", children: [
|
|
15810
15908
|
p.marketLabel,
|
|
15811
15909
|
": ",
|
|
15812
15910
|
p.selectionLabel,
|
|
15813
15911
|
p.line ? ` ${p.line}` : ""
|
|
15814
15912
|
] }),
|
|
15815
|
-
/* @__PURE__ */
|
|
15816
|
-
/* @__PURE__ */
|
|
15913
|
+
/* @__PURE__ */ jsx135("span", { className: "ss-w-tool-pick-kick", children: formatKickoff(p.kickoffUtc) }),
|
|
15914
|
+
/* @__PURE__ */ jsx135("span", { className: "ss-w-tool-pick-price", children: formatOdds(p.priceFormats, oddsFormat) })
|
|
15817
15915
|
] }, p.matchOddsId)) });
|
|
15818
15916
|
}
|
|
15819
15917
|
function ComboPreview({ cell: cell2, formatKickoff }) {
|
|
15820
15918
|
const { oddsFormat } = useOddsSettings();
|
|
15821
|
-
return /* @__PURE__ */
|
|
15822
|
-
/* @__PURE__ */
|
|
15823
|
-
/* @__PURE__ */
|
|
15919
|
+
return /* @__PURE__ */ jsxs119(Fragment39, { children: [
|
|
15920
|
+
/* @__PURE__ */ jsx135(PickList, { picks: cell2.combo.legs, formatKickoff }),
|
|
15921
|
+
/* @__PURE__ */ jsx135("div", { className: "ss-w-tool-math", children: oddsFormat === "decimal" ? cell2.combo.multiplication : formatOdds(cell2.combo.totalFormats, oddsFormat) })
|
|
15824
15922
|
] });
|
|
15825
15923
|
}
|
|
15826
15924
|
function Unavailable({ text }) {
|
|
15827
|
-
return /* @__PURE__ */
|
|
15925
|
+
return /* @__PURE__ */ jsx135("p", { className: "ss-w-tool-unavailable", children: text });
|
|
15828
15926
|
}
|
|
15829
15927
|
var textOf = (options, value, format2) => {
|
|
15830
15928
|
const o = options.find((x) => samePrice(x.value, value));
|
|
@@ -15848,55 +15946,55 @@ function BuildComboTool({ grid, strings, streaming, formatKickoff, initialTotal,
|
|
|
15848
15946
|
const d = strings.comboDisplay(nextLegs, textOf(totalOptions, nextTotal, oddsFormat));
|
|
15849
15947
|
setAnnouncement(findCombo(grid, nextTotal, nextLegs) ? d : `${d}. ${strings.unavailable}`);
|
|
15850
15948
|
};
|
|
15851
|
-
const footer = /* @__PURE__ */
|
|
15949
|
+
const footer = /* @__PURE__ */ jsx135(SendButton, { label: strings.send, display, disabled: !cell2 || streaming, onClick: () => {
|
|
15852
15950
|
if (cell2) onSend(comboAsk(cell2, strings, oddsFormat));
|
|
15853
15951
|
} });
|
|
15854
|
-
return /* @__PURE__ */
|
|
15855
|
-
/* @__PURE__ */
|
|
15856
|
-
/* @__PURE__ */
|
|
15857
|
-
/* @__PURE__ */
|
|
15952
|
+
return /* @__PURE__ */ jsxs119(PresetToolModal, { title: strings.buildCombo, closeLabel: strings.close, onClose, footer, children: [
|
|
15953
|
+
/* @__PURE__ */ jsxs119("div", { className: "ss-w-tool-section", role: "group", "aria-label": strings.totalLabel, children: [
|
|
15954
|
+
/* @__PURE__ */ jsx135("span", { className: "ss-w-tool-label", "aria-hidden": "true", children: strings.totalLabel }),
|
|
15955
|
+
/* @__PURE__ */ jsx135("div", { className: "ss-w-tool-chips", children: totalOptions.map((o) => /* @__PURE__ */ jsx135("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)) })
|
|
15858
15956
|
] }),
|
|
15859
|
-
/* @__PURE__ */
|
|
15860
|
-
/* @__PURE__ */
|
|
15861
|
-
/* @__PURE__ */
|
|
15862
|
-
/* @__PURE__ */
|
|
15863
|
-
/* @__PURE__ */
|
|
15864
|
-
/* @__PURE__ */
|
|
15957
|
+
/* @__PURE__ */ jsxs119("div", { className: "ss-w-tool-section", role: "group", "aria-label": strings.matchesLabel, children: [
|
|
15958
|
+
/* @__PURE__ */ jsx135("span", { className: "ss-w-tool-label", "aria-hidden": "true", children: strings.matchesLabel }),
|
|
15959
|
+
/* @__PURE__ */ jsxs119("div", { className: "ss-w-tool-stepper", children: [
|
|
15960
|
+
/* @__PURE__ */ jsx135("button", { type: "button", className: "ss-w-tool-step", "aria-label": strings.fewerMatches, disabled: legs <= minLegs, onClick: () => choose(total, legs - 1), children: "\u2212" }),
|
|
15961
|
+
/* @__PURE__ */ jsx135("span", { className: "ss-w-tool-count", children: legs }),
|
|
15962
|
+
/* @__PURE__ */ jsx135("button", { type: "button", className: "ss-w-tool-step", "aria-label": strings.moreMatches, disabled: legs >= maxLegs, onClick: () => choose(total, legs + 1), children: "+" })
|
|
15865
15963
|
] })
|
|
15866
15964
|
] }),
|
|
15867
|
-
cell2 ? /* @__PURE__ */
|
|
15868
|
-
/* @__PURE__ */
|
|
15965
|
+
cell2 ? /* @__PURE__ */ jsx135(ComboPreview, { cell: cell2, formatKickoff }) : /* @__PURE__ */ jsx135(Unavailable, { text: strings.unavailable }),
|
|
15966
|
+
/* @__PURE__ */ jsx135("p", { className: "ss-w-vh", "aria-live": "polite", children: announcement })
|
|
15869
15967
|
] });
|
|
15870
15968
|
}
|
|
15871
15969
|
|
|
15872
15970
|
// src/components/SettingsSheet.tsx
|
|
15873
|
-
import { jsx as
|
|
15971
|
+
import { jsx as jsx136, jsxs as jsxs120 } from "react/jsx-runtime";
|
|
15874
15972
|
var SAMPLE = { decimal: "2.50", american: "+150", fractional: "3/2" };
|
|
15875
15973
|
var ODDS = ["decimal", "fractional", "american"];
|
|
15876
15974
|
var THEMES2 = ["light", "dark", "auto"];
|
|
15877
15975
|
function SettingsSheet({ ui, onClose }) {
|
|
15878
15976
|
const s = useOddsSettings();
|
|
15879
15977
|
const t = ui.settings;
|
|
15880
|
-
return /* @__PURE__ */
|
|
15978
|
+
return /* @__PURE__ */ jsxs120(
|
|
15881
15979
|
PresetToolModal,
|
|
15882
15980
|
{
|
|
15883
15981
|
title: t.title,
|
|
15884
15982
|
closeLabel: t.close,
|
|
15885
15983
|
onClose,
|
|
15886
15984
|
className: "ss-w-set-backdrop-in",
|
|
15887
|
-
footer: /* @__PURE__ */
|
|
15985
|
+
footer: /* @__PURE__ */ jsx136("p", { className: "ss-w-set-foot", children: t.foot }),
|
|
15888
15986
|
children: [
|
|
15889
|
-
s.oddsOffered && /* @__PURE__ */
|
|
15890
|
-
/* @__PURE__ */
|
|
15891
|
-
/* @__PURE__ */
|
|
15892
|
-
/* @__PURE__ */
|
|
15893
|
-
/* @__PURE__ */
|
|
15987
|
+
s.oddsOffered && /* @__PURE__ */ jsxs120("div", { className: "ss-w-set-row", children: [
|
|
15988
|
+
/* @__PURE__ */ jsx136("div", { className: "ss-w-tool-label", id: "ss-w-set-odds", children: t.oddsLabel }),
|
|
15989
|
+
/* @__PURE__ */ jsxs120("div", { className: "ss-w-set-sample", children: [
|
|
15990
|
+
/* @__PURE__ */ jsx136("span", { children: t.sampleLabel }),
|
|
15991
|
+
/* @__PURE__ */ jsx136("b", { children: formatOdds(SAMPLE, s.oddsFormat) })
|
|
15894
15992
|
] }),
|
|
15895
|
-
/* @__PURE__ */
|
|
15993
|
+
/* @__PURE__ */ jsx136("div", { className: "ss-w-set-seg", role: "group", "aria-labelledby": "ss-w-set-odds", children: ODDS.map((f) => /* @__PURE__ */ jsx136("button", { type: "button", "aria-pressed": s.oddsFormat === f, onClick: () => s.setOddsFormat(f), children: t[f] }, f)) })
|
|
15896
15994
|
] }),
|
|
15897
|
-
!s.themeLocked && /* @__PURE__ */
|
|
15898
|
-
/* @__PURE__ */
|
|
15899
|
-
/* @__PURE__ */
|
|
15995
|
+
!s.themeLocked && /* @__PURE__ */ jsxs120("div", { className: "ss-w-set-row", children: [
|
|
15996
|
+
/* @__PURE__ */ jsx136("div", { className: "ss-w-tool-label", id: "ss-w-set-theme", children: t.themeLabel }),
|
|
15997
|
+
/* @__PURE__ */ jsx136("div", { className: "ss-w-set-seg", role: "group", "aria-labelledby": "ss-w-set-theme", children: THEMES2.map((m) => /* @__PURE__ */ jsx136("button", { type: "button", "aria-pressed": s.theme === m, onClick: () => s.setTheme(m), children: t[m] }, m)) })
|
|
15900
15998
|
] })
|
|
15901
15999
|
]
|
|
15902
16000
|
}
|
|
@@ -15904,7 +16002,7 @@ function SettingsSheet({ ui, onClose }) {
|
|
|
15904
16002
|
}
|
|
15905
16003
|
|
|
15906
16004
|
// src/components/ChatPanel.tsx
|
|
15907
|
-
import { Fragment as Fragment40, jsx as
|
|
16005
|
+
import { Fragment as Fragment40, jsx as jsx137, jsxs as jsxs121 } from "react/jsx-runtime";
|
|
15908
16006
|
var FULLSCREEN_QUERY = "(max-width: 639px)";
|
|
15909
16007
|
function useIsModal() {
|
|
15910
16008
|
const [modal, setModal] = useState71(false);
|
|
@@ -16050,8 +16148,8 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
16050
16148
|
focusAfterCloseRef.current = "composer";
|
|
16051
16149
|
setTool(null);
|
|
16052
16150
|
}, [tool, onChatTab, presetGrid]);
|
|
16053
|
-
return /* @__PURE__ */
|
|
16054
|
-
/* @__PURE__ */
|
|
16151
|
+
return /* @__PURE__ */ jsxs121("div", { ref: panelRef, className: "ss-w-panel", role: "dialog", "aria-modal": isModal, "aria-label": ui.chatDialogLabel, children: [
|
|
16152
|
+
/* @__PURE__ */ jsx137(
|
|
16055
16153
|
ChatHeader,
|
|
16056
16154
|
{
|
|
16057
16155
|
onClose: () => closeWith("button"),
|
|
@@ -16066,7 +16164,7 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
16066
16164
|
settingsLabel: ui.settings.title
|
|
16067
16165
|
}
|
|
16068
16166
|
),
|
|
16069
|
-
tabs && /* @__PURE__ */
|
|
16167
|
+
tabs && /* @__PURE__ */ jsx137(
|
|
16070
16168
|
TabBar,
|
|
16071
16169
|
{
|
|
16072
16170
|
monitor: tabs,
|
|
@@ -16081,24 +16179,24 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
16081
16179
|
favouritesEnabled: !!monitor && (favouritesEnabled ?? false)
|
|
16082
16180
|
}
|
|
16083
16181
|
),
|
|
16084
|
-
/* @__PURE__ */
|
|
16085
|
-
/* @__PURE__ */
|
|
16086
|
-
tool && presetGrid && onChatTab && !paused ? /* @__PURE__ */
|
|
16182
|
+
/* @__PURE__ */ jsxs121("div", { className: "ss-w-chat-layer", style: onChatTab ? void 0 : HIDDEN_LAYER_STYLE, children: [
|
|
16183
|
+
/* @__PURE__ */ jsx137(PresetToolsContext.Provider, { value: toolsValue, children: /* @__PURE__ */ jsx137(MessageList, { controller, ui, slip, onDashboardTap, monitor }) }),
|
|
16184
|
+
tool && presetGrid && onChatTab && !paused ? /* @__PURE__ */ jsx137(BuildComboTool, { grid: presetGrid, strings: ui.presets, streaming: state.isStreaming, formatKickoff, initialTotal: tool.total, initialLegs: tool.legs, onSend: sendAsk, onClose: closeTool }) : null
|
|
16087
16185
|
] }),
|
|
16088
|
-
monitor && discovery && monitor.activeTab === "today" && /* @__PURE__ */
|
|
16089
|
-
tabs && tabs.activeTab === "builder" && hasBuilder && builder && /* @__PURE__ */
|
|
16090
|
-
monitor && monitor.activeTab === "following" && /* @__PURE__ */
|
|
16091
|
-
monitor && monitor.activeTab === "trends" && /* @__PURE__ */
|
|
16092
|
-
monitor && monitor.activeTab === "fixtures" && /* @__PURE__ */
|
|
16093
|
-
monitor && monitor.activeTab === "standings" && /* @__PURE__ */
|
|
16094
|
-
monitor && monitor.activeTab === "squad" && /* @__PURE__ */
|
|
16095
|
-
/* @__PURE__ */
|
|
16186
|
+
monitor && discovery && monitor.activeTab === "today" && /* @__PURE__ */ jsx137(TodayPanel, { discovery, ui, monitor }),
|
|
16187
|
+
tabs && tabs.activeTab === "builder" && hasBuilder && builder && /* @__PURE__ */ jsx137(BuilderPanel, { options: builder.options, sport: builder.sport, onSportChange: builder.onSportChange, ui, slip, onCoolOff: builder.onCoolOff }),
|
|
16188
|
+
monitor && monitor.activeTab === "following" && /* @__PURE__ */ jsx137(MatchesPanel, { monitor, ui, slip, onAsk: paused ? void 0 : handleAsk, discovery }),
|
|
16189
|
+
monitor && monitor.activeTab === "trends" && /* @__PURE__ */ jsx137(TrendsPanel, { monitor, ui, slip }),
|
|
16190
|
+
monitor && monitor.activeTab === "fixtures" && /* @__PURE__ */ jsx137(Fixtures, { fixtures: clubFixturesResult?.fixtures ?? [], loading: clubFixturesResult?.loading ?? false, ui }),
|
|
16191
|
+
monitor && monitor.activeTab === "standings" && /* @__PURE__ */ jsx137(Standings, { standings: clubStandingsResult?.data ?? null, loading: clubStandingsResult?.loading ?? false, ui }),
|
|
16192
|
+
monitor && monitor.activeTab === "squad" && /* @__PURE__ */ jsxs121(Fragment40, { children: [
|
|
16193
|
+
/* @__PURE__ */ jsx137(
|
|
16096
16194
|
"div",
|
|
16097
16195
|
{
|
|
16098
16196
|
ref: squadLayerRef,
|
|
16099
16197
|
style: selectedPlayerId === null ? SQUAD_LAYER_STYLE : HIDDEN_LAYER_STYLE,
|
|
16100
16198
|
"aria-hidden": selectedPlayerId !== null ? true : void 0,
|
|
16101
|
-
children: /* @__PURE__ */
|
|
16199
|
+
children: /* @__PURE__ */ jsx137(
|
|
16102
16200
|
Squad,
|
|
16103
16201
|
{
|
|
16104
16202
|
squad: clubSquadResult?.data ?? null,
|
|
@@ -16116,9 +16214,9 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
16116
16214
|
)
|
|
16117
16215
|
}
|
|
16118
16216
|
),
|
|
16119
|
-
selectedPlayerId !== null && /* @__PURE__ */
|
|
16217
|
+
selectedPlayerId !== null && /* @__PURE__ */ jsx137(PlayerDetail, { detail: clubPlayerDetailResult?.data ?? null, loading: clubPlayerDetailResult?.loading ?? false, ui, seasonName: clubSquadStatsResult?.seasonName ?? null, onClose: closePlayer })
|
|
16120
16218
|
] }),
|
|
16121
|
-
monitor && monitor.activeTab === "games" && gamesResult && /* @__PURE__ */
|
|
16219
|
+
monitor && monitor.activeTab === "games" && gamesResult && /* @__PURE__ */ jsx137(
|
|
16122
16220
|
GamesPanel,
|
|
16123
16221
|
{
|
|
16124
16222
|
loggedIn: !!loggedIn,
|
|
@@ -16133,10 +16231,10 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
16133
16231
|
}
|
|
16134
16232
|
}
|
|
16135
16233
|
),
|
|
16136
|
-
monitor && monitor.activeTab === "favourites" && favouritesEnabled && favourites && /* @__PURE__ */
|
|
16137
|
-
(!tabs || tabs.activeTab !== "games" && tabs.activeTab !== "favourites" && tabs.activeTab !== "builder") && /* @__PURE__ */
|
|
16138
|
-
/* @__PURE__ */
|
|
16139
|
-
paused ? null : /* @__PURE__ */
|
|
16234
|
+
monitor && monitor.activeTab === "favourites" && favouritesEnabled && favourites && /* @__PURE__ */ jsx137(FavouritesPanel, { controller: favourites.controller, ui, sport: favourites.sport, sports: favourites.sports, onSportChange: favourites.onSportChange }),
|
|
16235
|
+
(!tabs || tabs.activeTab !== "games" && tabs.activeTab !== "favourites" && tabs.activeTab !== "builder") && /* @__PURE__ */ jsxs121(Fragment40, { children: [
|
|
16236
|
+
/* @__PURE__ */ jsx137("div", { ref: limitRef, className: "ss-w-limit", role: "status", tabIndex: -1, children: state.limit ? limitText(state.limit, ui) : null }),
|
|
16237
|
+
paused ? null : /* @__PURE__ */ jsx137(
|
|
16140
16238
|
ChatInput,
|
|
16141
16239
|
{
|
|
16142
16240
|
ref: inputRef,
|
|
@@ -16150,14 +16248,14 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
16150
16248
|
}
|
|
16151
16249
|
)
|
|
16152
16250
|
] }),
|
|
16153
|
-
settingsOpen && hasSettings ? /* @__PURE__ */
|
|
16251
|
+
settingsOpen && hasSettings ? /* @__PURE__ */ jsx137(SettingsSheet, { ui, onClose: closeSettings }) : null
|
|
16154
16252
|
] });
|
|
16155
16253
|
}
|
|
16156
16254
|
|
|
16157
16255
|
// src/components/HostEventsProvider.tsx
|
|
16158
|
-
import { jsx as
|
|
16256
|
+
import { jsx as jsx138 } from "react/jsx-runtime";
|
|
16159
16257
|
function HostEventsProvider({ value, children }) {
|
|
16160
|
-
return /* @__PURE__ */
|
|
16258
|
+
return /* @__PURE__ */ jsx138(SlipStateContext.Provider, { value: value.slipState, children });
|
|
16161
16259
|
}
|
|
16162
16260
|
|
|
16163
16261
|
// src/styles/css.generated.ts
|
|
@@ -17729,6 +17827,16 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
17729
17827
|
.ss-w-strip-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; font-weight: 650; }
|
|
17730
17828
|
.ss-w-strip-score { font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
|
|
17731
17829
|
.ss-w-strip-row--muted .ss-w-strip-name, .ss-w-strip-row--muted .ss-w-strip-score { color: var(--ss-w-faint); }
|
|
17830
|
+
.ss-w-strip-tile--trend { width: 156px; }
|
|
17831
|
+
.ss-w-strip-tscore { flex: none; margin-left: auto; font-size: 11px; font-weight: 800; color: var(--ss-w-ink); }
|
|
17832
|
+
.ss-w-strip-fixture { display: flex; align-items: center; gap: 3px; min-width: 0; }
|
|
17833
|
+
.ss-w-strip-fixture .ss-w-bi-crest { flex: none; width: 14px; height: 14px; }
|
|
17834
|
+
.ss-w-strip-fixture .ss-w-bi-crest-mono { font-size: 7px; }
|
|
17835
|
+
.ss-w-strip-fixture .ss-w-strip-name { margin-left: 2px; font-size: 11px; font-weight: 600; }
|
|
17836
|
+
.ss-w-strip-market { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; color: var(--ss-w-faint); }
|
|
17837
|
+
.ss-w-strip-row--price { grid-template-columns: 1fr auto; }
|
|
17838
|
+
.ss-w-strip-price { display: inline-flex; align-items: baseline; gap: 3px; font-family: ui-monospace, monospace; font-variant-numeric: tabular-nums; font-size: 12.5px; font-weight: 700; color: var(--ss-w-accent); }
|
|
17839
|
+
.ss-w-strip-price .ss-w-move-arrow { color: var(--ss-w-faint); }
|
|
17732
17840
|
.ss-w-mon-scorers { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; column-gap: 10px; font-size: 11.5px; color: var(--ss-w-faint); }
|
|
17733
17841
|
.ss-w-mon-scorers-col { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
|
|
17734
17842
|
.ss-w-mon-scorers-col li { overflow-wrap: anywhere; }
|
|
@@ -18660,7 +18768,7 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
18660
18768
|
`;
|
|
18661
18769
|
|
|
18662
18770
|
// src/StatsWidget.tsx
|
|
18663
|
-
import { jsx as
|
|
18771
|
+
import { jsx as jsx139 } from "react/jsx-runtime";
|
|
18664
18772
|
function buildClient(props) {
|
|
18665
18773
|
try {
|
|
18666
18774
|
if ("client" in props && props.client) {
|
|
@@ -18982,7 +19090,7 @@ function StatsWidget(props) {
|
|
|
18982
19090
|
}), [favouritesEnabled, monitor.enabled, clubFixturesResult.settled, clubFixturesResult.tabReady, clubFixturesResult.enabled, monitor.setActiveTab, favourites, built, holds, builderMemory]);
|
|
18983
19091
|
if (!built) return null;
|
|
18984
19092
|
const attrs = themeAttrs(ui, oddsSettings.userTheme);
|
|
18985
|
-
return /* @__PURE__ */
|
|
19093
|
+
return /* @__PURE__ */ jsx139(EventLogContext.Provider, { value: logger, children: /* @__PURE__ */ jsx139(TrackingContext.Provider, { value: track, children: /* @__PURE__ */ jsx139(SportScopeContext.Provider, { value: sportScope, children: /* @__PURE__ */ jsx139(OddsSettingsContext.Provider, { value: oddsSettings, children: /* @__PURE__ */ jsx139(HostEventsProvider, { value: hostEvents, children: /* @__PURE__ */ jsx139("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"], style: attrs.style, children: controller.state.isOpen ? /* @__PURE__ */ jsx139(PersonalGreetingContext.Provider, { value: personalGreeting, children: /* @__PURE__ */ jsx139(
|
|
18986
19094
|
ChatPanel,
|
|
18987
19095
|
{
|
|
18988
19096
|
controller,
|
|
@@ -19005,7 +19113,7 @@ function StatsWidget(props) {
|
|
|
19005
19113
|
favourites: { controller: favourites, sport: favSport, sports: favSports, onSportChange: setFavSportPick },
|
|
19006
19114
|
builder: { options: builderOptions, sport: builderSport, onSportChange: setBuilderSportPick, onCoolOff: onBuilderCoolOff, tabs: monitor }
|
|
19007
19115
|
}
|
|
19008
|
-
) }) : /* @__PURE__ */
|
|
19116
|
+
) }) : /* @__PURE__ */ jsx139(
|
|
19009
19117
|
ChatFab,
|
|
19010
19118
|
{
|
|
19011
19119
|
label: ui.launcherLabel,
|