@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.js
CHANGED
|
@@ -118,6 +118,7 @@ var STRINGS = {
|
|
|
118
118
|
topLeagues: "Top leagues",
|
|
119
119
|
topLeaguesSub: "Popular today.",
|
|
120
120
|
allLeagues: "All leagues",
|
|
121
|
+
seeAllFixturesLabel: (n) => `All fixtures (${n})`,
|
|
121
122
|
searchLeaguesPlaceholder: "Search leagues or teams",
|
|
122
123
|
noLeagueResults: "No league or team matches that search.",
|
|
123
124
|
clearSearchLabel: "Clear search",
|
|
@@ -484,6 +485,7 @@ var STRINGS = {
|
|
|
484
485
|
topLeagues: "\xD6ne \xE7\u0131kan ligler",
|
|
485
486
|
topLeaguesSub: "Bug\xFCn pop\xFCler.",
|
|
486
487
|
allLeagues: "T\xFCm ligler",
|
|
488
|
+
seeAllFixturesLabel: (n) => `T\xFCm ma\xE7lar (${n})`,
|
|
487
489
|
searchLeaguesPlaceholder: "Lig veya tak\u0131m ara",
|
|
488
490
|
noLeagueResults: "Aramana uyan lig veya tak\u0131m yok.",
|
|
489
491
|
clearSearchLabel: "Aramay\u0131 temizle",
|
|
@@ -847,6 +849,7 @@ function normalizeUi(cfg) {
|
|
|
847
849
|
topLeagues: strings.topLeagues,
|
|
848
850
|
topLeaguesSub: strings.topLeaguesSub,
|
|
849
851
|
allLeagues: strings.allLeagues,
|
|
852
|
+
seeAllFixturesLabel: strings.seeAllFixturesLabel,
|
|
850
853
|
searchLeaguesPlaceholder: strings.searchLeaguesPlaceholder,
|
|
851
854
|
noLeagueResults: strings.noLeagueResults,
|
|
852
855
|
clearSearchLabel: strings.clearSearchLabel,
|
|
@@ -6162,12 +6165,70 @@ function LeagueDetail({ group, position, states, stale, ui, monitor, starTap, on
|
|
|
6162
6165
|
] });
|
|
6163
6166
|
}
|
|
6164
6167
|
|
|
6168
|
+
// src/components/LeagueRowGroup.tsx
|
|
6169
|
+
import { jsx as jsx58, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
6170
|
+
var ROW_CAP_PER_LEAGUE = 3;
|
|
6171
|
+
var SECTION_ROW_BUDGET = 12;
|
|
6172
|
+
function rowsFor(group, states, stale) {
|
|
6173
|
+
const nonLive = group.matches.filter((m) => !isTreatedLive(states[m.matchId], stale)).length;
|
|
6174
|
+
return Math.min(nonLive, ROW_CAP_PER_LEAGUE);
|
|
6175
|
+
}
|
|
6176
|
+
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";
|
|
6177
|
+
function LeagueRowGroup({ group, states, stale, cap, starClickable: starClickable2, disambiguate, onOpen, starTap, ui, monitor }) {
|
|
6178
|
+
const sorted = group.matches.filter((m) => !isTreatedLive(states[m.matchId], stale)).sort((a, b) => a.kickoffUnix - b.kickoffUnix);
|
|
6179
|
+
if (sorted.length === 0) return null;
|
|
6180
|
+
const shown = sorted.slice(0, cap);
|
|
6181
|
+
const overflow = sorted.length - shown.length;
|
|
6182
|
+
const onStarClick = () => {
|
|
6183
|
+
void starTap.tap(group.competitionId, !group.isStarred);
|
|
6184
|
+
};
|
|
6185
|
+
return /* @__PURE__ */ jsxs53("div", { className: "ss-w-today-rowgroup", children: [
|
|
6186
|
+
/* @__PURE__ */ jsxs53("div", { className: "ss-w-today-rowgroup-head", children: [
|
|
6187
|
+
/* @__PURE__ */ jsxs53("button", { type: "button", className: "ss-w-today-rowgroup-head-body", onClick: onOpen, children: [
|
|
6188
|
+
/* @__PURE__ */ jsx58(Crest2, { url: group.competitionImagePath ?? void 0, name: group.competitionName, kind: "comp" }),
|
|
6189
|
+
/* @__PURE__ */ jsxs53("span", { className: "ss-w-today-rowgroup-name", children: [
|
|
6190
|
+
group.competitionName,
|
|
6191
|
+
disambiguate && group.competitionCountry ? /* @__PURE__ */ jsxs53("span", { className: "ss-w-today-tile-country", children: [
|
|
6192
|
+
" (",
|
|
6193
|
+
group.competitionCountry,
|
|
6194
|
+
")"
|
|
6195
|
+
] }) : null
|
|
6196
|
+
] })
|
|
6197
|
+
] }),
|
|
6198
|
+
/* @__PURE__ */ jsx58(
|
|
6199
|
+
"button",
|
|
6200
|
+
{
|
|
6201
|
+
type: "button",
|
|
6202
|
+
className: "ss-w-today-rowgroup-star",
|
|
6203
|
+
"aria-pressed": group.isStarred,
|
|
6204
|
+
"aria-label": group.isStarred ? ui.starOffLabel : ui.starOnLabel,
|
|
6205
|
+
disabled: !starClickable2 || starTap.pendingId !== null,
|
|
6206
|
+
onClick: onStarClick,
|
|
6207
|
+
children: /* @__PURE__ */ jsx58("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ jsx58(
|
|
6208
|
+
"path",
|
|
6209
|
+
{
|
|
6210
|
+
d: STAR_PATH3,
|
|
6211
|
+
fill: group.isStarred ? "currentColor" : "none",
|
|
6212
|
+
stroke: group.isStarred ? "none" : "currentColor",
|
|
6213
|
+
strokeWidth: 2,
|
|
6214
|
+
strokeLinejoin: "round",
|
|
6215
|
+
strokeLinecap: "round"
|
|
6216
|
+
}
|
|
6217
|
+
) })
|
|
6218
|
+
}
|
|
6219
|
+
)
|
|
6220
|
+
] }),
|
|
6221
|
+
/* @__PURE__ */ jsx58("div", { className: "ss-w-today-rowgroup-rows", children: shown.map((m) => /* @__PURE__ */ jsx58(FixtureRow, { match: m, state: states[m.matchId], stale, ui, monitor }, m.matchId)) }),
|
|
6222
|
+
overflow > 0 && /* @__PURE__ */ jsx58("button", { type: "button", className: "ss-w-today-rowgroup-seeall", onClick: onOpen, children: ui.seeAllFixturesLabel(sorted.length) })
|
|
6223
|
+
] });
|
|
6224
|
+
}
|
|
6225
|
+
|
|
6165
6226
|
// src/components/games/ui/SearchField.tsx
|
|
6166
6227
|
import { useCallback as useCallback14, useRef as useRef18 } from "react";
|
|
6167
6228
|
|
|
6168
6229
|
// src/components/games/ui/icons.tsx
|
|
6169
|
-
import { jsx as
|
|
6170
|
-
var svg = (size, children, fill = false) => /* @__PURE__ */
|
|
6230
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
6231
|
+
var svg = (size, children, fill = false) => /* @__PURE__ */ jsx59(
|
|
6171
6232
|
"svg",
|
|
6172
6233
|
{
|
|
6173
6234
|
width: size,
|
|
@@ -6182,25 +6243,25 @@ var svg = (size, children, fill = false) => /* @__PURE__ */ jsx58(
|
|
|
6182
6243
|
children
|
|
6183
6244
|
}
|
|
6184
6245
|
);
|
|
6185
|
-
var IconChevronLeft = ({ size = 20 }) => svg(size, /* @__PURE__ */
|
|
6186
|
-
var IconLock = ({ size = 14 }) => svg(size, [/* @__PURE__ */
|
|
6187
|
-
var IconCheck = ({ size = 14 }) => svg(size, /* @__PURE__ */
|
|
6188
|
-
var IconClose = ({ size = 16 }) => svg(size, /* @__PURE__ */
|
|
6189
|
-
var IconSearch = ({ size = 18 }) => svg(size, [/* @__PURE__ */
|
|
6190
|
-
var IconPlus = ({ size = 20 }) => svg(size, /* @__PURE__ */
|
|
6191
|
-
var IconBulb = ({ size = 16 }) => svg(size, [/* @__PURE__ */
|
|
6192
|
-
var IconArrowUp = ({ size = 12 }) => svg(size, /* @__PURE__ */
|
|
6193
|
-
var IconArrowDown = ({ size = 12 }) => svg(size, /* @__PURE__ */
|
|
6194
|
-
var IconCalendar = ({ size = 18 }) => svg(size, [/* @__PURE__ */
|
|
6195
|
-
var IconShield = ({ size = 18 }) => svg(size, /* @__PURE__ */
|
|
6196
|
-
var IconFlag = ({ size = 18 }) => svg(size, /* @__PURE__ */
|
|
6197
|
-
var IconBall = ({ size = 18 }) => svg(size, [/* @__PURE__ */
|
|
6198
|
-
var IconBoot = ({ size = 18 }) => svg(size, /* @__PURE__ */
|
|
6199
|
-
var IconGloves = ({ size = 18 }) => svg(size, /* @__PURE__ */
|
|
6200
|
-
var IconFlame = ({ size = 16 }) => svg(size, /* @__PURE__ */
|
|
6246
|
+
var IconChevronLeft = ({ size = 20 }) => svg(size, /* @__PURE__ */ jsx59("path", { d: "M15 18l-6-6 6-6" }));
|
|
6247
|
+
var IconLock = ({ size = 14 }) => svg(size, [/* @__PURE__ */ jsx59("rect", { x: "5", y: "11", width: "14", height: "10", rx: "2" }, "a"), /* @__PURE__ */ jsx59("path", { d: "M8 11V7a4 4 0 0 1 8 0v4" }, "b")]);
|
|
6248
|
+
var IconCheck = ({ size = 14 }) => svg(size, /* @__PURE__ */ jsx59("path", { d: "M5 12l5 5 9-10" }));
|
|
6249
|
+
var IconClose = ({ size = 16 }) => svg(size, /* @__PURE__ */ jsx59("path", { d: "M6 6l12 12M18 6L6 18" }));
|
|
6250
|
+
var IconSearch = ({ size = 18 }) => svg(size, [/* @__PURE__ */ jsx59("circle", { cx: "11", cy: "11", r: "7" }, "a"), /* @__PURE__ */ jsx59("path", { d: "M20 20l-3.5-3.5" }, "b")]);
|
|
6251
|
+
var IconPlus = ({ size = 20 }) => svg(size, /* @__PURE__ */ jsx59("path", { d: "M12 5v14M5 12h14" }));
|
|
6252
|
+
var IconBulb = ({ size = 16 }) => svg(size, [/* @__PURE__ */ jsx59("path", { d: "M9 18h6M10 21h4" }, "a"), /* @__PURE__ */ jsx59("path", { d: "M12 3a6 6 0 0 0-3.5 10.9V16h7v-2.1A6 6 0 0 0 12 3z" }, "b")]);
|
|
6253
|
+
var IconArrowUp = ({ size = 12 }) => svg(size, /* @__PURE__ */ jsx59("path", { d: "M12 19V5M5 12l7-7 7 7" }));
|
|
6254
|
+
var IconArrowDown = ({ size = 12 }) => svg(size, /* @__PURE__ */ jsx59("path", { d: "M12 5v14M19 12l-7 7-7-7" }));
|
|
6255
|
+
var IconCalendar = ({ size = 18 }) => svg(size, [/* @__PURE__ */ jsx59("rect", { x: "4", y: "5", width: "16", height: "15", rx: "2" }, "a"), /* @__PURE__ */ jsx59("path", { d: "M4 10h16M9 3v4M15 3v4" }, "b")]);
|
|
6256
|
+
var IconShield = ({ size = 18 }) => svg(size, /* @__PURE__ */ jsx59("path", { d: "M12 3l7 3v6c0 5-3 8-7 9-4-1-7-4-7-9V6z" }));
|
|
6257
|
+
var IconFlag = ({ size = 18 }) => svg(size, /* @__PURE__ */ jsx59("path", { d: "M5 21V4M5 4h12l-2 4 2 4H5" }));
|
|
6258
|
+
var IconBall = ({ size = 18 }) => svg(size, [/* @__PURE__ */ jsx59("circle", { cx: "12", cy: "12", r: "9" }, "a"), /* @__PURE__ */ jsx59("path", { d: "M12 7l4 3-1.5 4.5h-5L8 10z" }, "b")]);
|
|
6259
|
+
var IconBoot = ({ size = 18 }) => svg(size, /* @__PURE__ */ jsx59("path", { d: "M4 6h6l1 6 8 3v3H4z" }));
|
|
6260
|
+
var IconGloves = ({ size = 18 }) => svg(size, /* @__PURE__ */ jsx59("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" }));
|
|
6261
|
+
var IconFlame = ({ size = 16 }) => svg(size, /* @__PURE__ */ jsx59("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);
|
|
6201
6262
|
|
|
6202
6263
|
// src/components/games/ui/SearchField.tsx
|
|
6203
|
-
import { jsx as
|
|
6264
|
+
import { jsx as jsx60, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
6204
6265
|
function SearchField({ id, label, labelHidden = false, placeholder, value, onChange, disabled, inputRef, onKeyDown, clearLabel }) {
|
|
6205
6266
|
const localRef = useRef18(null);
|
|
6206
6267
|
const setInputRef = useCallback14((node) => {
|
|
@@ -6208,11 +6269,11 @@ function SearchField({ id, label, labelHidden = false, placeholder, value, onCha
|
|
|
6208
6269
|
if (typeof inputRef === "function") inputRef(node);
|
|
6209
6270
|
else if (inputRef) inputRef.current = node;
|
|
6210
6271
|
}, [inputRef]);
|
|
6211
|
-
return /* @__PURE__ */
|
|
6212
|
-
/* @__PURE__ */
|
|
6213
|
-
/* @__PURE__ */
|
|
6214
|
-
/* @__PURE__ */
|
|
6215
|
-
/* @__PURE__ */
|
|
6272
|
+
return /* @__PURE__ */ jsxs54("div", { className: "ss-g-search", children: [
|
|
6273
|
+
/* @__PURE__ */ jsx60("label", { htmlFor: id, className: labelHidden ? "ss-g-sr" : "ss-g-search-label", children: label }),
|
|
6274
|
+
/* @__PURE__ */ jsxs54("div", { className: "ss-g-search-box", children: [
|
|
6275
|
+
/* @__PURE__ */ jsx60(IconSearch, {}),
|
|
6276
|
+
/* @__PURE__ */ jsx60(
|
|
6216
6277
|
"input",
|
|
6217
6278
|
{
|
|
6218
6279
|
id,
|
|
@@ -6226,7 +6287,7 @@ function SearchField({ id, label, labelHidden = false, placeholder, value, onCha
|
|
|
6226
6287
|
onChange: (e) => onChange(e.target.value)
|
|
6227
6288
|
}
|
|
6228
6289
|
),
|
|
6229
|
-
clearLabel && value.length > 0 ? /* @__PURE__ */
|
|
6290
|
+
clearLabel && value.length > 0 ? /* @__PURE__ */ jsx60(
|
|
6230
6291
|
"button",
|
|
6231
6292
|
{
|
|
6232
6293
|
type: "button",
|
|
@@ -6236,7 +6297,7 @@ function SearchField({ id, label, labelHidden = false, placeholder, value, onCha
|
|
|
6236
6297
|
onChange("");
|
|
6237
6298
|
localRef.current?.focus();
|
|
6238
6299
|
},
|
|
6239
|
-
children: /* @__PURE__ */
|
|
6300
|
+
children: /* @__PURE__ */ jsx60(IconClose, { size: 11 })
|
|
6240
6301
|
}
|
|
6241
6302
|
) : null
|
|
6242
6303
|
] })
|
|
@@ -6244,7 +6305,7 @@ function SearchField({ id, label, labelHidden = false, placeholder, value, onCha
|
|
|
6244
6305
|
}
|
|
6245
6306
|
|
|
6246
6307
|
// src/components/TodayPanel.tsx
|
|
6247
|
-
import { Fragment as Fragment7, jsx as
|
|
6308
|
+
import { Fragment as Fragment7, jsx as jsx61, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
6248
6309
|
function TodayPanel({ discovery, ui, monitor }) {
|
|
6249
6310
|
const { groups, states, stale, starLeague } = discovery;
|
|
6250
6311
|
const searchId = useId2();
|
|
@@ -6275,18 +6336,38 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
6275
6336
|
acc[g.competitionName] = (acc[g.competitionName] ?? 0) + 1;
|
|
6276
6337
|
return acc;
|
|
6277
6338
|
}, {});
|
|
6339
|
+
const rowedCandidates = [];
|
|
6340
|
+
const tiledCandidates = [];
|
|
6341
|
+
{
|
|
6342
|
+
let budget = SECTION_ROW_BUDGET;
|
|
6343
|
+
let overBudget = false;
|
|
6344
|
+
for (const group of placement.candidates) {
|
|
6345
|
+
const rows = rowsFor(group, states, stale);
|
|
6346
|
+
if (rows === 0) {
|
|
6347
|
+
tiledCandidates.push(group);
|
|
6348
|
+
continue;
|
|
6349
|
+
}
|
|
6350
|
+
if (!overBudget && rows <= budget) {
|
|
6351
|
+
rowedCandidates.push(group);
|
|
6352
|
+
budget -= rows;
|
|
6353
|
+
} else {
|
|
6354
|
+
overBudget = true;
|
|
6355
|
+
tiledCandidates.push(group);
|
|
6356
|
+
}
|
|
6357
|
+
}
|
|
6358
|
+
}
|
|
6278
6359
|
const openIndex = selectedCompetitionId === null ? -1 : placement.order.findIndex((g) => g.competitionId === selectedCompetitionId);
|
|
6279
6360
|
const openGroup = openIndex === -1 ? void 0 : placement.order[openIndex];
|
|
6280
6361
|
useEffect21(() => {
|
|
6281
6362
|
if (selectedCompetitionId !== null && openGroup === void 0) setSelectedCompetitionId(null);
|
|
6282
6363
|
}, [selectedCompetitionId, openGroup]);
|
|
6283
6364
|
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);
|
|
6284
|
-
const liveBand = liveRows.length > 0 && /* @__PURE__ */
|
|
6285
|
-
/* @__PURE__ */
|
|
6286
|
-
/* @__PURE__ */
|
|
6365
|
+
const liveBand = liveRows.length > 0 && /* @__PURE__ */ jsxs55(Fragment7, { children: [
|
|
6366
|
+
/* @__PURE__ */ jsxs55("div", { className: "ss-w-sec-head", children: [
|
|
6367
|
+
/* @__PURE__ */ jsx61("span", { className: "ss-w-sec-dot", "aria-hidden": "true" }),
|
|
6287
6368
|
ui.sectionLive
|
|
6288
6369
|
] }),
|
|
6289
|
-
/* @__PURE__ */
|
|
6370
|
+
/* @__PURE__ */ jsx61("div", { className: "ss-w-today-live", children: liveRows.map(({ match }) => /* @__PURE__ */ jsx61(
|
|
6290
6371
|
FixtureRow,
|
|
6291
6372
|
{
|
|
6292
6373
|
match,
|
|
@@ -6299,10 +6380,10 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
6299
6380
|
)) })
|
|
6300
6381
|
] });
|
|
6301
6382
|
if (openGroup !== void 0) {
|
|
6302
|
-
return /* @__PURE__ */
|
|
6303
|
-
stale && /* @__PURE__ */
|
|
6383
|
+
return /* @__PURE__ */ jsx61("div", { className: "ss-w-today-root", children: /* @__PURE__ */ jsxs55("div", { className: "ss-w-mon-list", children: [
|
|
6384
|
+
stale && /* @__PURE__ */ jsx61("div", { className: "ss-w-stale", children: ui.staleStates }),
|
|
6304
6385
|
liveBand,
|
|
6305
|
-
/* @__PURE__ */
|
|
6386
|
+
/* @__PURE__ */ jsx61(
|
|
6306
6387
|
LeagueDetail,
|
|
6307
6388
|
{
|
|
6308
6389
|
group: openGroup,
|
|
@@ -6323,11 +6404,11 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
6323
6404
|
}
|
|
6324
6405
|
const searching = query.trim().length > 0;
|
|
6325
6406
|
const searchResults = searching ? placement.order.filter((g) => matchesQuery(g, query)) : [];
|
|
6326
|
-
return /* @__PURE__ */
|
|
6327
|
-
/* @__PURE__ */
|
|
6328
|
-
stale && /* @__PURE__ */
|
|
6407
|
+
return /* @__PURE__ */ jsxs55("div", { className: "ss-w-today-root", children: [
|
|
6408
|
+
/* @__PURE__ */ jsxs55("div", { className: "ss-w-mon-list", children: [
|
|
6409
|
+
stale && /* @__PURE__ */ jsx61("div", { className: "ss-w-stale", children: ui.staleStates }),
|
|
6329
6410
|
!searching && liveBand,
|
|
6330
|
-
/* @__PURE__ */
|
|
6411
|
+
/* @__PURE__ */ jsx61(
|
|
6331
6412
|
SearchField,
|
|
6332
6413
|
{
|
|
6333
6414
|
id: searchId,
|
|
@@ -6339,19 +6420,19 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
6339
6420
|
clearLabel: ui.clearSearchLabel
|
|
6340
6421
|
}
|
|
6341
6422
|
),
|
|
6342
|
-
searching ? searchResults.length === 0 ? /* @__PURE__ */
|
|
6343
|
-
/* @__PURE__ */
|
|
6344
|
-
/* @__PURE__ */
|
|
6345
|
-
/* @__PURE__ */
|
|
6423
|
+
searching ? searchResults.length === 0 ? /* @__PURE__ */ jsx61("div", { className: "ss-w-today-empty", children: ui.noLeagueResults }) : /* @__PURE__ */ jsx61(Fragment7, { children: searchResults.map((group) => /* @__PURE__ */ jsxs55("div", { className: "ss-w-today-search-block", children: [
|
|
6424
|
+
/* @__PURE__ */ jsxs55("div", { className: "ss-w-today-search-group", children: [
|
|
6425
|
+
/* @__PURE__ */ jsx61(Crest2, { url: group.competitionImagePath ?? void 0, name: group.competitionName, kind: "comp" }),
|
|
6426
|
+
/* @__PURE__ */ jsxs55("span", { className: "ss-w-today-search-group-name", children: [
|
|
6346
6427
|
group.competitionName,
|
|
6347
|
-
(nameCounts[group.competitionName] ?? 0) > 1 && group.competitionCountry ? /* @__PURE__ */
|
|
6428
|
+
(nameCounts[group.competitionName] ?? 0) > 1 && group.competitionCountry ? /* @__PURE__ */ jsxs55("span", { className: "ss-w-today-tile-country", children: [
|
|
6348
6429
|
" (",
|
|
6349
6430
|
group.competitionCountry,
|
|
6350
6431
|
")"
|
|
6351
6432
|
] }) : null
|
|
6352
6433
|
] })
|
|
6353
6434
|
] }),
|
|
6354
|
-
matchingFixtures(group, query).map((match) => /* @__PURE__ */
|
|
6435
|
+
matchingFixtures(group, query).map((match) => /* @__PURE__ */ jsx61(
|
|
6355
6436
|
"div",
|
|
6356
6437
|
{
|
|
6357
6438
|
role: "button",
|
|
@@ -6365,29 +6446,47 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
6365
6446
|
setSelectedCompetitionId(group.competitionId);
|
|
6366
6447
|
}
|
|
6367
6448
|
},
|
|
6368
|
-
children: /* @__PURE__ */
|
|
6449
|
+
children: /* @__PURE__ */ jsx61(FixtureRow, { match, state: states[match.matchId], stale, ui, monitor })
|
|
6369
6450
|
},
|
|
6370
6451
|
match.matchId
|
|
6371
6452
|
))
|
|
6372
|
-
] }, group.competitionId)) }) : /* @__PURE__ */
|
|
6373
|
-
/* @__PURE__ */
|
|
6453
|
+
] }, group.competitionId)) }) : /* @__PURE__ */ jsxs55(Fragment7, { children: [
|
|
6454
|
+
/* @__PURE__ */ jsxs55("div", { className: "ss-w-today-sec", children: [
|
|
6374
6455
|
placement.personal ? ui.yourLeagues : ui.topLeagues,
|
|
6375
|
-
!placement.personal && /* @__PURE__ */
|
|
6456
|
+
!placement.personal && /* @__PURE__ */ jsx61("span", { className: "ss-w-today-sec-sub", children: ui.topLeaguesSub })
|
|
6376
6457
|
] }),
|
|
6377
|
-
/* @__PURE__ */
|
|
6378
|
-
|
|
6379
|
-
|
|
6380
|
-
|
|
6381
|
-
|
|
6382
|
-
|
|
6383
|
-
|
|
6384
|
-
|
|
6385
|
-
|
|
6386
|
-
|
|
6387
|
-
|
|
6388
|
-
|
|
6389
|
-
|
|
6390
|
-
|
|
6458
|
+
/* @__PURE__ */ jsxs55("div", { className: "ss-w-today-rowsection", children: [
|
|
6459
|
+
rowedCandidates.map((group) => /* @__PURE__ */ jsx61(
|
|
6460
|
+
LeagueRowGroup,
|
|
6461
|
+
{
|
|
6462
|
+
group,
|
|
6463
|
+
states,
|
|
6464
|
+
stale,
|
|
6465
|
+
cap: ROW_CAP_PER_LEAGUE,
|
|
6466
|
+
starClickable: starClickable(group, placement.pinnedCompetitionId),
|
|
6467
|
+
disambiguate: (nameCounts[group.competitionName] ?? 0) > 1,
|
|
6468
|
+
onOpen: () => setSelectedCompetitionId(group.competitionId),
|
|
6469
|
+
starTap: gridStarTap,
|
|
6470
|
+
ui,
|
|
6471
|
+
monitor
|
|
6472
|
+
},
|
|
6473
|
+
group.competitionId
|
|
6474
|
+
)),
|
|
6475
|
+
tiledCandidates.length > 0 && /* @__PURE__ */ jsx61("div", { className: "ss-w-today-tiles", children: tiledCandidates.map((group) => /* @__PURE__ */ jsx61(
|
|
6476
|
+
LeagueTile,
|
|
6477
|
+
{
|
|
6478
|
+
group,
|
|
6479
|
+
starClickable: starClickable(group, placement.pinnedCompetitionId),
|
|
6480
|
+
disambiguate: (nameCounts[group.competitionName] ?? 0) > 1,
|
|
6481
|
+
onOpen: () => setSelectedCompetitionId(group.competitionId),
|
|
6482
|
+
starTap: gridStarTap,
|
|
6483
|
+
ui
|
|
6484
|
+
},
|
|
6485
|
+
group.competitionId
|
|
6486
|
+
)) })
|
|
6487
|
+
] }),
|
|
6488
|
+
/* @__PURE__ */ jsx61("div", { className: "ss-w-today-sec", children: ui.allLeagues }),
|
|
6489
|
+
/* @__PURE__ */ jsx61("div", { className: "ss-w-today-tiles", children: placement.others.map((group) => /* @__PURE__ */ jsx61(
|
|
6391
6490
|
LeagueTile,
|
|
6392
6491
|
{
|
|
6393
6492
|
group,
|
|
@@ -6401,7 +6500,7 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
6401
6500
|
)) })
|
|
6402
6501
|
] })
|
|
6403
6502
|
] }),
|
|
6404
|
-
toast !== null && /* @__PURE__ */
|
|
6503
|
+
toast !== null && /* @__PURE__ */ jsx61("p", { className: "ss-w-today-toast", role: "status", "aria-live": "polite", children: toast === "starred" ? ui.starredToast : ui.unstarredToast })
|
|
6405
6504
|
] });
|
|
6406
6505
|
}
|
|
6407
6506
|
|
|
@@ -6409,9 +6508,9 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
6409
6508
|
import { useEffect as useEffect25, useState as useState43 } from "react";
|
|
6410
6509
|
|
|
6411
6510
|
// src/components/GamesLoginWall.tsx
|
|
6412
|
-
import { jsx as
|
|
6511
|
+
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
6413
6512
|
function GamesLoginWall({ ui }) {
|
|
6414
|
-
return /* @__PURE__ */
|
|
6513
|
+
return /* @__PURE__ */ jsx62("div", { className: "ss-w-mon-list", children: /* @__PURE__ */ jsx62("div", { className: "ss-w-games-wall", children: /* @__PURE__ */ jsx62("p", { children: ui.gamesLoginRequired }) }) });
|
|
6415
6514
|
}
|
|
6416
6515
|
|
|
6417
6516
|
// src/components/GamesHub.tsx
|
|
@@ -6431,74 +6530,74 @@ function splitName(full) {
|
|
|
6431
6530
|
}
|
|
6432
6531
|
|
|
6433
6532
|
// src/components/GameTileArt.tsx
|
|
6434
|
-
import { Fragment as Fragment8, jsx as
|
|
6533
|
+
import { Fragment as Fragment8, jsx as jsx63, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
6435
6534
|
function GameTileArt({ gameId }) {
|
|
6436
|
-
return /* @__PURE__ */
|
|
6535
|
+
return /* @__PURE__ */ jsx63("svg", { className: "ss-g-art", viewBox: "0 0 120 74", "aria-hidden": "true", children: ART[gameId] ?? ART.default });
|
|
6437
6536
|
}
|
|
6438
|
-
var head = (cx, cy, r, cls = "ss-g-art-fg") => /* @__PURE__ */
|
|
6439
|
-
/* @__PURE__ */
|
|
6440
|
-
/* @__PURE__ */
|
|
6537
|
+
var head = (cx, cy, r, cls = "ss-g-art-fg") => /* @__PURE__ */ jsxs56("g", { className: cls, children: [
|
|
6538
|
+
/* @__PURE__ */ jsx63("circle", { cx, cy: cy - r * 0.3, r: r * 0.45 }),
|
|
6539
|
+
/* @__PURE__ */ jsx63("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` })
|
|
6441
6540
|
] });
|
|
6442
6541
|
var ART = {
|
|
6443
|
-
"mystery-tiger": /* @__PURE__ */
|
|
6542
|
+
"mystery-tiger": /* @__PURE__ */ jsxs56(Fragment8, { children: [
|
|
6444
6543
|
head(60, 38, 26, "ss-g-art-fg"),
|
|
6445
|
-
/* @__PURE__ */
|
|
6544
|
+
/* @__PURE__ */ jsx63("text", { x: "60", y: "36", className: "ss-g-art-q", textAnchor: "middle", children: "?" })
|
|
6446
6545
|
] }),
|
|
6447
|
-
"higher-or-lower": /* @__PURE__ */
|
|
6546
|
+
"higher-or-lower": /* @__PURE__ */ jsxs56(Fragment8, { children: [
|
|
6448
6547
|
head(32, 38, 20),
|
|
6449
6548
|
head(88, 38, 20),
|
|
6450
|
-
/* @__PURE__ */
|
|
6451
|
-
/* @__PURE__ */
|
|
6549
|
+
/* @__PURE__ */ jsx63("circle", { cx: "60", cy: "37", r: "11", className: "ss-g-art-accent" }),
|
|
6550
|
+
/* @__PURE__ */ jsx63("path", { d: "M57 33l3-3 3 3M57 41l3 3 3-3", className: "ss-g-art-ink" })
|
|
6452
6551
|
] }),
|
|
6453
|
-
"guess-the-xi": /* @__PURE__ */
|
|
6454
|
-
/* @__PURE__ */
|
|
6455
|
-
[[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__ */
|
|
6552
|
+
"guess-the-xi": /* @__PURE__ */ jsxs56(Fragment8, { children: [
|
|
6553
|
+
/* @__PURE__ */ jsx63("rect", { x: "8", y: "4", width: "104", height: "66", rx: "6", className: "ss-g-art-pitch" }),
|
|
6554
|
+
[[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__ */ jsx63("circle", { cx: x, cy: y, r: "4", className: a ? "ss-g-art-accent" : "ss-g-art-dot" }, i))
|
|
6456
6555
|
] }),
|
|
6457
|
-
"daily-quiz": /* @__PURE__ */
|
|
6458
|
-
"career-path": /* @__PURE__ */
|
|
6459
|
-
/* @__PURE__ */
|
|
6460
|
-
/* @__PURE__ */
|
|
6461
|
-
/* @__PURE__ */
|
|
6462
|
-
/* @__PURE__ */
|
|
6463
|
-
/* @__PURE__ */
|
|
6556
|
+
"daily-quiz": /* @__PURE__ */ jsx63(Fragment8, { children: [[14, 8], [62, 8], [14, 40], [62, 40]].map(([x, y], i) => /* @__PURE__ */ jsx63("rect", { x, y, width: "44", height: "26", rx: "5", className: i === 1 ? "ss-g-art-correct" : "ss-g-art-block" }, i)) }),
|
|
6557
|
+
"career-path": /* @__PURE__ */ jsxs56(Fragment8, { children: [
|
|
6558
|
+
/* @__PURE__ */ jsx63("path", { d: "M18 22h24v10c0 7-5 11-12 13-7-2-12-6-12-13z", className: "ss-g-art-fg" }),
|
|
6559
|
+
/* @__PURE__ */ jsx63("path", { d: "M48 37h8M84 37h8", className: "ss-g-art-line" }),
|
|
6560
|
+
/* @__PURE__ */ jsx63("path", { d: "M60 22h24v10c0 7-5 11-12 13-7-2-12-6-12-13z", className: "ss-g-art-fg" }),
|
|
6561
|
+
/* @__PURE__ */ jsx63("rect", { x: "96", y: "22", width: "18", height: "26", rx: "4", className: "ss-g-art-dash" }),
|
|
6562
|
+
/* @__PURE__ */ jsx63("text", { x: "105", y: "40", className: "ss-g-art-q", textAnchor: "middle", children: "?" })
|
|
6464
6563
|
] }),
|
|
6465
|
-
"beat-the-grid": /* @__PURE__ */
|
|
6466
|
-
"matchday-predictor": /* @__PURE__ */
|
|
6467
|
-
/* @__PURE__ */
|
|
6468
|
-
/* @__PURE__ */
|
|
6469
|
-
/* @__PURE__ */
|
|
6470
|
-
/* @__PURE__ */
|
|
6564
|
+
"beat-the-grid": /* @__PURE__ */ jsx63(Fragment8, { children: [0, 1, 2].flatMap((r) => [0, 1, 2].map((c) => /* @__PURE__ */ jsx63("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}`))) }),
|
|
6565
|
+
"matchday-predictor": /* @__PURE__ */ jsxs56(Fragment8, { children: [
|
|
6566
|
+
/* @__PURE__ */ jsx63("path", { d: "M10 20h20v9c0 6-4 9-10 11-6-2-10-5-10-11z", className: "ss-g-art-fg" }),
|
|
6567
|
+
/* @__PURE__ */ jsx63("rect", { x: "38", y: "22", width: "18", height: "24", rx: "4", className: "ss-g-art-accent-stroke" }),
|
|
6568
|
+
/* @__PURE__ */ jsx63("rect", { x: "64", y: "22", width: "18", height: "24", rx: "4", className: "ss-g-art-dash" }),
|
|
6569
|
+
/* @__PURE__ */ jsx63("path", { d: "M90 20h20v9c0 6-4 9-10 11-6-2-10-5-10-11z", className: "ss-g-art-fg" })
|
|
6471
6570
|
] }),
|
|
6472
|
-
"starting-xi": /* @__PURE__ */
|
|
6473
|
-
/* @__PURE__ */
|
|
6474
|
-
[[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__ */
|
|
6571
|
+
"starting-xi": /* @__PURE__ */ jsxs56(Fragment8, { children: [
|
|
6572
|
+
/* @__PURE__ */ jsx63("rect", { x: "8", y: "4", width: "104", height: "66", rx: "6", className: "ss-g-art-pitch" }),
|
|
6573
|
+
[[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__ */ jsx63("circle", { cx: x, cy: y, r: "5", className: i < 7 ? "ss-g-art-accent" : "ss-g-art-dash" }, i))
|
|
6475
6574
|
] }),
|
|
6476
|
-
"stat-ladder": /* @__PURE__ */
|
|
6477
|
-
"fan-motm": /* @__PURE__ */
|
|
6478
|
-
/* @__PURE__ */
|
|
6575
|
+
"stat-ladder": /* @__PURE__ */ jsx63(Fragment8, { children: [[20, 70], [34, 52], [48, 34]].map(([y, w], i) => /* @__PURE__ */ jsx63("rect", { x: "24", y, width: w, height: "12", rx: "3", className: i === 1 ? "ss-g-art-accent" : "ss-g-art-block" }, i)) }),
|
|
6576
|
+
"fan-motm": /* @__PURE__ */ jsxs56(Fragment8, { children: [
|
|
6577
|
+
/* @__PURE__ */ jsx63("circle", { cx: "60", cy: "37", r: "26", className: "ss-g-art-accent-stroke" }),
|
|
6479
6578
|
head(60, 40, 18),
|
|
6480
|
-
/* @__PURE__ */
|
|
6579
|
+
/* @__PURE__ */ jsx63("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" })
|
|
6481
6580
|
] }),
|
|
6482
|
-
default: /* @__PURE__ */
|
|
6581
|
+
default: /* @__PURE__ */ jsx63("circle", { cx: "60", cy: "37", r: "22", className: "ss-g-art-fg" })
|
|
6483
6582
|
};
|
|
6484
6583
|
|
|
6485
6584
|
// src/components/games/ui/Chip.tsx
|
|
6486
|
-
import { jsx as
|
|
6585
|
+
import { jsx as jsx64, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
6487
6586
|
function Chip({ variant = "neutral", icon, children, className }) {
|
|
6488
|
-
return /* @__PURE__ */
|
|
6587
|
+
return /* @__PURE__ */ jsxs57("span", { className: `ss-g-chip ss-g-chip--${variant}${className ? ` ${className}` : ""}`, children: [
|
|
6489
6588
|
icon,
|
|
6490
6589
|
children
|
|
6491
6590
|
] });
|
|
6492
6591
|
}
|
|
6493
6592
|
function StatStack({ value, label }) {
|
|
6494
|
-
return /* @__PURE__ */
|
|
6495
|
-
/* @__PURE__ */
|
|
6496
|
-
/* @__PURE__ */
|
|
6593
|
+
return /* @__PURE__ */ jsxs57("span", { className: "ss-g-statstack", children: [
|
|
6594
|
+
/* @__PURE__ */ jsx64("span", { className: "ss-g-statstack-v", children: value }),
|
|
6595
|
+
/* @__PURE__ */ jsx64("span", { className: "ss-g-statstack-l", children: label })
|
|
6497
6596
|
] });
|
|
6498
6597
|
}
|
|
6499
6598
|
|
|
6500
6599
|
// src/components/GameTile.tsx
|
|
6501
|
-
import { Fragment as Fragment9, jsx as
|
|
6600
|
+
import { Fragment as Fragment9, jsx as jsx65, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
6502
6601
|
function tileStatus(game, ui) {
|
|
6503
6602
|
switch (game.status) {
|
|
6504
6603
|
case "locked":
|
|
@@ -6522,38 +6621,38 @@ function GameTile({ game, onOpen, ui, variant = "tile" }) {
|
|
|
6522
6621
|
const status = tileStatus(game, ui);
|
|
6523
6622
|
const disabled = DISABLED.has(game.status);
|
|
6524
6623
|
const title = gameTitle(game, ui.games.titles);
|
|
6525
|
-
const body = variant === "hero" ? /* @__PURE__ */
|
|
6526
|
-
/* @__PURE__ */
|
|
6527
|
-
/* @__PURE__ */
|
|
6528
|
-
status.tone === "new" && /* @__PURE__ */
|
|
6529
|
-
/* @__PURE__ */
|
|
6530
|
-
/* @__PURE__ */
|
|
6531
|
-
status.tone === "success" ? /* @__PURE__ */
|
|
6624
|
+
const body = variant === "hero" ? /* @__PURE__ */ jsxs58(Fragment9, { children: [
|
|
6625
|
+
/* @__PURE__ */ jsxs58("span", { className: "ss-g-hero-text", children: [
|
|
6626
|
+
/* @__PURE__ */ jsx65("span", { className: "ss-g-hero-eyebrow", children: ui.games.dailyChallenge }),
|
|
6627
|
+
status.tone === "new" && /* @__PURE__ */ jsx65(Chip, { variant: "badge", children: ui.games.newToday }),
|
|
6628
|
+
/* @__PURE__ */ jsx65("span", { className: "ss-g-hero-title", children: title }),
|
|
6629
|
+
/* @__PURE__ */ jsx65("span", { className: "ss-g-hero-sub", children: ui.games.taglines[game.gameId] ?? "" }),
|
|
6630
|
+
status.tone === "success" ? /* @__PURE__ */ jsx65("span", { className: "ss-g-tile-status", "data-tone": "success", children: status.text }) : /* @__PURE__ */ jsxs58("span", { className: "ss-g-hero-cta", children: [
|
|
6532
6631
|
status.tone === "accent" ? ui.games.resume : ui.games.playNow,
|
|
6533
6632
|
" \u2192"
|
|
6534
6633
|
] })
|
|
6535
6634
|
] }),
|
|
6536
|
-
/* @__PURE__ */
|
|
6537
|
-
] }) : variant === "wide" ? /* @__PURE__ */
|
|
6538
|
-
/* @__PURE__ */
|
|
6539
|
-
/* @__PURE__ */
|
|
6540
|
-
/* @__PURE__ */
|
|
6541
|
-
/* @__PURE__ */
|
|
6542
|
-
status.tone === "new" && /* @__PURE__ */
|
|
6635
|
+
/* @__PURE__ */ jsx65("span", { className: "ss-g-hero-art", children: /* @__PURE__ */ jsx65(GameTileArt, { gameId: game.gameId }) })
|
|
6636
|
+
] }) : variant === "wide" ? /* @__PURE__ */ jsxs58(Fragment9, { children: [
|
|
6637
|
+
/* @__PURE__ */ jsx65("span", { className: "ss-g-wide-art", children: /* @__PURE__ */ jsx65(GameTileArt, { gameId: game.gameId }) }),
|
|
6638
|
+
/* @__PURE__ */ jsxs58("span", { className: "ss-g-wide-text", children: [
|
|
6639
|
+
/* @__PURE__ */ jsx65("span", { className: "ss-g-tile-title", children: title }),
|
|
6640
|
+
/* @__PURE__ */ jsx65("span", { className: "ss-g-tile-status", "data-tone": status.tone, children: status.text }),
|
|
6641
|
+
status.tone === "new" && /* @__PURE__ */ jsx65(Chip, { variant: "badge", children: ui.games.newToday })
|
|
6543
6642
|
] }),
|
|
6544
|
-
/* @__PURE__ */
|
|
6545
|
-
] }) : /* @__PURE__ */
|
|
6546
|
-
/* @__PURE__ */
|
|
6547
|
-
/* @__PURE__ */
|
|
6548
|
-
/* @__PURE__ */
|
|
6643
|
+
/* @__PURE__ */ jsx65("span", { className: "ss-g-wide-chev", children: /* @__PURE__ */ jsx65(IconChevronLeft, { size: 18 }) })
|
|
6644
|
+
] }) : /* @__PURE__ */ jsxs58(Fragment9, { children: [
|
|
6645
|
+
/* @__PURE__ */ jsx65("span", { className: "ss-g-tile-art", children: /* @__PURE__ */ jsx65(GameTileArt, { gameId: game.gameId }) }),
|
|
6646
|
+
/* @__PURE__ */ jsx65("span", { className: "ss-g-tile-title", children: title }),
|
|
6647
|
+
/* @__PURE__ */ jsx65("span", { className: "ss-g-tile-status", "data-tone": status.tone, children: status.text })
|
|
6549
6648
|
] });
|
|
6550
6649
|
const cls = `ss-g-tile ss-g-tile--${variant}`;
|
|
6551
|
-
if (disabled) return /* @__PURE__ */
|
|
6552
|
-
return /* @__PURE__ */
|
|
6650
|
+
if (disabled) return /* @__PURE__ */ jsx65("div", { className: cls, "data-disabled": true, "aria-disabled": "true", children: body });
|
|
6651
|
+
return /* @__PURE__ */ jsx65("button", { type: "button", className: cls, "aria-label": `${title} \u2014 ${status.text}`, onClick: () => onOpen(game), children: body });
|
|
6553
6652
|
}
|
|
6554
6653
|
|
|
6555
6654
|
// src/components/GamesHub.tsx
|
|
6556
|
-
import { Fragment as Fragment10, jsx as
|
|
6655
|
+
import { Fragment as Fragment10, jsx as jsx66, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
6557
6656
|
var PLAYABLE = /* @__PURE__ */ new Set(["available", "in_progress"]);
|
|
6558
6657
|
var DONE = /* @__PURE__ */ new Set(["played", "graded"]);
|
|
6559
6658
|
function pickHeroGame(games) {
|
|
@@ -6579,49 +6678,49 @@ function GamesHub({ games, myWeeklyRow, weeklyPrize, onOpen, ui }) {
|
|
|
6579
6678
|
const kickoffs = fixtures.map((g) => g.kickoffUtc).filter((k) => !!k).sort();
|
|
6580
6679
|
const todayPts = games.filter((g) => DONE.has(g.status)).reduce((s, g) => s + (g.score ?? 0), 0);
|
|
6581
6680
|
const dash = "\u2014";
|
|
6582
|
-
return /* @__PURE__ */
|
|
6583
|
-
/* @__PURE__ */
|
|
6584
|
-
/* @__PURE__ */
|
|
6585
|
-
/* @__PURE__ */
|
|
6586
|
-
/* @__PURE__ */
|
|
6587
|
-
myWeeklyRow ? /* @__PURE__ */
|
|
6588
|
-
/* @__PURE__ */
|
|
6681
|
+
return /* @__PURE__ */ jsxs59("div", { className: "ss-g-hub", children: [
|
|
6682
|
+
/* @__PURE__ */ jsxs59("div", { className: "ss-g-stats", children: [
|
|
6683
|
+
/* @__PURE__ */ jsxs59("div", { className: "ss-g-stat", children: [
|
|
6684
|
+
/* @__PURE__ */ jsx66("span", { className: "ss-g-stat-l", children: ui.games.statStreak }),
|
|
6685
|
+
/* @__PURE__ */ jsxs59("span", { className: "ss-g-stat-v", "data-testid": "stat-streak", children: [
|
|
6686
|
+
myWeeklyRow ? /* @__PURE__ */ jsxs59(Fragment10, { children: [
|
|
6687
|
+
/* @__PURE__ */ jsx66(IconFlame, {}),
|
|
6589
6688
|
myWeeklyRow.currentStreak
|
|
6590
6689
|
] }) : dash,
|
|
6591
|
-
myWeeklyRow && /* @__PURE__ */
|
|
6690
|
+
myWeeklyRow && /* @__PURE__ */ jsx66("small", { children: ui.games.unitDays })
|
|
6592
6691
|
] })
|
|
6593
6692
|
] }),
|
|
6594
|
-
/* @__PURE__ */
|
|
6595
|
-
/* @__PURE__ */
|
|
6596
|
-
/* @__PURE__ */
|
|
6693
|
+
/* @__PURE__ */ jsxs59("div", { className: "ss-g-stat", children: [
|
|
6694
|
+
/* @__PURE__ */ jsx66("span", { className: "ss-g-stat-l", children: ui.games.statToday }),
|
|
6695
|
+
/* @__PURE__ */ jsxs59("span", { className: "ss-g-stat-v ss-g-stat-v--accent", "data-testid": "stat-today", children: [
|
|
6597
6696
|
ui.games.formatPts(todayPts),
|
|
6598
|
-
/* @__PURE__ */
|
|
6697
|
+
/* @__PURE__ */ jsx66("small", { children: ui.games.unitPts })
|
|
6599
6698
|
] })
|
|
6600
6699
|
] }),
|
|
6601
|
-
/* @__PURE__ */
|
|
6602
|
-
/* @__PURE__ */
|
|
6603
|
-
/* @__PURE__ */
|
|
6700
|
+
/* @__PURE__ */ jsxs59("div", { className: "ss-g-stat", children: [
|
|
6701
|
+
/* @__PURE__ */ jsx66("span", { className: "ss-g-stat-l", children: ui.games.statRank }),
|
|
6702
|
+
/* @__PURE__ */ jsxs59("span", { className: "ss-g-stat-v", "data-testid": "stat-rank", children: [
|
|
6604
6703
|
myWeeklyRow ? `#${myWeeklyRow.rank}` : dash,
|
|
6605
|
-
myWeeklyRow && /* @__PURE__ */
|
|
6704
|
+
myWeeklyRow && /* @__PURE__ */ jsx66("small", { children: ui.games.thisWeek })
|
|
6606
6705
|
] })
|
|
6607
6706
|
] })
|
|
6608
6707
|
] }),
|
|
6609
|
-
weeklyPrize && /* @__PURE__ */
|
|
6610
|
-
hero && /* @__PURE__ */
|
|
6611
|
-
(grid.length > 0 || wide) && /* @__PURE__ */
|
|
6612
|
-
/* @__PURE__ */
|
|
6613
|
-
/* @__PURE__ */
|
|
6614
|
-
/* @__PURE__ */
|
|
6708
|
+
weeklyPrize && /* @__PURE__ */ jsx66(Chip, { variant: "accent", className: "ss-g-prize", children: weeklyPrize }),
|
|
6709
|
+
hero && /* @__PURE__ */ jsx66(GameTile, { game: hero, onOpen, ui, variant: "hero" }),
|
|
6710
|
+
(grid.length > 0 || wide) && /* @__PURE__ */ jsxs59("section", { className: "ss-g-sec", children: [
|
|
6711
|
+
/* @__PURE__ */ jsxs59("div", { className: "ss-g-sec-head", children: [
|
|
6712
|
+
/* @__PURE__ */ jsx66("h3", { children: ui.games.dailyGames }),
|
|
6713
|
+
/* @__PURE__ */ jsx66("span", { children: ui.games.newSetAtMidnight })
|
|
6615
6714
|
] }),
|
|
6616
|
-
grid.length > 0 && /* @__PURE__ */
|
|
6617
|
-
wide && /* @__PURE__ */
|
|
6715
|
+
grid.length > 0 && /* @__PURE__ */ jsx66("div", { className: "ss-g-grid", children: grid.map((g) => /* @__PURE__ */ jsx66(GameTile, { game: g, onOpen, ui }, tileKey(g))) }),
|
|
6716
|
+
wide && /* @__PURE__ */ jsx66(GameTile, { game: wide, onOpen, ui, variant: "wide" })
|
|
6618
6717
|
] }),
|
|
6619
|
-
fixtures.length > 0 && /* @__PURE__ */
|
|
6620
|
-
/* @__PURE__ */
|
|
6621
|
-
/* @__PURE__ */
|
|
6622
|
-
kickoffs[0] && /* @__PURE__ */
|
|
6718
|
+
fixtures.length > 0 && /* @__PURE__ */ jsxs59("section", { className: "ss-g-sec", children: [
|
|
6719
|
+
/* @__PURE__ */ jsxs59("div", { className: "ss-g-sec-head", children: [
|
|
6720
|
+
/* @__PURE__ */ jsx66("h3", { children: ui.games.matchdayGames }),
|
|
6721
|
+
kickoffs[0] && /* @__PURE__ */ jsx66("span", { children: ui.games.kickoffAt(ui.games.formatDayTime(kickoffs[0])) })
|
|
6623
6722
|
] }),
|
|
6624
|
-
/* @__PURE__ */
|
|
6723
|
+
/* @__PURE__ */ jsx66("div", { className: "ss-g-grid", children: fixtures.map((g) => /* @__PURE__ */ jsx66(GameTile, { game: g, onOpen, ui }, tileKey(g))) })
|
|
6625
6724
|
] })
|
|
6626
6725
|
] });
|
|
6627
6726
|
}
|
|
@@ -6914,7 +7013,7 @@ function isNationCode(flag) {
|
|
|
6914
7013
|
|
|
6915
7014
|
// src/components/games/PlayerAvatar.tsx
|
|
6916
7015
|
import { useState as useState32 } from "react";
|
|
6917
|
-
import { jsx as
|
|
7016
|
+
import { jsx as jsx67 } from "react/jsx-runtime";
|
|
6918
7017
|
function initialsOf(name) {
|
|
6919
7018
|
const parts = name.trim().split(/\s+/).filter(Boolean);
|
|
6920
7019
|
const first = parts[0];
|
|
@@ -6933,39 +7032,39 @@ function PlayerAvatar({
|
|
|
6933
7032
|
}) {
|
|
6934
7033
|
const [failed, setFailed] = useState32(false);
|
|
6935
7034
|
const showImage = Boolean(imagePath) && !isPlaceholderImage(imagePath) && !failed;
|
|
6936
|
-
return /* @__PURE__ */
|
|
7035
|
+
return /* @__PURE__ */ jsx67("div", { className, "aria-hidden": "true", children: showImage ? /* @__PURE__ */ jsx67("img", { src: imagePath, alt: "", loading: "lazy", onError: () => setFailed(true) }) : /* @__PURE__ */ jsx67("span", { className: "ss-w-av-initials", children: initialsOf(name) }) });
|
|
6937
7036
|
}
|
|
6938
7037
|
|
|
6939
7038
|
// src/components/games/ui/GameHeader.tsx
|
|
6940
|
-
import { jsx as
|
|
7039
|
+
import { jsx as jsx68, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
6941
7040
|
function GameHeader({ title, eyebrow, right, onBack, backLabel }) {
|
|
6942
|
-
return /* @__PURE__ */
|
|
6943
|
-
onBack && /* @__PURE__ */
|
|
6944
|
-
/* @__PURE__ */
|
|
6945
|
-
eyebrow && /* @__PURE__ */
|
|
6946
|
-
/* @__PURE__ */
|
|
7041
|
+
return /* @__PURE__ */ jsxs60("div", { className: "ss-g-head", children: [
|
|
7042
|
+
onBack && /* @__PURE__ */ jsx68("button", { type: "button", className: "ss-g-back", "aria-label": backLabel, onClick: onBack, children: /* @__PURE__ */ jsx68(IconChevronLeft, {}) }),
|
|
7043
|
+
/* @__PURE__ */ jsxs60("div", { className: "ss-g-head-text", children: [
|
|
7044
|
+
eyebrow && /* @__PURE__ */ jsx68("span", { className: "ss-g-eyebrow", children: eyebrow }),
|
|
7045
|
+
/* @__PURE__ */ jsx68("h2", { className: "ss-g-title", children: title })
|
|
6947
7046
|
] }),
|
|
6948
|
-
right && /* @__PURE__ */
|
|
7047
|
+
right && /* @__PURE__ */ jsx68("div", { className: "ss-g-head-right", children: right })
|
|
6949
7048
|
] });
|
|
6950
7049
|
}
|
|
6951
7050
|
|
|
6952
7051
|
// src/components/games/ui/SegmentProgress.tsx
|
|
6953
|
-
import { jsx as
|
|
7052
|
+
import { jsx as jsx69, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
6954
7053
|
function SegmentProgress({ segments, ariaLabel, leftLabel, rightLabel, right }) {
|
|
6955
|
-
return /* @__PURE__ */
|
|
6956
|
-
/* @__PURE__ */
|
|
6957
|
-
(leftLabel || rightLabel) && /* @__PURE__ */
|
|
6958
|
-
/* @__PURE__ */
|
|
6959
|
-
/* @__PURE__ */
|
|
7054
|
+
return /* @__PURE__ */ jsxs61("div", { className: "ss-g-progress", children: [
|
|
7055
|
+
/* @__PURE__ */ jsxs61("div", { className: "ss-g-progress-main", children: [
|
|
7056
|
+
(leftLabel || rightLabel) && /* @__PURE__ */ jsxs61("div", { className: "ss-g-progress-labels", children: [
|
|
7057
|
+
/* @__PURE__ */ jsx69("span", { children: leftLabel }),
|
|
7058
|
+
/* @__PURE__ */ jsx69("span", { className: "ss-g-progress-rl", children: rightLabel })
|
|
6960
7059
|
] }),
|
|
6961
|
-
/* @__PURE__ */
|
|
7060
|
+
/* @__PURE__ */ jsx69(
|
|
6962
7061
|
"div",
|
|
6963
7062
|
{
|
|
6964
7063
|
className: "ss-g-segs",
|
|
6965
7064
|
role: "img",
|
|
6966
7065
|
"aria-label": ariaLabel,
|
|
6967
7066
|
style: { gridTemplateColumns: `repeat(${segments.length}, minmax(0, 1fr))` },
|
|
6968
|
-
children: segments.map((s, i) => /* @__PURE__ */
|
|
7067
|
+
children: segments.map((s, i) => /* @__PURE__ */ jsx69("span", { className: "ss-g-seg", "data-state": s }, i))
|
|
6969
7068
|
}
|
|
6970
7069
|
)
|
|
6971
7070
|
] }),
|
|
@@ -6974,12 +7073,12 @@ function SegmentProgress({ segments, ariaLabel, leftLabel, rightLabel, right })
|
|
|
6974
7073
|
}
|
|
6975
7074
|
|
|
6976
7075
|
// src/components/games/ui/AnswerTray.tsx
|
|
6977
|
-
import { Fragment as Fragment11, jsx as
|
|
7076
|
+
import { Fragment as Fragment11, jsx as jsx70, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
6978
7077
|
function AnswerTray({ id, label, placeholder, optionsLabel, options, query, onQuery, onPick, disabled, minQuery = 0 }) {
|
|
6979
7078
|
const needle = query.trim().toLowerCase();
|
|
6980
7079
|
const shown = needle.length < minQuery ? [] : needle ? options.filter((o) => o.name.toLowerCase().includes(needle)) : options;
|
|
6981
|
-
return /* @__PURE__ */
|
|
6982
|
-
/* @__PURE__ */
|
|
7080
|
+
return /* @__PURE__ */ jsxs62(Fragment11, { children: [
|
|
7081
|
+
/* @__PURE__ */ jsx70(
|
|
6983
7082
|
SearchField,
|
|
6984
7083
|
{
|
|
6985
7084
|
id,
|
|
@@ -6991,9 +7090,9 @@ function AnswerTray({ id, label, placeholder, optionsLabel, options, query, onQu
|
|
|
6991
7090
|
disabled
|
|
6992
7091
|
}
|
|
6993
7092
|
),
|
|
6994
|
-
shown.length > 0 && /* @__PURE__ */
|
|
7093
|
+
shown.length > 0 && /* @__PURE__ */ jsx70("div", { className: "ss-g-tray", role: "listbox", "aria-label": optionsLabel, children: shown.map((o) => {
|
|
6995
7094
|
const { first, last } = splitName(o.name);
|
|
6996
|
-
return /* @__PURE__ */
|
|
7095
|
+
return /* @__PURE__ */ jsxs62(
|
|
6997
7096
|
"button",
|
|
6998
7097
|
{
|
|
6999
7098
|
type: "button",
|
|
@@ -7004,10 +7103,10 @@ function AnswerTray({ id, label, placeholder, optionsLabel, options, query, onQu
|
|
|
7004
7103
|
disabled,
|
|
7005
7104
|
onClick: () => onPick(o.id),
|
|
7006
7105
|
children: [
|
|
7007
|
-
/* @__PURE__ */
|
|
7008
|
-
/* @__PURE__ */
|
|
7009
|
-
first && /* @__PURE__ */
|
|
7010
|
-
/* @__PURE__ */
|
|
7106
|
+
/* @__PURE__ */ jsx70(PlayerAvatar, { className: "ss-g-tray-av", name: o.name, imagePath: o.imagePath }),
|
|
7107
|
+
/* @__PURE__ */ jsxs62("span", { className: "ss-g-tray-name", "aria-hidden": "true", children: [
|
|
7108
|
+
first && /* @__PURE__ */ jsx70("span", { className: "ss-g-tray-first", children: first }),
|
|
7109
|
+
/* @__PURE__ */ jsx70("span", { className: "ss-g-tray-last", children: last })
|
|
7011
7110
|
] })
|
|
7012
7111
|
]
|
|
7013
7112
|
},
|
|
@@ -7018,59 +7117,59 @@ function AnswerTray({ id, label, placeholder, optionsLabel, options, query, onQu
|
|
|
7018
7117
|
}
|
|
7019
7118
|
|
|
7020
7119
|
// src/components/games/ui/FooterBar.tsx
|
|
7021
|
-
import { jsx as
|
|
7120
|
+
import { jsx as jsx71 } from "react/jsx-runtime";
|
|
7022
7121
|
function FooterBar({ children }) {
|
|
7023
|
-
return /* @__PURE__ */
|
|
7122
|
+
return /* @__PURE__ */ jsx71("div", { className: "ss-g-footer", children });
|
|
7024
7123
|
}
|
|
7025
7124
|
|
|
7026
7125
|
// src/components/games/ui/Silhouette.tsx
|
|
7027
|
-
import { jsx as
|
|
7126
|
+
import { jsx as jsx72, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
7028
7127
|
function Silhouette({ size, variant = "default" }) {
|
|
7029
|
-
return /* @__PURE__ */
|
|
7030
|
-
/* @__PURE__ */
|
|
7031
|
-
/* @__PURE__ */
|
|
7032
|
-
/* @__PURE__ */
|
|
7128
|
+
return /* @__PURE__ */ jsxs63("span", { className: `ss-g-sil ss-g-sil--${variant}`, style: { width: size, height: size }, "aria-hidden": "true", children: [
|
|
7129
|
+
/* @__PURE__ */ jsxs63("svg", { width: size * 0.86, height: size * 0.86, viewBox: "0 0 100 100", children: [
|
|
7130
|
+
/* @__PURE__ */ jsx72("circle", { cx: "50", cy: "40", r: "19", fill: "currentColor" }),
|
|
7131
|
+
/* @__PURE__ */ jsx72("path", { d: "M12 100c0-23 17-38 38-38s38 15 38 38z", fill: "currentColor" })
|
|
7033
7132
|
] }),
|
|
7034
|
-
variant === "mystery" && /* @__PURE__ */
|
|
7133
|
+
variant === "mystery" && /* @__PURE__ */ jsx72("span", { className: "ss-g-sil-q", children: "?" })
|
|
7035
7134
|
] });
|
|
7036
7135
|
}
|
|
7037
7136
|
|
|
7038
7137
|
// src/components/games/ui/GameButton.tsx
|
|
7039
|
-
import { jsx as
|
|
7138
|
+
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
7040
7139
|
function GameButton({ variant = "primary", block = false, className, type = "button", ...rest }) {
|
|
7041
7140
|
const cls = `ss-g-btn ss-g-btn--${variant}${block ? " ss-g-btn--block" : ""}${className ? ` ${className}` : ""}`;
|
|
7042
|
-
return /* @__PURE__ */
|
|
7141
|
+
return /* @__PURE__ */ jsx73("button", { type, className: cls, ...rest });
|
|
7043
7142
|
}
|
|
7044
7143
|
|
|
7045
7144
|
// src/components/games/ui/ResultCard.tsx
|
|
7046
|
-
import { jsx as
|
|
7145
|
+
import { jsx as jsx74, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
7047
7146
|
function ResultCard({ tone, title, score, detail, onBack, ui }) {
|
|
7048
|
-
return /* @__PURE__ */
|
|
7049
|
-
/* @__PURE__ */
|
|
7050
|
-
score !== void 0 && /* @__PURE__ */
|
|
7051
|
-
/* @__PURE__ */
|
|
7147
|
+
return /* @__PURE__ */ jsxs64("div", { className: "ss-g-result", "data-tone": tone, role: "status", children: [
|
|
7148
|
+
/* @__PURE__ */ jsx74("span", { className: "ss-g-result-title", children: title }),
|
|
7149
|
+
score !== void 0 && /* @__PURE__ */ jsxs64("span", { className: "ss-g-result-score", children: [
|
|
7150
|
+
/* @__PURE__ */ jsx74("span", { className: "ss-g-result-num", children: score }),
|
|
7052
7151
|
ui.games.unitPts
|
|
7053
7152
|
] }),
|
|
7054
|
-
detail && /* @__PURE__ */
|
|
7055
|
-
onBack && /* @__PURE__ */
|
|
7153
|
+
detail && /* @__PURE__ */ jsx74("span", { className: "ss-g-result-detail", children: detail }),
|
|
7154
|
+
onBack && /* @__PURE__ */ jsx74(GameButton, { variant: "outline", onClick: onBack, children: ui.games.backToGames })
|
|
7056
7155
|
] });
|
|
7057
7156
|
}
|
|
7058
7157
|
|
|
7059
7158
|
// src/components/games/ui/PointsLadderRow.tsx
|
|
7060
|
-
import { jsx as
|
|
7159
|
+
import { jsx as jsx75, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
7061
7160
|
function PointsLadderRow({ ladder, guessesUsed, ui }) {
|
|
7062
7161
|
if (!ladder || ladder.length === 0) return null;
|
|
7063
7162
|
const now = ladder[Math.min(guessesUsed, ladder.length - 1)];
|
|
7064
7163
|
const next = ladder[guessesUsed + 1];
|
|
7065
7164
|
if (now === void 0) return null;
|
|
7066
|
-
return /* @__PURE__ */
|
|
7067
|
-
/* @__PURE__ */
|
|
7068
|
-
next !== void 0 && next !== now && /* @__PURE__ */
|
|
7165
|
+
return /* @__PURE__ */ jsxs65("div", { className: "ss-g-worth", "data-testid": "points-ladder", children: [
|
|
7166
|
+
/* @__PURE__ */ jsx75("span", { className: "ss-g-worth-now", children: ui.games.worthNow(now) }),
|
|
7167
|
+
next !== void 0 && next !== now && /* @__PURE__ */ jsx75("span", { className: "ss-g-worth-next", children: ui.games.worthAfterMiss(next) })
|
|
7069
7168
|
] });
|
|
7070
7169
|
}
|
|
7071
7170
|
|
|
7072
7171
|
// src/components/games/MysteryTigerGame.tsx
|
|
7073
|
-
import { Fragment as Fragment12, jsx as
|
|
7172
|
+
import { Fragment as Fragment12, jsx as jsx76, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
7074
7173
|
function parseClientState(json) {
|
|
7075
7174
|
if (!json) return null;
|
|
7076
7175
|
try {
|
|
@@ -7192,22 +7291,22 @@ function MysteryTigerGame({
|
|
|
7192
7291
|
setQuery("");
|
|
7193
7292
|
onSubmit(JSON.stringify({ guesses: newGuesses }));
|
|
7194
7293
|
}
|
|
7195
|
-
const headerRight = !config ? void 0 : isOver ? /* @__PURE__ */
|
|
7294
|
+
const headerRight = !config ? void 0 : isOver ? /* @__PURE__ */ jsxs66(Chip, { variant: "accent", children: [
|
|
7196
7295
|
score,
|
|
7197
7296
|
" ",
|
|
7198
7297
|
ui.games.unitPts
|
|
7199
|
-
] }) : /* @__PURE__ */
|
|
7298
|
+
] }) : /* @__PURE__ */ jsx76("span", { "data-testid": "mt-chip", children: /* @__PURE__ */ jsxs66(Chip, { children: [
|
|
7200
7299
|
ui.games.guess,
|
|
7201
7300
|
" ",
|
|
7202
|
-
/* @__PURE__ */
|
|
7301
|
+
/* @__PURE__ */ jsx76("span", { className: "ss-g-num", children: guessesUsed + 1 }),
|
|
7203
7302
|
" / ",
|
|
7204
7303
|
totalGuesses
|
|
7205
7304
|
] }) });
|
|
7206
7305
|
const segments = Array.from({ length: totalGuesses }, (_, i) => i < guessesUsed ? "done" : i === guessesUsed ? "current" : "todo");
|
|
7207
7306
|
const cols = { gridTemplateColumns: `minmax(0, 1fr) repeat(${keys.length}, 42px)` };
|
|
7208
7307
|
const known = deriveKnownAttributes(guessResults, keys);
|
|
7209
|
-
return /* @__PURE__ */
|
|
7210
|
-
/* @__PURE__ */
|
|
7308
|
+
return /* @__PURE__ */ jsxs66("div", { className: "ss-g-screen ss-g-mt", "data-game": "mystery-tiger", "data-testid": "game-screen-mystery-tiger", children: [
|
|
7309
|
+
/* @__PURE__ */ jsx76(
|
|
7211
7310
|
GameHeader,
|
|
7212
7311
|
{
|
|
7213
7312
|
title: gameTitle({ gameId: "mystery-tiger" }, ui.games.titles),
|
|
@@ -7217,41 +7316,41 @@ function MysteryTigerGame({
|
|
|
7217
7316
|
backLabel: ui.back
|
|
7218
7317
|
}
|
|
7219
7318
|
),
|
|
7220
|
-
!config && /* @__PURE__ */
|
|
7221
|
-
config && /* @__PURE__ */
|
|
7222
|
-
/* @__PURE__ */
|
|
7223
|
-
!isOver && /* @__PURE__ */
|
|
7224
|
-
/* @__PURE__ */
|
|
7225
|
-
/* @__PURE__ */
|
|
7226
|
-
revealName ? /* @__PURE__ */
|
|
7227
|
-
revealName && /* @__PURE__ */
|
|
7319
|
+
!config && /* @__PURE__ */ jsx76("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading }),
|
|
7320
|
+
config && /* @__PURE__ */ jsxs66(Fragment12, { children: [
|
|
7321
|
+
/* @__PURE__ */ jsxs66("div", { className: "ss-g-body", children: [
|
|
7322
|
+
!isOver && /* @__PURE__ */ jsx76(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed, ui }),
|
|
7323
|
+
/* @__PURE__ */ jsxs66("div", { className: `ss-g-mt-card${isOver ? " ss-g-mt-card--reveal" : ""}`, children: [
|
|
7324
|
+
/* @__PURE__ */ jsxs66("div", { className: "ss-g-mt-portrait", children: [
|
|
7325
|
+
revealName ? /* @__PURE__ */ jsx76(PlayerAvatar, { className: "ss-g-mt-photo", name: revealName, imagePath: clientState?.revealedPlayerImagePath }) : /* @__PURE__ */ jsx76(Silhouette, { size: 150, variant: "mystery" }),
|
|
7326
|
+
revealName && /* @__PURE__ */ jsx76("span", { className: "ss-g-mt-reveal-name", children: revealName })
|
|
7228
7327
|
] }),
|
|
7229
|
-
/* @__PURE__ */
|
|
7230
|
-
/* @__PURE__ */
|
|
7231
|
-
/* @__PURE__ */
|
|
7328
|
+
/* @__PURE__ */ jsx76("div", { className: "ss-g-mt-known", style: { gridTemplateColumns: `repeat(${keys.length}, minmax(0, 1fr))` }, children: known.map((k) => /* @__PURE__ */ jsxs66("div", { className: "ss-g-mt-known-cell", children: [
|
|
7329
|
+
/* @__PURE__ */ jsx76("span", { className: "ss-g-mt-lab", children: t.labels[k.key] }),
|
|
7330
|
+
/* @__PURE__ */ jsx76("span", { className: "ss-g-mt-known-v", "data-state": k.state, "data-testid": `known-${k.key}`, children: k.text })
|
|
7232
7331
|
] }, k.key)) })
|
|
7233
7332
|
] }),
|
|
7234
|
-
!isOver && /* @__PURE__ */
|
|
7235
|
-
guessResults.length > 0 && /* @__PURE__ */
|
|
7236
|
-
/* @__PURE__ */
|
|
7237
|
-
/* @__PURE__ */
|
|
7238
|
-
keys.map((k) => /* @__PURE__ */
|
|
7333
|
+
!isOver && /* @__PURE__ */ jsx76(SegmentProgress, { segments, ariaLabel: t.progress(guessesUsed, totalGuesses) }),
|
|
7334
|
+
guessResults.length > 0 && /* @__PURE__ */ jsxs66("div", { className: "ss-g-mt-table", children: [
|
|
7335
|
+
/* @__PURE__ */ jsxs66("div", { className: "ss-g-mt-thead", style: cols, children: [
|
|
7336
|
+
/* @__PURE__ */ jsx76("span", { children: t.yourGuesses }),
|
|
7337
|
+
keys.map((k) => /* @__PURE__ */ jsx76("span", { children: t.labels[k] }, k))
|
|
7239
7338
|
] }),
|
|
7240
7339
|
guessResults.map((gr, i) => {
|
|
7241
7340
|
const name = config.squadPlayers.find((p) => p.id === gr.playerId)?.name ?? `#${gr.playerId}`;
|
|
7242
7341
|
const { first, last } = splitName(name);
|
|
7243
|
-
return /* @__PURE__ */
|
|
7244
|
-
/* @__PURE__ */
|
|
7245
|
-
/* @__PURE__ */
|
|
7246
|
-
/* @__PURE__ */
|
|
7247
|
-
first && /* @__PURE__ */
|
|
7248
|
-
/* @__PURE__ */
|
|
7342
|
+
return /* @__PURE__ */ jsxs66("div", { className: "ss-g-mt-row", style: cols, children: [
|
|
7343
|
+
/* @__PURE__ */ jsxs66("div", { className: "ss-g-mt-who", children: [
|
|
7344
|
+
/* @__PURE__ */ jsx76(PlayerAvatar, { className: "ss-g-mt-av", name }),
|
|
7345
|
+
/* @__PURE__ */ jsxs66("span", { className: "ss-g-mt-names", children: [
|
|
7346
|
+
first && /* @__PURE__ */ jsx76("span", { className: "ss-g-mt-first", children: first }),
|
|
7347
|
+
/* @__PURE__ */ jsx76("span", { className: "ss-g-mt-last", children: last })
|
|
7249
7348
|
] })
|
|
7250
7349
|
] }),
|
|
7251
7350
|
keys.map((key) => {
|
|
7252
7351
|
const v = gr[key];
|
|
7253
7352
|
const arrow = directionArrow(v);
|
|
7254
|
-
return /* @__PURE__ */
|
|
7353
|
+
return /* @__PURE__ */ jsxs66(
|
|
7255
7354
|
"div",
|
|
7256
7355
|
{
|
|
7257
7356
|
className: "ss-g-mt-cell",
|
|
@@ -7259,8 +7358,8 @@ function MysteryTigerGame({
|
|
|
7259
7358
|
"data-verdict": v.verdict,
|
|
7260
7359
|
"aria-label": `${t.labels[key]}: ${v.value ?? v.verdict}${v.direction ? ` ${v.direction}` : ""}`,
|
|
7261
7360
|
children: [
|
|
7262
|
-
/* @__PURE__ */
|
|
7263
|
-
arrow && /* @__PURE__ */
|
|
7361
|
+
/* @__PURE__ */ jsx76("span", { className: "ss-g-mt-cell-v", "aria-hidden": "true", children: tileFace(key, v) }),
|
|
7362
|
+
arrow && /* @__PURE__ */ jsx76("span", { className: "ss-g-mt-cell-dir", "aria-hidden": "true", children: arrow })
|
|
7264
7363
|
]
|
|
7265
7364
|
},
|
|
7266
7365
|
key
|
|
@@ -7269,25 +7368,25 @@ function MysteryTigerGame({
|
|
|
7269
7368
|
] }, gr.playerId);
|
|
7270
7369
|
})
|
|
7271
7370
|
] }),
|
|
7272
|
-
!isOver && /* @__PURE__ */
|
|
7273
|
-
/* @__PURE__ */
|
|
7274
|
-
/* @__PURE__ */
|
|
7371
|
+
!isOver && /* @__PURE__ */ jsxs66("div", { className: "ss-g-mt-legend", children: [
|
|
7372
|
+
/* @__PURE__ */ jsxs66("span", { children: [
|
|
7373
|
+
/* @__PURE__ */ jsx76("i", { className: "ss-g-mt-sw", "data-verdict": "exact" }),
|
|
7275
7374
|
t.legendMatch
|
|
7276
7375
|
] }),
|
|
7277
|
-
/* @__PURE__ */
|
|
7278
|
-
/* @__PURE__ */
|
|
7376
|
+
/* @__PURE__ */ jsxs66("span", { children: [
|
|
7377
|
+
/* @__PURE__ */ jsx76("i", { className: "ss-g-mt-sw", "data-verdict": "near" }),
|
|
7279
7378
|
t.legendClose
|
|
7280
7379
|
] }),
|
|
7281
|
-
/* @__PURE__ */
|
|
7380
|
+
/* @__PURE__ */ jsxs66("span", { children: [
|
|
7282
7381
|
"\u25B2 ",
|
|
7283
7382
|
t.legendHigher
|
|
7284
7383
|
] })
|
|
7285
7384
|
] }),
|
|
7286
|
-
clientState?.hintLine && !isOver && /* @__PURE__ */
|
|
7287
|
-
/* @__PURE__ */
|
|
7288
|
-
/* @__PURE__ */
|
|
7385
|
+
clientState?.hintLine && !isOver && /* @__PURE__ */ jsxs66("div", { className: "ss-g-mt-hint", children: [
|
|
7386
|
+
/* @__PURE__ */ jsx76(IconBulb, {}),
|
|
7387
|
+
/* @__PURE__ */ jsx76("span", { children: clientState.hintLine })
|
|
7289
7388
|
] }),
|
|
7290
|
-
isOver && /* @__PURE__ */
|
|
7389
|
+
isOver && /* @__PURE__ */ jsx76(
|
|
7291
7390
|
ResultCard,
|
|
7292
7391
|
{
|
|
7293
7392
|
tone: clientState?.solved ? "win" : clientState?.failed ? "lose" : "neutral",
|
|
@@ -7299,7 +7398,7 @@ function MysteryTigerGame({
|
|
|
7299
7398
|
}
|
|
7300
7399
|
)
|
|
7301
7400
|
] }),
|
|
7302
|
-
!isOver && /* @__PURE__ */
|
|
7401
|
+
!isOver && /* @__PURE__ */ jsx76(FooterBar, { children: /* @__PURE__ */ jsx76(
|
|
7303
7402
|
AnswerTray,
|
|
7304
7403
|
{
|
|
7305
7404
|
id: inputId,
|
|
@@ -7318,7 +7417,7 @@ function MysteryTigerGame({
|
|
|
7318
7417
|
}
|
|
7319
7418
|
|
|
7320
7419
|
// src/components/games/HigherOrLowerGame.tsx
|
|
7321
|
-
import { Fragment as Fragment13, jsx as
|
|
7420
|
+
import { Fragment as Fragment13, jsx as jsx77, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
7322
7421
|
var POINTS_PER_CORRECT = 10;
|
|
7323
7422
|
function parseClientState2(json) {
|
|
7324
7423
|
if (!json) return null;
|
|
@@ -7330,11 +7429,11 @@ function parseClientState2(json) {
|
|
|
7330
7429
|
}
|
|
7331
7430
|
function PlayerCard({ name, imagePath, highlight, children }) {
|
|
7332
7431
|
const { first, last } = splitName(name);
|
|
7333
|
-
return /* @__PURE__ */
|
|
7334
|
-
/* @__PURE__ */
|
|
7335
|
-
/* @__PURE__ */
|
|
7336
|
-
first && /* @__PURE__ */
|
|
7337
|
-
/* @__PURE__ */
|
|
7432
|
+
return /* @__PURE__ */ jsxs67("div", { className: `ss-g-hl-card${highlight ? " ss-g-hl-card--b" : ""}`, children: [
|
|
7433
|
+
/* @__PURE__ */ jsx77("div", { className: "ss-g-hl-photo-wrap", children: imagePath ? /* @__PURE__ */ jsx77(PlayerAvatar, { className: "ss-g-hl-photo", name, imagePath }) : /* @__PURE__ */ jsx77(Silhouette, { size: 150 }) }),
|
|
7434
|
+
/* @__PURE__ */ jsxs67("div", { className: "ss-g-hl-info", children: [
|
|
7435
|
+
first && /* @__PURE__ */ jsx77("span", { className: "ss-g-hl-first", children: first }),
|
|
7436
|
+
/* @__PURE__ */ jsx77("span", { className: "ss-g-hl-surname", children: last }),
|
|
7338
7437
|
children
|
|
7339
7438
|
] })
|
|
7340
7439
|
] });
|
|
@@ -7366,47 +7465,47 @@ function HigherOrLowerGame({
|
|
|
7366
7465
|
const newAnswers = [...prevAnswers, { pairIndex: currentPair.pairIndex, pick }];
|
|
7367
7466
|
onSubmit(JSON.stringify({ answers: newAnswers }));
|
|
7368
7467
|
}
|
|
7369
|
-
return /* @__PURE__ */
|
|
7370
|
-
/* @__PURE__ */
|
|
7468
|
+
return /* @__PURE__ */ jsxs67("div", { className: "ss-g-screen ss-g-hl", "data-game": "higher-or-lower", "data-testid": "game-screen-higher-or-lower", children: [
|
|
7469
|
+
/* @__PURE__ */ jsx77(
|
|
7371
7470
|
GameHeader,
|
|
7372
7471
|
{
|
|
7373
7472
|
title: gameTitle({ gameId: "higher-or-lower" }, ui.games.titles),
|
|
7374
7473
|
eyebrow: t.eyebrow(POINTS_PER_CORRECT),
|
|
7375
|
-
right: config ? /* @__PURE__ */
|
|
7474
|
+
right: config ? /* @__PURE__ */ jsx77(StatStack, { value: runLength, label: t.streak }) : void 0,
|
|
7376
7475
|
onBack,
|
|
7377
7476
|
backLabel: ui.back
|
|
7378
7477
|
}
|
|
7379
7478
|
),
|
|
7380
|
-
!config && /* @__PURE__ */
|
|
7381
|
-
config && /* @__PURE__ */
|
|
7382
|
-
/* @__PURE__ */
|
|
7383
|
-
/* @__PURE__ */
|
|
7384
|
-
/* @__PURE__ */
|
|
7385
|
-
/* @__PURE__ */
|
|
7386
|
-
/* @__PURE__ */
|
|
7479
|
+
!config && /* @__PURE__ */ jsx77("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading }),
|
|
7480
|
+
config && /* @__PURE__ */ jsxs67(Fragment13, { children: [
|
|
7481
|
+
/* @__PURE__ */ jsxs67("div", { className: "ss-g-body", children: [
|
|
7482
|
+
/* @__PURE__ */ jsxs67("div", { className: "ss-g-hl-prompt", "data-testid": "hol-prompt", children: [
|
|
7483
|
+
/* @__PURE__ */ jsx77("span", { className: "ss-g-hl-prompt-q", children: t.whoHadMore }),
|
|
7484
|
+
/* @__PURE__ */ jsx77("span", { className: "ss-g-hl-prompt-stat", children: config.statLabel }),
|
|
7485
|
+
/* @__PURE__ */ jsx77("span", { className: "ss-g-hl-prompt-season", children: t.season(config.seasonLabel) })
|
|
7387
7486
|
] }),
|
|
7388
|
-
currentPair && /* @__PURE__ */
|
|
7389
|
-
/* @__PURE__ */
|
|
7390
|
-
/* @__PURE__ */
|
|
7391
|
-
/* @__PURE__ */
|
|
7487
|
+
currentPair && /* @__PURE__ */ jsxs67("div", { className: "ss-g-hl-pair", children: [
|
|
7488
|
+
/* @__PURE__ */ jsxs67(PlayerCard, { name: currentPair.playerAName, imagePath: currentPair.playerAImagePath, children: [
|
|
7489
|
+
/* @__PURE__ */ jsx77("span", { className: "ss-g-hl-value", children: currentPair.playerAValue }),
|
|
7490
|
+
/* @__PURE__ */ jsx77("span", { className: "ss-g-hl-stat", children: config.statLabel })
|
|
7392
7491
|
] }),
|
|
7393
|
-
/* @__PURE__ */
|
|
7394
|
-
/* @__PURE__ */
|
|
7395
|
-
/* @__PURE__ */
|
|
7396
|
-
/* @__PURE__ */
|
|
7492
|
+
/* @__PURE__ */ jsx77("span", { className: "ss-g-hl-vs", "aria-hidden": "true", children: t.vs }),
|
|
7493
|
+
/* @__PURE__ */ jsx77(PlayerCard, { name: currentPair.playerBName, imagePath: currentPair.playerBImagePath, highlight: true, children: /* @__PURE__ */ jsxs67("div", { className: "ss-g-hl-btns", children: [
|
|
7494
|
+
/* @__PURE__ */ jsxs67(GameButton, { variant: "primary", disabled: submitting, onClick: () => handlePick("higher"), children: [
|
|
7495
|
+
/* @__PURE__ */ jsx77(IconArrowUp, { size: 16 }),
|
|
7397
7496
|
t.higher
|
|
7398
7497
|
] }),
|
|
7399
|
-
/* @__PURE__ */
|
|
7400
|
-
/* @__PURE__ */
|
|
7498
|
+
/* @__PURE__ */ jsxs67(GameButton, { variant: "outline", disabled: submitting, onClick: () => handlePick("lower"), children: [
|
|
7499
|
+
/* @__PURE__ */ jsx77(IconArrowDown, { size: 16 }),
|
|
7401
7500
|
t.lower
|
|
7402
7501
|
] })
|
|
7403
7502
|
] }) })
|
|
7404
7503
|
] }),
|
|
7405
|
-
lastAnswer && lastAnswerPair && /* @__PURE__ */
|
|
7406
|
-
lastAnswer.wasCorrect ? /* @__PURE__ */
|
|
7504
|
+
lastAnswer && lastAnswerPair && /* @__PURE__ */ jsxs67("p", { className: "ss-g-hl-feedback", "data-testid": "hol-last", "data-correct": lastAnswer.wasCorrect ? "true" : "false", children: [
|
|
7505
|
+
lastAnswer.wasCorrect ? /* @__PURE__ */ jsx77(IconCheck, {}) : /* @__PURE__ */ jsx77(IconClose, {}),
|
|
7407
7506
|
t.lastAnswer(splitName(lastAnswerPair.playerBName).last, lastAnswer.playerBValue)
|
|
7408
7507
|
] }),
|
|
7409
|
-
isOver && /* @__PURE__ */
|
|
7508
|
+
isOver && /* @__PURE__ */ jsx77(
|
|
7410
7509
|
ResultCard,
|
|
7411
7510
|
{
|
|
7412
7511
|
tone: runEndedWrong ? "lose" : allPairsAnswered ? "win" : "neutral",
|
|
@@ -7418,15 +7517,15 @@ function HigherOrLowerGame({
|
|
|
7418
7517
|
}
|
|
7419
7518
|
)
|
|
7420
7519
|
] }),
|
|
7421
|
-
!isOver && /* @__PURE__ */
|
|
7422
|
-
/* @__PURE__ */
|
|
7520
|
+
!isOver && /* @__PURE__ */ jsx77(FooterBar, { children: /* @__PURE__ */ jsxs67("div", { className: "ss-g-hl-foot", children: [
|
|
7521
|
+
/* @__PURE__ */ jsx77("div", { className: "ss-g-hl-dots", role: "img", "aria-label": t.answersSoFar(answeredCount, config.pairs.length), children: config.pairs.map((p, i) => {
|
|
7423
7522
|
const a = answeredPairs[i];
|
|
7424
|
-
return /* @__PURE__ */
|
|
7523
|
+
return /* @__PURE__ */ jsx77("span", { className: "ss-g-hl-dot", "data-state": a ? a.wasCorrect ? "correct" : "wrong" : "todo" }, p.pairIndex);
|
|
7425
7524
|
}) }),
|
|
7426
|
-
/* @__PURE__ */
|
|
7427
|
-
/* @__PURE__ */
|
|
7525
|
+
/* @__PURE__ */ jsxs67("span", { className: "ss-g-hl-pts", children: [
|
|
7526
|
+
/* @__PURE__ */ jsx77("span", { "data-testid": "hol-score", children: score }),
|
|
7428
7527
|
" ",
|
|
7429
|
-
/* @__PURE__ */
|
|
7528
|
+
/* @__PURE__ */ jsx77("span", { className: "ss-g-hl-pts-unit", children: ui.games.unitPts })
|
|
7430
7529
|
] })
|
|
7431
7530
|
] }) })
|
|
7432
7531
|
] })
|
|
@@ -7438,17 +7537,17 @@ import { useState as useState35, useId as useId4 } from "react";
|
|
|
7438
7537
|
|
|
7439
7538
|
// src/components/games/ui/CrestShield.tsx
|
|
7440
7539
|
import { useState as useState34 } from "react";
|
|
7441
|
-
import { jsx as
|
|
7540
|
+
import { jsx as jsx78 } from "react/jsx-runtime";
|
|
7442
7541
|
function CrestShield({ src, name, size = 28 }) {
|
|
7443
7542
|
const [failed, setFailed] = useState34(false);
|
|
7444
7543
|
if (src && !isPlaceholderImage(src) && !failed) {
|
|
7445
|
-
return /* @__PURE__ */
|
|
7544
|
+
return /* @__PURE__ */ jsx78("img", { className: "ss-g-crest", src, alt: name, width: size, height: size, loading: "lazy", onError: () => setFailed(true) });
|
|
7446
7545
|
}
|
|
7447
|
-
return /* @__PURE__ */
|
|
7546
|
+
return /* @__PURE__ */ jsx78("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__ */ jsx78("path", { d: "M2 3h24v12c0 9-6 14-12 17C8 29 2 24 2 15z", fill: "currentColor" }) });
|
|
7448
7547
|
}
|
|
7449
7548
|
|
|
7450
7549
|
// src/components/games/CareerPathGame.tsx
|
|
7451
|
-
import { Fragment as Fragment14, jsx as
|
|
7550
|
+
import { Fragment as Fragment14, jsx as jsx79, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
7452
7551
|
function parseClientState3(json) {
|
|
7453
7552
|
if (!json) return null;
|
|
7454
7553
|
try {
|
|
@@ -7478,9 +7577,9 @@ function CareerPathGame({
|
|
|
7478
7577
|
const alreadyGuessedIds = new Set(clientState?.guessResults.map((g) => g.playerId) ?? []);
|
|
7479
7578
|
const isOver = result?.alreadyPlayed === true || clientState?.solved === true || clientState?.failed === true;
|
|
7480
7579
|
if (!config) {
|
|
7481
|
-
return /* @__PURE__ */
|
|
7482
|
-
/* @__PURE__ */
|
|
7483
|
-
/* @__PURE__ */
|
|
7580
|
+
return /* @__PURE__ */ jsxs68("div", { className: "ss-g-screen", "data-game": "career-path", "data-testid": "game-screen-career-path", children: [
|
|
7581
|
+
/* @__PURE__ */ jsx79(GameHeader, { title, eyebrow: s.eyebrow, onBack, backLabel: ui.back }),
|
|
7582
|
+
/* @__PURE__ */ jsx79("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
7484
7583
|
] });
|
|
7485
7584
|
}
|
|
7486
7585
|
const visiblePath = clientState?.visiblePath ?? config.initialPath;
|
|
@@ -7494,61 +7593,61 @@ function CareerPathGame({
|
|
|
7494
7593
|
setQuery("");
|
|
7495
7594
|
onSubmit(JSON.stringify({ guesses: newGuesses }));
|
|
7496
7595
|
}
|
|
7497
|
-
const right = !isOver && clientState ? /* @__PURE__ */
|
|
7596
|
+
const right = !isOver && clientState ? /* @__PURE__ */ jsx79("span", { "data-testid": "cp-guess-chip", children: /* @__PURE__ */ jsxs68(Chip, { variant: "neutral", children: [
|
|
7498
7597
|
ui.games.guess,
|
|
7499
7598
|
" ",
|
|
7500
|
-
/* @__PURE__ */
|
|
7599
|
+
/* @__PURE__ */ jsx79("span", { className: "ss-g-num", children: clientState.guessesUsed + 1 }),
|
|
7501
7600
|
" / ",
|
|
7502
7601
|
clientState.guessesUsed + clientState.guessesRemaining
|
|
7503
7602
|
] }) }) : void 0;
|
|
7504
7603
|
const outcome = clientState?.solved ? s.solved : clientState?.failed ? s.failed : ui.games.done;
|
|
7505
|
-
return /* @__PURE__ */
|
|
7506
|
-
/* @__PURE__ */
|
|
7507
|
-
/* @__PURE__ */
|
|
7508
|
-
!isOver && /* @__PURE__ */
|
|
7509
|
-
/* @__PURE__ */
|
|
7510
|
-
isOver && clientState?.revealedPlayerName ? /* @__PURE__ */
|
|
7511
|
-
/* @__PURE__ */
|
|
7512
|
-
/* @__PURE__ */
|
|
7513
|
-
clientState?.hintLine ? /* @__PURE__ */
|
|
7514
|
-
/* @__PURE__ */
|
|
7515
|
-
/* @__PURE__ */
|
|
7604
|
+
return /* @__PURE__ */ jsxs68("div", { className: "ss-g-screen", "data-game": "career-path", "data-testid": "game-screen-career-path", children: [
|
|
7605
|
+
/* @__PURE__ */ jsx79(GameHeader, { title, eyebrow: s.eyebrow, right, onBack, backLabel: ui.back }),
|
|
7606
|
+
/* @__PURE__ */ jsxs68("div", { className: "ss-g-body", children: [
|
|
7607
|
+
!isOver && /* @__PURE__ */ jsx79(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed: clientState?.guessesUsed ?? 0, ui }),
|
|
7608
|
+
/* @__PURE__ */ jsxs68("div", { className: "ss-g-cp-card", children: [
|
|
7609
|
+
isOver && clientState?.revealedPlayerName ? /* @__PURE__ */ jsx79(PlayerAvatar, { className: "ss-g-cp-photo", name: clientState.revealedPlayerName, imagePath: clientState.revealedPlayerImagePath }) : /* @__PURE__ */ jsx79(Silhouette, { size: 64, variant: isOver ? "default" : "mystery" }),
|
|
7610
|
+
/* @__PURE__ */ jsxs68("div", { className: "ss-g-cp-card-text", children: [
|
|
7611
|
+
/* @__PURE__ */ jsx79("span", { className: "ss-g-cp-card-title", children: isOver && clientState?.revealedPlayerName ? clientState.revealedPlayerName : s.mysteryPlayer }),
|
|
7612
|
+
clientState?.hintLine ? /* @__PURE__ */ jsx79("span", { className: "ss-g-cp-hint", children: clientState.hintLine }) : !isOver ? /* @__PURE__ */ jsxs68("span", { className: "ss-g-cp-locks", children: [
|
|
7613
|
+
/* @__PURE__ */ jsx79(Chip, { variant: "lock", icon: /* @__PURE__ */ jsx79(IconLock, { size: 11 }), children: s.lockPosition }),
|
|
7614
|
+
/* @__PURE__ */ jsx79(Chip, { variant: "lock", icon: /* @__PURE__ */ jsx79(IconLock, { size: 11 }), children: s.lockNationality })
|
|
7516
7615
|
] }) : null
|
|
7517
7616
|
] })
|
|
7518
7617
|
] }),
|
|
7519
|
-
/* @__PURE__ */
|
|
7618
|
+
/* @__PURE__ */ jsxs68("ol", { className: "ss-g-cp-line", children: [
|
|
7520
7619
|
visiblePath.map((spell, i) => {
|
|
7521
7620
|
const years = i === 0 ? s.firstClub : spellYears(spell);
|
|
7522
|
-
return /* @__PURE__ */
|
|
7523
|
-
/* @__PURE__ */
|
|
7524
|
-
/* @__PURE__ */
|
|
7525
|
-
/* @__PURE__ */
|
|
7621
|
+
return /* @__PURE__ */ jsxs68("li", { className: "ss-g-cp-step", children: [
|
|
7622
|
+
/* @__PURE__ */ jsxs68("span", { className: "ss-g-cp-rail", children: [
|
|
7623
|
+
/* @__PURE__ */ jsx79("span", { className: "ss-g-cp-tile", children: /* @__PURE__ */ jsx79(CrestShield, { src: spell.crestUrl, name: spell.clubName, size: 30 }) }),
|
|
7624
|
+
/* @__PURE__ */ jsx79("span", { className: "ss-g-cp-conn", "aria-hidden": "true" })
|
|
7526
7625
|
] }),
|
|
7527
|
-
/* @__PURE__ */
|
|
7528
|
-
/* @__PURE__ */
|
|
7529
|
-
/* @__PURE__ */
|
|
7530
|
-
/* @__PURE__ */
|
|
7531
|
-
spell.isLoan && /* @__PURE__ */
|
|
7626
|
+
/* @__PURE__ */ jsxs68("span", { className: "ss-g-cp-step-text", children: [
|
|
7627
|
+
/* @__PURE__ */ jsx79("span", { className: "ss-g-cp-club", children: spell.clubName }),
|
|
7628
|
+
/* @__PURE__ */ jsxs68("span", { className: "ss-g-cp-sub", children: [
|
|
7629
|
+
/* @__PURE__ */ jsx79("span", { className: "ss-g-cp-years", children: years }),
|
|
7630
|
+
spell.isLoan && /* @__PURE__ */ jsxs68(Fragment14, { children: [
|
|
7532
7631
|
years ? " \xB7 " : "",
|
|
7533
|
-
/* @__PURE__ */
|
|
7632
|
+
/* @__PURE__ */ jsx79("span", { className: "ss-g-cp-loan", children: s.loan })
|
|
7534
7633
|
] })
|
|
7535
7634
|
] })
|
|
7536
7635
|
] })
|
|
7537
7636
|
] }, `${spell.clubName}-${i}`);
|
|
7538
7637
|
}),
|
|
7539
|
-
hidden > 0 && /* @__PURE__ */
|
|
7540
|
-
/* @__PURE__ */
|
|
7541
|
-
/* @__PURE__ */
|
|
7542
|
-
hidden > 1 && /* @__PURE__ */
|
|
7638
|
+
hidden > 0 && /* @__PURE__ */ jsxs68("li", { className: "ss-g-cp-step ss-g-cp-step--hidden", children: [
|
|
7639
|
+
/* @__PURE__ */ jsxs68("span", { className: "ss-g-cp-rail", children: [
|
|
7640
|
+
/* @__PURE__ */ jsx79("span", { className: "ss-g-cp-tile ss-g-cp-tile--locked", children: /* @__PURE__ */ jsx79(IconLock, { size: 18 }) }),
|
|
7641
|
+
hidden > 1 && /* @__PURE__ */ jsx79("span", { className: "ss-g-cp-conn ss-g-cp-conn--faint", "aria-hidden": "true" })
|
|
7543
7642
|
] }),
|
|
7544
|
-
/* @__PURE__ */
|
|
7643
|
+
/* @__PURE__ */ jsx79("span", { className: "ss-g-cp-step-text", children: /* @__PURE__ */ jsx79("span", { className: "ss-g-cp-sub", children: s.nextClubHidden }) })
|
|
7545
7644
|
] }),
|
|
7546
|
-
hidden > 1 && /* @__PURE__ */
|
|
7547
|
-
/* @__PURE__ */
|
|
7548
|
-
/* @__PURE__ */
|
|
7645
|
+
hidden > 1 && /* @__PURE__ */ jsxs68("li", { className: "ss-g-cp-step ss-g-cp-step--more", children: [
|
|
7646
|
+
/* @__PURE__ */ jsx79("span", { className: "ss-g-cp-rail", children: /* @__PURE__ */ jsx79("span", { className: "ss-g-cp-tile ss-g-cp-tile--faint", children: /* @__PURE__ */ jsx79(IconLock, { size: 18 }) }) }),
|
|
7647
|
+
/* @__PURE__ */ jsx79("span", { className: "ss-g-cp-step-text", children: /* @__PURE__ */ jsx79("span", { className: "ss-g-cp-sub", children: s.moreClubs(hidden - 1) }) })
|
|
7549
7648
|
] })
|
|
7550
7649
|
] }),
|
|
7551
|
-
isOver && /* @__PURE__ */
|
|
7650
|
+
isOver && /* @__PURE__ */ jsx79(
|
|
7552
7651
|
ResultCard,
|
|
7553
7652
|
{
|
|
7554
7653
|
tone: clientState?.solved ? "win" : clientState?.failed ? "lose" : "neutral",
|
|
@@ -7560,7 +7659,7 @@ function CareerPathGame({
|
|
|
7560
7659
|
}
|
|
7561
7660
|
)
|
|
7562
7661
|
] }),
|
|
7563
|
-
!isOver && /* @__PURE__ */
|
|
7662
|
+
!isOver && /* @__PURE__ */ jsx79(FooterBar, { children: /* @__PURE__ */ jsx79(
|
|
7564
7663
|
AnswerTray,
|
|
7565
7664
|
{
|
|
7566
7665
|
id: inputId,
|
|
@@ -7582,13 +7681,13 @@ function CareerPathGame({
|
|
|
7582
7681
|
import React, { useEffect as useEffect23, useId as useId5, useRef as useRef20, useState as useState36 } from "react";
|
|
7583
7682
|
|
|
7584
7683
|
// src/components/games/ui/OptionList.tsx
|
|
7585
|
-
import { jsx as
|
|
7684
|
+
import { jsx as jsx80 } from "react/jsx-runtime";
|
|
7586
7685
|
function OptionList({ label, options, onPick }) {
|
|
7587
|
-
return /* @__PURE__ */
|
|
7686
|
+
return /* @__PURE__ */ jsx80("div", { className: "ss-g-opts", role: "listbox", "aria-label": label, children: options.map((o) => /* @__PURE__ */ jsx80("button", { type: "button", role: "option", "aria-selected": false, className: "ss-g-opt", onClick: () => onPick(o.key), children: o.content }, o.key)) });
|
|
7588
7687
|
}
|
|
7589
7688
|
|
|
7590
7689
|
// src/components/games/BeatTheGridGame.tsx
|
|
7591
|
-
import { Fragment as Fragment15, jsx as
|
|
7690
|
+
import { Fragment as Fragment15, jsx as jsx81, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
7592
7691
|
function criterionIconKind(label, key) {
|
|
7593
7692
|
const l = (key ?? label).toLowerCase();
|
|
7594
7693
|
if (l.includes("app")) return "calendar";
|
|
@@ -7606,34 +7705,34 @@ function rowAbbrev(label, map, key) {
|
|
|
7606
7705
|
function CriterionIcon({ kind }) {
|
|
7607
7706
|
switch (kind) {
|
|
7608
7707
|
case "calendar":
|
|
7609
|
-
return /* @__PURE__ */
|
|
7708
|
+
return /* @__PURE__ */ jsx81(IconCalendar, {});
|
|
7610
7709
|
case "ball":
|
|
7611
|
-
return /* @__PURE__ */
|
|
7710
|
+
return /* @__PURE__ */ jsx81(IconBall, {});
|
|
7612
7711
|
case "boot":
|
|
7613
|
-
return /* @__PURE__ */
|
|
7712
|
+
return /* @__PURE__ */ jsx81(IconBoot, {});
|
|
7614
7713
|
case "gloves":
|
|
7615
|
-
return /* @__PURE__ */
|
|
7714
|
+
return /* @__PURE__ */ jsx81(IconGloves, {});
|
|
7616
7715
|
case "shield":
|
|
7617
|
-
return /* @__PURE__ */
|
|
7716
|
+
return /* @__PURE__ */ jsx81(IconShield, {});
|
|
7618
7717
|
default:
|
|
7619
|
-
return /* @__PURE__ */
|
|
7718
|
+
return /* @__PURE__ */ jsx81(IconFlag, {});
|
|
7620
7719
|
}
|
|
7621
7720
|
}
|
|
7622
7721
|
function HeaderVisual({ label, textKey: iKey, meta }) {
|
|
7623
7722
|
if (!meta) {
|
|
7624
|
-
return /* @__PURE__ */
|
|
7723
|
+
return /* @__PURE__ */ jsx81(CriterionIcon, { kind: criterionIconKind(label, iKey) });
|
|
7625
7724
|
}
|
|
7626
7725
|
switch (meta.kind) {
|
|
7627
7726
|
case "club":
|
|
7628
|
-
return /* @__PURE__ */
|
|
7727
|
+
return /* @__PURE__ */ jsx81(CrestShield, { src: meta.imageUrl, name: label, size: 24 });
|
|
7629
7728
|
case "coach":
|
|
7630
|
-
return /* @__PURE__ */
|
|
7729
|
+
return /* @__PURE__ */ jsx81(PlayerAvatar, { name: label, imagePath: meta.imageUrl, className: "ss-g-btg-coach-av" });
|
|
7631
7730
|
case "country":
|
|
7632
|
-
return /* @__PURE__ */
|
|
7731
|
+
return /* @__PURE__ */ jsx81("span", { className: "ss-g-btg-hdr-flag", "aria-hidden": "true", children: nationalityFlag(meta.country ?? label) });
|
|
7633
7732
|
case "position":
|
|
7634
|
-
return /* @__PURE__ */
|
|
7733
|
+
return /* @__PURE__ */ jsx81(Fragment15, {});
|
|
7635
7734
|
default:
|
|
7636
|
-
return /* @__PURE__ */
|
|
7735
|
+
return /* @__PURE__ */ jsx81(CriterionIcon, { kind: criterionIconKind(label, iKey) });
|
|
7637
7736
|
}
|
|
7638
7737
|
}
|
|
7639
7738
|
function parseClientState4(json) {
|
|
@@ -7677,12 +7776,12 @@ function SearchSheet({
|
|
|
7677
7776
|
const filtered = playerPool.filter(
|
|
7678
7777
|
(p) => !alreadyFilledIds.has(p.id) && p.name.toLowerCase().includes(query.toLowerCase())
|
|
7679
7778
|
);
|
|
7680
|
-
return /* @__PURE__ */
|
|
7681
|
-
/* @__PURE__ */
|
|
7682
|
-
/* @__PURE__ */
|
|
7683
|
-
/* @__PURE__ */
|
|
7684
|
-
/* @__PURE__ */
|
|
7685
|
-
/* @__PURE__ */
|
|
7779
|
+
return /* @__PURE__ */ jsxs69("div", { className: "ss-g-btg-sheet", "data-testid": "btg-search-sheet", children: [
|
|
7780
|
+
/* @__PURE__ */ jsxs69("div", { className: "ss-g-btg-sheet-hdr", children: [
|
|
7781
|
+
/* @__PURE__ */ jsx81(Chip, { variant: "neutral", children: rowLabel }),
|
|
7782
|
+
/* @__PURE__ */ jsx81("span", { className: "ss-g-btg-sheet-x", "aria-hidden": "true", children: /* @__PURE__ */ jsx81(IconClose, { size: 12 }) }),
|
|
7783
|
+
/* @__PURE__ */ jsx81(Chip, { variant: "accent", children: colLabel }),
|
|
7784
|
+
/* @__PURE__ */ jsx81(
|
|
7686
7785
|
"button",
|
|
7687
7786
|
{
|
|
7688
7787
|
type: "button",
|
|
@@ -7690,12 +7789,12 @@ function SearchSheet({
|
|
|
7690
7789
|
"data-testid": "btg-sheet-dismiss",
|
|
7691
7790
|
"aria-label": s.closeSearch,
|
|
7692
7791
|
onClick: onDismiss,
|
|
7693
|
-
children: /* @__PURE__ */
|
|
7792
|
+
children: /* @__PURE__ */ jsx81(IconClose, {})
|
|
7694
7793
|
}
|
|
7695
7794
|
)
|
|
7696
7795
|
] }),
|
|
7697
|
-
playerPool.length === 0 ? /* @__PURE__ */
|
|
7698
|
-
/* @__PURE__ */
|
|
7796
|
+
playerPool.length === 0 ? /* @__PURE__ */ jsx81("div", { className: "ss-g-btg-sheet-empty", children: s.emptyPool }) : /* @__PURE__ */ jsxs69(Fragment15, { children: [
|
|
7797
|
+
/* @__PURE__ */ jsx81(
|
|
7699
7798
|
SearchField,
|
|
7700
7799
|
{
|
|
7701
7800
|
id: inputId,
|
|
@@ -7707,16 +7806,16 @@ function SearchSheet({
|
|
|
7707
7806
|
inputRef
|
|
7708
7807
|
}
|
|
7709
7808
|
),
|
|
7710
|
-
query.length > 0 && filtered.length > 0 && /* @__PURE__ */
|
|
7809
|
+
query.length > 0 && filtered.length > 0 && /* @__PURE__ */ jsx81(
|
|
7711
7810
|
OptionList,
|
|
7712
7811
|
{
|
|
7713
7812
|
label: s.searchLabel(rowLabel, colLabel),
|
|
7714
7813
|
options: filtered.map((p) => ({
|
|
7715
7814
|
key: p.id,
|
|
7716
|
-
content: /* @__PURE__ */
|
|
7717
|
-
/* @__PURE__ */
|
|
7718
|
-
/* @__PURE__ */
|
|
7719
|
-
/* @__PURE__ */
|
|
7815
|
+
content: /* @__PURE__ */ jsxs69(Fragment15, { children: [
|
|
7816
|
+
/* @__PURE__ */ jsx81(PlayerAvatar, { name: p.name, imagePath: p.imagePath, className: "ss-g-opt-av" }),
|
|
7817
|
+
/* @__PURE__ */ jsx81("span", { className: "ss-g-btg-result-name", children: p.name }),
|
|
7818
|
+
/* @__PURE__ */ jsx81("span", { className: "ss-g-btg-result-plus", "aria-hidden": "true", children: /* @__PURE__ */ jsx81(IconPlus, { size: 18 }) })
|
|
7720
7819
|
] })
|
|
7721
7820
|
})),
|
|
7722
7821
|
onPick: (k) => onPick(row, col, Number(k))
|
|
@@ -7754,9 +7853,9 @@ function BeatTheGridGame({
|
|
|
7754
7853
|
onSubmit(JSON.stringify({ cells: newCells }));
|
|
7755
7854
|
}
|
|
7756
7855
|
if (!config) {
|
|
7757
|
-
return /* @__PURE__ */
|
|
7758
|
-
/* @__PURE__ */
|
|
7759
|
-
/* @__PURE__ */
|
|
7856
|
+
return /* @__PURE__ */ jsxs69("div", { className: "ss-g-screen", "data-game": "beat-the-grid", "data-testid": "game-screen-beat-the-grid", children: [
|
|
7857
|
+
/* @__PURE__ */ jsx81(GameHeader, { title, eyebrow: s.eyebrow, onBack, backLabel: ui.back }),
|
|
7858
|
+
/* @__PURE__ */ jsx81("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
7760
7859
|
] });
|
|
7761
7860
|
}
|
|
7762
7861
|
const rows = config.rows;
|
|
@@ -7769,20 +7868,20 @@ function BeatTheGridGame({
|
|
|
7769
7868
|
(_, i) => i < correctCount ? "correct" : i < correctCount + wrongCount ? "wrong" : "todo"
|
|
7770
7869
|
);
|
|
7771
7870
|
const totalScore = clientState?.totalScore ?? result?.score ?? 0;
|
|
7772
|
-
return /* @__PURE__ */
|
|
7773
|
-
/* @__PURE__ */
|
|
7774
|
-
/* @__PURE__ */
|
|
7871
|
+
return /* @__PURE__ */ jsxs69("div", { className: "ss-g-screen", "data-game": "beat-the-grid", "data-testid": "game-screen-beat-the-grid", children: [
|
|
7872
|
+
/* @__PURE__ */ jsx81(GameHeader, { title, eyebrow: s.eyebrow, onBack, backLabel: ui.back }),
|
|
7873
|
+
/* @__PURE__ */ jsx81(
|
|
7775
7874
|
SegmentProgress,
|
|
7776
7875
|
{
|
|
7777
7876
|
segments,
|
|
7778
7877
|
ariaLabel: s.progressAria(filledCells.length, total),
|
|
7779
7878
|
leftLabel: s.filled(filledCells.length, total),
|
|
7780
7879
|
rightLabel: s.toGo(Math.max(0, total - filledCells.length)),
|
|
7781
|
-
right: /* @__PURE__ */
|
|
7880
|
+
right: /* @__PURE__ */ jsx81(Chip, { variant: "accent", children: `${totalScore} ${ui.games.unitPts}` })
|
|
7782
7881
|
}
|
|
7783
7882
|
),
|
|
7784
|
-
/* @__PURE__ */
|
|
7785
|
-
/* @__PURE__ */
|
|
7883
|
+
/* @__PURE__ */ jsxs69("div", { className: "ss-g-body", children: [
|
|
7884
|
+
/* @__PURE__ */ jsxs69(
|
|
7786
7885
|
"div",
|
|
7787
7886
|
{
|
|
7788
7887
|
className: activeCell !== null ? "ss-g-btg-grid ss-g-btg-grid--fit" : "ss-g-btg-grid",
|
|
@@ -7792,31 +7891,31 @@ function BeatTheGridGame({
|
|
|
7792
7891
|
},
|
|
7793
7892
|
role: "grid",
|
|
7794
7893
|
children: [
|
|
7795
|
-
/* @__PURE__ */
|
|
7894
|
+
/* @__PURE__ */ jsx81("div", { className: "ss-g-btg-corner" }),
|
|
7796
7895
|
cols.map((col, colIdx) => {
|
|
7797
7896
|
const colMeta = config.colsMeta?.[colIdx];
|
|
7798
|
-
return /* @__PURE__ */
|
|
7799
|
-
/* @__PURE__ */
|
|
7800
|
-
/* @__PURE__ */
|
|
7897
|
+
return /* @__PURE__ */ jsxs69("div", { className: "ss-g-btg-colhdr", "data-meta": colMeta ? "true" : void 0, children: [
|
|
7898
|
+
/* @__PURE__ */ jsx81(HeaderVisual, { label: col, textKey: config.colsI18n?.[colIdx]?.key, meta: colMeta }),
|
|
7899
|
+
/* @__PURE__ */ jsx81("span", { children: col })
|
|
7801
7900
|
] }, col);
|
|
7802
7901
|
}),
|
|
7803
7902
|
rows.map((rowLabel, rowIdx) => {
|
|
7804
7903
|
const rowMeta = config.rowsMeta?.[rowIdx];
|
|
7805
7904
|
const abbr = rowAbbrev(rowLabel, s.rowAbbrev, config.rowsI18n?.[rowIdx]?.key);
|
|
7806
|
-
const rowHeaderContent = rowMeta ? /* @__PURE__ */
|
|
7807
|
-
/* @__PURE__ */
|
|
7808
|
-
/* @__PURE__ */
|
|
7809
|
-
] }) : abbr === rowLabel ? /* @__PURE__ */
|
|
7810
|
-
/* @__PURE__ */
|
|
7811
|
-
/* @__PURE__ */
|
|
7905
|
+
const rowHeaderContent = rowMeta ? /* @__PURE__ */ jsxs69(Fragment15, { children: [
|
|
7906
|
+
/* @__PURE__ */ jsx81(HeaderVisual, { label: rowLabel, textKey: config.rowsI18n?.[rowIdx]?.key, meta: rowMeta }),
|
|
7907
|
+
/* @__PURE__ */ jsx81("span", { children: rowLabel })
|
|
7908
|
+
] }) : abbr === rowLabel ? /* @__PURE__ */ jsx81("span", { children: rowLabel }) : /* @__PURE__ */ jsxs69(Fragment15, { children: [
|
|
7909
|
+
/* @__PURE__ */ jsx81("span", { "aria-hidden": "true", children: abbr }),
|
|
7910
|
+
/* @__PURE__ */ jsx81("span", { className: "ss-g-sr", children: rowLabel })
|
|
7812
7911
|
] });
|
|
7813
|
-
return /* @__PURE__ */
|
|
7814
|
-
/* @__PURE__ */
|
|
7912
|
+
return /* @__PURE__ */ jsxs69(React.Fragment, { children: [
|
|
7913
|
+
/* @__PURE__ */ jsx81("div", { className: "ss-g-btg-rowhdr", "data-meta": rowMeta ? "true" : void 0, children: rowHeaderContent }),
|
|
7815
7914
|
cols.map((colLabel, colIdx) => {
|
|
7816
7915
|
const filled = findCellResult(filledCells, rowIdx, colIdx);
|
|
7817
7916
|
const isActive = activeCell?.row === rowIdx && activeCell?.col === colIdx;
|
|
7818
7917
|
const state = filled ? filled.isCorrect ? "correct" : "wrong" : isActive ? "active" : "empty";
|
|
7819
|
-
return /* @__PURE__ */
|
|
7918
|
+
return /* @__PURE__ */ jsx81(
|
|
7820
7919
|
"button",
|
|
7821
7920
|
{
|
|
7822
7921
|
type: "button",
|
|
@@ -7827,20 +7926,20 @@ function BeatTheGridGame({
|
|
|
7827
7926
|
className: "ss-g-btg-cell",
|
|
7828
7927
|
disabled: isLocked2 || submitting,
|
|
7829
7928
|
onClick: () => handleCellClick(rowIdx, colIdx),
|
|
7830
|
-
children: filled ? /* @__PURE__ */
|
|
7831
|
-
/* @__PURE__ */
|
|
7929
|
+
children: filled ? /* @__PURE__ */ jsxs69(Fragment15, { children: [
|
|
7930
|
+
/* @__PURE__ */ jsx81(
|
|
7832
7931
|
"span",
|
|
7833
7932
|
{
|
|
7834
7933
|
className: `ss-g-btg-badge ss-g-btg-badge--${filled.isCorrect ? "correct" : "wrong"}`,
|
|
7835
7934
|
role: "img",
|
|
7836
7935
|
"aria-label": filled.isCorrect ? s.correct : s.wrong,
|
|
7837
|
-
children: filled.isCorrect ? /* @__PURE__ */
|
|
7936
|
+
children: filled.isCorrect ? /* @__PURE__ */ jsx81(IconCheck, { size: 11 }) : /* @__PURE__ */ jsx81(IconClose, { size: 11 })
|
|
7838
7937
|
}
|
|
7839
7938
|
),
|
|
7840
|
-
/* @__PURE__ */
|
|
7939
|
+
/* @__PURE__ */ jsx81("span", { className: "ss-g-btg-rarity", children: filled.rarityScore }),
|
|
7841
7940
|
(() => {
|
|
7842
7941
|
const entry = playerPool.find((p) => p.id === filled.playerId);
|
|
7843
|
-
return /* @__PURE__ */
|
|
7942
|
+
return /* @__PURE__ */ jsx81(
|
|
7844
7943
|
PlayerAvatar,
|
|
7845
7944
|
{
|
|
7846
7945
|
name: entry?.name ?? "",
|
|
@@ -7849,8 +7948,8 @@ function BeatTheGridGame({
|
|
|
7849
7948
|
}
|
|
7850
7949
|
);
|
|
7851
7950
|
})(),
|
|
7852
|
-
/* @__PURE__ */
|
|
7853
|
-
] }) : /* @__PURE__ */
|
|
7951
|
+
/* @__PURE__ */ jsx81("span", { className: "ss-g-btg-name", children: shortName(playerPool.find((p) => p.id === filled.playerId)?.name) })
|
|
7952
|
+
] }) : /* @__PURE__ */ jsx81("span", { className: "ss-g-btg-plus", "aria-hidden": "true", children: /* @__PURE__ */ jsx81(IconPlus, { size: 22 }) })
|
|
7854
7953
|
},
|
|
7855
7954
|
`cell-${rowIdx}-${colIdx}`
|
|
7856
7955
|
);
|
|
@@ -7860,7 +7959,7 @@ function BeatTheGridGame({
|
|
|
7860
7959
|
]
|
|
7861
7960
|
}
|
|
7862
7961
|
),
|
|
7863
|
-
isLocked2 && /* @__PURE__ */
|
|
7962
|
+
isLocked2 && /* @__PURE__ */ jsx81(
|
|
7864
7963
|
ResultCard,
|
|
7865
7964
|
{
|
|
7866
7965
|
tone: "neutral",
|
|
@@ -7872,7 +7971,7 @@ function BeatTheGridGame({
|
|
|
7872
7971
|
}
|
|
7873
7972
|
)
|
|
7874
7973
|
] }),
|
|
7875
|
-
activeCell !== null && /* @__PURE__ */
|
|
7974
|
+
activeCell !== null && /* @__PURE__ */ jsx81("div", { className: "ss-g-btg-pin", children: /* @__PURE__ */ jsx81(
|
|
7876
7975
|
SearchSheet,
|
|
7877
7976
|
{
|
|
7878
7977
|
row: activeCell.row,
|
|
@@ -7894,18 +7993,18 @@ function BeatTheGridGame({
|
|
|
7894
7993
|
import { useState as useState37, useId as useId6 } from "react";
|
|
7895
7994
|
|
|
7896
7995
|
// src/components/games/ui/PitchSvg.tsx
|
|
7897
|
-
import { Fragment as Fragment16, jsx as
|
|
7996
|
+
import { Fragment as Fragment16, jsx as jsx82, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
7898
7997
|
function PitchSvg({ variant }) {
|
|
7899
|
-
return /* @__PURE__ */
|
|
7900
|
-
/* @__PURE__ */
|
|
7901
|
-
variant === "full" ? /* @__PURE__ */
|
|
7902
|
-
/* @__PURE__ */
|
|
7903
|
-
/* @__PURE__ */
|
|
7904
|
-
/* @__PURE__ */
|
|
7905
|
-
/* @__PURE__ */
|
|
7906
|
-
] }) : /* @__PURE__ */
|
|
7907
|
-
/* @__PURE__ */
|
|
7908
|
-
/* @__PURE__ */
|
|
7998
|
+
return /* @__PURE__ */ jsxs70("svg", { className: "ss-g-pitch-svg", viewBox: variant === "full" ? "0 0 100 150" : "0 0 100 100", preserveAspectRatio: "none", "aria-hidden": "true", children: [
|
|
7999
|
+
/* @__PURE__ */ jsx82("rect", { x: "4", y: "4", width: "92", height: variant === "full" ? 142 : 92, fill: "none" }),
|
|
8000
|
+
variant === "full" ? /* @__PURE__ */ jsxs70(Fragment16, { children: [
|
|
8001
|
+
/* @__PURE__ */ jsx82("line", { x1: "4", y1: "75", x2: "96", y2: "75" }),
|
|
8002
|
+
/* @__PURE__ */ jsx82("circle", { cx: "50", cy: "75", r: "12", fill: "none" }),
|
|
8003
|
+
/* @__PURE__ */ jsx82("rect", { x: "26", y: "4", width: "48", height: "20", fill: "none" }),
|
|
8004
|
+
/* @__PURE__ */ jsx82("rect", { x: "26", y: "126", width: "48", height: "20", fill: "none" })
|
|
8005
|
+
] }) : /* @__PURE__ */ jsxs70(Fragment16, { children: [
|
|
8006
|
+
/* @__PURE__ */ jsx82("path", { d: "M38 4a12 12 0 0 0 24 0", fill: "none" }),
|
|
8007
|
+
/* @__PURE__ */ jsx82("rect", { x: "26", y: "76", width: "48", height: "20", fill: "none" })
|
|
7909
8008
|
] })
|
|
7910
8009
|
] });
|
|
7911
8010
|
}
|
|
@@ -7961,7 +8060,7 @@ function positionsBySlot(formation, rowsAttackFirst) {
|
|
|
7961
8060
|
}
|
|
7962
8061
|
|
|
7963
8062
|
// src/components/games/GuessTheXiGame.tsx
|
|
7964
|
-
import { Fragment as Fragment17, jsx as
|
|
8063
|
+
import { Fragment as Fragment17, jsx as jsx83, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
7965
8064
|
var MAX_GUESSES2 = 3;
|
|
7966
8065
|
function parseClientState5(json) {
|
|
7967
8066
|
if (!json) return null;
|
|
@@ -8011,31 +8110,31 @@ function GuessTheXiGame({
|
|
|
8011
8110
|
const wrongGuesses = (clientState?.guessHistory ?? []).filter((g) => !g.wasCorrect);
|
|
8012
8111
|
const guessesLeft = Math.max(0, MAX_GUESSES2 - (clientState?.guessesUsed ?? 0));
|
|
8013
8112
|
const teamName = (id) => config?.teamPool.find((tm) => tm.teamId === id)?.teamName ?? `#${id}`;
|
|
8014
|
-
return /* @__PURE__ */
|
|
8015
|
-
/* @__PURE__ */
|
|
8113
|
+
return /* @__PURE__ */ jsxs71("div", { className: "ss-g-screen ss-g-gxi", "data-game": "guess-the-xi", "data-testid": "game-screen-guess-the-xi", children: [
|
|
8114
|
+
/* @__PURE__ */ jsx83(
|
|
8016
8115
|
GameHeader,
|
|
8017
8116
|
{
|
|
8018
8117
|
title: gameTitle({ gameId: "guess-the-xi" }, ui.games.titles),
|
|
8019
8118
|
eyebrow: config?.poolLabel,
|
|
8020
|
-
right: formation ? /* @__PURE__ */
|
|
8119
|
+
right: formation ? /* @__PURE__ */ jsx83(Chip, { variant: "accent", children: formation }) : void 0,
|
|
8021
8120
|
onBack,
|
|
8022
8121
|
backLabel: ui.back
|
|
8023
8122
|
}
|
|
8024
8123
|
),
|
|
8025
|
-
!config && /* @__PURE__ */
|
|
8026
|
-
config && /* @__PURE__ */
|
|
8027
|
-
/* @__PURE__ */
|
|
8028
|
-
!isOver && /* @__PURE__ */
|
|
8029
|
-
rows.length > 0 && /* @__PURE__ */
|
|
8030
|
-
/* @__PURE__ */
|
|
8031
|
-
/* @__PURE__ */
|
|
8124
|
+
!config && /* @__PURE__ */ jsx83("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading }),
|
|
8125
|
+
config && /* @__PURE__ */ jsxs71(Fragment17, { children: [
|
|
8126
|
+
/* @__PURE__ */ jsxs71("div", { className: "ss-g-body", children: [
|
|
8127
|
+
!isOver && /* @__PURE__ */ jsx83(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed: clientState?.guessHistory.length ?? 0, ui }),
|
|
8128
|
+
rows.length > 0 && /* @__PURE__ */ jsxs71("div", { className: "ss-g-gxi-pitch", role: "group", "aria-label": t.pitchLabel, children: [
|
|
8129
|
+
/* @__PURE__ */ jsx83(PitchSvg, { variant: "full" }),
|
|
8130
|
+
/* @__PURE__ */ jsx83("div", { className: "ss-g-gxi-rows", children: rows.map((row, r) => /* @__PURE__ */ jsx83("div", { className: "ss-g-gxi-row", children: row.map((pos, c) => {
|
|
8032
8131
|
const posLabel = pos.slot ? posBySlot.get(pos.slot) ?? "" : "";
|
|
8033
8132
|
const name = pos.slot ? nameBySlot.get(pos.slot) : void 0;
|
|
8034
8133
|
const lineupEntry = pos.slot ? lineupBySlot.get(pos.slot) : void 0;
|
|
8035
8134
|
const flag = nationalityFlag(pos.nationality);
|
|
8036
8135
|
if (lineupEntry) {
|
|
8037
|
-
return /* @__PURE__ */
|
|
8038
|
-
/* @__PURE__ */
|
|
8136
|
+
return /* @__PURE__ */ jsxs71("div", { className: "ss-g-gxi-node", "data-revealed": "true", children: [
|
|
8137
|
+
/* @__PURE__ */ jsx83(
|
|
8039
8138
|
PlayerAvatar,
|
|
8040
8139
|
{
|
|
8041
8140
|
name: lineupEntry.name,
|
|
@@ -8043,11 +8142,11 @@ function GuessTheXiGame({
|
|
|
8043
8142
|
className: "ss-g-gxi-disc ss-g-gxi-disc--photo"
|
|
8044
8143
|
}
|
|
8045
8144
|
),
|
|
8046
|
-
/* @__PURE__ */
|
|
8145
|
+
/* @__PURE__ */ jsx83("span", { className: "ss-g-gxi-pos ss-g-gxi-pos--name", children: splitName(lineupEntry.name).last })
|
|
8047
8146
|
] }, `${pos.slot}-${c}`);
|
|
8048
8147
|
}
|
|
8049
|
-
return /* @__PURE__ */
|
|
8050
|
-
/* @__PURE__ */
|
|
8148
|
+
return /* @__PURE__ */ jsxs71("div", { className: "ss-g-gxi-node", "data-revealed": name ? "true" : void 0, children: [
|
|
8149
|
+
/* @__PURE__ */ jsx83(
|
|
8051
8150
|
"span",
|
|
8052
8151
|
{
|
|
8053
8152
|
className: "ss-g-gxi-disc",
|
|
@@ -8058,22 +8157,22 @@ function GuessTheXiGame({
|
|
|
8058
8157
|
children: flag
|
|
8059
8158
|
}
|
|
8060
8159
|
),
|
|
8061
|
-
name ? /* @__PURE__ */
|
|
8160
|
+
name ? /* @__PURE__ */ jsx83("span", { className: "ss-g-gxi-pos ss-g-gxi-pos--name", children: splitName(name).last }) : posLabel && /* @__PURE__ */ jsx83("span", { className: "ss-g-gxi-pos", children: posLabel })
|
|
8062
8161
|
] }, `${pos.slot}-${c}`);
|
|
8063
8162
|
}) }, r)) })
|
|
8064
8163
|
] }),
|
|
8065
|
-
!isOver && wrongGuesses.length > 0 && /* @__PURE__ */
|
|
8066
|
-
/* @__PURE__ */
|
|
8164
|
+
!isOver && wrongGuesses.length > 0 && /* @__PURE__ */ jsxs71("div", { className: "ss-g-gxi-wrong", children: [
|
|
8165
|
+
/* @__PURE__ */ jsx83("span", { className: "ss-g-gxi-wrong-l", children: t.notThem }),
|
|
8067
8166
|
wrongGuesses.map((g) => {
|
|
8068
8167
|
const crestUrl = config?.teamPool.find((tm) => tm.teamId === g.teamId)?.crestUrl;
|
|
8069
|
-
return /* @__PURE__ */
|
|
8070
|
-
/* @__PURE__ */
|
|
8071
|
-
/* @__PURE__ */
|
|
8168
|
+
return /* @__PURE__ */ jsxs71("span", { className: "ss-g-gxi-wrong-chip", children: [
|
|
8169
|
+
/* @__PURE__ */ jsx83(CrestShield, { src: crestUrl, name: teamName(g.teamId), size: 18 }),
|
|
8170
|
+
/* @__PURE__ */ jsx83("s", { children: teamName(g.teamId) })
|
|
8072
8171
|
] }, g.teamId);
|
|
8073
8172
|
})
|
|
8074
8173
|
] }),
|
|
8075
|
-
isOver && /* @__PURE__ */
|
|
8076
|
-
/* @__PURE__ */
|
|
8174
|
+
isOver && /* @__PURE__ */ jsxs71(Fragment17, { children: [
|
|
8175
|
+
/* @__PURE__ */ jsx83(
|
|
8077
8176
|
ResultCard,
|
|
8078
8177
|
{
|
|
8079
8178
|
tone: solved ? "win" : failed ? "lose" : "neutral",
|
|
@@ -8084,29 +8183,29 @@ function GuessTheXiGame({
|
|
|
8084
8183
|
ui
|
|
8085
8184
|
}
|
|
8086
8185
|
),
|
|
8087
|
-
(solved || failed) && clientState?.answer && /* @__PURE__ */
|
|
8088
|
-
/* @__PURE__ */
|
|
8089
|
-
/* @__PURE__ */
|
|
8090
|
-
/* @__PURE__ */
|
|
8186
|
+
(solved || failed) && clientState?.answer && /* @__PURE__ */ jsxs71("div", { className: "ss-g-gxi-answer", "data-testid": "gxi-answer-reveal", children: [
|
|
8187
|
+
/* @__PURE__ */ jsx83("span", { className: "ss-g-gxi-answer-label", children: t.theAnswer }),
|
|
8188
|
+
/* @__PURE__ */ jsx83(CrestShield, { src: clientState.answer.crestUrl, name: clientState.answer.teamName, size: 32 }),
|
|
8189
|
+
/* @__PURE__ */ jsx83("span", { className: "ss-g-gxi-answer-name", children: clientState.answer.teamName })
|
|
8091
8190
|
] })
|
|
8092
8191
|
] })
|
|
8093
8192
|
] }),
|
|
8094
|
-
!isOver && /* @__PURE__ */
|
|
8095
|
-
query.length > 0 && filtered.length > 0 && /* @__PURE__ */
|
|
8193
|
+
!isOver && /* @__PURE__ */ jsxs71(FooterBar, { children: [
|
|
8194
|
+
query.length > 0 && filtered.length > 0 && /* @__PURE__ */ jsx83(
|
|
8096
8195
|
OptionList,
|
|
8097
8196
|
{
|
|
8098
8197
|
label: t.optionsLabel,
|
|
8099
8198
|
options: filtered.map((tm) => ({
|
|
8100
8199
|
key: tm.teamId,
|
|
8101
|
-
content: /* @__PURE__ */
|
|
8102
|
-
/* @__PURE__ */
|
|
8103
|
-
/* @__PURE__ */
|
|
8200
|
+
content: /* @__PURE__ */ jsxs71(Fragment17, { children: [
|
|
8201
|
+
/* @__PURE__ */ jsx83(CrestShield, { src: tm.crestUrl, name: tm.teamName, size: 28 }),
|
|
8202
|
+
/* @__PURE__ */ jsx83("span", { children: tm.teamName })
|
|
8104
8203
|
] })
|
|
8105
8204
|
})),
|
|
8106
8205
|
onPick: (k) => handlePick(Number(k))
|
|
8107
8206
|
}
|
|
8108
8207
|
),
|
|
8109
|
-
/* @__PURE__ */
|
|
8208
|
+
/* @__PURE__ */ jsx83(
|
|
8110
8209
|
SearchField,
|
|
8111
8210
|
{
|
|
8112
8211
|
id: inputId,
|
|
@@ -8124,7 +8223,7 @@ function GuessTheXiGame({
|
|
|
8124
8223
|
|
|
8125
8224
|
// src/components/games/DailyQuizGame.tsx
|
|
8126
8225
|
import { useState as useState38 } from "react";
|
|
8127
|
-
import { Fragment as Fragment18, jsx as
|
|
8226
|
+
import { Fragment as Fragment18, jsx as jsx84, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
8128
8227
|
function parseClientState6(json) {
|
|
8129
8228
|
if (!json) return null;
|
|
8130
8229
|
try {
|
|
@@ -8145,13 +8244,13 @@ function OptionName({ text }) {
|
|
|
8145
8244
|
const tokens = base.split(/\s+/).filter(Boolean);
|
|
8146
8245
|
const isPlainName = tokens.length >= 1 && tokens.length <= 4 && tokens.every((t) => NAME_TOKEN.test(t));
|
|
8147
8246
|
if (!isPlainName || base === "") {
|
|
8148
|
-
return /* @__PURE__ */
|
|
8247
|
+
return /* @__PURE__ */ jsx84("span", { className: "ss-g-dq-opt-name", children: /* @__PURE__ */ jsx84("span", { className: "ss-g-dq-opt-full", children: text }) });
|
|
8149
8248
|
}
|
|
8150
8249
|
const { first, last } = splitName(base);
|
|
8151
|
-
return /* @__PURE__ */
|
|
8152
|
-
first && /* @__PURE__ */
|
|
8153
|
-
/* @__PURE__ */
|
|
8154
|
-
suffix && /* @__PURE__ */
|
|
8250
|
+
return /* @__PURE__ */ jsxs72("span", { className: "ss-g-dq-opt-name", children: [
|
|
8251
|
+
first && /* @__PURE__ */ jsx84("span", { className: "ss-g-dq-opt-first", children: first }),
|
|
8252
|
+
/* @__PURE__ */ jsx84("span", { className: "ss-g-dq-opt-last", children: last }),
|
|
8253
|
+
suffix && /* @__PURE__ */ jsx84("span", { className: "ss-g-dq-opt-suffix", children: suffix })
|
|
8155
8254
|
] });
|
|
8156
8255
|
}
|
|
8157
8256
|
function DailyQuizGame({
|
|
@@ -8170,9 +8269,9 @@ function DailyQuizGame({
|
|
|
8170
8269
|
const results = clientState?.results ?? [];
|
|
8171
8270
|
const isRevealed = results.length > 0 || result?.alreadyPlayed === true;
|
|
8172
8271
|
if (!config) {
|
|
8173
|
-
return /* @__PURE__ */
|
|
8174
|
-
/* @__PURE__ */
|
|
8175
|
-
/* @__PURE__ */
|
|
8272
|
+
return /* @__PURE__ */ jsxs72("div", { className: "ss-g-screen", "data-game": "daily-quiz", "data-testid": "game-screen-daily-quiz", children: [
|
|
8273
|
+
/* @__PURE__ */ jsx84(GameHeader, { title, onBack, backLabel: ui.back }),
|
|
8274
|
+
/* @__PURE__ */ jsx84("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
8176
8275
|
] });
|
|
8177
8276
|
}
|
|
8178
8277
|
const questions = config.questions;
|
|
@@ -8207,11 +8306,11 @@ function DailyQuizGame({
|
|
|
8207
8306
|
return r.isCorrect ? "correct" : "wrong";
|
|
8208
8307
|
});
|
|
8209
8308
|
const correctCount = results.filter((r) => r.isCorrect).length;
|
|
8210
|
-
return /* @__PURE__ */
|
|
8211
|
-
/* @__PURE__ */
|
|
8212
|
-
/* @__PURE__ */
|
|
8213
|
-
/* @__PURE__ */
|
|
8214
|
-
/* @__PURE__ */
|
|
8309
|
+
return /* @__PURE__ */ jsxs72("div", { className: "ss-g-screen", "data-game": "daily-quiz", "data-testid": "game-screen-daily-quiz", children: [
|
|
8310
|
+
/* @__PURE__ */ jsx84(GameHeader, { title, eyebrow: s.results, onBack, backLabel: ui.back }),
|
|
8311
|
+
/* @__PURE__ */ jsx84(SegmentProgress, { segments: segments2, ariaLabel: s.results }),
|
|
8312
|
+
/* @__PURE__ */ jsxs72("div", { className: "ss-g-body", children: [
|
|
8313
|
+
/* @__PURE__ */ jsx84(
|
|
8215
8314
|
ResultCard,
|
|
8216
8315
|
{
|
|
8217
8316
|
tone: "neutral",
|
|
@@ -8224,15 +8323,15 @@ function DailyQuizGame({
|
|
|
8224
8323
|
questions.map((q) => {
|
|
8225
8324
|
const r = findResult(results, q.index);
|
|
8226
8325
|
const picked = selections.get(q.index);
|
|
8227
|
-
return /* @__PURE__ */
|
|
8228
|
-
/* @__PURE__ */
|
|
8229
|
-
r && /* @__PURE__ */
|
|
8326
|
+
return /* @__PURE__ */ jsxs72("div", { className: "ss-g-dq-rq", children: [
|
|
8327
|
+
/* @__PURE__ */ jsx84("div", { className: "ss-g-dq-rq-stem", children: q.stem }),
|
|
8328
|
+
r && /* @__PURE__ */ jsx84("div", { className: "ss-g-dq-rq-opts", children: q.options.map((opt, optIdx) => {
|
|
8230
8329
|
let cls = "ss-g-dq-rq-opt";
|
|
8231
8330
|
if (optIdx === r.correctOptionIndex) cls += " ss-g-dq-rq-opt--correct";
|
|
8232
8331
|
else if (optIdx === picked && !r.isCorrect) cls += " ss-g-dq-rq-opt--wrong";
|
|
8233
|
-
return /* @__PURE__ */
|
|
8332
|
+
return /* @__PURE__ */ jsx84("span", { className: cls, children: opt }, optIdx);
|
|
8234
8333
|
}) }),
|
|
8235
|
-
r?.revealText && /* @__PURE__ */
|
|
8334
|
+
r?.revealText && /* @__PURE__ */ jsx84("div", { className: "ss-g-dq-why", children: r.revealText })
|
|
8236
8335
|
] }, q.index);
|
|
8237
8336
|
})
|
|
8238
8337
|
] })
|
|
@@ -8240,16 +8339,16 @@ function DailyQuizGame({
|
|
|
8240
8339
|
}
|
|
8241
8340
|
const segments = questions.map((_, i) => i < page ? "done" : i === page ? "current" : "todo");
|
|
8242
8341
|
const selectedIdx = current ? selections.get(current.index) : void 0;
|
|
8243
|
-
return /* @__PURE__ */
|
|
8244
|
-
/* @__PURE__ */
|
|
8245
|
-
/* @__PURE__ */
|
|
8246
|
-
/* @__PURE__ */
|
|
8247
|
-
/* @__PURE__ */
|
|
8248
|
-
/* @__PURE__ */
|
|
8342
|
+
return /* @__PURE__ */ jsxs72("div", { className: "ss-g-screen", "data-game": "daily-quiz", "data-testid": "game-screen-daily-quiz", children: [
|
|
8343
|
+
/* @__PURE__ */ jsx84(GameHeader, { title, eyebrow: s.questionOf(page + 1, total), onBack, backLabel: ui.back }),
|
|
8344
|
+
/* @__PURE__ */ jsx84(SegmentProgress, { segments, ariaLabel: s.progressAria(page + 1, total) }),
|
|
8345
|
+
/* @__PURE__ */ jsx84("div", { className: "ss-g-body", children: current && /* @__PURE__ */ jsxs72(Fragment18, { children: [
|
|
8346
|
+
/* @__PURE__ */ jsx84("h3", { className: "ss-g-dq-stem", children: current.stem }),
|
|
8347
|
+
/* @__PURE__ */ jsx84("div", { className: "ss-g-dq-opts", children: current.options.map((opt, optIdx) => {
|
|
8249
8348
|
const selected = optIdx === selectedIdx;
|
|
8250
8349
|
const imagePath = current.optionImagePaths?.[optIdx] ?? void 0;
|
|
8251
8350
|
const playerName = opt;
|
|
8252
|
-
return /* @__PURE__ */
|
|
8351
|
+
return /* @__PURE__ */ jsxs72(
|
|
8253
8352
|
"button",
|
|
8254
8353
|
{
|
|
8255
8354
|
type: "button",
|
|
@@ -8258,25 +8357,25 @@ function DailyQuizGame({
|
|
|
8258
8357
|
disabled: submitting,
|
|
8259
8358
|
onClick: () => handleSelect(current.index, optIdx),
|
|
8260
8359
|
children: [
|
|
8261
|
-
current.optionImagePaths && /* @__PURE__ */
|
|
8262
|
-
/* @__PURE__ */
|
|
8263
|
-
/* @__PURE__ */
|
|
8360
|
+
current.optionImagePaths && /* @__PURE__ */ jsx84(PlayerAvatar, { name: playerName, imagePath, className: "ss-g-dq-opt-av" }),
|
|
8361
|
+
/* @__PURE__ */ jsx84("span", { className: "ss-g-dq-badge", "aria-hidden": "true", children: selected ? /* @__PURE__ */ jsx84(IconCheck, {}) : String.fromCharCode(65 + optIdx) }),
|
|
8362
|
+
/* @__PURE__ */ jsx84(OptionName, { text: opt })
|
|
8264
8363
|
]
|
|
8265
8364
|
},
|
|
8266
8365
|
optIdx
|
|
8267
8366
|
);
|
|
8268
8367
|
}) })
|
|
8269
8368
|
] }) }),
|
|
8270
|
-
/* @__PURE__ */
|
|
8271
|
-
page > 0 && /* @__PURE__ */
|
|
8272
|
-
isLast ? /* @__PURE__ */
|
|
8369
|
+
/* @__PURE__ */ jsx84(FooterBar, { children: /* @__PURE__ */ jsxs72("div", { className: "ss-g-dq-nav", children: [
|
|
8370
|
+
page > 0 && /* @__PURE__ */ jsx84(GameButton, { variant: "outline", onClick: goPrev, disabled: submitting, children: s.previous }),
|
|
8371
|
+
isLast ? /* @__PURE__ */ jsx84(GameButton, { variant: "primary", block: true, onClick: handleSubmit, disabled: !currentAnswered || !allAnswered || submitting, children: submitting ? s.submitting : s.submit }) : /* @__PURE__ */ jsx84(GameButton, { variant: "primary", block: true, onClick: goNext, disabled: !currentAnswered || submitting, children: s.next })
|
|
8273
8372
|
] }) })
|
|
8274
8373
|
] });
|
|
8275
8374
|
}
|
|
8276
8375
|
|
|
8277
8376
|
// src/components/games/MatchdayPredictorGame.tsx
|
|
8278
8377
|
import { useId as useId7, useState as useState39 } from "react";
|
|
8279
|
-
import { jsx as
|
|
8378
|
+
import { jsx as jsx85, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
8280
8379
|
var SCORER_SEARCH_THRESHOLD = 9;
|
|
8281
8380
|
function parseClientState7(json) {
|
|
8282
8381
|
if (!json) return null;
|
|
@@ -8294,7 +8393,7 @@ function isLocked(kickoffUtc) {
|
|
|
8294
8393
|
}
|
|
8295
8394
|
}
|
|
8296
8395
|
function IconMinus() {
|
|
8297
|
-
return /* @__PURE__ */
|
|
8396
|
+
return /* @__PURE__ */ jsx85(
|
|
8298
8397
|
"svg",
|
|
8299
8398
|
{
|
|
8300
8399
|
width: 18,
|
|
@@ -8305,20 +8404,20 @@ function IconMinus() {
|
|
|
8305
8404
|
strokeWidth: 2.2,
|
|
8306
8405
|
strokeLinecap: "round",
|
|
8307
8406
|
"aria-hidden": "true",
|
|
8308
|
-
children: /* @__PURE__ */
|
|
8407
|
+
children: /* @__PURE__ */ jsx85("path", { d: "M5 12h14" })
|
|
8309
8408
|
}
|
|
8310
8409
|
);
|
|
8311
8410
|
}
|
|
8312
8411
|
function TeamBadge({ team, label }) {
|
|
8313
|
-
return /* @__PURE__ */
|
|
8314
|
-
/* @__PURE__ */
|
|
8315
|
-
/* @__PURE__ */
|
|
8316
|
-
/* @__PURE__ */
|
|
8412
|
+
return /* @__PURE__ */ jsxs73("div", { className: "ss-g-mp-team", children: [
|
|
8413
|
+
/* @__PURE__ */ jsx85(CrestShield, { name: team.name, size: 44 }),
|
|
8414
|
+
/* @__PURE__ */ jsx85("span", { className: "ss-g-mp-team-name", children: team.name }),
|
|
8415
|
+
/* @__PURE__ */ jsx85("span", { className: "ss-g-mp-team-side", children: label })
|
|
8317
8416
|
] });
|
|
8318
8417
|
}
|
|
8319
8418
|
function ScoreCard({ home, away, h, a, t, edit }) {
|
|
8320
|
-
const col = (side, team, value) => /* @__PURE__ */
|
|
8321
|
-
edit && /* @__PURE__ */
|
|
8419
|
+
const col = (side, team, value) => /* @__PURE__ */ jsxs73("div", { className: "ss-g-mp-col", children: [
|
|
8420
|
+
edit && /* @__PURE__ */ jsx85(
|
|
8322
8421
|
"button",
|
|
8323
8422
|
{
|
|
8324
8423
|
type: "button",
|
|
@@ -8326,11 +8425,11 @@ function ScoreCard({ home, away, h, a, t, edit }) {
|
|
|
8326
8425
|
"aria-label": t.goalsUp(team.name),
|
|
8327
8426
|
disabled: edit.disabled,
|
|
8328
8427
|
onClick: () => edit.onStep(side, 1),
|
|
8329
|
-
children: /* @__PURE__ */
|
|
8428
|
+
children: /* @__PURE__ */ jsx85(IconPlus, { size: 18 })
|
|
8330
8429
|
}
|
|
8331
8430
|
),
|
|
8332
|
-
/* @__PURE__ */
|
|
8333
|
-
edit && /* @__PURE__ */
|
|
8431
|
+
/* @__PURE__ */ jsx85("span", { className: "ss-g-mp-digit", "data-testid": "mp-digit", "data-active": edit ? String(edit.active === side) : "false", children: value }),
|
|
8432
|
+
edit && /* @__PURE__ */ jsx85(
|
|
8334
8433
|
"button",
|
|
8335
8434
|
{
|
|
8336
8435
|
type: "button",
|
|
@@ -8338,27 +8437,27 @@ function ScoreCard({ home, away, h, a, t, edit }) {
|
|
|
8338
8437
|
"aria-label": t.goalsDown(team.name),
|
|
8339
8438
|
disabled: edit.disabled || value <= 0,
|
|
8340
8439
|
onClick: () => edit.onStep(side, -1),
|
|
8341
|
-
children: /* @__PURE__ */
|
|
8440
|
+
children: /* @__PURE__ */ jsx85(IconMinus, {})
|
|
8342
8441
|
}
|
|
8343
8442
|
)
|
|
8344
8443
|
] });
|
|
8345
|
-
return /* @__PURE__ */
|
|
8346
|
-
/* @__PURE__ */
|
|
8347
|
-
/* @__PURE__ */
|
|
8444
|
+
return /* @__PURE__ */ jsxs73("div", { className: "ss-g-mp-card", children: [
|
|
8445
|
+
/* @__PURE__ */ jsx85(TeamBadge, { team: home, label: t.home }),
|
|
8446
|
+
/* @__PURE__ */ jsxs73("div", { className: "ss-g-mp-scores", children: [
|
|
8348
8447
|
col("home", home, h),
|
|
8349
|
-
/* @__PURE__ */
|
|
8448
|
+
/* @__PURE__ */ jsx85("span", { className: "ss-g-mp-dash", "aria-hidden": "true", children: "\u2013" }),
|
|
8350
8449
|
col("away", away, a)
|
|
8351
8450
|
] }),
|
|
8352
|
-
/* @__PURE__ */
|
|
8451
|
+
/* @__PURE__ */ jsx85(TeamBadge, { team: away, label: t.away })
|
|
8353
8452
|
] });
|
|
8354
8453
|
}
|
|
8355
8454
|
function OutcomeRow({ label, ok, detail, t }) {
|
|
8356
|
-
return /* @__PURE__ */
|
|
8357
|
-
/* @__PURE__ */
|
|
8358
|
-
/* @__PURE__ */
|
|
8359
|
-
ok ? /* @__PURE__ */
|
|
8360
|
-
/* @__PURE__ */
|
|
8361
|
-
detail ? /* @__PURE__ */
|
|
8455
|
+
return /* @__PURE__ */ jsxs73("li", { className: "ss-g-mp-row", "data-testid": "mp-row", "data-ok": String(ok), children: [
|
|
8456
|
+
/* @__PURE__ */ jsx85("span", { className: "ss-g-mp-row-k", children: label }),
|
|
8457
|
+
/* @__PURE__ */ jsxs73("span", { className: "ss-g-mp-row-v", children: [
|
|
8458
|
+
ok ? /* @__PURE__ */ jsx85(IconCheck, {}) : /* @__PURE__ */ jsx85(IconClose, { size: 14 }),
|
|
8459
|
+
/* @__PURE__ */ jsx85("span", { className: "ss-g-sr", children: ok ? t.correct : t.incorrect }),
|
|
8460
|
+
detail ? /* @__PURE__ */ jsx85("span", { className: "ss-g-mp-row-d", children: detail }) : null
|
|
8362
8461
|
] })
|
|
8363
8462
|
] });
|
|
8364
8463
|
}
|
|
@@ -8379,12 +8478,12 @@ function MatchdayPredictorGame({
|
|
|
8379
8478
|
const searchId = useId7();
|
|
8380
8479
|
const clientState = parseClientState7(result?.clientStateJson);
|
|
8381
8480
|
const alreadyPlayed = result?.alreadyPlayed === true;
|
|
8382
|
-
const header = /* @__PURE__ */
|
|
8481
|
+
const header = /* @__PURE__ */ jsx85(
|
|
8383
8482
|
GameHeader,
|
|
8384
8483
|
{
|
|
8385
8484
|
title: gameTitle({ gameId: "matchday-predictor" }, ui.games.titles),
|
|
8386
8485
|
eyebrow: config ? t.eyebrow(config.homeTeam.name, config.awayTeam.name) : void 0,
|
|
8387
|
-
right: config ? /* @__PURE__ */
|
|
8486
|
+
right: config ? /* @__PURE__ */ jsx85(Chip, { icon: /* @__PURE__ */ jsx85(IconLock, {}), children: ui.games.formatDayTime(config.kickoffUtc) }) : void 0,
|
|
8388
8487
|
onBack,
|
|
8389
8488
|
backLabel: ui.back
|
|
8390
8489
|
}
|
|
@@ -8392,10 +8491,10 @@ function MatchdayPredictorGame({
|
|
|
8392
8491
|
if (alreadyPlayed && clientState) {
|
|
8393
8492
|
if (!clientState.graded) {
|
|
8394
8493
|
const scorer = config?.scorerPool.find((p) => p.playerId === clientState.predictedFirstScorerPlayerId) ?? null;
|
|
8395
|
-
return /* @__PURE__ */
|
|
8494
|
+
return /* @__PURE__ */ jsxs73("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
|
|
8396
8495
|
header,
|
|
8397
|
-
/* @__PURE__ */
|
|
8398
|
-
config && /* @__PURE__ */
|
|
8496
|
+
/* @__PURE__ */ jsxs73("div", { className: "ss-g-body", children: [
|
|
8497
|
+
config && /* @__PURE__ */ jsx85(
|
|
8399
8498
|
ScoreCard,
|
|
8400
8499
|
{
|
|
8401
8500
|
home: config.homeTeam,
|
|
@@ -8405,7 +8504,7 @@ function MatchdayPredictorGame({
|
|
|
8405
8504
|
t
|
|
8406
8505
|
}
|
|
8407
8506
|
),
|
|
8408
|
-
/* @__PURE__ */
|
|
8507
|
+
/* @__PURE__ */ jsx85(
|
|
8409
8508
|
ResultCard,
|
|
8410
8509
|
{
|
|
8411
8510
|
tone: "neutral",
|
|
@@ -8422,28 +8521,28 @@ function MatchdayPredictorGame({
|
|
|
8422
8521
|
}
|
|
8423
8522
|
)
|
|
8424
8523
|
] }),
|
|
8425
|
-
/* @__PURE__ */
|
|
8524
|
+
/* @__PURE__ */ jsx85(FooterBar, { children: /* @__PURE__ */ jsx85("p", { className: "ss-g-mp-fun", children: t.forFun }) })
|
|
8426
8525
|
] });
|
|
8427
8526
|
}
|
|
8428
8527
|
const r = clientState.result;
|
|
8429
|
-
return /* @__PURE__ */
|
|
8528
|
+
return /* @__PURE__ */ jsxs73("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
|
|
8430
8529
|
header,
|
|
8431
|
-
/* @__PURE__ */
|
|
8432
|
-
config && /* @__PURE__ */
|
|
8433
|
-
/* @__PURE__ */
|
|
8434
|
-
/* @__PURE__ */
|
|
8435
|
-
/* @__PURE__ */
|
|
8436
|
-
/* @__PURE__ */
|
|
8437
|
-
!clientState.firstScorerVoid && /* @__PURE__ */
|
|
8530
|
+
/* @__PURE__ */ jsxs73("div", { className: "ss-g-body", children: [
|
|
8531
|
+
config && /* @__PURE__ */ jsx85(ScoreCard, { home: config.homeTeam, away: config.awayTeam, h: r.homeScore, a: r.awayScore, t }),
|
|
8532
|
+
/* @__PURE__ */ jsx85(ResultCard, { tone: "neutral", title: t.fullTime(r.homeScore, r.awayScore), onBack, ui }),
|
|
8533
|
+
/* @__PURE__ */ jsxs73("ul", { className: "ss-g-mp-rows", children: [
|
|
8534
|
+
/* @__PURE__ */ jsx85(OutcomeRow, { label: t.exactScore, ok: clientState.exactScoreCorrect, t }),
|
|
8535
|
+
/* @__PURE__ */ jsx85(OutcomeRow, { label: t.outcome, ok: clientState.outcomeCorrect, t }),
|
|
8536
|
+
!clientState.firstScorerVoid && /* @__PURE__ */ jsx85(OutcomeRow, { label: t.firstScorerRow, ok: clientState.firstScorerCorrect, detail: r.firstScorerName, t })
|
|
8438
8537
|
] })
|
|
8439
8538
|
] }),
|
|
8440
|
-
/* @__PURE__ */
|
|
8539
|
+
/* @__PURE__ */ jsx85(FooterBar, { children: /* @__PURE__ */ jsx85("p", { className: "ss-g-mp-fun", children: t.forFun }) })
|
|
8441
8540
|
] });
|
|
8442
8541
|
}
|
|
8443
8542
|
if (!config) {
|
|
8444
|
-
return /* @__PURE__ */
|
|
8543
|
+
return /* @__PURE__ */ jsxs73("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
|
|
8445
8544
|
header,
|
|
8446
|
-
/* @__PURE__ */
|
|
8545
|
+
/* @__PURE__ */ jsx85("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
8447
8546
|
] });
|
|
8448
8547
|
}
|
|
8449
8548
|
const locked = isLocked(config.kickoffUtc);
|
|
@@ -8467,10 +8566,10 @@ function MatchdayPredictorGame({
|
|
|
8467
8566
|
const showSearch = pool.length > SCORER_SEARCH_THRESHOLD;
|
|
8468
8567
|
const q = query.trim().toLowerCase();
|
|
8469
8568
|
const visible = showSearch && q ? pool.filter((p) => p.playerName.toLowerCase().includes(q)) : pool;
|
|
8470
|
-
return /* @__PURE__ */
|
|
8569
|
+
return /* @__PURE__ */ jsxs73("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
|
|
8471
8570
|
header,
|
|
8472
|
-
/* @__PURE__ */
|
|
8473
|
-
/* @__PURE__ */
|
|
8571
|
+
/* @__PURE__ */ jsxs73("div", { className: "ss-g-body", children: [
|
|
8572
|
+
/* @__PURE__ */ jsx85(
|
|
8474
8573
|
ScoreCard,
|
|
8475
8574
|
{
|
|
8476
8575
|
home: config.homeTeam,
|
|
@@ -8481,12 +8580,12 @@ function MatchdayPredictorGame({
|
|
|
8481
8580
|
edit: { disabled, active: lastEdited, onStep: step }
|
|
8482
8581
|
}
|
|
8483
8582
|
),
|
|
8484
|
-
pool.length > 0 && /* @__PURE__ */
|
|
8485
|
-
/* @__PURE__ */
|
|
8486
|
-
/* @__PURE__ */
|
|
8487
|
-
/* @__PURE__ */
|
|
8583
|
+
pool.length > 0 && /* @__PURE__ */ jsxs73("section", { className: "ss-g-mp-scorer", children: [
|
|
8584
|
+
/* @__PURE__ */ jsxs73("div", { className: "ss-g-mp-sec-head", children: [
|
|
8585
|
+
/* @__PURE__ */ jsx85("h3", { children: t.firstScorer }),
|
|
8586
|
+
/* @__PURE__ */ jsx85("span", { children: t.optional })
|
|
8488
8587
|
] }),
|
|
8489
|
-
showSearch && /* @__PURE__ */
|
|
8588
|
+
showSearch && /* @__PURE__ */ jsx85(
|
|
8490
8589
|
SearchField,
|
|
8491
8590
|
{
|
|
8492
8591
|
id: searchId,
|
|
@@ -8498,9 +8597,9 @@ function MatchdayPredictorGame({
|
|
|
8498
8597
|
disabled
|
|
8499
8598
|
}
|
|
8500
8599
|
),
|
|
8501
|
-
/* @__PURE__ */
|
|
8600
|
+
/* @__PURE__ */ jsx85("div", { className: "ss-g-mp-grid", children: visible.map((p) => {
|
|
8502
8601
|
const selected = firstScorerPlayerId === p.playerId;
|
|
8503
|
-
return /* @__PURE__ */
|
|
8602
|
+
return /* @__PURE__ */ jsxs73(
|
|
8504
8603
|
"button",
|
|
8505
8604
|
{
|
|
8506
8605
|
type: "button",
|
|
@@ -8510,15 +8609,15 @@ function MatchdayPredictorGame({
|
|
|
8510
8609
|
disabled,
|
|
8511
8610
|
onClick: () => setFirstScorerPlayerId((id) => id === p.playerId ? null : p.playerId),
|
|
8512
8611
|
children: [
|
|
8513
|
-
selected && /* @__PURE__ */
|
|
8514
|
-
/* @__PURE__ */
|
|
8515
|
-
/* @__PURE__ */
|
|
8612
|
+
selected && /* @__PURE__ */ jsx85("span", { className: "ss-g-mp-pcheck", children: /* @__PURE__ */ jsx85(IconCheck, { size: 12 }) }),
|
|
8613
|
+
/* @__PURE__ */ jsx85(Silhouette, { size: 52, variant: selected ? "selected" : "default" }),
|
|
8614
|
+
/* @__PURE__ */ jsx85("span", { className: "ss-g-mp-pname", children: splitName(p.playerName).last })
|
|
8516
8615
|
]
|
|
8517
8616
|
},
|
|
8518
8617
|
p.playerId
|
|
8519
8618
|
);
|
|
8520
8619
|
}) }),
|
|
8521
|
-
/* @__PURE__ */
|
|
8620
|
+
/* @__PURE__ */ jsxs73(
|
|
8522
8621
|
"button",
|
|
8523
8622
|
{
|
|
8524
8623
|
type: "button",
|
|
@@ -8527,24 +8626,24 @@ function MatchdayPredictorGame({
|
|
|
8527
8626
|
disabled,
|
|
8528
8627
|
onClick: () => setFirstScorerPlayerId(null),
|
|
8529
8628
|
children: [
|
|
8530
|
-
/* @__PURE__ */
|
|
8629
|
+
/* @__PURE__ */ jsx85("span", { className: "ss-g-mp-radio", "aria-hidden": "true" }),
|
|
8531
8630
|
t.noScorer
|
|
8532
8631
|
]
|
|
8533
8632
|
}
|
|
8534
8633
|
)
|
|
8535
8634
|
] }),
|
|
8536
|
-
locked && /* @__PURE__ */
|
|
8635
|
+
locked && /* @__PURE__ */ jsx85("p", { className: "ss-g-mp-closed", children: t.closed })
|
|
8537
8636
|
] }),
|
|
8538
|
-
/* @__PURE__ */
|
|
8539
|
-
/* @__PURE__ */
|
|
8540
|
-
/* @__PURE__ */
|
|
8637
|
+
/* @__PURE__ */ jsxs73(FooterBar, { children: [
|
|
8638
|
+
/* @__PURE__ */ jsx85(GameButton, { variant: "primary", block: true, disabled, onClick: handleSubmit, children: submitting ? t.saving : t.save }),
|
|
8639
|
+
/* @__PURE__ */ jsx85("p", { className: "ss-g-mp-fun", children: t.forFun })
|
|
8541
8640
|
] })
|
|
8542
8641
|
] });
|
|
8543
8642
|
}
|
|
8544
8643
|
|
|
8545
8644
|
// src/components/games/StartingXiGame.tsx
|
|
8546
8645
|
import { useId as useId8, useState as useState40 } from "react";
|
|
8547
|
-
import { Fragment as Fragment19, jsx as
|
|
8646
|
+
import { Fragment as Fragment19, jsx as jsx86, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
8548
8647
|
var POINTS_PER_STARTER = 8;
|
|
8549
8648
|
var XI_SIZE = 11;
|
|
8550
8649
|
var DEFAULT_FORMATION = "4-3-3";
|
|
@@ -8593,20 +8692,20 @@ function StartingXiGame({
|
|
|
8593
8692
|
const searchId = useId8();
|
|
8594
8693
|
const clientState = parseClientState8(result?.clientStateJson);
|
|
8595
8694
|
const alreadyPlayed = result?.alreadyPlayed === true;
|
|
8596
|
-
const header = /* @__PURE__ */
|
|
8695
|
+
const header = /* @__PURE__ */ jsx86(
|
|
8597
8696
|
GameHeader,
|
|
8598
8697
|
{
|
|
8599
8698
|
title: gameTitle({ gameId: "starting-xi" }, ui.games.titles),
|
|
8600
8699
|
eyebrow: t.eyebrow,
|
|
8601
|
-
right: /* @__PURE__ */
|
|
8700
|
+
right: /* @__PURE__ */ jsx86(Chip, { variant: "accent", children: t.perStarter(POINTS_PER_STARTER) }),
|
|
8602
8701
|
onBack,
|
|
8603
8702
|
backLabel: ui.back
|
|
8604
8703
|
}
|
|
8605
8704
|
);
|
|
8606
8705
|
function statusScreen(title, score) {
|
|
8607
|
-
return /* @__PURE__ */
|
|
8706
|
+
return /* @__PURE__ */ jsxs74("div", { className: "ss-g-screen", "data-game": "starting-xi", "data-testid": "game-screen-starting-xi", children: [
|
|
8608
8707
|
header,
|
|
8609
|
-
/* @__PURE__ */
|
|
8708
|
+
/* @__PURE__ */ jsx86("div", { className: "ss-g-body", children: /* @__PURE__ */ jsx86(ResultCard, { tone: "neutral", title, score, onBack, ui }) })
|
|
8610
8709
|
] });
|
|
8611
8710
|
}
|
|
8612
8711
|
if (alreadyPlayed) {
|
|
@@ -8615,9 +8714,9 @@ function StartingXiGame({
|
|
|
8615
8714
|
if (clientState.status === "graded") return statusScreen(t.gradedLine(clientState.correctCount), clientState.score);
|
|
8616
8715
|
}
|
|
8617
8716
|
if (!config) {
|
|
8618
|
-
return /* @__PURE__ */
|
|
8717
|
+
return /* @__PURE__ */ jsxs74("div", { className: "ss-g-screen", "data-game": "starting-xi", "data-testid": "game-screen-starting-xi", children: [
|
|
8619
8718
|
header,
|
|
8620
|
-
/* @__PURE__ */
|
|
8719
|
+
/* @__PURE__ */ jsx86("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
8621
8720
|
] });
|
|
8622
8721
|
}
|
|
8623
8722
|
const { formation, slots } = formationSlots(config.formation);
|
|
@@ -8652,27 +8751,27 @@ function StartingXiGame({
|
|
|
8652
8751
|
onSubmit(JSON.stringify({ predictedPlayerIds: slotPlayers }));
|
|
8653
8752
|
}
|
|
8654
8753
|
const segments = slotPlayers.map((p) => p !== null ? "current" : "todo");
|
|
8655
|
-
return /* @__PURE__ */
|
|
8754
|
+
return /* @__PURE__ */ jsxs74("div", { className: "ss-g-screen", "data-game": "starting-xi", "data-testid": "game-screen-starting-xi", children: [
|
|
8656
8755
|
header,
|
|
8657
|
-
/* @__PURE__ */
|
|
8756
|
+
/* @__PURE__ */ jsx86(
|
|
8658
8757
|
SegmentProgress,
|
|
8659
8758
|
{
|
|
8660
8759
|
segments,
|
|
8661
8760
|
ariaLabel: t.picked(pickedCount),
|
|
8662
8761
|
leftLabel: t.picked(pickedCount),
|
|
8663
8762
|
rightLabel: t.toGo(XI_SIZE - pickedCount),
|
|
8664
|
-
right: /* @__PURE__ */
|
|
8763
|
+
right: /* @__PURE__ */ jsx86(Chip, { children: formation })
|
|
8665
8764
|
}
|
|
8666
8765
|
),
|
|
8667
|
-
/* @__PURE__ */
|
|
8668
|
-
/* @__PURE__ */
|
|
8669
|
-
/* @__PURE__ */
|
|
8766
|
+
/* @__PURE__ */ jsxs74("div", { className: "ss-g-body", children: [
|
|
8767
|
+
/* @__PURE__ */ jsxs74("div", { className: "ss-g-xi-pitch", children: [
|
|
8768
|
+
/* @__PURE__ */ jsx86(PitchSvg, { variant: "half" }),
|
|
8670
8769
|
slots.map((s) => {
|
|
8671
8770
|
const playerId = slotPlayers[s.index] ?? null;
|
|
8672
8771
|
const player = playerId !== null ? byId.get(playerId) ?? null : null;
|
|
8673
8772
|
const name = player?.playerName ?? "";
|
|
8674
8773
|
const state = player ? "filled" : active === s.index ? "active" : "empty";
|
|
8675
|
-
return /* @__PURE__ */
|
|
8774
|
+
return /* @__PURE__ */ jsxs74(
|
|
8676
8775
|
"button",
|
|
8677
8776
|
{
|
|
8678
8777
|
type: "button",
|
|
@@ -8684,21 +8783,21 @@ function StartingXiGame({
|
|
|
8684
8783
|
disabled: submitting,
|
|
8685
8784
|
onClick: () => tapSlot(s.index),
|
|
8686
8785
|
children: [
|
|
8687
|
-
/* @__PURE__ */
|
|
8688
|
-
/* @__PURE__ */
|
|
8786
|
+
/* @__PURE__ */ jsx86("span", { className: "ss-g-xi-ring", "aria-hidden": "true", children: player ? player.jerseyNumber ?? "" : /* @__PURE__ */ jsx86(IconPlus, { size: 18 }) }),
|
|
8787
|
+
/* @__PURE__ */ jsx86("span", { className: "ss-g-xi-tag", "aria-hidden": "true", children: player ? splitName(name).last : s.label })
|
|
8689
8788
|
]
|
|
8690
8789
|
},
|
|
8691
8790
|
s.index
|
|
8692
8791
|
);
|
|
8693
8792
|
})
|
|
8694
8793
|
] }),
|
|
8695
|
-
/* @__PURE__ */
|
|
8696
|
-
/* @__PURE__ */
|
|
8697
|
-
/* @__PURE__ */
|
|
8698
|
-
/* @__PURE__ */
|
|
8699
|
-
] }) : /* @__PURE__ */
|
|
8700
|
-
activeSlot && /* @__PURE__ */
|
|
8701
|
-
/* @__PURE__ */
|
|
8794
|
+
/* @__PURE__ */ jsxs74("div", { className: "ss-g-xi-picker", children: [
|
|
8795
|
+
/* @__PURE__ */ jsx86("div", { className: "ss-g-xi-picker-head", children: activeSlot ? /* @__PURE__ */ jsxs74(Fragment19, { children: [
|
|
8796
|
+
/* @__PURE__ */ jsx86(Chip, { variant: "badge", children: activeSlot.label }),
|
|
8797
|
+
/* @__PURE__ */ jsx86("strong", { children: t.pickFor(activeSlot.label) })
|
|
8798
|
+
] }) : /* @__PURE__ */ jsx86("strong", { children: t.allPicked }) }),
|
|
8799
|
+
activeSlot && /* @__PURE__ */ jsxs74(Fragment19, { children: [
|
|
8800
|
+
/* @__PURE__ */ jsx86(
|
|
8702
8801
|
SearchField,
|
|
8703
8802
|
{
|
|
8704
8803
|
id: searchId,
|
|
@@ -8710,18 +8809,18 @@ function StartingXiGame({
|
|
|
8710
8809
|
disabled: submitting
|
|
8711
8810
|
}
|
|
8712
8811
|
),
|
|
8713
|
-
/* @__PURE__ */
|
|
8714
|
-
/* @__PURE__ */
|
|
8715
|
-
/* @__PURE__ */
|
|
8716
|
-
/* @__PURE__ */
|
|
8812
|
+
/* @__PURE__ */ jsx86("ul", { className: "ss-g-xi-list", children: available.map((p) => /* @__PURE__ */ jsx86("li", { children: /* @__PURE__ */ jsxs74("button", { type: "button", className: "ss-g-xi-opt", disabled: submitting, onClick: () => pick(p.playerId), children: [
|
|
8813
|
+
/* @__PURE__ */ jsx86("span", { className: "ss-g-xi-opt-no", "aria-hidden": "true", children: p.jerseyNumber ?? "" }),
|
|
8814
|
+
/* @__PURE__ */ jsx86("span", { className: "ss-g-xi-opt-name", children: p.playerName }),
|
|
8815
|
+
/* @__PURE__ */ jsx86("span", { className: "ss-g-xi-opt-pos", children: p.positionName })
|
|
8717
8816
|
] }) }, p.playerId)) })
|
|
8718
8817
|
] })
|
|
8719
8818
|
] })
|
|
8720
8819
|
] }),
|
|
8721
|
-
/* @__PURE__ */
|
|
8722
|
-
/* @__PURE__ */
|
|
8723
|
-
/* @__PURE__ */
|
|
8724
|
-
/* @__PURE__ */
|
|
8820
|
+
/* @__PURE__ */ jsxs74(FooterBar, { children: [
|
|
8821
|
+
/* @__PURE__ */ jsx86(GameButton, { variant: "primary", block: true, disabled: !canSubmit, onClick: handleSubmit, children: submitting ? t.submitting : t.submit }),
|
|
8822
|
+
/* @__PURE__ */ jsxs74("p", { className: "ss-g-xi-lock", children: [
|
|
8823
|
+
/* @__PURE__ */ jsx86(IconLock, {}),
|
|
8725
8824
|
lockAtUtc ? t.locksAt(ui.games.formatDayTime(lockAtUtc)) : t.locksSoon
|
|
8726
8825
|
] })
|
|
8727
8826
|
] })
|
|
@@ -8730,7 +8829,7 @@ function StartingXiGame({
|
|
|
8730
8829
|
|
|
8731
8830
|
// src/components/games/StatLadderGame.tsx
|
|
8732
8831
|
import { useId as useId9, useState as useState41 } from "react";
|
|
8733
|
-
import { jsx as
|
|
8832
|
+
import { jsx as jsx87, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
8734
8833
|
function ladderClue(ladder) {
|
|
8735
8834
|
const mystery = ladder.find((r) => r.rank === 2);
|
|
8736
8835
|
if (!mystery) return null;
|
|
@@ -8752,9 +8851,9 @@ function parseClientState9(json) {
|
|
|
8752
8851
|
}
|
|
8753
8852
|
function NameStack({ name }) {
|
|
8754
8853
|
const { first, last } = splitName(name);
|
|
8755
|
-
return /* @__PURE__ */
|
|
8756
|
-
first && /* @__PURE__ */
|
|
8757
|
-
/* @__PURE__ */
|
|
8854
|
+
return /* @__PURE__ */ jsxs75("span", { className: "ss-g-sl-name", children: [
|
|
8855
|
+
first && /* @__PURE__ */ jsx87("small", { children: `${first[0]}.` }),
|
|
8856
|
+
/* @__PURE__ */ jsx87("b", { children: last })
|
|
8758
8857
|
] });
|
|
8759
8858
|
}
|
|
8760
8859
|
function StatLadderGame({
|
|
@@ -8771,11 +8870,11 @@ function StatLadderGame({
|
|
|
8771
8870
|
const searchId = useId9();
|
|
8772
8871
|
const clientState = parseClientState9(result?.clientStateJson);
|
|
8773
8872
|
const revealed = clientState != null;
|
|
8774
|
-
const header = /* @__PURE__ */
|
|
8873
|
+
const header = /* @__PURE__ */ jsx87(GameHeader, { title: gameTitle({ gameId: "stat-ladder" }, ui.games.titles), eyebrow: t.eyebrow, onBack, backLabel: ui.back });
|
|
8775
8874
|
if (!config) {
|
|
8776
|
-
return /* @__PURE__ */
|
|
8875
|
+
return /* @__PURE__ */ jsxs75("div", { className: "ss-g-screen", "data-game": "stat-ladder", "data-testid": "game-screen-stat-ladder", children: [
|
|
8777
8876
|
header,
|
|
8778
|
-
/* @__PURE__ */
|
|
8877
|
+
/* @__PURE__ */ jsx87("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
8779
8878
|
] });
|
|
8780
8879
|
}
|
|
8781
8880
|
const question = t.question(config.statLabel);
|
|
@@ -8787,45 +8886,45 @@ function StatLadderGame({
|
|
|
8787
8886
|
if (selectedId === null || submitting || revealed) return;
|
|
8788
8887
|
onSubmit(JSON.stringify({ guessedPlayerId: selectedId }));
|
|
8789
8888
|
}
|
|
8790
|
-
return /* @__PURE__ */
|
|
8889
|
+
return /* @__PURE__ */ jsxs75("div", { className: "ss-g-screen", "data-game": "stat-ladder", "data-testid": "game-screen-stat-ladder", children: [
|
|
8791
8890
|
header,
|
|
8792
|
-
/* @__PURE__ */
|
|
8793
|
-
!revealed && /* @__PURE__ */
|
|
8794
|
-
/* @__PURE__ */
|
|
8795
|
-
/* @__PURE__ */
|
|
8796
|
-
/* @__PURE__ */
|
|
8891
|
+
/* @__PURE__ */ jsxs75("div", { className: "ss-g-body", children: [
|
|
8892
|
+
!revealed && /* @__PURE__ */ jsx87(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed: 0, ui }),
|
|
8893
|
+
/* @__PURE__ */ jsxs75("div", { className: "ss-g-sl-prompt", children: [
|
|
8894
|
+
/* @__PURE__ */ jsx87(Chip, { variant: "accent", icon: /* @__PURE__ */ jsx87(IconShield, { size: 14 }), className: "ss-g-sl-stat", children: config.statLabel }),
|
|
8895
|
+
/* @__PURE__ */ jsxs75("h3", { className: "ss-g-sl-q", children: [
|
|
8797
8896
|
question.pre,
|
|
8798
|
-
/* @__PURE__ */
|
|
8897
|
+
/* @__PURE__ */ jsx87("em", { children: question.emph }),
|
|
8799
8898
|
question.post
|
|
8800
8899
|
] })
|
|
8801
8900
|
] }),
|
|
8802
|
-
/* @__PURE__ */
|
|
8803
|
-
(rung) => rung.rank === 2 ? /* @__PURE__ */
|
|
8901
|
+
/* @__PURE__ */ jsx87("ol", { className: "ss-g-sl-rungs", children: rungs.map(
|
|
8902
|
+
(rung) => rung.rank === 2 ? /* @__PURE__ */ jsxs75(
|
|
8804
8903
|
"li",
|
|
8805
8904
|
{
|
|
8806
8905
|
className: "ss-g-sl-rung ss-g-sl-rung--mystery",
|
|
8807
8906
|
"data-testid": "sl-mystery-rung",
|
|
8808
8907
|
"data-result": revealed ? clientState.isCorrect ? "correct" : "wrong" : void 0,
|
|
8809
8908
|
children: [
|
|
8810
|
-
/* @__PURE__ */
|
|
8811
|
-
revealed ? /* @__PURE__ */
|
|
8812
|
-
revealed ? /* @__PURE__ */
|
|
8813
|
-
/* @__PURE__ */
|
|
8909
|
+
/* @__PURE__ */ jsx87("span", { className: "ss-g-sl-rank", children: "2" }),
|
|
8910
|
+
revealed ? /* @__PURE__ */ jsx87(PlayerAvatar, { name: clientState.revealedRank2.playerName, className: "ss-g-sl-av" }) : /* @__PURE__ */ jsx87(Silhouette, { size: 52, variant: "mystery" }),
|
|
8911
|
+
revealed ? /* @__PURE__ */ jsx87(NameStack, { name: clientState.revealedRank2.playerName }) : /* @__PURE__ */ jsx87("span", { className: "ss-g-sl-who", children: t.whoSecond }),
|
|
8912
|
+
/* @__PURE__ */ jsx87("span", { className: "ss-g-sl-val ss-g-sl-val--mystery", children: rung.statValue })
|
|
8814
8913
|
]
|
|
8815
8914
|
},
|
|
8816
8915
|
rung.rank
|
|
8817
|
-
) : /* @__PURE__ */
|
|
8818
|
-
/* @__PURE__ */
|
|
8819
|
-
/* @__PURE__ */
|
|
8820
|
-
/* @__PURE__ */
|
|
8821
|
-
/* @__PURE__ */
|
|
8916
|
+
) : /* @__PURE__ */ jsxs75("li", { className: "ss-g-sl-rung", children: [
|
|
8917
|
+
/* @__PURE__ */ jsx87("span", { className: "ss-g-sl-rank", children: rung.rank }),
|
|
8918
|
+
/* @__PURE__ */ jsx87(PlayerAvatar, { name: rung.playerName ?? "?", className: "ss-g-sl-av" }),
|
|
8919
|
+
/* @__PURE__ */ jsx87(NameStack, { name: rung.playerName ?? "?" }),
|
|
8920
|
+
/* @__PURE__ */ jsx87("span", { className: "ss-g-sl-val", children: rung.statValue })
|
|
8822
8921
|
] }, rung.rank)
|
|
8823
8922
|
) }),
|
|
8824
|
-
clue && /* @__PURE__ */
|
|
8825
|
-
/* @__PURE__ */
|
|
8826
|
-
/* @__PURE__ */
|
|
8923
|
+
clue && /* @__PURE__ */ jsxs75("p", { className: "ss-g-sl-clue", children: [
|
|
8924
|
+
/* @__PURE__ */ jsx87(IconBulb, {}),
|
|
8925
|
+
/* @__PURE__ */ jsx87("span", { children: t.clue(clue, config.statLabel) })
|
|
8827
8926
|
] }),
|
|
8828
|
-
!revealed && /* @__PURE__ */
|
|
8927
|
+
!revealed && /* @__PURE__ */ jsx87("ul", { className: "ss-g-sl-pool", children: pool.map((p) => /* @__PURE__ */ jsx87("li", { children: /* @__PURE__ */ jsxs75(
|
|
8829
8928
|
"button",
|
|
8830
8929
|
{
|
|
8831
8930
|
type: "button",
|
|
@@ -8838,13 +8937,13 @@ function StatLadderGame({
|
|
|
8838
8937
|
setQuery(p.playerName);
|
|
8839
8938
|
},
|
|
8840
8939
|
children: [
|
|
8841
|
-
/* @__PURE__ */
|
|
8842
|
-
/* @__PURE__ */
|
|
8843
|
-
selectedId === p.playerId && /* @__PURE__ */
|
|
8940
|
+
/* @__PURE__ */ jsx87(PlayerAvatar, { name: p.playerName, className: "ss-g-sl-opt-av" }),
|
|
8941
|
+
/* @__PURE__ */ jsx87("span", { className: "ss-g-sl-opt-name", children: p.playerName }),
|
|
8942
|
+
selectedId === p.playerId && /* @__PURE__ */ jsx87(IconCheck, {})
|
|
8844
8943
|
]
|
|
8845
8944
|
}
|
|
8846
8945
|
) }, p.playerId)) }),
|
|
8847
|
-
revealed && /* @__PURE__ */
|
|
8946
|
+
revealed && /* @__PURE__ */ jsx87(
|
|
8848
8947
|
ResultCard,
|
|
8849
8948
|
{
|
|
8850
8949
|
tone: clientState.isCorrect ? "win" : "lose",
|
|
@@ -8855,8 +8954,8 @@ function StatLadderGame({
|
|
|
8855
8954
|
}
|
|
8856
8955
|
)
|
|
8857
8956
|
] }),
|
|
8858
|
-
!revealed && /* @__PURE__ */
|
|
8859
|
-
/* @__PURE__ */
|
|
8957
|
+
!revealed && /* @__PURE__ */ jsx87(FooterBar, { children: /* @__PURE__ */ jsxs75("div", { className: "ss-g-sl-guess", children: [
|
|
8958
|
+
/* @__PURE__ */ jsx87(
|
|
8860
8959
|
SearchField,
|
|
8861
8960
|
{
|
|
8862
8961
|
id: searchId,
|
|
@@ -8871,13 +8970,13 @@ function StatLadderGame({
|
|
|
8871
8970
|
disabled: submitting
|
|
8872
8971
|
}
|
|
8873
8972
|
),
|
|
8874
|
-
/* @__PURE__ */
|
|
8973
|
+
/* @__PURE__ */ jsx87(GameButton, { variant: "primary", disabled: selectedId === null || submitting, onClick: guess, children: t.guess })
|
|
8875
8974
|
] }) })
|
|
8876
8975
|
] });
|
|
8877
8976
|
}
|
|
8878
8977
|
|
|
8879
8978
|
// src/components/games/FanMotmGame.tsx
|
|
8880
|
-
import { jsx as
|
|
8979
|
+
import { jsx as jsx88, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
8881
8980
|
function parseClientState10(json) {
|
|
8882
8981
|
if (!json) return null;
|
|
8883
8982
|
try {
|
|
@@ -8898,20 +8997,20 @@ function FanMotmGame({
|
|
|
8898
8997
|
const clientState = parseClientState10(result?.clientStateJson);
|
|
8899
8998
|
const alreadyVoted = result?.alreadyPlayed === true;
|
|
8900
8999
|
const pickedId = clientState?.pickedPlayerId ?? null;
|
|
8901
|
-
const header = /* @__PURE__ */
|
|
9000
|
+
const header = /* @__PURE__ */ jsx88(
|
|
8902
9001
|
GameHeader,
|
|
8903
9002
|
{
|
|
8904
9003
|
title: t.title,
|
|
8905
9004
|
eyebrow: t.eyebrow,
|
|
8906
|
-
right: alreadyVoted ? /* @__PURE__ */
|
|
9005
|
+
right: alreadyVoted ? /* @__PURE__ */ jsx88(Chip, { variant: "success", icon: /* @__PURE__ */ jsx88(IconCheck, {}), children: t.voted }) : void 0,
|
|
8907
9006
|
onBack,
|
|
8908
9007
|
backLabel: ui.back
|
|
8909
9008
|
}
|
|
8910
9009
|
);
|
|
8911
9010
|
if (!config) {
|
|
8912
|
-
return /* @__PURE__ */
|
|
9011
|
+
return /* @__PURE__ */ jsxs76("div", { className: "ss-g-screen", "data-game": "fan-motm", "data-testid": "game-screen-fan-motm", children: [
|
|
8913
9012
|
header,
|
|
8914
|
-
/* @__PURE__ */
|
|
9013
|
+
/* @__PURE__ */ jsx88("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
8915
9014
|
] });
|
|
8916
9015
|
}
|
|
8917
9016
|
const picked = config.candidates.find((c) => c.playerId === pickedId) ?? null;
|
|
@@ -8919,12 +9018,12 @@ function FanMotmGame({
|
|
|
8919
9018
|
if (alreadyVoted || submitting) return;
|
|
8920
9019
|
onSubmit(JSON.stringify({ pickedPlayerId: candidateId }));
|
|
8921
9020
|
}
|
|
8922
|
-
return /* @__PURE__ */
|
|
9021
|
+
return /* @__PURE__ */ jsxs76("div", { className: "ss-g-screen", "data-game": "fan-motm", "data-testid": "game-screen-fan-motm", children: [
|
|
8923
9022
|
header,
|
|
8924
|
-
/* @__PURE__ */
|
|
8925
|
-
/* @__PURE__ */
|
|
9023
|
+
/* @__PURE__ */ jsxs76("div", { className: "ss-g-body", children: [
|
|
9024
|
+
/* @__PURE__ */ jsx88("ul", { className: "ss-g-motm-list", children: config.candidates.map((c) => {
|
|
8926
9025
|
const isVoted = alreadyVoted && pickedId === c.playerId;
|
|
8927
|
-
return /* @__PURE__ */
|
|
9026
|
+
return /* @__PURE__ */ jsx88("li", { children: /* @__PURE__ */ jsxs76(
|
|
8928
9027
|
"button",
|
|
8929
9028
|
{
|
|
8930
9029
|
type: "button",
|
|
@@ -8933,24 +9032,24 @@ function FanMotmGame({
|
|
|
8933
9032
|
disabled: alreadyVoted || submitting,
|
|
8934
9033
|
onClick: () => handleVote(c.playerId),
|
|
8935
9034
|
children: [
|
|
8936
|
-
/* @__PURE__ */
|
|
8937
|
-
/* @__PURE__ */
|
|
8938
|
-
isVoted && /* @__PURE__ */
|
|
9035
|
+
/* @__PURE__ */ jsx88(PlayerAvatar, { name: c.playerName, className: "ss-g-motm-av" }),
|
|
9036
|
+
/* @__PURE__ */ jsx88("span", { className: "ss-g-motm-name", children: c.playerName }),
|
|
9037
|
+
isVoted && /* @__PURE__ */ jsx88(Chip, { variant: "accent", className: "ss-g-motm-pill", children: t.yourVote })
|
|
8939
9038
|
]
|
|
8940
9039
|
}
|
|
8941
9040
|
) }, c.playerId);
|
|
8942
9041
|
}) }),
|
|
8943
|
-
alreadyVoted && picked && /* @__PURE__ */
|
|
9042
|
+
alreadyVoted && picked && /* @__PURE__ */ jsx88(ResultCard, { tone: "neutral", title: t.youVoted(picked.playerName), detail: t.thanks, onBack, ui })
|
|
8944
9043
|
] }),
|
|
8945
|
-
/* @__PURE__ */
|
|
8946
|
-
!alreadyVoted && /* @__PURE__ */
|
|
8947
|
-
/* @__PURE__ */
|
|
9044
|
+
/* @__PURE__ */ jsxs76(FooterBar, { children: [
|
|
9045
|
+
!alreadyVoted && /* @__PURE__ */ jsx88("p", { className: "ss-g-motm-foot", children: t.tapToVote }),
|
|
9046
|
+
/* @__PURE__ */ jsx88("p", { className: "ss-g-motm-fun", children: t.forFun })
|
|
8948
9047
|
] })
|
|
8949
9048
|
] });
|
|
8950
9049
|
}
|
|
8951
9050
|
|
|
8952
9051
|
// src/components/GameScreenHost.tsx
|
|
8953
|
-
import { jsx as
|
|
9052
|
+
import { jsx as jsx89 } from "react/jsx-runtime";
|
|
8954
9053
|
var FIXTURE_GAME_IDS = /* @__PURE__ */ new Set([
|
|
8955
9054
|
"matchday-predictor",
|
|
8956
9055
|
"starting-xi",
|
|
@@ -9026,7 +9125,7 @@ function GameScreenHost({
|
|
|
9026
9125
|
function renderScreen() {
|
|
9027
9126
|
switch (gameId) {
|
|
9028
9127
|
case "mystery-tiger":
|
|
9029
|
-
return /* @__PURE__ */
|
|
9128
|
+
return /* @__PURE__ */ jsx89(
|
|
9030
9129
|
MysteryTigerGame,
|
|
9031
9130
|
{
|
|
9032
9131
|
...sharedProps,
|
|
@@ -9034,7 +9133,7 @@ function GameScreenHost({
|
|
|
9034
9133
|
}
|
|
9035
9134
|
);
|
|
9036
9135
|
case "higher-or-lower":
|
|
9037
|
-
return /* @__PURE__ */
|
|
9136
|
+
return /* @__PURE__ */ jsx89(
|
|
9038
9137
|
HigherOrLowerGame,
|
|
9039
9138
|
{
|
|
9040
9139
|
...sharedProps,
|
|
@@ -9042,7 +9141,7 @@ function GameScreenHost({
|
|
|
9042
9141
|
}
|
|
9043
9142
|
);
|
|
9044
9143
|
case "career-path":
|
|
9045
|
-
return /* @__PURE__ */
|
|
9144
|
+
return /* @__PURE__ */ jsx89(
|
|
9046
9145
|
CareerPathGame,
|
|
9047
9146
|
{
|
|
9048
9147
|
...sharedProps,
|
|
@@ -9051,7 +9150,7 @@ function GameScreenHost({
|
|
|
9051
9150
|
);
|
|
9052
9151
|
case "beat-the-grid": {
|
|
9053
9152
|
const btgConfig = safeParseConfig(configJson);
|
|
9054
|
-
return /* @__PURE__ */
|
|
9153
|
+
return /* @__PURE__ */ jsx89(
|
|
9055
9154
|
BeatTheGridGame,
|
|
9056
9155
|
{
|
|
9057
9156
|
...sharedProps,
|
|
@@ -9061,7 +9160,7 @@ function GameScreenHost({
|
|
|
9061
9160
|
);
|
|
9062
9161
|
}
|
|
9063
9162
|
case "guess-the-xi":
|
|
9064
|
-
return /* @__PURE__ */
|
|
9163
|
+
return /* @__PURE__ */ jsx89(
|
|
9065
9164
|
GuessTheXiGame,
|
|
9066
9165
|
{
|
|
9067
9166
|
...sharedProps,
|
|
@@ -9069,7 +9168,7 @@ function GameScreenHost({
|
|
|
9069
9168
|
}
|
|
9070
9169
|
);
|
|
9071
9170
|
case "daily-quiz":
|
|
9072
|
-
return /* @__PURE__ */
|
|
9171
|
+
return /* @__PURE__ */ jsx89(
|
|
9073
9172
|
DailyQuizGame,
|
|
9074
9173
|
{
|
|
9075
9174
|
...sharedProps,
|
|
@@ -9077,7 +9176,7 @@ function GameScreenHost({
|
|
|
9077
9176
|
}
|
|
9078
9177
|
);
|
|
9079
9178
|
case "matchday-predictor":
|
|
9080
|
-
return /* @__PURE__ */
|
|
9179
|
+
return /* @__PURE__ */ jsx89(
|
|
9081
9180
|
MatchdayPredictorGame,
|
|
9082
9181
|
{
|
|
9083
9182
|
...sharedProps,
|
|
@@ -9085,7 +9184,7 @@ function GameScreenHost({
|
|
|
9085
9184
|
}
|
|
9086
9185
|
);
|
|
9087
9186
|
case "starting-xi":
|
|
9088
|
-
return /* @__PURE__ */
|
|
9187
|
+
return /* @__PURE__ */ jsx89(
|
|
9089
9188
|
StartingXiGame,
|
|
9090
9189
|
{
|
|
9091
9190
|
...sharedProps,
|
|
@@ -9093,7 +9192,7 @@ function GameScreenHost({
|
|
|
9093
9192
|
}
|
|
9094
9193
|
);
|
|
9095
9194
|
case "stat-ladder":
|
|
9096
|
-
return /* @__PURE__ */
|
|
9195
|
+
return /* @__PURE__ */ jsx89(
|
|
9097
9196
|
StatLadderGame,
|
|
9098
9197
|
{
|
|
9099
9198
|
...sharedProps,
|
|
@@ -9101,7 +9200,7 @@ function GameScreenHost({
|
|
|
9101
9200
|
}
|
|
9102
9201
|
);
|
|
9103
9202
|
case "fan-motm":
|
|
9104
|
-
return /* @__PURE__ */
|
|
9203
|
+
return /* @__PURE__ */ jsx89(
|
|
9105
9204
|
FanMotmGame,
|
|
9106
9205
|
{
|
|
9107
9206
|
...sharedProps,
|
|
@@ -9109,10 +9208,10 @@ function GameScreenHost({
|
|
|
9109
9208
|
}
|
|
9110
9209
|
);
|
|
9111
9210
|
default:
|
|
9112
|
-
return /* @__PURE__ */
|
|
9211
|
+
return /* @__PURE__ */ jsx89("div", { className: "ss-g-screen", "data-testid": `game-screen-${gameId}`, children: /* @__PURE__ */ jsx89(GameHeader, { title: gameTitle({ gameId }, ui.games.titles), onBack, backLabel: ui.back }) });
|
|
9113
9212
|
}
|
|
9114
9213
|
}
|
|
9115
|
-
return /* @__PURE__ */
|
|
9214
|
+
return /* @__PURE__ */ jsx89("div", { className: "ss-w-gscreen", "data-testid": "gscreen", "data-lock-at": lockAtUtc ?? void 0, children: renderScreen() });
|
|
9116
9215
|
}
|
|
9117
9216
|
|
|
9118
9217
|
// src/components/games/ui/fonts.ts
|
|
@@ -9129,7 +9228,7 @@ function ensureGamesFonts(doc = document) {
|
|
|
9129
9228
|
}
|
|
9130
9229
|
|
|
9131
9230
|
// src/components/GamesPanel.tsx
|
|
9132
|
-
import { jsx as
|
|
9231
|
+
import { jsx as jsx90 } from "react/jsx-runtime";
|
|
9133
9232
|
function GamesPanel({
|
|
9134
9233
|
loggedIn,
|
|
9135
9234
|
games,
|
|
@@ -9142,9 +9241,9 @@ function GamesPanel({
|
|
|
9142
9241
|
useEffect25(() => {
|
|
9143
9242
|
ensureGamesFonts();
|
|
9144
9243
|
}, []);
|
|
9145
|
-
if (!loggedIn) return /* @__PURE__ */
|
|
9244
|
+
if (!loggedIn) return /* @__PURE__ */ jsx90(GamesLoginWall, { ui });
|
|
9146
9245
|
if (selected !== null) {
|
|
9147
|
-
return /* @__PURE__ */
|
|
9246
|
+
return /* @__PURE__ */ jsx90("div", { className: "ss-w-gscreen-wrap", lang: ui.games.lang, children: /* @__PURE__ */ jsx90(
|
|
9148
9247
|
GameScreenHost,
|
|
9149
9248
|
{
|
|
9150
9249
|
selected,
|
|
@@ -9158,7 +9257,7 @@ function GamesPanel({
|
|
|
9158
9257
|
}
|
|
9159
9258
|
) });
|
|
9160
9259
|
}
|
|
9161
|
-
return /* @__PURE__ */
|
|
9260
|
+
return /* @__PURE__ */ jsx90("div", { className: "ss-g-hub-wrap", "data-testid": "games-hub", lang: ui.games.lang, children: /* @__PURE__ */ jsx90(
|
|
9162
9261
|
GamesHub,
|
|
9163
9262
|
{
|
|
9164
9263
|
games,
|
|
@@ -9173,7 +9272,7 @@ function GamesPanel({
|
|
|
9173
9272
|
import { useState as useState44 } from "react";
|
|
9174
9273
|
|
|
9175
9274
|
// src/components/LeaderboardRow.tsx
|
|
9176
|
-
import { jsx as
|
|
9275
|
+
import { jsx as jsx91, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
9177
9276
|
function formatPoints(n) {
|
|
9178
9277
|
return n.toLocaleString("en");
|
|
9179
9278
|
}
|
|
@@ -9182,14 +9281,14 @@ function LeaderboardWeeklyRow({
|
|
|
9182
9281
|
isMe
|
|
9183
9282
|
}) {
|
|
9184
9283
|
const rankClass = `ss-w-lb2-rank${row.rank <= 3 ? " ss-w-lb2-rank--top3" : ""}`;
|
|
9185
|
-
return /* @__PURE__ */
|
|
9186
|
-
/* @__PURE__ */
|
|
9284
|
+
return /* @__PURE__ */ jsxs77("div", { className: `ss-w-lb2-row${isMe ? " ss-w-lb2-row--you" : ""}`, children: [
|
|
9285
|
+
/* @__PURE__ */ jsxs77("span", { className: rankClass, children: [
|
|
9187
9286
|
"#",
|
|
9188
9287
|
row.rank
|
|
9189
9288
|
] }),
|
|
9190
|
-
/* @__PURE__ */
|
|
9191
|
-
/* @__PURE__ */
|
|
9192
|
-
row.currentStreak > 0 && /* @__PURE__ */
|
|
9289
|
+
/* @__PURE__ */ jsx91("span", { className: "ss-w-lb2-handle", children: row.handle }),
|
|
9290
|
+
/* @__PURE__ */ jsx91("span", { className: "ss-w-lb2-points", children: formatPoints(row.points) }),
|
|
9291
|
+
row.currentStreak > 0 && /* @__PURE__ */ jsxs77("span", { className: "ss-w-lb2-streak", children: [
|
|
9193
9292
|
"\u{1F525} ",
|
|
9194
9293
|
row.currentStreak
|
|
9195
9294
|
] })
|
|
@@ -9200,18 +9299,18 @@ function LeaderboardAllTimeRow({
|
|
|
9200
9299
|
isMe
|
|
9201
9300
|
}) {
|
|
9202
9301
|
const rankClass = `ss-w-lb2-rank${row.rank <= 3 ? " ss-w-lb2-rank--top3" : ""}`;
|
|
9203
|
-
return /* @__PURE__ */
|
|
9204
|
-
/* @__PURE__ */
|
|
9302
|
+
return /* @__PURE__ */ jsxs77("div", { className: `ss-w-lb2-row${isMe ? " ss-w-lb2-row--you" : ""}`, children: [
|
|
9303
|
+
/* @__PURE__ */ jsxs77("span", { className: rankClass, children: [
|
|
9205
9304
|
"#",
|
|
9206
9305
|
row.rank
|
|
9207
9306
|
] }),
|
|
9208
|
-
/* @__PURE__ */
|
|
9209
|
-
/* @__PURE__ */
|
|
9307
|
+
/* @__PURE__ */ jsx91("span", { className: "ss-w-lb2-handle", children: row.handle }),
|
|
9308
|
+
/* @__PURE__ */ jsx91("span", { className: "ss-w-lb2-points", children: formatPoints(row.allTimePoints) })
|
|
9210
9309
|
] });
|
|
9211
9310
|
}
|
|
9212
9311
|
|
|
9213
9312
|
// src/components/LeaderboardEmpty.tsx
|
|
9214
|
-
import { jsx as
|
|
9313
|
+
import { jsx as jsx92, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
9215
9314
|
function LeaderboardEmpty({
|
|
9216
9315
|
segment,
|
|
9217
9316
|
lastWeek,
|
|
@@ -9220,36 +9319,36 @@ function LeaderboardEmpty({
|
|
|
9220
9319
|
ui
|
|
9221
9320
|
}) {
|
|
9222
9321
|
if (segment === "alltime") {
|
|
9223
|
-
return /* @__PURE__ */
|
|
9224
|
-
/* @__PURE__ */
|
|
9225
|
-
/* @__PURE__ */
|
|
9322
|
+
return /* @__PURE__ */ jsxs78("div", { className: "ss-w-lb-empty ss-w-lb-empty--alltime", children: [
|
|
9323
|
+
/* @__PURE__ */ jsx92("div", { className: "ss-w-lb-empty-icon", "aria-hidden": "true", children: "\u{1F4CA}" }),
|
|
9324
|
+
/* @__PURE__ */ jsx92("p", { className: "ss-w-lb-empty-body", children: ui.leaderboardAllTimeEmpty })
|
|
9226
9325
|
] });
|
|
9227
9326
|
}
|
|
9228
9327
|
const fresh = lastWeek != null;
|
|
9229
9328
|
const title = fresh ? ui.leaderboardEmptyFreshTitle : ui.leaderboardEmptyColdTitle;
|
|
9230
9329
|
const body = fresh ? ui.leaderboardEmptyFreshBody : ui.leaderboardEmptyColdBody;
|
|
9231
|
-
return /* @__PURE__ */
|
|
9232
|
-
weeklyPrize && /* @__PURE__ */
|
|
9233
|
-
/* @__PURE__ */
|
|
9234
|
-
/* @__PURE__ */
|
|
9330
|
+
return /* @__PURE__ */ jsxs78("div", { className: "ss-w-lb-empty", children: [
|
|
9331
|
+
weeklyPrize && /* @__PURE__ */ jsxs78("div", { className: "ss-w-prize", children: [
|
|
9332
|
+
/* @__PURE__ */ jsx92("span", { className: "ss-w-prize-icon", "aria-hidden": "true", children: "\u{1F3C6}" }),
|
|
9333
|
+
/* @__PURE__ */ jsx92("div", { className: "ss-w-prize-body", children: /* @__PURE__ */ jsx92("span", { className: "ss-w-prize-text", children: weeklyPrize }) })
|
|
9235
9334
|
] }),
|
|
9236
|
-
/* @__PURE__ */
|
|
9237
|
-
/* @__PURE__ */
|
|
9238
|
-
/* @__PURE__ */
|
|
9239
|
-
/* @__PURE__ */
|
|
9240
|
-
onPlay && /* @__PURE__ */
|
|
9335
|
+
/* @__PURE__ */ jsxs78("div", { className: "ss-w-lb-empty-hero", children: [
|
|
9336
|
+
/* @__PURE__ */ jsx92("div", { className: "ss-w-lb-empty-icon", "aria-hidden": "true", children: fresh ? "\u{1F3C6}" : "\u{1F3AE}" }),
|
|
9337
|
+
/* @__PURE__ */ jsx92("h4", { className: "ss-w-lb-empty-title", children: title }),
|
|
9338
|
+
/* @__PURE__ */ jsx92("p", { className: "ss-w-lb-empty-body", children: body }),
|
|
9339
|
+
onPlay && /* @__PURE__ */ jsx92("button", { type: "button", className: "ss-w-lb-empty-cta", onClick: onPlay, children: ui.leaderboardEmptyCta })
|
|
9241
9340
|
] }),
|
|
9242
|
-
fresh && lastWeek && /* @__PURE__ */
|
|
9243
|
-
/* @__PURE__ */
|
|
9244
|
-
/* @__PURE__ */
|
|
9245
|
-
/* @__PURE__ */
|
|
9246
|
-
/* @__PURE__ */
|
|
9341
|
+
fresh && lastWeek && /* @__PURE__ */ jsxs78("div", { className: "ss-w-lb-last", children: [
|
|
9342
|
+
/* @__PURE__ */ jsx92("span", { className: "ss-w-lb-last-label", children: ui.leaderboardLastWeekLabel }),
|
|
9343
|
+
/* @__PURE__ */ jsx92("span", { className: "ss-w-lb-last-champ", "aria-hidden": "true", children: "\u{1F947}" }),
|
|
9344
|
+
/* @__PURE__ */ jsx92("span", { className: "ss-w-lb-last-handle", children: lastWeek.handle }),
|
|
9345
|
+
/* @__PURE__ */ jsx92("span", { className: "ss-w-lb-last-points", children: formatPoints(lastWeek.points) })
|
|
9247
9346
|
] })
|
|
9248
9347
|
] });
|
|
9249
9348
|
}
|
|
9250
9349
|
|
|
9251
9350
|
// src/components/Leaderboard.tsx
|
|
9252
|
-
import { Fragment as Fragment20, jsx as
|
|
9351
|
+
import { Fragment as Fragment20, jsx as jsx93, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
9253
9352
|
function Leaderboard({
|
|
9254
9353
|
data,
|
|
9255
9354
|
ui,
|
|
@@ -9259,9 +9358,9 @@ function Leaderboard({
|
|
|
9259
9358
|
const myRow = segment === "weekly" ? data.myWeeklyRow : data.myAllTimeRow;
|
|
9260
9359
|
const offBoard = myRow !== null && myRow !== void 0 && myRow.rank === -1;
|
|
9261
9360
|
const isEmpty = segment === "weekly" ? data.weeklyTop.length === 0 : data.allTimeTop.length === 0;
|
|
9262
|
-
return /* @__PURE__ */
|
|
9263
|
-
/* @__PURE__ */
|
|
9264
|
-
/* @__PURE__ */
|
|
9361
|
+
return /* @__PURE__ */ jsxs79("div", { className: "ss-w-lb2", children: [
|
|
9362
|
+
/* @__PURE__ */ jsxs79("div", { className: "ss-w-seg", children: [
|
|
9363
|
+
/* @__PURE__ */ jsx93(
|
|
9265
9364
|
"button",
|
|
9266
9365
|
{
|
|
9267
9366
|
type: "button",
|
|
@@ -9271,7 +9370,7 @@ function Leaderboard({
|
|
|
9271
9370
|
children: ui.leaderboardThisWeek
|
|
9272
9371
|
}
|
|
9273
9372
|
),
|
|
9274
|
-
/* @__PURE__ */
|
|
9373
|
+
/* @__PURE__ */ jsx93(
|
|
9275
9374
|
"button",
|
|
9276
9375
|
{
|
|
9277
9376
|
type: "button",
|
|
@@ -9282,7 +9381,7 @@ function Leaderboard({
|
|
|
9282
9381
|
}
|
|
9283
9382
|
)
|
|
9284
9383
|
] }),
|
|
9285
|
-
isEmpty ? /* @__PURE__ */
|
|
9384
|
+
isEmpty ? /* @__PURE__ */ jsx93(
|
|
9286
9385
|
LeaderboardEmpty,
|
|
9287
9386
|
{
|
|
9288
9387
|
segment,
|
|
@@ -9291,15 +9390,15 @@ function Leaderboard({
|
|
|
9291
9390
|
onPlay,
|
|
9292
9391
|
ui
|
|
9293
9392
|
}
|
|
9294
|
-
) : /* @__PURE__ */
|
|
9295
|
-
/* @__PURE__ */
|
|
9393
|
+
) : /* @__PURE__ */ jsxs79(Fragment20, { children: [
|
|
9394
|
+
/* @__PURE__ */ jsx93("div", { className: "ss-w-lb2-rows", children: segment === "weekly" ? data.weeklyTop.map((row) => /* @__PURE__ */ jsx93(
|
|
9296
9395
|
LeaderboardWeeklyRow,
|
|
9297
9396
|
{
|
|
9298
9397
|
row,
|
|
9299
9398
|
isMe: row.operatorUserId === data.myWeeklyRow?.operatorUserId
|
|
9300
9399
|
},
|
|
9301
9400
|
row.operatorUserId
|
|
9302
|
-
)) : data.allTimeTop.map((row) => /* @__PURE__ */
|
|
9401
|
+
)) : data.allTimeTop.map((row) => /* @__PURE__ */ jsx93(
|
|
9303
9402
|
LeaderboardAllTimeRow,
|
|
9304
9403
|
{
|
|
9305
9404
|
row,
|
|
@@ -9307,18 +9406,18 @@ function Leaderboard({
|
|
|
9307
9406
|
},
|
|
9308
9407
|
row.operatorUserId
|
|
9309
9408
|
)) }),
|
|
9310
|
-
/* @__PURE__ */
|
|
9311
|
-
myRow != null && (offBoard ? /* @__PURE__ */
|
|
9312
|
-
segment === "weekly" && data.myWeeklyRow && /* @__PURE__ */
|
|
9313
|
-
segment === "alltime" && data.myAllTimeRow && /* @__PURE__ */
|
|
9409
|
+
/* @__PURE__ */ jsx93("div", { className: "ss-w-kitline", children: "\u{1F3BD}" }),
|
|
9410
|
+
myRow != null && (offBoard ? /* @__PURE__ */ jsx93("div", { className: "ss-w-lbgap", children: ui.leaderboardOffBoard }) : /* @__PURE__ */ jsxs79("div", { className: "ss-w-lb2-rows", children: [
|
|
9411
|
+
segment === "weekly" && data.myWeeklyRow && /* @__PURE__ */ jsx93(LeaderboardWeeklyRow, { row: data.myWeeklyRow, isMe: true }),
|
|
9412
|
+
segment === "alltime" && data.myAllTimeRow && /* @__PURE__ */ jsx93(LeaderboardAllTimeRow, { row: data.myAllTimeRow, isMe: true })
|
|
9314
9413
|
] })),
|
|
9315
|
-
segment === "alltime" && data.myAllTimeRow && !offBoard && /* @__PURE__ */
|
|
9414
|
+
segment === "alltime" && data.myAllTimeRow && !offBoard && /* @__PURE__ */ jsx93("div", { className: "ss-w-lb2-rows", children: /* @__PURE__ */ jsx93("div", { className: "ss-w-lb2-row", children: /* @__PURE__ */ jsx93("span", { className: "ss-w-lb2-handle", children: formatPoints(data.allTimeTop.reduce((s, r) => s + r.allTimePoints, 0)) }) }) })
|
|
9316
9415
|
] })
|
|
9317
9416
|
] });
|
|
9318
9417
|
}
|
|
9319
9418
|
|
|
9320
9419
|
// src/components/LeaderboardPanel.tsx
|
|
9321
|
-
import { jsx as
|
|
9420
|
+
import { jsx as jsx94 } from "react/jsx-runtime";
|
|
9322
9421
|
var EMPTY_PAYLOAD = {
|
|
9323
9422
|
week: "",
|
|
9324
9423
|
weeklyTop: [],
|
|
@@ -9329,19 +9428,19 @@ var EMPTY_PAYLOAD = {
|
|
|
9329
9428
|
lastWeek: null
|
|
9330
9429
|
};
|
|
9331
9430
|
function LeaderboardPanel({ loggedIn, data, loading, onPlay, ui }) {
|
|
9332
|
-
if (!loggedIn) return /* @__PURE__ */
|
|
9333
|
-
if (data === null && loading) return /* @__PURE__ */
|
|
9334
|
-
return /* @__PURE__ */
|
|
9431
|
+
if (!loggedIn) return /* @__PURE__ */ jsx94(GamesLoginWall, { ui });
|
|
9432
|
+
if (data === null && loading) return /* @__PURE__ */ jsx94("div", { className: "ss-w-mon-list" });
|
|
9433
|
+
return /* @__PURE__ */ jsx94("div", { className: "ss-w-mon-list", children: /* @__PURE__ */ jsx94(Leaderboard, { data: data ?? EMPTY_PAYLOAD, ui, onPlay }) });
|
|
9335
9434
|
}
|
|
9336
9435
|
|
|
9337
9436
|
// src/components/PresetSpeedDial.tsx
|
|
9338
9437
|
import { useId as useId10 } from "react";
|
|
9339
|
-
import { jsx as
|
|
9438
|
+
import { jsx as jsx95, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
9340
9439
|
function PresetSpeedDial({ expanded, showDot, strings, onToggle, onOpen, rootRef, buttonRef }) {
|
|
9341
9440
|
const pillsId = useId10();
|
|
9342
9441
|
const tabIndex = expanded ? 0 : -1;
|
|
9343
|
-
return /* @__PURE__ */
|
|
9344
|
-
/* @__PURE__ */
|
|
9442
|
+
return /* @__PURE__ */ jsxs80("div", { ref: rootRef, className: "ss-w-dial", children: [
|
|
9443
|
+
/* @__PURE__ */ jsxs80(
|
|
9345
9444
|
"button",
|
|
9346
9445
|
{
|
|
9347
9446
|
ref: buttonRef,
|
|
@@ -9352,20 +9451,20 @@ function PresetSpeedDial({ expanded, showDot, strings, onToggle, onOpen, rootRef
|
|
|
9352
9451
|
"aria-label": strings.dialName,
|
|
9353
9452
|
onClick: onToggle,
|
|
9354
9453
|
children: [
|
|
9355
|
-
/* @__PURE__ */
|
|
9356
|
-
/* @__PURE__ */
|
|
9357
|
-
showDot && !expanded ? /* @__PURE__ */
|
|
9454
|
+
/* @__PURE__ */ jsx95("span", { className: "ss-w-dial-icon ss-w-dial-icon--open", children: /* @__PURE__ */ jsx95(SlidersIcon, {}) }),
|
|
9455
|
+
/* @__PURE__ */ jsx95("span", { className: "ss-w-dial-icon ss-w-dial-icon--close", children: /* @__PURE__ */ jsx95(CloseIcon, {}) }),
|
|
9456
|
+
showDot && !expanded ? /* @__PURE__ */ jsx95("span", { className: "ss-w-dial-dot", "aria-hidden": "true" }) : null
|
|
9358
9457
|
]
|
|
9359
9458
|
}
|
|
9360
9459
|
),
|
|
9361
|
-
/* @__PURE__ */
|
|
9362
|
-
/* @__PURE__ */
|
|
9363
|
-
/* @__PURE__ */
|
|
9364
|
-
/* @__PURE__ */
|
|
9460
|
+
/* @__PURE__ */ jsxs80("div", { id: pillsId, className: "ss-w-dial-pills", "data-open": expanded ? "" : void 0, children: [
|
|
9461
|
+
/* @__PURE__ */ jsxs80("button", { type: "button", className: "ss-w-dial-pill", tabIndex, onClick: () => onOpen("numbers"), children: [
|
|
9462
|
+
/* @__PURE__ */ jsx95(SlidersIcon, {}),
|
|
9463
|
+
/* @__PURE__ */ jsx95("span", { className: "ss-w-dial-pill-label", children: strings.setNumbers })
|
|
9365
9464
|
] }),
|
|
9366
|
-
/* @__PURE__ */
|
|
9367
|
-
/* @__PURE__ */
|
|
9368
|
-
/* @__PURE__ */
|
|
9465
|
+
/* @__PURE__ */ jsxs80("button", { type: "button", className: "ss-w-dial-pill", tabIndex, onClick: () => onOpen("combo"), children: [
|
|
9466
|
+
/* @__PURE__ */ jsx95(ComboIcon, {}),
|
|
9467
|
+
/* @__PURE__ */ jsx95("span", { className: "ss-w-dial-pill-label", children: strings.buildCombo })
|
|
9369
9468
|
] })
|
|
9370
9469
|
] })
|
|
9371
9470
|
] });
|
|
@@ -9373,7 +9472,7 @@ function PresetSpeedDial({ expanded, showDot, strings, onToggle, onOpen, rootRef
|
|
|
9373
9472
|
|
|
9374
9473
|
// src/components/PresetTools.tsx
|
|
9375
9474
|
import { Fragment as Fragment21, useEffect as useEffect26, useId as useId11, useRef as useRef22, useState as useState45 } from "react";
|
|
9376
|
-
import { Fragment as Fragment22, jsx as
|
|
9475
|
+
import { Fragment as Fragment22, jsx as jsx96, jsxs as jsxs81 } from "react/jsx-runtime";
|
|
9377
9476
|
var FOCUSABLE = 'button:not([disabled]), [href], input:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
9378
9477
|
function PresetToolModal({ title, closeLabel, onClose, children, footer }) {
|
|
9379
9478
|
const dialogRef = useRef22(null);
|
|
@@ -9411,79 +9510,79 @@ function PresetToolModal({ title, closeLabel, onClose, children, footer }) {
|
|
|
9411
9510
|
first.focus();
|
|
9412
9511
|
}
|
|
9413
9512
|
};
|
|
9414
|
-
return /* @__PURE__ */
|
|
9415
|
-
/* @__PURE__ */
|
|
9416
|
-
/* @__PURE__ */
|
|
9417
|
-
/* @__PURE__ */
|
|
9513
|
+
return /* @__PURE__ */ jsx96("div", { className: "ss-w-tool-backdrop", children: /* @__PURE__ */ jsxs81("div", { ref: dialogRef, className: "ss-w-tool", role: "dialog", "aria-modal": "true", "aria-labelledby": titleId, tabIndex: -1, onKeyDown: trapTab, children: [
|
|
9514
|
+
/* @__PURE__ */ jsxs81("div", { className: "ss-w-tool-head", children: [
|
|
9515
|
+
/* @__PURE__ */ jsx96("h2", { id: titleId, className: "ss-w-tool-title", children: title }),
|
|
9516
|
+
/* @__PURE__ */ jsx96("button", { type: "button", className: "ss-w-tool-close", "aria-label": closeLabel, onClick: onClose, children: /* @__PURE__ */ jsx96(CloseIcon, {}) })
|
|
9418
9517
|
] }),
|
|
9419
|
-
/* @__PURE__ */
|
|
9420
|
-
footer ? /* @__PURE__ */
|
|
9518
|
+
/* @__PURE__ */ jsx96("div", { className: "ss-w-tool-body", children }),
|
|
9519
|
+
footer ? /* @__PURE__ */ jsx96("div", { className: "ss-w-tool-foot", children: footer }) : null
|
|
9421
9520
|
] }) });
|
|
9422
9521
|
}
|
|
9423
9522
|
function fillTemplate(template, slots) {
|
|
9424
9523
|
return template.split(/(\{[a-z]+\})/).filter((part) => part !== "").map((part, i) => {
|
|
9425
9524
|
const key = /^\{([a-z]+)\}$/.exec(part)?.[1];
|
|
9426
|
-
return /* @__PURE__ */
|
|
9525
|
+
return /* @__PURE__ */ jsx96(Fragment21, { children: key !== void 0 && key in slots ? slots[key] : part }, i);
|
|
9427
9526
|
});
|
|
9428
9527
|
}
|
|
9429
9528
|
function NumberSelect({ current, choices: choices2, label, notToday, lockEmpty = true, onChoose }) {
|
|
9430
9529
|
const selected = Math.max(0, choices2.findIndex((c) => c.text === current));
|
|
9431
|
-
return /* @__PURE__ */
|
|
9432
|
-
/* @__PURE__ */
|
|
9433
|
-
/* @__PURE__ */
|
|
9530
|
+
return /* @__PURE__ */ jsxs81("span", { className: "ss-w-tool-num", children: [
|
|
9531
|
+
/* @__PURE__ */ jsx96("span", { className: "ss-w-tool-num-size", "aria-hidden": "true", children: current }),
|
|
9532
|
+
/* @__PURE__ */ jsx96("select", { className: "ss-w-tool-num-select", "aria-label": label, value: String(selected), onChange: (e) => {
|
|
9434
9533
|
const c = choices2[Number(e.target.value)];
|
|
9435
9534
|
if (c) onChoose(c.value);
|
|
9436
|
-
}, children: choices2.map((c, i) => /* @__PURE__ */
|
|
9535
|
+
}, children: choices2.map((c, i) => /* @__PURE__ */ jsx96("option", { value: String(i), disabled: lockEmpty && !c.available && i !== selected, children: c.available ? c.text : `${c.text}${notToday}` }, i)) })
|
|
9437
9536
|
] });
|
|
9438
9537
|
}
|
|
9439
9538
|
function ChoiceSelect({ currentIdx, sizeLabels, optionLabels, label, onChoose }) {
|
|
9440
9539
|
const sizeText = sizeLabels[currentIdx] ?? "";
|
|
9441
|
-
return /* @__PURE__ */
|
|
9442
|
-
/* @__PURE__ */
|
|
9443
|
-
/* @__PURE__ */
|
|
9540
|
+
return /* @__PURE__ */ jsxs81("span", { className: "ss-w-tool-num", children: [
|
|
9541
|
+
/* @__PURE__ */ jsx96("span", { className: "ss-w-tool-num-size", "aria-hidden": "true", children: sizeText }),
|
|
9542
|
+
/* @__PURE__ */ jsx96("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__ */ jsx96("option", { value: String(i), children: opt }, i)) })
|
|
9444
9543
|
] });
|
|
9445
9544
|
}
|
|
9446
9545
|
function SendButton({ label, display, disabled, onClick }) {
|
|
9447
|
-
return /* @__PURE__ */
|
|
9546
|
+
return /* @__PURE__ */ jsx96("button", { type: "button", className: "ss-w-tool-send", "aria-label": `${label}: ${display}`, disabled, onClick, children: label });
|
|
9448
9547
|
}
|
|
9449
9548
|
function PickList({ picks, formatKickoff }) {
|
|
9450
|
-
return /* @__PURE__ */
|
|
9451
|
-
/* @__PURE__ */
|
|
9549
|
+
return /* @__PURE__ */ jsx96("ul", { className: "ss-w-tool-picks", role: "list", children: picks.map((p) => /* @__PURE__ */ jsxs81("li", { className: "ss-w-tool-pick", children: [
|
|
9550
|
+
/* @__PURE__ */ jsxs81("span", { className: "ss-w-tool-pick-match", children: [
|
|
9452
9551
|
p.homeTeamName,
|
|
9453
9552
|
" \u2013 ",
|
|
9454
9553
|
p.awayTeamName
|
|
9455
9554
|
] }),
|
|
9456
|
-
/* @__PURE__ */
|
|
9555
|
+
/* @__PURE__ */ jsxs81("span", { className: "ss-w-tool-pick-sel", children: [
|
|
9457
9556
|
p.marketLabel,
|
|
9458
9557
|
": ",
|
|
9459
9558
|
p.selectionLabel,
|
|
9460
9559
|
p.line ? ` ${p.line}` : ""
|
|
9461
9560
|
] }),
|
|
9462
|
-
/* @__PURE__ */
|
|
9463
|
-
/* @__PURE__ */
|
|
9561
|
+
/* @__PURE__ */ jsx96("span", { className: "ss-w-tool-pick-kick", children: formatKickoff(p.kickoffUtc) }),
|
|
9562
|
+
/* @__PURE__ */ jsx96("span", { className: "ss-w-tool-pick-price", children: p.price.toFixed(2) })
|
|
9464
9563
|
] }, p.matchOddsId)) });
|
|
9465
9564
|
}
|
|
9466
9565
|
function ComboPreview({ cell, formatKickoff }) {
|
|
9467
|
-
return /* @__PURE__ */
|
|
9468
|
-
/* @__PURE__ */
|
|
9469
|
-
/* @__PURE__ */
|
|
9566
|
+
return /* @__PURE__ */ jsxs81(Fragment22, { children: [
|
|
9567
|
+
/* @__PURE__ */ jsx96(PickList, { picks: cell.combo.legs, formatKickoff }),
|
|
9568
|
+
/* @__PURE__ */ jsx96("div", { className: "ss-w-tool-math", children: cell.combo.multiplication })
|
|
9470
9569
|
] });
|
|
9471
9570
|
}
|
|
9472
9571
|
function Unavailable({ text }) {
|
|
9473
|
-
return /* @__PURE__ */
|
|
9572
|
+
return /* @__PURE__ */ jsx96("p", { className: "ss-w-tool-unavailable", children: text });
|
|
9474
9573
|
}
|
|
9475
9574
|
function AskRow({ icon, ask, ready, send }) {
|
|
9476
|
-
return /* @__PURE__ */
|
|
9477
|
-
/* @__PURE__ */
|
|
9478
|
-
/* @__PURE__ */
|
|
9479
|
-
/* @__PURE__ */
|
|
9480
|
-
ready ? /* @__PURE__ */
|
|
9575
|
+
return /* @__PURE__ */ jsxs81("section", { className: "ss-w-tool-row ss-w-tool-row--ask", children: [
|
|
9576
|
+
/* @__PURE__ */ jsx96("span", { className: "ss-w-tool-icon", "aria-hidden": "true", children: icon }),
|
|
9577
|
+
/* @__PURE__ */ jsxs81("div", { className: "ss-w-tool-main", children: [
|
|
9578
|
+
/* @__PURE__ */ jsx96("p", { className: "ss-w-tool-ask", children: ask }),
|
|
9579
|
+
ready ? /* @__PURE__ */ jsx96("span", { className: "ss-w-tool-ready", children: ready }) : null
|
|
9481
9580
|
] }),
|
|
9482
9581
|
send
|
|
9483
9582
|
] });
|
|
9484
9583
|
}
|
|
9485
9584
|
function RoundSend({ label, display, disabled, onClick }) {
|
|
9486
|
-
return /* @__PURE__ */
|
|
9585
|
+
return /* @__PURE__ */ jsx96("button", { type: "button", className: "ss-w-tool-go", "aria-label": `${label}: ${display}`, disabled, onClick, children: /* @__PURE__ */ jsx96(SendIcon, {}) });
|
|
9487
9586
|
}
|
|
9488
9587
|
var BIG_COMBO = { total: 50, legs: 6 };
|
|
9489
9588
|
function SetNumbersTool({ grid, strings, streaming, onSend, onClose }) {
|
|
@@ -9549,77 +9648,77 @@ function SetNumbersTool({ grid, strings, streaming, onSend, onClose }) {
|
|
|
9549
9648
|
const marketLabels = markets.map((c) => strings.marketShort(c.marketDeveloperName, c.marketLabel, c.selectionLabel ?? null));
|
|
9550
9649
|
const singlesReady = (cell) => cell ? strings.readyCount(cell.picks.length) : strings.unavailable;
|
|
9551
9650
|
const comboReady = (cell) => cell ? strings.readyAt(cell.combo.total) : strings.unavailable;
|
|
9552
|
-
return /* @__PURE__ */
|
|
9553
|
-
/* @__PURE__ */
|
|
9651
|
+
return /* @__PURE__ */ jsxs81(PresetToolModal, { title: strings.setNumbers, closeLabel: strings.close, onClose, children: [
|
|
9652
|
+
/* @__PURE__ */ jsx96(
|
|
9554
9653
|
AskRow,
|
|
9555
9654
|
{
|
|
9556
9655
|
icon: "\u{1F3AF}",
|
|
9557
9656
|
ask: fillTemplate(strings.maxPriceRow, {
|
|
9558
9657
|
count: String(count),
|
|
9559
|
-
price: /* @__PURE__ */
|
|
9658
|
+
price: /* @__PURE__ */ jsx96(NumberSelect, { current: maxPrice.toFixed(2), choices: maxChoices, label: strings.maxPriceName, notToday: strings.notToday, onChoose: chooseMax })
|
|
9560
9659
|
}),
|
|
9561
9660
|
ready: singlesReady(maxCell),
|
|
9562
|
-
send: /* @__PURE__ */
|
|
9661
|
+
send: /* @__PURE__ */ jsx96(RoundSend, { label: strings.send, display: strings.maxPriceDisplay(count, maxPrice), disabled: !maxCell || streaming, onClick: () => {
|
|
9563
9662
|
if (maxCell) onSend(maxPriceAsk(maxCell, strings));
|
|
9564
9663
|
} })
|
|
9565
9664
|
}
|
|
9566
9665
|
),
|
|
9567
|
-
/* @__PURE__ */
|
|
9666
|
+
/* @__PURE__ */ jsx96(
|
|
9568
9667
|
AskRow,
|
|
9569
9668
|
{
|
|
9570
9669
|
icon: "\u{1F4C8}",
|
|
9571
9670
|
ask: fillTemplate(strings.minPriceRow, {
|
|
9572
9671
|
count: String(count),
|
|
9573
|
-
price: /* @__PURE__ */
|
|
9672
|
+
price: /* @__PURE__ */ jsx96(NumberSelect, { current: minPrice.toFixed(2), choices: minChoices, label: strings.minPriceName, notToday: strings.notToday, onChoose: chooseMin })
|
|
9574
9673
|
}),
|
|
9575
9674
|
ready: singlesReady(minCell),
|
|
9576
|
-
send: /* @__PURE__ */
|
|
9675
|
+
send: /* @__PURE__ */ jsx96(RoundSend, { label: strings.send, display: strings.minPriceDisplay(count, minPrice), disabled: !minCell || streaming, onClick: () => {
|
|
9577
9676
|
if (minCell) onSend(minPriceAsk(minCell, strings));
|
|
9578
9677
|
} })
|
|
9579
9678
|
}
|
|
9580
9679
|
),
|
|
9581
|
-
/* @__PURE__ */
|
|
9680
|
+
/* @__PURE__ */ jsx96(
|
|
9582
9681
|
AskRow,
|
|
9583
9682
|
{
|
|
9584
9683
|
icon: "\u2728",
|
|
9585
9684
|
ask: fillTemplate(strings.comboRow, {
|
|
9586
|
-
legs: /* @__PURE__ */
|
|
9587
|
-
total: /* @__PURE__ */
|
|
9685
|
+
legs: /* @__PURE__ */ jsx96(NumberSelect, { current: String(legs), choices: legChoicesFor(total), label: strings.matchesLabel, notToday: strings.notToday, lockEmpty: false, onChoose: chooseLegs }),
|
|
9686
|
+
total: /* @__PURE__ */ jsx96(NumberSelect, { current: total.toFixed(1), choices: totalChoices, label: strings.totalLabel, notToday: strings.notToday, onChoose: chooseTotal })
|
|
9588
9687
|
}),
|
|
9589
9688
|
ready: comboReady(comboCell),
|
|
9590
|
-
send: /* @__PURE__ */
|
|
9689
|
+
send: /* @__PURE__ */ jsx96(RoundSend, { label: strings.send, display: strings.comboDisplay(legs, total), disabled: !comboCell || streaming, onClick: () => {
|
|
9591
9690
|
if (comboCell) onSend(comboAsk(comboCell, strings));
|
|
9592
9691
|
} })
|
|
9593
9692
|
}
|
|
9594
9693
|
),
|
|
9595
|
-
/* @__PURE__ */
|
|
9694
|
+
/* @__PURE__ */ jsx96(
|
|
9596
9695
|
AskRow,
|
|
9597
9696
|
{
|
|
9598
9697
|
icon: "\u{1F3C6}",
|
|
9599
9698
|
ask: fillTemplate(strings.bigComboRow, {
|
|
9600
|
-
legs: /* @__PURE__ */
|
|
9601
|
-
total: /* @__PURE__ */
|
|
9699
|
+
legs: /* @__PURE__ */ jsx96(NumberSelect, { current: String(bigLegs), choices: legChoicesFor(bigTotal), label: strings.matchesLabel, notToday: strings.notToday, lockEmpty: false, onChoose: chooseBigLegs }),
|
|
9700
|
+
total: /* @__PURE__ */ jsx96(NumberSelect, { current: bigTotal.toFixed(1), choices: totalChoices, label: strings.totalLabel, notToday: strings.notToday, onChoose: chooseBigTotal })
|
|
9602
9701
|
}),
|
|
9603
9702
|
ready: comboReady(bigCell),
|
|
9604
|
-
send: /* @__PURE__ */
|
|
9703
|
+
send: /* @__PURE__ */ jsx96(RoundSend, { label: strings.send, display: strings.comboDisplay(bigLegs, bigTotal), disabled: !bigCell || streaming, onClick: () => {
|
|
9605
9704
|
if (bigCell) onSend(comboAsk(bigCell, strings));
|
|
9606
9705
|
} })
|
|
9607
9706
|
}
|
|
9608
9707
|
),
|
|
9609
|
-
markets.length > 0 && /* @__PURE__ */
|
|
9708
|
+
markets.length > 0 && /* @__PURE__ */ jsx96(
|
|
9610
9709
|
AskRow,
|
|
9611
9710
|
{
|
|
9612
9711
|
icon: "\u26BD",
|
|
9613
9712
|
ask: fillTemplate(strings.marketRow, {
|
|
9614
|
-
market: /* @__PURE__ */
|
|
9713
|
+
market: /* @__PURE__ */ jsx96(ChoiceSelect, { currentIdx: marketIdx, sizeLabels: marketLabels, optionLabels: marketLabels, label: strings.marketName, onChoose: chooseMarket })
|
|
9615
9714
|
}),
|
|
9616
9715
|
ready: marketCell ? strings.readyCount(marketCell.count) : null,
|
|
9617
|
-
send: /* @__PURE__ */
|
|
9716
|
+
send: /* @__PURE__ */ jsx96(RoundSend, { label: strings.send, display: marketCell ? marketDisplay(marketCell, strings) : "", disabled: !marketCell || streaming, onClick: () => {
|
|
9618
9717
|
if (marketCell) onSend(marketAsk(marketCell, strings));
|
|
9619
9718
|
} })
|
|
9620
9719
|
}
|
|
9621
9720
|
),
|
|
9622
|
-
/* @__PURE__ */
|
|
9721
|
+
/* @__PURE__ */ jsx96("p", { className: "ss-w-vh", "aria-live": "polite", children: announcement })
|
|
9623
9722
|
] });
|
|
9624
9723
|
}
|
|
9625
9724
|
function BuildComboTool({ grid, strings, streaming, formatKickoff, initialTotal, initialLegs, onSend, onClose }) {
|
|
@@ -9643,24 +9742,24 @@ function BuildComboTool({ grid, strings, streaming, formatKickoff, initialTotal,
|
|
|
9643
9742
|
const d = strings.comboDisplay(nextLegs, nextTotal);
|
|
9644
9743
|
setAnnouncement(findCombo(grid, nextTotal, nextLegs) ? d : `${d}. ${strings.unavailable}`);
|
|
9645
9744
|
};
|
|
9646
|
-
const footer = /* @__PURE__ */
|
|
9745
|
+
const footer = /* @__PURE__ */ jsx96(SendButton, { label: strings.send, display, disabled: !cell || streaming, onClick: () => {
|
|
9647
9746
|
if (cell) onSend(comboAsk(cell, strings));
|
|
9648
9747
|
} });
|
|
9649
|
-
return /* @__PURE__ */
|
|
9650
|
-
/* @__PURE__ */
|
|
9651
|
-
/* @__PURE__ */
|
|
9652
|
-
/* @__PURE__ */
|
|
9748
|
+
return /* @__PURE__ */ jsxs81(PresetToolModal, { title: strings.buildCombo, closeLabel: strings.close, onClose, footer, children: [
|
|
9749
|
+
/* @__PURE__ */ jsxs81("div", { className: "ss-w-tool-section", role: "group", "aria-label": strings.totalLabel, children: [
|
|
9750
|
+
/* @__PURE__ */ jsx96("span", { className: "ss-w-tool-label", "aria-hidden": "true", children: strings.totalLabel }),
|
|
9751
|
+
/* @__PURE__ */ jsx96("div", { className: "ss-w-tool-chips", children: totals.map((t) => /* @__PURE__ */ jsx96("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)) })
|
|
9653
9752
|
] }),
|
|
9654
|
-
/* @__PURE__ */
|
|
9655
|
-
/* @__PURE__ */
|
|
9656
|
-
/* @__PURE__ */
|
|
9657
|
-
/* @__PURE__ */
|
|
9658
|
-
/* @__PURE__ */
|
|
9659
|
-
/* @__PURE__ */
|
|
9753
|
+
/* @__PURE__ */ jsxs81("div", { className: "ss-w-tool-section", role: "group", "aria-label": strings.matchesLabel, children: [
|
|
9754
|
+
/* @__PURE__ */ jsx96("span", { className: "ss-w-tool-label", "aria-hidden": "true", children: strings.matchesLabel }),
|
|
9755
|
+
/* @__PURE__ */ jsxs81("div", { className: "ss-w-tool-stepper", children: [
|
|
9756
|
+
/* @__PURE__ */ jsx96("button", { type: "button", className: "ss-w-tool-step", "aria-label": strings.fewerMatches, disabled: legs <= minLegs, onClick: () => choose(total, legs - 1), children: "\u2212" }),
|
|
9757
|
+
/* @__PURE__ */ jsx96("span", { className: "ss-w-tool-count", children: legs }),
|
|
9758
|
+
/* @__PURE__ */ jsx96("button", { type: "button", className: "ss-w-tool-step", "aria-label": strings.moreMatches, disabled: legs >= maxLegs, onClick: () => choose(total, legs + 1), children: "+" })
|
|
9660
9759
|
] })
|
|
9661
9760
|
] }),
|
|
9662
|
-
cell ? /* @__PURE__ */
|
|
9663
|
-
/* @__PURE__ */
|
|
9761
|
+
cell ? /* @__PURE__ */ jsx96(ComboPreview, { cell, formatKickoff }) : /* @__PURE__ */ jsx96(Unavailable, { text: strings.unavailable }),
|
|
9762
|
+
/* @__PURE__ */ jsx96("p", { className: "ss-w-vh", "aria-live": "polite", children: announcement })
|
|
9664
9763
|
] });
|
|
9665
9764
|
}
|
|
9666
9765
|
|
|
@@ -9762,7 +9861,7 @@ function markToolSeen() {
|
|
|
9762
9861
|
}
|
|
9763
9862
|
|
|
9764
9863
|
// src/components/ChatPanel.tsx
|
|
9765
|
-
import { Fragment as Fragment23, jsx as
|
|
9864
|
+
import { Fragment as Fragment23, jsx as jsx97, jsxs as jsxs82 } from "react/jsx-runtime";
|
|
9766
9865
|
var FULLSCREEN_QUERY = "(max-width: 639px)";
|
|
9767
9866
|
function useIsModal() {
|
|
9768
9867
|
const [modal, setModal] = useState47(false);
|
|
@@ -9865,8 +9964,8 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
9865
9964
|
focusAfterCloseRef.current = "composer";
|
|
9866
9965
|
setTool(null);
|
|
9867
9966
|
}, [tool, onChatTab, presetGrid]);
|
|
9868
|
-
return /* @__PURE__ */
|
|
9869
|
-
/* @__PURE__ */
|
|
9967
|
+
return /* @__PURE__ */ jsxs82("div", { className: "ss-w-panel", role: "dialog", "aria-modal": isModal, "aria-label": ui.chatDialogLabel, children: [
|
|
9968
|
+
/* @__PURE__ */ jsx97(
|
|
9870
9969
|
ChatHeader,
|
|
9871
9970
|
{
|
|
9872
9971
|
onClose: close,
|
|
@@ -9879,7 +9978,7 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
9879
9978
|
moreOptionsLabel: ui.moreOptions
|
|
9880
9979
|
}
|
|
9881
9980
|
),
|
|
9882
|
-
monitor && /* @__PURE__ */
|
|
9981
|
+
monitor && /* @__PURE__ */ jsx97(
|
|
9883
9982
|
TabBar,
|
|
9884
9983
|
{
|
|
9885
9984
|
monitor,
|
|
@@ -9891,9 +9990,9 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
9891
9990
|
gamesEnabled: gamesResult?.enabled ?? false
|
|
9892
9991
|
}
|
|
9893
9992
|
),
|
|
9894
|
-
/* @__PURE__ */
|
|
9895
|
-
/* @__PURE__ */
|
|
9896
|
-
showDial ? /* @__PURE__ */
|
|
9993
|
+
/* @__PURE__ */ jsxs82("div", { ref: layerRef, className: "ss-w-chat-layer", "data-dial": presetGrid ? "" : void 0, style: onChatTab ? void 0 : HIDDEN_LAYER_STYLE, children: [
|
|
9994
|
+
/* @__PURE__ */ jsx97(PresetToolsContext.Provider, { value: toolsValue, children: /* @__PURE__ */ jsx97(MessageList, { controller, ui, slip, onDashboardTap, monitor }) }),
|
|
9995
|
+
showDial ? /* @__PURE__ */ jsx97(
|
|
9897
9996
|
PresetSpeedDial,
|
|
9898
9997
|
{
|
|
9899
9998
|
expanded: dial.expanded,
|
|
@@ -9905,12 +10004,12 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
9905
10004
|
buttonRef: dialButtonRef
|
|
9906
10005
|
}
|
|
9907
10006
|
) : null,
|
|
9908
|
-
tool && presetGrid && onChatTab && !paused ? tool.kind === "numbers" ? /* @__PURE__ */
|
|
10007
|
+
tool && presetGrid && onChatTab && !paused ? tool.kind === "numbers" ? /* @__PURE__ */ jsx97(SetNumbersTool, { grid: presetGrid, strings: ui.presets, streaming: state.isStreaming, onSend: sendAsk, onClose: closeTool }) : /* @__PURE__ */ jsx97(BuildComboTool, { grid: presetGrid, strings: ui.presets, streaming: state.isStreaming, formatKickoff, initialTotal: tool.total, initialLegs: tool.legs, onSend: sendAsk, onClose: closeTool }) : null
|
|
9909
10008
|
] }),
|
|
9910
|
-
monitor && discovery && monitor.activeTab === "today" && /* @__PURE__ */
|
|
9911
|
-
monitor && monitor.activeTab === "following" && /* @__PURE__ */
|
|
9912
|
-
monitor && monitor.activeTab === "odds" && /* @__PURE__ */
|
|
9913
|
-
monitor && monitor.activeTab === "games" && gamesResult && /* @__PURE__ */
|
|
10009
|
+
monitor && discovery && monitor.activeTab === "today" && /* @__PURE__ */ jsx97(TodayPanel, { discovery, ui, monitor }),
|
|
10010
|
+
monitor && monitor.activeTab === "following" && /* @__PURE__ */ jsx97(MatchesPanel, { monitor, ui, slip, onAsk: paused ? void 0 : handleAsk }),
|
|
10011
|
+
monitor && monitor.activeTab === "odds" && /* @__PURE__ */ jsx97(OddsPanel, { monitor, ui, slip }),
|
|
10012
|
+
monitor && monitor.activeTab === "games" && gamesResult && /* @__PURE__ */ jsx97(
|
|
9914
10013
|
GamesPanel,
|
|
9915
10014
|
{
|
|
9916
10015
|
loggedIn: !!loggedIn,
|
|
@@ -9924,7 +10023,7 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
9924
10023
|
}
|
|
9925
10024
|
}
|
|
9926
10025
|
),
|
|
9927
|
-
monitor && monitor.activeTab === "leaderboard" && leaderboardResult && /* @__PURE__ */
|
|
10026
|
+
monitor && monitor.activeTab === "leaderboard" && leaderboardResult && /* @__PURE__ */ jsx97(
|
|
9928
10027
|
LeaderboardPanel,
|
|
9929
10028
|
{
|
|
9930
10029
|
loggedIn: !!loggedIn,
|
|
@@ -9934,9 +10033,9 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
9934
10033
|
ui
|
|
9935
10034
|
}
|
|
9936
10035
|
),
|
|
9937
|
-
(!monitor || monitor.activeTab !== "games" && monitor.activeTab !== "leaderboard") && /* @__PURE__ */
|
|
9938
|
-
/* @__PURE__ */
|
|
9939
|
-
paused ? null : /* @__PURE__ */
|
|
10036
|
+
(!monitor || monitor.activeTab !== "games" && monitor.activeTab !== "leaderboard") && /* @__PURE__ */ jsxs82(Fragment23, { children: [
|
|
10037
|
+
/* @__PURE__ */ jsx97("div", { ref: limitRef, className: "ss-w-limit", role: "status", tabIndex: -1, children: state.limit ? limitText(state.limit, ui) : null }),
|
|
10038
|
+
paused ? null : /* @__PURE__ */ jsx97(
|
|
9940
10039
|
ChatInput,
|
|
9941
10040
|
{
|
|
9942
10041
|
ref: inputRef,
|
|
@@ -9955,9 +10054,9 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
9955
10054
|
}
|
|
9956
10055
|
|
|
9957
10056
|
// src/components/HostEventsProvider.tsx
|
|
9958
|
-
import { jsx as
|
|
10057
|
+
import { jsx as jsx98 } from "react/jsx-runtime";
|
|
9959
10058
|
function HostEventsProvider({ value, children }) {
|
|
9960
|
-
return /* @__PURE__ */
|
|
10059
|
+
return /* @__PURE__ */ jsx98(SlipStateContext.Provider, { value: value.slipState, children });
|
|
9961
10060
|
}
|
|
9962
10061
|
|
|
9963
10062
|
// src/styles/css.generated.ts
|
|
@@ -11192,6 +11291,24 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
11192
11291
|
.ss-w-today-tile-star:disabled { cursor: default; opacity: .4; }
|
|
11193
11292
|
.ss-w-today-tile-star svg { width: 18px; height: 18px; }
|
|
11194
11293
|
|
|
11294
|
+
/* Capped row groups (variant B of u521): one league's section-header plus up to
|
|
11295
|
+
ROW_CAP_PER_LEAGUE inline fixture rows, used in place of a tile when the section row budget
|
|
11296
|
+
allows it. Mirrors LeagueTile's button-body + sibling-star-button shape. */
|
|
11297
|
+
.ss-w-today-rowsection { display: flex; flex-direction: column; gap: 12px; }
|
|
11298
|
+
.ss-w-today-rowgroup { display: flex; flex-direction: column; }
|
|
11299
|
+
.ss-w-today-rowgroup-head { display: flex; align-items: center; gap: 4px; }
|
|
11300
|
+
.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; }
|
|
11301
|
+
.ss-w-today-rowgroup-head-body:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: -2px; }
|
|
11302
|
+
.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; }
|
|
11303
|
+
.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; }
|
|
11304
|
+
.ss-w-today-rowgroup-star:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: -2px; }
|
|
11305
|
+
.ss-w-today-rowgroup-star[aria-pressed="true"] { color: var(--ss-w-accent); }
|
|
11306
|
+
.ss-w-today-rowgroup-star:disabled { cursor: default; opacity: .4; }
|
|
11307
|
+
.ss-w-today-rowgroup-star svg { width: 16px; height: 16px; }
|
|
11308
|
+
.ss-w-today-rowgroup-rows { display: flex; flex-direction: column; }
|
|
11309
|
+
.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; }
|
|
11310
|
+
.ss-w-today-rowgroup-seeall:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: -2px; }
|
|
11311
|
+
|
|
11195
11312
|
/* League detail (Task 6): the drill-in view opened from a tile. Its header star is always
|
|
11196
11313
|
enabled (spec \xA73/\xA77's one exception to the tile rule), so it carries no :disabled styling. */
|
|
11197
11314
|
.ss-w-today-detail { position: relative; display: flex; flex-direction: column; gap: 10px; }
|
|
@@ -11698,7 +11815,7 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
11698
11815
|
`;
|
|
11699
11816
|
|
|
11700
11817
|
// src/StatsWidget.tsx
|
|
11701
|
-
import { jsx as
|
|
11818
|
+
import { jsx as jsx99 } from "react/jsx-runtime";
|
|
11702
11819
|
function buildClient(props) {
|
|
11703
11820
|
try {
|
|
11704
11821
|
if ("client" in props && props.client) {
|
|
@@ -11917,7 +12034,7 @@ function StatsWidget(props) {
|
|
|
11917
12034
|
}, [built, ui.injectStyles]);
|
|
11918
12035
|
if (!built) return null;
|
|
11919
12036
|
const attrs = themeAttrs(ui);
|
|
11920
|
-
return /* @__PURE__ */
|
|
12037
|
+
return /* @__PURE__ */ jsx99(EventLogContext.Provider, { value: logger, children: /* @__PURE__ */ jsx99(HostEventsProvider, { value: hostEvents, children: /* @__PURE__ */ jsx99("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__ */ jsx99(
|
|
11921
12038
|
ChatPanel,
|
|
11922
12039
|
{
|
|
11923
12040
|
controller,
|
|
@@ -11932,7 +12049,7 @@ function StatsWidget(props) {
|
|
|
11932
12049
|
conversation: built?.conversation ?? null,
|
|
11933
12050
|
presetGrid
|
|
11934
12051
|
}
|
|
11935
|
-
) : /* @__PURE__ */
|
|
12052
|
+
) : /* @__PURE__ */ jsx99(
|
|
11936
12053
|
ChatFab,
|
|
11937
12054
|
{
|
|
11938
12055
|
label: ui.launcherLabel,
|