@sensiblestats/widget-react 0.58.0 → 0.59.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 useState34 } from "react";
2
+ import { useCallback as useCallback9, useEffect as useEffect15, useMemo as useMemo3, useRef as useRef13, useState as useState35 } from "react";
3
3
  import { StatsWidgetClient } from "@sensiblestats/widget-sdk";
4
4
 
5
5
  // src/kickoff.ts
@@ -1896,7 +1896,7 @@ function ChatFab({ label, greeting, popupText, logoUrl, onOpen, onDismissPopup,
1896
1896
  }
1897
1897
 
1898
1898
  // src/components/ChatPanel.tsx
1899
- import { useEffect as useEffect14, useState as useState33 } from "react";
1899
+ import { useEffect as useEffect14, useState as useState34 } from "react";
1900
1900
 
1901
1901
  // src/components/ChatHeader.tsx
1902
1902
  import { useEffect as useEffect8, useRef as useRef8, useState as useState8 } from "react";
@@ -3999,7 +3999,7 @@ function TodayPanel({ discovery, ui, monitor }) {
3999
3999
  }
4000
4000
 
4001
4001
  // src/components/GamesPanel.tsx
4002
- import { useState as useState31 } from "react";
4002
+ import { useState as useState32 } from "react";
4003
4003
 
4004
4004
  // src/components/GamesLoginWall.tsx
4005
4005
  import { jsx as jsx52 } from "react/jsx-runtime";
@@ -4133,7 +4133,7 @@ function GamesHub({
4133
4133
  }
4134
4134
 
4135
4135
  // src/components/GameScreenHost.tsx
4136
- import { useEffect as useEffect13, useRef as useRef12, useState as useState30 } from "react";
4136
+ import { useEffect as useEffect13, useRef as useRef12, useState as useState31 } from "react";
4137
4137
 
4138
4138
  // src/useGamePlay.ts
4139
4139
  import { useCallback as useCallback8, useRef as useRef11, useState as useState22 } from "react";
@@ -4208,7 +4208,7 @@ function useGamePlay(conversation, { gameId, gameDay, fixtureId, refresh }) {
4208
4208
  }
4209
4209
 
4210
4210
  // src/components/games/MysteryTigerGame.tsx
4211
- import { useState as useState23, useId as useId2 } from "react";
4211
+ import { useState as useState24, useId as useId2 } from "react";
4212
4212
 
4213
4213
  // src/components/games/nationFlags.ts
4214
4214
  var FLAGS = {
@@ -4291,8 +4291,29 @@ function nationalityFlag(nationality) {
4291
4291
  return FLAGS[key] ?? nationality.slice(0, 3).toUpperCase();
4292
4292
  }
4293
4293
 
4294
+ // src/components/games/PlayerAvatar.tsx
4295
+ import { useState as useState23 } from "react";
4296
+ import { jsx as jsx55 } from "react/jsx-runtime";
4297
+ function initialsOf(name) {
4298
+ const parts = name.trim().split(/\s+/).filter(Boolean);
4299
+ const first = parts[0];
4300
+ if (!first) return "?";
4301
+ const last = parts[parts.length - 1];
4302
+ if (parts.length === 1 || !last) return first.slice(0, 2).toUpperCase();
4303
+ return ((first[0] ?? "") + (last[0] ?? "")).toUpperCase();
4304
+ }
4305
+ function PlayerAvatar({
4306
+ name,
4307
+ imagePath,
4308
+ className
4309
+ }) {
4310
+ const [failed, setFailed] = useState23(false);
4311
+ const showImage = Boolean(imagePath) && !failed;
4312
+ return /* @__PURE__ */ jsx55("div", { className, "aria-hidden": "true", children: showImage ? /* @__PURE__ */ jsx55("img", { src: imagePath, alt: "", loading: "lazy", onError: () => setFailed(true) }) : /* @__PURE__ */ jsx55("span", { className: "ss-w-av-initials", children: initialsOf(name) }) });
4313
+ }
4314
+
4294
4315
  // src/components/games/MysteryTigerGame.tsx
4295
- import { Fragment as Fragment9, jsx as jsx55, jsxs as jsxs49 } from "react/jsx-runtime";
4316
+ import { Fragment as Fragment9, jsx as jsx56, jsxs as jsxs49 } from "react/jsx-runtime";
4296
4317
  function parseClientState(json) {
4297
4318
  if (!json) return null;
4298
4319
  try {
@@ -4315,6 +4336,14 @@ var ATTR_KEYS = [
4315
4336
  "shirtNumber",
4316
4337
  "apps"
4317
4338
  ];
4339
+ var PROFILE_ROWS = [
4340
+ { key: "position", label: "Position" },
4341
+ { key: "nationality", label: "Nationality" },
4342
+ { key: "age", label: "Age" },
4343
+ { key: "shirtNumber", label: "Jersey number" },
4344
+ { key: "apps", label: "Match count" }
4345
+ ];
4346
+ var MAX_GUESSES = 6;
4318
4347
  function verdictGlyph(v) {
4319
4348
  if (v.verdict === "exact") return "\u2713";
4320
4349
  if (v.verdict === "miss") return "\u2717";
@@ -4337,12 +4366,17 @@ function MysteryTigerGame({
4337
4366
  submitting,
4338
4367
  onSubmit
4339
4368
  }) {
4340
- const [query, setQuery] = useState23("");
4369
+ const [query, setQuery] = useState24("");
4370
+ const [portraitFailed, setPortraitFailed] = useState24(false);
4341
4371
  const inputId = useId2();
4342
4372
  const clientState = parseClientState(result?.clientStateJson);
4343
4373
  const guessResults = clientState?.guessResults ?? [];
4344
4374
  const alreadyGuessedIds = new Set(guessResults.map((g) => g.playerId));
4375
+ const shirtEnabled = config?.shirtTileEnabled ?? clientState?.shirtTileEnabled ?? false;
4345
4376
  const isOver = result?.alreadyPlayed === true || clientState?.solved === true || clientState?.failed === true;
4377
+ const guessesUsed = clientState?.guessesUsed ?? guessResults.length;
4378
+ const revealPhoto = isOver && Boolean(clientState?.revealedPlayerImagePath) && !portraitFailed;
4379
+ const revealName = isOver ? clientState?.revealedPlayerName : void 0;
4346
4380
  const filtered = config && !isOver ? config.squadPlayers.filter(
4347
4381
  (p) => !alreadyGuessedIds.has(p.id) && p.name.toLowerCase().includes(query.toLowerCase())
4348
4382
  ) : [];
@@ -4354,12 +4388,12 @@ function MysteryTigerGame({
4354
4388
  onSubmit(JSON.stringify({ guesses: newGuesses }));
4355
4389
  }
4356
4390
  return /* @__PURE__ */ jsxs49("div", { className: "ss-w-gt", "data-testid": "game-screen-mystery-tiger", children: [
4357
- !config && /* @__PURE__ */ jsx55("div", { className: "ss-w-gscreen-body", children: "Loading\u2026" }),
4391
+ !config && /* @__PURE__ */ jsx56("div", { className: "ss-w-gscreen-body", children: "Loading\u2026" }),
4358
4392
  config && /* @__PURE__ */ jsxs49(Fragment9, { children: [
4359
4393
  /* @__PURE__ */ jsxs49("div", { className: "ss-w-gt-head", children: [
4360
4394
  /* @__PURE__ */ jsxs49("div", { children: [
4361
- /* @__PURE__ */ jsx55("div", { className: "ss-w-gt-title", children: "Mystery Tiger" }),
4362
- /* @__PURE__ */ jsx55("div", { className: "ss-w-gt-sub", children: "Guess today's squad player" })
4395
+ /* @__PURE__ */ jsx56("div", { className: "ss-w-gt-title", children: "Mystery Tiger" }),
4396
+ /* @__PURE__ */ jsx56("div", { className: "ss-w-gt-sub", children: "Guess today's squad player" })
4363
4397
  ] }),
4364
4398
  clientState && !isOver && /* @__PURE__ */ jsxs49("span", { className: "ss-w-gt-left", children: [
4365
4399
  clientState.guessesRemaining,
@@ -4367,18 +4401,36 @@ function MysteryTigerGame({
4367
4401
  ] })
4368
4402
  ] }),
4369
4403
  /* @__PURE__ */ jsxs49("div", { className: "ss-w-gscroll", children: [
4404
+ /* @__PURE__ */ jsxs49("div", { className: `ss-w-gt-card${isOver ? " ss-w-gt-card--reveal" : ""}`, children: [
4405
+ /* @__PURE__ */ jsx56("div", { className: "ss-w-gt-sil", children: revealPhoto ? /* @__PURE__ */ jsx56(
4406
+ "img",
4407
+ {
4408
+ src: clientState.revealedPlayerImagePath,
4409
+ alt: "",
4410
+ onError: () => setPortraitFailed(true)
4411
+ }
4412
+ ) : isOver && revealName ? /* @__PURE__ */ jsx56("span", { className: "ss-w-av-initials", children: initialsOf(revealName) }) : /* @__PURE__ */ jsxs49("svg", { viewBox: "0 0 96 118", role: "img", "aria-label": "hidden player silhouette", children: [
4413
+ /* @__PURE__ */ jsx56("circle", { cx: "48", cy: "40", r: "21", fill: "var(--ss-w-faint)" }),
4414
+ /* @__PURE__ */ jsx56("path", { d: "M8 118c0-25 18-39 40-39s40 14 40 39z", fill: "var(--ss-w-faint)" })
4415
+ ] }) }),
4416
+ !isOver && /* @__PURE__ */ jsx56("div", { className: "ss-w-gt-attrs", children: PROFILE_ROWS.filter((r) => r.key !== "shirtNumber" || shirtEnabled).map((row) => /* @__PURE__ */ jsxs49("div", { className: "ss-w-gt-attr", children: [
4417
+ /* @__PURE__ */ jsx56("span", { className: "ss-w-gt-attr-k", children: row.label }),
4418
+ /* @__PURE__ */ jsx56("span", { className: "ss-w-gt-attr-v", children: "\u2022\u2022\u2022" })
4419
+ ] }, row.key)) })
4420
+ ] }),
4421
+ !isOver && /* @__PURE__ */ jsx56("div", { className: "ss-w-gt-dots", "aria-label": `${guessesUsed} of ${MAX_GUESSES} guesses used`, children: Array.from({ length: MAX_GUESSES }).map((_, i) => /* @__PURE__ */ jsx56("i", { className: i < guessesUsed ? "ss-w-gt-dot ss-w-gt-dot--on" : "ss-w-gt-dot" }, i)) }),
4370
4422
  !isOver && /* @__PURE__ */ jsxs49("div", { className: "ss-w-gt-lead", children: [
4371
4423
  guessResults.length === 0 ? "Guess a squad player \u2014 each guess compares it to the mystery player on Pos, Nat, Age, Shirt & Apps: " : "Tiles: ",
4372
4424
  /* @__PURE__ */ jsxs49("span", { className: "ss-w-gt-key", children: [
4373
- /* @__PURE__ */ jsx55("b", { className: "ss-w-gt-key-ok", children: "\u2713" }),
4425
+ /* @__PURE__ */ jsx56("b", { className: "ss-w-gt-key-ok", children: "\u2713" }),
4374
4426
  " match \xB7 ",
4375
- /* @__PURE__ */ jsx55("b", { children: "\u25B2" }),
4427
+ /* @__PURE__ */ jsx56("b", { children: "\u25B2" }),
4376
4428
  " higher \xB7 ",
4377
- /* @__PURE__ */ jsx55("b", { children: "\u25BC" }),
4429
+ /* @__PURE__ */ jsx56("b", { children: "\u25BC" }),
4378
4430
  " lower"
4379
4431
  ] })
4380
4432
  ] }),
4381
- guessResults.length > 0 && /* @__PURE__ */ jsx55("div", { className: "ss-w-gtrows", children: guessResults.map((gr, i) => {
4433
+ guessResults.length > 0 && /* @__PURE__ */ jsx56("div", { className: "ss-w-gtrows", children: guessResults.map((gr, i) => {
4382
4434
  const player = config.squadPlayers.find((p) => p.id === gr.playerId);
4383
4435
  return /* @__PURE__ */ jsxs49("div", { className: "ss-w-gtguess", children: [
4384
4436
  /* @__PURE__ */ jsxs49("div", { className: "ss-w-gtguess-nm", children: [
@@ -4386,7 +4438,7 @@ function MysteryTigerGame({
4386
4438
  " \xB7 ",
4387
4439
  player?.name ?? `#${gr.playerId}`
4388
4440
  ] }),
4389
- /* @__PURE__ */ jsx55("div", { className: "ss-w-gtrow", children: ATTR_KEYS.map((key) => {
4441
+ /* @__PURE__ */ jsx56("div", { className: "ss-w-gtrow", children: ATTR_KEYS.map((key) => {
4390
4442
  const v = gr[key];
4391
4443
  const arrow = directionArrow(v);
4392
4444
  return /* @__PURE__ */ jsxs49(
@@ -4397,10 +4449,10 @@ function MysteryTigerGame({
4397
4449
  "data-verdict": v.verdict,
4398
4450
  "aria-label": `${ATTR_LABELS[key]}: ${v.value ?? v.verdict}${v.direction ? ` ${v.direction}` : ""}`,
4399
4451
  children: [
4400
- /* @__PURE__ */ jsx55("span", { className: "ss-w-gtile-lab", children: ATTR_LABELS[key] }),
4452
+ /* @__PURE__ */ jsx56("span", { className: "ss-w-gtile-lab", children: ATTR_LABELS[key] }),
4401
4453
  /* @__PURE__ */ jsxs49("span", { className: "ss-w-gtile-v", "aria-hidden": "true", children: [
4402
4454
  tileFace(key, v),
4403
- arrow && /* @__PURE__ */ jsx55("span", { className: "ss-w-gtile-dir", children: arrow })
4455
+ arrow && /* @__PURE__ */ jsx56("span", { className: "ss-w-gtile-dir", children: arrow })
4404
4456
  ] })
4405
4457
  ]
4406
4458
  },
@@ -4414,8 +4466,8 @@ function MysteryTigerGame({
4414
4466
  clientState.hintLine
4415
4467
  ] }),
4416
4468
  isOver && clientState && /* @__PURE__ */ jsxs49("div", { className: `ss-w-gt-banner ss-w-gt-banner--${clientState.solved ? "solved" : "failed"}`, children: [
4417
- /* @__PURE__ */ jsx55("div", { className: "ss-w-gt-banner-label", children: clientState.solved ? "\u{1F42F} You found them!" : "\u{1F614} Out of guesses" }),
4418
- clientState.revealedPlayerName && /* @__PURE__ */ jsx55("div", { className: "ss-w-gt-banner-name", children: clientState.revealedPlayerName }),
4469
+ /* @__PURE__ */ jsx56("div", { className: "ss-w-gt-banner-label", children: clientState.solved ? "\u{1F42F} You found them!" : "\u{1F614} Out of guesses" }),
4470
+ clientState.revealedPlayerName && /* @__PURE__ */ jsx56("div", { className: "ss-w-gt-banner-name", children: clientState.revealedPlayerName }),
4419
4471
  /* @__PURE__ */ jsxs49("div", { className: "ss-w-gt-banner-sub", children: [
4420
4472
  clientState.guessesUsed,
4421
4473
  " guess",
@@ -4425,7 +4477,7 @@ function MysteryTigerGame({
4425
4477
  ] })
4426
4478
  ] }),
4427
4479
  !isOver && /* @__PURE__ */ jsxs49("div", { className: "ss-w-gpin ss-w-gtta", children: [
4428
- /* @__PURE__ */ jsx55(
4480
+ /* @__PURE__ */ jsx56(
4429
4481
  "input",
4430
4482
  {
4431
4483
  id: inputId,
@@ -4441,7 +4493,7 @@ function MysteryTigerGame({
4441
4493
  "aria-autocomplete": "list"
4442
4494
  }
4443
4495
  ),
4444
- query.length > 0 && filtered.length > 0 && /* @__PURE__ */ jsx55("div", { className: "ss-w-gtta-drop", role: "listbox", children: filtered.map((p) => /* @__PURE__ */ jsx55(
4496
+ query.length > 0 && filtered.length > 0 && /* @__PURE__ */ jsx56("div", { className: "ss-w-gtta-drop", role: "listbox", children: filtered.map((p) => /* @__PURE__ */ jsx56(
4445
4497
  "div",
4446
4498
  {
4447
4499
  className: "ss-w-gtta-opt",
@@ -4462,7 +4514,7 @@ function MysteryTigerGame({
4462
4514
  }
4463
4515
 
4464
4516
  // src/components/games/HigherOrLowerGame.tsx
4465
- import { Fragment as Fragment10, jsx as jsx56, jsxs as jsxs50 } from "react/jsx-runtime";
4517
+ import { Fragment as Fragment10, jsx as jsx57, jsxs as jsxs50 } from "react/jsx-runtime";
4466
4518
  var POINTS_PER_CORRECT = 10;
4467
4519
  function parseClientState2(json) {
4468
4520
  if (!json) return null;
@@ -4495,11 +4547,11 @@ function HigherOrLowerGame({
4495
4547
  onSubmit(JSON.stringify({ answers: newAnswers }));
4496
4548
  }
4497
4549
  return /* @__PURE__ */ jsxs50("div", { className: "ss-w-hl", "data-testid": "game-screen-higher-or-lower", children: [
4498
- !config && /* @__PURE__ */ jsx56("div", { className: "ss-w-gscreen-body", children: "Loading\u2026" }),
4550
+ !config && /* @__PURE__ */ jsx57("div", { className: "ss-w-gscreen-body", children: "Loading\u2026" }),
4499
4551
  config && /* @__PURE__ */ jsxs50(Fragment10, { children: [
4500
4552
  /* @__PURE__ */ jsxs50("div", { className: "ss-w-hl-head", children: [
4501
4553
  /* @__PURE__ */ jsxs50("div", { children: [
4502
- /* @__PURE__ */ jsx56("div", { className: "ss-w-hl-title", children: "Higher or Lower" }),
4554
+ /* @__PURE__ */ jsx57("div", { className: "ss-w-hl-title", children: "Higher or Lower" }),
4503
4555
  /* @__PURE__ */ jsxs50("div", { className: "ss-w-hl-sub", children: [
4504
4556
  config.statLabel,
4505
4557
  " \xB7 ",
@@ -4519,13 +4571,20 @@ function HigherOrLowerGame({
4519
4571
  ] }),
4520
4572
  /* @__PURE__ */ jsxs50("div", { className: "ss-w-hlpair", children: [
4521
4573
  /* @__PURE__ */ jsxs50("div", { className: "ss-w-hlpc", children: [
4522
- /* @__PURE__ */ jsx56("div", { className: "ss-w-hlpc-av", "aria-hidden": "true", children: "\u26BD" }),
4523
- /* @__PURE__ */ jsx56("div", { className: "ss-w-hlpc-name", children: currentPair.playerAName }),
4524
- /* @__PURE__ */ jsx56("div", { className: "ss-w-hlpc-stat", children: config.statLabel }),
4525
- /* @__PURE__ */ jsx56("div", { className: "ss-w-hlpc-val", children: currentPair.playerAValue })
4574
+ /* @__PURE__ */ jsx57(
4575
+ PlayerAvatar,
4576
+ {
4577
+ className: "ss-w-hlpc-av",
4578
+ name: currentPair.playerAName,
4579
+ imagePath: currentPair.playerAImagePath
4580
+ }
4581
+ ),
4582
+ /* @__PURE__ */ jsx57("div", { className: "ss-w-hlpc-name", children: currentPair.playerAName }),
4583
+ /* @__PURE__ */ jsx57("div", { className: "ss-w-hlpc-stat", children: config.statLabel }),
4584
+ /* @__PURE__ */ jsx57("div", { className: "ss-w-hlpc-val", children: currentPair.playerAValue })
4526
4585
  ] }),
4527
4586
  /* @__PURE__ */ jsxs50("div", { className: "ss-w-hlbtns", children: [
4528
- /* @__PURE__ */ jsx56(
4587
+ /* @__PURE__ */ jsx57(
4529
4588
  "button",
4530
4589
  {
4531
4590
  type: "button",
@@ -4535,8 +4594,8 @@ function HigherOrLowerGame({
4535
4594
  children: "Higher \u25B2"
4536
4595
  }
4537
4596
  ),
4538
- /* @__PURE__ */ jsx56("span", { className: "ss-w-hl-or", children: "or" }),
4539
- /* @__PURE__ */ jsx56(
4597
+ /* @__PURE__ */ jsx57("span", { className: "ss-w-hl-or", children: "or" }),
4598
+ /* @__PURE__ */ jsx57(
4540
4599
  "button",
4541
4600
  {
4542
4601
  type: "button",
@@ -4548,10 +4607,17 @@ function HigherOrLowerGame({
4548
4607
  )
4549
4608
  ] }),
4550
4609
  /* @__PURE__ */ jsxs50("div", { className: "ss-w-hlpc ss-w-hlpc--b", children: [
4551
- /* @__PURE__ */ jsx56("div", { className: "ss-w-hlpc-av", "aria-hidden": "true", children: "\u26BD" }),
4552
- /* @__PURE__ */ jsx56("div", { className: "ss-w-hlpc-name", children: currentPair.playerBName }),
4553
- /* @__PURE__ */ jsx56("div", { className: "ss-w-hlpc-stat", children: config.statLabel }),
4554
- /* @__PURE__ */ jsx56("div", { className: "ss-w-hlpc-val ss-w-hlpc-val--hidden", children: "?" })
4610
+ /* @__PURE__ */ jsx57(
4611
+ PlayerAvatar,
4612
+ {
4613
+ className: "ss-w-hlpc-av",
4614
+ name: currentPair.playerBName,
4615
+ imagePath: currentPair.playerBImagePath
4616
+ }
4617
+ ),
4618
+ /* @__PURE__ */ jsx57("div", { className: "ss-w-hlpc-name", children: currentPair.playerBName }),
4619
+ /* @__PURE__ */ jsx57("div", { className: "ss-w-hlpc-stat", children: config.statLabel }),
4620
+ /* @__PURE__ */ jsx57("div", { className: "ss-w-hlpc-val ss-w-hlpc-val--hidden", children: "?" })
4555
4621
  ] })
4556
4622
  ] })
4557
4623
  ] }),
@@ -4567,10 +4633,10 @@ function HigherOrLowerGame({
4567
4633
  ] })
4568
4634
  ] }),
4569
4635
  isOver && /* @__PURE__ */ jsxs50("div", { className: "ss-w-hl-over", children: [
4570
- /* @__PURE__ */ jsx56("div", { className: "ss-w-hl-over-title", children: runEndedWrong ? "\u{1F6AB} Run over" : "\u{1F389} Perfect run!" }),
4636
+ /* @__PURE__ */ jsx57("div", { className: "ss-w-hl-over-title", children: runEndedWrong ? "\u{1F6AB} Run over" : "\u{1F389} Perfect run!" }),
4571
4637
  /* @__PURE__ */ jsxs50("div", { className: "ss-w-hl-over-score", children: [
4572
4638
  score,
4573
- /* @__PURE__ */ jsx56("span", { className: "ss-w-hl-over-unit", children: " pts" })
4639
+ /* @__PURE__ */ jsx57("span", { className: "ss-w-hl-over-unit", children: " pts" })
4574
4640
  ] }),
4575
4641
  /* @__PURE__ */ jsxs50("div", { className: "ss-w-hl-over-sub", children: [
4576
4642
  correctCount,
@@ -4584,8 +4650,8 @@ function HigherOrLowerGame({
4584
4650
  }
4585
4651
 
4586
4652
  // src/components/games/CareerPathGame.tsx
4587
- import { useState as useState24, useId as useId3, Fragment as Fragment11 } from "react";
4588
- import { Fragment as Fragment12, jsx as jsx57, jsxs as jsxs51 } from "react/jsx-runtime";
4653
+ import { useState as useState25, useId as useId3, Fragment as Fragment11 } from "react";
4654
+ import { Fragment as Fragment12, jsx as jsx58, jsxs as jsxs51 } from "react/jsx-runtime";
4589
4655
  function parseClientState3(json) {
4590
4656
  if (!json) return null;
4591
4657
  try {
@@ -4605,12 +4671,12 @@ function spellYears(spell) {
4605
4671
  function ClubSpellCard({ spell }) {
4606
4672
  const years = spellYears(spell);
4607
4673
  return /* @__PURE__ */ jsxs51("div", { className: `ss-w-cpath-club${spell.isLoan ? " ss-w-cpath-club--loan" : ""}`, children: [
4608
- spell.crestUrl ? /* @__PURE__ */ jsx57("img", { src: spell.crestUrl, alt: "", className: "ss-w-cpath-crest", loading: "lazy" }) : /* @__PURE__ */ jsx57("div", { className: "ss-w-cpath-crest ss-w-cpath-crest--fallback", "aria-hidden": "true", children: spell.clubName.slice(0, 3).toUpperCase() }),
4674
+ spell.crestUrl ? /* @__PURE__ */ jsx58("img", { src: spell.crestUrl, alt: "", className: "ss-w-cpath-crest", loading: "lazy" }) : /* @__PURE__ */ jsx58("div", { className: "ss-w-cpath-crest ss-w-cpath-crest--fallback", "aria-hidden": "true", children: spell.clubName.slice(0, 3).toUpperCase() }),
4609
4675
  /* @__PURE__ */ jsxs51("span", { className: "ss-w-cpath-club-name", children: [
4610
4676
  spell.clubName,
4611
- spell.isLoan && /* @__PURE__ */ jsx57("span", { className: "ss-w-cpath-loan-note", children: " (loan)" })
4677
+ spell.isLoan && /* @__PURE__ */ jsx58("span", { className: "ss-w-cpath-loan-note", children: " (loan)" })
4612
4678
  ] }),
4613
- years && /* @__PURE__ */ jsx57("span", { className: "ss-w-cpath-spell-yr", children: years })
4679
+ years && /* @__PURE__ */ jsx58("span", { className: "ss-w-cpath-spell-yr", children: years })
4614
4680
  ] });
4615
4681
  }
4616
4682
  function CareerPathGame({
@@ -4619,7 +4685,7 @@ function CareerPathGame({
4619
4685
  submitting,
4620
4686
  onSubmit
4621
4687
  }) {
4622
- const [query, setQuery] = useState24("");
4688
+ const [query, setQuery] = useState25("");
4623
4689
  const inputId = useId3();
4624
4690
  const clientState = parseClientState3(result?.clientStateJson);
4625
4691
  const alreadyGuessedIds = new Set(clientState?.guessResults.map((g) => g.playerId) ?? []);
@@ -4636,12 +4702,12 @@ function CareerPathGame({
4636
4702
  onSubmit(JSON.stringify({ guesses: newGuesses }));
4637
4703
  }
4638
4704
  return /* @__PURE__ */ jsxs51("div", { className: "ss-w-cpath", "data-testid": "game-screen-career-path", children: [
4639
- !config && /* @__PURE__ */ jsx57("div", { className: "ss-w-gscreen-body", children: "Loading\u2026" }),
4705
+ !config && /* @__PURE__ */ jsx58("div", { className: "ss-w-gscreen-body", children: "Loading\u2026" }),
4640
4706
  config && /* @__PURE__ */ jsxs51(Fragment12, { children: [
4641
4707
  /* @__PURE__ */ jsxs51("div", { className: "ss-w-cpath-head", children: [
4642
4708
  /* @__PURE__ */ jsxs51("div", { children: [
4643
- /* @__PURE__ */ jsx57("div", { className: "ss-w-cpath-title", children: "Career Path" }),
4644
- /* @__PURE__ */ jsx57("div", { className: "ss-w-cpath-sub", children: "Guess the mystery player from the clubs they've played for, oldest first." })
4709
+ /* @__PURE__ */ jsx58("div", { className: "ss-w-cpath-title", children: "Career Path" }),
4710
+ /* @__PURE__ */ jsx58("div", { className: "ss-w-cpath-sub", children: "Guess the mystery player from the clubs they've played for, oldest first." })
4645
4711
  ] }),
4646
4712
  clientState && !isOver && /* @__PURE__ */ jsxs51("span", { className: "ss-w-cpath-left", children: [
4647
4713
  clientState.guessesRemaining,
@@ -4649,17 +4715,17 @@ function CareerPathGame({
4649
4715
  ] })
4650
4716
  ] }),
4651
4717
  /* @__PURE__ */ jsxs51("div", { className: "ss-w-gscroll", children: [
4652
- /* @__PURE__ */ jsx57("div", { className: "ss-w-cpath-seq", children: visiblePath.map((spell, i) => /* @__PURE__ */ jsxs51(Fragment11, { children: [
4653
- i > 0 && /* @__PURE__ */ jsx57("span", { className: "ss-w-cpath-arrow", "aria-hidden": "true", children: "\u203A" }),
4654
- /* @__PURE__ */ jsx57(ClubSpellCard, { spell })
4718
+ /* @__PURE__ */ jsx58("div", { className: "ss-w-cpath-seq", children: visiblePath.map((spell, i) => /* @__PURE__ */ jsxs51(Fragment11, { children: [
4719
+ i > 0 && /* @__PURE__ */ jsx58("span", { className: "ss-w-cpath-arrow", "aria-hidden": "true", children: "\u203A" }),
4720
+ /* @__PURE__ */ jsx58(ClubSpellCard, { spell })
4655
4721
  ] }, `${spell.clubName}-${i}`)) }),
4656
4722
  clientState?.hintLine && !isOver && /* @__PURE__ */ jsxs51("div", { className: "ss-w-cpath-hint", children: [
4657
4723
  "\u{1F4A1} ",
4658
4724
  clientState.hintLine
4659
4725
  ] }),
4660
4726
  isOver && clientState && /* @__PURE__ */ jsxs51("div", { className: `ss-w-cpath-banner ss-w-cpath-banner--${clientState.solved ? "solved" : "failed"}`, children: [
4661
- /* @__PURE__ */ jsx57("div", { className: "ss-w-cpath-banner-label", children: clientState.solved ? "\u2705 Career traced!" : "\u{1F614} Out of guesses" }),
4662
- clientState.revealedPlayerName && /* @__PURE__ */ jsx57("div", { className: "ss-w-cpath-banner-name", children: clientState.revealedPlayerName }),
4727
+ /* @__PURE__ */ jsx58("div", { className: "ss-w-cpath-banner-label", children: clientState.solved ? "\u2705 Career traced!" : "\u{1F614} Out of guesses" }),
4728
+ clientState.revealedPlayerName && /* @__PURE__ */ jsx58("div", { className: "ss-w-cpath-banner-name", children: clientState.revealedPlayerName }),
4663
4729
  /* @__PURE__ */ jsxs51("div", { className: "ss-w-cpath-banner-sub", children: [
4664
4730
  clientState.guessesUsed,
4665
4731
  " guess",
@@ -4669,7 +4735,7 @@ function CareerPathGame({
4669
4735
  ] })
4670
4736
  ] }),
4671
4737
  !isOver && /* @__PURE__ */ jsxs51("div", { className: "ss-w-gpin ss-w-gtta", children: [
4672
- /* @__PURE__ */ jsx57(
4738
+ /* @__PURE__ */ jsx58(
4673
4739
  "input",
4674
4740
  {
4675
4741
  id: inputId,
@@ -4685,7 +4751,7 @@ function CareerPathGame({
4685
4751
  "aria-autocomplete": "list"
4686
4752
  }
4687
4753
  ),
4688
- query.length > 0 && filtered.length > 0 && /* @__PURE__ */ jsx57("div", { className: "ss-w-gtta-drop", role: "listbox", children: filtered.map((p) => /* @__PURE__ */ jsx57(
4754
+ query.length > 0 && filtered.length > 0 && /* @__PURE__ */ jsx58("div", { className: "ss-w-gtta-drop", role: "listbox", children: filtered.map((p) => /* @__PURE__ */ jsx58(
4689
4755
  "div",
4690
4756
  {
4691
4757
  className: "ss-w-gtta-opt",
@@ -4706,8 +4772,8 @@ function CareerPathGame({
4706
4772
  }
4707
4773
 
4708
4774
  // src/components/games/BeatTheGridGame.tsx
4709
- import React, { useState as useState25, useId as useId4 } from "react";
4710
- import { Fragment as Fragment13, jsx as jsx58, jsxs as jsxs52 } from "react/jsx-runtime";
4775
+ import React, { useState as useState26, useId as useId4 } from "react";
4776
+ import { Fragment as Fragment13, jsx as jsx59, jsxs as jsxs52 } from "react/jsx-runtime";
4711
4777
  function parseClientState4(json) {
4712
4778
  if (!json) return null;
4713
4779
  try {
@@ -4738,7 +4804,7 @@ function SearchSheet({
4738
4804
  onPick,
4739
4805
  onDismiss
4740
4806
  }) {
4741
- const [query, setQuery] = useState25("");
4807
+ const [query, setQuery] = useState26("");
4742
4808
  const inputId = useId4();
4743
4809
  const filtered = playerPool.filter(
4744
4810
  (p) => !alreadyFilledIds.has(p.id) && p.name.toLowerCase().includes(query.toLowerCase())
@@ -4746,11 +4812,11 @@ function SearchSheet({
4746
4812
  return /* @__PURE__ */ jsxs52("div", { className: "ss-w-btg-sheet", "data-testid": "btg-search-sheet", children: [
4747
4813
  /* @__PURE__ */ jsxs52("div", { className: "ss-w-btg-sheet-hdr", children: [
4748
4814
  /* @__PURE__ */ jsxs52("div", { className: "ss-w-btg-sheet-ctx", children: [
4749
- /* @__PURE__ */ jsx58("span", { className: "ss-w-btg-sheet-row", children: rowLabel }),
4750
- /* @__PURE__ */ jsx58("span", { className: "ss-w-btg-sheet-sep", children: "\xD7" }),
4751
- /* @__PURE__ */ jsx58("span", { className: "ss-w-btg-sheet-col", children: colLabel })
4815
+ /* @__PURE__ */ jsx59("span", { className: "ss-w-btg-sheet-row", children: rowLabel }),
4816
+ /* @__PURE__ */ jsx59("span", { className: "ss-w-btg-sheet-sep", children: "\xD7" }),
4817
+ /* @__PURE__ */ jsx59("span", { className: "ss-w-btg-sheet-col", children: colLabel })
4752
4818
  ] }),
4753
- /* @__PURE__ */ jsx58(
4819
+ /* @__PURE__ */ jsx59(
4754
4820
  "button",
4755
4821
  {
4756
4822
  type: "button",
@@ -4762,8 +4828,8 @@ function SearchSheet({
4762
4828
  }
4763
4829
  )
4764
4830
  ] }),
4765
- playerPool.length === 0 ? /* @__PURE__ */ jsx58("div", { className: "ss-w-btg-sheet-empty", children: "No players available to search yet." }) : /* @__PURE__ */ jsxs52("div", { className: "ss-w-gtta", children: [
4766
- /* @__PURE__ */ jsx58(
4831
+ playerPool.length === 0 ? /* @__PURE__ */ jsx59("div", { className: "ss-w-btg-sheet-empty", children: "No players available to search yet." }) : /* @__PURE__ */ jsxs52("div", { className: "ss-w-gtta", children: [
4832
+ /* @__PURE__ */ jsx59(
4767
4833
  "input",
4768
4834
  {
4769
4835
  id: inputId,
@@ -4779,7 +4845,7 @@ function SearchSheet({
4779
4845
  autoFocus: true
4780
4846
  }
4781
4847
  ),
4782
- query.length > 0 && filtered.length > 0 && /* @__PURE__ */ jsx58("div", { className: "ss-w-gtta-drop ss-w-btg-ta-list", role: "listbox", children: filtered.map((p) => /* @__PURE__ */ jsx58(
4848
+ query.length > 0 && filtered.length > 0 && /* @__PURE__ */ jsx59("div", { className: "ss-w-gtta-drop ss-w-btg-ta-list", role: "listbox", children: filtered.map((p) => /* @__PURE__ */ jsx59(
4783
4849
  "div",
4784
4850
  {
4785
4851
  className: "ss-w-gtta-opt",
@@ -4804,7 +4870,7 @@ function BeatTheGridGame({
4804
4870
  onSubmit,
4805
4871
  playerPool
4806
4872
  }) {
4807
- const [activeCell, setActiveCell] = useState25(null);
4873
+ const [activeCell, setActiveCell] = useState26(null);
4808
4874
  const clientState = parseClientState4(result?.clientStateJson);
4809
4875
  const filledCells = clientState?.cells ?? [];
4810
4876
  const isLocked2 = result?.alreadyPlayed === true || clientState?.isComplete === true;
@@ -4822,15 +4888,15 @@ function BeatTheGridGame({
4822
4888
  onSubmit(JSON.stringify({ cells: newCells }));
4823
4889
  }
4824
4890
  if (!config) {
4825
- return /* @__PURE__ */ jsx58("div", { className: "ss-w-btg", "data-testid": "game-screen-beat-the-grid", children: /* @__PURE__ */ jsx58("div", { className: "ss-w-gscreen-body", children: "Loading\u2026" }) });
4891
+ return /* @__PURE__ */ jsx59("div", { className: "ss-w-btg", "data-testid": "game-screen-beat-the-grid", children: /* @__PURE__ */ jsx59("div", { className: "ss-w-gscreen-body", children: "Loading\u2026" }) });
4826
4892
  }
4827
4893
  const rows = config.rows;
4828
4894
  const cols = config.cols;
4829
4895
  return /* @__PURE__ */ jsxs52("div", { className: "ss-w-btg", "data-testid": "game-screen-beat-the-grid", children: [
4830
4896
  /* @__PURE__ */ jsxs52("div", { className: "ss-w-btg-head", children: [
4831
4897
  /* @__PURE__ */ jsxs52("div", { children: [
4832
- /* @__PURE__ */ jsx58("div", { className: "ss-w-btg-title", children: "Beat the Grid" }),
4833
- /* @__PURE__ */ jsx58("div", { className: "ss-w-btg-sub", children: "Fill each cell with a player who fits" })
4898
+ /* @__PURE__ */ jsx59("div", { className: "ss-w-btg-title", children: "Beat the Grid" }),
4899
+ /* @__PURE__ */ jsx59("div", { className: "ss-w-btg-sub", children: "Fill each cell with a player who fits" })
4834
4900
  ] }),
4835
4901
  /* @__PURE__ */ jsxs52("div", { className: "ss-w-btg-ctx", children: [
4836
4902
  /* @__PURE__ */ jsxs52("span", { className: "ss-w-btg-ctx-score", children: [
@@ -4853,14 +4919,14 @@ function BeatTheGridGame({
4853
4919
  style: { gridTemplateColumns: `auto repeat(${cols.length}, 1fr)` },
4854
4920
  role: "grid",
4855
4921
  children: [
4856
- /* @__PURE__ */ jsx58("div", { className: "ss-w-btg-gc ss-w-btg-gc--corner" }),
4857
- cols.map((col) => /* @__PURE__ */ jsx58("div", { className: "ss-w-btg-gc ss-w-btg-gc--colhdr", children: col }, col)),
4922
+ /* @__PURE__ */ jsx59("div", { className: "ss-w-btg-gc ss-w-btg-gc--corner" }),
4923
+ cols.map((col) => /* @__PURE__ */ jsx59("div", { className: "ss-w-btg-gc ss-w-btg-gc--colhdr", children: col }, col)),
4858
4924
  rows.map((rowLabel, rowIdx) => /* @__PURE__ */ jsxs52(React.Fragment, { children: [
4859
- /* @__PURE__ */ jsx58("div", { className: "ss-w-btg-gc ss-w-btg-gc--rowhdr", children: rowLabel }),
4925
+ /* @__PURE__ */ jsx59("div", { className: "ss-w-btg-gc ss-w-btg-gc--rowhdr", children: rowLabel }),
4860
4926
  cols.map((colLabel, colIdx) => {
4861
4927
  const filled = findCellResult(filledCells, rowIdx, colIdx);
4862
4928
  const isActive = activeCell?.row === rowIdx && activeCell?.col === colIdx;
4863
- return /* @__PURE__ */ jsx58(
4929
+ return /* @__PURE__ */ jsx59(
4864
4930
  "button",
4865
4931
  {
4866
4932
  type: "button",
@@ -4874,12 +4940,12 @@ function BeatTheGridGame({
4874
4940
  disabled: isLocked2 || submitting,
4875
4941
  onClick: () => handleCellClick(rowIdx, colIdx),
4876
4942
  children: filled ? /* @__PURE__ */ jsxs52(Fragment13, { children: [
4877
- /* @__PURE__ */ jsx58("span", { className: "ss-w-btg-cell-nm", children: shortName(playerPool.find((p) => p.id === filled.playerId)?.name) }),
4943
+ /* @__PURE__ */ jsx59("span", { className: "ss-w-btg-cell-nm", children: shortName(playerPool.find((p) => p.id === filled.playerId)?.name) }),
4878
4944
  /* @__PURE__ */ jsxs52("span", { className: "ss-w-btg-cell-score", children: [
4879
4945
  filled.rarityScore,
4880
- filled.isCorrect && /* @__PURE__ */ jsx58("span", { className: "ss-w-btg-cell-check", "aria-hidden": "true", children: " \u2713" })
4946
+ filled.isCorrect && /* @__PURE__ */ jsx59("span", { className: "ss-w-btg-cell-check", "aria-hidden": "true", children: " \u2713" })
4881
4947
  ] })
4882
- ] }) : /* @__PURE__ */ jsx58("span", { className: "ss-w-btg-cell-empty", "aria-hidden": "true", children: "+" })
4948
+ ] }) : /* @__PURE__ */ jsx59("span", { className: "ss-w-btg-cell-empty", "aria-hidden": "true", children: "+" })
4883
4949
  },
4884
4950
  `cell-${rowIdx}-${colIdx}`
4885
4951
  );
@@ -4889,8 +4955,8 @@ function BeatTheGridGame({
4889
4955
  }
4890
4956
  ),
4891
4957
  isLocked2 && /* @__PURE__ */ jsxs52("div", { className: "ss-w-btg-done", children: [
4892
- /* @__PURE__ */ jsx58("div", { className: "ss-w-btg-done-label", children: "\u{1F532} Grid complete" }),
4893
- /* @__PURE__ */ jsx58("div", { className: "ss-w-btg-done-score", children: clientState?.totalScore ?? 0 }),
4958
+ /* @__PURE__ */ jsx59("div", { className: "ss-w-btg-done-label", children: "\u{1F532} Grid complete" }),
4959
+ /* @__PURE__ */ jsx59("div", { className: "ss-w-btg-done-score", children: clientState?.totalScore ?? 0 }),
4894
4960
  /* @__PURE__ */ jsxs52("div", { className: "ss-w-btg-done-sub", children: [
4895
4961
  filledCells.filter((c) => c.isCorrect).length,
4896
4962
  "/",
@@ -4899,7 +4965,7 @@ function BeatTheGridGame({
4899
4965
  ] })
4900
4966
  ] })
4901
4967
  ] }),
4902
- activeCell !== null && /* @__PURE__ */ jsx58("div", { className: "ss-w-gpin", children: /* @__PURE__ */ jsx58(
4968
+ activeCell !== null && /* @__PURE__ */ jsx59("div", { className: "ss-w-gpin", children: /* @__PURE__ */ jsx59(
4903
4969
  SearchSheet,
4904
4970
  {
4905
4971
  row: activeCell.row,
@@ -4916,9 +4982,9 @@ function BeatTheGridGame({
4916
4982
  }
4917
4983
 
4918
4984
  // src/components/games/GuessTheXiGame.tsx
4919
- import { useState as useState26, useId as useId5 } from "react";
4920
- import { Fragment as Fragment14, jsx as jsx59, jsxs as jsxs53 } from "react/jsx-runtime";
4921
- var MAX_GUESSES = 3;
4985
+ import { useState as useState27, useId as useId5 } from "react";
4986
+ import { Fragment as Fragment14, jsx as jsx60, jsxs as jsxs53 } from "react/jsx-runtime";
4987
+ var MAX_GUESSES2 = 3;
4922
4988
  function parseClientState5(json) {
4923
4989
  if (!json) return null;
4924
4990
  try {
@@ -4984,7 +5050,7 @@ function GuessTheXiGame({
4984
5050
  submitting,
4985
5051
  onSubmit
4986
5052
  }) {
4987
- const [query, setQuery] = useState26("");
5053
+ const [query, setQuery] = useState27("");
4988
5054
  const inputId = useId5();
4989
5055
  const clientState = parseClientState5(result?.clientStateJson);
4990
5056
  const isOver = result?.alreadyPlayed === true || clientState?.status === "solved" || clientState?.status === "failed";
@@ -5010,13 +5076,13 @@ function GuessTheXiGame({
5010
5076
  const wrongGuesses = (clientState?.guessHistory ?? []).filter((g) => !g.wasCorrect);
5011
5077
  const revealCount = nameBySlot.size;
5012
5078
  return /* @__PURE__ */ jsxs53("div", { className: "ss-w-gxi", "data-testid": "game-screen-guess-the-xi", children: [
5013
- !config && /* @__PURE__ */ jsx59("div", { className: "ss-w-gscreen-body", children: "Loading\u2026" }),
5079
+ !config && /* @__PURE__ */ jsx60("div", { className: "ss-w-gscreen-body", children: "Loading\u2026" }),
5014
5080
  config && /* @__PURE__ */ jsxs53(Fragment14, { children: [
5015
5081
  /* @__PURE__ */ jsxs53("div", { className: "ss-w-gxi-head", children: [
5016
5082
  /* @__PURE__ */ jsxs53("div", { children: [
5017
5083
  /* @__PURE__ */ jsxs53("div", { className: "ss-w-gxi-title", children: [
5018
5084
  "Guess the XI",
5019
- formation && /* @__PURE__ */ jsx59("span", { className: "ss-w-gxi-form", "aria-label": `Formation ${formation}`, children: formation })
5085
+ formation && /* @__PURE__ */ jsx60("span", { className: "ss-w-gxi-form", "aria-label": `Formation ${formation}`, children: formation })
5020
5086
  ] }),
5021
5087
  /* @__PURE__ */ jsxs53("div", { className: "ss-w-gxi-sub", children: [
5022
5088
  "Name the team \xB7 flags are each player's nationality \xB7 ",
@@ -5024,16 +5090,16 @@ function GuessTheXiGame({
5024
5090
  ] })
5025
5091
  ] }),
5026
5092
  clientState && !isOver && /* @__PURE__ */ jsxs53("span", { className: "ss-w-gxi-left", children: [
5027
- Math.max(0, MAX_GUESSES - clientState.guessesUsed),
5093
+ Math.max(0, MAX_GUESSES2 - clientState.guessesUsed),
5028
5094
  " left"
5029
5095
  ] })
5030
5096
  ] }),
5031
5097
  /* @__PURE__ */ jsxs53("div", { className: "ss-w-gscroll", children: [
5032
- 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) => {
5098
+ rows.length > 0 && /* @__PURE__ */ jsx60("div", { className: "ss-w-gxi-pitch", children: rows.map((row, r) => /* @__PURE__ */ jsx60("div", { className: "ss-w-gxi-prow", children: row.map((pos, c) => {
5033
5099
  const posLabel = pos.slot ? posBySlot.get(pos.slot) ?? "" : "";
5034
5100
  const name = pos.slot ? nameBySlot.get(pos.slot) : void 0;
5035
5101
  return /* @__PURE__ */ jsxs53("div", { className: "ss-w-gxi-slot", children: [
5036
- /* @__PURE__ */ jsx59(
5102
+ /* @__PURE__ */ jsx60(
5037
5103
  "div",
5038
5104
  {
5039
5105
  className: `ss-w-gxi-flag${name ? " ss-w-gxi-flag--revealed" : ""}`,
@@ -5042,8 +5108,8 @@ function GuessTheXiGame({
5042
5108
  children: nationalityFlag(pos.nationality)
5043
5109
  }
5044
5110
  ),
5045
- posLabel && /* @__PURE__ */ jsx59("span", { className: "ss-w-gxi-pos", children: posLabel }),
5046
- name && /* @__PURE__ */ jsx59("span", { className: "ss-w-gxi-flag-lab", children: surname(name) })
5111
+ posLabel && /* @__PURE__ */ jsx60("span", { className: "ss-w-gxi-pos", children: posLabel }),
5112
+ name && /* @__PURE__ */ jsx60("span", { className: "ss-w-gxi-flag-lab", children: surname(name) })
5047
5113
  ] }, `${pos.slot}-${c}`);
5048
5114
  }) }, r)) }),
5049
5115
  revealCount > 0 && !isOver && /* @__PURE__ */ jsxs53("div", { className: "ss-w-gxi-revnote", children: [
@@ -5053,13 +5119,13 @@ function GuessTheXiGame({
5053
5119
  revealCount === 1 ? "" : "s",
5054
5120
  " revealed \u2014 highlighted on the pitch"
5055
5121
  ] }),
5056
- !isOver && wrongGuesses.length > 0 && /* @__PURE__ */ jsx59("div", { className: "ss-w-gxi-wrong", children: wrongGuesses.map((g) => {
5122
+ !isOver && wrongGuesses.length > 0 && /* @__PURE__ */ jsx60("div", { className: "ss-w-gxi-wrong", children: wrongGuesses.map((g) => {
5057
5123
  const team = config.teamPool.find((t) => t.teamId === g.teamId);
5058
- return /* @__PURE__ */ jsx59("span", { className: "ss-w-gxi-wrong-pill", children: team?.teamName ?? `#${g.teamId}` }, g.teamId);
5124
+ return /* @__PURE__ */ jsx60("span", { className: "ss-w-gxi-wrong-pill", children: team?.teamName ?? `#${g.teamId}` }, g.teamId);
5059
5125
  }) }),
5060
5126
  isOver && clientState && /* @__PURE__ */ jsxs53("div", { className: `ss-w-gxi-banner ss-w-gxi-banner--${solved ? "solved" : "failed"}`, children: [
5061
- /* @__PURE__ */ jsx59("div", { className: "ss-w-gxi-banner-label", children: solved ? "\u2705 Solved!" : "\u{1F614} Out of guesses" }),
5062
- /* @__PURE__ */ jsx59("div", { className: "ss-w-gxi-banner-score", children: clientState.score }),
5127
+ /* @__PURE__ */ jsx60("div", { className: "ss-w-gxi-banner-label", children: solved ? "\u2705 Solved!" : "\u{1F614} Out of guesses" }),
5128
+ /* @__PURE__ */ jsx60("div", { className: "ss-w-gxi-banner-score", children: clientState.score }),
5063
5129
  /* @__PURE__ */ jsxs53("div", { className: "ss-w-gxi-banner-sub", children: [
5064
5130
  clientState.guessesUsed,
5065
5131
  " guess",
@@ -5069,7 +5135,7 @@ function GuessTheXiGame({
5069
5135
  ] })
5070
5136
  ] }),
5071
5137
  !isOver && /* @__PURE__ */ jsxs53("div", { className: "ss-w-gpin ss-w-gtta", children: [
5072
- /* @__PURE__ */ jsx59(
5138
+ /* @__PURE__ */ jsx60(
5073
5139
  "input",
5074
5140
  {
5075
5141
  id: inputId,
@@ -5085,7 +5151,7 @@ function GuessTheXiGame({
5085
5151
  "aria-autocomplete": "list"
5086
5152
  }
5087
5153
  ),
5088
- query.length > 0 && filtered.length > 0 && /* @__PURE__ */ jsx59("div", { className: "ss-w-gtta-drop", role: "listbox", children: filtered.map((t) => /* @__PURE__ */ jsx59(
5154
+ query.length > 0 && filtered.length > 0 && /* @__PURE__ */ jsx60("div", { className: "ss-w-gtta-drop", role: "listbox", children: filtered.map((t) => /* @__PURE__ */ jsx60(
5089
5155
  "div",
5090
5156
  {
5091
5157
  className: "ss-w-gtta-opt",
@@ -5106,8 +5172,8 @@ function GuessTheXiGame({
5106
5172
  }
5107
5173
 
5108
5174
  // src/components/games/DailyQuizGame.tsx
5109
- import { useState as useState27 } from "react";
5110
- import { Fragment as Fragment15, jsx as jsx60, jsxs as jsxs54 } from "react/jsx-runtime";
5175
+ import { useState as useState28 } from "react";
5176
+ import { Fragment as Fragment15, jsx as jsx61, jsxs as jsxs54 } from "react/jsx-runtime";
5111
5177
  function parseClientState6(json) {
5112
5178
  if (!json) return null;
5113
5179
  try {
@@ -5125,7 +5191,7 @@ function DailyQuizGame({
5125
5191
  submitting,
5126
5192
  onSubmit
5127
5193
  }) {
5128
- const [selections, setSelections] = useState27(/* @__PURE__ */ new Map());
5194
+ const [selections, setSelections] = useState28(/* @__PURE__ */ new Map());
5129
5195
  const clientState = parseClientState6(result?.clientStateJson);
5130
5196
  const isRevealed = (clientState?.results.length ?? 0) > 0 || result?.alreadyPlayed === true;
5131
5197
  const allAnswered = config != null && selections.size === config.questions.length;
@@ -5142,25 +5208,25 @@ function DailyQuizGame({
5142
5208
  onSubmit(JSON.stringify({ answers }));
5143
5209
  }
5144
5210
  return /* @__PURE__ */ jsxs54("div", { className: "ss-w-dq", "data-testid": "game-screen-daily-quiz", children: [
5145
- !config && /* @__PURE__ */ jsx60("div", { className: "ss-w-gscreen-body", children: "Loading\u2026" }),
5211
+ !config && /* @__PURE__ */ jsx61("div", { className: "ss-w-gscreen-body", children: "Loading\u2026" }),
5146
5212
  config && /* @__PURE__ */ jsxs54(Fragment15, { children: [
5147
5213
  isRevealed && result?.score != null && /* @__PURE__ */ jsxs54("div", { className: "ss-w-dq-score", children: [
5148
- /* @__PURE__ */ jsx60("span", { className: "ss-w-dq-score-val", children: result.score }),
5149
- /* @__PURE__ */ jsx60("span", { className: "ss-w-dq-score-label", children: "pts" })
5214
+ /* @__PURE__ */ jsx61("span", { className: "ss-w-dq-score-val", children: result.score }),
5215
+ /* @__PURE__ */ jsx61("span", { className: "ss-w-dq-score-label", children: "pts" })
5150
5216
  ] }),
5151
- !isRevealed && /* @__PURE__ */ jsx60("div", { className: "ss-w-dq-prog", children: /* @__PURE__ */ jsx60(
5217
+ !isRevealed && /* @__PURE__ */ jsx61("div", { className: "ss-w-dq-prog", children: /* @__PURE__ */ jsx61(
5152
5218
  "div",
5153
5219
  {
5154
5220
  className: "ss-w-dq-prog-fill",
5155
5221
  style: { width: `${Math.round(selections.size / config.questions.length * 100)}%` }
5156
5222
  }
5157
5223
  ) }),
5158
- /* @__PURE__ */ jsx60("div", { className: "ss-w-dq-questions", children: config.questions.map((q) => {
5224
+ /* @__PURE__ */ jsx61("div", { className: "ss-w-dq-questions", children: config.questions.map((q) => {
5159
5225
  const qResult = clientState ? findResult(clientState.results, q.index) : void 0;
5160
5226
  const selectedIdx = selections.get(q.index);
5161
5227
  return /* @__PURE__ */ jsxs54("div", { className: "ss-w-dq-q", children: [
5162
- /* @__PURE__ */ jsx60("div", { className: "ss-w-dq-qstem", children: q.stem }),
5163
- /* @__PURE__ */ jsx60("div", { className: "ss-w-dq-opts", children: q.options.map((opt, optIdx) => {
5228
+ /* @__PURE__ */ jsx61("div", { className: "ss-w-dq-qstem", children: q.stem }),
5229
+ /* @__PURE__ */ jsx61("div", { className: "ss-w-dq-opts", children: q.options.map((opt, optIdx) => {
5164
5230
  let optCls = "ss-w-dq-qopt";
5165
5231
  if (qResult) {
5166
5232
  if (optIdx === qResult.correctOptionIndex) {
@@ -5179,17 +5245,17 @@ function DailyQuizGame({
5179
5245
  disabled: isRevealed || submitting,
5180
5246
  onClick: () => handleSelect(q.index, optIdx),
5181
5247
  children: [
5182
- /* @__PURE__ */ jsx60("span", { className: "ss-w-dq-qopt-letter", children: String.fromCharCode(65 + optIdx) }),
5183
- /* @__PURE__ */ jsx60("span", { className: "ss-w-dq-qopt-text", children: opt })
5248
+ /* @__PURE__ */ jsx61("span", { className: "ss-w-dq-qopt-letter", children: String.fromCharCode(65 + optIdx) }),
5249
+ /* @__PURE__ */ jsx61("span", { className: "ss-w-dq-qopt-text", children: opt })
5184
5250
  ]
5185
5251
  },
5186
5252
  optIdx
5187
5253
  );
5188
5254
  }) }),
5189
- qResult?.revealText && /* @__PURE__ */ jsx60("div", { className: `ss-w-dq-qwhy ss-w-dq-qwhy--${qResult.isCorrect ? "correct" : "wrong"}`, children: qResult.revealText })
5255
+ qResult?.revealText && /* @__PURE__ */ jsx61("div", { className: `ss-w-dq-qwhy ss-w-dq-qwhy--${qResult.isCorrect ? "correct" : "wrong"}`, children: qResult.revealText })
5190
5256
  ] }, q.index);
5191
5257
  }) }),
5192
- !isRevealed && /* @__PURE__ */ jsx60(
5258
+ !isRevealed && /* @__PURE__ */ jsx61(
5193
5259
  "button",
5194
5260
  {
5195
5261
  type: "button",
@@ -5205,8 +5271,8 @@ function DailyQuizGame({
5205
5271
  }
5206
5272
 
5207
5273
  // src/components/games/MatchdayPredictorGame.tsx
5208
- import { useState as useState28 } from "react";
5209
- import { jsx as jsx61, jsxs as jsxs55 } from "react/jsx-runtime";
5274
+ import { useState as useState29 } from "react";
5275
+ import { jsx as jsx62, jsxs as jsxs55 } from "react/jsx-runtime";
5210
5276
  function parseClientState7(json) {
5211
5277
  if (!json) return null;
5212
5278
  try {
@@ -5228,9 +5294,9 @@ function MatchdayPredictorGame({
5228
5294
  submitting,
5229
5295
  onSubmit
5230
5296
  }) {
5231
- const [homeScore, setHomeScore] = useState28(0);
5232
- const [awayScore, setAwayScore] = useState28(0);
5233
- const [firstScorerPlayerId, setFirstScorerPlayerId] = useState28(null);
5297
+ const [homeScore, setHomeScore] = useState29(0);
5298
+ const [awayScore, setAwayScore] = useState29(0);
5299
+ const [firstScorerPlayerId, setFirstScorerPlayerId] = useState29(null);
5234
5300
  const clientState = parseClientState7(result?.clientStateJson);
5235
5301
  const alreadyPlayed = result?.alreadyPlayed === true;
5236
5302
  if (alreadyPlayed && clientState) {
@@ -5242,28 +5308,28 @@ function MatchdayPredictorGame({
5242
5308
  " \u2013 ",
5243
5309
  clientState.predictedAwayScore
5244
5310
  ] }),
5245
- /* @__PURE__ */ jsx61("div", { className: "ss-w-mp-live-label", children: "Locked in \u2014 awaiting result" })
5311
+ /* @__PURE__ */ jsx62("div", { className: "ss-w-mp-live-label", children: "Locked in \u2014 awaiting result" })
5246
5312
  ] }),
5247
- /* @__PURE__ */ jsx61("div", { className: "ss-w-mp-fun", children: "For fun \u2014 not in the leaderboard" })
5313
+ /* @__PURE__ */ jsx62("div", { className: "ss-w-mp-fun", children: "For fun \u2014 not in the leaderboard" })
5248
5314
  ] });
5249
5315
  }
5250
5316
  const r = clientState.result;
5251
5317
  const actualScore = `${r.homeScore} \u2013 ${r.awayScore}`;
5252
5318
  return /* @__PURE__ */ jsxs55("div", { className: "ss-w-mp", "data-testid": "game-screen-matchday-predictor", children: [
5253
5319
  /* @__PURE__ */ jsxs55("div", { className: "ss-w-mp-live", children: [
5254
- /* @__PURE__ */ jsx61("div", { className: "ss-w-mp-live-score", children: actualScore }),
5255
- /* @__PURE__ */ jsx61("div", { className: "ss-w-mp-live-label", children: "Full-time result" }),
5320
+ /* @__PURE__ */ jsx62("div", { className: "ss-w-mp-live-score", children: actualScore }),
5321
+ /* @__PURE__ */ jsx62("div", { className: "ss-w-mp-live-label", children: "Full-time result" }),
5256
5322
  /* @__PURE__ */ jsxs55("div", { className: "ss-w-mp-live-outcome", children: [
5257
5323
  /* @__PURE__ */ jsxs55("div", { className: `ss-w-mp-live-row${clientState.exactScoreCorrect ? " ss-w-mp-live-row--correct" : ""}`, children: [
5258
- /* @__PURE__ */ jsx61("span", { className: "ss-w-mp-live-row-key", children: "Exact score" }),
5259
- /* @__PURE__ */ jsx61("span", { className: "ss-w-mp-live-row-val", children: clientState.exactScoreCorrect ? "\u2713" : "\u2717" })
5324
+ /* @__PURE__ */ jsx62("span", { className: "ss-w-mp-live-row-key", children: "Exact score" }),
5325
+ /* @__PURE__ */ jsx62("span", { className: "ss-w-mp-live-row-val", children: clientState.exactScoreCorrect ? "\u2713" : "\u2717" })
5260
5326
  ] }),
5261
5327
  /* @__PURE__ */ jsxs55("div", { className: `ss-w-mp-live-row${clientState.outcomeCorrect ? " ss-w-mp-live-row--correct" : ""}`, children: [
5262
- /* @__PURE__ */ jsx61("span", { className: "ss-w-mp-live-row-key", children: "Result (W/D/L)" }),
5263
- /* @__PURE__ */ jsx61("span", { className: "ss-w-mp-live-row-val", children: clientState.outcomeCorrect ? "\u2713" : "\u2717" })
5328
+ /* @__PURE__ */ jsx62("span", { className: "ss-w-mp-live-row-key", children: "Result (W/D/L)" }),
5329
+ /* @__PURE__ */ jsx62("span", { className: "ss-w-mp-live-row-val", children: clientState.outcomeCorrect ? "\u2713" : "\u2717" })
5264
5330
  ] }),
5265
5331
  !clientState.firstScorerVoid && /* @__PURE__ */ jsxs55("div", { className: `ss-w-mp-live-row${clientState.firstScorerCorrect ? " ss-w-mp-live-row--correct" : ""}`, children: [
5266
- /* @__PURE__ */ jsx61("span", { className: "ss-w-mp-live-row-key", children: "First scorer" }),
5332
+ /* @__PURE__ */ jsx62("span", { className: "ss-w-mp-live-row-key", children: "First scorer" }),
5267
5333
  /* @__PURE__ */ jsxs55("span", { className: "ss-w-mp-live-row-val", children: [
5268
5334
  clientState.firstScorerCorrect ? "\u2713" : "\u2717",
5269
5335
  r.firstScorerName ? ` ${r.firstScorerName}` : ""
@@ -5271,11 +5337,11 @@ function MatchdayPredictorGame({
5271
5337
  ] })
5272
5338
  ] })
5273
5339
  ] }),
5274
- /* @__PURE__ */ jsx61("div", { className: "ss-w-mp-fun", children: "For fun \u2014 not in the leaderboard" })
5340
+ /* @__PURE__ */ jsx62("div", { className: "ss-w-mp-fun", children: "For fun \u2014 not in the leaderboard" })
5275
5341
  ] });
5276
5342
  }
5277
5343
  if (!config) {
5278
- return /* @__PURE__ */ jsx61("div", { className: "ss-w-mp", "data-testid": "game-screen-matchday-predictor", children: /* @__PURE__ */ jsx61("div", { className: "ss-w-gscreen-body", children: "Loading\u2026" }) });
5344
+ return /* @__PURE__ */ jsx62("div", { className: "ss-w-mp", "data-testid": "game-screen-matchday-predictor", children: /* @__PURE__ */ jsx62("div", { className: "ss-w-gscreen-body", children: "Loading\u2026" }) });
5279
5345
  }
5280
5346
  const locked = isLocked(config.kickoffUtc);
5281
5347
  const disabled = locked || submitting;
@@ -5292,9 +5358,9 @@ function MatchdayPredictorGame({
5292
5358
  return /* @__PURE__ */ jsxs55("div", { className: "ss-w-mp", "data-testid": "game-screen-matchday-predictor", children: [
5293
5359
  /* @__PURE__ */ jsxs55("div", { className: "ss-w-mp-pred-score", children: [
5294
5360
  /* @__PURE__ */ jsxs55("div", { className: "ss-w-mp-team", children: [
5295
- /* @__PURE__ */ jsx61("div", { className: "ss-w-mp-team-name", children: config.homeTeam.name }),
5361
+ /* @__PURE__ */ jsx62("div", { className: "ss-w-mp-team-name", children: config.homeTeam.name }),
5296
5362
  /* @__PURE__ */ jsxs55("div", { className: "ss-w-mp-stepper", children: [
5297
- /* @__PURE__ */ jsx61(
5363
+ /* @__PURE__ */ jsx62(
5298
5364
  "button",
5299
5365
  {
5300
5366
  type: "button",
@@ -5305,8 +5371,8 @@ function MatchdayPredictorGame({
5305
5371
  children: "\u2212"
5306
5372
  }
5307
5373
  ),
5308
- /* @__PURE__ */ jsx61("span", { className: "ss-w-mp-stepper-val", children: homeScore }),
5309
- /* @__PURE__ */ jsx61(
5374
+ /* @__PURE__ */ jsx62("span", { className: "ss-w-mp-stepper-val", children: homeScore }),
5375
+ /* @__PURE__ */ jsx62(
5310
5376
  "button",
5311
5377
  {
5312
5378
  type: "button",
@@ -5319,11 +5385,11 @@ function MatchdayPredictorGame({
5319
5385
  )
5320
5386
  ] })
5321
5387
  ] }),
5322
- /* @__PURE__ */ jsx61("span", { className: "ss-w-mp-sep", children: "\u2013" }),
5388
+ /* @__PURE__ */ jsx62("span", { className: "ss-w-mp-sep", children: "\u2013" }),
5323
5389
  /* @__PURE__ */ jsxs55("div", { className: "ss-w-mp-team", children: [
5324
- /* @__PURE__ */ jsx61("div", { className: "ss-w-mp-team-name", children: config.awayTeam.name }),
5390
+ /* @__PURE__ */ jsx62("div", { className: "ss-w-mp-team-name", children: config.awayTeam.name }),
5325
5391
  /* @__PURE__ */ jsxs55("div", { className: "ss-w-mp-stepper", children: [
5326
- /* @__PURE__ */ jsx61(
5392
+ /* @__PURE__ */ jsx62(
5327
5393
  "button",
5328
5394
  {
5329
5395
  type: "button",
@@ -5334,8 +5400,8 @@ function MatchdayPredictorGame({
5334
5400
  children: "\u2212"
5335
5401
  }
5336
5402
  ),
5337
- /* @__PURE__ */ jsx61("span", { className: "ss-w-mp-stepper-val", children: awayScore }),
5338
- /* @__PURE__ */ jsx61(
5403
+ /* @__PURE__ */ jsx62("span", { className: "ss-w-mp-stepper-val", children: awayScore }),
5404
+ /* @__PURE__ */ jsx62(
5339
5405
  "button",
5340
5406
  {
5341
5407
  type: "button",
@@ -5350,8 +5416,8 @@ function MatchdayPredictorGame({
5350
5416
  ] })
5351
5417
  ] }),
5352
5418
  config.scorerPool.length > 0 && /* @__PURE__ */ jsxs55("div", { className: "ss-w-mp-scorer", children: [
5353
- /* @__PURE__ */ jsx61("div", { className: "ss-w-mp-scorer-label", children: "First scorer (optional)" }),
5354
- /* @__PURE__ */ jsx61("div", { className: "ss-w-mp-scorer-list", children: config.scorerPool.map((p) => /* @__PURE__ */ jsx61(
5419
+ /* @__PURE__ */ jsx62("div", { className: "ss-w-mp-scorer-label", children: "First scorer (optional)" }),
5420
+ /* @__PURE__ */ jsx62("div", { className: "ss-w-mp-scorer-list", children: config.scorerPool.map((p) => /* @__PURE__ */ jsx62(
5355
5421
  "button",
5356
5422
  {
5357
5423
  type: "button",
@@ -5363,8 +5429,8 @@ function MatchdayPredictorGame({
5363
5429
  p.playerId
5364
5430
  )) })
5365
5431
  ] }),
5366
- locked && /* @__PURE__ */ jsx61("div", { className: "ss-w-mp-live-label", children: "Submissions are now closed" }),
5367
- /* @__PURE__ */ jsx61(
5432
+ locked && /* @__PURE__ */ jsx62("div", { className: "ss-w-mp-live-label", children: "Submissions are now closed" }),
5433
+ /* @__PURE__ */ jsx62(
5368
5434
  "button",
5369
5435
  {
5370
5436
  type: "button",
@@ -5375,13 +5441,13 @@ function MatchdayPredictorGame({
5375
5441
  children: submitting ? "Saving\u2026" : "Save prediction"
5376
5442
  }
5377
5443
  ),
5378
- /* @__PURE__ */ jsx61("div", { className: "ss-w-mp-fun", children: "For fun \u2014 not in the leaderboard" })
5444
+ /* @__PURE__ */ jsx62("div", { className: "ss-w-mp-fun", children: "For fun \u2014 not in the leaderboard" })
5379
5445
  ] });
5380
5446
  }
5381
5447
 
5382
5448
  // src/components/games/StartingXiGame.tsx
5383
- import { useState as useState29 } from "react";
5384
- import { jsx as jsx62, jsxs as jsxs56 } from "react/jsx-runtime";
5449
+ import { useState as useState30 } from "react";
5450
+ import { jsx as jsx63, jsxs as jsxs56 } from "react/jsx-runtime";
5385
5451
  function parseClientState8(json) {
5386
5452
  if (!json) return null;
5387
5453
  try {
@@ -5401,23 +5467,23 @@ function StartingXiGame({
5401
5467
  submitting,
5402
5468
  onSubmit
5403
5469
  }) {
5404
- const [picked, setPicked] = useState29([]);
5470
+ const [picked, setPicked] = useState30([]);
5405
5471
  const clientState = parseClientState8(result?.clientStateJson);
5406
5472
  const alreadyPlayed = result?.alreadyPlayed === true;
5407
5473
  if (alreadyPlayed) {
5408
5474
  if (!clientState) {
5409
- return /* @__PURE__ */ jsx62("div", { className: "ss-w-sxi", "data-testid": "game-screen-starting-xi", children: /* @__PURE__ */ jsx62("div", { className: "ss-w-sxi-status", children: /* @__PURE__ */ jsx62("div", { className: "ss-w-sxi-status-label", children: "This game has been voided" }) }) });
5475
+ return /* @__PURE__ */ jsx63("div", { className: "ss-w-sxi", "data-testid": "game-screen-starting-xi", children: /* @__PURE__ */ jsx63("div", { className: "ss-w-sxi-status", children: /* @__PURE__ */ jsx63("div", { className: "ss-w-sxi-status-label", children: "This game has been voided" }) }) });
5410
5476
  }
5411
5477
  if (clientState.status === "pending") {
5412
- return /* @__PURE__ */ jsx62("div", { className: "ss-w-sxi", "data-testid": "game-screen-starting-xi", children: /* @__PURE__ */ jsx62("div", { className: "ss-w-sxi-status", children: /* @__PURE__ */ jsxs56("div", { className: "ss-w-sxi-status-label", children: [
5478
+ return /* @__PURE__ */ jsx63("div", { className: "ss-w-sxi", "data-testid": "game-screen-starting-xi", children: /* @__PURE__ */ jsx63("div", { className: "ss-w-sxi-status", children: /* @__PURE__ */ jsxs56("div", { className: "ss-w-sxi-status-label", children: [
5413
5479
  "Prediction locked in (",
5414
5480
  clientState.predictedCount,
5415
5481
  " players) \u2014 awaiting result"
5416
5482
  ] }) }) });
5417
5483
  }
5418
5484
  if (clientState.status === "graded") {
5419
- return /* @__PURE__ */ jsx62("div", { className: "ss-w-sxi", "data-testid": "game-screen-starting-xi", children: /* @__PURE__ */ jsxs56("div", { className: "ss-w-sxi-status ss-w-sxi-status--graded", children: [
5420
- /* @__PURE__ */ jsx62("div", { className: "ss-w-sxi-status-score", children: clientState.score }),
5485
+ return /* @__PURE__ */ jsx63("div", { className: "ss-w-sxi", "data-testid": "game-screen-starting-xi", children: /* @__PURE__ */ jsxs56("div", { className: "ss-w-sxi-status ss-w-sxi-status--graded", children: [
5486
+ /* @__PURE__ */ jsx63("div", { className: "ss-w-sxi-status-score", children: clientState.score }),
5421
5487
  /* @__PURE__ */ jsxs56("div", { className: "ss-w-sxi-status-label", children: [
5422
5488
  clientState.correctCount,
5423
5489
  " correct starters"
@@ -5426,7 +5492,7 @@ function StartingXiGame({
5426
5492
  }
5427
5493
  }
5428
5494
  if (!config) {
5429
- return /* @__PURE__ */ jsx62("div", { className: "ss-w-sxi", "data-testid": "game-screen-starting-xi", children: /* @__PURE__ */ jsx62("div", { className: "ss-w-gscreen-body", children: "Loading\u2026" }) });
5495
+ return /* @__PURE__ */ jsx63("div", { className: "ss-w-sxi", "data-testid": "game-screen-starting-xi", children: /* @__PURE__ */ jsx63("div", { className: "ss-w-gscreen-body", children: "Loading\u2026" }) });
5430
5496
  }
5431
5497
  const formationRows = parseFormationRows(config.formation);
5432
5498
  const pickedSet = new Set(picked);
@@ -5452,8 +5518,8 @@ function StartingXiGame({
5452
5518
  return { rowIdx, count, rowSlots };
5453
5519
  });
5454
5520
  return /* @__PURE__ */ jsxs56("div", { className: "ss-w-sxi", "data-testid": "game-screen-starting-xi", children: [
5455
- /* @__PURE__ */ jsx62("div", { className: "ss-w-sxi-formation", children: config.formation }),
5456
- /* @__PURE__ */ jsx62("div", { className: "ss-w-sxi-pitch", children: pitchRows.map(({ rowIdx, count, rowSlots }) => /* @__PURE__ */ jsx62("div", { className: "ss-w-sxi-pitch-row", children: Array.from({ length: count }).map((_, i) => {
5521
+ /* @__PURE__ */ jsx63("div", { className: "ss-w-sxi-formation", children: config.formation }),
5522
+ /* @__PURE__ */ jsx63("div", { className: "ss-w-sxi-pitch", children: pitchRows.map(({ rowIdx, count, rowSlots }) => /* @__PURE__ */ jsx63("div", { className: "ss-w-sxi-pitch-row", children: Array.from({ length: count }).map((_, i) => {
5457
5523
  const playerId = rowSlots[i];
5458
5524
  const player = playerId != null ? config.squadSheet.find((p) => p.playerId === playerId) : void 0;
5459
5525
  return /* @__PURE__ */ jsxs56(
@@ -5470,14 +5536,14 @@ function StartingXiGame({
5470
5536
  role: player ? "button" : void 0,
5471
5537
  "aria-label": player ? `Remove ${player.playerName ?? ""}` : void 0,
5472
5538
  children: [
5473
- /* @__PURE__ */ jsx62("div", { className: "ss-w-sxi-pslot-num", children: player?.jerseyNumber ?? (rowIdx === 0 ? "GK" : "?") }),
5474
- /* @__PURE__ */ jsx62("div", { className: "ss-w-sxi-pslot-name", children: player?.playerName ?? "" })
5539
+ /* @__PURE__ */ jsx63("div", { className: "ss-w-sxi-pslot-num", children: player?.jerseyNumber ?? (rowIdx === 0 ? "GK" : "?") }),
5540
+ /* @__PURE__ */ jsx63("div", { className: "ss-w-sxi-pslot-name", children: player?.playerName ?? "" })
5475
5541
  ]
5476
5542
  },
5477
5543
  i
5478
5544
  );
5479
5545
  }) }, rowIdx)) }),
5480
- /* @__PURE__ */ jsx62("div", { className: "ss-w-sxi-squad", children: config.squadSheet.map((p) => {
5546
+ /* @__PURE__ */ jsx63("div", { className: "ss-w-sxi-squad", children: config.squadSheet.map((p) => {
5481
5547
  const isPicked = pickedSet.has(p.playerId);
5482
5548
  return /* @__PURE__ */ jsxs56(
5483
5549
  "div",
@@ -5491,14 +5557,14 @@ function StartingXiGame({
5491
5557
  role: "button",
5492
5558
  "aria-pressed": isPicked,
5493
5559
  children: [
5494
- /* @__PURE__ */ jsx62("span", { className: "ss-w-sxi-squad-name", children: p.playerName }),
5495
- /* @__PURE__ */ jsx62("span", { className: "ss-w-sxi-squad-pos", children: p.positionName })
5560
+ /* @__PURE__ */ jsx63("span", { className: "ss-w-sxi-squad-name", children: p.playerName }),
5561
+ /* @__PURE__ */ jsx63("span", { className: "ss-w-sxi-squad-pos", children: p.positionName })
5496
5562
  ]
5497
5563
  },
5498
5564
  p.playerId
5499
5565
  );
5500
5566
  }) }),
5501
- /* @__PURE__ */ jsx62(
5567
+ /* @__PURE__ */ jsx63(
5502
5568
  "button",
5503
5569
  {
5504
5570
  type: "button",
@@ -5513,7 +5579,7 @@ function StartingXiGame({
5513
5579
  }
5514
5580
 
5515
5581
  // src/components/games/StatLadderGame.tsx
5516
- import { jsx as jsx63, jsxs as jsxs57 } from "react/jsx-runtime";
5582
+ import { jsx as jsx64, jsxs as jsxs57 } from "react/jsx-runtime";
5517
5583
  function parseClientState9(json) {
5518
5584
  if (!json) return null;
5519
5585
  try {
@@ -5531,12 +5597,12 @@ function StatLadderGame({
5531
5597
  const clientState = parseClientState9(result?.clientStateJson);
5532
5598
  const revealed = clientState != null;
5533
5599
  if (!config) {
5534
- return /* @__PURE__ */ jsx63("div", { className: "ss-w-sl", "data-testid": "game-screen-stat-ladder", children: /* @__PURE__ */ jsx63("div", { className: "ss-w-gscreen-body", children: "Loading\u2026" }) });
5600
+ return /* @__PURE__ */ jsx64("div", { className: "ss-w-sl", "data-testid": "game-screen-stat-ladder", children: /* @__PURE__ */ jsx64("div", { className: "ss-w-gscreen-body", children: "Loading\u2026" }) });
5535
5601
  }
5536
5602
  const mysteryName = revealed ? clientState.revealedRank2.playerName : null;
5537
5603
  return /* @__PURE__ */ jsxs57("div", { className: "ss-w-sl", "data-testid": "game-screen-stat-ladder", children: [
5538
- /* @__PURE__ */ jsx63("div", { className: "ss-w-sl-title", children: config.statLabel }),
5539
- /* @__PURE__ */ jsx63("div", { className: "ss-w-sl-ladder", children: config.ladder.map((rung) => {
5604
+ /* @__PURE__ */ jsx64("div", { className: "ss-w-sl-title", children: config.statLabel }),
5605
+ /* @__PURE__ */ jsx64("div", { className: "ss-w-sl-ladder", children: config.ladder.map((rung) => {
5540
5606
  const isMystery = rung.rank === 2;
5541
5607
  let rowCls = "ss-w-sl-lrow";
5542
5608
  if (isMystery) rowCls += " ss-w-sl-mystery";
@@ -5550,12 +5616,12 @@ function StatLadderGame({
5550
5616
  "#",
5551
5617
  rung.rank
5552
5618
  ] }),
5553
- /* @__PURE__ */ jsx63("div", { className: "ss-w-sl-lrow-name", children: displayName }),
5554
- /* @__PURE__ */ jsx63("div", { className: "ss-w-sl-lrow-stat", children: rung.statValue })
5619
+ /* @__PURE__ */ jsx64("div", { className: "ss-w-sl-lrow-name", children: displayName }),
5620
+ /* @__PURE__ */ jsx64("div", { className: "ss-w-sl-lrow-stat", children: rung.statValue })
5555
5621
  ] }, rung.rank);
5556
5622
  }) }),
5557
- revealed && /* @__PURE__ */ jsx63("div", { className: `ss-w-sl-reveal ss-w-sl-reveal--${clientState.isCorrect ? "correct" : "wrong"}`, children: clientState.isCorrect ? "Correct!" : `Wrong \u2014 it was ${clientState.revealedRank2.playerName}` }),
5558
- !revealed && /* @__PURE__ */ jsx63("div", { className: "ss-w-sl-picker", children: config.playerPool.map((p) => /* @__PURE__ */ jsx63(
5623
+ revealed && /* @__PURE__ */ jsx64("div", { className: `ss-w-sl-reveal ss-w-sl-reveal--${clientState.isCorrect ? "correct" : "wrong"}`, children: clientState.isCorrect ? "Correct!" : `Wrong \u2014 it was ${clientState.revealedRank2.playerName}` }),
5624
+ !revealed && /* @__PURE__ */ jsx64("div", { className: "ss-w-sl-picker", children: config.playerPool.map((p) => /* @__PURE__ */ jsx64(
5559
5625
  "button",
5560
5626
  {
5561
5627
  type: "button",
@@ -5571,7 +5637,7 @@ function StatLadderGame({
5571
5637
  }
5572
5638
 
5573
5639
  // src/components/games/FanMotmGame.tsx
5574
- import { jsx as jsx64, jsxs as jsxs58 } from "react/jsx-runtime";
5640
+ import { jsx as jsx65, jsxs as jsxs58 } from "react/jsx-runtime";
5575
5641
  function parseClientState10(json) {
5576
5642
  if (!json) return null;
5577
5643
  try {
@@ -5589,7 +5655,7 @@ function FanMotmGame({
5589
5655
  const clientState = parseClientState10(result?.clientStateJson);
5590
5656
  const alreadyVoted = result?.alreadyPlayed === true;
5591
5657
  if (!config) {
5592
- return /* @__PURE__ */ jsx64("div", { className: "ss-w-motm", "data-testid": "game-screen-fan-motm", children: /* @__PURE__ */ jsx64("div", { className: "ss-w-gscreen-body", children: "Loading\u2026" }) });
5658
+ return /* @__PURE__ */ jsx65("div", { className: "ss-w-motm", "data-testid": "game-screen-fan-motm", children: /* @__PURE__ */ jsx65("div", { className: "ss-w-gscreen-body", children: "Loading\u2026" }) });
5593
5659
  }
5594
5660
  const pickedId = clientState?.pickedPlayerId ?? null;
5595
5661
  function handleVote(candidateId) {
@@ -5597,8 +5663,8 @@ function FanMotmGame({
5597
5663
  onSubmit(JSON.stringify({ pickedPlayerId: candidateId }));
5598
5664
  }
5599
5665
  return /* @__PURE__ */ jsxs58("div", { className: "ss-w-motm", "data-testid": "game-screen-fan-motm", children: [
5600
- /* @__PURE__ */ jsx64("div", { className: "ss-w-motm-title", children: "Man of the Match \u2014 your vote" }),
5601
- /* @__PURE__ */ jsx64("div", { className: "ss-w-motm-votes", children: config.candidates.map((c) => {
5666
+ /* @__PURE__ */ jsx65("div", { className: "ss-w-motm-title", children: "Man of the Match \u2014 your vote" }),
5667
+ /* @__PURE__ */ jsx65("div", { className: "ss-w-motm-votes", children: config.candidates.map((c) => {
5602
5668
  const isVoted = alreadyVoted && pickedId === c.playerId;
5603
5669
  const rowCls = `ss-w-motm-vrow${isVoted ? " ss-w-motm-vrow--voted" : ""}${alreadyVoted ? " ss-w-motm-vrow--result" : ""}`;
5604
5670
  return /* @__PURE__ */ jsxs58(
@@ -5610,19 +5676,19 @@ function FanMotmGame({
5610
5676
  disabled: alreadyVoted || submitting,
5611
5677
  onClick: () => handleVote(c.playerId),
5612
5678
  children: [
5613
- /* @__PURE__ */ jsx64("div", { className: "ss-w-motm-vfill", style: { width: isVoted ? "100%" : "0%" } }),
5614
- /* @__PURE__ */ jsx64("span", { className: "ss-w-motm-vrow-name", children: c.playerName })
5679
+ /* @__PURE__ */ jsx65("div", { className: "ss-w-motm-vfill", style: { width: isVoted ? "100%" : "0%" } }),
5680
+ /* @__PURE__ */ jsx65("span", { className: "ss-w-motm-vrow-name", children: c.playerName })
5615
5681
  ]
5616
5682
  },
5617
5683
  c.playerId
5618
5684
  );
5619
5685
  }) }),
5620
- /* @__PURE__ */ jsx64("div", { className: "ss-w-motm-fun", children: "For fun \u2014 unranked community vote" })
5686
+ /* @__PURE__ */ jsx65("div", { className: "ss-w-motm-fun", children: "For fun \u2014 unranked community vote" })
5621
5687
  ] });
5622
5688
  }
5623
5689
 
5624
5690
  // src/components/GameScreenHost.tsx
5625
- import { jsx as jsx65, jsxs as jsxs59 } from "react/jsx-runtime";
5691
+ import { jsx as jsx66, jsxs as jsxs59 } from "react/jsx-runtime";
5626
5692
  var FIXTURE_GAME_IDS = /* @__PURE__ */ new Set([
5627
5693
  "matchday-predictor",
5628
5694
  "starting-xi",
@@ -5645,7 +5711,7 @@ function GameScreenHost({
5645
5711
  ui
5646
5712
  }) {
5647
5713
  const { gameId, fixtureId, gameDay = "" } = selected;
5648
- const [configJson, setConfigJson] = useState30(null);
5714
+ const [configJson, setConfigJson] = useState31(null);
5649
5715
  useEffect13(() => {
5650
5716
  setConfigJson(null);
5651
5717
  if (!conversation) return;
@@ -5690,7 +5756,7 @@ function GameScreenHost({
5690
5756
  function renderScreen() {
5691
5757
  switch (gameId) {
5692
5758
  case "mystery-tiger":
5693
- return /* @__PURE__ */ jsx65(
5759
+ return /* @__PURE__ */ jsx66(
5694
5760
  MysteryTigerGame,
5695
5761
  {
5696
5762
  ...sharedProps,
@@ -5698,7 +5764,7 @@ function GameScreenHost({
5698
5764
  }
5699
5765
  );
5700
5766
  case "higher-or-lower":
5701
- return /* @__PURE__ */ jsx65(
5767
+ return /* @__PURE__ */ jsx66(
5702
5768
  HigherOrLowerGame,
5703
5769
  {
5704
5770
  ...sharedProps,
@@ -5706,7 +5772,7 @@ function GameScreenHost({
5706
5772
  }
5707
5773
  );
5708
5774
  case "career-path":
5709
- return /* @__PURE__ */ jsx65(
5775
+ return /* @__PURE__ */ jsx66(
5710
5776
  CareerPathGame,
5711
5777
  {
5712
5778
  ...sharedProps,
@@ -5715,7 +5781,7 @@ function GameScreenHost({
5715
5781
  );
5716
5782
  case "beat-the-grid": {
5717
5783
  const btgConfig = safeParseConfig(configJson);
5718
- return /* @__PURE__ */ jsx65(
5784
+ return /* @__PURE__ */ jsx66(
5719
5785
  BeatTheGridGame,
5720
5786
  {
5721
5787
  ...sharedProps,
@@ -5725,7 +5791,7 @@ function GameScreenHost({
5725
5791
  );
5726
5792
  }
5727
5793
  case "guess-the-xi":
5728
- return /* @__PURE__ */ jsx65(
5794
+ return /* @__PURE__ */ jsx66(
5729
5795
  GuessTheXiGame,
5730
5796
  {
5731
5797
  ...sharedProps,
@@ -5733,7 +5799,7 @@ function GameScreenHost({
5733
5799
  }
5734
5800
  );
5735
5801
  case "daily-quiz":
5736
- return /* @__PURE__ */ jsx65(
5802
+ return /* @__PURE__ */ jsx66(
5737
5803
  DailyQuizGame,
5738
5804
  {
5739
5805
  ...sharedProps,
@@ -5741,7 +5807,7 @@ function GameScreenHost({
5741
5807
  }
5742
5808
  );
5743
5809
  case "matchday-predictor":
5744
- return /* @__PURE__ */ jsx65(
5810
+ return /* @__PURE__ */ jsx66(
5745
5811
  MatchdayPredictorGame,
5746
5812
  {
5747
5813
  ...sharedProps,
@@ -5749,7 +5815,7 @@ function GameScreenHost({
5749
5815
  }
5750
5816
  );
5751
5817
  case "starting-xi":
5752
- return /* @__PURE__ */ jsx65(
5818
+ return /* @__PURE__ */ jsx66(
5753
5819
  StartingXiGame,
5754
5820
  {
5755
5821
  ...sharedProps,
@@ -5757,7 +5823,7 @@ function GameScreenHost({
5757
5823
  }
5758
5824
  );
5759
5825
  case "stat-ladder":
5760
- return /* @__PURE__ */ jsx65(
5826
+ return /* @__PURE__ */ jsx66(
5761
5827
  StatLadderGame,
5762
5828
  {
5763
5829
  ...sharedProps,
@@ -5765,7 +5831,7 @@ function GameScreenHost({
5765
5831
  }
5766
5832
  );
5767
5833
  case "fan-motm":
5768
- return /* @__PURE__ */ jsx65(
5834
+ return /* @__PURE__ */ jsx66(
5769
5835
  FanMotmGame,
5770
5836
  {
5771
5837
  ...sharedProps,
@@ -5773,12 +5839,12 @@ function GameScreenHost({
5773
5839
  }
5774
5840
  );
5775
5841
  default:
5776
- return /* @__PURE__ */ jsx65("div", { className: "ss-w-gscreen-body", "data-testid": `game-screen-${gameId}`, children: gameId });
5842
+ return /* @__PURE__ */ jsx66("div", { className: "ss-w-gscreen-body", "data-testid": `game-screen-${gameId}`, children: gameId });
5777
5843
  }
5778
5844
  }
5779
5845
  return /* @__PURE__ */ jsxs59("div", { className: "ss-w-gscreen", children: [
5780
5846
  /* @__PURE__ */ jsxs59("button", { type: "button", className: "ss-w-gscreen-back", onClick: onBack, children: [
5781
- /* @__PURE__ */ jsx65("span", { className: "ss-w-gscreen-back-arrow", "aria-hidden": "true", children: "\u2039" }),
5847
+ /* @__PURE__ */ jsx66("span", { className: "ss-w-gscreen-back-arrow", "aria-hidden": "true", children: "\u2039" }),
5782
5848
  ui.back
5783
5849
  ] }),
5784
5850
  renderScreen()
@@ -5786,17 +5852,17 @@ function GameScreenHost({
5786
5852
  }
5787
5853
 
5788
5854
  // src/components/GamesPanel.tsx
5789
- import { jsx as jsx66 } from "react/jsx-runtime";
5855
+ import { jsx as jsx67 } from "react/jsx-runtime";
5790
5856
  function GamesPanel({
5791
5857
  loggedIn,
5792
5858
  games,
5793
5859
  ui,
5794
5860
  conversation
5795
5861
  }) {
5796
- const [selected, setSelected] = useState31(null);
5797
- if (!loggedIn) return /* @__PURE__ */ jsx66(GamesLoginWall, { ui });
5862
+ const [selected, setSelected] = useState32(null);
5863
+ if (!loggedIn) return /* @__PURE__ */ jsx67(GamesLoginWall, { ui });
5798
5864
  if (selected !== null) {
5799
- return /* @__PURE__ */ jsx66("div", { className: "ss-w-gscreen-wrap", children: /* @__PURE__ */ jsx66(
5865
+ return /* @__PURE__ */ jsx67("div", { className: "ss-w-gscreen-wrap", children: /* @__PURE__ */ jsx67(
5800
5866
  GameScreenHost,
5801
5867
  {
5802
5868
  selected,
@@ -5806,7 +5872,7 @@ function GamesPanel({
5806
5872
  }
5807
5873
  ) });
5808
5874
  }
5809
- return /* @__PURE__ */ jsx66("div", { className: "ss-w-mon-list", "data-testid": "games-hub", children: /* @__PURE__ */ jsx66(
5875
+ return /* @__PURE__ */ jsx67("div", { className: "ss-w-mon-list", "data-testid": "games-hub", children: /* @__PURE__ */ jsx67(
5810
5876
  GamesHub,
5811
5877
  {
5812
5878
  games,
@@ -5817,10 +5883,10 @@ function GamesPanel({
5817
5883
  }
5818
5884
 
5819
5885
  // src/components/Leaderboard.tsx
5820
- import { useState as useState32 } from "react";
5886
+ import { useState as useState33 } from "react";
5821
5887
 
5822
5888
  // src/components/LeaderboardRow.tsx
5823
- import { jsx as jsx67, jsxs as jsxs60 } from "react/jsx-runtime";
5889
+ import { jsx as jsx68, jsxs as jsxs60 } from "react/jsx-runtime";
5824
5890
  function formatPoints(n) {
5825
5891
  return n.toLocaleString("en");
5826
5892
  }
@@ -5834,8 +5900,8 @@ function LeaderboardWeeklyRow({
5834
5900
  "#",
5835
5901
  row.rank
5836
5902
  ] }),
5837
- /* @__PURE__ */ jsx67("span", { className: "ss-w-lb2-handle", children: row.handle }),
5838
- /* @__PURE__ */ jsx67("span", { className: "ss-w-lb2-points", children: formatPoints(row.points) }),
5903
+ /* @__PURE__ */ jsx68("span", { className: "ss-w-lb2-handle", children: row.handle }),
5904
+ /* @__PURE__ */ jsx68("span", { className: "ss-w-lb2-points", children: formatPoints(row.points) }),
5839
5905
  row.currentStreak > 0 && /* @__PURE__ */ jsxs60("span", { className: "ss-w-lb2-streak", children: [
5840
5906
  "\u{1F525} ",
5841
5907
  row.currentStreak
@@ -5852,13 +5918,13 @@ function LeaderboardAllTimeRow({
5852
5918
  "#",
5853
5919
  row.rank
5854
5920
  ] }),
5855
- /* @__PURE__ */ jsx67("span", { className: "ss-w-lb2-handle", children: row.handle }),
5856
- /* @__PURE__ */ jsx67("span", { className: "ss-w-lb2-points", children: formatPoints(row.allTimePoints) })
5921
+ /* @__PURE__ */ jsx68("span", { className: "ss-w-lb2-handle", children: row.handle }),
5922
+ /* @__PURE__ */ jsx68("span", { className: "ss-w-lb2-points", children: formatPoints(row.allTimePoints) })
5857
5923
  ] });
5858
5924
  }
5859
5925
 
5860
5926
  // src/components/LeaderboardEmpty.tsx
5861
- import { jsx as jsx68, jsxs as jsxs61 } from "react/jsx-runtime";
5927
+ import { jsx as jsx69, jsxs as jsxs61 } from "react/jsx-runtime";
5862
5928
  function LeaderboardEmpty({
5863
5929
  segment,
5864
5930
  lastWeek,
@@ -5868,8 +5934,8 @@ function LeaderboardEmpty({
5868
5934
  }) {
5869
5935
  if (segment === "alltime") {
5870
5936
  return /* @__PURE__ */ jsxs61("div", { className: "ss-w-lb-empty ss-w-lb-empty--alltime", children: [
5871
- /* @__PURE__ */ jsx68("div", { className: "ss-w-lb-empty-icon", "aria-hidden": "true", children: "\u{1F4CA}" }),
5872
- /* @__PURE__ */ jsx68("p", { className: "ss-w-lb-empty-body", children: ui.leaderboardAllTimeEmpty })
5937
+ /* @__PURE__ */ jsx69("div", { className: "ss-w-lb-empty-icon", "aria-hidden": "true", children: "\u{1F4CA}" }),
5938
+ /* @__PURE__ */ jsx69("p", { className: "ss-w-lb-empty-body", children: ui.leaderboardAllTimeEmpty })
5873
5939
  ] });
5874
5940
  }
5875
5941
  const fresh = lastWeek != null;
@@ -5877,38 +5943,38 @@ function LeaderboardEmpty({
5877
5943
  const body = fresh ? ui.leaderboardEmptyFreshBody : ui.leaderboardEmptyColdBody;
5878
5944
  return /* @__PURE__ */ jsxs61("div", { className: "ss-w-lb-empty", children: [
5879
5945
  weeklyPrize && /* @__PURE__ */ jsxs61("div", { className: "ss-w-prize", children: [
5880
- /* @__PURE__ */ jsx68("span", { className: "ss-w-prize-icon", "aria-hidden": "true", children: "\u{1F3C6}" }),
5881
- /* @__PURE__ */ jsx68("div", { className: "ss-w-prize-body", children: /* @__PURE__ */ jsx68("span", { className: "ss-w-prize-text", children: weeklyPrize }) })
5946
+ /* @__PURE__ */ jsx69("span", { className: "ss-w-prize-icon", "aria-hidden": "true", children: "\u{1F3C6}" }),
5947
+ /* @__PURE__ */ jsx69("div", { className: "ss-w-prize-body", children: /* @__PURE__ */ jsx69("span", { className: "ss-w-prize-text", children: weeklyPrize }) })
5882
5948
  ] }),
5883
5949
  /* @__PURE__ */ jsxs61("div", { className: "ss-w-lb-empty-hero", children: [
5884
- /* @__PURE__ */ jsx68("div", { className: "ss-w-lb-empty-icon", "aria-hidden": "true", children: fresh ? "\u{1F3C6}" : "\u{1F3AE}" }),
5885
- /* @__PURE__ */ jsx68("h4", { className: "ss-w-lb-empty-title", children: title }),
5886
- /* @__PURE__ */ jsx68("p", { className: "ss-w-lb-empty-body", children: body }),
5887
- onPlay && /* @__PURE__ */ jsx68("button", { type: "button", className: "ss-w-lb-empty-cta", onClick: onPlay, children: ui.leaderboardEmptyCta })
5950
+ /* @__PURE__ */ jsx69("div", { className: "ss-w-lb-empty-icon", "aria-hidden": "true", children: fresh ? "\u{1F3C6}" : "\u{1F3AE}" }),
5951
+ /* @__PURE__ */ jsx69("h4", { className: "ss-w-lb-empty-title", children: title }),
5952
+ /* @__PURE__ */ jsx69("p", { className: "ss-w-lb-empty-body", children: body }),
5953
+ onPlay && /* @__PURE__ */ jsx69("button", { type: "button", className: "ss-w-lb-empty-cta", onClick: onPlay, children: ui.leaderboardEmptyCta })
5888
5954
  ] }),
5889
5955
  fresh && lastWeek && /* @__PURE__ */ jsxs61("div", { className: "ss-w-lb-last", children: [
5890
- /* @__PURE__ */ jsx68("span", { className: "ss-w-lb-last-label", children: ui.leaderboardLastWeekLabel }),
5891
- /* @__PURE__ */ jsx68("span", { className: "ss-w-lb-last-champ", "aria-hidden": "true", children: "\u{1F947}" }),
5892
- /* @__PURE__ */ jsx68("span", { className: "ss-w-lb-last-handle", children: lastWeek.handle }),
5893
- /* @__PURE__ */ jsx68("span", { className: "ss-w-lb-last-points", children: formatPoints(lastWeek.points) })
5956
+ /* @__PURE__ */ jsx69("span", { className: "ss-w-lb-last-label", children: ui.leaderboardLastWeekLabel }),
5957
+ /* @__PURE__ */ jsx69("span", { className: "ss-w-lb-last-champ", "aria-hidden": "true", children: "\u{1F947}" }),
5958
+ /* @__PURE__ */ jsx69("span", { className: "ss-w-lb-last-handle", children: lastWeek.handle }),
5959
+ /* @__PURE__ */ jsx69("span", { className: "ss-w-lb-last-points", children: formatPoints(lastWeek.points) })
5894
5960
  ] })
5895
5961
  ] });
5896
5962
  }
5897
5963
 
5898
5964
  // src/components/Leaderboard.tsx
5899
- import { Fragment as Fragment16, jsx as jsx69, jsxs as jsxs62 } from "react/jsx-runtime";
5965
+ import { Fragment as Fragment16, jsx as jsx70, jsxs as jsxs62 } from "react/jsx-runtime";
5900
5966
  function Leaderboard({
5901
5967
  data,
5902
5968
  ui,
5903
5969
  onPlay
5904
5970
  }) {
5905
- const [segment, setSegment] = useState32("weekly");
5971
+ const [segment, setSegment] = useState33("weekly");
5906
5972
  const myRow = segment === "weekly" ? data.myWeeklyRow : data.myAllTimeRow;
5907
5973
  const offBoard = myRow !== null && myRow !== void 0 && myRow.rank === -1;
5908
5974
  const isEmpty = segment === "weekly" ? data.weeklyTop.length === 0 : data.allTimeTop.length === 0;
5909
5975
  return /* @__PURE__ */ jsxs62("div", { className: "ss-w-lb2", children: [
5910
5976
  /* @__PURE__ */ jsxs62("div", { className: "ss-w-seg", children: [
5911
- /* @__PURE__ */ jsx69(
5977
+ /* @__PURE__ */ jsx70(
5912
5978
  "button",
5913
5979
  {
5914
5980
  type: "button",
@@ -5918,7 +5984,7 @@ function Leaderboard({
5918
5984
  children: ui.leaderboardThisWeek
5919
5985
  }
5920
5986
  ),
5921
- /* @__PURE__ */ jsx69(
5987
+ /* @__PURE__ */ jsx70(
5922
5988
  "button",
5923
5989
  {
5924
5990
  type: "button",
@@ -5929,7 +5995,7 @@ function Leaderboard({
5929
5995
  }
5930
5996
  )
5931
5997
  ] }),
5932
- isEmpty ? /* @__PURE__ */ jsx69(
5998
+ isEmpty ? /* @__PURE__ */ jsx70(
5933
5999
  LeaderboardEmpty,
5934
6000
  {
5935
6001
  segment,
@@ -5939,14 +6005,14 @@ function Leaderboard({
5939
6005
  ui
5940
6006
  }
5941
6007
  ) : /* @__PURE__ */ jsxs62(Fragment16, { children: [
5942
- /* @__PURE__ */ jsx69("div", { className: "ss-w-lb2-rows", children: segment === "weekly" ? data.weeklyTop.map((row) => /* @__PURE__ */ jsx69(
6008
+ /* @__PURE__ */ jsx70("div", { className: "ss-w-lb2-rows", children: segment === "weekly" ? data.weeklyTop.map((row) => /* @__PURE__ */ jsx70(
5943
6009
  LeaderboardWeeklyRow,
5944
6010
  {
5945
6011
  row,
5946
6012
  isMe: row.operatorUserId === data.myWeeklyRow?.operatorUserId
5947
6013
  },
5948
6014
  row.operatorUserId
5949
- )) : data.allTimeTop.map((row) => /* @__PURE__ */ jsx69(
6015
+ )) : data.allTimeTop.map((row) => /* @__PURE__ */ jsx70(
5950
6016
  LeaderboardAllTimeRow,
5951
6017
  {
5952
6018
  row,
@@ -5954,18 +6020,18 @@ function Leaderboard({
5954
6020
  },
5955
6021
  row.operatorUserId
5956
6022
  )) }),
5957
- /* @__PURE__ */ jsx69("div", { className: "ss-w-kitline", children: "\u{1F3BD}" }),
5958
- myRow != null && (offBoard ? /* @__PURE__ */ jsx69("div", { className: "ss-w-lbgap", children: ui.leaderboardOffBoard }) : /* @__PURE__ */ jsxs62("div", { className: "ss-w-lb2-rows", children: [
5959
- segment === "weekly" && data.myWeeklyRow && /* @__PURE__ */ jsx69(LeaderboardWeeklyRow, { row: data.myWeeklyRow, isMe: true }),
5960
- segment === "alltime" && data.myAllTimeRow && /* @__PURE__ */ jsx69(LeaderboardAllTimeRow, { row: data.myAllTimeRow, isMe: true })
6023
+ /* @__PURE__ */ jsx70("div", { className: "ss-w-kitline", children: "\u{1F3BD}" }),
6024
+ myRow != null && (offBoard ? /* @__PURE__ */ jsx70("div", { className: "ss-w-lbgap", children: ui.leaderboardOffBoard }) : /* @__PURE__ */ jsxs62("div", { className: "ss-w-lb2-rows", children: [
6025
+ segment === "weekly" && data.myWeeklyRow && /* @__PURE__ */ jsx70(LeaderboardWeeklyRow, { row: data.myWeeklyRow, isMe: true }),
6026
+ segment === "alltime" && data.myAllTimeRow && /* @__PURE__ */ jsx70(LeaderboardAllTimeRow, { row: data.myAllTimeRow, isMe: true })
5961
6027
  ] })),
5962
- 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)) }) }) })
6028
+ segment === "alltime" && data.myAllTimeRow && !offBoard && /* @__PURE__ */ jsx70("div", { className: "ss-w-lb2-rows", children: /* @__PURE__ */ jsx70("div", { className: "ss-w-lb2-row", children: /* @__PURE__ */ jsx70("span", { className: "ss-w-lb2-handle", children: formatPoints(data.allTimeTop.reduce((s, r) => s + r.allTimePoints, 0)) }) }) })
5963
6029
  ] })
5964
6030
  ] });
5965
6031
  }
5966
6032
 
5967
6033
  // src/components/LeaderboardPanel.tsx
5968
- import { jsx as jsx70 } from "react/jsx-runtime";
6034
+ import { jsx as jsx71 } from "react/jsx-runtime";
5969
6035
  var EMPTY_PAYLOAD = {
5970
6036
  week: "",
5971
6037
  weeklyTop: [],
@@ -5976,16 +6042,16 @@ var EMPTY_PAYLOAD = {
5976
6042
  lastWeek: null
5977
6043
  };
5978
6044
  function LeaderboardPanel({ loggedIn, data, loading, onPlay, ui }) {
5979
- if (!loggedIn) return /* @__PURE__ */ jsx70(GamesLoginWall, { ui });
5980
- if (data === null && loading) return /* @__PURE__ */ jsx70("div", { className: "ss-w-mon-list" });
5981
- return /* @__PURE__ */ jsx70("div", { className: "ss-w-mon-list", children: /* @__PURE__ */ jsx70(Leaderboard, { data: data ?? EMPTY_PAYLOAD, ui, onPlay }) });
6045
+ if (!loggedIn) return /* @__PURE__ */ jsx71(GamesLoginWall, { ui });
6046
+ if (data === null && loading) return /* @__PURE__ */ jsx71("div", { className: "ss-w-mon-list" });
6047
+ return /* @__PURE__ */ jsx71("div", { className: "ss-w-mon-list", children: /* @__PURE__ */ jsx71(Leaderboard, { data: data ?? EMPTY_PAYLOAD, ui, onPlay }) });
5982
6048
  }
5983
6049
 
5984
6050
  // src/components/ChatPanel.tsx
5985
- import { jsx as jsx71, jsxs as jsxs63 } from "react/jsx-runtime";
6051
+ import { jsx as jsx72, jsxs as jsxs63 } from "react/jsx-runtime";
5986
6052
  var FULLSCREEN_QUERY = "(max-width: 639px)";
5987
6053
  function useIsModal() {
5988
- const [modal, setModal] = useState33(false);
6054
+ const [modal, setModal] = useState34(false);
5989
6055
  useEffect14(() => {
5990
6056
  if (typeof window === "undefined" || typeof window.matchMedia !== "function") return;
5991
6057
  const mql = window.matchMedia(FULLSCREEN_QUERY);
@@ -6014,7 +6080,7 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
6014
6080
  if (monitor && monitor.activeTab !== "chat" && state.isStreaming) monitor.markChatActivity();
6015
6081
  }, [monitor, state.isStreaming, state.messages.length]);
6016
6082
  return /* @__PURE__ */ jsxs63("div", { className: "ss-w-panel", role: "dialog", "aria-modal": isModal, "aria-label": ui.chatDialogLabel, children: [
6017
- /* @__PURE__ */ jsx71(
6083
+ /* @__PURE__ */ jsx72(
6018
6084
  ChatHeader,
6019
6085
  {
6020
6086
  onClose: close,
@@ -6027,7 +6093,7 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
6027
6093
  moreOptionsLabel: ui.moreOptions
6028
6094
  }
6029
6095
  ),
6030
- monitor && /* @__PURE__ */ jsx71(
6096
+ monitor && /* @__PURE__ */ jsx72(
6031
6097
  TabBar,
6032
6098
  {
6033
6099
  monitor,
@@ -6039,18 +6105,18 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
6039
6105
  gamesEnabled: gamesResult?.enabled ?? false
6040
6106
  }
6041
6107
  ),
6042
- /* @__PURE__ */ jsx71(
6108
+ /* @__PURE__ */ jsx72(
6043
6109
  "div",
6044
6110
  {
6045
6111
  style: !monitor || monitor.activeTab === "chat" ? { display: "contents" } : { position: "absolute", inset: 0, visibility: "hidden", display: "flex", flexDirection: "column" },
6046
- children: /* @__PURE__ */ jsx71(MessageList, { controller, ui, slip, onDashboardTap, monitor })
6112
+ children: /* @__PURE__ */ jsx72(MessageList, { controller, ui, slip, onDashboardTap, monitor })
6047
6113
  }
6048
6114
  ),
6049
- monitor && discovery && monitor.activeTab === "today" && /* @__PURE__ */ jsx71(TodayPanel, { discovery, ui, monitor }),
6050
- monitor && monitor.activeTab === "following" && /* @__PURE__ */ jsx71(MatchesPanel, { monitor, ui, slip }),
6051
- monitor && monitor.activeTab === "odds" && /* @__PURE__ */ jsx71(OddsPanel, { monitor, ui, slip }),
6052
- monitor && monitor.activeTab === "games" && gamesResult && /* @__PURE__ */ jsx71(GamesPanel, { loggedIn: !!loggedIn, games: gamesResult.games, ui, conversation }),
6053
- monitor && monitor.activeTab === "leaderboard" && leaderboardResult && /* @__PURE__ */ jsx71(
6115
+ monitor && discovery && monitor.activeTab === "today" && /* @__PURE__ */ jsx72(TodayPanel, { discovery, ui, monitor }),
6116
+ monitor && monitor.activeTab === "following" && /* @__PURE__ */ jsx72(MatchesPanel, { monitor, ui, slip }),
6117
+ monitor && monitor.activeTab === "odds" && /* @__PURE__ */ jsx72(OddsPanel, { monitor, ui, slip }),
6118
+ monitor && monitor.activeTab === "games" && gamesResult && /* @__PURE__ */ jsx72(GamesPanel, { loggedIn: !!loggedIn, games: gamesResult.games, ui, conversation }),
6119
+ monitor && monitor.activeTab === "leaderboard" && leaderboardResult && /* @__PURE__ */ jsx72(
6054
6120
  LeaderboardPanel,
6055
6121
  {
6056
6122
  loggedIn: !!loggedIn,
@@ -6060,7 +6126,7 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
6060
6126
  ui
6061
6127
  }
6062
6128
  ),
6063
- (!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 })
6129
+ (!monitor || monitor.activeTab !== "games" && monitor.activeTab !== "leaderboard") && /* @__PURE__ */ jsx72(ChatInput, { placeholder: ui.placeholder, streaming: state.isStreaming, onSend: handleSend, onStop: stop, stopLabel: ui.stopResponse, sendLabel: ui.sendMessage })
6064
6130
  ] });
6065
6131
  }
6066
6132
 
@@ -7067,6 +7133,22 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
7067
7133
  .ss-w-gt-title { font-size: 18px; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; color: var(--ss-w-ink); line-height: 1; }
7068
7134
  .ss-w-gt-sub { font-size: 11px; color: var(--ss-w-faint); margin-top: 4px; }
7069
7135
  .ss-w-gt-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; }
7136
+ /* Hero card \u2014 portrait + the masked profile the fan is hunting on. On reveal the silhouette
7137
+ becomes the real photo (or initials) and the profile rows drop away. Fully token-driven. */
7138
+ .ss-w-gt-card { display: grid; grid-template-columns: 96px 1fr; gap: 12px; background: var(--ss-w-bubble); border: 1px solid var(--ss-w-line); border-radius: 14px; padding: 12px; }
7139
+ .ss-w-gt-card--reveal { grid-template-columns: 1fr; justify-items: center; }
7140
+ .ss-w-gt-sil { width: 96px; height: 118px; border-radius: 11px; overflow: hidden; background: var(--ss-w-panel); border: 1px solid var(--ss-w-line); display: grid; place-items: center; }
7141
+ .ss-w-gt-sil svg, .ss-w-gt-sil img { display: block; width: 100%; height: 100%; }
7142
+ .ss-w-gt-sil img { object-fit: cover; }
7143
+ .ss-w-gt-attrs { display: flex; flex-direction: column; justify-content: center; }
7144
+ .ss-w-gt-attr { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 2px; }
7145
+ .ss-w-gt-attr + .ss-w-gt-attr { border-top: 1px solid var(--ss-w-line); }
7146
+ .ss-w-gt-attr-k { color: var(--ss-w-faint); font-size: 12px; font-weight: 600; }
7147
+ .ss-w-gt-attr-v { color: var(--ss-w-faint); font-size: 13px; font-weight: 800; letter-spacing: .12em; }
7148
+ /* Progress dots \u2014 one per guess allowance; used guesses filled with the accent. */
7149
+ .ss-w-gt-dots { display: flex; gap: 7px; justify-content: center; }
7150
+ .ss-w-gt-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ss-w-wrong); }
7151
+ .ss-w-gt-dot--on { background: var(--ss-w-accent); }
7070
7152
  /* Guess rows \u2014 one labelled block per guess */
7071
7153
  .ss-w-gtrows { display: flex; flex-direction: column; gap: 8px; }
7072
7154
  /* First-load legend (empty state) */
@@ -7104,13 +7186,19 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
7104
7186
  /* Pair: player A | Higher/Lower | player B */
7105
7187
  .ss-w-hlpair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: stretch; }
7106
7188
  .ss-w-hlpc { background: var(--ss-w-panel); border: 1px solid var(--ss-w-line); border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 14px 6px; text-align: center; min-width: 0; }
7107
- .ss-w-hlpc-av { width: 42px; height: 42px; border-radius: 50%; background: var(--ss-w-bubble); border: 1px solid var(--ss-w-line); display: grid; place-items: center; font-size: 20px; flex: none; }
7189
+ /* Player photo (was a 42px ball emoji): fixed 60px circle on both cards so they stay identical
7190
+ regardless of name length. Falls back to initials when no photo URL is present. */
7191
+ .ss-w-hlpc-av { width: 60px; height: 60px; border-radius: 50%; overflow: hidden; background: var(--ss-w-bubble); border: 1px solid var(--ss-w-line); display: grid; place-items: center; flex: none; }
7192
+ .ss-w-hlpc-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
7193
+ .ss-w-av-initials { font-size: 18px; font-weight: 800; color: var(--ss-w-faint); text-transform: uppercase; letter-spacing: .02em; }
7108
7194
  .ss-w-hlpc-name { font-size: 12.5px; font-weight: 700; color: var(--ss-w-ink); line-height: 1.15; }
7109
7195
  .ss-w-hlpc-stat { font-size: 8.5px; color: var(--ss-w-faint); text-transform: uppercase; letter-spacing: .04em; }
7110
7196
  .ss-w-hlpc-val { font-size: 30px; font-weight: 800; color: var(--ss-w-accent); font-variant-numeric: tabular-nums; line-height: 1; }
7111
7197
  .ss-w-hlpc-val--hidden { color: var(--ss-w-faint); }
7112
- /* Higher / Lower \u2014 middle column */
7113
- .ss-w-hlbtns { display: flex; flex-direction: column; gap: 6px; justify-content: center; }
7198
+ /* Higher / Lower \u2014 middle column. The pair grid stretches this column to the cards' height, so
7199
+ space-between pins Higher to the top and Lower to the bottom, with "or" centered between the
7200
+ two players. */
7201
+ .ss-w-hlbtns { display: flex; flex-direction: column; gap: 6px; justify-content: space-between; }
7114
7202
  .ss-w-hl-or { text-align: center; font-size: 11px; font-weight: 700; color: var(--ss-w-faint); }
7115
7203
  .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; }
7116
7204
  /* Both options are neutral until picked \u2014 an amber default read as "already selected". */
@@ -7394,7 +7482,7 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
7394
7482
  `;
7395
7483
 
7396
7484
  // src/StatsWidget.tsx
7397
- import { jsx as jsx72 } from "react/jsx-runtime";
7485
+ import { jsx as jsx73 } from "react/jsx-runtime";
7398
7486
  function buildClient(props) {
7399
7487
  try {
7400
7488
  if ("client" in props && props.client) {
@@ -7435,7 +7523,7 @@ function StatsWidget(props) {
7435
7523
  }, []);
7436
7524
  const convStorageKey = `ss-w-conv:${cfg?.operatorId ?? ""}:${cfg?.userContext?.operatorUserId ?? "anon"}`;
7437
7525
  const controller = useChatStream(built?.conversation ?? emptyConversation(), ui.starters, built ? ui.greetingMessage : void 0, convStorageKey);
7438
- const [hasToday, setHasToday] = useState34(false);
7526
+ const [hasToday, setHasToday] = useState35(false);
7439
7527
  const monitor = useLiveMonitor({
7440
7528
  getLiveMonitor: (pins) => built ? built.conversation.getLiveMonitor(pins) : Promise.resolve(null),
7441
7529
  getMarketOdds: (matchId, dev) => built ? built.conversation.getMarketOdds(matchId, dev) : Promise.resolve(null),
@@ -7533,7 +7621,7 @@ function StatsWidget(props) {
7533
7621
  }, [built, ui.injectStyles]);
7534
7622
  if (!built) return null;
7535
7623
  const attrs = themeAttrs(ui);
7536
- 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(
7624
+ return /* @__PURE__ */ jsx73(EventLogContext.Provider, { value: logger, children: /* @__PURE__ */ jsx73("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__ */ jsx73(
7537
7625
  ChatPanel,
7538
7626
  {
7539
7627
  controller,
@@ -7547,7 +7635,7 @@ function StatsWidget(props) {
7547
7635
  loggedIn: !!operatorUserId,
7548
7636
  conversation: built?.conversation ?? null
7549
7637
  }
7550
- ) : /* @__PURE__ */ jsx72(
7638
+ ) : /* @__PURE__ */ jsx73(
7551
7639
  ChatFab,
7552
7640
  {
7553
7641
  label: ui.launcherLabel,