@sensiblestats/widget-react 0.134.0 → 0.136.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/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/StatsWidget.tsx
2
- import { useCallback as useCallback28, useEffect as useEffect54, useMemo as useMemo13, useRef as useRef46, useState as useState80 } from "react";
2
+ import { useCallback as useCallback28, useEffect as useEffect54, useMemo as useMemo13, useRef as useRef46, useState as useState81 } from "react";
3
3
  import { StatsWidgetClient } from "@sensiblestats/widget-sdk";
4
4
 
5
5
  // src/strings/tag.ts
@@ -81,6 +81,7 @@ var BUNDLED_EN_GB = {
81
81
  "widget.fullTimeLabel": "Full time",
82
82
  "widget.postponedLabel": "Postponed",
83
83
  "widget.ownGoalLabel": "OG",
84
+ "widget.penaltyLabel": "pen",
84
85
  "widget.inSlipLabel": "In slip",
85
86
  "widget.oddsUnavailable": "Odds unavailable right now",
86
87
  "widget.momentumLabel": "Momentum",
@@ -1297,7 +1298,7 @@ function parseOddsFormat(value) {
1297
1298
  }
1298
1299
 
1299
1300
  // src/version.generated.ts
1300
- var WIDGET_REACT_VERSION = "0.134.0";
1301
+ var WIDGET_REACT_VERSION = "0.136.0";
1301
1302
 
1302
1303
  // src/config.ts
1303
1304
  function hostTag(cfg) {
@@ -1545,6 +1546,7 @@ function normalizeUi(cfg, loaded) {
1545
1546
  fullTimeLabel: strings.fullTimeLabel,
1546
1547
  postponedLabel: strings.postponedLabel,
1547
1548
  ownGoalLabel: strings.ownGoalLabel,
1549
+ penaltyLabel: strings.penaltyLabel,
1548
1550
  inSlipLabel: strings.inSlipLabel,
1549
1551
  oddsUnavailable: strings.oddsUnavailable,
1550
1552
  momentumLabel: strings.momentumLabel,
@@ -2244,6 +2246,9 @@ function toNbaInsightVM(insight) {
2244
2246
  competition: str(insight.competitionName),
2245
2247
  kickoffUtc: str(insight.kickoffUtc),
2246
2248
  kickoffLabel: str(insight.kickoffLabel),
2249
+ homeTeamImage: str(insight.homeTeamImagePath),
2250
+ awayTeamImage: str(insight.awayTeamImagePath),
2251
+ competitionImage: str(insight.competitionImagePath),
2247
2252
  quotedAtUtc: insight.quotedAtUtc,
2248
2253
  addToSlipEnabled: insight.addToSlipEnabled === true,
2249
2254
  disclaimer: str(insight.disclaimer),
@@ -7760,7 +7765,7 @@ function ChatFab({ label, busy = false, greeting, popupText, logoUrl, onOpen, on
7760
7765
  }
7761
7766
 
7762
7767
  // src/components/ChatPanel.tsx
7763
- import { useCallback as useCallback27, useEffect as useEffect53, useLayoutEffect as useLayoutEffect2, useMemo as useMemo12, useRef as useRef45, useState as useState79 } from "react";
7768
+ import { useCallback as useCallback27, useEffect as useEffect53, useLayoutEffect as useLayoutEffect2, useMemo as useMemo12, useRef as useRef45, useState as useState80 } from "react";
7764
7769
 
7765
7770
  // src/components/ChatHeader.tsx
7766
7771
  import { useEffect as useEffect29, useRef as useRef25, useState as useState34 } from "react";
@@ -8327,10 +8332,17 @@ function NbaPrice({ vm, selectionKey, label, ui, slip }) {
8327
8332
  function Head({ vm, chip, ui, monitor }) {
8328
8333
  const fixture = vm.homeTeamName && vm.awayTeamName ? `${vm.homeTeamName} ${ui.venue.home} ${vm.awayTeamName}` : vm.competition;
8329
8334
  const meta = [fixture, vm.kickoffLabel].filter(Boolean).join(" \xB7 ");
8335
+ const crested = Boolean(vm.homeTeamImage && vm.awayTeamImage && vm.homeTeamName && vm.awayTeamName);
8336
+ const metaNode = crested ? /* @__PURE__ */ jsxs33("p", { className: "ss-w-nba-meta", children: [
8337
+ /* @__PURE__ */ jsx37(Crest, { kind: "team", url: vm.homeTeamImage, name: vm.homeTeamName, abbr: "" }),
8338
+ ` ${vm.homeTeamName} ${ui.venue.home} `,
8339
+ /* @__PURE__ */ jsx37(Crest, { kind: "team", url: vm.awayTeamImage, name: vm.awayTeamName, abbr: "" }),
8340
+ ` ${vm.awayTeamName}${vm.kickoffLabel ? ` \xB7 ${vm.kickoffLabel}` : ""}`
8341
+ ] }) : meta ? /* @__PURE__ */ jsx37("p", { className: "ss-w-nba-meta", children: meta }) : null;
8330
8342
  const pinnable = monitor?.enabled === true && vm.evidence.kind !== "settle_recap";
8331
8343
  return /* @__PURE__ */ jsxs33("div", { className: "ss-w-nba-head", children: [
8332
8344
  /* @__PURE__ */ jsxs33("div", { className: "ss-w-nba-head-l", children: [
8333
- meta ? /* @__PURE__ */ jsx37("p", { className: "ss-w-nba-meta", children: meta }) : null,
8345
+ metaNode,
8334
8346
  /* @__PURE__ */ jsx37("p", { className: "ss-w-nba-title", children: vm.title })
8335
8347
  ] }),
8336
8348
  chip || pinnable ? /* @__PURE__ */ jsxs33("span", { className: "ss-w-bi-meta-right", children: [
@@ -10923,12 +10935,13 @@ function isPromoted(row, promotedPins) {
10923
10935
  if (!chip) return false;
10924
10936
  return promotedPins.some((pin) => pin.marketDeveloperName === chip.marketDeveloperName || chip.matchOddsId != null && pin.matchOddsId === chip.matchOddsId);
10925
10937
  }
10926
- function groupScorers(goals, ownGoalLabel) {
10938
+ function groupScorers(goals, ownGoalLabel, penaltyLabel) {
10927
10939
  const order = [];
10928
10940
  const minutesByPlayer = /* @__PURE__ */ new Map();
10929
10941
  for (const g of goals) {
10930
10942
  const name = g.player ?? "";
10931
- const minute = g.ownGoal ? `${g.minuteLabel} (${ownGoalLabel})` : g.minuteLabel;
10943
+ const marker = g.ownGoal ? ownGoalLabel : g.penalty ? penaltyLabel : null;
10944
+ const minute = marker ? `${g.minuteLabel} (${marker})` : g.minuteLabel;
10932
10945
  if (!minutesByPlayer.has(name)) {
10933
10946
  minutesByPlayer.set(name, []);
10934
10947
  order.push(name);
@@ -10944,8 +10957,8 @@ function MonitorMatchCard({ match, promotedPins, monitor, ui, slip, onAsk }) {
10944
10957
  const { oddsFormat } = useOddsSettings();
10945
10958
  const live = match.phase === "live";
10946
10959
  const goals = match.events.filter((e) => e.type === "goal");
10947
- const homeScorers = groupScorers(goals.filter((e) => e.side === "home"), ui.ownGoalLabel);
10948
- const awayScorers = groupScorers(goals.filter((e) => e.side === "away"), ui.ownGoalLabel);
10960
+ const homeScorers = groupScorers(goals.filter((e) => e.side === "home"), ui.ownGoalLabel, ui.penaltyLabel);
10961
+ const awayScorers = groupScorers(goals.filter((e) => e.side === "away"), ui.ownGoalLabel, ui.penaltyLabel);
10949
10962
  const promotedRows = match.statRows.filter((row) => isPromoted(row, promotedPins));
10950
10963
  const otherRows = match.statRows.filter((row) => !isPromoted(row, promotedPins));
10951
10964
  const orderedRows = [...promotedRows, ...otherRows];
@@ -11064,6 +11077,9 @@ function MonitorSkeleton({ pin, monitor, ui }) {
11064
11077
  ] });
11065
11078
  }
11066
11079
 
11080
+ // src/components/NbaMonitorCard.tsx
11081
+ import { useState as useState50 } from "react";
11082
+
11067
11083
  // src/sportLabel.ts
11068
11084
  var CODE = { football: "football", basketball: "nba", nba: "nba", americanfootball: "nfl", nfl: "nfl", tennis: "tennis" };
11069
11085
  var sportLabel = (ui, sport) => {
@@ -11374,6 +11390,7 @@ function PropPlayerPanel({ player: given, bundle, descriptor, ui, slip }) {
11374
11390
  }
11375
11391
  function PropRoster({ bundle, players, side, descriptor, ui, slip }) {
11376
11392
  const [openId, setOpenId] = useState48(null);
11393
+ const [brokenShots, setBrokenShots] = useState48(/* @__PURE__ */ new Set());
11377
11394
  return /* @__PURE__ */ jsx76("div", { className: "ss-w-props-list", children: players.map((given) => {
11378
11395
  const p = livePlayer(bundle, given);
11379
11396
  const isOpen = openId === p.playerId;
@@ -11389,7 +11406,16 @@ function PropRoster({ bundle, players, side, descriptor, ui, slip }) {
11389
11406
  "aria-expanded": isOpen,
11390
11407
  onClick: () => setOpenId(isOpen ? null : p.playerId),
11391
11408
  children: [
11392
- /* @__PURE__ */ jsx76("span", { className: `ss-w-props-jn ss-w-props-jn--${side}`, children: p.jerseyNumber ?? "" }),
11409
+ p.imagePath && !brokenShots.has(p.playerId) ? /* @__PURE__ */ jsx76(
11410
+ "img",
11411
+ {
11412
+ className: `ss-w-props-shot ss-w-props-shot--${side}`,
11413
+ src: p.imagePath,
11414
+ alt: "",
11415
+ "aria-hidden": "true",
11416
+ onError: () => setBrokenShots((set) => new Set(set).add(p.playerId))
11417
+ }
11418
+ ) : /* @__PURE__ */ jsx76("span", { className: `ss-w-props-jn ss-w-props-jn--${side}`, children: p.jerseyNumber ?? "" }),
11393
11419
  /* @__PURE__ */ jsxs71("span", { className: "ss-w-props-pn", children: [
11394
11420
  /* @__PURE__ */ jsx76("span", { className: "ss-w-props-name", children: p.name }),
11395
11421
  /* @__PURE__ */ jsx76("span", { className: "ss-w-props-meta", children: meta })
@@ -11532,10 +11558,17 @@ function city(teamName, nickname) {
11532
11558
  if (!name || !name.endsWith(nickname)) return null;
11533
11559
  return name.slice(0, name.length - nickname.length).trim() || null;
11534
11560
  }
11535
- function Side({ abbreviation, nickname, teamName, away }) {
11561
+ function BadgeCrest({ url, abbreviation }) {
11562
+ const [failed, setFailed] = useState50(false);
11563
+ if (url && !failed) {
11564
+ return /* @__PURE__ */ jsx78("img", { className: "ss-w-nbamon-badge ss-w-nbamon-badge--img", src: url, alt: "", "aria-hidden": "true", onError: () => setFailed(true) });
11565
+ }
11566
+ return /* @__PURE__ */ jsx78("span", { className: "ss-w-nbamon-badge", children: abbreviation });
11567
+ }
11568
+ function Side({ abbreviation, nickname, teamName, away, crestUrl }) {
11536
11569
  const cityName = city(teamName, nickname);
11537
11570
  return /* @__PURE__ */ jsxs73("span", { className: away ? "ss-w-nbamon-side" : "ss-w-nbamon-side ss-w-nbamon-side--home", children: [
11538
- /* @__PURE__ */ jsx78("span", { className: "ss-w-nbamon-badge", children: abbreviation }),
11571
+ /* @__PURE__ */ jsx78(BadgeCrest, { url: crestUrl, abbreviation }),
11539
11572
  /* @__PURE__ */ jsxs73("span", { className: "ss-w-nbamon-team", children: [
11540
11573
  cityName && /* @__PURE__ */ jsx78("span", { className: "ss-w-nbamon-city", children: cityName }),
11541
11574
  /* @__PURE__ */ jsx78("span", { className: "ss-w-nbamon-nick", children: nickname })
@@ -11605,13 +11638,13 @@ function NbaMonitorCard({ match, monitor, ui, slip }) {
11605
11638
  /* @__PURE__ */ jsx78(PinToggle, { ui, monitor, pin: { kind: "match", matchId: match.matchId, sport: "basketball" } })
11606
11639
  ] }),
11607
11640
  /* @__PURE__ */ jsxs73("div", { className: "ss-w-nbamon-main", children: [
11608
- /* @__PURE__ */ jsx78(Side, { abbreviation: b.awayAbbreviation, nickname: b.awayNickname, teamName: match.awayTeamName, away: true }),
11641
+ /* @__PURE__ */ jsx78(Side, { abbreviation: b.awayAbbreviation, nickname: b.awayNickname, teamName: match.awayTeamName, crestUrl: match.awayCrestUrl, away: true }),
11609
11642
  scored ? /* @__PURE__ */ jsxs73("span", { className: "ss-w-mon-score", children: [
11610
11643
  match.awayScore ?? 0,
11611
11644
  /* @__PURE__ */ jsx78("i", { children: "\u2013" }),
11612
11645
  match.homeScore ?? 0
11613
11646
  ] }) : /* @__PURE__ */ jsx78("span", { className: "ss-w-mon-vs", children: ui.venue.away }),
11614
- /* @__PURE__ */ jsx78(Side, { abbreviation: b.homeAbbreviation, nickname: b.homeNickname, teamName: match.homeTeamName })
11647
+ /* @__PURE__ */ jsx78(Side, { abbreviation: b.homeAbbreviation, nickname: b.homeNickname, teamName: match.homeTeamName, crestUrl: match.homeCrestUrl })
11615
11648
  ] }),
11616
11649
  /* @__PURE__ */ jsx78(NbaFormStrip, { match, monitor, ui }),
11617
11650
  scored && /* @__PURE__ */ jsxs73(Fragment17, { children: [
@@ -11644,7 +11677,7 @@ function NbaMonitorCard({ match, monitor, ui, slip }) {
11644
11677
  }
11645
11678
 
11646
11679
  // src/components/NflFormSection.tsx
11647
- import { useState as useState50 } from "react";
11680
+ import { useState as useState51 } from "react";
11648
11681
  import { Fragment as Fragment18, jsx as jsx79, jsxs as jsxs74 } from "react/jsx-runtime";
11649
11682
  var outcomeOf = (g) => g.teamScore > g.opponentScore ? "win" : g.teamScore < g.opponentScore ? "loss" : "tie";
11650
11683
  var signedSpread2 = (v) => v > 0 ? `+${v}` : String(v);
@@ -11696,7 +11729,7 @@ function H2hRow({ game, home, ui }) {
11696
11729
  ] });
11697
11730
  }
11698
11731
  function NflFormSection({ match, monitor, ui }) {
11699
- const [segment, setSegment] = useState50("away");
11732
+ const [segment, setSegment] = useState51("away");
11700
11733
  const { live, open } = usePropsOpen(match, monitor, { sport: "americanfootball" });
11701
11734
  const bundle = monitor.playerProps?.[monitorMatchKey("americanfootball", match.matchId)]?.bundle;
11702
11735
  const form = bundle?.form;
@@ -11729,7 +11762,7 @@ function NflFormSection({ match, monitor, ui }) {
11729
11762
  }
11730
11763
 
11731
11764
  // src/components/NflPropsSection.tsx
11732
- import { useState as useState51 } from "react";
11765
+ import { useState as useState52 } from "react";
11733
11766
  import { Fragment as Fragment19, jsx as jsx80, jsxs as jsxs75 } from "react/jsx-runtime";
11734
11767
  var TRENDS_SHOWN = 3;
11735
11768
  var SCORERS_SHOWN = 8;
@@ -11802,7 +11835,7 @@ function ShowMore({ label, onClick }) {
11802
11835
  return /* @__PURE__ */ jsx80("button", { type: "button", className: "ss-w-props-more", onClick, children: label });
11803
11836
  }
11804
11837
  function Trends({ bundle, facts, descriptor, ui, slip }) {
11805
- const [all, setAll] = useState51(false);
11838
+ const [all, setAll] = useState52(false);
11806
11839
  const shown2 = all ? facts : facts.slice(0, TRENDS_SHOWN);
11807
11840
  return /* @__PURE__ */ jsxs75("section", { className: "ss-w-props ss-w-props-trends", lang: ui.locale, children: [
11808
11841
  /* @__PURE__ */ jsx80("div", { className: "ss-w-props-head", children: ui.nfl.propsTrends }),
@@ -11835,7 +11868,7 @@ function Trends({ bundle, facts, descriptor, ui, slip }) {
11835
11868
  ] });
11836
11869
  }
11837
11870
  function Scorers({ bundle, scorers, abbreviations, descriptor, ui, slip }) {
11838
- const [all, setAll] = useState51(false);
11871
+ const [all, setAll] = useState52(false);
11839
11872
  const shown2 = all ? scorers : scorers.slice(0, SCORERS_SHOWN);
11840
11873
  const cell2 = (name, column, price, stat) => price && stat ? /* @__PURE__ */ jsx80(PropPrice, { price, label: "", ariaName: `${name}, ${column}`, player: name, stat, bundle, descriptor, ui, slip }) : /* @__PURE__ */ jsx80("span", { className: "ss-w-props-scorer-none", children: "\u2014" });
11841
11874
  return /* @__PURE__ */ jsxs75("div", { className: "ss-w-props-scorers", children: [
@@ -11862,7 +11895,7 @@ function Scorers({ bundle, scorers, abbreviations, descriptor, ui, slip }) {
11862
11895
  ] });
11863
11896
  }
11864
11897
  function NflPropsSection({ match, monitor, ui, slip }) {
11865
- const [tab, setTab] = useState51(null);
11898
+ const [tab, setTab] = useState52(null);
11866
11899
  const descriptor = nflDescriptor(ui);
11867
11900
  const { bundle, live, open } = usePropsOpen(match, monitor, descriptor);
11868
11901
  if (!open || !bundle || bundle.players.length === 0 || (bundle.live ?? false) !== live) return null;
@@ -12309,7 +12342,7 @@ function TennisLiveScoreboard({ t, score, live, ui }) {
12309
12342
  }
12310
12343
 
12311
12344
  // src/components/TennisStatsTables.tsx
12312
- import { Fragment as Fragment23, useEffect as useEffect38, useState as useState52 } from "react";
12345
+ import { Fragment as Fragment23, useEffect as useEffect38, useState as useState53 } from "react";
12313
12346
  import { Fragment as Fragment24, jsx as jsx87, jsxs as jsxs82 } from "react/jsx-runtime";
12314
12347
  function formatStat(row, value, locale) {
12315
12348
  if (value == null) return "\u2013";
@@ -12347,7 +12380,7 @@ function Tables({ table, labels, names, locale }) {
12347
12380
  ] });
12348
12381
  }
12349
12382
  function TennisStatsTables({ serveReturn, today, labels, names, ui, resetKey }) {
12350
- const [tab, setTab] = useState52("match");
12383
+ const [tab, setTab] = useState53("match");
12351
12384
  useEffect38(() => {
12352
12385
  setTab("match");
12353
12386
  }, [resetKey]);
@@ -12936,7 +12969,7 @@ function TrendsPanel({ monitor, ui, slip }) {
12936
12969
  }
12937
12970
 
12938
12971
  // src/components/LivePanel.tsx
12939
- import { useMemo as useMemo10, useState as useState54 } from "react";
12972
+ import { useMemo as useMemo10, useState as useState55 } from "react";
12940
12973
  import { matchKey as matchKey8 } from "@sensiblestats/widget-sdk";
12941
12974
 
12942
12975
  // src/scheduleView.ts
@@ -13111,7 +13144,7 @@ function LeagueGroup({ view, open, onToggle, disambiguate, rowCap, onShowAll, on
13111
13144
  }
13112
13145
 
13113
13146
  // src/components/MatchSheet.tsx
13114
- import { useId as useId2, useState as useState53 } from "react";
13147
+ import { useId as useId2, useState as useState54 } from "react";
13115
13148
  import { localIdOf as localIdOf4, qualifiedId as qualifiedId2, slipSportOf as slipSportOf9, toWireSport as toWireSport6 } from "@sensiblestats/widget-sdk";
13116
13149
 
13117
13150
  // src/useModalDialog.ts
@@ -13177,7 +13210,7 @@ function MatchSheet({ match, league, state, stale, ui, monitor, onAsk, onClose,
13177
13210
  const { dialogRef, onKeyDown } = useModalDialog(onClose, { opener });
13178
13211
  const log = useEventLog();
13179
13212
  const titleId = useId2();
13180
- const [limitHit, setLimitHit] = useState53(false);
13213
+ const [limitHit, setLimitHit] = useState54(false);
13181
13214
  const pinSport = slipSportOf9(match.sport);
13182
13215
  const tour = pinSport === "tennis" && isKnownTour(match.tour) ? match.tour : void 0;
13183
13216
  const followable = pinSport !== "tennis" || tour !== void 0;
@@ -13278,9 +13311,9 @@ var OPEN_TOP_GROUPS = 2;
13278
13311
  var QUIET_ROWS = 4;
13279
13312
  function LivePanel({ discovery, ui, monitor, sport, offered, onSport, league, onLeague, onSeeAll, onAsk }) {
13280
13313
  const { groups, states, stale } = discovery;
13281
- const [mine, setMine] = useState54(false);
13282
- const [toggled, setToggled] = useState54(/* @__PURE__ */ new Map());
13283
- const [sheet, setSheet] = useState54(null);
13314
+ const [mine, setMine] = useState55(false);
13315
+ const [toggled, setToggled] = useState55(/* @__PURE__ */ new Map());
13316
+ const [sheet, setSheet] = useState55(null);
13284
13317
  const pinnedKeys = useMemo10(
13285
13318
  () => new Set(monitor.pins.filter((p) => p.kind === "match").map((p) => matchKey8(p.sport, p.matchId, p.tour))),
13286
13319
  [monitor.pins]
@@ -13387,15 +13420,15 @@ function LivePanel({ discovery, ui, monitor, sport, offered, onSport, league, on
13387
13420
  }
13388
13421
 
13389
13422
  // src/components/ScheduleMatchesPanel.tsx
13390
- import { useEffect as useEffect43, useId as useId3, useMemo as useMemo11, useRef as useRef37, useState as useState56 } from "react";
13423
+ import { useEffect as useEffect43, useId as useId3, useMemo as useMemo11, useRef as useRef37, useState as useState57 } from "react";
13391
13424
  import { matchKey as matchKey10 } from "@sensiblestats/widget-sdk";
13392
13425
 
13393
13426
  // src/useTennisRowPrices.ts
13394
- import { useEffect as useEffect41, useRef as useRef34, useState as useState55 } from "react";
13427
+ import { useEffect as useEffect41, useRef as useRef34, useState as useState56 } from "react";
13395
13428
  import { matchKey as matchKey9 } from "@sensiblestats/widget-sdk";
13396
13429
  var TENNIS_PRICE_POLL_MS = 6e4;
13397
13430
  function useTennisRowPrices(a) {
13398
- const [state, setState] = useState55({ byId: null, stale: false });
13431
+ const [state, setState] = useState56({ byId: null, stale: false });
13399
13432
  const getPricesRef = useRef34(a.getPrices);
13400
13433
  getPricesRef.current = a.getPrices;
13401
13434
  const latest = useRef34(0);
@@ -13558,11 +13591,11 @@ var SKELETON_ROWS = 3;
13558
13591
  function ScheduleMatchesPanel({ discovery, ui, monitor, sport, offered, onSport, day, onDay, loaded, onOpenLive, onAsk, locale, getTennisPrices, slip }) {
13559
13592
  const { localDate: today, states, stale } = discovery;
13560
13593
  const searchId = useId3();
13561
- const [query, setQuery] = useState56("");
13562
- const [toggled, setToggled] = useState56(/* @__PURE__ */ new Map());
13563
- const [expanded, setExpanded] = useState56(/* @__PURE__ */ new Set());
13594
+ const [query, setQuery] = useState57("");
13595
+ const [toggled, setToggled] = useState57(/* @__PURE__ */ new Map());
13596
+ const [expanded, setExpanded] = useState57(/* @__PURE__ */ new Set());
13564
13597
  const listRef = useRef37(null);
13565
- const [sheet, setSheet] = useState56(null);
13598
+ const [sheet, setSheet] = useState57(null);
13566
13599
  const { chips, selected } = loaded;
13567
13600
  useEffect43(() => {
13568
13601
  if (selected !== day) onDay(selected);
@@ -13706,7 +13739,7 @@ function ScheduleMatchesPanel({ discovery, ui, monitor, sport, offered, onSport,
13706
13739
  }
13707
13740
 
13708
13741
  // src/components/GamesPanel.tsx
13709
- import { useEffect as useEffect47, useState as useState71 } from "react";
13742
+ import { useEffect as useEffect47, useState as useState72 } from "react";
13710
13743
 
13711
13744
  // src/components/GamesLoginWall.tsx
13712
13745
  import { jsx as jsx102 } from "react/jsx-runtime";
@@ -13715,7 +13748,7 @@ function GamesLoginWall({ ui }) {
13715
13748
  }
13716
13749
 
13717
13750
  // src/components/GamesHub.tsx
13718
- import { useEffect as useEffect44, useState as useState57 } from "react";
13751
+ import { useEffect as useEffect44, useState as useState58 } from "react";
13719
13752
 
13720
13753
  // src/components/games/ui/gameMeta.ts
13721
13754
  function prettifyGameId(gameId) {
@@ -13866,7 +13899,7 @@ function pickHeroGame(games) {
13866
13899
  }
13867
13900
  var tileKey = (g) => `${g.gameId}-${g.gameDay}-${g.fixtureId}`;
13868
13901
  function GamesHub({ games, myWeeklyRow, weeklyPrize, onOpen, ui }) {
13869
- const [, setTick] = useState57(0);
13902
+ const [, setTick] = useState58(0);
13870
13903
  useEffect44(() => {
13871
13904
  const id = setInterval(() => setTick((t) => t + 1), 6e4);
13872
13905
  return () => clearInterval(id);
@@ -13927,10 +13960,10 @@ function GamesHub({ games, myWeeklyRow, weeklyPrize, onOpen, ui }) {
13927
13960
  }
13928
13961
 
13929
13962
  // src/components/GameScreenHost.tsx
13930
- import { useEffect as useEffect46, useRef as useRef40, useState as useState69 } from "react";
13963
+ import { useEffect as useEffect46, useRef as useRef40, useState as useState70 } from "react";
13931
13964
 
13932
13965
  // src/useGamePlay.ts
13933
- import { useCallback as useCallback26, useRef as useRef38, useState as useState58 } from "react";
13966
+ import { useCallback as useCallback26, useRef as useRef38, useState as useState59 } from "react";
13934
13967
  function toSubmitResult(payload) {
13935
13968
  return {
13936
13969
  // 'pending' means the play is recorded but awaiting resolution (fixture games)
@@ -13942,9 +13975,9 @@ function toSubmitResult(payload) {
13942
13975
  };
13943
13976
  }
13944
13977
  function useGamePlay(conversation, { gameId, gameDay, fixtureId, locale, refresh }) {
13945
- const [result, setResult] = useState58(null);
13946
- const [submitting, setSubmitting] = useState58(false);
13947
- const [rawStatus, setRawStatus] = useState58(null);
13978
+ const [result, setResult] = useState59(null);
13979
+ const [submitting, setSubmitting] = useState59(false);
13980
+ const [rawStatus, setRawStatus] = useState59(null);
13948
13981
  const inFlightRef = useRef38(false);
13949
13982
  const convRef = useRef38(conversation);
13950
13983
  convRef.current = conversation;
@@ -14002,7 +14035,7 @@ function useGamePlay(conversation, { gameId, gameDay, fixtureId, locale, refresh
14002
14035
  }
14003
14036
 
14004
14037
  // src/components/games/MysteryTigerGame.tsx
14005
- import { useState as useState60, useId as useId4 } from "react";
14038
+ import { useState as useState61, useId as useId4 } from "react";
14006
14039
 
14007
14040
  // src/components/games/nationFlags.ts
14008
14041
  var FLAGS = {
@@ -14213,7 +14246,7 @@ function isNationCode(flag) {
14213
14246
  }
14214
14247
 
14215
14248
  // src/components/games/PlayerAvatar.tsx
14216
- import { useState as useState59 } from "react";
14249
+ import { useState as useState60 } from "react";
14217
14250
  import { jsx as jsx107 } from "react/jsx-runtime";
14218
14251
  function initialsOf(name) {
14219
14252
  const parts2 = name.trim().split(/\s+/).filter(Boolean);
@@ -14231,7 +14264,7 @@ function PlayerAvatar({
14231
14264
  imagePath,
14232
14265
  className
14233
14266
  }) {
14234
- const [failed, setFailed] = useState59(false);
14267
+ const [failed, setFailed] = useState60(false);
14235
14268
  const showImage = Boolean(imagePath) && !isPlaceholderImage(imagePath) && !failed;
14236
14269
  return /* @__PURE__ */ jsx107("div", { className, "aria-hidden": "true", children: showImage ? /* @__PURE__ */ jsx107("img", { src: imagePath, alt: "", loading: "lazy", onError: () => setFailed(true) }) : /* @__PURE__ */ jsx107("span", { className: "ss-w-av-initials", children: initialsOf(name) }) });
14237
14270
  }
@@ -14475,7 +14508,7 @@ function MysteryTigerGame({
14475
14508
  onBack
14476
14509
  }) {
14477
14510
  const t = ui.games.mysteryTiger;
14478
- const [query, setQuery] = useState60("");
14511
+ const [query, setQuery] = useState61("");
14479
14512
  const inputId = useId4();
14480
14513
  const clientState = parseClientState(result?.clientStateJson);
14481
14514
  const guessResults = clientState?.guessResults ?? [];
@@ -14737,13 +14770,13 @@ function HigherOrLowerGame({
14737
14770
  }
14738
14771
 
14739
14772
  // src/components/games/CareerPathGame.tsx
14740
- import { useState as useState62, useId as useId5 } from "react";
14773
+ import { useState as useState63, useId as useId5 } from "react";
14741
14774
 
14742
14775
  // src/components/games/ui/CrestShield.tsx
14743
- import { useState as useState61 } from "react";
14776
+ import { useState as useState62 } from "react";
14744
14777
  import { jsx as jsx118 } from "react/jsx-runtime";
14745
14778
  function CrestShield({ src, name, size = 28 }) {
14746
- const [failed, setFailed] = useState61(false);
14779
+ const [failed, setFailed] = useState62(false);
14747
14780
  if (src && !isPlaceholderImage(src) && !failed) {
14748
14781
  return /* @__PURE__ */ jsx118("img", { className: "ss-g-crest", src, alt: name, width: size, height: size, loading: "lazy", onError: () => setFailed(true) });
14749
14782
  }
@@ -14775,7 +14808,7 @@ function CareerPathGame({
14775
14808
  }) {
14776
14809
  const s = ui.games.careerPath;
14777
14810
  const title = gameTitle({ gameId: "career-path" }, ui.games.titles);
14778
- const [query, setQuery] = useState62("");
14811
+ const [query, setQuery] = useState63("");
14779
14812
  const inputId = useId5();
14780
14813
  const clientState = parseClientState3(result?.clientStateJson);
14781
14814
  const alreadyGuessedIds = new Set(clientState?.guessResults.map((g) => g.playerId) ?? []);
@@ -14882,7 +14915,7 @@ function CareerPathGame({
14882
14915
  }
14883
14916
 
14884
14917
  // src/components/games/BeatTheGridGame.tsx
14885
- import React, { useEffect as useEffect45, useId as useId6, useRef as useRef39, useState as useState63 } from "react";
14918
+ import React, { useEffect as useEffect45, useId as useId6, useRef as useRef39, useState as useState64 } from "react";
14886
14919
 
14887
14920
  // src/components/games/ui/OptionList.tsx
14888
14921
  import { jsx as jsx120 } from "react/jsx-runtime";
@@ -14971,7 +15004,7 @@ function SearchSheet({
14971
15004
  ui
14972
15005
  }) {
14973
15006
  const s = ui.games.beatTheGrid;
14974
- const [query, setQuery] = useState63("");
15007
+ const [query, setQuery] = useState64("");
14975
15008
  const inputId = useId6();
14976
15009
  const inputRef = useRef39(null);
14977
15010
  useEffect45(() => {
@@ -15039,7 +15072,7 @@ function BeatTheGridGame({
15039
15072
  }) {
15040
15073
  const s = ui.games.beatTheGrid;
15041
15074
  const title = gameTitle({ gameId: "beat-the-grid" }, ui.games.titles);
15042
- const [activeCell, setActiveCell] = useState63(null);
15075
+ const [activeCell, setActiveCell] = useState64(null);
15043
15076
  const clientState = parseClientState4(result?.clientStateJson);
15044
15077
  const filledCells = clientState?.cells ?? [];
15045
15078
  const isLocked2 = result?.alreadyPlayed === true || clientState?.isComplete === true;
@@ -15194,7 +15227,7 @@ function BeatTheGridGame({
15194
15227
  }
15195
15228
 
15196
15229
  // src/components/games/GuessTheXiGame.tsx
15197
- import { useState as useState64, useId as useId7 } from "react";
15230
+ import { useState as useState65, useId as useId7 } from "react";
15198
15231
 
15199
15232
  // src/components/games/ui/PitchSvg.tsx
15200
15233
  import { Fragment as Fragment37, jsx as jsx122, jsxs as jsxs109 } from "react/jsx-runtime";
@@ -15283,7 +15316,7 @@ function GuessTheXiGame({
15283
15316
  onBack
15284
15317
  }) {
15285
15318
  const t = ui.games.guessTheXi;
15286
- const [query, setQuery] = useState64("");
15319
+ const [query, setQuery] = useState65("");
15287
15320
  const inputId = useId7();
15288
15321
  const clientState = parseClientState5(result?.clientStateJson);
15289
15322
  const isOver = result?.alreadyPlayed === true || clientState?.status === "solved" || clientState?.status === "failed";
@@ -15426,7 +15459,7 @@ function GuessTheXiGame({
15426
15459
  }
15427
15460
 
15428
15461
  // src/components/games/DailyQuizGame.tsx
15429
- import { useState as useState65 } from "react";
15462
+ import { useState as useState66 } from "react";
15430
15463
  import { Fragment as Fragment39, jsx as jsx124, jsxs as jsxs111 } from "react/jsx-runtime";
15431
15464
  function parseClientState6(json) {
15432
15465
  if (!json) return null;
@@ -15467,8 +15500,8 @@ function DailyQuizGame({
15467
15500
  }) {
15468
15501
  const s = ui.games.dailyQuiz;
15469
15502
  const title = gameTitle({ gameId: "daily-quiz" }, ui.games.titles);
15470
- const [selections, setSelections] = useState65(/* @__PURE__ */ new Map());
15471
- const [page, setPage] = useState65(0);
15503
+ const [selections, setSelections] = useState66(/* @__PURE__ */ new Map());
15504
+ const [page, setPage] = useState66(0);
15472
15505
  const clientState = parseClientState6(result?.clientStateJson);
15473
15506
  const results2 = clientState?.results ?? [];
15474
15507
  const isRevealed = results2.length > 0 || result?.alreadyPlayed === true;
@@ -15578,7 +15611,7 @@ function DailyQuizGame({
15578
15611
  }
15579
15612
 
15580
15613
  // src/components/games/MatchdayPredictorGame.tsx
15581
- import { useId as useId8, useState as useState66 } from "react";
15614
+ import { useId as useId8, useState as useState67 } from "react";
15582
15615
  import { jsx as jsx125, jsxs as jsxs112 } from "react/jsx-runtime";
15583
15616
  var SCORER_SEARCH_THRESHOLD = 9;
15584
15617
  function parseClientState7(json) {
@@ -15674,11 +15707,11 @@ function MatchdayPredictorGame({
15674
15707
  onBack
15675
15708
  }) {
15676
15709
  const t = ui.games.predictor;
15677
- const [homeScore, setHomeScore] = useState66(0);
15678
- const [awayScore, setAwayScore] = useState66(0);
15679
- const [firstScorerPlayerId, setFirstScorerPlayerId] = useState66(null);
15680
- const [lastEdited, setLastEdited] = useState66("home");
15681
- const [query, setQuery] = useState66("");
15710
+ const [homeScore, setHomeScore] = useState67(0);
15711
+ const [awayScore, setAwayScore] = useState67(0);
15712
+ const [firstScorerPlayerId, setFirstScorerPlayerId] = useState67(null);
15713
+ const [lastEdited, setLastEdited] = useState67("home");
15714
+ const [query, setQuery] = useState67("");
15682
15715
  const searchId = useId8();
15683
15716
  const clientState = parseClientState7(result?.clientStateJson);
15684
15717
  const alreadyPlayed = result?.alreadyPlayed === true;
@@ -15846,7 +15879,7 @@ function MatchdayPredictorGame({
15846
15879
  }
15847
15880
 
15848
15881
  // src/components/games/StartingXiGame.tsx
15849
- import { useId as useId9, useState as useState67 } from "react";
15882
+ import { useId as useId9, useState as useState68 } from "react";
15850
15883
  import { Fragment as Fragment40, jsx as jsx126, jsxs as jsxs113 } from "react/jsx-runtime";
15851
15884
  var POINTS_PER_STARTER = 8;
15852
15885
  var XI_SIZE = 11;
@@ -15890,9 +15923,9 @@ function StartingXiGame({
15890
15923
  lockAtUtc
15891
15924
  }) {
15892
15925
  const t = ui.games.startingXi;
15893
- const [slotPlayers, setSlotPlayers] = useState67(() => Array(XI_SIZE).fill(null));
15894
- const [active, setActive] = useState67(0);
15895
- const [query, setQuery] = useState67("");
15926
+ const [slotPlayers, setSlotPlayers] = useState68(() => Array(XI_SIZE).fill(null));
15927
+ const [active, setActive] = useState68(0);
15928
+ const [query, setQuery] = useState68("");
15896
15929
  const searchId = useId9();
15897
15930
  const clientState = parseClientState8(result?.clientStateJson);
15898
15931
  const alreadyPlayed = result?.alreadyPlayed === true;
@@ -16032,7 +16065,7 @@ function StartingXiGame({
16032
16065
  }
16033
16066
 
16034
16067
  // src/components/games/StatLadderGame.tsx
16035
- import { useId as useId10, useState as useState68 } from "react";
16068
+ import { useId as useId10, useState as useState69 } from "react";
16036
16069
  import { jsx as jsx127, jsxs as jsxs114 } from "react/jsx-runtime";
16037
16070
  function ladderClue(ladder) {
16038
16071
  const mystery = ladder.find((r) => r.rank === 2);
@@ -16069,8 +16102,8 @@ function StatLadderGame({
16069
16102
  onBack
16070
16103
  }) {
16071
16104
  const t = ui.games.statLadder;
16072
- const [query, setQuery] = useState68("");
16073
- const [selectedId, setSelectedId] = useState68(null);
16105
+ const [query, setQuery] = useState69("");
16106
+ const [selectedId, setSelectedId] = useState69(null);
16074
16107
  const searchId = useId10();
16075
16108
  const clientState = parseClientState9(result?.clientStateJson);
16076
16109
  const revealed = clientState != null;
@@ -16277,7 +16310,7 @@ function GameScreenHost({
16277
16310
  ui
16278
16311
  }) {
16279
16312
  const { gameId, fixtureId, gameDay = "", lockAtUtc = null } = selected;
16280
- const [configJson, setConfigJson] = useState69(null);
16313
+ const [configJson, setConfigJson] = useState70(null);
16281
16314
  useEffect46(() => {
16282
16315
  setConfigJson(null);
16283
16316
  if (!conversation) return;
@@ -16419,7 +16452,7 @@ function GameScreenHost({
16419
16452
  }
16420
16453
 
16421
16454
  // src/components/Leaderboard.tsx
16422
- import { useState as useState70 } from "react";
16455
+ import { useState as useState71 } from "react";
16423
16456
 
16424
16457
  // src/components/LeaderboardRow.tsx
16425
16458
  import { jsx as jsx130, jsxs as jsxs116 } from "react/jsx-runtime";
@@ -16506,7 +16539,7 @@ function Leaderboard({
16506
16539
  ui,
16507
16540
  onPlay
16508
16541
  }) {
16509
- const [segment, setSegment] = useState70("weekly");
16542
+ const [segment, setSegment] = useState71("weekly");
16510
16543
  const myRow = segment === "weekly" ? data.myWeeklyRow : data.myAllTimeRow;
16511
16544
  const offBoard = myRow !== null && myRow !== void 0 && myRow.rank === -1;
16512
16545
  const isEmpty = segment === "weekly" ? data.weeklyTop.length === 0 : data.allTimeTop.length === 0;
@@ -16611,8 +16644,8 @@ function GamesPanel({
16611
16644
  leaderboardLoading,
16612
16645
  refreshHub
16613
16646
  }) {
16614
- const [selected, setSelected] = useState71(null);
16615
- const [segment, setSegment] = useState71("play");
16647
+ const [selected, setSelected] = useState72(null);
16648
+ const [segment, setSegment] = useState72("play");
16616
16649
  useEffect47(() => {
16617
16650
  ensureGamesFonts();
16618
16651
  }, []);
@@ -16677,10 +16710,10 @@ function GamesPanel({
16677
16710
  }
16678
16711
 
16679
16712
  // src/components/FavouritesPanel.tsx
16680
- import { useEffect as useEffect50, useRef as useRef42, useState as useState74 } from "react";
16713
+ import { useEffect as useEffect50, useRef as useRef42, useState as useState75 } from "react";
16681
16714
 
16682
16715
  // src/components/FavouriteChips.tsx
16683
- import { useEffect as useEffect48, useState as useState72 } from "react";
16716
+ import { useEffect as useEffect48, useState as useState73 } from "react";
16684
16717
  import { Fragment as Fragment42, jsx as jsx135, jsxs as jsxs120 } from "react/jsx-runtime";
16685
16718
  async function toggleWithNotice(controller, kind, id, onNotice) {
16686
16719
  const outcome = await controller.toggle(kind, id);
@@ -16727,7 +16760,7 @@ function Group({ title, entities, sport, ui, controller, onNotice }) {
16727
16760
  ] });
16728
16761
  }
16729
16762
  function FavouriteChips({ controller, ui, sport, sportLabel: sportLabel2, onNotice }) {
16730
- const [confirming, setConfirming] = useState72(false);
16763
+ const [confirming, setConfirming] = useState73(false);
16731
16764
  const data = controller.data;
16732
16765
  useEffect48(() => {
16733
16766
  setConfirming(false);
@@ -16786,14 +16819,14 @@ function FavouriteChips({ controller, ui, sport, sportLabel: sportLabel2, onNoti
16786
16819
  }
16787
16820
 
16788
16821
  // src/components/FavouritesSearch.tsx
16789
- import { useEffect as useEffect49, useRef as useRef41, useState as useState73 } from "react";
16822
+ import { useEffect as useEffect49, useRef as useRef41, useState as useState74 } from "react";
16790
16823
  import { jsx as jsx136, jsxs as jsxs121 } from "react/jsx-runtime";
16791
16824
  var MIN_LETTERS = 2;
16792
16825
  var MAX_LENGTH = 64;
16793
16826
  var DEBOUNCE_MS = 250;
16794
16827
  function FavouritesSearch({ controller, ui, sport, onNotice }) {
16795
- const [query, setQuery] = useState73("");
16796
- const [answer, setAnswer] = useState73(null);
16828
+ const [query, setQuery] = useState74("");
16829
+ const [answer, setAnswer] = useState74(null);
16797
16830
  const controllerRef = useRef41(controller);
16798
16831
  controllerRef.current = controller;
16799
16832
  const trimmed = query.trim();
@@ -16863,7 +16896,7 @@ function FavouritesSearch({ controller, ui, sport, onNotice }) {
16863
16896
  // src/components/FavouritesPanel.tsx
16864
16897
  import { jsx as jsx137, jsxs as jsxs122 } from "react/jsx-runtime";
16865
16898
  function FavouritesPanel({ controller, ui, sport, sports, onSportChange }) {
16866
- const [notice, setNotice] = useState74(null);
16899
+ const [notice, setNotice] = useState75(null);
16867
16900
  const refreshRef = useRef42(controller.refresh);
16868
16901
  refreshRef.current = controller.refresh;
16869
16902
  useEffect50(() => {
@@ -16895,7 +16928,7 @@ function FavouritesPanel({ controller, ui, sport, sports, onSportChange }) {
16895
16928
  }
16896
16929
 
16897
16930
  // src/components/dashboard/v8/SentenceBuilder.tsx
16898
- import { useEffect as useEffect51, useRef as useRef43, useState as useState75 } from "react";
16931
+ import { useEffect as useEffect51, useRef as useRef43, useState as useState76 } from "react";
16899
16932
  import { Fragment as Fragment43, jsx as jsx138, jsxs as jsxs123 } from "react/jsx-runtime";
16900
16933
  var TOTALS = ["any", "3", "5", "10", "20", "50"];
16901
16934
  var BASE_LEGS = [1, 2, 3, 4];
@@ -16921,8 +16954,8 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
16921
16954
  const opening = openingGames(preset);
16922
16955
  const gamesOptions = opening.options;
16923
16956
  const marketOptions = usableMarkets(preset);
16924
- const [fingerprint] = useState75(() => JSON.stringify(preset));
16925
- const [saved] = useState75(() => {
16957
+ const [fingerprint] = useState76(() => JSON.stringify(preset));
16958
+ const [saved] = useState76(() => {
16926
16959
  const kept = memory3?.savedView(sport);
16927
16960
  return kept && kept.fingerprint === fingerprint ? kept : null;
16928
16961
  });
@@ -16936,9 +16969,9 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
16936
16969
  // The server never widens by itself: an all-games preset with no ids asks for it.
16937
16970
  widen: opening.option ? opening.option.matchIds.length === 0 : preset.gamesScope === "all" && preset.matchIds.length === 0
16938
16971
  };
16939
- const [view, setView] = useState75(() => saved?.view ?? openingView);
16972
+ const [view, setView] = useState76(() => saved?.view ?? openingView);
16940
16973
  const autoWidened = useRef43(false);
16941
- const [widenedNote, setWidenedNote] = useState75(saved?.widenedNote ?? false);
16974
+ const [widenedNote, setWidenedNote] = useState76(saved?.widenedNote ?? false);
16942
16975
  const requestFor = (v) => ({
16943
16976
  sport,
16944
16977
  ...v.marketKey !== null ? { marketKey: v.marketKey } : {},
@@ -16950,7 +16983,7 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
16950
16983
  ...operatorUserId ? { operatorUserId } : {},
16951
16984
  ...anonymousUserId ? { anonymousUserId } : {}
16952
16985
  });
16953
- const [first] = useState75(() => requestFor(view));
16986
+ const [first] = useState76(() => requestFor(view));
16954
16987
  const { grid, status: status2, confirmed, request } = useBuilderGrid({ conversation, locale: ui.hostTag, memory: memory3, initial: first });
16955
16988
  const lastRequest = useRef43(first);
16956
16989
  useEffect51(() => {
@@ -16986,13 +17019,13 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
16986
17019
  const rows = ready && grid.status === "ok" ? legsOf(grid, sport) : null;
16987
17020
  const rowSlip = rows ? guardLegsPreMatch(slip, rows, ui) : slip;
16988
17021
  useNextKickoffRender(rows ? rows.map((l) => l.kickoffUtc) : []);
16989
- const [startedNote, setStartedNote] = useState75(false);
17022
+ const [startedNote, setStartedNote] = useState76(false);
16990
17023
  const anyStarted = rows !== null && rows.some((l) => !preMatchOpen(l.kickoffUtc, Date.now()));
16991
17024
  useEffect51(() => {
16992
17025
  if (startedNote && status2 === "ready" && !anyStarted) setStartedNote(false);
16993
17026
  }, [startedNote, status2, anyStarted]);
16994
17027
  const market = rows?.[0]?.market;
16995
- const [seen2, setSeen] = useState75(null);
17028
+ const [seen2, setSeen] = useState76(null);
16996
17029
  useEffect51(() => {
16997
17030
  if (market) setSeen(market);
16998
17031
  }, [market]);
@@ -17416,10 +17449,10 @@ function Squad({ squad, loading, ui, view, onToggleView, stats, statsLoading, se
17416
17449
  }
17417
17450
 
17418
17451
  // src/components/PlayerPhoto.tsx
17419
- import { useState as useState76 } from "react";
17452
+ import { useState as useState77 } from "react";
17420
17453
  import { jsx as jsx144 } from "react/jsx-runtime";
17421
17454
  function PlayerPhoto({ photoUrl, jerseyNumber, size }) {
17422
- const [failed, setFailed] = useState76(false);
17455
+ const [failed, setFailed] = useState77(false);
17423
17456
  const box = { width: size, height: size };
17424
17457
  if (photoUrl && !failed) {
17425
17458
  return /* @__PURE__ */ jsx144("img", { className: "ss-w-pd-photo", style: box, src: photoUrl, alt: "", "aria-hidden": "true", onError: () => setFailed(true) });
@@ -17454,7 +17487,7 @@ function MiniPitch({ positionCode }) {
17454
17487
  }
17455
17488
 
17456
17489
  // src/components/PerformanceBars.tsx
17457
- import { useState as useState77 } from "react";
17490
+ import { useState as useState78 } from "react";
17458
17491
  import { jsx as jsx146, jsxs as jsxs129 } from "react/jsx-runtime";
17459
17492
  var GROUPS = ["shooting", "passing", "possession", "defending"];
17460
17493
  function finite4(v) {
@@ -17500,7 +17533,7 @@ function unrankedLine(ui, reason) {
17500
17533
  }
17501
17534
  }
17502
17535
  function PerformanceBars({ performance, competitionName, strings }) {
17503
- const [mode, setMode] = useState77("total");
17536
+ const [mode, setMode] = useState78("total");
17504
17537
  const labelled = performance.metrics.filter((m) => Object.prototype.hasOwnProperty.call(strings.perfMetric, m.key));
17505
17538
  if (!labelled.some((m) => valueOf(m, "total") !== null || valueOf(m, "per90") !== null)) return null;
17506
17539
  const subtitle = !performance.ranked ? unrankedLine(strings, performance.unrankedReason) : competitionName ? strings.perfRankedAgainst(competitionName, performance.positionGroup) : null;
@@ -17672,7 +17705,7 @@ function PlayerDetail({ detail, loading, ui, seasonName, onClose }) {
17672
17705
  }
17673
17706
 
17674
17707
  // src/components/PresetTools.tsx
17675
- import { useId as useId11, useState as useState78 } from "react";
17708
+ import { useId as useId11, useState as useState79 } from "react";
17676
17709
  import { Fragment as Fragment46, jsx as jsx148, jsxs as jsxs131 } from "react/jsx-runtime";
17677
17710
  function PresetToolModal({ title, closeLabel, onClose, children, footer, className }) {
17678
17711
  const { dialogRef, onKeyDown } = useModalDialog(onClose, { restoreFocus: false });
@@ -17726,9 +17759,9 @@ function BuildComboTool({ grid, strings, streaming, formatKickoff, initialTotal,
17726
17759
  const totalOptions = comboTotals(grid);
17727
17760
  const totals = totalOptions.map((o) => o.value);
17728
17761
  const legChoices = comboLegChoices(grid);
17729
- const [total, setTotal] = useState78(() => nearest(totals, initialTotal));
17730
- const [legs, setLegs] = useState78(() => legsForTotal(grid, nearest(totals, initialTotal), clampLegs(legChoices, initialLegs)));
17731
- const [announcement, setAnnouncement] = useState78("");
17762
+ const [total, setTotal] = useState79(() => nearest(totals, initialTotal));
17763
+ const [legs, setLegs] = useState79(() => legsForTotal(grid, nearest(totals, initialTotal), clampLegs(legChoices, initialLegs)));
17764
+ const [announcement, setAnnouncement] = useState79("");
17732
17765
  const cell2 = findCombo(grid, total, legs);
17733
17766
  const minLegs = legChoices[0] ?? legs;
17734
17767
  const maxLegs = legChoices[legChoices.length - 1] ?? legs;
@@ -17798,7 +17831,7 @@ function SettingsSheet({ ui, onClose }) {
17798
17831
  import { Fragment as Fragment47, jsx as jsx150, jsxs as jsxs133 } from "react/jsx-runtime";
17799
17832
  var FULLSCREEN_QUERY = "(max-width: 639px)";
17800
17833
  function useIsModal() {
17801
- const [modal, setModal] = useState79(false);
17834
+ const [modal, setModal] = useState80(false);
17802
17835
  useEffect53(() => {
17803
17836
  if (typeof window === "undefined" || typeof window.matchMedia !== "function") return;
17804
17837
  const mql = window.matchMedia(FULLSCREEN_QUERY);
@@ -17813,8 +17846,8 @@ var HIDDEN_LAYER_STYLE = { position: "absolute", inset: 0, visibility: "hidden",
17813
17846
  var SQUAD_LAYER_STYLE = { display: "flex", flexDirection: "column", flex: 1, minHeight: 0 };
17814
17847
  function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, schedule, gamesResult, leaderboardResult, clubFixturesResult, clubStandingsResult, clubSquadResult, clubSquadStatsResult, clubPlayerDetailResult, loggedIn, conversation, presetGrid, favouritesEnabled, favourites, builder, onCloseRequested, onRegisterBack }) {
17815
17848
  const { state, close, stop, send, reset } = controller;
17816
- const [squadView, setSquadView] = useState79("roster");
17817
- const [selectedPlayerId, setSelectedPlayerId] = useState79(null);
17849
+ const [squadView, setSquadView] = useState80("roster");
17850
+ const [selectedPlayerId, setSelectedPlayerId] = useState80(null);
17818
17851
  const clearPlayerDetail = clubPlayerDetailResult?.clear;
17819
17852
  const fetchPlayerDetail = clubPlayerDetailResult?.fetch;
17820
17853
  const squadLayerRef = useRef45(null);
@@ -17888,10 +17921,10 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, s
17888
17921
  const limitRef = useRef45(null);
17889
17922
  const typedSendRef = useRef45(false);
17890
17923
  const focusAfterCloseRef = useRef45(null);
17891
- const [tool, setTool] = useState79(null);
17924
+ const [tool, setTool] = useState80(null);
17892
17925
  const panelRef = useRef45(null);
17893
17926
  const settings = useOddsSettings();
17894
- const [settingsOpen, setSettingsOpen] = useState79(false);
17927
+ const [settingsOpen, setSettingsOpen] = useState80(false);
17895
17928
  const hasSettings = settings.oddsOffered || !settings.themeLocked;
17896
17929
  const openSettings = useCallback27(() => {
17897
17930
  setTool(null);
@@ -18505,6 +18538,8 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
18505
18538
  .ss-w-nba-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
18506
18539
  .ss-w-nba-head-l { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
18507
18540
  .ss-w-nba-meta { margin: 0; font-size: 11px; color: var(--ss-w-faint); line-height: 1.3; }
18541
+ .ss-w-nba-meta .ss-w-bi-crest { display: inline-block; width: 14px; height: 14px; vertical-align: -3px; margin: 0 2px; }
18542
+ .ss-w-nba-meta .ss-w-bi-crest-mono { display: inline-grid; font-size: 7px; }
18508
18543
  .ss-w-nba-title { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--ss-w-ink); overflow-wrap: anywhere; }
18509
18544
  .ss-w-nba-chip{font-size:11px;font-weight:600;white-space:nowrap;border-radius:999px;padding:3px 8px;border:1px solid var(--ss-w-line)}
18510
18545
  .ss-w-nba-chip { flex: none; color: var(--ss-w-warn); border-color: var(--ss-w-warn); }
@@ -19875,6 +19910,7 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
19875
19910
  .ss-w-nbamon-side { display: flex; align-items: center; gap: 8px; min-width: 0; }
19876
19911
  .ss-w-nbamon-side--home { flex-direction: row-reverse; text-align: right; }
19877
19912
  .ss-w-nbamon-badge { flex: none; display: grid; place-items: center; min-width: 34px; height: 26px; padding: 0 5px; border-radius: 7px; background: var(--ss-w-bubble); border: 1px solid var(--ss-w-line); font-size: 11px; font-weight: 800; letter-spacing: .03em; color: var(--ss-w-ink); }
19913
+ .ss-w-nbamon-badge--img { width: 26px; min-width: 0; padding: 2px; box-sizing: border-box; object-fit: contain; }
19878
19914
  .ss-w-nbamon-team { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
19879
19915
  .ss-w-nbamon-city { font-size: 10.5px; font-weight: 600; color: var(--ss-w-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
19880
19916
  .ss-w-nbamon-nick { font-size: 13px; font-weight: 800; color: var(--ss-w-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@@ -20201,6 +20237,7 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
20201
20237
  .ss-w-props-jn { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
20202
20238
  .ss-w-props-jn--home { background: var(--ss-w-home); }
20203
20239
  .ss-w-props-jn--away { background: var(--ss-w-away); }
20240
+ .ss-w-props-shot { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; object-position: top center; background: var(--ss-w-bubble); }
20204
20241
  .ss-w-props-pn { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
20205
20242
  .ss-w-props-name { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
20206
20243
  .ss-w-props-meta { font-size: 11px; color: var(--ss-w-faint); }
@@ -21023,7 +21060,7 @@ function StatsWidget(props) {
21023
21060
  return [...seen2];
21024
21061
  }, [discovery.matchDays, discovery.groups]);
21025
21062
  const scheduleSport = useScheduleSport(offeredSports);
21026
- const [liveLeague, setLiveLeague] = useState80(null);
21063
+ const [liveLeague, setLiveLeague] = useState81(null);
21027
21064
  const [matchesDay, setMatchesDay] = useMatchesDayPick(discovery.localDate);
21028
21065
  const matchesLoaded = useMatchesDay({
21029
21066
  discovery,
@@ -21074,7 +21111,7 @@ function StatsWidget(props) {
21074
21111
  const clubSquadResult = useClubSquad(built?.conversation ?? null, { activeTab: monitor.activeTab, enabled: clubFixturesResult.enabled });
21075
21112
  const clubSquadStatsResult = useClubSquadStats(built?.conversation ?? null, { activeTab: monitor.activeTab, enabled: clubFixturesResult.enabled });
21076
21113
  const clubPlayerDetailResult = useClubPlayerDetail(built?.conversation ?? null);
21077
- const [favSportPick, setFavSportPick] = useState80(null);
21114
+ const [favSportPick, setFavSportPick] = useState81(null);
21078
21115
  const latestGreeting = useMemo13(() => {
21079
21116
  for (const m of [...controller.state.messages].reverse()) {
21080
21117
  if (m.role === "assistant" && m.defaultSport !== void 0) return m;
@@ -21090,12 +21127,12 @@ function StatsWidget(props) {
21090
21127
  const favSport = [favSportPick, rememberedSport, latestGreeting?.defaultSport].find(offered) ?? "football";
21091
21128
  const favSports = favSportOptions.length > 0 ? favSportOptions : [{ sport: favSport, label: sportLabel(ui, favSport) }];
21092
21129
  const hasFavouritesIdentity = !!(operatorUserId || anonymousUserId);
21093
- const [builderSportPick, setBuilderSportPick] = useState80(null);
21130
+ const [builderSportPick, setBuilderSportPick] = useState81(null);
21094
21131
  const builderGreeting = useMemo13(
21095
21132
  () => [...controller.state.messages].reverse().find((m) => m.role === "assistant" && (m.greetingDashboard !== void 0 || m.greetingDashboards !== void 0)) ?? null,
21096
21133
  [controller.state.messages]
21097
21134
  );
21098
- const [coolOff, setCoolOff] = useState80(null);
21135
+ const [coolOff, setCoolOff] = useState81(null);
21099
21136
  const onBuilderCoolOff = useCallback28((sport) => {
21100
21137
  if (!builderGreeting) return;
21101
21138
  setCoolOff((prev) => {
@@ -21116,7 +21153,7 @@ function StatsWidget(props) {
21116
21153
  return options.filter((o) => !cooled.includes(o.sport));
21117
21154
  }, [builderGreeting, coolOff, ui]);
21118
21155
  const builderSport = [builderSportPick, rememberedSport, latestGreeting?.defaultSport].find((s) => !!s && builderOptions.some((o) => o.sport === s)) ?? builderOptions[0]?.sport ?? "";
21119
- const [panelEverOpened, setPanelEverOpened] = useState80(panelOpen);
21156
+ const [panelEverOpened, setPanelEverOpened] = useState81(panelOpen);
21120
21157
  if (panelOpen && !panelEverOpened) setPanelEverOpened(true);
21121
21158
  const favourites = useFavourites({
21122
21159
  conversation: built?.conversation ?? null,