@sensiblestats/widget-react 0.93.0 → 0.95.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 +23 -0
- package/dist/index.cjs +227 -15
- 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 +227 -15
- package/dist/index.js.map +1 -1
- package/dist/styles.css +22 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @sensiblestats/widget-react
|
|
2
2
|
|
|
3
|
+
## 0.95.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- NBA matchup, quarter ladder and settle recap cards, behind the nba_insight_v2 capability.
|
|
8
|
+
- Malformed matchup, quarter ladder and settle recap cards are dropped instead of crashing the widget; a card of an unknown kind renders nothing.
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
- @sensiblestats/widget-sdk@0.64.0
|
|
14
|
+
|
|
15
|
+
## 0.94.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- Co-hit card no longer shows a combined price; `combinedPrice` is optional and deprecated.
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Updated dependencies
|
|
24
|
+
- @sensiblestats/widget-sdk@0.63.1
|
|
25
|
+
|
|
3
26
|
## 0.93.0
|
|
4
27
|
|
|
5
28
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
|
@@ -57,6 +57,8 @@ var NBA_STAT_EN = { points: "Points", rebounds: "Rebounds", assists: "Assists",
|
|
|
57
57
|
var NBA_STAT_TR = { points: "Say\u0131", rebounds: "Ribaund", assists: "Asist", threes: "\xDC\xE7l\xFCk", steals: "Top \xE7alma", blocks: "Blok" };
|
|
58
58
|
var NBA_STAT_SHORT_EN = { points: "PTS", rebounds: "REB", assists: "AST", threes: "3PM" };
|
|
59
59
|
var NBA_STAT_SHORT_TR = { points: "SAY", rebounds: "RIB", assists: "AST", threes: "3SY" };
|
|
60
|
+
var NBA_POSITION_EN = { G: "guards", F: "forwards", C: "centers" };
|
|
61
|
+
var NBA_POSITION_TR = { G: "guard", F: "forvet", C: "pivot" };
|
|
60
62
|
var NBA_STATUS_TR = { Out: "Oynamayacak", Doubtful: "\u015E\xFCpheli", Questionable: "Belirsiz", Probable: "Muhtemel" };
|
|
61
63
|
var signed = (line) => line.replace(/^-/, "\u2212");
|
|
62
64
|
var GROUP_NOUN_EN = { G: "goalkeepers", D: "defenders", M: "midfielders", F: "forwards" };
|
|
@@ -347,7 +349,6 @@ var STRINGS = {
|
|
|
347
349
|
under: (l) => `Under ${l}`,
|
|
348
350
|
lastN: (n) => `L${n}`,
|
|
349
351
|
both: "Both",
|
|
350
|
-
combined: "Two prices multiplied",
|
|
351
352
|
addBoth: "Add both to slip",
|
|
352
353
|
bothInSlip: "Both in slip",
|
|
353
354
|
spread: "Spread",
|
|
@@ -373,7 +374,26 @@ var STRINGS = {
|
|
|
373
374
|
propsLast5: "Last 5 games",
|
|
374
375
|
propsLadderOnly: "Ladder only",
|
|
375
376
|
propsMarkets: (n) => `${n} markets`,
|
|
376
|
-
propsStatShort: (stat) => NBA_STAT_SHORT_EN[stat] ?? stat
|
|
377
|
+
propsStatShort: (stat) => NBA_STAT_SHORT_EN[stat] ?? stat,
|
|
378
|
+
matchupPace: "Pace",
|
|
379
|
+
matchupOffRating: "Offensive rating",
|
|
380
|
+
matchupDefRating: "Defensive rating",
|
|
381
|
+
rankOf: (r, n) => `rank ${r} of ${n}`,
|
|
382
|
+
daysRest: (d) => `${d} ${d === 1 ? "day" : "days"} rest`,
|
|
383
|
+
backToBack: "Back-to-back",
|
|
384
|
+
allowsToPosition: (team, v, stat, pos, avg) => `${team} allows ${v} ${(NBA_STAT_EN[stat] ?? stat).toLowerCase()} per game to ${NBA_POSITION_EN[pos] ?? pos} (league average ${avg})`,
|
|
385
|
+
quarterWindow1q: "First quarter",
|
|
386
|
+
quarterWindowFirst3: "First 3 min",
|
|
387
|
+
hitsOf: (h, n) => `${h} of ${n}`,
|
|
388
|
+
settled: "Settled",
|
|
389
|
+
actual: "Actual",
|
|
390
|
+
resultOver: "Over",
|
|
391
|
+
resultUnder: "Under",
|
|
392
|
+
resultPush: "Push",
|
|
393
|
+
resultVoid: "Void",
|
|
394
|
+
lastLineBeforeTip: "Last line before tip",
|
|
395
|
+
morePlayers: (n) => `+${n} more players`,
|
|
396
|
+
smallSample: "Small sample"
|
|
377
397
|
},
|
|
378
398
|
games: {
|
|
379
399
|
lang: "en",
|
|
@@ -858,7 +878,6 @@ var STRINGS = {
|
|
|
858
878
|
under: (l) => `Alt ${l}`,
|
|
859
879
|
lastN: (n) => `L${n}`,
|
|
860
880
|
both: "\u0130kisi de",
|
|
861
|
-
combined: "\u0130ki oran\u0131n \xE7arp\u0131m\u0131",
|
|
862
881
|
addBoth: "\u0130kisini kupona ekle",
|
|
863
882
|
bothInSlip: "\u0130kisi de kuponda",
|
|
864
883
|
spread: "Handikap",
|
|
@@ -884,7 +903,26 @@ var STRINGS = {
|
|
|
884
903
|
propsLast5: "Son 5 ma\xE7",
|
|
885
904
|
propsLadderOnly: "Sadece alternatif",
|
|
886
905
|
propsMarkets: (n) => `${n} market`,
|
|
887
|
-
propsStatShort: (stat) => NBA_STAT_SHORT_TR[stat] ?? stat
|
|
906
|
+
propsStatShort: (stat) => NBA_STAT_SHORT_TR[stat] ?? stat,
|
|
907
|
+
matchupPace: "Tempo",
|
|
908
|
+
matchupOffRating: "H\xFCcum reytingi",
|
|
909
|
+
matchupDefRating: "Savunma reytingi",
|
|
910
|
+
rankOf: (r, n) => `${n} tak\u0131mda ${r}. s\u0131ra`,
|
|
911
|
+
daysRest: (d) => `${d} g\xFCn dinlenme`,
|
|
912
|
+
backToBack: "Arka arkaya ma\xE7",
|
|
913
|
+
allowsToPosition: (team, v, stat, pos, avg) => `${team}, ${NBA_POSITION_TR[pos] ?? pos} oyunculara ma\xE7 ba\u015F\u0131na ${v} ${(NBA_STAT_TR[stat] ?? stat).toLocaleLowerCase("tr-TR")} veriyor (lig ortalamas\u0131 ${avg})`,
|
|
914
|
+
quarterWindow1q: "\u0130lk \xE7eyrek",
|
|
915
|
+
quarterWindowFirst3: "\u0130lk 3 dakika",
|
|
916
|
+
hitsOf: (h, n) => `${n} ma\xE7ta ${h}`,
|
|
917
|
+
settled: "Sonu\xE7land\u0131",
|
|
918
|
+
actual: "Ger\xE7ek",
|
|
919
|
+
resultOver: "\xDCst",
|
|
920
|
+
resultUnder: "Alt",
|
|
921
|
+
resultPush: "\u0130ade",
|
|
922
|
+
resultVoid: "\u0130ptal",
|
|
923
|
+
lastLineBeforeTip: "Ma\xE7 \xF6ncesi son baraj",
|
|
924
|
+
morePlayers: (n) => `+${n} oyuncu daha`,
|
|
925
|
+
smallSample: "Az ma\xE7"
|
|
888
926
|
},
|
|
889
927
|
games: {
|
|
890
928
|
lang: "tr",
|
|
@@ -1099,7 +1137,7 @@ function isEnglishLocale(locale) {
|
|
|
1099
1137
|
}
|
|
1100
1138
|
|
|
1101
1139
|
// src/version.generated.ts
|
|
1102
|
-
var WIDGET_REACT_VERSION = "0.
|
|
1140
|
+
var WIDGET_REACT_VERSION = "0.95.0";
|
|
1103
1141
|
|
|
1104
1142
|
// src/config.ts
|
|
1105
1143
|
function normalizeUi(cfg) {
|
|
@@ -1694,6 +1732,27 @@ function comboLegToSlipSelection(leg, conversationId) {
|
|
|
1694
1732
|
if (conversationId !== void 0) selection.conversationId = conversationId;
|
|
1695
1733
|
return selection;
|
|
1696
1734
|
}
|
|
1735
|
+
var isNum = (v) => typeof v === "number" && Number.isFinite(v);
|
|
1736
|
+
var isObj = (v) => typeof v === "object" && v !== null;
|
|
1737
|
+
var numOrNull = (v) => v === null || v === void 0 || isNum(v);
|
|
1738
|
+
function validMatchupTeam(t) {
|
|
1739
|
+
return isObj(t) && typeof t.name === "string" && typeof t.abbr === "string" && isNum(t.pace) && isNum(t.offRating) && isNum(t.defRating) && isNum(t.n) && isNum(t.teamsRanked) && numOrNull(t.daysRest) && numOrNull(t.paceRank) && numOrNull(t.offRatingRank) && numOrNull(t.defRatingRank);
|
|
1740
|
+
}
|
|
1741
|
+
function validMatchupPosition(p) {
|
|
1742
|
+
return isObj(p) && typeof p.defendingTeamAbbr === "string" && typeof p.position === "string" && typeof p.stat === "string" && isNum(p.allowedPerGame) && isNum(p.leagueAvg) && isNum(p.rank) && isNum(p.teamsRanked) && isNum(p.n);
|
|
1743
|
+
}
|
|
1744
|
+
function sanitizeMatchup(m) {
|
|
1745
|
+
if (!m || !Array.isArray(m.teams) || m.teams.length !== 2 || !m.teams.every(validMatchupTeam)) return null;
|
|
1746
|
+
const teams = m.teams.map((t) => ({ ...t, daysRest: t.daysRest ?? null, paceRank: t.paceRank ?? null, offRatingRank: t.offRatingRank ?? null, defRatingRank: t.defRatingRank ?? null }));
|
|
1747
|
+
return { teams, position: validMatchupPosition(m.position) ? m.position : null };
|
|
1748
|
+
}
|
|
1749
|
+
function validQuarterLadder(q) {
|
|
1750
|
+
return !!q && (q.window === "1q" || q.window === "first3min") && Array.isArray(q.stats) && q.stats.every((st) => isObj(st) && Array.isArray(st.rungs) && st.rungs.every((r) => isObj(r) && typeof r.at === "string" && isNum(r.hits) && isNum(r.n)));
|
|
1751
|
+
}
|
|
1752
|
+
var SETTLE_RESULTS = ["over", "under", "push", "void"];
|
|
1753
|
+
function validSettleRecap(sr) {
|
|
1754
|
+
return !!sr && isObj(sr.summary) && isNum(sr.summary.over) && isNum(sr.summary.under) && isNum(sr.summary.pushes) && isNum(sr.summary.voids) && Array.isArray(sr.players) && sr.players.every((p) => isObj(p) && Array.isArray(p.lines) && p.lines.every((l) => isObj(l) && typeof l.line === "string" && (l.actual === null || typeof l.actual === "string") && SETTLE_RESULTS.includes(l.result)));
|
|
1755
|
+
}
|
|
1697
1756
|
function nbaEvidence(insight) {
|
|
1698
1757
|
switch (insight.kind) {
|
|
1699
1758
|
case "prop_reason":
|
|
@@ -1706,6 +1765,14 @@ function nbaEvidence(insight) {
|
|
|
1706
1765
|
return insight.coHit && insight.coHit.legs.length === 2 ? { kind: "co_hit", coHit: insight.coHit } : null;
|
|
1707
1766
|
case "ladder":
|
|
1708
1767
|
return insight.ladder ? { kind: "ladder", ladder: insight.ladder } : null;
|
|
1768
|
+
case "matchup": {
|
|
1769
|
+
const matchup = sanitizeMatchup(insight.matchup);
|
|
1770
|
+
return matchup ? { kind: "matchup", matchup } : null;
|
|
1771
|
+
}
|
|
1772
|
+
case "quarter_ladder":
|
|
1773
|
+
return validQuarterLadder(insight.quarterLadder) ? { kind: "quarter_ladder", quarterLadder: insight.quarterLadder } : null;
|
|
1774
|
+
case "settle_recap":
|
|
1775
|
+
return validSettleRecap(insight.settleRecap) ? { kind: "settle_recap", settleRecap: insight.settleRecap } : null;
|
|
1709
1776
|
default:
|
|
1710
1777
|
return null;
|
|
1711
1778
|
}
|
|
@@ -2652,7 +2719,7 @@ function clearConversation(storageKey) {
|
|
|
2652
2719
|
}
|
|
2653
2720
|
|
|
2654
2721
|
// src/presets.ts
|
|
2655
|
-
var CLIENT_CAPABILITIES = ["price_presets", "price_presets_open", "limit_notice", "nba_insight"];
|
|
2722
|
+
var CLIENT_CAPABILITIES = ["price_presets", "price_presets_open", "limit_notice", "nba_insight", "nba_insight_v2"];
|
|
2656
2723
|
var PRICE_TILE_PREFIX = "goal-preset-";
|
|
2657
2724
|
function isPriceTile(tile) {
|
|
2658
2725
|
const id = tile.signal?.entityId;
|
|
@@ -5093,19 +5160,23 @@ function NbaPrice({ vm, selectionKey, label, ui, slip }) {
|
|
|
5093
5160
|
function Head({ vm, chip, ui, monitor }) {
|
|
5094
5161
|
const fixture = vm.homeTeamName && vm.awayTeamName ? `${vm.homeTeamName} vs ${vm.awayTeamName}` : vm.competition;
|
|
5095
5162
|
const meta = [fixture, vm.kickoffLabel].filter(Boolean).join(" \xB7 ");
|
|
5163
|
+
const pinnable = monitor?.enabled === true && vm.evidence.kind !== "settle_recap";
|
|
5096
5164
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ss-w-nba-head", children: [
|
|
5097
5165
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ss-w-nba-head-l", children: [
|
|
5098
5166
|
meta ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "ss-w-nba-meta", children: meta }) : null,
|
|
5099
5167
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "ss-w-nba-title", children: vm.title })
|
|
5100
5168
|
] }),
|
|
5101
|
-
chip ||
|
|
5169
|
+
chip || pinnable ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "ss-w-bi-meta-right", children: [
|
|
5102
5170
|
chip ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-nba-chip", children: chip }) : null,
|
|
5103
|
-
monitor
|
|
5171
|
+
pinnable && monitor ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(PinToggle, { ui, monitor, pin: { kind: "match", matchId: vm.matchId, sport: "basketball" } }) : null
|
|
5104
5172
|
] }) : null
|
|
5105
5173
|
] });
|
|
5106
5174
|
}
|
|
5107
5175
|
function Foot({ vm, ui, lines }) {
|
|
5108
|
-
|
|
5176
|
+
const quoted = Object.keys(vm.selections).length > 0 ? [ui.nba.quoted(clock(vm.quotedAtUtc))] : [];
|
|
5177
|
+
const parts = [...lines, ...quoted, ...vm.disclaimer ? [vm.disclaimer] : []];
|
|
5178
|
+
if (parts.length === 0) return null;
|
|
5179
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "ss-w-nba-foot", children: parts.join(" ") });
|
|
5109
5180
|
}
|
|
5110
5181
|
function PropReason({ vm, pr, ui, slip }) {
|
|
5111
5182
|
const nba = ui.nba;
|
|
@@ -5174,6 +5245,117 @@ function Ladder({ vm, ld, ui, slip }) {
|
|
|
5174
5245
|
] })
|
|
5175
5246
|
] }, `${st.stat}:${si}`)) });
|
|
5176
5247
|
}
|
|
5248
|
+
function SmallSample({ ui }) {
|
|
5249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-nba-small", children: ui.nba.smallSample });
|
|
5250
|
+
}
|
|
5251
|
+
function NbaMatchupBody({ mu, ui }) {
|
|
5252
|
+
const nba = ui.nba;
|
|
5253
|
+
const metrics = [
|
|
5254
|
+
{ label: nba.matchupPace, value: (t) => t.pace, rank: (t) => t.paceRank },
|
|
5255
|
+
{ label: nba.matchupOffRating, value: (t) => t.offRating, rank: (t) => t.offRatingRank },
|
|
5256
|
+
{ label: nba.matchupDefRating, value: (t) => t.defRating, rank: (t) => t.defRatingRank }
|
|
5257
|
+
];
|
|
5258
|
+
const pos = mu.position;
|
|
5259
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
5260
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ss-w-nba-mu", children: [
|
|
5261
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", {}),
|
|
5262
|
+
mu.teams.map((t) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "ss-w-nba-mu-team", title: t.name, children: [
|
|
5263
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("b", { children: t.abbr }),
|
|
5264
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-nba-hd", children: nba.lastN(t.n) }),
|
|
5265
|
+
t.smallSample ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SmallSample, { ui }) : null
|
|
5266
|
+
] }, `h:${t.teamId}`)),
|
|
5267
|
+
metrics.map((m) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ss-w-nba-row", children: [
|
|
5268
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-nba-hd", children: m.label }),
|
|
5269
|
+
mu.teams.map((t) => {
|
|
5270
|
+
const r = m.rank(t);
|
|
5271
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "ss-w-nba-mu-v", children: [
|
|
5272
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("b", { children: oneDecimal(m.value(t), ui) }),
|
|
5273
|
+
r !== null ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: nba.rankOf(r, t.teamsRanked) }) : null
|
|
5274
|
+
] }, `${m.label}:${t.teamId}`);
|
|
5275
|
+
})
|
|
5276
|
+
] }, m.label)),
|
|
5277
|
+
mu.teams.some((t) => t.daysRest !== null || t.backToBack) ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ss-w-nba-row", children: [
|
|
5278
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", {}),
|
|
5279
|
+
mu.teams.map((t) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "ss-w-nba-mu-rest", children: [
|
|
5280
|
+
t.daysRest !== null ? nba.daysRest(t.daysRest) : "",
|
|
5281
|
+
t.daysRest !== null && t.backToBack ? " \xB7 " : "",
|
|
5282
|
+
t.backToBack ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-nba-b2b", children: nba.backToBack }) : null
|
|
5283
|
+
] }, `rest:${t.teamId}`))
|
|
5284
|
+
] }) : null
|
|
5285
|
+
] }),
|
|
5286
|
+
pos ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { className: "ss-w-nba-mu-pos", children: [
|
|
5287
|
+
nba.allowsToPosition(pos.defendingTeamAbbr, oneDecimal(pos.allowedPerGame, ui), pos.stat, pos.position, oneDecimal(pos.leagueAvg, ui)),
|
|
5288
|
+
" ",
|
|
5289
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-nba-note", children: nba.rankOf(pos.rank, pos.teamsRanked) }),
|
|
5290
|
+
pos.smallSample ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SmallSample, { ui }) : null
|
|
5291
|
+
] }) : null
|
|
5292
|
+
] });
|
|
5293
|
+
}
|
|
5294
|
+
function NbaQuarterLadderBody({ vm, ql, ui, slip }) {
|
|
5295
|
+
const nba = ui.nba;
|
|
5296
|
+
const windowLabel = ql.window === "1q" ? nba.quarterWindow1q : ql.window === "first3min" ? nba.quarterWindowFirst3 : "";
|
|
5297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_jsx_runtime17.Fragment, { children: ql.stats.map((st, si) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ss-w-nba-stat", children: [
|
|
5298
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ss-w-nba-stathd", children: [
|
|
5299
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("b", { children: nba.stat(st.stat) }),
|
|
5300
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: windowLabel }),
|
|
5301
|
+
st.rungs.some((r) => r.n < 5) ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SmallSample, { ui }) : null
|
|
5302
|
+
] }),
|
|
5303
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ss-w-nba-ladder ss-w-nba-ladder--q", children: [
|
|
5304
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ss-w-nba-row", children: [
|
|
5305
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-nba-hd", children: nba.line }),
|
|
5306
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", {}),
|
|
5307
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", {}),
|
|
5308
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-nba-hd ss-w-nba-n", children: nba.price })
|
|
5309
|
+
] }),
|
|
5310
|
+
st.rungs.map((r, ri) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ss-w-nba-row", children: [
|
|
5311
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-nba-at", children: nba.over(nba.lineText(r.at)) }),
|
|
5312
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-nba-meter", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { style: { width: r.n > 0 ? `${r.hits / r.n * 100}%` : "0%" } }) }),
|
|
5313
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-nba-n", children: nba.hitsOf(r.hits, r.n) }),
|
|
5314
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-nba-pcell", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(NbaPrice, { vm, selectionKey: r.selectionKey, ui, slip }) })
|
|
5315
|
+
] }, `${r.selectionKey}:${ri}`))
|
|
5316
|
+
] })
|
|
5317
|
+
] }, `${st.stat}:${si}`)) });
|
|
5318
|
+
}
|
|
5319
|
+
function NbaSettleRecapBody({ sr, ui }) {
|
|
5320
|
+
const nba = ui.nba;
|
|
5321
|
+
const result = { over: nba.resultOver, under: nba.resultUnder, push: nba.resultPush, void: nba.resultVoid };
|
|
5322
|
+
const { over, under, pushes, voids } = sr.summary;
|
|
5323
|
+
const summary = [
|
|
5324
|
+
`${nba.resultOver} ${over}`,
|
|
5325
|
+
`${nba.resultUnder} ${under}`,
|
|
5326
|
+
...pushes > 0 ? [`${nba.resultPush} ${pushes}`] : [],
|
|
5327
|
+
...voids > 0 ? [`${nba.resultVoid} ${voids}`] : []
|
|
5328
|
+
].join(" \xB7 ");
|
|
5329
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
5330
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ss-w-nba-stathd", children: [
|
|
5331
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("b", { children: [
|
|
5332
|
+
nba.settled,
|
|
5333
|
+
" ",
|
|
5334
|
+
sr.finalScore
|
|
5335
|
+
] }),
|
|
5336
|
+
sr.lineBasis === "last_before_tip" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: nba.lastLineBeforeTip }) : null
|
|
5337
|
+
] }),
|
|
5338
|
+
sr.players.map((p) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ss-w-nba-sr-player", children: [
|
|
5339
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "ss-w-nba-who", children: p.playerName }),
|
|
5340
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ss-w-nba-sr", children: [
|
|
5341
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ss-w-nba-row", children: [
|
|
5342
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", {}),
|
|
5343
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-nba-hd ss-w-nba-n", children: nba.line }),
|
|
5344
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-nba-hd ss-w-nba-n", children: nba.actual }),
|
|
5345
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", {})
|
|
5346
|
+
] }),
|
|
5347
|
+
p.lines.map((l, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ss-w-nba-sr-line", children: [
|
|
5348
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: nba.stat(l.stat) }),
|
|
5349
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-nba-n", children: nba.lineText(l.line) }),
|
|
5350
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-nba-n", children: l.actual === null ? "\u2014" : nba.lineText(l.actual) }),
|
|
5351
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-nba-res", "data-result": l.result, children: result[l.result] })
|
|
5352
|
+
] }, `${l.stat}:${i}`))
|
|
5353
|
+
] })
|
|
5354
|
+
] }, p.playerId)),
|
|
5355
|
+
sr.morePlayers > 0 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "ss-w-nba-more", children: nba.morePlayers(sr.morePlayers) }) : null,
|
|
5356
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "ss-w-nba-sr-sum", children: summary })
|
|
5357
|
+
] });
|
|
5358
|
+
}
|
|
5177
5359
|
function TeammateOut({ vm, to, ui, slip }) {
|
|
5178
5360
|
const nba = ui.nba;
|
|
5179
5361
|
const first = to.rows[0];
|
|
@@ -5246,10 +5428,6 @@ function CoHit({ vm, ch, ui, slip }) {
|
|
|
5246
5428
|
games.map((g, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-nba-jc ss-w-nba-tick", children: g.both ? "\u2713" : "" }, `both:${i}`)),
|
|
5247
5429
|
blanks("both")
|
|
5248
5430
|
] }) : null,
|
|
5249
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ss-w-nba-combined", children: [
|
|
5250
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: nba.combined }),
|
|
5251
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("b", { children: ch.combinedPrice.toFixed(2) })
|
|
5252
|
-
] }),
|
|
5253
5431
|
takesBasketball(slip) ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
5254
5432
|
AddAllToSlipButton,
|
|
5255
5433
|
{
|
|
@@ -5364,6 +5542,20 @@ function NbaCard({ vm, ui, slip, monitor }) {
|
|
|
5364
5542
|
body = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(LineMove, { vm, lm: ev.lineMove, ui, slip });
|
|
5365
5543
|
foot = [nba.lineMoveKey];
|
|
5366
5544
|
break;
|
|
5545
|
+
case "matchup":
|
|
5546
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(NbaMatchupBody, { mu: ev.matchup, ui });
|
|
5547
|
+
foot = [];
|
|
5548
|
+
break;
|
|
5549
|
+
case "quarter_ladder":
|
|
5550
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(NbaQuarterLadderBody, { vm, ql: ev.quarterLadder, ui, slip });
|
|
5551
|
+
foot = [];
|
|
5552
|
+
break;
|
|
5553
|
+
case "settle_recap":
|
|
5554
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(NbaSettleRecapBody, { sr: ev.settleRecap, ui });
|
|
5555
|
+
foot = [];
|
|
5556
|
+
break;
|
|
5557
|
+
default:
|
|
5558
|
+
return null;
|
|
5367
5559
|
}
|
|
5368
5560
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ss-w-nba-card", "data-kind": ev.kind, children: [
|
|
5369
5561
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Head, { vm, chip, ui, monitor }),
|
|
@@ -12908,8 +13100,6 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
12908
13100
|
.ss-w-nba-jc[data-hit] { color: var(--ss-w-ink); font-weight: 700; }
|
|
12909
13101
|
.ss-w-nba-joint .ss-w-nba-hd { font-size: 10px; }
|
|
12910
13102
|
.ss-w-nba-tick { color: var(--ss-w-accent); font-weight: 700; }
|
|
12911
|
-
.ss-w-nba-combined { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--ss-w-faint); }
|
|
12912
|
-
.ss-w-nba-combined b { font-size: 16px; color: var(--ss-w-ink); font-variant-numeric: tabular-nums; }
|
|
12913
13103
|
.ss-w-nba-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11px; color: var(--ss-w-faint); }
|
|
12914
13104
|
.ss-w-nba-legkey { display: inline-flex; align-items: center; gap: 5px; }
|
|
12915
13105
|
.ss-w-nba-swatch { width: 12px; height: 2px; border-radius: 1px; }
|
|
@@ -12931,6 +13121,28 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
12931
13121
|
.ss-w-nba-nowrow { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 10px; font-size: 13px; }
|
|
12932
13122
|
.ss-w-nba-foot{font-size:11px;color:var(--ss-w-faint);line-height:1.4;border-top:1px solid var(--ss-w-line);padding-top:10px}
|
|
12933
13123
|
.ss-w-nba-card .ss-w-combo-addall { align-self: stretch; }
|
|
13124
|
+
/* matchup, quarter ladder and settle recap (u564 lane B): the same card, ladder grid and figures as above. */
|
|
13125
|
+
.ss-w-nba-ladder--q{grid-template-columns:70px minmax(0,1fr) 62px 74px}
|
|
13126
|
+
.ss-w-nba-mu,.ss-w-nba-sr{display:grid;align-items:start;gap:8px 6px;font-size:13px;font-variant-numeric:tabular-nums}
|
|
13127
|
+
.ss-w-nba-mu{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr) minmax(0,1fr)}
|
|
13128
|
+
.ss-w-nba-mu .ss-w-nba-hd{white-space:normal}
|
|
13129
|
+
.ss-w-nba-mu-team { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; font-size: 14px; color: var(--ss-w-ink); }
|
|
13130
|
+
.ss-w-nba-mu-v { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
|
|
13131
|
+
.ss-w-nba-mu-v b { font-size: 15px; font-weight: 700; color: var(--ss-w-ink); }
|
|
13132
|
+
.ss-w-nba-mu-v span, .ss-w-nba-mu-rest { font-size: 10.5px; line-height: 1.3; color: var(--ss-w-faint); }
|
|
13133
|
+
.ss-w-nba-mu-rest { overflow-wrap: anywhere; }
|
|
13134
|
+
.ss-w-nba-b2b { white-space: nowrap; }
|
|
13135
|
+
.ss-w-nba-mu-pos { margin: 0; font-size: 12px; line-height: 1.45; color: var(--ss-w-ink); }
|
|
13136
|
+
.ss-w-nba-small { display: inline-block; font-size: 10px; font-weight: 600; line-height: 1.3; color: var(--ss-w-warn); border: 1px solid var(--ss-w-warn); border-radius: 999px; padding: 0 6px; white-space: nowrap; }
|
|
13137
|
+
.ss-w-nba-mu-pos .ss-w-nba-small { margin-left: 6px; }
|
|
13138
|
+
.ss-w-nba-sr-player { display: flex; flex-direction: column; gap: 6px; }
|
|
13139
|
+
.ss-w-nba-sr{grid-template-columns:minmax(0,1fr) 44px 44px 54px;align-items:center}
|
|
13140
|
+
.ss-w-nba-sr-line { display: contents; }
|
|
13141
|
+
.ss-w-nba-sr .ss-w-nba-n { text-align: right; }
|
|
13142
|
+
.ss-w-nba-res { justify-self: end; font-size: 11px; font-weight: 600; line-height: 1.3; color: var(--ss-w-ink); border: 1px solid var(--ss-w-line); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
|
|
13143
|
+
.ss-w-nba-res[data-result="push"], .ss-w-nba-res[data-result="void"] { color: var(--ss-w-faint); }
|
|
13144
|
+
.ss-w-nba-more, .ss-w-nba-sr-sum { margin: 0; font-size: 12px; line-height: 1.4; color: var(--ss-w-faint); }
|
|
13145
|
+
.ss-w-nba-sr-sum { font-weight: 600; color: var(--ss-w-ink); }
|
|
12934
13146
|
|
|
12935
13147
|
/* market odds card */
|
|
12936
13148
|
.ss-w-mocards { display: flex; flex-direction: column; gap: 7px; }
|