@sensiblestats/widget-react 0.116.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 +6 -0
- package/dist/index.cjs +1214 -1107
- 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 +1192 -1085
- 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
|
] });
|
|
@@ -10835,7 +10864,7 @@ function NflMonitorCard({ match, monitor, ui, slip }) {
|
|
|
10835
10864
|
const f = match.americanFootball;
|
|
10836
10865
|
if (!f) return /* @__PURE__ */ jsx78(UnavailableCard, { match, monitor, ui, sport: "americanfootball" });
|
|
10837
10866
|
const live = match.phase === "live";
|
|
10838
|
-
const
|
|
10867
|
+
const status2 = live ? liveLabel2(f) : null;
|
|
10839
10868
|
const scored = live || match.phase === "fullTime";
|
|
10840
10869
|
const kickoff = match.phase === "preMatch" && match.kickoffUtc ? ui.bettingKickoff(match.kickoffUtc) : void 0;
|
|
10841
10870
|
const through = playedThrough(f);
|
|
@@ -10845,14 +10874,14 @@ function NflMonitorCard({ match, monitor, ui, slip }) {
|
|
|
10845
10874
|
return /* @__PURE__ */ jsxs73("div", { className: "ss-w-mon-item ss-w-mon-item--nfl", children: [
|
|
10846
10875
|
/* @__PURE__ */ jsxs73("div", { className: "ss-w-mon", children: [
|
|
10847
10876
|
/* @__PURE__ */ jsxs73("div", { className: "ss-w-mon-top", children: [
|
|
10848
|
-
|
|
10877
|
+
status2 && /* @__PURE__ */ jsxs73(Fragment19, { children: [
|
|
10849
10878
|
/* @__PURE__ */ jsxs73("span", { className: "ss-w-fandash-live-pill", children: [
|
|
10850
10879
|
/* @__PURE__ */ jsx78("span", { className: "ss-w-fandash-live-dot", "aria-hidden": "true" }),
|
|
10851
10880
|
ui.liveLabel
|
|
10852
10881
|
] }),
|
|
10853
|
-
/* @__PURE__ */ jsx78("span", { className: "ss-w-mon-min", children:
|
|
10882
|
+
/* @__PURE__ */ jsx78("span", { className: "ss-w-mon-min", children: status2 })
|
|
10854
10883
|
] }),
|
|
10855
|
-
live && !
|
|
10884
|
+
live && !status2 && f.statusText && /* @__PURE__ */ jsx78("span", { className: "ss-w-mon-pill", children: f.statusText }),
|
|
10856
10885
|
match.phase === "fullTime" && /* @__PURE__ */ jsx78("span", { className: "ss-w-mon-pill", children: f.statusText ?? ui.fullTimeLabel }),
|
|
10857
10886
|
match.phase === "postponed" && /* @__PURE__ */ jsx78("span", { className: "ss-w-mon-pill", children: f.statusText ?? ui.postponedLabel }),
|
|
10858
10887
|
kickoff && /* @__PURE__ */ jsxs73("span", { className: "ss-w-mon-pill", children: [
|
|
@@ -10883,7 +10912,7 @@ function NflMonitorCard({ match, monitor, ui, slip }) {
|
|
|
10883
10912
|
{ abbreviation: f.homeAbbreviation, scores: f.homePeriods, total: match.homeScore }
|
|
10884
10913
|
].map((row) => /* @__PURE__ */ jsxs73("tr", { children: [
|
|
10885
10914
|
/* @__PURE__ */ jsx78("th", { scope: "row", children: row.abbreviation }),
|
|
10886
|
-
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)),
|
|
10887
10916
|
/* @__PURE__ */ jsx78("td", { className: "ss-w-nbamon-total", children: row.total ?? 0 })
|
|
10888
10917
|
] }, row.abbreviation)) })
|
|
10889
10918
|
] })
|
|
@@ -10969,7 +10998,7 @@ function rowsFor(m) {
|
|
|
10969
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 }
|
|
10970
10999
|
];
|
|
10971
11000
|
}
|
|
10972
|
-
function
|
|
11001
|
+
function useStripScroll(selectedKey) {
|
|
10973
11002
|
const stripRef = useRef26(null);
|
|
10974
11003
|
useEffect33(() => {
|
|
10975
11004
|
const strip = stripRef.current;
|
|
@@ -10980,13 +11009,17 @@ function ScoreboardStrip({ tiles, selectedKey, onSelect, ui }) {
|
|
|
10980
11009
|
const padding = parseFloat(getComputedStyle(strip).paddingLeft) || 0;
|
|
10981
11010
|
strip.scrollLeft = left - padding;
|
|
10982
11011
|
}, [selectedKey]);
|
|
11012
|
+
return stripRef;
|
|
11013
|
+
}
|
|
11014
|
+
function ScoreboardStrip({ tiles, selectedKey, onSelect, ui }) {
|
|
11015
|
+
const stripRef = useStripScroll(selectedKey);
|
|
10983
11016
|
return /* @__PURE__ */ jsx79("div", { className: "ss-w-strip", ref: stripRef, children: tiles.map((tile) => {
|
|
10984
11017
|
const m = tile.match;
|
|
10985
11018
|
if (!m) return null;
|
|
10986
11019
|
const nba = isBasketball(m);
|
|
10987
11020
|
const sport = sportOf11(m.sport);
|
|
10988
11021
|
const inPlay = m.phase === "live" && !atBreak(m) && !(isAmericanFootball(m) && m.americanFootball?.period == null);
|
|
10989
|
-
const
|
|
11022
|
+
const status2 = nba ? nbaStatus(m, ui) : isAmericanFootball(m) ? nflStatus(m, ui) : footballStatus(m, ui);
|
|
10990
11023
|
const selected = tile.pin.key === selectedKey;
|
|
10991
11024
|
return /* @__PURE__ */ jsxs74(
|
|
10992
11025
|
"button",
|
|
@@ -10998,7 +11031,7 @@ function ScoreboardStrip({ tiles, selectedKey, onSelect, ui }) {
|
|
|
10998
11031
|
children: [
|
|
10999
11032
|
/* @__PURE__ */ jsxs74("span", { className: inPlay ? "ss-w-strip-status ss-w-strip-status--live" : "ss-w-strip-status", children: [
|
|
11000
11033
|
inPlay && /* @__PURE__ */ jsx79("span", { className: "ss-w-strip-dot", "aria-hidden": "true" }),
|
|
11001
|
-
/* @__PURE__ */ jsx79("span", { className: "ss-w-strip-when", children:
|
|
11034
|
+
/* @__PURE__ */ jsx79("span", { className: "ss-w-strip-when", children: status2 }),
|
|
11002
11035
|
sport && /* @__PURE__ */ jsx79("span", { className: "ss-w-strip-sport", children: SPORTS7[sport].label })
|
|
11003
11036
|
] }),
|
|
11004
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: [
|
|
@@ -11013,6 +11046,64 @@ function ScoreboardStrip({ tiles, selectedKey, onSelect, ui }) {
|
|
|
11013
11046
|
}) });
|
|
11014
11047
|
}
|
|
11015
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
|
+
|
|
11016
11107
|
// src/monitorSeed.ts
|
|
11017
11108
|
import { matchKey as matchKey4 } from "@sensiblestats/widget-sdk";
|
|
11018
11109
|
function buildSeedIndex(groups) {
|
|
@@ -11061,13 +11152,13 @@ function seedFor(pin, index, states, stale, now) {
|
|
|
11061
11152
|
}
|
|
11062
11153
|
|
|
11063
11154
|
// src/components/MonitorTabs.tsx
|
|
11064
|
-
import { Fragment as Fragment20, jsx as
|
|
11155
|
+
import { Fragment as Fragment20, jsx as jsx81, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
11065
11156
|
function OddsLiveStrip({ m, ui }) {
|
|
11066
11157
|
const showScore = m.phase !== "preMatch" && typeof m.homeScore === "number";
|
|
11067
11158
|
const stale = m.status === "stale";
|
|
11068
11159
|
if (!showScore && !m.minuteLabel && !(m.isSuspended && !m.isSettled) && !m.isSettled && !stale) return null;
|
|
11069
|
-
return /* @__PURE__ */
|
|
11070
|
-
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: [
|
|
11071
11162
|
m.homeTeamName,
|
|
11072
11163
|
" ",
|
|
11073
11164
|
m.homeScore,
|
|
@@ -11076,10 +11167,10 @@ function OddsLiveStrip({ m, ui }) {
|
|
|
11076
11167
|
" ",
|
|
11077
11168
|
m.awayTeamName
|
|
11078
11169
|
] }),
|
|
11079
|
-
m.minuteLabel && /* @__PURE__ */
|
|
11080
|
-
m.isSuspended && !m.isSettled && /* @__PURE__ */
|
|
11081
|
-
m.isSettled && /* @__PURE__ */
|
|
11082
|
-
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" })) })
|
|
11083
11174
|
] });
|
|
11084
11175
|
}
|
|
11085
11176
|
function MatchesPanel({ monitor, ui, slip, onAsk, discovery }) {
|
|
@@ -11089,15 +11180,15 @@ function MatchesPanel({ monitor, ui, slip, onAsk, discovery }) {
|
|
|
11089
11180
|
monitor.snapshot,
|
|
11090
11181
|
(pin) => discovery ? seedFor(pin, seedIndex, discovery.states, discovery.stale, /* @__PURE__ */ new Date()) : void 0
|
|
11091
11182
|
);
|
|
11092
|
-
if (tiles.length === 0) return /* @__PURE__ */
|
|
11183
|
+
if (tiles.length === 0) return /* @__PURE__ */ jsx81("div", { className: "ss-w-mon-empty", children: ui.emptyMatchesTab });
|
|
11093
11184
|
const selected = tiles.find((t) => t.pin.key === monitor.selectedMatchKey) ?? tiles[0];
|
|
11094
11185
|
const m = selected.match;
|
|
11095
|
-
return /* @__PURE__ */
|
|
11096
|
-
tiles.filter((t) => t.match).length >= 2 && /* @__PURE__ */
|
|
11097
|
-
/* @__PURE__ */
|
|
11098
|
-
!m && /* @__PURE__ */
|
|
11099
|
-
m && (sportKeyOf(m.sport) === "americanfootball" ? /* @__PURE__ */
|
|
11100
|
-
/* @__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(
|
|
11101
11192
|
MonitorMatchCard,
|
|
11102
11193
|
{
|
|
11103
11194
|
match: m,
|
|
@@ -11108,7 +11199,7 @@ function MatchesPanel({ monitor, ui, slip, onAsk, discovery }) {
|
|
|
11108
11199
|
onAsk
|
|
11109
11200
|
}
|
|
11110
11201
|
),
|
|
11111
|
-
/* @__PURE__ */
|
|
11202
|
+
/* @__PURE__ */ jsx81(MarketAccordion, { match: m, monitor, ui, slip })
|
|
11112
11203
|
] }))
|
|
11113
11204
|
] })
|
|
11114
11205
|
] });
|
|
@@ -11125,16 +11216,22 @@ function withSinceViewMovement(vm, prev) {
|
|
|
11125
11216
|
}
|
|
11126
11217
|
function TrendsPanel({ monitor, ui, slip }) {
|
|
11127
11218
|
const slipState = useSlipState();
|
|
11128
|
-
const
|
|
11129
|
-
|
|
11130
|
-
|
|
11131
|
-
|
|
11132
|
-
|
|
11133
|
-
|
|
11134
|
-
|
|
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(
|
|
11135
11232
|
MarketOddsCardList,
|
|
11136
11233
|
{
|
|
11137
|
-
cards: [
|
|
11234
|
+
cards: [selected.vm],
|
|
11138
11235
|
ui,
|
|
11139
11236
|
slip,
|
|
11140
11237
|
monitor,
|
|
@@ -11142,10 +11239,10 @@ function TrendsPanel({ monitor, ui, slip }) {
|
|
|
11142
11239
|
inSlipIds: slipState?.added
|
|
11143
11240
|
}
|
|
11144
11241
|
),
|
|
11145
|
-
m.history && /* @__PURE__ */
|
|
11146
|
-
!m.card && !m.history && /* @__PURE__ */
|
|
11147
|
-
] }, m.key)
|
|
11148
|
-
|
|
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
|
+
] });
|
|
11149
11246
|
}
|
|
11150
11247
|
|
|
11151
11248
|
// src/components/TodayPanel.tsx
|
|
@@ -11233,25 +11330,25 @@ function useStarTap(starLeague) {
|
|
|
11233
11330
|
}
|
|
11234
11331
|
|
|
11235
11332
|
// src/components/LeagueTile.tsx
|
|
11236
|
-
import { jsx as
|
|
11333
|
+
import { jsx as jsx82, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
11237
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";
|
|
11238
11335
|
function LeagueTile({ group, starClickable: starClickable2, disambiguate, onOpen, starTap, ui }) {
|
|
11239
11336
|
const onStarClick = () => {
|
|
11240
11337
|
void starTap.tap(group.competitionId, !group.isStarred);
|
|
11241
11338
|
};
|
|
11242
|
-
return /* @__PURE__ */
|
|
11243
|
-
/* @__PURE__ */
|
|
11244
|
-
/* @__PURE__ */
|
|
11245
|
-
/* @__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: [
|
|
11246
11343
|
group.competitionName,
|
|
11247
|
-
disambiguate && group.competitionCountry ? /* @__PURE__ */
|
|
11344
|
+
disambiguate && group.competitionCountry ? /* @__PURE__ */ jsxs77("span", { className: "ss-w-today-tile-country", children: [
|
|
11248
11345
|
" (",
|
|
11249
11346
|
group.competitionCountry,
|
|
11250
11347
|
")"
|
|
11251
11348
|
] }) : null
|
|
11252
11349
|
] })
|
|
11253
11350
|
] }),
|
|
11254
|
-
sportKeyOf(group.sport) === "football" && /* @__PURE__ */
|
|
11351
|
+
sportKeyOf(group.sport) === "football" && /* @__PURE__ */ jsx82(
|
|
11255
11352
|
"button",
|
|
11256
11353
|
{
|
|
11257
11354
|
type: "button",
|
|
@@ -11260,7 +11357,7 @@ function LeagueTile({ group, starClickable: starClickable2, disambiguate, onOpen
|
|
|
11260
11357
|
"aria-label": group.isStarred ? ui.starOffLabel : ui.starOnLabel,
|
|
11261
11358
|
disabled: !starClickable2 || starTap.pendingId !== null,
|
|
11262
11359
|
onClick: onStarClick,
|
|
11263
|
-
children: /* @__PURE__ */
|
|
11360
|
+
children: /* @__PURE__ */ jsx82("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ jsx82(
|
|
11264
11361
|
"path",
|
|
11265
11362
|
{
|
|
11266
11363
|
d: STAR_PATH,
|
|
@@ -11282,7 +11379,7 @@ import { matchKey as matchKey5 } from "@sensiblestats/widget-sdk";
|
|
|
11282
11379
|
|
|
11283
11380
|
// src/components/FixtureRow.tsx
|
|
11284
11381
|
import { slipSportOf as slipSportOf8 } from "@sensiblestats/widget-sdk";
|
|
11285
|
-
import { jsx as
|
|
11382
|
+
import { jsx as jsx83, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
11286
11383
|
function splitAtFirstSpace(label) {
|
|
11287
11384
|
const i = label.indexOf(" ");
|
|
11288
11385
|
return i > 0 && i < label.length - 1 ? [label.slice(0, i), label.slice(i + 1)] : null;
|
|
@@ -11296,9 +11393,9 @@ function kickoffLabel(kickoffUnix) {
|
|
|
11296
11393
|
return `${`${d.getHours()}`.padStart(2, "0")}:${`${d.getMinutes()}`.padStart(2, "0")}`;
|
|
11297
11394
|
}
|
|
11298
11395
|
function Side2({ name, crest, abbr, away = false }) {
|
|
11299
|
-
return /* @__PURE__ */
|
|
11300
|
-
abbr ? /* @__PURE__ */
|
|
11301
|
-
/* @__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 })
|
|
11302
11399
|
] });
|
|
11303
11400
|
}
|
|
11304
11401
|
function FixtureRow({ match, state, stale, ui, monitor }) {
|
|
@@ -11318,14 +11415,14 @@ function FixtureRow({ match, state, stale, ui, monitor }) {
|
|
|
11318
11415
|
liveTone ? "ss-w-drow-when--live" : null,
|
|
11319
11416
|
twoLines ? "ss-w-drow-when--two" : null
|
|
11320
11417
|
].filter(Boolean).join(" ");
|
|
11321
|
-
return /* @__PURE__ */
|
|
11322
|
-
/* @__PURE__ */
|
|
11323
|
-
/* @__PURE__ */
|
|
11324
|
-
/* @__PURE__ */
|
|
11325
|
-
/* @__PURE__ */
|
|
11326
|
-
/* @__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 })
|
|
11327
11424
|
] }),
|
|
11328
|
-
/* @__PURE__ */
|
|
11425
|
+
/* @__PURE__ */ jsx83(
|
|
11329
11426
|
PinToggle,
|
|
11330
11427
|
{
|
|
11331
11428
|
ui,
|
|
@@ -11337,7 +11434,7 @@ function FixtureRow({ match, state, stale, ui, monitor }) {
|
|
|
11337
11434
|
}
|
|
11338
11435
|
|
|
11339
11436
|
// src/components/LeagueDetail.tsx
|
|
11340
|
-
import { jsx as
|
|
11437
|
+
import { jsx as jsx84, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
11341
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";
|
|
11342
11439
|
function LeagueDetail({ group, position, states, stale, ui, monitor, starTap, onBack, onPrev, onNext }) {
|
|
11343
11440
|
const [toast, setToast] = useState47(null);
|
|
@@ -11356,12 +11453,12 @@ function LeagueDetail({ group, position, states, stale, ui, monitor, starTap, on
|
|
|
11356
11453
|
if (ok) setToast(next ? ui.starredToast : ui.unstarredToast);
|
|
11357
11454
|
});
|
|
11358
11455
|
};
|
|
11359
|
-
return /* @__PURE__ */
|
|
11360
|
-
/* @__PURE__ */
|
|
11361
|
-
/* @__PURE__ */
|
|
11362
|
-
/* @__PURE__ */
|
|
11363
|
-
/* @__PURE__ */
|
|
11364
|
-
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(
|
|
11365
11462
|
"button",
|
|
11366
11463
|
{
|
|
11367
11464
|
type: "button",
|
|
@@ -11370,7 +11467,7 @@ function LeagueDetail({ group, position, states, stale, ui, monitor, starTap, on
|
|
|
11370
11467
|
"aria-label": group.isStarred ? ui.starOffLabel : ui.starOnLabel,
|
|
11371
11468
|
disabled: starTap.pendingId !== null,
|
|
11372
11469
|
onClick: onStarClick,
|
|
11373
|
-
children: /* @__PURE__ */
|
|
11470
|
+
children: /* @__PURE__ */ jsx84("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ jsx84(
|
|
11374
11471
|
"path",
|
|
11375
11472
|
{
|
|
11376
11473
|
d: STAR_PATH2,
|
|
@@ -11384,8 +11481,8 @@ function LeagueDetail({ group, position, states, stale, ui, monitor, starTap, on
|
|
|
11384
11481
|
}
|
|
11385
11482
|
)
|
|
11386
11483
|
] }),
|
|
11387
|
-
/* @__PURE__ */
|
|
11388
|
-
/* @__PURE__ */
|
|
11484
|
+
/* @__PURE__ */ jsxs79("div", { className: "ss-w-today-detail-nav", children: [
|
|
11485
|
+
/* @__PURE__ */ jsx84(
|
|
11389
11486
|
"button",
|
|
11390
11487
|
{
|
|
11391
11488
|
type: "button",
|
|
@@ -11393,11 +11490,11 @@ function LeagueDetail({ group, position, states, stale, ui, monitor, starTap, on
|
|
|
11393
11490
|
"aria-label": ui.prevLeagueLabel,
|
|
11394
11491
|
disabled: position.index <= 1,
|
|
11395
11492
|
onClick: onPrev,
|
|
11396
|
-
children: /* @__PURE__ */
|
|
11493
|
+
children: /* @__PURE__ */ jsx84(ChevronIcon, {})
|
|
11397
11494
|
}
|
|
11398
11495
|
),
|
|
11399
|
-
/* @__PURE__ */
|
|
11400
|
-
/* @__PURE__ */
|
|
11496
|
+
/* @__PURE__ */ jsx84("span", { className: "ss-w-today-detail-pos", children: ui.leagueDetailPosition(position.index, position.total) }),
|
|
11497
|
+
/* @__PURE__ */ jsx84(
|
|
11401
11498
|
"button",
|
|
11402
11499
|
{
|
|
11403
11500
|
type: "button",
|
|
@@ -11405,13 +11502,13 @@ function LeagueDetail({ group, position, states, stale, ui, monitor, starTap, on
|
|
|
11405
11502
|
"aria-label": ui.nextLeagueLabel,
|
|
11406
11503
|
disabled: position.index >= position.total,
|
|
11407
11504
|
onClick: onNext,
|
|
11408
|
-
children: /* @__PURE__ */
|
|
11505
|
+
children: /* @__PURE__ */ jsx84(ChevronIcon, {})
|
|
11409
11506
|
}
|
|
11410
11507
|
)
|
|
11411
11508
|
] }),
|
|
11412
|
-
/* @__PURE__ */
|
|
11413
|
-
/* @__PURE__ */
|
|
11414
|
-
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(
|
|
11415
11512
|
FixtureRow,
|
|
11416
11513
|
{
|
|
11417
11514
|
match: m,
|
|
@@ -11423,13 +11520,13 @@ function LeagueDetail({ group, position, states, stale, ui, monitor, starTap, on
|
|
|
11423
11520
|
matchKey5(m.sport, m.matchId)
|
|
11424
11521
|
))
|
|
11425
11522
|
] }),
|
|
11426
|
-
toast !== null && /* @__PURE__ */
|
|
11523
|
+
toast !== null && /* @__PURE__ */ jsx84("p", { className: "ss-w-today-toast", role: "status", "aria-live": "polite", children: toast })
|
|
11427
11524
|
] });
|
|
11428
11525
|
}
|
|
11429
11526
|
|
|
11430
11527
|
// src/components/LeagueRowGroup.tsx
|
|
11431
11528
|
import { matchKey as matchKey6 } from "@sensiblestats/widget-sdk";
|
|
11432
|
-
import { jsx as
|
|
11529
|
+
import { jsx as jsx85, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
11433
11530
|
var ROW_CAP_PER_LEAGUE = 3;
|
|
11434
11531
|
var SECTION_ROW_BUDGET = 12;
|
|
11435
11532
|
function rowsFor2(group, states, stale) {
|
|
@@ -11445,20 +11542,20 @@ function LeagueRowGroup({ group, states, stale, cap: cap2, starClickable: starCl
|
|
|
11445
11542
|
const onStarClick = () => {
|
|
11446
11543
|
void starTap.tap(group.competitionId, !group.isStarred);
|
|
11447
11544
|
};
|
|
11448
|
-
return /* @__PURE__ */
|
|
11449
|
-
/* @__PURE__ */
|
|
11450
|
-
/* @__PURE__ */
|
|
11451
|
-
/* @__PURE__ */
|
|
11452
|
-
/* @__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: [
|
|
11453
11550
|
group.competitionName,
|
|
11454
|
-
disambiguate && group.competitionCountry ? /* @__PURE__ */
|
|
11551
|
+
disambiguate && group.competitionCountry ? /* @__PURE__ */ jsxs80("span", { className: "ss-w-today-tile-country", children: [
|
|
11455
11552
|
" (",
|
|
11456
11553
|
group.competitionCountry,
|
|
11457
11554
|
")"
|
|
11458
11555
|
] }) : null
|
|
11459
11556
|
] })
|
|
11460
11557
|
] }),
|
|
11461
|
-
sportKeyOf(group.sport) === "football" && /* @__PURE__ */
|
|
11558
|
+
sportKeyOf(group.sport) === "football" && /* @__PURE__ */ jsx85(
|
|
11462
11559
|
"button",
|
|
11463
11560
|
{
|
|
11464
11561
|
type: "button",
|
|
@@ -11467,7 +11564,7 @@ function LeagueRowGroup({ group, states, stale, cap: cap2, starClickable: starCl
|
|
|
11467
11564
|
"aria-label": group.isStarred ? ui.starOffLabel : ui.starOnLabel,
|
|
11468
11565
|
disabled: !starClickable2 || starTap.pendingId !== null,
|
|
11469
11566
|
onClick: onStarClick,
|
|
11470
|
-
children: /* @__PURE__ */
|
|
11567
|
+
children: /* @__PURE__ */ jsx85("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ jsx85(
|
|
11471
11568
|
"path",
|
|
11472
11569
|
{
|
|
11473
11570
|
d: STAR_PATH3,
|
|
@@ -11481,7 +11578,7 @@ function LeagueRowGroup({ group, states, stale, cap: cap2, starClickable: starCl
|
|
|
11481
11578
|
}
|
|
11482
11579
|
)
|
|
11483
11580
|
] }),
|
|
11484
|
-
/* @__PURE__ */
|
|
11581
|
+
/* @__PURE__ */ jsx85("div", { className: "ss-w-today-rowgroup-rows", children: shown2.map((m) => /* @__PURE__ */ jsx85(
|
|
11485
11582
|
FixtureRow,
|
|
11486
11583
|
{
|
|
11487
11584
|
match: m,
|
|
@@ -11492,7 +11589,7 @@ function LeagueRowGroup({ group, states, stale, cap: cap2, starClickable: starCl
|
|
|
11492
11589
|
},
|
|
11493
11590
|
matchKey6(m.sport, m.matchId)
|
|
11494
11591
|
)) }),
|
|
11495
|
-
overflow > 0 && /* @__PURE__ */
|
|
11592
|
+
overflow > 0 && /* @__PURE__ */ jsx85("button", { type: "button", className: "ss-w-today-rowgroup-seeall", onClick: onOpen, children: ui.seeAllFixturesLabel(sorted.length) })
|
|
11496
11593
|
] });
|
|
11497
11594
|
}
|
|
11498
11595
|
|
|
@@ -11500,8 +11597,8 @@ function LeagueRowGroup({ group, states, stale, cap: cap2, starClickable: starCl
|
|
|
11500
11597
|
import { useCallback as useCallback22, useRef as useRef28 } from "react";
|
|
11501
11598
|
|
|
11502
11599
|
// src/components/games/ui/icons.tsx
|
|
11503
|
-
import { jsx as
|
|
11504
|
-
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(
|
|
11505
11602
|
"svg",
|
|
11506
11603
|
{
|
|
11507
11604
|
width: size,
|
|
@@ -11516,25 +11613,25 @@ var svg = (size, children, fill = false) => /* @__PURE__ */ jsx85(
|
|
|
11516
11613
|
children
|
|
11517
11614
|
}
|
|
11518
11615
|
);
|
|
11519
|
-
var IconChevronLeft = ({ size = 20 }) => svg(size, /* @__PURE__ */
|
|
11520
|
-
var IconLock = ({ size = 14 }) => svg(size, [/* @__PURE__ */
|
|
11521
|
-
var IconCheck = ({ size = 14 }) => svg(size, /* @__PURE__ */
|
|
11522
|
-
var IconClose = ({ size = 16 }) => svg(size, /* @__PURE__ */
|
|
11523
|
-
var IconSearch = ({ size = 18 }) => svg(size, [/* @__PURE__ */
|
|
11524
|
-
var IconPlus = ({ size = 20 }) => svg(size, /* @__PURE__ */
|
|
11525
|
-
var IconBulb = ({ size = 16 }) => svg(size, [/* @__PURE__ */
|
|
11526
|
-
var IconArrowUp = ({ size = 12 }) => svg(size, /* @__PURE__ */
|
|
11527
|
-
var IconArrowDown = ({ size = 12 }) => svg(size, /* @__PURE__ */
|
|
11528
|
-
var IconCalendar = ({ size = 18 }) => svg(size, [/* @__PURE__ */
|
|
11529
|
-
var IconShield = ({ size = 18 }) => svg(size, /* @__PURE__ */
|
|
11530
|
-
var IconFlag = ({ size = 18 }) => svg(size, /* @__PURE__ */
|
|
11531
|
-
var IconBall = ({ size = 18 }) => svg(size, [/* @__PURE__ */
|
|
11532
|
-
var IconBoot = ({ size = 18 }) => svg(size, /* @__PURE__ */
|
|
11533
|
-
var IconGloves = ({ size = 18 }) => svg(size, /* @__PURE__ */
|
|
11534
|
-
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);
|
|
11535
11632
|
|
|
11536
11633
|
// src/components/games/ui/SearchField.tsx
|
|
11537
|
-
import { jsx as
|
|
11634
|
+
import { jsx as jsx87, jsxs as jsxs81 } from "react/jsx-runtime";
|
|
11538
11635
|
function SearchField({ id, label, labelHidden = false, placeholder, value, onChange, disabled, inputRef, onKeyDown, clearLabel }) {
|
|
11539
11636
|
const localRef = useRef28(null);
|
|
11540
11637
|
const setInputRef = useCallback22((node) => {
|
|
@@ -11542,11 +11639,11 @@ function SearchField({ id, label, labelHidden = false, placeholder, value, onCha
|
|
|
11542
11639
|
if (typeof inputRef === "function") inputRef(node);
|
|
11543
11640
|
else if (inputRef) inputRef.current = node;
|
|
11544
11641
|
}, [inputRef]);
|
|
11545
|
-
return /* @__PURE__ */
|
|
11546
|
-
/* @__PURE__ */
|
|
11547
|
-
/* @__PURE__ */
|
|
11548
|
-
/* @__PURE__ */
|
|
11549
|
-
/* @__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(
|
|
11550
11647
|
"input",
|
|
11551
11648
|
{
|
|
11552
11649
|
id,
|
|
@@ -11560,7 +11657,7 @@ function SearchField({ id, label, labelHidden = false, placeholder, value, onCha
|
|
|
11560
11657
|
onChange: (e) => onChange(e.target.value)
|
|
11561
11658
|
}
|
|
11562
11659
|
),
|
|
11563
|
-
clearLabel && value.length > 0 ? /* @__PURE__ */
|
|
11660
|
+
clearLabel && value.length > 0 ? /* @__PURE__ */ jsx87(
|
|
11564
11661
|
"button",
|
|
11565
11662
|
{
|
|
11566
11663
|
type: "button",
|
|
@@ -11570,7 +11667,7 @@ function SearchField({ id, label, labelHidden = false, placeholder, value, onCha
|
|
|
11570
11667
|
onChange("");
|
|
11571
11668
|
localRef.current?.focus();
|
|
11572
11669
|
},
|
|
11573
|
-
children: /* @__PURE__ */
|
|
11670
|
+
children: /* @__PURE__ */ jsx87(IconClose, { size: 11 })
|
|
11574
11671
|
}
|
|
11575
11672
|
) : null
|
|
11576
11673
|
] })
|
|
@@ -11578,7 +11675,7 @@ function SearchField({ id, label, labelHidden = false, placeholder, value, onCha
|
|
|
11578
11675
|
}
|
|
11579
11676
|
|
|
11580
11677
|
// src/components/TodayPanel.tsx
|
|
11581
|
-
import { Fragment as Fragment21, jsx as
|
|
11678
|
+
import { Fragment as Fragment21, jsx as jsx88, jsxs as jsxs82 } from "react/jsx-runtime";
|
|
11582
11679
|
function TodayPanel({ discovery, ui, monitor }) {
|
|
11583
11680
|
const { groups, states, stale, starLeague } = discovery;
|
|
11584
11681
|
const searchId = useId2();
|
|
@@ -11635,12 +11732,12 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
11635
11732
|
if (selectedCompetitionId !== null && openGroup === void 0) setSelectedCompetitionId(null);
|
|
11636
11733
|
}, [selectedCompetitionId, openGroup]);
|
|
11637
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);
|
|
11638
|
-
const liveBand = liveRows.length > 0 && /* @__PURE__ */
|
|
11639
|
-
/* @__PURE__ */
|
|
11640
|
-
/* @__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" }),
|
|
11641
11738
|
ui.sectionLive
|
|
11642
11739
|
] }),
|
|
11643
|
-
/* @__PURE__ */
|
|
11740
|
+
/* @__PURE__ */ jsx88("div", { className: "ss-w-today-live", children: liveRows.map(({ match }) => /* @__PURE__ */ jsx88(
|
|
11644
11741
|
FixtureRow,
|
|
11645
11742
|
{
|
|
11646
11743
|
match,
|
|
@@ -11653,10 +11750,10 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
11653
11750
|
)) })
|
|
11654
11751
|
] });
|
|
11655
11752
|
if (openGroup !== void 0) {
|
|
11656
|
-
return /* @__PURE__ */
|
|
11657
|
-
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 }),
|
|
11658
11755
|
liveBand,
|
|
11659
|
-
/* @__PURE__ */
|
|
11756
|
+
/* @__PURE__ */ jsx88(
|
|
11660
11757
|
LeagueDetail,
|
|
11661
11758
|
{
|
|
11662
11759
|
group: openGroup,
|
|
@@ -11677,11 +11774,11 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
11677
11774
|
}
|
|
11678
11775
|
const searching = query.trim().length > 0;
|
|
11679
11776
|
const searchResults = searching ? placement.order.filter((g) => matchesQuery(g, query)) : [];
|
|
11680
|
-
return /* @__PURE__ */
|
|
11681
|
-
/* @__PURE__ */
|
|
11682
|
-
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 }),
|
|
11683
11780
|
!searching && liveBand,
|
|
11684
|
-
/* @__PURE__ */
|
|
11781
|
+
/* @__PURE__ */ jsx88(
|
|
11685
11782
|
SearchField,
|
|
11686
11783
|
{
|
|
11687
11784
|
id: searchId,
|
|
@@ -11693,19 +11790,19 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
11693
11790
|
clearLabel: ui.clearSearchLabel
|
|
11694
11791
|
}
|
|
11695
11792
|
),
|
|
11696
|
-
searching ? searchResults.length === 0 ? /* @__PURE__ */
|
|
11697
|
-
/* @__PURE__ */
|
|
11698
|
-
/* @__PURE__ */
|
|
11699
|
-
/* @__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: [
|
|
11700
11797
|
group.competitionName,
|
|
11701
|
-
(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: [
|
|
11702
11799
|
" (",
|
|
11703
11800
|
group.competitionCountry,
|
|
11704
11801
|
")"
|
|
11705
11802
|
] }) : null
|
|
11706
11803
|
] })
|
|
11707
11804
|
] }),
|
|
11708
|
-
matchingFixtures(group, query).map((match) => /* @__PURE__ */
|
|
11805
|
+
matchingFixtures(group, query).map((match) => /* @__PURE__ */ jsx88(
|
|
11709
11806
|
"div",
|
|
11710
11807
|
{
|
|
11711
11808
|
role: "button",
|
|
@@ -11719,7 +11816,7 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
11719
11816
|
setSelectedCompetitionId(group.competitionId);
|
|
11720
11817
|
}
|
|
11721
11818
|
},
|
|
11722
|
-
children: /* @__PURE__ */
|
|
11819
|
+
children: /* @__PURE__ */ jsx88(
|
|
11723
11820
|
FixtureRow,
|
|
11724
11821
|
{
|
|
11725
11822
|
match,
|
|
@@ -11732,13 +11829,13 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
11732
11829
|
},
|
|
11733
11830
|
matchKey7(match.sport, match.matchId)
|
|
11734
11831
|
))
|
|
11735
|
-
] }, group.competitionId)) }) : /* @__PURE__ */
|
|
11736
|
-
/* @__PURE__ */
|
|
11832
|
+
] }, group.competitionId)) }) : /* @__PURE__ */ jsxs82(Fragment21, { children: [
|
|
11833
|
+
/* @__PURE__ */ jsxs82("div", { className: "ss-w-today-sec", children: [
|
|
11737
11834
|
placement.personal ? ui.yourLeagues : ui.topLeagues,
|
|
11738
|
-
!placement.personal && /* @__PURE__ */
|
|
11835
|
+
!placement.personal && /* @__PURE__ */ jsx88("span", { className: "ss-w-today-sec-sub", children: ui.topLeaguesSub })
|
|
11739
11836
|
] }),
|
|
11740
|
-
/* @__PURE__ */
|
|
11741
|
-
rowedCandidates.map((group) => /* @__PURE__ */
|
|
11837
|
+
/* @__PURE__ */ jsxs82("div", { className: "ss-w-today-rowsection", children: [
|
|
11838
|
+
rowedCandidates.map((group) => /* @__PURE__ */ jsx88(
|
|
11742
11839
|
LeagueRowGroup,
|
|
11743
11840
|
{
|
|
11744
11841
|
group,
|
|
@@ -11754,7 +11851,7 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
11754
11851
|
},
|
|
11755
11852
|
group.competitionId
|
|
11756
11853
|
)),
|
|
11757
|
-
tiledCandidates.length > 0 && /* @__PURE__ */
|
|
11854
|
+
tiledCandidates.length > 0 && /* @__PURE__ */ jsx88("div", { className: "ss-w-today-tiles", children: tiledCandidates.map((group) => /* @__PURE__ */ jsx88(
|
|
11758
11855
|
LeagueTile,
|
|
11759
11856
|
{
|
|
11760
11857
|
group,
|
|
@@ -11767,8 +11864,8 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
11767
11864
|
group.competitionId
|
|
11768
11865
|
)) })
|
|
11769
11866
|
] }),
|
|
11770
|
-
/* @__PURE__ */
|
|
11771
|
-
/* @__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(
|
|
11772
11869
|
LeagueTile,
|
|
11773
11870
|
{
|
|
11774
11871
|
group,
|
|
@@ -11782,7 +11879,7 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
11782
11879
|
)) })
|
|
11783
11880
|
] })
|
|
11784
11881
|
] }),
|
|
11785
|
-
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 })
|
|
11786
11883
|
] });
|
|
11787
11884
|
}
|
|
11788
11885
|
|
|
@@ -11790,9 +11887,9 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
11790
11887
|
import { useEffect as useEffect39, useState as useState63 } from "react";
|
|
11791
11888
|
|
|
11792
11889
|
// src/components/GamesLoginWall.tsx
|
|
11793
|
-
import { jsx as
|
|
11890
|
+
import { jsx as jsx89 } from "react/jsx-runtime";
|
|
11794
11891
|
function GamesLoginWall({ ui }) {
|
|
11795
|
-
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 }) }) });
|
|
11796
11893
|
}
|
|
11797
11894
|
|
|
11798
11895
|
// src/components/GamesHub.tsx
|
|
@@ -11812,74 +11909,74 @@ function splitName(full) {
|
|
|
11812
11909
|
}
|
|
11813
11910
|
|
|
11814
11911
|
// src/components/GameTileArt.tsx
|
|
11815
|
-
import { Fragment as Fragment22, jsx as
|
|
11912
|
+
import { Fragment as Fragment22, jsx as jsx90, jsxs as jsxs83 } from "react/jsx-runtime";
|
|
11816
11913
|
function GameTileArt({ gameId }) {
|
|
11817
|
-
return /* @__PURE__ */
|
|
11914
|
+
return /* @__PURE__ */ jsx90("svg", { className: "ss-g-art", viewBox: "0 0 120 74", "aria-hidden": "true", children: ART[gameId] ?? ART.default });
|
|
11818
11915
|
}
|
|
11819
|
-
var head = (cx, cy, r, cls = "ss-g-art-fg") => /* @__PURE__ */
|
|
11820
|
-
/* @__PURE__ */
|
|
11821
|
-
/* @__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` })
|
|
11822
11919
|
] });
|
|
11823
11920
|
var ART = {
|
|
11824
|
-
"mystery-tiger": /* @__PURE__ */
|
|
11921
|
+
"mystery-tiger": /* @__PURE__ */ jsxs83(Fragment22, { children: [
|
|
11825
11922
|
head(60, 38, 26, "ss-g-art-fg"),
|
|
11826
|
-
/* @__PURE__ */
|
|
11923
|
+
/* @__PURE__ */ jsx90("text", { x: "60", y: "36", className: "ss-g-art-q", textAnchor: "middle", children: "?" })
|
|
11827
11924
|
] }),
|
|
11828
|
-
"higher-or-lower": /* @__PURE__ */
|
|
11925
|
+
"higher-or-lower": /* @__PURE__ */ jsxs83(Fragment22, { children: [
|
|
11829
11926
|
head(32, 38, 20),
|
|
11830
11927
|
head(88, 38, 20),
|
|
11831
|
-
/* @__PURE__ */
|
|
11832
|
-
/* @__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" })
|
|
11833
11930
|
] }),
|
|
11834
|
-
"guess-the-xi": /* @__PURE__ */
|
|
11835
|
-
/* @__PURE__ */
|
|
11836
|
-
[[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))
|
|
11837
11934
|
] }),
|
|
11838
|
-
"daily-quiz": /* @__PURE__ */
|
|
11839
|
-
"career-path": /* @__PURE__ */
|
|
11840
|
-
/* @__PURE__ */
|
|
11841
|
-
/* @__PURE__ */
|
|
11842
|
-
/* @__PURE__ */
|
|
11843
|
-
/* @__PURE__ */
|
|
11844
|
-
/* @__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: "?" })
|
|
11845
11942
|
] }),
|
|
11846
|
-
"beat-the-grid": /* @__PURE__ */
|
|
11847
|
-
"matchday-predictor": /* @__PURE__ */
|
|
11848
|
-
/* @__PURE__ */
|
|
11849
|
-
/* @__PURE__ */
|
|
11850
|
-
/* @__PURE__ */
|
|
11851
|
-
/* @__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" })
|
|
11852
11949
|
] }),
|
|
11853
|
-
"starting-xi": /* @__PURE__ */
|
|
11854
|
-
/* @__PURE__ */
|
|
11855
|
-
[[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))
|
|
11856
11953
|
] }),
|
|
11857
|
-
"stat-ladder": /* @__PURE__ */
|
|
11858
|
-
"fan-motm": /* @__PURE__ */
|
|
11859
|
-
/* @__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" }),
|
|
11860
11957
|
head(60, 40, 18),
|
|
11861
|
-
/* @__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" })
|
|
11862
11959
|
] }),
|
|
11863
|
-
default: /* @__PURE__ */
|
|
11960
|
+
default: /* @__PURE__ */ jsx90("circle", { cx: "60", cy: "37", r: "22", className: "ss-g-art-fg" })
|
|
11864
11961
|
};
|
|
11865
11962
|
|
|
11866
11963
|
// src/components/games/ui/Chip.tsx
|
|
11867
|
-
import { jsx as
|
|
11964
|
+
import { jsx as jsx91, jsxs as jsxs84 } from "react/jsx-runtime";
|
|
11868
11965
|
function Chip({ variant = "neutral", icon, children, className }) {
|
|
11869
|
-
return /* @__PURE__ */
|
|
11966
|
+
return /* @__PURE__ */ jsxs84("span", { className: `ss-g-chip ss-g-chip--${variant}${className ? ` ${className}` : ""}`, children: [
|
|
11870
11967
|
icon,
|
|
11871
11968
|
children
|
|
11872
11969
|
] });
|
|
11873
11970
|
}
|
|
11874
11971
|
function StatStack({ value, label }) {
|
|
11875
|
-
return /* @__PURE__ */
|
|
11876
|
-
/* @__PURE__ */
|
|
11877
|
-
/* @__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 })
|
|
11878
11975
|
] });
|
|
11879
11976
|
}
|
|
11880
11977
|
|
|
11881
11978
|
// src/components/GameTile.tsx
|
|
11882
|
-
import { Fragment as Fragment23, jsx as
|
|
11979
|
+
import { Fragment as Fragment23, jsx as jsx92, jsxs as jsxs85 } from "react/jsx-runtime";
|
|
11883
11980
|
function tileStatus(game, ui) {
|
|
11884
11981
|
switch (game.status) {
|
|
11885
11982
|
case "locked":
|
|
@@ -11900,41 +11997,41 @@ function tileStatus(game, ui) {
|
|
|
11900
11997
|
}
|
|
11901
11998
|
var DISABLED = /* @__PURE__ */ new Set(["locked", "voided"]);
|
|
11902
11999
|
function GameTile({ game, onOpen, ui, variant = "tile" }) {
|
|
11903
|
-
const
|
|
12000
|
+
const status2 = tileStatus(game, ui);
|
|
11904
12001
|
const disabled = DISABLED.has(game.status);
|
|
11905
12002
|
const title = gameTitle(game, ui.games.titles);
|
|
11906
|
-
const body = variant === "hero" ? /* @__PURE__ */
|
|
11907
|
-
/* @__PURE__ */
|
|
11908
|
-
/* @__PURE__ */
|
|
11909
|
-
|
|
11910
|
-
/* @__PURE__ */
|
|
11911
|
-
/* @__PURE__ */
|
|
11912
|
-
|
|
11913
|
-
|
|
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,
|
|
11914
12011
|
" \u2192"
|
|
11915
12012
|
] })
|
|
11916
12013
|
] }),
|
|
11917
|
-
/* @__PURE__ */
|
|
11918
|
-
] }) : variant === "wide" ? /* @__PURE__ */
|
|
11919
|
-
/* @__PURE__ */
|
|
11920
|
-
/* @__PURE__ */
|
|
11921
|
-
/* @__PURE__ */
|
|
11922
|
-
/* @__PURE__ */
|
|
11923
|
-
|
|
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 })
|
|
11924
12021
|
] }),
|
|
11925
|
-
/* @__PURE__ */
|
|
11926
|
-
] }) : /* @__PURE__ */
|
|
11927
|
-
/* @__PURE__ */
|
|
11928
|
-
/* @__PURE__ */
|
|
11929
|
-
/* @__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 })
|
|
11930
12027
|
] });
|
|
11931
12028
|
const cls = `ss-g-tile ss-g-tile--${variant}`;
|
|
11932
|
-
if (disabled) return /* @__PURE__ */
|
|
11933
|
-
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 });
|
|
11934
12031
|
}
|
|
11935
12032
|
|
|
11936
12033
|
// src/components/GamesHub.tsx
|
|
11937
|
-
import { Fragment as Fragment24, jsx as
|
|
12034
|
+
import { Fragment as Fragment24, jsx as jsx93, jsxs as jsxs86 } from "react/jsx-runtime";
|
|
11938
12035
|
var PLAYABLE = /* @__PURE__ */ new Set(["available", "in_progress"]);
|
|
11939
12036
|
var DONE = /* @__PURE__ */ new Set(["played", "graded"]);
|
|
11940
12037
|
function pickHeroGame(games) {
|
|
@@ -11960,49 +12057,49 @@ function GamesHub({ games, myWeeklyRow, weeklyPrize, onOpen, ui }) {
|
|
|
11960
12057
|
const kickoffs = fixtures.map((g) => g.kickoffUtc).filter((k) => !!k).sort();
|
|
11961
12058
|
const todayPts = games.filter((g) => DONE.has(g.status)).reduce((s, g) => s + (g.score ?? 0), 0);
|
|
11962
12059
|
const dash = "\u2014";
|
|
11963
|
-
return /* @__PURE__ */
|
|
11964
|
-
/* @__PURE__ */
|
|
11965
|
-
/* @__PURE__ */
|
|
11966
|
-
/* @__PURE__ */
|
|
11967
|
-
/* @__PURE__ */
|
|
11968
|
-
myWeeklyRow ? /* @__PURE__ */
|
|
11969
|
-
/* @__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, {}),
|
|
11970
12067
|
myWeeklyRow.currentStreak
|
|
11971
12068
|
] }) : dash,
|
|
11972
|
-
myWeeklyRow && /* @__PURE__ */
|
|
12069
|
+
myWeeklyRow && /* @__PURE__ */ jsx93("small", { children: ui.games.unitDays })
|
|
11973
12070
|
] })
|
|
11974
12071
|
] }),
|
|
11975
|
-
/* @__PURE__ */
|
|
11976
|
-
/* @__PURE__ */
|
|
11977
|
-
/* @__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: [
|
|
11978
12075
|
ui.games.formatPts(todayPts),
|
|
11979
|
-
/* @__PURE__ */
|
|
12076
|
+
/* @__PURE__ */ jsx93("small", { children: ui.games.unitPts })
|
|
11980
12077
|
] })
|
|
11981
12078
|
] }),
|
|
11982
|
-
/* @__PURE__ */
|
|
11983
|
-
/* @__PURE__ */
|
|
11984
|
-
/* @__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: [
|
|
11985
12082
|
myWeeklyRow ? `#${myWeeklyRow.rank}` : dash,
|
|
11986
|
-
myWeeklyRow && /* @__PURE__ */
|
|
12083
|
+
myWeeklyRow && /* @__PURE__ */ jsx93("small", { children: ui.games.thisWeek })
|
|
11987
12084
|
] })
|
|
11988
12085
|
] })
|
|
11989
12086
|
] }),
|
|
11990
|
-
weeklyPrize && /* @__PURE__ */
|
|
11991
|
-
hero && /* @__PURE__ */
|
|
11992
|
-
(grid.length > 0 || wide) && /* @__PURE__ */
|
|
11993
|
-
/* @__PURE__ */
|
|
11994
|
-
/* @__PURE__ */
|
|
11995
|
-
/* @__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 })
|
|
11996
12093
|
] }),
|
|
11997
|
-
grid.length > 0 && /* @__PURE__ */
|
|
11998
|
-
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" })
|
|
11999
12096
|
] }),
|
|
12000
|
-
fixtures.length > 0 && /* @__PURE__ */
|
|
12001
|
-
/* @__PURE__ */
|
|
12002
|
-
/* @__PURE__ */
|
|
12003
|
-
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])) })
|
|
12004
12101
|
] }),
|
|
12005
|
-
/* @__PURE__ */
|
|
12102
|
+
/* @__PURE__ */ jsx93("div", { className: "ss-g-grid", children: fixtures.map((g) => /* @__PURE__ */ jsx93(GameTile, { game: g, onOpen, ui }, tileKey(g))) })
|
|
12006
12103
|
] })
|
|
12007
12104
|
] });
|
|
12008
12105
|
}
|
|
@@ -12295,7 +12392,7 @@ function isNationCode(flag) {
|
|
|
12295
12392
|
|
|
12296
12393
|
// src/components/games/PlayerAvatar.tsx
|
|
12297
12394
|
import { useState as useState51 } from "react";
|
|
12298
|
-
import { jsx as
|
|
12395
|
+
import { jsx as jsx94 } from "react/jsx-runtime";
|
|
12299
12396
|
function initialsOf(name) {
|
|
12300
12397
|
const parts = name.trim().split(/\s+/).filter(Boolean);
|
|
12301
12398
|
const first = parts[0];
|
|
@@ -12314,39 +12411,39 @@ function PlayerAvatar({
|
|
|
12314
12411
|
}) {
|
|
12315
12412
|
const [failed, setFailed] = useState51(false);
|
|
12316
12413
|
const showImage = Boolean(imagePath) && !isPlaceholderImage(imagePath) && !failed;
|
|
12317
|
-
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) }) });
|
|
12318
12415
|
}
|
|
12319
12416
|
|
|
12320
12417
|
// src/components/games/ui/GameHeader.tsx
|
|
12321
|
-
import { jsx as
|
|
12418
|
+
import { jsx as jsx95, jsxs as jsxs87 } from "react/jsx-runtime";
|
|
12322
12419
|
function GameHeader({ title, eyebrow, right, onBack, backLabel }) {
|
|
12323
|
-
return /* @__PURE__ */
|
|
12324
|
-
onBack && /* @__PURE__ */
|
|
12325
|
-
/* @__PURE__ */
|
|
12326
|
-
eyebrow && /* @__PURE__ */
|
|
12327
|
-
/* @__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 })
|
|
12328
12425
|
] }),
|
|
12329
|
-
right && /* @__PURE__ */
|
|
12426
|
+
right && /* @__PURE__ */ jsx95("div", { className: "ss-g-head-right", children: right })
|
|
12330
12427
|
] });
|
|
12331
12428
|
}
|
|
12332
12429
|
|
|
12333
12430
|
// src/components/games/ui/SegmentProgress.tsx
|
|
12334
|
-
import { jsx as
|
|
12431
|
+
import { jsx as jsx96, jsxs as jsxs88 } from "react/jsx-runtime";
|
|
12335
12432
|
function SegmentProgress({ segments, ariaLabel, leftLabel, rightLabel, right }) {
|
|
12336
|
-
return /* @__PURE__ */
|
|
12337
|
-
/* @__PURE__ */
|
|
12338
|
-
(leftLabel || rightLabel) && /* @__PURE__ */
|
|
12339
|
-
/* @__PURE__ */
|
|
12340
|
-
/* @__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 })
|
|
12341
12438
|
] }),
|
|
12342
|
-
/* @__PURE__ */
|
|
12439
|
+
/* @__PURE__ */ jsx96(
|
|
12343
12440
|
"div",
|
|
12344
12441
|
{
|
|
12345
12442
|
className: "ss-g-segs",
|
|
12346
12443
|
role: "img",
|
|
12347
12444
|
"aria-label": ariaLabel,
|
|
12348
12445
|
style: { gridTemplateColumns: `repeat(${segments.length}, minmax(0, 1fr))` },
|
|
12349
|
-
children: segments.map((s, i) => /* @__PURE__ */
|
|
12446
|
+
children: segments.map((s, i) => /* @__PURE__ */ jsx96("span", { className: "ss-g-seg", "data-state": s }, i))
|
|
12350
12447
|
}
|
|
12351
12448
|
)
|
|
12352
12449
|
] }),
|
|
@@ -12355,12 +12452,12 @@ function SegmentProgress({ segments, ariaLabel, leftLabel, rightLabel, right })
|
|
|
12355
12452
|
}
|
|
12356
12453
|
|
|
12357
12454
|
// src/components/games/ui/AnswerTray.tsx
|
|
12358
|
-
import { Fragment as Fragment25, jsx as
|
|
12455
|
+
import { Fragment as Fragment25, jsx as jsx97, jsxs as jsxs89 } from "react/jsx-runtime";
|
|
12359
12456
|
function AnswerTray({ id, label, placeholder, optionsLabel, options, query, onQuery, onPick, disabled, minQuery = 0 }) {
|
|
12360
12457
|
const needle = query.trim().toLowerCase();
|
|
12361
12458
|
const shown2 = needle.length < minQuery ? [] : needle ? options.filter((o) => o.name.toLowerCase().includes(needle)) : options;
|
|
12362
|
-
return /* @__PURE__ */
|
|
12363
|
-
/* @__PURE__ */
|
|
12459
|
+
return /* @__PURE__ */ jsxs89(Fragment25, { children: [
|
|
12460
|
+
/* @__PURE__ */ jsx97(
|
|
12364
12461
|
SearchField,
|
|
12365
12462
|
{
|
|
12366
12463
|
id,
|
|
@@ -12372,9 +12469,9 @@ function AnswerTray({ id, label, placeholder, optionsLabel, options, query, onQu
|
|
|
12372
12469
|
disabled
|
|
12373
12470
|
}
|
|
12374
12471
|
),
|
|
12375
|
-
shown2.length > 0 && /* @__PURE__ */
|
|
12472
|
+
shown2.length > 0 && /* @__PURE__ */ jsx97("div", { className: "ss-g-tray", role: "listbox", "aria-label": optionsLabel, children: shown2.map((o) => {
|
|
12376
12473
|
const { first, last } = splitName(o.name);
|
|
12377
|
-
return /* @__PURE__ */
|
|
12474
|
+
return /* @__PURE__ */ jsxs89(
|
|
12378
12475
|
"button",
|
|
12379
12476
|
{
|
|
12380
12477
|
type: "button",
|
|
@@ -12385,10 +12482,10 @@ function AnswerTray({ id, label, placeholder, optionsLabel, options, query, onQu
|
|
|
12385
12482
|
disabled,
|
|
12386
12483
|
onClick: () => onPick(o.id),
|
|
12387
12484
|
children: [
|
|
12388
|
-
/* @__PURE__ */
|
|
12389
|
-
/* @__PURE__ */
|
|
12390
|
-
first && /* @__PURE__ */
|
|
12391
|
-
/* @__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 })
|
|
12392
12489
|
] })
|
|
12393
12490
|
]
|
|
12394
12491
|
},
|
|
@@ -12399,59 +12496,59 @@ function AnswerTray({ id, label, placeholder, optionsLabel, options, query, onQu
|
|
|
12399
12496
|
}
|
|
12400
12497
|
|
|
12401
12498
|
// src/components/games/ui/FooterBar.tsx
|
|
12402
|
-
import { jsx as
|
|
12499
|
+
import { jsx as jsx98 } from "react/jsx-runtime";
|
|
12403
12500
|
function FooterBar({ children }) {
|
|
12404
|
-
return /* @__PURE__ */
|
|
12501
|
+
return /* @__PURE__ */ jsx98("div", { className: "ss-g-footer", children });
|
|
12405
12502
|
}
|
|
12406
12503
|
|
|
12407
12504
|
// src/components/games/ui/Silhouette.tsx
|
|
12408
|
-
import { jsx as
|
|
12505
|
+
import { jsx as jsx99, jsxs as jsxs90 } from "react/jsx-runtime";
|
|
12409
12506
|
function Silhouette({ size, variant = "default" }) {
|
|
12410
|
-
return /* @__PURE__ */
|
|
12411
|
-
/* @__PURE__ */
|
|
12412
|
-
/* @__PURE__ */
|
|
12413
|
-
/* @__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" })
|
|
12414
12511
|
] }),
|
|
12415
|
-
variant === "mystery" && /* @__PURE__ */
|
|
12512
|
+
variant === "mystery" && /* @__PURE__ */ jsx99("span", { className: "ss-g-sil-q", children: "?" })
|
|
12416
12513
|
] });
|
|
12417
12514
|
}
|
|
12418
12515
|
|
|
12419
12516
|
// src/components/games/ui/GameButton.tsx
|
|
12420
|
-
import { jsx as
|
|
12517
|
+
import { jsx as jsx100 } from "react/jsx-runtime";
|
|
12421
12518
|
function GameButton({ variant = "primary", block = false, className, type = "button", ...rest }) {
|
|
12422
12519
|
const cls = `ss-g-btn ss-g-btn--${variant}${block ? " ss-g-btn--block" : ""}${className ? ` ${className}` : ""}`;
|
|
12423
|
-
return /* @__PURE__ */
|
|
12520
|
+
return /* @__PURE__ */ jsx100("button", { type, className: cls, ...rest });
|
|
12424
12521
|
}
|
|
12425
12522
|
|
|
12426
12523
|
// src/components/games/ui/ResultCard.tsx
|
|
12427
|
-
import { jsx as
|
|
12524
|
+
import { jsx as jsx101, jsxs as jsxs91 } from "react/jsx-runtime";
|
|
12428
12525
|
function ResultCard({ tone, title, score, detail, onBack, ui }) {
|
|
12429
|
-
return /* @__PURE__ */
|
|
12430
|
-
/* @__PURE__ */
|
|
12431
|
-
score !== void 0 && /* @__PURE__ */
|
|
12432
|
-
/* @__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 }),
|
|
12433
12530
|
ui.games.unitPts
|
|
12434
12531
|
] }),
|
|
12435
|
-
detail && /* @__PURE__ */
|
|
12436
|
-
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 })
|
|
12437
12534
|
] });
|
|
12438
12535
|
}
|
|
12439
12536
|
|
|
12440
12537
|
// src/components/games/ui/PointsLadderRow.tsx
|
|
12441
|
-
import { jsx as
|
|
12538
|
+
import { jsx as jsx102, jsxs as jsxs92 } from "react/jsx-runtime";
|
|
12442
12539
|
function PointsLadderRow({ ladder, guessesUsed, ui }) {
|
|
12443
12540
|
if (!ladder || ladder.length === 0) return null;
|
|
12444
12541
|
const now = ladder[Math.min(guessesUsed, ladder.length - 1)];
|
|
12445
12542
|
const next = ladder[guessesUsed + 1];
|
|
12446
12543
|
if (now === void 0) return null;
|
|
12447
|
-
return /* @__PURE__ */
|
|
12448
|
-
/* @__PURE__ */
|
|
12449
|
-
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) })
|
|
12450
12547
|
] });
|
|
12451
12548
|
}
|
|
12452
12549
|
|
|
12453
12550
|
// src/components/games/MysteryTigerGame.tsx
|
|
12454
|
-
import { Fragment as Fragment26, jsx as
|
|
12551
|
+
import { Fragment as Fragment26, jsx as jsx103, jsxs as jsxs93 } from "react/jsx-runtime";
|
|
12455
12552
|
function parseClientState(json) {
|
|
12456
12553
|
if (!json) return null;
|
|
12457
12554
|
try {
|
|
@@ -12573,22 +12670,22 @@ function MysteryTigerGame({
|
|
|
12573
12670
|
setQuery("");
|
|
12574
12671
|
onSubmit(JSON.stringify({ guesses: newGuesses }));
|
|
12575
12672
|
}
|
|
12576
|
-
const headerRight = !config ? void 0 : isOver ? /* @__PURE__ */
|
|
12673
|
+
const headerRight = !config ? void 0 : isOver ? /* @__PURE__ */ jsxs93(Chip, { variant: "accent", children: [
|
|
12577
12674
|
score,
|
|
12578
12675
|
" ",
|
|
12579
12676
|
ui.games.unitPts
|
|
12580
|
-
] }) : /* @__PURE__ */
|
|
12677
|
+
] }) : /* @__PURE__ */ jsx103("span", { "data-testid": "mt-chip", children: /* @__PURE__ */ jsxs93(Chip, { children: [
|
|
12581
12678
|
ui.games.guess,
|
|
12582
12679
|
" ",
|
|
12583
|
-
/* @__PURE__ */
|
|
12680
|
+
/* @__PURE__ */ jsx103("span", { className: "ss-g-num", children: guessesUsed + 1 }),
|
|
12584
12681
|
" / ",
|
|
12585
12682
|
totalGuesses
|
|
12586
12683
|
] }) });
|
|
12587
12684
|
const segments = Array.from({ length: totalGuesses }, (_, i) => i < guessesUsed ? "done" : i === guessesUsed ? "current" : "todo");
|
|
12588
12685
|
const cols = { gridTemplateColumns: `minmax(0, 1fr) repeat(${keys.length}, 42px)` };
|
|
12589
12686
|
const known = deriveKnownAttributes(guessResults, keys);
|
|
12590
|
-
return /* @__PURE__ */
|
|
12591
|
-
/* @__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(
|
|
12592
12689
|
GameHeader,
|
|
12593
12690
|
{
|
|
12594
12691
|
title: gameTitle({ gameId: "mystery-tiger" }, ui.games.titles),
|
|
@@ -12598,41 +12695,41 @@ function MysteryTigerGame({
|
|
|
12598
12695
|
backLabel: ui.back
|
|
12599
12696
|
}
|
|
12600
12697
|
),
|
|
12601
|
-
!config && /* @__PURE__ */
|
|
12602
|
-
config && /* @__PURE__ */
|
|
12603
|
-
/* @__PURE__ */
|
|
12604
|
-
!isOver && /* @__PURE__ */
|
|
12605
|
-
/* @__PURE__ */
|
|
12606
|
-
/* @__PURE__ */
|
|
12607
|
-
revealName ? /* @__PURE__ */
|
|
12608
|
-
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 })
|
|
12609
12706
|
] }),
|
|
12610
|
-
/* @__PURE__ */
|
|
12611
|
-
/* @__PURE__ */
|
|
12612
|
-
/* @__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 })
|
|
12613
12710
|
] }, k.key)) })
|
|
12614
12711
|
] }),
|
|
12615
|
-
!isOver && /* @__PURE__ */
|
|
12616
|
-
guessResults.length > 0 && /* @__PURE__ */
|
|
12617
|
-
/* @__PURE__ */
|
|
12618
|
-
/* @__PURE__ */
|
|
12619
|
-
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))
|
|
12620
12717
|
] }),
|
|
12621
12718
|
guessResults.map((gr, i) => {
|
|
12622
12719
|
const name = config.squadPlayers.find((p) => p.id === gr.playerId)?.name ?? `#${gr.playerId}`;
|
|
12623
12720
|
const { first, last } = splitName(name);
|
|
12624
|
-
return /* @__PURE__ */
|
|
12625
|
-
/* @__PURE__ */
|
|
12626
|
-
/* @__PURE__ */
|
|
12627
|
-
/* @__PURE__ */
|
|
12628
|
-
first && /* @__PURE__ */
|
|
12629
|
-
/* @__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 })
|
|
12630
12727
|
] })
|
|
12631
12728
|
] }),
|
|
12632
12729
|
keys.map((key) => {
|
|
12633
12730
|
const v = gr[key];
|
|
12634
12731
|
const arrow = directionArrow(v);
|
|
12635
|
-
return /* @__PURE__ */
|
|
12732
|
+
return /* @__PURE__ */ jsxs93(
|
|
12636
12733
|
"div",
|
|
12637
12734
|
{
|
|
12638
12735
|
className: "ss-g-mt-cell",
|
|
@@ -12640,8 +12737,8 @@ function MysteryTigerGame({
|
|
|
12640
12737
|
"data-verdict": v.verdict,
|
|
12641
12738
|
"aria-label": `${t.labels[key]}: ${v.value ?? v.verdict}${v.direction ? ` ${v.direction}` : ""}`,
|
|
12642
12739
|
children: [
|
|
12643
|
-
/* @__PURE__ */
|
|
12644
|
-
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 })
|
|
12645
12742
|
]
|
|
12646
12743
|
},
|
|
12647
12744
|
key
|
|
@@ -12650,25 +12747,25 @@ function MysteryTigerGame({
|
|
|
12650
12747
|
] }, gr.playerId);
|
|
12651
12748
|
})
|
|
12652
12749
|
] }),
|
|
12653
|
-
!isOver && /* @__PURE__ */
|
|
12654
|
-
/* @__PURE__ */
|
|
12655
|
-
/* @__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" }),
|
|
12656
12753
|
t.legendMatch
|
|
12657
12754
|
] }),
|
|
12658
|
-
/* @__PURE__ */
|
|
12659
|
-
/* @__PURE__ */
|
|
12755
|
+
/* @__PURE__ */ jsxs93("span", { children: [
|
|
12756
|
+
/* @__PURE__ */ jsx103("i", { className: "ss-g-mt-sw", "data-verdict": "near" }),
|
|
12660
12757
|
t.legendClose
|
|
12661
12758
|
] }),
|
|
12662
|
-
/* @__PURE__ */
|
|
12759
|
+
/* @__PURE__ */ jsxs93("span", { children: [
|
|
12663
12760
|
"\u25B2 ",
|
|
12664
12761
|
t.legendHigher
|
|
12665
12762
|
] })
|
|
12666
12763
|
] }),
|
|
12667
|
-
clientState?.hintLine && !isOver && /* @__PURE__ */
|
|
12668
|
-
/* @__PURE__ */
|
|
12669
|
-
/* @__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 })
|
|
12670
12767
|
] }),
|
|
12671
|
-
isOver && /* @__PURE__ */
|
|
12768
|
+
isOver && /* @__PURE__ */ jsx103(
|
|
12672
12769
|
ResultCard,
|
|
12673
12770
|
{
|
|
12674
12771
|
tone: clientState?.solved ? "win" : clientState?.failed ? "lose" : "neutral",
|
|
@@ -12680,7 +12777,7 @@ function MysteryTigerGame({
|
|
|
12680
12777
|
}
|
|
12681
12778
|
)
|
|
12682
12779
|
] }),
|
|
12683
|
-
!isOver && /* @__PURE__ */
|
|
12780
|
+
!isOver && /* @__PURE__ */ jsx103(FooterBar, { children: /* @__PURE__ */ jsx103(
|
|
12684
12781
|
AnswerTray,
|
|
12685
12782
|
{
|
|
12686
12783
|
id: inputId,
|
|
@@ -12699,7 +12796,7 @@ function MysteryTigerGame({
|
|
|
12699
12796
|
}
|
|
12700
12797
|
|
|
12701
12798
|
// src/components/games/HigherOrLowerGame.tsx
|
|
12702
|
-
import { Fragment as Fragment27, jsx as
|
|
12799
|
+
import { Fragment as Fragment27, jsx as jsx104, jsxs as jsxs94 } from "react/jsx-runtime";
|
|
12703
12800
|
var POINTS_PER_CORRECT = 10;
|
|
12704
12801
|
function parseClientState2(json) {
|
|
12705
12802
|
if (!json) return null;
|
|
@@ -12711,11 +12808,11 @@ function parseClientState2(json) {
|
|
|
12711
12808
|
}
|
|
12712
12809
|
function PlayerCard2({ name, imagePath, highlight, children }) {
|
|
12713
12810
|
const { first, last } = splitName(name);
|
|
12714
|
-
return /* @__PURE__ */
|
|
12715
|
-
/* @__PURE__ */
|
|
12716
|
-
/* @__PURE__ */
|
|
12717
|
-
first && /* @__PURE__ */
|
|
12718
|
-
/* @__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 }),
|
|
12719
12816
|
children
|
|
12720
12817
|
] })
|
|
12721
12818
|
] });
|
|
@@ -12747,47 +12844,47 @@ function HigherOrLowerGame({
|
|
|
12747
12844
|
const newAnswers = [...prevAnswers, { pairIndex: currentPair.pairIndex, pick }];
|
|
12748
12845
|
onSubmit(JSON.stringify({ answers: newAnswers }));
|
|
12749
12846
|
}
|
|
12750
|
-
return /* @__PURE__ */
|
|
12751
|
-
/* @__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(
|
|
12752
12849
|
GameHeader,
|
|
12753
12850
|
{
|
|
12754
12851
|
title: gameTitle({ gameId: "higher-or-lower" }, ui.games.titles),
|
|
12755
12852
|
eyebrow: t.eyebrow(POINTS_PER_CORRECT),
|
|
12756
|
-
right: config ? /* @__PURE__ */
|
|
12853
|
+
right: config ? /* @__PURE__ */ jsx104(StatStack, { value: runLength, label: t.streak }) : void 0,
|
|
12757
12854
|
onBack,
|
|
12758
12855
|
backLabel: ui.back
|
|
12759
12856
|
}
|
|
12760
12857
|
),
|
|
12761
|
-
!config && /* @__PURE__ */
|
|
12762
|
-
config && /* @__PURE__ */
|
|
12763
|
-
/* @__PURE__ */
|
|
12764
|
-
/* @__PURE__ */
|
|
12765
|
-
/* @__PURE__ */
|
|
12766
|
-
/* @__PURE__ */
|
|
12767
|
-
/* @__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) })
|
|
12768
12865
|
] }),
|
|
12769
|
-
currentPair && /* @__PURE__ */
|
|
12770
|
-
/* @__PURE__ */
|
|
12771
|
-
/* @__PURE__ */
|
|
12772
|
-
/* @__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 })
|
|
12773
12870
|
] }),
|
|
12774
|
-
/* @__PURE__ */
|
|
12775
|
-
/* @__PURE__ */
|
|
12776
|
-
/* @__PURE__ */
|
|
12777
|
-
/* @__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 }),
|
|
12778
12875
|
t.higher
|
|
12779
12876
|
] }),
|
|
12780
|
-
/* @__PURE__ */
|
|
12781
|
-
/* @__PURE__ */
|
|
12877
|
+
/* @__PURE__ */ jsxs94(GameButton, { variant: "outline", disabled: submitting, onClick: () => handlePick("lower"), children: [
|
|
12878
|
+
/* @__PURE__ */ jsx104(IconArrowDown, { size: 16 }),
|
|
12782
12879
|
t.lower
|
|
12783
12880
|
] })
|
|
12784
12881
|
] }) })
|
|
12785
12882
|
] }),
|
|
12786
|
-
lastAnswer && lastAnswerPair && /* @__PURE__ */
|
|
12787
|
-
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, {}),
|
|
12788
12885
|
t.lastAnswer(splitName(lastAnswerPair.playerBName).last, lastAnswer.playerBValue)
|
|
12789
12886
|
] }),
|
|
12790
|
-
isOver && /* @__PURE__ */
|
|
12887
|
+
isOver && /* @__PURE__ */ jsx104(
|
|
12791
12888
|
ResultCard,
|
|
12792
12889
|
{
|
|
12793
12890
|
tone: runEndedWrong ? "lose" : allPairsAnswered ? "win" : "neutral",
|
|
@@ -12799,15 +12896,15 @@ function HigherOrLowerGame({
|
|
|
12799
12896
|
}
|
|
12800
12897
|
)
|
|
12801
12898
|
] }),
|
|
12802
|
-
!isOver && /* @__PURE__ */
|
|
12803
|
-
/* @__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) => {
|
|
12804
12901
|
const a = answeredPairs[i];
|
|
12805
|
-
return /* @__PURE__ */
|
|
12902
|
+
return /* @__PURE__ */ jsx104("span", { className: "ss-g-hl-dot", "data-state": a ? a.wasCorrect ? "correct" : "wrong" : "todo" }, p.pairIndex);
|
|
12806
12903
|
}) }),
|
|
12807
|
-
/* @__PURE__ */
|
|
12808
|
-
/* @__PURE__ */
|
|
12904
|
+
/* @__PURE__ */ jsxs94("span", { className: "ss-g-hl-pts", children: [
|
|
12905
|
+
/* @__PURE__ */ jsx104("span", { "data-testid": "hol-score", children: score }),
|
|
12809
12906
|
" ",
|
|
12810
|
-
/* @__PURE__ */
|
|
12907
|
+
/* @__PURE__ */ jsx104("span", { className: "ss-g-hl-pts-unit", children: ui.games.unitPts })
|
|
12811
12908
|
] })
|
|
12812
12909
|
] }) })
|
|
12813
12910
|
] })
|
|
@@ -12819,17 +12916,17 @@ import { useState as useState54, useId as useId4 } from "react";
|
|
|
12819
12916
|
|
|
12820
12917
|
// src/components/games/ui/CrestShield.tsx
|
|
12821
12918
|
import { useState as useState53 } from "react";
|
|
12822
|
-
import { jsx as
|
|
12919
|
+
import { jsx as jsx105 } from "react/jsx-runtime";
|
|
12823
12920
|
function CrestShield({ src, name, size = 28 }) {
|
|
12824
12921
|
const [failed, setFailed] = useState53(false);
|
|
12825
12922
|
if (src && !isPlaceholderImage(src) && !failed) {
|
|
12826
|
-
return /* @__PURE__ */
|
|
12923
|
+
return /* @__PURE__ */ jsx105("img", { className: "ss-g-crest", src, alt: name, width: size, height: size, loading: "lazy", onError: () => setFailed(true) });
|
|
12827
12924
|
}
|
|
12828
|
-
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" }) });
|
|
12829
12926
|
}
|
|
12830
12927
|
|
|
12831
12928
|
// src/components/games/CareerPathGame.tsx
|
|
12832
|
-
import { Fragment as Fragment28, jsx as
|
|
12929
|
+
import { Fragment as Fragment28, jsx as jsx106, jsxs as jsxs95 } from "react/jsx-runtime";
|
|
12833
12930
|
function parseClientState3(json) {
|
|
12834
12931
|
if (!json) return null;
|
|
12835
12932
|
try {
|
|
@@ -12859,9 +12956,9 @@ function CareerPathGame({
|
|
|
12859
12956
|
const alreadyGuessedIds = new Set(clientState?.guessResults.map((g) => g.playerId) ?? []);
|
|
12860
12957
|
const isOver = result?.alreadyPlayed === true || clientState?.solved === true || clientState?.failed === true;
|
|
12861
12958
|
if (!config) {
|
|
12862
|
-
return /* @__PURE__ */
|
|
12863
|
-
/* @__PURE__ */
|
|
12864
|
-
/* @__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 })
|
|
12865
12962
|
] });
|
|
12866
12963
|
}
|
|
12867
12964
|
const visiblePath = clientState?.visiblePath ?? config.initialPath;
|
|
@@ -12875,61 +12972,61 @@ function CareerPathGame({
|
|
|
12875
12972
|
setQuery("");
|
|
12876
12973
|
onSubmit(JSON.stringify({ guesses: newGuesses }));
|
|
12877
12974
|
}
|
|
12878
|
-
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: [
|
|
12879
12976
|
ui.games.guess,
|
|
12880
12977
|
" ",
|
|
12881
|
-
/* @__PURE__ */
|
|
12978
|
+
/* @__PURE__ */ jsx106("span", { className: "ss-g-num", children: clientState.guessesUsed + 1 }),
|
|
12882
12979
|
" / ",
|
|
12883
12980
|
clientState.guessesUsed + clientState.guessesRemaining
|
|
12884
12981
|
] }) }) : void 0;
|
|
12885
12982
|
const outcome = clientState?.solved ? s.solved : clientState?.failed ? s.failed : ui.games.done;
|
|
12886
|
-
return /* @__PURE__ */
|
|
12887
|
-
/* @__PURE__ */
|
|
12888
|
-
/* @__PURE__ */
|
|
12889
|
-
!isOver && /* @__PURE__ */
|
|
12890
|
-
/* @__PURE__ */
|
|
12891
|
-
isOver && clientState?.revealedPlayerName ? /* @__PURE__ */
|
|
12892
|
-
/* @__PURE__ */
|
|
12893
|
-
/* @__PURE__ */
|
|
12894
|
-
clientState?.hintLine ? /* @__PURE__ */
|
|
12895
|
-
/* @__PURE__ */
|
|
12896
|
-
/* @__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 })
|
|
12897
12994
|
] }) : null
|
|
12898
12995
|
] })
|
|
12899
12996
|
] }),
|
|
12900
|
-
/* @__PURE__ */
|
|
12997
|
+
/* @__PURE__ */ jsxs95("ol", { className: "ss-g-cp-line", children: [
|
|
12901
12998
|
visiblePath.map((spell, i) => {
|
|
12902
12999
|
const years = i === 0 ? s.firstClub : spellYears(spell);
|
|
12903
|
-
return /* @__PURE__ */
|
|
12904
|
-
/* @__PURE__ */
|
|
12905
|
-
/* @__PURE__ */
|
|
12906
|
-
/* @__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" })
|
|
12907
13004
|
] }),
|
|
12908
|
-
/* @__PURE__ */
|
|
12909
|
-
/* @__PURE__ */
|
|
12910
|
-
/* @__PURE__ */
|
|
12911
|
-
/* @__PURE__ */
|
|
12912
|
-
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: [
|
|
12913
13010
|
years ? " \xB7 " : "",
|
|
12914
|
-
/* @__PURE__ */
|
|
13011
|
+
/* @__PURE__ */ jsx106("span", { className: "ss-g-cp-loan", children: s.loan })
|
|
12915
13012
|
] })
|
|
12916
13013
|
] })
|
|
12917
13014
|
] })
|
|
12918
13015
|
] }, `${spell.clubName}-${i}`);
|
|
12919
13016
|
}),
|
|
12920
|
-
hidden > 0 && /* @__PURE__ */
|
|
12921
|
-
/* @__PURE__ */
|
|
12922
|
-
/* @__PURE__ */
|
|
12923
|
-
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" })
|
|
12924
13021
|
] }),
|
|
12925
|
-
/* @__PURE__ */
|
|
13022
|
+
/* @__PURE__ */ jsx106("span", { className: "ss-g-cp-step-text", children: /* @__PURE__ */ jsx106("span", { className: "ss-g-cp-sub", children: s.nextClubHidden }) })
|
|
12926
13023
|
] }),
|
|
12927
|
-
hidden > 1 && /* @__PURE__ */
|
|
12928
|
-
/* @__PURE__ */
|
|
12929
|
-
/* @__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) }) })
|
|
12930
13027
|
] })
|
|
12931
13028
|
] }),
|
|
12932
|
-
isOver && /* @__PURE__ */
|
|
13029
|
+
isOver && /* @__PURE__ */ jsx106(
|
|
12933
13030
|
ResultCard,
|
|
12934
13031
|
{
|
|
12935
13032
|
tone: clientState?.solved ? "win" : clientState?.failed ? "lose" : "neutral",
|
|
@@ -12941,7 +13038,7 @@ function CareerPathGame({
|
|
|
12941
13038
|
}
|
|
12942
13039
|
)
|
|
12943
13040
|
] }),
|
|
12944
|
-
!isOver && /* @__PURE__ */
|
|
13041
|
+
!isOver && /* @__PURE__ */ jsx106(FooterBar, { children: /* @__PURE__ */ jsx106(
|
|
12945
13042
|
AnswerTray,
|
|
12946
13043
|
{
|
|
12947
13044
|
id: inputId,
|
|
@@ -12963,13 +13060,13 @@ function CareerPathGame({
|
|
|
12963
13060
|
import React, { useEffect as useEffect37, useId as useId5, useRef as useRef30, useState as useState55 } from "react";
|
|
12964
13061
|
|
|
12965
13062
|
// src/components/games/ui/OptionList.tsx
|
|
12966
|
-
import { jsx as
|
|
13063
|
+
import { jsx as jsx107 } from "react/jsx-runtime";
|
|
12967
13064
|
function OptionList({ label, options, onPick }) {
|
|
12968
|
-
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)) });
|
|
12969
13066
|
}
|
|
12970
13067
|
|
|
12971
13068
|
// src/components/games/BeatTheGridGame.tsx
|
|
12972
|
-
import { Fragment as Fragment29, jsx as
|
|
13069
|
+
import { Fragment as Fragment29, jsx as jsx108, jsxs as jsxs96 } from "react/jsx-runtime";
|
|
12973
13070
|
function criterionIconKind(label, key) {
|
|
12974
13071
|
const l = (key ?? label).toLowerCase();
|
|
12975
13072
|
if (l.includes("app")) return "calendar";
|
|
@@ -12987,34 +13084,34 @@ function rowAbbrev(label, map, key) {
|
|
|
12987
13084
|
function CriterionIcon({ kind }) {
|
|
12988
13085
|
switch (kind) {
|
|
12989
13086
|
case "calendar":
|
|
12990
|
-
return /* @__PURE__ */
|
|
13087
|
+
return /* @__PURE__ */ jsx108(IconCalendar, {});
|
|
12991
13088
|
case "ball":
|
|
12992
|
-
return /* @__PURE__ */
|
|
13089
|
+
return /* @__PURE__ */ jsx108(IconBall, {});
|
|
12993
13090
|
case "boot":
|
|
12994
|
-
return /* @__PURE__ */
|
|
13091
|
+
return /* @__PURE__ */ jsx108(IconBoot, {});
|
|
12995
13092
|
case "gloves":
|
|
12996
|
-
return /* @__PURE__ */
|
|
13093
|
+
return /* @__PURE__ */ jsx108(IconGloves, {});
|
|
12997
13094
|
case "shield":
|
|
12998
|
-
return /* @__PURE__ */
|
|
13095
|
+
return /* @__PURE__ */ jsx108(IconShield, {});
|
|
12999
13096
|
default:
|
|
13000
|
-
return /* @__PURE__ */
|
|
13097
|
+
return /* @__PURE__ */ jsx108(IconFlag, {});
|
|
13001
13098
|
}
|
|
13002
13099
|
}
|
|
13003
13100
|
function HeaderVisual({ label, textKey: iKey, meta }) {
|
|
13004
13101
|
if (!meta) {
|
|
13005
|
-
return /* @__PURE__ */
|
|
13102
|
+
return /* @__PURE__ */ jsx108(CriterionIcon, { kind: criterionIconKind(label, iKey) });
|
|
13006
13103
|
}
|
|
13007
13104
|
switch (meta.kind) {
|
|
13008
13105
|
case "club":
|
|
13009
|
-
return /* @__PURE__ */
|
|
13106
|
+
return /* @__PURE__ */ jsx108(CrestShield, { src: meta.imageUrl, name: label, size: 24 });
|
|
13010
13107
|
case "coach":
|
|
13011
|
-
return /* @__PURE__ */
|
|
13108
|
+
return /* @__PURE__ */ jsx108(PlayerAvatar, { name: label, imagePath: meta.imageUrl, className: "ss-g-btg-coach-av" });
|
|
13012
13109
|
case "country":
|
|
13013
|
-
return /* @__PURE__ */
|
|
13110
|
+
return /* @__PURE__ */ jsx108("span", { className: "ss-g-btg-hdr-flag", "aria-hidden": "true", children: nationalityFlag(meta.country ?? label) });
|
|
13014
13111
|
case "position":
|
|
13015
|
-
return /* @__PURE__ */
|
|
13112
|
+
return /* @__PURE__ */ jsx108(Fragment29, {});
|
|
13016
13113
|
default:
|
|
13017
|
-
return /* @__PURE__ */
|
|
13114
|
+
return /* @__PURE__ */ jsx108(CriterionIcon, { kind: criterionIconKind(label, iKey) });
|
|
13018
13115
|
}
|
|
13019
13116
|
}
|
|
13020
13117
|
function parseClientState4(json) {
|
|
@@ -13058,12 +13155,12 @@ function SearchSheet({
|
|
|
13058
13155
|
const filtered = playerPool.filter(
|
|
13059
13156
|
(p) => !alreadyFilledIds.has(p.id) && p.name.toLowerCase().includes(query.toLowerCase())
|
|
13060
13157
|
);
|
|
13061
|
-
return /* @__PURE__ */
|
|
13062
|
-
/* @__PURE__ */
|
|
13063
|
-
/* @__PURE__ */
|
|
13064
|
-
/* @__PURE__ */
|
|
13065
|
-
/* @__PURE__ */
|
|
13066
|
-
/* @__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(
|
|
13067
13164
|
"button",
|
|
13068
13165
|
{
|
|
13069
13166
|
type: "button",
|
|
@@ -13071,12 +13168,12 @@ function SearchSheet({
|
|
|
13071
13168
|
"data-testid": "btg-sheet-dismiss",
|
|
13072
13169
|
"aria-label": s.closeSearch,
|
|
13073
13170
|
onClick: onDismiss,
|
|
13074
|
-
children: /* @__PURE__ */
|
|
13171
|
+
children: /* @__PURE__ */ jsx108(IconClose, {})
|
|
13075
13172
|
}
|
|
13076
13173
|
)
|
|
13077
13174
|
] }),
|
|
13078
|
-
playerPool.length === 0 ? /* @__PURE__ */
|
|
13079
|
-
/* @__PURE__ */
|
|
13175
|
+
playerPool.length === 0 ? /* @__PURE__ */ jsx108("div", { className: "ss-g-btg-sheet-empty", children: s.emptyPool }) : /* @__PURE__ */ jsxs96(Fragment29, { children: [
|
|
13176
|
+
/* @__PURE__ */ jsx108(
|
|
13080
13177
|
SearchField,
|
|
13081
13178
|
{
|
|
13082
13179
|
id: inputId,
|
|
@@ -13088,16 +13185,16 @@ function SearchSheet({
|
|
|
13088
13185
|
inputRef
|
|
13089
13186
|
}
|
|
13090
13187
|
),
|
|
13091
|
-
query.length > 0 && filtered.length > 0 && /* @__PURE__ */
|
|
13188
|
+
query.length > 0 && filtered.length > 0 && /* @__PURE__ */ jsx108(
|
|
13092
13189
|
OptionList,
|
|
13093
13190
|
{
|
|
13094
13191
|
label: s.searchLabel(rowLabel, colLabel),
|
|
13095
13192
|
options: filtered.map((p) => ({
|
|
13096
13193
|
key: p.id,
|
|
13097
|
-
content: /* @__PURE__ */
|
|
13098
|
-
/* @__PURE__ */
|
|
13099
|
-
/* @__PURE__ */
|
|
13100
|
-
/* @__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 }) })
|
|
13101
13198
|
] })
|
|
13102
13199
|
})),
|
|
13103
13200
|
onPick: (k) => onPick(row, col, Number(k))
|
|
@@ -13135,9 +13232,9 @@ function BeatTheGridGame({
|
|
|
13135
13232
|
onSubmit(JSON.stringify({ cells: newCells }));
|
|
13136
13233
|
}
|
|
13137
13234
|
if (!config) {
|
|
13138
|
-
return /* @__PURE__ */
|
|
13139
|
-
/* @__PURE__ */
|
|
13140
|
-
/* @__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 })
|
|
13141
13238
|
] });
|
|
13142
13239
|
}
|
|
13143
13240
|
const rows = config.rows;
|
|
@@ -13150,20 +13247,20 @@ function BeatTheGridGame({
|
|
|
13150
13247
|
(_, i) => i < correctCount ? "correct" : i < correctCount + wrongCount ? "wrong" : "todo"
|
|
13151
13248
|
);
|
|
13152
13249
|
const totalScore = clientState?.totalScore ?? result?.score ?? 0;
|
|
13153
|
-
return /* @__PURE__ */
|
|
13154
|
-
/* @__PURE__ */
|
|
13155
|
-
/* @__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(
|
|
13156
13253
|
SegmentProgress,
|
|
13157
13254
|
{
|
|
13158
13255
|
segments,
|
|
13159
13256
|
ariaLabel: s.progressAria(filledCells.length, total),
|
|
13160
13257
|
leftLabel: s.filled(filledCells.length, total),
|
|
13161
13258
|
rightLabel: s.toGo(Math.max(0, total - filledCells.length)),
|
|
13162
|
-
right: /* @__PURE__ */
|
|
13259
|
+
right: /* @__PURE__ */ jsx108(Chip, { variant: "accent", children: `${totalScore} ${ui.games.unitPts}` })
|
|
13163
13260
|
}
|
|
13164
13261
|
),
|
|
13165
|
-
/* @__PURE__ */
|
|
13166
|
-
/* @__PURE__ */
|
|
13262
|
+
/* @__PURE__ */ jsxs96("div", { className: "ss-g-body", children: [
|
|
13263
|
+
/* @__PURE__ */ jsxs96(
|
|
13167
13264
|
"div",
|
|
13168
13265
|
{
|
|
13169
13266
|
className: activeCell !== null ? "ss-g-btg-grid ss-g-btg-grid--fit" : "ss-g-btg-grid",
|
|
@@ -13173,31 +13270,31 @@ function BeatTheGridGame({
|
|
|
13173
13270
|
},
|
|
13174
13271
|
role: "grid",
|
|
13175
13272
|
children: [
|
|
13176
|
-
/* @__PURE__ */
|
|
13273
|
+
/* @__PURE__ */ jsx108("div", { className: "ss-g-btg-corner" }),
|
|
13177
13274
|
cols.map((col, colIdx) => {
|
|
13178
13275
|
const colMeta = config.colsMeta?.[colIdx];
|
|
13179
|
-
return /* @__PURE__ */
|
|
13180
|
-
/* @__PURE__ */
|
|
13181
|
-
/* @__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 })
|
|
13182
13279
|
] }, col);
|
|
13183
13280
|
}),
|
|
13184
13281
|
rows.map((rowLabel, rowIdx) => {
|
|
13185
13282
|
const rowMeta = config.rowsMeta?.[rowIdx];
|
|
13186
13283
|
const abbr = rowAbbrev(rowLabel, s.rowAbbrev, config.rowsI18n?.[rowIdx]?.key);
|
|
13187
|
-
const rowHeaderContent = rowMeta ? /* @__PURE__ */
|
|
13188
|
-
/* @__PURE__ */
|
|
13189
|
-
/* @__PURE__ */
|
|
13190
|
-
] }) : abbr === rowLabel ? /* @__PURE__ */
|
|
13191
|
-
/* @__PURE__ */
|
|
13192
|
-
/* @__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 })
|
|
13193
13290
|
] });
|
|
13194
|
-
return /* @__PURE__ */
|
|
13195
|
-
/* @__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 }),
|
|
13196
13293
|
cols.map((colLabel, colIdx) => {
|
|
13197
13294
|
const filled = findCellResult(filledCells, rowIdx, colIdx);
|
|
13198
13295
|
const isActive = activeCell?.row === rowIdx && activeCell?.col === colIdx;
|
|
13199
13296
|
const state = filled ? filled.isCorrect ? "correct" : "wrong" : isActive ? "active" : "empty";
|
|
13200
|
-
return /* @__PURE__ */
|
|
13297
|
+
return /* @__PURE__ */ jsx108(
|
|
13201
13298
|
"button",
|
|
13202
13299
|
{
|
|
13203
13300
|
type: "button",
|
|
@@ -13208,20 +13305,20 @@ function BeatTheGridGame({
|
|
|
13208
13305
|
className: "ss-g-btg-cell",
|
|
13209
13306
|
disabled: isLocked2 || submitting,
|
|
13210
13307
|
onClick: () => handleCellClick(rowIdx, colIdx),
|
|
13211
|
-
children: filled ? /* @__PURE__ */
|
|
13212
|
-
/* @__PURE__ */
|
|
13308
|
+
children: filled ? /* @__PURE__ */ jsxs96(Fragment29, { children: [
|
|
13309
|
+
/* @__PURE__ */ jsx108(
|
|
13213
13310
|
"span",
|
|
13214
13311
|
{
|
|
13215
13312
|
className: `ss-g-btg-badge ss-g-btg-badge--${filled.isCorrect ? "correct" : "wrong"}`,
|
|
13216
13313
|
role: "img",
|
|
13217
13314
|
"aria-label": filled.isCorrect ? s.correct : s.wrong,
|
|
13218
|
-
children: filled.isCorrect ? /* @__PURE__ */
|
|
13315
|
+
children: filled.isCorrect ? /* @__PURE__ */ jsx108(IconCheck, { size: 11 }) : /* @__PURE__ */ jsx108(IconClose, { size: 11 })
|
|
13219
13316
|
}
|
|
13220
13317
|
),
|
|
13221
|
-
/* @__PURE__ */
|
|
13318
|
+
/* @__PURE__ */ jsx108("span", { className: "ss-g-btg-rarity", children: filled.rarityScore }),
|
|
13222
13319
|
(() => {
|
|
13223
13320
|
const entry = playerPool.find((p) => p.id === filled.playerId);
|
|
13224
|
-
return /* @__PURE__ */
|
|
13321
|
+
return /* @__PURE__ */ jsx108(
|
|
13225
13322
|
PlayerAvatar,
|
|
13226
13323
|
{
|
|
13227
13324
|
name: entry?.name ?? "",
|
|
@@ -13230,8 +13327,8 @@ function BeatTheGridGame({
|
|
|
13230
13327
|
}
|
|
13231
13328
|
);
|
|
13232
13329
|
})(),
|
|
13233
|
-
/* @__PURE__ */
|
|
13234
|
-
] }) : /* @__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 }) })
|
|
13235
13332
|
},
|
|
13236
13333
|
`cell-${rowIdx}-${colIdx}`
|
|
13237
13334
|
);
|
|
@@ -13241,7 +13338,7 @@ function BeatTheGridGame({
|
|
|
13241
13338
|
]
|
|
13242
13339
|
}
|
|
13243
13340
|
),
|
|
13244
|
-
isLocked2 && /* @__PURE__ */
|
|
13341
|
+
isLocked2 && /* @__PURE__ */ jsx108(
|
|
13245
13342
|
ResultCard,
|
|
13246
13343
|
{
|
|
13247
13344
|
tone: "neutral",
|
|
@@ -13253,7 +13350,7 @@ function BeatTheGridGame({
|
|
|
13253
13350
|
}
|
|
13254
13351
|
)
|
|
13255
13352
|
] }),
|
|
13256
|
-
activeCell !== null && /* @__PURE__ */
|
|
13353
|
+
activeCell !== null && /* @__PURE__ */ jsx108("div", { className: "ss-g-btg-pin", children: /* @__PURE__ */ jsx108(
|
|
13257
13354
|
SearchSheet,
|
|
13258
13355
|
{
|
|
13259
13356
|
row: activeCell.row,
|
|
@@ -13275,18 +13372,18 @@ function BeatTheGridGame({
|
|
|
13275
13372
|
import { useState as useState56, useId as useId6 } from "react";
|
|
13276
13373
|
|
|
13277
13374
|
// src/components/games/ui/PitchSvg.tsx
|
|
13278
|
-
import { Fragment as Fragment30, jsx as
|
|
13375
|
+
import { Fragment as Fragment30, jsx as jsx109, jsxs as jsxs97 } from "react/jsx-runtime";
|
|
13279
13376
|
function PitchSvg({ variant }) {
|
|
13280
|
-
return /* @__PURE__ */
|
|
13281
|
-
/* @__PURE__ */
|
|
13282
|
-
variant === "full" ? /* @__PURE__ */
|
|
13283
|
-
/* @__PURE__ */
|
|
13284
|
-
/* @__PURE__ */
|
|
13285
|
-
/* @__PURE__ */
|
|
13286
|
-
/* @__PURE__ */
|
|
13287
|
-
] }) : /* @__PURE__ */
|
|
13288
|
-
/* @__PURE__ */
|
|
13289
|
-
/* @__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" })
|
|
13290
13387
|
] })
|
|
13291
13388
|
] });
|
|
13292
13389
|
}
|
|
@@ -13342,7 +13439,7 @@ function positionsBySlot(formation, rowsAttackFirst) {
|
|
|
13342
13439
|
}
|
|
13343
13440
|
|
|
13344
13441
|
// src/components/games/GuessTheXiGame.tsx
|
|
13345
|
-
import { Fragment as Fragment31, jsx as
|
|
13442
|
+
import { Fragment as Fragment31, jsx as jsx110, jsxs as jsxs98 } from "react/jsx-runtime";
|
|
13346
13443
|
var MAX_GUESSES2 = 3;
|
|
13347
13444
|
function parseClientState5(json) {
|
|
13348
13445
|
if (!json) return null;
|
|
@@ -13392,31 +13489,31 @@ function GuessTheXiGame({
|
|
|
13392
13489
|
const wrongGuesses = (clientState?.guessHistory ?? []).filter((g) => !g.wasCorrect);
|
|
13393
13490
|
const guessesLeft = Math.max(0, MAX_GUESSES2 - (clientState?.guessesUsed ?? 0));
|
|
13394
13491
|
const teamName = (id) => config?.teamPool.find((tm) => tm.teamId === id)?.teamName ?? `#${id}`;
|
|
13395
|
-
return /* @__PURE__ */
|
|
13396
|
-
/* @__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(
|
|
13397
13494
|
GameHeader,
|
|
13398
13495
|
{
|
|
13399
13496
|
title: gameTitle({ gameId: "guess-the-xi" }, ui.games.titles),
|
|
13400
13497
|
eyebrow: config?.poolLabel,
|
|
13401
|
-
right: formation ? /* @__PURE__ */
|
|
13498
|
+
right: formation ? /* @__PURE__ */ jsx110(Chip, { variant: "accent", children: formation }) : void 0,
|
|
13402
13499
|
onBack,
|
|
13403
13500
|
backLabel: ui.back
|
|
13404
13501
|
}
|
|
13405
13502
|
),
|
|
13406
|
-
!config && /* @__PURE__ */
|
|
13407
|
-
config && /* @__PURE__ */
|
|
13408
|
-
/* @__PURE__ */
|
|
13409
|
-
!isOver && /* @__PURE__ */
|
|
13410
|
-
rows.length > 0 && /* @__PURE__ */
|
|
13411
|
-
/* @__PURE__ */
|
|
13412
|
-
/* @__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) => {
|
|
13413
13510
|
const posLabel = pos.slot ? posBySlot.get(pos.slot) ?? "" : "";
|
|
13414
13511
|
const name = pos.slot ? nameBySlot.get(pos.slot) : void 0;
|
|
13415
13512
|
const lineupEntry = pos.slot ? lineupBySlot.get(pos.slot) : void 0;
|
|
13416
13513
|
const flag = nationalityFlag(pos.nationality);
|
|
13417
13514
|
if (lineupEntry) {
|
|
13418
|
-
return /* @__PURE__ */
|
|
13419
|
-
/* @__PURE__ */
|
|
13515
|
+
return /* @__PURE__ */ jsxs98("div", { className: "ss-g-gxi-node", "data-revealed": "true", children: [
|
|
13516
|
+
/* @__PURE__ */ jsx110(
|
|
13420
13517
|
PlayerAvatar,
|
|
13421
13518
|
{
|
|
13422
13519
|
name: lineupEntry.name,
|
|
@@ -13424,11 +13521,11 @@ function GuessTheXiGame({
|
|
|
13424
13521
|
className: "ss-g-gxi-disc ss-g-gxi-disc--photo"
|
|
13425
13522
|
}
|
|
13426
13523
|
),
|
|
13427
|
-
/* @__PURE__ */
|
|
13524
|
+
/* @__PURE__ */ jsx110("span", { className: "ss-g-gxi-pos ss-g-gxi-pos--name", children: splitName(lineupEntry.name).last })
|
|
13428
13525
|
] }, `${pos.slot}-${c}`);
|
|
13429
13526
|
}
|
|
13430
|
-
return /* @__PURE__ */
|
|
13431
|
-
/* @__PURE__ */
|
|
13527
|
+
return /* @__PURE__ */ jsxs98("div", { className: "ss-g-gxi-node", "data-revealed": name ? "true" : void 0, children: [
|
|
13528
|
+
/* @__PURE__ */ jsx110(
|
|
13432
13529
|
"span",
|
|
13433
13530
|
{
|
|
13434
13531
|
className: "ss-g-gxi-disc",
|
|
@@ -13439,22 +13536,22 @@ function GuessTheXiGame({
|
|
|
13439
13536
|
children: flag
|
|
13440
13537
|
}
|
|
13441
13538
|
),
|
|
13442
|
-
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 })
|
|
13443
13540
|
] }, `${pos.slot}-${c}`);
|
|
13444
13541
|
}) }, r)) })
|
|
13445
13542
|
] }),
|
|
13446
|
-
!isOver && wrongGuesses.length > 0 && /* @__PURE__ */
|
|
13447
|
-
/* @__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 }),
|
|
13448
13545
|
wrongGuesses.map((g) => {
|
|
13449
13546
|
const crestUrl = config?.teamPool.find((tm) => tm.teamId === g.teamId)?.crestUrl;
|
|
13450
|
-
return /* @__PURE__ */
|
|
13451
|
-
/* @__PURE__ */
|
|
13452
|
-
/* @__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) })
|
|
13453
13550
|
] }, g.teamId);
|
|
13454
13551
|
})
|
|
13455
13552
|
] }),
|
|
13456
|
-
isOver && /* @__PURE__ */
|
|
13457
|
-
/* @__PURE__ */
|
|
13553
|
+
isOver && /* @__PURE__ */ jsxs98(Fragment31, { children: [
|
|
13554
|
+
/* @__PURE__ */ jsx110(
|
|
13458
13555
|
ResultCard,
|
|
13459
13556
|
{
|
|
13460
13557
|
tone: solved ? "win" : failed ? "lose" : "neutral",
|
|
@@ -13465,29 +13562,29 @@ function GuessTheXiGame({
|
|
|
13465
13562
|
ui
|
|
13466
13563
|
}
|
|
13467
13564
|
),
|
|
13468
|
-
(solved || failed) && clientState?.answer && /* @__PURE__ */
|
|
13469
|
-
/* @__PURE__ */
|
|
13470
|
-
/* @__PURE__ */
|
|
13471
|
-
/* @__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 })
|
|
13472
13569
|
] })
|
|
13473
13570
|
] })
|
|
13474
13571
|
] }),
|
|
13475
|
-
!isOver && /* @__PURE__ */
|
|
13476
|
-
query.length > 0 && filtered.length > 0 && /* @__PURE__ */
|
|
13572
|
+
!isOver && /* @__PURE__ */ jsxs98(FooterBar, { children: [
|
|
13573
|
+
query.length > 0 && filtered.length > 0 && /* @__PURE__ */ jsx110(
|
|
13477
13574
|
OptionList,
|
|
13478
13575
|
{
|
|
13479
13576
|
label: t.optionsLabel,
|
|
13480
13577
|
options: filtered.map((tm) => ({
|
|
13481
13578
|
key: tm.teamId,
|
|
13482
|
-
content: /* @__PURE__ */
|
|
13483
|
-
/* @__PURE__ */
|
|
13484
|
-
/* @__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 })
|
|
13485
13582
|
] })
|
|
13486
13583
|
})),
|
|
13487
13584
|
onPick: (k) => handlePick(Number(k))
|
|
13488
13585
|
}
|
|
13489
13586
|
),
|
|
13490
|
-
/* @__PURE__ */
|
|
13587
|
+
/* @__PURE__ */ jsx110(
|
|
13491
13588
|
SearchField,
|
|
13492
13589
|
{
|
|
13493
13590
|
id: inputId,
|
|
@@ -13505,7 +13602,7 @@ function GuessTheXiGame({
|
|
|
13505
13602
|
|
|
13506
13603
|
// src/components/games/DailyQuizGame.tsx
|
|
13507
13604
|
import { useState as useState57 } from "react";
|
|
13508
|
-
import { Fragment as Fragment32, jsx as
|
|
13605
|
+
import { Fragment as Fragment32, jsx as jsx111, jsxs as jsxs99 } from "react/jsx-runtime";
|
|
13509
13606
|
function parseClientState6(json) {
|
|
13510
13607
|
if (!json) return null;
|
|
13511
13608
|
try {
|
|
@@ -13526,13 +13623,13 @@ function OptionName({ text }) {
|
|
|
13526
13623
|
const tokens = base.split(/\s+/).filter(Boolean);
|
|
13527
13624
|
const isPlainName = tokens.length >= 1 && tokens.length <= 4 && tokens.every((t) => NAME_TOKEN.test(t));
|
|
13528
13625
|
if (!isPlainName || base === "") {
|
|
13529
|
-
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 }) });
|
|
13530
13627
|
}
|
|
13531
13628
|
const { first, last } = splitName(base);
|
|
13532
|
-
return /* @__PURE__ */
|
|
13533
|
-
first && /* @__PURE__ */
|
|
13534
|
-
/* @__PURE__ */
|
|
13535
|
-
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 })
|
|
13536
13633
|
] });
|
|
13537
13634
|
}
|
|
13538
13635
|
function DailyQuizGame({
|
|
@@ -13551,9 +13648,9 @@ function DailyQuizGame({
|
|
|
13551
13648
|
const results2 = clientState?.results ?? [];
|
|
13552
13649
|
const isRevealed = results2.length > 0 || result?.alreadyPlayed === true;
|
|
13553
13650
|
if (!config) {
|
|
13554
|
-
return /* @__PURE__ */
|
|
13555
|
-
/* @__PURE__ */
|
|
13556
|
-
/* @__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 })
|
|
13557
13654
|
] });
|
|
13558
13655
|
}
|
|
13559
13656
|
const questions = config.questions;
|
|
@@ -13588,11 +13685,11 @@ function DailyQuizGame({
|
|
|
13588
13685
|
return r.isCorrect ? "correct" : "wrong";
|
|
13589
13686
|
});
|
|
13590
13687
|
const correctCount = results2.filter((r) => r.isCorrect).length;
|
|
13591
|
-
return /* @__PURE__ */
|
|
13592
|
-
/* @__PURE__ */
|
|
13593
|
-
/* @__PURE__ */
|
|
13594
|
-
/* @__PURE__ */
|
|
13595
|
-
/* @__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(
|
|
13596
13693
|
ResultCard,
|
|
13597
13694
|
{
|
|
13598
13695
|
tone: "neutral",
|
|
@@ -13605,15 +13702,15 @@ function DailyQuizGame({
|
|
|
13605
13702
|
questions.map((q) => {
|
|
13606
13703
|
const r = findResult(results2, q.index);
|
|
13607
13704
|
const picked = selections.get(q.index);
|
|
13608
|
-
return /* @__PURE__ */
|
|
13609
|
-
/* @__PURE__ */
|
|
13610
|
-
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) => {
|
|
13611
13708
|
let cls = "ss-g-dq-rq-opt";
|
|
13612
13709
|
if (optIdx === r.correctOptionIndex) cls += " ss-g-dq-rq-opt--correct";
|
|
13613
13710
|
else if (optIdx === picked && !r.isCorrect) cls += " ss-g-dq-rq-opt--wrong";
|
|
13614
|
-
return /* @__PURE__ */
|
|
13711
|
+
return /* @__PURE__ */ jsx111("span", { className: cls, children: opt }, optIdx);
|
|
13615
13712
|
}) }),
|
|
13616
|
-
r?.revealText && /* @__PURE__ */
|
|
13713
|
+
r?.revealText && /* @__PURE__ */ jsx111("div", { className: "ss-g-dq-why", children: r.revealText })
|
|
13617
13714
|
] }, q.index);
|
|
13618
13715
|
})
|
|
13619
13716
|
] })
|
|
@@ -13621,16 +13718,16 @@ function DailyQuizGame({
|
|
|
13621
13718
|
}
|
|
13622
13719
|
const segments = questions.map((_, i) => i < page ? "done" : i === page ? "current" : "todo");
|
|
13623
13720
|
const selectedIdx = current ? selections.get(current.index) : void 0;
|
|
13624
|
-
return /* @__PURE__ */
|
|
13625
|
-
/* @__PURE__ */
|
|
13626
|
-
/* @__PURE__ */
|
|
13627
|
-
/* @__PURE__ */
|
|
13628
|
-
/* @__PURE__ */
|
|
13629
|
-
/* @__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) => {
|
|
13630
13727
|
const selected = optIdx === selectedIdx;
|
|
13631
13728
|
const imagePath = current.optionImagePaths?.[optIdx] ?? void 0;
|
|
13632
13729
|
const playerName = opt;
|
|
13633
|
-
return /* @__PURE__ */
|
|
13730
|
+
return /* @__PURE__ */ jsxs99(
|
|
13634
13731
|
"button",
|
|
13635
13732
|
{
|
|
13636
13733
|
type: "button",
|
|
@@ -13639,25 +13736,25 @@ function DailyQuizGame({
|
|
|
13639
13736
|
disabled: submitting,
|
|
13640
13737
|
onClick: () => handleSelect(current.index, optIdx),
|
|
13641
13738
|
children: [
|
|
13642
|
-
current.optionImagePaths && /* @__PURE__ */
|
|
13643
|
-
/* @__PURE__ */
|
|
13644
|
-
/* @__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 })
|
|
13645
13742
|
]
|
|
13646
13743
|
},
|
|
13647
13744
|
optIdx
|
|
13648
13745
|
);
|
|
13649
13746
|
}) })
|
|
13650
13747
|
] }) }),
|
|
13651
|
-
/* @__PURE__ */
|
|
13652
|
-
page > 0 && /* @__PURE__ */
|
|
13653
|
-
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 })
|
|
13654
13751
|
] }) })
|
|
13655
13752
|
] });
|
|
13656
13753
|
}
|
|
13657
13754
|
|
|
13658
13755
|
// src/components/games/MatchdayPredictorGame.tsx
|
|
13659
13756
|
import { useId as useId7, useState as useState58 } from "react";
|
|
13660
|
-
import { jsx as
|
|
13757
|
+
import { jsx as jsx112, jsxs as jsxs100 } from "react/jsx-runtime";
|
|
13661
13758
|
var SCORER_SEARCH_THRESHOLD = 9;
|
|
13662
13759
|
function parseClientState7(json) {
|
|
13663
13760
|
if (!json) return null;
|
|
@@ -13675,7 +13772,7 @@ function isLocked(kickoffUtc) {
|
|
|
13675
13772
|
}
|
|
13676
13773
|
}
|
|
13677
13774
|
function IconMinus() {
|
|
13678
|
-
return /* @__PURE__ */
|
|
13775
|
+
return /* @__PURE__ */ jsx112(
|
|
13679
13776
|
"svg",
|
|
13680
13777
|
{
|
|
13681
13778
|
width: 18,
|
|
@@ -13686,20 +13783,20 @@ function IconMinus() {
|
|
|
13686
13783
|
strokeWidth: 2.2,
|
|
13687
13784
|
strokeLinecap: "round",
|
|
13688
13785
|
"aria-hidden": "true",
|
|
13689
|
-
children: /* @__PURE__ */
|
|
13786
|
+
children: /* @__PURE__ */ jsx112("path", { d: "M5 12h14" })
|
|
13690
13787
|
}
|
|
13691
13788
|
);
|
|
13692
13789
|
}
|
|
13693
13790
|
function TeamBadge({ team, label }) {
|
|
13694
|
-
return /* @__PURE__ */
|
|
13695
|
-
/* @__PURE__ */
|
|
13696
|
-
/* @__PURE__ */
|
|
13697
|
-
/* @__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 })
|
|
13698
13795
|
] });
|
|
13699
13796
|
}
|
|
13700
13797
|
function ScoreCard({ home, away, h, a, t, edit }) {
|
|
13701
|
-
const col = (side, team, value) => /* @__PURE__ */
|
|
13702
|
-
edit && /* @__PURE__ */
|
|
13798
|
+
const col = (side, team, value) => /* @__PURE__ */ jsxs100("div", { className: "ss-g-mp-col", children: [
|
|
13799
|
+
edit && /* @__PURE__ */ jsx112(
|
|
13703
13800
|
"button",
|
|
13704
13801
|
{
|
|
13705
13802
|
type: "button",
|
|
@@ -13707,11 +13804,11 @@ function ScoreCard({ home, away, h, a, t, edit }) {
|
|
|
13707
13804
|
"aria-label": t.goalsUp(team.name),
|
|
13708
13805
|
disabled: edit.disabled,
|
|
13709
13806
|
onClick: () => edit.onStep(side, 1),
|
|
13710
|
-
children: /* @__PURE__ */
|
|
13807
|
+
children: /* @__PURE__ */ jsx112(IconPlus, { size: 18 })
|
|
13711
13808
|
}
|
|
13712
13809
|
),
|
|
13713
|
-
/* @__PURE__ */
|
|
13714
|
-
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(
|
|
13715
13812
|
"button",
|
|
13716
13813
|
{
|
|
13717
13814
|
type: "button",
|
|
@@ -13719,27 +13816,27 @@ function ScoreCard({ home, away, h, a, t, edit }) {
|
|
|
13719
13816
|
"aria-label": t.goalsDown(team.name),
|
|
13720
13817
|
disabled: edit.disabled || value <= 0,
|
|
13721
13818
|
onClick: () => edit.onStep(side, -1),
|
|
13722
|
-
children: /* @__PURE__ */
|
|
13819
|
+
children: /* @__PURE__ */ jsx112(IconMinus, {})
|
|
13723
13820
|
}
|
|
13724
13821
|
)
|
|
13725
13822
|
] });
|
|
13726
|
-
return /* @__PURE__ */
|
|
13727
|
-
/* @__PURE__ */
|
|
13728
|
-
/* @__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: [
|
|
13729
13826
|
col("home", home, h),
|
|
13730
|
-
/* @__PURE__ */
|
|
13827
|
+
/* @__PURE__ */ jsx112("span", { className: "ss-g-mp-dash", "aria-hidden": "true", children: "\u2013" }),
|
|
13731
13828
|
col("away", away, a)
|
|
13732
13829
|
] }),
|
|
13733
|
-
/* @__PURE__ */
|
|
13830
|
+
/* @__PURE__ */ jsx112(TeamBadge, { team: away, label: t.away })
|
|
13734
13831
|
] });
|
|
13735
13832
|
}
|
|
13736
13833
|
function OutcomeRow({ label, ok, detail, t }) {
|
|
13737
|
-
return /* @__PURE__ */
|
|
13738
|
-
/* @__PURE__ */
|
|
13739
|
-
/* @__PURE__ */
|
|
13740
|
-
ok ? /* @__PURE__ */
|
|
13741
|
-
/* @__PURE__ */
|
|
13742
|
-
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
|
|
13743
13840
|
] })
|
|
13744
13841
|
] });
|
|
13745
13842
|
}
|
|
@@ -13760,12 +13857,12 @@ function MatchdayPredictorGame({
|
|
|
13760
13857
|
const searchId = useId7();
|
|
13761
13858
|
const clientState = parseClientState7(result?.clientStateJson);
|
|
13762
13859
|
const alreadyPlayed = result?.alreadyPlayed === true;
|
|
13763
|
-
const header = /* @__PURE__ */
|
|
13860
|
+
const header = /* @__PURE__ */ jsx112(
|
|
13764
13861
|
GameHeader,
|
|
13765
13862
|
{
|
|
13766
13863
|
title: gameTitle({ gameId: "matchday-predictor" }, ui.games.titles),
|
|
13767
13864
|
eyebrow: config ? t.eyebrow(config.homeTeam.name, config.awayTeam.name) : void 0,
|
|
13768
|
-
right: config ? /* @__PURE__ */
|
|
13865
|
+
right: config ? /* @__PURE__ */ jsx112(Chip, { icon: /* @__PURE__ */ jsx112(IconLock, {}), children: ui.games.formatDayTime(config.kickoffUtc) }) : void 0,
|
|
13769
13866
|
onBack,
|
|
13770
13867
|
backLabel: ui.back
|
|
13771
13868
|
}
|
|
@@ -13773,10 +13870,10 @@ function MatchdayPredictorGame({
|
|
|
13773
13870
|
if (alreadyPlayed && clientState) {
|
|
13774
13871
|
if (!clientState.graded) {
|
|
13775
13872
|
const scorer = config?.scorerPool.find((p) => p.playerId === clientState.predictedFirstScorerPlayerId) ?? null;
|
|
13776
|
-
return /* @__PURE__ */
|
|
13873
|
+
return /* @__PURE__ */ jsxs100("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
|
|
13777
13874
|
header,
|
|
13778
|
-
/* @__PURE__ */
|
|
13779
|
-
config && /* @__PURE__ */
|
|
13875
|
+
/* @__PURE__ */ jsxs100("div", { className: "ss-g-body", children: [
|
|
13876
|
+
config && /* @__PURE__ */ jsx112(
|
|
13780
13877
|
ScoreCard,
|
|
13781
13878
|
{
|
|
13782
13879
|
home: config.homeTeam,
|
|
@@ -13786,7 +13883,7 @@ function MatchdayPredictorGame({
|
|
|
13786
13883
|
t
|
|
13787
13884
|
}
|
|
13788
13885
|
),
|
|
13789
|
-
/* @__PURE__ */
|
|
13886
|
+
/* @__PURE__ */ jsx112(
|
|
13790
13887
|
ResultCard,
|
|
13791
13888
|
{
|
|
13792
13889
|
tone: "neutral",
|
|
@@ -13803,28 +13900,28 @@ function MatchdayPredictorGame({
|
|
|
13803
13900
|
}
|
|
13804
13901
|
)
|
|
13805
13902
|
] }),
|
|
13806
|
-
/* @__PURE__ */
|
|
13903
|
+
/* @__PURE__ */ jsx112(FooterBar, { children: /* @__PURE__ */ jsx112("p", { className: "ss-g-mp-fun", children: t.forFun }) })
|
|
13807
13904
|
] });
|
|
13808
13905
|
}
|
|
13809
13906
|
const r = clientState.result;
|
|
13810
|
-
return /* @__PURE__ */
|
|
13907
|
+
return /* @__PURE__ */ jsxs100("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
|
|
13811
13908
|
header,
|
|
13812
|
-
/* @__PURE__ */
|
|
13813
|
-
config && /* @__PURE__ */
|
|
13814
|
-
/* @__PURE__ */
|
|
13815
|
-
/* @__PURE__ */
|
|
13816
|
-
/* @__PURE__ */
|
|
13817
|
-
/* @__PURE__ */
|
|
13818
|
-
!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 })
|
|
13819
13916
|
] })
|
|
13820
13917
|
] }),
|
|
13821
|
-
/* @__PURE__ */
|
|
13918
|
+
/* @__PURE__ */ jsx112(FooterBar, { children: /* @__PURE__ */ jsx112("p", { className: "ss-g-mp-fun", children: t.forFun }) })
|
|
13822
13919
|
] });
|
|
13823
13920
|
}
|
|
13824
13921
|
if (!config) {
|
|
13825
|
-
return /* @__PURE__ */
|
|
13922
|
+
return /* @__PURE__ */ jsxs100("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
|
|
13826
13923
|
header,
|
|
13827
|
-
/* @__PURE__ */
|
|
13924
|
+
/* @__PURE__ */ jsx112("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
13828
13925
|
] });
|
|
13829
13926
|
}
|
|
13830
13927
|
const locked = isLocked(config.kickoffUtc);
|
|
@@ -13848,10 +13945,10 @@ function MatchdayPredictorGame({
|
|
|
13848
13945
|
const showSearch = pool.length > SCORER_SEARCH_THRESHOLD;
|
|
13849
13946
|
const q = query.trim().toLowerCase();
|
|
13850
13947
|
const visible = showSearch && q ? pool.filter((p) => p.playerName.toLowerCase().includes(q)) : pool;
|
|
13851
|
-
return /* @__PURE__ */
|
|
13948
|
+
return /* @__PURE__ */ jsxs100("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
|
|
13852
13949
|
header,
|
|
13853
|
-
/* @__PURE__ */
|
|
13854
|
-
/* @__PURE__ */
|
|
13950
|
+
/* @__PURE__ */ jsxs100("div", { className: "ss-g-body", children: [
|
|
13951
|
+
/* @__PURE__ */ jsx112(
|
|
13855
13952
|
ScoreCard,
|
|
13856
13953
|
{
|
|
13857
13954
|
home: config.homeTeam,
|
|
@@ -13862,12 +13959,12 @@ function MatchdayPredictorGame({
|
|
|
13862
13959
|
edit: { disabled, active: lastEdited, onStep: step }
|
|
13863
13960
|
}
|
|
13864
13961
|
),
|
|
13865
|
-
pool.length > 0 && /* @__PURE__ */
|
|
13866
|
-
/* @__PURE__ */
|
|
13867
|
-
/* @__PURE__ */
|
|
13868
|
-
/* @__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 })
|
|
13869
13966
|
] }),
|
|
13870
|
-
showSearch && /* @__PURE__ */
|
|
13967
|
+
showSearch && /* @__PURE__ */ jsx112(
|
|
13871
13968
|
SearchField,
|
|
13872
13969
|
{
|
|
13873
13970
|
id: searchId,
|
|
@@ -13879,9 +13976,9 @@ function MatchdayPredictorGame({
|
|
|
13879
13976
|
disabled
|
|
13880
13977
|
}
|
|
13881
13978
|
),
|
|
13882
|
-
/* @__PURE__ */
|
|
13979
|
+
/* @__PURE__ */ jsx112("div", { className: "ss-g-mp-grid", children: visible.map((p) => {
|
|
13883
13980
|
const selected = firstScorerPlayerId === p.playerId;
|
|
13884
|
-
return /* @__PURE__ */
|
|
13981
|
+
return /* @__PURE__ */ jsxs100(
|
|
13885
13982
|
"button",
|
|
13886
13983
|
{
|
|
13887
13984
|
type: "button",
|
|
@@ -13891,15 +13988,15 @@ function MatchdayPredictorGame({
|
|
|
13891
13988
|
disabled,
|
|
13892
13989
|
onClick: () => setFirstScorerPlayerId((id) => id === p.playerId ? null : p.playerId),
|
|
13893
13990
|
children: [
|
|
13894
|
-
selected && /* @__PURE__ */
|
|
13895
|
-
/* @__PURE__ */
|
|
13896
|
-
/* @__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 })
|
|
13897
13994
|
]
|
|
13898
13995
|
},
|
|
13899
13996
|
p.playerId
|
|
13900
13997
|
);
|
|
13901
13998
|
}) }),
|
|
13902
|
-
/* @__PURE__ */
|
|
13999
|
+
/* @__PURE__ */ jsxs100(
|
|
13903
14000
|
"button",
|
|
13904
14001
|
{
|
|
13905
14002
|
type: "button",
|
|
@@ -13908,24 +14005,24 @@ function MatchdayPredictorGame({
|
|
|
13908
14005
|
disabled,
|
|
13909
14006
|
onClick: () => setFirstScorerPlayerId(null),
|
|
13910
14007
|
children: [
|
|
13911
|
-
/* @__PURE__ */
|
|
14008
|
+
/* @__PURE__ */ jsx112("span", { className: "ss-g-mp-radio", "aria-hidden": "true" }),
|
|
13912
14009
|
t.noScorer
|
|
13913
14010
|
]
|
|
13914
14011
|
}
|
|
13915
14012
|
)
|
|
13916
14013
|
] }),
|
|
13917
|
-
locked && /* @__PURE__ */
|
|
14014
|
+
locked && /* @__PURE__ */ jsx112("p", { className: "ss-g-mp-closed", children: t.closed })
|
|
13918
14015
|
] }),
|
|
13919
|
-
/* @__PURE__ */
|
|
13920
|
-
/* @__PURE__ */
|
|
13921
|
-
/* @__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 })
|
|
13922
14019
|
] })
|
|
13923
14020
|
] });
|
|
13924
14021
|
}
|
|
13925
14022
|
|
|
13926
14023
|
// src/components/games/StartingXiGame.tsx
|
|
13927
14024
|
import { useId as useId8, useState as useState59 } from "react";
|
|
13928
|
-
import { Fragment as Fragment33, jsx as
|
|
14025
|
+
import { Fragment as Fragment33, jsx as jsx113, jsxs as jsxs101 } from "react/jsx-runtime";
|
|
13929
14026
|
var POINTS_PER_STARTER = 8;
|
|
13930
14027
|
var XI_SIZE = 11;
|
|
13931
14028
|
var DEFAULT_FORMATION = "4-3-3";
|
|
@@ -13974,20 +14071,20 @@ function StartingXiGame({
|
|
|
13974
14071
|
const searchId = useId8();
|
|
13975
14072
|
const clientState = parseClientState8(result?.clientStateJson);
|
|
13976
14073
|
const alreadyPlayed = result?.alreadyPlayed === true;
|
|
13977
|
-
const header = /* @__PURE__ */
|
|
14074
|
+
const header = /* @__PURE__ */ jsx113(
|
|
13978
14075
|
GameHeader,
|
|
13979
14076
|
{
|
|
13980
14077
|
title: gameTitle({ gameId: "starting-xi" }, ui.games.titles),
|
|
13981
14078
|
eyebrow: t.eyebrow,
|
|
13982
|
-
right: /* @__PURE__ */
|
|
14079
|
+
right: /* @__PURE__ */ jsx113(Chip, { variant: "accent", children: t.perStarter(POINTS_PER_STARTER) }),
|
|
13983
14080
|
onBack,
|
|
13984
14081
|
backLabel: ui.back
|
|
13985
14082
|
}
|
|
13986
14083
|
);
|
|
13987
14084
|
function statusScreen(title, score) {
|
|
13988
|
-
return /* @__PURE__ */
|
|
14085
|
+
return /* @__PURE__ */ jsxs101("div", { className: "ss-g-screen", "data-game": "starting-xi", "data-testid": "game-screen-starting-xi", children: [
|
|
13989
14086
|
header,
|
|
13990
|
-
/* @__PURE__ */
|
|
14087
|
+
/* @__PURE__ */ jsx113("div", { className: "ss-g-body", children: /* @__PURE__ */ jsx113(ResultCard, { tone: "neutral", title, score, onBack, ui }) })
|
|
13991
14088
|
] });
|
|
13992
14089
|
}
|
|
13993
14090
|
if (alreadyPlayed) {
|
|
@@ -13996,9 +14093,9 @@ function StartingXiGame({
|
|
|
13996
14093
|
if (clientState.status === "graded") return statusScreen(t.gradedLine(clientState.correctCount), clientState.score);
|
|
13997
14094
|
}
|
|
13998
14095
|
if (!config) {
|
|
13999
|
-
return /* @__PURE__ */
|
|
14096
|
+
return /* @__PURE__ */ jsxs101("div", { className: "ss-g-screen", "data-game": "starting-xi", "data-testid": "game-screen-starting-xi", children: [
|
|
14000
14097
|
header,
|
|
14001
|
-
/* @__PURE__ */
|
|
14098
|
+
/* @__PURE__ */ jsx113("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
14002
14099
|
] });
|
|
14003
14100
|
}
|
|
14004
14101
|
const { formation, slots } = formationSlots(config.formation);
|
|
@@ -14033,27 +14130,27 @@ function StartingXiGame({
|
|
|
14033
14130
|
onSubmit(JSON.stringify({ predictedPlayerIds: slotPlayers }));
|
|
14034
14131
|
}
|
|
14035
14132
|
const segments = slotPlayers.map((p) => p !== null ? "current" : "todo");
|
|
14036
|
-
return /* @__PURE__ */
|
|
14133
|
+
return /* @__PURE__ */ jsxs101("div", { className: "ss-g-screen", "data-game": "starting-xi", "data-testid": "game-screen-starting-xi", children: [
|
|
14037
14134
|
header,
|
|
14038
|
-
/* @__PURE__ */
|
|
14135
|
+
/* @__PURE__ */ jsx113(
|
|
14039
14136
|
SegmentProgress,
|
|
14040
14137
|
{
|
|
14041
14138
|
segments,
|
|
14042
14139
|
ariaLabel: t.picked(pickedCount),
|
|
14043
14140
|
leftLabel: t.picked(pickedCount),
|
|
14044
14141
|
rightLabel: t.toGo(XI_SIZE - pickedCount),
|
|
14045
|
-
right: /* @__PURE__ */
|
|
14142
|
+
right: /* @__PURE__ */ jsx113(Chip, { children: formation })
|
|
14046
14143
|
}
|
|
14047
14144
|
),
|
|
14048
|
-
/* @__PURE__ */
|
|
14049
|
-
/* @__PURE__ */
|
|
14050
|
-
/* @__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" }),
|
|
14051
14148
|
slots.map((s) => {
|
|
14052
14149
|
const playerId = slotPlayers[s.index] ?? null;
|
|
14053
14150
|
const player = playerId !== null ? byId.get(playerId) ?? null : null;
|
|
14054
14151
|
const name = player?.playerName ?? "";
|
|
14055
14152
|
const state = player ? "filled" : active === s.index ? "active" : "empty";
|
|
14056
|
-
return /* @__PURE__ */
|
|
14153
|
+
return /* @__PURE__ */ jsxs101(
|
|
14057
14154
|
"button",
|
|
14058
14155
|
{
|
|
14059
14156
|
type: "button",
|
|
@@ -14065,21 +14162,21 @@ function StartingXiGame({
|
|
|
14065
14162
|
disabled: submitting,
|
|
14066
14163
|
onClick: () => tapSlot(s.index),
|
|
14067
14164
|
children: [
|
|
14068
|
-
/* @__PURE__ */
|
|
14069
|
-
/* @__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 })
|
|
14070
14167
|
]
|
|
14071
14168
|
},
|
|
14072
14169
|
s.index
|
|
14073
14170
|
);
|
|
14074
14171
|
})
|
|
14075
14172
|
] }),
|
|
14076
|
-
/* @__PURE__ */
|
|
14077
|
-
/* @__PURE__ */
|
|
14078
|
-
/* @__PURE__ */
|
|
14079
|
-
/* @__PURE__ */
|
|
14080
|
-
] }) : /* @__PURE__ */
|
|
14081
|
-
activeSlot && /* @__PURE__ */
|
|
14082
|
-
/* @__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(
|
|
14083
14180
|
SearchField,
|
|
14084
14181
|
{
|
|
14085
14182
|
id: searchId,
|
|
@@ -14091,18 +14188,18 @@ function StartingXiGame({
|
|
|
14091
14188
|
disabled: submitting
|
|
14092
14189
|
}
|
|
14093
14190
|
),
|
|
14094
|
-
/* @__PURE__ */
|
|
14095
|
-
/* @__PURE__ */
|
|
14096
|
-
/* @__PURE__ */
|
|
14097
|
-
/* @__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 })
|
|
14098
14195
|
] }) }, p.playerId)) })
|
|
14099
14196
|
] })
|
|
14100
14197
|
] })
|
|
14101
14198
|
] }),
|
|
14102
|
-
/* @__PURE__ */
|
|
14103
|
-
/* @__PURE__ */
|
|
14104
|
-
/* @__PURE__ */
|
|
14105
|
-
/* @__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, {}),
|
|
14106
14203
|
lockAtUtc ? t.locksAt(ui.games.formatDayTime(lockAtUtc)) : t.locksSoon
|
|
14107
14204
|
] })
|
|
14108
14205
|
] })
|
|
@@ -14111,7 +14208,7 @@ function StartingXiGame({
|
|
|
14111
14208
|
|
|
14112
14209
|
// src/components/games/StatLadderGame.tsx
|
|
14113
14210
|
import { useId as useId9, useState as useState60 } from "react";
|
|
14114
|
-
import { jsx as
|
|
14211
|
+
import { jsx as jsx114, jsxs as jsxs102 } from "react/jsx-runtime";
|
|
14115
14212
|
function ladderClue(ladder) {
|
|
14116
14213
|
const mystery = ladder.find((r) => r.rank === 2);
|
|
14117
14214
|
if (!mystery) return null;
|
|
@@ -14133,9 +14230,9 @@ function parseClientState9(json) {
|
|
|
14133
14230
|
}
|
|
14134
14231
|
function NameStack({ name }) {
|
|
14135
14232
|
const { first, last } = splitName(name);
|
|
14136
|
-
return /* @__PURE__ */
|
|
14137
|
-
first && /* @__PURE__ */
|
|
14138
|
-
/* @__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 })
|
|
14139
14236
|
] });
|
|
14140
14237
|
}
|
|
14141
14238
|
function StatLadderGame({
|
|
@@ -14152,11 +14249,11 @@ function StatLadderGame({
|
|
|
14152
14249
|
const searchId = useId9();
|
|
14153
14250
|
const clientState = parseClientState9(result?.clientStateJson);
|
|
14154
14251
|
const revealed = clientState != null;
|
|
14155
|
-
const header = /* @__PURE__ */
|
|
14252
|
+
const header = /* @__PURE__ */ jsx114(GameHeader, { title: gameTitle({ gameId: "stat-ladder" }, ui.games.titles), eyebrow: t.eyebrow, onBack, backLabel: ui.back });
|
|
14156
14253
|
if (!config) {
|
|
14157
|
-
return /* @__PURE__ */
|
|
14254
|
+
return /* @__PURE__ */ jsxs102("div", { className: "ss-g-screen", "data-game": "stat-ladder", "data-testid": "game-screen-stat-ladder", children: [
|
|
14158
14255
|
header,
|
|
14159
|
-
/* @__PURE__ */
|
|
14256
|
+
/* @__PURE__ */ jsx114("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
14160
14257
|
] });
|
|
14161
14258
|
}
|
|
14162
14259
|
const question = t.question(config.statLabel);
|
|
@@ -14168,45 +14265,45 @@ function StatLadderGame({
|
|
|
14168
14265
|
if (selectedId === null || submitting || revealed) return;
|
|
14169
14266
|
onSubmit(JSON.stringify({ guessedPlayerId: selectedId }));
|
|
14170
14267
|
}
|
|
14171
|
-
return /* @__PURE__ */
|
|
14268
|
+
return /* @__PURE__ */ jsxs102("div", { className: "ss-g-screen", "data-game": "stat-ladder", "data-testid": "game-screen-stat-ladder", children: [
|
|
14172
14269
|
header,
|
|
14173
|
-
/* @__PURE__ */
|
|
14174
|
-
!revealed && /* @__PURE__ */
|
|
14175
|
-
/* @__PURE__ */
|
|
14176
|
-
/* @__PURE__ */
|
|
14177
|
-
/* @__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: [
|
|
14178
14275
|
question.pre,
|
|
14179
|
-
/* @__PURE__ */
|
|
14276
|
+
/* @__PURE__ */ jsx114("em", { children: question.emph }),
|
|
14180
14277
|
question.post
|
|
14181
14278
|
] })
|
|
14182
14279
|
] }),
|
|
14183
|
-
/* @__PURE__ */
|
|
14184
|
-
(rung) => rung.rank === 2 ? /* @__PURE__ */
|
|
14280
|
+
/* @__PURE__ */ jsx114("ol", { className: "ss-g-sl-rungs", children: rungs.map(
|
|
14281
|
+
(rung) => rung.rank === 2 ? /* @__PURE__ */ jsxs102(
|
|
14185
14282
|
"li",
|
|
14186
14283
|
{
|
|
14187
14284
|
className: "ss-g-sl-rung ss-g-sl-rung--mystery",
|
|
14188
14285
|
"data-testid": "sl-mystery-rung",
|
|
14189
14286
|
"data-result": revealed ? clientState.isCorrect ? "correct" : "wrong" : void 0,
|
|
14190
14287
|
children: [
|
|
14191
|
-
/* @__PURE__ */
|
|
14192
|
-
revealed ? /* @__PURE__ */
|
|
14193
|
-
revealed ? /* @__PURE__ */
|
|
14194
|
-
/* @__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 })
|
|
14195
14292
|
]
|
|
14196
14293
|
},
|
|
14197
14294
|
rung.rank
|
|
14198
|
-
) : /* @__PURE__ */
|
|
14199
|
-
/* @__PURE__ */
|
|
14200
|
-
/* @__PURE__ */
|
|
14201
|
-
/* @__PURE__ */
|
|
14202
|
-
/* @__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 })
|
|
14203
14300
|
] }, rung.rank)
|
|
14204
14301
|
) }),
|
|
14205
|
-
clue && /* @__PURE__ */
|
|
14206
|
-
/* @__PURE__ */
|
|
14207
|
-
/* @__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) })
|
|
14208
14305
|
] }),
|
|
14209
|
-
!revealed && /* @__PURE__ */
|
|
14306
|
+
!revealed && /* @__PURE__ */ jsx114("ul", { className: "ss-g-sl-pool", children: pool.map((p) => /* @__PURE__ */ jsx114("li", { children: /* @__PURE__ */ jsxs102(
|
|
14210
14307
|
"button",
|
|
14211
14308
|
{
|
|
14212
14309
|
type: "button",
|
|
@@ -14219,13 +14316,13 @@ function StatLadderGame({
|
|
|
14219
14316
|
setQuery(p.playerName);
|
|
14220
14317
|
},
|
|
14221
14318
|
children: [
|
|
14222
|
-
/* @__PURE__ */
|
|
14223
|
-
/* @__PURE__ */
|
|
14224
|
-
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, {})
|
|
14225
14322
|
]
|
|
14226
14323
|
}
|
|
14227
14324
|
) }, p.playerId)) }),
|
|
14228
|
-
revealed && /* @__PURE__ */
|
|
14325
|
+
revealed && /* @__PURE__ */ jsx114(
|
|
14229
14326
|
ResultCard,
|
|
14230
14327
|
{
|
|
14231
14328
|
tone: clientState.isCorrect ? "win" : "lose",
|
|
@@ -14236,8 +14333,8 @@ function StatLadderGame({
|
|
|
14236
14333
|
}
|
|
14237
14334
|
)
|
|
14238
14335
|
] }),
|
|
14239
|
-
!revealed && /* @__PURE__ */
|
|
14240
|
-
/* @__PURE__ */
|
|
14336
|
+
!revealed && /* @__PURE__ */ jsx114(FooterBar, { children: /* @__PURE__ */ jsxs102("div", { className: "ss-g-sl-guess", children: [
|
|
14337
|
+
/* @__PURE__ */ jsx114(
|
|
14241
14338
|
SearchField,
|
|
14242
14339
|
{
|
|
14243
14340
|
id: searchId,
|
|
@@ -14252,13 +14349,13 @@ function StatLadderGame({
|
|
|
14252
14349
|
disabled: submitting
|
|
14253
14350
|
}
|
|
14254
14351
|
),
|
|
14255
|
-
/* @__PURE__ */
|
|
14352
|
+
/* @__PURE__ */ jsx114(GameButton, { variant: "primary", disabled: selectedId === null || submitting, onClick: guess, children: t.guess })
|
|
14256
14353
|
] }) })
|
|
14257
14354
|
] });
|
|
14258
14355
|
}
|
|
14259
14356
|
|
|
14260
14357
|
// src/components/games/FanMotmGame.tsx
|
|
14261
|
-
import { jsx as
|
|
14358
|
+
import { jsx as jsx115, jsxs as jsxs103 } from "react/jsx-runtime";
|
|
14262
14359
|
function parseClientState10(json) {
|
|
14263
14360
|
if (!json) return null;
|
|
14264
14361
|
try {
|
|
@@ -14279,20 +14376,20 @@ function FanMotmGame({
|
|
|
14279
14376
|
const clientState = parseClientState10(result?.clientStateJson);
|
|
14280
14377
|
const alreadyVoted = result?.alreadyPlayed === true;
|
|
14281
14378
|
const pickedId = clientState?.pickedPlayerId ?? null;
|
|
14282
|
-
const header = /* @__PURE__ */
|
|
14379
|
+
const header = /* @__PURE__ */ jsx115(
|
|
14283
14380
|
GameHeader,
|
|
14284
14381
|
{
|
|
14285
14382
|
title: t.title,
|
|
14286
14383
|
eyebrow: t.eyebrow,
|
|
14287
|
-
right: alreadyVoted ? /* @__PURE__ */
|
|
14384
|
+
right: alreadyVoted ? /* @__PURE__ */ jsx115(Chip, { variant: "success", icon: /* @__PURE__ */ jsx115(IconCheck, {}), children: t.voted }) : void 0,
|
|
14288
14385
|
onBack,
|
|
14289
14386
|
backLabel: ui.back
|
|
14290
14387
|
}
|
|
14291
14388
|
);
|
|
14292
14389
|
if (!config) {
|
|
14293
|
-
return /* @__PURE__ */
|
|
14390
|
+
return /* @__PURE__ */ jsxs103("div", { className: "ss-g-screen", "data-game": "fan-motm", "data-testid": "game-screen-fan-motm", children: [
|
|
14294
14391
|
header,
|
|
14295
|
-
/* @__PURE__ */
|
|
14392
|
+
/* @__PURE__ */ jsx115("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
14296
14393
|
] });
|
|
14297
14394
|
}
|
|
14298
14395
|
const picked = config.candidates.find((c) => c.playerId === pickedId) ?? null;
|
|
@@ -14300,12 +14397,12 @@ function FanMotmGame({
|
|
|
14300
14397
|
if (alreadyVoted || submitting) return;
|
|
14301
14398
|
onSubmit(JSON.stringify({ pickedPlayerId: candidateId }));
|
|
14302
14399
|
}
|
|
14303
|
-
return /* @__PURE__ */
|
|
14400
|
+
return /* @__PURE__ */ jsxs103("div", { className: "ss-g-screen", "data-game": "fan-motm", "data-testid": "game-screen-fan-motm", children: [
|
|
14304
14401
|
header,
|
|
14305
|
-
/* @__PURE__ */
|
|
14306
|
-
/* @__PURE__ */
|
|
14402
|
+
/* @__PURE__ */ jsxs103("div", { className: "ss-g-body", children: [
|
|
14403
|
+
/* @__PURE__ */ jsx115("ul", { className: "ss-g-motm-list", children: config.candidates.map((c) => {
|
|
14307
14404
|
const isVoted = alreadyVoted && pickedId === c.playerId;
|
|
14308
|
-
return /* @__PURE__ */
|
|
14405
|
+
return /* @__PURE__ */ jsx115("li", { children: /* @__PURE__ */ jsxs103(
|
|
14309
14406
|
"button",
|
|
14310
14407
|
{
|
|
14311
14408
|
type: "button",
|
|
@@ -14314,24 +14411,24 @@ function FanMotmGame({
|
|
|
14314
14411
|
disabled: alreadyVoted || submitting,
|
|
14315
14412
|
onClick: () => handleVote(c.playerId),
|
|
14316
14413
|
children: [
|
|
14317
|
-
/* @__PURE__ */
|
|
14318
|
-
/* @__PURE__ */
|
|
14319
|
-
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 })
|
|
14320
14417
|
]
|
|
14321
14418
|
}
|
|
14322
14419
|
) }, c.playerId);
|
|
14323
14420
|
}) }),
|
|
14324
|
-
alreadyVoted && picked && /* @__PURE__ */
|
|
14421
|
+
alreadyVoted && picked && /* @__PURE__ */ jsx115(ResultCard, { tone: "neutral", title: t.youVoted(picked.playerName), detail: t.thanks, onBack, ui })
|
|
14325
14422
|
] }),
|
|
14326
|
-
/* @__PURE__ */
|
|
14327
|
-
!alreadyVoted && /* @__PURE__ */
|
|
14328
|
-
/* @__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 })
|
|
14329
14426
|
] })
|
|
14330
14427
|
] });
|
|
14331
14428
|
}
|
|
14332
14429
|
|
|
14333
14430
|
// src/components/GameScreenHost.tsx
|
|
14334
|
-
import { jsx as
|
|
14431
|
+
import { jsx as jsx116 } from "react/jsx-runtime";
|
|
14335
14432
|
var FIXTURE_GAME_IDS = /* @__PURE__ */ new Set([
|
|
14336
14433
|
"matchday-predictor",
|
|
14337
14434
|
"starting-xi",
|
|
@@ -14407,7 +14504,7 @@ function GameScreenHost({
|
|
|
14407
14504
|
function renderScreen() {
|
|
14408
14505
|
switch (gameId) {
|
|
14409
14506
|
case "mystery-tiger":
|
|
14410
|
-
return /* @__PURE__ */
|
|
14507
|
+
return /* @__PURE__ */ jsx116(
|
|
14411
14508
|
MysteryTigerGame,
|
|
14412
14509
|
{
|
|
14413
14510
|
...sharedProps,
|
|
@@ -14415,7 +14512,7 @@ function GameScreenHost({
|
|
|
14415
14512
|
}
|
|
14416
14513
|
);
|
|
14417
14514
|
case "higher-or-lower":
|
|
14418
|
-
return /* @__PURE__ */
|
|
14515
|
+
return /* @__PURE__ */ jsx116(
|
|
14419
14516
|
HigherOrLowerGame,
|
|
14420
14517
|
{
|
|
14421
14518
|
...sharedProps,
|
|
@@ -14423,7 +14520,7 @@ function GameScreenHost({
|
|
|
14423
14520
|
}
|
|
14424
14521
|
);
|
|
14425
14522
|
case "career-path":
|
|
14426
|
-
return /* @__PURE__ */
|
|
14523
|
+
return /* @__PURE__ */ jsx116(
|
|
14427
14524
|
CareerPathGame,
|
|
14428
14525
|
{
|
|
14429
14526
|
...sharedProps,
|
|
@@ -14432,7 +14529,7 @@ function GameScreenHost({
|
|
|
14432
14529
|
);
|
|
14433
14530
|
case "beat-the-grid": {
|
|
14434
14531
|
const btgConfig = safeParseConfig(configJson);
|
|
14435
|
-
return /* @__PURE__ */
|
|
14532
|
+
return /* @__PURE__ */ jsx116(
|
|
14436
14533
|
BeatTheGridGame,
|
|
14437
14534
|
{
|
|
14438
14535
|
...sharedProps,
|
|
@@ -14442,7 +14539,7 @@ function GameScreenHost({
|
|
|
14442
14539
|
);
|
|
14443
14540
|
}
|
|
14444
14541
|
case "guess-the-xi":
|
|
14445
|
-
return /* @__PURE__ */
|
|
14542
|
+
return /* @__PURE__ */ jsx116(
|
|
14446
14543
|
GuessTheXiGame,
|
|
14447
14544
|
{
|
|
14448
14545
|
...sharedProps,
|
|
@@ -14450,7 +14547,7 @@ function GameScreenHost({
|
|
|
14450
14547
|
}
|
|
14451
14548
|
);
|
|
14452
14549
|
case "daily-quiz":
|
|
14453
|
-
return /* @__PURE__ */
|
|
14550
|
+
return /* @__PURE__ */ jsx116(
|
|
14454
14551
|
DailyQuizGame,
|
|
14455
14552
|
{
|
|
14456
14553
|
...sharedProps,
|
|
@@ -14458,7 +14555,7 @@ function GameScreenHost({
|
|
|
14458
14555
|
}
|
|
14459
14556
|
);
|
|
14460
14557
|
case "matchday-predictor":
|
|
14461
|
-
return /* @__PURE__ */
|
|
14558
|
+
return /* @__PURE__ */ jsx116(
|
|
14462
14559
|
MatchdayPredictorGame,
|
|
14463
14560
|
{
|
|
14464
14561
|
...sharedProps,
|
|
@@ -14466,7 +14563,7 @@ function GameScreenHost({
|
|
|
14466
14563
|
}
|
|
14467
14564
|
);
|
|
14468
14565
|
case "starting-xi":
|
|
14469
|
-
return /* @__PURE__ */
|
|
14566
|
+
return /* @__PURE__ */ jsx116(
|
|
14470
14567
|
StartingXiGame,
|
|
14471
14568
|
{
|
|
14472
14569
|
...sharedProps,
|
|
@@ -14474,7 +14571,7 @@ function GameScreenHost({
|
|
|
14474
14571
|
}
|
|
14475
14572
|
);
|
|
14476
14573
|
case "stat-ladder":
|
|
14477
|
-
return /* @__PURE__ */
|
|
14574
|
+
return /* @__PURE__ */ jsx116(
|
|
14478
14575
|
StatLadderGame,
|
|
14479
14576
|
{
|
|
14480
14577
|
...sharedProps,
|
|
@@ -14482,7 +14579,7 @@ function GameScreenHost({
|
|
|
14482
14579
|
}
|
|
14483
14580
|
);
|
|
14484
14581
|
case "fan-motm":
|
|
14485
|
-
return /* @__PURE__ */
|
|
14582
|
+
return /* @__PURE__ */ jsx116(
|
|
14486
14583
|
FanMotmGame,
|
|
14487
14584
|
{
|
|
14488
14585
|
...sharedProps,
|
|
@@ -14490,17 +14587,17 @@ function GameScreenHost({
|
|
|
14490
14587
|
}
|
|
14491
14588
|
);
|
|
14492
14589
|
default:
|
|
14493
|
-
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 }) });
|
|
14494
14591
|
}
|
|
14495
14592
|
}
|
|
14496
|
-
return /* @__PURE__ */
|
|
14593
|
+
return /* @__PURE__ */ jsx116("div", { className: "ss-w-gscreen", "data-testid": "gscreen", "data-lock-at": lockAtUtc ?? void 0, children: renderScreen() });
|
|
14497
14594
|
}
|
|
14498
14595
|
|
|
14499
14596
|
// src/components/Leaderboard.tsx
|
|
14500
14597
|
import { useState as useState62 } from "react";
|
|
14501
14598
|
|
|
14502
14599
|
// src/components/LeaderboardRow.tsx
|
|
14503
|
-
import { jsx as
|
|
14600
|
+
import { jsx as jsx117, jsxs as jsxs104 } from "react/jsx-runtime";
|
|
14504
14601
|
function formatPoints(n) {
|
|
14505
14602
|
return n.toLocaleString("en");
|
|
14506
14603
|
}
|
|
@@ -14509,14 +14606,14 @@ function LeaderboardWeeklyRow({
|
|
|
14509
14606
|
isMe
|
|
14510
14607
|
}) {
|
|
14511
14608
|
const rankClass = `ss-w-lb2-rank${row.rank <= 3 ? " ss-w-lb2-rank--top3" : ""}`;
|
|
14512
|
-
return /* @__PURE__ */
|
|
14513
|
-
/* @__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: [
|
|
14514
14611
|
"#",
|
|
14515
14612
|
row.rank
|
|
14516
14613
|
] }),
|
|
14517
|
-
/* @__PURE__ */
|
|
14518
|
-
/* @__PURE__ */
|
|
14519
|
-
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: [
|
|
14520
14617
|
"\u{1F525} ",
|
|
14521
14618
|
row.currentStreak
|
|
14522
14619
|
] })
|
|
@@ -14527,18 +14624,18 @@ function LeaderboardAllTimeRow({
|
|
|
14527
14624
|
isMe
|
|
14528
14625
|
}) {
|
|
14529
14626
|
const rankClass = `ss-w-lb2-rank${row.rank <= 3 ? " ss-w-lb2-rank--top3" : ""}`;
|
|
14530
|
-
return /* @__PURE__ */
|
|
14531
|
-
/* @__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: [
|
|
14532
14629
|
"#",
|
|
14533
14630
|
row.rank
|
|
14534
14631
|
] }),
|
|
14535
|
-
/* @__PURE__ */
|
|
14536
|
-
/* @__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) })
|
|
14537
14634
|
] });
|
|
14538
14635
|
}
|
|
14539
14636
|
|
|
14540
14637
|
// src/components/LeaderboardEmpty.tsx
|
|
14541
|
-
import { jsx as
|
|
14638
|
+
import { jsx as jsx118, jsxs as jsxs105 } from "react/jsx-runtime";
|
|
14542
14639
|
function LeaderboardEmpty({
|
|
14543
14640
|
segment,
|
|
14544
14641
|
lastWeek,
|
|
@@ -14547,36 +14644,36 @@ function LeaderboardEmpty({
|
|
|
14547
14644
|
ui
|
|
14548
14645
|
}) {
|
|
14549
14646
|
if (segment === "alltime") {
|
|
14550
|
-
return /* @__PURE__ */
|
|
14551
|
-
/* @__PURE__ */
|
|
14552
|
-
/* @__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 })
|
|
14553
14650
|
] });
|
|
14554
14651
|
}
|
|
14555
14652
|
const fresh = lastWeek != null;
|
|
14556
14653
|
const title = fresh ? ui.leaderboardEmptyFreshTitle : ui.leaderboardEmptyColdTitle;
|
|
14557
14654
|
const body = fresh ? ui.leaderboardEmptyFreshBody : ui.leaderboardEmptyColdBody;
|
|
14558
|
-
return /* @__PURE__ */
|
|
14559
|
-
weeklyPrize && /* @__PURE__ */
|
|
14560
|
-
/* @__PURE__ */
|
|
14561
|
-
/* @__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 }) })
|
|
14562
14659
|
] }),
|
|
14563
|
-
/* @__PURE__ */
|
|
14564
|
-
/* @__PURE__ */
|
|
14565
|
-
/* @__PURE__ */
|
|
14566
|
-
/* @__PURE__ */
|
|
14567
|
-
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 })
|
|
14568
14665
|
] }),
|
|
14569
|
-
fresh && lastWeek && /* @__PURE__ */
|
|
14570
|
-
/* @__PURE__ */
|
|
14571
|
-
/* @__PURE__ */
|
|
14572
|
-
/* @__PURE__ */
|
|
14573
|
-
/* @__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) })
|
|
14574
14671
|
] })
|
|
14575
14672
|
] });
|
|
14576
14673
|
}
|
|
14577
14674
|
|
|
14578
14675
|
// src/components/Leaderboard.tsx
|
|
14579
|
-
import { Fragment as Fragment34, jsx as
|
|
14676
|
+
import { Fragment as Fragment34, jsx as jsx119, jsxs as jsxs106 } from "react/jsx-runtime";
|
|
14580
14677
|
function Leaderboard({
|
|
14581
14678
|
data,
|
|
14582
14679
|
ui,
|
|
@@ -14586,9 +14683,9 @@ function Leaderboard({
|
|
|
14586
14683
|
const myRow = segment === "weekly" ? data.myWeeklyRow : data.myAllTimeRow;
|
|
14587
14684
|
const offBoard = myRow !== null && myRow !== void 0 && myRow.rank === -1;
|
|
14588
14685
|
const isEmpty = segment === "weekly" ? data.weeklyTop.length === 0 : data.allTimeTop.length === 0;
|
|
14589
|
-
return /* @__PURE__ */
|
|
14590
|
-
/* @__PURE__ */
|
|
14591
|
-
/* @__PURE__ */
|
|
14686
|
+
return /* @__PURE__ */ jsxs106("div", { className: "ss-w-lb2", children: [
|
|
14687
|
+
/* @__PURE__ */ jsxs106("div", { className: "ss-w-seg", children: [
|
|
14688
|
+
/* @__PURE__ */ jsx119(
|
|
14592
14689
|
"button",
|
|
14593
14690
|
{
|
|
14594
14691
|
type: "button",
|
|
@@ -14598,7 +14695,7 @@ function Leaderboard({
|
|
|
14598
14695
|
children: ui.leaderboardThisWeek
|
|
14599
14696
|
}
|
|
14600
14697
|
),
|
|
14601
|
-
/* @__PURE__ */
|
|
14698
|
+
/* @__PURE__ */ jsx119(
|
|
14602
14699
|
"button",
|
|
14603
14700
|
{
|
|
14604
14701
|
type: "button",
|
|
@@ -14609,7 +14706,7 @@ function Leaderboard({
|
|
|
14609
14706
|
}
|
|
14610
14707
|
)
|
|
14611
14708
|
] }),
|
|
14612
|
-
isEmpty ? /* @__PURE__ */
|
|
14709
|
+
isEmpty ? /* @__PURE__ */ jsx119(
|
|
14613
14710
|
LeaderboardEmpty,
|
|
14614
14711
|
{
|
|
14615
14712
|
segment,
|
|
@@ -14618,15 +14715,15 @@ function Leaderboard({
|
|
|
14618
14715
|
onPlay,
|
|
14619
14716
|
ui
|
|
14620
14717
|
}
|
|
14621
|
-
) : /* @__PURE__ */
|
|
14622
|
-
/* @__PURE__ */
|
|
14718
|
+
) : /* @__PURE__ */ jsxs106(Fragment34, { children: [
|
|
14719
|
+
/* @__PURE__ */ jsx119("div", { className: "ss-w-lb2-rows", children: segment === "weekly" ? data.weeklyTop.map((row) => /* @__PURE__ */ jsx119(
|
|
14623
14720
|
LeaderboardWeeklyRow,
|
|
14624
14721
|
{
|
|
14625
14722
|
row,
|
|
14626
14723
|
isMe: row.operatorUserId === data.myWeeklyRow?.operatorUserId
|
|
14627
14724
|
},
|
|
14628
14725
|
row.operatorUserId
|
|
14629
|
-
)) : data.allTimeTop.map((row) => /* @__PURE__ */
|
|
14726
|
+
)) : data.allTimeTop.map((row) => /* @__PURE__ */ jsx119(
|
|
14630
14727
|
LeaderboardAllTimeRow,
|
|
14631
14728
|
{
|
|
14632
14729
|
row,
|
|
@@ -14634,18 +14731,18 @@ function Leaderboard({
|
|
|
14634
14731
|
},
|
|
14635
14732
|
row.operatorUserId
|
|
14636
14733
|
)) }),
|
|
14637
|
-
/* @__PURE__ */
|
|
14638
|
-
myRow != null && (offBoard ? /* @__PURE__ */
|
|
14639
|
-
segment === "weekly" && data.myWeeklyRow && /* @__PURE__ */
|
|
14640
|
-
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 })
|
|
14641
14738
|
] })),
|
|
14642
|
-
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)) }) }) })
|
|
14643
14740
|
] })
|
|
14644
14741
|
] });
|
|
14645
14742
|
}
|
|
14646
14743
|
|
|
14647
14744
|
// src/components/LeaderboardPanel.tsx
|
|
14648
|
-
import { jsx as
|
|
14745
|
+
import { jsx as jsx120 } from "react/jsx-runtime";
|
|
14649
14746
|
var EMPTY_PAYLOAD = {
|
|
14650
14747
|
week: "",
|
|
14651
14748
|
weeklyTop: [],
|
|
@@ -14656,9 +14753,9 @@ var EMPTY_PAYLOAD = {
|
|
|
14656
14753
|
lastWeek: null
|
|
14657
14754
|
};
|
|
14658
14755
|
function LeaderboardPanel({ loggedIn, data, loading, onPlay, ui }) {
|
|
14659
|
-
if (!loggedIn) return /* @__PURE__ */
|
|
14660
|
-
if (data === null && loading) return /* @__PURE__ */
|
|
14661
|
-
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 }) });
|
|
14662
14759
|
}
|
|
14663
14760
|
|
|
14664
14761
|
// src/components/games/ui/fonts.ts
|
|
@@ -14675,7 +14772,7 @@ function ensureGamesFonts(doc = document) {
|
|
|
14675
14772
|
}
|
|
14676
14773
|
|
|
14677
14774
|
// src/components/GamesPanel.tsx
|
|
14678
|
-
import { jsx as
|
|
14775
|
+
import { jsx as jsx121, jsxs as jsxs107 } from "react/jsx-runtime";
|
|
14679
14776
|
function GamesPanel({
|
|
14680
14777
|
loggedIn,
|
|
14681
14778
|
games,
|
|
@@ -14690,9 +14787,9 @@ function GamesPanel({
|
|
|
14690
14787
|
useEffect39(() => {
|
|
14691
14788
|
ensureGamesFonts();
|
|
14692
14789
|
}, []);
|
|
14693
|
-
if (!loggedIn) return /* @__PURE__ */
|
|
14790
|
+
if (!loggedIn) return /* @__PURE__ */ jsx121(GamesLoginWall, { ui });
|
|
14694
14791
|
if (selected !== null) {
|
|
14695
|
-
return /* @__PURE__ */
|
|
14792
|
+
return /* @__PURE__ */ jsx121("div", { className: "ss-w-gscreen-wrap", lang: ui.games.lang, children: /* @__PURE__ */ jsx121(
|
|
14696
14793
|
GameScreenHost,
|
|
14697
14794
|
{
|
|
14698
14795
|
selected,
|
|
@@ -14706,9 +14803,9 @@ function GamesPanel({
|
|
|
14706
14803
|
}
|
|
14707
14804
|
) });
|
|
14708
14805
|
}
|
|
14709
|
-
return /* @__PURE__ */
|
|
14710
|
-
/* @__PURE__ */
|
|
14711
|
-
/* @__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(
|
|
14712
14809
|
"button",
|
|
14713
14810
|
{
|
|
14714
14811
|
type: "button",
|
|
@@ -14718,7 +14815,7 @@ function GamesPanel({
|
|
|
14718
14815
|
children: ui.gamesPlaySegment
|
|
14719
14816
|
}
|
|
14720
14817
|
),
|
|
14721
|
-
/* @__PURE__ */
|
|
14818
|
+
/* @__PURE__ */ jsx121(
|
|
14722
14819
|
"button",
|
|
14723
14820
|
{
|
|
14724
14821
|
type: "button",
|
|
@@ -14729,7 +14826,7 @@ function GamesPanel({
|
|
|
14729
14826
|
}
|
|
14730
14827
|
)
|
|
14731
14828
|
] }),
|
|
14732
|
-
segment === "play" ? /* @__PURE__ */
|
|
14829
|
+
segment === "play" ? /* @__PURE__ */ jsx121("div", { "data-testid": "games-hub", lang: ui.games.lang, children: /* @__PURE__ */ jsx121(
|
|
14733
14830
|
GamesHub,
|
|
14734
14831
|
{
|
|
14735
14832
|
games,
|
|
@@ -14737,7 +14834,7 @@ function GamesPanel({
|
|
|
14737
14834
|
myWeeklyRow: leaderboard?.myWeeklyRow ?? null,
|
|
14738
14835
|
ui
|
|
14739
14836
|
}
|
|
14740
|
-
) }) : /* @__PURE__ */
|
|
14837
|
+
) }) : /* @__PURE__ */ jsx121(
|
|
14741
14838
|
LeaderboardPanel,
|
|
14742
14839
|
{
|
|
14743
14840
|
loggedIn,
|
|
@@ -14755,7 +14852,7 @@ import { useEffect as useEffect42, useRef as useRef33, useState as useState66 }
|
|
|
14755
14852
|
|
|
14756
14853
|
// src/components/FavouriteChips.tsx
|
|
14757
14854
|
import { useEffect as useEffect40, useState as useState64 } from "react";
|
|
14758
|
-
import { Fragment as Fragment35, jsx as
|
|
14855
|
+
import { Fragment as Fragment35, jsx as jsx122, jsxs as jsxs108 } from "react/jsx-runtime";
|
|
14759
14856
|
async function toggleWithNotice(controller, kind, id, onNotice) {
|
|
14760
14857
|
const outcome = await controller.toggle(kind, id);
|
|
14761
14858
|
if (outcome === "at_cap") onNotice({ type: "cap", kind });
|
|
@@ -14764,27 +14861,27 @@ async function toggleWithNotice(controller, kind, id, onNotice) {
|
|
|
14764
14861
|
}
|
|
14765
14862
|
function FavCrest({ entity: entity2, sport }) {
|
|
14766
14863
|
const url = sport === "football" && entity2.kind !== "player" ? entity2.imageUrl : void 0;
|
|
14767
|
-
return /* @__PURE__ */
|
|
14864
|
+
return /* @__PURE__ */ jsx122(Crest, { url, name: entity2.name, kind: entity2.kind === "competition" ? "comp" : "team" });
|
|
14768
14865
|
}
|
|
14769
14866
|
function PlayerTeam({ entity: entity2, ui }) {
|
|
14770
14867
|
if (entity2.kind !== "player") return null;
|
|
14771
|
-
return /* @__PURE__ */
|
|
14868
|
+
return /* @__PURE__ */ jsx122("span", { className: "ss-w-fav-sub", children: entity2.teamName || ui.favNoTeam });
|
|
14772
14869
|
}
|
|
14773
14870
|
function Chip2({ entity: entity2, sport, ui, busy, onRemove }) {
|
|
14774
|
-
return /* @__PURE__ */
|
|
14775
|
-
/* @__PURE__ */
|
|
14776
|
-
/* @__PURE__ */
|
|
14777
|
-
/* @__PURE__ */
|
|
14778
|
-
/* @__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 })
|
|
14779
14876
|
] }),
|
|
14780
|
-
/* @__PURE__ */
|
|
14877
|
+
/* @__PURE__ */ jsx122("button", { type: "button", className: "ss-w-fav-x", "aria-label": ui.favRemove(entity2.name), disabled: busy, onClick: onRemove, children: "\xD7" })
|
|
14781
14878
|
] });
|
|
14782
14879
|
}
|
|
14783
14880
|
function Group({ title, entities, sport, ui, controller, onNotice }) {
|
|
14784
14881
|
if (entities.length === 0) return null;
|
|
14785
|
-
return /* @__PURE__ */
|
|
14786
|
-
/* @__PURE__ */
|
|
14787
|
-
/* @__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(
|
|
14788
14885
|
Chip2,
|
|
14789
14886
|
{
|
|
14790
14887
|
entity: e,
|
|
@@ -14820,20 +14917,20 @@ function FavouriteChips({ controller, ui, sport, sportLabel, onNotice }) {
|
|
|
14820
14917
|
if (!await controller.clear()) onNotice({ type: "error" });
|
|
14821
14918
|
else onNotice(null);
|
|
14822
14919
|
};
|
|
14823
|
-
return /* @__PURE__ */
|
|
14824
|
-
total === 0 ? /* @__PURE__ */
|
|
14825
|
-
sport === "football" ? /* @__PURE__ */
|
|
14826
|
-
/* @__PURE__ */
|
|
14827
|
-
/* @__PURE__ */
|
|
14828
|
-
data.suggestions.length > 0 ? /* @__PURE__ */
|
|
14829
|
-
/* @__PURE__ */
|
|
14830
|
-
/* @__PURE__ */
|
|
14831
|
-
/* @__PURE__ */
|
|
14832
|
-
/* @__PURE__ */
|
|
14833
|
-
/* @__PURE__ */
|
|
14834
|
-
/* @__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 })
|
|
14835
14932
|
] }),
|
|
14836
|
-
/* @__PURE__ */
|
|
14933
|
+
/* @__PURE__ */ jsx122(
|
|
14837
14934
|
"button",
|
|
14838
14935
|
{
|
|
14839
14936
|
type: "button",
|
|
@@ -14848,19 +14945,19 @@ function FavouriteChips({ controller, ui, sport, sportLabel, onNotice }) {
|
|
|
14848
14945
|
)
|
|
14849
14946
|
] }, `${e.kind}:${e.id}`)) })
|
|
14850
14947
|
] }) : null,
|
|
14851
|
-
total > 0 ? confirming ? /* @__PURE__ */
|
|
14852
|
-
/* @__PURE__ */
|
|
14853
|
-
/* @__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: () => {
|
|
14854
14951
|
void clear();
|
|
14855
14952
|
}, children: ui.favClear }),
|
|
14856
|
-
/* @__PURE__ */
|
|
14857
|
-
] }) : /* @__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
|
|
14858
14955
|
] });
|
|
14859
14956
|
}
|
|
14860
14957
|
|
|
14861
14958
|
// src/components/FavouritesSearch.tsx
|
|
14862
14959
|
import { useEffect as useEffect41, useRef as useRef32, useState as useState65 } from "react";
|
|
14863
|
-
import { jsx as
|
|
14960
|
+
import { jsx as jsx123, jsxs as jsxs109 } from "react/jsx-runtime";
|
|
14864
14961
|
var MIN_LETTERS = 2;
|
|
14865
14962
|
var MAX_LENGTH = 64;
|
|
14866
14963
|
var DEBOUNCE_MS = 250;
|
|
@@ -14889,8 +14986,8 @@ function FavouritesSearch({ controller, ui, sport, onNotice }) {
|
|
|
14889
14986
|
clearTimeout(timer);
|
|
14890
14987
|
};
|
|
14891
14988
|
}, [trimmed, sport, queryKey]);
|
|
14892
|
-
return /* @__PURE__ */
|
|
14893
|
-
/* @__PURE__ */
|
|
14989
|
+
return /* @__PURE__ */ jsxs109("div", { className: "ss-w-fav-search", children: [
|
|
14990
|
+
/* @__PURE__ */ jsx123(
|
|
14894
14991
|
"input",
|
|
14895
14992
|
{
|
|
14896
14993
|
type: "search",
|
|
@@ -14903,17 +15000,17 @@ function FavouritesSearch({ controller, ui, sport, onNotice }) {
|
|
|
14903
15000
|
onChange: (e) => setQuery(e.target.value)
|
|
14904
15001
|
}
|
|
14905
15002
|
),
|
|
14906
|
-
trimmed.length > 0 && trimmed.length < MIN_LETTERS ? /* @__PURE__ */
|
|
14907
|
-
settled && results2.length === 0 ? /* @__PURE__ */
|
|
14908
|
-
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) => {
|
|
14909
15006
|
const starred = controller.isStarred(e.kind, e.id);
|
|
14910
|
-
return /* @__PURE__ */
|
|
14911
|
-
/* @__PURE__ */
|
|
14912
|
-
/* @__PURE__ */
|
|
14913
|
-
/* @__PURE__ */
|
|
14914
|
-
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 })
|
|
14915
15012
|
] }),
|
|
14916
|
-
/* @__PURE__ */
|
|
15013
|
+
/* @__PURE__ */ jsx123(
|
|
14917
15014
|
"button",
|
|
14918
15015
|
{
|
|
14919
15016
|
type: "button",
|
|
@@ -14933,7 +15030,7 @@ function FavouritesSearch({ controller, ui, sport, onNotice }) {
|
|
|
14933
15030
|
}
|
|
14934
15031
|
|
|
14935
15032
|
// src/components/FavouritesPanel.tsx
|
|
14936
|
-
import { jsx as
|
|
15033
|
+
import { jsx as jsx124, jsxs as jsxs110 } from "react/jsx-runtime";
|
|
14937
15034
|
function capitalised(sport) {
|
|
14938
15035
|
return sport.charAt(0).toUpperCase() + sport.slice(1);
|
|
14939
15036
|
}
|
|
@@ -14950,8 +15047,8 @@ function FavouritesPanel({ controller, ui, sport, sports, onSportChange }) {
|
|
|
14950
15047
|
const sportLabel = sports.find((s) => s.sport === sport)?.label ?? capitalised(sport);
|
|
14951
15048
|
const kindLabel2 = (kind) => kind === "competition" ? ui.favKindLeague : kind === "team" ? ui.favKindTeam : ui.favKindPlayer;
|
|
14952
15049
|
const noticeText = notice === null ? null : notice.type === "cap" ? ui.favAtCap(kindLabel2(notice.kind)) : ui.favError;
|
|
14953
|
-
return /* @__PURE__ */
|
|
14954
|
-
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(
|
|
14955
15052
|
"button",
|
|
14956
15053
|
{
|
|
14957
15054
|
type: "button",
|
|
@@ -14962,17 +15059,17 @@ function FavouritesPanel({ controller, ui, sport, sports, onSportChange }) {
|
|
|
14962
15059
|
},
|
|
14963
15060
|
s.sport
|
|
14964
15061
|
)) }) : null,
|
|
14965
|
-
/* @__PURE__ */
|
|
14966
|
-
/* @__PURE__ */
|
|
14967
|
-
noticeText ? /* @__PURE__ */
|
|
14968
|
-
controller.status === "error" && !controller.data ? /* @__PURE__ */
|
|
14969
|
-
/* @__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 })
|
|
14970
15067
|
] });
|
|
14971
15068
|
}
|
|
14972
15069
|
|
|
14973
15070
|
// src/components/dashboard/v8/SentenceBuilder.tsx
|
|
14974
15071
|
import { useEffect as useEffect43, useRef as useRef34, useState as useState67 } from "react";
|
|
14975
|
-
import { Fragment as Fragment36, jsx as
|
|
15072
|
+
import { Fragment as Fragment36, jsx as jsx125, jsxs as jsxs111 } from "react/jsx-runtime";
|
|
14976
15073
|
var TOTALS = ["any", "3", "5", "10", "20", "50"];
|
|
14977
15074
|
var BASE_LEGS = [1, 2, 3, 4];
|
|
14978
15075
|
var isTotal = (v) => TOTALS.includes(v);
|
|
@@ -15026,7 +15123,7 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
15026
15123
|
...anonymousUserId ? { anonymousUserId } : {}
|
|
15027
15124
|
});
|
|
15028
15125
|
const [first] = useState67(() => requestFor(view));
|
|
15029
|
-
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 });
|
|
15030
15127
|
const lastRequest = useRef34(first);
|
|
15031
15128
|
useEffect43(() => {
|
|
15032
15129
|
void request(lastRequest.current);
|
|
@@ -15057,15 +15154,15 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
15057
15154
|
...BASE_LEGS,
|
|
15058
15155
|
...[preset.legs, suggested].filter((n) => n !== null && n > 4)
|
|
15059
15156
|
])).sort((a, b) => a - b);
|
|
15060
|
-
const ready =
|
|
15157
|
+
const ready = status2 === "ready" && grid !== null;
|
|
15061
15158
|
const rows = ready && grid.status === "ok" ? legsOf(grid, sport) : null;
|
|
15062
15159
|
const rowSlip = rows ? guardLegsPreMatch(slip, rows, ui) : slip;
|
|
15063
15160
|
useNextKickoffRender(rows ? rows.map((l) => l.kickoffUtc) : []);
|
|
15064
15161
|
const [startedNote, setStartedNote] = useState67(false);
|
|
15065
15162
|
const anyStarted = rows !== null && rows.some((l) => !preMatchOpen(l.kickoffUtc, Date.now()));
|
|
15066
15163
|
useEffect43(() => {
|
|
15067
|
-
if (startedNote &&
|
|
15068
|
-
}, [startedNote,
|
|
15164
|
+
if (startedNote && status2 === "ready" && !anyStarted) setStartedNote(false);
|
|
15165
|
+
}, [startedNote, status2, anyStarted]);
|
|
15069
15166
|
const market = rows?.[0]?.market;
|
|
15070
15167
|
const [seen, setSeen] = useState67(null);
|
|
15071
15168
|
useEffect43(() => {
|
|
@@ -15073,7 +15170,7 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
15073
15170
|
}, [market]);
|
|
15074
15171
|
const marketName = view.marketKey === null ? null : marketOptions?.find((m) => m.key === view.marketKey)?.label ?? market ?? seen;
|
|
15075
15172
|
const paused = ready && grid.status === "paused";
|
|
15076
|
-
const coolOff =
|
|
15173
|
+
const coolOff = status2 === "ready" && grid === null;
|
|
15077
15174
|
const empty2 = ready && (grid.status === "miss" || grid.status === "ok" && (rows === null || rows.length === 0));
|
|
15078
15175
|
const widened = view.widen || ready && grid.widened;
|
|
15079
15176
|
const singles = view.legs === 1;
|
|
@@ -15097,13 +15194,13 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
15097
15194
|
const nextWhen = nextAtMs !== null && nextAtMs > Date.now() ? kickoffText(ui, preset.nextGamesAtUtc) : null;
|
|
15098
15195
|
const phrase = preset.nextGamesAtUtc == null ? nextGames : null;
|
|
15099
15196
|
const mineGames = gamesOptions?.find((o) => o.id === view.gamesId)?.mine === true;
|
|
15100
|
-
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: [
|
|
15101
15198
|
ui.v8Paused,
|
|
15102
|
-
phrase ? /* @__PURE__ */
|
|
15103
|
-
] }) }) : conversation ? /* @__PURE__ */
|
|
15104
|
-
marketOptions ? /* @__PURE__ */
|
|
15105
|
-
/* @__PURE__ */
|
|
15106
|
-
/* @__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(
|
|
15107
15204
|
"select",
|
|
15108
15205
|
{
|
|
15109
15206
|
className: "ss-w-v8-select",
|
|
@@ -15114,18 +15211,18 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
15114
15211
|
if (picked !== view.marketKey) ask({ ...view, marketKey: picked });
|
|
15115
15212
|
},
|
|
15116
15213
|
children: [
|
|
15117
|
-
marketOptions.map((m) => /* @__PURE__ */
|
|
15118
|
-
/* @__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 })
|
|
15119
15216
|
]
|
|
15120
15217
|
}
|
|
15121
15218
|
) })
|
|
15122
|
-
] }) : marketName ? /* @__PURE__ */
|
|
15123
|
-
/* @__PURE__ */
|
|
15124
|
-
/* @__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 })
|
|
15125
15222
|
] }) : null,
|
|
15126
|
-
/* @__PURE__ */
|
|
15127
|
-
/* @__PURE__ */
|
|
15128
|
-
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(
|
|
15129
15226
|
"select",
|
|
15130
15227
|
{
|
|
15131
15228
|
className: "ss-w-v8-select",
|
|
@@ -15135,16 +15232,16 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
15135
15232
|
const picked = gamesOptions.find((o) => o.id === e.target.value);
|
|
15136
15233
|
if (picked && picked.id !== view.gamesId) pickGames(picked);
|
|
15137
15234
|
},
|
|
15138
|
-
children: /* @__PURE__ */
|
|
15235
|
+
children: /* @__PURE__ */ jsx125(GamesOptions, { options: gamesOptions, ui })
|
|
15139
15236
|
}
|
|
15140
|
-
) }) : /* @__PURE__ */
|
|
15237
|
+
) }) : /* @__PURE__ */ jsx125("button", { type: "button", className: "ss-w-v8-builder-btn", "aria-pressed": view.widen, disabled: view.widen && !canNarrow, onClick: () => {
|
|
15141
15238
|
const next = { ...view, widen: canNarrow ? !view.widen : true, matchIds: canNarrow && view.widen && view.matchIds.length === 0 ? preset.matchIds : view.matchIds };
|
|
15142
15239
|
ask(next);
|
|
15143
15240
|
}, children: ui.v8UseAllGames })
|
|
15144
15241
|
] }),
|
|
15145
|
-
/* @__PURE__ */
|
|
15146
|
-
/* @__PURE__ */
|
|
15147
|
-
/* @__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(
|
|
15148
15245
|
"button",
|
|
15149
15246
|
{
|
|
15150
15247
|
type: "button",
|
|
@@ -15159,9 +15256,9 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
15159
15256
|
n
|
|
15160
15257
|
)) })
|
|
15161
15258
|
] }),
|
|
15162
|
-
view.legs > 1 ? /* @__PURE__ */
|
|
15163
|
-
/* @__PURE__ */
|
|
15164
|
-
/* @__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(
|
|
15165
15262
|
"button",
|
|
15166
15263
|
{
|
|
15167
15264
|
type: "button",
|
|
@@ -15175,31 +15272,31 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
15175
15272
|
t
|
|
15176
15273
|
)) })
|
|
15177
15274
|
] }) : null,
|
|
15178
|
-
ready && singles && widenedNote && !empty2 ? /* @__PURE__ */
|
|
15179
|
-
ready && !widenedNote && !empty2 && preset.widenedForMarket === true && onOpeningChoice ? /* @__PURE__ */
|
|
15180
|
-
startedNote ? /* @__PURE__ */
|
|
15181
|
-
|
|
15182
|
-
|
|
15183
|
-
/* @__PURE__ */
|
|
15184
|
-
/* @__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: () => {
|
|
15185
15282
|
setStartedNote(false);
|
|
15186
15283
|
void request(lastRequest.current);
|
|
15187
15284
|
}, children: ui.v8BuilderRetry })
|
|
15188
15285
|
] }) : null,
|
|
15189
|
-
empty2 && singles && (widened || !canWiden) ? /* @__PURE__ */
|
|
15190
|
-
empty2 && !singles ? /* @__PURE__ */
|
|
15191
|
-
/* @__PURE__ */
|
|
15192
|
-
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
|
|
15193
15290
|
] }) : null,
|
|
15194
|
-
rows && rows.length > 0 ? /* @__PURE__ */
|
|
15195
|
-
/* @__PURE__ */
|
|
15196
|
-
/* @__PURE__ */
|
|
15197
|
-
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: () => {
|
|
15198
15295
|
setStartedNote(true);
|
|
15199
15296
|
void request(lastRequest.current);
|
|
15200
15297
|
} }) : null
|
|
15201
15298
|
] }),
|
|
15202
|
-
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
|
|
15203
15300
|
] }) : null
|
|
15204
15301
|
] }) : null });
|
|
15205
15302
|
}
|
|
@@ -15207,25 +15304,25 @@ function GamesOptions({ options, ui }) {
|
|
|
15207
15304
|
const top = options.filter((o) => o.group !== "league" && o.group !== "game");
|
|
15208
15305
|
const leagues = options.filter((o) => o.group === "league");
|
|
15209
15306
|
const games = options.filter((o) => o.group === "game");
|
|
15210
|
-
return /* @__PURE__ */
|
|
15211
|
-
top.map((o) => /* @__PURE__ */
|
|
15212
|
-
leagues.length > 0 ? /* @__PURE__ */
|
|
15213
|
-
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) => {
|
|
15214
15311
|
const at = kickoffText(ui, o.startsAtUtc);
|
|
15215
|
-
return /* @__PURE__ */
|
|
15312
|
+
return /* @__PURE__ */ jsx125("option", { value: o.id, children: at ? `${o.label} \xB7 ${at}` : o.label }, o.id);
|
|
15216
15313
|
}) }) : null
|
|
15217
15314
|
] });
|
|
15218
15315
|
}
|
|
15219
15316
|
|
|
15220
15317
|
// src/components/BuilderPanel.tsx
|
|
15221
|
-
import { jsx as
|
|
15318
|
+
import { jsx as jsx126, jsxs as jsxs112 } from "react/jsx-runtime";
|
|
15222
15319
|
function BuilderPanel({ options, sport, onSportChange, ui, slip, onCoolOff }) {
|
|
15223
15320
|
const ctx = usePersonalGreeting();
|
|
15224
15321
|
const scope = useSportScope();
|
|
15225
15322
|
const active = options.find((o) => o.sport === sport) ?? options[0];
|
|
15226
15323
|
if (!active) return null;
|
|
15227
|
-
return /* @__PURE__ */
|
|
15228
|
-
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(
|
|
15229
15326
|
"button",
|
|
15230
15327
|
{
|
|
15231
15328
|
type: "button",
|
|
@@ -15236,7 +15333,7 @@ function BuilderPanel({ options, sport, onSportChange, ui, slip, onCoolOff }) {
|
|
|
15236
15333
|
},
|
|
15237
15334
|
o.sport
|
|
15238
15335
|
)) }) : null,
|
|
15239
|
-
/* @__PURE__ */
|
|
15336
|
+
/* @__PURE__ */ jsx126("div", { className: "ss-w-v8", children: /* @__PURE__ */ jsx126(
|
|
15240
15337
|
SentenceBuilder,
|
|
15241
15338
|
{
|
|
15242
15339
|
preset: active.preset,
|
|
@@ -15255,7 +15352,7 @@ function BuilderPanel({ options, sport, onSportChange, ui, slip, onCoolOff }) {
|
|
|
15255
15352
|
}
|
|
15256
15353
|
|
|
15257
15354
|
// src/components/Fixtures.tsx
|
|
15258
|
-
import { jsx as
|
|
15355
|
+
import { jsx as jsx127, jsxs as jsxs113 } from "react/jsx-runtime";
|
|
15259
15356
|
function groupByRound(fixtures) {
|
|
15260
15357
|
const groups = [];
|
|
15261
15358
|
for (const fx of fixtures) {
|
|
@@ -15267,31 +15364,31 @@ function groupByRound(fixtures) {
|
|
|
15267
15364
|
}
|
|
15268
15365
|
function Fixtures({ fixtures, loading, ui }) {
|
|
15269
15366
|
if (fixtures.length === 0) {
|
|
15270
|
-
if (loading) return /* @__PURE__ */
|
|
15271
|
-
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 });
|
|
15272
15369
|
}
|
|
15273
|
-
return /* @__PURE__ */
|
|
15274
|
-
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 }),
|
|
15275
15372
|
group.items.map((fx) => {
|
|
15276
15373
|
const played = fx.homeScore !== null && fx.awayScore !== null;
|
|
15277
15374
|
const kickoff = fx.matchDateTime ? ui.bettingKickoff(fx.matchDateTime) : null;
|
|
15278
|
-
return /* @__PURE__ */
|
|
15279
|
-
/* @__PURE__ */
|
|
15280
|
-
fx.competitionName && /* @__PURE__ */
|
|
15281
|
-
!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: [
|
|
15282
15379
|
kickoff.dayLabel,
|
|
15283
15380
|
" \xB7 ",
|
|
15284
15381
|
kickoff.time
|
|
15285
15382
|
] })
|
|
15286
15383
|
] }),
|
|
15287
|
-
/* @__PURE__ */
|
|
15288
|
-
/* @__PURE__ */
|
|
15289
|
-
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: [
|
|
15290
15387
|
fx.homeScore,
|
|
15291
|
-
/* @__PURE__ */
|
|
15388
|
+
/* @__PURE__ */ jsx127("i", { children: "-" }),
|
|
15292
15389
|
fx.awayScore
|
|
15293
|
-
] }) : /* @__PURE__ */
|
|
15294
|
-
/* @__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 }) })
|
|
15295
15392
|
] })
|
|
15296
15393
|
] }, fx.id);
|
|
15297
15394
|
})
|
|
@@ -15299,7 +15396,7 @@ function Fixtures({ fixtures, loading, ui }) {
|
|
|
15299
15396
|
}
|
|
15300
15397
|
|
|
15301
15398
|
// src/components/Standings.tsx
|
|
15302
|
-
import { jsx as
|
|
15399
|
+
import { jsx as jsx128, jsxs as jsxs114 } from "react/jsx-runtime";
|
|
15303
15400
|
function groupByTable(rows) {
|
|
15304
15401
|
const groups = [];
|
|
15305
15402
|
for (const row of rows) {
|
|
@@ -15310,30 +15407,30 @@ function groupByTable(rows) {
|
|
|
15310
15407
|
return groups;
|
|
15311
15408
|
}
|
|
15312
15409
|
function Standings({ standings, loading, ui }) {
|
|
15313
|
-
if (standings === null && loading) return /* @__PURE__ */
|
|
15314
|
-
if (standings === null || standings.length === 0) return /* @__PURE__ */
|
|
15315
|
-
return /* @__PURE__ */
|
|
15316
|
-
group.table && /* @__PURE__ */
|
|
15317
|
-
/* @__PURE__ */
|
|
15318
|
-
/* @__PURE__ */
|
|
15319
|
-
/* @__PURE__ */
|
|
15320
|
-
/* @__PURE__ */
|
|
15321
|
-
/* @__PURE__ */
|
|
15322
|
-
/* @__PURE__ */
|
|
15323
|
-
/* @__PURE__ */
|
|
15324
|
-
/* @__PURE__ */
|
|
15325
|
-
/* @__PURE__ */
|
|
15326
|
-
/* @__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 })
|
|
15327
15424
|
] }) }),
|
|
15328
|
-
/* @__PURE__ */
|
|
15329
|
-
/* @__PURE__ */
|
|
15330
|
-
/* @__PURE__ */
|
|
15331
|
-
/* @__PURE__ */
|
|
15332
|
-
/* @__PURE__ */
|
|
15333
|
-
/* @__PURE__ */
|
|
15334
|
-
/* @__PURE__ */
|
|
15335
|
-
/* @__PURE__ */
|
|
15336
|
-
/* @__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 })
|
|
15337
15434
|
] }, row.teamId)) })
|
|
15338
15435
|
] })
|
|
15339
15436
|
] }, `${gi}-${group.table ?? "none"}`)) });
|
|
@@ -15391,7 +15488,7 @@ function statsEyebrow(ui, season, competition, matches) {
|
|
|
15391
15488
|
}
|
|
15392
15489
|
|
|
15393
15490
|
// src/components/SquadStats.tsx
|
|
15394
|
-
import { jsx as
|
|
15491
|
+
import { jsx as jsx129, jsxs as jsxs115 } from "react/jsx-runtime";
|
|
15395
15492
|
function leader(stats, pick) {
|
|
15396
15493
|
let best = null;
|
|
15397
15494
|
for (const p of stats) {
|
|
@@ -15405,53 +15502,53 @@ function ratingClass(rating) {
|
|
|
15405
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";
|
|
15406
15503
|
}
|
|
15407
15504
|
function SquadStats({ stats, loading, ui, onSelectPlayer }) {
|
|
15408
|
-
if (stats === null && loading) return /* @__PURE__ */
|
|
15409
|
-
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 });
|
|
15410
15507
|
const scorer = leader(stats, (p) => p.goals);
|
|
15411
15508
|
const assister = leader(stats, (p) => p.assists);
|
|
15412
15509
|
const footer = [
|
|
15413
15510
|
scorer && ui.squadTopScorer(scorer.playerName, scorer.goals),
|
|
15414
15511
|
assister && ui.squadTopAssists(assister.playerName, assister.assists)
|
|
15415
15512
|
].filter((part) => !!part).join(" \xB7 ");
|
|
15416
|
-
return /* @__PURE__ */
|
|
15417
|
-
/* @__PURE__ */
|
|
15418
|
-
/* @__PURE__ */
|
|
15419
|
-
/* @__PURE__ */
|
|
15420
|
-
/* @__PURE__ */
|
|
15421
|
-
/* @__PURE__ */
|
|
15422
|
-
/* @__PURE__ */
|
|
15423
|
-
/* @__PURE__ */
|
|
15424
|
-
/* @__PURE__ */
|
|
15425
|
-
/* @__PURE__ */
|
|
15426
|
-
/* @__PURE__ */
|
|
15427
|
-
/* @__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 })
|
|
15428
15525
|
] }),
|
|
15429
|
-
stats.map((p) => /* @__PURE__ */
|
|
15430
|
-
/* @__PURE__ */
|
|
15431
|
-
p.jerseyNumber !== null && /* @__PURE__ */
|
|
15432
|
-
/* @__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 })
|
|
15433
15530
|
] }),
|
|
15434
|
-
/* @__PURE__ */
|
|
15435
|
-
/* @__PURE__ */
|
|
15436
|
-
/* @__PURE__ */
|
|
15437
|
-
/* @__PURE__ */
|
|
15438
|
-
/* @__PURE__ */
|
|
15439
|
-
/* @__PURE__ */
|
|
15440
|
-
/* @__PURE__ */
|
|
15441
|
-
/* @__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) })
|
|
15442
15539
|
] }, p.playerId))
|
|
15443
15540
|
] }),
|
|
15444
|
-
footer !== "" && /* @__PURE__ */
|
|
15541
|
+
footer !== "" && /* @__PURE__ */ jsx129("div", { className: "ss-w-sq-foot", children: footer })
|
|
15445
15542
|
] });
|
|
15446
15543
|
}
|
|
15447
15544
|
|
|
15448
15545
|
// src/components/Squad.tsx
|
|
15449
|
-
import { Fragment as Fragment37, jsx as
|
|
15546
|
+
import { Fragment as Fragment37, jsx as jsx130, jsxs as jsxs116 } from "react/jsx-runtime";
|
|
15450
15547
|
function Squad({ squad, loading, ui, view, onToggleView, stats, statsLoading, seasonName = null, competitionName = null, matchesPlayed = null, onSelectPlayer }) {
|
|
15451
15548
|
const eyebrow = view === "stats" ? statsEyebrow(ui, seasonName, competitionName, matchesPlayed) : null;
|
|
15452
|
-
const toggle = /* @__PURE__ */
|
|
15453
|
-
eyebrow !== null && /* @__PURE__ */
|
|
15454
|
-
/* @__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(
|
|
15455
15552
|
"button",
|
|
15456
15553
|
{
|
|
15457
15554
|
type: "button",
|
|
@@ -15466,26 +15563,26 @@ function Squad({ squad, loading, ui, view, onToggleView, stats, statsLoading, se
|
|
|
15466
15563
|
)) })
|
|
15467
15564
|
] });
|
|
15468
15565
|
if (view === "stats") {
|
|
15469
|
-
return /* @__PURE__ */
|
|
15566
|
+
return /* @__PURE__ */ jsxs116(Fragment37, { children: [
|
|
15470
15567
|
toggle,
|
|
15471
|
-
/* @__PURE__ */
|
|
15568
|
+
/* @__PURE__ */ jsx130(SquadStats, { stats, loading: statsLoading, ui, onSelectPlayer })
|
|
15472
15569
|
] });
|
|
15473
15570
|
}
|
|
15474
|
-
if (squad === null && loading) return /* @__PURE__ */
|
|
15571
|
+
if (squad === null && loading) return /* @__PURE__ */ jsxs116(Fragment37, { children: [
|
|
15475
15572
|
toggle,
|
|
15476
|
-
/* @__PURE__ */
|
|
15573
|
+
/* @__PURE__ */ jsx130("div", { className: "ss-w-mon-list" })
|
|
15477
15574
|
] });
|
|
15478
|
-
if (squad === null || squad.length === 0) return /* @__PURE__ */
|
|
15575
|
+
if (squad === null || squad.length === 0) return /* @__PURE__ */ jsxs116(Fragment37, { children: [
|
|
15479
15576
|
toggle,
|
|
15480
|
-
/* @__PURE__ */
|
|
15577
|
+
/* @__PURE__ */ jsx130("div", { className: "ss-w-mon-empty", children: ui.clubSquadEmpty })
|
|
15481
15578
|
] });
|
|
15482
|
-
return /* @__PURE__ */
|
|
15579
|
+
return /* @__PURE__ */ jsxs116(Fragment37, { children: [
|
|
15483
15580
|
toggle,
|
|
15484
|
-
/* @__PURE__ */
|
|
15485
|
-
group.positionName && /* @__PURE__ */
|
|
15486
|
-
group.items.map((p) => /* @__PURE__ */
|
|
15487
|
-
/* @__PURE__ */
|
|
15488
|
-
/* @__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 })
|
|
15489
15586
|
] }, p.playerId))
|
|
15490
15587
|
] }, `${gi}-${group.positionName ?? "none"}`)) })
|
|
15491
15588
|
] });
|
|
@@ -15493,18 +15590,18 @@ function Squad({ squad, loading, ui, view, onToggleView, stats, statsLoading, se
|
|
|
15493
15590
|
|
|
15494
15591
|
// src/components/PlayerPhoto.tsx
|
|
15495
15592
|
import { useState as useState68 } from "react";
|
|
15496
|
-
import { jsx as
|
|
15593
|
+
import { jsx as jsx131 } from "react/jsx-runtime";
|
|
15497
15594
|
function PlayerPhoto({ photoUrl, jerseyNumber, size }) {
|
|
15498
15595
|
const [failed, setFailed] = useState68(false);
|
|
15499
15596
|
const box = { width: size, height: size };
|
|
15500
15597
|
if (photoUrl && !failed) {
|
|
15501
|
-
return /* @__PURE__ */
|
|
15598
|
+
return /* @__PURE__ */ jsx131("img", { className: "ss-w-pd-photo", style: box, src: photoUrl, alt: "", "aria-hidden": "true", onError: () => setFailed(true) });
|
|
15502
15599
|
}
|
|
15503
|
-
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 ?? "" });
|
|
15504
15601
|
}
|
|
15505
15602
|
|
|
15506
15603
|
// src/components/MiniPitch.tsx
|
|
15507
|
-
import { jsx as
|
|
15604
|
+
import { jsx as jsx132 } from "react/jsx-runtime";
|
|
15508
15605
|
var SPOT = {
|
|
15509
15606
|
GK: [50, 90],
|
|
15510
15607
|
CB: [50, 75],
|
|
@@ -15526,12 +15623,12 @@ var SPOT = {
|
|
|
15526
15623
|
function MiniPitch({ positionCode }) {
|
|
15527
15624
|
const spot = SPOT[positionCode?.trim().toUpperCase() ?? ""];
|
|
15528
15625
|
if (spot === void 0) return null;
|
|
15529
|
-
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]}%` } }) });
|
|
15530
15627
|
}
|
|
15531
15628
|
|
|
15532
15629
|
// src/components/PerformanceBars.tsx
|
|
15533
15630
|
import { useState as useState69 } from "react";
|
|
15534
|
-
import { jsx as
|
|
15631
|
+
import { jsx as jsx133, jsxs as jsxs117 } from "react/jsx-runtime";
|
|
15535
15632
|
var GROUPS = ["shooting", "passing", "possession", "defending"];
|
|
15536
15633
|
function finite3(v) {
|
|
15537
15634
|
return typeof v === "number" && Number.isFinite(v) ? v : null;
|
|
@@ -15583,33 +15680,33 @@ function PerformanceBars({ performance, competitionName, strings }) {
|
|
|
15583
15680
|
const cards = GROUPS.map((g) => {
|
|
15584
15681
|
const rows = labelled.filter((m) => m.group === g && valueOf(m, mode) !== null);
|
|
15585
15682
|
if (rows.length === 0) return null;
|
|
15586
|
-
return /* @__PURE__ */
|
|
15587
|
-
/* @__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) }),
|
|
15588
15685
|
rows.map((m) => {
|
|
15589
15686
|
const v = valueOf(m, mode);
|
|
15590
15687
|
const rank2 = performance.ranked ? rankOf(m, mode) : null;
|
|
15591
|
-
return /* @__PURE__ */
|
|
15592
|
-
/* @__PURE__ */
|
|
15593
|
-
/* @__PURE__ */
|
|
15594
|
-
/* @__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) })
|
|
15595
15692
|
] }),
|
|
15596
|
-
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}%` } }) })
|
|
15597
15694
|
] }, m.key);
|
|
15598
15695
|
})
|
|
15599
15696
|
] }, g);
|
|
15600
15697
|
});
|
|
15601
|
-
return /* @__PURE__ */
|
|
15602
|
-
/* @__PURE__ */
|
|
15603
|
-
/* @__PURE__ */
|
|
15604
|
-
/* @__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)) })
|
|
15605
15702
|
] }),
|
|
15606
|
-
subtitle !== null && /* @__PURE__ */
|
|
15607
|
-
/* @__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 })
|
|
15608
15705
|
] });
|
|
15609
15706
|
}
|
|
15610
15707
|
|
|
15611
15708
|
// src/components/PlayerDetail.tsx
|
|
15612
|
-
import { Fragment as Fragment38, jsx as
|
|
15709
|
+
import { Fragment as Fragment38, jsx as jsx134, jsxs as jsxs118 } from "react/jsx-runtime";
|
|
15613
15710
|
var DASH = "\u2014";
|
|
15614
15711
|
function ageFrom(dobMs) {
|
|
15615
15712
|
if (dobMs === null) return DASH;
|
|
@@ -15629,16 +15726,16 @@ function ratingTone(rounded) {
|
|
|
15629
15726
|
return "neg";
|
|
15630
15727
|
}
|
|
15631
15728
|
function Bio({ label, value }) {
|
|
15632
|
-
return /* @__PURE__ */
|
|
15633
|
-
/* @__PURE__ */
|
|
15729
|
+
return /* @__PURE__ */ jsxs118("div", { className: "ss-w-pd-bio-item", children: [
|
|
15730
|
+
/* @__PURE__ */ jsx134("span", { className: "ss-w-pd-faint", children: label }),
|
|
15634
15731
|
" ",
|
|
15635
|
-
/* @__PURE__ */
|
|
15732
|
+
/* @__PURE__ */ jsx134("span", { children: value })
|
|
15636
15733
|
] });
|
|
15637
15734
|
}
|
|
15638
15735
|
function Tile({ label, value, pos }) {
|
|
15639
|
-
return /* @__PURE__ */
|
|
15640
|
-
/* @__PURE__ */
|
|
15641
|
-
/* @__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 })
|
|
15642
15739
|
] });
|
|
15643
15740
|
}
|
|
15644
15741
|
function AvailabilityCard({ ui, next, availability }) {
|
|
@@ -15654,12 +15751,12 @@ function AvailabilityCard({ ui, next, availability }) {
|
|
|
15654
15751
|
pill = availability.status === "injured" ? { text: ui.availabilityInjured, tone: "neg" } : availability.status === "suspended" ? { text: ui.availabilitySuspended, tone: "warn" } : { text: ui.availabilityUnavailable, tone: "warn" };
|
|
15655
15752
|
}
|
|
15656
15753
|
}
|
|
15657
|
-
return /* @__PURE__ */
|
|
15658
|
-
/* @__PURE__ */
|
|
15659
|
-
next !== null && /* @__PURE__ */
|
|
15660
|
-
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 })
|
|
15661
15758
|
] }),
|
|
15662
|
-
pill !== null && /* @__PURE__ */
|
|
15759
|
+
pill !== null && /* @__PURE__ */ jsx134("div", { className: `ss-w-pd-pill ss-w-pd-pill--${pill.tone}`, children: pill.text })
|
|
15663
15760
|
] });
|
|
15664
15761
|
}
|
|
15665
15762
|
function MatchRow({ ui, row }) {
|
|
@@ -15673,28 +15770,28 @@ function MatchRow({ ui, row }) {
|
|
|
15673
15770
|
const sub = [`${ui.resultLetter[row.result]} ${row.goalsFor}\u2013${row.goalsAgainst}`, `${row.minutes}\u2032`, ...extras].join(" \xB7 ");
|
|
15674
15771
|
const rating = typeof row.rating === "number" && Number.isFinite(row.rating) ? Math.round(row.rating * 10) / 10 : null;
|
|
15675
15772
|
const pillTone = row.result === "W" ? "pos" : row.result === "L" ? "neg" : "draw";
|
|
15676
|
-
return /* @__PURE__ */
|
|
15677
|
-
/* @__PURE__ */
|
|
15678
|
-
/* @__PURE__ */
|
|
15679
|
-
/* @__PURE__ */
|
|
15680
|
-
/* @__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 })
|
|
15681
15778
|
] }),
|
|
15682
|
-
/* @__PURE__ */
|
|
15683
|
-
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) })
|
|
15684
15781
|
] });
|
|
15685
15782
|
}
|
|
15686
15783
|
function PlayerDetail({ detail, loading, ui, seasonName, onClose }) {
|
|
15687
|
-
const back = /* @__PURE__ */
|
|
15688
|
-
/* @__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" }) }),
|
|
15689
15786
|
ui.clubPlayerBack
|
|
15690
15787
|
] });
|
|
15691
15788
|
if (detail === null) {
|
|
15692
|
-
return loading ? /* @__PURE__ */
|
|
15693
|
-
/* @__PURE__ */
|
|
15694
|
-
/* @__PURE__ */
|
|
15695
|
-
] }) : /* @__PURE__ */
|
|
15696
|
-
/* @__PURE__ */
|
|
15697
|
-
/* @__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 })
|
|
15698
15795
|
] });
|
|
15699
15796
|
}
|
|
15700
15797
|
const s = detail.seasonStats;
|
|
@@ -15707,41 +15804,41 @@ function PlayerDetail({ detail, loading, ui, seasonName, onClose }) {
|
|
|
15707
15804
|
const next = detail.nextFixture ?? null;
|
|
15708
15805
|
const availability = detail.availability ?? null;
|
|
15709
15806
|
const log = detail.matchLog ?? [];
|
|
15710
|
-
return /* @__PURE__ */
|
|
15711
|
-
/* @__PURE__ */
|
|
15712
|
-
/* @__PURE__ */
|
|
15713
|
-
/* @__PURE__ */
|
|
15714
|
-
/* @__PURE__ */
|
|
15715
|
-
/* @__PURE__ */
|
|
15716
|
-
/* @__PURE__ */
|
|
15717
|
-
subLine !== "" && /* @__PURE__ */
|
|
15718
|
-
/* @__PURE__ */
|
|
15719
|
-
/* @__PURE__ */
|
|
15720
|
-
/* @__PURE__ */
|
|
15721
|
-
foot !== null && /* @__PURE__ */
|
|
15722
|
-
/* @__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 })
|
|
15723
15820
|
] })
|
|
15724
15821
|
] }),
|
|
15725
|
-
/* @__PURE__ */
|
|
15822
|
+
/* @__PURE__ */ jsx134(MiniPitch, { positionCode: detail.positionCode })
|
|
15726
15823
|
] }),
|
|
15727
|
-
(next !== null || availability !== null) && /* @__PURE__ */
|
|
15728
|
-
/* @__PURE__ */
|
|
15729
|
-
eyebrow !== null && /* @__PURE__ */
|
|
15730
|
-
/* @__PURE__ */
|
|
15731
|
-
/* @__PURE__ */
|
|
15732
|
-
/* @__PURE__ */
|
|
15733
|
-
typeof s.starts === "number" && /* @__PURE__ */
|
|
15734
|
-
/* @__PURE__ */
|
|
15735
|
-
/* @__PURE__ */
|
|
15736
|
-
rating !== null && /* @__PURE__ */
|
|
15737
|
-
/* @__PURE__ */
|
|
15738
|
-
/* @__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) })
|
|
15739
15836
|
] })
|
|
15740
15837
|
] }),
|
|
15741
|
-
detail.performance != null && /* @__PURE__ */
|
|
15742
|
-
log.length > 0 && /* @__PURE__ */
|
|
15743
|
-
/* @__PURE__ */
|
|
15744
|
-
/* @__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)) })
|
|
15745
15842
|
] })
|
|
15746
15843
|
] })
|
|
15747
15844
|
] });
|
|
@@ -15749,7 +15846,7 @@ function PlayerDetail({ detail, loading, ui, seasonName, onClose }) {
|
|
|
15749
15846
|
|
|
15750
15847
|
// src/components/PresetTools.tsx
|
|
15751
15848
|
import { useEffect as useEffect44, useId as useId10, useRef as useRef35, useState as useState70 } from "react";
|
|
15752
|
-
import { Fragment as Fragment39, jsx as
|
|
15849
|
+
import { Fragment as Fragment39, jsx as jsx135, jsxs as jsxs119 } from "react/jsx-runtime";
|
|
15753
15850
|
var FOCUSABLE = 'button:not([disabled]), [href], input:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
15754
15851
|
function PresetToolModal({ title, closeLabel, onClose, children, footer, className }) {
|
|
15755
15852
|
const dialogRef = useRef35(null);
|
|
@@ -15787,45 +15884,45 @@ function PresetToolModal({ title, closeLabel, onClose, children, footer, classNa
|
|
|
15787
15884
|
first.focus();
|
|
15788
15885
|
}
|
|
15789
15886
|
};
|
|
15790
|
-
return /* @__PURE__ */
|
|
15791
|
-
/* @__PURE__ */
|
|
15792
|
-
/* @__PURE__ */
|
|
15793
|
-
/* @__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, {}) })
|
|
15794
15891
|
] }),
|
|
15795
|
-
/* @__PURE__ */
|
|
15796
|
-
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
|
|
15797
15894
|
] }) });
|
|
15798
15895
|
}
|
|
15799
15896
|
function SendButton({ label, display, disabled, onClick }) {
|
|
15800
|
-
return /* @__PURE__ */
|
|
15897
|
+
return /* @__PURE__ */ jsx135("button", { type: "button", className: "ss-w-tool-send", "aria-label": `${label}: ${display}`, disabled, onClick, children: label });
|
|
15801
15898
|
}
|
|
15802
15899
|
function PickList({ picks, formatKickoff }) {
|
|
15803
15900
|
const { oddsFormat } = useOddsSettings();
|
|
15804
|
-
return /* @__PURE__ */
|
|
15805
|
-
/* @__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: [
|
|
15806
15903
|
p.homeTeamName,
|
|
15807
15904
|
" \u2013 ",
|
|
15808
15905
|
p.awayTeamName
|
|
15809
15906
|
] }),
|
|
15810
|
-
/* @__PURE__ */
|
|
15907
|
+
/* @__PURE__ */ jsxs119("span", { className: "ss-w-tool-pick-sel", children: [
|
|
15811
15908
|
p.marketLabel,
|
|
15812
15909
|
": ",
|
|
15813
15910
|
p.selectionLabel,
|
|
15814
15911
|
p.line ? ` ${p.line}` : ""
|
|
15815
15912
|
] }),
|
|
15816
|
-
/* @__PURE__ */
|
|
15817
|
-
/* @__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) })
|
|
15818
15915
|
] }, p.matchOddsId)) });
|
|
15819
15916
|
}
|
|
15820
15917
|
function ComboPreview({ cell: cell2, formatKickoff }) {
|
|
15821
15918
|
const { oddsFormat } = useOddsSettings();
|
|
15822
|
-
return /* @__PURE__ */
|
|
15823
|
-
/* @__PURE__ */
|
|
15824
|
-
/* @__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) })
|
|
15825
15922
|
] });
|
|
15826
15923
|
}
|
|
15827
15924
|
function Unavailable({ text }) {
|
|
15828
|
-
return /* @__PURE__ */
|
|
15925
|
+
return /* @__PURE__ */ jsx135("p", { className: "ss-w-tool-unavailable", children: text });
|
|
15829
15926
|
}
|
|
15830
15927
|
var textOf = (options, value, format2) => {
|
|
15831
15928
|
const o = options.find((x) => samePrice(x.value, value));
|
|
@@ -15849,55 +15946,55 @@ function BuildComboTool({ grid, strings, streaming, formatKickoff, initialTotal,
|
|
|
15849
15946
|
const d = strings.comboDisplay(nextLegs, textOf(totalOptions, nextTotal, oddsFormat));
|
|
15850
15947
|
setAnnouncement(findCombo(grid, nextTotal, nextLegs) ? d : `${d}. ${strings.unavailable}`);
|
|
15851
15948
|
};
|
|
15852
|
-
const footer = /* @__PURE__ */
|
|
15949
|
+
const footer = /* @__PURE__ */ jsx135(SendButton, { label: strings.send, display, disabled: !cell2 || streaming, onClick: () => {
|
|
15853
15950
|
if (cell2) onSend(comboAsk(cell2, strings, oddsFormat));
|
|
15854
15951
|
} });
|
|
15855
|
-
return /* @__PURE__ */
|
|
15856
|
-
/* @__PURE__ */
|
|
15857
|
-
/* @__PURE__ */
|
|
15858
|
-
/* @__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)) })
|
|
15859
15956
|
] }),
|
|
15860
|
-
/* @__PURE__ */
|
|
15861
|
-
/* @__PURE__ */
|
|
15862
|
-
/* @__PURE__ */
|
|
15863
|
-
/* @__PURE__ */
|
|
15864
|
-
/* @__PURE__ */
|
|
15865
|
-
/* @__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: "+" })
|
|
15866
15963
|
] })
|
|
15867
15964
|
] }),
|
|
15868
|
-
cell2 ? /* @__PURE__ */
|
|
15869
|
-
/* @__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 })
|
|
15870
15967
|
] });
|
|
15871
15968
|
}
|
|
15872
15969
|
|
|
15873
15970
|
// src/components/SettingsSheet.tsx
|
|
15874
|
-
import { jsx as
|
|
15971
|
+
import { jsx as jsx136, jsxs as jsxs120 } from "react/jsx-runtime";
|
|
15875
15972
|
var SAMPLE = { decimal: "2.50", american: "+150", fractional: "3/2" };
|
|
15876
15973
|
var ODDS = ["decimal", "fractional", "american"];
|
|
15877
15974
|
var THEMES2 = ["light", "dark", "auto"];
|
|
15878
15975
|
function SettingsSheet({ ui, onClose }) {
|
|
15879
15976
|
const s = useOddsSettings();
|
|
15880
15977
|
const t = ui.settings;
|
|
15881
|
-
return /* @__PURE__ */
|
|
15978
|
+
return /* @__PURE__ */ jsxs120(
|
|
15882
15979
|
PresetToolModal,
|
|
15883
15980
|
{
|
|
15884
15981
|
title: t.title,
|
|
15885
15982
|
closeLabel: t.close,
|
|
15886
15983
|
onClose,
|
|
15887
15984
|
className: "ss-w-set-backdrop-in",
|
|
15888
|
-
footer: /* @__PURE__ */
|
|
15985
|
+
footer: /* @__PURE__ */ jsx136("p", { className: "ss-w-set-foot", children: t.foot }),
|
|
15889
15986
|
children: [
|
|
15890
|
-
s.oddsOffered && /* @__PURE__ */
|
|
15891
|
-
/* @__PURE__ */
|
|
15892
|
-
/* @__PURE__ */
|
|
15893
|
-
/* @__PURE__ */
|
|
15894
|
-
/* @__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) })
|
|
15895
15992
|
] }),
|
|
15896
|
-
/* @__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)) })
|
|
15897
15994
|
] }),
|
|
15898
|
-
!s.themeLocked && /* @__PURE__ */
|
|
15899
|
-
/* @__PURE__ */
|
|
15900
|
-
/* @__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)) })
|
|
15901
15998
|
] })
|
|
15902
15999
|
]
|
|
15903
16000
|
}
|
|
@@ -15905,7 +16002,7 @@ function SettingsSheet({ ui, onClose }) {
|
|
|
15905
16002
|
}
|
|
15906
16003
|
|
|
15907
16004
|
// src/components/ChatPanel.tsx
|
|
15908
|
-
import { Fragment as Fragment40, jsx as
|
|
16005
|
+
import { Fragment as Fragment40, jsx as jsx137, jsxs as jsxs121 } from "react/jsx-runtime";
|
|
15909
16006
|
var FULLSCREEN_QUERY = "(max-width: 639px)";
|
|
15910
16007
|
function useIsModal() {
|
|
15911
16008
|
const [modal, setModal] = useState71(false);
|
|
@@ -16051,8 +16148,8 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
16051
16148
|
focusAfterCloseRef.current = "composer";
|
|
16052
16149
|
setTool(null);
|
|
16053
16150
|
}, [tool, onChatTab, presetGrid]);
|
|
16054
|
-
return /* @__PURE__ */
|
|
16055
|
-
/* @__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(
|
|
16056
16153
|
ChatHeader,
|
|
16057
16154
|
{
|
|
16058
16155
|
onClose: () => closeWith("button"),
|
|
@@ -16067,7 +16164,7 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
16067
16164
|
settingsLabel: ui.settings.title
|
|
16068
16165
|
}
|
|
16069
16166
|
),
|
|
16070
|
-
tabs && /* @__PURE__ */
|
|
16167
|
+
tabs && /* @__PURE__ */ jsx137(
|
|
16071
16168
|
TabBar,
|
|
16072
16169
|
{
|
|
16073
16170
|
monitor: tabs,
|
|
@@ -16082,24 +16179,24 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
16082
16179
|
favouritesEnabled: !!monitor && (favouritesEnabled ?? false)
|
|
16083
16180
|
}
|
|
16084
16181
|
),
|
|
16085
|
-
/* @__PURE__ */
|
|
16086
|
-
/* @__PURE__ */
|
|
16087
|
-
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
|
|
16088
16185
|
] }),
|
|
16089
|
-
monitor && discovery && monitor.activeTab === "today" && /* @__PURE__ */
|
|
16090
|
-
tabs && tabs.activeTab === "builder" && hasBuilder && builder && /* @__PURE__ */
|
|
16091
|
-
monitor && monitor.activeTab === "following" && /* @__PURE__ */
|
|
16092
|
-
monitor && monitor.activeTab === "trends" && /* @__PURE__ */
|
|
16093
|
-
monitor && monitor.activeTab === "fixtures" && /* @__PURE__ */
|
|
16094
|
-
monitor && monitor.activeTab === "standings" && /* @__PURE__ */
|
|
16095
|
-
monitor && monitor.activeTab === "squad" && /* @__PURE__ */
|
|
16096
|
-
/* @__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(
|
|
16097
16194
|
"div",
|
|
16098
16195
|
{
|
|
16099
16196
|
ref: squadLayerRef,
|
|
16100
16197
|
style: selectedPlayerId === null ? SQUAD_LAYER_STYLE : HIDDEN_LAYER_STYLE,
|
|
16101
16198
|
"aria-hidden": selectedPlayerId !== null ? true : void 0,
|
|
16102
|
-
children: /* @__PURE__ */
|
|
16199
|
+
children: /* @__PURE__ */ jsx137(
|
|
16103
16200
|
Squad,
|
|
16104
16201
|
{
|
|
16105
16202
|
squad: clubSquadResult?.data ?? null,
|
|
@@ -16117,9 +16214,9 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
16117
16214
|
)
|
|
16118
16215
|
}
|
|
16119
16216
|
),
|
|
16120
|
-
selectedPlayerId !== null && /* @__PURE__ */
|
|
16217
|
+
selectedPlayerId !== null && /* @__PURE__ */ jsx137(PlayerDetail, { detail: clubPlayerDetailResult?.data ?? null, loading: clubPlayerDetailResult?.loading ?? false, ui, seasonName: clubSquadStatsResult?.seasonName ?? null, onClose: closePlayer })
|
|
16121
16218
|
] }),
|
|
16122
|
-
monitor && monitor.activeTab === "games" && gamesResult && /* @__PURE__ */
|
|
16219
|
+
monitor && monitor.activeTab === "games" && gamesResult && /* @__PURE__ */ jsx137(
|
|
16123
16220
|
GamesPanel,
|
|
16124
16221
|
{
|
|
16125
16222
|
loggedIn: !!loggedIn,
|
|
@@ -16134,10 +16231,10 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
16134
16231
|
}
|
|
16135
16232
|
}
|
|
16136
16233
|
),
|
|
16137
|
-
monitor && monitor.activeTab === "favourites" && favouritesEnabled && favourites && /* @__PURE__ */
|
|
16138
|
-
(!tabs || tabs.activeTab !== "games" && tabs.activeTab !== "favourites" && tabs.activeTab !== "builder") && /* @__PURE__ */
|
|
16139
|
-
/* @__PURE__ */
|
|
16140
|
-
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(
|
|
16141
16238
|
ChatInput,
|
|
16142
16239
|
{
|
|
16143
16240
|
ref: inputRef,
|
|
@@ -16151,14 +16248,14 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
16151
16248
|
}
|
|
16152
16249
|
)
|
|
16153
16250
|
] }),
|
|
16154
|
-
settingsOpen && hasSettings ? /* @__PURE__ */
|
|
16251
|
+
settingsOpen && hasSettings ? /* @__PURE__ */ jsx137(SettingsSheet, { ui, onClose: closeSettings }) : null
|
|
16155
16252
|
] });
|
|
16156
16253
|
}
|
|
16157
16254
|
|
|
16158
16255
|
// src/components/HostEventsProvider.tsx
|
|
16159
|
-
import { jsx as
|
|
16256
|
+
import { jsx as jsx138 } from "react/jsx-runtime";
|
|
16160
16257
|
function HostEventsProvider({ value, children }) {
|
|
16161
|
-
return /* @__PURE__ */
|
|
16258
|
+
return /* @__PURE__ */ jsx138(SlipStateContext.Provider, { value: value.slipState, children });
|
|
16162
16259
|
}
|
|
16163
16260
|
|
|
16164
16261
|
// src/styles/css.generated.ts
|
|
@@ -17730,6 +17827,16 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
17730
17827
|
.ss-w-strip-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; font-weight: 650; }
|
|
17731
17828
|
.ss-w-strip-score { font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
|
|
17732
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); }
|
|
17733
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); }
|
|
17734
17841
|
.ss-w-mon-scorers-col { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
|
|
17735
17842
|
.ss-w-mon-scorers-col li { overflow-wrap: anywhere; }
|
|
@@ -18661,7 +18768,7 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
18661
18768
|
`;
|
|
18662
18769
|
|
|
18663
18770
|
// src/StatsWidget.tsx
|
|
18664
|
-
import { jsx as
|
|
18771
|
+
import { jsx as jsx139 } from "react/jsx-runtime";
|
|
18665
18772
|
function buildClient(props) {
|
|
18666
18773
|
try {
|
|
18667
18774
|
if ("client" in props && props.client) {
|
|
@@ -18983,7 +19090,7 @@ function StatsWidget(props) {
|
|
|
18983
19090
|
}), [favouritesEnabled, monitor.enabled, clubFixturesResult.settled, clubFixturesResult.tabReady, clubFixturesResult.enabled, monitor.setActiveTab, favourites, built, holds, builderMemory]);
|
|
18984
19091
|
if (!built) return null;
|
|
18985
19092
|
const attrs = themeAttrs(ui, oddsSettings.userTheme);
|
|
18986
|
-
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(
|
|
18987
19094
|
ChatPanel,
|
|
18988
19095
|
{
|
|
18989
19096
|
controller,
|
|
@@ -19006,7 +19113,7 @@ function StatsWidget(props) {
|
|
|
19006
19113
|
favourites: { controller: favourites, sport: favSport, sports: favSports, onSportChange: setFavSportPick },
|
|
19007
19114
|
builder: { options: builderOptions, sport: builderSport, onSportChange: setBuilderSportPick, onCoolOff: onBuilderCoolOff, tabs: monitor }
|
|
19008
19115
|
}
|
|
19009
|
-
) }) : /* @__PURE__ */
|
|
19116
|
+
) }) : /* @__PURE__ */ jsx139(
|
|
19010
19117
|
ChatFab,
|
|
19011
19118
|
{
|
|
19012
19119
|
label: ui.launcherLabel,
|