@sensiblestats/widget-react 0.80.0 → 0.81.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.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_react60 = require("react");
41
41
  var import_widget_sdk6 = require("@sensiblestats/widget-sdk");
42
42
 
43
43
  // src/kickoff.ts
@@ -152,6 +152,19 @@ 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
+ starOnLabel: "Add to Your leagues",
162
+ starOffLabel: "Remove from Your leagues",
163
+ starredToast: "Added to Your leagues.",
164
+ unstarredToast: "Removed from Your leagues.",
165
+ leagueDetailPosition: (index, total) => `${index} of ${total}`,
166
+ prevLeagueLabel: "Previous league",
167
+ nextLeagueLabel: "Next league",
155
168
  halfTime: "HT",
156
169
  staleStates: "Live scores can't be updated \u2014 showing the last known state.",
157
170
  tabGames: "Games",
@@ -504,6 +517,19 @@ var STRINGS = {
504
517
  accordionSuspended: "Ask\u0131da",
505
518
  tabToday: "Bug\xFCn",
506
519
  sectionLive: "Canl\u0131",
520
+ yourLeagues: "Liglerin",
521
+ topLeagues: "\xD6ne \xE7\u0131kan ligler",
522
+ topLeaguesSub: "Bug\xFCn pop\xFCler.",
523
+ allLeagues: "T\xFCm ligler",
524
+ searchLeaguesPlaceholder: "Lig veya tak\u0131m ara",
525
+ noLeagueResults: "Aramana uyan lig veya tak\u0131m yok.",
526
+ starOnLabel: "Liglerine ekle",
527
+ starOffLabel: "Liglerinden \xE7\u0131kar",
528
+ starredToast: "Liglerin b\xF6l\xFCm\xFCne eklendi.",
529
+ unstarredToast: "Liglerin b\xF6l\xFCm\xFCnden \xE7\u0131kar\u0131ld\u0131.",
530
+ leagueDetailPosition: (index, total) => `${index} / ${total}`,
531
+ prevLeagueLabel: "\xD6nceki lig",
532
+ nextLeagueLabel: "Sonraki lig",
507
533
  halfTime: "\u0130Y",
508
534
  staleStates: "Canl\u0131 skorlar g\xFCncellenemiyor \u2014 son bilinen durum g\xF6steriliyor.",
509
535
  tabGames: "Oyunlar",
@@ -853,6 +879,19 @@ function normalizeUi(cfg) {
853
879
  tabOdds: strings.tabOdds,
854
880
  tabToday: strings.tabToday,
855
881
  sectionLive: strings.sectionLive,
882
+ yourLeagues: strings.yourLeagues,
883
+ topLeagues: strings.topLeagues,
884
+ topLeaguesSub: strings.topLeaguesSub,
885
+ allLeagues: strings.allLeagues,
886
+ searchLeaguesPlaceholder: strings.searchLeaguesPlaceholder,
887
+ noLeagueResults: strings.noLeagueResults,
888
+ starOnLabel: strings.starOnLabel,
889
+ starOffLabel: strings.starOffLabel,
890
+ starredToast: strings.starredToast,
891
+ unstarredToast: strings.unstarredToast,
892
+ leagueDetailPosition: strings.leagueDetailPosition,
893
+ prevLeagueLabel: strings.prevLeagueLabel,
894
+ nextLeagueLabel: strings.nextLeagueLabel,
856
895
  halfTime: strings.halfTime,
857
896
  staleStates: strings.staleStates,
858
897
  pinLabel: strings.pinLabel,
@@ -2754,14 +2793,14 @@ var import_react6 = require("react");
2754
2793
 
2755
2794
  // src/scheduleCache.ts
2756
2795
  var PREFIX = "ss-w-schedule:";
2757
- var SCHEMA_VERSION = 1;
2796
+ var SCHEMA_VERSION = 2;
2758
2797
  var TTL_MS2 = 6 * 36e5;
2759
- function scheduleCacheKey(operatorId, localDate) {
2760
- return `${PREFIX}${operatorId}:${localDate}`;
2798
+ function scheduleCacheKey(operatorId, encodedUserKey2, localDate) {
2799
+ return `${PREFIX}${operatorId}:${encodedUserKey2}:${localDate}`;
2761
2800
  }
2762
- function read(operatorId, localDate) {
2801
+ function read(operatorId, encodedUserKey2, localDate) {
2763
2802
  try {
2764
- const raw = localStorage.getItem(scheduleCacheKey(operatorId, localDate));
2803
+ const raw = localStorage.getItem(scheduleCacheKey(operatorId, encodedUserKey2, localDate));
2765
2804
  if (!raw) return null;
2766
2805
  const entry = JSON.parse(raw);
2767
2806
  if (entry.v !== SCHEMA_VERSION || !entry.payload) return null;
@@ -2770,13 +2809,13 @@ function read(operatorId, localDate) {
2770
2809
  return null;
2771
2810
  }
2772
2811
  }
2773
- function readSchedule(operatorId, localDate, nowMs) {
2774
- const entry = read(operatorId, localDate);
2812
+ function readSchedule(operatorId, encodedUserKey2, localDate, nowMs) {
2813
+ const entry = read(operatorId, encodedUserKey2, localDate);
2775
2814
  if (!entry) return null;
2776
2815
  return nowMs - entry.at > TTL_MS2 ? null : entry.payload;
2777
2816
  }
2778
- function readScheduleIgnoringTtl(operatorId, localDate) {
2779
- return read(operatorId, localDate)?.payload ?? null;
2817
+ function readScheduleIgnoringTtl(operatorId, encodedUserKey2, localDate) {
2818
+ return read(operatorId, encodedUserKey2, localDate)?.payload ?? null;
2780
2819
  }
2781
2820
  function skeletonOnly(payload) {
2782
2821
  return {
@@ -2784,9 +2823,13 @@ function skeletonOnly(payload) {
2784
2823
  groups: payload.groups.map((g) => ({
2785
2824
  competitionId: g.competitionId,
2786
2825
  competitionName: g.competitionName,
2826
+ competitionCountry: g.competitionCountry ?? null,
2787
2827
  competitionImagePath: g.competitionImagePath ?? null,
2788
2828
  rank: g.rank,
2789
2829
  expandedByDefault: g.expandedByDefault,
2830
+ isStarred: g.isStarred,
2831
+ isLearned: g.isLearned,
2832
+ learnedRank: g.learnedRank,
2790
2833
  matches: g.matches.map((m) => ({
2791
2834
  matchId: m.matchId,
2792
2835
  homeTeamName: m.homeTeamName,
@@ -2798,9 +2841,9 @@ function skeletonOnly(payload) {
2798
2841
  }))
2799
2842
  };
2800
2843
  }
2801
- function writeSchedule(operatorId, localDate, payload, nowMs) {
2802
- const keep = scheduleCacheKey(operatorId, localDate);
2803
- const mine = `${PREFIX}${operatorId}:`;
2844
+ function writeSchedule(operatorId, encodedUserKey2, localDate, payload, nowMs) {
2845
+ const keep = scheduleCacheKey(operatorId, encodedUserKey2, localDate);
2846
+ const mine = `${PREFIX}${operatorId}:${encodedUserKey2}:`;
2804
2847
  try {
2805
2848
  for (let i = localStorage.length - 1; i >= 0; i--) {
2806
2849
  const key = localStorage.key(i);
@@ -2811,6 +2854,12 @@ function writeSchedule(operatorId, localDate, payload, nowMs) {
2811
2854
  } catch {
2812
2855
  }
2813
2856
  }
2857
+ function patchScheduleStar(operatorId, encodedUserKey2, localDate, competitionId, star) {
2858
+ const entry = read(operatorId, encodedUserKey2, localDate);
2859
+ if (!entry) return;
2860
+ const groups = entry.payload.groups.map((g) => g.competitionId === competitionId ? { ...g, ...star } : g);
2861
+ writeSchedule(operatorId, encodedUserKey2, localDate, { ...entry.payload, groups }, entry.at);
2862
+ }
2814
2863
 
2815
2864
  // src/dueSet.ts
2816
2865
  var TERMINAL_PHASES = /* @__PURE__ */ new Set(["fullTime", "postponed"]);
@@ -2831,6 +2880,9 @@ function dueMatchIds(groups, states, nowMs) {
2831
2880
  var POLL_MS = 6e4;
2832
2881
  var ROLLOVER_CHECK_MS = 6e4;
2833
2882
  var STALE_AFTER_FAILURES = 2;
2883
+ function encodedUserKey(operatorUserId, anonymousUserId) {
2884
+ return encodeURIComponent(operatorUserId || anonymousUserId || "none");
2885
+ }
2834
2886
  function localDateOf(now) {
2835
2887
  const y = now.getFullYear();
2836
2888
  const m = `${now.getMonth() + 1}`.padStart(2, "0");
@@ -2841,15 +2893,12 @@ function useMatchDiscovery(opts) {
2841
2893
  const [groups, setGroups] = (0, import_react6.useState)([]);
2842
2894
  const [states, setStates] = (0, import_react6.useState)({});
2843
2895
  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
2896
  const groupsRef = (0, import_react6.useRef)(groups);
2847
2897
  groupsRef.current = groups;
2848
2898
  const statesRef = (0, import_react6.useRef)(states);
2849
2899
  statesRef.current = states;
2850
2900
  const getStatesRef = (0, import_react6.useRef)(opts.getStates);
2851
2901
  getStatesRef.current = opts.getStates;
2852
- const pinnedKey = opts.pinnedMatchIds.join(",");
2853
2902
  const [localDate, setLocalDate] = (0, import_react6.useState)(() => localDateOf(/* @__PURE__ */ new Date()));
2854
2903
  (0, import_react6.useEffect)(() => {
2855
2904
  const id = setInterval(() => {
@@ -2861,7 +2910,8 @@ function useMatchDiscovery(opts) {
2861
2910
  (0, import_react6.useEffect)(() => {
2862
2911
  let cancelled = false;
2863
2912
  const utcOffsetMinutes = -(/* @__PURE__ */ new Date()).getTimezoneOffset();
2864
- const cached = readSchedule(opts.operatorId, localDate, Date.now());
2913
+ const key = encodedUserKey(opts.operatorUserId, opts.anonymousUserId);
2914
+ const cached = readSchedule(opts.operatorId, key, localDate, Date.now());
2865
2915
  if (cached) {
2866
2916
  if (!cancelled) setGroups(cached.groups);
2867
2917
  return () => {
@@ -2872,28 +2922,17 @@ function useMatchDiscovery(opts) {
2872
2922
  try {
2873
2923
  const payload = await opts.getSchedule(localDate, utcOffsetMinutes);
2874
2924
  if (cancelled || !payload) return;
2875
- writeSchedule(opts.operatorId, localDate, payload, Date.now());
2925
+ writeSchedule(opts.operatorId, key, localDate, payload, Date.now());
2876
2926
  setGroups(payload.groups);
2877
2927
  } catch {
2878
- const fallback = readScheduleIgnoringTtl(opts.operatorId, localDate);
2928
+ const fallback = readScheduleIgnoringTtl(opts.operatorId, key, localDate);
2879
2929
  if (!cancelled && fallback) setGroups(fallback.groups);
2880
2930
  }
2881
2931
  })();
2882
2932
  return () => {
2883
2933
  cancelled = true;
2884
2934
  };
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]);
2935
+ }, [opts.operatorId, opts.operatorUserId, opts.anonymousUserId, localDate]);
2897
2936
  const tick = (0, import_react6.useCallback)(async () => {
2898
2937
  const ids = dueMatchIds(groupsRef.current, statesRef.current, Date.now());
2899
2938
  if (ids.length === 0) return;
@@ -2923,11 +2962,20 @@ function useMatchDiscovery(opts) {
2923
2962
  () => stale ? 0 : Object.values(states).filter((s) => s.phase === "live").length,
2924
2963
  [states, stale]
2925
2964
  );
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 };
2965
+ const starLeague = (0, import_react6.useCallback)(async (competitionId, starred) => {
2966
+ let result;
2967
+ try {
2968
+ result = await opts.postLeagueStar(competitionId, starred);
2969
+ } catch {
2970
+ return false;
2971
+ }
2972
+ if (!result) return false;
2973
+ const patch = { isStarred: result.starred, isLearned: false, learnedRank: null };
2974
+ setGroups((prev) => prev.map((g) => g.competitionId === competitionId ? { ...g, ...patch } : g));
2975
+ patchScheduleStar(opts.operatorId, encodedUserKey(opts.operatorUserId, opts.anonymousUserId), localDate, competitionId, patch);
2976
+ return true;
2977
+ }, [opts.postLeagueStar, opts.operatorId, opts.operatorUserId, opts.anonymousUserId, localDate]);
2978
+ return { groups, states, liveCount, stale, starLeague, _tick: tick };
2931
2979
  }
2932
2980
 
2933
2981
  // src/useGames.ts
@@ -3401,7 +3449,7 @@ function ChatFab({ label, greeting, popupText, logoUrl, onOpen, onDismissPopup,
3401
3449
  }
3402
3450
 
3403
3451
  // src/components/ChatPanel.tsx
3404
- var import_react56 = require("react");
3452
+ var import_react59 = require("react");
3405
3453
 
3406
3454
  // src/components/ChatHeader.tsx
3407
3455
  var import_react15 = require("react");
@@ -5909,16 +5957,135 @@ function OddsPanel({ monitor, ui, slip }) {
5909
5957
  }) });
5910
5958
  }
5911
5959
 
5912
- // src/components/FixtureRow.tsx
5960
+ // src/components/TodayPanel.tsx
5961
+ var import_react40 = require("react");
5962
+
5963
+ // src/placement.ts
5964
+ function placeLeagues(visible, pinnedMatchIds) {
5965
+ const candidates = [];
5966
+ const candidateIds = /* @__PURE__ */ new Set();
5967
+ for (const g of visible) {
5968
+ if (g.isStarred) {
5969
+ candidates.push(g);
5970
+ candidateIds.add(g.competitionId);
5971
+ }
5972
+ }
5973
+ let budget = 4;
5974
+ const pinned = visible.find(
5975
+ (g) => !candidateIds.has(g.competitionId) && g.matches.some((m) => pinnedMatchIds.includes(m.matchId))
5976
+ ) ?? null;
5977
+ if (pinned && budget > 0) {
5978
+ candidates.push(pinned);
5979
+ candidateIds.add(pinned.competitionId);
5980
+ budget -= 1;
5981
+ }
5982
+ 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));
5983
+ for (const g of learned) {
5984
+ if (budget <= 0) break;
5985
+ candidates.push(g);
5986
+ candidateIds.add(g.competitionId);
5987
+ budget -= 1;
5988
+ }
5989
+ const personal = candidates.length > 0;
5990
+ const pool = personal ? candidates : visible.slice(0, 4);
5991
+ const poolIds = personal ? candidateIds : new Set(pool.map((g) => g.competitionId));
5992
+ const others = visible.filter((g) => !poolIds.has(g.competitionId));
5993
+ return { personal, candidates: pool, others, order: [...pool, ...others], pinnedCompetitionId: pinned?.competitionId ?? null };
5994
+ }
5995
+ function starClickable(group, pinnedCompetitionId) {
5996
+ return group.isStarred || group.competitionId !== pinnedCompetitionId;
5997
+ }
5998
+
5999
+ // src/search.ts
6000
+ function foldSearchText(s) {
6001
+ return s.replace(/İ/g, "I").replace(/ı/g, "i").normalize("NFD").replace(/[̀-ͯ]/g, "").toLowerCase();
6002
+ }
6003
+ function matchesQuery(group, query) {
6004
+ const q = foldSearchText(query.trim());
6005
+ if (!q) return true;
6006
+ if (foldSearchText(group.competitionName).includes(q)) return true;
6007
+ if (group.competitionCountry && foldSearchText(group.competitionCountry).includes(q)) return true;
6008
+ return group.matches.some(
6009
+ (m) => foldSearchText(m.homeTeamName).includes(q) || foldSearchText(m.awayTeamName).includes(q)
6010
+ );
6011
+ }
6012
+
6013
+ // src/useStarTap.ts
6014
+ var import_react38 = require("react");
6015
+ function useStarTap(starLeague) {
6016
+ const [pendingId, setPendingId] = (0, import_react38.useState)(null);
6017
+ const pendingRef = (0, import_react38.useRef)(null);
6018
+ const tap = (0, import_react38.useCallback)(async (competitionId, next) => {
6019
+ if (pendingRef.current !== null) return false;
6020
+ pendingRef.current = competitionId;
6021
+ setPendingId(competitionId);
6022
+ try {
6023
+ return await starLeague(competitionId, next);
6024
+ } finally {
6025
+ pendingRef.current = null;
6026
+ setPendingId(null);
6027
+ }
6028
+ }, [starLeague]);
6029
+ return { pendingId, tap };
6030
+ }
6031
+
6032
+ // src/components/LeagueTile.tsx
5913
6033
  var import_jsx_runtime55 = require("react/jsx-runtime");
6034
+ 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";
6035
+ function LeagueTile({ group, starClickable: starClickable2, disambiguate, onOpen, starTap, ui }) {
6036
+ const onStarClick = () => {
6037
+ void starTap.tap(group.competitionId, !group.isStarred);
6038
+ };
6039
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "ss-w-today-tile", children: [
6040
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("button", { type: "button", className: "ss-w-today-tile-body", onClick: onOpen, children: [
6041
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Crest2, { url: group.competitionImagePath ?? void 0, name: group.competitionName, kind: "comp" }),
6042
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("span", { className: "ss-w-today-tile-name", children: [
6043
+ group.competitionName,
6044
+ disambiguate && group.competitionCountry ? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("span", { className: "ss-w-today-tile-country", children: [
6045
+ " (",
6046
+ group.competitionCountry,
6047
+ ")"
6048
+ ] }) : null
6049
+ ] })
6050
+ ] }),
6051
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
6052
+ "button",
6053
+ {
6054
+ type: "button",
6055
+ className: "ss-w-today-tile-star",
6056
+ "aria-pressed": group.isStarred,
6057
+ "aria-label": group.isStarred ? ui.starOffLabel : ui.starOnLabel,
6058
+ disabled: !starClickable2 || starTap.pendingId !== null,
6059
+ onClick: onStarClick,
6060
+ children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
6061
+ "path",
6062
+ {
6063
+ d: STAR_PATH,
6064
+ fill: group.isStarred ? "currentColor" : "none",
6065
+ stroke: group.isStarred ? "none" : "currentColor",
6066
+ strokeWidth: 2,
6067
+ strokeLinejoin: "round",
6068
+ strokeLinecap: "round"
6069
+ }
6070
+ ) })
6071
+ }
6072
+ )
6073
+ ] });
6074
+ }
6075
+
6076
+ // src/components/LeagueDetail.tsx
6077
+ var import_react39 = require("react");
6078
+
6079
+ // src/components/FixtureRow.tsx
6080
+ var import_jsx_runtime56 = require("react/jsx-runtime");
5914
6081
  function kickoffLabel(kickoffUnix) {
5915
6082
  const d = new Date(kickoffUnix * 1e3);
5916
6083
  return `${`${d.getHours()}`.padStart(2, "0")}:${`${d.getMinutes()}`.padStart(2, "0")}`;
5917
6084
  }
5918
6085
  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 })
6086
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { className: away ? "ss-w-drow-side ss-w-drow-side--away" : "ss-w-drow-side", children: [
6087
+ crest ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("img", { className: "ss-w-drow-crest", src: crest, alt: "" }) : null,
6088
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "ss-w-drow-nm", children: name })
5922
6089
  ] });
5923
6090
  }
5924
6091
  function FixtureRow({ match, state, stale, ui, monitor }) {
@@ -5927,100 +6094,310 @@ function FixtureRow({ match, state, stale, ui, monitor }) {
5927
6094
  const score = hasScore ? `${state.homeScore}\u2013${state.awayScore}` : void 0;
5928
6095
  const ticked = state?.phase === "live" ? state.minuteLabel ?? null : null;
5929
6096
  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 })
6097
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: isLive || state?.isHalfTime ? "ss-w-drow ss-w-drow--live" : "ss-w-drow", children: [
6098
+ /* @__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 }),
6099
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { className: "ss-w-drow-fx", children: [
6100
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Side, { name: match.homeTeamName, crest: match.homeTeamImagePath }),
6101
+ /* @__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" }),
6102
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Side, { name: match.awayTeamName, crest: match.awayTeamImagePath, away: true })
5936
6103
  ] }),
5937
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(PinToggle, { ui, monitor, pin: { kind: "match", matchId: match.matchId } })
6104
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(PinToggle, { ui, monitor, pin: { kind: "match", matchId: match.matchId } })
5938
6105
  ] });
5939
6106
  }
5940
6107
 
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 }) {
6108
+ // src/components/LeagueDetail.tsx
6109
+ var import_jsx_runtime57 = require("react/jsx-runtime");
6110
+ 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";
6111
+ function LeagueDetail({ group, position, states, stale, ui, monitor, starTap, onBack, onPrev, onNext }) {
6112
+ const [toast, setToast] = (0, import_react39.useState)(null);
6113
+ (0, import_react39.useEffect)(() => {
6114
+ setToast(null);
6115
+ }, [group.competitionId]);
6116
+ (0, import_react39.useEffect)(() => {
6117
+ if (toast === null) return;
6118
+ const id = setTimeout(() => setToast(null), 4e3);
6119
+ return () => clearTimeout(id);
6120
+ }, [toast]);
5944
6121
  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 })
6122
+ const onStarClick = () => {
6123
+ const next = !group.isStarred;
6124
+ void starTap.tap(group.competitionId, next).then((ok) => {
6125
+ if (ok) setToast(next ? ui.starredToast : ui.unstarredToast);
6126
+ });
6127
+ };
6128
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "ss-w-today-detail", children: [
6129
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "ss-w-today-detail-head", children: [
6130
+ /* @__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, {}) }),
6131
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Crest2, { url: group.competitionImagePath ?? void 0, name: group.competitionName, kind: "comp" }),
6132
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "ss-w-today-detail-name", children: group.competitionName }),
6133
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
6134
+ "button",
6135
+ {
6136
+ type: "button",
6137
+ className: "ss-w-today-detail-star",
6138
+ "aria-pressed": group.isStarred,
6139
+ "aria-label": group.isStarred ? ui.starOffLabel : ui.starOnLabel,
6140
+ disabled: starTap.pendingId !== null,
6141
+ onClick: onStarClick,
6142
+ children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
6143
+ "path",
6144
+ {
6145
+ d: STAR_PATH2,
6146
+ fill: group.isStarred ? "currentColor" : "none",
6147
+ stroke: group.isStarred ? "none" : "currentColor",
6148
+ strokeWidth: 2,
6149
+ strokeLinejoin: "round",
6150
+ strokeLinecap: "round"
6151
+ }
6152
+ ) })
6153
+ }
6154
+ )
5962
6155
  ] }),
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)) })
6156
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "ss-w-today-detail-nav", children: [
6157
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
6158
+ "button",
6159
+ {
6160
+ type: "button",
6161
+ className: "ss-w-today-detail-prev",
6162
+ "aria-label": ui.prevLeagueLabel,
6163
+ disabled: position.index <= 1,
6164
+ onClick: onPrev,
6165
+ children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ChevronIcon, {})
6166
+ }
6167
+ ),
6168
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "ss-w-today-detail-pos", children: ui.leagueDetailPosition(position.index, position.total) }),
6169
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
6170
+ "button",
6171
+ {
6172
+ type: "button",
6173
+ className: "ss-w-today-detail-next",
6174
+ "aria-label": ui.nextLeagueLabel,
6175
+ disabled: position.index >= position.total,
6176
+ onClick: onNext,
6177
+ children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ChevronIcon, {})
6178
+ }
6179
+ )
6180
+ ] }),
6181
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "ss-w-today-detail-body", children: [
6182
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "ss-w-today-detail-count", children: own.length }),
6183
+ own.map((m) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(FixtureRow, { match: m, state: states[m.matchId], stale, ui, monitor }, m.matchId))
6184
+ ] }),
6185
+ toast !== null && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "ss-w-today-toast", role: "status", "aria-live": "polite", children: toast })
6186
+ ] });
6187
+ }
6188
+
6189
+ // src/components/games/ui/icons.tsx
6190
+ var import_jsx_runtime58 = require("react/jsx-runtime");
6191
+ var svg = (size, children, fill = false) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
6192
+ "svg",
6193
+ {
6194
+ width: size,
6195
+ height: size,
6196
+ viewBox: "0 0 24 24",
6197
+ fill: fill ? "currentColor" : "none",
6198
+ stroke: fill ? "none" : "currentColor",
6199
+ strokeWidth: 2.2,
6200
+ strokeLinecap: "round",
6201
+ strokeLinejoin: "round",
6202
+ "aria-hidden": "true",
6203
+ children
6204
+ }
6205
+ );
6206
+ var IconChevronLeft = ({ size = 20 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("path", { d: "M15 18l-6-6 6-6" }));
6207
+ 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")]);
6208
+ var IconCheck = ({ size = 14 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("path", { d: "M5 12l5 5 9-10" }));
6209
+ var IconClose = ({ size = 16 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("path", { d: "M6 6l12 12M18 6L6 18" }));
6210
+ 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")]);
6211
+ var IconPlus = ({ size = 20 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("path", { d: "M12 5v14M5 12h14" }));
6212
+ 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")]);
6213
+ var IconArrowUp = ({ size = 12 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("path", { d: "M12 19V5M5 12l7-7 7 7" }));
6214
+ var IconArrowDown = ({ size = 12 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("path", { d: "M12 5v14M19 12l-7 7-7-7" }));
6215
+ 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")]);
6216
+ 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" }));
6217
+ var IconFlag = ({ size = 18 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("path", { d: "M5 21V4M5 4h12l-2 4 2 4H5" }));
6218
+ 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")]);
6219
+ var IconBoot = ({ size = 18 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("path", { d: "M4 6h6l1 6 8 3v3H4z" }));
6220
+ 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" }));
6221
+ 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);
6222
+
6223
+ // src/components/games/ui/SearchField.tsx
6224
+ var import_jsx_runtime59 = require("react/jsx-runtime");
6225
+ function SearchField({ id, label, labelHidden = false, placeholder, value, onChange, disabled, inputRef, onKeyDown }) {
6226
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "ss-g-search", children: [
6227
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("label", { htmlFor: id, className: labelHidden ? "ss-g-sr" : "ss-g-search-label", children: label }),
6228
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "ss-g-search-box", children: [
6229
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(IconSearch, {}),
6230
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
6231
+ "input",
6232
+ {
6233
+ id,
6234
+ ref: inputRef,
6235
+ type: "text",
6236
+ autoComplete: "off",
6237
+ placeholder,
6238
+ value,
6239
+ disabled,
6240
+ onKeyDown,
6241
+ onChange: (e) => onChange(e.target.value)
6242
+ }
6243
+ )
6244
+ ] })
5964
6245
  ] });
5965
6246
  }
5966
6247
 
5967
6248
  // src/components/TodayPanel.tsx
5968
- var import_jsx_runtime57 = require("react/jsx-runtime");
6249
+ var import_jsx_runtime60 = require("react/jsx-runtime");
5969
6250
  function TodayPanel({ discovery, ui, monitor }) {
5970
- const { groups, states, stale, expanded, toggleGroup } = discovery;
6251
+ const { groups, states, stale, starLeague } = discovery;
6252
+ const searchId = (0, import_react40.useId)();
6253
+ const [query, setQuery] = (0, import_react40.useState)("");
6254
+ const [selectedCompetitionId, setSelectedCompetitionId] = (0, import_react40.useState)(null);
6255
+ const [toast, setToast] = (0, import_react40.useState)(null);
6256
+ (0, import_react40.useEffect)(() => {
6257
+ if (toast === null) return;
6258
+ const id = setTimeout(() => setToast(null), 4e3);
6259
+ return () => clearTimeout(id);
6260
+ }, [toast]);
5971
6261
  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);
6262
+ const pinnedMatchIds = (0, import_react40.useMemo)(
6263
+ () => monitor.pins.filter((p) => p.kind === "match").map((p) => p.matchId),
6264
+ [monitor.pins]
6265
+ );
6266
+ const placement = (0, import_react40.useMemo)(() => placeLeagues(visibleGroups, pinnedMatchIds), [visibleGroups, pinnedMatchIds]);
6267
+ const starTap = useStarTap(starLeague);
6268
+ const gridStarTap = (0, import_react40.useMemo)(() => ({
6269
+ pendingId: starTap.pendingId,
6270
+ tap: async (competitionId, next) => {
6271
+ const ok = await starTap.tap(competitionId, next);
6272
+ if (ok) setToast(next ? "starred" : "unstarred");
6273
+ return ok;
6274
+ }
6275
+ }), [starTap, starTap.pendingId]);
5973
6276
  const nameCounts = visibleGroups.reduce((acc, g) => {
5974
6277
  acc[g.competitionName] = (acc[g.competitionName] ?? 0) + 1;
5975
6278
  return acc;
5976
6279
  }, {});
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
- )) })
6280
+ const openIndex = selectedCompetitionId === null ? -1 : placement.order.findIndex((g) => g.competitionId === selectedCompetitionId);
6281
+ const openGroup = openIndex === -1 ? void 0 : placement.order[openIndex];
6282
+ (0, import_react40.useEffect)(() => {
6283
+ if (selectedCompetitionId !== null && openGroup === void 0) setSelectedCompetitionId(null);
6284
+ }, [selectedCompetitionId, openGroup]);
6285
+ 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);
6286
+ const liveBand = liveRows.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
6287
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "ss-w-sec-head", children: [
6288
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "ss-w-sec-dot", "aria-hidden": "true" }),
6289
+ ui.sectionLive
5995
6290
  ] }),
5996
- visibleGroups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
5997
- CompetitionGroup,
6291
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "ss-w-today-live", children: liveRows.map(({ match }) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
6292
+ FixtureRow,
5998
6293
  {
5999
- group,
6000
- open: expanded[group.competitionId] ?? group.expandedByDefault,
6001
- onToggle: () => toggleGroup(group.competitionId),
6002
- disambiguate: (nameCounts[group.competitionName] ?? 0) > 1,
6003
- states,
6294
+ match,
6295
+ state: states[match.matchId],
6004
6296
  stale,
6005
6297
  ui,
6006
6298
  monitor
6007
6299
  },
6008
- group.competitionId
6009
- ))
6300
+ match.matchId
6301
+ )) })
6302
+ ] });
6303
+ if (openGroup !== void 0) {
6304
+ 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: [
6305
+ stale && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "ss-w-stale", children: ui.staleStates }),
6306
+ liveBand,
6307
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
6308
+ LeagueDetail,
6309
+ {
6310
+ group: openGroup,
6311
+ position: { index: openIndex + 1, total: placement.order.length },
6312
+ states,
6313
+ stale,
6314
+ ui,
6315
+ monitor,
6316
+ starTap,
6317
+ onBack: () => setSelectedCompetitionId(null),
6318
+ onPrev: () => setSelectedCompetitionId(placement.order[Math.max(0, openIndex - 1)].competitionId),
6319
+ onNext: () => setSelectedCompetitionId(
6320
+ placement.order[Math.min(placement.order.length - 1, openIndex + 1)].competitionId
6321
+ )
6322
+ }
6323
+ )
6324
+ ] }) });
6325
+ }
6326
+ const searching = query.trim().length > 0;
6327
+ const searchResults = searching ? visibleGroups.filter((g) => matchesQuery(g, query)) : [];
6328
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "ss-w-today-root", children: [
6329
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "ss-w-mon-list", children: [
6330
+ stale && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "ss-w-stale", children: ui.staleStates }),
6331
+ !searching && liveBand,
6332
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
6333
+ SearchField,
6334
+ {
6335
+ id: searchId,
6336
+ label: ui.searchLeaguesPlaceholder,
6337
+ labelHidden: true,
6338
+ placeholder: ui.searchLeaguesPlaceholder,
6339
+ value: query,
6340
+ onChange: setQuery
6341
+ }
6342
+ ),
6343
+ 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)("div", { className: "ss-w-today-tiles", children: searchResults.map((group) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
6344
+ LeagueTile,
6345
+ {
6346
+ group,
6347
+ starClickable: starClickable(group, placement.pinnedCompetitionId),
6348
+ disambiguate: (nameCounts[group.competitionName] ?? 0) > 1,
6349
+ onOpen: () => setSelectedCompetitionId(group.competitionId),
6350
+ starTap: gridStarTap,
6351
+ ui
6352
+ },
6353
+ group.competitionId
6354
+ )) }) : /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
6355
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "ss-w-today-sec", children: [
6356
+ placement.personal ? ui.yourLeagues : ui.topLeagues,
6357
+ !placement.personal && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "ss-w-today-sec-sub", children: ui.topLeaguesSub })
6358
+ ] }),
6359
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "ss-w-today-tiles", children: placement.candidates.map((group) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
6360
+ LeagueTile,
6361
+ {
6362
+ group,
6363
+ starClickable: starClickable(group, placement.pinnedCompetitionId),
6364
+ disambiguate: (nameCounts[group.competitionName] ?? 0) > 1,
6365
+ onOpen: () => setSelectedCompetitionId(group.competitionId),
6366
+ starTap: gridStarTap,
6367
+ ui
6368
+ },
6369
+ group.competitionId
6370
+ )) }),
6371
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "ss-w-today-sec", children: ui.allLeagues }),
6372
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "ss-w-today-tiles", children: placement.others.map((group) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
6373
+ LeagueTile,
6374
+ {
6375
+ group,
6376
+ starClickable: starClickable(group, placement.pinnedCompetitionId),
6377
+ disambiguate: (nameCounts[group.competitionName] ?? 0) > 1,
6378
+ onOpen: () => setSelectedCompetitionId(group.competitionId),
6379
+ starTap: gridStarTap,
6380
+ ui
6381
+ },
6382
+ group.competitionId
6383
+ )) })
6384
+ ] })
6385
+ ] }),
6386
+ 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
6387
  ] });
6011
6388
  }
6012
6389
 
6013
6390
  // src/components/GamesPanel.tsx
6014
- var import_react51 = require("react");
6391
+ var import_react54 = require("react");
6015
6392
 
6016
6393
  // src/components/GamesLoginWall.tsx
6017
- var import_jsx_runtime58 = require("react/jsx-runtime");
6394
+ var import_jsx_runtime61 = require("react/jsx-runtime");
6018
6395
  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 }) }) });
6396
+ 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
6397
  }
6021
6398
 
6022
6399
  // src/components/GamesHub.tsx
6023
- var import_react38 = require("react");
6400
+ var import_react41 = require("react");
6024
6401
 
6025
6402
  // src/components/games/ui/gameMeta.ts
6026
6403
  function prettifyGameId(gameId) {
@@ -6036,108 +6413,74 @@ function splitName(full) {
6036
6413
  }
6037
6414
 
6038
6415
  // src/components/GameTileArt.tsx
6039
- var import_jsx_runtime59 = require("react/jsx-runtime");
6416
+ var import_jsx_runtime62 = require("react/jsx-runtime");
6040
6417
  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 });
6418
+ 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
6419
  }
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` })
6420
+ var head = (cx, cy, r, cls = "ss-g-art-fg") => /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("g", { className: cls, children: [
6421
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("circle", { cx, cy: cy - r * 0.3, r: r * 0.45 }),
6422
+ /* @__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
6423
  ] });
6047
6424
  var ART = {
6048
- "mystery-tiger": /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
6425
+ "mystery-tiger": /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
6049
6426
  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: "?" })
6427
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("text", { x: "60", y: "36", className: "ss-g-art-q", textAnchor: "middle", children: "?" })
6051
6428
  ] }),
6052
- "higher-or-lower": /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
6429
+ "higher-or-lower": /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
6053
6430
  head(32, 38, 20),
6054
6431
  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" })
6432
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("circle", { cx: "60", cy: "37", r: "11", className: "ss-g-art-accent" }),
6433
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("path", { d: "M57 33l3-3 3 3M57 41l3 3 3-3", className: "ss-g-art-ink" })
6057
6434
  ] }),
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))
6435
+ "guess-the-xi": /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
6436
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("rect", { x: "8", y: "4", width: "104", height: "66", rx: "6", className: "ss-g-art-pitch" }),
6437
+ [[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
6438
  ] }),
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: "?" })
6439
+ "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)) }),
6440
+ "career-path": /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
6441
+ /* @__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" }),
6442
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("path", { d: "M48 37h8M84 37h8", className: "ss-g-art-line" }),
6443
+ /* @__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" }),
6444
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("rect", { x: "96", y: "22", width: "18", height: "26", rx: "4", className: "ss-g-art-dash" }),
6445
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("text", { x: "105", y: "40", className: "ss-g-art-q", textAnchor: "middle", children: "?" })
6069
6446
  ] }),
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" })
6447
+ "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}`))) }),
6448
+ "matchday-predictor": /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
6449
+ /* @__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" }),
6450
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("rect", { x: "38", y: "22", width: "18", height: "24", rx: "4", className: "ss-g-art-accent-stroke" }),
6451
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("rect", { x: "64", y: "22", width: "18", height: "24", rx: "4", className: "ss-g-art-dash" }),
6452
+ /* @__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
6453
  ] }),
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))
6454
+ "starting-xi": /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
6455
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("rect", { x: "8", y: "4", width: "104", height: "66", rx: "6", className: "ss-g-art-pitch" }),
6456
+ [[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
6457
  ] }),
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" }),
6458
+ "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)) }),
6459
+ "fan-motm": /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
6460
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("circle", { cx: "60", cy: "37", r: "26", className: "ss-g-art-accent-stroke" }),
6084
6461
  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" })
6462
+ /* @__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
6463
  ] }),
6087
- default: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("circle", { cx: "60", cy: "37", r: "22", className: "ss-g-art-fg" })
6464
+ default: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("circle", { cx: "60", cy: "37", r: "22", className: "ss-g-art-fg" })
6088
6465
  };
6089
6466
 
6090
6467
  // src/components/games/ui/Chip.tsx
6091
- var import_jsx_runtime60 = require("react/jsx-runtime");
6468
+ var import_jsx_runtime63 = require("react/jsx-runtime");
6092
6469
  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: [
6470
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("span", { className: `ss-g-chip ss-g-chip--${variant}${className ? ` ${className}` : ""}`, children: [
6094
6471
  icon,
6095
6472
  children
6096
6473
  ] });
6097
6474
  }
6098
6475
  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 })
6476
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("span", { className: "ss-g-statstack", children: [
6477
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "ss-g-statstack-v", children: value }),
6478
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "ss-g-statstack-l", children: label })
6102
6479
  ] });
6103
6480
  }
6104
6481
 
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
6482
  // src/components/GameTile.tsx
6140
- var import_jsx_runtime62 = require("react/jsx-runtime");
6483
+ var import_jsx_runtime64 = require("react/jsx-runtime");
6141
6484
  function tileStatus(game, ui) {
6142
6485
  switch (game.status) {
6143
6486
  case "locked":
@@ -6161,38 +6504,38 @@ function GameTile({ game, onOpen, ui, variant = "tile" }) {
6161
6504
  const status = tileStatus(game, ui);
6162
6505
  const disabled = DISABLED.has(game.status);
6163
6506
  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: [
6507
+ const body = variant === "hero" ? /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_jsx_runtime64.Fragment, { children: [
6508
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("span", { className: "ss-g-hero-text", children: [
6509
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "ss-g-hero-eyebrow", children: ui.games.dailyChallenge }),
6510
+ status.tone === "new" && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Chip, { variant: "badge", children: ui.games.newToday }),
6511
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "ss-g-hero-title", children: title }),
6512
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "ss-g-hero-sub", children: ui.games.taglines[game.gameId] ?? "" }),
6513
+ 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
6514
  status.tone === "accent" ? ui.games.resume : ui.games.playNow,
6172
6515
  " \u2192"
6173
6516
  ] })
6174
6517
  ] }),
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 })
6518
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "ss-g-hero-art", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(GameTileArt, { gameId: game.gameId }) })
6519
+ ] }) : variant === "wide" ? /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_jsx_runtime64.Fragment, { children: [
6520
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "ss-g-wide-art", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(GameTileArt, { gameId: game.gameId }) }),
6521
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("span", { className: "ss-g-wide-text", children: [
6522
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "ss-g-tile-title", children: title }),
6523
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "ss-g-tile-status", "data-tone": status.tone, children: status.text }),
6524
+ status.tone === "new" && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Chip, { variant: "badge", children: ui.games.newToday })
6182
6525
  ] }),
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 })
6526
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "ss-g-wide-chev", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(IconChevronLeft, { size: 18 }) })
6527
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_jsx_runtime64.Fragment, { children: [
6528
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "ss-g-tile-art", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(GameTileArt, { gameId: game.gameId }) }),
6529
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "ss-g-tile-title", children: title }),
6530
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "ss-g-tile-status", "data-tone": status.tone, children: status.text })
6188
6531
  ] });
6189
6532
  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 });
6533
+ if (disabled) return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: cls, "data-disabled": true, "aria-disabled": "true", children: body });
6534
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("button", { type: "button", className: cls, "aria-label": `${title} \u2014 ${status.text}`, onClick: () => onOpen(game), children: body });
6192
6535
  }
6193
6536
 
6194
6537
  // src/components/GamesHub.tsx
6195
- var import_jsx_runtime63 = require("react/jsx-runtime");
6538
+ var import_jsx_runtime65 = require("react/jsx-runtime");
6196
6539
  var PLAYABLE = /* @__PURE__ */ new Set(["available", "in_progress"]);
6197
6540
  var DONE = /* @__PURE__ */ new Set(["played", "graded"]);
6198
6541
  function pickHeroGame(games) {
@@ -6205,8 +6548,8 @@ function pickHeroGame(games) {
6205
6548
  }
6206
6549
  var tileKey = (g) => `${g.gameId}-${g.gameDay}-${g.fixtureId}`;
6207
6550
  function GamesHub({ games, myWeeklyRow, weeklyPrize, onOpen, ui }) {
6208
- const [, setTick] = (0, import_react38.useState)(0);
6209
- (0, import_react38.useEffect)(() => {
6551
+ const [, setTick] = (0, import_react41.useState)(0);
6552
+ (0, import_react41.useEffect)(() => {
6210
6553
  const id = setInterval(() => setTick((t) => t + 1), 6e4);
6211
6554
  return () => clearInterval(id);
6212
6555
  }, []);
@@ -6218,58 +6561,58 @@ function GamesHub({ games, myWeeklyRow, weeklyPrize, onOpen, ui }) {
6218
6561
  const kickoffs = fixtures.map((g) => g.kickoffUtc).filter((k) => !!k).sort();
6219
6562
  const todayPts = games.filter((g) => DONE.has(g.status)).reduce((s, g) => s + (g.score ?? 0), 0);
6220
6563
  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, {}),
6564
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "ss-g-hub", children: [
6565
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "ss-g-stats", children: [
6566
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "ss-g-stat", children: [
6567
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "ss-g-stat-l", children: ui.games.statStreak }),
6568
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("span", { className: "ss-g-stat-v", "data-testid": "stat-streak", children: [
6569
+ myWeeklyRow ? /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx_runtime65.Fragment, { children: [
6570
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(IconFlame, {}),
6228
6571
  myWeeklyRow.currentStreak
6229
6572
  ] }) : dash,
6230
- myWeeklyRow && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("small", { children: ui.games.unitDays })
6573
+ myWeeklyRow && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("small", { children: ui.games.unitDays })
6231
6574
  ] })
6232
6575
  ] }),
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: [
6576
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "ss-g-stat", children: [
6577
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "ss-g-stat-l", children: ui.games.statToday }),
6578
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("span", { className: "ss-g-stat-v ss-g-stat-v--accent", "data-testid": "stat-today", children: [
6236
6579
  ui.games.formatPts(todayPts),
6237
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("small", { children: ui.games.unitPts })
6580
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("small", { children: ui.games.unitPts })
6238
6581
  ] })
6239
6582
  ] }),
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: [
6583
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "ss-g-stat", children: [
6584
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "ss-g-stat-l", children: ui.games.statRank }),
6585
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("span", { className: "ss-g-stat-v", "data-testid": "stat-rank", children: [
6243
6586
  myWeeklyRow ? `#${myWeeklyRow.rank}` : dash,
6244
- myWeeklyRow && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("small", { children: ui.games.thisWeek })
6587
+ myWeeklyRow && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("small", { children: ui.games.thisWeek })
6245
6588
  ] })
6246
6589
  ] })
6247
6590
  ] }),
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 })
6591
+ weeklyPrize && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Chip, { variant: "accent", className: "ss-g-prize", children: weeklyPrize }),
6592
+ hero && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(GameTile, { game: hero, onOpen, ui, variant: "hero" }),
6593
+ (grid.length > 0 || wide) && /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("section", { className: "ss-g-sec", children: [
6594
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "ss-g-sec-head", children: [
6595
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("h3", { children: ui.games.dailyGames }),
6596
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: ui.games.newSetAtMidnight })
6254
6597
  ] }),
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" })
6598
+ 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))) }),
6599
+ wide && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(GameTile, { game: wide, onOpen, ui, variant: "wide" })
6257
6600
  ] }),
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])) })
6601
+ fixtures.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("section", { className: "ss-g-sec", children: [
6602
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "ss-g-sec-head", children: [
6603
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("h3", { children: ui.games.matchdayGames }),
6604
+ kickoffs[0] && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: ui.games.kickoffAt(ui.games.formatDayTime(kickoffs[0])) })
6262
6605
  ] }),
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))) })
6606
+ /* @__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
6607
  ] })
6265
6608
  ] });
6266
6609
  }
6267
6610
 
6268
6611
  // src/components/GameScreenHost.tsx
6269
- var import_react50 = require("react");
6612
+ var import_react53 = require("react");
6270
6613
 
6271
6614
  // src/useGamePlay.ts
6272
- var import_react39 = require("react");
6615
+ var import_react42 = require("react");
6273
6616
  function toSubmitResult(payload) {
6274
6617
  return {
6275
6618
  // 'pending' means the play is recorded but awaiting resolution (fixture games)
@@ -6281,17 +6624,17 @@ function toSubmitResult(payload) {
6281
6624
  };
6282
6625
  }
6283
6626
  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);
6627
+ const [result, setResult] = (0, import_react42.useState)(null);
6628
+ const [submitting, setSubmitting] = (0, import_react42.useState)(false);
6629
+ const [rawStatus, setRawStatus] = (0, import_react42.useState)(null);
6630
+ const inFlightRef = (0, import_react42.useRef)(false);
6631
+ const convRef = (0, import_react42.useRef)(conversation);
6289
6632
  convRef.current = conversation;
6290
- const optsRef = (0, import_react39.useRef)({ gameId, gameDay, fixtureId, locale, refresh });
6633
+ const optsRef = (0, import_react42.useRef)({ gameId, gameDay, fixtureId, locale, refresh });
6291
6634
  optsRef.current = { gameId, gameDay, fixtureId, locale, refresh };
6292
- const resultRef = (0, import_react39.useRef)(null);
6635
+ const resultRef = (0, import_react42.useRef)(null);
6293
6636
  resultRef.current = result;
6294
- const refetch = (0, import_react39.useCallback)(async () => {
6637
+ const refetch = (0, import_react42.useCallback)(async () => {
6295
6638
  const conv = convRef.current;
6296
6639
  if (!conv) return;
6297
6640
  const opts = optsRef.current;
@@ -6307,7 +6650,7 @@ function useGamePlay(conversation, { gameId, gameDay, fixtureId, locale, refresh
6307
6650
  } catch {
6308
6651
  }
6309
6652
  }, []);
6310
- const submit = (0, import_react39.useCallback)(async (answerJson) => {
6653
+ const submit = (0, import_react42.useCallback)(async (answerJson) => {
6311
6654
  const conv = convRef.current;
6312
6655
  if (!conv || inFlightRef.current) return;
6313
6656
  inFlightRef.current = true;
@@ -6334,14 +6677,14 @@ function useGamePlay(conversation, { gameId, gameDay, fixtureId, locale, refresh
6334
6677
  setSubmitting(false);
6335
6678
  }
6336
6679
  }, [refetch]);
6337
- const hydrate = (0, import_react39.useCallback)(() => {
6680
+ const hydrate = (0, import_react42.useCallback)(() => {
6338
6681
  void refetch();
6339
6682
  }, [refetch]);
6340
6683
  return { result, submitting, submit, hydrate, rawStatus };
6341
6684
  }
6342
6685
 
6343
6686
  // src/components/games/MysteryTigerGame.tsx
6344
- var import_react41 = require("react");
6687
+ var import_react44 = require("react");
6345
6688
 
6346
6689
  // src/components/games/nationFlags.ts
6347
6690
  var FLAGS = {
@@ -6552,8 +6895,8 @@ function isNationCode(flag) {
6552
6895
  }
6553
6896
 
6554
6897
  // src/components/games/PlayerAvatar.tsx
6555
- var import_react40 = require("react");
6556
- var import_jsx_runtime64 = require("react/jsx-runtime");
6898
+ var import_react43 = require("react");
6899
+ var import_jsx_runtime66 = require("react/jsx-runtime");
6557
6900
  function initialsOf(name) {
6558
6901
  const parts = name.trim().split(/\s+/).filter(Boolean);
6559
6902
  const first = parts[0];
@@ -6570,41 +6913,41 @@ function PlayerAvatar({
6570
6913
  imagePath,
6571
6914
  className
6572
6915
  }) {
6573
- const [failed, setFailed] = (0, import_react40.useState)(false);
6916
+ const [failed, setFailed] = (0, import_react43.useState)(false);
6574
6917
  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) }) });
6918
+ 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
6919
  }
6577
6920
 
6578
6921
  // src/components/games/ui/GameHeader.tsx
6579
- var import_jsx_runtime65 = require("react/jsx-runtime");
6922
+ var import_jsx_runtime67 = require("react/jsx-runtime");
6580
6923
  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 })
6924
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "ss-g-head", children: [
6925
+ 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, {}) }),
6926
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "ss-g-head-text", children: [
6927
+ eyebrow && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "ss-g-eyebrow", children: eyebrow }),
6928
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("h2", { className: "ss-g-title", children: title })
6586
6929
  ] }),
6587
- right && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "ss-g-head-right", children: right })
6930
+ right && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "ss-g-head-right", children: right })
6588
6931
  ] });
6589
6932
  }
6590
6933
 
6591
6934
  // src/components/games/ui/SegmentProgress.tsx
6592
- var import_jsx_runtime66 = require("react/jsx-runtime");
6935
+ var import_jsx_runtime68 = require("react/jsx-runtime");
6593
6936
  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 })
6937
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "ss-g-progress", children: [
6938
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "ss-g-progress-main", children: [
6939
+ (leftLabel || rightLabel) && /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "ss-g-progress-labels", children: [
6940
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { children: leftLabel }),
6941
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "ss-g-progress-rl", children: rightLabel })
6599
6942
  ] }),
6600
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
6943
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
6601
6944
  "div",
6602
6945
  {
6603
6946
  className: "ss-g-segs",
6604
6947
  role: "img",
6605
6948
  "aria-label": ariaLabel,
6606
6949
  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))
6950
+ children: segments.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "ss-g-seg", "data-state": s }, i))
6608
6951
  }
6609
6952
  )
6610
6953
  ] }),
@@ -6612,38 +6955,13 @@ function SegmentProgress({ segments, ariaLabel, leftLabel, rightLabel, right })
6612
6955
  ] });
6613
6956
  }
6614
6957
 
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
6958
  // src/components/games/ui/AnswerTray.tsx
6641
- var import_jsx_runtime68 = require("react/jsx-runtime");
6959
+ var import_jsx_runtime69 = require("react/jsx-runtime");
6642
6960
  function AnswerTray({ id, label, placeholder, optionsLabel, options, query, onQuery, onPick, disabled, minQuery = 0 }) {
6643
6961
  const needle = query.trim().toLowerCase();
6644
6962
  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)(
6963
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_jsx_runtime69.Fragment, { children: [
6964
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
6647
6965
  SearchField,
6648
6966
  {
6649
6967
  id,
@@ -6655,9 +6973,9 @@ function AnswerTray({ id, label, placeholder, optionsLabel, options, query, onQu
6655
6973
  disabled
6656
6974
  }
6657
6975
  ),
6658
- shown.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "ss-g-tray", role: "listbox", "aria-label": optionsLabel, children: shown.map((o) => {
6976
+ shown.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "ss-g-tray", role: "listbox", "aria-label": optionsLabel, children: shown.map((o) => {
6659
6977
  const { first, last } = splitName(o.name);
6660
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
6978
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
6661
6979
  "button",
6662
6980
  {
6663
6981
  type: "button",
@@ -6668,10 +6986,10 @@ function AnswerTray({ id, label, placeholder, optionsLabel, options, query, onQu
6668
6986
  disabled,
6669
6987
  onClick: () => onPick(o.id),
6670
6988
  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 })
6989
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(PlayerAvatar, { className: "ss-g-tray-av", name: o.name, imagePath: o.imagePath }),
6990
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("span", { className: "ss-g-tray-name", "aria-hidden": "true", children: [
6991
+ first && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "ss-g-tray-first", children: first }),
6992
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "ss-g-tray-last", children: last })
6675
6993
  ] })
6676
6994
  ]
6677
6995
  },
@@ -6682,59 +7000,59 @@ function AnswerTray({ id, label, placeholder, optionsLabel, options, query, onQu
6682
7000
  }
6683
7001
 
6684
7002
  // src/components/games/ui/FooterBar.tsx
6685
- var import_jsx_runtime69 = require("react/jsx-runtime");
7003
+ var import_jsx_runtime70 = require("react/jsx-runtime");
6686
7004
  function FooterBar({ children }) {
6687
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "ss-g-footer", children });
7005
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "ss-g-footer", children });
6688
7006
  }
6689
7007
 
6690
7008
  // src/components/games/ui/Silhouette.tsx
6691
- var import_jsx_runtime70 = require("react/jsx-runtime");
7009
+ var import_jsx_runtime71 = require("react/jsx-runtime");
6692
7010
  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" })
7011
+ 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: [
7012
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("svg", { width: size * 0.86, height: size * 0.86, viewBox: "0 0 100 100", children: [
7013
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("circle", { cx: "50", cy: "40", r: "19", fill: "currentColor" }),
7014
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("path", { d: "M12 100c0-23 17-38 38-38s38 15 38 38z", fill: "currentColor" })
6697
7015
  ] }),
6698
- variant === "mystery" && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "ss-g-sil-q", children: "?" })
7016
+ variant === "mystery" && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "ss-g-sil-q", children: "?" })
6699
7017
  ] });
6700
7018
  }
6701
7019
 
6702
7020
  // src/components/games/ui/GameButton.tsx
6703
- var import_jsx_runtime71 = require("react/jsx-runtime");
7021
+ var import_jsx_runtime72 = require("react/jsx-runtime");
6704
7022
  function GameButton({ variant = "primary", block = false, className, type = "button", ...rest }) {
6705
7023
  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 });
7024
+ return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("button", { type, className: cls, ...rest });
6707
7025
  }
6708
7026
 
6709
7027
  // src/components/games/ui/ResultCard.tsx
6710
- var import_jsx_runtime72 = require("react/jsx-runtime");
7028
+ var import_jsx_runtime73 = require("react/jsx-runtime");
6711
7029
  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 }),
7030
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "ss-g-result", "data-tone": tone, role: "status", children: [
7031
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "ss-g-result-title", children: title }),
7032
+ score !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("span", { className: "ss-g-result-score", children: [
7033
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "ss-g-result-num", children: score }),
6716
7034
  ui.games.unitPts
6717
7035
  ] }),
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 })
7036
+ detail && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "ss-g-result-detail", children: detail }),
7037
+ onBack && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(GameButton, { variant: "outline", onClick: onBack, children: ui.games.backToGames })
6720
7038
  ] });
6721
7039
  }
6722
7040
 
6723
7041
  // src/components/games/ui/PointsLadderRow.tsx
6724
- var import_jsx_runtime73 = require("react/jsx-runtime");
7042
+ var import_jsx_runtime74 = require("react/jsx-runtime");
6725
7043
  function PointsLadderRow({ ladder, guessesUsed, ui }) {
6726
7044
  if (!ladder || ladder.length === 0) return null;
6727
7045
  const now = ladder[Math.min(guessesUsed, ladder.length - 1)];
6728
7046
  const next = ladder[guessesUsed + 1];
6729
7047
  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) })
7048
+ return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "ss-g-worth", "data-testid": "points-ladder", children: [
7049
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "ss-g-worth-now", children: ui.games.worthNow(now) }),
7050
+ next !== void 0 && next !== now && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "ss-g-worth-next", children: ui.games.worthAfterMiss(next) })
6733
7051
  ] });
6734
7052
  }
6735
7053
 
6736
7054
  // src/components/games/MysteryTigerGame.tsx
6737
- var import_jsx_runtime74 = require("react/jsx-runtime");
7055
+ var import_jsx_runtime75 = require("react/jsx-runtime");
6738
7056
  function parseClientState(json) {
6739
7057
  if (!json) return null;
6740
7058
  try {
@@ -6836,8 +7154,8 @@ function MysteryTigerGame({
6836
7154
  onBack
6837
7155
  }) {
6838
7156
  const t = ui.games.mysteryTiger;
6839
- const [query, setQuery] = (0, import_react41.useState)("");
6840
- const inputId = (0, import_react41.useId)();
7157
+ const [query, setQuery] = (0, import_react44.useState)("");
7158
+ const inputId = (0, import_react44.useId)();
6841
7159
  const clientState = parseClientState(result?.clientStateJson);
6842
7160
  const guessResults = clientState?.guessResults ?? [];
6843
7161
  const alreadyGuessedIds = new Set(guessResults.map((g) => g.playerId));
@@ -6856,22 +7174,22 @@ function MysteryTigerGame({
6856
7174
  setQuery("");
6857
7175
  onSubmit(JSON.stringify({ guesses: newGuesses }));
6858
7176
  }
6859
- const headerRight = !config ? void 0 : isOver ? /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(Chip, { variant: "accent", children: [
7177
+ const headerRight = !config ? void 0 : isOver ? /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(Chip, { variant: "accent", children: [
6860
7178
  score,
6861
7179
  " ",
6862
7180
  ui.games.unitPts
6863
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { "data-testid": "mt-chip", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(Chip, { children: [
7181
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { "data-testid": "mt-chip", children: /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(Chip, { children: [
6864
7182
  ui.games.guess,
6865
7183
  " ",
6866
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "ss-g-num", children: guessesUsed + 1 }),
7184
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "ss-g-num", children: guessesUsed + 1 }),
6867
7185
  " / ",
6868
7186
  totalGuesses
6869
7187
  ] }) });
6870
7188
  const segments = Array.from({ length: totalGuesses }, (_, i) => i < guessesUsed ? "done" : i === guessesUsed ? "current" : "todo");
6871
7189
  const cols = { gridTemplateColumns: `minmax(0, 1fr) repeat(${keys.length}, 42px)` };
6872
7190
  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)(
7191
+ 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: [
7192
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
6875
7193
  GameHeader,
6876
7194
  {
6877
7195
  title: gameTitle({ gameId: "mystery-tiger" }, ui.games.titles),
@@ -6881,41 +7199,41 @@ function MysteryTigerGame({
6881
7199
  backLabel: ui.back
6882
7200
  }
6883
7201
  ),
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 })
7202
+ !config && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading }),
7203
+ config && /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(import_jsx_runtime75.Fragment, { children: [
7204
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "ss-g-body", children: [
7205
+ !isOver && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed, ui }),
7206
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: `ss-g-mt-card${isOver ? " ss-g-mt-card--reveal" : ""}`, children: [
7207
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "ss-g-mt-portrait", children: [
7208
+ 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" }),
7209
+ revealName && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "ss-g-mt-reveal-name", children: revealName })
6892
7210
  ] }),
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 })
7211
+ /* @__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: [
7212
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "ss-g-mt-lab", children: t.labels[k.key] }),
7213
+ /* @__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
7214
  ] }, k.key)) })
6897
7215
  ] }),
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))
7216
+ !isOver && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(SegmentProgress, { segments, ariaLabel: t.progress(guessesUsed, totalGuesses) }),
7217
+ guessResults.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "ss-g-mt-table", children: [
7218
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "ss-g-mt-thead", style: cols, children: [
7219
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { children: t.yourGuesses }),
7220
+ keys.map((k) => /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { children: t.labels[k] }, k))
6903
7221
  ] }),
6904
7222
  guessResults.map((gr, i) => {
6905
7223
  const name = config.squadPlayers.find((p) => p.id === gr.playerId)?.name ?? `#${gr.playerId}`;
6906
7224
  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 })
7225
+ return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "ss-g-mt-row", style: cols, children: [
7226
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "ss-g-mt-who", children: [
7227
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(PlayerAvatar, { className: "ss-g-mt-av", name }),
7228
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("span", { className: "ss-g-mt-names", children: [
7229
+ first && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "ss-g-mt-first", children: first }),
7230
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "ss-g-mt-last", children: last })
6913
7231
  ] })
6914
7232
  ] }),
6915
7233
  keys.map((key) => {
6916
7234
  const v = gr[key];
6917
7235
  const arrow = directionArrow(v);
6918
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
7236
+ return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(
6919
7237
  "div",
6920
7238
  {
6921
7239
  className: "ss-g-mt-cell",
@@ -6923,8 +7241,8 @@ function MysteryTigerGame({
6923
7241
  "data-verdict": v.verdict,
6924
7242
  "aria-label": `${t.labels[key]}: ${v.value ?? v.verdict}${v.direction ? ` ${v.direction}` : ""}`,
6925
7243
  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 })
7244
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "ss-g-mt-cell-v", "aria-hidden": "true", children: tileFace(key, v) }),
7245
+ arrow && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "ss-g-mt-cell-dir", "aria-hidden": "true", children: arrow })
6928
7246
  ]
6929
7247
  },
6930
7248
  key
@@ -6933,25 +7251,25 @@ function MysteryTigerGame({
6933
7251
  ] }, gr.playerId);
6934
7252
  })
6935
7253
  ] }),
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" }),
7254
+ !isOver && /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "ss-g-mt-legend", children: [
7255
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("span", { children: [
7256
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("i", { className: "ss-g-mt-sw", "data-verdict": "exact" }),
6939
7257
  t.legendMatch
6940
7258
  ] }),
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" }),
7259
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("span", { children: [
7260
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("i", { className: "ss-g-mt-sw", "data-verdict": "near" }),
6943
7261
  t.legendClose
6944
7262
  ] }),
6945
- /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("span", { children: [
7263
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("span", { children: [
6946
7264
  "\u25B2 ",
6947
7265
  t.legendHigher
6948
7266
  ] })
6949
7267
  ] }),
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 })
7268
+ clientState?.hintLine && !isOver && /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "ss-g-mt-hint", children: [
7269
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(IconBulb, {}),
7270
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { children: clientState.hintLine })
6953
7271
  ] }),
6954
- isOver && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
7272
+ isOver && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
6955
7273
  ResultCard,
6956
7274
  {
6957
7275
  tone: clientState?.solved ? "win" : clientState?.failed ? "lose" : "neutral",
@@ -6963,7 +7281,7 @@ function MysteryTigerGame({
6963
7281
  }
6964
7282
  )
6965
7283
  ] }),
6966
- !isOver && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
7284
+ !isOver && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
6967
7285
  AnswerTray,
6968
7286
  {
6969
7287
  id: inputId,
@@ -6982,7 +7300,7 @@ function MysteryTigerGame({
6982
7300
  }
6983
7301
 
6984
7302
  // src/components/games/HigherOrLowerGame.tsx
6985
- var import_jsx_runtime75 = require("react/jsx-runtime");
7303
+ var import_jsx_runtime76 = require("react/jsx-runtime");
6986
7304
  var POINTS_PER_CORRECT = 10;
6987
7305
  function parseClientState2(json) {
6988
7306
  if (!json) return null;
@@ -6994,11 +7312,11 @@ function parseClientState2(json) {
6994
7312
  }
6995
7313
  function PlayerCard({ name, imagePath, highlight, children }) {
6996
7314
  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 }),
7315
+ return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: `ss-g-hl-card${highlight ? " ss-g-hl-card--b" : ""}`, children: [
7316
+ /* @__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 }) }),
7317
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ss-g-hl-info", children: [
7318
+ first && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-hl-first", children: first }),
7319
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-hl-surname", children: last }),
7002
7320
  children
7003
7321
  ] })
7004
7322
  ] });
@@ -7030,47 +7348,47 @@ function HigherOrLowerGame({
7030
7348
  const newAnswers = [...prevAnswers, { pairIndex: currentPair.pairIndex, pick }];
7031
7349
  onSubmit(JSON.stringify({ answers: newAnswers }));
7032
7350
  }
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)(
7351
+ 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: [
7352
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
7035
7353
  GameHeader,
7036
7354
  {
7037
7355
  title: gameTitle({ gameId: "higher-or-lower" }, ui.games.titles),
7038
7356
  eyebrow: t.eyebrow(POINTS_PER_CORRECT),
7039
- right: config ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(StatStack, { value: runLength, label: t.streak }) : void 0,
7357
+ right: config ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(StatStack, { value: runLength, label: t.streak }) : void 0,
7040
7358
  onBack,
7041
7359
  backLabel: ui.back
7042
7360
  }
7043
7361
  ),
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) })
7362
+ !config && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading }),
7363
+ config && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(import_jsx_runtime76.Fragment, { children: [
7364
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ss-g-body", children: [
7365
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ss-g-hl-prompt", "data-testid": "hol-prompt", children: [
7366
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-hl-prompt-q", children: t.whoHadMore }),
7367
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-hl-prompt-stat", children: config.statLabel }),
7368
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-hl-prompt-season", children: t.season(config.seasonLabel) })
7051
7369
  ] }),
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 })
7370
+ currentPair && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ss-g-hl-pair", children: [
7371
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(PlayerCard, { name: currentPair.playerAName, imagePath: currentPair.playerAImagePath, children: [
7372
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-hl-value", children: currentPair.playerAValue }),
7373
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-hl-stat", children: config.statLabel })
7056
7374
  ] }),
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 }),
7375
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-hl-vs", "aria-hidden": "true", children: t.vs }),
7376
+ /* @__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: [
7377
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(GameButton, { variant: "primary", disabled: submitting, onClick: () => handlePick("higher"), children: [
7378
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(IconArrowUp, { size: 16 }),
7061
7379
  t.higher
7062
7380
  ] }),
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 }),
7381
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(GameButton, { variant: "outline", disabled: submitting, onClick: () => handlePick("lower"), children: [
7382
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(IconArrowDown, { size: 16 }),
7065
7383
  t.lower
7066
7384
  ] })
7067
7385
  ] }) })
7068
7386
  ] }),
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, {}),
7387
+ 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: [
7388
+ lastAnswer.wasCorrect ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(IconCheck, {}) : /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(IconClose, {}),
7071
7389
  t.lastAnswer(splitName(lastAnswerPair.playerBName).last, lastAnswer.playerBValue)
7072
7390
  ] }),
7073
- isOver && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
7391
+ isOver && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
7074
7392
  ResultCard,
7075
7393
  {
7076
7394
  tone: runEndedWrong ? "lose" : allPairsAnswered ? "win" : "neutral",
@@ -7082,15 +7400,15 @@ function HigherOrLowerGame({
7082
7400
  }
7083
7401
  )
7084
7402
  ] }),
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) => {
7403
+ !isOver && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ss-g-hl-foot", children: [
7404
+ /* @__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
7405
  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);
7406
+ return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-hl-dot", "data-state": a ? a.wasCorrect ? "correct" : "wrong" : "todo" }, p.pairIndex);
7089
7407
  }) }),
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 }),
7408
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("span", { className: "ss-g-hl-pts", children: [
7409
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { "data-testid": "hol-score", children: score }),
7092
7410
  " ",
7093
- /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "ss-g-hl-pts-unit", children: ui.games.unitPts })
7411
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-hl-pts-unit", children: ui.games.unitPts })
7094
7412
  ] })
7095
7413
  ] }) })
7096
7414
  ] })
@@ -7098,21 +7416,21 @@ function HigherOrLowerGame({
7098
7416
  }
7099
7417
 
7100
7418
  // src/components/games/CareerPathGame.tsx
7101
- var import_react43 = require("react");
7419
+ var import_react46 = require("react");
7102
7420
 
7103
7421
  // src/components/games/ui/CrestShield.tsx
7104
- var import_react42 = require("react");
7105
- var import_jsx_runtime76 = require("react/jsx-runtime");
7422
+ var import_react45 = require("react");
7423
+ var import_jsx_runtime77 = require("react/jsx-runtime");
7106
7424
  function CrestShield({ src, name, size = 28 }) {
7107
- const [failed, setFailed] = (0, import_react42.useState)(false);
7425
+ const [failed, setFailed] = (0, import_react45.useState)(false);
7108
7426
  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) });
7427
+ 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
7428
  }
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" }) });
7429
+ 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
7430
  }
7113
7431
 
7114
7432
  // src/components/games/CareerPathGame.tsx
7115
- var import_jsx_runtime77 = require("react/jsx-runtime");
7433
+ var import_jsx_runtime78 = require("react/jsx-runtime");
7116
7434
  function parseClientState3(json) {
7117
7435
  if (!json) return null;
7118
7436
  try {
@@ -7136,15 +7454,15 @@ function CareerPathGame({
7136
7454
  }) {
7137
7455
  const s = ui.games.careerPath;
7138
7456
  const title = gameTitle({ gameId: "career-path" }, ui.games.titles);
7139
- const [query, setQuery] = (0, import_react43.useState)("");
7140
- const inputId = (0, import_react43.useId)();
7457
+ const [query, setQuery] = (0, import_react46.useState)("");
7458
+ const inputId = (0, import_react46.useId)();
7141
7459
  const clientState = parseClientState3(result?.clientStateJson);
7142
7460
  const alreadyGuessedIds = new Set(clientState?.guessResults.map((g) => g.playerId) ?? []);
7143
7461
  const isOver = result?.alreadyPlayed === true || clientState?.solved === true || clientState?.failed === true;
7144
7462
  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 })
7463
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "ss-g-screen", "data-game": "career-path", "data-testid": "game-screen-career-path", children: [
7464
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(GameHeader, { title, eyebrow: s.eyebrow, onBack, backLabel: ui.back }),
7465
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
7148
7466
  ] });
7149
7467
  }
7150
7468
  const visiblePath = clientState?.visiblePath ?? config.initialPath;
@@ -7158,61 +7476,61 @@ function CareerPathGame({
7158
7476
  setQuery("");
7159
7477
  onSubmit(JSON.stringify({ guesses: newGuesses }));
7160
7478
  }
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: [
7479
+ 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
7480
  ui.games.guess,
7163
7481
  " ",
7164
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "ss-g-num", children: clientState.guessesUsed + 1 }),
7482
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ss-g-num", children: clientState.guessesUsed + 1 }),
7165
7483
  " / ",
7166
7484
  clientState.guessesUsed + clientState.guessesRemaining
7167
7485
  ] }) }) : void 0;
7168
7486
  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 })
7487
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "ss-g-screen", "data-game": "career-path", "data-testid": "game-screen-career-path", children: [
7488
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(GameHeader, { title, eyebrow: s.eyebrow, right, onBack, backLabel: ui.back }),
7489
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "ss-g-body", children: [
7490
+ !isOver && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed: clientState?.guessesUsed ?? 0, ui }),
7491
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "ss-g-cp-card", children: [
7492
+ 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" }),
7493
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "ss-g-cp-card-text", children: [
7494
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ss-g-cp-card-title", children: isOver && clientState?.revealedPlayerName ? clientState.revealedPlayerName : s.mysteryPlayer }),
7495
+ 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: [
7496
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Chip, { variant: "lock", icon: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(IconLock, { size: 11 }), children: s.lockPosition }),
7497
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Chip, { variant: "lock", icon: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(IconLock, { size: 11 }), children: s.lockNationality })
7180
7498
  ] }) : null
7181
7499
  ] })
7182
7500
  ] }),
7183
- /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("ol", { className: "ss-g-cp-line", children: [
7501
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("ol", { className: "ss-g-cp-line", children: [
7184
7502
  visiblePath.map((spell, i) => {
7185
7503
  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" })
7504
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("li", { className: "ss-g-cp-step", children: [
7505
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("span", { className: "ss-g-cp-rail", children: [
7506
+ /* @__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 }) }),
7507
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ss-g-cp-conn", "aria-hidden": "true" })
7190
7508
  ] }),
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: [
7509
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("span", { className: "ss-g-cp-step-text", children: [
7510
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ss-g-cp-club", children: spell.clubName }),
7511
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("span", { className: "ss-g-cp-sub", children: [
7512
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ss-g-cp-years", children: years }),
7513
+ spell.isLoan && /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
7196
7514
  years ? " \xB7 " : "",
7197
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "ss-g-cp-loan", children: s.loan })
7515
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ss-g-cp-loan", children: s.loan })
7198
7516
  ] })
7199
7517
  ] })
7200
7518
  ] })
7201
7519
  ] }, `${spell.clubName}-${i}`);
7202
7520
  }),
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" })
7521
+ hidden > 0 && /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("li", { className: "ss-g-cp-step ss-g-cp-step--hidden", children: [
7522
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("span", { className: "ss-g-cp-rail", children: [
7523
+ /* @__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 }) }),
7524
+ hidden > 1 && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ss-g-cp-conn ss-g-cp-conn--faint", "aria-hidden": "true" })
7207
7525
  ] }),
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 }) })
7526
+ /* @__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
7527
  ] }),
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) }) })
7528
+ hidden > 1 && /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("li", { className: "ss-g-cp-step ss-g-cp-step--more", children: [
7529
+ /* @__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 }) }) }),
7530
+ /* @__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
7531
  ] })
7214
7532
  ] }),
7215
- isOver && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
7533
+ isOver && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
7216
7534
  ResultCard,
7217
7535
  {
7218
7536
  tone: clientState?.solved ? "win" : clientState?.failed ? "lose" : "neutral",
@@ -7224,7 +7542,7 @@ function CareerPathGame({
7224
7542
  }
7225
7543
  )
7226
7544
  ] }),
7227
- !isOver && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
7545
+ !isOver && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
7228
7546
  AnswerTray,
7229
7547
  {
7230
7548
  id: inputId,
@@ -7243,16 +7561,16 @@ function CareerPathGame({
7243
7561
  }
7244
7562
 
7245
7563
  // src/components/games/BeatTheGridGame.tsx
7246
- var import_react44 = __toESM(require("react"), 1);
7564
+ var import_react47 = __toESM(require("react"), 1);
7247
7565
 
7248
7566
  // src/components/games/ui/OptionList.tsx
7249
- var import_jsx_runtime78 = require("react/jsx-runtime");
7567
+ var import_jsx_runtime79 = require("react/jsx-runtime");
7250
7568
  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)) });
7569
+ 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
7570
  }
7253
7571
 
7254
7572
  // src/components/games/BeatTheGridGame.tsx
7255
- var import_jsx_runtime79 = require("react/jsx-runtime");
7573
+ var import_jsx_runtime80 = require("react/jsx-runtime");
7256
7574
  function criterionIconKind(label, key) {
7257
7575
  const l = (key ?? label).toLowerCase();
7258
7576
  if (l.includes("app")) return "calendar";
@@ -7270,34 +7588,34 @@ function rowAbbrev(label, map, key) {
7270
7588
  function CriterionIcon({ kind }) {
7271
7589
  switch (kind) {
7272
7590
  case "calendar":
7273
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(IconCalendar, {});
7591
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(IconCalendar, {});
7274
7592
  case "ball":
7275
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(IconBall, {});
7593
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(IconBall, {});
7276
7594
  case "boot":
7277
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(IconBoot, {});
7595
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(IconBoot, {});
7278
7596
  case "gloves":
7279
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(IconGloves, {});
7597
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(IconGloves, {});
7280
7598
  case "shield":
7281
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(IconShield, {});
7599
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(IconShield, {});
7282
7600
  default:
7283
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(IconFlag, {});
7601
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(IconFlag, {});
7284
7602
  }
7285
7603
  }
7286
7604
  function HeaderVisual({ label, textKey: iKey, meta }) {
7287
7605
  if (!meta) {
7288
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(CriterionIcon, { kind: criterionIconKind(label, iKey) });
7606
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(CriterionIcon, { kind: criterionIconKind(label, iKey) });
7289
7607
  }
7290
7608
  switch (meta.kind) {
7291
7609
  case "club":
7292
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(CrestShield, { src: meta.imageUrl, name: label, size: 24 });
7610
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(CrestShield, { src: meta.imageUrl, name: label, size: 24 });
7293
7611
  case "coach":
7294
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(PlayerAvatar, { name: label, imagePath: meta.imageUrl, className: "ss-g-btg-coach-av" });
7612
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(PlayerAvatar, { name: label, imagePath: meta.imageUrl, className: "ss-g-btg-coach-av" });
7295
7613
  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) });
7614
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "ss-g-btg-hdr-flag", "aria-hidden": "true", children: nationalityFlag(meta.country ?? label) });
7297
7615
  case "position":
7298
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_jsx_runtime79.Fragment, {});
7616
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_jsx_runtime80.Fragment, {});
7299
7617
  default:
7300
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(CriterionIcon, { kind: criterionIconKind(label, iKey) });
7618
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(CriterionIcon, { kind: criterionIconKind(label, iKey) });
7301
7619
  }
7302
7620
  }
7303
7621
  function parseClientState4(json) {
@@ -7332,21 +7650,21 @@ function SearchSheet({
7332
7650
  ui
7333
7651
  }) {
7334
7652
  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)(() => {
7653
+ const [query, setQuery] = (0, import_react47.useState)("");
7654
+ const inputId = (0, import_react47.useId)();
7655
+ const inputRef = (0, import_react47.useRef)(null);
7656
+ (0, import_react47.useEffect)(() => {
7339
7657
  inputRef.current?.focus();
7340
7658
  }, [row, col]);
7341
7659
  const filtered = playerPool.filter(
7342
7660
  (p) => !alreadyFilledIds.has(p.id) && p.name.toLowerCase().includes(query.toLowerCase())
7343
7661
  );
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)(
7662
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "ss-g-btg-sheet", "data-testid": "btg-search-sheet", children: [
7663
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "ss-g-btg-sheet-hdr", children: [
7664
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Chip, { variant: "neutral", children: rowLabel }),
7665
+ /* @__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 }) }),
7666
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Chip, { variant: "accent", children: colLabel }),
7667
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
7350
7668
  "button",
7351
7669
  {
7352
7670
  type: "button",
@@ -7354,12 +7672,12 @@ function SearchSheet({
7354
7672
  "data-testid": "btg-sheet-dismiss",
7355
7673
  "aria-label": s.closeSearch,
7356
7674
  onClick: onDismiss,
7357
- children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(IconClose, {})
7675
+ children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(IconClose, {})
7358
7676
  }
7359
7677
  )
7360
7678
  ] }),
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)(
7679
+ 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: [
7680
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
7363
7681
  SearchField,
7364
7682
  {
7365
7683
  id: inputId,
@@ -7371,16 +7689,16 @@ function SearchSheet({
7371
7689
  inputRef
7372
7690
  }
7373
7691
  ),
7374
- query.length > 0 && filtered.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
7692
+ query.length > 0 && filtered.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
7375
7693
  OptionList,
7376
7694
  {
7377
7695
  label: s.searchLabel(rowLabel, colLabel),
7378
7696
  options: filtered.map((p) => ({
7379
7697
  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 }) })
7698
+ content: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_jsx_runtime80.Fragment, { children: [
7699
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(PlayerAvatar, { name: p.name, imagePath: p.imagePath, className: "ss-g-opt-av" }),
7700
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "ss-g-btg-result-name", children: p.name }),
7701
+ /* @__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
7702
  ] })
7385
7703
  })),
7386
7704
  onPick: (k) => onPick(row, col, Number(k))
@@ -7400,7 +7718,7 @@ function BeatTheGridGame({
7400
7718
  }) {
7401
7719
  const s = ui.games.beatTheGrid;
7402
7720
  const title = gameTitle({ gameId: "beat-the-grid" }, ui.games.titles);
7403
- const [activeCell, setActiveCell] = (0, import_react44.useState)(null);
7721
+ const [activeCell, setActiveCell] = (0, import_react47.useState)(null);
7404
7722
  const clientState = parseClientState4(result?.clientStateJson);
7405
7723
  const filledCells = clientState?.cells ?? [];
7406
7724
  const isLocked2 = result?.alreadyPlayed === true || clientState?.isComplete === true;
@@ -7418,9 +7736,9 @@ function BeatTheGridGame({
7418
7736
  onSubmit(JSON.stringify({ cells: newCells }));
7419
7737
  }
7420
7738
  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 })
7739
+ 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: [
7740
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(GameHeader, { title, eyebrow: s.eyebrow, onBack, backLabel: ui.back }),
7741
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
7424
7742
  ] });
7425
7743
  }
7426
7744
  const rows = config.rows;
@@ -7433,20 +7751,20 @@ function BeatTheGridGame({
7433
7751
  (_, i) => i < correctCount ? "correct" : i < correctCount + wrongCount ? "wrong" : "todo"
7434
7752
  );
7435
7753
  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)(
7754
+ 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: [
7755
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(GameHeader, { title, eyebrow: s.eyebrow, onBack, backLabel: ui.back }),
7756
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
7439
7757
  SegmentProgress,
7440
7758
  {
7441
7759
  segments,
7442
7760
  ariaLabel: s.progressAria(filledCells.length, total),
7443
7761
  leftLabel: s.filled(filledCells.length, total),
7444
7762
  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}` })
7763
+ right: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Chip, { variant: "accent", children: `${totalScore} ${ui.games.unitPts}` })
7446
7764
  }
7447
7765
  ),
7448
- /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "ss-g-body", children: [
7449
- /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
7766
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "ss-g-body", children: [
7767
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
7450
7768
  "div",
7451
7769
  {
7452
7770
  className: activeCell !== null ? "ss-g-btg-grid ss-g-btg-grid--fit" : "ss-g-btg-grid",
@@ -7456,31 +7774,31 @@ function BeatTheGridGame({
7456
7774
  },
7457
7775
  role: "grid",
7458
7776
  children: [
7459
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "ss-g-btg-corner" }),
7777
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "ss-g-btg-corner" }),
7460
7778
  cols.map((col, colIdx) => {
7461
7779
  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 })
7780
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "ss-g-btg-colhdr", "data-meta": colMeta ? "true" : void 0, children: [
7781
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(HeaderVisual, { label: col, textKey: config.colsI18n?.[colIdx]?.key, meta: colMeta }),
7782
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { children: col })
7465
7783
  ] }, col);
7466
7784
  }),
7467
7785
  rows.map((rowLabel, rowIdx) => {
7468
7786
  const rowMeta = config.rowsMeta?.[rowIdx];
7469
7787
  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 })
7788
+ const rowHeaderContent = rowMeta ? /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_jsx_runtime80.Fragment, { children: [
7789
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(HeaderVisual, { label: rowLabel, textKey: config.rowsI18n?.[rowIdx]?.key, meta: rowMeta }),
7790
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { children: rowLabel })
7791
+ ] }) : abbr === rowLabel ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { children: rowLabel }) : /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_jsx_runtime80.Fragment, { children: [
7792
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { "aria-hidden": "true", children: abbr }),
7793
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "ss-g-sr", children: rowLabel })
7476
7794
  ] });
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 }),
7795
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_react47.default.Fragment, { children: [
7796
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "ss-g-btg-rowhdr", "data-meta": rowMeta ? "true" : void 0, children: rowHeaderContent }),
7479
7797
  cols.map((colLabel, colIdx) => {
7480
7798
  const filled = findCellResult(filledCells, rowIdx, colIdx);
7481
7799
  const isActive = activeCell?.row === rowIdx && activeCell?.col === colIdx;
7482
7800
  const state = filled ? filled.isCorrect ? "correct" : "wrong" : isActive ? "active" : "empty";
7483
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
7801
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
7484
7802
  "button",
7485
7803
  {
7486
7804
  type: "button",
@@ -7491,20 +7809,20 @@ function BeatTheGridGame({
7491
7809
  className: "ss-g-btg-cell",
7492
7810
  disabled: isLocked2 || submitting,
7493
7811
  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)(
7812
+ children: filled ? /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_jsx_runtime80.Fragment, { children: [
7813
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
7496
7814
  "span",
7497
7815
  {
7498
7816
  className: `ss-g-btg-badge ss-g-btg-badge--${filled.isCorrect ? "correct" : "wrong"}`,
7499
7817
  role: "img",
7500
7818
  "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 })
7819
+ children: filled.isCorrect ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(IconCheck, { size: 11 }) : /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(IconClose, { size: 11 })
7502
7820
  }
7503
7821
  ),
7504
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "ss-g-btg-rarity", children: filled.rarityScore }),
7822
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "ss-g-btg-rarity", children: filled.rarityScore }),
7505
7823
  (() => {
7506
7824
  const entry = playerPool.find((p) => p.id === filled.playerId);
7507
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
7825
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
7508
7826
  PlayerAvatar,
7509
7827
  {
7510
7828
  name: entry?.name ?? "",
@@ -7513,8 +7831,8 @@ function BeatTheGridGame({
7513
7831
  }
7514
7832
  );
7515
7833
  })(),
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 }) })
7834
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "ss-g-btg-name", children: shortName(playerPool.find((p) => p.id === filled.playerId)?.name) })
7835
+ ] }) : /* @__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
7836
  },
7519
7837
  `cell-${rowIdx}-${colIdx}`
7520
7838
  );
@@ -7524,7 +7842,7 @@ function BeatTheGridGame({
7524
7842
  ]
7525
7843
  }
7526
7844
  ),
7527
- isLocked2 && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
7845
+ isLocked2 && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
7528
7846
  ResultCard,
7529
7847
  {
7530
7848
  tone: "neutral",
@@ -7536,7 +7854,7 @@ function BeatTheGridGame({
7536
7854
  }
7537
7855
  )
7538
7856
  ] }),
7539
- activeCell !== null && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "ss-g-btg-pin", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
7857
+ activeCell !== null && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "ss-g-btg-pin", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
7540
7858
  SearchSheet,
7541
7859
  {
7542
7860
  row: activeCell.row,
@@ -7555,21 +7873,21 @@ function BeatTheGridGame({
7555
7873
  }
7556
7874
 
7557
7875
  // src/components/games/GuessTheXiGame.tsx
7558
- var import_react45 = require("react");
7876
+ var import_react48 = require("react");
7559
7877
 
7560
7878
  // src/components/games/ui/PitchSvg.tsx
7561
- var import_jsx_runtime80 = require("react/jsx-runtime");
7879
+ var import_jsx_runtime81 = require("react/jsx-runtime");
7562
7880
  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" })
7881
+ 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: [
7882
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("rect", { x: "4", y: "4", width: "92", height: variant === "full" ? 142 : 92, fill: "none" }),
7883
+ variant === "full" ? /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
7884
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("line", { x1: "4", y1: "75", x2: "96", y2: "75" }),
7885
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("circle", { cx: "50", cy: "75", r: "12", fill: "none" }),
7886
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("rect", { x: "26", y: "4", width: "48", height: "20", fill: "none" }),
7887
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("rect", { x: "26", y: "126", width: "48", height: "20", fill: "none" })
7888
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
7889
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("path", { d: "M38 4a12 12 0 0 0 24 0", fill: "none" }),
7890
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("rect", { x: "26", y: "76", width: "48", height: "20", fill: "none" })
7573
7891
  ] })
7574
7892
  ] });
7575
7893
  }
@@ -7625,7 +7943,7 @@ function positionsBySlot(formation, rowsAttackFirst) {
7625
7943
  }
7626
7944
 
7627
7945
  // src/components/games/GuessTheXiGame.tsx
7628
- var import_jsx_runtime81 = require("react/jsx-runtime");
7946
+ var import_jsx_runtime82 = require("react/jsx-runtime");
7629
7947
  var MAX_GUESSES2 = 3;
7630
7948
  function parseClientState5(json) {
7631
7949
  if (!json) return null;
@@ -7644,8 +7962,8 @@ function GuessTheXiGame({
7644
7962
  onBack
7645
7963
  }) {
7646
7964
  const t = ui.games.guessTheXi;
7647
- const [query, setQuery] = (0, import_react45.useState)("");
7648
- const inputId = (0, import_react45.useId)();
7965
+ const [query, setQuery] = (0, import_react48.useState)("");
7966
+ const inputId = (0, import_react48.useId)();
7649
7967
  const clientState = parseClientState5(result?.clientStateJson);
7650
7968
  const isOver = result?.alreadyPlayed === true || clientState?.status === "solved" || clientState?.status === "failed";
7651
7969
  const solved = clientState?.status === "solved";
@@ -7675,31 +7993,31 @@ function GuessTheXiGame({
7675
7993
  const wrongGuesses = (clientState?.guessHistory ?? []).filter((g) => !g.wasCorrect);
7676
7994
  const guessesLeft = Math.max(0, MAX_GUESSES2 - (clientState?.guessesUsed ?? 0));
7677
7995
  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)(
7996
+ 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: [
7997
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
7680
7998
  GameHeader,
7681
7999
  {
7682
8000
  title: gameTitle({ gameId: "guess-the-xi" }, ui.games.titles),
7683
8001
  eyebrow: config?.poolLabel,
7684
- right: formation ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Chip, { variant: "accent", children: formation }) : void 0,
8002
+ right: formation ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Chip, { variant: "accent", children: formation }) : void 0,
7685
8003
  onBack,
7686
8004
  backLabel: ui.back
7687
8005
  }
7688
8006
  ),
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) => {
8007
+ !config && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading }),
8008
+ config && /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_jsx_runtime82.Fragment, { children: [
8009
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "ss-g-body", children: [
8010
+ !isOver && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed: clientState?.guessHistory.length ?? 0, ui }),
8011
+ rows.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "ss-g-gxi-pitch", role: "group", "aria-label": t.pitchLabel, children: [
8012
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(PitchSvg, { variant: "full" }),
8013
+ /* @__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
8014
  const posLabel = pos.slot ? posBySlot.get(pos.slot) ?? "" : "";
7697
8015
  const name = pos.slot ? nameBySlot.get(pos.slot) : void 0;
7698
8016
  const lineupEntry = pos.slot ? lineupBySlot.get(pos.slot) : void 0;
7699
8017
  const flag = nationalityFlag(pos.nationality);
7700
8018
  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)(
8019
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "ss-g-gxi-node", "data-revealed": "true", children: [
8020
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
7703
8021
  PlayerAvatar,
7704
8022
  {
7705
8023
  name: lineupEntry.name,
@@ -7707,11 +8025,11 @@ function GuessTheXiGame({
7707
8025
  className: "ss-g-gxi-disc ss-g-gxi-disc--photo"
7708
8026
  }
7709
8027
  ),
7710
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "ss-g-gxi-pos ss-g-gxi-pos--name", children: splitName(lineupEntry.name).last })
8028
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "ss-g-gxi-pos ss-g-gxi-pos--name", children: splitName(lineupEntry.name).last })
7711
8029
  ] }, `${pos.slot}-${c}`);
7712
8030
  }
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)(
8031
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "ss-g-gxi-node", "data-revealed": name ? "true" : void 0, children: [
8032
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
7715
8033
  "span",
7716
8034
  {
7717
8035
  className: "ss-g-gxi-disc",
@@ -7722,22 +8040,22 @@ function GuessTheXiGame({
7722
8040
  children: flag
7723
8041
  }
7724
8042
  ),
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 })
8043
+ 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
8044
  ] }, `${pos.slot}-${c}`);
7727
8045
  }) }, r)) })
7728
8046
  ] }),
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 }),
8047
+ !isOver && wrongGuesses.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "ss-g-gxi-wrong", children: [
8048
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "ss-g-gxi-wrong-l", children: t.notThem }),
7731
8049
  wrongGuesses.map((g) => {
7732
8050
  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) })
8051
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("span", { className: "ss-g-gxi-wrong-chip", children: [
8052
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(CrestShield, { src: crestUrl, name: teamName(g.teamId), size: 18 }),
8053
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("s", { children: teamName(g.teamId) })
7736
8054
  ] }, g.teamId);
7737
8055
  })
7738
8056
  ] }),
7739
- isOver && /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
7740
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
8057
+ isOver && /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_jsx_runtime82.Fragment, { children: [
8058
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
7741
8059
  ResultCard,
7742
8060
  {
7743
8061
  tone: solved ? "win" : failed ? "lose" : "neutral",
@@ -7748,29 +8066,29 @@ function GuessTheXiGame({
7748
8066
  ui
7749
8067
  }
7750
8068
  ),
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 })
8069
+ (solved || failed) && clientState?.answer && /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "ss-g-gxi-answer", "data-testid": "gxi-answer-reveal", children: [
8070
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "ss-g-gxi-answer-label", children: t.theAnswer }),
8071
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(CrestShield, { src: clientState.answer.crestUrl, name: clientState.answer.teamName, size: 32 }),
8072
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "ss-g-gxi-answer-name", children: clientState.answer.teamName })
7755
8073
  ] })
7756
8074
  ] })
7757
8075
  ] }),
7758
- !isOver && /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(FooterBar, { children: [
7759
- query.length > 0 && filtered.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
8076
+ !isOver && /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(FooterBar, { children: [
8077
+ query.length > 0 && filtered.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
7760
8078
  OptionList,
7761
8079
  {
7762
8080
  label: t.optionsLabel,
7763
8081
  options: filtered.map((tm) => ({
7764
8082
  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 })
8083
+ content: /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_jsx_runtime82.Fragment, { children: [
8084
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(CrestShield, { src: tm.crestUrl, name: tm.teamName, size: 28 }),
8085
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { children: tm.teamName })
7768
8086
  ] })
7769
8087
  })),
7770
8088
  onPick: (k) => handlePick(Number(k))
7771
8089
  }
7772
8090
  ),
7773
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
8091
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
7774
8092
  SearchField,
7775
8093
  {
7776
8094
  id: inputId,
@@ -7787,8 +8105,8 @@ function GuessTheXiGame({
7787
8105
  }
7788
8106
 
7789
8107
  // src/components/games/DailyQuizGame.tsx
7790
- var import_react46 = require("react");
7791
- var import_jsx_runtime82 = require("react/jsx-runtime");
8108
+ var import_react49 = require("react");
8109
+ var import_jsx_runtime83 = require("react/jsx-runtime");
7792
8110
  function parseClientState6(json) {
7793
8111
  if (!json) return null;
7794
8112
  try {
@@ -7809,13 +8127,13 @@ function OptionName({ text }) {
7809
8127
  const tokens = base.split(/\s+/).filter(Boolean);
7810
8128
  const isPlainName = tokens.length >= 1 && tokens.length <= 4 && tokens.every((t) => NAME_TOKEN.test(t));
7811
8129
  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 }) });
8130
+ 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
8131
  }
7814
8132
  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 })
8133
+ return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("span", { className: "ss-g-dq-opt-name", children: [
8134
+ first && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "ss-g-dq-opt-first", children: first }),
8135
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "ss-g-dq-opt-last", children: last }),
8136
+ suffix && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "ss-g-dq-opt-suffix", children: suffix })
7819
8137
  ] });
7820
8138
  }
7821
8139
  function DailyQuizGame({
@@ -7828,15 +8146,15 @@ function DailyQuizGame({
7828
8146
  }) {
7829
8147
  const s = ui.games.dailyQuiz;
7830
8148
  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);
8149
+ const [selections, setSelections] = (0, import_react49.useState)(/* @__PURE__ */ new Map());
8150
+ const [page, setPage] = (0, import_react49.useState)(0);
7833
8151
  const clientState = parseClientState6(result?.clientStateJson);
7834
8152
  const results = clientState?.results ?? [];
7835
8153
  const isRevealed = results.length > 0 || result?.alreadyPlayed === true;
7836
8154
  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 })
8155
+ return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-g-screen", "data-game": "daily-quiz", "data-testid": "game-screen-daily-quiz", children: [
8156
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(GameHeader, { title, onBack, backLabel: ui.back }),
8157
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
7840
8158
  ] });
7841
8159
  }
7842
8160
  const questions = config.questions;
@@ -7871,11 +8189,11 @@ function DailyQuizGame({
7871
8189
  return r.isCorrect ? "correct" : "wrong";
7872
8190
  });
7873
8191
  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)(
8192
+ return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-g-screen", "data-game": "daily-quiz", "data-testid": "game-screen-daily-quiz", children: [
8193
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(GameHeader, { title, eyebrow: s.results, onBack, backLabel: ui.back }),
8194
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(SegmentProgress, { segments: segments2, ariaLabel: s.results }),
8195
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-g-body", children: [
8196
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
7879
8197
  ResultCard,
7880
8198
  {
7881
8199
  tone: "neutral",
@@ -7888,15 +8206,15 @@ function DailyQuizGame({
7888
8206
  questions.map((q) => {
7889
8207
  const r = findResult(results, q.index);
7890
8208
  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) => {
8209
+ return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-g-dq-rq", children: [
8210
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "ss-g-dq-rq-stem", children: q.stem }),
8211
+ r && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "ss-g-dq-rq-opts", children: q.options.map((opt, optIdx) => {
7894
8212
  let cls = "ss-g-dq-rq-opt";
7895
8213
  if (optIdx === r.correctOptionIndex) cls += " ss-g-dq-rq-opt--correct";
7896
8214
  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);
8215
+ return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: cls, children: opt }, optIdx);
7898
8216
  }) }),
7899
- r?.revealText && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "ss-g-dq-why", children: r.revealText })
8217
+ r?.revealText && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "ss-g-dq-why", children: r.revealText })
7900
8218
  ] }, q.index);
7901
8219
  })
7902
8220
  ] })
@@ -7904,16 +8222,16 @@ function DailyQuizGame({
7904
8222
  }
7905
8223
  const segments = questions.map((_, i) => i < page ? "done" : i === page ? "current" : "todo");
7906
8224
  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) => {
8225
+ return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-g-screen", "data-game": "daily-quiz", "data-testid": "game-screen-daily-quiz", children: [
8226
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(GameHeader, { title, eyebrow: s.questionOf(page + 1, total), onBack, backLabel: ui.back }),
8227
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(SegmentProgress, { segments, ariaLabel: s.progressAria(page + 1, total) }),
8228
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "ss-g-body", children: current && /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(import_jsx_runtime83.Fragment, { children: [
8229
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("h3", { className: "ss-g-dq-stem", children: current.stem }),
8230
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "ss-g-dq-opts", children: current.options.map((opt, optIdx) => {
7913
8231
  const selected = optIdx === selectedIdx;
7914
8232
  const imagePath = current.optionImagePaths?.[optIdx] ?? void 0;
7915
8233
  const playerName = opt;
7916
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
8234
+ return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
7917
8235
  "button",
7918
8236
  {
7919
8237
  type: "button",
@@ -7922,25 +8240,25 @@ function DailyQuizGame({
7922
8240
  disabled: submitting,
7923
8241
  onClick: () => handleSelect(current.index, optIdx),
7924
8242
  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 })
8243
+ current.optionImagePaths && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(PlayerAvatar, { name: playerName, imagePath, className: "ss-g-dq-opt-av" }),
8244
+ /* @__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) }),
8245
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(OptionName, { text: opt })
7928
8246
  ]
7929
8247
  },
7930
8248
  optIdx
7931
8249
  );
7932
8250
  }) })
7933
8251
  ] }) }),
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 })
8252
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-g-dq-nav", children: [
8253
+ page > 0 && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(GameButton, { variant: "outline", onClick: goPrev, disabled: submitting, children: s.previous }),
8254
+ 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
8255
  ] }) })
7938
8256
  ] });
7939
8257
  }
7940
8258
 
7941
8259
  // src/components/games/MatchdayPredictorGame.tsx
7942
- var import_react47 = require("react");
7943
- var import_jsx_runtime83 = require("react/jsx-runtime");
8260
+ var import_react50 = require("react");
8261
+ var import_jsx_runtime84 = require("react/jsx-runtime");
7944
8262
  var SCORER_SEARCH_THRESHOLD = 9;
7945
8263
  function parseClientState7(json) {
7946
8264
  if (!json) return null;
@@ -7958,7 +8276,7 @@ function isLocked(kickoffUtc) {
7958
8276
  }
7959
8277
  }
7960
8278
  function IconMinus() {
7961
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
8279
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
7962
8280
  "svg",
7963
8281
  {
7964
8282
  width: 18,
@@ -7969,20 +8287,20 @@ function IconMinus() {
7969
8287
  strokeWidth: 2.2,
7970
8288
  strokeLinecap: "round",
7971
8289
  "aria-hidden": "true",
7972
- children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("path", { d: "M5 12h14" })
8290
+ children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("path", { d: "M5 12h14" })
7973
8291
  }
7974
8292
  );
7975
8293
  }
7976
8294
  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 })
8295
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-mp-team", children: [
8296
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(CrestShield, { name: team.name, size: 44 }),
8297
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "ss-g-mp-team-name", children: team.name }),
8298
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "ss-g-mp-team-side", children: label })
7981
8299
  ] });
7982
8300
  }
7983
8301
  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)(
8302
+ const col = (side, team, value) => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-mp-col", children: [
8303
+ edit && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
7986
8304
  "button",
7987
8305
  {
7988
8306
  type: "button",
@@ -7990,11 +8308,11 @@ function ScoreCard({ home, away, h, a, t, edit }) {
7990
8308
  "aria-label": t.goalsUp(team.name),
7991
8309
  disabled: edit.disabled,
7992
8310
  onClick: () => edit.onStep(side, 1),
7993
- children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(IconPlus, { size: 18 })
8311
+ children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(IconPlus, { size: 18 })
7994
8312
  }
7995
8313
  ),
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)(
8314
+ /* @__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 }),
8315
+ edit && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
7998
8316
  "button",
7999
8317
  {
8000
8318
  type: "button",
@@ -8002,27 +8320,27 @@ function ScoreCard({ home, away, h, a, t, edit }) {
8002
8320
  "aria-label": t.goalsDown(team.name),
8003
8321
  disabled: edit.disabled || value <= 0,
8004
8322
  onClick: () => edit.onStep(side, -1),
8005
- children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(IconMinus, {})
8323
+ children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(IconMinus, {})
8006
8324
  }
8007
8325
  )
8008
8326
  ] });
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: [
8327
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-mp-card", children: [
8328
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(TeamBadge, { team: home, label: t.home }),
8329
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-mp-scores", children: [
8012
8330
  col("home", home, h),
8013
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "ss-g-mp-dash", "aria-hidden": "true", children: "\u2013" }),
8331
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "ss-g-mp-dash", "aria-hidden": "true", children: "\u2013" }),
8014
8332
  col("away", away, a)
8015
8333
  ] }),
8016
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(TeamBadge, { team: away, label: t.away })
8334
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(TeamBadge, { team: away, label: t.away })
8017
8335
  ] });
8018
8336
  }
8019
8337
  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
8338
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("li", { className: "ss-g-mp-row", "data-testid": "mp-row", "data-ok": String(ok), children: [
8339
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "ss-g-mp-row-k", children: label }),
8340
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("span", { className: "ss-g-mp-row-v", children: [
8341
+ ok ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(IconCheck, {}) : /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(IconClose, { size: 14 }),
8342
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "ss-g-sr", children: ok ? t.correct : t.incorrect }),
8343
+ detail ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "ss-g-mp-row-d", children: detail }) : null
8026
8344
  ] })
8027
8345
  ] });
8028
8346
  }
@@ -8035,20 +8353,20 @@ function MatchdayPredictorGame({
8035
8353
  onBack
8036
8354
  }) {
8037
8355
  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)();
8356
+ const [homeScore, setHomeScore] = (0, import_react50.useState)(0);
8357
+ const [awayScore, setAwayScore] = (0, import_react50.useState)(0);
8358
+ const [firstScorerPlayerId, setFirstScorerPlayerId] = (0, import_react50.useState)(null);
8359
+ const [lastEdited, setLastEdited] = (0, import_react50.useState)("home");
8360
+ const [query, setQuery] = (0, import_react50.useState)("");
8361
+ const searchId = (0, import_react50.useId)();
8044
8362
  const clientState = parseClientState7(result?.clientStateJson);
8045
8363
  const alreadyPlayed = result?.alreadyPlayed === true;
8046
- const header = /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
8364
+ const header = /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8047
8365
  GameHeader,
8048
8366
  {
8049
8367
  title: gameTitle({ gameId: "matchday-predictor" }, ui.games.titles),
8050
8368
  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,
8369
+ 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
8370
  onBack,
8053
8371
  backLabel: ui.back
8054
8372
  }
@@ -8056,10 +8374,10 @@ function MatchdayPredictorGame({
8056
8374
  if (alreadyPlayed && clientState) {
8057
8375
  if (!clientState.graded) {
8058
8376
  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: [
8377
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
8060
8378
  header,
8061
- /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-g-body", children: [
8062
- config && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
8379
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-body", children: [
8380
+ config && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8063
8381
  ScoreCard,
8064
8382
  {
8065
8383
  home: config.homeTeam,
@@ -8069,7 +8387,7 @@ function MatchdayPredictorGame({
8069
8387
  t
8070
8388
  }
8071
8389
  ),
8072
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
8390
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8073
8391
  ResultCard,
8074
8392
  {
8075
8393
  tone: "neutral",
@@ -8086,28 +8404,28 @@ function MatchdayPredictorGame({
8086
8404
  }
8087
8405
  )
8088
8406
  ] }),
8089
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("p", { className: "ss-g-mp-fun", children: t.forFun }) })
8407
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("p", { className: "ss-g-mp-fun", children: t.forFun }) })
8090
8408
  ] });
8091
8409
  }
8092
8410
  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: [
8411
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
8094
8412
  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 })
8413
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-body", children: [
8414
+ config && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(ScoreCard, { home: config.homeTeam, away: config.awayTeam, h: r.homeScore, a: r.awayScore, t }),
8415
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(ResultCard, { tone: "neutral", title: t.fullTime(r.homeScore, r.awayScore), onBack, ui }),
8416
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("ul", { className: "ss-g-mp-rows", children: [
8417
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(OutcomeRow, { label: t.exactScore, ok: clientState.exactScoreCorrect, t }),
8418
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(OutcomeRow, { label: t.outcome, ok: clientState.outcomeCorrect, t }),
8419
+ !clientState.firstScorerVoid && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(OutcomeRow, { label: t.firstScorerRow, ok: clientState.firstScorerCorrect, detail: r.firstScorerName, t })
8102
8420
  ] })
8103
8421
  ] }),
8104
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("p", { className: "ss-g-mp-fun", children: t.forFun }) })
8422
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("p", { className: "ss-g-mp-fun", children: t.forFun }) })
8105
8423
  ] });
8106
8424
  }
8107
8425
  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: [
8426
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
8109
8427
  header,
8110
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
8428
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
8111
8429
  ] });
8112
8430
  }
8113
8431
  const locked = isLocked(config.kickoffUtc);
@@ -8131,10 +8449,10 @@ function MatchdayPredictorGame({
8131
8449
  const showSearch = pool.length > SCORER_SEARCH_THRESHOLD;
8132
8450
  const q = query.trim().toLowerCase();
8133
8451
  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: [
8452
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
8135
8453
  header,
8136
- /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-g-body", children: [
8137
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
8454
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-body", children: [
8455
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8138
8456
  ScoreCard,
8139
8457
  {
8140
8458
  home: config.homeTeam,
@@ -8145,12 +8463,12 @@ function MatchdayPredictorGame({
8145
8463
  edit: { disabled, active: lastEdited, onStep: step }
8146
8464
  }
8147
8465
  ),
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 })
8466
+ pool.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("section", { className: "ss-g-mp-scorer", children: [
8467
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-mp-sec-head", children: [
8468
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("h3", { children: t.firstScorer }),
8469
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { children: t.optional })
8152
8470
  ] }),
8153
- showSearch && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
8471
+ showSearch && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8154
8472
  SearchField,
8155
8473
  {
8156
8474
  id: searchId,
@@ -8162,9 +8480,9 @@ function MatchdayPredictorGame({
8162
8480
  disabled
8163
8481
  }
8164
8482
  ),
8165
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "ss-g-mp-grid", children: visible.map((p) => {
8483
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "ss-g-mp-grid", children: visible.map((p) => {
8166
8484
  const selected = firstScorerPlayerId === p.playerId;
8167
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
8485
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
8168
8486
  "button",
8169
8487
  {
8170
8488
  type: "button",
@@ -8174,15 +8492,15 @@ function MatchdayPredictorGame({
8174
8492
  disabled,
8175
8493
  onClick: () => setFirstScorerPlayerId((id) => id === p.playerId ? null : p.playerId),
8176
8494
  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 })
8495
+ selected && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "ss-g-mp-pcheck", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(IconCheck, { size: 12 }) }),
8496
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Silhouette, { size: 52, variant: selected ? "selected" : "default" }),
8497
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "ss-g-mp-pname", children: splitName(p.playerName).last })
8180
8498
  ]
8181
8499
  },
8182
8500
  p.playerId
8183
8501
  );
8184
8502
  }) }),
8185
- /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
8503
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
8186
8504
  "button",
8187
8505
  {
8188
8506
  type: "button",
@@ -8191,24 +8509,24 @@ function MatchdayPredictorGame({
8191
8509
  disabled,
8192
8510
  onClick: () => setFirstScorerPlayerId(null),
8193
8511
  children: [
8194
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "ss-g-mp-radio", "aria-hidden": "true" }),
8512
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "ss-g-mp-radio", "aria-hidden": "true" }),
8195
8513
  t.noScorer
8196
8514
  ]
8197
8515
  }
8198
8516
  )
8199
8517
  ] }),
8200
- locked && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("p", { className: "ss-g-mp-closed", children: t.closed })
8518
+ locked && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("p", { className: "ss-g-mp-closed", children: t.closed })
8201
8519
  ] }),
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 })
8520
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(FooterBar, { children: [
8521
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(GameButton, { variant: "primary", block: true, disabled, onClick: handleSubmit, children: submitting ? t.saving : t.save }),
8522
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("p", { className: "ss-g-mp-fun", children: t.forFun })
8205
8523
  ] })
8206
8524
  ] });
8207
8525
  }
8208
8526
 
8209
8527
  // src/components/games/StartingXiGame.tsx
8210
- var import_react48 = require("react");
8211
- var import_jsx_runtime84 = require("react/jsx-runtime");
8528
+ var import_react51 = require("react");
8529
+ var import_jsx_runtime85 = require("react/jsx-runtime");
8212
8530
  var POINTS_PER_STARTER = 8;
8213
8531
  var XI_SIZE = 11;
8214
8532
  var DEFAULT_FORMATION = "4-3-3";
@@ -8251,26 +8569,26 @@ function StartingXiGame({
8251
8569
  lockAtUtc
8252
8570
  }) {
8253
8571
  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)();
8572
+ const [slotPlayers, setSlotPlayers] = (0, import_react51.useState)(() => Array(XI_SIZE).fill(null));
8573
+ const [active, setActive] = (0, import_react51.useState)(0);
8574
+ const [query, setQuery] = (0, import_react51.useState)("");
8575
+ const searchId = (0, import_react51.useId)();
8258
8576
  const clientState = parseClientState8(result?.clientStateJson);
8259
8577
  const alreadyPlayed = result?.alreadyPlayed === true;
8260
- const header = /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8578
+ const header = /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8261
8579
  GameHeader,
8262
8580
  {
8263
8581
  title: gameTitle({ gameId: "starting-xi" }, ui.games.titles),
8264
8582
  eyebrow: t.eyebrow,
8265
- right: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Chip, { variant: "accent", children: t.perStarter(POINTS_PER_STARTER) }),
8583
+ right: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Chip, { variant: "accent", children: t.perStarter(POINTS_PER_STARTER) }),
8266
8584
  onBack,
8267
8585
  backLabel: ui.back
8268
8586
  }
8269
8587
  );
8270
8588
  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: [
8589
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "ss-g-screen", "data-game": "starting-xi", "data-testid": "game-screen-starting-xi", children: [
8272
8590
  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 }) })
8591
+ /* @__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
8592
  ] });
8275
8593
  }
8276
8594
  if (alreadyPlayed) {
@@ -8279,9 +8597,9 @@ function StartingXiGame({
8279
8597
  if (clientState.status === "graded") return statusScreen(t.gradedLine(clientState.correctCount), clientState.score);
8280
8598
  }
8281
8599
  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: [
8600
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "ss-g-screen", "data-game": "starting-xi", "data-testid": "game-screen-starting-xi", children: [
8283
8601
  header,
8284
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
8602
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
8285
8603
  ] });
8286
8604
  }
8287
8605
  const { formation, slots } = formationSlots(config.formation);
@@ -8316,27 +8634,27 @@ function StartingXiGame({
8316
8634
  onSubmit(JSON.stringify({ predictedPlayerIds: slotPlayers }));
8317
8635
  }
8318
8636
  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: [
8637
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "ss-g-screen", "data-game": "starting-xi", "data-testid": "game-screen-starting-xi", children: [
8320
8638
  header,
8321
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8639
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8322
8640
  SegmentProgress,
8323
8641
  {
8324
8642
  segments,
8325
8643
  ariaLabel: t.picked(pickedCount),
8326
8644
  leftLabel: t.picked(pickedCount),
8327
8645
  rightLabel: t.toGo(XI_SIZE - pickedCount),
8328
- right: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Chip, { children: formation })
8646
+ right: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Chip, { children: formation })
8329
8647
  }
8330
8648
  ),
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" }),
8649
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "ss-g-body", children: [
8650
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "ss-g-xi-pitch", children: [
8651
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(PitchSvg, { variant: "half" }),
8334
8652
  slots.map((s) => {
8335
8653
  const playerId = slotPlayers[s.index] ?? null;
8336
8654
  const player = playerId !== null ? byId.get(playerId) ?? null : null;
8337
8655
  const name = player?.playerName ?? "";
8338
8656
  const state = player ? "filled" : active === s.index ? "active" : "empty";
8339
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
8657
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
8340
8658
  "button",
8341
8659
  {
8342
8660
  type: "button",
@@ -8348,21 +8666,21 @@ function StartingXiGame({
8348
8666
  disabled: submitting,
8349
8667
  onClick: () => tapSlot(s.index),
8350
8668
  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 })
8669
+ /* @__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 }) }),
8670
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "ss-g-xi-tag", "aria-hidden": "true", children: player ? splitName(name).last : s.label })
8353
8671
  ]
8354
8672
  },
8355
8673
  s.index
8356
8674
  );
8357
8675
  })
8358
8676
  ] }),
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)(
8677
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "ss-g-xi-picker", children: [
8678
+ /* @__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: [
8679
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Chip, { variant: "badge", children: activeSlot.label }),
8680
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("strong", { children: t.pickFor(activeSlot.label) })
8681
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("strong", { children: t.allPicked }) }),
8682
+ activeSlot && /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_jsx_runtime85.Fragment, { children: [
8683
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8366
8684
  SearchField,
8367
8685
  {
8368
8686
  id: searchId,
@@ -8374,18 +8692,18 @@ function StartingXiGame({
8374
8692
  disabled: submitting
8375
8693
  }
8376
8694
  ),
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 })
8695
+ /* @__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: [
8696
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "ss-g-xi-opt-no", "aria-hidden": "true", children: p.jerseyNumber ?? "" }),
8697
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "ss-g-xi-opt-name", children: p.playerName }),
8698
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "ss-g-xi-opt-pos", children: p.positionName })
8381
8699
  ] }) }, p.playerId)) })
8382
8700
  ] })
8383
8701
  ] })
8384
8702
  ] }),
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, {}),
8703
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(FooterBar, { children: [
8704
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(GameButton, { variant: "primary", block: true, disabled: !canSubmit, onClick: handleSubmit, children: submitting ? t.submitting : t.submit }),
8705
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("p", { className: "ss-g-xi-lock", children: [
8706
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(IconLock, {}),
8389
8707
  lockAtUtc ? t.locksAt(ui.games.formatDayTime(lockAtUtc)) : t.locksSoon
8390
8708
  ] })
8391
8709
  ] })
@@ -8393,8 +8711,8 @@ function StartingXiGame({
8393
8711
  }
8394
8712
 
8395
8713
  // src/components/games/StatLadderGame.tsx
8396
- var import_react49 = require("react");
8397
- var import_jsx_runtime85 = require("react/jsx-runtime");
8714
+ var import_react52 = require("react");
8715
+ var import_jsx_runtime86 = require("react/jsx-runtime");
8398
8716
  function ladderClue(ladder) {
8399
8717
  const mystery = ladder.find((r) => r.rank === 2);
8400
8718
  if (!mystery) return null;
@@ -8416,9 +8734,9 @@ function parseClientState9(json) {
8416
8734
  }
8417
8735
  function NameStack({ name }) {
8418
8736
  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 })
8737
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("span", { className: "ss-g-sl-name", children: [
8738
+ first && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("small", { children: `${first[0]}.` }),
8739
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("b", { children: last })
8422
8740
  ] });
8423
8741
  }
8424
8742
  function StatLadderGame({
@@ -8430,16 +8748,16 @@ function StatLadderGame({
8430
8748
  onBack
8431
8749
  }) {
8432
8750
  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)();
8751
+ const [query, setQuery] = (0, import_react52.useState)("");
8752
+ const [selectedId, setSelectedId] = (0, import_react52.useState)(null);
8753
+ const searchId = (0, import_react52.useId)();
8436
8754
  const clientState = parseClientState9(result?.clientStateJson);
8437
8755
  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 });
8756
+ 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
8757
  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: [
8758
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "ss-g-screen", "data-game": "stat-ladder", "data-testid": "game-screen-stat-ladder", children: [
8441
8759
  header,
8442
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
8760
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
8443
8761
  ] });
8444
8762
  }
8445
8763
  const question = t.question(config.statLabel);
@@ -8451,45 +8769,45 @@ function StatLadderGame({
8451
8769
  if (selectedId === null || submitting || revealed) return;
8452
8770
  onSubmit(JSON.stringify({ guessedPlayerId: selectedId }));
8453
8771
  }
8454
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "ss-g-screen", "data-game": "stat-ladder", "data-testid": "game-screen-stat-ladder", children: [
8772
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "ss-g-screen", "data-game": "stat-ladder", "data-testid": "game-screen-stat-ladder", children: [
8455
8773
  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: [
8774
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "ss-g-body", children: [
8775
+ !revealed && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed: 0, ui }),
8776
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "ss-g-sl-prompt", children: [
8777
+ /* @__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 }),
8778
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("h3", { className: "ss-g-sl-q", children: [
8461
8779
  question.pre,
8462
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("em", { children: question.emph }),
8780
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("em", { children: question.emph }),
8463
8781
  question.post
8464
8782
  ] })
8465
8783
  ] }),
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)(
8784
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("ol", { className: "ss-g-sl-rungs", children: rungs.map(
8785
+ (rung) => rung.rank === 2 ? /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
8468
8786
  "li",
8469
8787
  {
8470
8788
  className: "ss-g-sl-rung ss-g-sl-rung--mystery",
8471
8789
  "data-testid": "sl-mystery-rung",
8472
8790
  "data-result": revealed ? clientState.isCorrect ? "correct" : "wrong" : void 0,
8473
8791
  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 })
8792
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "ss-g-sl-rank", children: "2" }),
8793
+ 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" }),
8794
+ 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 }),
8795
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "ss-g-sl-val ss-g-sl-val--mystery", children: rung.statValue })
8478
8796
  ]
8479
8797
  },
8480
8798
  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 })
8799
+ ) : /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("li", { className: "ss-g-sl-rung", children: [
8800
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "ss-g-sl-rank", children: rung.rank }),
8801
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(PlayerAvatar, { name: rung.playerName ?? "?", className: "ss-g-sl-av" }),
8802
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(NameStack, { name: rung.playerName ?? "?" }),
8803
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "ss-g-sl-val", children: rung.statValue })
8486
8804
  ] }, rung.rank)
8487
8805
  ) }),
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) })
8806
+ clue && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("p", { className: "ss-g-sl-clue", children: [
8807
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(IconBulb, {}),
8808
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { children: t.clue(clue, config.statLabel) })
8491
8809
  ] }),
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)(
8810
+ !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
8811
  "button",
8494
8812
  {
8495
8813
  type: "button",
@@ -8502,13 +8820,13 @@ function StatLadderGame({
8502
8820
  setQuery(p.playerName);
8503
8821
  },
8504
8822
  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, {})
8823
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(PlayerAvatar, { name: p.playerName, className: "ss-g-sl-opt-av" }),
8824
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "ss-g-sl-opt-name", children: p.playerName }),
8825
+ selectedId === p.playerId && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(IconCheck, {})
8508
8826
  ]
8509
8827
  }
8510
8828
  ) }, p.playerId)) }),
8511
- revealed && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8829
+ revealed && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
8512
8830
  ResultCard,
8513
8831
  {
8514
8832
  tone: clientState.isCorrect ? "win" : "lose",
@@ -8519,8 +8837,8 @@ function StatLadderGame({
8519
8837
  }
8520
8838
  )
8521
8839
  ] }),
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)(
8840
+ !revealed && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "ss-g-sl-guess", children: [
8841
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
8524
8842
  SearchField,
8525
8843
  {
8526
8844
  id: searchId,
@@ -8535,13 +8853,13 @@ function StatLadderGame({
8535
8853
  disabled: submitting
8536
8854
  }
8537
8855
  ),
8538
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(GameButton, { variant: "primary", disabled: selectedId === null || submitting, onClick: guess, children: t.guess })
8856
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(GameButton, { variant: "primary", disabled: selectedId === null || submitting, onClick: guess, children: t.guess })
8539
8857
  ] }) })
8540
8858
  ] });
8541
8859
  }
8542
8860
 
8543
8861
  // src/components/games/FanMotmGame.tsx
8544
- var import_jsx_runtime86 = require("react/jsx-runtime");
8862
+ var import_jsx_runtime87 = require("react/jsx-runtime");
8545
8863
  function parseClientState10(json) {
8546
8864
  if (!json) return null;
8547
8865
  try {
@@ -8562,20 +8880,20 @@ function FanMotmGame({
8562
8880
  const clientState = parseClientState10(result?.clientStateJson);
8563
8881
  const alreadyVoted = result?.alreadyPlayed === true;
8564
8882
  const pickedId = clientState?.pickedPlayerId ?? null;
8565
- const header = /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
8883
+ const header = /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
8566
8884
  GameHeader,
8567
8885
  {
8568
8886
  title: t.title,
8569
8887
  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,
8888
+ 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
8889
  onBack,
8572
8890
  backLabel: ui.back
8573
8891
  }
8574
8892
  );
8575
8893
  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: [
8894
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "ss-g-screen", "data-game": "fan-motm", "data-testid": "game-screen-fan-motm", children: [
8577
8895
  header,
8578
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
8896
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
8579
8897
  ] });
8580
8898
  }
8581
8899
  const picked = config.candidates.find((c) => c.playerId === pickedId) ?? null;
@@ -8583,12 +8901,12 @@ function FanMotmGame({
8583
8901
  if (alreadyVoted || submitting) return;
8584
8902
  onSubmit(JSON.stringify({ pickedPlayerId: candidateId }));
8585
8903
  }
8586
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "ss-g-screen", "data-game": "fan-motm", "data-testid": "game-screen-fan-motm", children: [
8904
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "ss-g-screen", "data-game": "fan-motm", "data-testid": "game-screen-fan-motm", children: [
8587
8905
  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) => {
8906
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "ss-g-body", children: [
8907
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("ul", { className: "ss-g-motm-list", children: config.candidates.map((c) => {
8590
8908
  const isVoted = alreadyVoted && pickedId === c.playerId;
8591
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
8909
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
8592
8910
  "button",
8593
8911
  {
8594
8912
  type: "button",
@@ -8597,24 +8915,24 @@ function FanMotmGame({
8597
8915
  disabled: alreadyVoted || submitting,
8598
8916
  onClick: () => handleVote(c.playerId),
8599
8917
  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 })
8918
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(PlayerAvatar, { name: c.playerName, className: "ss-g-motm-av" }),
8919
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "ss-g-motm-name", children: c.playerName }),
8920
+ isVoted && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Chip, { variant: "accent", className: "ss-g-motm-pill", children: t.yourVote })
8603
8921
  ]
8604
8922
  }
8605
8923
  ) }, c.playerId);
8606
8924
  }) }),
8607
- alreadyVoted && picked && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ResultCard, { tone: "neutral", title: t.youVoted(picked.playerName), detail: t.thanks, onBack, ui })
8925
+ alreadyVoted && picked && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(ResultCard, { tone: "neutral", title: t.youVoted(picked.playerName), detail: t.thanks, onBack, ui })
8608
8926
  ] }),
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 })
8927
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(FooterBar, { children: [
8928
+ !alreadyVoted && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("p", { className: "ss-g-motm-foot", children: t.tapToVote }),
8929
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("p", { className: "ss-g-motm-fun", children: t.forFun })
8612
8930
  ] })
8613
8931
  ] });
8614
8932
  }
8615
8933
 
8616
8934
  // src/components/GameScreenHost.tsx
8617
- var import_jsx_runtime87 = require("react/jsx-runtime");
8935
+ var import_jsx_runtime88 = require("react/jsx-runtime");
8618
8936
  var FIXTURE_GAME_IDS = /* @__PURE__ */ new Set([
8619
8937
  "matchday-predictor",
8620
8938
  "starting-xi",
@@ -8638,8 +8956,8 @@ function GameScreenHost({
8638
8956
  ui
8639
8957
  }) {
8640
8958
  const { gameId, fixtureId, gameDay = "", lockAtUtc = null } = selected;
8641
- const [configJson, setConfigJson] = (0, import_react50.useState)(null);
8642
- (0, import_react50.useEffect)(() => {
8959
+ const [configJson, setConfigJson] = (0, import_react53.useState)(null);
8960
+ (0, import_react53.useEffect)(() => {
8643
8961
  setConfigJson(null);
8644
8962
  if (!conversation) return;
8645
8963
  let cancelled = false;
@@ -8662,12 +8980,12 @@ function GameScreenHost({
8662
8980
  fixtureId: fixtureId || void 0,
8663
8981
  locale: ui.games.lang
8664
8982
  });
8665
- (0, import_react50.useEffect)(() => {
8983
+ (0, import_react53.useEffect)(() => {
8666
8984
  if (conversation) hydrate();
8667
8985
  }, [conversation, gameId]);
8668
- const hydrateRef = (0, import_react50.useRef)(hydrate);
8986
+ const hydrateRef = (0, import_react53.useRef)(hydrate);
8669
8987
  hydrateRef.current = hydrate;
8670
- (0, import_react50.useEffect)(() => {
8988
+ (0, import_react53.useEffect)(() => {
8671
8989
  if (!FIXTURE_GAME_IDS.has(gameId)) return;
8672
8990
  if (rawStatus !== "pending") return;
8673
8991
  const timerId = setInterval(() => {
@@ -8690,7 +9008,7 @@ function GameScreenHost({
8690
9008
  function renderScreen() {
8691
9009
  switch (gameId) {
8692
9010
  case "mystery-tiger":
8693
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
9011
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
8694
9012
  MysteryTigerGame,
8695
9013
  {
8696
9014
  ...sharedProps,
@@ -8698,7 +9016,7 @@ function GameScreenHost({
8698
9016
  }
8699
9017
  );
8700
9018
  case "higher-or-lower":
8701
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
9019
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
8702
9020
  HigherOrLowerGame,
8703
9021
  {
8704
9022
  ...sharedProps,
@@ -8706,7 +9024,7 @@ function GameScreenHost({
8706
9024
  }
8707
9025
  );
8708
9026
  case "career-path":
8709
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
9027
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
8710
9028
  CareerPathGame,
8711
9029
  {
8712
9030
  ...sharedProps,
@@ -8715,7 +9033,7 @@ function GameScreenHost({
8715
9033
  );
8716
9034
  case "beat-the-grid": {
8717
9035
  const btgConfig = safeParseConfig(configJson);
8718
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
9036
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
8719
9037
  BeatTheGridGame,
8720
9038
  {
8721
9039
  ...sharedProps,
@@ -8725,7 +9043,7 @@ function GameScreenHost({
8725
9043
  );
8726
9044
  }
8727
9045
  case "guess-the-xi":
8728
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
9046
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
8729
9047
  GuessTheXiGame,
8730
9048
  {
8731
9049
  ...sharedProps,
@@ -8733,7 +9051,7 @@ function GameScreenHost({
8733
9051
  }
8734
9052
  );
8735
9053
  case "daily-quiz":
8736
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
9054
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
8737
9055
  DailyQuizGame,
8738
9056
  {
8739
9057
  ...sharedProps,
@@ -8741,7 +9059,7 @@ function GameScreenHost({
8741
9059
  }
8742
9060
  );
8743
9061
  case "matchday-predictor":
8744
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
9062
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
8745
9063
  MatchdayPredictorGame,
8746
9064
  {
8747
9065
  ...sharedProps,
@@ -8749,7 +9067,7 @@ function GameScreenHost({
8749
9067
  }
8750
9068
  );
8751
9069
  case "starting-xi":
8752
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
9070
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
8753
9071
  StartingXiGame,
8754
9072
  {
8755
9073
  ...sharedProps,
@@ -8757,7 +9075,7 @@ function GameScreenHost({
8757
9075
  }
8758
9076
  );
8759
9077
  case "stat-ladder":
8760
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
9078
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
8761
9079
  StatLadderGame,
8762
9080
  {
8763
9081
  ...sharedProps,
@@ -8765,7 +9083,7 @@ function GameScreenHost({
8765
9083
  }
8766
9084
  );
8767
9085
  case "fan-motm":
8768
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
9086
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
8769
9087
  FanMotmGame,
8770
9088
  {
8771
9089
  ...sharedProps,
@@ -8773,10 +9091,10 @@ function GameScreenHost({
8773
9091
  }
8774
9092
  );
8775
9093
  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 }) });
9094
+ 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
9095
  }
8778
9096
  }
8779
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "ss-w-gscreen", "data-testid": "gscreen", "data-lock-at": lockAtUtc ?? void 0, children: renderScreen() });
9097
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "ss-w-gscreen", "data-testid": "gscreen", "data-lock-at": lockAtUtc ?? void 0, children: renderScreen() });
8780
9098
  }
8781
9099
 
8782
9100
  // src/components/games/ui/fonts.ts
@@ -8793,7 +9111,7 @@ function ensureGamesFonts(doc = document) {
8793
9111
  }
8794
9112
 
8795
9113
  // src/components/GamesPanel.tsx
8796
- var import_jsx_runtime88 = require("react/jsx-runtime");
9114
+ var import_jsx_runtime89 = require("react/jsx-runtime");
8797
9115
  function GamesPanel({
8798
9116
  loggedIn,
8799
9117
  games,
@@ -8802,13 +9120,13 @@ function GamesPanel({
8802
9120
  leaderboard,
8803
9121
  refreshHub
8804
9122
  }) {
8805
- const [selected, setSelected] = (0, import_react51.useState)(null);
8806
- (0, import_react51.useEffect)(() => {
9123
+ const [selected, setSelected] = (0, import_react54.useState)(null);
9124
+ (0, import_react54.useEffect)(() => {
8807
9125
  ensureGamesFonts();
8808
9126
  }, []);
8809
- if (!loggedIn) return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(GamesLoginWall, { ui });
9127
+ if (!loggedIn) return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(GamesLoginWall, { ui });
8810
9128
  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)(
9129
+ 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
9130
  GameScreenHost,
8813
9131
  {
8814
9132
  selected,
@@ -8822,7 +9140,7 @@ function GamesPanel({
8822
9140
  }
8823
9141
  ) });
8824
9142
  }
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)(
9143
+ 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
9144
  GamesHub,
8827
9145
  {
8828
9146
  games,
@@ -8834,10 +9152,10 @@ function GamesPanel({
8834
9152
  }
8835
9153
 
8836
9154
  // src/components/Leaderboard.tsx
8837
- var import_react52 = require("react");
9155
+ var import_react55 = require("react");
8838
9156
 
8839
9157
  // src/components/LeaderboardRow.tsx
8840
- var import_jsx_runtime89 = require("react/jsx-runtime");
9158
+ var import_jsx_runtime90 = require("react/jsx-runtime");
8841
9159
  function formatPoints(n) {
8842
9160
  return n.toLocaleString("en");
8843
9161
  }
@@ -8846,14 +9164,14 @@ function LeaderboardWeeklyRow({
8846
9164
  isMe
8847
9165
  }) {
8848
9166
  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: [
9167
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: `ss-w-lb2-row${isMe ? " ss-w-lb2-row--you" : ""}`, children: [
9168
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("span", { className: rankClass, children: [
8851
9169
  "#",
8852
9170
  row.rank
8853
9171
  ] }),
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: [
9172
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "ss-w-lb2-handle", children: row.handle }),
9173
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "ss-w-lb2-points", children: formatPoints(row.points) }),
9174
+ row.currentStreak > 0 && /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("span", { className: "ss-w-lb2-streak", children: [
8857
9175
  "\u{1F525} ",
8858
9176
  row.currentStreak
8859
9177
  ] })
@@ -8864,18 +9182,18 @@ function LeaderboardAllTimeRow({
8864
9182
  isMe
8865
9183
  }) {
8866
9184
  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: [
9185
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: `ss-w-lb2-row${isMe ? " ss-w-lb2-row--you" : ""}`, children: [
9186
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("span", { className: rankClass, children: [
8869
9187
  "#",
8870
9188
  row.rank
8871
9189
  ] }),
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) })
9190
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "ss-w-lb2-handle", children: row.handle }),
9191
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "ss-w-lb2-points", children: formatPoints(row.allTimePoints) })
8874
9192
  ] });
8875
9193
  }
8876
9194
 
8877
9195
  // src/components/LeaderboardEmpty.tsx
8878
- var import_jsx_runtime90 = require("react/jsx-runtime");
9196
+ var import_jsx_runtime91 = require("react/jsx-runtime");
8879
9197
  function LeaderboardEmpty({
8880
9198
  segment,
8881
9199
  lastWeek,
@@ -8884,48 +9202,48 @@ function LeaderboardEmpty({
8884
9202
  ui
8885
9203
  }) {
8886
9204
  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 })
9205
+ return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "ss-w-lb-empty ss-w-lb-empty--alltime", children: [
9206
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "ss-w-lb-empty-icon", "aria-hidden": "true", children: "\u{1F4CA}" }),
9207
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { className: "ss-w-lb-empty-body", children: ui.leaderboardAllTimeEmpty })
8890
9208
  ] });
8891
9209
  }
8892
9210
  const fresh = lastWeek != null;
8893
9211
  const title = fresh ? ui.leaderboardEmptyFreshTitle : ui.leaderboardEmptyColdTitle;
8894
9212
  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 }) })
9213
+ return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "ss-w-lb-empty", children: [
9214
+ weeklyPrize && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "ss-w-prize", children: [
9215
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "ss-w-prize-icon", "aria-hidden": "true", children: "\u{1F3C6}" }),
9216
+ /* @__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
9217
  ] }),
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 })
9218
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "ss-w-lb-empty-hero", children: [
9219
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "ss-w-lb-empty-icon", "aria-hidden": "true", children: fresh ? "\u{1F3C6}" : "\u{1F3AE}" }),
9220
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("h4", { className: "ss-w-lb-empty-title", children: title }),
9221
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { className: "ss-w-lb-empty-body", children: body }),
9222
+ onPlay && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("button", { type: "button", className: "ss-w-lb-empty-cta", onClick: onPlay, children: ui.leaderboardEmptyCta })
8905
9223
  ] }),
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) })
9224
+ fresh && lastWeek && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "ss-w-lb-last", children: [
9225
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "ss-w-lb-last-label", children: ui.leaderboardLastWeekLabel }),
9226
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "ss-w-lb-last-champ", "aria-hidden": "true", children: "\u{1F947}" }),
9227
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "ss-w-lb-last-handle", children: lastWeek.handle }),
9228
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "ss-w-lb-last-points", children: formatPoints(lastWeek.points) })
8911
9229
  ] })
8912
9230
  ] });
8913
9231
  }
8914
9232
 
8915
9233
  // src/components/Leaderboard.tsx
8916
- var import_jsx_runtime91 = require("react/jsx-runtime");
9234
+ var import_jsx_runtime92 = require("react/jsx-runtime");
8917
9235
  function Leaderboard({
8918
9236
  data,
8919
9237
  ui,
8920
9238
  onPlay
8921
9239
  }) {
8922
- const [segment, setSegment] = (0, import_react52.useState)("weekly");
9240
+ const [segment, setSegment] = (0, import_react55.useState)("weekly");
8923
9241
  const myRow = segment === "weekly" ? data.myWeeklyRow : data.myAllTimeRow;
8924
9242
  const offBoard = myRow !== null && myRow !== void 0 && myRow.rank === -1;
8925
9243
  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)(
9244
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "ss-w-lb2", children: [
9245
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "ss-w-seg", children: [
9246
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
8929
9247
  "button",
8930
9248
  {
8931
9249
  type: "button",
@@ -8935,7 +9253,7 @@ function Leaderboard({
8935
9253
  children: ui.leaderboardThisWeek
8936
9254
  }
8937
9255
  ),
8938
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
9256
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
8939
9257
  "button",
8940
9258
  {
8941
9259
  type: "button",
@@ -8946,7 +9264,7 @@ function Leaderboard({
8946
9264
  }
8947
9265
  )
8948
9266
  ] }),
8949
- isEmpty ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
9267
+ isEmpty ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
8950
9268
  LeaderboardEmpty,
8951
9269
  {
8952
9270
  segment,
@@ -8955,15 +9273,15 @@ function Leaderboard({
8955
9273
  onPlay,
8956
9274
  ui
8957
9275
  }
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)(
9276
+ ) : /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(import_jsx_runtime92.Fragment, { children: [
9277
+ /* @__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
9278
  LeaderboardWeeklyRow,
8961
9279
  {
8962
9280
  row,
8963
9281
  isMe: row.operatorUserId === data.myWeeklyRow?.operatorUserId
8964
9282
  },
8965
9283
  row.operatorUserId
8966
- )) : data.allTimeTop.map((row) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
9284
+ )) : data.allTimeTop.map((row) => /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
8967
9285
  LeaderboardAllTimeRow,
8968
9286
  {
8969
9287
  row,
@@ -8971,18 +9289,18 @@ function Leaderboard({
8971
9289
  },
8972
9290
  row.operatorUserId
8973
9291
  )) }),
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 })
9292
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "ss-w-kitline", children: "\u{1F3BD}" }),
9293
+ 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: [
9294
+ segment === "weekly" && data.myWeeklyRow && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(LeaderboardWeeklyRow, { row: data.myWeeklyRow, isMe: true }),
9295
+ segment === "alltime" && data.myAllTimeRow && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(LeaderboardAllTimeRow, { row: data.myAllTimeRow, isMe: true })
8978
9296
  ] })),
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)) }) }) })
9297
+ 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
9298
  ] })
8981
9299
  ] });
8982
9300
  }
8983
9301
 
8984
9302
  // src/components/LeaderboardPanel.tsx
8985
- var import_jsx_runtime92 = require("react/jsx-runtime");
9303
+ var import_jsx_runtime93 = require("react/jsx-runtime");
8986
9304
  var EMPTY_PAYLOAD = {
8987
9305
  week: "",
8988
9306
  weeklyTop: [],
@@ -8993,19 +9311,19 @@ var EMPTY_PAYLOAD = {
8993
9311
  lastWeek: null
8994
9312
  };
8995
9313
  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 }) });
9314
+ if (!loggedIn) return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(GamesLoginWall, { ui });
9315
+ if (data === null && loading) return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "ss-w-mon-list" });
9316
+ 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
9317
  }
9000
9318
 
9001
9319
  // src/components/PresetSpeedDial.tsx
9002
- var import_react53 = require("react");
9003
- var import_jsx_runtime93 = require("react/jsx-runtime");
9320
+ var import_react56 = require("react");
9321
+ var import_jsx_runtime94 = require("react/jsx-runtime");
9004
9322
  function PresetSpeedDial({ expanded, showDot, strings, onToggle, onOpen, rootRef, buttonRef }) {
9005
- const pillsId = (0, import_react53.useId)();
9323
+ const pillsId = (0, import_react56.useId)();
9006
9324
  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)(
9325
+ return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { ref: rootRef, className: "ss-w-dial", children: [
9326
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
9009
9327
  "button",
9010
9328
  {
9011
9329
  ref: buttonRef,
@@ -9016,36 +9334,36 @@ function PresetSpeedDial({ expanded, showDot, strings, onToggle, onOpen, rootRef
9016
9334
  "aria-label": strings.dialName,
9017
9335
  onClick: onToggle,
9018
9336
  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
9337
+ /* @__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, {}) }),
9338
+ /* @__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, {}) }),
9339
+ showDot && !expanded ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "ss-w-dial-dot", "aria-hidden": "true" }) : null
9022
9340
  ]
9023
9341
  }
9024
9342
  ),
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 })
9343
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { id: pillsId, className: "ss-w-dial-pills", "data-open": expanded ? "" : void 0, children: [
9344
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("button", { type: "button", className: "ss-w-dial-pill", tabIndex, onClick: () => onOpen("numbers"), children: [
9345
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(SlidersIcon, {}),
9346
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "ss-w-dial-pill-label", children: strings.setNumbers })
9029
9347
  ] }),
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 })
9348
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("button", { type: "button", className: "ss-w-dial-pill", tabIndex, onClick: () => onOpen("combo"), children: [
9349
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(ComboIcon, {}),
9350
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "ss-w-dial-pill-label", children: strings.buildCombo })
9033
9351
  ] })
9034
9352
  ] })
9035
9353
  ] });
9036
9354
  }
9037
9355
 
9038
9356
  // src/components/PresetTools.tsx
9039
- var import_react54 = require("react");
9040
- var import_jsx_runtime94 = require("react/jsx-runtime");
9357
+ var import_react57 = require("react");
9358
+ var import_jsx_runtime95 = require("react/jsx-runtime");
9041
9359
  var FOCUSABLE = 'button:not([disabled]), [href], input:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
9042
9360
  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)(() => {
9361
+ const dialogRef = (0, import_react57.useRef)(null);
9362
+ const titleId = (0, import_react57.useId)();
9363
+ (0, import_react57.useEffect)(() => {
9046
9364
  dialogRef.current?.focus();
9047
9365
  }, []);
9048
- (0, import_react54.useEffect)(() => {
9366
+ (0, import_react57.useEffect)(() => {
9049
9367
  const onKey = (e) => {
9050
9368
  if (e.key !== "Escape") return;
9051
9369
  e.stopPropagation();
@@ -9075,79 +9393,79 @@ function PresetToolModal({ title, closeLabel, onClose, children, footer }) {
9075
9393
  first.focus();
9076
9394
  }
9077
9395
  };
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, {}) })
9396
+ 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: [
9397
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "ss-w-tool-head", children: [
9398
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("h2", { id: titleId, className: "ss-w-tool-title", children: title }),
9399
+ /* @__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
9400
  ] }),
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
9401
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "ss-w-tool-body", children }),
9402
+ footer ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "ss-w-tool-foot", children: footer }) : null
9085
9403
  ] }) });
9086
9404
  }
9087
9405
  function fillTemplate(template, slots) {
9088
9406
  return template.split(/(\{[a-z]+\})/).filter((part) => part !== "").map((part, i) => {
9089
9407
  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);
9408
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react57.Fragment, { children: key !== void 0 && key in slots ? slots[key] : part }, i);
9091
9409
  });
9092
9410
  }
9093
9411
  function NumberSelect({ current, choices: choices2, label, notToday, lockEmpty = true, onChoose }) {
9094
9412
  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) => {
9413
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("span", { className: "ss-w-tool-num", children: [
9414
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "ss-w-tool-num-size", "aria-hidden": "true", children: current }),
9415
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("select", { className: "ss-w-tool-num-select", "aria-label": label, value: String(selected), onChange: (e) => {
9098
9416
  const c = choices2[Number(e.target.value)];
9099
9417
  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)) })
9418
+ }, 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
9419
  ] });
9102
9420
  }
9103
9421
  function ChoiceSelect({ currentIdx, sizeLabels, optionLabels, label, onChoose }) {
9104
9422
  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)) })
9423
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("span", { className: "ss-w-tool-num", children: [
9424
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "ss-w-tool-num-size", "aria-hidden": "true", children: sizeText }),
9425
+ /* @__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
9426
  ] });
9109
9427
  }
9110
9428
  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 });
9429
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("button", { type: "button", className: "ss-w-tool-send", "aria-label": `${label}: ${display}`, disabled, onClick, children: label });
9112
9430
  }
9113
9431
  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: [
9432
+ 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: [
9433
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("span", { className: "ss-w-tool-pick-match", children: [
9116
9434
  p.homeTeamName,
9117
9435
  " \u2013 ",
9118
9436
  p.awayTeamName
9119
9437
  ] }),
9120
- /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("span", { className: "ss-w-tool-pick-sel", children: [
9438
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("span", { className: "ss-w-tool-pick-sel", children: [
9121
9439
  p.marketLabel,
9122
9440
  ": ",
9123
9441
  p.selectionLabel,
9124
9442
  p.line ? ` ${p.line}` : ""
9125
9443
  ] }),
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) })
9444
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "ss-w-tool-pick-kick", children: formatKickoff(p.kickoffUtc) }),
9445
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "ss-w-tool-pick-price", children: p.price.toFixed(2) })
9128
9446
  ] }, p.matchOddsId)) });
9129
9447
  }
9130
9448
  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 })
9449
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(import_jsx_runtime95.Fragment, { children: [
9450
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(PickList, { picks: cell.combo.legs, formatKickoff }),
9451
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "ss-w-tool-math", children: cell.combo.multiplication })
9134
9452
  ] });
9135
9453
  }
9136
9454
  function Unavailable({ text }) {
9137
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: "ss-w-tool-unavailable", children: text });
9455
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("p", { className: "ss-w-tool-unavailable", children: text });
9138
9456
  }
9139
9457
  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
9458
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("section", { className: "ss-w-tool-row ss-w-tool-row--ask", children: [
9459
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "ss-w-tool-icon", "aria-hidden": "true", children: icon }),
9460
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "ss-w-tool-main", children: [
9461
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("p", { className: "ss-w-tool-ask", children: ask }),
9462
+ ready ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "ss-w-tool-ready", children: ready }) : null
9145
9463
  ] }),
9146
9464
  send
9147
9465
  ] });
9148
9466
  }
9149
9467
  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, {}) });
9468
+ 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
9469
  }
9152
9470
  var BIG_COMBO = { total: 50, legs: 6 };
9153
9471
  function SetNumbersTool({ grid, strings, streaming, onSend, onClose }) {
@@ -9156,15 +9474,15 @@ function SetNumbersTool({ grid, strings, streaming, onSend, onClose }) {
9156
9474
  const totals = comboTotals(grid);
9157
9475
  const legChoices = comboLegChoices(grid);
9158
9476
  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)("");
9477
+ const [maxPrice, setMaxPrice] = (0, import_react57.useState)(() => startSingles(grid.singles, limits, START.maxPrice, count));
9478
+ const [minPrice, setMinPrice] = (0, import_react57.useState)(() => startSingles(grid.singlesFrom, floors, START.minPrice, count));
9479
+ const [start] = (0, import_react57.useState)(() => startCombo(grid, totals, legChoices, START.comboTotal, START.comboLegs));
9480
+ const [total, setTotal] = (0, import_react57.useState)(start.total);
9481
+ const [legs, setLegs] = (0, import_react57.useState)(start.legs);
9482
+ const [bigStart] = (0, import_react57.useState)(() => startCombo(grid, totals, legChoices, BIG_COMBO.total, BIG_COMBO.legs));
9483
+ const [bigTotal, setBigTotal] = (0, import_react57.useState)(bigStart.total);
9484
+ const [bigLegs, setBigLegs] = (0, import_react57.useState)(bigStart.legs);
9485
+ const [announcement, setAnnouncement] = (0, import_react57.useState)("");
9168
9486
  const maxCell = findSingles(grid.singles, maxPrice, count);
9169
9487
  const minCell = findSingles(grid.singlesFrom, minPrice, count);
9170
9488
  const comboCell = findCombo(grid, total, legs);
@@ -9208,95 +9526,95 @@ function SetNumbersTool({ grid, strings, streaming, onSend, onClose }) {
9208
9526
  const totalChoices = totals.map((v) => ({ value: v, text: v.toFixed(1), available: legChoices.some((n) => !!findCombo(grid, v, n)) }));
9209
9527
  const legChoicesFor = (t) => legChoices.map((n) => ({ value: n, text: String(n), available: !!findCombo(grid, t, n) }));
9210
9528
  const markets = grid.markets ?? [];
9211
- const [marketIdx, setMarketIdx] = (0, import_react54.useState)(0);
9529
+ const [marketIdx, setMarketIdx] = (0, import_react57.useState)(0);
9212
9530
  const marketCell = markets[marketIdx] ?? null;
9213
9531
  const marketLabels = markets.map((c) => strings.marketShort(c.marketDeveloperName, c.marketLabel, c.selectionLabel ?? null));
9214
9532
  const singlesReady = (cell) => cell ? strings.readyCount(cell.picks.length) : strings.unavailable;
9215
9533
  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)(
9534
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(PresetToolModal, { title: strings.setNumbers, closeLabel: strings.close, onClose, children: [
9535
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
9218
9536
  AskRow,
9219
9537
  {
9220
9538
  icon: "\u{1F3AF}",
9221
9539
  ask: fillTemplate(strings.maxPriceRow, {
9222
9540
  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 })
9541
+ price: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(NumberSelect, { current: maxPrice.toFixed(2), choices: maxChoices, label: strings.maxPriceName, notToday: strings.notToday, onChoose: chooseMax })
9224
9542
  }),
9225
9543
  ready: singlesReady(maxCell),
9226
- send: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(RoundSend, { label: strings.send, display: strings.maxPriceDisplay(count, maxPrice), disabled: !maxCell || streaming, onClick: () => {
9544
+ send: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(RoundSend, { label: strings.send, display: strings.maxPriceDisplay(count, maxPrice), disabled: !maxCell || streaming, onClick: () => {
9227
9545
  if (maxCell) onSend(maxPriceAsk(maxCell, strings));
9228
9546
  } })
9229
9547
  }
9230
9548
  ),
9231
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
9549
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
9232
9550
  AskRow,
9233
9551
  {
9234
9552
  icon: "\u{1F4C8}",
9235
9553
  ask: fillTemplate(strings.minPriceRow, {
9236
9554
  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 })
9555
+ price: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(NumberSelect, { current: minPrice.toFixed(2), choices: minChoices, label: strings.minPriceName, notToday: strings.notToday, onChoose: chooseMin })
9238
9556
  }),
9239
9557
  ready: singlesReady(minCell),
9240
- send: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(RoundSend, { label: strings.send, display: strings.minPriceDisplay(count, minPrice), disabled: !minCell || streaming, onClick: () => {
9558
+ send: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(RoundSend, { label: strings.send, display: strings.minPriceDisplay(count, minPrice), disabled: !minCell || streaming, onClick: () => {
9241
9559
  if (minCell) onSend(minPriceAsk(minCell, strings));
9242
9560
  } })
9243
9561
  }
9244
9562
  ),
9245
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
9563
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
9246
9564
  AskRow,
9247
9565
  {
9248
9566
  icon: "\u2728",
9249
9567
  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 })
9568
+ legs: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(NumberSelect, { current: String(legs), choices: legChoicesFor(total), label: strings.matchesLabel, notToday: strings.notToday, lockEmpty: false, onChoose: chooseLegs }),
9569
+ total: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(NumberSelect, { current: total.toFixed(1), choices: totalChoices, label: strings.totalLabel, notToday: strings.notToday, onChoose: chooseTotal })
9252
9570
  }),
9253
9571
  ready: comboReady(comboCell),
9254
- send: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(RoundSend, { label: strings.send, display: strings.comboDisplay(legs, total), disabled: !comboCell || streaming, onClick: () => {
9572
+ send: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(RoundSend, { label: strings.send, display: strings.comboDisplay(legs, total), disabled: !comboCell || streaming, onClick: () => {
9255
9573
  if (comboCell) onSend(comboAsk(comboCell, strings));
9256
9574
  } })
9257
9575
  }
9258
9576
  ),
9259
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
9577
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
9260
9578
  AskRow,
9261
9579
  {
9262
9580
  icon: "\u{1F3C6}",
9263
9581
  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 })
9582
+ legs: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(NumberSelect, { current: String(bigLegs), choices: legChoicesFor(bigTotal), label: strings.matchesLabel, notToday: strings.notToday, lockEmpty: false, onChoose: chooseBigLegs }),
9583
+ total: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(NumberSelect, { current: bigTotal.toFixed(1), choices: totalChoices, label: strings.totalLabel, notToday: strings.notToday, onChoose: chooseBigTotal })
9266
9584
  }),
9267
9585
  ready: comboReady(bigCell),
9268
- send: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(RoundSend, { label: strings.send, display: strings.comboDisplay(bigLegs, bigTotal), disabled: !bigCell || streaming, onClick: () => {
9586
+ send: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(RoundSend, { label: strings.send, display: strings.comboDisplay(bigLegs, bigTotal), disabled: !bigCell || streaming, onClick: () => {
9269
9587
  if (bigCell) onSend(comboAsk(bigCell, strings));
9270
9588
  } })
9271
9589
  }
9272
9590
  ),
9273
- markets.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
9591
+ markets.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
9274
9592
  AskRow,
9275
9593
  {
9276
9594
  icon: "\u26BD",
9277
9595
  ask: fillTemplate(strings.marketRow, {
9278
- market: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(ChoiceSelect, { currentIdx: marketIdx, sizeLabels: marketLabels, optionLabels: marketLabels, label: strings.marketName, onChoose: chooseMarket })
9596
+ market: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ChoiceSelect, { currentIdx: marketIdx, sizeLabels: marketLabels, optionLabels: marketLabels, label: strings.marketName, onChoose: chooseMarket })
9279
9597
  }),
9280
9598
  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: () => {
9599
+ send: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(RoundSend, { label: strings.send, display: marketCell ? marketDisplay(marketCell, strings) : "", disabled: !marketCell || streaming, onClick: () => {
9282
9600
  if (marketCell) onSend(marketAsk(marketCell, strings));
9283
9601
  } })
9284
9602
  }
9285
9603
  ),
9286
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: "ss-w-vh", "aria-live": "polite", children: announcement })
9604
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("p", { className: "ss-w-vh", "aria-live": "polite", children: announcement })
9287
9605
  ] });
9288
9606
  }
9289
9607
  function BuildComboTool({ grid, strings, streaming, formatKickoff, initialTotal, initialLegs, onSend, onClose }) {
9290
9608
  const totals = comboTotals(grid);
9291
9609
  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)(() => {
9610
+ const [start] = (0, import_react57.useState)(() => initialTotal === void 0 ? startCombo(grid, totals, legChoices, START.comboTotal, START.comboLegs) : null);
9611
+ const [total, setTotal] = (0, import_react57.useState)(() => initialTotal !== void 0 ? nearest(totals, initialTotal) : start.total);
9612
+ const [legs, setLegs] = (0, import_react57.useState)(() => {
9295
9613
  if (initialTotal === void 0) return initialLegs !== void 0 ? clampLegs(legChoices, initialLegs) : start.legs;
9296
9614
  const from = initialLegs !== void 0 ? clampLegs(legChoices, initialLegs) : startValue(legChoices, START.comboLegs);
9297
9615
  return legsForTotal(grid, nearest(totals, initialTotal), from);
9298
9616
  });
9299
- const [announcement, setAnnouncement] = (0, import_react54.useState)("");
9617
+ const [announcement, setAnnouncement] = (0, import_react57.useState)("");
9300
9618
  const cell = findCombo(grid, total, legs);
9301
9619
  const minLegs = legChoices[0] ?? legs;
9302
9620
  const maxLegs = legChoices[legChoices.length - 1] ?? legs;
@@ -9307,29 +9625,29 @@ function BuildComboTool({ grid, strings, streaming, formatKickoff, initialTotal,
9307
9625
  const d = strings.comboDisplay(nextLegs, nextTotal);
9308
9626
  setAnnouncement(findCombo(grid, nextTotal, nextLegs) ? d : `${d}. ${strings.unavailable}`);
9309
9627
  };
9310
- const footer = /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(SendButton, { label: strings.send, display, disabled: !cell || streaming, onClick: () => {
9628
+ const footer = /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(SendButton, { label: strings.send, display, disabled: !cell || streaming, onClick: () => {
9311
9629
  if (cell) onSend(comboAsk(cell, strings));
9312
9630
  } });
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)) })
9631
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(PresetToolModal, { title: strings.buildCombo, closeLabel: strings.close, onClose, footer, children: [
9632
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "ss-w-tool-section", role: "group", "aria-label": strings.totalLabel, children: [
9633
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "ss-w-tool-label", "aria-hidden": "true", children: strings.totalLabel }),
9634
+ /* @__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
9635
  ] }),
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: "+" })
9636
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "ss-w-tool-section", role: "group", "aria-label": strings.matchesLabel, children: [
9637
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "ss-w-tool-label", "aria-hidden": "true", children: strings.matchesLabel }),
9638
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "ss-w-tool-stepper", children: [
9639
+ /* @__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" }),
9640
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "ss-w-tool-count", children: legs }),
9641
+ /* @__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
9642
  ] })
9325
9643
  ] }),
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 })
9644
+ cell ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ComboPreview, { cell, formatKickoff }) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Unavailable, { text: strings.unavailable }),
9645
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("p", { className: "ss-w-vh", "aria-live": "polite", children: announcement })
9328
9646
  ] });
9329
9647
  }
9330
9648
 
9331
9649
  // src/usePresetDial.ts
9332
- var import_react55 = require("react");
9650
+ var import_react58 = require("react");
9333
9651
  function sendInFlight(messages, isStreaming) {
9334
9652
  const last = messages[messages.length - 1];
9335
9653
  return isStreaming && !!last && last.role === "assistant" && !last.done && !last.isGreeting;
@@ -9343,25 +9661,25 @@ function lastUserId(messages) {
9343
9661
  }
9344
9662
  var SCROLL_KEYS = /* @__PURE__ */ new Set(["ArrowUp", "ArrowDown", "PageUp", "PageDown", "Home", "End", " "]);
9345
9663
  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), []);
9664
+ const [expanded, setExpanded] = (0, import_react58.useState)(() => !sendInFlight(messages, isStreaming));
9665
+ const fold = (0, import_react58.useCallback)(() => setExpanded(false), []);
9666
+ const toggle = (0, import_react58.useCallback)(() => setExpanded((e) => !e), []);
9349
9667
  const currentUserId = lastUserId(messages);
9350
- const userIdRef = (0, import_react55.useRef)(currentUserId);
9351
- (0, import_react55.useEffect)(() => {
9668
+ const userIdRef = (0, import_react58.useRef)(currentUserId);
9669
+ (0, import_react58.useEffect)(() => {
9352
9670
  if (currentUserId === userIdRef.current) return;
9353
9671
  userIdRef.current = currentUserId;
9354
9672
  setExpanded(false);
9355
9673
  }, [currentUserId]);
9356
- const tabRef = (0, import_react55.useRef)(activeTab);
9357
- (0, import_react55.useEffect)(() => {
9674
+ const tabRef = (0, import_react58.useRef)(activeTab);
9675
+ (0, import_react58.useEffect)(() => {
9358
9676
  if (activeTab === tabRef.current) return;
9359
9677
  tabRef.current = activeTab;
9360
9678
  setExpanded(false);
9361
9679
  }, [activeTab]);
9362
- const expandedRef = (0, import_react55.useRef)(expanded);
9680
+ const expandedRef = (0, import_react58.useRef)(expanded);
9363
9681
  expandedRef.current = expanded;
9364
- (0, import_react55.useEffect)(() => {
9682
+ (0, import_react58.useEffect)(() => {
9365
9683
  const onEscape = (e) => {
9366
9684
  const dial = dialRef.current;
9367
9685
  if (e.key !== "Escape" || !dial || !e.composedPath().includes(dial)) return;
@@ -9374,7 +9692,7 @@ function usePresetDial({ layerRef, dialRef, dialButtonRef, messages, isStreaming
9374
9692
  window.addEventListener("keydown", onEscape, true);
9375
9693
  return () => window.removeEventListener("keydown", onEscape, true);
9376
9694
  }, [dialRef, dialButtonRef]);
9377
- (0, import_react55.useEffect)(() => {
9695
+ (0, import_react58.useEffect)(() => {
9378
9696
  if (!expanded) return;
9379
9697
  const layer = layerRef.current;
9380
9698
  const inDial = (e) => {
@@ -9426,11 +9744,11 @@ function markToolSeen() {
9426
9744
  }
9427
9745
 
9428
9746
  // src/components/ChatPanel.tsx
9429
- var import_jsx_runtime95 = require("react/jsx-runtime");
9747
+ var import_jsx_runtime96 = require("react/jsx-runtime");
9430
9748
  var FULLSCREEN_QUERY = "(max-width: 639px)";
9431
9749
  function useIsModal() {
9432
- const [modal, setModal] = (0, import_react56.useState)(false);
9433
- (0, import_react56.useEffect)(() => {
9750
+ const [modal, setModal] = (0, import_react59.useState)(false);
9751
+ (0, import_react59.useEffect)(() => {
9434
9752
  if (typeof window === "undefined" || typeof window.matchMedia !== "function") return;
9435
9753
  const mql = window.matchMedia(FULLSCREEN_QUERY);
9436
9754
  const sync = () => setModal(mql.matches);
@@ -9444,7 +9762,7 @@ var HIDDEN_LAYER_STYLE = { position: "absolute", inset: 0, visibility: "hidden",
9444
9762
  function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, gamesResult, leaderboardResult, loggedIn, conversation, presetGrid }) {
9445
9763
  const { state, close, stop, send, reset } = controller;
9446
9764
  const isModal = useIsModal();
9447
- (0, import_react56.useEffect)(() => {
9765
+ (0, import_react59.useEffect)(() => {
9448
9766
  const onKey = (e) => {
9449
9767
  if (e.key === "Escape") close();
9450
9768
  };
@@ -9460,19 +9778,19 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
9460
9778
  monitor?.setActiveTab("chat");
9461
9779
  send(text, { grounding });
9462
9780
  };
9463
- (0, import_react56.useEffect)(() => {
9781
+ (0, import_react59.useEffect)(() => {
9464
9782
  if (monitor && monitor.activeTab !== "chat" && state.isStreaming) monitor.markChatActivity();
9465
9783
  }, [monitor, state.isStreaming, state.messages.length]);
9466
9784
  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);
9785
+ const layerRef = (0, import_react59.useRef)(null);
9786
+ const dialRef = (0, import_react59.useRef)(null);
9787
+ const dialButtonRef = (0, import_react59.useRef)(null);
9788
+ const inputRef = (0, import_react59.useRef)(null);
9789
+ const limitRef = (0, import_react59.useRef)(null);
9790
+ const typedSendRef = (0, import_react59.useRef)(false);
9791
+ const focusAfterCloseRef = (0, import_react59.useRef)(null);
9792
+ const [tool, setTool] = (0, import_react59.useState)(null);
9793
+ const [toolSeen, setToolSeen] = (0, import_react59.useState)(readToolSeen);
9476
9794
  const dial = usePresetDial({
9477
9795
  layerRef,
9478
9796
  dialRef,
@@ -9484,53 +9802,53 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
9484
9802
  const { fold } = dial;
9485
9803
  const paused = isPaused(state.limit);
9486
9804
  const showDial = !!presetGrid && onChatTab && !tool && !paused;
9487
- (0, import_react56.useEffect)(() => {
9805
+ (0, import_react59.useEffect)(() => {
9488
9806
  if (paused) setTool(null);
9489
9807
  }, [paused]);
9490
- (0, import_react56.useEffect)(() => {
9808
+ (0, import_react59.useEffect)(() => {
9491
9809
  if (!paused) return;
9492
9810
  if (typedSendRef.current) limitRef.current?.focus();
9493
9811
  typedSendRef.current = false;
9494
9812
  }, [paused]);
9495
- const openTool = (0, import_react56.useCallback)((next) => {
9813
+ const openTool = (0, import_react59.useCallback)((next) => {
9496
9814
  fold();
9497
9815
  markToolSeen();
9498
9816
  setToolSeen(true);
9499
9817
  setTool(next);
9500
9818
  }, [fold]);
9501
- const onPill = (0, import_react56.useCallback)((kind) => openTool(kind === "numbers" ? { kind: "numbers" } : { kind: "combo" }), [openTool]);
9502
- const toolsValue = (0, import_react56.useMemo)(
9819
+ const onPill = (0, import_react59.useCallback)((kind) => openTool(kind === "numbers" ? { kind: "numbers" } : { kind: "combo" }), [openTool]);
9820
+ const toolsValue = (0, import_react59.useMemo)(
9503
9821
  () => presetGrid && !paused ? { openBuilder: (total, legs) => openTool({ kind: "combo", total, legs }), changeLabel: ui.presets.changeCombo } : null,
9504
9822
  [presetGrid, paused, openTool, ui.presets.changeCombo]
9505
9823
  );
9506
- const closeTool = (0, import_react56.useCallback)(() => {
9824
+ const closeTool = (0, import_react59.useCallback)(() => {
9507
9825
  focusAfterCloseRef.current = "dial";
9508
9826
  setTool(null);
9509
9827
  }, []);
9510
- const sendAsk = (0, import_react56.useCallback)((ask) => {
9828
+ const sendAsk = (0, import_react59.useCallback)((ask) => {
9511
9829
  focusAfterCloseRef.current = "composer";
9512
9830
  setTool(null);
9513
9831
  monitor?.setActiveTab("chat");
9514
9832
  send(ask.message, { displayText: ask.displayText, preset: ask.preset });
9515
9833
  }, [monitor, send]);
9516
- const formatKickoff = (0, import_react56.useCallback)((kickoffUtc) => {
9834
+ const formatKickoff = (0, import_react59.useCallback)((kickoffUtc) => {
9517
9835
  const k = ui.bettingKickoff(kickoffUtc);
9518
9836
  return `${k.dayLabel} ${k.time}`;
9519
9837
  }, [ui]);
9520
- (0, import_react56.useEffect)(() => {
9838
+ (0, import_react59.useEffect)(() => {
9521
9839
  if (tool) return;
9522
9840
  const target = focusAfterCloseRef.current;
9523
9841
  focusAfterCloseRef.current = null;
9524
9842
  if (target === "dial") dialButtonRef.current?.focus();
9525
9843
  else if (target === "composer") inputRef.current?.focus();
9526
9844
  }, [tool]);
9527
- (0, import_react56.useEffect)(() => {
9845
+ (0, import_react59.useEffect)(() => {
9528
9846
  if (!tool || onChatTab && presetGrid) return;
9529
9847
  focusAfterCloseRef.current = "composer";
9530
9848
  setTool(null);
9531
9849
  }, [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)(
9850
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "ss-w-panel", role: "dialog", "aria-modal": isModal, "aria-label": ui.chatDialogLabel, children: [
9851
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
9534
9852
  ChatHeader,
9535
9853
  {
9536
9854
  onClose: close,
@@ -9543,7 +9861,7 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
9543
9861
  moreOptionsLabel: ui.moreOptions
9544
9862
  }
9545
9863
  ),
9546
- monitor && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
9864
+ monitor && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
9547
9865
  TabBar,
9548
9866
  {
9549
9867
  monitor,
@@ -9555,9 +9873,9 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
9555
9873
  gamesEnabled: gamesResult?.enabled ?? false
9556
9874
  }
9557
9875
  ),
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)(
9876
+ /* @__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: [
9877
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(PresetToolsContext.Provider, { value: toolsValue, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(MessageList, { controller, ui, slip, onDashboardTap, monitor }) }),
9878
+ showDial ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
9561
9879
  PresetSpeedDial,
9562
9880
  {
9563
9881
  expanded: dial.expanded,
@@ -9569,12 +9887,12 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
9569
9887
  buttonRef: dialButtonRef
9570
9888
  }
9571
9889
  ) : 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
9890
+ 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
9891
  ] }),
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)(
9892
+ monitor && discovery && monitor.activeTab === "today" && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(TodayPanel, { discovery, ui, monitor }),
9893
+ monitor && monitor.activeTab === "following" && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(MatchesPanel, { monitor, ui, slip, onAsk: paused ? void 0 : handleAsk }),
9894
+ monitor && monitor.activeTab === "odds" && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(OddsPanel, { monitor, ui, slip }),
9895
+ monitor && monitor.activeTab === "games" && gamesResult && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
9578
9896
  GamesPanel,
9579
9897
  {
9580
9898
  loggedIn: !!loggedIn,
@@ -9588,7 +9906,7 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
9588
9906
  }
9589
9907
  }
9590
9908
  ),
9591
- monitor && monitor.activeTab === "leaderboard" && leaderboardResult && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
9909
+ monitor && monitor.activeTab === "leaderboard" && leaderboardResult && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
9592
9910
  LeaderboardPanel,
9593
9911
  {
9594
9912
  loggedIn: !!loggedIn,
@@ -9598,9 +9916,9 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
9598
9916
  ui
9599
9917
  }
9600
9918
  ),
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)(
9919
+ (!monitor || monitor.activeTab !== "games" && monitor.activeTab !== "leaderboard") && /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(import_jsx_runtime96.Fragment, { children: [
9920
+ /* @__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 }),
9921
+ paused ? null : /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
9604
9922
  ChatInput,
9605
9923
  {
9606
9924
  ref: inputRef,
@@ -9619,9 +9937,9 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
9619
9937
  }
9620
9938
 
9621
9939
  // src/components/HostEventsProvider.tsx
9622
- var import_jsx_runtime96 = require("react/jsx-runtime");
9940
+ var import_jsx_runtime97 = require("react/jsx-runtime");
9623
9941
  function HostEventsProvider({ value, children }) {
9624
- return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(SlipStateContext.Provider, { value: value.slipState, children });
9942
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(SlipStateContext.Provider, { value: value.slipState, children });
9625
9943
  }
9626
9944
 
9627
9945
  // src/styles/css.generated.ts
@@ -10814,14 +11132,60 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
10814
11132
  .ss-w-sec-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ss-w-neg); flex: none; }
10815
11133
  .ss-w-today-live { display: flex; flex-direction: column; gap: 2px; }
10816
11134
 
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; }
11135
+ /* Today tab root (Task 7): position: relative so the grid's own star/unstar toast (absolute,
11136
+ top-centre) anchors here rather than to some unrelated positioned ancestor. */
11137
+ /* Non-scrolling anchor for .ss-w-today-toast (position: absolute; top: 0): .ss-w-mon-list below is
11138
+ the overflow-y: auto scroller, so a toast parented to IT would scroll out of view with the
11139
+ content that moved it. This wrapper sits outside that scroller, inside .ss-w-panel's fixed-size
11140
+ flex column, so top: 0 always lands at the visible top of the Today tab. min-height: 0 is
11141
+ required: without it this flex item defaults to min-height: auto (its content height), .ss-w-panel's
11142
+ overflow: hidden then clips it, and .ss-w-mon-list inside never gets a bounded height to scroll within. */
11143
+ .ss-w-today-root { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
11144
+
11145
+ /* Section header for "Your leagues"/"Top leagues"/"All leagues" (Task 7) -- same visual
11146
+ treatment as .ss-w-sec-head (the live-band header), kept as a separate class so a kept test
11147
+ asserting .ss-w-sec-head is absent when nothing is live cannot see this header too. */
11148
+ .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); }
11149
+ .ss-w-today-sec::after { content: ""; flex: 1; height: 1px; background: var(--ss-w-line); }
11150
+ .ss-w-today-sec-sub { text-transform: none; letter-spacing: normal; font-weight: 600; }
11151
+ .ss-w-today-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
11152
+ .ss-w-today-empty { font-size: 12px; color: var(--ss-w-faint); padding: 10px 2px; }
11153
+
11154
+ /* League tile (Task 5): a flat row (crest + name as the open target, star as a separate sibling
11155
+ button) rather than a disclosure header -- opening is Task 6's LeagueDetail, not an inline
11156
+ expansion. Same border/radius language .ss-w-grp used to carry, before Task 7 deleted it. */
11157
+ .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); }
11158
+ .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; }
11159
+ .ss-w-today-tile-body:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: -2px; }
11160
+ .ss-w-today-tile-name { font-size: 12px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
11161
+ .ss-w-today-tile-country { font-weight: 600; color: var(--ss-w-faint); }
11162
+ .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; }
11163
+ .ss-w-today-tile-star:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: -2px; }
11164
+ .ss-w-today-tile-star[aria-pressed="true"] { color: var(--ss-w-accent); }
11165
+ .ss-w-today-tile-star:disabled { cursor: default; opacity: .4; }
11166
+ .ss-w-today-tile-star svg { width: 18px; height: 18px; }
11167
+
11168
+ /* League detail (Task 6): the drill-in view opened from a tile. Its header star is always
11169
+ enabled (spec \xA73/\xA77's one exception to the tile rule), so it carries no :disabled styling. */
11170
+ .ss-w-today-detail { position: relative; display: flex; flex-direction: column; gap: 10px; }
11171
+ .ss-w-today-detail-head { display: flex; align-items: center; gap: 8px; }
11172
+ .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); }
11173
+ .ss-w-today-detail-back:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: -2px; }
11174
+ .ss-w-today-detail-name { flex: 1; min-width: 0; font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
11175
+ .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; }
11176
+ .ss-w-today-detail-star:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: -2px; }
11177
+ .ss-w-today-detail-star[aria-pressed="true"] { color: var(--ss-w-accent); }
11178
+ .ss-w-today-detail-star svg { width: 18px; height: 18px; }
11179
+ .ss-w-today-detail-nav { display: flex; align-items: center; justify-content: center; gap: 10px; }
11180
+ .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; }
11181
+ .ss-w-today-detail-prev:focus-visible, .ss-w-today-detail-next:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: -2px; }
11182
+ .ss-w-today-detail-prev { transform: scaleX(-1); }
11183
+ .ss-w-today-detail-pos { font-size: 10.5px; font-weight: 700; color: var(--ss-w-faint); font-variant-numeric: tabular-nums; }
11184
+ .ss-w-today-detail-body { display: flex; flex-direction: column; }
11185
+ .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; }
11186
+ /* aria-live status region, not a modal -- pointer-events: none so the header/nav above stay
11187
+ clickable while it is showing. */
11188
+ .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
11189
 
10826
11190
  .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
11191
  .ss-w-drow:last-child { border-bottom: none; }
@@ -11307,7 +11671,7 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
11307
11671
  `;
11308
11672
 
11309
11673
  // src/StatsWidget.tsx
11310
- var import_jsx_runtime97 = require("react/jsx-runtime");
11674
+ var import_jsx_runtime98 = require("react/jsx-runtime");
11311
11675
  function buildClient(props) {
11312
11676
  try {
11313
11677
  if ("client" in props && props.client) {
@@ -11332,24 +11696,24 @@ function injectStyles(root) {
11332
11696
  function StatsWidget(props) {
11333
11697
  const injectedClient = "client" in props ? props.client : void 0;
11334
11698
  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)(
11699
+ const built = (0, import_react60.useMemo)(() => buildClient(props), [injectedClient, cfg?.operatorId, cfg?.publicKey, cfg?.baseUrl]);
11700
+ const logger = (0, import_react60.useMemo)(
11337
11701
  () => built ? built.client.createEventLogger({
11338
11702
  operatorUserId: cfg?.userContext?.operatorUserId,
11339
11703
  anonymousUserId: cfg?.userContext?.anonymousUserId
11340
11704
  }) : null,
11341
11705
  [built?.client]
11342
11706
  );
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)(() => {
11707
+ const ui = (0, import_react60.useMemo)(() => normalizeUi(props.config ?? { operatorId: "", publicKey: "" }), [props.config]);
11708
+ const rootRef = (0, import_react60.useRef)(null);
11709
+ const introDoneRef = (0, import_react60.useRef)(false);
11710
+ const markIntroDone = (0, import_react60.useCallback)(() => {
11347
11711
  introDoneRef.current = true;
11348
11712
  }, []);
11349
11713
  const convStorageKey = `ss-w-conv:${cfg?.operatorId ?? ""}:${cfg?.userContext?.operatorUserId ?? "anon"}`;
11350
11714
  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)(() => {
11715
+ const [hasToday, setHasToday] = (0, import_react60.useState)(false);
11716
+ const liveCardWatches = (0, import_react60.useMemo)(() => {
11353
11717
  const seen = /* @__PURE__ */ new Set();
11354
11718
  const out = [];
11355
11719
  for (const msg of controller.state.messages) {
@@ -11371,31 +11735,40 @@ function StatsWidget(props) {
11371
11735
  hasToday,
11372
11736
  watches: liveCardWatches
11373
11737
  });
11374
- const getSchedule = (0, import_react57.useCallback)(
11375
- (localDate, utcOffsetMinutes) => built ? built.conversation.getSchedule(localDate, utcOffsetMinutes) : Promise.resolve(null),
11376
- [built]
11738
+ const operatorUserId = cfg?.userContext?.operatorUserId;
11739
+ const anonymousUserId = cfg?.userContext?.anonymousUserId;
11740
+ const getSchedule = (0, import_react60.useCallback)(
11741
+ (localDate, utcOffsetMinutes) => built ? built.conversation.getSchedule(localDate, utcOffsetMinutes, operatorUserId, anonymousUserId) : Promise.resolve(null),
11742
+ [built, operatorUserId, anonymousUserId]
11743
+ );
11744
+ const postLeagueStar = (0, import_react60.useCallback)(
11745
+ (competitionId, starred) => built ? built.conversation.starLeague(competitionId, starred, operatorUserId, anonymousUserId) : Promise.resolve(null),
11746
+ [built, operatorUserId, anonymousUserId]
11377
11747
  );
11378
- const getStates = (0, import_react57.useCallback)(
11748
+ const getStates = (0, import_react60.useCallback)(
11379
11749
  (matchIds) => built ? built.conversation.getStates(matchIds) : Promise.resolve(null),
11380
11750
  [built]
11381
11751
  );
11382
- const pinnedMatchIds = (0, import_react57.useMemo)(
11752
+ const pinnedMatchIds = (0, import_react60.useMemo)(
11383
11753
  () => monitor.pins.filter((p) => p.kind === "match").map((p) => p.matchId),
11384
11754
  [monitor.pins]
11385
11755
  );
11386
11756
  const discovery = useMatchDiscovery({
11387
11757
  getSchedule,
11388
11758
  getStates,
11759
+ postLeagueStar,
11389
11760
  operatorId: cfg?.operatorId ?? "",
11761
+ operatorUserId,
11762
+ anonymousUserId,
11390
11763
  isOpen: controller.state.isOpen,
11391
11764
  pinnedMatchIds
11392
11765
  });
11393
11766
  const todayHasContent = visibleGroupsOf(discovery.groups, discovery.states).length > 0;
11394
- (0, import_react57.useEffect)(() => {
11767
+ (0, import_react60.useEffect)(() => {
11395
11768
  setHasToday(todayHasContent);
11396
11769
  }, [todayHasContent]);
11397
- const prevLiveSnapshotRef = (0, import_react57.useRef)(monitor.snapshot);
11398
- (0, import_react57.useEffect)(() => {
11770
+ const prevLiveSnapshotRef = (0, import_react60.useRef)(monitor.snapshot);
11771
+ (0, import_react60.useEffect)(() => {
11399
11772
  const snap = monitor.snapshot;
11400
11773
  if (!snap || snap === prevLiveSnapshotRef.current) return;
11401
11774
  prevLiveSnapshotRef.current = snap;
@@ -11431,14 +11804,14 @@ function StatsWidget(props) {
11431
11804
  }, [monitor.snapshot]);
11432
11805
  const gamesResult = useGames(built?.conversation ?? null, { activeTab: monitor.activeTab });
11433
11806
  const leaderboardResult = useLeaderboard(built?.conversation ?? null, { activeTab: monitor.activeTab });
11434
- const getPricePresets = (0, import_react57.useCallback)(
11807
+ const getPricePresets = (0, import_react60.useCallback)(
11435
11808
  (locale2) => built ? built.conversation.getPricePresets(locale2, { pool: "open" }) : Promise.resolve(null),
11436
11809
  [built]
11437
11810
  );
11438
11811
  const presetGrid = usePresetGrid({ getPricePresets, isOpen: controller.state.isOpen, locale: ui.presets.lang });
11439
11812
  const markTodayActivity = monitor.markTodayActivity;
11440
- const prevLiveCountRef = (0, import_react57.useRef)(0);
11441
- (0, import_react57.useEffect)(() => {
11813
+ const prevLiveCountRef = (0, import_react60.useRef)(0);
11814
+ (0, import_react60.useEffect)(() => {
11442
11815
  const rose = prevLiveCountRef.current === 0 && discovery.liveCount > 0;
11443
11816
  prevLiveCountRef.current = discovery.liveCount;
11444
11817
  if (rose) markTodayActivity();
@@ -11452,7 +11825,7 @@ function StatsWidget(props) {
11452
11825
  closePanel: controller.close
11453
11826
  });
11454
11827
  const markAdded = hostEvents.markAdded;
11455
- const slip = (0, import_react57.useMemo)(
11828
+ const slip = (0, import_react60.useMemo)(
11456
11829
  () => {
11457
11830
  const handler = props.config?.onAddToSlip;
11458
11831
  return {
@@ -11471,7 +11844,7 @@ function StatsWidget(props) {
11471
11844
  },
11472
11845
  [props.config?.onAddToSlip, controller.state.conversationId, markAdded]
11473
11846
  );
11474
- const onDashboardTap = (0, import_react57.useMemo)(
11847
+ const onDashboardTap = (0, import_react60.useMemo)(
11475
11848
  () => built ? createDashboardTapSignal((input) => built.conversation.sendSignal(input), logger) : void 0,
11476
11849
  [built, logger]
11477
11850
  );
@@ -11487,14 +11860,12 @@ function StatsWidget(props) {
11487
11860
  log: logger
11488
11861
  })
11489
11862
  }));
11490
- const operatorUserId = cfg?.userContext?.operatorUserId;
11491
- const anonymousUserId = cfg?.userContext?.anonymousUserId;
11492
11863
  const conversationId = controller.state.conversationId ?? void 0;
11493
- (0, import_react57.useEffect)(() => {
11864
+ (0, import_react60.useEffect)(() => {
11494
11865
  if (!logger) return;
11495
11866
  logger.setIdentity({ operatorUserId, anonymousUserId, conversationId });
11496
11867
  }, [logger, operatorUserId, anonymousUserId, conversationId]);
11497
- (0, import_react57.useEffect)(() => {
11868
+ (0, import_react60.useEffect)(() => {
11498
11869
  if (!logger) return;
11499
11870
  logger.resume();
11500
11871
  const onHide = () => {
@@ -11512,14 +11883,14 @@ function StatsWidget(props) {
11512
11883
  logger.dispose();
11513
11884
  };
11514
11885
  }, [logger]);
11515
- (0, import_react57.useEffect)(() => {
11886
+ (0, import_react60.useEffect)(() => {
11516
11887
  if (!built || !ui.injectStyles) return;
11517
11888
  const node = rootRef.current?.getRootNode();
11518
11889
  if (node) injectStyles(node);
11519
11890
  }, [built, ui.injectStyles]);
11520
11891
  if (!built) return null;
11521
11892
  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)(
11893
+ 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
11894
  ChatPanel,
11524
11895
  {
11525
11896
  controller,
@@ -11534,7 +11905,7 @@ function StatsWidget(props) {
11534
11905
  conversation: built?.conversation ?? null,
11535
11906
  presetGrid
11536
11907
  }
11537
- ) : /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
11908
+ ) : /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
11538
11909
  ChatFab,
11539
11910
  {
11540
11911
  label: ui.launcherLabel,