@sensiblestats/widget-react 0.81.2 → 0.82.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/CHANGELOG.md +9 -0
- package/dist/index.cjs +879 -762
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +879 -762
- package/dist/index.js.map +1 -1
- package/dist/styles.css +18 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -156,6 +156,7 @@ var STRINGS = {
|
|
|
156
156
|
topLeagues: "Top leagues",
|
|
157
157
|
topLeaguesSub: "Popular today.",
|
|
158
158
|
allLeagues: "All leagues",
|
|
159
|
+
seeAllFixturesLabel: (n) => `All fixtures (${n})`,
|
|
159
160
|
searchLeaguesPlaceholder: "Search leagues or teams",
|
|
160
161
|
noLeagueResults: "No league or team matches that search.",
|
|
161
162
|
clearSearchLabel: "Clear search",
|
|
@@ -522,6 +523,7 @@ var STRINGS = {
|
|
|
522
523
|
topLeagues: "\xD6ne \xE7\u0131kan ligler",
|
|
523
524
|
topLeaguesSub: "Bug\xFCn pop\xFCler.",
|
|
524
525
|
allLeagues: "T\xFCm ligler",
|
|
526
|
+
seeAllFixturesLabel: (n) => `T\xFCm ma\xE7lar (${n})`,
|
|
525
527
|
searchLeaguesPlaceholder: "Lig veya tak\u0131m ara",
|
|
526
528
|
noLeagueResults: "Aramana uyan lig veya tak\u0131m yok.",
|
|
527
529
|
clearSearchLabel: "Aramay\u0131 temizle",
|
|
@@ -885,6 +887,7 @@ function normalizeUi(cfg) {
|
|
|
885
887
|
topLeagues: strings.topLeagues,
|
|
886
888
|
topLeaguesSub: strings.topLeaguesSub,
|
|
887
889
|
allLeagues: strings.allLeagues,
|
|
890
|
+
seeAllFixturesLabel: strings.seeAllFixturesLabel,
|
|
888
891
|
searchLeaguesPlaceholder: strings.searchLeaguesPlaceholder,
|
|
889
892
|
noLeagueResults: strings.noLeagueResults,
|
|
890
893
|
clearSearchLabel: strings.clearSearchLabel,
|
|
@@ -6200,12 +6203,70 @@ function LeagueDetail({ group, position, states, stale, ui, monitor, starTap, on
|
|
|
6200
6203
|
] });
|
|
6201
6204
|
}
|
|
6202
6205
|
|
|
6206
|
+
// src/components/LeagueRowGroup.tsx
|
|
6207
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
6208
|
+
var ROW_CAP_PER_LEAGUE = 3;
|
|
6209
|
+
var SECTION_ROW_BUDGET = 12;
|
|
6210
|
+
function rowsFor(group, states, stale) {
|
|
6211
|
+
const nonLive = group.matches.filter((m) => !isTreatedLive(states[m.matchId], stale)).length;
|
|
6212
|
+
return Math.min(nonLive, ROW_CAP_PER_LEAGUE);
|
|
6213
|
+
}
|
|
6214
|
+
var STAR_PATH3 = "M12 2.5l2.9 5.9 6.5.95-4.7 4.58 1.1 6.47L12 17.35 6.1 20.4l1.1-6.47L2.5 9.35l6.5-.95z";
|
|
6215
|
+
function LeagueRowGroup({ group, states, stale, cap, starClickable: starClickable2, disambiguate, onOpen, starTap, ui, monitor }) {
|
|
6216
|
+
const sorted = group.matches.filter((m) => !isTreatedLive(states[m.matchId], stale)).sort((a, b) => a.kickoffUnix - b.kickoffUnix);
|
|
6217
|
+
if (sorted.length === 0) return null;
|
|
6218
|
+
const shown = sorted.slice(0, cap);
|
|
6219
|
+
const overflow = sorted.length - shown.length;
|
|
6220
|
+
const onStarClick = () => {
|
|
6221
|
+
void starTap.tap(group.competitionId, !group.isStarred);
|
|
6222
|
+
};
|
|
6223
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "ss-w-today-rowgroup", children: [
|
|
6224
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "ss-w-today-rowgroup-head", children: [
|
|
6225
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("button", { type: "button", className: "ss-w-today-rowgroup-head-body", onClick: onOpen, children: [
|
|
6226
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Crest2, { url: group.competitionImagePath ?? void 0, name: group.competitionName, kind: "comp" }),
|
|
6227
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("span", { className: "ss-w-today-rowgroup-name", children: [
|
|
6228
|
+
group.competitionName,
|
|
6229
|
+
disambiguate && group.competitionCountry ? /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("span", { className: "ss-w-today-tile-country", children: [
|
|
6230
|
+
" (",
|
|
6231
|
+
group.competitionCountry,
|
|
6232
|
+
")"
|
|
6233
|
+
] }) : null
|
|
6234
|
+
] })
|
|
6235
|
+
] }),
|
|
6236
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
6237
|
+
"button",
|
|
6238
|
+
{
|
|
6239
|
+
type: "button",
|
|
6240
|
+
className: "ss-w-today-rowgroup-star",
|
|
6241
|
+
"aria-pressed": group.isStarred,
|
|
6242
|
+
"aria-label": group.isStarred ? ui.starOffLabel : ui.starOnLabel,
|
|
6243
|
+
disabled: !starClickable2 || starTap.pendingId !== null,
|
|
6244
|
+
onClick: onStarClick,
|
|
6245
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
6246
|
+
"path",
|
|
6247
|
+
{
|
|
6248
|
+
d: STAR_PATH3,
|
|
6249
|
+
fill: group.isStarred ? "currentColor" : "none",
|
|
6250
|
+
stroke: group.isStarred ? "none" : "currentColor",
|
|
6251
|
+
strokeWidth: 2,
|
|
6252
|
+
strokeLinejoin: "round",
|
|
6253
|
+
strokeLinecap: "round"
|
|
6254
|
+
}
|
|
6255
|
+
) })
|
|
6256
|
+
}
|
|
6257
|
+
)
|
|
6258
|
+
] }),
|
|
6259
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "ss-w-today-rowgroup-rows", children: shown.map((m) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(FixtureRow, { match: m, state: states[m.matchId], stale, ui, monitor }, m.matchId)) }),
|
|
6260
|
+
overflow > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("button", { type: "button", className: "ss-w-today-rowgroup-seeall", onClick: onOpen, children: ui.seeAllFixturesLabel(sorted.length) })
|
|
6261
|
+
] });
|
|
6262
|
+
}
|
|
6263
|
+
|
|
6203
6264
|
// src/components/games/ui/SearchField.tsx
|
|
6204
6265
|
var import_react40 = require("react");
|
|
6205
6266
|
|
|
6206
6267
|
// src/components/games/ui/icons.tsx
|
|
6207
|
-
var
|
|
6208
|
-
var svg = (size, children, fill = false) => /* @__PURE__ */ (0,
|
|
6268
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
6269
|
+
var svg = (size, children, fill = false) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
6209
6270
|
"svg",
|
|
6210
6271
|
{
|
|
6211
6272
|
width: size,
|
|
@@ -6220,25 +6281,25 @@ var svg = (size, children, fill = false) => /* @__PURE__ */ (0, import_jsx_runti
|
|
|
6220
6281
|
children
|
|
6221
6282
|
}
|
|
6222
6283
|
);
|
|
6223
|
-
var IconChevronLeft = ({ size = 20 }) => svg(size, /* @__PURE__ */ (0,
|
|
6224
|
-
var IconLock = ({ size = 14 }) => svg(size, [/* @__PURE__ */ (0,
|
|
6225
|
-
var IconCheck = ({ size = 14 }) => svg(size, /* @__PURE__ */ (0,
|
|
6226
|
-
var IconClose = ({ size = 16 }) => svg(size, /* @__PURE__ */ (0,
|
|
6227
|
-
var IconSearch = ({ size = 18 }) => svg(size, [/* @__PURE__ */ (0,
|
|
6228
|
-
var IconPlus = ({ size = 20 }) => svg(size, /* @__PURE__ */ (0,
|
|
6229
|
-
var IconBulb = ({ size = 16 }) => svg(size, [/* @__PURE__ */ (0,
|
|
6230
|
-
var IconArrowUp = ({ size = 12 }) => svg(size, /* @__PURE__ */ (0,
|
|
6231
|
-
var IconArrowDown = ({ size = 12 }) => svg(size, /* @__PURE__ */ (0,
|
|
6232
|
-
var IconCalendar = ({ size = 18 }) => svg(size, [/* @__PURE__ */ (0,
|
|
6233
|
-
var IconShield = ({ size = 18 }) => svg(size, /* @__PURE__ */ (0,
|
|
6234
|
-
var IconFlag = ({ size = 18 }) => svg(size, /* @__PURE__ */ (0,
|
|
6235
|
-
var IconBall = ({ size = 18 }) => svg(size, [/* @__PURE__ */ (0,
|
|
6236
|
-
var IconBoot = ({ size = 18 }) => svg(size, /* @__PURE__ */ (0,
|
|
6237
|
-
var IconGloves = ({ size = 18 }) => svg(size, /* @__PURE__ */ (0,
|
|
6238
|
-
var IconFlame = ({ size = 16 }) => svg(size, /* @__PURE__ */ (0,
|
|
6284
|
+
var IconChevronLeft = ({ size = 20 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("path", { d: "M15 18l-6-6 6-6" }));
|
|
6285
|
+
var IconLock = ({ size = 14 }) => svg(size, [/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("rect", { x: "5", y: "11", width: "14", height: "10", rx: "2" }, "a"), /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("path", { d: "M8 11V7a4 4 0 0 1 8 0v4" }, "b")]);
|
|
6286
|
+
var IconCheck = ({ size = 14 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("path", { d: "M5 12l5 5 9-10" }));
|
|
6287
|
+
var IconClose = ({ size = 16 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("path", { d: "M6 6l12 12M18 6L6 18" }));
|
|
6288
|
+
var IconSearch = ({ size = 18 }) => svg(size, [/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("circle", { cx: "11", cy: "11", r: "7" }, "a"), /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("path", { d: "M20 20l-3.5-3.5" }, "b")]);
|
|
6289
|
+
var IconPlus = ({ size = 20 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("path", { d: "M12 5v14M5 12h14" }));
|
|
6290
|
+
var IconBulb = ({ size = 16 }) => svg(size, [/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("path", { d: "M9 18h6M10 21h4" }, "a"), /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("path", { d: "M12 3a6 6 0 0 0-3.5 10.9V16h7v-2.1A6 6 0 0 0 12 3z" }, "b")]);
|
|
6291
|
+
var IconArrowUp = ({ size = 12 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("path", { d: "M12 19V5M5 12l7-7 7 7" }));
|
|
6292
|
+
var IconArrowDown = ({ size = 12 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("path", { d: "M12 5v14M19 12l-7 7-7-7" }));
|
|
6293
|
+
var IconCalendar = ({ size = 18 }) => svg(size, [/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("rect", { x: "4", y: "5", width: "16", height: "15", rx: "2" }, "a"), /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("path", { d: "M4 10h16M9 3v4M15 3v4" }, "b")]);
|
|
6294
|
+
var IconShield = ({ size = 18 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("path", { d: "M12 3l7 3v6c0 5-3 8-7 9-4-1-7-4-7-9V6z" }));
|
|
6295
|
+
var IconFlag = ({ size = 18 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("path", { d: "M5 21V4M5 4h12l-2 4 2 4H5" }));
|
|
6296
|
+
var IconBall = ({ size = 18 }) => svg(size, [/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("circle", { cx: "12", cy: "12", r: "9" }, "a"), /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("path", { d: "M12 7l4 3-1.5 4.5h-5L8 10z" }, "b")]);
|
|
6297
|
+
var IconBoot = ({ size = 18 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("path", { d: "M4 6h6l1 6 8 3v3H4z" }));
|
|
6298
|
+
var IconGloves = ({ size = 18 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("path", { d: "M7 21v-8l-2-3V6a1.5 1.5 0 0 1 3 0v3V4a1.5 1.5 0 0 1 3 0v5V3.5a1.5 1.5 0 0 1 3 0V9V5a1.5 1.5 0 0 1 3 0v9l-2 3v4z" }));
|
|
6299
|
+
var IconFlame = ({ size = 16 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("path", { d: "M12 3c1 4 5 5 5 10a5 5 0 0 1-10 0c0-3 2-4 2-7 1.5 1 2 2 2 3 1-2 1-4 1-6z" }), true);
|
|
6239
6300
|
|
|
6240
6301
|
// src/components/games/ui/SearchField.tsx
|
|
6241
|
-
var
|
|
6302
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
6242
6303
|
function SearchField({ id, label, labelHidden = false, placeholder, value, onChange, disabled, inputRef, onKeyDown, clearLabel }) {
|
|
6243
6304
|
const localRef = (0, import_react40.useRef)(null);
|
|
6244
6305
|
const setInputRef = (0, import_react40.useCallback)((node) => {
|
|
@@ -6246,11 +6307,11 @@ function SearchField({ id, label, labelHidden = false, placeholder, value, onCha
|
|
|
6246
6307
|
if (typeof inputRef === "function") inputRef(node);
|
|
6247
6308
|
else if (inputRef) inputRef.current = node;
|
|
6248
6309
|
}, [inputRef]);
|
|
6249
|
-
return /* @__PURE__ */ (0,
|
|
6250
|
-
/* @__PURE__ */ (0,
|
|
6251
|
-
/* @__PURE__ */ (0,
|
|
6252
|
-
/* @__PURE__ */ (0,
|
|
6253
|
-
/* @__PURE__ */ (0,
|
|
6310
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "ss-g-search", children: [
|
|
6311
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("label", { htmlFor: id, className: labelHidden ? "ss-g-sr" : "ss-g-search-label", children: label }),
|
|
6312
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "ss-g-search-box", children: [
|
|
6313
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(IconSearch, {}),
|
|
6314
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
6254
6315
|
"input",
|
|
6255
6316
|
{
|
|
6256
6317
|
id,
|
|
@@ -6264,7 +6325,7 @@ function SearchField({ id, label, labelHidden = false, placeholder, value, onCha
|
|
|
6264
6325
|
onChange: (e) => onChange(e.target.value)
|
|
6265
6326
|
}
|
|
6266
6327
|
),
|
|
6267
|
-
clearLabel && value.length > 0 ? /* @__PURE__ */ (0,
|
|
6328
|
+
clearLabel && value.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
6268
6329
|
"button",
|
|
6269
6330
|
{
|
|
6270
6331
|
type: "button",
|
|
@@ -6274,7 +6335,7 @@ function SearchField({ id, label, labelHidden = false, placeholder, value, onCha
|
|
|
6274
6335
|
onChange("");
|
|
6275
6336
|
localRef.current?.focus();
|
|
6276
6337
|
},
|
|
6277
|
-
children: /* @__PURE__ */ (0,
|
|
6338
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(IconClose, { size: 11 })
|
|
6278
6339
|
}
|
|
6279
6340
|
) : null
|
|
6280
6341
|
] })
|
|
@@ -6282,7 +6343,7 @@ function SearchField({ id, label, labelHidden = false, placeholder, value, onCha
|
|
|
6282
6343
|
}
|
|
6283
6344
|
|
|
6284
6345
|
// src/components/TodayPanel.tsx
|
|
6285
|
-
var
|
|
6346
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
6286
6347
|
function TodayPanel({ discovery, ui, monitor }) {
|
|
6287
6348
|
const { groups, states, stale, starLeague } = discovery;
|
|
6288
6349
|
const searchId = (0, import_react41.useId)();
|
|
@@ -6313,18 +6374,38 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
6313
6374
|
acc[g.competitionName] = (acc[g.competitionName] ?? 0) + 1;
|
|
6314
6375
|
return acc;
|
|
6315
6376
|
}, {});
|
|
6377
|
+
const rowedCandidates = [];
|
|
6378
|
+
const tiledCandidates = [];
|
|
6379
|
+
{
|
|
6380
|
+
let budget = SECTION_ROW_BUDGET;
|
|
6381
|
+
let overBudget = false;
|
|
6382
|
+
for (const group of placement.candidates) {
|
|
6383
|
+
const rows = rowsFor(group, states, stale);
|
|
6384
|
+
if (rows === 0) {
|
|
6385
|
+
tiledCandidates.push(group);
|
|
6386
|
+
continue;
|
|
6387
|
+
}
|
|
6388
|
+
if (!overBudget && rows <= budget) {
|
|
6389
|
+
rowedCandidates.push(group);
|
|
6390
|
+
budget -= rows;
|
|
6391
|
+
} else {
|
|
6392
|
+
overBudget = true;
|
|
6393
|
+
tiledCandidates.push(group);
|
|
6394
|
+
}
|
|
6395
|
+
}
|
|
6396
|
+
}
|
|
6316
6397
|
const openIndex = selectedCompetitionId === null ? -1 : placement.order.findIndex((g) => g.competitionId === selectedCompetitionId);
|
|
6317
6398
|
const openGroup = openIndex === -1 ? void 0 : placement.order[openIndex];
|
|
6318
6399
|
(0, import_react41.useEffect)(() => {
|
|
6319
6400
|
if (selectedCompetitionId !== null && openGroup === void 0) setSelectedCompetitionId(null);
|
|
6320
6401
|
}, [selectedCompetitionId, openGroup]);
|
|
6321
6402
|
const liveRows = stale ? [] : visibleGroups.flatMap((group) => group.matches.filter((m) => isTreatedLive(states[m.matchId], stale)).map((match) => ({ match, rank: group.rank }))).sort((a, b) => a.rank - b.rank);
|
|
6322
|
-
const liveBand = liveRows.length > 0 && /* @__PURE__ */ (0,
|
|
6323
|
-
/* @__PURE__ */ (0,
|
|
6324
|
-
/* @__PURE__ */ (0,
|
|
6403
|
+
const liveBand = liveRows.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_jsx_runtime61.Fragment, { children: [
|
|
6404
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "ss-w-sec-head", children: [
|
|
6405
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "ss-w-sec-dot", "aria-hidden": "true" }),
|
|
6325
6406
|
ui.sectionLive
|
|
6326
6407
|
] }),
|
|
6327
|
-
/* @__PURE__ */ (0,
|
|
6408
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "ss-w-today-live", children: liveRows.map(({ match }) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
6328
6409
|
FixtureRow,
|
|
6329
6410
|
{
|
|
6330
6411
|
match,
|
|
@@ -6337,10 +6418,10 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
6337
6418
|
)) })
|
|
6338
6419
|
] });
|
|
6339
6420
|
if (openGroup !== void 0) {
|
|
6340
|
-
return /* @__PURE__ */ (0,
|
|
6341
|
-
stale && /* @__PURE__ */ (0,
|
|
6421
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "ss-w-today-root", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "ss-w-mon-list", children: [
|
|
6422
|
+
stale && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "ss-w-stale", children: ui.staleStates }),
|
|
6342
6423
|
liveBand,
|
|
6343
|
-
/* @__PURE__ */ (0,
|
|
6424
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
6344
6425
|
LeagueDetail,
|
|
6345
6426
|
{
|
|
6346
6427
|
group: openGroup,
|
|
@@ -6361,11 +6442,11 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
6361
6442
|
}
|
|
6362
6443
|
const searching = query.trim().length > 0;
|
|
6363
6444
|
const searchResults = searching ? placement.order.filter((g) => matchesQuery(g, query)) : [];
|
|
6364
|
-
return /* @__PURE__ */ (0,
|
|
6365
|
-
/* @__PURE__ */ (0,
|
|
6366
|
-
stale && /* @__PURE__ */ (0,
|
|
6445
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "ss-w-today-root", children: [
|
|
6446
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "ss-w-mon-list", children: [
|
|
6447
|
+
stale && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "ss-w-stale", children: ui.staleStates }),
|
|
6367
6448
|
!searching && liveBand,
|
|
6368
|
-
/* @__PURE__ */ (0,
|
|
6449
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
6369
6450
|
SearchField,
|
|
6370
6451
|
{
|
|
6371
6452
|
id: searchId,
|
|
@@ -6377,19 +6458,19 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
6377
6458
|
clearLabel: ui.clearSearchLabel
|
|
6378
6459
|
}
|
|
6379
6460
|
),
|
|
6380
|
-
searching ? searchResults.length === 0 ? /* @__PURE__ */ (0,
|
|
6381
|
-
/* @__PURE__ */ (0,
|
|
6382
|
-
/* @__PURE__ */ (0,
|
|
6383
|
-
/* @__PURE__ */ (0,
|
|
6461
|
+
searching ? searchResults.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "ss-w-today-empty", children: ui.noLeagueResults }) : /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_jsx_runtime61.Fragment, { children: searchResults.map((group) => /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "ss-w-today-search-block", children: [
|
|
6462
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "ss-w-today-search-group", children: [
|
|
6463
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Crest2, { url: group.competitionImagePath ?? void 0, name: group.competitionName, kind: "comp" }),
|
|
6464
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("span", { className: "ss-w-today-search-group-name", children: [
|
|
6384
6465
|
group.competitionName,
|
|
6385
|
-
(nameCounts[group.competitionName] ?? 0) > 1 && group.competitionCountry ? /* @__PURE__ */ (0,
|
|
6466
|
+
(nameCounts[group.competitionName] ?? 0) > 1 && group.competitionCountry ? /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("span", { className: "ss-w-today-tile-country", children: [
|
|
6386
6467
|
" (",
|
|
6387
6468
|
group.competitionCountry,
|
|
6388
6469
|
")"
|
|
6389
6470
|
] }) : null
|
|
6390
6471
|
] })
|
|
6391
6472
|
] }),
|
|
6392
|
-
matchingFixtures(group, query).map((match) => /* @__PURE__ */ (0,
|
|
6473
|
+
matchingFixtures(group, query).map((match) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
6393
6474
|
"div",
|
|
6394
6475
|
{
|
|
6395
6476
|
role: "button",
|
|
@@ -6403,29 +6484,47 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
6403
6484
|
setSelectedCompetitionId(group.competitionId);
|
|
6404
6485
|
}
|
|
6405
6486
|
},
|
|
6406
|
-
children: /* @__PURE__ */ (0,
|
|
6487
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(FixtureRow, { match, state: states[match.matchId], stale, ui, monitor })
|
|
6407
6488
|
},
|
|
6408
6489
|
match.matchId
|
|
6409
6490
|
))
|
|
6410
|
-
] }, group.competitionId)) }) : /* @__PURE__ */ (0,
|
|
6411
|
-
/* @__PURE__ */ (0,
|
|
6491
|
+
] }, group.competitionId)) }) : /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_jsx_runtime61.Fragment, { children: [
|
|
6492
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "ss-w-today-sec", children: [
|
|
6412
6493
|
placement.personal ? ui.yourLeagues : ui.topLeagues,
|
|
6413
|
-
!placement.personal && /* @__PURE__ */ (0,
|
|
6494
|
+
!placement.personal && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "ss-w-today-sec-sub", children: ui.topLeaguesSub })
|
|
6414
6495
|
] }),
|
|
6415
|
-
/* @__PURE__ */ (0,
|
|
6416
|
-
|
|
6417
|
-
|
|
6418
|
-
|
|
6419
|
-
|
|
6420
|
-
|
|
6421
|
-
|
|
6422
|
-
|
|
6423
|
-
|
|
6424
|
-
|
|
6425
|
-
|
|
6426
|
-
|
|
6427
|
-
|
|
6428
|
-
|
|
6496
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "ss-w-today-rowsection", children: [
|
|
6497
|
+
rowedCandidates.map((group) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
6498
|
+
LeagueRowGroup,
|
|
6499
|
+
{
|
|
6500
|
+
group,
|
|
6501
|
+
states,
|
|
6502
|
+
stale,
|
|
6503
|
+
cap: ROW_CAP_PER_LEAGUE,
|
|
6504
|
+
starClickable: starClickable(group, placement.pinnedCompetitionId),
|
|
6505
|
+
disambiguate: (nameCounts[group.competitionName] ?? 0) > 1,
|
|
6506
|
+
onOpen: () => setSelectedCompetitionId(group.competitionId),
|
|
6507
|
+
starTap: gridStarTap,
|
|
6508
|
+
ui,
|
|
6509
|
+
monitor
|
|
6510
|
+
},
|
|
6511
|
+
group.competitionId
|
|
6512
|
+
)),
|
|
6513
|
+
tiledCandidates.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "ss-w-today-tiles", children: tiledCandidates.map((group) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
6514
|
+
LeagueTile,
|
|
6515
|
+
{
|
|
6516
|
+
group,
|
|
6517
|
+
starClickable: starClickable(group, placement.pinnedCompetitionId),
|
|
6518
|
+
disambiguate: (nameCounts[group.competitionName] ?? 0) > 1,
|
|
6519
|
+
onOpen: () => setSelectedCompetitionId(group.competitionId),
|
|
6520
|
+
starTap: gridStarTap,
|
|
6521
|
+
ui
|
|
6522
|
+
},
|
|
6523
|
+
group.competitionId
|
|
6524
|
+
)) })
|
|
6525
|
+
] }),
|
|
6526
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "ss-w-today-sec", children: ui.allLeagues }),
|
|
6527
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "ss-w-today-tiles", children: placement.others.map((group) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
6429
6528
|
LeagueTile,
|
|
6430
6529
|
{
|
|
6431
6530
|
group,
|
|
@@ -6439,7 +6538,7 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
6439
6538
|
)) })
|
|
6440
6539
|
] })
|
|
6441
6540
|
] }),
|
|
6442
|
-
toast !== null && /* @__PURE__ */ (0,
|
|
6541
|
+
toast !== null && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("p", { className: "ss-w-today-toast", role: "status", "aria-live": "polite", children: toast === "starred" ? ui.starredToast : ui.unstarredToast })
|
|
6443
6542
|
] });
|
|
6444
6543
|
}
|
|
6445
6544
|
|
|
@@ -6447,9 +6546,9 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
6447
6546
|
var import_react55 = require("react");
|
|
6448
6547
|
|
|
6449
6548
|
// src/components/GamesLoginWall.tsx
|
|
6450
|
-
var
|
|
6549
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
6451
6550
|
function GamesLoginWall({ ui }) {
|
|
6452
|
-
return /* @__PURE__ */ (0,
|
|
6551
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "ss-w-mon-list", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "ss-w-games-wall", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("p", { children: ui.gamesLoginRequired }) }) });
|
|
6453
6552
|
}
|
|
6454
6553
|
|
|
6455
6554
|
// src/components/GamesHub.tsx
|
|
@@ -6469,74 +6568,74 @@ function splitName(full) {
|
|
|
6469
6568
|
}
|
|
6470
6569
|
|
|
6471
6570
|
// src/components/GameTileArt.tsx
|
|
6472
|
-
var
|
|
6571
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
6473
6572
|
function GameTileArt({ gameId }) {
|
|
6474
|
-
return /* @__PURE__ */ (0,
|
|
6573
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("svg", { className: "ss-g-art", viewBox: "0 0 120 74", "aria-hidden": "true", children: ART[gameId] ?? ART.default });
|
|
6475
6574
|
}
|
|
6476
|
-
var head = (cx, cy, r, cls = "ss-g-art-fg") => /* @__PURE__ */ (0,
|
|
6477
|
-
/* @__PURE__ */ (0,
|
|
6478
|
-
/* @__PURE__ */ (0,
|
|
6575
|
+
var head = (cx, cy, r, cls = "ss-g-art-fg") => /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("g", { className: cls, children: [
|
|
6576
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("circle", { cx, cy: cy - r * 0.3, r: r * 0.45 }),
|
|
6577
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("path", { d: `M${cx - r} ${cy + r}c0-${r * 0.8} ${r * 0.45}-${r * 1.1} ${r}-${r * 1.1}s${r} ${r * 0.3} ${r} ${r * 1.1}z` })
|
|
6479
6578
|
] });
|
|
6480
6579
|
var ART = {
|
|
6481
|
-
"mystery-tiger": /* @__PURE__ */ (0,
|
|
6580
|
+
"mystery-tiger": /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_jsx_runtime63.Fragment, { children: [
|
|
6482
6581
|
head(60, 38, 26, "ss-g-art-fg"),
|
|
6483
|
-
/* @__PURE__ */ (0,
|
|
6582
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("text", { x: "60", y: "36", className: "ss-g-art-q", textAnchor: "middle", children: "?" })
|
|
6484
6583
|
] }),
|
|
6485
|
-
"higher-or-lower": /* @__PURE__ */ (0,
|
|
6584
|
+
"higher-or-lower": /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_jsx_runtime63.Fragment, { children: [
|
|
6486
6585
|
head(32, 38, 20),
|
|
6487
6586
|
head(88, 38, 20),
|
|
6488
|
-
/* @__PURE__ */ (0,
|
|
6489
|
-
/* @__PURE__ */ (0,
|
|
6587
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("circle", { cx: "60", cy: "37", r: "11", className: "ss-g-art-accent" }),
|
|
6588
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("path", { d: "M57 33l3-3 3 3M57 41l3 3 3-3", className: "ss-g-art-ink" })
|
|
6490
6589
|
] }),
|
|
6491
|
-
"guess-the-xi": /* @__PURE__ */ (0,
|
|
6492
|
-
/* @__PURE__ */ (0,
|
|
6493
|
-
[[60, 60, "a"], [24, 46], [48, 46], [72, 46], [96, 46], [36, 30], [60, 30], [84, 30], [40, 14], [60, 14], [80, 14]].map(([x, y, a], i) => /* @__PURE__ */ (0,
|
|
6590
|
+
"guess-the-xi": /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_jsx_runtime63.Fragment, { children: [
|
|
6591
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("rect", { x: "8", y: "4", width: "104", height: "66", rx: "6", className: "ss-g-art-pitch" }),
|
|
6592
|
+
[[60, 60, "a"], [24, 46], [48, 46], [72, 46], [96, 46], [36, 30], [60, 30], [84, 30], [40, 14], [60, 14], [80, 14]].map(([x, y, a], i) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("circle", { cx: x, cy: y, r: "4", className: a ? "ss-g-art-accent" : "ss-g-art-dot" }, i))
|
|
6494
6593
|
] }),
|
|
6495
|
-
"daily-quiz": /* @__PURE__ */ (0,
|
|
6496
|
-
"career-path": /* @__PURE__ */ (0,
|
|
6497
|
-
/* @__PURE__ */ (0,
|
|
6498
|
-
/* @__PURE__ */ (0,
|
|
6499
|
-
/* @__PURE__ */ (0,
|
|
6500
|
-
/* @__PURE__ */ (0,
|
|
6501
|
-
/* @__PURE__ */ (0,
|
|
6594
|
+
"daily-quiz": /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_jsx_runtime63.Fragment, { children: [[14, 8], [62, 8], [14, 40], [62, 40]].map(([x, y], i) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("rect", { x, y, width: "44", height: "26", rx: "5", className: i === 1 ? "ss-g-art-correct" : "ss-g-art-block" }, i)) }),
|
|
6595
|
+
"career-path": /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_jsx_runtime63.Fragment, { children: [
|
|
6596
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("path", { d: "M18 22h24v10c0 7-5 11-12 13-7-2-12-6-12-13z", className: "ss-g-art-fg" }),
|
|
6597
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("path", { d: "M48 37h8M84 37h8", className: "ss-g-art-line" }),
|
|
6598
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("path", { d: "M60 22h24v10c0 7-5 11-12 13-7-2-12-6-12-13z", className: "ss-g-art-fg" }),
|
|
6599
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("rect", { x: "96", y: "22", width: "18", height: "26", rx: "4", className: "ss-g-art-dash" }),
|
|
6600
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("text", { x: "105", y: "40", className: "ss-g-art-q", textAnchor: "middle", children: "?" })
|
|
6502
6601
|
] }),
|
|
6503
|
-
"beat-the-grid": /* @__PURE__ */ (0,
|
|
6504
|
-
"matchday-predictor": /* @__PURE__ */ (0,
|
|
6505
|
-
/* @__PURE__ */ (0,
|
|
6506
|
-
/* @__PURE__ */ (0,
|
|
6507
|
-
/* @__PURE__ */ (0,
|
|
6508
|
-
/* @__PURE__ */ (0,
|
|
6602
|
+
"beat-the-grid": /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_jsx_runtime63.Fragment, { children: [0, 1, 2].flatMap((r) => [0, 1, 2].map((c) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("rect", { x: 33 + c * 19, y: 10 + r * 19, width: "16", height: "16", rx: "3", className: (r + c) % 3 === 0 ? "ss-g-art-accent" : "ss-g-art-block" }, `${r}${c}`))) }),
|
|
6603
|
+
"matchday-predictor": /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_jsx_runtime63.Fragment, { children: [
|
|
6604
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("path", { d: "M10 20h20v9c0 6-4 9-10 11-6-2-10-5-10-11z", className: "ss-g-art-fg" }),
|
|
6605
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("rect", { x: "38", y: "22", width: "18", height: "24", rx: "4", className: "ss-g-art-accent-stroke" }),
|
|
6606
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("rect", { x: "64", y: "22", width: "18", height: "24", rx: "4", className: "ss-g-art-dash" }),
|
|
6607
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("path", { d: "M90 20h20v9c0 6-4 9-10 11-6-2-10-5-10-11z", className: "ss-g-art-fg" })
|
|
6509
6608
|
] }),
|
|
6510
|
-
"starting-xi": /* @__PURE__ */ (0,
|
|
6511
|
-
/* @__PURE__ */ (0,
|
|
6512
|
-
[[60, 60], [30, 46], [50, 46], [70, 46], [90, 46], [45, 30], [75, 30], [30, 16], [60, 16], [90, 16]].map(([x, y], i) => /* @__PURE__ */ (0,
|
|
6609
|
+
"starting-xi": /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_jsx_runtime63.Fragment, { children: [
|
|
6610
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("rect", { x: "8", y: "4", width: "104", height: "66", rx: "6", className: "ss-g-art-pitch" }),
|
|
6611
|
+
[[60, 60], [30, 46], [50, 46], [70, 46], [90, 46], [45, 30], [75, 30], [30, 16], [60, 16], [90, 16]].map(([x, y], i) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("circle", { cx: x, cy: y, r: "5", className: i < 7 ? "ss-g-art-accent" : "ss-g-art-dash" }, i))
|
|
6513
6612
|
] }),
|
|
6514
|
-
"stat-ladder": /* @__PURE__ */ (0,
|
|
6515
|
-
"fan-motm": /* @__PURE__ */ (0,
|
|
6516
|
-
/* @__PURE__ */ (0,
|
|
6613
|
+
"stat-ladder": /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_jsx_runtime63.Fragment, { children: [[20, 70], [34, 52], [48, 34]].map(([y, w], i) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("rect", { x: "24", y, width: w, height: "12", rx: "3", className: i === 1 ? "ss-g-art-accent" : "ss-g-art-block" }, i)) }),
|
|
6614
|
+
"fan-motm": /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_jsx_runtime63.Fragment, { children: [
|
|
6615
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("circle", { cx: "60", cy: "37", r: "26", className: "ss-g-art-accent-stroke" }),
|
|
6517
6616
|
head(60, 40, 18),
|
|
6518
|
-
/* @__PURE__ */ (0,
|
|
6617
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("path", { d: "M84 8l2.4 5 5.4.6-4 3.7 1.1 5.4-4.9-2.7-4.9 2.7 1.1-5.4-4-3.7 5.4-.6z", className: "ss-g-art-accent" })
|
|
6519
6618
|
] }),
|
|
6520
|
-
default: /* @__PURE__ */ (0,
|
|
6619
|
+
default: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("circle", { cx: "60", cy: "37", r: "22", className: "ss-g-art-fg" })
|
|
6521
6620
|
};
|
|
6522
6621
|
|
|
6523
6622
|
// src/components/games/ui/Chip.tsx
|
|
6524
|
-
var
|
|
6623
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
6525
6624
|
function Chip({ variant = "neutral", icon, children, className }) {
|
|
6526
|
-
return /* @__PURE__ */ (0,
|
|
6625
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("span", { className: `ss-g-chip ss-g-chip--${variant}${className ? ` ${className}` : ""}`, children: [
|
|
6527
6626
|
icon,
|
|
6528
6627
|
children
|
|
6529
6628
|
] });
|
|
6530
6629
|
}
|
|
6531
6630
|
function StatStack({ value, label }) {
|
|
6532
|
-
return /* @__PURE__ */ (0,
|
|
6533
|
-
/* @__PURE__ */ (0,
|
|
6534
|
-
/* @__PURE__ */ (0,
|
|
6631
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("span", { className: "ss-g-statstack", children: [
|
|
6632
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "ss-g-statstack-v", children: value }),
|
|
6633
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "ss-g-statstack-l", children: label })
|
|
6535
6634
|
] });
|
|
6536
6635
|
}
|
|
6537
6636
|
|
|
6538
6637
|
// src/components/GameTile.tsx
|
|
6539
|
-
var
|
|
6638
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
6540
6639
|
function tileStatus(game, ui) {
|
|
6541
6640
|
switch (game.status) {
|
|
6542
6641
|
case "locked":
|
|
@@ -6560,38 +6659,38 @@ function GameTile({ game, onOpen, ui, variant = "tile" }) {
|
|
|
6560
6659
|
const status = tileStatus(game, ui);
|
|
6561
6660
|
const disabled = DISABLED.has(game.status);
|
|
6562
6661
|
const title = gameTitle(game, ui.games.titles);
|
|
6563
|
-
const body = variant === "hero" ? /* @__PURE__ */ (0,
|
|
6564
|
-
/* @__PURE__ */ (0,
|
|
6565
|
-
/* @__PURE__ */ (0,
|
|
6566
|
-
status.tone === "new" && /* @__PURE__ */ (0,
|
|
6567
|
-
/* @__PURE__ */ (0,
|
|
6568
|
-
/* @__PURE__ */ (0,
|
|
6569
|
-
status.tone === "success" ? /* @__PURE__ */ (0,
|
|
6662
|
+
const body = variant === "hero" ? /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx_runtime65.Fragment, { children: [
|
|
6663
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("span", { className: "ss-g-hero-text", children: [
|
|
6664
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "ss-g-hero-eyebrow", children: ui.games.dailyChallenge }),
|
|
6665
|
+
status.tone === "new" && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Chip, { variant: "badge", children: ui.games.newToday }),
|
|
6666
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "ss-g-hero-title", children: title }),
|
|
6667
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "ss-g-hero-sub", children: ui.games.taglines[game.gameId] ?? "" }),
|
|
6668
|
+
status.tone === "success" ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "ss-g-tile-status", "data-tone": "success", children: status.text }) : /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("span", { className: "ss-g-hero-cta", children: [
|
|
6570
6669
|
status.tone === "accent" ? ui.games.resume : ui.games.playNow,
|
|
6571
6670
|
" \u2192"
|
|
6572
6671
|
] })
|
|
6573
6672
|
] }),
|
|
6574
|
-
/* @__PURE__ */ (0,
|
|
6575
|
-
] }) : variant === "wide" ? /* @__PURE__ */ (0,
|
|
6576
|
-
/* @__PURE__ */ (0,
|
|
6577
|
-
/* @__PURE__ */ (0,
|
|
6578
|
-
/* @__PURE__ */ (0,
|
|
6579
|
-
/* @__PURE__ */ (0,
|
|
6580
|
-
status.tone === "new" && /* @__PURE__ */ (0,
|
|
6673
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "ss-g-hero-art", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(GameTileArt, { gameId: game.gameId }) })
|
|
6674
|
+
] }) : variant === "wide" ? /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx_runtime65.Fragment, { children: [
|
|
6675
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "ss-g-wide-art", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(GameTileArt, { gameId: game.gameId }) }),
|
|
6676
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("span", { className: "ss-g-wide-text", children: [
|
|
6677
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "ss-g-tile-title", children: title }),
|
|
6678
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "ss-g-tile-status", "data-tone": status.tone, children: status.text }),
|
|
6679
|
+
status.tone === "new" && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Chip, { variant: "badge", children: ui.games.newToday })
|
|
6581
6680
|
] }),
|
|
6582
|
-
/* @__PURE__ */ (0,
|
|
6583
|
-
] }) : /* @__PURE__ */ (0,
|
|
6584
|
-
/* @__PURE__ */ (0,
|
|
6585
|
-
/* @__PURE__ */ (0,
|
|
6586
|
-
/* @__PURE__ */ (0,
|
|
6681
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "ss-g-wide-chev", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(IconChevronLeft, { size: 18 }) })
|
|
6682
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx_runtime65.Fragment, { children: [
|
|
6683
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "ss-g-tile-art", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(GameTileArt, { gameId: game.gameId }) }),
|
|
6684
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "ss-g-tile-title", children: title }),
|
|
6685
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "ss-g-tile-status", "data-tone": status.tone, children: status.text })
|
|
6587
6686
|
] });
|
|
6588
6687
|
const cls = `ss-g-tile ss-g-tile--${variant}`;
|
|
6589
|
-
if (disabled) return /* @__PURE__ */ (0,
|
|
6590
|
-
return /* @__PURE__ */ (0,
|
|
6688
|
+
if (disabled) return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: cls, "data-disabled": true, "aria-disabled": "true", children: body });
|
|
6689
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("button", { type: "button", className: cls, "aria-label": `${title} \u2014 ${status.text}`, onClick: () => onOpen(game), children: body });
|
|
6591
6690
|
}
|
|
6592
6691
|
|
|
6593
6692
|
// src/components/GamesHub.tsx
|
|
6594
|
-
var
|
|
6693
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
6595
6694
|
var PLAYABLE = /* @__PURE__ */ new Set(["available", "in_progress"]);
|
|
6596
6695
|
var DONE = /* @__PURE__ */ new Set(["played", "graded"]);
|
|
6597
6696
|
function pickHeroGame(games) {
|
|
@@ -6617,49 +6716,49 @@ function GamesHub({ games, myWeeklyRow, weeklyPrize, onOpen, ui }) {
|
|
|
6617
6716
|
const kickoffs = fixtures.map((g) => g.kickoffUtc).filter((k) => !!k).sort();
|
|
6618
6717
|
const todayPts = games.filter((g) => DONE.has(g.status)).reduce((s, g) => s + (g.score ?? 0), 0);
|
|
6619
6718
|
const dash = "\u2014";
|
|
6620
|
-
return /* @__PURE__ */ (0,
|
|
6621
|
-
/* @__PURE__ */ (0,
|
|
6622
|
-
/* @__PURE__ */ (0,
|
|
6623
|
-
/* @__PURE__ */ (0,
|
|
6624
|
-
/* @__PURE__ */ (0,
|
|
6625
|
-
myWeeklyRow ? /* @__PURE__ */ (0,
|
|
6626
|
-
/* @__PURE__ */ (0,
|
|
6719
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "ss-g-hub", children: [
|
|
6720
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "ss-g-stats", children: [
|
|
6721
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "ss-g-stat", children: [
|
|
6722
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "ss-g-stat-l", children: ui.games.statStreak }),
|
|
6723
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("span", { className: "ss-g-stat-v", "data-testid": "stat-streak", children: [
|
|
6724
|
+
myWeeklyRow ? /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_jsx_runtime66.Fragment, { children: [
|
|
6725
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(IconFlame, {}),
|
|
6627
6726
|
myWeeklyRow.currentStreak
|
|
6628
6727
|
] }) : dash,
|
|
6629
|
-
myWeeklyRow && /* @__PURE__ */ (0,
|
|
6728
|
+
myWeeklyRow && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("small", { children: ui.games.unitDays })
|
|
6630
6729
|
] })
|
|
6631
6730
|
] }),
|
|
6632
|
-
/* @__PURE__ */ (0,
|
|
6633
|
-
/* @__PURE__ */ (0,
|
|
6634
|
-
/* @__PURE__ */ (0,
|
|
6731
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "ss-g-stat", children: [
|
|
6732
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "ss-g-stat-l", children: ui.games.statToday }),
|
|
6733
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("span", { className: "ss-g-stat-v ss-g-stat-v--accent", "data-testid": "stat-today", children: [
|
|
6635
6734
|
ui.games.formatPts(todayPts),
|
|
6636
|
-
/* @__PURE__ */ (0,
|
|
6735
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("small", { children: ui.games.unitPts })
|
|
6637
6736
|
] })
|
|
6638
6737
|
] }),
|
|
6639
|
-
/* @__PURE__ */ (0,
|
|
6640
|
-
/* @__PURE__ */ (0,
|
|
6641
|
-
/* @__PURE__ */ (0,
|
|
6738
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "ss-g-stat", children: [
|
|
6739
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "ss-g-stat-l", children: ui.games.statRank }),
|
|
6740
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("span", { className: "ss-g-stat-v", "data-testid": "stat-rank", children: [
|
|
6642
6741
|
myWeeklyRow ? `#${myWeeklyRow.rank}` : dash,
|
|
6643
|
-
myWeeklyRow && /* @__PURE__ */ (0,
|
|
6742
|
+
myWeeklyRow && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("small", { children: ui.games.thisWeek })
|
|
6644
6743
|
] })
|
|
6645
6744
|
] })
|
|
6646
6745
|
] }),
|
|
6647
|
-
weeklyPrize && /* @__PURE__ */ (0,
|
|
6648
|
-
hero && /* @__PURE__ */ (0,
|
|
6649
|
-
(grid.length > 0 || wide) && /* @__PURE__ */ (0,
|
|
6650
|
-
/* @__PURE__ */ (0,
|
|
6651
|
-
/* @__PURE__ */ (0,
|
|
6652
|
-
/* @__PURE__ */ (0,
|
|
6746
|
+
weeklyPrize && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Chip, { variant: "accent", className: "ss-g-prize", children: weeklyPrize }),
|
|
6747
|
+
hero && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(GameTile, { game: hero, onOpen, ui, variant: "hero" }),
|
|
6748
|
+
(grid.length > 0 || wide) && /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("section", { className: "ss-g-sec", children: [
|
|
6749
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "ss-g-sec-head", children: [
|
|
6750
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("h3", { children: ui.games.dailyGames }),
|
|
6751
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { children: ui.games.newSetAtMidnight })
|
|
6653
6752
|
] }),
|
|
6654
|
-
grid.length > 0 && /* @__PURE__ */ (0,
|
|
6655
|
-
wide && /* @__PURE__ */ (0,
|
|
6753
|
+
grid.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "ss-g-grid", children: grid.map((g) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(GameTile, { game: g, onOpen, ui }, tileKey(g))) }),
|
|
6754
|
+
wide && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(GameTile, { game: wide, onOpen, ui, variant: "wide" })
|
|
6656
6755
|
] }),
|
|
6657
|
-
fixtures.length > 0 && /* @__PURE__ */ (0,
|
|
6658
|
-
/* @__PURE__ */ (0,
|
|
6659
|
-
/* @__PURE__ */ (0,
|
|
6660
|
-
kickoffs[0] && /* @__PURE__ */ (0,
|
|
6756
|
+
fixtures.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("section", { className: "ss-g-sec", children: [
|
|
6757
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "ss-g-sec-head", children: [
|
|
6758
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("h3", { children: ui.games.matchdayGames }),
|
|
6759
|
+
kickoffs[0] && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { children: ui.games.kickoffAt(ui.games.formatDayTime(kickoffs[0])) })
|
|
6661
6760
|
] }),
|
|
6662
|
-
/* @__PURE__ */ (0,
|
|
6761
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "ss-g-grid", children: fixtures.map((g) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(GameTile, { game: g, onOpen, ui }, tileKey(g))) })
|
|
6663
6762
|
] })
|
|
6664
6763
|
] });
|
|
6665
6764
|
}
|
|
@@ -6952,7 +7051,7 @@ function isNationCode(flag) {
|
|
|
6952
7051
|
|
|
6953
7052
|
// src/components/games/PlayerAvatar.tsx
|
|
6954
7053
|
var import_react44 = require("react");
|
|
6955
|
-
var
|
|
7054
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
6956
7055
|
function initialsOf(name) {
|
|
6957
7056
|
const parts = name.trim().split(/\s+/).filter(Boolean);
|
|
6958
7057
|
const first = parts[0];
|
|
@@ -6971,39 +7070,39 @@ function PlayerAvatar({
|
|
|
6971
7070
|
}) {
|
|
6972
7071
|
const [failed, setFailed] = (0, import_react44.useState)(false);
|
|
6973
7072
|
const showImage = Boolean(imagePath) && !isPlaceholderImage(imagePath) && !failed;
|
|
6974
|
-
return /* @__PURE__ */ (0,
|
|
7073
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className, "aria-hidden": "true", children: showImage ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("img", { src: imagePath, alt: "", loading: "lazy", onError: () => setFailed(true) }) : /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "ss-w-av-initials", children: initialsOf(name) }) });
|
|
6975
7074
|
}
|
|
6976
7075
|
|
|
6977
7076
|
// src/components/games/ui/GameHeader.tsx
|
|
6978
|
-
var
|
|
7077
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
6979
7078
|
function GameHeader({ title, eyebrow, right, onBack, backLabel }) {
|
|
6980
|
-
return /* @__PURE__ */ (0,
|
|
6981
|
-
onBack && /* @__PURE__ */ (0,
|
|
6982
|
-
/* @__PURE__ */ (0,
|
|
6983
|
-
eyebrow && /* @__PURE__ */ (0,
|
|
6984
|
-
/* @__PURE__ */ (0,
|
|
7079
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "ss-g-head", children: [
|
|
7080
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("button", { type: "button", className: "ss-g-back", "aria-label": backLabel, onClick: onBack, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(IconChevronLeft, {}) }),
|
|
7081
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "ss-g-head-text", children: [
|
|
7082
|
+
eyebrow && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "ss-g-eyebrow", children: eyebrow }),
|
|
7083
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("h2", { className: "ss-g-title", children: title })
|
|
6985
7084
|
] }),
|
|
6986
|
-
right && /* @__PURE__ */ (0,
|
|
7085
|
+
right && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "ss-g-head-right", children: right })
|
|
6987
7086
|
] });
|
|
6988
7087
|
}
|
|
6989
7088
|
|
|
6990
7089
|
// src/components/games/ui/SegmentProgress.tsx
|
|
6991
|
-
var
|
|
7090
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
6992
7091
|
function SegmentProgress({ segments, ariaLabel, leftLabel, rightLabel, right }) {
|
|
6993
|
-
return /* @__PURE__ */ (0,
|
|
6994
|
-
/* @__PURE__ */ (0,
|
|
6995
|
-
(leftLabel || rightLabel) && /* @__PURE__ */ (0,
|
|
6996
|
-
/* @__PURE__ */ (0,
|
|
6997
|
-
/* @__PURE__ */ (0,
|
|
7092
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "ss-g-progress", children: [
|
|
7093
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "ss-g-progress-main", children: [
|
|
7094
|
+
(leftLabel || rightLabel) && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "ss-g-progress-labels", children: [
|
|
7095
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { children: leftLabel }),
|
|
7096
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "ss-g-progress-rl", children: rightLabel })
|
|
6998
7097
|
] }),
|
|
6999
|
-
/* @__PURE__ */ (0,
|
|
7098
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
7000
7099
|
"div",
|
|
7001
7100
|
{
|
|
7002
7101
|
className: "ss-g-segs",
|
|
7003
7102
|
role: "img",
|
|
7004
7103
|
"aria-label": ariaLabel,
|
|
7005
7104
|
style: { gridTemplateColumns: `repeat(${segments.length}, minmax(0, 1fr))` },
|
|
7006
|
-
children: segments.map((s, i) => /* @__PURE__ */ (0,
|
|
7105
|
+
children: segments.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "ss-g-seg", "data-state": s }, i))
|
|
7007
7106
|
}
|
|
7008
7107
|
)
|
|
7009
7108
|
] }),
|
|
@@ -7012,12 +7111,12 @@ function SegmentProgress({ segments, ariaLabel, leftLabel, rightLabel, right })
|
|
|
7012
7111
|
}
|
|
7013
7112
|
|
|
7014
7113
|
// src/components/games/ui/AnswerTray.tsx
|
|
7015
|
-
var
|
|
7114
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
7016
7115
|
function AnswerTray({ id, label, placeholder, optionsLabel, options, query, onQuery, onPick, disabled, minQuery = 0 }) {
|
|
7017
7116
|
const needle = query.trim().toLowerCase();
|
|
7018
7117
|
const shown = needle.length < minQuery ? [] : needle ? options.filter((o) => o.name.toLowerCase().includes(needle)) : options;
|
|
7019
|
-
return /* @__PURE__ */ (0,
|
|
7020
|
-
/* @__PURE__ */ (0,
|
|
7118
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_jsx_runtime70.Fragment, { children: [
|
|
7119
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
7021
7120
|
SearchField,
|
|
7022
7121
|
{
|
|
7023
7122
|
id,
|
|
@@ -7029,9 +7128,9 @@ function AnswerTray({ id, label, placeholder, optionsLabel, options, query, onQu
|
|
|
7029
7128
|
disabled
|
|
7030
7129
|
}
|
|
7031
7130
|
),
|
|
7032
|
-
shown.length > 0 && /* @__PURE__ */ (0,
|
|
7131
|
+
shown.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "ss-g-tray", role: "listbox", "aria-label": optionsLabel, children: shown.map((o) => {
|
|
7033
7132
|
const { first, last } = splitName(o.name);
|
|
7034
|
-
return /* @__PURE__ */ (0,
|
|
7133
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
|
|
7035
7134
|
"button",
|
|
7036
7135
|
{
|
|
7037
7136
|
type: "button",
|
|
@@ -7042,10 +7141,10 @@ function AnswerTray({ id, label, placeholder, optionsLabel, options, query, onQu
|
|
|
7042
7141
|
disabled,
|
|
7043
7142
|
onClick: () => onPick(o.id),
|
|
7044
7143
|
children: [
|
|
7045
|
-
/* @__PURE__ */ (0,
|
|
7046
|
-
/* @__PURE__ */ (0,
|
|
7047
|
-
first && /* @__PURE__ */ (0,
|
|
7048
|
-
/* @__PURE__ */ (0,
|
|
7144
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(PlayerAvatar, { className: "ss-g-tray-av", name: o.name, imagePath: o.imagePath }),
|
|
7145
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("span", { className: "ss-g-tray-name", "aria-hidden": "true", children: [
|
|
7146
|
+
first && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "ss-g-tray-first", children: first }),
|
|
7147
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "ss-g-tray-last", children: last })
|
|
7049
7148
|
] })
|
|
7050
7149
|
]
|
|
7051
7150
|
},
|
|
@@ -7056,59 +7155,59 @@ function AnswerTray({ id, label, placeholder, optionsLabel, options, query, onQu
|
|
|
7056
7155
|
}
|
|
7057
7156
|
|
|
7058
7157
|
// src/components/games/ui/FooterBar.tsx
|
|
7059
|
-
var
|
|
7158
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
7060
7159
|
function FooterBar({ children }) {
|
|
7061
|
-
return /* @__PURE__ */ (0,
|
|
7160
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "ss-g-footer", children });
|
|
7062
7161
|
}
|
|
7063
7162
|
|
|
7064
7163
|
// src/components/games/ui/Silhouette.tsx
|
|
7065
|
-
var
|
|
7164
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
7066
7165
|
function Silhouette({ size, variant = "default" }) {
|
|
7067
|
-
return /* @__PURE__ */ (0,
|
|
7068
|
-
/* @__PURE__ */ (0,
|
|
7069
|
-
/* @__PURE__ */ (0,
|
|
7070
|
-
/* @__PURE__ */ (0,
|
|
7166
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("span", { className: `ss-g-sil ss-g-sil--${variant}`, style: { width: size, height: size }, "aria-hidden": "true", children: [
|
|
7167
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("svg", { width: size * 0.86, height: size * 0.86, viewBox: "0 0 100 100", children: [
|
|
7168
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("circle", { cx: "50", cy: "40", r: "19", fill: "currentColor" }),
|
|
7169
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("path", { d: "M12 100c0-23 17-38 38-38s38 15 38 38z", fill: "currentColor" })
|
|
7071
7170
|
] }),
|
|
7072
|
-
variant === "mystery" && /* @__PURE__ */ (0,
|
|
7171
|
+
variant === "mystery" && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "ss-g-sil-q", children: "?" })
|
|
7073
7172
|
] });
|
|
7074
7173
|
}
|
|
7075
7174
|
|
|
7076
7175
|
// src/components/games/ui/GameButton.tsx
|
|
7077
|
-
var
|
|
7176
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
7078
7177
|
function GameButton({ variant = "primary", block = false, className, type = "button", ...rest }) {
|
|
7079
7178
|
const cls = `ss-g-btn ss-g-btn--${variant}${block ? " ss-g-btn--block" : ""}${className ? ` ${className}` : ""}`;
|
|
7080
|
-
return /* @__PURE__ */ (0,
|
|
7179
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("button", { type, className: cls, ...rest });
|
|
7081
7180
|
}
|
|
7082
7181
|
|
|
7083
7182
|
// src/components/games/ui/ResultCard.tsx
|
|
7084
|
-
var
|
|
7183
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
7085
7184
|
function ResultCard({ tone, title, score, detail, onBack, ui }) {
|
|
7086
|
-
return /* @__PURE__ */ (0,
|
|
7087
|
-
/* @__PURE__ */ (0,
|
|
7088
|
-
score !== void 0 && /* @__PURE__ */ (0,
|
|
7089
|
-
/* @__PURE__ */ (0,
|
|
7185
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "ss-g-result", "data-tone": tone, role: "status", children: [
|
|
7186
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "ss-g-result-title", children: title }),
|
|
7187
|
+
score !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("span", { className: "ss-g-result-score", children: [
|
|
7188
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "ss-g-result-num", children: score }),
|
|
7090
7189
|
ui.games.unitPts
|
|
7091
7190
|
] }),
|
|
7092
|
-
detail && /* @__PURE__ */ (0,
|
|
7093
|
-
onBack && /* @__PURE__ */ (0,
|
|
7191
|
+
detail && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "ss-g-result-detail", children: detail }),
|
|
7192
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(GameButton, { variant: "outline", onClick: onBack, children: ui.games.backToGames })
|
|
7094
7193
|
] });
|
|
7095
7194
|
}
|
|
7096
7195
|
|
|
7097
7196
|
// src/components/games/ui/PointsLadderRow.tsx
|
|
7098
|
-
var
|
|
7197
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
7099
7198
|
function PointsLadderRow({ ladder, guessesUsed, ui }) {
|
|
7100
7199
|
if (!ladder || ladder.length === 0) return null;
|
|
7101
7200
|
const now = ladder[Math.min(guessesUsed, ladder.length - 1)];
|
|
7102
7201
|
const next = ladder[guessesUsed + 1];
|
|
7103
7202
|
if (now === void 0) return null;
|
|
7104
|
-
return /* @__PURE__ */ (0,
|
|
7105
|
-
/* @__PURE__ */ (0,
|
|
7106
|
-
next !== void 0 && next !== now && /* @__PURE__ */ (0,
|
|
7203
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "ss-g-worth", "data-testid": "points-ladder", children: [
|
|
7204
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "ss-g-worth-now", children: ui.games.worthNow(now) }),
|
|
7205
|
+
next !== void 0 && next !== now && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "ss-g-worth-next", children: ui.games.worthAfterMiss(next) })
|
|
7107
7206
|
] });
|
|
7108
7207
|
}
|
|
7109
7208
|
|
|
7110
7209
|
// src/components/games/MysteryTigerGame.tsx
|
|
7111
|
-
var
|
|
7210
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
7112
7211
|
function parseClientState(json) {
|
|
7113
7212
|
if (!json) return null;
|
|
7114
7213
|
try {
|
|
@@ -7230,22 +7329,22 @@ function MysteryTigerGame({
|
|
|
7230
7329
|
setQuery("");
|
|
7231
7330
|
onSubmit(JSON.stringify({ guesses: newGuesses }));
|
|
7232
7331
|
}
|
|
7233
|
-
const headerRight = !config ? void 0 : isOver ? /* @__PURE__ */ (0,
|
|
7332
|
+
const headerRight = !config ? void 0 : isOver ? /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(Chip, { variant: "accent", children: [
|
|
7234
7333
|
score,
|
|
7235
7334
|
" ",
|
|
7236
7335
|
ui.games.unitPts
|
|
7237
|
-
] }) : /* @__PURE__ */ (0,
|
|
7336
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { "data-testid": "mt-chip", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(Chip, { children: [
|
|
7238
7337
|
ui.games.guess,
|
|
7239
7338
|
" ",
|
|
7240
|
-
/* @__PURE__ */ (0,
|
|
7339
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-num", children: guessesUsed + 1 }),
|
|
7241
7340
|
" / ",
|
|
7242
7341
|
totalGuesses
|
|
7243
7342
|
] }) });
|
|
7244
7343
|
const segments = Array.from({ length: totalGuesses }, (_, i) => i < guessesUsed ? "done" : i === guessesUsed ? "current" : "todo");
|
|
7245
7344
|
const cols = { gridTemplateColumns: `minmax(0, 1fr) repeat(${keys.length}, 42px)` };
|
|
7246
7345
|
const known = deriveKnownAttributes(guessResults, keys);
|
|
7247
|
-
return /* @__PURE__ */ (0,
|
|
7248
|
-
/* @__PURE__ */ (0,
|
|
7346
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ss-g-screen ss-g-mt", "data-game": "mystery-tiger", "data-testid": "game-screen-mystery-tiger", children: [
|
|
7347
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
7249
7348
|
GameHeader,
|
|
7250
7349
|
{
|
|
7251
7350
|
title: gameTitle({ gameId: "mystery-tiger" }, ui.games.titles),
|
|
@@ -7255,41 +7354,41 @@ function MysteryTigerGame({
|
|
|
7255
7354
|
backLabel: ui.back
|
|
7256
7355
|
}
|
|
7257
7356
|
),
|
|
7258
|
-
!config && /* @__PURE__ */ (0,
|
|
7259
|
-
config && /* @__PURE__ */ (0,
|
|
7260
|
-
/* @__PURE__ */ (0,
|
|
7261
|
-
!isOver && /* @__PURE__ */ (0,
|
|
7262
|
-
/* @__PURE__ */ (0,
|
|
7263
|
-
/* @__PURE__ */ (0,
|
|
7264
|
-
revealName ? /* @__PURE__ */ (0,
|
|
7265
|
-
revealName && /* @__PURE__ */ (0,
|
|
7357
|
+
!config && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading }),
|
|
7358
|
+
config && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(import_jsx_runtime76.Fragment, { children: [
|
|
7359
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ss-g-body", children: [
|
|
7360
|
+
!isOver && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed, ui }),
|
|
7361
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: `ss-g-mt-card${isOver ? " ss-g-mt-card--reveal" : ""}`, children: [
|
|
7362
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ss-g-mt-portrait", children: [
|
|
7363
|
+
revealName ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(PlayerAvatar, { className: "ss-g-mt-photo", name: revealName, imagePath: clientState?.revealedPlayerImagePath }) : /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Silhouette, { size: 150, variant: "mystery" }),
|
|
7364
|
+
revealName && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-mt-reveal-name", children: revealName })
|
|
7266
7365
|
] }),
|
|
7267
|
-
/* @__PURE__ */ (0,
|
|
7268
|
-
/* @__PURE__ */ (0,
|
|
7269
|
-
/* @__PURE__ */ (0,
|
|
7366
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "ss-g-mt-known", style: { gridTemplateColumns: `repeat(${keys.length}, minmax(0, 1fr))` }, children: known.map((k) => /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ss-g-mt-known-cell", children: [
|
|
7367
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-mt-lab", children: t.labels[k.key] }),
|
|
7368
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-mt-known-v", "data-state": k.state, "data-testid": `known-${k.key}`, children: k.text })
|
|
7270
7369
|
] }, k.key)) })
|
|
7271
7370
|
] }),
|
|
7272
|
-
!isOver && /* @__PURE__ */ (0,
|
|
7273
|
-
guessResults.length > 0 && /* @__PURE__ */ (0,
|
|
7274
|
-
/* @__PURE__ */ (0,
|
|
7275
|
-
/* @__PURE__ */ (0,
|
|
7276
|
-
keys.map((k) => /* @__PURE__ */ (0,
|
|
7371
|
+
!isOver && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(SegmentProgress, { segments, ariaLabel: t.progress(guessesUsed, totalGuesses) }),
|
|
7372
|
+
guessResults.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ss-g-mt-table", children: [
|
|
7373
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ss-g-mt-thead", style: cols, children: [
|
|
7374
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { children: t.yourGuesses }),
|
|
7375
|
+
keys.map((k) => /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { children: t.labels[k] }, k))
|
|
7277
7376
|
] }),
|
|
7278
7377
|
guessResults.map((gr, i) => {
|
|
7279
7378
|
const name = config.squadPlayers.find((p) => p.id === gr.playerId)?.name ?? `#${gr.playerId}`;
|
|
7280
7379
|
const { first, last } = splitName(name);
|
|
7281
|
-
return /* @__PURE__ */ (0,
|
|
7282
|
-
/* @__PURE__ */ (0,
|
|
7283
|
-
/* @__PURE__ */ (0,
|
|
7284
|
-
/* @__PURE__ */ (0,
|
|
7285
|
-
first && /* @__PURE__ */ (0,
|
|
7286
|
-
/* @__PURE__ */ (0,
|
|
7380
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ss-g-mt-row", style: cols, children: [
|
|
7381
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ss-g-mt-who", children: [
|
|
7382
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(PlayerAvatar, { className: "ss-g-mt-av", name }),
|
|
7383
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("span", { className: "ss-g-mt-names", children: [
|
|
7384
|
+
first && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-mt-first", children: first }),
|
|
7385
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-mt-last", children: last })
|
|
7287
7386
|
] })
|
|
7288
7387
|
] }),
|
|
7289
7388
|
keys.map((key) => {
|
|
7290
7389
|
const v = gr[key];
|
|
7291
7390
|
const arrow = directionArrow(v);
|
|
7292
|
-
return /* @__PURE__ */ (0,
|
|
7391
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
7293
7392
|
"div",
|
|
7294
7393
|
{
|
|
7295
7394
|
className: "ss-g-mt-cell",
|
|
@@ -7297,8 +7396,8 @@ function MysteryTigerGame({
|
|
|
7297
7396
|
"data-verdict": v.verdict,
|
|
7298
7397
|
"aria-label": `${t.labels[key]}: ${v.value ?? v.verdict}${v.direction ? ` ${v.direction}` : ""}`,
|
|
7299
7398
|
children: [
|
|
7300
|
-
/* @__PURE__ */ (0,
|
|
7301
|
-
arrow && /* @__PURE__ */ (0,
|
|
7399
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-mt-cell-v", "aria-hidden": "true", children: tileFace(key, v) }),
|
|
7400
|
+
arrow && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-mt-cell-dir", "aria-hidden": "true", children: arrow })
|
|
7302
7401
|
]
|
|
7303
7402
|
},
|
|
7304
7403
|
key
|
|
@@ -7307,25 +7406,25 @@ function MysteryTigerGame({
|
|
|
7307
7406
|
] }, gr.playerId);
|
|
7308
7407
|
})
|
|
7309
7408
|
] }),
|
|
7310
|
-
!isOver && /* @__PURE__ */ (0,
|
|
7311
|
-
/* @__PURE__ */ (0,
|
|
7312
|
-
/* @__PURE__ */ (0,
|
|
7409
|
+
!isOver && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ss-g-mt-legend", children: [
|
|
7410
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("span", { children: [
|
|
7411
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("i", { className: "ss-g-mt-sw", "data-verdict": "exact" }),
|
|
7313
7412
|
t.legendMatch
|
|
7314
7413
|
] }),
|
|
7315
|
-
/* @__PURE__ */ (0,
|
|
7316
|
-
/* @__PURE__ */ (0,
|
|
7414
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("span", { children: [
|
|
7415
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("i", { className: "ss-g-mt-sw", "data-verdict": "near" }),
|
|
7317
7416
|
t.legendClose
|
|
7318
7417
|
] }),
|
|
7319
|
-
/* @__PURE__ */ (0,
|
|
7418
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("span", { children: [
|
|
7320
7419
|
"\u25B2 ",
|
|
7321
7420
|
t.legendHigher
|
|
7322
7421
|
] })
|
|
7323
7422
|
] }),
|
|
7324
|
-
clientState?.hintLine && !isOver && /* @__PURE__ */ (0,
|
|
7325
|
-
/* @__PURE__ */ (0,
|
|
7326
|
-
/* @__PURE__ */ (0,
|
|
7423
|
+
clientState?.hintLine && !isOver && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ss-g-mt-hint", children: [
|
|
7424
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(IconBulb, {}),
|
|
7425
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { children: clientState.hintLine })
|
|
7327
7426
|
] }),
|
|
7328
|
-
isOver && /* @__PURE__ */ (0,
|
|
7427
|
+
isOver && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
7329
7428
|
ResultCard,
|
|
7330
7429
|
{
|
|
7331
7430
|
tone: clientState?.solved ? "win" : clientState?.failed ? "lose" : "neutral",
|
|
@@ -7337,7 +7436,7 @@ function MysteryTigerGame({
|
|
|
7337
7436
|
}
|
|
7338
7437
|
)
|
|
7339
7438
|
] }),
|
|
7340
|
-
!isOver && /* @__PURE__ */ (0,
|
|
7439
|
+
!isOver && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
7341
7440
|
AnswerTray,
|
|
7342
7441
|
{
|
|
7343
7442
|
id: inputId,
|
|
@@ -7356,7 +7455,7 @@ function MysteryTigerGame({
|
|
|
7356
7455
|
}
|
|
7357
7456
|
|
|
7358
7457
|
// src/components/games/HigherOrLowerGame.tsx
|
|
7359
|
-
var
|
|
7458
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
7360
7459
|
var POINTS_PER_CORRECT = 10;
|
|
7361
7460
|
function parseClientState2(json) {
|
|
7362
7461
|
if (!json) return null;
|
|
@@ -7368,11 +7467,11 @@ function parseClientState2(json) {
|
|
|
7368
7467
|
}
|
|
7369
7468
|
function PlayerCard({ name, imagePath, highlight, children }) {
|
|
7370
7469
|
const { first, last } = splitName(name);
|
|
7371
|
-
return /* @__PURE__ */ (0,
|
|
7372
|
-
/* @__PURE__ */ (0,
|
|
7373
|
-
/* @__PURE__ */ (0,
|
|
7374
|
-
first && /* @__PURE__ */ (0,
|
|
7375
|
-
/* @__PURE__ */ (0,
|
|
7470
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: `ss-g-hl-card${highlight ? " ss-g-hl-card--b" : ""}`, children: [
|
|
7471
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "ss-g-hl-photo-wrap", children: imagePath ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(PlayerAvatar, { className: "ss-g-hl-photo", name, imagePath }) : /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Silhouette, { size: 150 }) }),
|
|
7472
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "ss-g-hl-info", children: [
|
|
7473
|
+
first && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "ss-g-hl-first", children: first }),
|
|
7474
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "ss-g-hl-surname", children: last }),
|
|
7376
7475
|
children
|
|
7377
7476
|
] })
|
|
7378
7477
|
] });
|
|
@@ -7404,47 +7503,47 @@ function HigherOrLowerGame({
|
|
|
7404
7503
|
const newAnswers = [...prevAnswers, { pairIndex: currentPair.pairIndex, pick }];
|
|
7405
7504
|
onSubmit(JSON.stringify({ answers: newAnswers }));
|
|
7406
7505
|
}
|
|
7407
|
-
return /* @__PURE__ */ (0,
|
|
7408
|
-
/* @__PURE__ */ (0,
|
|
7506
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "ss-g-screen ss-g-hl", "data-game": "higher-or-lower", "data-testid": "game-screen-higher-or-lower", children: [
|
|
7507
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7409
7508
|
GameHeader,
|
|
7410
7509
|
{
|
|
7411
7510
|
title: gameTitle({ gameId: "higher-or-lower" }, ui.games.titles),
|
|
7412
7511
|
eyebrow: t.eyebrow(POINTS_PER_CORRECT),
|
|
7413
|
-
right: config ? /* @__PURE__ */ (0,
|
|
7512
|
+
right: config ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(StatStack, { value: runLength, label: t.streak }) : void 0,
|
|
7414
7513
|
onBack,
|
|
7415
7514
|
backLabel: ui.back
|
|
7416
7515
|
}
|
|
7417
7516
|
),
|
|
7418
|
-
!config && /* @__PURE__ */ (0,
|
|
7419
|
-
config && /* @__PURE__ */ (0,
|
|
7420
|
-
/* @__PURE__ */ (0,
|
|
7421
|
-
/* @__PURE__ */ (0,
|
|
7422
|
-
/* @__PURE__ */ (0,
|
|
7423
|
-
/* @__PURE__ */ (0,
|
|
7424
|
-
/* @__PURE__ */ (0,
|
|
7517
|
+
!config && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading }),
|
|
7518
|
+
config && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
|
|
7519
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "ss-g-body", children: [
|
|
7520
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "ss-g-hl-prompt", "data-testid": "hol-prompt", children: [
|
|
7521
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "ss-g-hl-prompt-q", children: t.whoHadMore }),
|
|
7522
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "ss-g-hl-prompt-stat", children: config.statLabel }),
|
|
7523
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "ss-g-hl-prompt-season", children: t.season(config.seasonLabel) })
|
|
7425
7524
|
] }),
|
|
7426
|
-
currentPair && /* @__PURE__ */ (0,
|
|
7427
|
-
/* @__PURE__ */ (0,
|
|
7428
|
-
/* @__PURE__ */ (0,
|
|
7429
|
-
/* @__PURE__ */ (0,
|
|
7525
|
+
currentPair && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "ss-g-hl-pair", children: [
|
|
7526
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(PlayerCard, { name: currentPair.playerAName, imagePath: currentPair.playerAImagePath, children: [
|
|
7527
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "ss-g-hl-value", children: currentPair.playerAValue }),
|
|
7528
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "ss-g-hl-stat", children: config.statLabel })
|
|
7430
7529
|
] }),
|
|
7431
|
-
/* @__PURE__ */ (0,
|
|
7432
|
-
/* @__PURE__ */ (0,
|
|
7433
|
-
/* @__PURE__ */ (0,
|
|
7434
|
-
/* @__PURE__ */ (0,
|
|
7530
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "ss-g-hl-vs", "aria-hidden": "true", children: t.vs }),
|
|
7531
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(PlayerCard, { name: currentPair.playerBName, imagePath: currentPair.playerBImagePath, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "ss-g-hl-btns", children: [
|
|
7532
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(GameButton, { variant: "primary", disabled: submitting, onClick: () => handlePick("higher"), children: [
|
|
7533
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(IconArrowUp, { size: 16 }),
|
|
7435
7534
|
t.higher
|
|
7436
7535
|
] }),
|
|
7437
|
-
/* @__PURE__ */ (0,
|
|
7438
|
-
/* @__PURE__ */ (0,
|
|
7536
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(GameButton, { variant: "outline", disabled: submitting, onClick: () => handlePick("lower"), children: [
|
|
7537
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(IconArrowDown, { size: 16 }),
|
|
7439
7538
|
t.lower
|
|
7440
7539
|
] })
|
|
7441
7540
|
] }) })
|
|
7442
7541
|
] }),
|
|
7443
|
-
lastAnswer && lastAnswerPair && /* @__PURE__ */ (0,
|
|
7444
|
-
lastAnswer.wasCorrect ? /* @__PURE__ */ (0,
|
|
7542
|
+
lastAnswer && lastAnswerPair && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("p", { className: "ss-g-hl-feedback", "data-testid": "hol-last", "data-correct": lastAnswer.wasCorrect ? "true" : "false", children: [
|
|
7543
|
+
lastAnswer.wasCorrect ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(IconCheck, {}) : /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(IconClose, {}),
|
|
7445
7544
|
t.lastAnswer(splitName(lastAnswerPair.playerBName).last, lastAnswer.playerBValue)
|
|
7446
7545
|
] }),
|
|
7447
|
-
isOver && /* @__PURE__ */ (0,
|
|
7546
|
+
isOver && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7448
7547
|
ResultCard,
|
|
7449
7548
|
{
|
|
7450
7549
|
tone: runEndedWrong ? "lose" : allPairsAnswered ? "win" : "neutral",
|
|
@@ -7456,15 +7555,15 @@ function HigherOrLowerGame({
|
|
|
7456
7555
|
}
|
|
7457
7556
|
)
|
|
7458
7557
|
] }),
|
|
7459
|
-
!isOver && /* @__PURE__ */ (0,
|
|
7460
|
-
/* @__PURE__ */ (0,
|
|
7558
|
+
!isOver && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "ss-g-hl-foot", children: [
|
|
7559
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "ss-g-hl-dots", role: "img", "aria-label": t.answersSoFar(answeredCount, config.pairs.length), children: config.pairs.map((p, i) => {
|
|
7461
7560
|
const a = answeredPairs[i];
|
|
7462
|
-
return /* @__PURE__ */ (0,
|
|
7561
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "ss-g-hl-dot", "data-state": a ? a.wasCorrect ? "correct" : "wrong" : "todo" }, p.pairIndex);
|
|
7463
7562
|
}) }),
|
|
7464
|
-
/* @__PURE__ */ (0,
|
|
7465
|
-
/* @__PURE__ */ (0,
|
|
7563
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("span", { className: "ss-g-hl-pts", children: [
|
|
7564
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { "data-testid": "hol-score", children: score }),
|
|
7466
7565
|
" ",
|
|
7467
|
-
/* @__PURE__ */ (0,
|
|
7566
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "ss-g-hl-pts-unit", children: ui.games.unitPts })
|
|
7468
7567
|
] })
|
|
7469
7568
|
] }) })
|
|
7470
7569
|
] })
|
|
@@ -7476,17 +7575,17 @@ var import_react47 = require("react");
|
|
|
7476
7575
|
|
|
7477
7576
|
// src/components/games/ui/CrestShield.tsx
|
|
7478
7577
|
var import_react46 = require("react");
|
|
7479
|
-
var
|
|
7578
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
7480
7579
|
function CrestShield({ src, name, size = 28 }) {
|
|
7481
7580
|
const [failed, setFailed] = (0, import_react46.useState)(false);
|
|
7482
7581
|
if (src && !isPlaceholderImage(src) && !failed) {
|
|
7483
|
-
return /* @__PURE__ */ (0,
|
|
7582
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("img", { className: "ss-g-crest", src, alt: name, width: size, height: size, loading: "lazy", onError: () => setFailed(true) });
|
|
7484
7583
|
}
|
|
7485
|
-
return /* @__PURE__ */ (0,
|
|
7584
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("svg", { className: "ss-g-crest ss-g-crest--ph", width: size, height: size * 32 / 28, viewBox: "0 0 28 32", role: "img", "aria-label": name, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("path", { d: "M2 3h24v12c0 9-6 14-12 17C8 29 2 24 2 15z", fill: "currentColor" }) });
|
|
7486
7585
|
}
|
|
7487
7586
|
|
|
7488
7587
|
// src/components/games/CareerPathGame.tsx
|
|
7489
|
-
var
|
|
7588
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
7490
7589
|
function parseClientState3(json) {
|
|
7491
7590
|
if (!json) return null;
|
|
7492
7591
|
try {
|
|
@@ -7516,9 +7615,9 @@ function CareerPathGame({
|
|
|
7516
7615
|
const alreadyGuessedIds = new Set(clientState?.guessResults.map((g) => g.playerId) ?? []);
|
|
7517
7616
|
const isOver = result?.alreadyPlayed === true || clientState?.solved === true || clientState?.failed === true;
|
|
7518
7617
|
if (!config) {
|
|
7519
|
-
return /* @__PURE__ */ (0,
|
|
7520
|
-
/* @__PURE__ */ (0,
|
|
7521
|
-
/* @__PURE__ */ (0,
|
|
7618
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "ss-g-screen", "data-game": "career-path", "data-testid": "game-screen-career-path", children: [
|
|
7619
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(GameHeader, { title, eyebrow: s.eyebrow, onBack, backLabel: ui.back }),
|
|
7620
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
7522
7621
|
] });
|
|
7523
7622
|
}
|
|
7524
7623
|
const visiblePath = clientState?.visiblePath ?? config.initialPath;
|
|
@@ -7532,61 +7631,61 @@ function CareerPathGame({
|
|
|
7532
7631
|
setQuery("");
|
|
7533
7632
|
onSubmit(JSON.stringify({ guesses: newGuesses }));
|
|
7534
7633
|
}
|
|
7535
|
-
const right = !isOver && clientState ? /* @__PURE__ */ (0,
|
|
7634
|
+
const right = !isOver && clientState ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { "data-testid": "cp-guess-chip", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(Chip, { variant: "neutral", children: [
|
|
7536
7635
|
ui.games.guess,
|
|
7537
7636
|
" ",
|
|
7538
|
-
/* @__PURE__ */ (0,
|
|
7637
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "ss-g-num", children: clientState.guessesUsed + 1 }),
|
|
7539
7638
|
" / ",
|
|
7540
7639
|
clientState.guessesUsed + clientState.guessesRemaining
|
|
7541
7640
|
] }) }) : void 0;
|
|
7542
7641
|
const outcome = clientState?.solved ? s.solved : clientState?.failed ? s.failed : ui.games.done;
|
|
7543
|
-
return /* @__PURE__ */ (0,
|
|
7544
|
-
/* @__PURE__ */ (0,
|
|
7545
|
-
/* @__PURE__ */ (0,
|
|
7546
|
-
!isOver && /* @__PURE__ */ (0,
|
|
7547
|
-
/* @__PURE__ */ (0,
|
|
7548
|
-
isOver && clientState?.revealedPlayerName ? /* @__PURE__ */ (0,
|
|
7549
|
-
/* @__PURE__ */ (0,
|
|
7550
|
-
/* @__PURE__ */ (0,
|
|
7551
|
-
clientState?.hintLine ? /* @__PURE__ */ (0,
|
|
7552
|
-
/* @__PURE__ */ (0,
|
|
7553
|
-
/* @__PURE__ */ (0,
|
|
7642
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "ss-g-screen", "data-game": "career-path", "data-testid": "game-screen-career-path", children: [
|
|
7643
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(GameHeader, { title, eyebrow: s.eyebrow, right, onBack, backLabel: ui.back }),
|
|
7644
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "ss-g-body", children: [
|
|
7645
|
+
!isOver && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed: clientState?.guessesUsed ?? 0, ui }),
|
|
7646
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "ss-g-cp-card", children: [
|
|
7647
|
+
isOver && clientState?.revealedPlayerName ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(PlayerAvatar, { className: "ss-g-cp-photo", name: clientState.revealedPlayerName, imagePath: clientState.revealedPlayerImagePath }) : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Silhouette, { size: 64, variant: isOver ? "default" : "mystery" }),
|
|
7648
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "ss-g-cp-card-text", children: [
|
|
7649
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "ss-g-cp-card-title", children: isOver && clientState?.revealedPlayerName ? clientState.revealedPlayerName : s.mysteryPlayer }),
|
|
7650
|
+
clientState?.hintLine ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "ss-g-cp-hint", children: clientState.hintLine }) : !isOver ? /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("span", { className: "ss-g-cp-locks", children: [
|
|
7651
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Chip, { variant: "lock", icon: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(IconLock, { size: 11 }), children: s.lockPosition }),
|
|
7652
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Chip, { variant: "lock", icon: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(IconLock, { size: 11 }), children: s.lockNationality })
|
|
7554
7653
|
] }) : null
|
|
7555
7654
|
] })
|
|
7556
7655
|
] }),
|
|
7557
|
-
/* @__PURE__ */ (0,
|
|
7656
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("ol", { className: "ss-g-cp-line", children: [
|
|
7558
7657
|
visiblePath.map((spell, i) => {
|
|
7559
7658
|
const years = i === 0 ? s.firstClub : spellYears(spell);
|
|
7560
|
-
return /* @__PURE__ */ (0,
|
|
7561
|
-
/* @__PURE__ */ (0,
|
|
7562
|
-
/* @__PURE__ */ (0,
|
|
7563
|
-
/* @__PURE__ */ (0,
|
|
7659
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("li", { className: "ss-g-cp-step", children: [
|
|
7660
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("span", { className: "ss-g-cp-rail", children: [
|
|
7661
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "ss-g-cp-tile", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(CrestShield, { src: spell.crestUrl, name: spell.clubName, size: 30 }) }),
|
|
7662
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "ss-g-cp-conn", "aria-hidden": "true" })
|
|
7564
7663
|
] }),
|
|
7565
|
-
/* @__PURE__ */ (0,
|
|
7566
|
-
/* @__PURE__ */ (0,
|
|
7567
|
-
/* @__PURE__ */ (0,
|
|
7568
|
-
/* @__PURE__ */ (0,
|
|
7569
|
-
spell.isLoan && /* @__PURE__ */ (0,
|
|
7664
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("span", { className: "ss-g-cp-step-text", children: [
|
|
7665
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "ss-g-cp-club", children: spell.clubName }),
|
|
7666
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("span", { className: "ss-g-cp-sub", children: [
|
|
7667
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "ss-g-cp-years", children: years }),
|
|
7668
|
+
spell.isLoan && /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_jsx_runtime79.Fragment, { children: [
|
|
7570
7669
|
years ? " \xB7 " : "",
|
|
7571
|
-
/* @__PURE__ */ (0,
|
|
7670
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "ss-g-cp-loan", children: s.loan })
|
|
7572
7671
|
] })
|
|
7573
7672
|
] })
|
|
7574
7673
|
] })
|
|
7575
7674
|
] }, `${spell.clubName}-${i}`);
|
|
7576
7675
|
}),
|
|
7577
|
-
hidden > 0 && /* @__PURE__ */ (0,
|
|
7578
|
-
/* @__PURE__ */ (0,
|
|
7579
|
-
/* @__PURE__ */ (0,
|
|
7580
|
-
hidden > 1 && /* @__PURE__ */ (0,
|
|
7676
|
+
hidden > 0 && /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("li", { className: "ss-g-cp-step ss-g-cp-step--hidden", children: [
|
|
7677
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("span", { className: "ss-g-cp-rail", children: [
|
|
7678
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "ss-g-cp-tile ss-g-cp-tile--locked", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(IconLock, { size: 18 }) }),
|
|
7679
|
+
hidden > 1 && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "ss-g-cp-conn ss-g-cp-conn--faint", "aria-hidden": "true" })
|
|
7581
7680
|
] }),
|
|
7582
|
-
/* @__PURE__ */ (0,
|
|
7681
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "ss-g-cp-step-text", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "ss-g-cp-sub", children: s.nextClubHidden }) })
|
|
7583
7682
|
] }),
|
|
7584
|
-
hidden > 1 && /* @__PURE__ */ (0,
|
|
7585
|
-
/* @__PURE__ */ (0,
|
|
7586
|
-
/* @__PURE__ */ (0,
|
|
7683
|
+
hidden > 1 && /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("li", { className: "ss-g-cp-step ss-g-cp-step--more", children: [
|
|
7684
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "ss-g-cp-rail", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "ss-g-cp-tile ss-g-cp-tile--faint", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(IconLock, { size: 18 }) }) }),
|
|
7685
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "ss-g-cp-step-text", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "ss-g-cp-sub", children: s.moreClubs(hidden - 1) }) })
|
|
7587
7686
|
] })
|
|
7588
7687
|
] }),
|
|
7589
|
-
isOver && /* @__PURE__ */ (0,
|
|
7688
|
+
isOver && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7590
7689
|
ResultCard,
|
|
7591
7690
|
{
|
|
7592
7691
|
tone: clientState?.solved ? "win" : clientState?.failed ? "lose" : "neutral",
|
|
@@ -7598,7 +7697,7 @@ function CareerPathGame({
|
|
|
7598
7697
|
}
|
|
7599
7698
|
)
|
|
7600
7699
|
] }),
|
|
7601
|
-
!isOver && /* @__PURE__ */ (0,
|
|
7700
|
+
!isOver && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7602
7701
|
AnswerTray,
|
|
7603
7702
|
{
|
|
7604
7703
|
id: inputId,
|
|
@@ -7620,13 +7719,13 @@ function CareerPathGame({
|
|
|
7620
7719
|
var import_react48 = __toESM(require("react"), 1);
|
|
7621
7720
|
|
|
7622
7721
|
// src/components/games/ui/OptionList.tsx
|
|
7623
|
-
var
|
|
7722
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
7624
7723
|
function OptionList({ label, options, onPick }) {
|
|
7625
|
-
return /* @__PURE__ */ (0,
|
|
7724
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "ss-g-opts", role: "listbox", "aria-label": label, children: options.map((o) => /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("button", { type: "button", role: "option", "aria-selected": false, className: "ss-g-opt", onClick: () => onPick(o.key), children: o.content }, o.key)) });
|
|
7626
7725
|
}
|
|
7627
7726
|
|
|
7628
7727
|
// src/components/games/BeatTheGridGame.tsx
|
|
7629
|
-
var
|
|
7728
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
7630
7729
|
function criterionIconKind(label, key) {
|
|
7631
7730
|
const l = (key ?? label).toLowerCase();
|
|
7632
7731
|
if (l.includes("app")) return "calendar";
|
|
@@ -7644,34 +7743,34 @@ function rowAbbrev(label, map, key) {
|
|
|
7644
7743
|
function CriterionIcon({ kind }) {
|
|
7645
7744
|
switch (kind) {
|
|
7646
7745
|
case "calendar":
|
|
7647
|
-
return /* @__PURE__ */ (0,
|
|
7746
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(IconCalendar, {});
|
|
7648
7747
|
case "ball":
|
|
7649
|
-
return /* @__PURE__ */ (0,
|
|
7748
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(IconBall, {});
|
|
7650
7749
|
case "boot":
|
|
7651
|
-
return /* @__PURE__ */ (0,
|
|
7750
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(IconBoot, {});
|
|
7652
7751
|
case "gloves":
|
|
7653
|
-
return /* @__PURE__ */ (0,
|
|
7752
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(IconGloves, {});
|
|
7654
7753
|
case "shield":
|
|
7655
|
-
return /* @__PURE__ */ (0,
|
|
7754
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(IconShield, {});
|
|
7656
7755
|
default:
|
|
7657
|
-
return /* @__PURE__ */ (0,
|
|
7756
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(IconFlag, {});
|
|
7658
7757
|
}
|
|
7659
7758
|
}
|
|
7660
7759
|
function HeaderVisual({ label, textKey: iKey, meta }) {
|
|
7661
7760
|
if (!meta) {
|
|
7662
|
-
return /* @__PURE__ */ (0,
|
|
7761
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(CriterionIcon, { kind: criterionIconKind(label, iKey) });
|
|
7663
7762
|
}
|
|
7664
7763
|
switch (meta.kind) {
|
|
7665
7764
|
case "club":
|
|
7666
|
-
return /* @__PURE__ */ (0,
|
|
7765
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(CrestShield, { src: meta.imageUrl, name: label, size: 24 });
|
|
7667
7766
|
case "coach":
|
|
7668
|
-
return /* @__PURE__ */ (0,
|
|
7767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(PlayerAvatar, { name: label, imagePath: meta.imageUrl, className: "ss-g-btg-coach-av" });
|
|
7669
7768
|
case "country":
|
|
7670
|
-
return /* @__PURE__ */ (0,
|
|
7769
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "ss-g-btg-hdr-flag", "aria-hidden": "true", children: nationalityFlag(meta.country ?? label) });
|
|
7671
7770
|
case "position":
|
|
7672
|
-
return /* @__PURE__ */ (0,
|
|
7771
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_jsx_runtime81.Fragment, {});
|
|
7673
7772
|
default:
|
|
7674
|
-
return /* @__PURE__ */ (0,
|
|
7773
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(CriterionIcon, { kind: criterionIconKind(label, iKey) });
|
|
7675
7774
|
}
|
|
7676
7775
|
}
|
|
7677
7776
|
function parseClientState4(json) {
|
|
@@ -7715,12 +7814,12 @@ function SearchSheet({
|
|
|
7715
7814
|
const filtered = playerPool.filter(
|
|
7716
7815
|
(p) => !alreadyFilledIds.has(p.id) && p.name.toLowerCase().includes(query.toLowerCase())
|
|
7717
7816
|
);
|
|
7718
|
-
return /* @__PURE__ */ (0,
|
|
7719
|
-
/* @__PURE__ */ (0,
|
|
7720
|
-
/* @__PURE__ */ (0,
|
|
7721
|
-
/* @__PURE__ */ (0,
|
|
7722
|
-
/* @__PURE__ */ (0,
|
|
7723
|
-
/* @__PURE__ */ (0,
|
|
7817
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "ss-g-btg-sheet", "data-testid": "btg-search-sheet", children: [
|
|
7818
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "ss-g-btg-sheet-hdr", children: [
|
|
7819
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Chip, { variant: "neutral", children: rowLabel }),
|
|
7820
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "ss-g-btg-sheet-x", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(IconClose, { size: 12 }) }),
|
|
7821
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Chip, { variant: "accent", children: colLabel }),
|
|
7822
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7724
7823
|
"button",
|
|
7725
7824
|
{
|
|
7726
7825
|
type: "button",
|
|
@@ -7728,12 +7827,12 @@ function SearchSheet({
|
|
|
7728
7827
|
"data-testid": "btg-sheet-dismiss",
|
|
7729
7828
|
"aria-label": s.closeSearch,
|
|
7730
7829
|
onClick: onDismiss,
|
|
7731
|
-
children: /* @__PURE__ */ (0,
|
|
7830
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(IconClose, {})
|
|
7732
7831
|
}
|
|
7733
7832
|
)
|
|
7734
7833
|
] }),
|
|
7735
|
-
playerPool.length === 0 ? /* @__PURE__ */ (0,
|
|
7736
|
-
/* @__PURE__ */ (0,
|
|
7834
|
+
playerPool.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "ss-g-btg-sheet-empty", children: s.emptyPool }) : /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
|
|
7835
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7737
7836
|
SearchField,
|
|
7738
7837
|
{
|
|
7739
7838
|
id: inputId,
|
|
@@ -7745,16 +7844,16 @@ function SearchSheet({
|
|
|
7745
7844
|
inputRef
|
|
7746
7845
|
}
|
|
7747
7846
|
),
|
|
7748
|
-
query.length > 0 && filtered.length > 0 && /* @__PURE__ */ (0,
|
|
7847
|
+
query.length > 0 && filtered.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7749
7848
|
OptionList,
|
|
7750
7849
|
{
|
|
7751
7850
|
label: s.searchLabel(rowLabel, colLabel),
|
|
7752
7851
|
options: filtered.map((p) => ({
|
|
7753
7852
|
key: p.id,
|
|
7754
|
-
content: /* @__PURE__ */ (0,
|
|
7755
|
-
/* @__PURE__ */ (0,
|
|
7756
|
-
/* @__PURE__ */ (0,
|
|
7757
|
-
/* @__PURE__ */ (0,
|
|
7853
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
|
|
7854
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(PlayerAvatar, { name: p.name, imagePath: p.imagePath, className: "ss-g-opt-av" }),
|
|
7855
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "ss-g-btg-result-name", children: p.name }),
|
|
7856
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "ss-g-btg-result-plus", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(IconPlus, { size: 18 }) })
|
|
7758
7857
|
] })
|
|
7759
7858
|
})),
|
|
7760
7859
|
onPick: (k) => onPick(row, col, Number(k))
|
|
@@ -7792,9 +7891,9 @@ function BeatTheGridGame({
|
|
|
7792
7891
|
onSubmit(JSON.stringify({ cells: newCells }));
|
|
7793
7892
|
}
|
|
7794
7893
|
if (!config) {
|
|
7795
|
-
return /* @__PURE__ */ (0,
|
|
7796
|
-
/* @__PURE__ */ (0,
|
|
7797
|
-
/* @__PURE__ */ (0,
|
|
7894
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "ss-g-screen", "data-game": "beat-the-grid", "data-testid": "game-screen-beat-the-grid", children: [
|
|
7895
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(GameHeader, { title, eyebrow: s.eyebrow, onBack, backLabel: ui.back }),
|
|
7896
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
7798
7897
|
] });
|
|
7799
7898
|
}
|
|
7800
7899
|
const rows = config.rows;
|
|
@@ -7807,20 +7906,20 @@ function BeatTheGridGame({
|
|
|
7807
7906
|
(_, i) => i < correctCount ? "correct" : i < correctCount + wrongCount ? "wrong" : "todo"
|
|
7808
7907
|
);
|
|
7809
7908
|
const totalScore = clientState?.totalScore ?? result?.score ?? 0;
|
|
7810
|
-
return /* @__PURE__ */ (0,
|
|
7811
|
-
/* @__PURE__ */ (0,
|
|
7812
|
-
/* @__PURE__ */ (0,
|
|
7909
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "ss-g-screen", "data-game": "beat-the-grid", "data-testid": "game-screen-beat-the-grid", children: [
|
|
7910
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(GameHeader, { title, eyebrow: s.eyebrow, onBack, backLabel: ui.back }),
|
|
7911
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7813
7912
|
SegmentProgress,
|
|
7814
7913
|
{
|
|
7815
7914
|
segments,
|
|
7816
7915
|
ariaLabel: s.progressAria(filledCells.length, total),
|
|
7817
7916
|
leftLabel: s.filled(filledCells.length, total),
|
|
7818
7917
|
rightLabel: s.toGo(Math.max(0, total - filledCells.length)),
|
|
7819
|
-
right: /* @__PURE__ */ (0,
|
|
7918
|
+
right: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Chip, { variant: "accent", children: `${totalScore} ${ui.games.unitPts}` })
|
|
7820
7919
|
}
|
|
7821
7920
|
),
|
|
7822
|
-
/* @__PURE__ */ (0,
|
|
7823
|
-
/* @__PURE__ */ (0,
|
|
7921
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "ss-g-body", children: [
|
|
7922
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
|
|
7824
7923
|
"div",
|
|
7825
7924
|
{
|
|
7826
7925
|
className: activeCell !== null ? "ss-g-btg-grid ss-g-btg-grid--fit" : "ss-g-btg-grid",
|
|
@@ -7830,31 +7929,31 @@ function BeatTheGridGame({
|
|
|
7830
7929
|
},
|
|
7831
7930
|
role: "grid",
|
|
7832
7931
|
children: [
|
|
7833
|
-
/* @__PURE__ */ (0,
|
|
7932
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "ss-g-btg-corner" }),
|
|
7834
7933
|
cols.map((col, colIdx) => {
|
|
7835
7934
|
const colMeta = config.colsMeta?.[colIdx];
|
|
7836
|
-
return /* @__PURE__ */ (0,
|
|
7837
|
-
/* @__PURE__ */ (0,
|
|
7838
|
-
/* @__PURE__ */ (0,
|
|
7935
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "ss-g-btg-colhdr", "data-meta": colMeta ? "true" : void 0, children: [
|
|
7936
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(HeaderVisual, { label: col, textKey: config.colsI18n?.[colIdx]?.key, meta: colMeta }),
|
|
7937
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { children: col })
|
|
7839
7938
|
] }, col);
|
|
7840
7939
|
}),
|
|
7841
7940
|
rows.map((rowLabel, rowIdx) => {
|
|
7842
7941
|
const rowMeta = config.rowsMeta?.[rowIdx];
|
|
7843
7942
|
const abbr = rowAbbrev(rowLabel, s.rowAbbrev, config.rowsI18n?.[rowIdx]?.key);
|
|
7844
|
-
const rowHeaderContent = rowMeta ? /* @__PURE__ */ (0,
|
|
7845
|
-
/* @__PURE__ */ (0,
|
|
7846
|
-
/* @__PURE__ */ (0,
|
|
7847
|
-
] }) : abbr === rowLabel ? /* @__PURE__ */ (0,
|
|
7848
|
-
/* @__PURE__ */ (0,
|
|
7849
|
-
/* @__PURE__ */ (0,
|
|
7943
|
+
const rowHeaderContent = rowMeta ? /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
|
|
7944
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(HeaderVisual, { label: rowLabel, textKey: config.rowsI18n?.[rowIdx]?.key, meta: rowMeta }),
|
|
7945
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { children: rowLabel })
|
|
7946
|
+
] }) : abbr === rowLabel ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { children: rowLabel }) : /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
|
|
7947
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { "aria-hidden": "true", children: abbr }),
|
|
7948
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "ss-g-sr", children: rowLabel })
|
|
7850
7949
|
] });
|
|
7851
|
-
return /* @__PURE__ */ (0,
|
|
7852
|
-
/* @__PURE__ */ (0,
|
|
7950
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_react48.default.Fragment, { children: [
|
|
7951
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "ss-g-btg-rowhdr", "data-meta": rowMeta ? "true" : void 0, children: rowHeaderContent }),
|
|
7853
7952
|
cols.map((colLabel, colIdx) => {
|
|
7854
7953
|
const filled = findCellResult(filledCells, rowIdx, colIdx);
|
|
7855
7954
|
const isActive = activeCell?.row === rowIdx && activeCell?.col === colIdx;
|
|
7856
7955
|
const state = filled ? filled.isCorrect ? "correct" : "wrong" : isActive ? "active" : "empty";
|
|
7857
|
-
return /* @__PURE__ */ (0,
|
|
7956
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7858
7957
|
"button",
|
|
7859
7958
|
{
|
|
7860
7959
|
type: "button",
|
|
@@ -7865,20 +7964,20 @@ function BeatTheGridGame({
|
|
|
7865
7964
|
className: "ss-g-btg-cell",
|
|
7866
7965
|
disabled: isLocked2 || submitting,
|
|
7867
7966
|
onClick: () => handleCellClick(rowIdx, colIdx),
|
|
7868
|
-
children: filled ? /* @__PURE__ */ (0,
|
|
7869
|
-
/* @__PURE__ */ (0,
|
|
7967
|
+
children: filled ? /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
|
|
7968
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7870
7969
|
"span",
|
|
7871
7970
|
{
|
|
7872
7971
|
className: `ss-g-btg-badge ss-g-btg-badge--${filled.isCorrect ? "correct" : "wrong"}`,
|
|
7873
7972
|
role: "img",
|
|
7874
7973
|
"aria-label": filled.isCorrect ? s.correct : s.wrong,
|
|
7875
|
-
children: filled.isCorrect ? /* @__PURE__ */ (0,
|
|
7974
|
+
children: filled.isCorrect ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(IconCheck, { size: 11 }) : /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(IconClose, { size: 11 })
|
|
7876
7975
|
}
|
|
7877
7976
|
),
|
|
7878
|
-
/* @__PURE__ */ (0,
|
|
7977
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "ss-g-btg-rarity", children: filled.rarityScore }),
|
|
7879
7978
|
(() => {
|
|
7880
7979
|
const entry = playerPool.find((p) => p.id === filled.playerId);
|
|
7881
|
-
return /* @__PURE__ */ (0,
|
|
7980
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7882
7981
|
PlayerAvatar,
|
|
7883
7982
|
{
|
|
7884
7983
|
name: entry?.name ?? "",
|
|
@@ -7887,8 +7986,8 @@ function BeatTheGridGame({
|
|
|
7887
7986
|
}
|
|
7888
7987
|
);
|
|
7889
7988
|
})(),
|
|
7890
|
-
/* @__PURE__ */ (0,
|
|
7891
|
-
] }) : /* @__PURE__ */ (0,
|
|
7989
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "ss-g-btg-name", children: shortName(playerPool.find((p) => p.id === filled.playerId)?.name) })
|
|
7990
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "ss-g-btg-plus", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(IconPlus, { size: 22 }) })
|
|
7892
7991
|
},
|
|
7893
7992
|
`cell-${rowIdx}-${colIdx}`
|
|
7894
7993
|
);
|
|
@@ -7898,7 +7997,7 @@ function BeatTheGridGame({
|
|
|
7898
7997
|
]
|
|
7899
7998
|
}
|
|
7900
7999
|
),
|
|
7901
|
-
isLocked2 && /* @__PURE__ */ (0,
|
|
8000
|
+
isLocked2 && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7902
8001
|
ResultCard,
|
|
7903
8002
|
{
|
|
7904
8003
|
tone: "neutral",
|
|
@@ -7910,7 +8009,7 @@ function BeatTheGridGame({
|
|
|
7910
8009
|
}
|
|
7911
8010
|
)
|
|
7912
8011
|
] }),
|
|
7913
|
-
activeCell !== null && /* @__PURE__ */ (0,
|
|
8012
|
+
activeCell !== null && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "ss-g-btg-pin", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7914
8013
|
SearchSheet,
|
|
7915
8014
|
{
|
|
7916
8015
|
row: activeCell.row,
|
|
@@ -7932,18 +8031,18 @@ function BeatTheGridGame({
|
|
|
7932
8031
|
var import_react49 = require("react");
|
|
7933
8032
|
|
|
7934
8033
|
// src/components/games/ui/PitchSvg.tsx
|
|
7935
|
-
var
|
|
8034
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
7936
8035
|
function PitchSvg({ variant }) {
|
|
7937
|
-
return /* @__PURE__ */ (0,
|
|
7938
|
-
/* @__PURE__ */ (0,
|
|
7939
|
-
variant === "full" ? /* @__PURE__ */ (0,
|
|
7940
|
-
/* @__PURE__ */ (0,
|
|
7941
|
-
/* @__PURE__ */ (0,
|
|
7942
|
-
/* @__PURE__ */ (0,
|
|
7943
|
-
/* @__PURE__ */ (0,
|
|
7944
|
-
] }) : /* @__PURE__ */ (0,
|
|
7945
|
-
/* @__PURE__ */ (0,
|
|
7946
|
-
/* @__PURE__ */ (0,
|
|
8036
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("svg", { className: "ss-g-pitch-svg", viewBox: variant === "full" ? "0 0 100 150" : "0 0 100 100", preserveAspectRatio: "none", "aria-hidden": "true", children: [
|
|
8037
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("rect", { x: "4", y: "4", width: "92", height: variant === "full" ? 142 : 92, fill: "none" }),
|
|
8038
|
+
variant === "full" ? /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_jsx_runtime82.Fragment, { children: [
|
|
8039
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("line", { x1: "4", y1: "75", x2: "96", y2: "75" }),
|
|
8040
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("circle", { cx: "50", cy: "75", r: "12", fill: "none" }),
|
|
8041
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("rect", { x: "26", y: "4", width: "48", height: "20", fill: "none" }),
|
|
8042
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("rect", { x: "26", y: "126", width: "48", height: "20", fill: "none" })
|
|
8043
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_jsx_runtime82.Fragment, { children: [
|
|
8044
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("path", { d: "M38 4a12 12 0 0 0 24 0", fill: "none" }),
|
|
8045
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("rect", { x: "26", y: "76", width: "48", height: "20", fill: "none" })
|
|
7947
8046
|
] })
|
|
7948
8047
|
] });
|
|
7949
8048
|
}
|
|
@@ -7999,7 +8098,7 @@ function positionsBySlot(formation, rowsAttackFirst) {
|
|
|
7999
8098
|
}
|
|
8000
8099
|
|
|
8001
8100
|
// src/components/games/GuessTheXiGame.tsx
|
|
8002
|
-
var
|
|
8101
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
8003
8102
|
var MAX_GUESSES2 = 3;
|
|
8004
8103
|
function parseClientState5(json) {
|
|
8005
8104
|
if (!json) return null;
|
|
@@ -8049,31 +8148,31 @@ function GuessTheXiGame({
|
|
|
8049
8148
|
const wrongGuesses = (clientState?.guessHistory ?? []).filter((g) => !g.wasCorrect);
|
|
8050
8149
|
const guessesLeft = Math.max(0, MAX_GUESSES2 - (clientState?.guessesUsed ?? 0));
|
|
8051
8150
|
const teamName = (id) => config?.teamPool.find((tm) => tm.teamId === id)?.teamName ?? `#${id}`;
|
|
8052
|
-
return /* @__PURE__ */ (0,
|
|
8053
|
-
/* @__PURE__ */ (0,
|
|
8151
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-g-screen ss-g-gxi", "data-game": "guess-the-xi", "data-testid": "game-screen-guess-the-xi", children: [
|
|
8152
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8054
8153
|
GameHeader,
|
|
8055
8154
|
{
|
|
8056
8155
|
title: gameTitle({ gameId: "guess-the-xi" }, ui.games.titles),
|
|
8057
8156
|
eyebrow: config?.poolLabel,
|
|
8058
|
-
right: formation ? /* @__PURE__ */ (0,
|
|
8157
|
+
right: formation ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Chip, { variant: "accent", children: formation }) : void 0,
|
|
8059
8158
|
onBack,
|
|
8060
8159
|
backLabel: ui.back
|
|
8061
8160
|
}
|
|
8062
8161
|
),
|
|
8063
|
-
!config && /* @__PURE__ */ (0,
|
|
8064
|
-
config && /* @__PURE__ */ (0,
|
|
8065
|
-
/* @__PURE__ */ (0,
|
|
8066
|
-
!isOver && /* @__PURE__ */ (0,
|
|
8067
|
-
rows.length > 0 && /* @__PURE__ */ (0,
|
|
8068
|
-
/* @__PURE__ */ (0,
|
|
8069
|
-
/* @__PURE__ */ (0,
|
|
8162
|
+
!config && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading }),
|
|
8163
|
+
config && /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(import_jsx_runtime83.Fragment, { children: [
|
|
8164
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-g-body", children: [
|
|
8165
|
+
!isOver && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed: clientState?.guessHistory.length ?? 0, ui }),
|
|
8166
|
+
rows.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-g-gxi-pitch", role: "group", "aria-label": t.pitchLabel, children: [
|
|
8167
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(PitchSvg, { variant: "full" }),
|
|
8168
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "ss-g-gxi-rows", children: rows.map((row, r) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "ss-g-gxi-row", children: row.map((pos, c) => {
|
|
8070
8169
|
const posLabel = pos.slot ? posBySlot.get(pos.slot) ?? "" : "";
|
|
8071
8170
|
const name = pos.slot ? nameBySlot.get(pos.slot) : void 0;
|
|
8072
8171
|
const lineupEntry = pos.slot ? lineupBySlot.get(pos.slot) : void 0;
|
|
8073
8172
|
const flag = nationalityFlag(pos.nationality);
|
|
8074
8173
|
if (lineupEntry) {
|
|
8075
|
-
return /* @__PURE__ */ (0,
|
|
8076
|
-
/* @__PURE__ */ (0,
|
|
8174
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-g-gxi-node", "data-revealed": "true", children: [
|
|
8175
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8077
8176
|
PlayerAvatar,
|
|
8078
8177
|
{
|
|
8079
8178
|
name: lineupEntry.name,
|
|
@@ -8081,11 +8180,11 @@ function GuessTheXiGame({
|
|
|
8081
8180
|
className: "ss-g-gxi-disc ss-g-gxi-disc--photo"
|
|
8082
8181
|
}
|
|
8083
8182
|
),
|
|
8084
|
-
/* @__PURE__ */ (0,
|
|
8183
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "ss-g-gxi-pos ss-g-gxi-pos--name", children: splitName(lineupEntry.name).last })
|
|
8085
8184
|
] }, `${pos.slot}-${c}`);
|
|
8086
8185
|
}
|
|
8087
|
-
return /* @__PURE__ */ (0,
|
|
8088
|
-
/* @__PURE__ */ (0,
|
|
8186
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-g-gxi-node", "data-revealed": name ? "true" : void 0, children: [
|
|
8187
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8089
8188
|
"span",
|
|
8090
8189
|
{
|
|
8091
8190
|
className: "ss-g-gxi-disc",
|
|
@@ -8096,22 +8195,22 @@ function GuessTheXiGame({
|
|
|
8096
8195
|
children: flag
|
|
8097
8196
|
}
|
|
8098
8197
|
),
|
|
8099
|
-
name ? /* @__PURE__ */ (0,
|
|
8198
|
+
name ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "ss-g-gxi-pos ss-g-gxi-pos--name", children: splitName(name).last }) : posLabel && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "ss-g-gxi-pos", children: posLabel })
|
|
8100
8199
|
] }, `${pos.slot}-${c}`);
|
|
8101
8200
|
}) }, r)) })
|
|
8102
8201
|
] }),
|
|
8103
|
-
!isOver && wrongGuesses.length > 0 && /* @__PURE__ */ (0,
|
|
8104
|
-
/* @__PURE__ */ (0,
|
|
8202
|
+
!isOver && wrongGuesses.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-g-gxi-wrong", children: [
|
|
8203
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "ss-g-gxi-wrong-l", children: t.notThem }),
|
|
8105
8204
|
wrongGuesses.map((g) => {
|
|
8106
8205
|
const crestUrl = config?.teamPool.find((tm) => tm.teamId === g.teamId)?.crestUrl;
|
|
8107
|
-
return /* @__PURE__ */ (0,
|
|
8108
|
-
/* @__PURE__ */ (0,
|
|
8109
|
-
/* @__PURE__ */ (0,
|
|
8206
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("span", { className: "ss-g-gxi-wrong-chip", children: [
|
|
8207
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CrestShield, { src: crestUrl, name: teamName(g.teamId), size: 18 }),
|
|
8208
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("s", { children: teamName(g.teamId) })
|
|
8110
8209
|
] }, g.teamId);
|
|
8111
8210
|
})
|
|
8112
8211
|
] }),
|
|
8113
|
-
isOver && /* @__PURE__ */ (0,
|
|
8114
|
-
/* @__PURE__ */ (0,
|
|
8212
|
+
isOver && /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(import_jsx_runtime83.Fragment, { children: [
|
|
8213
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8115
8214
|
ResultCard,
|
|
8116
8215
|
{
|
|
8117
8216
|
tone: solved ? "win" : failed ? "lose" : "neutral",
|
|
@@ -8122,29 +8221,29 @@ function GuessTheXiGame({
|
|
|
8122
8221
|
ui
|
|
8123
8222
|
}
|
|
8124
8223
|
),
|
|
8125
|
-
(solved || failed) && clientState?.answer && /* @__PURE__ */ (0,
|
|
8126
|
-
/* @__PURE__ */ (0,
|
|
8127
|
-
/* @__PURE__ */ (0,
|
|
8128
|
-
/* @__PURE__ */ (0,
|
|
8224
|
+
(solved || failed) && clientState?.answer && /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-g-gxi-answer", "data-testid": "gxi-answer-reveal", children: [
|
|
8225
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "ss-g-gxi-answer-label", children: t.theAnswer }),
|
|
8226
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CrestShield, { src: clientState.answer.crestUrl, name: clientState.answer.teamName, size: 32 }),
|
|
8227
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "ss-g-gxi-answer-name", children: clientState.answer.teamName })
|
|
8129
8228
|
] })
|
|
8130
8229
|
] })
|
|
8131
8230
|
] }),
|
|
8132
|
-
!isOver && /* @__PURE__ */ (0,
|
|
8133
|
-
query.length > 0 && filtered.length > 0 && /* @__PURE__ */ (0,
|
|
8231
|
+
!isOver && /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(FooterBar, { children: [
|
|
8232
|
+
query.length > 0 && filtered.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8134
8233
|
OptionList,
|
|
8135
8234
|
{
|
|
8136
8235
|
label: t.optionsLabel,
|
|
8137
8236
|
options: filtered.map((tm) => ({
|
|
8138
8237
|
key: tm.teamId,
|
|
8139
|
-
content: /* @__PURE__ */ (0,
|
|
8140
|
-
/* @__PURE__ */ (0,
|
|
8141
|
-
/* @__PURE__ */ (0,
|
|
8238
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(import_jsx_runtime83.Fragment, { children: [
|
|
8239
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CrestShield, { src: tm.crestUrl, name: tm.teamName, size: 28 }),
|
|
8240
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { children: tm.teamName })
|
|
8142
8241
|
] })
|
|
8143
8242
|
})),
|
|
8144
8243
|
onPick: (k) => handlePick(Number(k))
|
|
8145
8244
|
}
|
|
8146
8245
|
),
|
|
8147
|
-
/* @__PURE__ */ (0,
|
|
8246
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8148
8247
|
SearchField,
|
|
8149
8248
|
{
|
|
8150
8249
|
id: inputId,
|
|
@@ -8162,7 +8261,7 @@ function GuessTheXiGame({
|
|
|
8162
8261
|
|
|
8163
8262
|
// src/components/games/DailyQuizGame.tsx
|
|
8164
8263
|
var import_react50 = require("react");
|
|
8165
|
-
var
|
|
8264
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
8166
8265
|
function parseClientState6(json) {
|
|
8167
8266
|
if (!json) return null;
|
|
8168
8267
|
try {
|
|
@@ -8183,13 +8282,13 @@ function OptionName({ text }) {
|
|
|
8183
8282
|
const tokens = base.split(/\s+/).filter(Boolean);
|
|
8184
8283
|
const isPlainName = tokens.length >= 1 && tokens.length <= 4 && tokens.every((t) => NAME_TOKEN.test(t));
|
|
8185
8284
|
if (!isPlainName || base === "") {
|
|
8186
|
-
return /* @__PURE__ */ (0,
|
|
8285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "ss-g-dq-opt-name", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "ss-g-dq-opt-full", children: text }) });
|
|
8187
8286
|
}
|
|
8188
8287
|
const { first, last } = splitName(base);
|
|
8189
|
-
return /* @__PURE__ */ (0,
|
|
8190
|
-
first && /* @__PURE__ */ (0,
|
|
8191
|
-
/* @__PURE__ */ (0,
|
|
8192
|
-
suffix && /* @__PURE__ */ (0,
|
|
8288
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("span", { className: "ss-g-dq-opt-name", children: [
|
|
8289
|
+
first && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "ss-g-dq-opt-first", children: first }),
|
|
8290
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "ss-g-dq-opt-last", children: last }),
|
|
8291
|
+
suffix && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "ss-g-dq-opt-suffix", children: suffix })
|
|
8193
8292
|
] });
|
|
8194
8293
|
}
|
|
8195
8294
|
function DailyQuizGame({
|
|
@@ -8208,9 +8307,9 @@ function DailyQuizGame({
|
|
|
8208
8307
|
const results = clientState?.results ?? [];
|
|
8209
8308
|
const isRevealed = results.length > 0 || result?.alreadyPlayed === true;
|
|
8210
8309
|
if (!config) {
|
|
8211
|
-
return /* @__PURE__ */ (0,
|
|
8212
|
-
/* @__PURE__ */ (0,
|
|
8213
|
-
/* @__PURE__ */ (0,
|
|
8310
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-screen", "data-game": "daily-quiz", "data-testid": "game-screen-daily-quiz", children: [
|
|
8311
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(GameHeader, { title, onBack, backLabel: ui.back }),
|
|
8312
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
8214
8313
|
] });
|
|
8215
8314
|
}
|
|
8216
8315
|
const questions = config.questions;
|
|
@@ -8245,11 +8344,11 @@ function DailyQuizGame({
|
|
|
8245
8344
|
return r.isCorrect ? "correct" : "wrong";
|
|
8246
8345
|
});
|
|
8247
8346
|
const correctCount = results.filter((r) => r.isCorrect).length;
|
|
8248
|
-
return /* @__PURE__ */ (0,
|
|
8249
|
-
/* @__PURE__ */ (0,
|
|
8250
|
-
/* @__PURE__ */ (0,
|
|
8251
|
-
/* @__PURE__ */ (0,
|
|
8252
|
-
/* @__PURE__ */ (0,
|
|
8347
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-screen", "data-game": "daily-quiz", "data-testid": "game-screen-daily-quiz", children: [
|
|
8348
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(GameHeader, { title, eyebrow: s.results, onBack, backLabel: ui.back }),
|
|
8349
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(SegmentProgress, { segments: segments2, ariaLabel: s.results }),
|
|
8350
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-body", children: [
|
|
8351
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
8253
8352
|
ResultCard,
|
|
8254
8353
|
{
|
|
8255
8354
|
tone: "neutral",
|
|
@@ -8262,15 +8361,15 @@ function DailyQuizGame({
|
|
|
8262
8361
|
questions.map((q) => {
|
|
8263
8362
|
const r = findResult(results, q.index);
|
|
8264
8363
|
const picked = selections.get(q.index);
|
|
8265
|
-
return /* @__PURE__ */ (0,
|
|
8266
|
-
/* @__PURE__ */ (0,
|
|
8267
|
-
r && /* @__PURE__ */ (0,
|
|
8364
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-dq-rq", children: [
|
|
8365
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "ss-g-dq-rq-stem", children: q.stem }),
|
|
8366
|
+
r && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "ss-g-dq-rq-opts", children: q.options.map((opt, optIdx) => {
|
|
8268
8367
|
let cls = "ss-g-dq-rq-opt";
|
|
8269
8368
|
if (optIdx === r.correctOptionIndex) cls += " ss-g-dq-rq-opt--correct";
|
|
8270
8369
|
else if (optIdx === picked && !r.isCorrect) cls += " ss-g-dq-rq-opt--wrong";
|
|
8271
|
-
return /* @__PURE__ */ (0,
|
|
8370
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: cls, children: opt }, optIdx);
|
|
8272
8371
|
}) }),
|
|
8273
|
-
r?.revealText && /* @__PURE__ */ (0,
|
|
8372
|
+
r?.revealText && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "ss-g-dq-why", children: r.revealText })
|
|
8274
8373
|
] }, q.index);
|
|
8275
8374
|
})
|
|
8276
8375
|
] })
|
|
@@ -8278,16 +8377,16 @@ function DailyQuizGame({
|
|
|
8278
8377
|
}
|
|
8279
8378
|
const segments = questions.map((_, i) => i < page ? "done" : i === page ? "current" : "todo");
|
|
8280
8379
|
const selectedIdx = current ? selections.get(current.index) : void 0;
|
|
8281
|
-
return /* @__PURE__ */ (0,
|
|
8282
|
-
/* @__PURE__ */ (0,
|
|
8283
|
-
/* @__PURE__ */ (0,
|
|
8284
|
-
/* @__PURE__ */ (0,
|
|
8285
|
-
/* @__PURE__ */ (0,
|
|
8286
|
-
/* @__PURE__ */ (0,
|
|
8380
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-screen", "data-game": "daily-quiz", "data-testid": "game-screen-daily-quiz", children: [
|
|
8381
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(GameHeader, { title, eyebrow: s.questionOf(page + 1, total), onBack, backLabel: ui.back }),
|
|
8382
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(SegmentProgress, { segments, ariaLabel: s.progressAria(page + 1, total) }),
|
|
8383
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "ss-g-body", children: current && /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_jsx_runtime84.Fragment, { children: [
|
|
8384
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("h3", { className: "ss-g-dq-stem", children: current.stem }),
|
|
8385
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "ss-g-dq-opts", children: current.options.map((opt, optIdx) => {
|
|
8287
8386
|
const selected = optIdx === selectedIdx;
|
|
8288
8387
|
const imagePath = current.optionImagePaths?.[optIdx] ?? void 0;
|
|
8289
8388
|
const playerName = opt;
|
|
8290
|
-
return /* @__PURE__ */ (0,
|
|
8389
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
8291
8390
|
"button",
|
|
8292
8391
|
{
|
|
8293
8392
|
type: "button",
|
|
@@ -8296,25 +8395,25 @@ function DailyQuizGame({
|
|
|
8296
8395
|
disabled: submitting,
|
|
8297
8396
|
onClick: () => handleSelect(current.index, optIdx),
|
|
8298
8397
|
children: [
|
|
8299
|
-
current.optionImagePaths && /* @__PURE__ */ (0,
|
|
8300
|
-
/* @__PURE__ */ (0,
|
|
8301
|
-
/* @__PURE__ */ (0,
|
|
8398
|
+
current.optionImagePaths && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(PlayerAvatar, { name: playerName, imagePath, className: "ss-g-dq-opt-av" }),
|
|
8399
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "ss-g-dq-badge", "aria-hidden": "true", children: selected ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(IconCheck, {}) : String.fromCharCode(65 + optIdx) }),
|
|
8400
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(OptionName, { text: opt })
|
|
8302
8401
|
]
|
|
8303
8402
|
},
|
|
8304
8403
|
optIdx
|
|
8305
8404
|
);
|
|
8306
8405
|
}) })
|
|
8307
8406
|
] }) }),
|
|
8308
|
-
/* @__PURE__ */ (0,
|
|
8309
|
-
page > 0 && /* @__PURE__ */ (0,
|
|
8310
|
-
isLast ? /* @__PURE__ */ (0,
|
|
8407
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-dq-nav", children: [
|
|
8408
|
+
page > 0 && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(GameButton, { variant: "outline", onClick: goPrev, disabled: submitting, children: s.previous }),
|
|
8409
|
+
isLast ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(GameButton, { variant: "primary", block: true, onClick: handleSubmit, disabled: !currentAnswered || !allAnswered || submitting, children: submitting ? s.submitting : s.submit }) : /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(GameButton, { variant: "primary", block: true, onClick: goNext, disabled: !currentAnswered || submitting, children: s.next })
|
|
8311
8410
|
] }) })
|
|
8312
8411
|
] });
|
|
8313
8412
|
}
|
|
8314
8413
|
|
|
8315
8414
|
// src/components/games/MatchdayPredictorGame.tsx
|
|
8316
8415
|
var import_react51 = require("react");
|
|
8317
|
-
var
|
|
8416
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
8318
8417
|
var SCORER_SEARCH_THRESHOLD = 9;
|
|
8319
8418
|
function parseClientState7(json) {
|
|
8320
8419
|
if (!json) return null;
|
|
@@ -8332,7 +8431,7 @@ function isLocked(kickoffUtc) {
|
|
|
8332
8431
|
}
|
|
8333
8432
|
}
|
|
8334
8433
|
function IconMinus() {
|
|
8335
|
-
return /* @__PURE__ */ (0,
|
|
8434
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
8336
8435
|
"svg",
|
|
8337
8436
|
{
|
|
8338
8437
|
width: 18,
|
|
@@ -8343,20 +8442,20 @@ function IconMinus() {
|
|
|
8343
8442
|
strokeWidth: 2.2,
|
|
8344
8443
|
strokeLinecap: "round",
|
|
8345
8444
|
"aria-hidden": "true",
|
|
8346
|
-
children: /* @__PURE__ */ (0,
|
|
8445
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("path", { d: "M5 12h14" })
|
|
8347
8446
|
}
|
|
8348
8447
|
);
|
|
8349
8448
|
}
|
|
8350
8449
|
function TeamBadge({ team, label }) {
|
|
8351
|
-
return /* @__PURE__ */ (0,
|
|
8352
|
-
/* @__PURE__ */ (0,
|
|
8353
|
-
/* @__PURE__ */ (0,
|
|
8354
|
-
/* @__PURE__ */ (0,
|
|
8450
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "ss-g-mp-team", children: [
|
|
8451
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(CrestShield, { name: team.name, size: 44 }),
|
|
8452
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "ss-g-mp-team-name", children: team.name }),
|
|
8453
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "ss-g-mp-team-side", children: label })
|
|
8355
8454
|
] });
|
|
8356
8455
|
}
|
|
8357
8456
|
function ScoreCard({ home, away, h, a, t, edit }) {
|
|
8358
|
-
const col = (side, team, value) => /* @__PURE__ */ (0,
|
|
8359
|
-
edit && /* @__PURE__ */ (0,
|
|
8457
|
+
const col = (side, team, value) => /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "ss-g-mp-col", children: [
|
|
8458
|
+
edit && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
8360
8459
|
"button",
|
|
8361
8460
|
{
|
|
8362
8461
|
type: "button",
|
|
@@ -8364,11 +8463,11 @@ function ScoreCard({ home, away, h, a, t, edit }) {
|
|
|
8364
8463
|
"aria-label": t.goalsUp(team.name),
|
|
8365
8464
|
disabled: edit.disabled,
|
|
8366
8465
|
onClick: () => edit.onStep(side, 1),
|
|
8367
|
-
children: /* @__PURE__ */ (0,
|
|
8466
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(IconPlus, { size: 18 })
|
|
8368
8467
|
}
|
|
8369
8468
|
),
|
|
8370
|
-
/* @__PURE__ */ (0,
|
|
8371
|
-
edit && /* @__PURE__ */ (0,
|
|
8469
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "ss-g-mp-digit", "data-testid": "mp-digit", "data-active": edit ? String(edit.active === side) : "false", children: value }),
|
|
8470
|
+
edit && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
8372
8471
|
"button",
|
|
8373
8472
|
{
|
|
8374
8473
|
type: "button",
|
|
@@ -8376,27 +8475,27 @@ function ScoreCard({ home, away, h, a, t, edit }) {
|
|
|
8376
8475
|
"aria-label": t.goalsDown(team.name),
|
|
8377
8476
|
disabled: edit.disabled || value <= 0,
|
|
8378
8477
|
onClick: () => edit.onStep(side, -1),
|
|
8379
|
-
children: /* @__PURE__ */ (0,
|
|
8478
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(IconMinus, {})
|
|
8380
8479
|
}
|
|
8381
8480
|
)
|
|
8382
8481
|
] });
|
|
8383
|
-
return /* @__PURE__ */ (0,
|
|
8384
|
-
/* @__PURE__ */ (0,
|
|
8385
|
-
/* @__PURE__ */ (0,
|
|
8482
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "ss-g-mp-card", children: [
|
|
8483
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(TeamBadge, { team: home, label: t.home }),
|
|
8484
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "ss-g-mp-scores", children: [
|
|
8386
8485
|
col("home", home, h),
|
|
8387
|
-
/* @__PURE__ */ (0,
|
|
8486
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "ss-g-mp-dash", "aria-hidden": "true", children: "\u2013" }),
|
|
8388
8487
|
col("away", away, a)
|
|
8389
8488
|
] }),
|
|
8390
|
-
/* @__PURE__ */ (0,
|
|
8489
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(TeamBadge, { team: away, label: t.away })
|
|
8391
8490
|
] });
|
|
8392
8491
|
}
|
|
8393
8492
|
function OutcomeRow({ label, ok, detail, t }) {
|
|
8394
|
-
return /* @__PURE__ */ (0,
|
|
8395
|
-
/* @__PURE__ */ (0,
|
|
8396
|
-
/* @__PURE__ */ (0,
|
|
8397
|
-
ok ? /* @__PURE__ */ (0,
|
|
8398
|
-
/* @__PURE__ */ (0,
|
|
8399
|
-
detail ? /* @__PURE__ */ (0,
|
|
8493
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("li", { className: "ss-g-mp-row", "data-testid": "mp-row", "data-ok": String(ok), children: [
|
|
8494
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "ss-g-mp-row-k", children: label }),
|
|
8495
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("span", { className: "ss-g-mp-row-v", children: [
|
|
8496
|
+
ok ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(IconCheck, {}) : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(IconClose, { size: 14 }),
|
|
8497
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "ss-g-sr", children: ok ? t.correct : t.incorrect }),
|
|
8498
|
+
detail ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "ss-g-mp-row-d", children: detail }) : null
|
|
8400
8499
|
] })
|
|
8401
8500
|
] });
|
|
8402
8501
|
}
|
|
@@ -8417,12 +8516,12 @@ function MatchdayPredictorGame({
|
|
|
8417
8516
|
const searchId = (0, import_react51.useId)();
|
|
8418
8517
|
const clientState = parseClientState7(result?.clientStateJson);
|
|
8419
8518
|
const alreadyPlayed = result?.alreadyPlayed === true;
|
|
8420
|
-
const header = /* @__PURE__ */ (0,
|
|
8519
|
+
const header = /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
8421
8520
|
GameHeader,
|
|
8422
8521
|
{
|
|
8423
8522
|
title: gameTitle({ gameId: "matchday-predictor" }, ui.games.titles),
|
|
8424
8523
|
eyebrow: config ? t.eyebrow(config.homeTeam.name, config.awayTeam.name) : void 0,
|
|
8425
|
-
right: config ? /* @__PURE__ */ (0,
|
|
8524
|
+
right: config ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Chip, { icon: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(IconLock, {}), children: ui.games.formatDayTime(config.kickoffUtc) }) : void 0,
|
|
8426
8525
|
onBack,
|
|
8427
8526
|
backLabel: ui.back
|
|
8428
8527
|
}
|
|
@@ -8430,10 +8529,10 @@ function MatchdayPredictorGame({
|
|
|
8430
8529
|
if (alreadyPlayed && clientState) {
|
|
8431
8530
|
if (!clientState.graded) {
|
|
8432
8531
|
const scorer = config?.scorerPool.find((p) => p.playerId === clientState.predictedFirstScorerPlayerId) ?? null;
|
|
8433
|
-
return /* @__PURE__ */ (0,
|
|
8532
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
|
|
8434
8533
|
header,
|
|
8435
|
-
/* @__PURE__ */ (0,
|
|
8436
|
-
config && /* @__PURE__ */ (0,
|
|
8534
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "ss-g-body", children: [
|
|
8535
|
+
config && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
8437
8536
|
ScoreCard,
|
|
8438
8537
|
{
|
|
8439
8538
|
home: config.homeTeam,
|
|
@@ -8443,7 +8542,7 @@ function MatchdayPredictorGame({
|
|
|
8443
8542
|
t
|
|
8444
8543
|
}
|
|
8445
8544
|
),
|
|
8446
|
-
/* @__PURE__ */ (0,
|
|
8545
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
8447
8546
|
ResultCard,
|
|
8448
8547
|
{
|
|
8449
8548
|
tone: "neutral",
|
|
@@ -8460,28 +8559,28 @@ function MatchdayPredictorGame({
|
|
|
8460
8559
|
}
|
|
8461
8560
|
)
|
|
8462
8561
|
] }),
|
|
8463
|
-
/* @__PURE__ */ (0,
|
|
8562
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("p", { className: "ss-g-mp-fun", children: t.forFun }) })
|
|
8464
8563
|
] });
|
|
8465
8564
|
}
|
|
8466
8565
|
const r = clientState.result;
|
|
8467
|
-
return /* @__PURE__ */ (0,
|
|
8566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
|
|
8468
8567
|
header,
|
|
8469
|
-
/* @__PURE__ */ (0,
|
|
8470
|
-
config && /* @__PURE__ */ (0,
|
|
8471
|
-
/* @__PURE__ */ (0,
|
|
8472
|
-
/* @__PURE__ */ (0,
|
|
8473
|
-
/* @__PURE__ */ (0,
|
|
8474
|
-
/* @__PURE__ */ (0,
|
|
8475
|
-
!clientState.firstScorerVoid && /* @__PURE__ */ (0,
|
|
8568
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "ss-g-body", children: [
|
|
8569
|
+
config && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ScoreCard, { home: config.homeTeam, away: config.awayTeam, h: r.homeScore, a: r.awayScore, t }),
|
|
8570
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ResultCard, { tone: "neutral", title: t.fullTime(r.homeScore, r.awayScore), onBack, ui }),
|
|
8571
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("ul", { className: "ss-g-mp-rows", children: [
|
|
8572
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(OutcomeRow, { label: t.exactScore, ok: clientState.exactScoreCorrect, t }),
|
|
8573
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(OutcomeRow, { label: t.outcome, ok: clientState.outcomeCorrect, t }),
|
|
8574
|
+
!clientState.firstScorerVoid && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(OutcomeRow, { label: t.firstScorerRow, ok: clientState.firstScorerCorrect, detail: r.firstScorerName, t })
|
|
8476
8575
|
] })
|
|
8477
8576
|
] }),
|
|
8478
|
-
/* @__PURE__ */ (0,
|
|
8577
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("p", { className: "ss-g-mp-fun", children: t.forFun }) })
|
|
8479
8578
|
] });
|
|
8480
8579
|
}
|
|
8481
8580
|
if (!config) {
|
|
8482
|
-
return /* @__PURE__ */ (0,
|
|
8581
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
|
|
8483
8582
|
header,
|
|
8484
|
-
/* @__PURE__ */ (0,
|
|
8583
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
8485
8584
|
] });
|
|
8486
8585
|
}
|
|
8487
8586
|
const locked = isLocked(config.kickoffUtc);
|
|
@@ -8505,10 +8604,10 @@ function MatchdayPredictorGame({
|
|
|
8505
8604
|
const showSearch = pool.length > SCORER_SEARCH_THRESHOLD;
|
|
8506
8605
|
const q = query.trim().toLowerCase();
|
|
8507
8606
|
const visible = showSearch && q ? pool.filter((p) => p.playerName.toLowerCase().includes(q)) : pool;
|
|
8508
|
-
return /* @__PURE__ */ (0,
|
|
8607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
|
|
8509
8608
|
header,
|
|
8510
|
-
/* @__PURE__ */ (0,
|
|
8511
|
-
/* @__PURE__ */ (0,
|
|
8609
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "ss-g-body", children: [
|
|
8610
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
8512
8611
|
ScoreCard,
|
|
8513
8612
|
{
|
|
8514
8613
|
home: config.homeTeam,
|
|
@@ -8519,12 +8618,12 @@ function MatchdayPredictorGame({
|
|
|
8519
8618
|
edit: { disabled, active: lastEdited, onStep: step }
|
|
8520
8619
|
}
|
|
8521
8620
|
),
|
|
8522
|
-
pool.length > 0 && /* @__PURE__ */ (0,
|
|
8523
|
-
/* @__PURE__ */ (0,
|
|
8524
|
-
/* @__PURE__ */ (0,
|
|
8525
|
-
/* @__PURE__ */ (0,
|
|
8621
|
+
pool.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("section", { className: "ss-g-mp-scorer", children: [
|
|
8622
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "ss-g-mp-sec-head", children: [
|
|
8623
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("h3", { children: t.firstScorer }),
|
|
8624
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { children: t.optional })
|
|
8526
8625
|
] }),
|
|
8527
|
-
showSearch && /* @__PURE__ */ (0,
|
|
8626
|
+
showSearch && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
8528
8627
|
SearchField,
|
|
8529
8628
|
{
|
|
8530
8629
|
id: searchId,
|
|
@@ -8536,9 +8635,9 @@ function MatchdayPredictorGame({
|
|
|
8536
8635
|
disabled
|
|
8537
8636
|
}
|
|
8538
8637
|
),
|
|
8539
|
-
/* @__PURE__ */ (0,
|
|
8638
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "ss-g-mp-grid", children: visible.map((p) => {
|
|
8540
8639
|
const selected = firstScorerPlayerId === p.playerId;
|
|
8541
|
-
return /* @__PURE__ */ (0,
|
|
8640
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
8542
8641
|
"button",
|
|
8543
8642
|
{
|
|
8544
8643
|
type: "button",
|
|
@@ -8548,15 +8647,15 @@ function MatchdayPredictorGame({
|
|
|
8548
8647
|
disabled,
|
|
8549
8648
|
onClick: () => setFirstScorerPlayerId((id) => id === p.playerId ? null : p.playerId),
|
|
8550
8649
|
children: [
|
|
8551
|
-
selected && /* @__PURE__ */ (0,
|
|
8552
|
-
/* @__PURE__ */ (0,
|
|
8553
|
-
/* @__PURE__ */ (0,
|
|
8650
|
+
selected && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "ss-g-mp-pcheck", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(IconCheck, { size: 12 }) }),
|
|
8651
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Silhouette, { size: 52, variant: selected ? "selected" : "default" }),
|
|
8652
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "ss-g-mp-pname", children: splitName(p.playerName).last })
|
|
8554
8653
|
]
|
|
8555
8654
|
},
|
|
8556
8655
|
p.playerId
|
|
8557
8656
|
);
|
|
8558
8657
|
}) }),
|
|
8559
|
-
/* @__PURE__ */ (0,
|
|
8658
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
8560
8659
|
"button",
|
|
8561
8660
|
{
|
|
8562
8661
|
type: "button",
|
|
@@ -8565,24 +8664,24 @@ function MatchdayPredictorGame({
|
|
|
8565
8664
|
disabled,
|
|
8566
8665
|
onClick: () => setFirstScorerPlayerId(null),
|
|
8567
8666
|
children: [
|
|
8568
|
-
/* @__PURE__ */ (0,
|
|
8667
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "ss-g-mp-radio", "aria-hidden": "true" }),
|
|
8569
8668
|
t.noScorer
|
|
8570
8669
|
]
|
|
8571
8670
|
}
|
|
8572
8671
|
)
|
|
8573
8672
|
] }),
|
|
8574
|
-
locked && /* @__PURE__ */ (0,
|
|
8673
|
+
locked && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("p", { className: "ss-g-mp-closed", children: t.closed })
|
|
8575
8674
|
] }),
|
|
8576
|
-
/* @__PURE__ */ (0,
|
|
8577
|
-
/* @__PURE__ */ (0,
|
|
8578
|
-
/* @__PURE__ */ (0,
|
|
8675
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(FooterBar, { children: [
|
|
8676
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(GameButton, { variant: "primary", block: true, disabled, onClick: handleSubmit, children: submitting ? t.saving : t.save }),
|
|
8677
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("p", { className: "ss-g-mp-fun", children: t.forFun })
|
|
8579
8678
|
] })
|
|
8580
8679
|
] });
|
|
8581
8680
|
}
|
|
8582
8681
|
|
|
8583
8682
|
// src/components/games/StartingXiGame.tsx
|
|
8584
8683
|
var import_react52 = require("react");
|
|
8585
|
-
var
|
|
8684
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
8586
8685
|
var POINTS_PER_STARTER = 8;
|
|
8587
8686
|
var XI_SIZE = 11;
|
|
8588
8687
|
var DEFAULT_FORMATION = "4-3-3";
|
|
@@ -8631,20 +8730,20 @@ function StartingXiGame({
|
|
|
8631
8730
|
const searchId = (0, import_react52.useId)();
|
|
8632
8731
|
const clientState = parseClientState8(result?.clientStateJson);
|
|
8633
8732
|
const alreadyPlayed = result?.alreadyPlayed === true;
|
|
8634
|
-
const header = /* @__PURE__ */ (0,
|
|
8733
|
+
const header = /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
8635
8734
|
GameHeader,
|
|
8636
8735
|
{
|
|
8637
8736
|
title: gameTitle({ gameId: "starting-xi" }, ui.games.titles),
|
|
8638
8737
|
eyebrow: t.eyebrow,
|
|
8639
|
-
right: /* @__PURE__ */ (0,
|
|
8738
|
+
right: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Chip, { variant: "accent", children: t.perStarter(POINTS_PER_STARTER) }),
|
|
8640
8739
|
onBack,
|
|
8641
8740
|
backLabel: ui.back
|
|
8642
8741
|
}
|
|
8643
8742
|
);
|
|
8644
8743
|
function statusScreen(title, score) {
|
|
8645
|
-
return /* @__PURE__ */ (0,
|
|
8744
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "ss-g-screen", "data-game": "starting-xi", "data-testid": "game-screen-starting-xi", children: [
|
|
8646
8745
|
header,
|
|
8647
|
-
/* @__PURE__ */ (0,
|
|
8746
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "ss-g-body", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ResultCard, { tone: "neutral", title, score, onBack, ui }) })
|
|
8648
8747
|
] });
|
|
8649
8748
|
}
|
|
8650
8749
|
if (alreadyPlayed) {
|
|
@@ -8653,9 +8752,9 @@ function StartingXiGame({
|
|
|
8653
8752
|
if (clientState.status === "graded") return statusScreen(t.gradedLine(clientState.correctCount), clientState.score);
|
|
8654
8753
|
}
|
|
8655
8754
|
if (!config) {
|
|
8656
|
-
return /* @__PURE__ */ (0,
|
|
8755
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "ss-g-screen", "data-game": "starting-xi", "data-testid": "game-screen-starting-xi", children: [
|
|
8657
8756
|
header,
|
|
8658
|
-
/* @__PURE__ */ (0,
|
|
8757
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
8659
8758
|
] });
|
|
8660
8759
|
}
|
|
8661
8760
|
const { formation, slots } = formationSlots(config.formation);
|
|
@@ -8690,27 +8789,27 @@ function StartingXiGame({
|
|
|
8690
8789
|
onSubmit(JSON.stringify({ predictedPlayerIds: slotPlayers }));
|
|
8691
8790
|
}
|
|
8692
8791
|
const segments = slotPlayers.map((p) => p !== null ? "current" : "todo");
|
|
8693
|
-
return /* @__PURE__ */ (0,
|
|
8792
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "ss-g-screen", "data-game": "starting-xi", "data-testid": "game-screen-starting-xi", children: [
|
|
8694
8793
|
header,
|
|
8695
|
-
/* @__PURE__ */ (0,
|
|
8794
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
8696
8795
|
SegmentProgress,
|
|
8697
8796
|
{
|
|
8698
8797
|
segments,
|
|
8699
8798
|
ariaLabel: t.picked(pickedCount),
|
|
8700
8799
|
leftLabel: t.picked(pickedCount),
|
|
8701
8800
|
rightLabel: t.toGo(XI_SIZE - pickedCount),
|
|
8702
|
-
right: /* @__PURE__ */ (0,
|
|
8801
|
+
right: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Chip, { children: formation })
|
|
8703
8802
|
}
|
|
8704
8803
|
),
|
|
8705
|
-
/* @__PURE__ */ (0,
|
|
8706
|
-
/* @__PURE__ */ (0,
|
|
8707
|
-
/* @__PURE__ */ (0,
|
|
8804
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "ss-g-body", children: [
|
|
8805
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "ss-g-xi-pitch", children: [
|
|
8806
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(PitchSvg, { variant: "half" }),
|
|
8708
8807
|
slots.map((s) => {
|
|
8709
8808
|
const playerId = slotPlayers[s.index] ?? null;
|
|
8710
8809
|
const player = playerId !== null ? byId.get(playerId) ?? null : null;
|
|
8711
8810
|
const name = player?.playerName ?? "";
|
|
8712
8811
|
const state = player ? "filled" : active === s.index ? "active" : "empty";
|
|
8713
|
-
return /* @__PURE__ */ (0,
|
|
8812
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
8714
8813
|
"button",
|
|
8715
8814
|
{
|
|
8716
8815
|
type: "button",
|
|
@@ -8722,21 +8821,21 @@ function StartingXiGame({
|
|
|
8722
8821
|
disabled: submitting,
|
|
8723
8822
|
onClick: () => tapSlot(s.index),
|
|
8724
8823
|
children: [
|
|
8725
|
-
/* @__PURE__ */ (0,
|
|
8726
|
-
/* @__PURE__ */ (0,
|
|
8824
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "ss-g-xi-ring", "aria-hidden": "true", children: player ? player.jerseyNumber ?? "" : /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(IconPlus, { size: 18 }) }),
|
|
8825
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "ss-g-xi-tag", "aria-hidden": "true", children: player ? splitName(name).last : s.label })
|
|
8727
8826
|
]
|
|
8728
8827
|
},
|
|
8729
8828
|
s.index
|
|
8730
8829
|
);
|
|
8731
8830
|
})
|
|
8732
8831
|
] }),
|
|
8733
|
-
/* @__PURE__ */ (0,
|
|
8734
|
-
/* @__PURE__ */ (0,
|
|
8735
|
-
/* @__PURE__ */ (0,
|
|
8736
|
-
/* @__PURE__ */ (0,
|
|
8737
|
-
] }) : /* @__PURE__ */ (0,
|
|
8738
|
-
activeSlot && /* @__PURE__ */ (0,
|
|
8739
|
-
/* @__PURE__ */ (0,
|
|
8832
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "ss-g-xi-picker", children: [
|
|
8833
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "ss-g-xi-picker-head", children: activeSlot ? /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_jsx_runtime86.Fragment, { children: [
|
|
8834
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Chip, { variant: "badge", children: activeSlot.label }),
|
|
8835
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("strong", { children: t.pickFor(activeSlot.label) })
|
|
8836
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("strong", { children: t.allPicked }) }),
|
|
8837
|
+
activeSlot && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_jsx_runtime86.Fragment, { children: [
|
|
8838
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
8740
8839
|
SearchField,
|
|
8741
8840
|
{
|
|
8742
8841
|
id: searchId,
|
|
@@ -8748,18 +8847,18 @@ function StartingXiGame({
|
|
|
8748
8847
|
disabled: submitting
|
|
8749
8848
|
}
|
|
8750
8849
|
),
|
|
8751
|
-
/* @__PURE__ */ (0,
|
|
8752
|
-
/* @__PURE__ */ (0,
|
|
8753
|
-
/* @__PURE__ */ (0,
|
|
8754
|
-
/* @__PURE__ */ (0,
|
|
8850
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("ul", { className: "ss-g-xi-list", children: available.map((p) => /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("button", { type: "button", className: "ss-g-xi-opt", disabled: submitting, onClick: () => pick(p.playerId), children: [
|
|
8851
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "ss-g-xi-opt-no", "aria-hidden": "true", children: p.jerseyNumber ?? "" }),
|
|
8852
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "ss-g-xi-opt-name", children: p.playerName }),
|
|
8853
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "ss-g-xi-opt-pos", children: p.positionName })
|
|
8755
8854
|
] }) }, p.playerId)) })
|
|
8756
8855
|
] })
|
|
8757
8856
|
] })
|
|
8758
8857
|
] }),
|
|
8759
|
-
/* @__PURE__ */ (0,
|
|
8760
|
-
/* @__PURE__ */ (0,
|
|
8761
|
-
/* @__PURE__ */ (0,
|
|
8762
|
-
/* @__PURE__ */ (0,
|
|
8858
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(FooterBar, { children: [
|
|
8859
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(GameButton, { variant: "primary", block: true, disabled: !canSubmit, onClick: handleSubmit, children: submitting ? t.submitting : t.submit }),
|
|
8860
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("p", { className: "ss-g-xi-lock", children: [
|
|
8861
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(IconLock, {}),
|
|
8763
8862
|
lockAtUtc ? t.locksAt(ui.games.formatDayTime(lockAtUtc)) : t.locksSoon
|
|
8764
8863
|
] })
|
|
8765
8864
|
] })
|
|
@@ -8768,7 +8867,7 @@ function StartingXiGame({
|
|
|
8768
8867
|
|
|
8769
8868
|
// src/components/games/StatLadderGame.tsx
|
|
8770
8869
|
var import_react53 = require("react");
|
|
8771
|
-
var
|
|
8870
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
8772
8871
|
function ladderClue(ladder) {
|
|
8773
8872
|
const mystery = ladder.find((r) => r.rank === 2);
|
|
8774
8873
|
if (!mystery) return null;
|
|
@@ -8790,9 +8889,9 @@ function parseClientState9(json) {
|
|
|
8790
8889
|
}
|
|
8791
8890
|
function NameStack({ name }) {
|
|
8792
8891
|
const { first, last } = splitName(name);
|
|
8793
|
-
return /* @__PURE__ */ (0,
|
|
8794
|
-
first && /* @__PURE__ */ (0,
|
|
8795
|
-
/* @__PURE__ */ (0,
|
|
8892
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("span", { className: "ss-g-sl-name", children: [
|
|
8893
|
+
first && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("small", { children: `${first[0]}.` }),
|
|
8894
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("b", { children: last })
|
|
8796
8895
|
] });
|
|
8797
8896
|
}
|
|
8798
8897
|
function StatLadderGame({
|
|
@@ -8809,11 +8908,11 @@ function StatLadderGame({
|
|
|
8809
8908
|
const searchId = (0, import_react53.useId)();
|
|
8810
8909
|
const clientState = parseClientState9(result?.clientStateJson);
|
|
8811
8910
|
const revealed = clientState != null;
|
|
8812
|
-
const header = /* @__PURE__ */ (0,
|
|
8911
|
+
const header = /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(GameHeader, { title: gameTitle({ gameId: "stat-ladder" }, ui.games.titles), eyebrow: t.eyebrow, onBack, backLabel: ui.back });
|
|
8813
8912
|
if (!config) {
|
|
8814
|
-
return /* @__PURE__ */ (0,
|
|
8913
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "ss-g-screen", "data-game": "stat-ladder", "data-testid": "game-screen-stat-ladder", children: [
|
|
8815
8914
|
header,
|
|
8816
|
-
/* @__PURE__ */ (0,
|
|
8915
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
8817
8916
|
] });
|
|
8818
8917
|
}
|
|
8819
8918
|
const question = t.question(config.statLabel);
|
|
@@ -8825,45 +8924,45 @@ function StatLadderGame({
|
|
|
8825
8924
|
if (selectedId === null || submitting || revealed) return;
|
|
8826
8925
|
onSubmit(JSON.stringify({ guessedPlayerId: selectedId }));
|
|
8827
8926
|
}
|
|
8828
|
-
return /* @__PURE__ */ (0,
|
|
8927
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "ss-g-screen", "data-game": "stat-ladder", "data-testid": "game-screen-stat-ladder", children: [
|
|
8829
8928
|
header,
|
|
8830
|
-
/* @__PURE__ */ (0,
|
|
8831
|
-
!revealed && /* @__PURE__ */ (0,
|
|
8832
|
-
/* @__PURE__ */ (0,
|
|
8833
|
-
/* @__PURE__ */ (0,
|
|
8834
|
-
/* @__PURE__ */ (0,
|
|
8929
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "ss-g-body", children: [
|
|
8930
|
+
!revealed && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed: 0, ui }),
|
|
8931
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "ss-g-sl-prompt", children: [
|
|
8932
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Chip, { variant: "accent", icon: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(IconShield, { size: 14 }), className: "ss-g-sl-stat", children: config.statLabel }),
|
|
8933
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("h3", { className: "ss-g-sl-q", children: [
|
|
8835
8934
|
question.pre,
|
|
8836
|
-
/* @__PURE__ */ (0,
|
|
8935
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("em", { children: question.emph }),
|
|
8837
8936
|
question.post
|
|
8838
8937
|
] })
|
|
8839
8938
|
] }),
|
|
8840
|
-
/* @__PURE__ */ (0,
|
|
8841
|
-
(rung) => rung.rank === 2 ? /* @__PURE__ */ (0,
|
|
8939
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("ol", { className: "ss-g-sl-rungs", children: rungs.map(
|
|
8940
|
+
(rung) => rung.rank === 2 ? /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
8842
8941
|
"li",
|
|
8843
8942
|
{
|
|
8844
8943
|
className: "ss-g-sl-rung ss-g-sl-rung--mystery",
|
|
8845
8944
|
"data-testid": "sl-mystery-rung",
|
|
8846
8945
|
"data-result": revealed ? clientState.isCorrect ? "correct" : "wrong" : void 0,
|
|
8847
8946
|
children: [
|
|
8848
|
-
/* @__PURE__ */ (0,
|
|
8849
|
-
revealed ? /* @__PURE__ */ (0,
|
|
8850
|
-
revealed ? /* @__PURE__ */ (0,
|
|
8851
|
-
/* @__PURE__ */ (0,
|
|
8947
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "ss-g-sl-rank", children: "2" }),
|
|
8948
|
+
revealed ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(PlayerAvatar, { name: clientState.revealedRank2.playerName, className: "ss-g-sl-av" }) : /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Silhouette, { size: 52, variant: "mystery" }),
|
|
8949
|
+
revealed ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(NameStack, { name: clientState.revealedRank2.playerName }) : /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "ss-g-sl-who", children: t.whoSecond }),
|
|
8950
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "ss-g-sl-val ss-g-sl-val--mystery", children: rung.statValue })
|
|
8852
8951
|
]
|
|
8853
8952
|
},
|
|
8854
8953
|
rung.rank
|
|
8855
|
-
) : /* @__PURE__ */ (0,
|
|
8856
|
-
/* @__PURE__ */ (0,
|
|
8857
|
-
/* @__PURE__ */ (0,
|
|
8858
|
-
/* @__PURE__ */ (0,
|
|
8859
|
-
/* @__PURE__ */ (0,
|
|
8954
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("li", { className: "ss-g-sl-rung", children: [
|
|
8955
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "ss-g-sl-rank", children: rung.rank }),
|
|
8956
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(PlayerAvatar, { name: rung.playerName ?? "?", className: "ss-g-sl-av" }),
|
|
8957
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(NameStack, { name: rung.playerName ?? "?" }),
|
|
8958
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "ss-g-sl-val", children: rung.statValue })
|
|
8860
8959
|
] }, rung.rank)
|
|
8861
8960
|
) }),
|
|
8862
|
-
clue && /* @__PURE__ */ (0,
|
|
8863
|
-
/* @__PURE__ */ (0,
|
|
8864
|
-
/* @__PURE__ */ (0,
|
|
8961
|
+
clue && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("p", { className: "ss-g-sl-clue", children: [
|
|
8962
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(IconBulb, {}),
|
|
8963
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { children: t.clue(clue, config.statLabel) })
|
|
8865
8964
|
] }),
|
|
8866
|
-
!revealed && /* @__PURE__ */ (0,
|
|
8965
|
+
!revealed && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("ul", { className: "ss-g-sl-pool", children: pool.map((p) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
8867
8966
|
"button",
|
|
8868
8967
|
{
|
|
8869
8968
|
type: "button",
|
|
@@ -8876,13 +8975,13 @@ function StatLadderGame({
|
|
|
8876
8975
|
setQuery(p.playerName);
|
|
8877
8976
|
},
|
|
8878
8977
|
children: [
|
|
8879
|
-
/* @__PURE__ */ (0,
|
|
8880
|
-
/* @__PURE__ */ (0,
|
|
8881
|
-
selectedId === p.playerId && /* @__PURE__ */ (0,
|
|
8978
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(PlayerAvatar, { name: p.playerName, className: "ss-g-sl-opt-av" }),
|
|
8979
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "ss-g-sl-opt-name", children: p.playerName }),
|
|
8980
|
+
selectedId === p.playerId && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(IconCheck, {})
|
|
8882
8981
|
]
|
|
8883
8982
|
}
|
|
8884
8983
|
) }, p.playerId)) }),
|
|
8885
|
-
revealed && /* @__PURE__ */ (0,
|
|
8984
|
+
revealed && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
8886
8985
|
ResultCard,
|
|
8887
8986
|
{
|
|
8888
8987
|
tone: clientState.isCorrect ? "win" : "lose",
|
|
@@ -8893,8 +8992,8 @@ function StatLadderGame({
|
|
|
8893
8992
|
}
|
|
8894
8993
|
)
|
|
8895
8994
|
] }),
|
|
8896
|
-
!revealed && /* @__PURE__ */ (0,
|
|
8897
|
-
/* @__PURE__ */ (0,
|
|
8995
|
+
!revealed && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "ss-g-sl-guess", children: [
|
|
8996
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
8898
8997
|
SearchField,
|
|
8899
8998
|
{
|
|
8900
8999
|
id: searchId,
|
|
@@ -8909,13 +9008,13 @@ function StatLadderGame({
|
|
|
8909
9008
|
disabled: submitting
|
|
8910
9009
|
}
|
|
8911
9010
|
),
|
|
8912
|
-
/* @__PURE__ */ (0,
|
|
9011
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(GameButton, { variant: "primary", disabled: selectedId === null || submitting, onClick: guess, children: t.guess })
|
|
8913
9012
|
] }) })
|
|
8914
9013
|
] });
|
|
8915
9014
|
}
|
|
8916
9015
|
|
|
8917
9016
|
// src/components/games/FanMotmGame.tsx
|
|
8918
|
-
var
|
|
9017
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
8919
9018
|
function parseClientState10(json) {
|
|
8920
9019
|
if (!json) return null;
|
|
8921
9020
|
try {
|
|
@@ -8936,20 +9035,20 @@ function FanMotmGame({
|
|
|
8936
9035
|
const clientState = parseClientState10(result?.clientStateJson);
|
|
8937
9036
|
const alreadyVoted = result?.alreadyPlayed === true;
|
|
8938
9037
|
const pickedId = clientState?.pickedPlayerId ?? null;
|
|
8939
|
-
const header = /* @__PURE__ */ (0,
|
|
9038
|
+
const header = /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
8940
9039
|
GameHeader,
|
|
8941
9040
|
{
|
|
8942
9041
|
title: t.title,
|
|
8943
9042
|
eyebrow: t.eyebrow,
|
|
8944
|
-
right: alreadyVoted ? /* @__PURE__ */ (0,
|
|
9043
|
+
right: alreadyVoted ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Chip, { variant: "success", icon: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(IconCheck, {}), children: t.voted }) : void 0,
|
|
8945
9044
|
onBack,
|
|
8946
9045
|
backLabel: ui.back
|
|
8947
9046
|
}
|
|
8948
9047
|
);
|
|
8949
9048
|
if (!config) {
|
|
8950
|
-
return /* @__PURE__ */ (0,
|
|
9049
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "ss-g-screen", "data-game": "fan-motm", "data-testid": "game-screen-fan-motm", children: [
|
|
8951
9050
|
header,
|
|
8952
|
-
/* @__PURE__ */ (0,
|
|
9051
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
8953
9052
|
] });
|
|
8954
9053
|
}
|
|
8955
9054
|
const picked = config.candidates.find((c) => c.playerId === pickedId) ?? null;
|
|
@@ -8957,12 +9056,12 @@ function FanMotmGame({
|
|
|
8957
9056
|
if (alreadyVoted || submitting) return;
|
|
8958
9057
|
onSubmit(JSON.stringify({ pickedPlayerId: candidateId }));
|
|
8959
9058
|
}
|
|
8960
|
-
return /* @__PURE__ */ (0,
|
|
9059
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "ss-g-screen", "data-game": "fan-motm", "data-testid": "game-screen-fan-motm", children: [
|
|
8961
9060
|
header,
|
|
8962
|
-
/* @__PURE__ */ (0,
|
|
8963
|
-
/* @__PURE__ */ (0,
|
|
9061
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "ss-g-body", children: [
|
|
9062
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("ul", { className: "ss-g-motm-list", children: config.candidates.map((c) => {
|
|
8964
9063
|
const isVoted = alreadyVoted && pickedId === c.playerId;
|
|
8965
|
-
return /* @__PURE__ */ (0,
|
|
9064
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
|
|
8966
9065
|
"button",
|
|
8967
9066
|
{
|
|
8968
9067
|
type: "button",
|
|
@@ -8971,24 +9070,24 @@ function FanMotmGame({
|
|
|
8971
9070
|
disabled: alreadyVoted || submitting,
|
|
8972
9071
|
onClick: () => handleVote(c.playerId),
|
|
8973
9072
|
children: [
|
|
8974
|
-
/* @__PURE__ */ (0,
|
|
8975
|
-
/* @__PURE__ */ (0,
|
|
8976
|
-
isVoted && /* @__PURE__ */ (0,
|
|
9073
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(PlayerAvatar, { name: c.playerName, className: "ss-g-motm-av" }),
|
|
9074
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { className: "ss-g-motm-name", children: c.playerName }),
|
|
9075
|
+
isVoted && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Chip, { variant: "accent", className: "ss-g-motm-pill", children: t.yourVote })
|
|
8977
9076
|
]
|
|
8978
9077
|
}
|
|
8979
9078
|
) }, c.playerId);
|
|
8980
9079
|
}) }),
|
|
8981
|
-
alreadyVoted && picked && /* @__PURE__ */ (0,
|
|
9080
|
+
alreadyVoted && picked && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(ResultCard, { tone: "neutral", title: t.youVoted(picked.playerName), detail: t.thanks, onBack, ui })
|
|
8982
9081
|
] }),
|
|
8983
|
-
/* @__PURE__ */ (0,
|
|
8984
|
-
!alreadyVoted && /* @__PURE__ */ (0,
|
|
8985
|
-
/* @__PURE__ */ (0,
|
|
9082
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(FooterBar, { children: [
|
|
9083
|
+
!alreadyVoted && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("p", { className: "ss-g-motm-foot", children: t.tapToVote }),
|
|
9084
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("p", { className: "ss-g-motm-fun", children: t.forFun })
|
|
8986
9085
|
] })
|
|
8987
9086
|
] });
|
|
8988
9087
|
}
|
|
8989
9088
|
|
|
8990
9089
|
// src/components/GameScreenHost.tsx
|
|
8991
|
-
var
|
|
9090
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
8992
9091
|
var FIXTURE_GAME_IDS = /* @__PURE__ */ new Set([
|
|
8993
9092
|
"matchday-predictor",
|
|
8994
9093
|
"starting-xi",
|
|
@@ -9064,7 +9163,7 @@ function GameScreenHost({
|
|
|
9064
9163
|
function renderScreen() {
|
|
9065
9164
|
switch (gameId) {
|
|
9066
9165
|
case "mystery-tiger":
|
|
9067
|
-
return /* @__PURE__ */ (0,
|
|
9166
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
9068
9167
|
MysteryTigerGame,
|
|
9069
9168
|
{
|
|
9070
9169
|
...sharedProps,
|
|
@@ -9072,7 +9171,7 @@ function GameScreenHost({
|
|
|
9072
9171
|
}
|
|
9073
9172
|
);
|
|
9074
9173
|
case "higher-or-lower":
|
|
9075
|
-
return /* @__PURE__ */ (0,
|
|
9174
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
9076
9175
|
HigherOrLowerGame,
|
|
9077
9176
|
{
|
|
9078
9177
|
...sharedProps,
|
|
@@ -9080,7 +9179,7 @@ function GameScreenHost({
|
|
|
9080
9179
|
}
|
|
9081
9180
|
);
|
|
9082
9181
|
case "career-path":
|
|
9083
|
-
return /* @__PURE__ */ (0,
|
|
9182
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
9084
9183
|
CareerPathGame,
|
|
9085
9184
|
{
|
|
9086
9185
|
...sharedProps,
|
|
@@ -9089,7 +9188,7 @@ function GameScreenHost({
|
|
|
9089
9188
|
);
|
|
9090
9189
|
case "beat-the-grid": {
|
|
9091
9190
|
const btgConfig = safeParseConfig(configJson);
|
|
9092
|
-
return /* @__PURE__ */ (0,
|
|
9191
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
9093
9192
|
BeatTheGridGame,
|
|
9094
9193
|
{
|
|
9095
9194
|
...sharedProps,
|
|
@@ -9099,7 +9198,7 @@ function GameScreenHost({
|
|
|
9099
9198
|
);
|
|
9100
9199
|
}
|
|
9101
9200
|
case "guess-the-xi":
|
|
9102
|
-
return /* @__PURE__ */ (0,
|
|
9201
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
9103
9202
|
GuessTheXiGame,
|
|
9104
9203
|
{
|
|
9105
9204
|
...sharedProps,
|
|
@@ -9107,7 +9206,7 @@ function GameScreenHost({
|
|
|
9107
9206
|
}
|
|
9108
9207
|
);
|
|
9109
9208
|
case "daily-quiz":
|
|
9110
|
-
return /* @__PURE__ */ (0,
|
|
9209
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
9111
9210
|
DailyQuizGame,
|
|
9112
9211
|
{
|
|
9113
9212
|
...sharedProps,
|
|
@@ -9115,7 +9214,7 @@ function GameScreenHost({
|
|
|
9115
9214
|
}
|
|
9116
9215
|
);
|
|
9117
9216
|
case "matchday-predictor":
|
|
9118
|
-
return /* @__PURE__ */ (0,
|
|
9217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
9119
9218
|
MatchdayPredictorGame,
|
|
9120
9219
|
{
|
|
9121
9220
|
...sharedProps,
|
|
@@ -9123,7 +9222,7 @@ function GameScreenHost({
|
|
|
9123
9222
|
}
|
|
9124
9223
|
);
|
|
9125
9224
|
case "starting-xi":
|
|
9126
|
-
return /* @__PURE__ */ (0,
|
|
9225
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
9127
9226
|
StartingXiGame,
|
|
9128
9227
|
{
|
|
9129
9228
|
...sharedProps,
|
|
@@ -9131,7 +9230,7 @@ function GameScreenHost({
|
|
|
9131
9230
|
}
|
|
9132
9231
|
);
|
|
9133
9232
|
case "stat-ladder":
|
|
9134
|
-
return /* @__PURE__ */ (0,
|
|
9233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
9135
9234
|
StatLadderGame,
|
|
9136
9235
|
{
|
|
9137
9236
|
...sharedProps,
|
|
@@ -9139,7 +9238,7 @@ function GameScreenHost({
|
|
|
9139
9238
|
}
|
|
9140
9239
|
);
|
|
9141
9240
|
case "fan-motm":
|
|
9142
|
-
return /* @__PURE__ */ (0,
|
|
9241
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
9143
9242
|
FanMotmGame,
|
|
9144
9243
|
{
|
|
9145
9244
|
...sharedProps,
|
|
@@ -9147,10 +9246,10 @@ function GameScreenHost({
|
|
|
9147
9246
|
}
|
|
9148
9247
|
);
|
|
9149
9248
|
default:
|
|
9150
|
-
return /* @__PURE__ */ (0,
|
|
9249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "ss-g-screen", "data-testid": `game-screen-${gameId}`, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(GameHeader, { title: gameTitle({ gameId }, ui.games.titles), onBack, backLabel: ui.back }) });
|
|
9151
9250
|
}
|
|
9152
9251
|
}
|
|
9153
|
-
return /* @__PURE__ */ (0,
|
|
9252
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "ss-w-gscreen", "data-testid": "gscreen", "data-lock-at": lockAtUtc ?? void 0, children: renderScreen() });
|
|
9154
9253
|
}
|
|
9155
9254
|
|
|
9156
9255
|
// src/components/games/ui/fonts.ts
|
|
@@ -9167,7 +9266,7 @@ function ensureGamesFonts(doc = document) {
|
|
|
9167
9266
|
}
|
|
9168
9267
|
|
|
9169
9268
|
// src/components/GamesPanel.tsx
|
|
9170
|
-
var
|
|
9269
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
9171
9270
|
function GamesPanel({
|
|
9172
9271
|
loggedIn,
|
|
9173
9272
|
games,
|
|
@@ -9180,9 +9279,9 @@ function GamesPanel({
|
|
|
9180
9279
|
(0, import_react55.useEffect)(() => {
|
|
9181
9280
|
ensureGamesFonts();
|
|
9182
9281
|
}, []);
|
|
9183
|
-
if (!loggedIn) return /* @__PURE__ */ (0,
|
|
9282
|
+
if (!loggedIn) return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(GamesLoginWall, { ui });
|
|
9184
9283
|
if (selected !== null) {
|
|
9185
|
-
return /* @__PURE__ */ (0,
|
|
9284
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "ss-w-gscreen-wrap", lang: ui.games.lang, children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
9186
9285
|
GameScreenHost,
|
|
9187
9286
|
{
|
|
9188
9287
|
selected,
|
|
@@ -9196,7 +9295,7 @@ function GamesPanel({
|
|
|
9196
9295
|
}
|
|
9197
9296
|
) });
|
|
9198
9297
|
}
|
|
9199
|
-
return /* @__PURE__ */ (0,
|
|
9298
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "ss-g-hub-wrap", "data-testid": "games-hub", lang: ui.games.lang, children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
9200
9299
|
GamesHub,
|
|
9201
9300
|
{
|
|
9202
9301
|
games,
|
|
@@ -9211,7 +9310,7 @@ function GamesPanel({
|
|
|
9211
9310
|
var import_react56 = require("react");
|
|
9212
9311
|
|
|
9213
9312
|
// src/components/LeaderboardRow.tsx
|
|
9214
|
-
var
|
|
9313
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
9215
9314
|
function formatPoints(n) {
|
|
9216
9315
|
return n.toLocaleString("en");
|
|
9217
9316
|
}
|
|
@@ -9220,14 +9319,14 @@ function LeaderboardWeeklyRow({
|
|
|
9220
9319
|
isMe
|
|
9221
9320
|
}) {
|
|
9222
9321
|
const rankClass = `ss-w-lb2-rank${row.rank <= 3 ? " ss-w-lb2-rank--top3" : ""}`;
|
|
9223
|
-
return /* @__PURE__ */ (0,
|
|
9224
|
-
/* @__PURE__ */ (0,
|
|
9322
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: `ss-w-lb2-row${isMe ? " ss-w-lb2-row--you" : ""}`, children: [
|
|
9323
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("span", { className: rankClass, children: [
|
|
9225
9324
|
"#",
|
|
9226
9325
|
row.rank
|
|
9227
9326
|
] }),
|
|
9228
|
-
/* @__PURE__ */ (0,
|
|
9229
|
-
/* @__PURE__ */ (0,
|
|
9230
|
-
row.currentStreak > 0 && /* @__PURE__ */ (0,
|
|
9327
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "ss-w-lb2-handle", children: row.handle }),
|
|
9328
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "ss-w-lb2-points", children: formatPoints(row.points) }),
|
|
9329
|
+
row.currentStreak > 0 && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("span", { className: "ss-w-lb2-streak", children: [
|
|
9231
9330
|
"\u{1F525} ",
|
|
9232
9331
|
row.currentStreak
|
|
9233
9332
|
] })
|
|
@@ -9238,18 +9337,18 @@ function LeaderboardAllTimeRow({
|
|
|
9238
9337
|
isMe
|
|
9239
9338
|
}) {
|
|
9240
9339
|
const rankClass = `ss-w-lb2-rank${row.rank <= 3 ? " ss-w-lb2-rank--top3" : ""}`;
|
|
9241
|
-
return /* @__PURE__ */ (0,
|
|
9242
|
-
/* @__PURE__ */ (0,
|
|
9340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: `ss-w-lb2-row${isMe ? " ss-w-lb2-row--you" : ""}`, children: [
|
|
9341
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("span", { className: rankClass, children: [
|
|
9243
9342
|
"#",
|
|
9244
9343
|
row.rank
|
|
9245
9344
|
] }),
|
|
9246
|
-
/* @__PURE__ */ (0,
|
|
9247
|
-
/* @__PURE__ */ (0,
|
|
9345
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "ss-w-lb2-handle", children: row.handle }),
|
|
9346
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "ss-w-lb2-points", children: formatPoints(row.allTimePoints) })
|
|
9248
9347
|
] });
|
|
9249
9348
|
}
|
|
9250
9349
|
|
|
9251
9350
|
// src/components/LeaderboardEmpty.tsx
|
|
9252
|
-
var
|
|
9351
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
9253
9352
|
function LeaderboardEmpty({
|
|
9254
9353
|
segment,
|
|
9255
9354
|
lastWeek,
|
|
@@ -9258,36 +9357,36 @@ function LeaderboardEmpty({
|
|
|
9258
9357
|
ui
|
|
9259
9358
|
}) {
|
|
9260
9359
|
if (segment === "alltime") {
|
|
9261
|
-
return /* @__PURE__ */ (0,
|
|
9262
|
-
/* @__PURE__ */ (0,
|
|
9263
|
-
/* @__PURE__ */ (0,
|
|
9360
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "ss-w-lb-empty ss-w-lb-empty--alltime", children: [
|
|
9361
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "ss-w-lb-empty-icon", "aria-hidden": "true", children: "\u{1F4CA}" }),
|
|
9362
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("p", { className: "ss-w-lb-empty-body", children: ui.leaderboardAllTimeEmpty })
|
|
9264
9363
|
] });
|
|
9265
9364
|
}
|
|
9266
9365
|
const fresh = lastWeek != null;
|
|
9267
9366
|
const title = fresh ? ui.leaderboardEmptyFreshTitle : ui.leaderboardEmptyColdTitle;
|
|
9268
9367
|
const body = fresh ? ui.leaderboardEmptyFreshBody : ui.leaderboardEmptyColdBody;
|
|
9269
|
-
return /* @__PURE__ */ (0,
|
|
9270
|
-
weeklyPrize && /* @__PURE__ */ (0,
|
|
9271
|
-
/* @__PURE__ */ (0,
|
|
9272
|
-
/* @__PURE__ */ (0,
|
|
9368
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "ss-w-lb-empty", children: [
|
|
9369
|
+
weeklyPrize && /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "ss-w-prize", children: [
|
|
9370
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { className: "ss-w-prize-icon", "aria-hidden": "true", children: "\u{1F3C6}" }),
|
|
9371
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "ss-w-prize-body", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { className: "ss-w-prize-text", children: weeklyPrize }) })
|
|
9273
9372
|
] }),
|
|
9274
|
-
/* @__PURE__ */ (0,
|
|
9275
|
-
/* @__PURE__ */ (0,
|
|
9276
|
-
/* @__PURE__ */ (0,
|
|
9277
|
-
/* @__PURE__ */ (0,
|
|
9278
|
-
onPlay && /* @__PURE__ */ (0,
|
|
9373
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "ss-w-lb-empty-hero", children: [
|
|
9374
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "ss-w-lb-empty-icon", "aria-hidden": "true", children: fresh ? "\u{1F3C6}" : "\u{1F3AE}" }),
|
|
9375
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("h4", { className: "ss-w-lb-empty-title", children: title }),
|
|
9376
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("p", { className: "ss-w-lb-empty-body", children: body }),
|
|
9377
|
+
onPlay && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("button", { type: "button", className: "ss-w-lb-empty-cta", onClick: onPlay, children: ui.leaderboardEmptyCta })
|
|
9279
9378
|
] }),
|
|
9280
|
-
fresh && lastWeek && /* @__PURE__ */ (0,
|
|
9281
|
-
/* @__PURE__ */ (0,
|
|
9282
|
-
/* @__PURE__ */ (0,
|
|
9283
|
-
/* @__PURE__ */ (0,
|
|
9284
|
-
/* @__PURE__ */ (0,
|
|
9379
|
+
fresh && lastWeek && /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "ss-w-lb-last", children: [
|
|
9380
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { className: "ss-w-lb-last-label", children: ui.leaderboardLastWeekLabel }),
|
|
9381
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { className: "ss-w-lb-last-champ", "aria-hidden": "true", children: "\u{1F947}" }),
|
|
9382
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { className: "ss-w-lb-last-handle", children: lastWeek.handle }),
|
|
9383
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { className: "ss-w-lb-last-points", children: formatPoints(lastWeek.points) })
|
|
9285
9384
|
] })
|
|
9286
9385
|
] });
|
|
9287
9386
|
}
|
|
9288
9387
|
|
|
9289
9388
|
// src/components/Leaderboard.tsx
|
|
9290
|
-
var
|
|
9389
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
9291
9390
|
function Leaderboard({
|
|
9292
9391
|
data,
|
|
9293
9392
|
ui,
|
|
@@ -9297,9 +9396,9 @@ function Leaderboard({
|
|
|
9297
9396
|
const myRow = segment === "weekly" ? data.myWeeklyRow : data.myAllTimeRow;
|
|
9298
9397
|
const offBoard = myRow !== null && myRow !== void 0 && myRow.rank === -1;
|
|
9299
9398
|
const isEmpty = segment === "weekly" ? data.weeklyTop.length === 0 : data.allTimeTop.length === 0;
|
|
9300
|
-
return /* @__PURE__ */ (0,
|
|
9301
|
-
/* @__PURE__ */ (0,
|
|
9302
|
-
/* @__PURE__ */ (0,
|
|
9399
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "ss-w-lb2", children: [
|
|
9400
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "ss-w-seg", children: [
|
|
9401
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9303
9402
|
"button",
|
|
9304
9403
|
{
|
|
9305
9404
|
type: "button",
|
|
@@ -9309,7 +9408,7 @@ function Leaderboard({
|
|
|
9309
9408
|
children: ui.leaderboardThisWeek
|
|
9310
9409
|
}
|
|
9311
9410
|
),
|
|
9312
|
-
/* @__PURE__ */ (0,
|
|
9411
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9313
9412
|
"button",
|
|
9314
9413
|
{
|
|
9315
9414
|
type: "button",
|
|
@@ -9320,7 +9419,7 @@ function Leaderboard({
|
|
|
9320
9419
|
}
|
|
9321
9420
|
)
|
|
9322
9421
|
] }),
|
|
9323
|
-
isEmpty ? /* @__PURE__ */ (0,
|
|
9422
|
+
isEmpty ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9324
9423
|
LeaderboardEmpty,
|
|
9325
9424
|
{
|
|
9326
9425
|
segment,
|
|
@@ -9329,15 +9428,15 @@ function Leaderboard({
|
|
|
9329
9428
|
onPlay,
|
|
9330
9429
|
ui
|
|
9331
9430
|
}
|
|
9332
|
-
) : /* @__PURE__ */ (0,
|
|
9333
|
-
/* @__PURE__ */ (0,
|
|
9431
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_jsx_runtime93.Fragment, { children: [
|
|
9432
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "ss-w-lb2-rows", children: segment === "weekly" ? data.weeklyTop.map((row) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9334
9433
|
LeaderboardWeeklyRow,
|
|
9335
9434
|
{
|
|
9336
9435
|
row,
|
|
9337
9436
|
isMe: row.operatorUserId === data.myWeeklyRow?.operatorUserId
|
|
9338
9437
|
},
|
|
9339
9438
|
row.operatorUserId
|
|
9340
|
-
)) : data.allTimeTop.map((row) => /* @__PURE__ */ (0,
|
|
9439
|
+
)) : data.allTimeTop.map((row) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9341
9440
|
LeaderboardAllTimeRow,
|
|
9342
9441
|
{
|
|
9343
9442
|
row,
|
|
@@ -9345,18 +9444,18 @@ function Leaderboard({
|
|
|
9345
9444
|
},
|
|
9346
9445
|
row.operatorUserId
|
|
9347
9446
|
)) }),
|
|
9348
|
-
/* @__PURE__ */ (0,
|
|
9349
|
-
myRow != null && (offBoard ? /* @__PURE__ */ (0,
|
|
9350
|
-
segment === "weekly" && data.myWeeklyRow && /* @__PURE__ */ (0,
|
|
9351
|
-
segment === "alltime" && data.myAllTimeRow && /* @__PURE__ */ (0,
|
|
9447
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "ss-w-kitline", children: "\u{1F3BD}" }),
|
|
9448
|
+
myRow != null && (offBoard ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "ss-w-lbgap", children: ui.leaderboardOffBoard }) : /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "ss-w-lb2-rows", children: [
|
|
9449
|
+
segment === "weekly" && data.myWeeklyRow && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(LeaderboardWeeklyRow, { row: data.myWeeklyRow, isMe: true }),
|
|
9450
|
+
segment === "alltime" && data.myAllTimeRow && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(LeaderboardAllTimeRow, { row: data.myAllTimeRow, isMe: true })
|
|
9352
9451
|
] })),
|
|
9353
|
-
segment === "alltime" && data.myAllTimeRow && !offBoard && /* @__PURE__ */ (0,
|
|
9452
|
+
segment === "alltime" && data.myAllTimeRow && !offBoard && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "ss-w-lb2-rows", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "ss-w-lb2-row", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "ss-w-lb2-handle", children: formatPoints(data.allTimeTop.reduce((s, r) => s + r.allTimePoints, 0)) }) }) })
|
|
9354
9453
|
] })
|
|
9355
9454
|
] });
|
|
9356
9455
|
}
|
|
9357
9456
|
|
|
9358
9457
|
// src/components/LeaderboardPanel.tsx
|
|
9359
|
-
var
|
|
9458
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
9360
9459
|
var EMPTY_PAYLOAD = {
|
|
9361
9460
|
week: "",
|
|
9362
9461
|
weeklyTop: [],
|
|
@@ -9367,19 +9466,19 @@ var EMPTY_PAYLOAD = {
|
|
|
9367
9466
|
lastWeek: null
|
|
9368
9467
|
};
|
|
9369
9468
|
function LeaderboardPanel({ loggedIn, data, loading, onPlay, ui }) {
|
|
9370
|
-
if (!loggedIn) return /* @__PURE__ */ (0,
|
|
9371
|
-
if (data === null && loading) return /* @__PURE__ */ (0,
|
|
9372
|
-
return /* @__PURE__ */ (0,
|
|
9469
|
+
if (!loggedIn) return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(GamesLoginWall, { ui });
|
|
9470
|
+
if (data === null && loading) return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "ss-w-mon-list" });
|
|
9471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "ss-w-mon-list", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Leaderboard, { data: data ?? EMPTY_PAYLOAD, ui, onPlay }) });
|
|
9373
9472
|
}
|
|
9374
9473
|
|
|
9375
9474
|
// src/components/PresetSpeedDial.tsx
|
|
9376
9475
|
var import_react57 = require("react");
|
|
9377
|
-
var
|
|
9476
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
9378
9477
|
function PresetSpeedDial({ expanded, showDot, strings, onToggle, onOpen, rootRef, buttonRef }) {
|
|
9379
9478
|
const pillsId = (0, import_react57.useId)();
|
|
9380
9479
|
const tabIndex = expanded ? 0 : -1;
|
|
9381
|
-
return /* @__PURE__ */ (0,
|
|
9382
|
-
/* @__PURE__ */ (0,
|
|
9480
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { ref: rootRef, className: "ss-w-dial", children: [
|
|
9481
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
9383
9482
|
"button",
|
|
9384
9483
|
{
|
|
9385
9484
|
ref: buttonRef,
|
|
@@ -9390,20 +9489,20 @@ function PresetSpeedDial({ expanded, showDot, strings, onToggle, onOpen, rootRef
|
|
|
9390
9489
|
"aria-label": strings.dialName,
|
|
9391
9490
|
onClick: onToggle,
|
|
9392
9491
|
children: [
|
|
9393
|
-
/* @__PURE__ */ (0,
|
|
9394
|
-
/* @__PURE__ */ (0,
|
|
9395
|
-
showDot && !expanded ? /* @__PURE__ */ (0,
|
|
9492
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "ss-w-dial-icon ss-w-dial-icon--open", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(SlidersIcon, {}) }),
|
|
9493
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "ss-w-dial-icon ss-w-dial-icon--close", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(CloseIcon, {}) }),
|
|
9494
|
+
showDot && !expanded ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "ss-w-dial-dot", "aria-hidden": "true" }) : null
|
|
9396
9495
|
]
|
|
9397
9496
|
}
|
|
9398
9497
|
),
|
|
9399
|
-
/* @__PURE__ */ (0,
|
|
9400
|
-
/* @__PURE__ */ (0,
|
|
9401
|
-
/* @__PURE__ */ (0,
|
|
9402
|
-
/* @__PURE__ */ (0,
|
|
9498
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { id: pillsId, className: "ss-w-dial-pills", "data-open": expanded ? "" : void 0, children: [
|
|
9499
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("button", { type: "button", className: "ss-w-dial-pill", tabIndex, onClick: () => onOpen("numbers"), children: [
|
|
9500
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(SlidersIcon, {}),
|
|
9501
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "ss-w-dial-pill-label", children: strings.setNumbers })
|
|
9403
9502
|
] }),
|
|
9404
|
-
/* @__PURE__ */ (0,
|
|
9405
|
-
/* @__PURE__ */ (0,
|
|
9406
|
-
/* @__PURE__ */ (0,
|
|
9503
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("button", { type: "button", className: "ss-w-dial-pill", tabIndex, onClick: () => onOpen("combo"), children: [
|
|
9504
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ComboIcon, {}),
|
|
9505
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "ss-w-dial-pill-label", children: strings.buildCombo })
|
|
9407
9506
|
] })
|
|
9408
9507
|
] })
|
|
9409
9508
|
] });
|
|
@@ -9411,7 +9510,7 @@ function PresetSpeedDial({ expanded, showDot, strings, onToggle, onOpen, rootRef
|
|
|
9411
9510
|
|
|
9412
9511
|
// src/components/PresetTools.tsx
|
|
9413
9512
|
var import_react58 = require("react");
|
|
9414
|
-
var
|
|
9513
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
9415
9514
|
var FOCUSABLE = 'button:not([disabled]), [href], input:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
9416
9515
|
function PresetToolModal({ title, closeLabel, onClose, children, footer }) {
|
|
9417
9516
|
const dialogRef = (0, import_react58.useRef)(null);
|
|
@@ -9449,79 +9548,79 @@ function PresetToolModal({ title, closeLabel, onClose, children, footer }) {
|
|
|
9449
9548
|
first.focus();
|
|
9450
9549
|
}
|
|
9451
9550
|
};
|
|
9452
|
-
return /* @__PURE__ */ (0,
|
|
9453
|
-
/* @__PURE__ */ (0,
|
|
9454
|
-
/* @__PURE__ */ (0,
|
|
9455
|
-
/* @__PURE__ */ (0,
|
|
9551
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "ss-w-tool-backdrop", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { ref: dialogRef, className: "ss-w-tool", role: "dialog", "aria-modal": "true", "aria-labelledby": titleId, tabIndex: -1, onKeyDown: trapTab, children: [
|
|
9552
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "ss-w-tool-head", children: [
|
|
9553
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("h2", { id: titleId, className: "ss-w-tool-title", children: title }),
|
|
9554
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("button", { type: "button", className: "ss-w-tool-close", "aria-label": closeLabel, onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(CloseIcon, {}) })
|
|
9456
9555
|
] }),
|
|
9457
|
-
/* @__PURE__ */ (0,
|
|
9458
|
-
footer ? /* @__PURE__ */ (0,
|
|
9556
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "ss-w-tool-body", children }),
|
|
9557
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "ss-w-tool-foot", children: footer }) : null
|
|
9459
9558
|
] }) });
|
|
9460
9559
|
}
|
|
9461
9560
|
function fillTemplate(template, slots) {
|
|
9462
9561
|
return template.split(/(\{[a-z]+\})/).filter((part) => part !== "").map((part, i) => {
|
|
9463
9562
|
const key = /^\{([a-z]+)\}$/.exec(part)?.[1];
|
|
9464
|
-
return /* @__PURE__ */ (0,
|
|
9563
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_react58.Fragment, { children: key !== void 0 && key in slots ? slots[key] : part }, i);
|
|
9465
9564
|
});
|
|
9466
9565
|
}
|
|
9467
9566
|
function NumberSelect({ current, choices: choices2, label, notToday, lockEmpty = true, onChoose }) {
|
|
9468
9567
|
const selected = Math.max(0, choices2.findIndex((c) => c.text === current));
|
|
9469
|
-
return /* @__PURE__ */ (0,
|
|
9470
|
-
/* @__PURE__ */ (0,
|
|
9471
|
-
/* @__PURE__ */ (0,
|
|
9568
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("span", { className: "ss-w-tool-num", children: [
|
|
9569
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "ss-w-tool-num-size", "aria-hidden": "true", children: current }),
|
|
9570
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("select", { className: "ss-w-tool-num-select", "aria-label": label, value: String(selected), onChange: (e) => {
|
|
9472
9571
|
const c = choices2[Number(e.target.value)];
|
|
9473
9572
|
if (c) onChoose(c.value);
|
|
9474
|
-
}, children: choices2.map((c, i) => /* @__PURE__ */ (0,
|
|
9573
|
+
}, children: choices2.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("option", { value: String(i), disabled: lockEmpty && !c.available && i !== selected, children: c.available ? c.text : `${c.text}${notToday}` }, i)) })
|
|
9475
9574
|
] });
|
|
9476
9575
|
}
|
|
9477
9576
|
function ChoiceSelect({ currentIdx, sizeLabels, optionLabels, label, onChoose }) {
|
|
9478
9577
|
const sizeText = sizeLabels[currentIdx] ?? "";
|
|
9479
|
-
return /* @__PURE__ */ (0,
|
|
9480
|
-
/* @__PURE__ */ (0,
|
|
9481
|
-
/* @__PURE__ */ (0,
|
|
9578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("span", { className: "ss-w-tool-num", children: [
|
|
9579
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "ss-w-tool-num-size", "aria-hidden": "true", children: sizeText }),
|
|
9580
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("select", { className: "ss-w-tool-num-select", "aria-label": label, value: String(currentIdx), onChange: (e) => onChoose(Number(e.target.value)), children: optionLabels.map((opt, i) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("option", { value: String(i), children: opt }, i)) })
|
|
9482
9581
|
] });
|
|
9483
9582
|
}
|
|
9484
9583
|
function SendButton({ label, display, disabled, onClick }) {
|
|
9485
|
-
return /* @__PURE__ */ (0,
|
|
9584
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("button", { type: "button", className: "ss-w-tool-send", "aria-label": `${label}: ${display}`, disabled, onClick, children: label });
|
|
9486
9585
|
}
|
|
9487
9586
|
function PickList({ picks, formatKickoff }) {
|
|
9488
|
-
return /* @__PURE__ */ (0,
|
|
9489
|
-
/* @__PURE__ */ (0,
|
|
9587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("ul", { className: "ss-w-tool-picks", role: "list", children: picks.map((p) => /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("li", { className: "ss-w-tool-pick", children: [
|
|
9588
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("span", { className: "ss-w-tool-pick-match", children: [
|
|
9490
9589
|
p.homeTeamName,
|
|
9491
9590
|
" \u2013 ",
|
|
9492
9591
|
p.awayTeamName
|
|
9493
9592
|
] }),
|
|
9494
|
-
/* @__PURE__ */ (0,
|
|
9593
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("span", { className: "ss-w-tool-pick-sel", children: [
|
|
9495
9594
|
p.marketLabel,
|
|
9496
9595
|
": ",
|
|
9497
9596
|
p.selectionLabel,
|
|
9498
9597
|
p.line ? ` ${p.line}` : ""
|
|
9499
9598
|
] }),
|
|
9500
|
-
/* @__PURE__ */ (0,
|
|
9501
|
-
/* @__PURE__ */ (0,
|
|
9599
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "ss-w-tool-pick-kick", children: formatKickoff(p.kickoffUtc) }),
|
|
9600
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "ss-w-tool-pick-price", children: p.price.toFixed(2) })
|
|
9502
9601
|
] }, p.matchOddsId)) });
|
|
9503
9602
|
}
|
|
9504
9603
|
function ComboPreview({ cell, formatKickoff }) {
|
|
9505
|
-
return /* @__PURE__ */ (0,
|
|
9506
|
-
/* @__PURE__ */ (0,
|
|
9507
|
-
/* @__PURE__ */ (0,
|
|
9604
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(import_jsx_runtime96.Fragment, { children: [
|
|
9605
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(PickList, { picks: cell.combo.legs, formatKickoff }),
|
|
9606
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "ss-w-tool-math", children: cell.combo.multiplication })
|
|
9508
9607
|
] });
|
|
9509
9608
|
}
|
|
9510
9609
|
function Unavailable({ text }) {
|
|
9511
|
-
return /* @__PURE__ */ (0,
|
|
9610
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("p", { className: "ss-w-tool-unavailable", children: text });
|
|
9512
9611
|
}
|
|
9513
9612
|
function AskRow({ icon, ask, ready, send }) {
|
|
9514
|
-
return /* @__PURE__ */ (0,
|
|
9515
|
-
/* @__PURE__ */ (0,
|
|
9516
|
-
/* @__PURE__ */ (0,
|
|
9517
|
-
/* @__PURE__ */ (0,
|
|
9518
|
-
ready ? /* @__PURE__ */ (0,
|
|
9613
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("section", { className: "ss-w-tool-row ss-w-tool-row--ask", children: [
|
|
9614
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "ss-w-tool-icon", "aria-hidden": "true", children: icon }),
|
|
9615
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "ss-w-tool-main", children: [
|
|
9616
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("p", { className: "ss-w-tool-ask", children: ask }),
|
|
9617
|
+
ready ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "ss-w-tool-ready", children: ready }) : null
|
|
9519
9618
|
] }),
|
|
9520
9619
|
send
|
|
9521
9620
|
] });
|
|
9522
9621
|
}
|
|
9523
9622
|
function RoundSend({ label, display, disabled, onClick }) {
|
|
9524
|
-
return /* @__PURE__ */ (0,
|
|
9623
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("button", { type: "button", className: "ss-w-tool-go", "aria-label": `${label}: ${display}`, disabled, onClick, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(SendIcon, {}) });
|
|
9525
9624
|
}
|
|
9526
9625
|
var BIG_COMBO = { total: 50, legs: 6 };
|
|
9527
9626
|
function SetNumbersTool({ grid, strings, streaming, onSend, onClose }) {
|
|
@@ -9587,77 +9686,77 @@ function SetNumbersTool({ grid, strings, streaming, onSend, onClose }) {
|
|
|
9587
9686
|
const marketLabels = markets.map((c) => strings.marketShort(c.marketDeveloperName, c.marketLabel, c.selectionLabel ?? null));
|
|
9588
9687
|
const singlesReady = (cell) => cell ? strings.readyCount(cell.picks.length) : strings.unavailable;
|
|
9589
9688
|
const comboReady = (cell) => cell ? strings.readyAt(cell.combo.total) : strings.unavailable;
|
|
9590
|
-
return /* @__PURE__ */ (0,
|
|
9591
|
-
/* @__PURE__ */ (0,
|
|
9689
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(PresetToolModal, { title: strings.setNumbers, closeLabel: strings.close, onClose, children: [
|
|
9690
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
9592
9691
|
AskRow,
|
|
9593
9692
|
{
|
|
9594
9693
|
icon: "\u{1F3AF}",
|
|
9595
9694
|
ask: fillTemplate(strings.maxPriceRow, {
|
|
9596
9695
|
count: String(count),
|
|
9597
|
-
price: /* @__PURE__ */ (0,
|
|
9696
|
+
price: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(NumberSelect, { current: maxPrice.toFixed(2), choices: maxChoices, label: strings.maxPriceName, notToday: strings.notToday, onChoose: chooseMax })
|
|
9598
9697
|
}),
|
|
9599
9698
|
ready: singlesReady(maxCell),
|
|
9600
|
-
send: /* @__PURE__ */ (0,
|
|
9699
|
+
send: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(RoundSend, { label: strings.send, display: strings.maxPriceDisplay(count, maxPrice), disabled: !maxCell || streaming, onClick: () => {
|
|
9601
9700
|
if (maxCell) onSend(maxPriceAsk(maxCell, strings));
|
|
9602
9701
|
} })
|
|
9603
9702
|
}
|
|
9604
9703
|
),
|
|
9605
|
-
/* @__PURE__ */ (0,
|
|
9704
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
9606
9705
|
AskRow,
|
|
9607
9706
|
{
|
|
9608
9707
|
icon: "\u{1F4C8}",
|
|
9609
9708
|
ask: fillTemplate(strings.minPriceRow, {
|
|
9610
9709
|
count: String(count),
|
|
9611
|
-
price: /* @__PURE__ */ (0,
|
|
9710
|
+
price: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(NumberSelect, { current: minPrice.toFixed(2), choices: minChoices, label: strings.minPriceName, notToday: strings.notToday, onChoose: chooseMin })
|
|
9612
9711
|
}),
|
|
9613
9712
|
ready: singlesReady(minCell),
|
|
9614
|
-
send: /* @__PURE__ */ (0,
|
|
9713
|
+
send: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(RoundSend, { label: strings.send, display: strings.minPriceDisplay(count, minPrice), disabled: !minCell || streaming, onClick: () => {
|
|
9615
9714
|
if (minCell) onSend(minPriceAsk(minCell, strings));
|
|
9616
9715
|
} })
|
|
9617
9716
|
}
|
|
9618
9717
|
),
|
|
9619
|
-
/* @__PURE__ */ (0,
|
|
9718
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
9620
9719
|
AskRow,
|
|
9621
9720
|
{
|
|
9622
9721
|
icon: "\u2728",
|
|
9623
9722
|
ask: fillTemplate(strings.comboRow, {
|
|
9624
|
-
legs: /* @__PURE__ */ (0,
|
|
9625
|
-
total: /* @__PURE__ */ (0,
|
|
9723
|
+
legs: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(NumberSelect, { current: String(legs), choices: legChoicesFor(total), label: strings.matchesLabel, notToday: strings.notToday, lockEmpty: false, onChoose: chooseLegs }),
|
|
9724
|
+
total: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(NumberSelect, { current: total.toFixed(1), choices: totalChoices, label: strings.totalLabel, notToday: strings.notToday, onChoose: chooseTotal })
|
|
9626
9725
|
}),
|
|
9627
9726
|
ready: comboReady(comboCell),
|
|
9628
|
-
send: /* @__PURE__ */ (0,
|
|
9727
|
+
send: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(RoundSend, { label: strings.send, display: strings.comboDisplay(legs, total), disabled: !comboCell || streaming, onClick: () => {
|
|
9629
9728
|
if (comboCell) onSend(comboAsk(comboCell, strings));
|
|
9630
9729
|
} })
|
|
9631
9730
|
}
|
|
9632
9731
|
),
|
|
9633
|
-
/* @__PURE__ */ (0,
|
|
9732
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
9634
9733
|
AskRow,
|
|
9635
9734
|
{
|
|
9636
9735
|
icon: "\u{1F3C6}",
|
|
9637
9736
|
ask: fillTemplate(strings.bigComboRow, {
|
|
9638
|
-
legs: /* @__PURE__ */ (0,
|
|
9639
|
-
total: /* @__PURE__ */ (0,
|
|
9737
|
+
legs: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(NumberSelect, { current: String(bigLegs), choices: legChoicesFor(bigTotal), label: strings.matchesLabel, notToday: strings.notToday, lockEmpty: false, onChoose: chooseBigLegs }),
|
|
9738
|
+
total: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(NumberSelect, { current: bigTotal.toFixed(1), choices: totalChoices, label: strings.totalLabel, notToday: strings.notToday, onChoose: chooseBigTotal })
|
|
9640
9739
|
}),
|
|
9641
9740
|
ready: comboReady(bigCell),
|
|
9642
|
-
send: /* @__PURE__ */ (0,
|
|
9741
|
+
send: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(RoundSend, { label: strings.send, display: strings.comboDisplay(bigLegs, bigTotal), disabled: !bigCell || streaming, onClick: () => {
|
|
9643
9742
|
if (bigCell) onSend(comboAsk(bigCell, strings));
|
|
9644
9743
|
} })
|
|
9645
9744
|
}
|
|
9646
9745
|
),
|
|
9647
|
-
markets.length > 0 && /* @__PURE__ */ (0,
|
|
9746
|
+
markets.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
9648
9747
|
AskRow,
|
|
9649
9748
|
{
|
|
9650
9749
|
icon: "\u26BD",
|
|
9651
9750
|
ask: fillTemplate(strings.marketRow, {
|
|
9652
|
-
market: /* @__PURE__ */ (0,
|
|
9751
|
+
market: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ChoiceSelect, { currentIdx: marketIdx, sizeLabels: marketLabels, optionLabels: marketLabels, label: strings.marketName, onChoose: chooseMarket })
|
|
9653
9752
|
}),
|
|
9654
9753
|
ready: marketCell ? strings.readyCount(marketCell.count) : null,
|
|
9655
|
-
send: /* @__PURE__ */ (0,
|
|
9754
|
+
send: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(RoundSend, { label: strings.send, display: marketCell ? marketDisplay(marketCell, strings) : "", disabled: !marketCell || streaming, onClick: () => {
|
|
9656
9755
|
if (marketCell) onSend(marketAsk(marketCell, strings));
|
|
9657
9756
|
} })
|
|
9658
9757
|
}
|
|
9659
9758
|
),
|
|
9660
|
-
/* @__PURE__ */ (0,
|
|
9759
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("p", { className: "ss-w-vh", "aria-live": "polite", children: announcement })
|
|
9661
9760
|
] });
|
|
9662
9761
|
}
|
|
9663
9762
|
function BuildComboTool({ grid, strings, streaming, formatKickoff, initialTotal, initialLegs, onSend, onClose }) {
|
|
@@ -9681,24 +9780,24 @@ function BuildComboTool({ grid, strings, streaming, formatKickoff, initialTotal,
|
|
|
9681
9780
|
const d = strings.comboDisplay(nextLegs, nextTotal);
|
|
9682
9781
|
setAnnouncement(findCombo(grid, nextTotal, nextLegs) ? d : `${d}. ${strings.unavailable}`);
|
|
9683
9782
|
};
|
|
9684
|
-
const footer = /* @__PURE__ */ (0,
|
|
9783
|
+
const footer = /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(SendButton, { label: strings.send, display, disabled: !cell || streaming, onClick: () => {
|
|
9685
9784
|
if (cell) onSend(comboAsk(cell, strings));
|
|
9686
9785
|
} });
|
|
9687
|
-
return /* @__PURE__ */ (0,
|
|
9688
|
-
/* @__PURE__ */ (0,
|
|
9689
|
-
/* @__PURE__ */ (0,
|
|
9690
|
-
/* @__PURE__ */ (0,
|
|
9786
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(PresetToolModal, { title: strings.buildCombo, closeLabel: strings.close, onClose, footer, children: [
|
|
9787
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "ss-w-tool-section", role: "group", "aria-label": strings.totalLabel, children: [
|
|
9788
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "ss-w-tool-label", "aria-hidden": "true", children: strings.totalLabel }),
|
|
9789
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "ss-w-tool-chips", children: totals.map((t) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("button", { type: "button", className: "ss-w-tool-chip", "aria-pressed": samePrice(t, total), onClick: () => choose(t, samePrice(t, total) ? legs : legsForTotal(grid, t, legs)), children: t.toFixed(1) }, t)) })
|
|
9691
9790
|
] }),
|
|
9692
|
-
/* @__PURE__ */ (0,
|
|
9693
|
-
/* @__PURE__ */ (0,
|
|
9694
|
-
/* @__PURE__ */ (0,
|
|
9695
|
-
/* @__PURE__ */ (0,
|
|
9696
|
-
/* @__PURE__ */ (0,
|
|
9697
|
-
/* @__PURE__ */ (0,
|
|
9791
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "ss-w-tool-section", role: "group", "aria-label": strings.matchesLabel, children: [
|
|
9792
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "ss-w-tool-label", "aria-hidden": "true", children: strings.matchesLabel }),
|
|
9793
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "ss-w-tool-stepper", children: [
|
|
9794
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("button", { type: "button", className: "ss-w-tool-step", "aria-label": strings.fewerMatches, disabled: legs <= minLegs, onClick: () => choose(total, legs - 1), children: "\u2212" }),
|
|
9795
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "ss-w-tool-count", children: legs }),
|
|
9796
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("button", { type: "button", className: "ss-w-tool-step", "aria-label": strings.moreMatches, disabled: legs >= maxLegs, onClick: () => choose(total, legs + 1), children: "+" })
|
|
9698
9797
|
] })
|
|
9699
9798
|
] }),
|
|
9700
|
-
cell ? /* @__PURE__ */ (0,
|
|
9701
|
-
/* @__PURE__ */ (0,
|
|
9799
|
+
cell ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ComboPreview, { cell, formatKickoff }) : /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Unavailable, { text: strings.unavailable }),
|
|
9800
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("p", { className: "ss-w-vh", "aria-live": "polite", children: announcement })
|
|
9702
9801
|
] });
|
|
9703
9802
|
}
|
|
9704
9803
|
|
|
@@ -9800,7 +9899,7 @@ function markToolSeen() {
|
|
|
9800
9899
|
}
|
|
9801
9900
|
|
|
9802
9901
|
// src/components/ChatPanel.tsx
|
|
9803
|
-
var
|
|
9902
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
9804
9903
|
var FULLSCREEN_QUERY = "(max-width: 639px)";
|
|
9805
9904
|
function useIsModal() {
|
|
9806
9905
|
const [modal, setModal] = (0, import_react60.useState)(false);
|
|
@@ -9903,8 +10002,8 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
9903
10002
|
focusAfterCloseRef.current = "composer";
|
|
9904
10003
|
setTool(null);
|
|
9905
10004
|
}, [tool, onChatTab, presetGrid]);
|
|
9906
|
-
return /* @__PURE__ */ (0,
|
|
9907
|
-
/* @__PURE__ */ (0,
|
|
10005
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "ss-w-panel", role: "dialog", "aria-modal": isModal, "aria-label": ui.chatDialogLabel, children: [
|
|
10006
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
9908
10007
|
ChatHeader,
|
|
9909
10008
|
{
|
|
9910
10009
|
onClose: close,
|
|
@@ -9917,7 +10016,7 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
9917
10016
|
moreOptionsLabel: ui.moreOptions
|
|
9918
10017
|
}
|
|
9919
10018
|
),
|
|
9920
|
-
monitor && /* @__PURE__ */ (0,
|
|
10019
|
+
monitor && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
9921
10020
|
TabBar,
|
|
9922
10021
|
{
|
|
9923
10022
|
monitor,
|
|
@@ -9929,9 +10028,9 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
9929
10028
|
gamesEnabled: gamesResult?.enabled ?? false
|
|
9930
10029
|
}
|
|
9931
10030
|
),
|
|
9932
|
-
/* @__PURE__ */ (0,
|
|
9933
|
-
/* @__PURE__ */ (0,
|
|
9934
|
-
showDial ? /* @__PURE__ */ (0,
|
|
10031
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { ref: layerRef, className: "ss-w-chat-layer", "data-dial": presetGrid ? "" : void 0, style: onChatTab ? void 0 : HIDDEN_LAYER_STYLE, children: [
|
|
10032
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(PresetToolsContext.Provider, { value: toolsValue, children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(MessageList, { controller, ui, slip, onDashboardTap, monitor }) }),
|
|
10033
|
+
showDial ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
9935
10034
|
PresetSpeedDial,
|
|
9936
10035
|
{
|
|
9937
10036
|
expanded: dial.expanded,
|
|
@@ -9943,12 +10042,12 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
9943
10042
|
buttonRef: dialButtonRef
|
|
9944
10043
|
}
|
|
9945
10044
|
) : null,
|
|
9946
|
-
tool && presetGrid && onChatTab && !paused ? tool.kind === "numbers" ? /* @__PURE__ */ (0,
|
|
10045
|
+
tool && presetGrid && onChatTab && !paused ? tool.kind === "numbers" ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(SetNumbersTool, { grid: presetGrid, strings: ui.presets, streaming: state.isStreaming, onSend: sendAsk, onClose: closeTool }) : /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(BuildComboTool, { grid: presetGrid, strings: ui.presets, streaming: state.isStreaming, formatKickoff, initialTotal: tool.total, initialLegs: tool.legs, onSend: sendAsk, onClose: closeTool }) : null
|
|
9947
10046
|
] }),
|
|
9948
|
-
monitor && discovery && monitor.activeTab === "today" && /* @__PURE__ */ (0,
|
|
9949
|
-
monitor && monitor.activeTab === "following" && /* @__PURE__ */ (0,
|
|
9950
|
-
monitor && monitor.activeTab === "odds" && /* @__PURE__ */ (0,
|
|
9951
|
-
monitor && monitor.activeTab === "games" && gamesResult && /* @__PURE__ */ (0,
|
|
10047
|
+
monitor && discovery && monitor.activeTab === "today" && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(TodayPanel, { discovery, ui, monitor }),
|
|
10048
|
+
monitor && monitor.activeTab === "following" && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(MatchesPanel, { monitor, ui, slip, onAsk: paused ? void 0 : handleAsk }),
|
|
10049
|
+
monitor && monitor.activeTab === "odds" && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(OddsPanel, { monitor, ui, slip }),
|
|
10050
|
+
monitor && monitor.activeTab === "games" && gamesResult && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
9952
10051
|
GamesPanel,
|
|
9953
10052
|
{
|
|
9954
10053
|
loggedIn: !!loggedIn,
|
|
@@ -9962,7 +10061,7 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
9962
10061
|
}
|
|
9963
10062
|
}
|
|
9964
10063
|
),
|
|
9965
|
-
monitor && monitor.activeTab === "leaderboard" && leaderboardResult && /* @__PURE__ */ (0,
|
|
10064
|
+
monitor && monitor.activeTab === "leaderboard" && leaderboardResult && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
9966
10065
|
LeaderboardPanel,
|
|
9967
10066
|
{
|
|
9968
10067
|
loggedIn: !!loggedIn,
|
|
@@ -9972,9 +10071,9 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
9972
10071
|
ui
|
|
9973
10072
|
}
|
|
9974
10073
|
),
|
|
9975
|
-
(!monitor || monitor.activeTab !== "games" && monitor.activeTab !== "leaderboard") && /* @__PURE__ */ (0,
|
|
9976
|
-
/* @__PURE__ */ (0,
|
|
9977
|
-
paused ? null : /* @__PURE__ */ (0,
|
|
10074
|
+
(!monitor || monitor.activeTab !== "games" && monitor.activeTab !== "leaderboard") && /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(import_jsx_runtime97.Fragment, { children: [
|
|
10075
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { ref: limitRef, className: "ss-w-limit", role: "status", tabIndex: -1, children: state.limit ? limitText(state.limit, ui) : null }),
|
|
10076
|
+
paused ? null : /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
9978
10077
|
ChatInput,
|
|
9979
10078
|
{
|
|
9980
10079
|
ref: inputRef,
|
|
@@ -9993,9 +10092,9 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
9993
10092
|
}
|
|
9994
10093
|
|
|
9995
10094
|
// src/components/HostEventsProvider.tsx
|
|
9996
|
-
var
|
|
10095
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
9997
10096
|
function HostEventsProvider({ value, children }) {
|
|
9998
|
-
return /* @__PURE__ */ (0,
|
|
10097
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(SlipStateContext.Provider, { value: value.slipState, children });
|
|
9999
10098
|
}
|
|
10000
10099
|
|
|
10001
10100
|
// src/styles/css.generated.ts
|
|
@@ -11230,6 +11329,24 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
11230
11329
|
.ss-w-today-tile-star:disabled { cursor: default; opacity: .4; }
|
|
11231
11330
|
.ss-w-today-tile-star svg { width: 18px; height: 18px; }
|
|
11232
11331
|
|
|
11332
|
+
/* Capped row groups (variant B of u521): one league's section-header plus up to
|
|
11333
|
+
ROW_CAP_PER_LEAGUE inline fixture rows, used in place of a tile when the section row budget
|
|
11334
|
+
allows it. Mirrors LeagueTile's button-body + sibling-star-button shape. */
|
|
11335
|
+
.ss-w-today-rowsection { display: flex; flex-direction: column; gap: 12px; }
|
|
11336
|
+
.ss-w-today-rowgroup { display: flex; flex-direction: column; }
|
|
11337
|
+
.ss-w-today-rowgroup-head { display: flex; align-items: center; gap: 4px; }
|
|
11338
|
+
.ss-w-today-rowgroup-head-body { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 2px; background: none; border: none; font: inherit; color: var(--ss-w-ink); cursor: pointer; text-align: left; }
|
|
11339
|
+
.ss-w-today-rowgroup-head-body:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: -2px; }
|
|
11340
|
+
.ss-w-today-rowgroup-name { font-size: 11px; font-weight: 800; letter-spacing: .02em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
11341
|
+
.ss-w-today-rowgroup-star { flex: none; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; background: none; border: none; border-radius: 8px; color: var(--ss-w-faint); cursor: pointer; }
|
|
11342
|
+
.ss-w-today-rowgroup-star:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: -2px; }
|
|
11343
|
+
.ss-w-today-rowgroup-star[aria-pressed="true"] { color: var(--ss-w-accent); }
|
|
11344
|
+
.ss-w-today-rowgroup-star:disabled { cursor: default; opacity: .4; }
|
|
11345
|
+
.ss-w-today-rowgroup-star svg { width: 16px; height: 16px; }
|
|
11346
|
+
.ss-w-today-rowgroup-rows { display: flex; flex-direction: column; }
|
|
11347
|
+
.ss-w-today-rowgroup-seeall { align-self: flex-start; background: none; border: none; font: inherit; font-size: 11px; font-weight: 700; color: var(--ss-w-faint); cursor: pointer; padding: 4px 2px 0; }
|
|
11348
|
+
.ss-w-today-rowgroup-seeall:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: -2px; }
|
|
11349
|
+
|
|
11233
11350
|
/* League detail (Task 6): the drill-in view opened from a tile. Its header star is always
|
|
11234
11351
|
enabled (spec \xA73/\xA77's one exception to the tile rule), so it carries no :disabled styling. */
|
|
11235
11352
|
.ss-w-today-detail { position: relative; display: flex; flex-direction: column; gap: 10px; }
|
|
@@ -11736,7 +11853,7 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
11736
11853
|
`;
|
|
11737
11854
|
|
|
11738
11855
|
// src/StatsWidget.tsx
|
|
11739
|
-
var
|
|
11856
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
11740
11857
|
function buildClient(props) {
|
|
11741
11858
|
try {
|
|
11742
11859
|
if ("client" in props && props.client) {
|
|
@@ -11955,7 +12072,7 @@ function StatsWidget(props) {
|
|
|
11955
12072
|
}, [built, ui.injectStyles]);
|
|
11956
12073
|
if (!built) return null;
|
|
11957
12074
|
const attrs = themeAttrs(ui);
|
|
11958
|
-
return /* @__PURE__ */ (0,
|
|
12075
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(EventLogContext.Provider, { value: logger, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(HostEventsProvider, { value: hostEvents, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { ref: rootRef, className: "ss-w-root", "data-ss-w-theme": attrs["data-ss-w-theme"], "data-ss-w-pos": attrs["data-ss-w-pos"], style: attrs.style, children: controller.state.isOpen ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
11959
12076
|
ChatPanel,
|
|
11960
12077
|
{
|
|
11961
12078
|
controller,
|
|
@@ -11970,7 +12087,7 @@ function StatsWidget(props) {
|
|
|
11970
12087
|
conversation: built?.conversation ?? null,
|
|
11971
12088
|
presetGrid
|
|
11972
12089
|
}
|
|
11973
|
-
) : /* @__PURE__ */ (0,
|
|
12090
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
11974
12091
|
ChatFab,
|
|
11975
12092
|
{
|
|
11976
12093
|
label: ui.launcherLabel,
|