@sensiblestats/widget-react 0.135.0 → 0.136.1

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
@@ -1298,7 +1298,7 @@ function parseOddsFormat(value) {
1298
1298
  }
1299
1299
 
1300
1300
  // src/version.generated.ts
1301
- var WIDGET_REACT_VERSION = "0.135.0";
1301
+ var WIDGET_REACT_VERSION = "0.136.1";
1302
1302
 
1303
1303
  // src/config.ts
1304
1304
  function hostTag(cfg) {
@@ -2246,6 +2246,9 @@ function toNbaInsightVM(insight) {
2246
2246
  competition: str(insight.competitionName),
2247
2247
  kickoffUtc: str(insight.kickoffUtc),
2248
2248
  kickoffLabel: str(insight.kickoffLabel),
2249
+ homeTeamImage: str(insight.homeTeamImagePath),
2250
+ awayTeamImage: str(insight.awayTeamImagePath),
2251
+ competitionImage: str(insight.competitionImagePath),
2249
2252
  quotedAtUtc: insight.quotedAtUtc,
2250
2253
  addToSlipEnabled: insight.addToSlipEnabled === true,
2251
2254
  disclaimer: str(insight.disclaimer),
@@ -7762,7 +7765,7 @@ function ChatFab({ label, busy = false, greeting, popupText, logoUrl, onOpen, on
7762
7765
  }
7763
7766
 
7764
7767
  // src/components/ChatPanel.tsx
7765
- 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";
7766
7769
 
7767
7770
  // src/components/ChatHeader.tsx
7768
7771
  import { useEffect as useEffect29, useRef as useRef25, useState as useState34 } from "react";
@@ -8329,10 +8332,17 @@ function NbaPrice({ vm, selectionKey, label, ui, slip }) {
8329
8332
  function Head({ vm, chip, ui, monitor }) {
8330
8333
  const fixture = vm.homeTeamName && vm.awayTeamName ? `${vm.homeTeamName} ${ui.venue.home} ${vm.awayTeamName}` : vm.competition;
8331
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;
8332
8342
  const pinnable = monitor?.enabled === true && vm.evidence.kind !== "settle_recap";
8333
8343
  return /* @__PURE__ */ jsxs33("div", { className: "ss-w-nba-head", children: [
8334
8344
  /* @__PURE__ */ jsxs33("div", { className: "ss-w-nba-head-l", children: [
8335
- meta ? /* @__PURE__ */ jsx37("p", { className: "ss-w-nba-meta", children: meta }) : null,
8345
+ metaNode,
8336
8346
  /* @__PURE__ */ jsx37("p", { className: "ss-w-nba-title", children: vm.title })
8337
8347
  ] }),
8338
8348
  chip || pinnable ? /* @__PURE__ */ jsxs33("span", { className: "ss-w-bi-meta-right", children: [
@@ -11067,6 +11077,9 @@ function MonitorSkeleton({ pin, monitor, ui }) {
11067
11077
  ] });
11068
11078
  }
11069
11079
 
11080
+ // src/components/NbaMonitorCard.tsx
11081
+ import { useState as useState50 } from "react";
11082
+
11070
11083
  // src/sportLabel.ts
11071
11084
  var CODE = { football: "football", basketball: "nba", nba: "nba", americanfootball: "nfl", nfl: "nfl", tennis: "tennis" };
11072
11085
  var sportLabel = (ui, sport) => {
@@ -11377,6 +11390,7 @@ function PropPlayerPanel({ player: given, bundle, descriptor, ui, slip }) {
11377
11390
  }
11378
11391
  function PropRoster({ bundle, players, side, descriptor, ui, slip }) {
11379
11392
  const [openId, setOpenId] = useState48(null);
11393
+ const [brokenShots, setBrokenShots] = useState48(/* @__PURE__ */ new Set());
11380
11394
  return /* @__PURE__ */ jsx76("div", { className: "ss-w-props-list", children: players.map((given) => {
11381
11395
  const p = livePlayer(bundle, given);
11382
11396
  const isOpen = openId === p.playerId;
@@ -11392,7 +11406,16 @@ function PropRoster({ bundle, players, side, descriptor, ui, slip }) {
11392
11406
  "aria-expanded": isOpen,
11393
11407
  onClick: () => setOpenId(isOpen ? null : p.playerId),
11394
11408
  children: [
11395
- /* @__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 ?? "" }),
11396
11419
  /* @__PURE__ */ jsxs71("span", { className: "ss-w-props-pn", children: [
11397
11420
  /* @__PURE__ */ jsx76("span", { className: "ss-w-props-name", children: p.name }),
11398
11421
  /* @__PURE__ */ jsx76("span", { className: "ss-w-props-meta", children: meta })
@@ -11535,10 +11558,17 @@ function city(teamName, nickname) {
11535
11558
  if (!name || !name.endsWith(nickname)) return null;
11536
11559
  return name.slice(0, name.length - nickname.length).trim() || null;
11537
11560
  }
11538
- 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 }) {
11539
11569
  const cityName = city(teamName, nickname);
11540
11570
  return /* @__PURE__ */ jsxs73("span", { className: away ? "ss-w-nbamon-side" : "ss-w-nbamon-side ss-w-nbamon-side--home", children: [
11541
- /* @__PURE__ */ jsx78("span", { className: "ss-w-nbamon-badge", children: abbreviation }),
11571
+ /* @__PURE__ */ jsx78(BadgeCrest, { url: crestUrl, abbreviation }),
11542
11572
  /* @__PURE__ */ jsxs73("span", { className: "ss-w-nbamon-team", children: [
11543
11573
  cityName && /* @__PURE__ */ jsx78("span", { className: "ss-w-nbamon-city", children: cityName }),
11544
11574
  /* @__PURE__ */ jsx78("span", { className: "ss-w-nbamon-nick", children: nickname })
@@ -11608,13 +11638,13 @@ function NbaMonitorCard({ match, monitor, ui, slip }) {
11608
11638
  /* @__PURE__ */ jsx78(PinToggle, { ui, monitor, pin: { kind: "match", matchId: match.matchId, sport: "basketball" } })
11609
11639
  ] }),
11610
11640
  /* @__PURE__ */ jsxs73("div", { className: "ss-w-nbamon-main", children: [
11611
- /* @__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 }),
11612
11642
  scored ? /* @__PURE__ */ jsxs73("span", { className: "ss-w-mon-score", children: [
11613
11643
  match.awayScore ?? 0,
11614
11644
  /* @__PURE__ */ jsx78("i", { children: "\u2013" }),
11615
11645
  match.homeScore ?? 0
11616
11646
  ] }) : /* @__PURE__ */ jsx78("span", { className: "ss-w-mon-vs", children: ui.venue.away }),
11617
- /* @__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 })
11618
11648
  ] }),
11619
11649
  /* @__PURE__ */ jsx78(NbaFormStrip, { match, monitor, ui }),
11620
11650
  scored && /* @__PURE__ */ jsxs73(Fragment17, { children: [
@@ -11647,7 +11677,7 @@ function NbaMonitorCard({ match, monitor, ui, slip }) {
11647
11677
  }
11648
11678
 
11649
11679
  // src/components/NflFormSection.tsx
11650
- import { useState as useState50 } from "react";
11680
+ import { useState as useState51 } from "react";
11651
11681
  import { Fragment as Fragment18, jsx as jsx79, jsxs as jsxs74 } from "react/jsx-runtime";
11652
11682
  var outcomeOf = (g) => g.teamScore > g.opponentScore ? "win" : g.teamScore < g.opponentScore ? "loss" : "tie";
11653
11683
  var signedSpread2 = (v) => v > 0 ? `+${v}` : String(v);
@@ -11699,7 +11729,7 @@ function H2hRow({ game, home, ui }) {
11699
11729
  ] });
11700
11730
  }
11701
11731
  function NflFormSection({ match, monitor, ui }) {
11702
- const [segment, setSegment] = useState50("away");
11732
+ const [segment, setSegment] = useState51("away");
11703
11733
  const { live, open } = usePropsOpen(match, monitor, { sport: "americanfootball" });
11704
11734
  const bundle = monitor.playerProps?.[monitorMatchKey("americanfootball", match.matchId)]?.bundle;
11705
11735
  const form = bundle?.form;
@@ -11732,7 +11762,7 @@ function NflFormSection({ match, monitor, ui }) {
11732
11762
  }
11733
11763
 
11734
11764
  // src/components/NflPropsSection.tsx
11735
- import { useState as useState51 } from "react";
11765
+ import { useState as useState52 } from "react";
11736
11766
  import { Fragment as Fragment19, jsx as jsx80, jsxs as jsxs75 } from "react/jsx-runtime";
11737
11767
  var TRENDS_SHOWN = 3;
11738
11768
  var SCORERS_SHOWN = 8;
@@ -11805,7 +11835,7 @@ function ShowMore({ label, onClick }) {
11805
11835
  return /* @__PURE__ */ jsx80("button", { type: "button", className: "ss-w-props-more", onClick, children: label });
11806
11836
  }
11807
11837
  function Trends({ bundle, facts, descriptor, ui, slip }) {
11808
- const [all, setAll] = useState51(false);
11838
+ const [all, setAll] = useState52(false);
11809
11839
  const shown2 = all ? facts : facts.slice(0, TRENDS_SHOWN);
11810
11840
  return /* @__PURE__ */ jsxs75("section", { className: "ss-w-props ss-w-props-trends", lang: ui.locale, children: [
11811
11841
  /* @__PURE__ */ jsx80("div", { className: "ss-w-props-head", children: ui.nfl.propsTrends }),
@@ -11838,7 +11868,7 @@ function Trends({ bundle, facts, descriptor, ui, slip }) {
11838
11868
  ] });
11839
11869
  }
11840
11870
  function Scorers({ bundle, scorers, abbreviations, descriptor, ui, slip }) {
11841
- const [all, setAll] = useState51(false);
11871
+ const [all, setAll] = useState52(false);
11842
11872
  const shown2 = all ? scorers : scorers.slice(0, SCORERS_SHOWN);
11843
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" });
11844
11874
  return /* @__PURE__ */ jsxs75("div", { className: "ss-w-props-scorers", children: [
@@ -11865,7 +11895,7 @@ function Scorers({ bundle, scorers, abbreviations, descriptor, ui, slip }) {
11865
11895
  ] });
11866
11896
  }
11867
11897
  function NflPropsSection({ match, monitor, ui, slip }) {
11868
- const [tab, setTab] = useState51(null);
11898
+ const [tab, setTab] = useState52(null);
11869
11899
  const descriptor = nflDescriptor(ui);
11870
11900
  const { bundle, live, open } = usePropsOpen(match, monitor, descriptor);
11871
11901
  if (!open || !bundle || bundle.players.length === 0 || (bundle.live ?? false) !== live) return null;
@@ -12312,7 +12342,7 @@ function TennisLiveScoreboard({ t, score, live, ui }) {
12312
12342
  }
12313
12343
 
12314
12344
  // src/components/TennisStatsTables.tsx
12315
- 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";
12316
12346
  import { Fragment as Fragment24, jsx as jsx87, jsxs as jsxs82 } from "react/jsx-runtime";
12317
12347
  function formatStat(row, value, locale) {
12318
12348
  if (value == null) return "\u2013";
@@ -12350,7 +12380,7 @@ function Tables({ table, labels, names, locale }) {
12350
12380
  ] });
12351
12381
  }
12352
12382
  function TennisStatsTables({ serveReturn, today, labels, names, ui, resetKey }) {
12353
- const [tab, setTab] = useState52("match");
12383
+ const [tab, setTab] = useState53("match");
12354
12384
  useEffect38(() => {
12355
12385
  setTab("match");
12356
12386
  }, [resetKey]);
@@ -12939,7 +12969,7 @@ function TrendsPanel({ monitor, ui, slip }) {
12939
12969
  }
12940
12970
 
12941
12971
  // src/components/LivePanel.tsx
12942
- import { useMemo as useMemo10, useState as useState54 } from "react";
12972
+ import { useMemo as useMemo10, useState as useState55 } from "react";
12943
12973
  import { matchKey as matchKey8 } from "@sensiblestats/widget-sdk";
12944
12974
 
12945
12975
  // src/scheduleView.ts
@@ -13114,7 +13144,7 @@ function LeagueGroup({ view, open, onToggle, disambiguate, rowCap, onShowAll, on
13114
13144
  }
13115
13145
 
13116
13146
  // src/components/MatchSheet.tsx
13117
- import { useId as useId2, useState as useState53 } from "react";
13147
+ import { useId as useId2, useState as useState54 } from "react";
13118
13148
  import { localIdOf as localIdOf4, qualifiedId as qualifiedId2, slipSportOf as slipSportOf9, toWireSport as toWireSport6 } from "@sensiblestats/widget-sdk";
13119
13149
 
13120
13150
  // src/useModalDialog.ts
@@ -13180,7 +13210,7 @@ function MatchSheet({ match, league, state, stale, ui, monitor, onAsk, onClose,
13180
13210
  const { dialogRef, onKeyDown } = useModalDialog(onClose, { opener });
13181
13211
  const log = useEventLog();
13182
13212
  const titleId = useId2();
13183
- const [limitHit, setLimitHit] = useState53(false);
13213
+ const [limitHit, setLimitHit] = useState54(false);
13184
13214
  const pinSport = slipSportOf9(match.sport);
13185
13215
  const tour = pinSport === "tennis" && isKnownTour(match.tour) ? match.tour : void 0;
13186
13216
  const followable = pinSport !== "tennis" || tour !== void 0;
@@ -13281,9 +13311,9 @@ var OPEN_TOP_GROUPS = 2;
13281
13311
  var QUIET_ROWS = 4;
13282
13312
  function LivePanel({ discovery, ui, monitor, sport, offered, onSport, league, onLeague, onSeeAll, onAsk }) {
13283
13313
  const { groups, states, stale } = discovery;
13284
- const [mine, setMine] = useState54(false);
13285
- const [toggled, setToggled] = useState54(/* @__PURE__ */ new Map());
13286
- 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);
13287
13317
  const pinnedKeys = useMemo10(
13288
13318
  () => new Set(monitor.pins.filter((p) => p.kind === "match").map((p) => matchKey8(p.sport, p.matchId, p.tour))),
13289
13319
  [monitor.pins]
@@ -13390,15 +13420,15 @@ function LivePanel({ discovery, ui, monitor, sport, offered, onSport, league, on
13390
13420
  }
13391
13421
 
13392
13422
  // src/components/ScheduleMatchesPanel.tsx
13393
- 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";
13394
13424
  import { matchKey as matchKey10 } from "@sensiblestats/widget-sdk";
13395
13425
 
13396
13426
  // src/useTennisRowPrices.ts
13397
- 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";
13398
13428
  import { matchKey as matchKey9 } from "@sensiblestats/widget-sdk";
13399
13429
  var TENNIS_PRICE_POLL_MS = 6e4;
13400
13430
  function useTennisRowPrices(a) {
13401
- const [state, setState] = useState55({ byId: null, stale: false });
13431
+ const [state, setState] = useState56({ byId: null, stale: false });
13402
13432
  const getPricesRef = useRef34(a.getPrices);
13403
13433
  getPricesRef.current = a.getPrices;
13404
13434
  const latest = useRef34(0);
@@ -13561,11 +13591,11 @@ var SKELETON_ROWS = 3;
13561
13591
  function ScheduleMatchesPanel({ discovery, ui, monitor, sport, offered, onSport, day, onDay, loaded, onOpenLive, onAsk, locale, getTennisPrices, slip }) {
13562
13592
  const { localDate: today, states, stale } = discovery;
13563
13593
  const searchId = useId3();
13564
- const [query, setQuery] = useState56("");
13565
- const [toggled, setToggled] = useState56(/* @__PURE__ */ new Map());
13566
- 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());
13567
13597
  const listRef = useRef37(null);
13568
- const [sheet, setSheet] = useState56(null);
13598
+ const [sheet, setSheet] = useState57(null);
13569
13599
  const { chips, selected } = loaded;
13570
13600
  useEffect43(() => {
13571
13601
  if (selected !== day) onDay(selected);
@@ -13709,7 +13739,7 @@ function ScheduleMatchesPanel({ discovery, ui, monitor, sport, offered, onSport,
13709
13739
  }
13710
13740
 
13711
13741
  // src/components/GamesPanel.tsx
13712
- import { useEffect as useEffect47, useState as useState71 } from "react";
13742
+ import { useEffect as useEffect47, useState as useState72 } from "react";
13713
13743
 
13714
13744
  // src/components/GamesLoginWall.tsx
13715
13745
  import { jsx as jsx102 } from "react/jsx-runtime";
@@ -13718,7 +13748,7 @@ function GamesLoginWall({ ui }) {
13718
13748
  }
13719
13749
 
13720
13750
  // src/components/GamesHub.tsx
13721
- import { useEffect as useEffect44, useState as useState57 } from "react";
13751
+ import { useEffect as useEffect44, useState as useState58 } from "react";
13722
13752
 
13723
13753
  // src/components/games/ui/gameMeta.ts
13724
13754
  function prettifyGameId(gameId) {
@@ -13869,7 +13899,7 @@ function pickHeroGame(games) {
13869
13899
  }
13870
13900
  var tileKey = (g) => `${g.gameId}-${g.gameDay}-${g.fixtureId}`;
13871
13901
  function GamesHub({ games, myWeeklyRow, weeklyPrize, onOpen, ui }) {
13872
- const [, setTick] = useState57(0);
13902
+ const [, setTick] = useState58(0);
13873
13903
  useEffect44(() => {
13874
13904
  const id = setInterval(() => setTick((t) => t + 1), 6e4);
13875
13905
  return () => clearInterval(id);
@@ -13930,10 +13960,10 @@ function GamesHub({ games, myWeeklyRow, weeklyPrize, onOpen, ui }) {
13930
13960
  }
13931
13961
 
13932
13962
  // src/components/GameScreenHost.tsx
13933
- 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";
13934
13964
 
13935
13965
  // src/useGamePlay.ts
13936
- 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";
13937
13967
  function toSubmitResult(payload) {
13938
13968
  return {
13939
13969
  // 'pending' means the play is recorded but awaiting resolution (fixture games)
@@ -13945,9 +13975,9 @@ function toSubmitResult(payload) {
13945
13975
  };
13946
13976
  }
13947
13977
  function useGamePlay(conversation, { gameId, gameDay, fixtureId, locale, refresh }) {
13948
- const [result, setResult] = useState58(null);
13949
- const [submitting, setSubmitting] = useState58(false);
13950
- const [rawStatus, setRawStatus] = useState58(null);
13978
+ const [result, setResult] = useState59(null);
13979
+ const [submitting, setSubmitting] = useState59(false);
13980
+ const [rawStatus, setRawStatus] = useState59(null);
13951
13981
  const inFlightRef = useRef38(false);
13952
13982
  const convRef = useRef38(conversation);
13953
13983
  convRef.current = conversation;
@@ -14005,7 +14035,7 @@ function useGamePlay(conversation, { gameId, gameDay, fixtureId, locale, refresh
14005
14035
  }
14006
14036
 
14007
14037
  // src/components/games/MysteryTigerGame.tsx
14008
- import { useState as useState60, useId as useId4 } from "react";
14038
+ import { useState as useState61, useId as useId4 } from "react";
14009
14039
 
14010
14040
  // src/components/games/nationFlags.ts
14011
14041
  var FLAGS = {
@@ -14216,7 +14246,7 @@ function isNationCode(flag) {
14216
14246
  }
14217
14247
 
14218
14248
  // src/components/games/PlayerAvatar.tsx
14219
- import { useState as useState59 } from "react";
14249
+ import { useState as useState60 } from "react";
14220
14250
  import { jsx as jsx107 } from "react/jsx-runtime";
14221
14251
  function initialsOf(name) {
14222
14252
  const parts2 = name.trim().split(/\s+/).filter(Boolean);
@@ -14234,7 +14264,7 @@ function PlayerAvatar({
14234
14264
  imagePath,
14235
14265
  className
14236
14266
  }) {
14237
- const [failed, setFailed] = useState59(false);
14267
+ const [failed, setFailed] = useState60(false);
14238
14268
  const showImage = Boolean(imagePath) && !isPlaceholderImage(imagePath) && !failed;
14239
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) }) });
14240
14270
  }
@@ -14478,7 +14508,7 @@ function MysteryTigerGame({
14478
14508
  onBack
14479
14509
  }) {
14480
14510
  const t = ui.games.mysteryTiger;
14481
- const [query, setQuery] = useState60("");
14511
+ const [query, setQuery] = useState61("");
14482
14512
  const inputId = useId4();
14483
14513
  const clientState = parseClientState(result?.clientStateJson);
14484
14514
  const guessResults = clientState?.guessResults ?? [];
@@ -14740,13 +14770,13 @@ function HigherOrLowerGame({
14740
14770
  }
14741
14771
 
14742
14772
  // src/components/games/CareerPathGame.tsx
14743
- import { useState as useState62, useId as useId5 } from "react";
14773
+ import { useState as useState63, useId as useId5 } from "react";
14744
14774
 
14745
14775
  // src/components/games/ui/CrestShield.tsx
14746
- import { useState as useState61 } from "react";
14776
+ import { useState as useState62 } from "react";
14747
14777
  import { jsx as jsx118 } from "react/jsx-runtime";
14748
14778
  function CrestShield({ src, name, size = 28 }) {
14749
- const [failed, setFailed] = useState61(false);
14779
+ const [failed, setFailed] = useState62(false);
14750
14780
  if (src && !isPlaceholderImage(src) && !failed) {
14751
14781
  return /* @__PURE__ */ jsx118("img", { className: "ss-g-crest", src, alt: name, width: size, height: size, loading: "lazy", onError: () => setFailed(true) });
14752
14782
  }
@@ -14778,7 +14808,7 @@ function CareerPathGame({
14778
14808
  }) {
14779
14809
  const s = ui.games.careerPath;
14780
14810
  const title = gameTitle({ gameId: "career-path" }, ui.games.titles);
14781
- const [query, setQuery] = useState62("");
14811
+ const [query, setQuery] = useState63("");
14782
14812
  const inputId = useId5();
14783
14813
  const clientState = parseClientState3(result?.clientStateJson);
14784
14814
  const alreadyGuessedIds = new Set(clientState?.guessResults.map((g) => g.playerId) ?? []);
@@ -14885,7 +14915,7 @@ function CareerPathGame({
14885
14915
  }
14886
14916
 
14887
14917
  // src/components/games/BeatTheGridGame.tsx
14888
- 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";
14889
14919
 
14890
14920
  // src/components/games/ui/OptionList.tsx
14891
14921
  import { jsx as jsx120 } from "react/jsx-runtime";
@@ -14974,7 +15004,7 @@ function SearchSheet({
14974
15004
  ui
14975
15005
  }) {
14976
15006
  const s = ui.games.beatTheGrid;
14977
- const [query, setQuery] = useState63("");
15007
+ const [query, setQuery] = useState64("");
14978
15008
  const inputId = useId6();
14979
15009
  const inputRef = useRef39(null);
14980
15010
  useEffect45(() => {
@@ -15042,7 +15072,7 @@ function BeatTheGridGame({
15042
15072
  }) {
15043
15073
  const s = ui.games.beatTheGrid;
15044
15074
  const title = gameTitle({ gameId: "beat-the-grid" }, ui.games.titles);
15045
- const [activeCell, setActiveCell] = useState63(null);
15075
+ const [activeCell, setActiveCell] = useState64(null);
15046
15076
  const clientState = parseClientState4(result?.clientStateJson);
15047
15077
  const filledCells = clientState?.cells ?? [];
15048
15078
  const isLocked2 = result?.alreadyPlayed === true || clientState?.isComplete === true;
@@ -15197,7 +15227,7 @@ function BeatTheGridGame({
15197
15227
  }
15198
15228
 
15199
15229
  // src/components/games/GuessTheXiGame.tsx
15200
- import { useState as useState64, useId as useId7 } from "react";
15230
+ import { useState as useState65, useId as useId7 } from "react";
15201
15231
 
15202
15232
  // src/components/games/ui/PitchSvg.tsx
15203
15233
  import { Fragment as Fragment37, jsx as jsx122, jsxs as jsxs109 } from "react/jsx-runtime";
@@ -15286,7 +15316,7 @@ function GuessTheXiGame({
15286
15316
  onBack
15287
15317
  }) {
15288
15318
  const t = ui.games.guessTheXi;
15289
- const [query, setQuery] = useState64("");
15319
+ const [query, setQuery] = useState65("");
15290
15320
  const inputId = useId7();
15291
15321
  const clientState = parseClientState5(result?.clientStateJson);
15292
15322
  const isOver = result?.alreadyPlayed === true || clientState?.status === "solved" || clientState?.status === "failed";
@@ -15429,7 +15459,7 @@ function GuessTheXiGame({
15429
15459
  }
15430
15460
 
15431
15461
  // src/components/games/DailyQuizGame.tsx
15432
- import { useState as useState65 } from "react";
15462
+ import { useState as useState66 } from "react";
15433
15463
  import { Fragment as Fragment39, jsx as jsx124, jsxs as jsxs111 } from "react/jsx-runtime";
15434
15464
  function parseClientState6(json) {
15435
15465
  if (!json) return null;
@@ -15470,8 +15500,8 @@ function DailyQuizGame({
15470
15500
  }) {
15471
15501
  const s = ui.games.dailyQuiz;
15472
15502
  const title = gameTitle({ gameId: "daily-quiz" }, ui.games.titles);
15473
- const [selections, setSelections] = useState65(/* @__PURE__ */ new Map());
15474
- const [page, setPage] = useState65(0);
15503
+ const [selections, setSelections] = useState66(/* @__PURE__ */ new Map());
15504
+ const [page, setPage] = useState66(0);
15475
15505
  const clientState = parseClientState6(result?.clientStateJson);
15476
15506
  const results2 = clientState?.results ?? [];
15477
15507
  const isRevealed = results2.length > 0 || result?.alreadyPlayed === true;
@@ -15581,7 +15611,7 @@ function DailyQuizGame({
15581
15611
  }
15582
15612
 
15583
15613
  // src/components/games/MatchdayPredictorGame.tsx
15584
- import { useId as useId8, useState as useState66 } from "react";
15614
+ import { useId as useId8, useState as useState67 } from "react";
15585
15615
  import { jsx as jsx125, jsxs as jsxs112 } from "react/jsx-runtime";
15586
15616
  var SCORER_SEARCH_THRESHOLD = 9;
15587
15617
  function parseClientState7(json) {
@@ -15677,11 +15707,11 @@ function MatchdayPredictorGame({
15677
15707
  onBack
15678
15708
  }) {
15679
15709
  const t = ui.games.predictor;
15680
- const [homeScore, setHomeScore] = useState66(0);
15681
- const [awayScore, setAwayScore] = useState66(0);
15682
- const [firstScorerPlayerId, setFirstScorerPlayerId] = useState66(null);
15683
- const [lastEdited, setLastEdited] = useState66("home");
15684
- 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("");
15685
15715
  const searchId = useId8();
15686
15716
  const clientState = parseClientState7(result?.clientStateJson);
15687
15717
  const alreadyPlayed = result?.alreadyPlayed === true;
@@ -15849,7 +15879,7 @@ function MatchdayPredictorGame({
15849
15879
  }
15850
15880
 
15851
15881
  // src/components/games/StartingXiGame.tsx
15852
- import { useId as useId9, useState as useState67 } from "react";
15882
+ import { useId as useId9, useState as useState68 } from "react";
15853
15883
  import { Fragment as Fragment40, jsx as jsx126, jsxs as jsxs113 } from "react/jsx-runtime";
15854
15884
  var POINTS_PER_STARTER = 8;
15855
15885
  var XI_SIZE = 11;
@@ -15893,9 +15923,9 @@ function StartingXiGame({
15893
15923
  lockAtUtc
15894
15924
  }) {
15895
15925
  const t = ui.games.startingXi;
15896
- const [slotPlayers, setSlotPlayers] = useState67(() => Array(XI_SIZE).fill(null));
15897
- const [active, setActive] = useState67(0);
15898
- 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("");
15899
15929
  const searchId = useId9();
15900
15930
  const clientState = parseClientState8(result?.clientStateJson);
15901
15931
  const alreadyPlayed = result?.alreadyPlayed === true;
@@ -16035,7 +16065,7 @@ function StartingXiGame({
16035
16065
  }
16036
16066
 
16037
16067
  // src/components/games/StatLadderGame.tsx
16038
- import { useId as useId10, useState as useState68 } from "react";
16068
+ import { useId as useId10, useState as useState69 } from "react";
16039
16069
  import { jsx as jsx127, jsxs as jsxs114 } from "react/jsx-runtime";
16040
16070
  function ladderClue(ladder) {
16041
16071
  const mystery = ladder.find((r) => r.rank === 2);
@@ -16072,8 +16102,8 @@ function StatLadderGame({
16072
16102
  onBack
16073
16103
  }) {
16074
16104
  const t = ui.games.statLadder;
16075
- const [query, setQuery] = useState68("");
16076
- const [selectedId, setSelectedId] = useState68(null);
16105
+ const [query, setQuery] = useState69("");
16106
+ const [selectedId, setSelectedId] = useState69(null);
16077
16107
  const searchId = useId10();
16078
16108
  const clientState = parseClientState9(result?.clientStateJson);
16079
16109
  const revealed = clientState != null;
@@ -16280,7 +16310,7 @@ function GameScreenHost({
16280
16310
  ui
16281
16311
  }) {
16282
16312
  const { gameId, fixtureId, gameDay = "", lockAtUtc = null } = selected;
16283
- const [configJson, setConfigJson] = useState69(null);
16313
+ const [configJson, setConfigJson] = useState70(null);
16284
16314
  useEffect46(() => {
16285
16315
  setConfigJson(null);
16286
16316
  if (!conversation) return;
@@ -16422,7 +16452,7 @@ function GameScreenHost({
16422
16452
  }
16423
16453
 
16424
16454
  // src/components/Leaderboard.tsx
16425
- import { useState as useState70 } from "react";
16455
+ import { useState as useState71 } from "react";
16426
16456
 
16427
16457
  // src/components/LeaderboardRow.tsx
16428
16458
  import { jsx as jsx130, jsxs as jsxs116 } from "react/jsx-runtime";
@@ -16509,7 +16539,7 @@ function Leaderboard({
16509
16539
  ui,
16510
16540
  onPlay
16511
16541
  }) {
16512
- const [segment, setSegment] = useState70("weekly");
16542
+ const [segment, setSegment] = useState71("weekly");
16513
16543
  const myRow = segment === "weekly" ? data.myWeeklyRow : data.myAllTimeRow;
16514
16544
  const offBoard = myRow !== null && myRow !== void 0 && myRow.rank === -1;
16515
16545
  const isEmpty = segment === "weekly" ? data.weeklyTop.length === 0 : data.allTimeTop.length === 0;
@@ -16614,8 +16644,8 @@ function GamesPanel({
16614
16644
  leaderboardLoading,
16615
16645
  refreshHub
16616
16646
  }) {
16617
- const [selected, setSelected] = useState71(null);
16618
- const [segment, setSegment] = useState71("play");
16647
+ const [selected, setSelected] = useState72(null);
16648
+ const [segment, setSegment] = useState72("play");
16619
16649
  useEffect47(() => {
16620
16650
  ensureGamesFonts();
16621
16651
  }, []);
@@ -16680,10 +16710,10 @@ function GamesPanel({
16680
16710
  }
16681
16711
 
16682
16712
  // src/components/FavouritesPanel.tsx
16683
- 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";
16684
16714
 
16685
16715
  // src/components/FavouriteChips.tsx
16686
- import { useEffect as useEffect48, useState as useState72 } from "react";
16716
+ import { useEffect as useEffect48, useState as useState73 } from "react";
16687
16717
  import { Fragment as Fragment42, jsx as jsx135, jsxs as jsxs120 } from "react/jsx-runtime";
16688
16718
  async function toggleWithNotice(controller, kind, id, onNotice) {
16689
16719
  const outcome = await controller.toggle(kind, id);
@@ -16730,7 +16760,7 @@ function Group({ title, entities, sport, ui, controller, onNotice }) {
16730
16760
  ] });
16731
16761
  }
16732
16762
  function FavouriteChips({ controller, ui, sport, sportLabel: sportLabel2, onNotice }) {
16733
- const [confirming, setConfirming] = useState72(false);
16763
+ const [confirming, setConfirming] = useState73(false);
16734
16764
  const data = controller.data;
16735
16765
  useEffect48(() => {
16736
16766
  setConfirming(false);
@@ -16789,14 +16819,14 @@ function FavouriteChips({ controller, ui, sport, sportLabel: sportLabel2, onNoti
16789
16819
  }
16790
16820
 
16791
16821
  // src/components/FavouritesSearch.tsx
16792
- 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";
16793
16823
  import { jsx as jsx136, jsxs as jsxs121 } from "react/jsx-runtime";
16794
16824
  var MIN_LETTERS = 2;
16795
16825
  var MAX_LENGTH = 64;
16796
16826
  var DEBOUNCE_MS = 250;
16797
16827
  function FavouritesSearch({ controller, ui, sport, onNotice }) {
16798
- const [query, setQuery] = useState73("");
16799
- const [answer, setAnswer] = useState73(null);
16828
+ const [query, setQuery] = useState74("");
16829
+ const [answer, setAnswer] = useState74(null);
16800
16830
  const controllerRef = useRef41(controller);
16801
16831
  controllerRef.current = controller;
16802
16832
  const trimmed = query.trim();
@@ -16866,7 +16896,7 @@ function FavouritesSearch({ controller, ui, sport, onNotice }) {
16866
16896
  // src/components/FavouritesPanel.tsx
16867
16897
  import { jsx as jsx137, jsxs as jsxs122 } from "react/jsx-runtime";
16868
16898
  function FavouritesPanel({ controller, ui, sport, sports, onSportChange }) {
16869
- const [notice, setNotice] = useState74(null);
16899
+ const [notice, setNotice] = useState75(null);
16870
16900
  const refreshRef = useRef42(controller.refresh);
16871
16901
  refreshRef.current = controller.refresh;
16872
16902
  useEffect50(() => {
@@ -16898,7 +16928,7 @@ function FavouritesPanel({ controller, ui, sport, sports, onSportChange }) {
16898
16928
  }
16899
16929
 
16900
16930
  // src/components/dashboard/v8/SentenceBuilder.tsx
16901
- 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";
16902
16932
  import { Fragment as Fragment43, jsx as jsx138, jsxs as jsxs123 } from "react/jsx-runtime";
16903
16933
  var TOTALS = ["any", "3", "5", "10", "20", "50"];
16904
16934
  var BASE_LEGS = [1, 2, 3, 4];
@@ -16924,8 +16954,8 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
16924
16954
  const opening = openingGames(preset);
16925
16955
  const gamesOptions = opening.options;
16926
16956
  const marketOptions = usableMarkets(preset);
16927
- const [fingerprint] = useState75(() => JSON.stringify(preset));
16928
- const [saved] = useState75(() => {
16957
+ const [fingerprint] = useState76(() => JSON.stringify(preset));
16958
+ const [saved] = useState76(() => {
16929
16959
  const kept = memory3?.savedView(sport);
16930
16960
  return kept && kept.fingerprint === fingerprint ? kept : null;
16931
16961
  });
@@ -16939,9 +16969,9 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
16939
16969
  // The server never widens by itself: an all-games preset with no ids asks for it.
16940
16970
  widen: opening.option ? opening.option.matchIds.length === 0 : preset.gamesScope === "all" && preset.matchIds.length === 0
16941
16971
  };
16942
- const [view, setView] = useState75(() => saved?.view ?? openingView);
16972
+ const [view, setView] = useState76(() => saved?.view ?? openingView);
16943
16973
  const autoWidened = useRef43(false);
16944
- const [widenedNote, setWidenedNote] = useState75(saved?.widenedNote ?? false);
16974
+ const [widenedNote, setWidenedNote] = useState76(saved?.widenedNote ?? false);
16945
16975
  const requestFor = (v) => ({
16946
16976
  sport,
16947
16977
  ...v.marketKey !== null ? { marketKey: v.marketKey } : {},
@@ -16953,7 +16983,7 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
16953
16983
  ...operatorUserId ? { operatorUserId } : {},
16954
16984
  ...anonymousUserId ? { anonymousUserId } : {}
16955
16985
  });
16956
- const [first] = useState75(() => requestFor(view));
16986
+ const [first] = useState76(() => requestFor(view));
16957
16987
  const { grid, status: status2, confirmed, request } = useBuilderGrid({ conversation, locale: ui.hostTag, memory: memory3, initial: first });
16958
16988
  const lastRequest = useRef43(first);
16959
16989
  useEffect51(() => {
@@ -16989,13 +17019,13 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
16989
17019
  const rows = ready && grid.status === "ok" ? legsOf(grid, sport) : null;
16990
17020
  const rowSlip = rows ? guardLegsPreMatch(slip, rows, ui) : slip;
16991
17021
  useNextKickoffRender(rows ? rows.map((l) => l.kickoffUtc) : []);
16992
- const [startedNote, setStartedNote] = useState75(false);
17022
+ const [startedNote, setStartedNote] = useState76(false);
16993
17023
  const anyStarted = rows !== null && rows.some((l) => !preMatchOpen(l.kickoffUtc, Date.now()));
16994
17024
  useEffect51(() => {
16995
17025
  if (startedNote && status2 === "ready" && !anyStarted) setStartedNote(false);
16996
17026
  }, [startedNote, status2, anyStarted]);
16997
17027
  const market = rows?.[0]?.market;
16998
- const [seen2, setSeen] = useState75(null);
17028
+ const [seen2, setSeen] = useState76(null);
16999
17029
  useEffect51(() => {
17000
17030
  if (market) setSeen(market);
17001
17031
  }, [market]);
@@ -17419,10 +17449,10 @@ function Squad({ squad, loading, ui, view, onToggleView, stats, statsLoading, se
17419
17449
  }
17420
17450
 
17421
17451
  // src/components/PlayerPhoto.tsx
17422
- import { useState as useState76 } from "react";
17452
+ import { useState as useState77 } from "react";
17423
17453
  import { jsx as jsx144 } from "react/jsx-runtime";
17424
17454
  function PlayerPhoto({ photoUrl, jerseyNumber, size }) {
17425
- const [failed, setFailed] = useState76(false);
17455
+ const [failed, setFailed] = useState77(false);
17426
17456
  const box = { width: size, height: size };
17427
17457
  if (photoUrl && !failed) {
17428
17458
  return /* @__PURE__ */ jsx144("img", { className: "ss-w-pd-photo", style: box, src: photoUrl, alt: "", "aria-hidden": "true", onError: () => setFailed(true) });
@@ -17457,7 +17487,7 @@ function MiniPitch({ positionCode }) {
17457
17487
  }
17458
17488
 
17459
17489
  // src/components/PerformanceBars.tsx
17460
- import { useState as useState77 } from "react";
17490
+ import { useState as useState78 } from "react";
17461
17491
  import { jsx as jsx146, jsxs as jsxs129 } from "react/jsx-runtime";
17462
17492
  var GROUPS = ["shooting", "passing", "possession", "defending"];
17463
17493
  function finite4(v) {
@@ -17503,7 +17533,7 @@ function unrankedLine(ui, reason) {
17503
17533
  }
17504
17534
  }
17505
17535
  function PerformanceBars({ performance, competitionName, strings }) {
17506
- const [mode, setMode] = useState77("total");
17536
+ const [mode, setMode] = useState78("total");
17507
17537
  const labelled = performance.metrics.filter((m) => Object.prototype.hasOwnProperty.call(strings.perfMetric, m.key));
17508
17538
  if (!labelled.some((m) => valueOf(m, "total") !== null || valueOf(m, "per90") !== null)) return null;
17509
17539
  const subtitle = !performance.ranked ? unrankedLine(strings, performance.unrankedReason) : competitionName ? strings.perfRankedAgainst(competitionName, performance.positionGroup) : null;
@@ -17675,7 +17705,7 @@ function PlayerDetail({ detail, loading, ui, seasonName, onClose }) {
17675
17705
  }
17676
17706
 
17677
17707
  // src/components/PresetTools.tsx
17678
- import { useId as useId11, useState as useState78 } from "react";
17708
+ import { useId as useId11, useState as useState79 } from "react";
17679
17709
  import { Fragment as Fragment46, jsx as jsx148, jsxs as jsxs131 } from "react/jsx-runtime";
17680
17710
  function PresetToolModal({ title, closeLabel, onClose, children, footer, className }) {
17681
17711
  const { dialogRef, onKeyDown } = useModalDialog(onClose, { restoreFocus: false });
@@ -17729,9 +17759,9 @@ function BuildComboTool({ grid, strings, streaming, formatKickoff, initialTotal,
17729
17759
  const totalOptions = comboTotals(grid);
17730
17760
  const totals = totalOptions.map((o) => o.value);
17731
17761
  const legChoices = comboLegChoices(grid);
17732
- const [total, setTotal] = useState78(() => nearest(totals, initialTotal));
17733
- const [legs, setLegs] = useState78(() => legsForTotal(grid, nearest(totals, initialTotal), clampLegs(legChoices, initialLegs)));
17734
- 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("");
17735
17765
  const cell2 = findCombo(grid, total, legs);
17736
17766
  const minLegs = legChoices[0] ?? legs;
17737
17767
  const maxLegs = legChoices[legChoices.length - 1] ?? legs;
@@ -17801,7 +17831,7 @@ function SettingsSheet({ ui, onClose }) {
17801
17831
  import { Fragment as Fragment47, jsx as jsx150, jsxs as jsxs133 } from "react/jsx-runtime";
17802
17832
  var FULLSCREEN_QUERY = "(max-width: 639px)";
17803
17833
  function useIsModal() {
17804
- const [modal, setModal] = useState79(false);
17834
+ const [modal, setModal] = useState80(false);
17805
17835
  useEffect53(() => {
17806
17836
  if (typeof window === "undefined" || typeof window.matchMedia !== "function") return;
17807
17837
  const mql = window.matchMedia(FULLSCREEN_QUERY);
@@ -17816,8 +17846,8 @@ var HIDDEN_LAYER_STYLE = { position: "absolute", inset: 0, visibility: "hidden",
17816
17846
  var SQUAD_LAYER_STYLE = { display: "flex", flexDirection: "column", flex: 1, minHeight: 0 };
17817
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 }) {
17818
17848
  const { state, close, stop, send, reset } = controller;
17819
- const [squadView, setSquadView] = useState79("roster");
17820
- const [selectedPlayerId, setSelectedPlayerId] = useState79(null);
17849
+ const [squadView, setSquadView] = useState80("roster");
17850
+ const [selectedPlayerId, setSelectedPlayerId] = useState80(null);
17821
17851
  const clearPlayerDetail = clubPlayerDetailResult?.clear;
17822
17852
  const fetchPlayerDetail = clubPlayerDetailResult?.fetch;
17823
17853
  const squadLayerRef = useRef45(null);
@@ -17891,10 +17921,10 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, s
17891
17921
  const limitRef = useRef45(null);
17892
17922
  const typedSendRef = useRef45(false);
17893
17923
  const focusAfterCloseRef = useRef45(null);
17894
- const [tool, setTool] = useState79(null);
17924
+ const [tool, setTool] = useState80(null);
17895
17925
  const panelRef = useRef45(null);
17896
17926
  const settings = useOddsSettings();
17897
- const [settingsOpen, setSettingsOpen] = useState79(false);
17927
+ const [settingsOpen, setSettingsOpen] = useState80(false);
17898
17928
  const hasSettings = settings.oddsOffered || !settings.themeLocked;
17899
17929
  const openSettings = useCallback27(() => {
17900
17930
  setTool(null);
@@ -18508,6 +18538,8 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
18508
18538
  .ss-w-nba-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
18509
18539
  .ss-w-nba-head-l { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
18510
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; }
18511
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; }
18512
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)}
18513
18545
  .ss-w-nba-chip { flex: none; color: var(--ss-w-warn); border-color: var(--ss-w-warn); }
@@ -18714,7 +18746,9 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
18714
18746
  .ss-w-mo-stat { font-size: 12px; color: var(--ss-w-ink); background: color-mix(in srgb, var(--ss-w-accent) 9%, var(--ss-w-panel)); border-radius: 8px; padding: 7px 9px; }
18715
18747
  .ss-w-mo-row { display: flex; align-items: center; gap: 10px; padding: 4px 0; border-bottom: 1px dashed var(--ss-w-line); }
18716
18748
  .ss-w-mo-row:last-child { border-bottom: none; }
18717
- .ss-w-mo-sel { font-size: 12.5px; font-weight: 600; color: var(--ss-w-ink); flex: 1; min-width: 0; }
18749
+ /* min-content, not 0: a long slip label (it-IT "Aggiungi alla schedina") otherwise squeezes the
18750
+ label narrower than one word and the name runs into the price. The slip button wraps instead. */
18751
+ .ss-w-mo-sel { font-size: 12.5px; font-weight: 600; color: var(--ss-w-ink); flex: 1; min-width: min-content; }
18718
18752
  .ss-w-mo-price { margin-left: auto; font-family: ui-monospace, monospace; font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 700; color: var(--ss-w-accent); }
18719
18753
  /* Movement: BOTH directions share --ss-w-faint on purpose. Green-good/red-bad would frame a
18720
18754
  shortening price as a discount, which inverts what it actually means for the bettor. */
@@ -18725,7 +18759,8 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
18725
18759
  a flex row, and must NOT follow the badge into the insight card's odds column. */
18726
18760
  .ss-w-mo-row .ss-w-move { margin-left: auto; }
18727
18761
  .ss-w-mo-row .ss-w-move + .ss-w-mo-price { margin-left: 0; }
18728
- .ss-w-mo-row .ss-w-slip { margin: 0; flex: none; }
18762
+ .ss-w-mo-row .ss-w-slip { margin: 0; flex: 0 1 auto; min-width: 0; }
18763
+ .ss-w-mo-row .ss-w-slip-btn { white-space: normal; text-align: center; }
18729
18764
  .ss-w-mo-foot { display: flex; align-items: center; gap: 8px; font-size: 10.5px; color: var(--ss-w-faint); }
18730
18765
  .ss-w-allmk-wrap { position: relative; display: inline-flex; flex: none; margin-left: auto; }
18731
18766
  .ss-w-allmk-wrap--chip { margin-left: 0; }
@@ -19878,6 +19913,7 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
19878
19913
  .ss-w-nbamon-side { display: flex; align-items: center; gap: 8px; min-width: 0; }
19879
19914
  .ss-w-nbamon-side--home { flex-direction: row-reverse; text-align: right; }
19880
19915
  .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); }
19916
+ .ss-w-nbamon-badge--img { width: 26px; min-width: 0; padding: 2px; box-sizing: border-box; object-fit: contain; }
19881
19917
  .ss-w-nbamon-team { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
19882
19918
  .ss-w-nbamon-city { font-size: 10.5px; font-weight: 600; color: var(--ss-w-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
19883
19919
  .ss-w-nbamon-nick { font-size: 13px; font-weight: 800; color: var(--ss-w-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@@ -20204,6 +20240,7 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
20204
20240
  .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; }
20205
20241
  .ss-w-props-jn--home { background: var(--ss-w-home); }
20206
20242
  .ss-w-props-jn--away { background: var(--ss-w-away); }
20243
+ .ss-w-props-shot { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; object-position: top center; background: var(--ss-w-bubble); }
20207
20244
  .ss-w-props-pn { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
20208
20245
  .ss-w-props-name { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
20209
20246
  .ss-w-props-meta { font-size: 11px; color: var(--ss-w-faint); }
@@ -21026,7 +21063,7 @@ function StatsWidget(props) {
21026
21063
  return [...seen2];
21027
21064
  }, [discovery.matchDays, discovery.groups]);
21028
21065
  const scheduleSport = useScheduleSport(offeredSports);
21029
- const [liveLeague, setLiveLeague] = useState80(null);
21066
+ const [liveLeague, setLiveLeague] = useState81(null);
21030
21067
  const [matchesDay, setMatchesDay] = useMatchesDayPick(discovery.localDate);
21031
21068
  const matchesLoaded = useMatchesDay({
21032
21069
  discovery,
@@ -21077,7 +21114,7 @@ function StatsWidget(props) {
21077
21114
  const clubSquadResult = useClubSquad(built?.conversation ?? null, { activeTab: monitor.activeTab, enabled: clubFixturesResult.enabled });
21078
21115
  const clubSquadStatsResult = useClubSquadStats(built?.conversation ?? null, { activeTab: monitor.activeTab, enabled: clubFixturesResult.enabled });
21079
21116
  const clubPlayerDetailResult = useClubPlayerDetail(built?.conversation ?? null);
21080
- const [favSportPick, setFavSportPick] = useState80(null);
21117
+ const [favSportPick, setFavSportPick] = useState81(null);
21081
21118
  const latestGreeting = useMemo13(() => {
21082
21119
  for (const m of [...controller.state.messages].reverse()) {
21083
21120
  if (m.role === "assistant" && m.defaultSport !== void 0) return m;
@@ -21093,12 +21130,12 @@ function StatsWidget(props) {
21093
21130
  const favSport = [favSportPick, rememberedSport, latestGreeting?.defaultSport].find(offered) ?? "football";
21094
21131
  const favSports = favSportOptions.length > 0 ? favSportOptions : [{ sport: favSport, label: sportLabel(ui, favSport) }];
21095
21132
  const hasFavouritesIdentity = !!(operatorUserId || anonymousUserId);
21096
- const [builderSportPick, setBuilderSportPick] = useState80(null);
21133
+ const [builderSportPick, setBuilderSportPick] = useState81(null);
21097
21134
  const builderGreeting = useMemo13(
21098
21135
  () => [...controller.state.messages].reverse().find((m) => m.role === "assistant" && (m.greetingDashboard !== void 0 || m.greetingDashboards !== void 0)) ?? null,
21099
21136
  [controller.state.messages]
21100
21137
  );
21101
- const [coolOff, setCoolOff] = useState80(null);
21138
+ const [coolOff, setCoolOff] = useState81(null);
21102
21139
  const onBuilderCoolOff = useCallback28((sport) => {
21103
21140
  if (!builderGreeting) return;
21104
21141
  setCoolOff((prev) => {
@@ -21119,7 +21156,7 @@ function StatsWidget(props) {
21119
21156
  return options.filter((o) => !cooled.includes(o.sport));
21120
21157
  }, [builderGreeting, coolOff, ui]);
21121
21158
  const builderSport = [builderSportPick, rememberedSport, latestGreeting?.defaultSport].find((s) => !!s && builderOptions.some((o) => o.sport === s)) ?? builderOptions[0]?.sport ?? "";
21122
- const [panelEverOpened, setPanelEverOpened] = useState80(panelOpen);
21159
+ const [panelEverOpened, setPanelEverOpened] = useState81(panelOpen);
21123
21160
  if (panelOpen && !panelEverOpened) setPanelEverOpened(true);
21124
21161
  const favourites = useFavourites({
21125
21162
  conversation: built?.conversation ?? null,