@sensiblestats/widget-react 0.80.0 → 0.81.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.cjs CHANGED
@@ -37,7 +37,7 @@ __export(index_exports, {
37
37
  module.exports = __toCommonJS(index_exports);
38
38
 
39
39
  // src/StatsWidget.tsx
40
- var import_react57 = require("react");
40
+ var import_react61 = require("react");
41
41
  var import_widget_sdk6 = require("@sensiblestats/widget-sdk");
42
42
 
43
43
  // src/kickoff.ts
@@ -152,6 +152,20 @@ var STRINGS = {
152
152
  accordionSuspended: "Suspended",
153
153
  tabToday: "Today",
154
154
  sectionLive: "Live",
155
+ yourLeagues: "Your leagues",
156
+ topLeagues: "Top leagues",
157
+ topLeaguesSub: "Popular today.",
158
+ allLeagues: "All leagues",
159
+ searchLeaguesPlaceholder: "Search leagues or teams",
160
+ noLeagueResults: "No league or team matches that search.",
161
+ clearSearchLabel: "Clear search",
162
+ starOnLabel: "Add to Your leagues",
163
+ starOffLabel: "Remove from Your leagues",
164
+ starredToast: "Added to Your leagues.",
165
+ unstarredToast: "Removed from Your leagues.",
166
+ leagueDetailPosition: (index, total) => `${index} of ${total}`,
167
+ prevLeagueLabel: "Previous league",
168
+ nextLeagueLabel: "Next league",
155
169
  halfTime: "HT",
156
170
  staleStates: "Live scores can't be updated \u2014 showing the last known state.",
157
171
  tabGames: "Games",
@@ -504,6 +518,20 @@ var STRINGS = {
504
518
  accordionSuspended: "Ask\u0131da",
505
519
  tabToday: "Bug\xFCn",
506
520
  sectionLive: "Canl\u0131",
521
+ yourLeagues: "Liglerin",
522
+ topLeagues: "\xD6ne \xE7\u0131kan ligler",
523
+ topLeaguesSub: "Bug\xFCn pop\xFCler.",
524
+ allLeagues: "T\xFCm ligler",
525
+ searchLeaguesPlaceholder: "Lig veya tak\u0131m ara",
526
+ noLeagueResults: "Aramana uyan lig veya tak\u0131m yok.",
527
+ clearSearchLabel: "Aramay\u0131 temizle",
528
+ starOnLabel: "Liglerine ekle",
529
+ starOffLabel: "Liglerinden \xE7\u0131kar",
530
+ starredToast: "Liglerin b\xF6l\xFCm\xFCne eklendi.",
531
+ unstarredToast: "Liglerin b\xF6l\xFCm\xFCnden \xE7\u0131kar\u0131ld\u0131.",
532
+ leagueDetailPosition: (index, total) => `${index} / ${total}`,
533
+ prevLeagueLabel: "\xD6nceki lig",
534
+ nextLeagueLabel: "Sonraki lig",
507
535
  halfTime: "\u0130Y",
508
536
  staleStates: "Canl\u0131 skorlar g\xFCncellenemiyor \u2014 son bilinen durum g\xF6steriliyor.",
509
537
  tabGames: "Oyunlar",
@@ -853,6 +881,20 @@ function normalizeUi(cfg) {
853
881
  tabOdds: strings.tabOdds,
854
882
  tabToday: strings.tabToday,
855
883
  sectionLive: strings.sectionLive,
884
+ yourLeagues: strings.yourLeagues,
885
+ topLeagues: strings.topLeagues,
886
+ topLeaguesSub: strings.topLeaguesSub,
887
+ allLeagues: strings.allLeagues,
888
+ searchLeaguesPlaceholder: strings.searchLeaguesPlaceholder,
889
+ noLeagueResults: strings.noLeagueResults,
890
+ clearSearchLabel: strings.clearSearchLabel,
891
+ starOnLabel: strings.starOnLabel,
892
+ starOffLabel: strings.starOffLabel,
893
+ starredToast: strings.starredToast,
894
+ unstarredToast: strings.unstarredToast,
895
+ leagueDetailPosition: strings.leagueDetailPosition,
896
+ prevLeagueLabel: strings.prevLeagueLabel,
897
+ nextLeagueLabel: strings.nextLeagueLabel,
856
898
  halfTime: strings.halfTime,
857
899
  staleStates: strings.staleStates,
858
900
  pinLabel: strings.pinLabel,
@@ -2754,14 +2796,14 @@ var import_react6 = require("react");
2754
2796
 
2755
2797
  // src/scheduleCache.ts
2756
2798
  var PREFIX = "ss-w-schedule:";
2757
- var SCHEMA_VERSION = 1;
2799
+ var SCHEMA_VERSION = 2;
2758
2800
  var TTL_MS2 = 6 * 36e5;
2759
- function scheduleCacheKey(operatorId, localDate) {
2760
- return `${PREFIX}${operatorId}:${localDate}`;
2801
+ function scheduleCacheKey(operatorId, encodedUserKey2, localDate) {
2802
+ return `${PREFIX}${operatorId}:${encodedUserKey2}:${localDate}`;
2761
2803
  }
2762
- function read(operatorId, localDate) {
2804
+ function read(operatorId, encodedUserKey2, localDate) {
2763
2805
  try {
2764
- const raw = localStorage.getItem(scheduleCacheKey(operatorId, localDate));
2806
+ const raw = localStorage.getItem(scheduleCacheKey(operatorId, encodedUserKey2, localDate));
2765
2807
  if (!raw) return null;
2766
2808
  const entry = JSON.parse(raw);
2767
2809
  if (entry.v !== SCHEMA_VERSION || !entry.payload) return null;
@@ -2770,13 +2812,13 @@ function read(operatorId, localDate) {
2770
2812
  return null;
2771
2813
  }
2772
2814
  }
2773
- function readSchedule(operatorId, localDate, nowMs) {
2774
- const entry = read(operatorId, localDate);
2815
+ function readSchedule(operatorId, encodedUserKey2, localDate, nowMs) {
2816
+ const entry = read(operatorId, encodedUserKey2, localDate);
2775
2817
  if (!entry) return null;
2776
2818
  return nowMs - entry.at > TTL_MS2 ? null : entry.payload;
2777
2819
  }
2778
- function readScheduleIgnoringTtl(operatorId, localDate) {
2779
- return read(operatorId, localDate)?.payload ?? null;
2820
+ function readScheduleIgnoringTtl(operatorId, encodedUserKey2, localDate) {
2821
+ return read(operatorId, encodedUserKey2, localDate)?.payload ?? null;
2780
2822
  }
2781
2823
  function skeletonOnly(payload) {
2782
2824
  return {
@@ -2784,9 +2826,13 @@ function skeletonOnly(payload) {
2784
2826
  groups: payload.groups.map((g) => ({
2785
2827
  competitionId: g.competitionId,
2786
2828
  competitionName: g.competitionName,
2829
+ competitionCountry: g.competitionCountry ?? null,
2787
2830
  competitionImagePath: g.competitionImagePath ?? null,
2788
2831
  rank: g.rank,
2789
2832
  expandedByDefault: g.expandedByDefault,
2833
+ isStarred: g.isStarred,
2834
+ isLearned: g.isLearned,
2835
+ learnedRank: g.learnedRank,
2790
2836
  matches: g.matches.map((m) => ({
2791
2837
  matchId: m.matchId,
2792
2838
  homeTeamName: m.homeTeamName,
@@ -2798,9 +2844,9 @@ function skeletonOnly(payload) {
2798
2844
  }))
2799
2845
  };
2800
2846
  }
2801
- function writeSchedule(operatorId, localDate, payload, nowMs) {
2802
- const keep = scheduleCacheKey(operatorId, localDate);
2803
- const mine = `${PREFIX}${operatorId}:`;
2847
+ function writeSchedule(operatorId, encodedUserKey2, localDate, payload, nowMs) {
2848
+ const keep = scheduleCacheKey(operatorId, encodedUserKey2, localDate);
2849
+ const mine = `${PREFIX}${operatorId}:${encodedUserKey2}:`;
2804
2850
  try {
2805
2851
  for (let i = localStorage.length - 1; i >= 0; i--) {
2806
2852
  const key = localStorage.key(i);
@@ -2811,6 +2857,12 @@ function writeSchedule(operatorId, localDate, payload, nowMs) {
2811
2857
  } catch {
2812
2858
  }
2813
2859
  }
2860
+ function patchScheduleStar(operatorId, encodedUserKey2, localDate, competitionId, star) {
2861
+ const entry = read(operatorId, encodedUserKey2, localDate);
2862
+ if (!entry) return;
2863
+ const groups = entry.payload.groups.map((g) => g.competitionId === competitionId ? { ...g, ...star } : g);
2864
+ writeSchedule(operatorId, encodedUserKey2, localDate, { ...entry.payload, groups }, entry.at);
2865
+ }
2814
2866
 
2815
2867
  // src/dueSet.ts
2816
2868
  var TERMINAL_PHASES = /* @__PURE__ */ new Set(["fullTime", "postponed"]);
@@ -2831,6 +2883,9 @@ function dueMatchIds(groups, states, nowMs) {
2831
2883
  var POLL_MS = 6e4;
2832
2884
  var ROLLOVER_CHECK_MS = 6e4;
2833
2885
  var STALE_AFTER_FAILURES = 2;
2886
+ function encodedUserKey(operatorUserId, anonymousUserId) {
2887
+ return encodeURIComponent(operatorUserId || anonymousUserId || "none");
2888
+ }
2834
2889
  function localDateOf(now) {
2835
2890
  const y = now.getFullYear();
2836
2891
  const m = `${now.getMonth() + 1}`.padStart(2, "0");
@@ -2841,15 +2896,12 @@ function useMatchDiscovery(opts) {
2841
2896
  const [groups, setGroups] = (0, import_react6.useState)([]);
2842
2897
  const [states, setStates] = (0, import_react6.useState)({});
2843
2898
  const [failures, setFailures] = (0, import_react6.useState)(0);
2844
- const [expanded, setExpanded] = (0, import_react6.useState)({});
2845
- const [touched, setTouched] = (0, import_react6.useState)({});
2846
2899
  const groupsRef = (0, import_react6.useRef)(groups);
2847
2900
  groupsRef.current = groups;
2848
2901
  const statesRef = (0, import_react6.useRef)(states);
2849
2902
  statesRef.current = states;
2850
2903
  const getStatesRef = (0, import_react6.useRef)(opts.getStates);
2851
2904
  getStatesRef.current = opts.getStates;
2852
- const pinnedKey = opts.pinnedMatchIds.join(",");
2853
2905
  const [localDate, setLocalDate] = (0, import_react6.useState)(() => localDateOf(/* @__PURE__ */ new Date()));
2854
2906
  (0, import_react6.useEffect)(() => {
2855
2907
  const id = setInterval(() => {
@@ -2861,7 +2913,8 @@ function useMatchDiscovery(opts) {
2861
2913
  (0, import_react6.useEffect)(() => {
2862
2914
  let cancelled = false;
2863
2915
  const utcOffsetMinutes = -(/* @__PURE__ */ new Date()).getTimezoneOffset();
2864
- const cached = readSchedule(opts.operatorId, localDate, Date.now());
2916
+ const key = encodedUserKey(opts.operatorUserId, opts.anonymousUserId);
2917
+ const cached = readSchedule(opts.operatorId, key, localDate, Date.now());
2865
2918
  if (cached) {
2866
2919
  if (!cancelled) setGroups(cached.groups);
2867
2920
  return () => {
@@ -2872,28 +2925,17 @@ function useMatchDiscovery(opts) {
2872
2925
  try {
2873
2926
  const payload = await opts.getSchedule(localDate, utcOffsetMinutes);
2874
2927
  if (cancelled || !payload) return;
2875
- writeSchedule(opts.operatorId, localDate, payload, Date.now());
2928
+ writeSchedule(opts.operatorId, key, localDate, payload, Date.now());
2876
2929
  setGroups(payload.groups);
2877
2930
  } catch {
2878
- const fallback = readScheduleIgnoringTtl(opts.operatorId, localDate);
2931
+ const fallback = readScheduleIgnoringTtl(opts.operatorId, key, localDate);
2879
2932
  if (!cancelled && fallback) setGroups(fallback.groups);
2880
2933
  }
2881
2934
  })();
2882
2935
  return () => {
2883
2936
  cancelled = true;
2884
2937
  };
2885
- }, [opts.operatorId, localDate]);
2886
- (0, import_react6.useEffect)(() => {
2887
- setExpanded((prev) => {
2888
- const next = {};
2889
- for (const group of groups) {
2890
- const hasPin = group.matches.some((m) => opts.pinnedMatchIds.includes(m.matchId));
2891
- const seeded = group.expandedByDefault || hasPin;
2892
- next[group.competitionId] = touched[group.competitionId] ? prev[group.competitionId] ?? seeded : seeded;
2893
- }
2894
- return next;
2895
- });
2896
- }, [groups, pinnedKey, touched]);
2938
+ }, [opts.operatorId, opts.operatorUserId, opts.anonymousUserId, localDate]);
2897
2939
  const tick = (0, import_react6.useCallback)(async () => {
2898
2940
  const ids = dueMatchIds(groupsRef.current, statesRef.current, Date.now());
2899
2941
  if (ids.length === 0) return;
@@ -2923,11 +2965,20 @@ function useMatchDiscovery(opts) {
2923
2965
  () => stale ? 0 : Object.values(states).filter((s) => s.phase === "live").length,
2924
2966
  [states, stale]
2925
2967
  );
2926
- const toggleGroup = (0, import_react6.useCallback)((competitionId) => {
2927
- setTouched((prev) => ({ ...prev, [competitionId]: true }));
2928
- setExpanded((prev) => ({ ...prev, [competitionId]: !prev[competitionId] }));
2929
- }, []);
2930
- return { groups, states, liveCount, stale, expanded, toggleGroup, _tick: tick };
2968
+ const starLeague = (0, import_react6.useCallback)(async (competitionId, starred) => {
2969
+ let result;
2970
+ try {
2971
+ result = await opts.postLeagueStar(competitionId, starred);
2972
+ } catch {
2973
+ return false;
2974
+ }
2975
+ if (!result) return false;
2976
+ const patch = { isStarred: result.starred, isLearned: false, learnedRank: null };
2977
+ setGroups((prev) => prev.map((g) => g.competitionId === competitionId ? { ...g, ...patch } : g));
2978
+ patchScheduleStar(opts.operatorId, encodedUserKey(opts.operatorUserId, opts.anonymousUserId), localDate, competitionId, patch);
2979
+ return true;
2980
+ }, [opts.postLeagueStar, opts.operatorId, opts.operatorUserId, opts.anonymousUserId, localDate]);
2981
+ return { groups, states, liveCount, stale, starLeague, _tick: tick };
2931
2982
  }
2932
2983
 
2933
2984
  // src/useGames.ts
@@ -3401,7 +3452,7 @@ function ChatFab({ label, greeting, popupText, logoUrl, onOpen, onDismissPopup,
3401
3452
  }
3402
3453
 
3403
3454
  // src/components/ChatPanel.tsx
3404
- var import_react56 = require("react");
3455
+ var import_react60 = require("react");
3405
3456
 
3406
3457
  // src/components/ChatHeader.tsx
3407
3458
  var import_react15 = require("react");
@@ -3806,7 +3857,8 @@ function PinToggle({ pin, monitor, ui, market }) {
3806
3857
  const key = pinKey(pin);
3807
3858
  const pinned = monitor.isPinned(key);
3808
3859
  const labels = pin.kind === "match" ? { pin: ui.matchPinLabel, unpin: ui.matchUnpinLabel } : { pin: ui.pinLabel, unpin: ui.unpinLabel };
3809
- const onClick = () => {
3860
+ const onClick = (e) => {
3861
+ e.stopPropagation();
3810
3862
  if (pin.kind === "match" && !monitor.isPinned(key)) {
3811
3863
  if (monitor.pinMatch({ matchId: pin.matchId, marketDeveloperName: market }) === "added") {
3812
3864
  log?.log({ name: "pin_add", entityType: "match", entityId: String(pin.matchId), marketDeveloperName: pin.marketDeveloperName });
@@ -5909,16 +5961,135 @@ function OddsPanel({ monitor, ui, slip }) {
5909
5961
  }) });
5910
5962
  }
5911
5963
 
5912
- // src/components/FixtureRow.tsx
5964
+ // src/components/TodayPanel.tsx
5965
+ var import_react41 = require("react");
5966
+
5967
+ // src/placement.ts
5968
+ function placeLeagues(visible, pinnedMatchIds) {
5969
+ const candidates = [];
5970
+ const candidateIds = /* @__PURE__ */ new Set();
5971
+ for (const g of visible) {
5972
+ if (g.isStarred) {
5973
+ candidates.push(g);
5974
+ candidateIds.add(g.competitionId);
5975
+ }
5976
+ }
5977
+ let budget = 4;
5978
+ const pinned = visible.find(
5979
+ (g) => !candidateIds.has(g.competitionId) && g.matches.some((m) => pinnedMatchIds.includes(m.matchId))
5980
+ ) ?? null;
5981
+ if (pinned && budget > 0) {
5982
+ candidates.push(pinned);
5983
+ candidateIds.add(pinned.competitionId);
5984
+ budget -= 1;
5985
+ }
5986
+ const learned = visible.filter((g) => g.isLearned && !candidateIds.has(g.competitionId)).sort((a, b) => (a.learnedRank ?? Number.MAX_SAFE_INTEGER) - (b.learnedRank ?? Number.MAX_SAFE_INTEGER));
5987
+ for (const g of learned) {
5988
+ if (budget <= 0) break;
5989
+ candidates.push(g);
5990
+ candidateIds.add(g.competitionId);
5991
+ budget -= 1;
5992
+ }
5993
+ const personal = candidates.length > 0;
5994
+ const pool = personal ? candidates : visible.slice(0, 4);
5995
+ const poolIds = personal ? candidateIds : new Set(pool.map((g) => g.competitionId));
5996
+ const others = visible.filter((g) => !poolIds.has(g.competitionId));
5997
+ return { personal, candidates: pool, others, order: [...pool, ...others], pinnedCompetitionId: pinned?.competitionId ?? null };
5998
+ }
5999
+ function starClickable(group, pinnedCompetitionId) {
6000
+ return group.isStarred || group.competitionId !== pinnedCompetitionId;
6001
+ }
6002
+
6003
+ // src/search.ts
6004
+ function foldSearchText(s) {
6005
+ return s.replace(/İ/g, "I").replace(/ı/g, "i").normalize("NFD").replace(/[̀-ͯ]/g, "").toLowerCase();
6006
+ }
6007
+ function matchesQuery(group, query) {
6008
+ const q = foldSearchText(query.trim());
6009
+ if (!q) return true;
6010
+ if (foldSearchText(group.competitionName).includes(q)) return true;
6011
+ if (group.competitionCountry && foldSearchText(group.competitionCountry).includes(q)) return true;
6012
+ return group.matches.some(
6013
+ (m) => foldSearchText(m.homeTeamName).includes(q) || foldSearchText(m.awayTeamName).includes(q)
6014
+ );
6015
+ }
6016
+
6017
+ // src/useStarTap.ts
6018
+ var import_react38 = require("react");
6019
+ function useStarTap(starLeague) {
6020
+ const [pendingId, setPendingId] = (0, import_react38.useState)(null);
6021
+ const pendingRef = (0, import_react38.useRef)(null);
6022
+ const tap = (0, import_react38.useCallback)(async (competitionId, next) => {
6023
+ if (pendingRef.current !== null) return false;
6024
+ pendingRef.current = competitionId;
6025
+ setPendingId(competitionId);
6026
+ try {
6027
+ return await starLeague(competitionId, next);
6028
+ } finally {
6029
+ pendingRef.current = null;
6030
+ setPendingId(null);
6031
+ }
6032
+ }, [starLeague]);
6033
+ return { pendingId, tap };
6034
+ }
6035
+
6036
+ // src/components/LeagueTile.tsx
5913
6037
  var import_jsx_runtime55 = require("react/jsx-runtime");
6038
+ var STAR_PATH = "M12 2.5l2.9 5.9 6.5.95-4.7 4.58 1.1 6.47L12 17.35 6.1 20.4l1.1-6.47L2.5 9.35l6.5-.95z";
6039
+ function LeagueTile({ group, starClickable: starClickable2, disambiguate, onOpen, starTap, ui }) {
6040
+ const onStarClick = () => {
6041
+ void starTap.tap(group.competitionId, !group.isStarred);
6042
+ };
6043
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "ss-w-today-tile", children: [
6044
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("button", { type: "button", className: "ss-w-today-tile-body", onClick: onOpen, children: [
6045
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Crest2, { url: group.competitionImagePath ?? void 0, name: group.competitionName, kind: "comp" }),
6046
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("span", { className: "ss-w-today-tile-name", children: [
6047
+ group.competitionName,
6048
+ disambiguate && group.competitionCountry ? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("span", { className: "ss-w-today-tile-country", children: [
6049
+ " (",
6050
+ group.competitionCountry,
6051
+ ")"
6052
+ ] }) : null
6053
+ ] })
6054
+ ] }),
6055
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
6056
+ "button",
6057
+ {
6058
+ type: "button",
6059
+ className: "ss-w-today-tile-star",
6060
+ "aria-pressed": group.isStarred,
6061
+ "aria-label": group.isStarred ? ui.starOffLabel : ui.starOnLabel,
6062
+ disabled: !starClickable2 || starTap.pendingId !== null,
6063
+ onClick: onStarClick,
6064
+ children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
6065
+ "path",
6066
+ {
6067
+ d: STAR_PATH,
6068
+ fill: group.isStarred ? "currentColor" : "none",
6069
+ stroke: group.isStarred ? "none" : "currentColor",
6070
+ strokeWidth: 2,
6071
+ strokeLinejoin: "round",
6072
+ strokeLinecap: "round"
6073
+ }
6074
+ ) })
6075
+ }
6076
+ )
6077
+ ] });
6078
+ }
6079
+
6080
+ // src/components/LeagueDetail.tsx
6081
+ var import_react39 = require("react");
6082
+
6083
+ // src/components/FixtureRow.tsx
6084
+ var import_jsx_runtime56 = require("react/jsx-runtime");
5914
6085
  function kickoffLabel(kickoffUnix) {
5915
6086
  const d = new Date(kickoffUnix * 1e3);
5916
6087
  return `${`${d.getHours()}`.padStart(2, "0")}:${`${d.getMinutes()}`.padStart(2, "0")}`;
5917
6088
  }
5918
6089
  function Side({ name, crest, away = false }) {
5919
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("span", { className: away ? "ss-w-drow-side ss-w-drow-side--away" : "ss-w-drow-side", children: [
5920
- crest ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("img", { className: "ss-w-drow-crest", src: crest, alt: "" }) : null,
5921
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "ss-w-drow-nm", children: name })
6090
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { className: away ? "ss-w-drow-side ss-w-drow-side--away" : "ss-w-drow-side", children: [
6091
+ crest ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("img", { className: "ss-w-drow-crest", src: crest, alt: "" }) : null,
6092
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "ss-w-drow-nm", children: name })
5922
6093
  ] });
5923
6094
  }
5924
6095
  function FixtureRow({ match, state, stale, ui, monitor }) {
@@ -5927,100 +6098,352 @@ function FixtureRow({ match, state, stale, ui, monitor }) {
5927
6098
  const score = hasScore ? `${state.homeScore}\u2013${state.awayScore}` : void 0;
5928
6099
  const ticked = state?.phase === "live" ? state.minuteLabel ?? null : null;
5929
6100
  const when = state?.isHalfTime && !stale ? ui.halfTime : isLive ? ticked ?? "\u2014" : state?.phase === "live" ? "\u2014" : kickoffLabel(match.kickoffUnix);
5930
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: isLive || state?.isHalfTime ? "ss-w-drow ss-w-drow--live" : "ss-w-drow", children: [
5931
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: isLive || state?.isHalfTime ? "ss-w-drow-when ss-w-drow-when--live" : "ss-w-drow-when", children: when }),
5932
- /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("span", { className: "ss-w-drow-fx", children: [
5933
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Side, { name: match.homeTeamName, crest: match.homeTeamImagePath }),
5934
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: hasScore ? "ss-w-drow-sc" : "ss-w-drow-sc ss-w-drow-sc--idle", children: score ?? "\u2013" }),
5935
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Side, { name: match.awayTeamName, crest: match.awayTeamImagePath, away: true })
6101
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: isLive || state?.isHalfTime ? "ss-w-drow ss-w-drow--live" : "ss-w-drow", children: [
6102
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: isLive || state?.isHalfTime ? "ss-w-drow-when ss-w-drow-when--live" : "ss-w-drow-when", children: when }),
6103
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { className: "ss-w-drow-fx", children: [
6104
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Side, { name: match.homeTeamName, crest: match.homeTeamImagePath }),
6105
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: hasScore ? "ss-w-drow-sc" : "ss-w-drow-sc ss-w-drow-sc--idle", children: score ?? "\u2013" }),
6106
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Side, { name: match.awayTeamName, crest: match.awayTeamImagePath, away: true })
5936
6107
  ] }),
5937
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(PinToggle, { ui, monitor, pin: { kind: "match", matchId: match.matchId } })
6108
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(PinToggle, { ui, monitor, pin: { kind: "match", matchId: match.matchId } })
5938
6109
  ] });
5939
6110
  }
5940
6111
 
5941
- // src/components/CompetitionGroup.tsx
5942
- var import_jsx_runtime56 = require("react/jsx-runtime");
5943
- function CompetitionGroup({ group, open, onToggle, states, stale, ui, monitor, disambiguate = false }) {
6112
+ // src/components/LeagueDetail.tsx
6113
+ var import_jsx_runtime57 = require("react/jsx-runtime");
6114
+ var STAR_PATH2 = "M12 2.5l2.9 5.9 6.5.95-4.7 4.58 1.1 6.47L12 17.35 6.1 20.4l1.1-6.47L2.5 9.35l6.5-.95z";
6115
+ function LeagueDetail({ group, position, states, stale, ui, monitor, starTap, onBack, onPrev, onNext }) {
6116
+ const [toast, setToast] = (0, import_react39.useState)(null);
6117
+ (0, import_react39.useEffect)(() => {
6118
+ setToast(null);
6119
+ }, [group.competitionId]);
6120
+ (0, import_react39.useEffect)(() => {
6121
+ if (toast === null) return;
6122
+ const id = setTimeout(() => setToast(null), 4e3);
6123
+ return () => clearTimeout(id);
6124
+ }, [toast]);
5944
6125
  const own = group.matches.filter((m) => !isTreatedLive(states[m.matchId], stale));
5945
- const hasLive = own.length !== group.matches.length;
5946
- if (own.length === 0) {
5947
- return null;
5948
- }
5949
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "ss-w-grp", children: [
5950
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("button", { type: "button", className: "ss-w-grp-head", "aria-expanded": open, onClick: onToggle, children: [
5951
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "ss-w-grp-chev", children: open ? "\u25BE" : "\u25B8" }),
5952
- hasLive && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "ss-w-sec-dot", "aria-hidden": "true" }),
5953
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { className: "ss-w-grp-name", children: [
5954
- group.competitionName,
5955
- disambiguate && group.competitionCountry ? /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { className: "ss-w-grp-country", children: [
5956
- " (",
5957
- group.competitionCountry,
5958
- ")"
5959
- ] }) : null
5960
- ] }),
5961
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "ss-w-grp-count", children: own.length })
6126
+ const onStarClick = () => {
6127
+ const next = !group.isStarred;
6128
+ void starTap.tap(group.competitionId, next).then((ok) => {
6129
+ if (ok) setToast(next ? ui.starredToast : ui.unstarredToast);
6130
+ });
6131
+ };
6132
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "ss-w-today-detail", children: [
6133
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "ss-w-today-detail-head", children: [
6134
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("button", { type: "button", className: "ss-w-today-detail-back", "aria-label": ui.back, onClick: onBack, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ChevronIcon, {}) }),
6135
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Crest2, { url: group.competitionImagePath ?? void 0, name: group.competitionName, kind: "comp" }),
6136
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "ss-w-today-detail-name", children: group.competitionName }),
6137
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
6138
+ "button",
6139
+ {
6140
+ type: "button",
6141
+ className: "ss-w-today-detail-star",
6142
+ "aria-pressed": group.isStarred,
6143
+ "aria-label": group.isStarred ? ui.starOffLabel : ui.starOnLabel,
6144
+ disabled: starTap.pendingId !== null,
6145
+ onClick: onStarClick,
6146
+ children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
6147
+ "path",
6148
+ {
6149
+ d: STAR_PATH2,
6150
+ fill: group.isStarred ? "currentColor" : "none",
6151
+ stroke: group.isStarred ? "none" : "currentColor",
6152
+ strokeWidth: 2,
6153
+ strokeLinejoin: "round",
6154
+ strokeLinecap: "round"
6155
+ }
6156
+ ) })
6157
+ }
6158
+ )
6159
+ ] }),
6160
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "ss-w-today-detail-nav", children: [
6161
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
6162
+ "button",
6163
+ {
6164
+ type: "button",
6165
+ className: "ss-w-today-detail-prev",
6166
+ "aria-label": ui.prevLeagueLabel,
6167
+ disabled: position.index <= 1,
6168
+ onClick: onPrev,
6169
+ children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ChevronIcon, {})
6170
+ }
6171
+ ),
6172
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "ss-w-today-detail-pos", children: ui.leagueDetailPosition(position.index, position.total) }),
6173
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
6174
+ "button",
6175
+ {
6176
+ type: "button",
6177
+ className: "ss-w-today-detail-next",
6178
+ "aria-label": ui.nextLeagueLabel,
6179
+ disabled: position.index >= position.total,
6180
+ onClick: onNext,
6181
+ children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ChevronIcon, {})
6182
+ }
6183
+ )
6184
+ ] }),
6185
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "ss-w-today-detail-body", children: [
6186
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "ss-w-today-detail-count", children: own.length }),
6187
+ own.map((m) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(FixtureRow, { match: m, state: states[m.matchId], stale, ui, monitor }, m.matchId))
5962
6188
  ] }),
5963
- open && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "ss-w-grp-body", children: own.map((m) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(FixtureRow, { match: m, state: states[m.matchId], stale, ui, monitor }, m.matchId)) })
6189
+ toast !== null && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "ss-w-today-toast", role: "status", "aria-live": "polite", children: toast })
6190
+ ] });
6191
+ }
6192
+
6193
+ // src/components/games/ui/SearchField.tsx
6194
+ var import_react40 = require("react");
6195
+
6196
+ // src/components/games/ui/icons.tsx
6197
+ var import_jsx_runtime58 = require("react/jsx-runtime");
6198
+ var svg = (size, children, fill = false) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
6199
+ "svg",
6200
+ {
6201
+ width: size,
6202
+ height: size,
6203
+ viewBox: "0 0 24 24",
6204
+ fill: fill ? "currentColor" : "none",
6205
+ stroke: fill ? "none" : "currentColor",
6206
+ strokeWidth: 2.2,
6207
+ strokeLinecap: "round",
6208
+ strokeLinejoin: "round",
6209
+ "aria-hidden": "true",
6210
+ children
6211
+ }
6212
+ );
6213
+ var IconChevronLeft = ({ size = 20 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("path", { d: "M15 18l-6-6 6-6" }));
6214
+ var IconLock = ({ size = 14 }) => svg(size, [/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("rect", { x: "5", y: "11", width: "14", height: "10", rx: "2" }, "a"), /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("path", { d: "M8 11V7a4 4 0 0 1 8 0v4" }, "b")]);
6215
+ var IconCheck = ({ size = 14 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("path", { d: "M5 12l5 5 9-10" }));
6216
+ var IconClose = ({ size = 16 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("path", { d: "M6 6l12 12M18 6L6 18" }));
6217
+ var IconSearch = ({ size = 18 }) => svg(size, [/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("circle", { cx: "11", cy: "11", r: "7" }, "a"), /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("path", { d: "M20 20l-3.5-3.5" }, "b")]);
6218
+ var IconPlus = ({ size = 20 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("path", { d: "M12 5v14M5 12h14" }));
6219
+ var IconBulb = ({ size = 16 }) => svg(size, [/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("path", { d: "M9 18h6M10 21h4" }, "a"), /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("path", { d: "M12 3a6 6 0 0 0-3.5 10.9V16h7v-2.1A6 6 0 0 0 12 3z" }, "b")]);
6220
+ var IconArrowUp = ({ size = 12 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("path", { d: "M12 19V5M5 12l7-7 7 7" }));
6221
+ var IconArrowDown = ({ size = 12 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("path", { d: "M12 5v14M19 12l-7 7-7-7" }));
6222
+ var IconCalendar = ({ size = 18 }) => svg(size, [/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("rect", { x: "4", y: "5", width: "16", height: "15", rx: "2" }, "a"), /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("path", { d: "M4 10h16M9 3v4M15 3v4" }, "b")]);
6223
+ var IconShield = ({ size = 18 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("path", { d: "M12 3l7 3v6c0 5-3 8-7 9-4-1-7-4-7-9V6z" }));
6224
+ var IconFlag = ({ size = 18 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("path", { d: "M5 21V4M5 4h12l-2 4 2 4H5" }));
6225
+ var IconBall = ({ size = 18 }) => svg(size, [/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("circle", { cx: "12", cy: "12", r: "9" }, "a"), /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("path", { d: "M12 7l4 3-1.5 4.5h-5L8 10z" }, "b")]);
6226
+ var IconBoot = ({ size = 18 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("path", { d: "M4 6h6l1 6 8 3v3H4z" }));
6227
+ var IconGloves = ({ size = 18 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("path", { d: "M7 21v-8l-2-3V6a1.5 1.5 0 0 1 3 0v3V4a1.5 1.5 0 0 1 3 0v5V3.5a1.5 1.5 0 0 1 3 0V9V5a1.5 1.5 0 0 1 3 0v9l-2 3v4z" }));
6228
+ var IconFlame = ({ size = 16 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("path", { d: "M12 3c1 4 5 5 5 10a5 5 0 0 1-10 0c0-3 2-4 2-7 1.5 1 2 2 2 3 1-2 1-4 1-6z" }), true);
6229
+
6230
+ // src/components/games/ui/SearchField.tsx
6231
+ var import_jsx_runtime59 = require("react/jsx-runtime");
6232
+ function SearchField({ id, label, labelHidden = false, placeholder, value, onChange, disabled, inputRef, onKeyDown, clearLabel }) {
6233
+ const localRef = (0, import_react40.useRef)(null);
6234
+ const setInputRef = (0, import_react40.useCallback)((node) => {
6235
+ localRef.current = node;
6236
+ if (typeof inputRef === "function") inputRef(node);
6237
+ else if (inputRef) inputRef.current = node;
6238
+ }, [inputRef]);
6239
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "ss-g-search", children: [
6240
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("label", { htmlFor: id, className: labelHidden ? "ss-g-sr" : "ss-g-search-label", children: label }),
6241
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "ss-g-search-box", children: [
6242
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(IconSearch, {}),
6243
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
6244
+ "input",
6245
+ {
6246
+ id,
6247
+ ref: setInputRef,
6248
+ type: "text",
6249
+ autoComplete: "off",
6250
+ placeholder,
6251
+ value,
6252
+ disabled,
6253
+ onKeyDown,
6254
+ onChange: (e) => onChange(e.target.value)
6255
+ }
6256
+ ),
6257
+ clearLabel && value.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
6258
+ "button",
6259
+ {
6260
+ type: "button",
6261
+ className: "ss-g-search-clear",
6262
+ "aria-label": clearLabel,
6263
+ onClick: () => {
6264
+ onChange("");
6265
+ localRef.current?.focus();
6266
+ },
6267
+ children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(IconClose, { size: 11 })
6268
+ }
6269
+ ) : null
6270
+ ] })
5964
6271
  ] });
5965
6272
  }
5966
6273
 
5967
6274
  // src/components/TodayPanel.tsx
5968
- var import_jsx_runtime57 = require("react/jsx-runtime");
6275
+ var import_jsx_runtime60 = require("react/jsx-runtime");
5969
6276
  function TodayPanel({ discovery, ui, monitor }) {
5970
- const { groups, states, stale, expanded, toggleGroup } = discovery;
6277
+ const { groups, states, stale, starLeague } = discovery;
6278
+ const searchId = (0, import_react41.useId)();
6279
+ const [query, setQuery] = (0, import_react41.useState)("");
6280
+ const [selectedCompetitionId, setSelectedCompetitionId] = (0, import_react41.useState)(null);
6281
+ const [toast, setToast] = (0, import_react41.useState)(null);
6282
+ (0, import_react41.useEffect)(() => {
6283
+ if (toast === null) return;
6284
+ const id = setTimeout(() => setToast(null), 4e3);
6285
+ return () => clearTimeout(id);
6286
+ }, [toast]);
5971
6287
  const visibleGroups = visibleGroupsOf(groups, states);
5972
- const liveRows = stale ? [] : visibleGroups.flatMap((group) => group.matches.filter((m) => isTreatedLive(states[m.matchId], stale)).map((match) => ({ match, rank: group.rank }))).sort((a, b) => a.rank - b.rank);
6288
+ const pinnedMatchIds = (0, import_react41.useMemo)(
6289
+ () => monitor.pins.filter((p) => p.kind === "match").map((p) => p.matchId),
6290
+ [monitor.pins]
6291
+ );
6292
+ const placement = (0, import_react41.useMemo)(() => placeLeagues(visibleGroups, pinnedMatchIds), [visibleGroups, pinnedMatchIds]);
6293
+ const starTap = useStarTap(starLeague);
6294
+ const gridStarTap = (0, import_react41.useMemo)(() => ({
6295
+ pendingId: starTap.pendingId,
6296
+ tap: async (competitionId, next) => {
6297
+ const ok = await starTap.tap(competitionId, next);
6298
+ if (ok) setToast(next ? "starred" : "unstarred");
6299
+ return ok;
6300
+ }
6301
+ }), [starTap, starTap.pendingId]);
5973
6302
  const nameCounts = visibleGroups.reduce((acc, g) => {
5974
6303
  acc[g.competitionName] = (acc[g.competitionName] ?? 0) + 1;
5975
6304
  return acc;
5976
6305
  }, {});
5977
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "ss-w-mon-list", children: [
5978
- stale && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "ss-w-stale", children: ui.staleStates }),
5979
- liveRows.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
5980
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "ss-w-sec-head", children: [
5981
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "ss-w-sec-dot", "aria-hidden": "true" }),
5982
- ui.sectionLive
5983
- ] }),
5984
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "ss-w-today-live", children: liveRows.map(({ match }) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
5985
- FixtureRow,
5986
- {
5987
- match,
5988
- state: states[match.matchId],
5989
- stale,
5990
- ui,
5991
- monitor
5992
- },
5993
- match.matchId
5994
- )) })
6306
+ const openIndex = selectedCompetitionId === null ? -1 : placement.order.findIndex((g) => g.competitionId === selectedCompetitionId);
6307
+ const openGroup = openIndex === -1 ? void 0 : placement.order[openIndex];
6308
+ (0, import_react41.useEffect)(() => {
6309
+ if (selectedCompetitionId !== null && openGroup === void 0) setSelectedCompetitionId(null);
6310
+ }, [selectedCompetitionId, openGroup]);
6311
+ const liveRows = stale ? [] : visibleGroups.flatMap((group) => group.matches.filter((m) => isTreatedLive(states[m.matchId], stale)).map((match) => ({ match, rank: group.rank }))).sort((a, b) => a.rank - b.rank);
6312
+ const liveBand = liveRows.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
6313
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "ss-w-sec-head", children: [
6314
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "ss-w-sec-dot", "aria-hidden": "true" }),
6315
+ ui.sectionLive
5995
6316
  ] }),
5996
- visibleGroups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
5997
- CompetitionGroup,
6317
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "ss-w-today-live", children: liveRows.map(({ match }) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
6318
+ FixtureRow,
5998
6319
  {
5999
- group,
6000
- open: expanded[group.competitionId] ?? group.expandedByDefault,
6001
- onToggle: () => toggleGroup(group.competitionId),
6002
- disambiguate: (nameCounts[group.competitionName] ?? 0) > 1,
6003
- states,
6320
+ match,
6321
+ state: states[match.matchId],
6004
6322
  stale,
6005
6323
  ui,
6006
6324
  monitor
6007
6325
  },
6008
- group.competitionId
6009
- ))
6326
+ match.matchId
6327
+ )) })
6328
+ ] });
6329
+ if (openGroup !== void 0) {
6330
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "ss-w-today-root", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "ss-w-mon-list", children: [
6331
+ stale && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "ss-w-stale", children: ui.staleStates }),
6332
+ liveBand,
6333
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
6334
+ LeagueDetail,
6335
+ {
6336
+ group: openGroup,
6337
+ position: { index: openIndex + 1, total: placement.order.length },
6338
+ states,
6339
+ stale,
6340
+ ui,
6341
+ monitor,
6342
+ starTap,
6343
+ onBack: () => setSelectedCompetitionId(null),
6344
+ onPrev: () => setSelectedCompetitionId(placement.order[Math.max(0, openIndex - 1)].competitionId),
6345
+ onNext: () => setSelectedCompetitionId(
6346
+ placement.order[Math.min(placement.order.length - 1, openIndex + 1)].competitionId
6347
+ )
6348
+ }
6349
+ )
6350
+ ] }) });
6351
+ }
6352
+ const searching = query.trim().length > 0;
6353
+ const searchResults = searching ? placement.order.filter((g) => matchesQuery(g, query)) : [];
6354
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "ss-w-today-root", children: [
6355
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "ss-w-mon-list", children: [
6356
+ stale && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "ss-w-stale", children: ui.staleStates }),
6357
+ !searching && liveBand,
6358
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
6359
+ SearchField,
6360
+ {
6361
+ id: searchId,
6362
+ label: ui.searchLeaguesPlaceholder,
6363
+ labelHidden: true,
6364
+ placeholder: ui.searchLeaguesPlaceholder,
6365
+ value: query,
6366
+ onChange: setQuery,
6367
+ clearLabel: ui.clearSearchLabel
6368
+ }
6369
+ ),
6370
+ searching ? searchResults.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "ss-w-today-empty", children: ui.noLeagueResults }) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_jsx_runtime60.Fragment, { children: searchResults.map((group) => /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "ss-w-today-search-block", children: [
6371
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "ss-w-today-search-group", children: [
6372
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Crest2, { url: group.competitionImagePath ?? void 0, name: group.competitionName, kind: "comp" }),
6373
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("span", { className: "ss-w-today-search-group-name", children: [
6374
+ group.competitionName,
6375
+ (nameCounts[group.competitionName] ?? 0) > 1 && group.competitionCountry ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("span", { className: "ss-w-today-tile-country", children: [
6376
+ " (",
6377
+ group.competitionCountry,
6378
+ ")"
6379
+ ] }) : null
6380
+ ] })
6381
+ ] }),
6382
+ group.matches.map((match) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
6383
+ "div",
6384
+ {
6385
+ role: "button",
6386
+ tabIndex: 0,
6387
+ className: "ss-w-today-search-row",
6388
+ onClick: () => setSelectedCompetitionId(group.competitionId),
6389
+ onKeyDown: (e) => {
6390
+ if (e.target !== e.currentTarget) return;
6391
+ if (e.key === "Enter" || e.key === " ") {
6392
+ e.preventDefault();
6393
+ setSelectedCompetitionId(group.competitionId);
6394
+ }
6395
+ },
6396
+ children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(FixtureRow, { match, state: states[match.matchId], stale, ui, monitor })
6397
+ },
6398
+ match.matchId
6399
+ ))
6400
+ ] }, group.competitionId)) }) : /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
6401
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "ss-w-today-sec", children: [
6402
+ placement.personal ? ui.yourLeagues : ui.topLeagues,
6403
+ !placement.personal && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "ss-w-today-sec-sub", children: ui.topLeaguesSub })
6404
+ ] }),
6405
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "ss-w-today-tiles", children: placement.candidates.map((group) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
6406
+ LeagueTile,
6407
+ {
6408
+ group,
6409
+ starClickable: starClickable(group, placement.pinnedCompetitionId),
6410
+ disambiguate: (nameCounts[group.competitionName] ?? 0) > 1,
6411
+ onOpen: () => setSelectedCompetitionId(group.competitionId),
6412
+ starTap: gridStarTap,
6413
+ ui
6414
+ },
6415
+ group.competitionId
6416
+ )) }),
6417
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "ss-w-today-sec", children: ui.allLeagues }),
6418
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "ss-w-today-tiles", children: placement.others.map((group) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
6419
+ LeagueTile,
6420
+ {
6421
+ group,
6422
+ starClickable: starClickable(group, placement.pinnedCompetitionId),
6423
+ disambiguate: (nameCounts[group.competitionName] ?? 0) > 1,
6424
+ onOpen: () => setSelectedCompetitionId(group.competitionId),
6425
+ starTap: gridStarTap,
6426
+ ui
6427
+ },
6428
+ group.competitionId
6429
+ )) })
6430
+ ] })
6431
+ ] }),
6432
+ toast !== null && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { className: "ss-w-today-toast", role: "status", "aria-live": "polite", children: toast === "starred" ? ui.starredToast : ui.unstarredToast })
6010
6433
  ] });
6011
6434
  }
6012
6435
 
6013
6436
  // src/components/GamesPanel.tsx
6014
- var import_react51 = require("react");
6437
+ var import_react55 = require("react");
6015
6438
 
6016
6439
  // src/components/GamesLoginWall.tsx
6017
- var import_jsx_runtime58 = require("react/jsx-runtime");
6440
+ var import_jsx_runtime61 = require("react/jsx-runtime");
6018
6441
  function GamesLoginWall({ ui }) {
6019
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "ss-w-mon-list", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "ss-w-games-wall", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { children: ui.gamesLoginRequired }) }) });
6442
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "ss-w-mon-list", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "ss-w-games-wall", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("p", { children: ui.gamesLoginRequired }) }) });
6020
6443
  }
6021
6444
 
6022
6445
  // src/components/GamesHub.tsx
6023
- var import_react38 = require("react");
6446
+ var import_react42 = require("react");
6024
6447
 
6025
6448
  // src/components/games/ui/gameMeta.ts
6026
6449
  function prettifyGameId(gameId) {
@@ -6036,108 +6459,74 @@ function splitName(full) {
6036
6459
  }
6037
6460
 
6038
6461
  // src/components/GameTileArt.tsx
6039
- var import_jsx_runtime59 = require("react/jsx-runtime");
6462
+ var import_jsx_runtime62 = require("react/jsx-runtime");
6040
6463
  function GameTileArt({ gameId }) {
6041
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("svg", { className: "ss-g-art", viewBox: "0 0 120 74", "aria-hidden": "true", children: ART[gameId] ?? ART.default });
6464
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("svg", { className: "ss-g-art", viewBox: "0 0 120 74", "aria-hidden": "true", children: ART[gameId] ?? ART.default });
6042
6465
  }
6043
- var head = (cx, cy, r, cls = "ss-g-art-fg") => /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("g", { className: cls, children: [
6044
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("circle", { cx, cy: cy - r * 0.3, r: r * 0.45 }),
6045
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("path", { d: `M${cx - r} ${cy + r}c0-${r * 0.8} ${r * 0.45}-${r * 1.1} ${r}-${r * 1.1}s${r} ${r * 0.3} ${r} ${r * 1.1}z` })
6466
+ var head = (cx, cy, r, cls = "ss-g-art-fg") => /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("g", { className: cls, children: [
6467
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("circle", { cx, cy: cy - r * 0.3, r: r * 0.45 }),
6468
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("path", { d: `M${cx - r} ${cy + r}c0-${r * 0.8} ${r * 0.45}-${r * 1.1} ${r}-${r * 1.1}s${r} ${r * 0.3} ${r} ${r * 1.1}z` })
6046
6469
  ] });
6047
6470
  var ART = {
6048
- "mystery-tiger": /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
6471
+ "mystery-tiger": /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
6049
6472
  head(60, 38, 26, "ss-g-art-fg"),
6050
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("text", { x: "60", y: "36", className: "ss-g-art-q", textAnchor: "middle", children: "?" })
6473
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("text", { x: "60", y: "36", className: "ss-g-art-q", textAnchor: "middle", children: "?" })
6051
6474
  ] }),
6052
- "higher-or-lower": /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
6475
+ "higher-or-lower": /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
6053
6476
  head(32, 38, 20),
6054
6477
  head(88, 38, 20),
6055
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("circle", { cx: "60", cy: "37", r: "11", className: "ss-g-art-accent" }),
6056
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("path", { d: "M57 33l3-3 3 3M57 41l3 3 3-3", className: "ss-g-art-ink" })
6478
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("circle", { cx: "60", cy: "37", r: "11", className: "ss-g-art-accent" }),
6479
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("path", { d: "M57 33l3-3 3 3M57 41l3 3 3-3", className: "ss-g-art-ink" })
6057
6480
  ] }),
6058
- "guess-the-xi": /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
6059
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("rect", { x: "8", y: "4", width: "104", height: "66", rx: "6", className: "ss-g-art-pitch" }),
6060
- [[60, 60, "a"], [24, 46], [48, 46], [72, 46], [96, 46], [36, 30], [60, 30], [84, 30], [40, 14], [60, 14], [80, 14]].map(([x, y, a], i) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("circle", { cx: x, cy: y, r: "4", className: a ? "ss-g-art-accent" : "ss-g-art-dot" }, i))
6481
+ "guess-the-xi": /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
6482
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("rect", { x: "8", y: "4", width: "104", height: "66", rx: "6", className: "ss-g-art-pitch" }),
6483
+ [[60, 60, "a"], [24, 46], [48, 46], [72, 46], [96, 46], [36, 30], [60, 30], [84, 30], [40, 14], [60, 14], [80, 14]].map(([x, y, a], i) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("circle", { cx: x, cy: y, r: "4", className: a ? "ss-g-art-accent" : "ss-g-art-dot" }, i))
6061
6484
  ] }),
6062
- "daily-quiz": /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_jsx_runtime59.Fragment, { children: [[14, 8], [62, 8], [14, 40], [62, 40]].map(([x, y], i) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("rect", { x, y, width: "44", height: "26", rx: "5", className: i === 1 ? "ss-g-art-correct" : "ss-g-art-block" }, i)) }),
6063
- "career-path": /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
6064
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("path", { d: "M18 22h24v10c0 7-5 11-12 13-7-2-12-6-12-13z", className: "ss-g-art-fg" }),
6065
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("path", { d: "M48 37h8M84 37h8", className: "ss-g-art-line" }),
6066
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("path", { d: "M60 22h24v10c0 7-5 11-12 13-7-2-12-6-12-13z", className: "ss-g-art-fg" }),
6067
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("rect", { x: "96", y: "22", width: "18", height: "26", rx: "4", className: "ss-g-art-dash" }),
6068
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("text", { x: "105", y: "40", className: "ss-g-art-q", textAnchor: "middle", children: "?" })
6485
+ "daily-quiz": /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_jsx_runtime62.Fragment, { children: [[14, 8], [62, 8], [14, 40], [62, 40]].map(([x, y], i) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("rect", { x, y, width: "44", height: "26", rx: "5", className: i === 1 ? "ss-g-art-correct" : "ss-g-art-block" }, i)) }),
6486
+ "career-path": /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
6487
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("path", { d: "M18 22h24v10c0 7-5 11-12 13-7-2-12-6-12-13z", className: "ss-g-art-fg" }),
6488
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("path", { d: "M48 37h8M84 37h8", className: "ss-g-art-line" }),
6489
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("path", { d: "M60 22h24v10c0 7-5 11-12 13-7-2-12-6-12-13z", className: "ss-g-art-fg" }),
6490
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("rect", { x: "96", y: "22", width: "18", height: "26", rx: "4", className: "ss-g-art-dash" }),
6491
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("text", { x: "105", y: "40", className: "ss-g-art-q", textAnchor: "middle", children: "?" })
6069
6492
  ] }),
6070
- "beat-the-grid": /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_jsx_runtime59.Fragment, { children: [0, 1, 2].flatMap((r) => [0, 1, 2].map((c) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("rect", { x: 33 + c * 19, y: 10 + r * 19, width: "16", height: "16", rx: "3", className: (r + c) % 3 === 0 ? "ss-g-art-accent" : "ss-g-art-block" }, `${r}${c}`))) }),
6071
- "matchday-predictor": /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
6072
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("path", { d: "M10 20h20v9c0 6-4 9-10 11-6-2-10-5-10-11z", className: "ss-g-art-fg" }),
6073
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("rect", { x: "38", y: "22", width: "18", height: "24", rx: "4", className: "ss-g-art-accent-stroke" }),
6074
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("rect", { x: "64", y: "22", width: "18", height: "24", rx: "4", className: "ss-g-art-dash" }),
6075
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("path", { d: "M90 20h20v9c0 6-4 9-10 11-6-2-10-5-10-11z", className: "ss-g-art-fg" })
6493
+ "beat-the-grid": /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_jsx_runtime62.Fragment, { children: [0, 1, 2].flatMap((r) => [0, 1, 2].map((c) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("rect", { x: 33 + c * 19, y: 10 + r * 19, width: "16", height: "16", rx: "3", className: (r + c) % 3 === 0 ? "ss-g-art-accent" : "ss-g-art-block" }, `${r}${c}`))) }),
6494
+ "matchday-predictor": /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
6495
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("path", { d: "M10 20h20v9c0 6-4 9-10 11-6-2-10-5-10-11z", className: "ss-g-art-fg" }),
6496
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("rect", { x: "38", y: "22", width: "18", height: "24", rx: "4", className: "ss-g-art-accent-stroke" }),
6497
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("rect", { x: "64", y: "22", width: "18", height: "24", rx: "4", className: "ss-g-art-dash" }),
6498
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("path", { d: "M90 20h20v9c0 6-4 9-10 11-6-2-10-5-10-11z", className: "ss-g-art-fg" })
6076
6499
  ] }),
6077
- "starting-xi": /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
6078
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("rect", { x: "8", y: "4", width: "104", height: "66", rx: "6", className: "ss-g-art-pitch" }),
6079
- [[60, 60], [30, 46], [50, 46], [70, 46], [90, 46], [45, 30], [75, 30], [30, 16], [60, 16], [90, 16]].map(([x, y], i) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("circle", { cx: x, cy: y, r: "5", className: i < 7 ? "ss-g-art-accent" : "ss-g-art-dash" }, i))
6500
+ "starting-xi": /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
6501
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("rect", { x: "8", y: "4", width: "104", height: "66", rx: "6", className: "ss-g-art-pitch" }),
6502
+ [[60, 60], [30, 46], [50, 46], [70, 46], [90, 46], [45, 30], [75, 30], [30, 16], [60, 16], [90, 16]].map(([x, y], i) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("circle", { cx: x, cy: y, r: "5", className: i < 7 ? "ss-g-art-accent" : "ss-g-art-dash" }, i))
6080
6503
  ] }),
6081
- "stat-ladder": /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_jsx_runtime59.Fragment, { children: [[20, 70], [34, 52], [48, 34]].map(([y, w], i) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("rect", { x: "24", y, width: w, height: "12", rx: "3", className: i === 1 ? "ss-g-art-accent" : "ss-g-art-block" }, i)) }),
6082
- "fan-motm": /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
6083
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("circle", { cx: "60", cy: "37", r: "26", className: "ss-g-art-accent-stroke" }),
6504
+ "stat-ladder": /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_jsx_runtime62.Fragment, { children: [[20, 70], [34, 52], [48, 34]].map(([y, w], i) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("rect", { x: "24", y, width: w, height: "12", rx: "3", className: i === 1 ? "ss-g-art-accent" : "ss-g-art-block" }, i)) }),
6505
+ "fan-motm": /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
6506
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("circle", { cx: "60", cy: "37", r: "26", className: "ss-g-art-accent-stroke" }),
6084
6507
  head(60, 40, 18),
6085
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("path", { d: "M84 8l2.4 5 5.4.6-4 3.7 1.1 5.4-4.9-2.7-4.9 2.7 1.1-5.4-4-3.7 5.4-.6z", className: "ss-g-art-accent" })
6508
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("path", { d: "M84 8l2.4 5 5.4.6-4 3.7 1.1 5.4-4.9-2.7-4.9 2.7 1.1-5.4-4-3.7 5.4-.6z", className: "ss-g-art-accent" })
6086
6509
  ] }),
6087
- default: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("circle", { cx: "60", cy: "37", r: "22", className: "ss-g-art-fg" })
6510
+ default: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("circle", { cx: "60", cy: "37", r: "22", className: "ss-g-art-fg" })
6088
6511
  };
6089
6512
 
6090
6513
  // src/components/games/ui/Chip.tsx
6091
- var import_jsx_runtime60 = require("react/jsx-runtime");
6514
+ var import_jsx_runtime63 = require("react/jsx-runtime");
6092
6515
  function Chip({ variant = "neutral", icon, children, className }) {
6093
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("span", { className: `ss-g-chip ss-g-chip--${variant}${className ? ` ${className}` : ""}`, children: [
6516
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("span", { className: `ss-g-chip ss-g-chip--${variant}${className ? ` ${className}` : ""}`, children: [
6094
6517
  icon,
6095
6518
  children
6096
6519
  ] });
6097
6520
  }
6098
6521
  function StatStack({ value, label }) {
6099
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("span", { className: "ss-g-statstack", children: [
6100
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "ss-g-statstack-v", children: value }),
6101
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "ss-g-statstack-l", children: label })
6522
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("span", { className: "ss-g-statstack", children: [
6523
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "ss-g-statstack-v", children: value }),
6524
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "ss-g-statstack-l", children: label })
6102
6525
  ] });
6103
6526
  }
6104
6527
 
6105
- // src/components/games/ui/icons.tsx
6106
- var import_jsx_runtime61 = require("react/jsx-runtime");
6107
- var svg = (size, children, fill = false) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
6108
- "svg",
6109
- {
6110
- width: size,
6111
- height: size,
6112
- viewBox: "0 0 24 24",
6113
- fill: fill ? "currentColor" : "none",
6114
- stroke: fill ? "none" : "currentColor",
6115
- strokeWidth: 2.2,
6116
- strokeLinecap: "round",
6117
- strokeLinejoin: "round",
6118
- "aria-hidden": "true",
6119
- children
6120
- }
6121
- );
6122
- var IconChevronLeft = ({ size = 20 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("path", { d: "M15 18l-6-6 6-6" }));
6123
- var IconLock = ({ size = 14 }) => svg(size, [/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("rect", { x: "5", y: "11", width: "14", height: "10", rx: "2" }, "a"), /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("path", { d: "M8 11V7a4 4 0 0 1 8 0v4" }, "b")]);
6124
- var IconCheck = ({ size = 14 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("path", { d: "M5 12l5 5 9-10" }));
6125
- var IconClose = ({ size = 16 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("path", { d: "M6 6l12 12M18 6L6 18" }));
6126
- var IconSearch = ({ size = 18 }) => svg(size, [/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("circle", { cx: "11", cy: "11", r: "7" }, "a"), /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("path", { d: "M20 20l-3.5-3.5" }, "b")]);
6127
- var IconPlus = ({ size = 20 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("path", { d: "M12 5v14M5 12h14" }));
6128
- var IconBulb = ({ size = 16 }) => svg(size, [/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("path", { d: "M9 18h6M10 21h4" }, "a"), /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("path", { d: "M12 3a6 6 0 0 0-3.5 10.9V16h7v-2.1A6 6 0 0 0 12 3z" }, "b")]);
6129
- var IconArrowUp = ({ size = 12 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("path", { d: "M12 19V5M5 12l7-7 7 7" }));
6130
- var IconArrowDown = ({ size = 12 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("path", { d: "M12 5v14M19 12l-7 7-7-7" }));
6131
- var IconCalendar = ({ size = 18 }) => svg(size, [/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("rect", { x: "4", y: "5", width: "16", height: "15", rx: "2" }, "a"), /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("path", { d: "M4 10h16M9 3v4M15 3v4" }, "b")]);
6132
- var IconShield = ({ size = 18 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("path", { d: "M12 3l7 3v6c0 5-3 8-7 9-4-1-7-4-7-9V6z" }));
6133
- var IconFlag = ({ size = 18 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("path", { d: "M5 21V4M5 4h12l-2 4 2 4H5" }));
6134
- var IconBall = ({ size = 18 }) => svg(size, [/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("circle", { cx: "12", cy: "12", r: "9" }, "a"), /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("path", { d: "M12 7l4 3-1.5 4.5h-5L8 10z" }, "b")]);
6135
- var IconBoot = ({ size = 18 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("path", { d: "M4 6h6l1 6 8 3v3H4z" }));
6136
- var IconGloves = ({ size = 18 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("path", { d: "M7 21v-8l-2-3V6a1.5 1.5 0 0 1 3 0v3V4a1.5 1.5 0 0 1 3 0v5V3.5a1.5 1.5 0 0 1 3 0V9V5a1.5 1.5 0 0 1 3 0v9l-2 3v4z" }));
6137
- var IconFlame = ({ size = 16 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("path", { d: "M12 3c1 4 5 5 5 10a5 5 0 0 1-10 0c0-3 2-4 2-7 1.5 1 2 2 2 3 1-2 1-4 1-6z" }), true);
6138
-
6139
6528
  // src/components/GameTile.tsx
6140
- var import_jsx_runtime62 = require("react/jsx-runtime");
6529
+ var import_jsx_runtime64 = require("react/jsx-runtime");
6141
6530
  function tileStatus(game, ui) {
6142
6531
  switch (game.status) {
6143
6532
  case "locked":
@@ -6161,38 +6550,38 @@ function GameTile({ game, onOpen, ui, variant = "tile" }) {
6161
6550
  const status = tileStatus(game, ui);
6162
6551
  const disabled = DISABLED.has(game.status);
6163
6552
  const title = gameTitle(game, ui.games.titles);
6164
- const body = variant === "hero" ? /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
6165
- /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("span", { className: "ss-g-hero-text", children: [
6166
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "ss-g-hero-eyebrow", children: ui.games.dailyChallenge }),
6167
- status.tone === "new" && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Chip, { variant: "badge", children: ui.games.newToday }),
6168
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "ss-g-hero-title", children: title }),
6169
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "ss-g-hero-sub", children: ui.games.taglines[game.gameId] ?? "" }),
6170
- status.tone === "success" ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "ss-g-tile-status", "data-tone": "success", children: status.text }) : /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("span", { className: "ss-g-hero-cta", children: [
6553
+ const body = variant === "hero" ? /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_jsx_runtime64.Fragment, { children: [
6554
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("span", { className: "ss-g-hero-text", children: [
6555
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "ss-g-hero-eyebrow", children: ui.games.dailyChallenge }),
6556
+ status.tone === "new" && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Chip, { variant: "badge", children: ui.games.newToday }),
6557
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "ss-g-hero-title", children: title }),
6558
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "ss-g-hero-sub", children: ui.games.taglines[game.gameId] ?? "" }),
6559
+ status.tone === "success" ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "ss-g-tile-status", "data-tone": "success", children: status.text }) : /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("span", { className: "ss-g-hero-cta", children: [
6171
6560
  status.tone === "accent" ? ui.games.resume : ui.games.playNow,
6172
6561
  " \u2192"
6173
6562
  ] })
6174
6563
  ] }),
6175
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "ss-g-hero-art", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(GameTileArt, { gameId: game.gameId }) })
6176
- ] }) : variant === "wide" ? /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
6177
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "ss-g-wide-art", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(GameTileArt, { gameId: game.gameId }) }),
6178
- /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("span", { className: "ss-g-wide-text", children: [
6179
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "ss-g-tile-title", children: title }),
6180
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "ss-g-tile-status", "data-tone": status.tone, children: status.text }),
6181
- status.tone === "new" && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Chip, { variant: "badge", children: ui.games.newToday })
6564
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "ss-g-hero-art", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(GameTileArt, { gameId: game.gameId }) })
6565
+ ] }) : variant === "wide" ? /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_jsx_runtime64.Fragment, { children: [
6566
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "ss-g-wide-art", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(GameTileArt, { gameId: game.gameId }) }),
6567
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("span", { className: "ss-g-wide-text", children: [
6568
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "ss-g-tile-title", children: title }),
6569
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "ss-g-tile-status", "data-tone": status.tone, children: status.text }),
6570
+ status.tone === "new" && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Chip, { variant: "badge", children: ui.games.newToday })
6182
6571
  ] }),
6183
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "ss-g-wide-chev", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(IconChevronLeft, { size: 18 }) })
6184
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
6185
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "ss-g-tile-art", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(GameTileArt, { gameId: game.gameId }) }),
6186
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "ss-g-tile-title", children: title }),
6187
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "ss-g-tile-status", "data-tone": status.tone, children: status.text })
6572
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "ss-g-wide-chev", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(IconChevronLeft, { size: 18 }) })
6573
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_jsx_runtime64.Fragment, { children: [
6574
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "ss-g-tile-art", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(GameTileArt, { gameId: game.gameId }) }),
6575
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "ss-g-tile-title", children: title }),
6576
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "ss-g-tile-status", "data-tone": status.tone, children: status.text })
6188
6577
  ] });
6189
6578
  const cls = `ss-g-tile ss-g-tile--${variant}`;
6190
- if (disabled) return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: cls, "data-disabled": true, "aria-disabled": "true", children: body });
6191
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("button", { type: "button", className: cls, "aria-label": `${title} \u2014 ${status.text}`, onClick: () => onOpen(game), children: body });
6579
+ if (disabled) return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: cls, "data-disabled": true, "aria-disabled": "true", children: body });
6580
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("button", { type: "button", className: cls, "aria-label": `${title} \u2014 ${status.text}`, onClick: () => onOpen(game), children: body });
6192
6581
  }
6193
6582
 
6194
6583
  // src/components/GamesHub.tsx
6195
- var import_jsx_runtime63 = require("react/jsx-runtime");
6584
+ var import_jsx_runtime65 = require("react/jsx-runtime");
6196
6585
  var PLAYABLE = /* @__PURE__ */ new Set(["available", "in_progress"]);
6197
6586
  var DONE = /* @__PURE__ */ new Set(["played", "graded"]);
6198
6587
  function pickHeroGame(games) {
@@ -6205,8 +6594,8 @@ function pickHeroGame(games) {
6205
6594
  }
6206
6595
  var tileKey = (g) => `${g.gameId}-${g.gameDay}-${g.fixtureId}`;
6207
6596
  function GamesHub({ games, myWeeklyRow, weeklyPrize, onOpen, ui }) {
6208
- const [, setTick] = (0, import_react38.useState)(0);
6209
- (0, import_react38.useEffect)(() => {
6597
+ const [, setTick] = (0, import_react42.useState)(0);
6598
+ (0, import_react42.useEffect)(() => {
6210
6599
  const id = setInterval(() => setTick((t) => t + 1), 6e4);
6211
6600
  return () => clearInterval(id);
6212
6601
  }, []);
@@ -6218,58 +6607,58 @@ function GamesHub({ games, myWeeklyRow, weeklyPrize, onOpen, ui }) {
6218
6607
  const kickoffs = fixtures.map((g) => g.kickoffUtc).filter((k) => !!k).sort();
6219
6608
  const todayPts = games.filter((g) => DONE.has(g.status)).reduce((s, g) => s + (g.score ?? 0), 0);
6220
6609
  const dash = "\u2014";
6221
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "ss-g-hub", children: [
6222
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "ss-g-stats", children: [
6223
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "ss-g-stat", children: [
6224
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "ss-g-stat-l", children: ui.games.statStreak }),
6225
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("span", { className: "ss-g-stat-v", "data-testid": "stat-streak", children: [
6226
- myWeeklyRow ? /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_jsx_runtime63.Fragment, { children: [
6227
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(IconFlame, {}),
6610
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "ss-g-hub", children: [
6611
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "ss-g-stats", children: [
6612
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "ss-g-stat", children: [
6613
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "ss-g-stat-l", children: ui.games.statStreak }),
6614
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("span", { className: "ss-g-stat-v", "data-testid": "stat-streak", children: [
6615
+ myWeeklyRow ? /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx_runtime65.Fragment, { children: [
6616
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(IconFlame, {}),
6228
6617
  myWeeklyRow.currentStreak
6229
6618
  ] }) : dash,
6230
- myWeeklyRow && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("small", { children: ui.games.unitDays })
6619
+ myWeeklyRow && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("small", { children: ui.games.unitDays })
6231
6620
  ] })
6232
6621
  ] }),
6233
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "ss-g-stat", children: [
6234
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "ss-g-stat-l", children: ui.games.statToday }),
6235
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("span", { className: "ss-g-stat-v ss-g-stat-v--accent", "data-testid": "stat-today", children: [
6622
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "ss-g-stat", children: [
6623
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "ss-g-stat-l", children: ui.games.statToday }),
6624
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("span", { className: "ss-g-stat-v ss-g-stat-v--accent", "data-testid": "stat-today", children: [
6236
6625
  ui.games.formatPts(todayPts),
6237
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("small", { children: ui.games.unitPts })
6626
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("small", { children: ui.games.unitPts })
6238
6627
  ] })
6239
6628
  ] }),
6240
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "ss-g-stat", children: [
6241
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "ss-g-stat-l", children: ui.games.statRank }),
6242
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("span", { className: "ss-g-stat-v", "data-testid": "stat-rank", children: [
6629
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "ss-g-stat", children: [
6630
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "ss-g-stat-l", children: ui.games.statRank }),
6631
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("span", { className: "ss-g-stat-v", "data-testid": "stat-rank", children: [
6243
6632
  myWeeklyRow ? `#${myWeeklyRow.rank}` : dash,
6244
- myWeeklyRow && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("small", { children: ui.games.thisWeek })
6633
+ myWeeklyRow && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("small", { children: ui.games.thisWeek })
6245
6634
  ] })
6246
6635
  ] })
6247
6636
  ] }),
6248
- weeklyPrize && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Chip, { variant: "accent", className: "ss-g-prize", children: weeklyPrize }),
6249
- hero && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(GameTile, { game: hero, onOpen, ui, variant: "hero" }),
6250
- (grid.length > 0 || wide) && /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("section", { className: "ss-g-sec", children: [
6251
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "ss-g-sec-head", children: [
6252
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("h3", { children: ui.games.dailyGames }),
6253
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { children: ui.games.newSetAtMidnight })
6637
+ weeklyPrize && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Chip, { variant: "accent", className: "ss-g-prize", children: weeklyPrize }),
6638
+ hero && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(GameTile, { game: hero, onOpen, ui, variant: "hero" }),
6639
+ (grid.length > 0 || wide) && /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("section", { className: "ss-g-sec", children: [
6640
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "ss-g-sec-head", children: [
6641
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("h3", { children: ui.games.dailyGames }),
6642
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: ui.games.newSetAtMidnight })
6254
6643
  ] }),
6255
- grid.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "ss-g-grid", children: grid.map((g) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(GameTile, { game: g, onOpen, ui }, tileKey(g))) }),
6256
- wide && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(GameTile, { game: wide, onOpen, ui, variant: "wide" })
6644
+ grid.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "ss-g-grid", children: grid.map((g) => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(GameTile, { game: g, onOpen, ui }, tileKey(g))) }),
6645
+ wide && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(GameTile, { game: wide, onOpen, ui, variant: "wide" })
6257
6646
  ] }),
6258
- fixtures.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("section", { className: "ss-g-sec", children: [
6259
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "ss-g-sec-head", children: [
6260
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("h3", { children: ui.games.matchdayGames }),
6261
- kickoffs[0] && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { children: ui.games.kickoffAt(ui.games.formatDayTime(kickoffs[0])) })
6647
+ fixtures.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("section", { className: "ss-g-sec", children: [
6648
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "ss-g-sec-head", children: [
6649
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("h3", { children: ui.games.matchdayGames }),
6650
+ kickoffs[0] && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: ui.games.kickoffAt(ui.games.formatDayTime(kickoffs[0])) })
6262
6651
  ] }),
6263
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "ss-g-grid", children: fixtures.map((g) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(GameTile, { game: g, onOpen, ui }, tileKey(g))) })
6652
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "ss-g-grid", children: fixtures.map((g) => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(GameTile, { game: g, onOpen, ui }, tileKey(g))) })
6264
6653
  ] })
6265
6654
  ] });
6266
6655
  }
6267
6656
 
6268
6657
  // src/components/GameScreenHost.tsx
6269
- var import_react50 = require("react");
6658
+ var import_react54 = require("react");
6270
6659
 
6271
6660
  // src/useGamePlay.ts
6272
- var import_react39 = require("react");
6661
+ var import_react43 = require("react");
6273
6662
  function toSubmitResult(payload) {
6274
6663
  return {
6275
6664
  // 'pending' means the play is recorded but awaiting resolution (fixture games)
@@ -6281,17 +6670,17 @@ function toSubmitResult(payload) {
6281
6670
  };
6282
6671
  }
6283
6672
  function useGamePlay(conversation, { gameId, gameDay, fixtureId, locale, refresh }) {
6284
- const [result, setResult] = (0, import_react39.useState)(null);
6285
- const [submitting, setSubmitting] = (0, import_react39.useState)(false);
6286
- const [rawStatus, setRawStatus] = (0, import_react39.useState)(null);
6287
- const inFlightRef = (0, import_react39.useRef)(false);
6288
- const convRef = (0, import_react39.useRef)(conversation);
6673
+ const [result, setResult] = (0, import_react43.useState)(null);
6674
+ const [submitting, setSubmitting] = (0, import_react43.useState)(false);
6675
+ const [rawStatus, setRawStatus] = (0, import_react43.useState)(null);
6676
+ const inFlightRef = (0, import_react43.useRef)(false);
6677
+ const convRef = (0, import_react43.useRef)(conversation);
6289
6678
  convRef.current = conversation;
6290
- const optsRef = (0, import_react39.useRef)({ gameId, gameDay, fixtureId, locale, refresh });
6679
+ const optsRef = (0, import_react43.useRef)({ gameId, gameDay, fixtureId, locale, refresh });
6291
6680
  optsRef.current = { gameId, gameDay, fixtureId, locale, refresh };
6292
- const resultRef = (0, import_react39.useRef)(null);
6681
+ const resultRef = (0, import_react43.useRef)(null);
6293
6682
  resultRef.current = result;
6294
- const refetch = (0, import_react39.useCallback)(async () => {
6683
+ const refetch = (0, import_react43.useCallback)(async () => {
6295
6684
  const conv = convRef.current;
6296
6685
  if (!conv) return;
6297
6686
  const opts = optsRef.current;
@@ -6307,7 +6696,7 @@ function useGamePlay(conversation, { gameId, gameDay, fixtureId, locale, refresh
6307
6696
  } catch {
6308
6697
  }
6309
6698
  }, []);
6310
- const submit = (0, import_react39.useCallback)(async (answerJson) => {
6699
+ const submit = (0, import_react43.useCallback)(async (answerJson) => {
6311
6700
  const conv = convRef.current;
6312
6701
  if (!conv || inFlightRef.current) return;
6313
6702
  inFlightRef.current = true;
@@ -6334,14 +6723,14 @@ function useGamePlay(conversation, { gameId, gameDay, fixtureId, locale, refresh
6334
6723
  setSubmitting(false);
6335
6724
  }
6336
6725
  }, [refetch]);
6337
- const hydrate = (0, import_react39.useCallback)(() => {
6726
+ const hydrate = (0, import_react43.useCallback)(() => {
6338
6727
  void refetch();
6339
6728
  }, [refetch]);
6340
6729
  return { result, submitting, submit, hydrate, rawStatus };
6341
6730
  }
6342
6731
 
6343
6732
  // src/components/games/MysteryTigerGame.tsx
6344
- var import_react41 = require("react");
6733
+ var import_react45 = require("react");
6345
6734
 
6346
6735
  // src/components/games/nationFlags.ts
6347
6736
  var FLAGS = {
@@ -6552,8 +6941,8 @@ function isNationCode(flag) {
6552
6941
  }
6553
6942
 
6554
6943
  // src/components/games/PlayerAvatar.tsx
6555
- var import_react40 = require("react");
6556
- var import_jsx_runtime64 = require("react/jsx-runtime");
6944
+ var import_react44 = require("react");
6945
+ var import_jsx_runtime66 = require("react/jsx-runtime");
6557
6946
  function initialsOf(name) {
6558
6947
  const parts = name.trim().split(/\s+/).filter(Boolean);
6559
6948
  const first = parts[0];
@@ -6570,41 +6959,41 @@ function PlayerAvatar({
6570
6959
  imagePath,
6571
6960
  className
6572
6961
  }) {
6573
- const [failed, setFailed] = (0, import_react40.useState)(false);
6962
+ const [failed, setFailed] = (0, import_react44.useState)(false);
6574
6963
  const showImage = Boolean(imagePath) && !isPlaceholderImage(imagePath) && !failed;
6575
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className, "aria-hidden": "true", children: showImage ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("img", { src: imagePath, alt: "", loading: "lazy", onError: () => setFailed(true) }) : /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "ss-w-av-initials", children: initialsOf(name) }) });
6964
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className, "aria-hidden": "true", children: showImage ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("img", { src: imagePath, alt: "", loading: "lazy", onError: () => setFailed(true) }) : /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "ss-w-av-initials", children: initialsOf(name) }) });
6576
6965
  }
6577
6966
 
6578
6967
  // src/components/games/ui/GameHeader.tsx
6579
- var import_jsx_runtime65 = require("react/jsx-runtime");
6968
+ var import_jsx_runtime67 = require("react/jsx-runtime");
6580
6969
  function GameHeader({ title, eyebrow, right, onBack, backLabel }) {
6581
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "ss-g-head", children: [
6582
- onBack && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("button", { type: "button", className: "ss-g-back", "aria-label": backLabel, onClick: onBack, children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(IconChevronLeft, {}) }),
6583
- /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "ss-g-head-text", children: [
6584
- eyebrow && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "ss-g-eyebrow", children: eyebrow }),
6585
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("h2", { className: "ss-g-title", children: title })
6970
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "ss-g-head", children: [
6971
+ onBack && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("button", { type: "button", className: "ss-g-back", "aria-label": backLabel, onClick: onBack, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(IconChevronLeft, {}) }),
6972
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "ss-g-head-text", children: [
6973
+ eyebrow && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "ss-g-eyebrow", children: eyebrow }),
6974
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("h2", { className: "ss-g-title", children: title })
6586
6975
  ] }),
6587
- right && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "ss-g-head-right", children: right })
6976
+ right && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "ss-g-head-right", children: right })
6588
6977
  ] });
6589
6978
  }
6590
6979
 
6591
6980
  // src/components/games/ui/SegmentProgress.tsx
6592
- var import_jsx_runtime66 = require("react/jsx-runtime");
6981
+ var import_jsx_runtime68 = require("react/jsx-runtime");
6593
6982
  function SegmentProgress({ segments, ariaLabel, leftLabel, rightLabel, right }) {
6594
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "ss-g-progress", children: [
6595
- /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "ss-g-progress-main", children: [
6596
- (leftLabel || rightLabel) && /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "ss-g-progress-labels", children: [
6597
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { children: leftLabel }),
6598
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "ss-g-progress-rl", children: rightLabel })
6983
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "ss-g-progress", children: [
6984
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "ss-g-progress-main", children: [
6985
+ (leftLabel || rightLabel) && /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "ss-g-progress-labels", children: [
6986
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { children: leftLabel }),
6987
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "ss-g-progress-rl", children: rightLabel })
6599
6988
  ] }),
6600
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
6989
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
6601
6990
  "div",
6602
6991
  {
6603
6992
  className: "ss-g-segs",
6604
6993
  role: "img",
6605
6994
  "aria-label": ariaLabel,
6606
6995
  style: { gridTemplateColumns: `repeat(${segments.length}, minmax(0, 1fr))` },
6607
- children: segments.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "ss-g-seg", "data-state": s }, i))
6996
+ children: segments.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "ss-g-seg", "data-state": s }, i))
6608
6997
  }
6609
6998
  )
6610
6999
  ] }),
@@ -6612,38 +7001,13 @@ function SegmentProgress({ segments, ariaLabel, leftLabel, rightLabel, right })
6612
7001
  ] });
6613
7002
  }
6614
7003
 
6615
- // src/components/games/ui/SearchField.tsx
6616
- var import_jsx_runtime67 = require("react/jsx-runtime");
6617
- function SearchField({ id, label, labelHidden = false, placeholder, value, onChange, disabled, inputRef, onKeyDown }) {
6618
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "ss-g-search", children: [
6619
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("label", { htmlFor: id, className: labelHidden ? "ss-g-sr" : "ss-g-search-label", children: label }),
6620
- /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "ss-g-search-box", children: [
6621
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(IconSearch, {}),
6622
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
6623
- "input",
6624
- {
6625
- id,
6626
- ref: inputRef,
6627
- type: "text",
6628
- autoComplete: "off",
6629
- placeholder,
6630
- value,
6631
- disabled,
6632
- onKeyDown,
6633
- onChange: (e) => onChange(e.target.value)
6634
- }
6635
- )
6636
- ] })
6637
- ] });
6638
- }
6639
-
6640
7004
  // src/components/games/ui/AnswerTray.tsx
6641
- var import_jsx_runtime68 = require("react/jsx-runtime");
7005
+ var import_jsx_runtime69 = require("react/jsx-runtime");
6642
7006
  function AnswerTray({ id, label, placeholder, optionsLabel, options, query, onQuery, onPick, disabled, minQuery = 0 }) {
6643
7007
  const needle = query.trim().toLowerCase();
6644
7008
  const shown = needle.length < minQuery ? [] : needle ? options.filter((o) => o.name.toLowerCase().includes(needle)) : options;
6645
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_jsx_runtime68.Fragment, { children: [
6646
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
7009
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_jsx_runtime69.Fragment, { children: [
7010
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
6647
7011
  SearchField,
6648
7012
  {
6649
7013
  id,
@@ -6655,9 +7019,9 @@ function AnswerTray({ id, label, placeholder, optionsLabel, options, query, onQu
6655
7019
  disabled
6656
7020
  }
6657
7021
  ),
6658
- shown.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "ss-g-tray", role: "listbox", "aria-label": optionsLabel, children: shown.map((o) => {
7022
+ shown.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "ss-g-tray", role: "listbox", "aria-label": optionsLabel, children: shown.map((o) => {
6659
7023
  const { first, last } = splitName(o.name);
6660
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
7024
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
6661
7025
  "button",
6662
7026
  {
6663
7027
  type: "button",
@@ -6668,10 +7032,10 @@ function AnswerTray({ id, label, placeholder, optionsLabel, options, query, onQu
6668
7032
  disabled,
6669
7033
  onClick: () => onPick(o.id),
6670
7034
  children: [
6671
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(PlayerAvatar, { className: "ss-g-tray-av", name: o.name, imagePath: o.imagePath }),
6672
- /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("span", { className: "ss-g-tray-name", "aria-hidden": "true", children: [
6673
- first && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "ss-g-tray-first", children: first }),
6674
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "ss-g-tray-last", children: last })
7035
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(PlayerAvatar, { className: "ss-g-tray-av", name: o.name, imagePath: o.imagePath }),
7036
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("span", { className: "ss-g-tray-name", "aria-hidden": "true", children: [
7037
+ first && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "ss-g-tray-first", children: first }),
7038
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "ss-g-tray-last", children: last })
6675
7039
  ] })
6676
7040
  ]
6677
7041
  },
@@ -6682,59 +7046,59 @@ function AnswerTray({ id, label, placeholder, optionsLabel, options, query, onQu
6682
7046
  }
6683
7047
 
6684
7048
  // src/components/games/ui/FooterBar.tsx
6685
- var import_jsx_runtime69 = require("react/jsx-runtime");
7049
+ var import_jsx_runtime70 = require("react/jsx-runtime");
6686
7050
  function FooterBar({ children }) {
6687
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "ss-g-footer", children });
7051
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "ss-g-footer", children });
6688
7052
  }
6689
7053
 
6690
7054
  // src/components/games/ui/Silhouette.tsx
6691
- var import_jsx_runtime70 = require("react/jsx-runtime");
7055
+ var import_jsx_runtime71 = require("react/jsx-runtime");
6692
7056
  function Silhouette({ size, variant = "default" }) {
6693
- return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("span", { className: `ss-g-sil ss-g-sil--${variant}`, style: { width: size, height: size }, "aria-hidden": "true", children: [
6694
- /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("svg", { width: size * 0.86, height: size * 0.86, viewBox: "0 0 100 100", children: [
6695
- /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("circle", { cx: "50", cy: "40", r: "19", fill: "currentColor" }),
6696
- /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("path", { d: "M12 100c0-23 17-38 38-38s38 15 38 38z", fill: "currentColor" })
7057
+ return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("span", { className: `ss-g-sil ss-g-sil--${variant}`, style: { width: size, height: size }, "aria-hidden": "true", children: [
7058
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("svg", { width: size * 0.86, height: size * 0.86, viewBox: "0 0 100 100", children: [
7059
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("circle", { cx: "50", cy: "40", r: "19", fill: "currentColor" }),
7060
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("path", { d: "M12 100c0-23 17-38 38-38s38 15 38 38z", fill: "currentColor" })
6697
7061
  ] }),
6698
- variant === "mystery" && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "ss-g-sil-q", children: "?" })
7062
+ variant === "mystery" && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "ss-g-sil-q", children: "?" })
6699
7063
  ] });
6700
7064
  }
6701
7065
 
6702
7066
  // src/components/games/ui/GameButton.tsx
6703
- var import_jsx_runtime71 = require("react/jsx-runtime");
7067
+ var import_jsx_runtime72 = require("react/jsx-runtime");
6704
7068
  function GameButton({ variant = "primary", block = false, className, type = "button", ...rest }) {
6705
7069
  const cls = `ss-g-btn ss-g-btn--${variant}${block ? " ss-g-btn--block" : ""}${className ? ` ${className}` : ""}`;
6706
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("button", { type, className: cls, ...rest });
7070
+ return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("button", { type, className: cls, ...rest });
6707
7071
  }
6708
7072
 
6709
7073
  // src/components/games/ui/ResultCard.tsx
6710
- var import_jsx_runtime72 = require("react/jsx-runtime");
7074
+ var import_jsx_runtime73 = require("react/jsx-runtime");
6711
7075
  function ResultCard({ tone, title, score, detail, onBack, ui }) {
6712
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "ss-g-result", "data-tone": tone, role: "status", children: [
6713
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "ss-g-result-title", children: title }),
6714
- score !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("span", { className: "ss-g-result-score", children: [
6715
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "ss-g-result-num", children: score }),
7076
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "ss-g-result", "data-tone": tone, role: "status", children: [
7077
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "ss-g-result-title", children: title }),
7078
+ score !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("span", { className: "ss-g-result-score", children: [
7079
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "ss-g-result-num", children: score }),
6716
7080
  ui.games.unitPts
6717
7081
  ] }),
6718
- detail && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "ss-g-result-detail", children: detail }),
6719
- onBack && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(GameButton, { variant: "outline", onClick: onBack, children: ui.games.backToGames })
7082
+ detail && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "ss-g-result-detail", children: detail }),
7083
+ onBack && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(GameButton, { variant: "outline", onClick: onBack, children: ui.games.backToGames })
6720
7084
  ] });
6721
7085
  }
6722
7086
 
6723
7087
  // src/components/games/ui/PointsLadderRow.tsx
6724
- var import_jsx_runtime73 = require("react/jsx-runtime");
7088
+ var import_jsx_runtime74 = require("react/jsx-runtime");
6725
7089
  function PointsLadderRow({ ladder, guessesUsed, ui }) {
6726
7090
  if (!ladder || ladder.length === 0) return null;
6727
7091
  const now = ladder[Math.min(guessesUsed, ladder.length - 1)];
6728
7092
  const next = ladder[guessesUsed + 1];
6729
7093
  if (now === void 0) return null;
6730
- return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "ss-g-worth", "data-testid": "points-ladder", children: [
6731
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "ss-g-worth-now", children: ui.games.worthNow(now) }),
6732
- next !== void 0 && next !== now && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "ss-g-worth-next", children: ui.games.worthAfterMiss(next) })
7094
+ return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "ss-g-worth", "data-testid": "points-ladder", children: [
7095
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "ss-g-worth-now", children: ui.games.worthNow(now) }),
7096
+ next !== void 0 && next !== now && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "ss-g-worth-next", children: ui.games.worthAfterMiss(next) })
6733
7097
  ] });
6734
7098
  }
6735
7099
 
6736
7100
  // src/components/games/MysteryTigerGame.tsx
6737
- var import_jsx_runtime74 = require("react/jsx-runtime");
7101
+ var import_jsx_runtime75 = require("react/jsx-runtime");
6738
7102
  function parseClientState(json) {
6739
7103
  if (!json) return null;
6740
7104
  try {
@@ -6836,8 +7200,8 @@ function MysteryTigerGame({
6836
7200
  onBack
6837
7201
  }) {
6838
7202
  const t = ui.games.mysteryTiger;
6839
- const [query, setQuery] = (0, import_react41.useState)("");
6840
- const inputId = (0, import_react41.useId)();
7203
+ const [query, setQuery] = (0, import_react45.useState)("");
7204
+ const inputId = (0, import_react45.useId)();
6841
7205
  const clientState = parseClientState(result?.clientStateJson);
6842
7206
  const guessResults = clientState?.guessResults ?? [];
6843
7207
  const alreadyGuessedIds = new Set(guessResults.map((g) => g.playerId));
@@ -6856,22 +7220,22 @@ function MysteryTigerGame({
6856
7220
  setQuery("");
6857
7221
  onSubmit(JSON.stringify({ guesses: newGuesses }));
6858
7222
  }
6859
- const headerRight = !config ? void 0 : isOver ? /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(Chip, { variant: "accent", children: [
7223
+ const headerRight = !config ? void 0 : isOver ? /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(Chip, { variant: "accent", children: [
6860
7224
  score,
6861
7225
  " ",
6862
7226
  ui.games.unitPts
6863
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { "data-testid": "mt-chip", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(Chip, { children: [
7227
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { "data-testid": "mt-chip", children: /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(Chip, { children: [
6864
7228
  ui.games.guess,
6865
7229
  " ",
6866
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "ss-g-num", children: guessesUsed + 1 }),
7230
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "ss-g-num", children: guessesUsed + 1 }),
6867
7231
  " / ",
6868
7232
  totalGuesses
6869
7233
  ] }) });
6870
7234
  const segments = Array.from({ length: totalGuesses }, (_, i) => i < guessesUsed ? "done" : i === guessesUsed ? "current" : "todo");
6871
7235
  const cols = { gridTemplateColumns: `minmax(0, 1fr) repeat(${keys.length}, 42px)` };
6872
7236
  const known = deriveKnownAttributes(guessResults, keys);
6873
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "ss-g-screen ss-g-mt", "data-game": "mystery-tiger", "data-testid": "game-screen-mystery-tiger", children: [
6874
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
7237
+ return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "ss-g-screen ss-g-mt", "data-game": "mystery-tiger", "data-testid": "game-screen-mystery-tiger", children: [
7238
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
6875
7239
  GameHeader,
6876
7240
  {
6877
7241
  title: gameTitle({ gameId: "mystery-tiger" }, ui.games.titles),
@@ -6881,41 +7245,41 @@ function MysteryTigerGame({
6881
7245
  backLabel: ui.back
6882
7246
  }
6883
7247
  ),
6884
- !config && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading }),
6885
- config && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(import_jsx_runtime74.Fragment, { children: [
6886
- /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "ss-g-body", children: [
6887
- !isOver && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed, ui }),
6888
- /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: `ss-g-mt-card${isOver ? " ss-g-mt-card--reveal" : ""}`, children: [
6889
- /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "ss-g-mt-portrait", children: [
6890
- revealName ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(PlayerAvatar, { className: "ss-g-mt-photo", name: revealName, imagePath: clientState?.revealedPlayerImagePath }) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Silhouette, { size: 150, variant: "mystery" }),
6891
- revealName && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "ss-g-mt-reveal-name", children: revealName })
7248
+ !config && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading }),
7249
+ config && /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(import_jsx_runtime75.Fragment, { children: [
7250
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "ss-g-body", children: [
7251
+ !isOver && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed, ui }),
7252
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: `ss-g-mt-card${isOver ? " ss-g-mt-card--reveal" : ""}`, children: [
7253
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "ss-g-mt-portrait", children: [
7254
+ revealName ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(PlayerAvatar, { className: "ss-g-mt-photo", name: revealName, imagePath: clientState?.revealedPlayerImagePath }) : /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Silhouette, { size: 150, variant: "mystery" }),
7255
+ revealName && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "ss-g-mt-reveal-name", children: revealName })
6892
7256
  ] }),
6893
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "ss-g-mt-known", style: { gridTemplateColumns: `repeat(${keys.length}, minmax(0, 1fr))` }, children: known.map((k) => /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "ss-g-mt-known-cell", children: [
6894
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "ss-g-mt-lab", children: t.labels[k.key] }),
6895
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "ss-g-mt-known-v", "data-state": k.state, "data-testid": `known-${k.key}`, children: k.text })
7257
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "ss-g-mt-known", style: { gridTemplateColumns: `repeat(${keys.length}, minmax(0, 1fr))` }, children: known.map((k) => /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "ss-g-mt-known-cell", children: [
7258
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "ss-g-mt-lab", children: t.labels[k.key] }),
7259
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "ss-g-mt-known-v", "data-state": k.state, "data-testid": `known-${k.key}`, children: k.text })
6896
7260
  ] }, k.key)) })
6897
7261
  ] }),
6898
- !isOver && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(SegmentProgress, { segments, ariaLabel: t.progress(guessesUsed, totalGuesses) }),
6899
- guessResults.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "ss-g-mt-table", children: [
6900
- /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "ss-g-mt-thead", style: cols, children: [
6901
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { children: t.yourGuesses }),
6902
- keys.map((k) => /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { children: t.labels[k] }, k))
7262
+ !isOver && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(SegmentProgress, { segments, ariaLabel: t.progress(guessesUsed, totalGuesses) }),
7263
+ guessResults.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "ss-g-mt-table", children: [
7264
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "ss-g-mt-thead", style: cols, children: [
7265
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { children: t.yourGuesses }),
7266
+ keys.map((k) => /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { children: t.labels[k] }, k))
6903
7267
  ] }),
6904
7268
  guessResults.map((gr, i) => {
6905
7269
  const name = config.squadPlayers.find((p) => p.id === gr.playerId)?.name ?? `#${gr.playerId}`;
6906
7270
  const { first, last } = splitName(name);
6907
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "ss-g-mt-row", style: cols, children: [
6908
- /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "ss-g-mt-who", children: [
6909
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(PlayerAvatar, { className: "ss-g-mt-av", name }),
6910
- /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("span", { className: "ss-g-mt-names", children: [
6911
- first && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "ss-g-mt-first", children: first }),
6912
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "ss-g-mt-last", children: last })
7271
+ return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "ss-g-mt-row", style: cols, children: [
7272
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "ss-g-mt-who", children: [
7273
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(PlayerAvatar, { className: "ss-g-mt-av", name }),
7274
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("span", { className: "ss-g-mt-names", children: [
7275
+ first && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "ss-g-mt-first", children: first }),
7276
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "ss-g-mt-last", children: last })
6913
7277
  ] })
6914
7278
  ] }),
6915
7279
  keys.map((key) => {
6916
7280
  const v = gr[key];
6917
7281
  const arrow = directionArrow(v);
6918
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
7282
+ return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(
6919
7283
  "div",
6920
7284
  {
6921
7285
  className: "ss-g-mt-cell",
@@ -6923,8 +7287,8 @@ function MysteryTigerGame({
6923
7287
  "data-verdict": v.verdict,
6924
7288
  "aria-label": `${t.labels[key]}: ${v.value ?? v.verdict}${v.direction ? ` ${v.direction}` : ""}`,
6925
7289
  children: [
6926
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "ss-g-mt-cell-v", "aria-hidden": "true", children: tileFace(key, v) }),
6927
- arrow && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "ss-g-mt-cell-dir", "aria-hidden": "true", children: arrow })
7290
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "ss-g-mt-cell-v", "aria-hidden": "true", children: tileFace(key, v) }),
7291
+ arrow && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "ss-g-mt-cell-dir", "aria-hidden": "true", children: arrow })
6928
7292
  ]
6929
7293
  },
6930
7294
  key
@@ -6933,25 +7297,25 @@ function MysteryTigerGame({
6933
7297
  ] }, gr.playerId);
6934
7298
  })
6935
7299
  ] }),
6936
- !isOver && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "ss-g-mt-legend", children: [
6937
- /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("span", { children: [
6938
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("i", { className: "ss-g-mt-sw", "data-verdict": "exact" }),
7300
+ !isOver && /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "ss-g-mt-legend", children: [
7301
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("span", { children: [
7302
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("i", { className: "ss-g-mt-sw", "data-verdict": "exact" }),
6939
7303
  t.legendMatch
6940
7304
  ] }),
6941
- /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("span", { children: [
6942
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("i", { className: "ss-g-mt-sw", "data-verdict": "near" }),
7305
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("span", { children: [
7306
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("i", { className: "ss-g-mt-sw", "data-verdict": "near" }),
6943
7307
  t.legendClose
6944
7308
  ] }),
6945
- /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("span", { children: [
7309
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("span", { children: [
6946
7310
  "\u25B2 ",
6947
7311
  t.legendHigher
6948
7312
  ] })
6949
7313
  ] }),
6950
- clientState?.hintLine && !isOver && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "ss-g-mt-hint", children: [
6951
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(IconBulb, {}),
6952
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { children: clientState.hintLine })
7314
+ clientState?.hintLine && !isOver && /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "ss-g-mt-hint", children: [
7315
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(IconBulb, {}),
7316
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { children: clientState.hintLine })
6953
7317
  ] }),
6954
- isOver && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
7318
+ isOver && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
6955
7319
  ResultCard,
6956
7320
  {
6957
7321
  tone: clientState?.solved ? "win" : clientState?.failed ? "lose" : "neutral",
@@ -6963,7 +7327,7 @@ function MysteryTigerGame({
6963
7327
  }
6964
7328
  )
6965
7329
  ] }),
6966
- !isOver && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
7330
+ !isOver && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
6967
7331
  AnswerTray,
6968
7332
  {
6969
7333
  id: inputId,
@@ -6982,7 +7346,7 @@ function MysteryTigerGame({
6982
7346
  }
6983
7347
 
6984
7348
  // src/components/games/HigherOrLowerGame.tsx
6985
- var import_jsx_runtime75 = require("react/jsx-runtime");
7349
+ var import_jsx_runtime76 = require("react/jsx-runtime");
6986
7350
  var POINTS_PER_CORRECT = 10;
6987
7351
  function parseClientState2(json) {
6988
7352
  if (!json) return null;
@@ -6994,11 +7358,11 @@ function parseClientState2(json) {
6994
7358
  }
6995
7359
  function PlayerCard({ name, imagePath, highlight, children }) {
6996
7360
  const { first, last } = splitName(name);
6997
- return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: `ss-g-hl-card${highlight ? " ss-g-hl-card--b" : ""}`, children: [
6998
- /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "ss-g-hl-photo-wrap", children: imagePath ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(PlayerAvatar, { className: "ss-g-hl-photo", name, imagePath }) : /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Silhouette, { size: 150 }) }),
6999
- /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "ss-g-hl-info", children: [
7000
- first && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "ss-g-hl-first", children: first }),
7001
- /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "ss-g-hl-surname", children: last }),
7361
+ return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: `ss-g-hl-card${highlight ? " ss-g-hl-card--b" : ""}`, children: [
7362
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "ss-g-hl-photo-wrap", children: imagePath ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(PlayerAvatar, { className: "ss-g-hl-photo", name, imagePath }) : /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Silhouette, { size: 150 }) }),
7363
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ss-g-hl-info", children: [
7364
+ first && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-hl-first", children: first }),
7365
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-hl-surname", children: last }),
7002
7366
  children
7003
7367
  ] })
7004
7368
  ] });
@@ -7030,47 +7394,47 @@ function HigherOrLowerGame({
7030
7394
  const newAnswers = [...prevAnswers, { pairIndex: currentPair.pairIndex, pick }];
7031
7395
  onSubmit(JSON.stringify({ answers: newAnswers }));
7032
7396
  }
7033
- return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "ss-g-screen ss-g-hl", "data-game": "higher-or-lower", "data-testid": "game-screen-higher-or-lower", children: [
7034
- /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
7397
+ return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ss-g-screen ss-g-hl", "data-game": "higher-or-lower", "data-testid": "game-screen-higher-or-lower", children: [
7398
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
7035
7399
  GameHeader,
7036
7400
  {
7037
7401
  title: gameTitle({ gameId: "higher-or-lower" }, ui.games.titles),
7038
7402
  eyebrow: t.eyebrow(POINTS_PER_CORRECT),
7039
- right: config ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(StatStack, { value: runLength, label: t.streak }) : void 0,
7403
+ right: config ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(StatStack, { value: runLength, label: t.streak }) : void 0,
7040
7404
  onBack,
7041
7405
  backLabel: ui.back
7042
7406
  }
7043
7407
  ),
7044
- !config && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading }),
7045
- config && /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(import_jsx_runtime75.Fragment, { children: [
7046
- /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "ss-g-body", children: [
7047
- /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "ss-g-hl-prompt", "data-testid": "hol-prompt", children: [
7048
- /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "ss-g-hl-prompt-q", children: t.whoHadMore }),
7049
- /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "ss-g-hl-prompt-stat", children: config.statLabel }),
7050
- /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "ss-g-hl-prompt-season", children: t.season(config.seasonLabel) })
7408
+ !config && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading }),
7409
+ config && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(import_jsx_runtime76.Fragment, { children: [
7410
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ss-g-body", children: [
7411
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ss-g-hl-prompt", "data-testid": "hol-prompt", children: [
7412
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-hl-prompt-q", children: t.whoHadMore }),
7413
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-hl-prompt-stat", children: config.statLabel }),
7414
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-hl-prompt-season", children: t.season(config.seasonLabel) })
7051
7415
  ] }),
7052
- currentPair && /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "ss-g-hl-pair", children: [
7053
- /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(PlayerCard, { name: currentPair.playerAName, imagePath: currentPair.playerAImagePath, children: [
7054
- /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "ss-g-hl-value", children: currentPair.playerAValue }),
7055
- /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "ss-g-hl-stat", children: config.statLabel })
7416
+ currentPair && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ss-g-hl-pair", children: [
7417
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(PlayerCard, { name: currentPair.playerAName, imagePath: currentPair.playerAImagePath, children: [
7418
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-hl-value", children: currentPair.playerAValue }),
7419
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-hl-stat", children: config.statLabel })
7056
7420
  ] }),
7057
- /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "ss-g-hl-vs", "aria-hidden": "true", children: t.vs }),
7058
- /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(PlayerCard, { name: currentPair.playerBName, imagePath: currentPair.playerBImagePath, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "ss-g-hl-btns", children: [
7059
- /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(GameButton, { variant: "primary", disabled: submitting, onClick: () => handlePick("higher"), children: [
7060
- /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(IconArrowUp, { size: 16 }),
7421
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-hl-vs", "aria-hidden": "true", children: t.vs }),
7422
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(PlayerCard, { name: currentPair.playerBName, imagePath: currentPair.playerBImagePath, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ss-g-hl-btns", children: [
7423
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(GameButton, { variant: "primary", disabled: submitting, onClick: () => handlePick("higher"), children: [
7424
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(IconArrowUp, { size: 16 }),
7061
7425
  t.higher
7062
7426
  ] }),
7063
- /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(GameButton, { variant: "outline", disabled: submitting, onClick: () => handlePick("lower"), children: [
7064
- /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(IconArrowDown, { size: 16 }),
7427
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(GameButton, { variant: "outline", disabled: submitting, onClick: () => handlePick("lower"), children: [
7428
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(IconArrowDown, { size: 16 }),
7065
7429
  t.lower
7066
7430
  ] })
7067
7431
  ] }) })
7068
7432
  ] }),
7069
- lastAnswer && lastAnswerPair && /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("p", { className: "ss-g-hl-feedback", "data-testid": "hol-last", "data-correct": lastAnswer.wasCorrect ? "true" : "false", children: [
7070
- lastAnswer.wasCorrect ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(IconCheck, {}) : /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(IconClose, {}),
7433
+ lastAnswer && lastAnswerPair && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("p", { className: "ss-g-hl-feedback", "data-testid": "hol-last", "data-correct": lastAnswer.wasCorrect ? "true" : "false", children: [
7434
+ lastAnswer.wasCorrect ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(IconCheck, {}) : /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(IconClose, {}),
7071
7435
  t.lastAnswer(splitName(lastAnswerPair.playerBName).last, lastAnswer.playerBValue)
7072
7436
  ] }),
7073
- isOver && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
7437
+ isOver && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
7074
7438
  ResultCard,
7075
7439
  {
7076
7440
  tone: runEndedWrong ? "lose" : allPairsAnswered ? "win" : "neutral",
@@ -7082,15 +7446,15 @@ function HigherOrLowerGame({
7082
7446
  }
7083
7447
  )
7084
7448
  ] }),
7085
- !isOver && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "ss-g-hl-foot", children: [
7086
- /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "ss-g-hl-dots", role: "img", "aria-label": t.answersSoFar(answeredCount, config.pairs.length), children: config.pairs.map((p, i) => {
7449
+ !isOver && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ss-g-hl-foot", children: [
7450
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "ss-g-hl-dots", role: "img", "aria-label": t.answersSoFar(answeredCount, config.pairs.length), children: config.pairs.map((p, i) => {
7087
7451
  const a = answeredPairs[i];
7088
- return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "ss-g-hl-dot", "data-state": a ? a.wasCorrect ? "correct" : "wrong" : "todo" }, p.pairIndex);
7452
+ return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-hl-dot", "data-state": a ? a.wasCorrect ? "correct" : "wrong" : "todo" }, p.pairIndex);
7089
7453
  }) }),
7090
- /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("span", { className: "ss-g-hl-pts", children: [
7091
- /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { "data-testid": "hol-score", children: score }),
7454
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("span", { className: "ss-g-hl-pts", children: [
7455
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { "data-testid": "hol-score", children: score }),
7092
7456
  " ",
7093
- /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "ss-g-hl-pts-unit", children: ui.games.unitPts })
7457
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-hl-pts-unit", children: ui.games.unitPts })
7094
7458
  ] })
7095
7459
  ] }) })
7096
7460
  ] })
@@ -7098,21 +7462,21 @@ function HigherOrLowerGame({
7098
7462
  }
7099
7463
 
7100
7464
  // src/components/games/CareerPathGame.tsx
7101
- var import_react43 = require("react");
7465
+ var import_react47 = require("react");
7102
7466
 
7103
7467
  // src/components/games/ui/CrestShield.tsx
7104
- var import_react42 = require("react");
7105
- var import_jsx_runtime76 = require("react/jsx-runtime");
7468
+ var import_react46 = require("react");
7469
+ var import_jsx_runtime77 = require("react/jsx-runtime");
7106
7470
  function CrestShield({ src, name, size = 28 }) {
7107
- const [failed, setFailed] = (0, import_react42.useState)(false);
7471
+ const [failed, setFailed] = (0, import_react46.useState)(false);
7108
7472
  if (src && !isPlaceholderImage(src) && !failed) {
7109
- return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("img", { className: "ss-g-crest", src, alt: name, width: size, height: size, loading: "lazy", onError: () => setFailed(true) });
7473
+ return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("img", { className: "ss-g-crest", src, alt: name, width: size, height: size, loading: "lazy", onError: () => setFailed(true) });
7110
7474
  }
7111
- return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("svg", { className: "ss-g-crest ss-g-crest--ph", width: size, height: size * 32 / 28, viewBox: "0 0 28 32", role: "img", "aria-label": name, children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("path", { d: "M2 3h24v12c0 9-6 14-12 17C8 29 2 24 2 15z", fill: "currentColor" }) });
7475
+ return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("svg", { className: "ss-g-crest ss-g-crest--ph", width: size, height: size * 32 / 28, viewBox: "0 0 28 32", role: "img", "aria-label": name, children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("path", { d: "M2 3h24v12c0 9-6 14-12 17C8 29 2 24 2 15z", fill: "currentColor" }) });
7112
7476
  }
7113
7477
 
7114
7478
  // src/components/games/CareerPathGame.tsx
7115
- var import_jsx_runtime77 = require("react/jsx-runtime");
7479
+ var import_jsx_runtime78 = require("react/jsx-runtime");
7116
7480
  function parseClientState3(json) {
7117
7481
  if (!json) return null;
7118
7482
  try {
@@ -7136,15 +7500,15 @@ function CareerPathGame({
7136
7500
  }) {
7137
7501
  const s = ui.games.careerPath;
7138
7502
  const title = gameTitle({ gameId: "career-path" }, ui.games.titles);
7139
- const [query, setQuery] = (0, import_react43.useState)("");
7140
- const inputId = (0, import_react43.useId)();
7503
+ const [query, setQuery] = (0, import_react47.useState)("");
7504
+ const inputId = (0, import_react47.useId)();
7141
7505
  const clientState = parseClientState3(result?.clientStateJson);
7142
7506
  const alreadyGuessedIds = new Set(clientState?.guessResults.map((g) => g.playerId) ?? []);
7143
7507
  const isOver = result?.alreadyPlayed === true || clientState?.solved === true || clientState?.failed === true;
7144
7508
  if (!config) {
7145
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "ss-g-screen", "data-game": "career-path", "data-testid": "game-screen-career-path", children: [
7146
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(GameHeader, { title, eyebrow: s.eyebrow, onBack, backLabel: ui.back }),
7147
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
7509
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "ss-g-screen", "data-game": "career-path", "data-testid": "game-screen-career-path", children: [
7510
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(GameHeader, { title, eyebrow: s.eyebrow, onBack, backLabel: ui.back }),
7511
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
7148
7512
  ] });
7149
7513
  }
7150
7514
  const visiblePath = clientState?.visiblePath ?? config.initialPath;
@@ -7158,61 +7522,61 @@ function CareerPathGame({
7158
7522
  setQuery("");
7159
7523
  onSubmit(JSON.stringify({ guesses: newGuesses }));
7160
7524
  }
7161
- const right = !isOver && clientState ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { "data-testid": "cp-guess-chip", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(Chip, { variant: "neutral", children: [
7525
+ const right = !isOver && clientState ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { "data-testid": "cp-guess-chip", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(Chip, { variant: "neutral", children: [
7162
7526
  ui.games.guess,
7163
7527
  " ",
7164
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "ss-g-num", children: clientState.guessesUsed + 1 }),
7528
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ss-g-num", children: clientState.guessesUsed + 1 }),
7165
7529
  " / ",
7166
7530
  clientState.guessesUsed + clientState.guessesRemaining
7167
7531
  ] }) }) : void 0;
7168
7532
  const outcome = clientState?.solved ? s.solved : clientState?.failed ? s.failed : ui.games.done;
7169
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "ss-g-screen", "data-game": "career-path", "data-testid": "game-screen-career-path", children: [
7170
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(GameHeader, { title, eyebrow: s.eyebrow, right, onBack, backLabel: ui.back }),
7171
- /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "ss-g-body", children: [
7172
- !isOver && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed: clientState?.guessesUsed ?? 0, ui }),
7173
- /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "ss-g-cp-card", children: [
7174
- isOver && clientState?.revealedPlayerName ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(PlayerAvatar, { className: "ss-g-cp-photo", name: clientState.revealedPlayerName, imagePath: clientState.revealedPlayerImagePath }) : /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Silhouette, { size: 64, variant: isOver ? "default" : "mystery" }),
7175
- /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "ss-g-cp-card-text", children: [
7176
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "ss-g-cp-card-title", children: isOver && clientState?.revealedPlayerName ? clientState.revealedPlayerName : s.mysteryPlayer }),
7177
- clientState?.hintLine ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "ss-g-cp-hint", children: clientState.hintLine }) : !isOver ? /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("span", { className: "ss-g-cp-locks", children: [
7178
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Chip, { variant: "lock", icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(IconLock, { size: 11 }), children: s.lockPosition }),
7179
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Chip, { variant: "lock", icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(IconLock, { size: 11 }), children: s.lockNationality })
7533
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "ss-g-screen", "data-game": "career-path", "data-testid": "game-screen-career-path", children: [
7534
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(GameHeader, { title, eyebrow: s.eyebrow, right, onBack, backLabel: ui.back }),
7535
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "ss-g-body", children: [
7536
+ !isOver && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed: clientState?.guessesUsed ?? 0, ui }),
7537
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "ss-g-cp-card", children: [
7538
+ isOver && clientState?.revealedPlayerName ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(PlayerAvatar, { className: "ss-g-cp-photo", name: clientState.revealedPlayerName, imagePath: clientState.revealedPlayerImagePath }) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Silhouette, { size: 64, variant: isOver ? "default" : "mystery" }),
7539
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "ss-g-cp-card-text", children: [
7540
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ss-g-cp-card-title", children: isOver && clientState?.revealedPlayerName ? clientState.revealedPlayerName : s.mysteryPlayer }),
7541
+ clientState?.hintLine ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ss-g-cp-hint", children: clientState.hintLine }) : !isOver ? /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("span", { className: "ss-g-cp-locks", children: [
7542
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Chip, { variant: "lock", icon: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(IconLock, { size: 11 }), children: s.lockPosition }),
7543
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Chip, { variant: "lock", icon: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(IconLock, { size: 11 }), children: s.lockNationality })
7180
7544
  ] }) : null
7181
7545
  ] })
7182
7546
  ] }),
7183
- /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("ol", { className: "ss-g-cp-line", children: [
7547
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("ol", { className: "ss-g-cp-line", children: [
7184
7548
  visiblePath.map((spell, i) => {
7185
7549
  const years = i === 0 ? s.firstClub : spellYears(spell);
7186
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("li", { className: "ss-g-cp-step", children: [
7187
- /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("span", { className: "ss-g-cp-rail", children: [
7188
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "ss-g-cp-tile", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(CrestShield, { src: spell.crestUrl, name: spell.clubName, size: 30 }) }),
7189
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "ss-g-cp-conn", "aria-hidden": "true" })
7550
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("li", { className: "ss-g-cp-step", children: [
7551
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("span", { className: "ss-g-cp-rail", children: [
7552
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ss-g-cp-tile", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(CrestShield, { src: spell.crestUrl, name: spell.clubName, size: 30 }) }),
7553
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ss-g-cp-conn", "aria-hidden": "true" })
7190
7554
  ] }),
7191
- /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("span", { className: "ss-g-cp-step-text", children: [
7192
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "ss-g-cp-club", children: spell.clubName }),
7193
- /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("span", { className: "ss-g-cp-sub", children: [
7194
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "ss-g-cp-years", children: years }),
7195
- spell.isLoan && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
7555
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("span", { className: "ss-g-cp-step-text", children: [
7556
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ss-g-cp-club", children: spell.clubName }),
7557
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("span", { className: "ss-g-cp-sub", children: [
7558
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ss-g-cp-years", children: years }),
7559
+ spell.isLoan && /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
7196
7560
  years ? " \xB7 " : "",
7197
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "ss-g-cp-loan", children: s.loan })
7561
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ss-g-cp-loan", children: s.loan })
7198
7562
  ] })
7199
7563
  ] })
7200
7564
  ] })
7201
7565
  ] }, `${spell.clubName}-${i}`);
7202
7566
  }),
7203
- hidden > 0 && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("li", { className: "ss-g-cp-step ss-g-cp-step--hidden", children: [
7204
- /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("span", { className: "ss-g-cp-rail", children: [
7205
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "ss-g-cp-tile ss-g-cp-tile--locked", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(IconLock, { size: 18 }) }),
7206
- hidden > 1 && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "ss-g-cp-conn ss-g-cp-conn--faint", "aria-hidden": "true" })
7567
+ hidden > 0 && /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("li", { className: "ss-g-cp-step ss-g-cp-step--hidden", children: [
7568
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("span", { className: "ss-g-cp-rail", children: [
7569
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ss-g-cp-tile ss-g-cp-tile--locked", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(IconLock, { size: 18 }) }),
7570
+ hidden > 1 && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ss-g-cp-conn ss-g-cp-conn--faint", "aria-hidden": "true" })
7207
7571
  ] }),
7208
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "ss-g-cp-step-text", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "ss-g-cp-sub", children: s.nextClubHidden }) })
7572
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ss-g-cp-step-text", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ss-g-cp-sub", children: s.nextClubHidden }) })
7209
7573
  ] }),
7210
- hidden > 1 && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("li", { className: "ss-g-cp-step ss-g-cp-step--more", children: [
7211
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "ss-g-cp-rail", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "ss-g-cp-tile ss-g-cp-tile--faint", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(IconLock, { size: 18 }) }) }),
7212
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "ss-g-cp-step-text", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "ss-g-cp-sub", children: s.moreClubs(hidden - 1) }) })
7574
+ hidden > 1 && /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("li", { className: "ss-g-cp-step ss-g-cp-step--more", children: [
7575
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ss-g-cp-rail", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ss-g-cp-tile ss-g-cp-tile--faint", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(IconLock, { size: 18 }) }) }),
7576
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ss-g-cp-step-text", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ss-g-cp-sub", children: s.moreClubs(hidden - 1) }) })
7213
7577
  ] })
7214
7578
  ] }),
7215
- isOver && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
7579
+ isOver && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
7216
7580
  ResultCard,
7217
7581
  {
7218
7582
  tone: clientState?.solved ? "win" : clientState?.failed ? "lose" : "neutral",
@@ -7224,7 +7588,7 @@ function CareerPathGame({
7224
7588
  }
7225
7589
  )
7226
7590
  ] }),
7227
- !isOver && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
7591
+ !isOver && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
7228
7592
  AnswerTray,
7229
7593
  {
7230
7594
  id: inputId,
@@ -7243,16 +7607,16 @@ function CareerPathGame({
7243
7607
  }
7244
7608
 
7245
7609
  // src/components/games/BeatTheGridGame.tsx
7246
- var import_react44 = __toESM(require("react"), 1);
7610
+ var import_react48 = __toESM(require("react"), 1);
7247
7611
 
7248
7612
  // src/components/games/ui/OptionList.tsx
7249
- var import_jsx_runtime78 = require("react/jsx-runtime");
7613
+ var import_jsx_runtime79 = require("react/jsx-runtime");
7250
7614
  function OptionList({ label, options, onPick }) {
7251
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "ss-g-opts", role: "listbox", "aria-label": label, children: options.map((o) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("button", { type: "button", role: "option", "aria-selected": false, className: "ss-g-opt", onClick: () => onPick(o.key), children: o.content }, o.key)) });
7615
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "ss-g-opts", role: "listbox", "aria-label": label, children: options.map((o) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("button", { type: "button", role: "option", "aria-selected": false, className: "ss-g-opt", onClick: () => onPick(o.key), children: o.content }, o.key)) });
7252
7616
  }
7253
7617
 
7254
7618
  // src/components/games/BeatTheGridGame.tsx
7255
- var import_jsx_runtime79 = require("react/jsx-runtime");
7619
+ var import_jsx_runtime80 = require("react/jsx-runtime");
7256
7620
  function criterionIconKind(label, key) {
7257
7621
  const l = (key ?? label).toLowerCase();
7258
7622
  if (l.includes("app")) return "calendar";
@@ -7270,34 +7634,34 @@ function rowAbbrev(label, map, key) {
7270
7634
  function CriterionIcon({ kind }) {
7271
7635
  switch (kind) {
7272
7636
  case "calendar":
7273
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(IconCalendar, {});
7637
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(IconCalendar, {});
7274
7638
  case "ball":
7275
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(IconBall, {});
7639
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(IconBall, {});
7276
7640
  case "boot":
7277
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(IconBoot, {});
7641
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(IconBoot, {});
7278
7642
  case "gloves":
7279
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(IconGloves, {});
7643
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(IconGloves, {});
7280
7644
  case "shield":
7281
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(IconShield, {});
7645
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(IconShield, {});
7282
7646
  default:
7283
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(IconFlag, {});
7647
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(IconFlag, {});
7284
7648
  }
7285
7649
  }
7286
7650
  function HeaderVisual({ label, textKey: iKey, meta }) {
7287
7651
  if (!meta) {
7288
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(CriterionIcon, { kind: criterionIconKind(label, iKey) });
7652
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(CriterionIcon, { kind: criterionIconKind(label, iKey) });
7289
7653
  }
7290
7654
  switch (meta.kind) {
7291
7655
  case "club":
7292
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(CrestShield, { src: meta.imageUrl, name: label, size: 24 });
7656
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(CrestShield, { src: meta.imageUrl, name: label, size: 24 });
7293
7657
  case "coach":
7294
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(PlayerAvatar, { name: label, imagePath: meta.imageUrl, className: "ss-g-btg-coach-av" });
7658
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(PlayerAvatar, { name: label, imagePath: meta.imageUrl, className: "ss-g-btg-coach-av" });
7295
7659
  case "country":
7296
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "ss-g-btg-hdr-flag", "aria-hidden": "true", children: nationalityFlag(meta.country ?? label) });
7660
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "ss-g-btg-hdr-flag", "aria-hidden": "true", children: nationalityFlag(meta.country ?? label) });
7297
7661
  case "position":
7298
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_jsx_runtime79.Fragment, {});
7662
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_jsx_runtime80.Fragment, {});
7299
7663
  default:
7300
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(CriterionIcon, { kind: criterionIconKind(label, iKey) });
7664
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(CriterionIcon, { kind: criterionIconKind(label, iKey) });
7301
7665
  }
7302
7666
  }
7303
7667
  function parseClientState4(json) {
@@ -7332,21 +7696,21 @@ function SearchSheet({
7332
7696
  ui
7333
7697
  }) {
7334
7698
  const s = ui.games.beatTheGrid;
7335
- const [query, setQuery] = (0, import_react44.useState)("");
7336
- const inputId = (0, import_react44.useId)();
7337
- const inputRef = (0, import_react44.useRef)(null);
7338
- (0, import_react44.useEffect)(() => {
7699
+ const [query, setQuery] = (0, import_react48.useState)("");
7700
+ const inputId = (0, import_react48.useId)();
7701
+ const inputRef = (0, import_react48.useRef)(null);
7702
+ (0, import_react48.useEffect)(() => {
7339
7703
  inputRef.current?.focus();
7340
7704
  }, [row, col]);
7341
7705
  const filtered = playerPool.filter(
7342
7706
  (p) => !alreadyFilledIds.has(p.id) && p.name.toLowerCase().includes(query.toLowerCase())
7343
7707
  );
7344
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "ss-g-btg-sheet", "data-testid": "btg-search-sheet", children: [
7345
- /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "ss-g-btg-sheet-hdr", children: [
7346
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Chip, { variant: "neutral", children: rowLabel }),
7347
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "ss-g-btg-sheet-x", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(IconClose, { size: 12 }) }),
7348
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Chip, { variant: "accent", children: colLabel }),
7349
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
7708
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "ss-g-btg-sheet", "data-testid": "btg-search-sheet", children: [
7709
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "ss-g-btg-sheet-hdr", children: [
7710
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Chip, { variant: "neutral", children: rowLabel }),
7711
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "ss-g-btg-sheet-x", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(IconClose, { size: 12 }) }),
7712
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Chip, { variant: "accent", children: colLabel }),
7713
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
7350
7714
  "button",
7351
7715
  {
7352
7716
  type: "button",
@@ -7354,12 +7718,12 @@ function SearchSheet({
7354
7718
  "data-testid": "btg-sheet-dismiss",
7355
7719
  "aria-label": s.closeSearch,
7356
7720
  onClick: onDismiss,
7357
- children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(IconClose, {})
7721
+ children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(IconClose, {})
7358
7722
  }
7359
7723
  )
7360
7724
  ] }),
7361
- playerPool.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "ss-g-btg-sheet-empty", children: s.emptyPool }) : /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_jsx_runtime79.Fragment, { children: [
7362
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
7725
+ playerPool.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "ss-g-btg-sheet-empty", children: s.emptyPool }) : /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_jsx_runtime80.Fragment, { children: [
7726
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
7363
7727
  SearchField,
7364
7728
  {
7365
7729
  id: inputId,
@@ -7371,16 +7735,16 @@ function SearchSheet({
7371
7735
  inputRef
7372
7736
  }
7373
7737
  ),
7374
- query.length > 0 && filtered.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
7738
+ query.length > 0 && filtered.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
7375
7739
  OptionList,
7376
7740
  {
7377
7741
  label: s.searchLabel(rowLabel, colLabel),
7378
7742
  options: filtered.map((p) => ({
7379
7743
  key: p.id,
7380
- content: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_jsx_runtime79.Fragment, { children: [
7381
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(PlayerAvatar, { name: p.name, imagePath: p.imagePath, className: "ss-g-opt-av" }),
7382
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "ss-g-btg-result-name", children: p.name }),
7383
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "ss-g-btg-result-plus", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(IconPlus, { size: 18 }) })
7744
+ content: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_jsx_runtime80.Fragment, { children: [
7745
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(PlayerAvatar, { name: p.name, imagePath: p.imagePath, className: "ss-g-opt-av" }),
7746
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "ss-g-btg-result-name", children: p.name }),
7747
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "ss-g-btg-result-plus", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(IconPlus, { size: 18 }) })
7384
7748
  ] })
7385
7749
  })),
7386
7750
  onPick: (k) => onPick(row, col, Number(k))
@@ -7400,7 +7764,7 @@ function BeatTheGridGame({
7400
7764
  }) {
7401
7765
  const s = ui.games.beatTheGrid;
7402
7766
  const title = gameTitle({ gameId: "beat-the-grid" }, ui.games.titles);
7403
- const [activeCell, setActiveCell] = (0, import_react44.useState)(null);
7767
+ const [activeCell, setActiveCell] = (0, import_react48.useState)(null);
7404
7768
  const clientState = parseClientState4(result?.clientStateJson);
7405
7769
  const filledCells = clientState?.cells ?? [];
7406
7770
  const isLocked2 = result?.alreadyPlayed === true || clientState?.isComplete === true;
@@ -7418,9 +7782,9 @@ function BeatTheGridGame({
7418
7782
  onSubmit(JSON.stringify({ cells: newCells }));
7419
7783
  }
7420
7784
  if (!config) {
7421
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "ss-g-screen", "data-game": "beat-the-grid", "data-testid": "game-screen-beat-the-grid", children: [
7422
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(GameHeader, { title, eyebrow: s.eyebrow, onBack, backLabel: ui.back }),
7423
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
7785
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "ss-g-screen", "data-game": "beat-the-grid", "data-testid": "game-screen-beat-the-grid", children: [
7786
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(GameHeader, { title, eyebrow: s.eyebrow, onBack, backLabel: ui.back }),
7787
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
7424
7788
  ] });
7425
7789
  }
7426
7790
  const rows = config.rows;
@@ -7433,20 +7797,20 @@ function BeatTheGridGame({
7433
7797
  (_, i) => i < correctCount ? "correct" : i < correctCount + wrongCount ? "wrong" : "todo"
7434
7798
  );
7435
7799
  const totalScore = clientState?.totalScore ?? result?.score ?? 0;
7436
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "ss-g-screen", "data-game": "beat-the-grid", "data-testid": "game-screen-beat-the-grid", children: [
7437
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(GameHeader, { title, eyebrow: s.eyebrow, onBack, backLabel: ui.back }),
7438
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
7800
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "ss-g-screen", "data-game": "beat-the-grid", "data-testid": "game-screen-beat-the-grid", children: [
7801
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(GameHeader, { title, eyebrow: s.eyebrow, onBack, backLabel: ui.back }),
7802
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
7439
7803
  SegmentProgress,
7440
7804
  {
7441
7805
  segments,
7442
7806
  ariaLabel: s.progressAria(filledCells.length, total),
7443
7807
  leftLabel: s.filled(filledCells.length, total),
7444
7808
  rightLabel: s.toGo(Math.max(0, total - filledCells.length)),
7445
- right: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Chip, { variant: "accent", children: `${totalScore} ${ui.games.unitPts}` })
7809
+ right: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Chip, { variant: "accent", children: `${totalScore} ${ui.games.unitPts}` })
7446
7810
  }
7447
7811
  ),
7448
- /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "ss-g-body", children: [
7449
- /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
7812
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "ss-g-body", children: [
7813
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
7450
7814
  "div",
7451
7815
  {
7452
7816
  className: activeCell !== null ? "ss-g-btg-grid ss-g-btg-grid--fit" : "ss-g-btg-grid",
@@ -7456,31 +7820,31 @@ function BeatTheGridGame({
7456
7820
  },
7457
7821
  role: "grid",
7458
7822
  children: [
7459
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "ss-g-btg-corner" }),
7823
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "ss-g-btg-corner" }),
7460
7824
  cols.map((col, colIdx) => {
7461
7825
  const colMeta = config.colsMeta?.[colIdx];
7462
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "ss-g-btg-colhdr", "data-meta": colMeta ? "true" : void 0, children: [
7463
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(HeaderVisual, { label: col, textKey: config.colsI18n?.[colIdx]?.key, meta: colMeta }),
7464
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { children: col })
7826
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "ss-g-btg-colhdr", "data-meta": colMeta ? "true" : void 0, children: [
7827
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(HeaderVisual, { label: col, textKey: config.colsI18n?.[colIdx]?.key, meta: colMeta }),
7828
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { children: col })
7465
7829
  ] }, col);
7466
7830
  }),
7467
7831
  rows.map((rowLabel, rowIdx) => {
7468
7832
  const rowMeta = config.rowsMeta?.[rowIdx];
7469
7833
  const abbr = rowAbbrev(rowLabel, s.rowAbbrev, config.rowsI18n?.[rowIdx]?.key);
7470
- const rowHeaderContent = rowMeta ? /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_jsx_runtime79.Fragment, { children: [
7471
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(HeaderVisual, { label: rowLabel, textKey: config.rowsI18n?.[rowIdx]?.key, meta: rowMeta }),
7472
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { children: rowLabel })
7473
- ] }) : abbr === rowLabel ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { children: rowLabel }) : /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_jsx_runtime79.Fragment, { children: [
7474
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { "aria-hidden": "true", children: abbr }),
7475
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "ss-g-sr", children: rowLabel })
7834
+ const rowHeaderContent = rowMeta ? /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_jsx_runtime80.Fragment, { children: [
7835
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(HeaderVisual, { label: rowLabel, textKey: config.rowsI18n?.[rowIdx]?.key, meta: rowMeta }),
7836
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { children: rowLabel })
7837
+ ] }) : abbr === rowLabel ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { children: rowLabel }) : /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_jsx_runtime80.Fragment, { children: [
7838
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { "aria-hidden": "true", children: abbr }),
7839
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "ss-g-sr", children: rowLabel })
7476
7840
  ] });
7477
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_react44.default.Fragment, { children: [
7478
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "ss-g-btg-rowhdr", "data-meta": rowMeta ? "true" : void 0, children: rowHeaderContent }),
7841
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_react48.default.Fragment, { children: [
7842
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "ss-g-btg-rowhdr", "data-meta": rowMeta ? "true" : void 0, children: rowHeaderContent }),
7479
7843
  cols.map((colLabel, colIdx) => {
7480
7844
  const filled = findCellResult(filledCells, rowIdx, colIdx);
7481
7845
  const isActive = activeCell?.row === rowIdx && activeCell?.col === colIdx;
7482
7846
  const state = filled ? filled.isCorrect ? "correct" : "wrong" : isActive ? "active" : "empty";
7483
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
7847
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
7484
7848
  "button",
7485
7849
  {
7486
7850
  type: "button",
@@ -7491,20 +7855,20 @@ function BeatTheGridGame({
7491
7855
  className: "ss-g-btg-cell",
7492
7856
  disabled: isLocked2 || submitting,
7493
7857
  onClick: () => handleCellClick(rowIdx, colIdx),
7494
- children: filled ? /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_jsx_runtime79.Fragment, { children: [
7495
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
7858
+ children: filled ? /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_jsx_runtime80.Fragment, { children: [
7859
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
7496
7860
  "span",
7497
7861
  {
7498
7862
  className: `ss-g-btg-badge ss-g-btg-badge--${filled.isCorrect ? "correct" : "wrong"}`,
7499
7863
  role: "img",
7500
7864
  "aria-label": filled.isCorrect ? s.correct : s.wrong,
7501
- children: filled.isCorrect ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(IconCheck, { size: 11 }) : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(IconClose, { size: 11 })
7865
+ children: filled.isCorrect ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(IconCheck, { size: 11 }) : /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(IconClose, { size: 11 })
7502
7866
  }
7503
7867
  ),
7504
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "ss-g-btg-rarity", children: filled.rarityScore }),
7868
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "ss-g-btg-rarity", children: filled.rarityScore }),
7505
7869
  (() => {
7506
7870
  const entry = playerPool.find((p) => p.id === filled.playerId);
7507
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
7871
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
7508
7872
  PlayerAvatar,
7509
7873
  {
7510
7874
  name: entry?.name ?? "",
@@ -7513,8 +7877,8 @@ function BeatTheGridGame({
7513
7877
  }
7514
7878
  );
7515
7879
  })(),
7516
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "ss-g-btg-name", children: shortName(playerPool.find((p) => p.id === filled.playerId)?.name) })
7517
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "ss-g-btg-plus", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(IconPlus, { size: 22 }) })
7880
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "ss-g-btg-name", children: shortName(playerPool.find((p) => p.id === filled.playerId)?.name) })
7881
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "ss-g-btg-plus", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(IconPlus, { size: 22 }) })
7518
7882
  },
7519
7883
  `cell-${rowIdx}-${colIdx}`
7520
7884
  );
@@ -7524,7 +7888,7 @@ function BeatTheGridGame({
7524
7888
  ]
7525
7889
  }
7526
7890
  ),
7527
- isLocked2 && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
7891
+ isLocked2 && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
7528
7892
  ResultCard,
7529
7893
  {
7530
7894
  tone: "neutral",
@@ -7536,7 +7900,7 @@ function BeatTheGridGame({
7536
7900
  }
7537
7901
  )
7538
7902
  ] }),
7539
- activeCell !== null && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "ss-g-btg-pin", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
7903
+ activeCell !== null && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "ss-g-btg-pin", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
7540
7904
  SearchSheet,
7541
7905
  {
7542
7906
  row: activeCell.row,
@@ -7555,21 +7919,21 @@ function BeatTheGridGame({
7555
7919
  }
7556
7920
 
7557
7921
  // src/components/games/GuessTheXiGame.tsx
7558
- var import_react45 = require("react");
7922
+ var import_react49 = require("react");
7559
7923
 
7560
7924
  // src/components/games/ui/PitchSvg.tsx
7561
- var import_jsx_runtime80 = require("react/jsx-runtime");
7925
+ var import_jsx_runtime81 = require("react/jsx-runtime");
7562
7926
  function PitchSvg({ variant }) {
7563
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("svg", { className: "ss-g-pitch-svg", viewBox: variant === "full" ? "0 0 100 150" : "0 0 100 100", preserveAspectRatio: "none", "aria-hidden": "true", children: [
7564
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("rect", { x: "4", y: "4", width: "92", height: variant === "full" ? 142 : 92, fill: "none" }),
7565
- variant === "full" ? /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_jsx_runtime80.Fragment, { children: [
7566
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("line", { x1: "4", y1: "75", x2: "96", y2: "75" }),
7567
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("circle", { cx: "50", cy: "75", r: "12", fill: "none" }),
7568
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("rect", { x: "26", y: "4", width: "48", height: "20", fill: "none" }),
7569
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("rect", { x: "26", y: "126", width: "48", height: "20", fill: "none" })
7570
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_jsx_runtime80.Fragment, { children: [
7571
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("path", { d: "M38 4a12 12 0 0 0 24 0", fill: "none" }),
7572
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("rect", { x: "26", y: "76", width: "48", height: "20", fill: "none" })
7927
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("svg", { className: "ss-g-pitch-svg", viewBox: variant === "full" ? "0 0 100 150" : "0 0 100 100", preserveAspectRatio: "none", "aria-hidden": "true", children: [
7928
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("rect", { x: "4", y: "4", width: "92", height: variant === "full" ? 142 : 92, fill: "none" }),
7929
+ variant === "full" ? /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
7930
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("line", { x1: "4", y1: "75", x2: "96", y2: "75" }),
7931
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("circle", { cx: "50", cy: "75", r: "12", fill: "none" }),
7932
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("rect", { x: "26", y: "4", width: "48", height: "20", fill: "none" }),
7933
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("rect", { x: "26", y: "126", width: "48", height: "20", fill: "none" })
7934
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
7935
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("path", { d: "M38 4a12 12 0 0 0 24 0", fill: "none" }),
7936
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("rect", { x: "26", y: "76", width: "48", height: "20", fill: "none" })
7573
7937
  ] })
7574
7938
  ] });
7575
7939
  }
@@ -7625,7 +7989,7 @@ function positionsBySlot(formation, rowsAttackFirst) {
7625
7989
  }
7626
7990
 
7627
7991
  // src/components/games/GuessTheXiGame.tsx
7628
- var import_jsx_runtime81 = require("react/jsx-runtime");
7992
+ var import_jsx_runtime82 = require("react/jsx-runtime");
7629
7993
  var MAX_GUESSES2 = 3;
7630
7994
  function parseClientState5(json) {
7631
7995
  if (!json) return null;
@@ -7644,8 +8008,8 @@ function GuessTheXiGame({
7644
8008
  onBack
7645
8009
  }) {
7646
8010
  const t = ui.games.guessTheXi;
7647
- const [query, setQuery] = (0, import_react45.useState)("");
7648
- const inputId = (0, import_react45.useId)();
8011
+ const [query, setQuery] = (0, import_react49.useState)("");
8012
+ const inputId = (0, import_react49.useId)();
7649
8013
  const clientState = parseClientState5(result?.clientStateJson);
7650
8014
  const isOver = result?.alreadyPlayed === true || clientState?.status === "solved" || clientState?.status === "failed";
7651
8015
  const solved = clientState?.status === "solved";
@@ -7675,31 +8039,31 @@ function GuessTheXiGame({
7675
8039
  const wrongGuesses = (clientState?.guessHistory ?? []).filter((g) => !g.wasCorrect);
7676
8040
  const guessesLeft = Math.max(0, MAX_GUESSES2 - (clientState?.guessesUsed ?? 0));
7677
8041
  const teamName = (id) => config?.teamPool.find((tm) => tm.teamId === id)?.teamName ?? `#${id}`;
7678
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "ss-g-screen ss-g-gxi", "data-game": "guess-the-xi", "data-testid": "game-screen-guess-the-xi", children: [
7679
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
8042
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "ss-g-screen ss-g-gxi", "data-game": "guess-the-xi", "data-testid": "game-screen-guess-the-xi", children: [
8043
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
7680
8044
  GameHeader,
7681
8045
  {
7682
8046
  title: gameTitle({ gameId: "guess-the-xi" }, ui.games.titles),
7683
8047
  eyebrow: config?.poolLabel,
7684
- right: formation ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Chip, { variant: "accent", children: formation }) : void 0,
8048
+ right: formation ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Chip, { variant: "accent", children: formation }) : void 0,
7685
8049
  onBack,
7686
8050
  backLabel: ui.back
7687
8051
  }
7688
8052
  ),
7689
- !config && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading }),
7690
- config && /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
7691
- /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "ss-g-body", children: [
7692
- !isOver && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed: clientState?.guessHistory.length ?? 0, ui }),
7693
- rows.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "ss-g-gxi-pitch", role: "group", "aria-label": t.pitchLabel, children: [
7694
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(PitchSvg, { variant: "full" }),
7695
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "ss-g-gxi-rows", children: rows.map((row, r) => /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "ss-g-gxi-row", children: row.map((pos, c) => {
8053
+ !config && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading }),
8054
+ config && /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_jsx_runtime82.Fragment, { children: [
8055
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "ss-g-body", children: [
8056
+ !isOver && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed: clientState?.guessHistory.length ?? 0, ui }),
8057
+ rows.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "ss-g-gxi-pitch", role: "group", "aria-label": t.pitchLabel, children: [
8058
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(PitchSvg, { variant: "full" }),
8059
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "ss-g-gxi-rows", children: rows.map((row, r) => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "ss-g-gxi-row", children: row.map((pos, c) => {
7696
8060
  const posLabel = pos.slot ? posBySlot.get(pos.slot) ?? "" : "";
7697
8061
  const name = pos.slot ? nameBySlot.get(pos.slot) : void 0;
7698
8062
  const lineupEntry = pos.slot ? lineupBySlot.get(pos.slot) : void 0;
7699
8063
  const flag = nationalityFlag(pos.nationality);
7700
8064
  if (lineupEntry) {
7701
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "ss-g-gxi-node", "data-revealed": "true", children: [
7702
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
8065
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "ss-g-gxi-node", "data-revealed": "true", children: [
8066
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
7703
8067
  PlayerAvatar,
7704
8068
  {
7705
8069
  name: lineupEntry.name,
@@ -7707,11 +8071,11 @@ function GuessTheXiGame({
7707
8071
  className: "ss-g-gxi-disc ss-g-gxi-disc--photo"
7708
8072
  }
7709
8073
  ),
7710
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "ss-g-gxi-pos ss-g-gxi-pos--name", children: splitName(lineupEntry.name).last })
8074
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "ss-g-gxi-pos ss-g-gxi-pos--name", children: splitName(lineupEntry.name).last })
7711
8075
  ] }, `${pos.slot}-${c}`);
7712
8076
  }
7713
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "ss-g-gxi-node", "data-revealed": name ? "true" : void 0, children: [
7714
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
8077
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "ss-g-gxi-node", "data-revealed": name ? "true" : void 0, children: [
8078
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
7715
8079
  "span",
7716
8080
  {
7717
8081
  className: "ss-g-gxi-disc",
@@ -7722,22 +8086,22 @@ function GuessTheXiGame({
7722
8086
  children: flag
7723
8087
  }
7724
8088
  ),
7725
- name ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "ss-g-gxi-pos ss-g-gxi-pos--name", children: splitName(name).last }) : posLabel && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "ss-g-gxi-pos", children: posLabel })
8089
+ name ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "ss-g-gxi-pos ss-g-gxi-pos--name", children: splitName(name).last }) : posLabel && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "ss-g-gxi-pos", children: posLabel })
7726
8090
  ] }, `${pos.slot}-${c}`);
7727
8091
  }) }, r)) })
7728
8092
  ] }),
7729
- !isOver && wrongGuesses.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "ss-g-gxi-wrong", children: [
7730
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "ss-g-gxi-wrong-l", children: t.notThem }),
8093
+ !isOver && wrongGuesses.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "ss-g-gxi-wrong", children: [
8094
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "ss-g-gxi-wrong-l", children: t.notThem }),
7731
8095
  wrongGuesses.map((g) => {
7732
8096
  const crestUrl = config?.teamPool.find((tm) => tm.teamId === g.teamId)?.crestUrl;
7733
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("span", { className: "ss-g-gxi-wrong-chip", children: [
7734
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(CrestShield, { src: crestUrl, name: teamName(g.teamId), size: 18 }),
7735
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("s", { children: teamName(g.teamId) })
8097
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("span", { className: "ss-g-gxi-wrong-chip", children: [
8098
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(CrestShield, { src: crestUrl, name: teamName(g.teamId), size: 18 }),
8099
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("s", { children: teamName(g.teamId) })
7736
8100
  ] }, g.teamId);
7737
8101
  })
7738
8102
  ] }),
7739
- isOver && /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
7740
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
8103
+ isOver && /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_jsx_runtime82.Fragment, { children: [
8104
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
7741
8105
  ResultCard,
7742
8106
  {
7743
8107
  tone: solved ? "win" : failed ? "lose" : "neutral",
@@ -7748,29 +8112,29 @@ function GuessTheXiGame({
7748
8112
  ui
7749
8113
  }
7750
8114
  ),
7751
- (solved || failed) && clientState?.answer && /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "ss-g-gxi-answer", "data-testid": "gxi-answer-reveal", children: [
7752
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "ss-g-gxi-answer-label", children: t.theAnswer }),
7753
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(CrestShield, { src: clientState.answer.crestUrl, name: clientState.answer.teamName, size: 32 }),
7754
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "ss-g-gxi-answer-name", children: clientState.answer.teamName })
8115
+ (solved || failed) && clientState?.answer && /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "ss-g-gxi-answer", "data-testid": "gxi-answer-reveal", children: [
8116
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "ss-g-gxi-answer-label", children: t.theAnswer }),
8117
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(CrestShield, { src: clientState.answer.crestUrl, name: clientState.answer.teamName, size: 32 }),
8118
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "ss-g-gxi-answer-name", children: clientState.answer.teamName })
7755
8119
  ] })
7756
8120
  ] })
7757
8121
  ] }),
7758
- !isOver && /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(FooterBar, { children: [
7759
- query.length > 0 && filtered.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
8122
+ !isOver && /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(FooterBar, { children: [
8123
+ query.length > 0 && filtered.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
7760
8124
  OptionList,
7761
8125
  {
7762
8126
  label: t.optionsLabel,
7763
8127
  options: filtered.map((tm) => ({
7764
8128
  key: tm.teamId,
7765
- content: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
7766
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(CrestShield, { src: tm.crestUrl, name: tm.teamName, size: 28 }),
7767
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { children: tm.teamName })
8129
+ content: /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_jsx_runtime82.Fragment, { children: [
8130
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(CrestShield, { src: tm.crestUrl, name: tm.teamName, size: 28 }),
8131
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { children: tm.teamName })
7768
8132
  ] })
7769
8133
  })),
7770
8134
  onPick: (k) => handlePick(Number(k))
7771
8135
  }
7772
8136
  ),
7773
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
8137
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
7774
8138
  SearchField,
7775
8139
  {
7776
8140
  id: inputId,
@@ -7787,8 +8151,8 @@ function GuessTheXiGame({
7787
8151
  }
7788
8152
 
7789
8153
  // src/components/games/DailyQuizGame.tsx
7790
- var import_react46 = require("react");
7791
- var import_jsx_runtime82 = require("react/jsx-runtime");
8154
+ var import_react50 = require("react");
8155
+ var import_jsx_runtime83 = require("react/jsx-runtime");
7792
8156
  function parseClientState6(json) {
7793
8157
  if (!json) return null;
7794
8158
  try {
@@ -7809,13 +8173,13 @@ function OptionName({ text }) {
7809
8173
  const tokens = base.split(/\s+/).filter(Boolean);
7810
8174
  const isPlainName = tokens.length >= 1 && tokens.length <= 4 && tokens.every((t) => NAME_TOKEN.test(t));
7811
8175
  if (!isPlainName || base === "") {
7812
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "ss-g-dq-opt-name", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "ss-g-dq-opt-full", children: text }) });
8176
+ return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "ss-g-dq-opt-name", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "ss-g-dq-opt-full", children: text }) });
7813
8177
  }
7814
8178
  const { first, last } = splitName(base);
7815
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("span", { className: "ss-g-dq-opt-name", children: [
7816
- first && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "ss-g-dq-opt-first", children: first }),
7817
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "ss-g-dq-opt-last", children: last }),
7818
- suffix && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "ss-g-dq-opt-suffix", children: suffix })
8179
+ return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("span", { className: "ss-g-dq-opt-name", children: [
8180
+ first && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "ss-g-dq-opt-first", children: first }),
8181
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "ss-g-dq-opt-last", children: last }),
8182
+ suffix && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "ss-g-dq-opt-suffix", children: suffix })
7819
8183
  ] });
7820
8184
  }
7821
8185
  function DailyQuizGame({
@@ -7828,15 +8192,15 @@ function DailyQuizGame({
7828
8192
  }) {
7829
8193
  const s = ui.games.dailyQuiz;
7830
8194
  const title = gameTitle({ gameId: "daily-quiz" }, ui.games.titles);
7831
- const [selections, setSelections] = (0, import_react46.useState)(/* @__PURE__ */ new Map());
7832
- const [page, setPage] = (0, import_react46.useState)(0);
8195
+ const [selections, setSelections] = (0, import_react50.useState)(/* @__PURE__ */ new Map());
8196
+ const [page, setPage] = (0, import_react50.useState)(0);
7833
8197
  const clientState = parseClientState6(result?.clientStateJson);
7834
8198
  const results = clientState?.results ?? [];
7835
8199
  const isRevealed = results.length > 0 || result?.alreadyPlayed === true;
7836
8200
  if (!config) {
7837
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "ss-g-screen", "data-game": "daily-quiz", "data-testid": "game-screen-daily-quiz", children: [
7838
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(GameHeader, { title, onBack, backLabel: ui.back }),
7839
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
8201
+ return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-g-screen", "data-game": "daily-quiz", "data-testid": "game-screen-daily-quiz", children: [
8202
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(GameHeader, { title, onBack, backLabel: ui.back }),
8203
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
7840
8204
  ] });
7841
8205
  }
7842
8206
  const questions = config.questions;
@@ -7871,11 +8235,11 @@ function DailyQuizGame({
7871
8235
  return r.isCorrect ? "correct" : "wrong";
7872
8236
  });
7873
8237
  const correctCount = results.filter((r) => r.isCorrect).length;
7874
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "ss-g-screen", "data-game": "daily-quiz", "data-testid": "game-screen-daily-quiz", children: [
7875
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(GameHeader, { title, eyebrow: s.results, onBack, backLabel: ui.back }),
7876
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(SegmentProgress, { segments: segments2, ariaLabel: s.results }),
7877
- /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "ss-g-body", children: [
7878
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
8238
+ return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-g-screen", "data-game": "daily-quiz", "data-testid": "game-screen-daily-quiz", children: [
8239
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(GameHeader, { title, eyebrow: s.results, onBack, backLabel: ui.back }),
8240
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(SegmentProgress, { segments: segments2, ariaLabel: s.results }),
8241
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-g-body", children: [
8242
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
7879
8243
  ResultCard,
7880
8244
  {
7881
8245
  tone: "neutral",
@@ -7888,15 +8252,15 @@ function DailyQuizGame({
7888
8252
  questions.map((q) => {
7889
8253
  const r = findResult(results, q.index);
7890
8254
  const picked = selections.get(q.index);
7891
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "ss-g-dq-rq", children: [
7892
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "ss-g-dq-rq-stem", children: q.stem }),
7893
- r && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "ss-g-dq-rq-opts", children: q.options.map((opt, optIdx) => {
8255
+ return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-g-dq-rq", children: [
8256
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "ss-g-dq-rq-stem", children: q.stem }),
8257
+ r && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "ss-g-dq-rq-opts", children: q.options.map((opt, optIdx) => {
7894
8258
  let cls = "ss-g-dq-rq-opt";
7895
8259
  if (optIdx === r.correctOptionIndex) cls += " ss-g-dq-rq-opt--correct";
7896
8260
  else if (optIdx === picked && !r.isCorrect) cls += " ss-g-dq-rq-opt--wrong";
7897
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: cls, children: opt }, optIdx);
8261
+ return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: cls, children: opt }, optIdx);
7898
8262
  }) }),
7899
- r?.revealText && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "ss-g-dq-why", children: r.revealText })
8263
+ r?.revealText && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "ss-g-dq-why", children: r.revealText })
7900
8264
  ] }, q.index);
7901
8265
  })
7902
8266
  ] })
@@ -7904,16 +8268,16 @@ function DailyQuizGame({
7904
8268
  }
7905
8269
  const segments = questions.map((_, i) => i < page ? "done" : i === page ? "current" : "todo");
7906
8270
  const selectedIdx = current ? selections.get(current.index) : void 0;
7907
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "ss-g-screen", "data-game": "daily-quiz", "data-testid": "game-screen-daily-quiz", children: [
7908
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(GameHeader, { title, eyebrow: s.questionOf(page + 1, total), onBack, backLabel: ui.back }),
7909
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(SegmentProgress, { segments, ariaLabel: s.progressAria(page + 1, total) }),
7910
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "ss-g-body", children: current && /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_jsx_runtime82.Fragment, { children: [
7911
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("h3", { className: "ss-g-dq-stem", children: current.stem }),
7912
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "ss-g-dq-opts", children: current.options.map((opt, optIdx) => {
8271
+ return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-g-screen", "data-game": "daily-quiz", "data-testid": "game-screen-daily-quiz", children: [
8272
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(GameHeader, { title, eyebrow: s.questionOf(page + 1, total), onBack, backLabel: ui.back }),
8273
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(SegmentProgress, { segments, ariaLabel: s.progressAria(page + 1, total) }),
8274
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "ss-g-body", children: current && /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(import_jsx_runtime83.Fragment, { children: [
8275
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("h3", { className: "ss-g-dq-stem", children: current.stem }),
8276
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "ss-g-dq-opts", children: current.options.map((opt, optIdx) => {
7913
8277
  const selected = optIdx === selectedIdx;
7914
8278
  const imagePath = current.optionImagePaths?.[optIdx] ?? void 0;
7915
8279
  const playerName = opt;
7916
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
8280
+ return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
7917
8281
  "button",
7918
8282
  {
7919
8283
  type: "button",
@@ -7922,25 +8286,25 @@ function DailyQuizGame({
7922
8286
  disabled: submitting,
7923
8287
  onClick: () => handleSelect(current.index, optIdx),
7924
8288
  children: [
7925
- current.optionImagePaths && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(PlayerAvatar, { name: playerName, imagePath, className: "ss-g-dq-opt-av" }),
7926
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "ss-g-dq-badge", "aria-hidden": "true", children: selected ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(IconCheck, {}) : String.fromCharCode(65 + optIdx) }),
7927
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(OptionName, { text: opt })
8289
+ current.optionImagePaths && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(PlayerAvatar, { name: playerName, imagePath, className: "ss-g-dq-opt-av" }),
8290
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "ss-g-dq-badge", "aria-hidden": "true", children: selected ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(IconCheck, {}) : String.fromCharCode(65 + optIdx) }),
8291
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(OptionName, { text: opt })
7928
8292
  ]
7929
8293
  },
7930
8294
  optIdx
7931
8295
  );
7932
8296
  }) })
7933
8297
  ] }) }),
7934
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "ss-g-dq-nav", children: [
7935
- page > 0 && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(GameButton, { variant: "outline", onClick: goPrev, disabled: submitting, children: s.previous }),
7936
- isLast ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(GameButton, { variant: "primary", block: true, onClick: handleSubmit, disabled: !currentAnswered || !allAnswered || submitting, children: submitting ? s.submitting : s.submit }) : /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(GameButton, { variant: "primary", block: true, onClick: goNext, disabled: !currentAnswered || submitting, children: s.next })
8298
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-g-dq-nav", children: [
8299
+ page > 0 && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(GameButton, { variant: "outline", onClick: goPrev, disabled: submitting, children: s.previous }),
8300
+ isLast ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(GameButton, { variant: "primary", block: true, onClick: handleSubmit, disabled: !currentAnswered || !allAnswered || submitting, children: submitting ? s.submitting : s.submit }) : /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(GameButton, { variant: "primary", block: true, onClick: goNext, disabled: !currentAnswered || submitting, children: s.next })
7937
8301
  ] }) })
7938
8302
  ] });
7939
8303
  }
7940
8304
 
7941
8305
  // src/components/games/MatchdayPredictorGame.tsx
7942
- var import_react47 = require("react");
7943
- var import_jsx_runtime83 = require("react/jsx-runtime");
8306
+ var import_react51 = require("react");
8307
+ var import_jsx_runtime84 = require("react/jsx-runtime");
7944
8308
  var SCORER_SEARCH_THRESHOLD = 9;
7945
8309
  function parseClientState7(json) {
7946
8310
  if (!json) return null;
@@ -7958,7 +8322,7 @@ function isLocked(kickoffUtc) {
7958
8322
  }
7959
8323
  }
7960
8324
  function IconMinus() {
7961
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
8325
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
7962
8326
  "svg",
7963
8327
  {
7964
8328
  width: 18,
@@ -7969,20 +8333,20 @@ function IconMinus() {
7969
8333
  strokeWidth: 2.2,
7970
8334
  strokeLinecap: "round",
7971
8335
  "aria-hidden": "true",
7972
- children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("path", { d: "M5 12h14" })
8336
+ children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("path", { d: "M5 12h14" })
7973
8337
  }
7974
8338
  );
7975
8339
  }
7976
8340
  function TeamBadge({ team, label }) {
7977
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-g-mp-team", children: [
7978
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CrestShield, { name: team.name, size: 44 }),
7979
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "ss-g-mp-team-name", children: team.name }),
7980
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "ss-g-mp-team-side", children: label })
8341
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-mp-team", children: [
8342
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(CrestShield, { name: team.name, size: 44 }),
8343
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "ss-g-mp-team-name", children: team.name }),
8344
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "ss-g-mp-team-side", children: label })
7981
8345
  ] });
7982
8346
  }
7983
8347
  function ScoreCard({ home, away, h, a, t, edit }) {
7984
- const col = (side, team, value) => /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-g-mp-col", children: [
7985
- edit && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
8348
+ const col = (side, team, value) => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-mp-col", children: [
8349
+ edit && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
7986
8350
  "button",
7987
8351
  {
7988
8352
  type: "button",
@@ -7990,11 +8354,11 @@ function ScoreCard({ home, away, h, a, t, edit }) {
7990
8354
  "aria-label": t.goalsUp(team.name),
7991
8355
  disabled: edit.disabled,
7992
8356
  onClick: () => edit.onStep(side, 1),
7993
- children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(IconPlus, { size: 18 })
8357
+ children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(IconPlus, { size: 18 })
7994
8358
  }
7995
8359
  ),
7996
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "ss-g-mp-digit", "data-testid": "mp-digit", "data-active": edit ? String(edit.active === side) : "false", children: value }),
7997
- edit && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
8360
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "ss-g-mp-digit", "data-testid": "mp-digit", "data-active": edit ? String(edit.active === side) : "false", children: value }),
8361
+ edit && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
7998
8362
  "button",
7999
8363
  {
8000
8364
  type: "button",
@@ -8002,27 +8366,27 @@ function ScoreCard({ home, away, h, a, t, edit }) {
8002
8366
  "aria-label": t.goalsDown(team.name),
8003
8367
  disabled: edit.disabled || value <= 0,
8004
8368
  onClick: () => edit.onStep(side, -1),
8005
- children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(IconMinus, {})
8369
+ children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(IconMinus, {})
8006
8370
  }
8007
8371
  )
8008
8372
  ] });
8009
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-g-mp-card", children: [
8010
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(TeamBadge, { team: home, label: t.home }),
8011
- /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-g-mp-scores", children: [
8373
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-mp-card", children: [
8374
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(TeamBadge, { team: home, label: t.home }),
8375
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-mp-scores", children: [
8012
8376
  col("home", home, h),
8013
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "ss-g-mp-dash", "aria-hidden": "true", children: "\u2013" }),
8377
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "ss-g-mp-dash", "aria-hidden": "true", children: "\u2013" }),
8014
8378
  col("away", away, a)
8015
8379
  ] }),
8016
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(TeamBadge, { team: away, label: t.away })
8380
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(TeamBadge, { team: away, label: t.away })
8017
8381
  ] });
8018
8382
  }
8019
8383
  function OutcomeRow({ label, ok, detail, t }) {
8020
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("li", { className: "ss-g-mp-row", "data-testid": "mp-row", "data-ok": String(ok), children: [
8021
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "ss-g-mp-row-k", children: label }),
8022
- /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("span", { className: "ss-g-mp-row-v", children: [
8023
- ok ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(IconCheck, {}) : /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(IconClose, { size: 14 }),
8024
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "ss-g-sr", children: ok ? t.correct : t.incorrect }),
8025
- detail ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "ss-g-mp-row-d", children: detail }) : null
8384
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("li", { className: "ss-g-mp-row", "data-testid": "mp-row", "data-ok": String(ok), children: [
8385
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "ss-g-mp-row-k", children: label }),
8386
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("span", { className: "ss-g-mp-row-v", children: [
8387
+ ok ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(IconCheck, {}) : /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(IconClose, { size: 14 }),
8388
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "ss-g-sr", children: ok ? t.correct : t.incorrect }),
8389
+ detail ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "ss-g-mp-row-d", children: detail }) : null
8026
8390
  ] })
8027
8391
  ] });
8028
8392
  }
@@ -8035,20 +8399,20 @@ function MatchdayPredictorGame({
8035
8399
  onBack
8036
8400
  }) {
8037
8401
  const t = ui.games.predictor;
8038
- const [homeScore, setHomeScore] = (0, import_react47.useState)(0);
8039
- const [awayScore, setAwayScore] = (0, import_react47.useState)(0);
8040
- const [firstScorerPlayerId, setFirstScorerPlayerId] = (0, import_react47.useState)(null);
8041
- const [lastEdited, setLastEdited] = (0, import_react47.useState)("home");
8042
- const [query, setQuery] = (0, import_react47.useState)("");
8043
- const searchId = (0, import_react47.useId)();
8402
+ const [homeScore, setHomeScore] = (0, import_react51.useState)(0);
8403
+ const [awayScore, setAwayScore] = (0, import_react51.useState)(0);
8404
+ const [firstScorerPlayerId, setFirstScorerPlayerId] = (0, import_react51.useState)(null);
8405
+ const [lastEdited, setLastEdited] = (0, import_react51.useState)("home");
8406
+ const [query, setQuery] = (0, import_react51.useState)("");
8407
+ const searchId = (0, import_react51.useId)();
8044
8408
  const clientState = parseClientState7(result?.clientStateJson);
8045
8409
  const alreadyPlayed = result?.alreadyPlayed === true;
8046
- const header = /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
8410
+ const header = /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8047
8411
  GameHeader,
8048
8412
  {
8049
8413
  title: gameTitle({ gameId: "matchday-predictor" }, ui.games.titles),
8050
8414
  eyebrow: config ? t.eyebrow(config.homeTeam.name, config.awayTeam.name) : void 0,
8051
- right: config ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Chip, { icon: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(IconLock, {}), children: ui.games.formatDayTime(config.kickoffUtc) }) : void 0,
8415
+ right: config ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Chip, { icon: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(IconLock, {}), children: ui.games.formatDayTime(config.kickoffUtc) }) : void 0,
8052
8416
  onBack,
8053
8417
  backLabel: ui.back
8054
8418
  }
@@ -8056,10 +8420,10 @@ function MatchdayPredictorGame({
8056
8420
  if (alreadyPlayed && clientState) {
8057
8421
  if (!clientState.graded) {
8058
8422
  const scorer = config?.scorerPool.find((p) => p.playerId === clientState.predictedFirstScorerPlayerId) ?? null;
8059
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
8423
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
8060
8424
  header,
8061
- /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-g-body", children: [
8062
- config && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
8425
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-body", children: [
8426
+ config && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8063
8427
  ScoreCard,
8064
8428
  {
8065
8429
  home: config.homeTeam,
@@ -8069,7 +8433,7 @@ function MatchdayPredictorGame({
8069
8433
  t
8070
8434
  }
8071
8435
  ),
8072
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
8436
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8073
8437
  ResultCard,
8074
8438
  {
8075
8439
  tone: "neutral",
@@ -8086,28 +8450,28 @@ function MatchdayPredictorGame({
8086
8450
  }
8087
8451
  )
8088
8452
  ] }),
8089
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("p", { className: "ss-g-mp-fun", children: t.forFun }) })
8453
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("p", { className: "ss-g-mp-fun", children: t.forFun }) })
8090
8454
  ] });
8091
8455
  }
8092
8456
  const r = clientState.result;
8093
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
8457
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
8094
8458
  header,
8095
- /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-g-body", children: [
8096
- config && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(ScoreCard, { home: config.homeTeam, away: config.awayTeam, h: r.homeScore, a: r.awayScore, t }),
8097
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(ResultCard, { tone: "neutral", title: t.fullTime(r.homeScore, r.awayScore), onBack, ui }),
8098
- /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("ul", { className: "ss-g-mp-rows", children: [
8099
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(OutcomeRow, { label: t.exactScore, ok: clientState.exactScoreCorrect, t }),
8100
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(OutcomeRow, { label: t.outcome, ok: clientState.outcomeCorrect, t }),
8101
- !clientState.firstScorerVoid && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(OutcomeRow, { label: t.firstScorerRow, ok: clientState.firstScorerCorrect, detail: r.firstScorerName, t })
8459
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-body", children: [
8460
+ config && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(ScoreCard, { home: config.homeTeam, away: config.awayTeam, h: r.homeScore, a: r.awayScore, t }),
8461
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(ResultCard, { tone: "neutral", title: t.fullTime(r.homeScore, r.awayScore), onBack, ui }),
8462
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("ul", { className: "ss-g-mp-rows", children: [
8463
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(OutcomeRow, { label: t.exactScore, ok: clientState.exactScoreCorrect, t }),
8464
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(OutcomeRow, { label: t.outcome, ok: clientState.outcomeCorrect, t }),
8465
+ !clientState.firstScorerVoid && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(OutcomeRow, { label: t.firstScorerRow, ok: clientState.firstScorerCorrect, detail: r.firstScorerName, t })
8102
8466
  ] })
8103
8467
  ] }),
8104
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("p", { className: "ss-g-mp-fun", children: t.forFun }) })
8468
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("p", { className: "ss-g-mp-fun", children: t.forFun }) })
8105
8469
  ] });
8106
8470
  }
8107
8471
  if (!config) {
8108
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
8472
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
8109
8473
  header,
8110
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
8474
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
8111
8475
  ] });
8112
8476
  }
8113
8477
  const locked = isLocked(config.kickoffUtc);
@@ -8131,10 +8495,10 @@ function MatchdayPredictorGame({
8131
8495
  const showSearch = pool.length > SCORER_SEARCH_THRESHOLD;
8132
8496
  const q = query.trim().toLowerCase();
8133
8497
  const visible = showSearch && q ? pool.filter((p) => p.playerName.toLowerCase().includes(q)) : pool;
8134
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
8498
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
8135
8499
  header,
8136
- /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-g-body", children: [
8137
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
8500
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-body", children: [
8501
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8138
8502
  ScoreCard,
8139
8503
  {
8140
8504
  home: config.homeTeam,
@@ -8145,12 +8509,12 @@ function MatchdayPredictorGame({
8145
8509
  edit: { disabled, active: lastEdited, onStep: step }
8146
8510
  }
8147
8511
  ),
8148
- pool.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("section", { className: "ss-g-mp-scorer", children: [
8149
- /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-g-mp-sec-head", children: [
8150
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("h3", { children: t.firstScorer }),
8151
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { children: t.optional })
8512
+ pool.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("section", { className: "ss-g-mp-scorer", children: [
8513
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-mp-sec-head", children: [
8514
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("h3", { children: t.firstScorer }),
8515
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { children: t.optional })
8152
8516
  ] }),
8153
- showSearch && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
8517
+ showSearch && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8154
8518
  SearchField,
8155
8519
  {
8156
8520
  id: searchId,
@@ -8162,9 +8526,9 @@ function MatchdayPredictorGame({
8162
8526
  disabled
8163
8527
  }
8164
8528
  ),
8165
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "ss-g-mp-grid", children: visible.map((p) => {
8529
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "ss-g-mp-grid", children: visible.map((p) => {
8166
8530
  const selected = firstScorerPlayerId === p.playerId;
8167
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
8531
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
8168
8532
  "button",
8169
8533
  {
8170
8534
  type: "button",
@@ -8174,15 +8538,15 @@ function MatchdayPredictorGame({
8174
8538
  disabled,
8175
8539
  onClick: () => setFirstScorerPlayerId((id) => id === p.playerId ? null : p.playerId),
8176
8540
  children: [
8177
- selected && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "ss-g-mp-pcheck", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(IconCheck, { size: 12 }) }),
8178
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Silhouette, { size: 52, variant: selected ? "selected" : "default" }),
8179
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "ss-g-mp-pname", children: splitName(p.playerName).last })
8541
+ selected && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "ss-g-mp-pcheck", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(IconCheck, { size: 12 }) }),
8542
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Silhouette, { size: 52, variant: selected ? "selected" : "default" }),
8543
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "ss-g-mp-pname", children: splitName(p.playerName).last })
8180
8544
  ]
8181
8545
  },
8182
8546
  p.playerId
8183
8547
  );
8184
8548
  }) }),
8185
- /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
8549
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
8186
8550
  "button",
8187
8551
  {
8188
8552
  type: "button",
@@ -8191,24 +8555,24 @@ function MatchdayPredictorGame({
8191
8555
  disabled,
8192
8556
  onClick: () => setFirstScorerPlayerId(null),
8193
8557
  children: [
8194
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "ss-g-mp-radio", "aria-hidden": "true" }),
8558
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "ss-g-mp-radio", "aria-hidden": "true" }),
8195
8559
  t.noScorer
8196
8560
  ]
8197
8561
  }
8198
8562
  )
8199
8563
  ] }),
8200
- locked && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("p", { className: "ss-g-mp-closed", children: t.closed })
8564
+ locked && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("p", { className: "ss-g-mp-closed", children: t.closed })
8201
8565
  ] }),
8202
- /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(FooterBar, { children: [
8203
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(GameButton, { variant: "primary", block: true, disabled, onClick: handleSubmit, children: submitting ? t.saving : t.save }),
8204
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("p", { className: "ss-g-mp-fun", children: t.forFun })
8566
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(FooterBar, { children: [
8567
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(GameButton, { variant: "primary", block: true, disabled, onClick: handleSubmit, children: submitting ? t.saving : t.save }),
8568
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("p", { className: "ss-g-mp-fun", children: t.forFun })
8205
8569
  ] })
8206
8570
  ] });
8207
8571
  }
8208
8572
 
8209
8573
  // src/components/games/StartingXiGame.tsx
8210
- var import_react48 = require("react");
8211
- var import_jsx_runtime84 = require("react/jsx-runtime");
8574
+ var import_react52 = require("react");
8575
+ var import_jsx_runtime85 = require("react/jsx-runtime");
8212
8576
  var POINTS_PER_STARTER = 8;
8213
8577
  var XI_SIZE = 11;
8214
8578
  var DEFAULT_FORMATION = "4-3-3";
@@ -8251,26 +8615,26 @@ function StartingXiGame({
8251
8615
  lockAtUtc
8252
8616
  }) {
8253
8617
  const t = ui.games.startingXi;
8254
- const [slotPlayers, setSlotPlayers] = (0, import_react48.useState)(() => Array(XI_SIZE).fill(null));
8255
- const [active, setActive] = (0, import_react48.useState)(0);
8256
- const [query, setQuery] = (0, import_react48.useState)("");
8257
- const searchId = (0, import_react48.useId)();
8618
+ const [slotPlayers, setSlotPlayers] = (0, import_react52.useState)(() => Array(XI_SIZE).fill(null));
8619
+ const [active, setActive] = (0, import_react52.useState)(0);
8620
+ const [query, setQuery] = (0, import_react52.useState)("");
8621
+ const searchId = (0, import_react52.useId)();
8258
8622
  const clientState = parseClientState8(result?.clientStateJson);
8259
8623
  const alreadyPlayed = result?.alreadyPlayed === true;
8260
- const header = /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8624
+ const header = /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8261
8625
  GameHeader,
8262
8626
  {
8263
8627
  title: gameTitle({ gameId: "starting-xi" }, ui.games.titles),
8264
8628
  eyebrow: t.eyebrow,
8265
- right: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Chip, { variant: "accent", children: t.perStarter(POINTS_PER_STARTER) }),
8629
+ right: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Chip, { variant: "accent", children: t.perStarter(POINTS_PER_STARTER) }),
8266
8630
  onBack,
8267
8631
  backLabel: ui.back
8268
8632
  }
8269
8633
  );
8270
8634
  function statusScreen(title, score) {
8271
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-screen", "data-game": "starting-xi", "data-testid": "game-screen-starting-xi", children: [
8635
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "ss-g-screen", "data-game": "starting-xi", "data-testid": "game-screen-starting-xi", children: [
8272
8636
  header,
8273
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "ss-g-body", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(ResultCard, { tone: "neutral", title, score, onBack, ui }) })
8637
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "ss-g-body", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ResultCard, { tone: "neutral", title, score, onBack, ui }) })
8274
8638
  ] });
8275
8639
  }
8276
8640
  if (alreadyPlayed) {
@@ -8279,9 +8643,9 @@ function StartingXiGame({
8279
8643
  if (clientState.status === "graded") return statusScreen(t.gradedLine(clientState.correctCount), clientState.score);
8280
8644
  }
8281
8645
  if (!config) {
8282
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-screen", "data-game": "starting-xi", "data-testid": "game-screen-starting-xi", children: [
8646
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "ss-g-screen", "data-game": "starting-xi", "data-testid": "game-screen-starting-xi", children: [
8283
8647
  header,
8284
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
8648
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
8285
8649
  ] });
8286
8650
  }
8287
8651
  const { formation, slots } = formationSlots(config.formation);
@@ -8316,27 +8680,27 @@ function StartingXiGame({
8316
8680
  onSubmit(JSON.stringify({ predictedPlayerIds: slotPlayers }));
8317
8681
  }
8318
8682
  const segments = slotPlayers.map((p) => p !== null ? "current" : "todo");
8319
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-screen", "data-game": "starting-xi", "data-testid": "game-screen-starting-xi", children: [
8683
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "ss-g-screen", "data-game": "starting-xi", "data-testid": "game-screen-starting-xi", children: [
8320
8684
  header,
8321
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8685
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8322
8686
  SegmentProgress,
8323
8687
  {
8324
8688
  segments,
8325
8689
  ariaLabel: t.picked(pickedCount),
8326
8690
  leftLabel: t.picked(pickedCount),
8327
8691
  rightLabel: t.toGo(XI_SIZE - pickedCount),
8328
- right: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Chip, { children: formation })
8692
+ right: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Chip, { children: formation })
8329
8693
  }
8330
8694
  ),
8331
- /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-body", children: [
8332
- /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-xi-pitch", children: [
8333
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(PitchSvg, { variant: "half" }),
8695
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "ss-g-body", children: [
8696
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "ss-g-xi-pitch", children: [
8697
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(PitchSvg, { variant: "half" }),
8334
8698
  slots.map((s) => {
8335
8699
  const playerId = slotPlayers[s.index] ?? null;
8336
8700
  const player = playerId !== null ? byId.get(playerId) ?? null : null;
8337
8701
  const name = player?.playerName ?? "";
8338
8702
  const state = player ? "filled" : active === s.index ? "active" : "empty";
8339
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
8703
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
8340
8704
  "button",
8341
8705
  {
8342
8706
  type: "button",
@@ -8348,21 +8712,21 @@ function StartingXiGame({
8348
8712
  disabled: submitting,
8349
8713
  onClick: () => tapSlot(s.index),
8350
8714
  children: [
8351
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "ss-g-xi-ring", "aria-hidden": "true", children: player ? player.jerseyNumber ?? "" : /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(IconPlus, { size: 18 }) }),
8352
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "ss-g-xi-tag", "aria-hidden": "true", children: player ? splitName(name).last : s.label })
8715
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "ss-g-xi-ring", "aria-hidden": "true", children: player ? player.jerseyNumber ?? "" : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(IconPlus, { size: 18 }) }),
8716
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "ss-g-xi-tag", "aria-hidden": "true", children: player ? splitName(name).last : s.label })
8353
8717
  ]
8354
8718
  },
8355
8719
  s.index
8356
8720
  );
8357
8721
  })
8358
8722
  ] }),
8359
- /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-xi-picker", children: [
8360
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "ss-g-xi-picker-head", children: activeSlot ? /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_jsx_runtime84.Fragment, { children: [
8361
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Chip, { variant: "badge", children: activeSlot.label }),
8362
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("strong", { children: t.pickFor(activeSlot.label) })
8363
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("strong", { children: t.allPicked }) }),
8364
- activeSlot && /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_jsx_runtime84.Fragment, { children: [
8365
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8723
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "ss-g-xi-picker", children: [
8724
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "ss-g-xi-picker-head", children: activeSlot ? /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_jsx_runtime85.Fragment, { children: [
8725
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Chip, { variant: "badge", children: activeSlot.label }),
8726
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("strong", { children: t.pickFor(activeSlot.label) })
8727
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("strong", { children: t.allPicked }) }),
8728
+ activeSlot && /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_jsx_runtime85.Fragment, { children: [
8729
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8366
8730
  SearchField,
8367
8731
  {
8368
8732
  id: searchId,
@@ -8374,18 +8738,18 @@ function StartingXiGame({
8374
8738
  disabled: submitting
8375
8739
  }
8376
8740
  ),
8377
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("ul", { className: "ss-g-xi-list", children: available.map((p) => /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("button", { type: "button", className: "ss-g-xi-opt", disabled: submitting, onClick: () => pick(p.playerId), children: [
8378
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "ss-g-xi-opt-no", "aria-hidden": "true", children: p.jerseyNumber ?? "" }),
8379
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "ss-g-xi-opt-name", children: p.playerName }),
8380
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "ss-g-xi-opt-pos", children: p.positionName })
8741
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("ul", { className: "ss-g-xi-list", children: available.map((p) => /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("button", { type: "button", className: "ss-g-xi-opt", disabled: submitting, onClick: () => pick(p.playerId), children: [
8742
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "ss-g-xi-opt-no", "aria-hidden": "true", children: p.jerseyNumber ?? "" }),
8743
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "ss-g-xi-opt-name", children: p.playerName }),
8744
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "ss-g-xi-opt-pos", children: p.positionName })
8381
8745
  ] }) }, p.playerId)) })
8382
8746
  ] })
8383
8747
  ] })
8384
8748
  ] }),
8385
- /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(FooterBar, { children: [
8386
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(GameButton, { variant: "primary", block: true, disabled: !canSubmit, onClick: handleSubmit, children: submitting ? t.submitting : t.submit }),
8387
- /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("p", { className: "ss-g-xi-lock", children: [
8388
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(IconLock, {}),
8749
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(FooterBar, { children: [
8750
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(GameButton, { variant: "primary", block: true, disabled: !canSubmit, onClick: handleSubmit, children: submitting ? t.submitting : t.submit }),
8751
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("p", { className: "ss-g-xi-lock", children: [
8752
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(IconLock, {}),
8389
8753
  lockAtUtc ? t.locksAt(ui.games.formatDayTime(lockAtUtc)) : t.locksSoon
8390
8754
  ] })
8391
8755
  ] })
@@ -8393,8 +8757,8 @@ function StartingXiGame({
8393
8757
  }
8394
8758
 
8395
8759
  // src/components/games/StatLadderGame.tsx
8396
- var import_react49 = require("react");
8397
- var import_jsx_runtime85 = require("react/jsx-runtime");
8760
+ var import_react53 = require("react");
8761
+ var import_jsx_runtime86 = require("react/jsx-runtime");
8398
8762
  function ladderClue(ladder) {
8399
8763
  const mystery = ladder.find((r) => r.rank === 2);
8400
8764
  if (!mystery) return null;
@@ -8416,9 +8780,9 @@ function parseClientState9(json) {
8416
8780
  }
8417
8781
  function NameStack({ name }) {
8418
8782
  const { first, last } = splitName(name);
8419
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("span", { className: "ss-g-sl-name", children: [
8420
- first && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("small", { children: `${first[0]}.` }),
8421
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("b", { children: last })
8783
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("span", { className: "ss-g-sl-name", children: [
8784
+ first && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("small", { children: `${first[0]}.` }),
8785
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("b", { children: last })
8422
8786
  ] });
8423
8787
  }
8424
8788
  function StatLadderGame({
@@ -8430,16 +8794,16 @@ function StatLadderGame({
8430
8794
  onBack
8431
8795
  }) {
8432
8796
  const t = ui.games.statLadder;
8433
- const [query, setQuery] = (0, import_react49.useState)("");
8434
- const [selectedId, setSelectedId] = (0, import_react49.useState)(null);
8435
- const searchId = (0, import_react49.useId)();
8797
+ const [query, setQuery] = (0, import_react53.useState)("");
8798
+ const [selectedId, setSelectedId] = (0, import_react53.useState)(null);
8799
+ const searchId = (0, import_react53.useId)();
8436
8800
  const clientState = parseClientState9(result?.clientStateJson);
8437
8801
  const revealed = clientState != null;
8438
- const header = /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(GameHeader, { title: gameTitle({ gameId: "stat-ladder" }, ui.games.titles), eyebrow: t.eyebrow, onBack, backLabel: ui.back });
8802
+ const header = /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(GameHeader, { title: gameTitle({ gameId: "stat-ladder" }, ui.games.titles), eyebrow: t.eyebrow, onBack, backLabel: ui.back });
8439
8803
  if (!config) {
8440
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "ss-g-screen", "data-game": "stat-ladder", "data-testid": "game-screen-stat-ladder", children: [
8804
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "ss-g-screen", "data-game": "stat-ladder", "data-testid": "game-screen-stat-ladder", children: [
8441
8805
  header,
8442
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
8806
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
8443
8807
  ] });
8444
8808
  }
8445
8809
  const question = t.question(config.statLabel);
@@ -8451,45 +8815,45 @@ function StatLadderGame({
8451
8815
  if (selectedId === null || submitting || revealed) return;
8452
8816
  onSubmit(JSON.stringify({ guessedPlayerId: selectedId }));
8453
8817
  }
8454
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "ss-g-screen", "data-game": "stat-ladder", "data-testid": "game-screen-stat-ladder", children: [
8818
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "ss-g-screen", "data-game": "stat-ladder", "data-testid": "game-screen-stat-ladder", children: [
8455
8819
  header,
8456
- /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "ss-g-body", children: [
8457
- !revealed && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed: 0, ui }),
8458
- /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "ss-g-sl-prompt", children: [
8459
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Chip, { variant: "accent", icon: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(IconShield, { size: 14 }), className: "ss-g-sl-stat", children: config.statLabel }),
8460
- /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("h3", { className: "ss-g-sl-q", children: [
8820
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "ss-g-body", children: [
8821
+ !revealed && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed: 0, ui }),
8822
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "ss-g-sl-prompt", children: [
8823
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Chip, { variant: "accent", icon: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(IconShield, { size: 14 }), className: "ss-g-sl-stat", children: config.statLabel }),
8824
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("h3", { className: "ss-g-sl-q", children: [
8461
8825
  question.pre,
8462
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("em", { children: question.emph }),
8826
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("em", { children: question.emph }),
8463
8827
  question.post
8464
8828
  ] })
8465
8829
  ] }),
8466
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("ol", { className: "ss-g-sl-rungs", children: rungs.map(
8467
- (rung) => rung.rank === 2 ? /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
8830
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("ol", { className: "ss-g-sl-rungs", children: rungs.map(
8831
+ (rung) => rung.rank === 2 ? /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
8468
8832
  "li",
8469
8833
  {
8470
8834
  className: "ss-g-sl-rung ss-g-sl-rung--mystery",
8471
8835
  "data-testid": "sl-mystery-rung",
8472
8836
  "data-result": revealed ? clientState.isCorrect ? "correct" : "wrong" : void 0,
8473
8837
  children: [
8474
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "ss-g-sl-rank", children: "2" }),
8475
- revealed ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(PlayerAvatar, { name: clientState.revealedRank2.playerName, className: "ss-g-sl-av" }) : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Silhouette, { size: 52, variant: "mystery" }),
8476
- revealed ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(NameStack, { name: clientState.revealedRank2.playerName }) : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "ss-g-sl-who", children: t.whoSecond }),
8477
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "ss-g-sl-val ss-g-sl-val--mystery", children: rung.statValue })
8838
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "ss-g-sl-rank", children: "2" }),
8839
+ revealed ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(PlayerAvatar, { name: clientState.revealedRank2.playerName, className: "ss-g-sl-av" }) : /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Silhouette, { size: 52, variant: "mystery" }),
8840
+ revealed ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(NameStack, { name: clientState.revealedRank2.playerName }) : /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "ss-g-sl-who", children: t.whoSecond }),
8841
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "ss-g-sl-val ss-g-sl-val--mystery", children: rung.statValue })
8478
8842
  ]
8479
8843
  },
8480
8844
  rung.rank
8481
- ) : /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("li", { className: "ss-g-sl-rung", children: [
8482
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "ss-g-sl-rank", children: rung.rank }),
8483
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(PlayerAvatar, { name: rung.playerName ?? "?", className: "ss-g-sl-av" }),
8484
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(NameStack, { name: rung.playerName ?? "?" }),
8485
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "ss-g-sl-val", children: rung.statValue })
8845
+ ) : /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("li", { className: "ss-g-sl-rung", children: [
8846
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "ss-g-sl-rank", children: rung.rank }),
8847
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(PlayerAvatar, { name: rung.playerName ?? "?", className: "ss-g-sl-av" }),
8848
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(NameStack, { name: rung.playerName ?? "?" }),
8849
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "ss-g-sl-val", children: rung.statValue })
8486
8850
  ] }, rung.rank)
8487
8851
  ) }),
8488
- clue && /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("p", { className: "ss-g-sl-clue", children: [
8489
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(IconBulb, {}),
8490
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { children: t.clue(clue, config.statLabel) })
8852
+ clue && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("p", { className: "ss-g-sl-clue", children: [
8853
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(IconBulb, {}),
8854
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { children: t.clue(clue, config.statLabel) })
8491
8855
  ] }),
8492
- !revealed && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("ul", { className: "ss-g-sl-pool", children: pool.map((p) => /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
8856
+ !revealed && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("ul", { className: "ss-g-sl-pool", children: pool.map((p) => /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
8493
8857
  "button",
8494
8858
  {
8495
8859
  type: "button",
@@ -8502,13 +8866,13 @@ function StatLadderGame({
8502
8866
  setQuery(p.playerName);
8503
8867
  },
8504
8868
  children: [
8505
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(PlayerAvatar, { name: p.playerName, className: "ss-g-sl-opt-av" }),
8506
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "ss-g-sl-opt-name", children: p.playerName }),
8507
- selectedId === p.playerId && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(IconCheck, {})
8869
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(PlayerAvatar, { name: p.playerName, className: "ss-g-sl-opt-av" }),
8870
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "ss-g-sl-opt-name", children: p.playerName }),
8871
+ selectedId === p.playerId && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(IconCheck, {})
8508
8872
  ]
8509
8873
  }
8510
8874
  ) }, p.playerId)) }),
8511
- revealed && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8875
+ revealed && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
8512
8876
  ResultCard,
8513
8877
  {
8514
8878
  tone: clientState.isCorrect ? "win" : "lose",
@@ -8519,8 +8883,8 @@ function StatLadderGame({
8519
8883
  }
8520
8884
  )
8521
8885
  ] }),
8522
- !revealed && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "ss-g-sl-guess", children: [
8523
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8886
+ !revealed && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "ss-g-sl-guess", children: [
8887
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
8524
8888
  SearchField,
8525
8889
  {
8526
8890
  id: searchId,
@@ -8535,13 +8899,13 @@ function StatLadderGame({
8535
8899
  disabled: submitting
8536
8900
  }
8537
8901
  ),
8538
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(GameButton, { variant: "primary", disabled: selectedId === null || submitting, onClick: guess, children: t.guess })
8902
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(GameButton, { variant: "primary", disabled: selectedId === null || submitting, onClick: guess, children: t.guess })
8539
8903
  ] }) })
8540
8904
  ] });
8541
8905
  }
8542
8906
 
8543
8907
  // src/components/games/FanMotmGame.tsx
8544
- var import_jsx_runtime86 = require("react/jsx-runtime");
8908
+ var import_jsx_runtime87 = require("react/jsx-runtime");
8545
8909
  function parseClientState10(json) {
8546
8910
  if (!json) return null;
8547
8911
  try {
@@ -8562,20 +8926,20 @@ function FanMotmGame({
8562
8926
  const clientState = parseClientState10(result?.clientStateJson);
8563
8927
  const alreadyVoted = result?.alreadyPlayed === true;
8564
8928
  const pickedId = clientState?.pickedPlayerId ?? null;
8565
- const header = /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
8929
+ const header = /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
8566
8930
  GameHeader,
8567
8931
  {
8568
8932
  title: t.title,
8569
8933
  eyebrow: t.eyebrow,
8570
- right: alreadyVoted ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Chip, { variant: "success", icon: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(IconCheck, {}), children: t.voted }) : void 0,
8934
+ right: alreadyVoted ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Chip, { variant: "success", icon: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(IconCheck, {}), children: t.voted }) : void 0,
8571
8935
  onBack,
8572
8936
  backLabel: ui.back
8573
8937
  }
8574
8938
  );
8575
8939
  if (!config) {
8576
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "ss-g-screen", "data-game": "fan-motm", "data-testid": "game-screen-fan-motm", children: [
8940
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "ss-g-screen", "data-game": "fan-motm", "data-testid": "game-screen-fan-motm", children: [
8577
8941
  header,
8578
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
8942
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
8579
8943
  ] });
8580
8944
  }
8581
8945
  const picked = config.candidates.find((c) => c.playerId === pickedId) ?? null;
@@ -8583,12 +8947,12 @@ function FanMotmGame({
8583
8947
  if (alreadyVoted || submitting) return;
8584
8948
  onSubmit(JSON.stringify({ pickedPlayerId: candidateId }));
8585
8949
  }
8586
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "ss-g-screen", "data-game": "fan-motm", "data-testid": "game-screen-fan-motm", children: [
8950
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "ss-g-screen", "data-game": "fan-motm", "data-testid": "game-screen-fan-motm", children: [
8587
8951
  header,
8588
- /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "ss-g-body", children: [
8589
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("ul", { className: "ss-g-motm-list", children: config.candidates.map((c) => {
8952
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "ss-g-body", children: [
8953
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("ul", { className: "ss-g-motm-list", children: config.candidates.map((c) => {
8590
8954
  const isVoted = alreadyVoted && pickedId === c.playerId;
8591
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
8955
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
8592
8956
  "button",
8593
8957
  {
8594
8958
  type: "button",
@@ -8597,24 +8961,24 @@ function FanMotmGame({
8597
8961
  disabled: alreadyVoted || submitting,
8598
8962
  onClick: () => handleVote(c.playerId),
8599
8963
  children: [
8600
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(PlayerAvatar, { name: c.playerName, className: "ss-g-motm-av" }),
8601
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "ss-g-motm-name", children: c.playerName }),
8602
- isVoted && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Chip, { variant: "accent", className: "ss-g-motm-pill", children: t.yourVote })
8964
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(PlayerAvatar, { name: c.playerName, className: "ss-g-motm-av" }),
8965
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "ss-g-motm-name", children: c.playerName }),
8966
+ isVoted && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Chip, { variant: "accent", className: "ss-g-motm-pill", children: t.yourVote })
8603
8967
  ]
8604
8968
  }
8605
8969
  ) }, c.playerId);
8606
8970
  }) }),
8607
- alreadyVoted && picked && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ResultCard, { tone: "neutral", title: t.youVoted(picked.playerName), detail: t.thanks, onBack, ui })
8971
+ alreadyVoted && picked && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(ResultCard, { tone: "neutral", title: t.youVoted(picked.playerName), detail: t.thanks, onBack, ui })
8608
8972
  ] }),
8609
- /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(FooterBar, { children: [
8610
- !alreadyVoted && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("p", { className: "ss-g-motm-foot", children: t.tapToVote }),
8611
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("p", { className: "ss-g-motm-fun", children: t.forFun })
8973
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(FooterBar, { children: [
8974
+ !alreadyVoted && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("p", { className: "ss-g-motm-foot", children: t.tapToVote }),
8975
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("p", { className: "ss-g-motm-fun", children: t.forFun })
8612
8976
  ] })
8613
8977
  ] });
8614
8978
  }
8615
8979
 
8616
8980
  // src/components/GameScreenHost.tsx
8617
- var import_jsx_runtime87 = require("react/jsx-runtime");
8981
+ var import_jsx_runtime88 = require("react/jsx-runtime");
8618
8982
  var FIXTURE_GAME_IDS = /* @__PURE__ */ new Set([
8619
8983
  "matchday-predictor",
8620
8984
  "starting-xi",
@@ -8638,8 +9002,8 @@ function GameScreenHost({
8638
9002
  ui
8639
9003
  }) {
8640
9004
  const { gameId, fixtureId, gameDay = "", lockAtUtc = null } = selected;
8641
- const [configJson, setConfigJson] = (0, import_react50.useState)(null);
8642
- (0, import_react50.useEffect)(() => {
9005
+ const [configJson, setConfigJson] = (0, import_react54.useState)(null);
9006
+ (0, import_react54.useEffect)(() => {
8643
9007
  setConfigJson(null);
8644
9008
  if (!conversation) return;
8645
9009
  let cancelled = false;
@@ -8662,12 +9026,12 @@ function GameScreenHost({
8662
9026
  fixtureId: fixtureId || void 0,
8663
9027
  locale: ui.games.lang
8664
9028
  });
8665
- (0, import_react50.useEffect)(() => {
9029
+ (0, import_react54.useEffect)(() => {
8666
9030
  if (conversation) hydrate();
8667
9031
  }, [conversation, gameId]);
8668
- const hydrateRef = (0, import_react50.useRef)(hydrate);
9032
+ const hydrateRef = (0, import_react54.useRef)(hydrate);
8669
9033
  hydrateRef.current = hydrate;
8670
- (0, import_react50.useEffect)(() => {
9034
+ (0, import_react54.useEffect)(() => {
8671
9035
  if (!FIXTURE_GAME_IDS.has(gameId)) return;
8672
9036
  if (rawStatus !== "pending") return;
8673
9037
  const timerId = setInterval(() => {
@@ -8690,7 +9054,7 @@ function GameScreenHost({
8690
9054
  function renderScreen() {
8691
9055
  switch (gameId) {
8692
9056
  case "mystery-tiger":
8693
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
9057
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
8694
9058
  MysteryTigerGame,
8695
9059
  {
8696
9060
  ...sharedProps,
@@ -8698,7 +9062,7 @@ function GameScreenHost({
8698
9062
  }
8699
9063
  );
8700
9064
  case "higher-or-lower":
8701
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
9065
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
8702
9066
  HigherOrLowerGame,
8703
9067
  {
8704
9068
  ...sharedProps,
@@ -8706,7 +9070,7 @@ function GameScreenHost({
8706
9070
  }
8707
9071
  );
8708
9072
  case "career-path":
8709
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
9073
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
8710
9074
  CareerPathGame,
8711
9075
  {
8712
9076
  ...sharedProps,
@@ -8715,7 +9079,7 @@ function GameScreenHost({
8715
9079
  );
8716
9080
  case "beat-the-grid": {
8717
9081
  const btgConfig = safeParseConfig(configJson);
8718
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
9082
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
8719
9083
  BeatTheGridGame,
8720
9084
  {
8721
9085
  ...sharedProps,
@@ -8725,7 +9089,7 @@ function GameScreenHost({
8725
9089
  );
8726
9090
  }
8727
9091
  case "guess-the-xi":
8728
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
9092
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
8729
9093
  GuessTheXiGame,
8730
9094
  {
8731
9095
  ...sharedProps,
@@ -8733,7 +9097,7 @@ function GameScreenHost({
8733
9097
  }
8734
9098
  );
8735
9099
  case "daily-quiz":
8736
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
9100
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
8737
9101
  DailyQuizGame,
8738
9102
  {
8739
9103
  ...sharedProps,
@@ -8741,7 +9105,7 @@ function GameScreenHost({
8741
9105
  }
8742
9106
  );
8743
9107
  case "matchday-predictor":
8744
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
9108
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
8745
9109
  MatchdayPredictorGame,
8746
9110
  {
8747
9111
  ...sharedProps,
@@ -8749,7 +9113,7 @@ function GameScreenHost({
8749
9113
  }
8750
9114
  );
8751
9115
  case "starting-xi":
8752
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
9116
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
8753
9117
  StartingXiGame,
8754
9118
  {
8755
9119
  ...sharedProps,
@@ -8757,7 +9121,7 @@ function GameScreenHost({
8757
9121
  }
8758
9122
  );
8759
9123
  case "stat-ladder":
8760
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
9124
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
8761
9125
  StatLadderGame,
8762
9126
  {
8763
9127
  ...sharedProps,
@@ -8765,7 +9129,7 @@ function GameScreenHost({
8765
9129
  }
8766
9130
  );
8767
9131
  case "fan-motm":
8768
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
9132
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
8769
9133
  FanMotmGame,
8770
9134
  {
8771
9135
  ...sharedProps,
@@ -8773,10 +9137,10 @@ function GameScreenHost({
8773
9137
  }
8774
9138
  );
8775
9139
  default:
8776
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "ss-g-screen", "data-testid": `game-screen-${gameId}`, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(GameHeader, { title: gameTitle({ gameId }, ui.games.titles), onBack, backLabel: ui.back }) });
9140
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "ss-g-screen", "data-testid": `game-screen-${gameId}`, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(GameHeader, { title: gameTitle({ gameId }, ui.games.titles), onBack, backLabel: ui.back }) });
8777
9141
  }
8778
9142
  }
8779
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "ss-w-gscreen", "data-testid": "gscreen", "data-lock-at": lockAtUtc ?? void 0, children: renderScreen() });
9143
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "ss-w-gscreen", "data-testid": "gscreen", "data-lock-at": lockAtUtc ?? void 0, children: renderScreen() });
8780
9144
  }
8781
9145
 
8782
9146
  // src/components/games/ui/fonts.ts
@@ -8793,7 +9157,7 @@ function ensureGamesFonts(doc = document) {
8793
9157
  }
8794
9158
 
8795
9159
  // src/components/GamesPanel.tsx
8796
- var import_jsx_runtime88 = require("react/jsx-runtime");
9160
+ var import_jsx_runtime89 = require("react/jsx-runtime");
8797
9161
  function GamesPanel({
8798
9162
  loggedIn,
8799
9163
  games,
@@ -8802,13 +9166,13 @@ function GamesPanel({
8802
9166
  leaderboard,
8803
9167
  refreshHub
8804
9168
  }) {
8805
- const [selected, setSelected] = (0, import_react51.useState)(null);
8806
- (0, import_react51.useEffect)(() => {
9169
+ const [selected, setSelected] = (0, import_react55.useState)(null);
9170
+ (0, import_react55.useEffect)(() => {
8807
9171
  ensureGamesFonts();
8808
9172
  }, []);
8809
- if (!loggedIn) return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(GamesLoginWall, { ui });
9173
+ if (!loggedIn) return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(GamesLoginWall, { ui });
8810
9174
  if (selected !== null) {
8811
- return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "ss-w-gscreen-wrap", lang: ui.games.lang, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
9175
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "ss-w-gscreen-wrap", lang: ui.games.lang, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
8812
9176
  GameScreenHost,
8813
9177
  {
8814
9178
  selected,
@@ -8822,7 +9186,7 @@ function GamesPanel({
8822
9186
  }
8823
9187
  ) });
8824
9188
  }
8825
- return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "ss-g-hub-wrap", "data-testid": "games-hub", lang: ui.games.lang, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
9189
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "ss-g-hub-wrap", "data-testid": "games-hub", lang: ui.games.lang, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
8826
9190
  GamesHub,
8827
9191
  {
8828
9192
  games,
@@ -8834,10 +9198,10 @@ function GamesPanel({
8834
9198
  }
8835
9199
 
8836
9200
  // src/components/Leaderboard.tsx
8837
- var import_react52 = require("react");
9201
+ var import_react56 = require("react");
8838
9202
 
8839
9203
  // src/components/LeaderboardRow.tsx
8840
- var import_jsx_runtime89 = require("react/jsx-runtime");
9204
+ var import_jsx_runtime90 = require("react/jsx-runtime");
8841
9205
  function formatPoints(n) {
8842
9206
  return n.toLocaleString("en");
8843
9207
  }
@@ -8846,14 +9210,14 @@ function LeaderboardWeeklyRow({
8846
9210
  isMe
8847
9211
  }) {
8848
9212
  const rankClass = `ss-w-lb2-rank${row.rank <= 3 ? " ss-w-lb2-rank--top3" : ""}`;
8849
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: `ss-w-lb2-row${isMe ? " ss-w-lb2-row--you" : ""}`, children: [
8850
- /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("span", { className: rankClass, children: [
9213
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: `ss-w-lb2-row${isMe ? " ss-w-lb2-row--you" : ""}`, children: [
9214
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("span", { className: rankClass, children: [
8851
9215
  "#",
8852
9216
  row.rank
8853
9217
  ] }),
8854
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { className: "ss-w-lb2-handle", children: row.handle }),
8855
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { className: "ss-w-lb2-points", children: formatPoints(row.points) }),
8856
- row.currentStreak > 0 && /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("span", { className: "ss-w-lb2-streak", children: [
9218
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "ss-w-lb2-handle", children: row.handle }),
9219
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "ss-w-lb2-points", children: formatPoints(row.points) }),
9220
+ row.currentStreak > 0 && /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("span", { className: "ss-w-lb2-streak", children: [
8857
9221
  "\u{1F525} ",
8858
9222
  row.currentStreak
8859
9223
  ] })
@@ -8864,18 +9228,18 @@ function LeaderboardAllTimeRow({
8864
9228
  isMe
8865
9229
  }) {
8866
9230
  const rankClass = `ss-w-lb2-rank${row.rank <= 3 ? " ss-w-lb2-rank--top3" : ""}`;
8867
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: `ss-w-lb2-row${isMe ? " ss-w-lb2-row--you" : ""}`, children: [
8868
- /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("span", { className: rankClass, children: [
9231
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: `ss-w-lb2-row${isMe ? " ss-w-lb2-row--you" : ""}`, children: [
9232
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("span", { className: rankClass, children: [
8869
9233
  "#",
8870
9234
  row.rank
8871
9235
  ] }),
8872
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { className: "ss-w-lb2-handle", children: row.handle }),
8873
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { className: "ss-w-lb2-points", children: formatPoints(row.allTimePoints) })
9236
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "ss-w-lb2-handle", children: row.handle }),
9237
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "ss-w-lb2-points", children: formatPoints(row.allTimePoints) })
8874
9238
  ] });
8875
9239
  }
8876
9240
 
8877
9241
  // src/components/LeaderboardEmpty.tsx
8878
- var import_jsx_runtime90 = require("react/jsx-runtime");
9242
+ var import_jsx_runtime91 = require("react/jsx-runtime");
8879
9243
  function LeaderboardEmpty({
8880
9244
  segment,
8881
9245
  lastWeek,
@@ -8884,48 +9248,48 @@ function LeaderboardEmpty({
8884
9248
  ui
8885
9249
  }) {
8886
9250
  if (segment === "alltime") {
8887
- return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "ss-w-lb-empty ss-w-lb-empty--alltime", children: [
8888
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "ss-w-lb-empty-icon", "aria-hidden": "true", children: "\u{1F4CA}" }),
8889
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("p", { className: "ss-w-lb-empty-body", children: ui.leaderboardAllTimeEmpty })
9251
+ return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "ss-w-lb-empty ss-w-lb-empty--alltime", children: [
9252
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "ss-w-lb-empty-icon", "aria-hidden": "true", children: "\u{1F4CA}" }),
9253
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { className: "ss-w-lb-empty-body", children: ui.leaderboardAllTimeEmpty })
8890
9254
  ] });
8891
9255
  }
8892
9256
  const fresh = lastWeek != null;
8893
9257
  const title = fresh ? ui.leaderboardEmptyFreshTitle : ui.leaderboardEmptyColdTitle;
8894
9258
  const body = fresh ? ui.leaderboardEmptyFreshBody : ui.leaderboardEmptyColdBody;
8895
- return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "ss-w-lb-empty", children: [
8896
- weeklyPrize && /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "ss-w-prize", children: [
8897
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "ss-w-prize-icon", "aria-hidden": "true", children: "\u{1F3C6}" }),
8898
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "ss-w-prize-body", children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "ss-w-prize-text", children: weeklyPrize }) })
9259
+ return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "ss-w-lb-empty", children: [
9260
+ weeklyPrize && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "ss-w-prize", children: [
9261
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "ss-w-prize-icon", "aria-hidden": "true", children: "\u{1F3C6}" }),
9262
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "ss-w-prize-body", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "ss-w-prize-text", children: weeklyPrize }) })
8899
9263
  ] }),
8900
- /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "ss-w-lb-empty-hero", children: [
8901
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "ss-w-lb-empty-icon", "aria-hidden": "true", children: fresh ? "\u{1F3C6}" : "\u{1F3AE}" }),
8902
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("h4", { className: "ss-w-lb-empty-title", children: title }),
8903
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("p", { className: "ss-w-lb-empty-body", children: body }),
8904
- onPlay && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("button", { type: "button", className: "ss-w-lb-empty-cta", onClick: onPlay, children: ui.leaderboardEmptyCta })
9264
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "ss-w-lb-empty-hero", children: [
9265
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "ss-w-lb-empty-icon", "aria-hidden": "true", children: fresh ? "\u{1F3C6}" : "\u{1F3AE}" }),
9266
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("h4", { className: "ss-w-lb-empty-title", children: title }),
9267
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { className: "ss-w-lb-empty-body", children: body }),
9268
+ onPlay && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("button", { type: "button", className: "ss-w-lb-empty-cta", onClick: onPlay, children: ui.leaderboardEmptyCta })
8905
9269
  ] }),
8906
- fresh && lastWeek && /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "ss-w-lb-last", children: [
8907
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "ss-w-lb-last-label", children: ui.leaderboardLastWeekLabel }),
8908
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "ss-w-lb-last-champ", "aria-hidden": "true", children: "\u{1F947}" }),
8909
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "ss-w-lb-last-handle", children: lastWeek.handle }),
8910
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "ss-w-lb-last-points", children: formatPoints(lastWeek.points) })
9270
+ fresh && lastWeek && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "ss-w-lb-last", children: [
9271
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "ss-w-lb-last-label", children: ui.leaderboardLastWeekLabel }),
9272
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "ss-w-lb-last-champ", "aria-hidden": "true", children: "\u{1F947}" }),
9273
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "ss-w-lb-last-handle", children: lastWeek.handle }),
9274
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "ss-w-lb-last-points", children: formatPoints(lastWeek.points) })
8911
9275
  ] })
8912
9276
  ] });
8913
9277
  }
8914
9278
 
8915
9279
  // src/components/Leaderboard.tsx
8916
- var import_jsx_runtime91 = require("react/jsx-runtime");
9280
+ var import_jsx_runtime92 = require("react/jsx-runtime");
8917
9281
  function Leaderboard({
8918
9282
  data,
8919
9283
  ui,
8920
9284
  onPlay
8921
9285
  }) {
8922
- const [segment, setSegment] = (0, import_react52.useState)("weekly");
9286
+ const [segment, setSegment] = (0, import_react56.useState)("weekly");
8923
9287
  const myRow = segment === "weekly" ? data.myWeeklyRow : data.myAllTimeRow;
8924
9288
  const offBoard = myRow !== null && myRow !== void 0 && myRow.rank === -1;
8925
9289
  const isEmpty = segment === "weekly" ? data.weeklyTop.length === 0 : data.allTimeTop.length === 0;
8926
- return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "ss-w-lb2", children: [
8927
- /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "ss-w-seg", children: [
8928
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
9290
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "ss-w-lb2", children: [
9291
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "ss-w-seg", children: [
9292
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
8929
9293
  "button",
8930
9294
  {
8931
9295
  type: "button",
@@ -8935,7 +9299,7 @@ function Leaderboard({
8935
9299
  children: ui.leaderboardThisWeek
8936
9300
  }
8937
9301
  ),
8938
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
9302
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
8939
9303
  "button",
8940
9304
  {
8941
9305
  type: "button",
@@ -8946,7 +9310,7 @@ function Leaderboard({
8946
9310
  }
8947
9311
  )
8948
9312
  ] }),
8949
- isEmpty ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
9313
+ isEmpty ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
8950
9314
  LeaderboardEmpty,
8951
9315
  {
8952
9316
  segment,
@@ -8955,15 +9319,15 @@ function Leaderboard({
8955
9319
  onPlay,
8956
9320
  ui
8957
9321
  }
8958
- ) : /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(import_jsx_runtime91.Fragment, { children: [
8959
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "ss-w-lb2-rows", children: segment === "weekly" ? data.weeklyTop.map((row) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
9322
+ ) : /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(import_jsx_runtime92.Fragment, { children: [
9323
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "ss-w-lb2-rows", children: segment === "weekly" ? data.weeklyTop.map((row) => /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
8960
9324
  LeaderboardWeeklyRow,
8961
9325
  {
8962
9326
  row,
8963
9327
  isMe: row.operatorUserId === data.myWeeklyRow?.operatorUserId
8964
9328
  },
8965
9329
  row.operatorUserId
8966
- )) : data.allTimeTop.map((row) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
9330
+ )) : data.allTimeTop.map((row) => /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
8967
9331
  LeaderboardAllTimeRow,
8968
9332
  {
8969
9333
  row,
@@ -8971,18 +9335,18 @@ function Leaderboard({
8971
9335
  },
8972
9336
  row.operatorUserId
8973
9337
  )) }),
8974
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "ss-w-kitline", children: "\u{1F3BD}" }),
8975
- myRow != null && (offBoard ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "ss-w-lbgap", children: ui.leaderboardOffBoard }) : /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "ss-w-lb2-rows", children: [
8976
- segment === "weekly" && data.myWeeklyRow && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(LeaderboardWeeklyRow, { row: data.myWeeklyRow, isMe: true }),
8977
- segment === "alltime" && data.myAllTimeRow && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(LeaderboardAllTimeRow, { row: data.myAllTimeRow, isMe: true })
9338
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "ss-w-kitline", children: "\u{1F3BD}" }),
9339
+ myRow != null && (offBoard ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "ss-w-lbgap", children: ui.leaderboardOffBoard }) : /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "ss-w-lb2-rows", children: [
9340
+ segment === "weekly" && data.myWeeklyRow && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(LeaderboardWeeklyRow, { row: data.myWeeklyRow, isMe: true }),
9341
+ segment === "alltime" && data.myAllTimeRow && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(LeaderboardAllTimeRow, { row: data.myAllTimeRow, isMe: true })
8978
9342
  ] })),
8979
- segment === "alltime" && data.myAllTimeRow && !offBoard && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "ss-w-lb2-rows", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "ss-w-lb2-row", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "ss-w-lb2-handle", children: formatPoints(data.allTimeTop.reduce((s, r) => s + r.allTimePoints, 0)) }) }) })
9343
+ segment === "alltime" && data.myAllTimeRow && !offBoard && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "ss-w-lb2-rows", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "ss-w-lb2-row", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { className: "ss-w-lb2-handle", children: formatPoints(data.allTimeTop.reduce((s, r) => s + r.allTimePoints, 0)) }) }) })
8980
9344
  ] })
8981
9345
  ] });
8982
9346
  }
8983
9347
 
8984
9348
  // src/components/LeaderboardPanel.tsx
8985
- var import_jsx_runtime92 = require("react/jsx-runtime");
9349
+ var import_jsx_runtime93 = require("react/jsx-runtime");
8986
9350
  var EMPTY_PAYLOAD = {
8987
9351
  week: "",
8988
9352
  weeklyTop: [],
@@ -8993,19 +9357,19 @@ var EMPTY_PAYLOAD = {
8993
9357
  lastWeek: null
8994
9358
  };
8995
9359
  function LeaderboardPanel({ loggedIn, data, loading, onPlay, ui }) {
8996
- if (!loggedIn) return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(GamesLoginWall, { ui });
8997
- if (data === null && loading) return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "ss-w-mon-list" });
8998
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "ss-w-mon-list", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Leaderboard, { data: data ?? EMPTY_PAYLOAD, ui, onPlay }) });
9360
+ if (!loggedIn) return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(GamesLoginWall, { ui });
9361
+ if (data === null && loading) return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "ss-w-mon-list" });
9362
+ return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "ss-w-mon-list", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Leaderboard, { data: data ?? EMPTY_PAYLOAD, ui, onPlay }) });
8999
9363
  }
9000
9364
 
9001
9365
  // src/components/PresetSpeedDial.tsx
9002
- var import_react53 = require("react");
9003
- var import_jsx_runtime93 = require("react/jsx-runtime");
9366
+ var import_react57 = require("react");
9367
+ var import_jsx_runtime94 = require("react/jsx-runtime");
9004
9368
  function PresetSpeedDial({ expanded, showDot, strings, onToggle, onOpen, rootRef, buttonRef }) {
9005
- const pillsId = (0, import_react53.useId)();
9369
+ const pillsId = (0, import_react57.useId)();
9006
9370
  const tabIndex = expanded ? 0 : -1;
9007
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { ref: rootRef, className: "ss-w-dial", children: [
9008
- /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
9371
+ return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { ref: rootRef, className: "ss-w-dial", children: [
9372
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
9009
9373
  "button",
9010
9374
  {
9011
9375
  ref: buttonRef,
@@ -9016,36 +9380,36 @@ function PresetSpeedDial({ expanded, showDot, strings, onToggle, onOpen, rootRef
9016
9380
  "aria-label": strings.dialName,
9017
9381
  onClick: onToggle,
9018
9382
  children: [
9019
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "ss-w-dial-icon ss-w-dial-icon--open", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(SlidersIcon, {}) }),
9020
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "ss-w-dial-icon ss-w-dial-icon--close", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(CloseIcon, {}) }),
9021
- showDot && !expanded ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "ss-w-dial-dot", "aria-hidden": "true" }) : null
9383
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "ss-w-dial-icon ss-w-dial-icon--open", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(SlidersIcon, {}) }),
9384
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "ss-w-dial-icon ss-w-dial-icon--close", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(CloseIcon, {}) }),
9385
+ showDot && !expanded ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "ss-w-dial-dot", "aria-hidden": "true" }) : null
9022
9386
  ]
9023
9387
  }
9024
9388
  ),
9025
- /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { id: pillsId, className: "ss-w-dial-pills", "data-open": expanded ? "" : void 0, children: [
9026
- /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("button", { type: "button", className: "ss-w-dial-pill", tabIndex, onClick: () => onOpen("numbers"), children: [
9027
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(SlidersIcon, {}),
9028
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "ss-w-dial-pill-label", children: strings.setNumbers })
9389
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { id: pillsId, className: "ss-w-dial-pills", "data-open": expanded ? "" : void 0, children: [
9390
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("button", { type: "button", className: "ss-w-dial-pill", tabIndex, onClick: () => onOpen("numbers"), children: [
9391
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(SlidersIcon, {}),
9392
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "ss-w-dial-pill-label", children: strings.setNumbers })
9029
9393
  ] }),
9030
- /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("button", { type: "button", className: "ss-w-dial-pill", tabIndex, onClick: () => onOpen("combo"), children: [
9031
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ComboIcon, {}),
9032
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "ss-w-dial-pill-label", children: strings.buildCombo })
9394
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("button", { type: "button", className: "ss-w-dial-pill", tabIndex, onClick: () => onOpen("combo"), children: [
9395
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(ComboIcon, {}),
9396
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "ss-w-dial-pill-label", children: strings.buildCombo })
9033
9397
  ] })
9034
9398
  ] })
9035
9399
  ] });
9036
9400
  }
9037
9401
 
9038
9402
  // src/components/PresetTools.tsx
9039
- var import_react54 = require("react");
9040
- var import_jsx_runtime94 = require("react/jsx-runtime");
9403
+ var import_react58 = require("react");
9404
+ var import_jsx_runtime95 = require("react/jsx-runtime");
9041
9405
  var FOCUSABLE = 'button:not([disabled]), [href], input:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
9042
9406
  function PresetToolModal({ title, closeLabel, onClose, children, footer }) {
9043
- const dialogRef = (0, import_react54.useRef)(null);
9044
- const titleId = (0, import_react54.useId)();
9045
- (0, import_react54.useEffect)(() => {
9407
+ const dialogRef = (0, import_react58.useRef)(null);
9408
+ const titleId = (0, import_react58.useId)();
9409
+ (0, import_react58.useEffect)(() => {
9046
9410
  dialogRef.current?.focus();
9047
9411
  }, []);
9048
- (0, import_react54.useEffect)(() => {
9412
+ (0, import_react58.useEffect)(() => {
9049
9413
  const onKey = (e) => {
9050
9414
  if (e.key !== "Escape") return;
9051
9415
  e.stopPropagation();
@@ -9075,79 +9439,79 @@ function PresetToolModal({ title, closeLabel, onClose, children, footer }) {
9075
9439
  first.focus();
9076
9440
  }
9077
9441
  };
9078
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "ss-w-tool-backdrop", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { ref: dialogRef, className: "ss-w-tool", role: "dialog", "aria-modal": "true", "aria-labelledby": titleId, tabIndex: -1, onKeyDown: trapTab, children: [
9079
- /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "ss-w-tool-head", children: [
9080
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("h2", { id: titleId, className: "ss-w-tool-title", children: title }),
9081
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("button", { type: "button", className: "ss-w-tool-close", "aria-label": closeLabel, onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(CloseIcon, {}) })
9442
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "ss-w-tool-backdrop", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { ref: dialogRef, className: "ss-w-tool", role: "dialog", "aria-modal": "true", "aria-labelledby": titleId, tabIndex: -1, onKeyDown: trapTab, children: [
9443
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "ss-w-tool-head", children: [
9444
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("h2", { id: titleId, className: "ss-w-tool-title", children: title }),
9445
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("button", { type: "button", className: "ss-w-tool-close", "aria-label": closeLabel, onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(CloseIcon, {}) })
9082
9446
  ] }),
9083
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "ss-w-tool-body", children }),
9084
- footer ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "ss-w-tool-foot", children: footer }) : null
9447
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "ss-w-tool-body", children }),
9448
+ footer ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "ss-w-tool-foot", children: footer }) : null
9085
9449
  ] }) });
9086
9450
  }
9087
9451
  function fillTemplate(template, slots) {
9088
9452
  return template.split(/(\{[a-z]+\})/).filter((part) => part !== "").map((part, i) => {
9089
9453
  const key = /^\{([a-z]+)\}$/.exec(part)?.[1];
9090
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react54.Fragment, { children: key !== void 0 && key in slots ? slots[key] : part }, i);
9454
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react58.Fragment, { children: key !== void 0 && key in slots ? slots[key] : part }, i);
9091
9455
  });
9092
9456
  }
9093
9457
  function NumberSelect({ current, choices: choices2, label, notToday, lockEmpty = true, onChoose }) {
9094
9458
  const selected = Math.max(0, choices2.findIndex((c) => c.text === current));
9095
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("span", { className: "ss-w-tool-num", children: [
9096
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "ss-w-tool-num-size", "aria-hidden": "true", children: current }),
9097
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("select", { className: "ss-w-tool-num-select", "aria-label": label, value: String(selected), onChange: (e) => {
9459
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("span", { className: "ss-w-tool-num", children: [
9460
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "ss-w-tool-num-size", "aria-hidden": "true", children: current }),
9461
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("select", { className: "ss-w-tool-num-select", "aria-label": label, value: String(selected), onChange: (e) => {
9098
9462
  const c = choices2[Number(e.target.value)];
9099
9463
  if (c) onChoose(c.value);
9100
- }, children: choices2.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("option", { value: String(i), disabled: lockEmpty && !c.available && i !== selected, children: c.available ? c.text : `${c.text}${notToday}` }, i)) })
9464
+ }, children: choices2.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("option", { value: String(i), disabled: lockEmpty && !c.available && i !== selected, children: c.available ? c.text : `${c.text}${notToday}` }, i)) })
9101
9465
  ] });
9102
9466
  }
9103
9467
  function ChoiceSelect({ currentIdx, sizeLabels, optionLabels, label, onChoose }) {
9104
9468
  const sizeText = sizeLabels[currentIdx] ?? "";
9105
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("span", { className: "ss-w-tool-num", children: [
9106
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "ss-w-tool-num-size", "aria-hidden": "true", children: sizeText }),
9107
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("select", { className: "ss-w-tool-num-select", "aria-label": label, value: String(currentIdx), onChange: (e) => onChoose(Number(e.target.value)), children: optionLabels.map((opt, i) => /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("option", { value: String(i), children: opt }, i)) })
9469
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("span", { className: "ss-w-tool-num", children: [
9470
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "ss-w-tool-num-size", "aria-hidden": "true", children: sizeText }),
9471
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("select", { className: "ss-w-tool-num-select", "aria-label": label, value: String(currentIdx), onChange: (e) => onChoose(Number(e.target.value)), children: optionLabels.map((opt, i) => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("option", { value: String(i), children: opt }, i)) })
9108
9472
  ] });
9109
9473
  }
9110
9474
  function SendButton({ label, display, disabled, onClick }) {
9111
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("button", { type: "button", className: "ss-w-tool-send", "aria-label": `${label}: ${display}`, disabled, onClick, children: label });
9475
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("button", { type: "button", className: "ss-w-tool-send", "aria-label": `${label}: ${display}`, disabled, onClick, children: label });
9112
9476
  }
9113
9477
  function PickList({ picks, formatKickoff }) {
9114
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("ul", { className: "ss-w-tool-picks", role: "list", children: picks.map((p) => /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("li", { className: "ss-w-tool-pick", children: [
9115
- /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("span", { className: "ss-w-tool-pick-match", children: [
9478
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("ul", { className: "ss-w-tool-picks", role: "list", children: picks.map((p) => /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("li", { className: "ss-w-tool-pick", children: [
9479
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("span", { className: "ss-w-tool-pick-match", children: [
9116
9480
  p.homeTeamName,
9117
9481
  " \u2013 ",
9118
9482
  p.awayTeamName
9119
9483
  ] }),
9120
- /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("span", { className: "ss-w-tool-pick-sel", children: [
9484
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("span", { className: "ss-w-tool-pick-sel", children: [
9121
9485
  p.marketLabel,
9122
9486
  ": ",
9123
9487
  p.selectionLabel,
9124
9488
  p.line ? ` ${p.line}` : ""
9125
9489
  ] }),
9126
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "ss-w-tool-pick-kick", children: formatKickoff(p.kickoffUtc) }),
9127
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "ss-w-tool-pick-price", children: p.price.toFixed(2) })
9490
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "ss-w-tool-pick-kick", children: formatKickoff(p.kickoffUtc) }),
9491
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "ss-w-tool-pick-price", children: p.price.toFixed(2) })
9128
9492
  ] }, p.matchOddsId)) });
9129
9493
  }
9130
9494
  function ComboPreview({ cell, formatKickoff }) {
9131
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(import_jsx_runtime94.Fragment, { children: [
9132
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(PickList, { picks: cell.combo.legs, formatKickoff }),
9133
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "ss-w-tool-math", children: cell.combo.multiplication })
9495
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(import_jsx_runtime95.Fragment, { children: [
9496
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(PickList, { picks: cell.combo.legs, formatKickoff }),
9497
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "ss-w-tool-math", children: cell.combo.multiplication })
9134
9498
  ] });
9135
9499
  }
9136
9500
  function Unavailable({ text }) {
9137
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: "ss-w-tool-unavailable", children: text });
9501
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("p", { className: "ss-w-tool-unavailable", children: text });
9138
9502
  }
9139
9503
  function AskRow({ icon, ask, ready, send }) {
9140
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("section", { className: "ss-w-tool-row ss-w-tool-row--ask", children: [
9141
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "ss-w-tool-icon", "aria-hidden": "true", children: icon }),
9142
- /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "ss-w-tool-main", children: [
9143
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: "ss-w-tool-ask", children: ask }),
9144
- ready ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "ss-w-tool-ready", children: ready }) : null
9504
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("section", { className: "ss-w-tool-row ss-w-tool-row--ask", children: [
9505
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "ss-w-tool-icon", "aria-hidden": "true", children: icon }),
9506
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "ss-w-tool-main", children: [
9507
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("p", { className: "ss-w-tool-ask", children: ask }),
9508
+ ready ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "ss-w-tool-ready", children: ready }) : null
9145
9509
  ] }),
9146
9510
  send
9147
9511
  ] });
9148
9512
  }
9149
9513
  function RoundSend({ label, display, disabled, onClick }) {
9150
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("button", { type: "button", className: "ss-w-tool-go", "aria-label": `${label}: ${display}`, disabled, onClick, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(SendIcon, {}) });
9514
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("button", { type: "button", className: "ss-w-tool-go", "aria-label": `${label}: ${display}`, disabled, onClick, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(SendIcon, {}) });
9151
9515
  }
9152
9516
  var BIG_COMBO = { total: 50, legs: 6 };
9153
9517
  function SetNumbersTool({ grid, strings, streaming, onSend, onClose }) {
@@ -9156,15 +9520,15 @@ function SetNumbersTool({ grid, strings, streaming, onSend, onClose }) {
9156
9520
  const totals = comboTotals(grid);
9157
9521
  const legChoices = comboLegChoices(grid);
9158
9522
  const count = FIXED_SINGLES_COUNT;
9159
- const [maxPrice, setMaxPrice] = (0, import_react54.useState)(() => startSingles(grid.singles, limits, START.maxPrice, count));
9160
- const [minPrice, setMinPrice] = (0, import_react54.useState)(() => startSingles(grid.singlesFrom, floors, START.minPrice, count));
9161
- const [start] = (0, import_react54.useState)(() => startCombo(grid, totals, legChoices, START.comboTotal, START.comboLegs));
9162
- const [total, setTotal] = (0, import_react54.useState)(start.total);
9163
- const [legs, setLegs] = (0, import_react54.useState)(start.legs);
9164
- const [bigStart] = (0, import_react54.useState)(() => startCombo(grid, totals, legChoices, BIG_COMBO.total, BIG_COMBO.legs));
9165
- const [bigTotal, setBigTotal] = (0, import_react54.useState)(bigStart.total);
9166
- const [bigLegs, setBigLegs] = (0, import_react54.useState)(bigStart.legs);
9167
- const [announcement, setAnnouncement] = (0, import_react54.useState)("");
9523
+ const [maxPrice, setMaxPrice] = (0, import_react58.useState)(() => startSingles(grid.singles, limits, START.maxPrice, count));
9524
+ const [minPrice, setMinPrice] = (0, import_react58.useState)(() => startSingles(grid.singlesFrom, floors, START.minPrice, count));
9525
+ const [start] = (0, import_react58.useState)(() => startCombo(grid, totals, legChoices, START.comboTotal, START.comboLegs));
9526
+ const [total, setTotal] = (0, import_react58.useState)(start.total);
9527
+ const [legs, setLegs] = (0, import_react58.useState)(start.legs);
9528
+ const [bigStart] = (0, import_react58.useState)(() => startCombo(grid, totals, legChoices, BIG_COMBO.total, BIG_COMBO.legs));
9529
+ const [bigTotal, setBigTotal] = (0, import_react58.useState)(bigStart.total);
9530
+ const [bigLegs, setBigLegs] = (0, import_react58.useState)(bigStart.legs);
9531
+ const [announcement, setAnnouncement] = (0, import_react58.useState)("");
9168
9532
  const maxCell = findSingles(grid.singles, maxPrice, count);
9169
9533
  const minCell = findSingles(grid.singlesFrom, minPrice, count);
9170
9534
  const comboCell = findCombo(grid, total, legs);
@@ -9208,95 +9572,95 @@ function SetNumbersTool({ grid, strings, streaming, onSend, onClose }) {
9208
9572
  const totalChoices = totals.map((v) => ({ value: v, text: v.toFixed(1), available: legChoices.some((n) => !!findCombo(grid, v, n)) }));
9209
9573
  const legChoicesFor = (t) => legChoices.map((n) => ({ value: n, text: String(n), available: !!findCombo(grid, t, n) }));
9210
9574
  const markets = grid.markets ?? [];
9211
- const [marketIdx, setMarketIdx] = (0, import_react54.useState)(0);
9575
+ const [marketIdx, setMarketIdx] = (0, import_react58.useState)(0);
9212
9576
  const marketCell = markets[marketIdx] ?? null;
9213
9577
  const marketLabels = markets.map((c) => strings.marketShort(c.marketDeveloperName, c.marketLabel, c.selectionLabel ?? null));
9214
9578
  const singlesReady = (cell) => cell ? strings.readyCount(cell.picks.length) : strings.unavailable;
9215
9579
  const comboReady = (cell) => cell ? strings.readyAt(cell.combo.total) : strings.unavailable;
9216
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(PresetToolModal, { title: strings.setNumbers, closeLabel: strings.close, onClose, children: [
9217
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
9580
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(PresetToolModal, { title: strings.setNumbers, closeLabel: strings.close, onClose, children: [
9581
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
9218
9582
  AskRow,
9219
9583
  {
9220
9584
  icon: "\u{1F3AF}",
9221
9585
  ask: fillTemplate(strings.maxPriceRow, {
9222
9586
  count: String(count),
9223
- price: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(NumberSelect, { current: maxPrice.toFixed(2), choices: maxChoices, label: strings.maxPriceName, notToday: strings.notToday, onChoose: chooseMax })
9587
+ price: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(NumberSelect, { current: maxPrice.toFixed(2), choices: maxChoices, label: strings.maxPriceName, notToday: strings.notToday, onChoose: chooseMax })
9224
9588
  }),
9225
9589
  ready: singlesReady(maxCell),
9226
- send: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(RoundSend, { label: strings.send, display: strings.maxPriceDisplay(count, maxPrice), disabled: !maxCell || streaming, onClick: () => {
9590
+ send: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(RoundSend, { label: strings.send, display: strings.maxPriceDisplay(count, maxPrice), disabled: !maxCell || streaming, onClick: () => {
9227
9591
  if (maxCell) onSend(maxPriceAsk(maxCell, strings));
9228
9592
  } })
9229
9593
  }
9230
9594
  ),
9231
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
9595
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
9232
9596
  AskRow,
9233
9597
  {
9234
9598
  icon: "\u{1F4C8}",
9235
9599
  ask: fillTemplate(strings.minPriceRow, {
9236
9600
  count: String(count),
9237
- price: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(NumberSelect, { current: minPrice.toFixed(2), choices: minChoices, label: strings.minPriceName, notToday: strings.notToday, onChoose: chooseMin })
9601
+ price: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(NumberSelect, { current: minPrice.toFixed(2), choices: minChoices, label: strings.minPriceName, notToday: strings.notToday, onChoose: chooseMin })
9238
9602
  }),
9239
9603
  ready: singlesReady(minCell),
9240
- send: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(RoundSend, { label: strings.send, display: strings.minPriceDisplay(count, minPrice), disabled: !minCell || streaming, onClick: () => {
9604
+ send: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(RoundSend, { label: strings.send, display: strings.minPriceDisplay(count, minPrice), disabled: !minCell || streaming, onClick: () => {
9241
9605
  if (minCell) onSend(minPriceAsk(minCell, strings));
9242
9606
  } })
9243
9607
  }
9244
9608
  ),
9245
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
9609
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
9246
9610
  AskRow,
9247
9611
  {
9248
9612
  icon: "\u2728",
9249
9613
  ask: fillTemplate(strings.comboRow, {
9250
- legs: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(NumberSelect, { current: String(legs), choices: legChoicesFor(total), label: strings.matchesLabel, notToday: strings.notToday, lockEmpty: false, onChoose: chooseLegs }),
9251
- total: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(NumberSelect, { current: total.toFixed(1), choices: totalChoices, label: strings.totalLabel, notToday: strings.notToday, onChoose: chooseTotal })
9614
+ legs: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(NumberSelect, { current: String(legs), choices: legChoicesFor(total), label: strings.matchesLabel, notToday: strings.notToday, lockEmpty: false, onChoose: chooseLegs }),
9615
+ total: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(NumberSelect, { current: total.toFixed(1), choices: totalChoices, label: strings.totalLabel, notToday: strings.notToday, onChoose: chooseTotal })
9252
9616
  }),
9253
9617
  ready: comboReady(comboCell),
9254
- send: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(RoundSend, { label: strings.send, display: strings.comboDisplay(legs, total), disabled: !comboCell || streaming, onClick: () => {
9618
+ send: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(RoundSend, { label: strings.send, display: strings.comboDisplay(legs, total), disabled: !comboCell || streaming, onClick: () => {
9255
9619
  if (comboCell) onSend(comboAsk(comboCell, strings));
9256
9620
  } })
9257
9621
  }
9258
9622
  ),
9259
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
9623
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
9260
9624
  AskRow,
9261
9625
  {
9262
9626
  icon: "\u{1F3C6}",
9263
9627
  ask: fillTemplate(strings.bigComboRow, {
9264
- legs: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(NumberSelect, { current: String(bigLegs), choices: legChoicesFor(bigTotal), label: strings.matchesLabel, notToday: strings.notToday, lockEmpty: false, onChoose: chooseBigLegs }),
9265
- total: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(NumberSelect, { current: bigTotal.toFixed(1), choices: totalChoices, label: strings.totalLabel, notToday: strings.notToday, onChoose: chooseBigTotal })
9628
+ legs: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(NumberSelect, { current: String(bigLegs), choices: legChoicesFor(bigTotal), label: strings.matchesLabel, notToday: strings.notToday, lockEmpty: false, onChoose: chooseBigLegs }),
9629
+ total: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(NumberSelect, { current: bigTotal.toFixed(1), choices: totalChoices, label: strings.totalLabel, notToday: strings.notToday, onChoose: chooseBigTotal })
9266
9630
  }),
9267
9631
  ready: comboReady(bigCell),
9268
- send: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(RoundSend, { label: strings.send, display: strings.comboDisplay(bigLegs, bigTotal), disabled: !bigCell || streaming, onClick: () => {
9632
+ send: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(RoundSend, { label: strings.send, display: strings.comboDisplay(bigLegs, bigTotal), disabled: !bigCell || streaming, onClick: () => {
9269
9633
  if (bigCell) onSend(comboAsk(bigCell, strings));
9270
9634
  } })
9271
9635
  }
9272
9636
  ),
9273
- markets.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
9637
+ markets.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
9274
9638
  AskRow,
9275
9639
  {
9276
9640
  icon: "\u26BD",
9277
9641
  ask: fillTemplate(strings.marketRow, {
9278
- market: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(ChoiceSelect, { currentIdx: marketIdx, sizeLabels: marketLabels, optionLabels: marketLabels, label: strings.marketName, onChoose: chooseMarket })
9642
+ market: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ChoiceSelect, { currentIdx: marketIdx, sizeLabels: marketLabels, optionLabels: marketLabels, label: strings.marketName, onChoose: chooseMarket })
9279
9643
  }),
9280
9644
  ready: marketCell ? strings.readyCount(marketCell.count) : null,
9281
- send: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(RoundSend, { label: strings.send, display: marketCell ? marketDisplay(marketCell, strings) : "", disabled: !marketCell || streaming, onClick: () => {
9645
+ send: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(RoundSend, { label: strings.send, display: marketCell ? marketDisplay(marketCell, strings) : "", disabled: !marketCell || streaming, onClick: () => {
9282
9646
  if (marketCell) onSend(marketAsk(marketCell, strings));
9283
9647
  } })
9284
9648
  }
9285
9649
  ),
9286
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: "ss-w-vh", "aria-live": "polite", children: announcement })
9650
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("p", { className: "ss-w-vh", "aria-live": "polite", children: announcement })
9287
9651
  ] });
9288
9652
  }
9289
9653
  function BuildComboTool({ grid, strings, streaming, formatKickoff, initialTotal, initialLegs, onSend, onClose }) {
9290
9654
  const totals = comboTotals(grid);
9291
9655
  const legChoices = comboLegChoices(grid);
9292
- const [start] = (0, import_react54.useState)(() => initialTotal === void 0 ? startCombo(grid, totals, legChoices, START.comboTotal, START.comboLegs) : null);
9293
- const [total, setTotal] = (0, import_react54.useState)(() => initialTotal !== void 0 ? nearest(totals, initialTotal) : start.total);
9294
- const [legs, setLegs] = (0, import_react54.useState)(() => {
9656
+ const [start] = (0, import_react58.useState)(() => initialTotal === void 0 ? startCombo(grid, totals, legChoices, START.comboTotal, START.comboLegs) : null);
9657
+ const [total, setTotal] = (0, import_react58.useState)(() => initialTotal !== void 0 ? nearest(totals, initialTotal) : start.total);
9658
+ const [legs, setLegs] = (0, import_react58.useState)(() => {
9295
9659
  if (initialTotal === void 0) return initialLegs !== void 0 ? clampLegs(legChoices, initialLegs) : start.legs;
9296
9660
  const from = initialLegs !== void 0 ? clampLegs(legChoices, initialLegs) : startValue(legChoices, START.comboLegs);
9297
9661
  return legsForTotal(grid, nearest(totals, initialTotal), from);
9298
9662
  });
9299
- const [announcement, setAnnouncement] = (0, import_react54.useState)("");
9663
+ const [announcement, setAnnouncement] = (0, import_react58.useState)("");
9300
9664
  const cell = findCombo(grid, total, legs);
9301
9665
  const minLegs = legChoices[0] ?? legs;
9302
9666
  const maxLegs = legChoices[legChoices.length - 1] ?? legs;
@@ -9307,29 +9671,29 @@ function BuildComboTool({ grid, strings, streaming, formatKickoff, initialTotal,
9307
9671
  const d = strings.comboDisplay(nextLegs, nextTotal);
9308
9672
  setAnnouncement(findCombo(grid, nextTotal, nextLegs) ? d : `${d}. ${strings.unavailable}`);
9309
9673
  };
9310
- const footer = /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(SendButton, { label: strings.send, display, disabled: !cell || streaming, onClick: () => {
9674
+ const footer = /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(SendButton, { label: strings.send, display, disabled: !cell || streaming, onClick: () => {
9311
9675
  if (cell) onSend(comboAsk(cell, strings));
9312
9676
  } });
9313
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(PresetToolModal, { title: strings.buildCombo, closeLabel: strings.close, onClose, footer, children: [
9314
- /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "ss-w-tool-section", role: "group", "aria-label": strings.totalLabel, children: [
9315
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "ss-w-tool-label", "aria-hidden": "true", children: strings.totalLabel }),
9316
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "ss-w-tool-chips", children: totals.map((t) => /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("button", { type: "button", className: "ss-w-tool-chip", "aria-pressed": samePrice(t, total), onClick: () => choose(t, samePrice(t, total) ? legs : legsForTotal(grid, t, legs)), children: t.toFixed(1) }, t)) })
9677
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(PresetToolModal, { title: strings.buildCombo, closeLabel: strings.close, onClose, footer, children: [
9678
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "ss-w-tool-section", role: "group", "aria-label": strings.totalLabel, children: [
9679
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "ss-w-tool-label", "aria-hidden": "true", children: strings.totalLabel }),
9680
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "ss-w-tool-chips", children: totals.map((t) => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("button", { type: "button", className: "ss-w-tool-chip", "aria-pressed": samePrice(t, total), onClick: () => choose(t, samePrice(t, total) ? legs : legsForTotal(grid, t, legs)), children: t.toFixed(1) }, t)) })
9317
9681
  ] }),
9318
- /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "ss-w-tool-section", role: "group", "aria-label": strings.matchesLabel, children: [
9319
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "ss-w-tool-label", "aria-hidden": "true", children: strings.matchesLabel }),
9320
- /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "ss-w-tool-stepper", children: [
9321
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("button", { type: "button", className: "ss-w-tool-step", "aria-label": strings.fewerMatches, disabled: legs <= minLegs, onClick: () => choose(total, legs - 1), children: "\u2212" }),
9322
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "ss-w-tool-count", children: legs }),
9323
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("button", { type: "button", className: "ss-w-tool-step", "aria-label": strings.moreMatches, disabled: legs >= maxLegs, onClick: () => choose(total, legs + 1), children: "+" })
9682
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "ss-w-tool-section", role: "group", "aria-label": strings.matchesLabel, children: [
9683
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "ss-w-tool-label", "aria-hidden": "true", children: strings.matchesLabel }),
9684
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "ss-w-tool-stepper", children: [
9685
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("button", { type: "button", className: "ss-w-tool-step", "aria-label": strings.fewerMatches, disabled: legs <= minLegs, onClick: () => choose(total, legs - 1), children: "\u2212" }),
9686
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "ss-w-tool-count", children: legs }),
9687
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("button", { type: "button", className: "ss-w-tool-step", "aria-label": strings.moreMatches, disabled: legs >= maxLegs, onClick: () => choose(total, legs + 1), children: "+" })
9324
9688
  ] })
9325
9689
  ] }),
9326
- cell ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(ComboPreview, { cell, formatKickoff }) : /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Unavailable, { text: strings.unavailable }),
9327
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: "ss-w-vh", "aria-live": "polite", children: announcement })
9690
+ cell ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ComboPreview, { cell, formatKickoff }) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Unavailable, { text: strings.unavailable }),
9691
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("p", { className: "ss-w-vh", "aria-live": "polite", children: announcement })
9328
9692
  ] });
9329
9693
  }
9330
9694
 
9331
9695
  // src/usePresetDial.ts
9332
- var import_react55 = require("react");
9696
+ var import_react59 = require("react");
9333
9697
  function sendInFlight(messages, isStreaming) {
9334
9698
  const last = messages[messages.length - 1];
9335
9699
  return isStreaming && !!last && last.role === "assistant" && !last.done && !last.isGreeting;
@@ -9343,25 +9707,25 @@ function lastUserId(messages) {
9343
9707
  }
9344
9708
  var SCROLL_KEYS = /* @__PURE__ */ new Set(["ArrowUp", "ArrowDown", "PageUp", "PageDown", "Home", "End", " "]);
9345
9709
  function usePresetDial({ layerRef, dialRef, dialButtonRef, messages, isStreaming, activeTab }) {
9346
- const [expanded, setExpanded] = (0, import_react55.useState)(() => !sendInFlight(messages, isStreaming));
9347
- const fold = (0, import_react55.useCallback)(() => setExpanded(false), []);
9348
- const toggle = (0, import_react55.useCallback)(() => setExpanded((e) => !e), []);
9710
+ const [expanded, setExpanded] = (0, import_react59.useState)(() => !sendInFlight(messages, isStreaming));
9711
+ const fold = (0, import_react59.useCallback)(() => setExpanded(false), []);
9712
+ const toggle = (0, import_react59.useCallback)(() => setExpanded((e) => !e), []);
9349
9713
  const currentUserId = lastUserId(messages);
9350
- const userIdRef = (0, import_react55.useRef)(currentUserId);
9351
- (0, import_react55.useEffect)(() => {
9714
+ const userIdRef = (0, import_react59.useRef)(currentUserId);
9715
+ (0, import_react59.useEffect)(() => {
9352
9716
  if (currentUserId === userIdRef.current) return;
9353
9717
  userIdRef.current = currentUserId;
9354
9718
  setExpanded(false);
9355
9719
  }, [currentUserId]);
9356
- const tabRef = (0, import_react55.useRef)(activeTab);
9357
- (0, import_react55.useEffect)(() => {
9720
+ const tabRef = (0, import_react59.useRef)(activeTab);
9721
+ (0, import_react59.useEffect)(() => {
9358
9722
  if (activeTab === tabRef.current) return;
9359
9723
  tabRef.current = activeTab;
9360
9724
  setExpanded(false);
9361
9725
  }, [activeTab]);
9362
- const expandedRef = (0, import_react55.useRef)(expanded);
9726
+ const expandedRef = (0, import_react59.useRef)(expanded);
9363
9727
  expandedRef.current = expanded;
9364
- (0, import_react55.useEffect)(() => {
9728
+ (0, import_react59.useEffect)(() => {
9365
9729
  const onEscape = (e) => {
9366
9730
  const dial = dialRef.current;
9367
9731
  if (e.key !== "Escape" || !dial || !e.composedPath().includes(dial)) return;
@@ -9374,7 +9738,7 @@ function usePresetDial({ layerRef, dialRef, dialButtonRef, messages, isStreaming
9374
9738
  window.addEventListener("keydown", onEscape, true);
9375
9739
  return () => window.removeEventListener("keydown", onEscape, true);
9376
9740
  }, [dialRef, dialButtonRef]);
9377
- (0, import_react55.useEffect)(() => {
9741
+ (0, import_react59.useEffect)(() => {
9378
9742
  if (!expanded) return;
9379
9743
  const layer = layerRef.current;
9380
9744
  const inDial = (e) => {
@@ -9426,11 +9790,11 @@ function markToolSeen() {
9426
9790
  }
9427
9791
 
9428
9792
  // src/components/ChatPanel.tsx
9429
- var import_jsx_runtime95 = require("react/jsx-runtime");
9793
+ var import_jsx_runtime96 = require("react/jsx-runtime");
9430
9794
  var FULLSCREEN_QUERY = "(max-width: 639px)";
9431
9795
  function useIsModal() {
9432
- const [modal, setModal] = (0, import_react56.useState)(false);
9433
- (0, import_react56.useEffect)(() => {
9796
+ const [modal, setModal] = (0, import_react60.useState)(false);
9797
+ (0, import_react60.useEffect)(() => {
9434
9798
  if (typeof window === "undefined" || typeof window.matchMedia !== "function") return;
9435
9799
  const mql = window.matchMedia(FULLSCREEN_QUERY);
9436
9800
  const sync = () => setModal(mql.matches);
@@ -9444,7 +9808,7 @@ var HIDDEN_LAYER_STYLE = { position: "absolute", inset: 0, visibility: "hidden",
9444
9808
  function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, gamesResult, leaderboardResult, loggedIn, conversation, presetGrid }) {
9445
9809
  const { state, close, stop, send, reset } = controller;
9446
9810
  const isModal = useIsModal();
9447
- (0, import_react56.useEffect)(() => {
9811
+ (0, import_react60.useEffect)(() => {
9448
9812
  const onKey = (e) => {
9449
9813
  if (e.key === "Escape") close();
9450
9814
  };
@@ -9460,19 +9824,19 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
9460
9824
  monitor?.setActiveTab("chat");
9461
9825
  send(text, { grounding });
9462
9826
  };
9463
- (0, import_react56.useEffect)(() => {
9827
+ (0, import_react60.useEffect)(() => {
9464
9828
  if (monitor && monitor.activeTab !== "chat" && state.isStreaming) monitor.markChatActivity();
9465
9829
  }, [monitor, state.isStreaming, state.messages.length]);
9466
9830
  const onChatTab = !monitor || monitor.activeTab === "chat";
9467
- const layerRef = (0, import_react56.useRef)(null);
9468
- const dialRef = (0, import_react56.useRef)(null);
9469
- const dialButtonRef = (0, import_react56.useRef)(null);
9470
- const inputRef = (0, import_react56.useRef)(null);
9471
- const limitRef = (0, import_react56.useRef)(null);
9472
- const typedSendRef = (0, import_react56.useRef)(false);
9473
- const focusAfterCloseRef = (0, import_react56.useRef)(null);
9474
- const [tool, setTool] = (0, import_react56.useState)(null);
9475
- const [toolSeen, setToolSeen] = (0, import_react56.useState)(readToolSeen);
9831
+ const layerRef = (0, import_react60.useRef)(null);
9832
+ const dialRef = (0, import_react60.useRef)(null);
9833
+ const dialButtonRef = (0, import_react60.useRef)(null);
9834
+ const inputRef = (0, import_react60.useRef)(null);
9835
+ const limitRef = (0, import_react60.useRef)(null);
9836
+ const typedSendRef = (0, import_react60.useRef)(false);
9837
+ const focusAfterCloseRef = (0, import_react60.useRef)(null);
9838
+ const [tool, setTool] = (0, import_react60.useState)(null);
9839
+ const [toolSeen, setToolSeen] = (0, import_react60.useState)(readToolSeen);
9476
9840
  const dial = usePresetDial({
9477
9841
  layerRef,
9478
9842
  dialRef,
@@ -9484,53 +9848,53 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
9484
9848
  const { fold } = dial;
9485
9849
  const paused = isPaused(state.limit);
9486
9850
  const showDial = !!presetGrid && onChatTab && !tool && !paused;
9487
- (0, import_react56.useEffect)(() => {
9851
+ (0, import_react60.useEffect)(() => {
9488
9852
  if (paused) setTool(null);
9489
9853
  }, [paused]);
9490
- (0, import_react56.useEffect)(() => {
9854
+ (0, import_react60.useEffect)(() => {
9491
9855
  if (!paused) return;
9492
9856
  if (typedSendRef.current) limitRef.current?.focus();
9493
9857
  typedSendRef.current = false;
9494
9858
  }, [paused]);
9495
- const openTool = (0, import_react56.useCallback)((next) => {
9859
+ const openTool = (0, import_react60.useCallback)((next) => {
9496
9860
  fold();
9497
9861
  markToolSeen();
9498
9862
  setToolSeen(true);
9499
9863
  setTool(next);
9500
9864
  }, [fold]);
9501
- const onPill = (0, import_react56.useCallback)((kind) => openTool(kind === "numbers" ? { kind: "numbers" } : { kind: "combo" }), [openTool]);
9502
- const toolsValue = (0, import_react56.useMemo)(
9865
+ const onPill = (0, import_react60.useCallback)((kind) => openTool(kind === "numbers" ? { kind: "numbers" } : { kind: "combo" }), [openTool]);
9866
+ const toolsValue = (0, import_react60.useMemo)(
9503
9867
  () => presetGrid && !paused ? { openBuilder: (total, legs) => openTool({ kind: "combo", total, legs }), changeLabel: ui.presets.changeCombo } : null,
9504
9868
  [presetGrid, paused, openTool, ui.presets.changeCombo]
9505
9869
  );
9506
- const closeTool = (0, import_react56.useCallback)(() => {
9870
+ const closeTool = (0, import_react60.useCallback)(() => {
9507
9871
  focusAfterCloseRef.current = "dial";
9508
9872
  setTool(null);
9509
9873
  }, []);
9510
- const sendAsk = (0, import_react56.useCallback)((ask) => {
9874
+ const sendAsk = (0, import_react60.useCallback)((ask) => {
9511
9875
  focusAfterCloseRef.current = "composer";
9512
9876
  setTool(null);
9513
9877
  monitor?.setActiveTab("chat");
9514
9878
  send(ask.message, { displayText: ask.displayText, preset: ask.preset });
9515
9879
  }, [monitor, send]);
9516
- const formatKickoff = (0, import_react56.useCallback)((kickoffUtc) => {
9880
+ const formatKickoff = (0, import_react60.useCallback)((kickoffUtc) => {
9517
9881
  const k = ui.bettingKickoff(kickoffUtc);
9518
9882
  return `${k.dayLabel} ${k.time}`;
9519
9883
  }, [ui]);
9520
- (0, import_react56.useEffect)(() => {
9884
+ (0, import_react60.useEffect)(() => {
9521
9885
  if (tool) return;
9522
9886
  const target = focusAfterCloseRef.current;
9523
9887
  focusAfterCloseRef.current = null;
9524
9888
  if (target === "dial") dialButtonRef.current?.focus();
9525
9889
  else if (target === "composer") inputRef.current?.focus();
9526
9890
  }, [tool]);
9527
- (0, import_react56.useEffect)(() => {
9891
+ (0, import_react60.useEffect)(() => {
9528
9892
  if (!tool || onChatTab && presetGrid) return;
9529
9893
  focusAfterCloseRef.current = "composer";
9530
9894
  setTool(null);
9531
9895
  }, [tool, onChatTab, presetGrid]);
9532
- return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "ss-w-panel", role: "dialog", "aria-modal": isModal, "aria-label": ui.chatDialogLabel, children: [
9533
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
9896
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "ss-w-panel", role: "dialog", "aria-modal": isModal, "aria-label": ui.chatDialogLabel, children: [
9897
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
9534
9898
  ChatHeader,
9535
9899
  {
9536
9900
  onClose: close,
@@ -9543,7 +9907,7 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
9543
9907
  moreOptionsLabel: ui.moreOptions
9544
9908
  }
9545
9909
  ),
9546
- monitor && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
9910
+ monitor && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
9547
9911
  TabBar,
9548
9912
  {
9549
9913
  monitor,
@@ -9555,9 +9919,9 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
9555
9919
  gamesEnabled: gamesResult?.enabled ?? false
9556
9920
  }
9557
9921
  ),
9558
- /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { ref: layerRef, className: "ss-w-chat-layer", "data-dial": presetGrid ? "" : void 0, style: onChatTab ? void 0 : HIDDEN_LAYER_STYLE, children: [
9559
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(PresetToolsContext.Provider, { value: toolsValue, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(MessageList, { controller, ui, slip, onDashboardTap, monitor }) }),
9560
- showDial ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
9922
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { ref: layerRef, className: "ss-w-chat-layer", "data-dial": presetGrid ? "" : void 0, style: onChatTab ? void 0 : HIDDEN_LAYER_STYLE, children: [
9923
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(PresetToolsContext.Provider, { value: toolsValue, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(MessageList, { controller, ui, slip, onDashboardTap, monitor }) }),
9924
+ showDial ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
9561
9925
  PresetSpeedDial,
9562
9926
  {
9563
9927
  expanded: dial.expanded,
@@ -9569,12 +9933,12 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
9569
9933
  buttonRef: dialButtonRef
9570
9934
  }
9571
9935
  ) : null,
9572
- tool && presetGrid && onChatTab && !paused ? tool.kind === "numbers" ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(SetNumbersTool, { grid: presetGrid, strings: ui.presets, streaming: state.isStreaming, onSend: sendAsk, onClose: closeTool }) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(BuildComboTool, { grid: presetGrid, strings: ui.presets, streaming: state.isStreaming, formatKickoff, initialTotal: tool.total, initialLegs: tool.legs, onSend: sendAsk, onClose: closeTool }) : null
9936
+ tool && presetGrid && onChatTab && !paused ? tool.kind === "numbers" ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(SetNumbersTool, { grid: presetGrid, strings: ui.presets, streaming: state.isStreaming, onSend: sendAsk, onClose: closeTool }) : /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(BuildComboTool, { grid: presetGrid, strings: ui.presets, streaming: state.isStreaming, formatKickoff, initialTotal: tool.total, initialLegs: tool.legs, onSend: sendAsk, onClose: closeTool }) : null
9573
9937
  ] }),
9574
- monitor && discovery && monitor.activeTab === "today" && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(TodayPanel, { discovery, ui, monitor }),
9575
- monitor && monitor.activeTab === "following" && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(MatchesPanel, { monitor, ui, slip, onAsk: paused ? void 0 : handleAsk }),
9576
- monitor && monitor.activeTab === "odds" && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(OddsPanel, { monitor, ui, slip }),
9577
- monitor && monitor.activeTab === "games" && gamesResult && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
9938
+ monitor && discovery && monitor.activeTab === "today" && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(TodayPanel, { discovery, ui, monitor }),
9939
+ monitor && monitor.activeTab === "following" && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(MatchesPanel, { monitor, ui, slip, onAsk: paused ? void 0 : handleAsk }),
9940
+ monitor && monitor.activeTab === "odds" && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(OddsPanel, { monitor, ui, slip }),
9941
+ monitor && monitor.activeTab === "games" && gamesResult && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
9578
9942
  GamesPanel,
9579
9943
  {
9580
9944
  loggedIn: !!loggedIn,
@@ -9588,7 +9952,7 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
9588
9952
  }
9589
9953
  }
9590
9954
  ),
9591
- monitor && monitor.activeTab === "leaderboard" && leaderboardResult && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
9955
+ monitor && monitor.activeTab === "leaderboard" && leaderboardResult && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
9592
9956
  LeaderboardPanel,
9593
9957
  {
9594
9958
  loggedIn: !!loggedIn,
@@ -9598,9 +9962,9 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
9598
9962
  ui
9599
9963
  }
9600
9964
  ),
9601
- (!monitor || monitor.activeTab !== "games" && monitor.activeTab !== "leaderboard") && /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(import_jsx_runtime95.Fragment, { children: [
9602
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { ref: limitRef, className: "ss-w-limit", role: "status", tabIndex: -1, children: state.limit ? limitText(state.limit, ui) : null }),
9603
- paused ? null : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
9965
+ (!monitor || monitor.activeTab !== "games" && monitor.activeTab !== "leaderboard") && /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(import_jsx_runtime96.Fragment, { children: [
9966
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { ref: limitRef, className: "ss-w-limit", role: "status", tabIndex: -1, children: state.limit ? limitText(state.limit, ui) : null }),
9967
+ paused ? null : /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
9604
9968
  ChatInput,
9605
9969
  {
9606
9970
  ref: inputRef,
@@ -9619,9 +9983,9 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
9619
9983
  }
9620
9984
 
9621
9985
  // src/components/HostEventsProvider.tsx
9622
- var import_jsx_runtime96 = require("react/jsx-runtime");
9986
+ var import_jsx_runtime97 = require("react/jsx-runtime");
9623
9987
  function HostEventsProvider({ value, children }) {
9624
- return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(SlipStateContext.Provider, { value: value.slipState, children });
9988
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(SlipStateContext.Provider, { value: value.slipState, children });
9625
9989
  }
9626
9990
 
9627
9991
  // src/styles/css.generated.ts
@@ -9743,6 +10107,8 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
9743
10107
  .ss-g-search-box { display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 14px; border-radius: 14px; background: var(--ss-g-surface); border: 1.5px solid var(--ss-g-line); color: var(--ss-g-muted); }
9744
10108
  .ss-g-search-box:focus-within { border-color: var(--ss-w-accent); }
9745
10109
  .ss-g-search-box input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--ss-g-ink); font: 500 15px var(--ss-g-font-body); }
10110
+ .ss-g-search-clear { flex: none; width: 20px; height: 20px; padding: 0; border: none; border-radius: 50%; background: var(--ss-g-line); color: var(--ss-g-muted); display: flex; align-items: center; justify-content: center; cursor: pointer; }
10111
+ .ss-g-search-clear:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: -2px; }
9746
10112
  .ss-g-footer { flex: none; padding: 12px 16px 16px; border-top: 1px solid var(--ss-g-line); display: flex; flex-direction: column; gap: 10px; background: var(--ss-g-ground); }
9747
10113
  .ss-g-sil { position: relative; flex: none; display: inline-flex; align-items: flex-end; justify-content: center; overflow: hidden; border-radius: 50%; background: var(--ss-g-raised); color: var(--ss-g-strong-line); }
9748
10114
  .ss-g-sil--selected { background: var(--ss-g-accent-tint); color: color-mix(in srgb, var(--ss-w-accent) 40%, var(--ss-g-raised)); }
@@ -10814,14 +11180,67 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
10814
11180
  .ss-w-sec-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ss-w-neg); flex: none; }
10815
11181
  .ss-w-today-live { display: flex; flex-direction: column; gap: 2px; }
10816
11182
 
10817
- .ss-w-grp { border: 1px solid var(--ss-w-line); border-radius: 12px; overflow: hidden; }
10818
- .ss-w-grp-head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 11px; background: var(--ss-w-bubble); border: none; font: inherit; color: var(--ss-w-ink); cursor: pointer; text-align: left; }
10819
- .ss-w-grp-head:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: -2px; }
10820
- .ss-w-grp-chev { color: var(--ss-w-faint); font-size: 10px; flex: none; }
10821
- .ss-w-grp-name { font-size: 12px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
10822
- .ss-w-grp-country { font-weight: 600; color: var(--ss-w-faint); }
10823
- .ss-w-grp-count { margin-left: auto; flex: none; font-size: 10.5px; font-weight: 700; color: var(--ss-w-faint); background: var(--ss-w-panel); border: 1px solid var(--ss-w-line); border-radius: 999px; padding: 1px 7px; font-variant-numeric: tabular-nums; }
10824
- .ss-w-grp-body { display: flex; flex-direction: column; padding: 2px 11px 6px; }
11183
+ /* Today tab root (Task 7): position: relative so the grid's own star/unstar toast (absolute,
11184
+ top-centre) anchors here rather than to some unrelated positioned ancestor. */
11185
+ /* Non-scrolling anchor for .ss-w-today-toast (position: absolute; top: 0): .ss-w-mon-list below is
11186
+ the overflow-y: auto scroller, so a toast parented to IT would scroll out of view with the
11187
+ content that moved it. This wrapper sits outside that scroller, inside .ss-w-panel's fixed-size
11188
+ flex column, so top: 0 always lands at the visible top of the Today tab. min-height: 0 is
11189
+ required: without it this flex item defaults to min-height: auto (its content height), .ss-w-panel's
11190
+ overflow: hidden then clips it, and .ss-w-mon-list inside never gets a bounded height to scroll within. */
11191
+ .ss-w-today-root { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
11192
+
11193
+ /* Section header for "Your leagues"/"Top leagues"/"All leagues" (Task 7) -- same visual
11194
+ treatment as .ss-w-sec-head (the live-band header), kept as a separate class so a kept test
11195
+ asserting .ss-w-sec-head is absent when nothing is live cannot see this header too. */
11196
+ .ss-w-today-sec { display: flex; align-items: center; gap: 7px; padding: 2px 2px 0; font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--ss-w-faint); }
11197
+ .ss-w-today-sec::after { content: ""; flex: 1; height: 1px; background: var(--ss-w-line); }
11198
+ .ss-w-today-sec-sub { text-transform: none; letter-spacing: normal; font-weight: 600; }
11199
+ .ss-w-today-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
11200
+ .ss-w-today-empty { font-size: 12px; color: var(--ss-w-faint); padding: 10px 2px; }
11201
+ .ss-w-today-search-block { display: flex; flex-direction: column; }
11202
+ .ss-w-today-search-group { display: flex; align-items: center; gap: 7px; padding: 2px 2px 6px; }
11203
+ .ss-w-today-search-group::after { content: ""; flex: 1; height: 1px; background: var(--ss-w-line); }
11204
+ .ss-w-today-search-group .ss-w-bi-comp-logo { width: 16px; height: 16px; }
11205
+ .ss-w-today-search-group-name { font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--ss-w-faint); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
11206
+ .ss-w-today-search-row { cursor: pointer; border-radius: 10px; }
11207
+ .ss-w-today-search-row:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: -2px; }
11208
+
11209
+ /* League tile (Task 5): a flat row (crest + name as the open target, star as a separate sibling
11210
+ button) rather than a disclosure header -- opening is Task 6's LeagueDetail, not an inline
11211
+ expansion. Same border/radius language .ss-w-grp used to carry, before Task 7 deleted it. */
11212
+ .ss-w-today-tile { display: flex; align-items: center; gap: 6px; border: 1px solid var(--ss-w-line); border-radius: 12px; overflow: hidden; background: var(--ss-w-bubble); }
11213
+ .ss-w-today-tile-body { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 8px 9px; background: none; border: none; font: inherit; color: var(--ss-w-ink); cursor: pointer; text-align: left; }
11214
+ .ss-w-today-tile-body:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: -2px; }
11215
+ .ss-w-today-tile-name { font-size: 12px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
11216
+ .ss-w-today-tile-country { font-weight: 600; color: var(--ss-w-faint); }
11217
+ .ss-w-today-tile-star { flex: none; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin: 0 6px; background: none; border: none; border-radius: 8px; color: var(--ss-w-faint); cursor: pointer; }
11218
+ .ss-w-today-tile-star:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: -2px; }
11219
+ .ss-w-today-tile-star[aria-pressed="true"] { color: var(--ss-w-accent); }
11220
+ .ss-w-today-tile-star:disabled { cursor: default; opacity: .4; }
11221
+ .ss-w-today-tile-star svg { width: 18px; height: 18px; }
11222
+
11223
+ /* League detail (Task 6): the drill-in view opened from a tile. Its header star is always
11224
+ enabled (spec \xA73/\xA77's one exception to the tile rule), so it carries no :disabled styling. */
11225
+ .ss-w-today-detail { position: relative; display: flex; flex-direction: column; gap: 10px; }
11226
+ .ss-w-today-detail-head { display: flex; align-items: center; gap: 8px; }
11227
+ .ss-w-today-detail-back { flex: none; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; background: none; border: none; border-radius: 8px; color: var(--ss-w-ink); cursor: pointer; transform: scaleX(-1); }
11228
+ .ss-w-today-detail-back:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: -2px; }
11229
+ .ss-w-today-detail-name { flex: 1; min-width: 0; font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
11230
+ .ss-w-today-detail-star { flex: none; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; background: none; border: none; border-radius: 8px; color: var(--ss-w-faint); cursor: pointer; }
11231
+ .ss-w-today-detail-star:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: -2px; }
11232
+ .ss-w-today-detail-star[aria-pressed="true"] { color: var(--ss-w-accent); }
11233
+ .ss-w-today-detail-star svg { width: 18px; height: 18px; }
11234
+ .ss-w-today-detail-nav { display: flex; align-items: center; justify-content: center; gap: 10px; }
11235
+ .ss-w-today-detail-prev, .ss-w-today-detail-next { flex: none; display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; background: none; border: none; border-radius: 8px; color: var(--ss-w-faint); cursor: pointer; }
11236
+ .ss-w-today-detail-prev:focus-visible, .ss-w-today-detail-next:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: -2px; }
11237
+ .ss-w-today-detail-prev { transform: scaleX(-1); }
11238
+ .ss-w-today-detail-pos { font-size: 10.5px; font-weight: 700; color: var(--ss-w-faint); font-variant-numeric: tabular-nums; }
11239
+ .ss-w-today-detail-body { display: flex; flex-direction: column; }
11240
+ .ss-w-today-detail-count { align-self: flex-end; flex: none; font-size: 10.5px; font-weight: 700; color: var(--ss-w-faint); background: var(--ss-w-panel); border: 1px solid var(--ss-w-line); border-radius: 999px; padding: 1px 7px; font-variant-numeric: tabular-nums; margin-bottom: 4px; }
11241
+ /* aria-live status region, not a modal -- pointer-events: none so the header/nav above stay
11242
+ clickable while it is showing. */
11243
+ .ss-w-today-toast { position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 1; pointer-events: none; width: max-content; max-width: 220px; font-size: 11px; font-weight: 560; color: var(--ss-w-accent); background: color-mix(in srgb, var(--ss-w-accent) 14%, var(--ss-w-panel)); border: 1px solid color-mix(in srgb, var(--ss-w-accent) 30%, var(--ss-w-line)); border-radius: 10px; padding: 5px 10px; box-shadow: 0 4px 14px rgba(0,0,0,.14); }
10825
11244
 
10826
11245
  .ss-w-drow { display: grid; grid-template-columns: 42px minmax(0,1fr) 22px; align-items: center; gap: 9px; padding: 7px 0; border-bottom: 1px solid var(--ss-w-line); }
10827
11246
  .ss-w-drow:last-child { border-bottom: none; }
@@ -11307,7 +11726,7 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
11307
11726
  `;
11308
11727
 
11309
11728
  // src/StatsWidget.tsx
11310
- var import_jsx_runtime97 = require("react/jsx-runtime");
11729
+ var import_jsx_runtime98 = require("react/jsx-runtime");
11311
11730
  function buildClient(props) {
11312
11731
  try {
11313
11732
  if ("client" in props && props.client) {
@@ -11332,24 +11751,24 @@ function injectStyles(root) {
11332
11751
  function StatsWidget(props) {
11333
11752
  const injectedClient = "client" in props ? props.client : void 0;
11334
11753
  const cfg = props.config;
11335
- const built = (0, import_react57.useMemo)(() => buildClient(props), [injectedClient, cfg?.operatorId, cfg?.publicKey, cfg?.baseUrl]);
11336
- const logger = (0, import_react57.useMemo)(
11754
+ const built = (0, import_react61.useMemo)(() => buildClient(props), [injectedClient, cfg?.operatorId, cfg?.publicKey, cfg?.baseUrl]);
11755
+ const logger = (0, import_react61.useMemo)(
11337
11756
  () => built ? built.client.createEventLogger({
11338
11757
  operatorUserId: cfg?.userContext?.operatorUserId,
11339
11758
  anonymousUserId: cfg?.userContext?.anonymousUserId
11340
11759
  }) : null,
11341
11760
  [built?.client]
11342
11761
  );
11343
- const ui = (0, import_react57.useMemo)(() => normalizeUi(props.config ?? { operatorId: "", publicKey: "" }), [props.config]);
11344
- const rootRef = (0, import_react57.useRef)(null);
11345
- const introDoneRef = (0, import_react57.useRef)(false);
11346
- const markIntroDone = (0, import_react57.useCallback)(() => {
11762
+ const ui = (0, import_react61.useMemo)(() => normalizeUi(props.config ?? { operatorId: "", publicKey: "" }), [props.config]);
11763
+ const rootRef = (0, import_react61.useRef)(null);
11764
+ const introDoneRef = (0, import_react61.useRef)(false);
11765
+ const markIntroDone = (0, import_react61.useCallback)(() => {
11347
11766
  introDoneRef.current = true;
11348
11767
  }, []);
11349
11768
  const convStorageKey = `ss-w-conv:${cfg?.operatorId ?? ""}:${cfg?.userContext?.operatorUserId ?? "anon"}`;
11350
11769
  const controller = useChatStream(built?.conversation ?? emptyConversation(), ui.starters, built ? ui.greetingMessage : void 0, convStorageKey);
11351
- const [hasToday, setHasToday] = (0, import_react57.useState)(false);
11352
- const liveCardWatches = (0, import_react57.useMemo)(() => {
11770
+ const [hasToday, setHasToday] = (0, import_react61.useState)(false);
11771
+ const liveCardWatches = (0, import_react61.useMemo)(() => {
11353
11772
  const seen = /* @__PURE__ */ new Set();
11354
11773
  const out = [];
11355
11774
  for (const msg of controller.state.messages) {
@@ -11371,31 +11790,40 @@ function StatsWidget(props) {
11371
11790
  hasToday,
11372
11791
  watches: liveCardWatches
11373
11792
  });
11374
- const getSchedule = (0, import_react57.useCallback)(
11375
- (localDate, utcOffsetMinutes) => built ? built.conversation.getSchedule(localDate, utcOffsetMinutes) : Promise.resolve(null),
11376
- [built]
11793
+ const operatorUserId = cfg?.userContext?.operatorUserId;
11794
+ const anonymousUserId = cfg?.userContext?.anonymousUserId;
11795
+ const getSchedule = (0, import_react61.useCallback)(
11796
+ (localDate, utcOffsetMinutes) => built ? built.conversation.getSchedule(localDate, utcOffsetMinutes, operatorUserId, anonymousUserId) : Promise.resolve(null),
11797
+ [built, operatorUserId, anonymousUserId]
11377
11798
  );
11378
- const getStates = (0, import_react57.useCallback)(
11799
+ const postLeagueStar = (0, import_react61.useCallback)(
11800
+ (competitionId, starred) => built ? built.conversation.starLeague(competitionId, starred, operatorUserId, anonymousUserId) : Promise.resolve(null),
11801
+ [built, operatorUserId, anonymousUserId]
11802
+ );
11803
+ const getStates = (0, import_react61.useCallback)(
11379
11804
  (matchIds) => built ? built.conversation.getStates(matchIds) : Promise.resolve(null),
11380
11805
  [built]
11381
11806
  );
11382
- const pinnedMatchIds = (0, import_react57.useMemo)(
11807
+ const pinnedMatchIds = (0, import_react61.useMemo)(
11383
11808
  () => monitor.pins.filter((p) => p.kind === "match").map((p) => p.matchId),
11384
11809
  [monitor.pins]
11385
11810
  );
11386
11811
  const discovery = useMatchDiscovery({
11387
11812
  getSchedule,
11388
11813
  getStates,
11814
+ postLeagueStar,
11389
11815
  operatorId: cfg?.operatorId ?? "",
11816
+ operatorUserId,
11817
+ anonymousUserId,
11390
11818
  isOpen: controller.state.isOpen,
11391
11819
  pinnedMatchIds
11392
11820
  });
11393
11821
  const todayHasContent = visibleGroupsOf(discovery.groups, discovery.states).length > 0;
11394
- (0, import_react57.useEffect)(() => {
11822
+ (0, import_react61.useEffect)(() => {
11395
11823
  setHasToday(todayHasContent);
11396
11824
  }, [todayHasContent]);
11397
- const prevLiveSnapshotRef = (0, import_react57.useRef)(monitor.snapshot);
11398
- (0, import_react57.useEffect)(() => {
11825
+ const prevLiveSnapshotRef = (0, import_react61.useRef)(monitor.snapshot);
11826
+ (0, import_react61.useEffect)(() => {
11399
11827
  const snap = monitor.snapshot;
11400
11828
  if (!snap || snap === prevLiveSnapshotRef.current) return;
11401
11829
  prevLiveSnapshotRef.current = snap;
@@ -11431,14 +11859,14 @@ function StatsWidget(props) {
11431
11859
  }, [monitor.snapshot]);
11432
11860
  const gamesResult = useGames(built?.conversation ?? null, { activeTab: monitor.activeTab });
11433
11861
  const leaderboardResult = useLeaderboard(built?.conversation ?? null, { activeTab: monitor.activeTab });
11434
- const getPricePresets = (0, import_react57.useCallback)(
11862
+ const getPricePresets = (0, import_react61.useCallback)(
11435
11863
  (locale2) => built ? built.conversation.getPricePresets(locale2, { pool: "open" }) : Promise.resolve(null),
11436
11864
  [built]
11437
11865
  );
11438
11866
  const presetGrid = usePresetGrid({ getPricePresets, isOpen: controller.state.isOpen, locale: ui.presets.lang });
11439
11867
  const markTodayActivity = monitor.markTodayActivity;
11440
- const prevLiveCountRef = (0, import_react57.useRef)(0);
11441
- (0, import_react57.useEffect)(() => {
11868
+ const prevLiveCountRef = (0, import_react61.useRef)(0);
11869
+ (0, import_react61.useEffect)(() => {
11442
11870
  const rose = prevLiveCountRef.current === 0 && discovery.liveCount > 0;
11443
11871
  prevLiveCountRef.current = discovery.liveCount;
11444
11872
  if (rose) markTodayActivity();
@@ -11452,7 +11880,7 @@ function StatsWidget(props) {
11452
11880
  closePanel: controller.close
11453
11881
  });
11454
11882
  const markAdded = hostEvents.markAdded;
11455
- const slip = (0, import_react57.useMemo)(
11883
+ const slip = (0, import_react61.useMemo)(
11456
11884
  () => {
11457
11885
  const handler = props.config?.onAddToSlip;
11458
11886
  return {
@@ -11471,7 +11899,7 @@ function StatsWidget(props) {
11471
11899
  },
11472
11900
  [props.config?.onAddToSlip, controller.state.conversationId, markAdded]
11473
11901
  );
11474
- const onDashboardTap = (0, import_react57.useMemo)(
11902
+ const onDashboardTap = (0, import_react61.useMemo)(
11475
11903
  () => built ? createDashboardTapSignal((input) => built.conversation.sendSignal(input), logger) : void 0,
11476
11904
  [built, logger]
11477
11905
  );
@@ -11487,14 +11915,12 @@ function StatsWidget(props) {
11487
11915
  log: logger
11488
11916
  })
11489
11917
  }));
11490
- const operatorUserId = cfg?.userContext?.operatorUserId;
11491
- const anonymousUserId = cfg?.userContext?.anonymousUserId;
11492
11918
  const conversationId = controller.state.conversationId ?? void 0;
11493
- (0, import_react57.useEffect)(() => {
11919
+ (0, import_react61.useEffect)(() => {
11494
11920
  if (!logger) return;
11495
11921
  logger.setIdentity({ operatorUserId, anonymousUserId, conversationId });
11496
11922
  }, [logger, operatorUserId, anonymousUserId, conversationId]);
11497
- (0, import_react57.useEffect)(() => {
11923
+ (0, import_react61.useEffect)(() => {
11498
11924
  if (!logger) return;
11499
11925
  logger.resume();
11500
11926
  const onHide = () => {
@@ -11512,14 +11938,14 @@ function StatsWidget(props) {
11512
11938
  logger.dispose();
11513
11939
  };
11514
11940
  }, [logger]);
11515
- (0, import_react57.useEffect)(() => {
11941
+ (0, import_react61.useEffect)(() => {
11516
11942
  if (!built || !ui.injectStyles) return;
11517
11943
  const node = rootRef.current?.getRootNode();
11518
11944
  if (node) injectStyles(node);
11519
11945
  }, [built, ui.injectStyles]);
11520
11946
  if (!built) return null;
11521
11947
  const attrs = themeAttrs(ui);
11522
- return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(EventLogContext.Provider, { value: logger, children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(HostEventsProvider, { value: hostEvents, children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { ref: rootRef, className: "ss-w-root", "data-ss-w-theme": attrs["data-ss-w-theme"], "data-ss-w-pos": attrs["data-ss-w-pos"], style: attrs.style, children: controller.state.isOpen ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
11948
+ return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(EventLogContext.Provider, { value: logger, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(HostEventsProvider, { value: hostEvents, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { ref: rootRef, className: "ss-w-root", "data-ss-w-theme": attrs["data-ss-w-theme"], "data-ss-w-pos": attrs["data-ss-w-pos"], style: attrs.style, children: controller.state.isOpen ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
11523
11949
  ChatPanel,
11524
11950
  {
11525
11951
  controller,
@@ -11534,7 +11960,7 @@ function StatsWidget(props) {
11534
11960
  conversation: built?.conversation ?? null,
11535
11961
  presetGrid
11536
11962
  }
11537
- ) : /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
11963
+ ) : /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
11538
11964
  ChatFab,
11539
11965
  {
11540
11966
  label: ui.launcherLabel,