@sensiblestats/widget-react 0.50.2 → 0.52.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/StatsWidget.tsx
2
- import { useCallback as useCallback9, useEffect as useEffect15, useMemo as useMemo3, useRef as useRef13, useState as useState33 } from "react";
2
+ import { useCallback as useCallback9, useEffect as useEffect15, useMemo as useMemo3, useRef as useRef13, useState as useState34 } from "react";
3
3
  import { StatsWidgetClient } from "@sensiblestats/widget-sdk";
4
4
 
5
5
  // src/kickoff.ts
@@ -101,6 +101,13 @@ var STRINGS = {
101
101
  leaderboardOffBoard: "Outside top 50",
102
102
  leaderboardThisWeek: "This week",
103
103
  leaderboardAllTime: "All time",
104
+ leaderboardEmptyFreshTitle: "New week, blank slate",
105
+ leaderboardEmptyFreshBody: "No scores yet. The first fan to play a game takes #1.",
106
+ leaderboardEmptyColdTitle: "Be the first up",
107
+ leaderboardEmptyColdBody: "Nobody's on the board yet. Play a game and you're #1.",
108
+ leaderboardEmptyCta: "Play today's games",
109
+ leaderboardLastWeekLabel: "Last week",
110
+ leaderboardAllTimeEmpty: "The all-time board fills as fans play \u2014 nothing here yet.",
104
111
  gamePlay: "Play",
105
112
  gameResume: "Resume",
106
113
  gameLocked: "Locked",
@@ -191,6 +198,13 @@ var STRINGS = {
191
198
  leaderboardOffBoard: "\u0130lk 50 d\u0131\u015F\u0131nda",
192
199
  leaderboardThisWeek: "Bu hafta",
193
200
  leaderboardAllTime: "T\xFCm zamanlar",
201
+ leaderboardEmptyFreshTitle: "Yeni hafta, temiz sayfa",
202
+ leaderboardEmptyFreshBody: "Hen\xFCz skor yok. Oynayan ilk taraftar 1. s\u0131raya ge\xE7er.",
203
+ leaderboardEmptyColdTitle: "\u0130lk sen ol",
204
+ leaderboardEmptyColdBody: "Panoda hen\xFCz kimse yok. Bir oyun oyna, 1. s\u0131ra senin.",
205
+ leaderboardEmptyCta: "Bug\xFCn\xFCn oyunlar\u0131n\u0131 oyna",
206
+ leaderboardLastWeekLabel: "Ge\xE7en hafta",
207
+ leaderboardAllTimeEmpty: "T\xFCm zamanlar panosu taraftarlar oynad\u0131k\xE7a dolar \u2014 hen\xFCz bir \u015Fey yok.",
194
208
  gamePlay: "Oyna",
195
209
  gameResume: "Devam et",
196
210
  gameLocked: "Kilitli",
@@ -300,6 +314,13 @@ function normalizeUi(cfg) {
300
314
  leaderboardOffBoard: strings.leaderboardOffBoard,
301
315
  leaderboardThisWeek: strings.leaderboardThisWeek,
302
316
  leaderboardAllTime: strings.leaderboardAllTime,
317
+ leaderboardEmptyFreshTitle: strings.leaderboardEmptyFreshTitle,
318
+ leaderboardEmptyFreshBody: strings.leaderboardEmptyFreshBody,
319
+ leaderboardEmptyColdTitle: strings.leaderboardEmptyColdTitle,
320
+ leaderboardEmptyColdBody: strings.leaderboardEmptyColdBody,
321
+ leaderboardEmptyCta: strings.leaderboardEmptyCta,
322
+ leaderboardLastWeekLabel: strings.leaderboardLastWeekLabel,
323
+ leaderboardAllTimeEmpty: strings.leaderboardAllTimeEmpty,
303
324
  gamePlay: strings.gamePlay,
304
325
  gameResume: strings.gameResume,
305
326
  gameLocked: strings.gameLocked,
@@ -1871,7 +1892,7 @@ function ChatFab({ label, greeting, popupText, logoUrl, onOpen, onDismissPopup,
1871
1892
  }
1872
1893
 
1873
1894
  // src/components/ChatPanel.tsx
1874
- import { useEffect as useEffect14, useState as useState32 } from "react";
1895
+ import { useEffect as useEffect14, useState as useState33 } from "react";
1875
1896
 
1876
1897
  // src/components/ChatHeader.tsx
1877
1898
  import { useEffect as useEffect8, useRef as useRef8, useState as useState8 } from "react";
@@ -3974,7 +3995,7 @@ function TodayPanel({ discovery, ui, monitor }) {
3974
3995
  }
3975
3996
 
3976
3997
  // src/components/GamesPanel.tsx
3977
- import { useState as useState30 } from "react";
3998
+ import { useState as useState31 } from "react";
3978
3999
 
3979
4000
  // src/components/GamesLoginWall.tsx
3980
4001
  import { jsx as jsx52 } from "react/jsx-runtime";
@@ -3987,14 +4008,36 @@ import { Fragment as Fragment8, jsx as jsx53, jsxs as jsxs47 } from "react/jsx-r
3987
4008
  var GAME_ICONS = {
3988
4009
  "mystery-tiger": "\u{1F42F}",
3989
4010
  "daily-quiz": "\u{1F9E0}",
3990
- "career-path": "\u26BD",
3991
- "beat-the-grid": "\u{1F3AF}",
3992
- "guess-xi": "\u{1F4CB}",
3993
- "head-of-league": "\u{1F3C6}"
4011
+ "career-path": "\u{1F9ED}",
4012
+ "beat-the-grid": "\u{1F532}",
4013
+ "guess-the-xi": "\u{1F4CB}",
4014
+ "higher-or-lower": "\u{1F4C8}",
4015
+ "matchday-predictor": "\u{1F3AF}",
4016
+ "starting-xi": "\u{1F455}",
4017
+ "stat-ladder": "\u{1FA9C}",
4018
+ "fan-motm": "\u2B50"
4019
+ };
4020
+ var GAME_TITLES = {
4021
+ "mystery-tiger": "Mystery Tiger",
4022
+ "daily-quiz": "Daily Quiz",
4023
+ "career-path": "Career Path",
4024
+ "beat-the-grid": "Beat the Grid",
4025
+ "guess-the-xi": "Guess the XI",
4026
+ "higher-or-lower": "Higher or Lower",
4027
+ "matchday-predictor": "Matchday Predictor",
4028
+ "starting-xi": "Starting XI",
4029
+ "stat-ladder": "Stat Ladder",
4030
+ "fan-motm": "Fan MOTM"
3994
4031
  };
3995
4032
  function gameIcon(game) {
3996
4033
  return GAME_ICONS[game.gameId] ?? (game.kind === "fixture" ? "\u{1F4C5}" : "\u{1F3AE}");
3997
4034
  }
4035
+ function prettifyGameId(gameId) {
4036
+ return gameId.split("-").map((w) => w ? w[0].toUpperCase() + w.slice(1) : w).join(" ");
4037
+ }
4038
+ function gameTitle(game) {
4039
+ return game.title ?? GAME_TITLES[game.gameId] ?? prettifyGameId(game.gameId);
4040
+ }
3998
4041
  function formatCountdown(lockAtUtc) {
3999
4042
  const diff = new Date(lockAtUtc).getTime() - Date.now();
4000
4043
  if (diff <= 0) return null;
@@ -4035,7 +4078,7 @@ function GameTile({
4035
4078
  const statusClass = `ss-w-tile-status ss-w-tile-status--${game.status}`;
4036
4079
  const inner = /* @__PURE__ */ jsxs47(Fragment8, { children: [
4037
4080
  /* @__PURE__ */ jsx53("span", { className: "ss-w-tile-icon", children: gameIcon(game) }),
4038
- /* @__PURE__ */ jsx53("span", { className: "ss-w-tile-title", children: game.title ?? game.gameId }),
4081
+ /* @__PURE__ */ jsx53("span", { className: "ss-w-tile-title", children: gameTitle(game) }),
4039
4082
  countdown !== null ? /* @__PURE__ */ jsx53("span", { className: statusClass, "data-testid": "tile-countdown", children: countdown }) : /* @__PURE__ */ jsx53("span", { className: statusClass, children: statusLabel }),
4040
4083
  /* @__PURE__ */ jsx53("span", { className: `ss-w-tile-chip ss-w-tile-chip--${game.ranked ? "skill" : "fun"}`, children: game.ranked ? "Skill" : "For fun" })
4041
4084
  ] });
@@ -4086,7 +4129,7 @@ function GamesHub({
4086
4129
  }
4087
4130
 
4088
4131
  // src/components/GameScreenHost.tsx
4089
- import { useEffect as useEffect13, useRef as useRef12, useState as useState29 } from "react";
4132
+ import { useEffect as useEffect13, useRef as useRef12, useState as useState30 } from "react";
4090
4133
 
4091
4134
  // src/useGamePlay.ts
4092
4135
  import { useCallback as useCallback8, useRef as useRef11, useState as useState22 } from "react";
@@ -4746,6 +4789,90 @@ function BeatTheGridGame({
4746
4789
  ] });
4747
4790
  }
4748
4791
 
4792
+ // src/components/games/GuessTheXiGame.tsx
4793
+ import { useState as useState26, useId as useId5 } from "react";
4794
+
4795
+ // src/components/games/nationFlags.ts
4796
+ var FLAGS = {
4797
+ england: "\u{1F3F4}\u{E0067}\u{E0062}\u{E0065}\u{E006E}\u{E0067}\u{E007F}",
4798
+ scotland: "\u{1F3F4}\u{E0067}\u{E0062}\u{E0073}\u{E0063}\u{E0074}\u{E007F}",
4799
+ wales: "\u{1F3F4}\u{E0067}\u{E0062}\u{E0077}\u{E006C}\u{E0073}\u{E007F}",
4800
+ "northern ireland": "\u{1F1EC}\u{1F1E7}",
4801
+ "republic of ireland": "\u{1F1EE}\u{1F1EA}",
4802
+ ireland: "\u{1F1EE}\u{1F1EA}",
4803
+ "united kingdom": "\u{1F1EC}\u{1F1E7}",
4804
+ france: "\u{1F1EB}\u{1F1F7}",
4805
+ spain: "\u{1F1EA}\u{1F1F8}",
4806
+ portugal: "\u{1F1F5}\u{1F1F9}",
4807
+ germany: "\u{1F1E9}\u{1F1EA}",
4808
+ italy: "\u{1F1EE}\u{1F1F9}",
4809
+ netherlands: "\u{1F1F3}\u{1F1F1}",
4810
+ belgium: "\u{1F1E7}\u{1F1EA}",
4811
+ switzerland: "\u{1F1E8}\u{1F1ED}",
4812
+ austria: "\u{1F1E6}\u{1F1F9}",
4813
+ denmark: "\u{1F1E9}\u{1F1F0}",
4814
+ sweden: "\u{1F1F8}\u{1F1EA}",
4815
+ norway: "\u{1F1F3}\u{1F1F4}",
4816
+ finland: "\u{1F1EB}\u{1F1EE}",
4817
+ iceland: "\u{1F1EE}\u{1F1F8}",
4818
+ poland: "\u{1F1F5}\u{1F1F1}",
4819
+ czechia: "\u{1F1E8}\u{1F1FF}",
4820
+ "czech republic": "\u{1F1E8}\u{1F1FF}",
4821
+ croatia: "\u{1F1ED}\u{1F1F7}",
4822
+ serbia: "\u{1F1F7}\u{1F1F8}",
4823
+ "bosnia and herzegovina": "\u{1F1E7}\u{1F1E6}",
4824
+ greece: "\u{1F1EC}\u{1F1F7}",
4825
+ romania: "\u{1F1F7}\u{1F1F4}",
4826
+ ukraine: "\u{1F1FA}\u{1F1E6}",
4827
+ russia: "\u{1F1F7}\u{1F1FA}",
4828
+ hungary: "\u{1F1ED}\u{1F1FA}",
4829
+ slovakia: "\u{1F1F8}\u{1F1F0}",
4830
+ slovenia: "\u{1F1F8}\u{1F1EE}",
4831
+ turkey: "\u{1F1F9}\u{1F1F7}",
4832
+ t\u00FCrkiye: "\u{1F1F9}\u{1F1F7}",
4833
+ albania: "\u{1F1E6}\u{1F1F1}",
4834
+ "north macedonia": "\u{1F1F2}\u{1F1F0}",
4835
+ brazil: "\u{1F1E7}\u{1F1F7}",
4836
+ argentina: "\u{1F1E6}\u{1F1F7}",
4837
+ uruguay: "\u{1F1FA}\u{1F1FE}",
4838
+ colombia: "\u{1F1E8}\u{1F1F4}",
4839
+ chile: "\u{1F1E8}\u{1F1F1}",
4840
+ peru: "\u{1F1F5}\u{1F1EA}",
4841
+ ecuador: "\u{1F1EA}\u{1F1E8}",
4842
+ paraguay: "\u{1F1F5}\u{1F1FE}",
4843
+ mexico: "\u{1F1F2}\u{1F1FD}",
4844
+ "united states": "\u{1F1FA}\u{1F1F8}",
4845
+ usa: "\u{1F1FA}\u{1F1F8}",
4846
+ canada: "\u{1F1E8}\u{1F1E6}",
4847
+ jamaica: "\u{1F1EF}\u{1F1F2}",
4848
+ nigeria: "\u{1F1F3}\u{1F1EC}",
4849
+ ghana: "\u{1F1EC}\u{1F1ED}",
4850
+ senegal: "\u{1F1F8}\u{1F1F3}",
4851
+ ivorycoast: "\u{1F1E8}\u{1F1EE}",
4852
+ "cote d'ivoire": "\u{1F1E8}\u{1F1EE}",
4853
+ "ivory coast": "\u{1F1E8}\u{1F1EE}",
4854
+ cameroon: "\u{1F1E8}\u{1F1F2}",
4855
+ egypt: "\u{1F1EA}\u{1F1EC}",
4856
+ morocco: "\u{1F1F2}\u{1F1E6}",
4857
+ algeria: "\u{1F1E9}\u{1F1FF}",
4858
+ tunisia: "\u{1F1F9}\u{1F1F3}",
4859
+ mali: "\u{1F1F2}\u{1F1F1}",
4860
+ "south africa": "\u{1F1FF}\u{1F1E6}",
4861
+ "dr congo": "\u{1F1E8}\u{1F1E9}",
4862
+ japan: "\u{1F1EF}\u{1F1F5}",
4863
+ "south korea": "\u{1F1F0}\u{1F1F7}",
4864
+ korea: "\u{1F1F0}\u{1F1F7}",
4865
+ australia: "\u{1F1E6}\u{1F1FA}",
4866
+ "saudi arabia": "\u{1F1F8}\u{1F1E6}",
4867
+ iran: "\u{1F1EE}\u{1F1F7}",
4868
+ "new zealand": "\u{1F1F3}\u{1F1FF}"
4869
+ };
4870
+ function nationalityFlag(nationality) {
4871
+ if (!nationality) return "\u{1F3F3}\uFE0F";
4872
+ const key = nationality.trim().toLowerCase();
4873
+ return FLAGS[key] ?? nationality.slice(0, 3).toUpperCase();
4874
+ }
4875
+
4749
4876
  // src/components/games/GuessTheXiGame.tsx
4750
4877
  import { Fragment as Fragment14, jsx as jsx59, jsxs as jsxs53 } from "react/jsx-runtime";
4751
4878
  function parseClientState5(json) {
@@ -4756,6 +4883,16 @@ function parseClientState5(json) {
4756
4883
  return null;
4757
4884
  }
4758
4885
  }
4886
+ function toRows(positions) {
4887
+ const byRow = /* @__PURE__ */ new Map();
4888
+ positions.forEach((p, i) => {
4889
+ const rowKey = Number(p.slot?.split(":")[0]) || i + 1;
4890
+ const bucket = byRow.get(rowKey) ?? [];
4891
+ bucket.push(p);
4892
+ byRow.set(rowKey, bucket);
4893
+ });
4894
+ return [...byRow.keys()].sort((a, b) => a - b).map((k) => byRow.get(k));
4895
+ }
4759
4896
  function RevealCard({ reveal }) {
4760
4897
  return /* @__PURE__ */ jsxs53("div", { className: "ss-w-gxi-reveal", "data-reveal-type": reveal.type ?? "", children: [
4761
4898
  reveal.slot && /* @__PURE__ */ jsx59("span", { className: "ss-w-gxi-reveal-slot", children: reveal.slot }),
@@ -4768,51 +4905,90 @@ function GuessTheXiGame({
4768
4905
  submitting,
4769
4906
  onSubmit
4770
4907
  }) {
4908
+ const [query, setQuery] = useState26("");
4909
+ const inputId = useId5();
4771
4910
  const clientState = parseClientState5(result?.clientStateJson);
4772
4911
  const isOver = result?.alreadyPlayed === true || clientState?.status === "solved" || clientState?.status === "failed";
4773
4912
  const solved = clientState?.status === "solved";
4913
+ const guessedTeamIds = new Set(clientState?.guessHistory.map((g) => g.teamId) ?? []);
4914
+ const rows = config ? toRows(config.positions) : [];
4915
+ const filtered = config && !isOver ? config.teamPool.filter(
4916
+ (t) => !guessedTeamIds.has(t.teamId) && t.teamName.toLowerCase().includes(query.toLowerCase())
4917
+ ) : [];
4774
4918
  function handlePick(teamId) {
4775
4919
  if (!config || isOver || submitting) return;
4776
4920
  const prevGuesses = clientState?.guessHistory.map((g) => ({ teamId: g.teamId })) ?? [];
4777
4921
  const newGuesses = [...prevGuesses, { teamId }];
4922
+ setQuery("");
4778
4923
  onSubmit(JSON.stringify({ guesses: newGuesses }));
4779
4924
  }
4925
+ const wrongGuesses = (clientState?.guessHistory ?? []).filter((g) => !g.wasCorrect);
4780
4926
  return /* @__PURE__ */ jsxs53("div", { className: "ss-w-gxi", "data-testid": "game-screen-guess-the-xi", children: [
4781
4927
  !config && /* @__PURE__ */ jsx59("div", { className: "ss-w-gscreen-body", children: "Loading\u2026" }),
4782
4928
  config && /* @__PURE__ */ jsxs53(Fragment14, { children: [
4783
4929
  /* @__PURE__ */ jsxs53("div", { className: "ss-w-gxi-head", children: [
4784
4930
  /* @__PURE__ */ jsxs53("div", { children: [
4785
4931
  /* @__PURE__ */ jsx59("div", { className: "ss-w-gxi-title", children: "Guess the XI" }),
4786
- /* @__PURE__ */ jsx59("div", { className: "ss-w-gxi-sub", children: config.poolLabel })
4932
+ /* @__PURE__ */ jsxs53("div", { className: "ss-w-gxi-sub", children: [
4933
+ "Which team? \xB7 ",
4934
+ config.poolLabel
4935
+ ] })
4787
4936
  ] }),
4788
4937
  clientState && !isOver && /* @__PURE__ */ jsxs53("span", { className: "ss-w-gxi-left", children: [
4789
- "Guess ",
4790
- clientState.guessesUsed + 1,
4791
- "/6"
4938
+ Math.max(0, 6 - clientState.guessesUsed),
4939
+ " left"
4792
4940
  ] })
4793
4941
  ] }),
4794
- config.positions.length > 0 && /* @__PURE__ */ jsx59("div", { className: "ss-w-gxi-pitch", children: config.positions.map((pos, i) => /* @__PURE__ */ jsxs53("div", { className: "ss-w-gxi-pslot", children: [
4795
- /* @__PURE__ */ jsx59("span", { className: "ss-w-gxi-pslot-pos", children: pos.slot }),
4796
- /* @__PURE__ */ jsx59("span", { className: "ss-w-gxi-pslot-nat", children: pos.nationality })
4797
- ] }, `${pos.slot}-${i}`)) }),
4942
+ rows.length > 0 && /* @__PURE__ */ jsx59("div", { className: "ss-w-gxi-pitch", children: rows.map((row, r) => /* @__PURE__ */ jsx59("div", { className: "ss-w-gxi-prow", children: row.map((pos, c) => /* @__PURE__ */ jsx59(
4943
+ "div",
4944
+ {
4945
+ className: "ss-w-gxi-flag",
4946
+ title: pos.nationality,
4947
+ "aria-label": pos.nationality,
4948
+ children: nationalityFlag(pos.nationality)
4949
+ },
4950
+ `${pos.slot}-${c}`
4951
+ )) }, r)) }),
4798
4952
  clientState && clientState.earnedReveals.length > 0 && /* @__PURE__ */ jsx59("div", { className: "ss-w-gxi-reveals", children: clientState.earnedReveals.map((r, i) => /* @__PURE__ */ jsx59(RevealCard, { reveal: r }, i)) }),
4799
- !isOver ? /* @__PURE__ */ jsx59("div", { className: "ss-w-gxi-pool", children: config.teamPool.map((team) => {
4800
- const guessRecord = clientState?.guessHistory.find((g) => g.teamId === team.teamId);
4801
- return /* @__PURE__ */ jsx59(
4802
- "button",
4803
- {
4804
- type: "button",
4805
- className: [
4806
- "ss-w-gxi-team-btn",
4807
- guessRecord ? guessRecord.wasCorrect ? "ss-w-gxi-team-btn--correct" : "ss-w-gxi-team-btn--wrong" : ""
4808
- ].filter(Boolean).join(" "),
4809
- disabled: submitting,
4810
- onClick: () => handlePick(team.teamId),
4811
- children: team.teamName
4812
- },
4813
- team.teamId
4814
- );
4815
- }) }) : clientState && /* @__PURE__ */ jsxs53("div", { className: `ss-w-gxi-banner ss-w-gxi-banner--${solved ? "solved" : "failed"}`, children: [
4953
+ !isOver ? /* @__PURE__ */ jsxs53(Fragment14, { children: [
4954
+ wrongGuesses.length > 0 && /* @__PURE__ */ jsx59("div", { className: "ss-w-gxi-wrong", children: wrongGuesses.map((g) => {
4955
+ const team = config.teamPool.find((t) => t.teamId === g.teamId);
4956
+ return /* @__PURE__ */ jsx59("span", { className: "ss-w-gxi-wrong-pill", children: team?.teamName ?? `#${g.teamId}` }, g.teamId);
4957
+ }) }),
4958
+ /* @__PURE__ */ jsxs53("div", { className: "ss-w-gtta", children: [
4959
+ /* @__PURE__ */ jsx59(
4960
+ "input",
4961
+ {
4962
+ id: inputId,
4963
+ type: "text",
4964
+ role: "textbox",
4965
+ className: "ss-w-gtta-i",
4966
+ placeholder: "Name the team\u2026",
4967
+ value: query,
4968
+ disabled: submitting || isOver,
4969
+ onChange: (e) => setQuery(e.target.value),
4970
+ autoComplete: "off",
4971
+ "aria-label": "Name the team",
4972
+ "aria-autocomplete": "list"
4973
+ }
4974
+ ),
4975
+ query.length > 0 && filtered.length > 0 && /* @__PURE__ */ jsx59("div", { className: "ss-w-gtta-drop", role: "listbox", children: filtered.map((t) => /* @__PURE__ */ jsx59(
4976
+ "div",
4977
+ {
4978
+ className: "ss-w-gtta-opt",
4979
+ role: "option",
4980
+ "aria-selected": false,
4981
+ onClick: () => handlePick(t.teamId),
4982
+ onKeyDown: (e) => {
4983
+ if (e.key === "Enter") handlePick(t.teamId);
4984
+ },
4985
+ tabIndex: 0,
4986
+ children: t.teamName
4987
+ },
4988
+ t.teamId
4989
+ )) })
4990
+ ] })
4991
+ ] }) : clientState && /* @__PURE__ */ jsxs53("div", { className: `ss-w-gxi-banner ss-w-gxi-banner--${solved ? "solved" : "failed"}`, children: [
4816
4992
  /* @__PURE__ */ jsx59("div", { className: "ss-w-gxi-banner-label", children: solved ? "\u2705 Solved!" : "\u{1F614} Out of guesses" }),
4817
4993
  /* @__PURE__ */ jsx59("div", { className: "ss-w-gxi-banner-score", children: clientState.score }),
4818
4994
  /* @__PURE__ */ jsxs53("div", { className: "ss-w-gxi-banner-sub", children: [
@@ -4827,7 +5003,7 @@ function GuessTheXiGame({
4827
5003
  }
4828
5004
 
4829
5005
  // src/components/games/DailyQuizGame.tsx
4830
- import { useState as useState26 } from "react";
5006
+ import { useState as useState27 } from "react";
4831
5007
  import { Fragment as Fragment15, jsx as jsx60, jsxs as jsxs54 } from "react/jsx-runtime";
4832
5008
  function parseClientState6(json) {
4833
5009
  if (!json) return null;
@@ -4846,7 +5022,7 @@ function DailyQuizGame({
4846
5022
  submitting,
4847
5023
  onSubmit
4848
5024
  }) {
4849
- const [selections, setSelections] = useState26(/* @__PURE__ */ new Map());
5025
+ const [selections, setSelections] = useState27(/* @__PURE__ */ new Map());
4850
5026
  const clientState = parseClientState6(result?.clientStateJson);
4851
5027
  const isRevealed = (clientState?.results.length ?? 0) > 0 || result?.alreadyPlayed === true;
4852
5028
  const allAnswered = config != null && selections.size === config.questions.length;
@@ -4926,7 +5102,7 @@ function DailyQuizGame({
4926
5102
  }
4927
5103
 
4928
5104
  // src/components/games/MatchdayPredictorGame.tsx
4929
- import { useState as useState27 } from "react";
5105
+ import { useState as useState28 } from "react";
4930
5106
  import { jsx as jsx61, jsxs as jsxs55 } from "react/jsx-runtime";
4931
5107
  function parseClientState7(json) {
4932
5108
  if (!json) return null;
@@ -4949,9 +5125,9 @@ function MatchdayPredictorGame({
4949
5125
  submitting,
4950
5126
  onSubmit
4951
5127
  }) {
4952
- const [homeScore, setHomeScore] = useState27(0);
4953
- const [awayScore, setAwayScore] = useState27(0);
4954
- const [firstScorerPlayerId, setFirstScorerPlayerId] = useState27(null);
5128
+ const [homeScore, setHomeScore] = useState28(0);
5129
+ const [awayScore, setAwayScore] = useState28(0);
5130
+ const [firstScorerPlayerId, setFirstScorerPlayerId] = useState28(null);
4955
5131
  const clientState = parseClientState7(result?.clientStateJson);
4956
5132
  const alreadyPlayed = result?.alreadyPlayed === true;
4957
5133
  if (alreadyPlayed && clientState) {
@@ -5101,7 +5277,7 @@ function MatchdayPredictorGame({
5101
5277
  }
5102
5278
 
5103
5279
  // src/components/games/StartingXiGame.tsx
5104
- import { useState as useState28 } from "react";
5280
+ import { useState as useState29 } from "react";
5105
5281
  import { jsx as jsx62, jsxs as jsxs56 } from "react/jsx-runtime";
5106
5282
  function parseClientState8(json) {
5107
5283
  if (!json) return null;
@@ -5122,7 +5298,7 @@ function StartingXiGame({
5122
5298
  submitting,
5123
5299
  onSubmit
5124
5300
  }) {
5125
- const [picked, setPicked] = useState28([]);
5301
+ const [picked, setPicked] = useState29([]);
5126
5302
  const clientState = parseClientState8(result?.clientStateJson);
5127
5303
  const alreadyPlayed = result?.alreadyPlayed === true;
5128
5304
  if (alreadyPlayed) {
@@ -5366,7 +5542,7 @@ function GameScreenHost({
5366
5542
  ui
5367
5543
  }) {
5368
5544
  const { gameId, fixtureId, gameDay = "" } = selected;
5369
- const [configJson, setConfigJson] = useState29(null);
5545
+ const [configJson, setConfigJson] = useState30(null);
5370
5546
  useEffect13(() => {
5371
5547
  setConfigJson(null);
5372
5548
  if (!conversation) return;
@@ -5512,7 +5688,7 @@ function GamesPanel({
5512
5688
  ui,
5513
5689
  conversation
5514
5690
  }) {
5515
- const [selected, setSelected] = useState30(null);
5691
+ const [selected, setSelected] = useState31(null);
5516
5692
  if (!loggedIn) return /* @__PURE__ */ jsx66(GamesLoginWall, { ui });
5517
5693
  if (selected !== null) {
5518
5694
  return /* @__PURE__ */ jsx66("div", { className: "ss-w-mon-list", children: /* @__PURE__ */ jsx66(
@@ -5536,7 +5712,7 @@ function GamesPanel({
5536
5712
  }
5537
5713
 
5538
5714
  // src/components/Leaderboard.tsx
5539
- import { useState as useState31 } from "react";
5715
+ import { useState as useState32 } from "react";
5540
5716
 
5541
5717
  // src/components/LeaderboardRow.tsx
5542
5718
  import { jsx as jsx67, jsxs as jsxs60 } from "react/jsx-runtime";
@@ -5576,18 +5752,58 @@ function LeaderboardAllTimeRow({
5576
5752
  ] });
5577
5753
  }
5578
5754
 
5579
- // src/components/Leaderboard.tsx
5755
+ // src/components/LeaderboardEmpty.tsx
5580
5756
  import { jsx as jsx68, jsxs as jsxs61 } from "react/jsx-runtime";
5757
+ function LeaderboardEmpty({
5758
+ segment,
5759
+ lastWeek,
5760
+ weeklyPrize,
5761
+ onPlay,
5762
+ ui
5763
+ }) {
5764
+ if (segment === "alltime") {
5765
+ return /* @__PURE__ */ jsxs61("div", { className: "ss-w-lb-empty ss-w-lb-empty--alltime", children: [
5766
+ /* @__PURE__ */ jsx68("div", { className: "ss-w-lb-empty-icon", "aria-hidden": "true", children: "\u{1F4CA}" }),
5767
+ /* @__PURE__ */ jsx68("p", { className: "ss-w-lb-empty-body", children: ui.leaderboardAllTimeEmpty })
5768
+ ] });
5769
+ }
5770
+ const fresh = lastWeek != null;
5771
+ const title = fresh ? ui.leaderboardEmptyFreshTitle : ui.leaderboardEmptyColdTitle;
5772
+ const body = fresh ? ui.leaderboardEmptyFreshBody : ui.leaderboardEmptyColdBody;
5773
+ return /* @__PURE__ */ jsxs61("div", { className: "ss-w-lb-empty", children: [
5774
+ weeklyPrize && /* @__PURE__ */ jsxs61("div", { className: "ss-w-prize", children: [
5775
+ /* @__PURE__ */ jsx68("span", { className: "ss-w-prize-icon", "aria-hidden": "true", children: "\u{1F3C6}" }),
5776
+ /* @__PURE__ */ jsx68("div", { className: "ss-w-prize-body", children: /* @__PURE__ */ jsx68("span", { className: "ss-w-prize-text", children: weeklyPrize }) })
5777
+ ] }),
5778
+ /* @__PURE__ */ jsxs61("div", { className: "ss-w-lb-empty-hero", children: [
5779
+ /* @__PURE__ */ jsx68("div", { className: "ss-w-lb-empty-icon", "aria-hidden": "true", children: fresh ? "\u{1F3C6}" : "\u{1F3AE}" }),
5780
+ /* @__PURE__ */ jsx68("h4", { className: "ss-w-lb-empty-title", children: title }),
5781
+ /* @__PURE__ */ jsx68("p", { className: "ss-w-lb-empty-body", children: body }),
5782
+ onPlay && /* @__PURE__ */ jsx68("button", { type: "button", className: "ss-w-lb-empty-cta", onClick: onPlay, children: ui.leaderboardEmptyCta })
5783
+ ] }),
5784
+ fresh && lastWeek && /* @__PURE__ */ jsxs61("div", { className: "ss-w-lb-last", children: [
5785
+ /* @__PURE__ */ jsx68("span", { className: "ss-w-lb-last-label", children: ui.leaderboardLastWeekLabel }),
5786
+ /* @__PURE__ */ jsx68("span", { className: "ss-w-lb-last-champ", "aria-hidden": "true", children: "\u{1F947}" }),
5787
+ /* @__PURE__ */ jsx68("span", { className: "ss-w-lb-last-handle", children: lastWeek.handle }),
5788
+ /* @__PURE__ */ jsx68("span", { className: "ss-w-lb-last-points", children: formatPoints(lastWeek.points) })
5789
+ ] })
5790
+ ] });
5791
+ }
5792
+
5793
+ // src/components/Leaderboard.tsx
5794
+ import { Fragment as Fragment16, jsx as jsx69, jsxs as jsxs62 } from "react/jsx-runtime";
5581
5795
  function Leaderboard({
5582
5796
  data,
5583
- ui
5797
+ ui,
5798
+ onPlay
5584
5799
  }) {
5585
- const [segment, setSegment] = useState31("weekly");
5800
+ const [segment, setSegment] = useState32("weekly");
5586
5801
  const myRow = segment === "weekly" ? data.myWeeklyRow : data.myAllTimeRow;
5587
5802
  const offBoard = myRow !== null && myRow !== void 0 && myRow.rank === -1;
5588
- return /* @__PURE__ */ jsxs61("div", { className: "ss-w-lb2", children: [
5589
- /* @__PURE__ */ jsxs61("div", { className: "ss-w-seg", children: [
5590
- /* @__PURE__ */ jsx68(
5803
+ const isEmpty = segment === "weekly" ? data.weeklyTop.length === 0 : data.allTimeTop.length === 0;
5804
+ return /* @__PURE__ */ jsxs62("div", { className: "ss-w-lb2", children: [
5805
+ /* @__PURE__ */ jsxs62("div", { className: "ss-w-seg", children: [
5806
+ /* @__PURE__ */ jsx69(
5591
5807
  "button",
5592
5808
  {
5593
5809
  type: "button",
@@ -5597,7 +5813,7 @@ function Leaderboard({
5597
5813
  children: ui.leaderboardThisWeek
5598
5814
  }
5599
5815
  ),
5600
- /* @__PURE__ */ jsx68(
5816
+ /* @__PURE__ */ jsx69(
5601
5817
  "button",
5602
5818
  {
5603
5819
  type: "button",
@@ -5608,43 +5824,63 @@ function Leaderboard({
5608
5824
  }
5609
5825
  )
5610
5826
  ] }),
5611
- /* @__PURE__ */ jsx68("div", { className: "ss-w-lb2-rows", children: segment === "weekly" ? data.weeklyTop.map((row) => /* @__PURE__ */ jsx68(
5612
- LeaderboardWeeklyRow,
5827
+ isEmpty ? /* @__PURE__ */ jsx69(
5828
+ LeaderboardEmpty,
5613
5829
  {
5614
- row,
5615
- isMe: row.operatorUserId === data.myWeeklyRow?.operatorUserId
5616
- },
5617
- row.operatorUserId
5618
- )) : data.allTimeTop.map((row) => /* @__PURE__ */ jsx68(
5619
- LeaderboardAllTimeRow,
5620
- {
5621
- row,
5622
- isMe: row.operatorUserId === data.myAllTimeRow?.operatorUserId
5623
- },
5624
- row.operatorUserId
5625
- )) }),
5626
- /* @__PURE__ */ jsx68("div", { className: "ss-w-kitline", children: "\u{1F3BD}" }),
5627
- myRow != null && (offBoard ? /* @__PURE__ */ jsx68("div", { className: "ss-w-lbgap", children: ui.leaderboardOffBoard }) : /* @__PURE__ */ jsxs61("div", { className: "ss-w-lb2-rows", children: [
5628
- segment === "weekly" && data.myWeeklyRow && /* @__PURE__ */ jsx68(LeaderboardWeeklyRow, { row: data.myWeeklyRow, isMe: true }),
5629
- segment === "alltime" && data.myAllTimeRow && /* @__PURE__ */ jsx68(LeaderboardAllTimeRow, { row: data.myAllTimeRow, isMe: true })
5630
- ] })),
5631
- segment === "alltime" && data.myAllTimeRow && !offBoard && /* @__PURE__ */ jsx68("div", { className: "ss-w-lb2-rows", children: /* @__PURE__ */ jsx68("div", { className: "ss-w-lb2-row", children: /* @__PURE__ */ jsx68("span", { className: "ss-w-lb2-handle", children: formatPoints(data.allTimeTop.reduce((s, r) => s + r.allTimePoints, 0)) }) }) })
5830
+ segment,
5831
+ lastWeek: data.lastWeek,
5832
+ weeklyPrize: data.weeklyPrize,
5833
+ onPlay,
5834
+ ui
5835
+ }
5836
+ ) : /* @__PURE__ */ jsxs62(Fragment16, { children: [
5837
+ /* @__PURE__ */ jsx69("div", { className: "ss-w-lb2-rows", children: segment === "weekly" ? data.weeklyTop.map((row) => /* @__PURE__ */ jsx69(
5838
+ LeaderboardWeeklyRow,
5839
+ {
5840
+ row,
5841
+ isMe: row.operatorUserId === data.myWeeklyRow?.operatorUserId
5842
+ },
5843
+ row.operatorUserId
5844
+ )) : data.allTimeTop.map((row) => /* @__PURE__ */ jsx69(
5845
+ LeaderboardAllTimeRow,
5846
+ {
5847
+ row,
5848
+ isMe: row.operatorUserId === data.myAllTimeRow?.operatorUserId
5849
+ },
5850
+ row.operatorUserId
5851
+ )) }),
5852
+ /* @__PURE__ */ jsx69("div", { className: "ss-w-kitline", children: "\u{1F3BD}" }),
5853
+ myRow != null && (offBoard ? /* @__PURE__ */ jsx69("div", { className: "ss-w-lbgap", children: ui.leaderboardOffBoard }) : /* @__PURE__ */ jsxs62("div", { className: "ss-w-lb2-rows", children: [
5854
+ segment === "weekly" && data.myWeeklyRow && /* @__PURE__ */ jsx69(LeaderboardWeeklyRow, { row: data.myWeeklyRow, isMe: true }),
5855
+ segment === "alltime" && data.myAllTimeRow && /* @__PURE__ */ jsx69(LeaderboardAllTimeRow, { row: data.myAllTimeRow, isMe: true })
5856
+ ] })),
5857
+ segment === "alltime" && data.myAllTimeRow && !offBoard && /* @__PURE__ */ jsx69("div", { className: "ss-w-lb2-rows", children: /* @__PURE__ */ jsx69("div", { className: "ss-w-lb2-row", children: /* @__PURE__ */ jsx69("span", { className: "ss-w-lb2-handle", children: formatPoints(data.allTimeTop.reduce((s, r) => s + r.allTimePoints, 0)) }) }) })
5858
+ ] })
5632
5859
  ] });
5633
5860
  }
5634
5861
 
5635
5862
  // src/components/LeaderboardPanel.tsx
5636
- import { jsx as jsx69 } from "react/jsx-runtime";
5637
- function LeaderboardPanel({ loggedIn, data, ui }) {
5638
- if (!loggedIn) return /* @__PURE__ */ jsx69(GamesLoginWall, { ui });
5639
- if (data === null) return /* @__PURE__ */ jsx69("div", { className: "ss-w-mon-list" });
5640
- return /* @__PURE__ */ jsx69("div", { className: "ss-w-mon-list", children: /* @__PURE__ */ jsx69(Leaderboard, { data, ui }) });
5863
+ import { jsx as jsx70 } from "react/jsx-runtime";
5864
+ var EMPTY_PAYLOAD = {
5865
+ week: "",
5866
+ weeklyTop: [],
5867
+ myWeeklyRow: null,
5868
+ allTimeTop: [],
5869
+ myAllTimeRow: null,
5870
+ weeklyPrize: null,
5871
+ lastWeek: null
5872
+ };
5873
+ function LeaderboardPanel({ loggedIn, data, loading, onPlay, ui }) {
5874
+ if (!loggedIn) return /* @__PURE__ */ jsx70(GamesLoginWall, { ui });
5875
+ if (data === null && loading) return /* @__PURE__ */ jsx70("div", { className: "ss-w-mon-list" });
5876
+ return /* @__PURE__ */ jsx70("div", { className: "ss-w-mon-list", children: /* @__PURE__ */ jsx70(Leaderboard, { data: data ?? EMPTY_PAYLOAD, ui, onPlay }) });
5641
5877
  }
5642
5878
 
5643
5879
  // src/components/ChatPanel.tsx
5644
- import { jsx as jsx70, jsxs as jsxs62 } from "react/jsx-runtime";
5880
+ import { jsx as jsx71, jsxs as jsxs63 } from "react/jsx-runtime";
5645
5881
  var FULLSCREEN_QUERY = "(max-width: 639px)";
5646
5882
  function useIsModal() {
5647
- const [modal, setModal] = useState32(false);
5883
+ const [modal, setModal] = useState33(false);
5648
5884
  useEffect14(() => {
5649
5885
  if (typeof window === "undefined" || typeof window.matchMedia !== "function") return;
5650
5886
  const mql = window.matchMedia(FULLSCREEN_QUERY);
@@ -5672,8 +5908,8 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
5672
5908
  useEffect14(() => {
5673
5909
  if (monitor && monitor.activeTab !== "chat" && state.isStreaming) monitor.markChatActivity();
5674
5910
  }, [monitor, state.isStreaming, state.messages.length]);
5675
- return /* @__PURE__ */ jsxs62("div", { className: "ss-w-panel", role: "dialog", "aria-modal": isModal, "aria-label": ui.chatDialogLabel, children: [
5676
- /* @__PURE__ */ jsx70(
5911
+ return /* @__PURE__ */ jsxs63("div", { className: "ss-w-panel", role: "dialog", "aria-modal": isModal, "aria-label": ui.chatDialogLabel, children: [
5912
+ /* @__PURE__ */ jsx71(
5677
5913
  ChatHeader,
5678
5914
  {
5679
5915
  onClose: close,
@@ -5686,7 +5922,7 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
5686
5922
  moreOptionsLabel: ui.moreOptions
5687
5923
  }
5688
5924
  ),
5689
- monitor && /* @__PURE__ */ jsx70(
5925
+ monitor && /* @__PURE__ */ jsx71(
5690
5926
  TabBar,
5691
5927
  {
5692
5928
  monitor,
@@ -5698,19 +5934,28 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
5698
5934
  gamesEnabled: gamesResult?.enabled ?? false
5699
5935
  }
5700
5936
  ),
5701
- /* @__PURE__ */ jsx70(
5937
+ /* @__PURE__ */ jsx71(
5702
5938
  "div",
5703
5939
  {
5704
5940
  style: !monitor || monitor.activeTab === "chat" ? { display: "contents" } : { position: "absolute", inset: 0, visibility: "hidden", display: "flex", flexDirection: "column" },
5705
- children: /* @__PURE__ */ jsx70(MessageList, { controller, ui, slip, onDashboardTap, monitor })
5941
+ children: /* @__PURE__ */ jsx71(MessageList, { controller, ui, slip, onDashboardTap, monitor })
5942
+ }
5943
+ ),
5944
+ monitor && discovery && monitor.activeTab === "today" && /* @__PURE__ */ jsx71(TodayPanel, { discovery, ui, monitor }),
5945
+ monitor && monitor.activeTab === "following" && /* @__PURE__ */ jsx71(MatchesPanel, { monitor, ui, slip }),
5946
+ monitor && monitor.activeTab === "odds" && /* @__PURE__ */ jsx71(OddsPanel, { monitor, ui, slip }),
5947
+ monitor && monitor.activeTab === "games" && gamesResult && /* @__PURE__ */ jsx71(GamesPanel, { loggedIn: !!loggedIn, games: gamesResult.games, ui, conversation }),
5948
+ monitor && monitor.activeTab === "leaderboard" && leaderboardResult && /* @__PURE__ */ jsx71(
5949
+ LeaderboardPanel,
5950
+ {
5951
+ loggedIn: !!loggedIn,
5952
+ data: leaderboardResult.data,
5953
+ loading: leaderboardResult.loading,
5954
+ onPlay: () => monitor.setActiveTab("games"),
5955
+ ui
5706
5956
  }
5707
5957
  ),
5708
- monitor && discovery && monitor.activeTab === "today" && /* @__PURE__ */ jsx70(TodayPanel, { discovery, ui, monitor }),
5709
- monitor && monitor.activeTab === "following" && /* @__PURE__ */ jsx70(MatchesPanel, { monitor, ui, slip }),
5710
- monitor && monitor.activeTab === "odds" && /* @__PURE__ */ jsx70(OddsPanel, { monitor, ui, slip }),
5711
- monitor && monitor.activeTab === "games" && gamesResult && /* @__PURE__ */ jsx70(GamesPanel, { loggedIn: !!loggedIn, games: gamesResult.games, ui, conversation }),
5712
- monitor && monitor.activeTab === "leaderboard" && leaderboardResult && /* @__PURE__ */ jsx70(LeaderboardPanel, { loggedIn: !!loggedIn, data: leaderboardResult.data, ui }),
5713
- /* @__PURE__ */ jsx70(ChatInput, { placeholder: ui.placeholder, streaming: state.isStreaming, onSend: handleSend, onStop: stop, stopLabel: ui.stopResponse, sendLabel: ui.sendMessage })
5958
+ (!monitor || monitor.activeTab !== "games" && monitor.activeTab !== "leaderboard") && /* @__PURE__ */ jsx71(ChatInput, { placeholder: ui.placeholder, streaming: state.isStreaming, onSend: handleSend, onStop: stop, stopLabel: ui.stopResponse, sendLabel: ui.sendMessage })
5714
5959
  ] });
5715
5960
  }
5716
5961
 
@@ -6664,6 +6909,20 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
6664
6909
  /* Off-board treatment: dashed pill indicating rank is outside top N */
6665
6910
  .ss-w-lbgap { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 12px; font-size: 11.5px; color: var(--ss-w-faint); border: 1px dashed var(--ss-w-line); border-radius: 10px; }
6666
6911
 
6912
+ /* ---- Leaderboard empty / weekly-reset default state ---- */
6913
+ .ss-w-lb-empty { display: flex; flex-direction: column; gap: 12px; flex: 1; }
6914
+ .ss-w-lb-empty-hero { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 20px 16px; border: 1px dashed color-mix(in srgb, var(--ss-w-cta) 30%, var(--ss-w-line)); border-radius: 14px; background: color-mix(in srgb, var(--ss-w-cta) 6%, var(--ss-w-panel)); }
6915
+ .ss-w-lb-empty--alltime { align-items: center; justify-content: center; text-align: center; padding: 24px 16px; }
6916
+ .ss-w-lb-empty-icon { font-size: 30px; line-height: 1; }
6917
+ .ss-w-lb-empty-title { margin: 2px 0 0; font-size: 16px; font-weight: 800; color: var(--ss-w-ink); }
6918
+ .ss-w-lb-empty-body { margin: 0; max-width: 30ch; font-size: 12.5px; line-height: 1.4; color: var(--ss-w-faint); }
6919
+ .ss-w-lb-empty-cta { margin-top: 6px; border: none; border-radius: 10px; padding: 9px 18px; font: inherit; font-size: 13px; font-weight: 700; color: var(--ss-w-cta-ink); background: var(--ss-w-cta); cursor: pointer; }
6920
+ .ss-w-lb-empty-cta:hover { filter: brightness(1.04); }
6921
+ .ss-w-lb-last { display: flex; align-items: center; gap: 7px; padding-top: 10px; border-top: 1px solid var(--ss-w-line); font-size: 11px; }
6922
+ .ss-w-lb-last-label { text-transform: uppercase; letter-spacing: .05em; font-weight: 700; color: var(--ss-w-faint); }
6923
+ .ss-w-lb-last-handle { flex: 1; min-width: 0; font-weight: 600; color: var(--ss-w-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
6924
+ .ss-w-lb-last-points { flex: none; font-weight: 750; font-variant-numeric: tabular-nums; color: var(--ss-w-ink); }
6925
+
6667
6926
  /* ---- Mystery Tiger game screen (D3) ---- */
6668
6927
  .ss-w-gt { display: flex; flex-direction: column; gap: 10px; }
6669
6928
  /* Typeahead wrapper: relative so the dropdown can position under it */
@@ -6723,9 +6982,9 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
6723
6982
  .ss-w-hlbtns { display: flex; flex-direction: column; gap: 6px; justify-content: center; }
6724
6983
  .ss-w-hl-or { text-align: center; font-size: 11px; font-weight: 700; color: var(--ss-w-faint); }
6725
6984
  .ss-w-hlbtn { font: inherit; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; border-radius: 9px; padding: 10px 12px; cursor: pointer; border: 1px solid var(--ss-w-line); white-space: nowrap; transition: border-color .1s, background .1s; }
6726
- .ss-w-hlbtn--up { background: color-mix(in srgb, var(--ss-w-accent) 12%, var(--ss-w-panel)); color: var(--ss-w-accent); border-color: color-mix(in srgb, var(--ss-w-accent) 40%, var(--ss-w-line)); }
6727
- .ss-w-hlbtn--dn { background: var(--ss-w-panel); color: var(--ss-w-ink); }
6728
- .ss-w-hlbtn:hover:not(:disabled) { border-color: var(--ss-w-accent); }
6985
+ /* Both options are neutral until picked \u2014 an amber default read as "already selected". */
6986
+ .ss-w-hlbtn--up, .ss-w-hlbtn--dn { background: var(--ss-w-panel); color: var(--ss-w-ink); }
6987
+ .ss-w-hlbtn:hover:not(:disabled) { border-color: var(--ss-w-accent); background: color-mix(in srgb, var(--ss-w-accent) 10%, var(--ss-w-panel)); color: var(--ss-w-accent); }
6729
6988
  .ss-w-hlbtn:disabled { opacity: .5; cursor: not-allowed; }
6730
6989
  /* Run-over terminal panel */
6731
6990
  .ss-w-hl-over { background: var(--ss-w-panel); border: 1px solid var(--ss-w-line); border-radius: 14px; padding: 16px; text-align: center; display: flex; flex-direction: column; gap: 5px; }
@@ -6752,18 +7011,18 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
6752
7011
  .ss-w-cpath-sub { font-size: 11px; color: var(--ss-w-faint); margin-top: 4px; }
6753
7012
  .ss-w-cpath-left { margin-left: auto; flex: none; font-size: 11px; font-weight: 700; color: var(--ss-w-accent); background: color-mix(in srgb, var(--ss-w-accent) 11%, var(--ss-w-panel)); border: 1px solid color-mix(in srgb, var(--ss-w-accent) 22%, var(--ss-w-line)); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
6754
7013
  /* Career sequence \u2014 horizontal crests with arrows */
6755
- .ss-w-cpath-seq { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px; background: var(--ss-w-panel); border: 1px solid var(--ss-w-line); border-radius: 14px; padding: 13px 11px; }
6756
- .ss-w-cpath-arrow { align-self: center; color: var(--ss-w-faint); font-size: 13px; padding-top: 10px; }
7014
+ .ss-w-cpath-seq { display: flex; flex-wrap: nowrap; align-items: flex-start; gap: 4px; background: var(--ss-w-panel); border: 1px solid var(--ss-w-line); border-radius: 14px; padding: 13px 11px; overflow-x: auto; overscroll-behavior-x: contain; }
7015
+ .ss-w-cpath-arrow { align-self: center; flex: none; color: var(--ss-w-faint); font-size: 13px; padding-top: 10px; }
6757
7016
  /* Single club \u2014 small vertical card */
6758
- .ss-w-cpath-club { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 58px; }
7017
+ .ss-w-cpath-club { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 56px; flex: none; }
6759
7018
  .ss-w-cpath-crest { width: 34px; height: 34px; object-fit: contain; flex: none; border-radius: 8px; }
6760
7019
  .ss-w-cpath-crest--fallback { background: var(--ss-w-bubble); border: 1px solid var(--ss-w-line); display: grid; place-items: center; font-size: 9px; font-weight: 800; letter-spacing: .02em; color: var(--ss-w-faint); }
6761
- .ss-w-cpath-club-name { font-size: 9px; font-weight: 600; color: var(--ss-w-ink); text-align: center; line-height: 1.1; overflow-wrap: anywhere; }
7020
+ .ss-w-cpath-club-name { font-size: 9px; font-weight: 600; color: var(--ss-w-ink); text-align: center; line-height: 1.15; max-width: 56px; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
6762
7021
  .ss-w-cpath-spell-yr { font-size: 8px; color: var(--ss-w-faint); font-weight: 500; white-space: nowrap; }
6763
7022
  .ss-w-cpath-loan-badge { font-size: 7.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 0 5px; border-radius: 999px; background: color-mix(in srgb, var(--ss-w-accent) 15%, var(--ss-w-panel)); color: var(--ss-w-accent); border: 1px solid color-mix(in srgb, var(--ss-w-accent) 30%, var(--ss-w-line)); }
6764
7023
  .ss-w-cpath-club--loan .ss-w-cpath-crest { border: 1px dashed color-mix(in srgb, var(--ss-w-accent) 40%, var(--ss-w-line)); }
6765
7024
  /* Hidden clubs chip */
6766
- .ss-w-cpath-hidden { align-self: center; font-size: 9px; font-weight: 700; color: var(--ss-w-faint); background: var(--ss-w-bubble); border: 1px dashed var(--ss-w-line); border-radius: 8px; padding: 6px 8px; }
7025
+ .ss-w-cpath-hidden { align-self: center; flex: none; white-space: nowrap; font-size: 9px; font-weight: 700; color: var(--ss-w-faint); background: var(--ss-w-bubble); border: 1px dashed var(--ss-w-line); border-radius: 8px; padding: 6px 8px; }
6767
7026
  /* Hint line */
6768
7027
  .ss-w-cpath-hint { font-size: 11.5px; color: var(--ss-w-faint); text-align: center; padding: 6px 10px; border-radius: 10px; background: color-mix(in srgb, var(--ss-w-accent) 8%, var(--ss-w-panel)); border: 1px dashed color-mix(in srgb, var(--ss-w-accent) 30%, var(--ss-w-line)); }
6769
7028
  /* Terminal outcome */
@@ -6827,23 +7086,18 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
6827
7086
  .ss-w-gxi-title { font-size: 18px; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; color: var(--ss-w-ink); line-height: 1; }
6828
7087
  .ss-w-gxi-sub { font-size: 11px; color: var(--ss-w-faint); margin-top: 4px; }
6829
7088
  .ss-w-gxi-left { margin-left: auto; flex: none; font-size: 11px; font-weight: 700; color: var(--ss-w-accent); background: color-mix(in srgb, var(--ss-w-accent) 11%, var(--ss-w-panel)); border: 1px solid color-mix(in srgb, var(--ss-w-accent) 22%, var(--ss-w-line)); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
6830
- /* Positions pitch: compact slot grid */
6831
- .ss-w-gxi-pitch { display: flex; flex-wrap: wrap; gap: 5px; }
6832
- .ss-w-gxi-pslot { display: flex; flex-direction: column; align-items: center; gap: 2px; background: var(--ss-w-bubble); border: 1px solid var(--ss-w-line); border-radius: 8px; padding: 6px 10px; min-width: 52px; }
6833
- .ss-w-gxi-pslot-pos { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--ss-w-accent); }
6834
- .ss-w-gxi-pslot-nat { font-size: 10px; color: var(--ss-w-faint); font-weight: 500; text-align: center; line-height: 1.2; }
7089
+ /* Pitch: a flag per slot laid out in formation rows on a green field */
7090
+ .ss-w-gxi-pitch { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; padding: 16px 10px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--ss-w-correct) 22%, var(--ss-w-line)); background: linear-gradient(180deg, color-mix(in srgb, var(--ss-w-correct) 10%, var(--ss-w-panel)), color-mix(in srgb, var(--ss-w-correct) 4%, var(--ss-w-panel))); }
7091
+ .ss-w-gxi-prow { display: flex; justify-content: space-around; align-items: center; gap: 8px; }
7092
+ .ss-w-gxi-flag { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 19px; line-height: 1; background: var(--ss-w-panel); border: 1px solid var(--ss-w-line); box-shadow: 0 1px 3px rgba(0,0,0,.14); overflow: hidden; }
7093
+ /* Wrong-guess trail */
7094
+ .ss-w-gxi-wrong { display: flex; flex-wrap: wrap; gap: 6px; }
7095
+ .ss-w-gxi-wrong-pill { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--ss-w-wrong) 10%, var(--ss-w-panel)); border: 1px solid var(--ss-w-line); color: var(--ss-w-faint); text-decoration: line-through; }
6835
7096
  /* Earned reveals */
6836
7097
  .ss-w-gxi-reveals { display: flex; flex-direction: column; gap: 4px; }
6837
7098
  .ss-w-gxi-reveal { display: flex; align-items: center; gap: 6px; padding: 7px 10px; background: color-mix(in srgb, var(--ss-w-cta) 8%, var(--ss-w-panel)); border: 1px solid color-mix(in srgb, var(--ss-w-cta) 22%, var(--ss-w-line)); border-radius: 8px; }
6838
7099
  .ss-w-gxi-reveal-slot { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ss-w-cta-ink, #1b1300); background: var(--ss-w-cta); border-radius: 6px; padding: 1px 6px; flex: none; }
6839
7100
  .ss-w-gxi-reveal-val { font-size: 12.5px; font-weight: 600; color: var(--ss-w-ink); }
6840
- /* Team pool: responsive flex grid of buttons */
6841
- .ss-w-gxi-pool { display: flex; flex-wrap: wrap; gap: 6px; }
6842
- .ss-w-gxi-team-btn { font: inherit; font-size: 12.5px; font-weight: 650; border-radius: 10px; padding: 9px 14px; cursor: pointer; border: 1.5px solid var(--ss-w-line); background: var(--ss-w-panel); color: var(--ss-w-ink); transition: background .1s, border-color .1s; }
6843
- .ss-w-gxi-team-btn:hover:not(:disabled) { background: var(--ss-w-bubble); border-color: var(--ss-w-accent); }
6844
- .ss-w-gxi-team-btn:disabled { opacity: .5; cursor: not-allowed; }
6845
- .ss-w-gxi-team-btn--correct { background: color-mix(in srgb, var(--ss-w-correct) 14%, var(--ss-w-panel)); border-color: color-mix(in srgb, var(--ss-w-correct) 35%, var(--ss-w-line)); color: var(--ss-w-correct); }
6846
- .ss-w-gxi-team-btn--wrong { background: color-mix(in srgb, var(--ss-w-wrong) 8%, var(--ss-w-panel)); text-decoration: line-through; opacity: .65; }
6847
7101
  /* Terminal outcome banner */
6848
7102
  .ss-w-gxi-banner { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 16px 12px; border-radius: 14px; text-align: center; }
6849
7103
  .ss-w-gxi-banner--solved { background: color-mix(in srgb, var(--ss-w-correct) 12%, var(--ss-w-panel)); border: 1px solid color-mix(in srgb, var(--ss-w-correct) 28%, var(--ss-w-line)); }
@@ -6995,7 +7249,7 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
6995
7249
  `;
6996
7250
 
6997
7251
  // src/StatsWidget.tsx
6998
- import { jsx as jsx71 } from "react/jsx-runtime";
7252
+ import { jsx as jsx72 } from "react/jsx-runtime";
6999
7253
  function buildClient(props) {
7000
7254
  try {
7001
7255
  if ("client" in props && props.client) {
@@ -7036,7 +7290,7 @@ function StatsWidget(props) {
7036
7290
  }, []);
7037
7291
  const convStorageKey = `ss-w-conv:${cfg?.operatorId ?? ""}:${cfg?.userContext?.operatorUserId ?? "anon"}`;
7038
7292
  const controller = useChatStream(built?.conversation ?? emptyConversation(), ui.starters, built ? ui.greetingMessage : void 0, convStorageKey);
7039
- const [hasToday, setHasToday] = useState33(false);
7293
+ const [hasToday, setHasToday] = useState34(false);
7040
7294
  const monitor = useLiveMonitor({
7041
7295
  getLiveMonitor: (pins) => built ? built.conversation.getLiveMonitor(pins) : Promise.resolve(null),
7042
7296
  getMarketOdds: (matchId, dev) => built ? built.conversation.getMarketOdds(matchId, dev) : Promise.resolve(null),
@@ -7134,7 +7388,7 @@ function StatsWidget(props) {
7134
7388
  }, [built, ui.injectStyles]);
7135
7389
  if (!built) return null;
7136
7390
  const attrs = themeAttrs(ui);
7137
- return /* @__PURE__ */ jsx71(EventLogContext.Provider, { value: logger, children: /* @__PURE__ */ jsx71("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__ */ jsx71(
7391
+ return /* @__PURE__ */ jsx72(EventLogContext.Provider, { value: logger, children: /* @__PURE__ */ jsx72("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__ */ jsx72(
7138
7392
  ChatPanel,
7139
7393
  {
7140
7394
  controller,
@@ -7148,7 +7402,7 @@ function StatsWidget(props) {
7148
7402
  loggedIn: !!operatorUserId,
7149
7403
  conversation: built?.conversation ?? null
7150
7404
  }
7151
- ) : /* @__PURE__ */ jsx71(
7405
+ ) : /* @__PURE__ */ jsx72(
7152
7406
  ChatFab,
7153
7407
  {
7154
7408
  label: ui.launcherLabel,