From 2ae8a5697e1366a04fb1daacb6397a0e0c00c1f8 Mon Sep 17 00:00:00 2001 From: Kev Date: Fri, 10 Jul 2026 17:00:29 -0400 Subject: [PATCH] =?UTF-8?q?Session=2056:=20Full=20audit=20=E2=80=94=20Prop?= =?UTF-8?q?Line=20+=20boxscore=20+=20pipeline=20+=20sport=20coverage=20(22?= =?UTF-8?q?89=20tests)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Research (verified against live MLB Stats / ESPN / The Odds APIs): - specs/propline-audit.md — every stat_type mapped against our 4-layer pipeline; real MLB boxscore fields; sport coverage status; pipeline gap analysis. - specs/vyndr-roadmap.md — priority-ordered Sessions 57–64 + coverage targets. - scripts/propline-audit.js + specs/audit-data/ (raw capture). Headline bug: oddsNormalizer mapped batter_rbis → 'rbis' while the whole grade/feature/outcome chain keys on 'rbi' — every PropLine RBI prop silently failed to grade AND settle. Fixed (+ regression test). Phase 4 — wired missing MLB stats end-to-end: - PropLine MLB markets 6 → 12 (+runs, walks, doubles, earned_runs, hits_allowed, outs — same request, no extra quota). - doubles/outs/triples added to featureCache + outcomeService MLB_LOG_FIELD and all three grade whitelists (analyze/scan/validation.py). Phase 6 — pipeline resilience: - opsNotify.js: ntfy alerts (never throws, test-disabled). Snapshot success/ stale/failure alerts; retry-once on hard odds error (not on empty slate). - Missed-cron watchdog (mostRecentExpectedSlot/isSnapshotOverdue); status probe now returns `overdue`. Coverage truth: MLB is the only end-to-end-live sport; outcome settlement is MLB-only (WNBA/NBA/soccer never settle) — documented as the #1 roadmap gap. Backend 2276 → 2289 tests (+13). Web build exit 0. Co-Authored-By: Claude Opus 4.8 (1M context) --- BUILD-STATE.md | 49 +- CLAUDE.md | 26 + scripts/propline-audit.js | 114 +++ specs/audit-data/propline-audit-raw.json | 875 ++++++++++++++++++++++ specs/propline-audit.md | 145 ++++ specs/vyndr-roadmap.md | 96 +++ src/routes/analyze.js | 3 + src/routes/internal.js | 5 +- src/routes/scan.js | 2 + src/services/adapters/proplineAdapter.js | 6 +- src/services/intelligence/featureCache.js | 2 + src/services/outcomeService.js | 2 + src/services/python/utils/validation.py | 4 +- src/services/snapshotService.js | 34 +- src/snapshotScheduler.js | 49 +- src/utils/oddsNormalizer.js | 7 +- src/utils/opsNotify.js | 54 ++ tests/unit/oddsNormalizer.test.js | 8 + tests/unit/outcomeService.test.js | 7 + tests/unit/pipelineAlerting.test.js | 128 ++++ web/public/sw.js | 2 +- 21 files changed, 1607 insertions(+), 11 deletions(-) create mode 100644 scripts/propline-audit.js create mode 100644 specs/audit-data/propline-audit-raw.json create mode 100644 specs/propline-audit.md create mode 100644 specs/vyndr-roadmap.md create mode 100644 src/utils/opsNotify.js create mode 100644 tests/unit/pipelineAlerting.test.js diff --git a/BUILD-STATE.md b/BUILD-STATE.md index 2dd91e0..5768ffe 100755 --- a/BUILD-STATE.md +++ b/BUILD-STATE.md @@ -4,9 +4,52 @@ 2026-07-10 ## Current Phase -SHIP BUILD v55.0 — Product overhaul: the self-learning loop (outcome tracking + -accuracy) + the real-time layer (auto-refresh, freshness, live signals) + landing -top-signals preview. Founder-pricing expiry restored. +SHIP BUILD v56.0 — The full data audit: PropLine/boxscore/pipeline inventory, +rbis→rbi fix, +6 MLB markets, doubles/outs wired end-to-end, ntfy alerting + +retry + missed-cron detection, master roadmap. + +## Session 56 (2026-07-10) — SHIPPED ✅ THE FULL AUDIT + +Backend 2276 → **2289 tests** (+13), 197 suites. Web build clean (exit 0). +Docs: `specs/propline-audit.md`, `specs/vyndr-roadmap.md`, +`specs/audit-data/propline-audit-raw.json`, `scripts/propline-audit.js`. + +### Research (Phases 1–3, 5) — verified against LIVE APIs +- Fetched real data: The Odds API `/v4/sports` (in-season now: MLB, WNBA, NFL + preseason, NBA summer league, 40+ soccer leagues; NHL dark), a real MLB boxscore + (Braves@Pirates 2026-07-09 — every settle field confirmed), ESPN WNBA/soccer + scoreboards. PropLine inventory derived from code (no dev keys). +- **Headline bug found:** `oddsNormalizer` mapped `batter_rbis → 'rbis'` but the + entire grade/feature/outcome chain keys on `'rbi'` → **every PropLine RBI prop + silently failed to grade AND settle.** Fixed. +- Coverage truth: **MLB is the only end-to-end-live sport.** Outcome settlement is + MLB-only (WNBA/NBA/soccer never settle → accuracy is MLB-only). Documented as + the #1 roadmap gap. + +### Phase 4 — wired missing MLB stat types (a full vertical slice) +- `batter_rbis → rbi` (unblocks a market already requested). +- PropLine MLB MARKETS 6 → 12: +batter_runs, +batter_walks, +batter_doubles, + +pitcher_earned_runs, +pitcher_hits_allowed, +pitcher_outs (same request, no + extra quota; runs/walks/earned_runs/hits_allowed were already supported + downstream — just never asked for). +- `doubles` + `outs` (+`triples`) added to featureCache + outcomeService + MLB_LOG_FIELD AND all three grade whitelists (analyze/scan/validation.py). + +### Phase 6 — pipeline alerting + resilience +- **`src/utils/opsNotify.js`** — ntfy.sh push (`vyndr-pipeline-kev2026`), never + throws, auto-disabled under test / `PIPELINE_ALERTS=0`. Injectable `fetchImpl`. +- `snapshotService.runSnapshot`: success alert ("✅ MLB snapshot: N graded, D + deltas, X% accuracy"), stale alert (empty slate), failure alert; **retry-once** + on a hard odds error/null (NOT on a legit empty slate — that's off-hours, not a + failure). +- **Missed-cron watchdog:** `snapshotScheduler.mostRecentExpectedSlot` + + `isSnapshotOverdue` (pure, tested); the tick alerts once per missed slot; the + status probe (`GET /api/internal/snapshot/status`) now returns `overdue`. + +### Phase 7 — the master roadmap +`specs/vyndr-roadmap.md` — priority-ordered Sessions 57–64 (WNBA/NBA settlement → +ESPN features → soccer e2e → live calibration → NFL/NBA readiness), stat-type + +sport coverage targets, operating invariants. ## Session 55 (2026-07-10) — SHIPPED ✅ SELF-LEARNING LOOP + REAL-TIME LAYER diff --git a/CLAUDE.md b/CLAUDE.md index d2413c9..61e51f1 100755 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -658,6 +658,32 @@ snapshot, locked to the line, and read from cache. + the ClaimMeter pitch). That expiry lapsing — NOT a tier-limit change — was the cause of the "4 stripe test failures." Operators override via `FOUNDER_CODE_EXPIRY`. +## Data Audit + Pipeline Resilience (Session 56 — non-obvious) +- **`specs/propline-audit.md` + `specs/vyndr-roadmap.md` are the source of truth** + for data coverage + the session plan. Re-run `node scripts/propline-audit.js` + (writes raw JSON to stdout; live sections need network) to refresh. +- **A market only fully works if it's wired at FOUR layers:** requested in + `proplineAdapter.MARKETS`, mapped in `oddsNormalizer.MARKET_MAP`, whitelisted in + all three grade gates (`routes/analyze.js`, `routes/scan.js`, + `python/utils/validation.py`), AND (for MLB) present in `MLB_LOG_FIELD` in BOTH + `featureCache` and `outcomeService`. Miss the map → silent zero; miss the log + field → no features + no settlement. `batter_rbis` was mapped to `rbis` while + everything else keyed on `rbi` — a 4-layer desync that silently killed RBI + props. It's `rbi` now; a normalizer test locks it. +- **The streaks/hotlist path uses its own `rbis` key** built from raw MLB stats — + independent of the odds normalizer. Don't "unify" them; the split is intentional. +- **MLB is the ONLY end-to-end-live sport.** Outcome settlement is MLB-only + (WNBA/NBA/soccer grades never settle → `accuracy` reflects MLB only). Fixing + that (ESPN box-score settle path) is roadmap Session 57. +- **`src/utils/opsNotify.js`** pushes pipeline alerts to ntfy (`vyndr-pipeline- + kev2026`). It NEVER throws and is auto-disabled under `NODE_ENV==='test'` / + `PIPELINE_ALERTS=0` (inject `fetchImpl` to test it). `snapshotService` alerts on + success/stale/failure; `snapshotScheduler` has a per-minute missed-cron watchdog + (`isSnapshotOverdue`, exposed as `overdue` on the status probe). +- **Snapshot retry rule:** retry-once ONLY on a thrown/null odds response (a + transient provider blip). A successful-but-empty slate is NOT retried — that's a + legit off-hours empty slate, and retrying would waste quota + add 60s latency. + ## Active Skills - vyndr-voice (all user-facing output) - prop-analysis (grading methodology) diff --git a/scripts/propline-audit.js b/scripts/propline-audit.js new file mode 100644 index 0000000..32c6574 --- /dev/null +++ b/scripts/propline-audit.js @@ -0,0 +1,114 @@ +'use strict'; + +/** + * scripts/propline-audit.js (Session 56) — the data-source audit. + * + * Inventories what our providers CAN send (from code) and what the FREE + * settled-result APIs (MLB Stats, ESPN) actually return, so we can map every + * prop stat_type to its box-score field. PropLine live fetch runs only when + * PROPLINE_API_KEY_* are present (they aren't in dev) — otherwise we report the + * authoritative code inventory (MARKETS × MARKET_MAP). + * + * Usage: node scripts/propline-audit.js (writes JSON to stdout) + */ + +require('dotenv').config({ quiet: true }); +const propline = require('../src/services/adapters/proplineAdapter'); +const { MARKET_MAP } = require('../src/utils/oddsNormalizer'); + +const out = { generatedAt: new Date().toISOString(), sections: {} }; + +async function getJson(url, headers) { + const r = await fetch(url, { headers: headers || {}, signal: AbortSignal.timeout(12000) }); + if (!r.ok) throw new Error(`HTTP ${r.status}`); + return r.json(); +} + +// 1. PropLine code inventory — the markets we REQUEST per sport + the stat_type +// each normalizes to (or "UNMAPPED" if MARKET_MAP has no entry → silent zero). +function proplineInventory() { + const { MARKETS, SPORT_KEYS } = propline.__internals; + const map = MARKET_MAP || {}; + const inv = {}; + for (const [sport, markets] of Object.entries(MARKETS)) { + inv[sport] = { + sportKey: SPORT_KEYS[sport], + requested: markets.map((m) => ({ market: m, stat_type: map[m] || 'UNMAPPED' })), + }; + } + // Also list every MARKET_MAP entry (what we CAN normalize even if not requested). + inv._allMappedMarkets = Object.entries(map).map(([m, s]) => ({ market: m, stat_type: s })); + inv._hasKeys = propline.hasKeys(); + return inv; +} + +// 2. The Odds API active sports (FREE — /v4/sports does not spend quota). +async function oddsApiSports() { + const key = process.env.ODDS_API_KEY; + if (!key) return { skipped: 'no ODDS_API_KEY' }; + try { + const data = await getJson(`https://api.the-odds-api.com/v4/sports?apiKey=${key}`); + return (data || []) + .filter((s) => s.active) + .map((s) => ({ key: s.key, group: s.group, title: s.title })); + } catch (e) { return { error: e.message }; } +} + +// 3. MLB Stats API — a recent FINAL game's boxscore field keys + a game-log row. +async function mlbBoxscore() { + try { + // Yesterday's schedule. + const d = new Date(Date.now() - 24 * 3600 * 1000).toISOString().slice(0, 10); + const sched = await getJson(`https://statsapi.mlb.com/api/v1/schedule?sportId=1&date=${d}`); + const games = (sched.dates?.[0]?.games) || []; + const final = games.find((g) => g.status?.abstractGameState === 'Final') || games[0]; + if (!final) return { note: `no games ${d}` }; + const box = await getJson(`https://statsapi.mlb.com/api/v1/game/${final.gamePk}/boxscore`); + // Pull one batter + one pitcher stat object. + const sampleTeam = box.teams?.away || box.teams?.home || {}; + const players = Object.values(sampleTeam.players || {}); + const batter = players.find((p) => p.stats?.batting && Object.keys(p.stats.batting).length); + const pitcher = players.find((p) => p.stats?.pitching && Object.keys(p.stats.pitching).length); + return { + date: d, gamePk: final.gamePk, matchup: final.teams?.away?.team?.name + ' @ ' + final.teams?.home?.team?.name, + battingFields: batter ? Object.keys(batter.stats.batting) : [], + pitchingFields: pitcher ? Object.keys(pitcher.stats.pitching) : [], + sampleBatting: batter ? batter.stats.batting : null, + samplePitching: pitcher ? pitcher.stats.pitching : null, + }; + } catch (e) { return { error: e.message }; } +} + +// 4. ESPN WNBA — today's scoreboard status + a completed game's boxscore labels. +async function espnWnba() { + try { + const sb = await getJson('https://site.api.espn.com/apis/site/v2/sports/basketball/wnba/scoreboard'); + const events = (sb.events || []).map((e) => ({ name: e.name, status: e.status?.type?.description, date: e.date })); + const final = (sb.events || []).find((e) => e.status?.type?.completed); + let boxLabels = null; + if (final) { + const summary = await getJson(`https://site.api.espn.com/apis/site/v2/sports/basketball/wnba/summary?event=${final.id}`); + const teamStats = summary.boxscore?.players?.[0]?.statistics?.[0]; + boxLabels = teamStats ? { labels: teamStats.labels, names: teamStats.names } : null; + } + return { count: events.length, events, completedBoxLabels: boxLabels }; + } catch (e) { return { error: e.message }; } +} + +// 5. ESPN soccer — check a common league scoreboard for activity. +async function espnSoccer() { + try { + const sb = await getJson('https://site.api.espn.com/apis/site/v2/sports/soccer/usa.1/scoreboard'); + const events = (sb.events || []).map((e) => ({ name: e.name, status: e.status?.type?.description })); + return { league: 'usa.1 (MLS)', count: events.length, events: events.slice(0, 6) }; + } catch (e) { return { error: e.message }; } +} + +(async () => { + out.sections.proplineInventory = proplineInventory(); + out.sections.oddsApiActiveSports = await oddsApiSports(); + out.sections.mlbBoxscore = await mlbBoxscore(); + out.sections.espnWnba = await espnWnba(); + out.sections.espnSoccer = await espnSoccer(); + process.stdout.write(JSON.stringify(out, null, 2) + '\n'); +})(); diff --git a/specs/audit-data/propline-audit-raw.json b/specs/audit-data/propline-audit-raw.json new file mode 100644 index 0000000..02f0621 --- /dev/null +++ b/specs/audit-data/propline-audit-raw.json @@ -0,0 +1,875 @@ +{ + "generatedAt": "2026-07-10T20:48:09.307Z", + "sections": { + "proplineInventory": { + "nba": { + "sportKey": "basketball_nba", + "requested": [ + { + "market": "player_points", + "stat_type": "points" + }, + { + "market": "player_rebounds", + "stat_type": "rebounds" + }, + { + "market": "player_assists", + "stat_type": "assists" + }, + { + "market": "player_threes", + "stat_type": "threes" + }, + { + "market": "player_blocks", + "stat_type": "blocks" + }, + { + "market": "player_steals", + "stat_type": "steals" + } + ] + }, + "wnba": { + "sportKey": "basketball_wnba", + "requested": [ + { + "market": "player_points", + "stat_type": "points" + }, + { + "market": "player_rebounds", + "stat_type": "rebounds" + }, + { + "market": "player_assists", + "stat_type": "assists" + }, + { + "market": "player_threes", + "stat_type": "threes" + } + ] + }, + "mlb": { + "sportKey": "baseball_mlb", + "requested": [ + { + "market": "batter_hits", + "stat_type": "hits" + }, + { + "market": "batter_home_runs", + "stat_type": "home_runs" + }, + { + "market": "batter_total_bases", + "stat_type": "total_bases" + }, + { + "market": "batter_rbis", + "stat_type": "rbis" + }, + { + "market": "batter_stolen_bases", + "stat_type": "stolen_bases" + }, + { + "market": "pitcher_strikeouts", + "stat_type": "strikeouts" + } + ] + }, + "nfl": { + "sportKey": "football_nfl", + "requested": [ + { + "market": "player_pass_yds", + "stat_type": "passing_yards" + }, + { + "market": "player_rush_yds", + "stat_type": "rushing_yards" + }, + { + "market": "player_reception_yds", + "stat_type": "receiving_yards" + }, + { + "market": "player_receptions", + "stat_type": "receptions" + }, + { + "market": "player_anytime_td", + "stat_type": "anytime_td" + }, + { + "market": "player_pass_tds", + "stat_type": "pass_tds" + } + ] + }, + "nhl": { + "sportKey": "hockey_nhl", + "requested": [ + { + "market": "player_goals", + "stat_type": "goals" + }, + { + "market": "player_shots_on_goal", + "stat_type": "shots_on_goal" + }, + { + "market": "goalie_saves", + "stat_type": "saves" + } + ] + }, + "ncaab": { + "sportKey": "basketball_ncaab", + "requested": [ + { + "market": "player_points", + "stat_type": "points" + }, + { + "market": "player_rebounds", + "stat_type": "rebounds" + }, + { + "market": "player_assists", + "stat_type": "assists" + } + ] + }, + "_allMappedMarkets": [ + { + "market": "player_points", + "stat_type": "points" + }, + { + "market": "player_rebounds", + "stat_type": "rebounds" + }, + { + "market": "player_assists", + "stat_type": "assists" + }, + { + "market": "player_threes", + "stat_type": "threes" + }, + { + "market": "player_blocks", + "stat_type": "blocks" + }, + { + "market": "player_steals", + "stat_type": "steals" + }, + { + "market": "player_points_rebounds_assists", + "stat_type": "pra" + }, + { + "market": "player_turnovers", + "stat_type": "turnovers" + }, + { + "market": "batter_hits", + "stat_type": "hits" + }, + { + "market": "batter_home_runs", + "stat_type": "home_runs" + }, + { + "market": "batter_total_bases", + "stat_type": "total_bases" + }, + { + "market": "batter_rbis", + "stat_type": "rbis" + }, + { + "market": "batter_runs", + "stat_type": "runs" + }, + { + "market": "batter_stolen_bases", + "stat_type": "stolen_bases" + }, + { + "market": "batter_singles", + "stat_type": "singles" + }, + { + "market": "batter_doubles", + "stat_type": "doubles" + }, + { + "market": "batter_walks", + "stat_type": "walks" + }, + { + "market": "batter_strikeouts", + "stat_type": "batter_strikeouts" + }, + { + "market": "pitcher_strikeouts", + "stat_type": "strikeouts" + }, + { + "market": "pitcher_earned_runs", + "stat_type": "earned_runs" + }, + { + "market": "pitcher_hits_allowed", + "stat_type": "hits_allowed" + }, + { + "market": "pitcher_outs", + "stat_type": "outs" + }, + { + "market": "player_pass_yds", + "stat_type": "passing_yards" + }, + { + "market": "player_pass_yards", + "stat_type": "passing_yards" + }, + { + "market": "player_pass_tds", + "stat_type": "pass_tds" + }, + { + "market": "player_pass_completions", + "stat_type": "pass_completions" + }, + { + "market": "player_pass_attempts", + "stat_type": "pass_attempts" + }, + { + "market": "player_pass_interceptions", + "stat_type": "interceptions" + }, + { + "market": "player_rush_yds", + "stat_type": "rushing_yards" + }, + { + "market": "player_rush_yards", + "stat_type": "rushing_yards" + }, + { + "market": "player_rush_attempts", + "stat_type": "rush_attempts" + }, + { + "market": "player_rush_tds", + "stat_type": "rush_tds" + }, + { + "market": "player_receptions", + "stat_type": "receptions" + }, + { + "market": "player_reception_yds", + "stat_type": "receiving_yards" + }, + { + "market": "player_receiving_yards", + "stat_type": "receiving_yards" + }, + { + "market": "player_reception_tds", + "stat_type": "reception_tds" + }, + { + "market": "player_anytime_td", + "stat_type": "anytime_td" + }, + { + "market": "player_kicking_points", + "stat_type": "kicking_points" + }, + { + "market": "player_goals", + "stat_type": "goals" + }, + { + "market": "player_shots_on_target", + "stat_type": "shots_on_target" + }, + { + "market": "player_shots", + "stat_type": "shots" + }, + { + "market": "player_tackles", + "stat_type": "tackles" + }, + { + "market": "player_cards", + "stat_type": "cards" + }, + { + "market": "player_corners", + "stat_type": "corners" + }, + { + "market": "player_saves", + "stat_type": "saves" + }, + { + "market": "player_goals_conceded", + "stat_type": "goals_conceded" + }, + { + "market": "player_passes", + "stat_type": "passes" + }, + { + "market": "team_clean_sheet", + "stat_type": "clean_sheet" + }, + { + "market": "player_shots_on_goal", + "stat_type": "shots_on_goal" + }, + { + "market": "goalie_saves", + "stat_type": "saves" + } + ], + "_hasKeys": false + }, + "oddsApiActiveSports": [ + { + "key": "americanfootball_cfl", + "group": "American Football", + "title": "CFL" + }, + { + "key": "americanfootball_ncaaf", + "group": "American Football", + "title": "NCAAF" + }, + { + "key": "americanfootball_ncaaf_championship_winner", + "group": "American Football", + "title": "NCAAF Championship Winner" + }, + { + "key": "americanfootball_nfl", + "group": "American Football", + "title": "NFL" + }, + { + "key": "americanfootball_nfl_preseason", + "group": "American Football", + "title": "NFL Preseason" + }, + { + "key": "americanfootball_nfl_super_bowl_winner", + "group": "American Football", + "title": "NFL Super Bowl Winner" + }, + { + "key": "aussierules_afl", + "group": "Aussie Rules", + "title": "AFL" + }, + { + "key": "baseball_milb", + "group": "Baseball", + "title": "MiLB" + }, + { + "key": "baseball_mlb", + "group": "Baseball", + "title": "MLB" + }, + { + "key": "baseball_mlb_world_series_winner", + "group": "Baseball", + "title": "MLB World Series Winner" + }, + { + "key": "baseball_npb", + "group": "Baseball", + "title": "NPB" + }, + { + "key": "basketball_nba_summer_league", + "group": "Basketball", + "title": "NBA Summer League" + }, + { + "key": "basketball_wnba", + "group": "Basketball", + "title": "WNBA" + }, + { + "key": "boxing_boxing", + "group": "Boxing", + "title": "Boxing" + }, + { + "key": "cricket_international_t20", + "group": "Cricket", + "title": "International Twenty20" + }, + { + "key": "cricket_odi", + "group": "Cricket", + "title": "One Day Internationals" + }, + { + "key": "cricket_t20_blast", + "group": "Cricket", + "title": "T20 Blast" + }, + { + "key": "golf_the_open_championship_winner", + "group": "Golf", + "title": "The Open Winner" + }, + { + "key": "lacrosse_pll", + "group": "Lacrosse", + "title": "PLL" + }, + { + "key": "mma_mixed_martial_arts", + "group": "Mixed Martial Arts", + "title": "MMA" + }, + { + "key": "politics_us_presidential_election_winner", + "group": "Politics", + "title": "US Presidential Elections Winner" + }, + { + "key": "rugbyleague_nrl", + "group": "Rugby League", + "title": "NRL" + }, + { + "key": "soccer_argentina_primera_division", + "group": "Soccer", + "title": "Primera División - Argentina" + }, + { + "key": "soccer_austria_bundesliga", + "group": "Soccer", + "title": "Austrian Football Bundesliga" + }, + { + "key": "soccer_brazil_campeonato", + "group": "Soccer", + "title": "Brazil Série A" + }, + { + "key": "soccer_brazil_serie_b", + "group": "Soccer", + "title": "Brazil Série B" + }, + { + "key": "soccer_china_superleague", + "group": "Soccer", + "title": "Super League - China" + }, + { + "key": "soccer_conmebol_copa_libertadores", + "group": "Soccer", + "title": "Copa Libertadores" + }, + { + "key": "soccer_conmebol_copa_sudamericana", + "group": "Soccer", + "title": "Copa Sudamericana" + }, + { + "key": "soccer_denmark_superliga", + "group": "Soccer", + "title": "Denmark Superliga" + }, + { + "key": "soccer_efl_champ", + "group": "Soccer", + "title": "Championship" + }, + { + "key": "soccer_england_efl_cup", + "group": "Soccer", + "title": "EFL Cup" + }, + { + "key": "soccer_england_league1", + "group": "Soccer", + "title": "League 1" + }, + { + "key": "soccer_england_league2", + "group": "Soccer", + "title": "League 2" + }, + { + "key": "soccer_epl", + "group": "Soccer", + "title": "EPL" + }, + { + "key": "soccer_fifa_world_cup", + "group": "Soccer", + "title": "FIFA World Cup" + }, + { + "key": "soccer_fifa_world_cup_winner", + "group": "Soccer", + "title": "FIFA World Cup Winner" + }, + { + "key": "soccer_finland_veikkausliiga", + "group": "Soccer", + "title": "Veikkausliiga - Finland" + }, + { + "key": "soccer_france_ligue_one", + "group": "Soccer", + "title": "Ligue 1 - France" + }, + { + "key": "soccer_germany_bundesliga", + "group": "Soccer", + "title": "Bundesliga - Germany" + }, + { + "key": "soccer_germany_bundesliga2", + "group": "Soccer", + "title": "Bundesliga 2 - Germany" + }, + { + "key": "soccer_germany_dfb_pokal", + "group": "Soccer", + "title": "DFB-Pokal" + }, + { + "key": "soccer_germany_liga3", + "group": "Soccer", + "title": "3. Liga - Germany" + }, + { + "key": "soccer_italy_serie_a", + "group": "Soccer", + "title": "Serie A - Italy" + }, + { + "key": "soccer_korea_kleague1", + "group": "Soccer", + "title": "K League 1" + }, + { + "key": "soccer_league_of_ireland", + "group": "Soccer", + "title": "League of Ireland" + }, + { + "key": "soccer_mexico_ligamx", + "group": "Soccer", + "title": "Liga MX" + }, + { + "key": "soccer_netherlands_eredivisie", + "group": "Soccer", + "title": "Dutch Eredivisie" + }, + { + "key": "soccer_norway_eliteserien", + "group": "Soccer", + "title": "Eliteserien - Norway" + }, + { + "key": "soccer_russia_premier_league", + "group": "Soccer", + "title": "Premier League - Russia" + }, + { + "key": "soccer_spain_la_liga", + "group": "Soccer", + "title": "La Liga - Spain" + }, + { + "key": "soccer_spl", + "group": "Soccer", + "title": "Premiership - Scotland" + }, + { + "key": "soccer_sweden_allsvenskan", + "group": "Soccer", + "title": "Allsvenskan - Sweden" + }, + { + "key": "soccer_sweden_superettan", + "group": "Soccer", + "title": "Superettan - Sweden" + }, + { + "key": "soccer_switzerland_superleague", + "group": "Soccer", + "title": "Swiss Superleague" + }, + { + "key": "soccer_uefa_champs_league_qualification", + "group": "Soccer", + "title": "UEFA Champions League Qualification" + }, + { + "key": "soccer_usa_mls", + "group": "Soccer", + "title": "MLS" + }, + { + "key": "tennis_atp_wimbledon", + "group": "Tennis", + "title": "ATP Wimbledon" + }, + { + "key": "tennis_wta_wimbledon", + "group": "Tennis", + "title": "WTA Wimbledon" + } + ], + "mlbBoxscore": { + "date": "2026-07-09", + "gamePk": 823359, + "matchup": "Atlanta Braves @ Pittsburgh Pirates", + "battingFields": [ + "summary", + "gamesPlayed", + "flyOuts", + "groundOuts", + "airOuts", + "runs", + "doubles", + "triples", + "homeRuns", + "strikeOuts", + "baseOnBalls", + "intentionalWalks", + "hits", + "hitByPitch", + "atBats", + "caughtStealing", + "stolenBases", + "stolenBasePercentage", + "groundIntoDoublePlay", + "groundIntoTriplePlay", + "plateAppearances", + "totalBases", + "rbi", + "leftOnBase", + "sacBunts", + "sacFlies", + "catchersInterference", + "pickoffs", + "atBatsPerHomeRun", + "popOuts", + "lineOuts" + ], + "pitchingFields": [ + "note", + "summary", + "gamesPlayed", + "gamesStarted", + "flyOuts", + "groundOuts", + "airOuts", + "runs", + "doubles", + "triples", + "homeRuns", + "strikeOuts", + "baseOnBalls", + "intentionalWalks", + "hits", + "hitByPitch", + "atBats", + "caughtStealing", + "stolenBases", + "stolenBasePercentage", + "numberOfPitches", + "inningsPitched", + "wins", + "losses", + "saves", + "saveOpportunities", + "holds", + "blownSaves", + "earnedRuns", + "battersFaced", + "outs", + "gamesPitched", + "completeGames", + "shutouts", + "pitchesThrown", + "balls", + "strikes", + "strikePercentage", + "hitBatsmen", + "balks", + "wildPitches", + "pickoffs", + "rbi", + "gamesFinished", + "runsScoredPer9", + "homeRunsPer9", + "inheritedRunners", + "inheritedRunnersScored", + "catchersInterference", + "sacBunts", + "sacFlies", + "passedBall", + "popOuts", + "lineOuts" + ], + "sampleBatting": { + "summary": "1-6 | K, R, SB", + "gamesPlayed": 1, + "flyOuts": 1, + "groundOuts": 1, + "airOuts": 3, + "runs": 1, + "doubles": 0, + "triples": 0, + "homeRuns": 0, + "strikeOuts": 1, + "baseOnBalls": 0, + "intentionalWalks": 0, + "hits": 1, + "hitByPitch": 0, + "atBats": 6, + "caughtStealing": 0, + "stolenBases": 1, + "stolenBasePercentage": "1.000", + "groundIntoDoublePlay": 0, + "groundIntoTriplePlay": 0, + "plateAppearances": 6, + "totalBases": 1, + "rbi": 0, + "leftOnBase": 3, + "sacBunts": 0, + "sacFlies": 0, + "catchersInterference": 0, + "pickoffs": 0, + "atBatsPerHomeRun": "-.--", + "popOuts": 0, + "lineOuts": 2 + }, + "samplePitching": { + "note": "(W, 2-0)", + "summary": "1.0 IP, 0 ER, 0 K, 0 BB", + "gamesPlayed": 1, + "gamesStarted": 0, + "flyOuts": 1, + "groundOuts": 1, + "airOuts": 2, + "runs": 0, + "doubles": 0, + "triples": 0, + "homeRuns": 0, + "strikeOuts": 0, + "baseOnBalls": 0, + "intentionalWalks": 0, + "hits": 0, + "hitByPitch": 0, + "atBats": 3, + "caughtStealing": 0, + "stolenBases": 0, + "stolenBasePercentage": ".---", + "numberOfPitches": 15, + "inningsPitched": "1.0", + "wins": 1, + "losses": 0, + "saves": 0, + "saveOpportunities": 0, + "holds": 0, + "blownSaves": 0, + "earnedRuns": 0, + "battersFaced": 3, + "outs": 3, + "gamesPitched": 1, + "completeGames": 0, + "shutouts": 0, + "pitchesThrown": 15, + "balls": 6, + "strikes": 9, + "strikePercentage": ".600", + "hitBatsmen": 0, + "balks": 0, + "wildPitches": 0, + "pickoffs": 0, + "rbi": 0, + "gamesFinished": 0, + "runsScoredPer9": "0.00", + "homeRunsPer9": "0.00", + "inheritedRunners": 0, + "inheritedRunnersScored": 0, + "catchersInterference": 0, + "sacBunts": 0, + "sacFlies": 0, + "passedBall": 0, + "popOuts": 1, + "lineOuts": 0 + } + }, + "espnWnba": { + "count": 3, + "events": [ + { + "name": "Golden State Valkyries at Connecticut Sun", + "status": "Scheduled", + "date": "2026-07-10T23:30Z" + }, + { + "name": "Dallas Wings at Toronto Tempo", + "status": "Scheduled", + "date": "2026-07-10T23:30Z" + }, + { + "name": "Chicago Sky at Los Angeles Sparks", + "status": "Scheduled", + "date": "2026-07-11T02:00Z" + } + ], + "completedBoxLabels": null + }, + "espnSoccer": { + "league": "usa.1 (MLS)", + "count": 4, + "events": [ + { + "name": "Toronto FC at CF Montréal", + "status": "Scheduled" + }, + { + "name": "Vancouver Whitecaps at Chicago Fire FC", + "status": "Scheduled" + }, + { + "name": "Sporting Kansas City at St. Louis CITY SC", + "status": "Scheduled" + }, + { + "name": "Portland Timbers at Seattle Sounders FC", + "status": "Scheduled" + } + ] + } + } +} diff --git a/specs/propline-audit.md b/specs/propline-audit.md new file mode 100644 index 0000000..2c34d22 --- /dev/null +++ b/specs/propline-audit.md @@ -0,0 +1,145 @@ +# PropLine + Box Score + Pipeline Audit — 2026-07-10 (Session 56) + +Ground-truth inventory of what data we can access, what our pipeline handles, and +the gaps. Live sections were fetched against real APIs (MLB Stats, ESPN, The Odds +API `/v4/sports`). PropLine has no dev keys, so its inventory is derived from the +authoritative code (`proplineAdapter.MARKETS` × `oddsNormalizer.MARKET_MAP`) — +that IS the set our pipeline requests + normalizes. Raw capture: +`specs/audit-data/propline-audit-raw.json`. + +Baseline: **2276 tests** passing at session start. + +--- + +## 0. What is in-season RIGHT NOW (The Odds API `/v4/sports`, live 2026-07-10) + +| Sport | Active key(s) | Notes | +|-------|---------------|-------| +| MLB | `baseball_mlb` | ✅ full season — the live product | +| WNBA | `basketball_wnba` | ✅ in-season (3 games tonight per ESPN) | +| NBA | `basketball_nba_summer_league` only | ⚠️ regular NBA off until Oct; summer league live | +| NFL | `americanfootball_nfl`, `_nfl_preseason` | ⚠️ preseason lines starting | +| Soccer | 40+ leagues (`soccer_epl`, `soccer_usa_mls`, `soccer_fifa_world_cup`, La Liga, Serie A, …) | ✅ year-round via odds-api | +| NHL | (absent) | off-season — no lines | + +Takeaway: **MLB + WNBA + soccer are the live opportunity today.** NBA/NFL are +pre-season shells; NHL is dark. + +--- + +## 1. PropLine / odds inventory — what we REQUEST vs what we CAN normalize + +`proplineAdapter.MARKETS` = the markets we actually ask for. `MARKET_MAP` = every +market we can normalize (superset). A market we request but don't map → **silent +zero**; a market we map but don't request → **unused capacity** (free to add — same +call). + +### MLB +| Requested market | → stat_type | Grade whitelist? | Features (l5/l20)? | Outcome settle? | +|---|---|---|---|---| +| batter_hits | hits | ✅ | ✅ hits | ✅ hits | +| batter_home_runs | home_runs | ✅ | ✅ homeRuns | ✅ homeRuns | +| batter_total_bases | total_bases | ✅ | ✅ totalBases | ✅ totalBases | +| batter_rbis | **rbis** ❌ | ✅ (`rbi`) | ✅ (`rbi`) | ✅ (`rbi`) | ← **BUG: normalizes to `rbis`, whole chain keys on `rbi` → never grades/settles** | +| batter_stolen_bases | stolen_bases | ✅ | ✅ stolenBases | ✅ stolenBases | +| pitcher_strikeouts | strikeouts | ✅ | ✅ strikeOuts | ✅ strikeOuts | + +**Mapped but NOT requested (free capacity — all supported downstream already):** +`batter_runs`→runs, `batter_walks`→walks, `pitcher_earned_runs`→earned_runs, +`pitcher_hits_allowed`→hits_allowed. **Mapped, not requested, and needs feature/ +settle wiring:** `batter_doubles`→doubles, `pitcher_outs`→outs. Confirmed present +in the real boxscore (§2). + +### WNBA / NBA +Requested: `player_points`, `player_rebounds`, `player_assists`, `player_threes` +(+ NBA adds `player_blocks`, `player_steals`). All grade-whitelisted. **Features: +NBA/WNBA game logs come from the Python nba_api service (usually OFFLINE in prod) +→ l5/l20 often empty; ESPN fallback exists for season avgs only. Outcomes: NOT +settled at all (outcomeService is MLB-only).** `player_turnovers`/`player_pra` are +mapped but not requested. + +### Soccer +**PropLine has NO soccer entry** (`SPORT_KEYS`/`MARKETS` omit it) — soccer props +can only come from the odds-api backup. `MARKET_MAP` maps goals/shots/shots_on_ +target/tackles/cards/corners/saves/passes/clean_sheet. Features: soccer extractor +exists; outcomes: NOT settled. + +### NFL / NHL +NFL markets mapped + requested (pass/rush/rec yds, receptions, TDs) but the flow +isn't graded end-to-end yet. NHL mapped/requested but off-season. + +--- + +## 2. MLB box score field map (REAL — Braves @ Pirates, 2026-07-09) + +Batting fields present: `runs, doubles, triples, homeRuns, strikeOuts, +baseOnBalls, hits, atBats, stolenBases, totalBases, rbi, sacFlies, …` +Pitching fields present: `strikeOuts, baseOnBalls, hits, inningsPitched, +earnedRuns, outs, battersFaced, …` + +**OUTCOME_MAP (MLB) — stat_type → game-log/boxscore field:** +``` +hits → hits total_bases → totalBases home_runs → homeRuns +rbi → rbi runs → runs walks → baseOnBalls +stolen_bases → stolenBases strikeouts → strikeOuts earned_runs → earnedRuns +hits_allowed → hits (pitching) innings_pitched → inningsPitched +doubles → doubles ⟵ NEW triples → triples ⟵ NEW outs → outs ⟵ NEW +batter_strikeouts → strikeOuts ⟵ (batter Ks — roadmap) +``` +Every field above is real in the boxscore/game log → all are settleable today. + +## 2b. ESPN box score (WNBA/soccer — the non-MLB settle path) +WNBA settlement source = ESPN summary `boxscore.players[].statistics[]` +(`labels`/`names` arrays: PTS/REB/AST/3PM/STL/BLK/TO). No completed game at fetch +time (all 3 tonight were Scheduled), so labels weren't captured — wiring the ESPN +settle path is a roadmap item (`espnStatsAdapter` already parses this shape for +season avgs). + +--- + +## 3. Pipeline flow + gaps + +**Current flow:** cron (`SNAPSHOT_CRON=1`, UTC 14,19,22,1,3) → per sport: +`settleAllOutcomes()` (S55, MLB only) → `snapshotService.runSnapshot` → PropLine +(3-key rotation) / odds-api backup → `gradeAndCacheSlate` → per-player archetype + +features → Redis (`snapshot:{sport}:latest`, `grades:{sport}`) → ticker. + +**Gaps found:** +1. **RBI silent failure** — `batter_rbis → rbis` mismatch (§1). FIX this session. +2. **Under-requesting MLB markets** — only 6 of ~12 supported; runs/walks/doubles/ + earned_runs/hits_allowed/outs are free in the same call. EXPAND this session. +3. **Outcome settlement is MLB-only** — WNBA/NBA/soccer grades NEVER settle, so + `accuracy` is MLB-only. Biggest roadmap item (needs the ESPN settle path). +4. **No pipeline alerting** — a failed/empty/missed cron run is silent. ADD ntfy + this session. +5. **No retry** — one PropLine blip marks a sport unavailable for the whole cycle. + ADD retry-once this session. +6. **No missed-cron detector** — nothing notices if a slot didn't fire. ADD. +7. **NBA/WNBA features depend on an offline Python service** — l5/l20 often empty; + ESPN gives season avgs only. Roadmap: an ESPN game-log feature path. +8. **Soccer has no PropLine source** — odds-api backup only; document + monitor. + +--- + +## 4. Sport coverage status (verified 2026-07-10) + +| Sport | Odds props | Grade pipeline | Features | Outcomes | Status | +|-------|-----------|----------------|----------|----------|--------| +| MLB | ✅ PropLine + odds-api | ✅ | ✅ real (statsapi) | ✅ (S55) | **LIVE** | +| WNBA | ✅ odds-api/PropLine | ✅ | ⚠️ Python offline → thin | ❌ not settled | **PARTIAL** | +| NBA | ⚠️ summer league only | ✅ | ⚠️ offline | ❌ | **OFF-SEASON** | +| Soccer | ✅ odds-api (no PropLine) | ⚠️ extractor exists | ⚠️ | ❌ | **PARTIAL** | +| NFL | ⚠️ preseason | ⚠️ mapped, not e2e | ❌ | ❌ | **PRE-SEASON** | +| NHL | ❌ off-season | ⚠️ mapped | ❌ | ❌ | **DARK** | + +--- + +## 5. Fixes shipped this session (Phase 4/6) +- `batter_rbis → rbi` (unblocks a market we already request). +- PropLine MLB MARKETS expanded: +batter_runs, +batter_walks, +batter_doubles, + +pitcher_earned_runs, +pitcher_hits_allowed, +pitcher_outs. +- `doubles` + `outs` wired into featureCache + outcomeService + all three grade + whitelists (analyze.js / scan.js / validation.py). +- Pipeline alerting (ntfy) + PropLine retry-once + missed-cron detector. + +See `specs/vyndr-roadmap.md` for the priority-ordered plan that follows from this. diff --git a/specs/vyndr-roadmap.md b/specs/vyndr-roadmap.md new file mode 100644 index 0000000..c3d73f2 --- /dev/null +++ b/specs/vyndr-roadmap.md @@ -0,0 +1,96 @@ +# VYNDR Master Roadmap — Generated 2026-07-10 (Session 56) + +The foundation document. Derived from the Session-56 data audit +(`specs/propline-audit.md`, verified against live MLB Stats / ESPN / Odds APIs). +Every session after this references it. Update it as sessions ship. + +--- + +## Current coverage (verified 2026-07-10) + +| Sport | Odds props | Grading | Features (l5/l20) | Outcomes settled | Status | +|-------|-----------|---------|-------------------|------------------|--------| +| MLB | ✅ PropLine + odds-api | ✅ | ✅ real (statsapi) | ✅ (S55, expanded S56) | **LIVE** | +| WNBA | ✅ odds-api/PropLine | ✅ | ⚠️ Python offline → thin | ❌ | **PARTIAL** | +| Soccer | ✅ odds-api only (no PropLine) | ⚠️ extractor only | ⚠️ | ❌ | **PARTIAL** | +| NBA | ⚠️ summer league only | ✅ | ⚠️ offline | ❌ | **OFF-SEASON (Oct)** | +| NFL | ⚠️ preseason | ⚠️ mapped, not e2e | ❌ | ❌ | **PRE-SEASON (Sep)** | +| NHL | ❌ off-season | ⚠️ mapped | ❌ | ❌ | **DARK (Oct)** | + +**The core product is MLB.** It is the only sport that is live end-to-end +(odds → grade → real features → settled accuracy). Everything else is a +build-out target. + +--- + +## Gap analysis (from the audit) + +1. **Outcome settlement is MLB-only** — WNBA/NBA/soccer grades never settle, so + the accuracy record (the S55 trust engine) only reflects MLB. **Highest-value + gap.** Needs the ESPN box-score settle path (`espnStatsAdapter` already parses + the shape for season avgs). +2. **NBA/WNBA features depend on an offline Python nba_api service** — l5/l20 are + often empty; only season avgs survive (ESPN fallback). Needs an ESPN game-log + feature path so intel populates without the Python service. +3. **Soccer has no PropLine source** — odds-api backup only; no `SPORT_KEYS` entry. + Soccer grading isn't wired into the snapshot pipeline end-to-end. +4. **NFL mapped but not graded end-to-end** — markets normalize, but no feature/ + outcome path. Wire before September. +5. ~~RBI silent-failure (rbis/rbi)~~ — **FIXED S56.** +6. ~~Under-requesting MLB markets~~ — **FIXED S56** (6 → 12 markets). +7. ~~No pipeline alerting / retry / missed-cron~~ — **FIXED S56.** +8. **No live calibration** — the accuracy record exists but doesn't yet feed back + into grade confidence (spec 2.3 from S55). +9. **`batter_strikeouts` (batter Ks)** mapped but not feature/settle-wired. + +--- + +## Session plan (priority-ordered) + +| Session | Focus | Ships | Scope | +|---------|-------|-------|-------| +| 57 | **WNBA/NBA outcome settlement** | ESPN box-score settle path in outcomeService → accuracy for basketball; WNBA goes fully live | M | +| 58 | **ESPN game-log features** | l5/l10/l20 for NBA/WNBA without the Python service → real intel on basketball grade cards | M | +| 59 | **Soccer end-to-end** | soccer into the snapshot pipeline (odds-api source), feature extractor wired, ESPN settle | L | +| 60 | **Live calibration** | accuracy record feeds grade-confidence adjustment (under/over-confident tiers nudge); "Model health: Calibrated/Learning" indicator | M | +| 61 | **NFL pre-season prep** | NFL feature + settle path (ESPN NFL boxscore) so Week 1 (Sep) is live | L | +| 62 | **Prop breadth** | `batter_strikeouts`, `triples`, pitcher `walks`; NBA `pra`/`turnovers` requested; WNBA extra markets | S | +| 63 | **Accuracy depth** | per-archetype hit rates, per-stat hit rates, player-level record ("VYNDR on Judge: 12-5"); ledger UI | M | +| 64 | **NBA regular-season readiness** | verify NBA pipeline for the Oct tip-off; depth-chart/cascade live | M | + +Scope key: S ≈ ½ session, M ≈ 1 session, L ≈ 1–2 sessions. + +--- + +## Stat-type coverage target (fully built) + +- **MLB (batters):** hits, total_bases, home_runs, rbi, runs, doubles, triples, + walks, stolen_bases, batter_strikeouts. **(pitchers):** strikeouts, earned_runs, + hits_allowed, innings_pitched, outs, walks. *(Bold-new this session: doubles, + triples, outs, runs, walks requested + settleable.)* +- **NBA/WNBA:** points, rebounds, assists, threes, steals, blocks, turnovers, pra. +- **Soccer:** goals, shots, shots_on_target, tackles, cards, corners, saves, + passes, clean_sheet. +- **NFL:** passing/rushing/receiving yards, receptions, pass/rush/rec TDs, + anytime_td, interceptions, kicking_points. + +## Sport coverage target + +- **MLB** ✅ live now (settled accuracy). +- **WNBA** → live after S57 (settlement) + S58 (features). +- **Soccer** → live after S59. +- **NFL** → ready for September (S61). +- **NBA** → ready for October (S64). +- **NHL** → ready for October (fast-follow once NBA path exists; shares ESPN pattern). + +--- + +## Operating invariants (do not regress) +- Three stat_type whitelists stay in sync: `routes/analyze.js`, `routes/scan.js`, + `python/utils/validation.py`. +- A requested market MUST have a `MARKET_MAP` entry (else silent zero) AND, if + MLB, a `MLB_LOG_FIELD` entry in BOTH `featureCache` and `outcomeService` (else + no features / no settlement). +- The accuracy pill stays HONEST — "LEARNING" below MIN_SAMPLE, never a faked %. +- Pipeline alerts (ntfy) fire on success/failure/stale/overdue; the status probe + (`GET /api/internal/snapshot/status`) exposes `overdue`. diff --git a/src/routes/analyze.js b/src/routes/analyze.js index 9a142ff..772fd9a 100644 --- a/src/routes/analyze.js +++ b/src/routes/analyze.js @@ -61,6 +61,9 @@ const VALID_STAT_TYPES = new Set([ 'strikeouts', 'hits', 'home_runs', 'rbi', 'total_bases', 'walks', 'runs', 'earned_runs', 'innings_pitched', 'hits_allowed', 'stolen_bases', + // Session 56 audit — settleable against the real boxscore; PropLine now + // requests batter_doubles + pitcher_outs. Keep in sync with scan.js + validation.py. + 'doubles', 'outs', ]); const VALID_DIRECTIONS = new Set(['over', 'under']); diff --git a/src/routes/internal.js b/src/routes/internal.js index 93d0fbe..4ef556e 100644 --- a/src/routes/internal.js +++ b/src/routes/internal.js @@ -112,7 +112,7 @@ router.post('/snapshot/all', async (req, res) => { */ router.get('/snapshot/status', async (req, res) => { const { cacheGet } = require('../utils/redis'); - const { HOURS_UTC } = require('../snapshotScheduler'); + const { HOURS_UTC, isSnapshotOverdue } = require('../snapshotScheduler'); const SPORTS = ['mlb', 'nba', 'wnba']; try { const redis_keys = {}; @@ -135,10 +135,13 @@ router.get('/snapshot/status', async (req, res) => { } const ticker = await cacheGet('ticker:items'); redis_keys['ticker:items'] = !!ticker; + // Session 56 — surface the missed-cron signal in the health probe. + const mlbTs = last_snapshot.mlb && last_snapshot.mlb.updated_at; return res.json({ cron_armed: process.env.SNAPSHOT_CRON === '1', cron_hours_utc: HOURS_UTC, last_snapshot, + overdue: isSnapshotOverdue(mlbTs), redis_keys, ticker_count: Array.isArray(ticker) ? ticker.length : 0, }); diff --git a/src/routes/scan.js b/src/routes/scan.js index a3b9896..2f91e80 100644 --- a/src/routes/scan.js +++ b/src/routes/scan.js @@ -17,6 +17,8 @@ const VALID_STAT_TYPES = new Set([ 'strikeouts', 'hits', 'home_runs', 'rbi', 'total_bases', 'walks', 'runs', 'earned_runs', 'innings_pitched', 'hits_allowed', 'stolen_bases', + // Session 56 audit — keep in sync with analyze.js + validation.py. + 'doubles', 'outs', ]); const VALID_DIRECTIONS = new Set(['over', 'under']); diff --git a/src/services/adapters/proplineAdapter.js b/src/services/adapters/proplineAdapter.js index 5860000..e3a70ca 100644 --- a/src/services/adapters/proplineAdapter.js +++ b/src/services/adapters/proplineAdapter.js @@ -46,7 +46,11 @@ const SPORT_KEYS = { const MARKETS = { nba: ['player_points', 'player_rebounds', 'player_assists', 'player_threes', 'player_blocks', 'player_steals'], wnba: ['player_points', 'player_rebounds', 'player_assists', 'player_threes'], - mlb: ['batter_hits', 'batter_home_runs', 'batter_total_bases', 'batter_rbis', 'batter_stolen_bases', 'pitcher_strikeouts'], + // Session 56 audit — expanded from 6 to 12 markets. runs/walks/earned_runs/ + // hits_allowed were already fully supported downstream (whitelist + features + + // outcomes) but never requested; doubles/outs are wired this session. All ride + // the SAME request (no extra quota) → materially more graded props per slate. + mlb: ['batter_hits', 'batter_home_runs', 'batter_total_bases', 'batter_rbis', 'batter_stolen_bases', 'batter_runs', 'batter_walks', 'batter_doubles', 'pitcher_strikeouts', 'pitcher_earned_runs', 'pitcher_hits_allowed', 'pitcher_outs'], nfl: ['player_pass_yds', 'player_rush_yds', 'player_reception_yds', 'player_receptions', 'player_anytime_td', 'player_pass_tds'], nhl: ['player_goals', 'player_shots_on_goal', 'goalie_saves'], ncaab: ['player_points', 'player_rebounds', 'player_assists'], diff --git a/src/services/intelligence/featureCache.js b/src/services/intelligence/featureCache.js index dd96785..74fcd30 100644 --- a/src/services/intelligence/featureCache.js +++ b/src/services/intelligence/featureCache.js @@ -82,6 +82,8 @@ const MLB_LOG_FIELD = { runs: 'runs', stolen_bases: 'stolenBases', walks: 'baseOnBalls', strikeouts: 'strikeOuts', earned_runs: 'earnedRuns', hits_allowed: 'hits', innings_pitched: 'inningsPitched', + // Session 56 audit — real boxscore/game-log fields (Braves@Pirates verified). + doubles: 'doubles', triples: 'triples', outs: 'outs', }; function mlbStatValue(statObj, statType) { diff --git a/src/services/outcomeService.js b/src/services/outcomeService.js index 24ca5a8..706d43a 100644 --- a/src/services/outcomeService.js +++ b/src/services/outcomeService.js @@ -41,6 +41,8 @@ const MLB_LOG_FIELD = { runs: 'runs', stolen_bases: 'stolenBases', walks: 'baseOnBalls', strikeouts: 'strikeOuts', earned_runs: 'earnedRuns', hits_allowed: 'hits', innings_pitched: 'inningsPitched', + // Session 56 audit — confirmed present in the real boxscore/game log. + doubles: 'doubles', triples: 'triples', outs: 'outs', }; function statValue(statObj, statType) { diff --git a/src/services/python/utils/validation.py b/src/services/python/utils/validation.py index d58fdbe..8b83505 100644 --- a/src/services/python/utils/validation.py +++ b/src/services/python/utils/validation.py @@ -18,7 +18,9 @@ VALID_STAT_TYPES = { 'steals', 'blocks', 'turnovers'], 'mlb': ['strikeouts', 'hits', 'home_runs', 'rbi', 'total_bases', 'walks', 'runs', 'earned_runs', 'innings_pitched', - 'hits_allowed', 'stolen_bases'] + 'hits_allowed', 'stolen_bases', + # Session 56 audit — keep in sync with analyze.js + scan.js. + 'doubles', 'outs'] } VALID_SPORTS = ['nba', 'mlb'] diff --git a/src/services/snapshotService.js b/src/services/snapshotService.js index 09a20d0..6171671 100644 --- a/src/services/snapshotService.js +++ b/src/services/snapshotService.js @@ -184,18 +184,36 @@ async function runSnapshot(sport, opts = {}) { cacheSet: opts.cacheSet || require('../utils/redis').cacheSet, now: opts.now || (() => new Date().toISOString()), nowMs: opts.nowMs || (() => Date.now()), + // Session 56 — ops alerting (ntfy) + retry-once on a hard odds failure. + notify: opts.notify || require('../utils/opsNotify').notify, + sleep: opts.sleep || ((ms) => new Promise((r) => setTimeout(r, ms))), + retryDelayMs: opts.retryDelayMs != null ? opts.retryDelayMs : 60_000, }; const start = deps.nowMs(); const ts = deps.now(); + // Session 56 — retry ONCE on a hard failure (thrown error / null response = a + // transient PropLine/network blip). A successful-but-empty slate is NOT a + // failure (off-hours), so it is not retried — that would waste quota + latency. let odds; try { odds = await deps.getOdds(sp); + if (odds == null) throw new Error('null odds response'); } catch (e) { - return { sport: sp, status: 'error', reason: e.message, gradeCount: 0 }; + try { + await deps.sleep(deps.retryDelayMs); + odds = await deps.getOdds(sp); + if (odds == null) throw new Error('null odds response (retry)'); + } catch (e2) { + await deps.notify(`❌ ${sp.toUpperCase()} snapshot FAILED: ${e2.message}`, { title: 'VYNDR pipeline', priority: 'high', tags: ['x'] }); + return { sport: sp, status: 'error', reason: e2.message, gradeCount: 0 }; + } } const props = (odds && Array.isArray(odds.props)) ? odds.props : []; - if (props.length === 0) return { sport: sp, status: 'skipped', reason: 'no props', gradeCount: 0 }; + if (props.length === 0) { + await deps.notify(`⚠️ ${sp.toUpperCase()} snapshot: 0 props (odds unavailable)`, { title: 'VYNDR pipeline', priority: 'low', tags: ['warning'] }); + return { sport: sp, status: 'skipped', reason: 'no props', gradeCount: 0 }; + } // Grade the slate via the existing service; capture the envelope instead of // letting it write (we re-write an ENRICHED version below). @@ -273,6 +291,18 @@ async function runSnapshot(sport, opts = {}) { const events = generateTickerEvents(sp, enriched, deltas, ts); await pushTickerItems(events, deps); + // Session 56 — success alert, enriched with the rolling accuracy (if settled). + let accPart = ''; + try { + const acc = await deps.cacheGet(`accuracy:${sp}`); + const pct = acc && acc.overall && acc.overall.pct; + if (pct != null) accPart = `, ${pct}% accuracy (30d)`; + } catch { /* accuracy is best-effort in the alert */ } + await deps.notify( + `✅ ${sp.toUpperCase()} snapshot: ${enriched.length} props graded, ${deltas.length} deltas${accPart}`, + { title: 'VYNDR pipeline', tags: ['white_check_mark'] }, + ); + return { sport: sp, status: 'ok', diff --git a/src/snapshotScheduler.js b/src/snapshotScheduler.js index 68ee465..f089d25 100644 --- a/src/snapshotScheduler.js +++ b/src/snapshotScheduler.js @@ -17,6 +17,30 @@ const HOURS_UTC = (process.env.SNAPSHOT_HOURS_UTC || '14,19,22,1,3') .map((n) => parseInt(n, 10)) .filter((n) => Number.isInteger(n) && n >= 0 && n <= 23); +// Session 56 — missed-cron detection (pure, testable). +// The latest scheduled hour:00 (UTC) at or before `date`. null if none in 48h. +function mostRecentExpectedSlot(date, hours = HOURS_UTC) { + const d = new Date(date.getTime()); + d.setUTCMinutes(0, 0, 0); + for (let i = 0; i < 48; i += 1) { + if (hours.includes(d.getUTCHours())) return new Date(d.getTime()); + d.setUTCHours(d.getUTCHours() - 1); + } + return null; +} + +// True when we're >graceMin past the most recent expected slot AND the last +// recorded snapshot predates that slot (i.e. the run was missed). Never fires on +// cold boot (no lastSnapshotIso) — we don't cry wolf before the first snapshot. +function isSnapshotOverdue(lastSnapshotIso, now = new Date(), hours = HOURS_UTC, graceMin = 30) { + const slot = mostRecentExpectedSlot(now, hours); + if (!slot) return false; + if (now.getTime() - slot.getTime() < graceMin * 60_000) return false; + if (!lastSnapshotIso) return false; + const last = new Date(lastSnapshotIso).getTime(); + return Number.isFinite(last) && last < slot.getTime(); +} + function startSnapshotScheduler(opts = {}) { if (process.env.SNAPSHOT_CRON !== '1') { // Session 52 — log the disarmed state so container logs make it unambiguous @@ -31,10 +55,33 @@ function startSnapshotScheduler(opts = {}) { // real (now-completed) results BEFORE grading the fresh slate, so the accuracy // record reflects yesterday's games each cycle. const settleAll = opts.settleAllOutcomes || require('./services/outcomeService').settleAllOutcomes; + const notify = opts.notify || require('./utils/opsNotify').notify; + const cacheGet = opts.cacheGet || require('./utils/redis').cacheGet; const now = opts.now || (() => new Date()); let lastFiredSlot = null; + let lastOverdueSlot = null; + + // Session 56 — missed-cron watchdog. Runs every minute (independent of the + // fire schedule): if a scheduled slot came and went without a snapshot, alert + // ONCE per missed slot. + const checkOverdue = async () => { + try { + const d = now(); + const slot = mostRecentExpectedSlot(d); + if (!slot) return; + const slotKey = slot.toISOString(); + if (slotKey === lastOverdueSlot) return; // already alerted for this slot + const latest = await cacheGet('snapshot:mlb:latest'); + const lastTs = latest && latest.updated_at; + if (isSnapshotOverdue(lastTs, d)) { + lastOverdueSlot = slotKey; + await notify(`⚠️ Snapshot OVERDUE — expected ${slot.getUTCHours()}:00 UTC, last was ${lastTs || 'never'}`, { title: 'VYNDR pipeline', priority: 'high', tags: ['warning'] }); + } + } catch { /* watchdog must never throw */ } + }; const tick = async () => { + await checkOverdue(); const d = now(); if (d.getUTCMinutes() !== 0) return; const h = d.getUTCHours(); @@ -64,4 +111,4 @@ function startSnapshotScheduler(opts = {}) { return { interval, tick }; } -module.exports = { startSnapshotScheduler, HOURS_UTC }; +module.exports = { startSnapshotScheduler, HOURS_UTC, mostRecentExpectedSlot, isSnapshotOverdue }; diff --git a/src/utils/oddsNormalizer.js b/src/utils/oddsNormalizer.js index 495c2e1..3d504fc 100644 --- a/src/utils/oddsNormalizer.js +++ b/src/utils/oddsNormalizer.js @@ -24,7 +24,12 @@ const MARKET_MAP = { batter_hits: 'hits', batter_home_runs: 'home_runs', batter_total_bases: 'total_bases', - batter_rbis: 'rbis', + // Session 56 audit — must be 'rbi' (singular): the grade whitelists + // (analyze/scan/validation.py), featureCache MLB_LOG_FIELD, and outcomeService + // all key on 'rbi'. Normalizing to 'rbis' silently dropped every PropLine RBI + // prop from grading AND settlement. The streaks/hotlist path uses its own + // 'rbis' key built from raw MLB stats — independent of this normalizer. + batter_rbis: 'rbi', batter_runs: 'runs', batter_stolen_bases: 'stolen_bases', batter_singles: 'singles', diff --git a/src/utils/opsNotify.js b/src/utils/opsNotify.js new file mode 100644 index 0000000..50dcaac --- /dev/null +++ b/src/utils/opsNotify.js @@ -0,0 +1,54 @@ +'use strict'; + +/** + * opsNotify (Session 56) — pipeline alerting via ntfy.sh. + * + * Push a one-line operational alert (snapshot success / failure / stale / missed + * cron) to an ntfy topic so a silent pipeline never goes unnoticed. Fire-and- + * forget: NEVER throws, NEVER blocks the pipeline on a notify failure. + * + * Config: + * NTFY_URL (default https://ntfy.sh) + * NTFY_TOPIC (default vyndr-pipeline-kev2026) + * PIPELINE_ALERTS=0 → disable entirely + * Disabled automatically under NODE_ENV==='test' unless a fetchImpl is injected + * (so the unit tests can assert the call without hitting the network). + */ + +const NTFY_URL = () => process.env.NTFY_URL || 'https://ntfy.sh'; +const NTFY_TOPIC = () => process.env.NTFY_TOPIC || 'vyndr-pipeline-kev2026'; + +function enabled(opts = {}) { + if (opts.fetchImpl) return true; // tests inject → always "enabled" + if (process.env.PIPELINE_ALERTS === '0') return false; + if (process.env.NODE_ENV === 'test') return false; + return true; +} + +/** + * Send an ops alert. `opts`: { title, priority ('min'|'low'|'default'|'high'| + * 'urgent'), tags (string[]), fetchImpl }. Resolves { sent: boolean } — never rejects. + */ +async function notify(message, opts = {}) { + if (!enabled(opts)) return { sent: false, reason: 'disabled' }; + const doFetch = opts.fetchImpl || fetch; + const headers = {}; + if (opts.title) headers.Title = opts.title; + if (opts.priority) headers.Priority = opts.priority; + if (Array.isArray(opts.tags) && opts.tags.length) headers.Tags = opts.tags.join(','); + try { + await doFetch(`${NTFY_URL()}/${NTFY_TOPIC()}`, { + method: 'POST', + headers, + body: String(message == null ? '' : message), + signal: typeof AbortSignal !== 'undefined' && AbortSignal.timeout ? AbortSignal.timeout(6000) : undefined, + }); + return { sent: true }; + } catch (err) { + // Alerting must never break the pipeline. + if (process.env.NODE_ENV !== 'test') console.warn('[opsNotify] failed:', err.message); + return { sent: false, reason: err.message }; + } +} + +module.exports = { notify, __internals: { enabled, NTFY_URL, NTFY_TOPIC } }; diff --git a/tests/unit/oddsNormalizer.test.js b/tests/unit/oddsNormalizer.test.js index fccc10b..165613e 100644 --- a/tests/unit/oddsNormalizer.test.js +++ b/tests/unit/oddsNormalizer.test.js @@ -121,6 +121,14 @@ describe('oddsNormalizer', () => { } }); + it('Session 56 audit — batter_rbis normalizes to rbi (singular), matching the grade chain', () => { + // The whole grade/feature/outcome chain keys on 'rbi'. If this reverts to + // 'rbis', PropLine RBI props silently stop grading + settling again. + expect(MARKET_MAP.batter_rbis).toBe('rbi'); + expect(MARKET_MAP.batter_doubles).toBe('doubles'); + expect(MARKET_MAP.pitcher_outs).toBe('outs'); + }); + it('exposes the NFL market keys added in the Session 31 audit', () => { // Defensive mapping landed before NFL is fully wired so it can't // repeat the MLB silent-zero bug. Both odds-api `_yds` and the diff --git a/tests/unit/outcomeService.test.js b/tests/unit/outcomeService.test.js index 9f5c602..bfec177 100644 --- a/tests/unit/outcomeService.test.js +++ b/tests/unit/outcomeService.test.js @@ -59,6 +59,13 @@ describe('outcomeService — settlement math', () => { expect(statValue({ strikeOuts: 7 }, 'strikeouts')).toBe(7); expect(statValue({ hits: 2 }, 'unknown_stat')).toBeNull(); }); + test('Session 56 — newly-wired MLB fields settle (rbi, doubles, outs)', () => { + expect(statValue({ rbi: 2 }, 'rbi')).toBe(2); + expect(statValue({ doubles: 1 }, 'doubles')).toBe(1); + expect(statValue({ outs: 18 }, 'outs')).toBe(18); + expect(statValue({ baseOnBalls: 3 }, 'walks')).toBe(3); + expect(statValue({ earnedRuns: 1 }, 'earned_runs')).toBe(1); + }); test('dateStrings yields both UTC and ET calendar dates', () => { const ds = dateStrings(ISO); expect(ds).toContain('2026-07-10'); // UTC diff --git a/tests/unit/pipelineAlerting.test.js b/tests/unit/pipelineAlerting.test.js new file mode 100644 index 0000000..aefda2c --- /dev/null +++ b/tests/unit/pipelineAlerting.test.js @@ -0,0 +1,128 @@ +'use strict'; + +// Session 56 — pipeline alerting (ntfy) + retry-once + missed-cron detection. + +const opsNotify = require('../../src/utils/opsNotify'); +const snapshot = require('../../src/services/snapshotService'); +const { mostRecentExpectedSlot, isSnapshotOverdue } = require('../../src/snapshotScheduler'); + +function memCache(seed = {}) { + const store = { ...seed }; + return { store, cacheGet: async (k) => (k in store ? store[k] : null), cacheSet: async (k, v) => { store[k] = v; return true; } }; +} + +describe('opsNotify', () => { + test('POSTs to the ntfy topic with title/priority/tags headers', async () => { + const calls = []; + const fetchImpl = async (url, opts) => { calls.push({ url, opts }); return { ok: true }; }; + const res = await opsNotify.notify('hello', { title: 'VYNDR', priority: 'high', tags: ['x'], fetchImpl }); + expect(res.sent).toBe(true); + expect(calls[0].url).toMatch(/\/vyndr-pipeline-kev2026$/); + expect(calls[0].opts.method).toBe('POST'); + expect(calls[0].opts.headers.Title).toBe('VYNDR'); + expect(calls[0].opts.headers.Priority).toBe('high'); + expect(calls[0].opts.headers.Tags).toBe('x'); + expect(calls[0].opts.body).toBe('hello'); + }); + + test('never throws on fetch failure', async () => { + const fetchImpl = async () => { throw new Error('network down'); }; + const res = await opsNotify.notify('x', { fetchImpl }); + expect(res.sent).toBe(false); + expect(res.reason).toBe('network down'); + }); + + test('disabled under NODE_ENV=test without an injected fetch', async () => { + const res = await opsNotify.notify('x'); + expect(res.sent).toBe(false); + expect(res.reason).toBe('disabled'); + }); +}); + +describe('runSnapshot — retry + alerts', () => { + const baseDeps = (cache) => ({ + ...cache, + gradeAndCacheSlate: async (_s, _p, opts) => { opts.cacheSet('grades', { grades: [{ player: 'A', stat_type: 'hits', line: 1.5, direction: 'over', grade: 'A', confidence: 90 }] }); }, + resolveStats: async () => ({ found: false }), + classify: () => ({ primary: null }), + now: () => '2026-07-10T15:00:00Z', + nowMs: () => 1000, + sleep: async () => {}, // no real delay in tests + retryDelayMs: 0, + }); + + test('retries once on a thrown odds error, then succeeds', async () => { + const cache = memCache(); + let n = 0; + const notes = []; + const deps = { + ...baseDeps(cache), + getOdds: async () => { n += 1; if (n === 1) throw new Error('propline 503'); return { props: [{ player: 'A', stat_type: 'hits', line: 1.5 }], provider: 'propline' }; }, + notify: async (msg) => { notes.push(msg); return { sent: true }; }, + }; + const r = await snapshot.runSnapshot('mlb', deps); + expect(n).toBe(2); // one retry + expect(r.status).toBe('ok'); + expect(notes.some((m) => m.includes('✅') && m.includes('MLB'))).toBe(true); + }); + + test('alerts failure when both attempts throw', async () => { + const cache = memCache(); + const notes = []; + const deps = { + ...baseDeps(cache), + getOdds: async () => { throw new Error('down'); }, + notify: async (msg) => { notes.push(msg); return { sent: true }; }, + }; + const r = await snapshot.runSnapshot('mlb', deps); + expect(r.status).toBe('error'); + expect(notes.some((m) => m.includes('❌') && m.includes('FAILED'))).toBe(true); + }); + + test('alerts stale (low priority) on an empty slate, no retry', async () => { + const cache = memCache(); + let n = 0; + const notes = []; + const deps = { + ...baseDeps(cache), + getOdds: async () => { n += 1; return { props: [] }; }, + notify: async (msg) => { notes.push(msg); return { sent: true }; }, + }; + const r = await snapshot.runSnapshot('mlb', deps); + expect(n).toBe(1); // empty is NOT a failure → no retry + expect(r.status).toBe('skipped'); + expect(notes.some((m) => m.includes('⚠️') && m.includes('0 props'))).toBe(true); + }); +}); + +describe('missed-cron detection', () => { + const HOURS = [14, 19, 22, 1, 3]; + test('mostRecentExpectedSlot returns the latest scheduled hour at/before now', () => { + const now = new Date('2026-07-10T16:30:00Z'); + const slot = mostRecentExpectedSlot(now, HOURS); + expect(slot.getUTCHours()).toBe(14); + expect(slot.getUTCDate()).toBe(10); + }); + + test('overdue when now is >30m past a slot the last snapshot predates', () => { + const now = new Date('2026-07-10T16:30:00Z'); // 2.5h past the 14:00 slot + const lastTs = '2026-07-10T10:00:00Z'; // before 14:00 → the 14:00 run was missed + expect(isSnapshotOverdue(lastTs, now, HOURS, 30)).toBe(true); + }); + + test('not overdue within the grace window', () => { + const now = new Date('2026-07-10T14:20:00Z'); // only 20m past the slot + expect(isSnapshotOverdue('2026-07-10T10:00:00Z', now, HOURS, 30)).toBe(false); + }); + + test('not overdue when the last snapshot is fresh (ran the slot)', () => { + const now = new Date('2026-07-10T16:30:00Z'); + const lastTs = '2026-07-10T14:01:00Z'; // ran the 14:00 slot + expect(isSnapshotOverdue(lastTs, now, HOURS, 30)).toBe(false); + }); + + test('never overdue on cold boot (no prior snapshot)', () => { + const now = new Date('2026-07-10T16:30:00Z'); + expect(isSnapshotOverdue(null, now, HOURS, 30)).toBe(false); + }); +}); diff --git a/web/public/sw.js b/web/public/sw.js index 9c99d17..5c7cc9d 100644 --- a/web/public/sw.js +++ b/web/public/sw.js @@ -1,2 +1,2 @@ (()=>{"use strict";let e,t,a,s,r,i={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"serwist",runtime:"runtime",suffix:"u">typeof registration?registration.scope:""},n=e=>[i.prefix,e,i.suffix].filter(e=>e&&e.length>0).join("-"),c=e=>e||n(i.precache),o=e=>e||n(i.runtime);var l=class extends Error{details;constructor(e,t){super(((e,...t)=>{let a=e;return t.length>0&&(a+=` :: ${JSON.stringify(t)}`),a})(e,t)),this.name=e,this.details=t}};function h(e){return new Promise(t=>setTimeout(t,e))}let u=new Set;function d(e,t){let a=new URL(e);for(let e of t)a.searchParams.delete(e);return a.href}async function f(e,t,a,s){let r=d(t.url,a);if(t.url===r)return e.match(t,s);let i={...s,ignoreSearch:!0};for(let n of(await e.keys(t,i)))if(r===d(n.url,a))return e.match(n,s)}var p=class{promise;resolve;reject;constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}};let m=async()=>{for(let e of u)await e()},w="-precache-",g=async(e,t=w)=>{let a=(await self.caches.keys()).filter(a=>a.includes(t)&&a.includes(self.registration.scope)&&a!==e);return await Promise.all(a.map(e=>self.caches.delete(e))),a},y=(e,t)=>{let a=t();return e.waitUntil(a),a},_=(e,t)=>t.some(t=>e instanceof t),b=new WeakMap,v=new WeakMap,R=new WeakMap,E={get(e,t,a){if(e instanceof IDBTransaction){if("done"===t)return b.get(e);if("store"===t)return a.objectStoreNames[1]?void 0:a.objectStore(a.objectStoreNames[0])}return q(e[t])},set:(e,t,a)=>(e[t]=a,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function q(e){if(e instanceof IDBRequest){let t;return t=new Promise((t,a)=>{let s=()=>{e.removeEventListener("success",r),e.removeEventListener("error",i)},r=()=>{t(q(e.result)),s()},i=()=>{a(e.error),s()};e.addEventListener("success",r),e.addEventListener("error",i)}),R.set(t,e),t}if(v.has(e))return v.get(e);let t=function(e){if("function"==typeof e)return(r||(r=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(x(this),t),q(this.request)}:function(...t){return q(e.apply(x(this),t))};return(e instanceof IDBTransaction&&function(e){if(b.has(e))return;let t=new Promise((t,a)=>{let s=()=>{e.removeEventListener("complete",r),e.removeEventListener("error",i),e.removeEventListener("abort",i)},r=()=>{t(),s()},i=()=>{a(e.error||new DOMException("AbortError","AbortError")),s()};e.addEventListener("complete",r),e.addEventListener("error",i),e.addEventListener("abort",i)});b.set(e,t)}(e),_(e,s||(s=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])))?new Proxy(e,E):e}(e);return t!==e&&(v.set(e,t),R.set(t,e)),t}let x=e=>R.get(e);function D(e,t,{blocked:a,upgrade:s,blocking:r,terminated:i}={}){let n=indexedDB.open(e,t),c=q(n);return s&&n.addEventListener("upgradeneeded",e=>{s(q(n.result),e.oldVersion,e.newVersion,q(n.transaction),e)}),a&&n.addEventListener("blocked",e=>a(e.oldVersion,e.newVersion,e)),c.then(e=>{i&&e.addEventListener("close",()=>i()),r&&e.addEventListener("versionchange",e=>r(e.oldVersion,e.newVersion,e))}).catch(()=>{}),c}let S=["get","getKey","getAll","getAllKeys","count"],k=["put","add","delete","clear"],T=new Map;function P(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&"string"==typeof t))return;if(T.get(t))return T.get(t);let a=t.replace(/FromIndex$/,""),s=t!==a,r=k.includes(a);if(!(a in(s?IDBIndex:IDBObjectStore).prototype)||!(r||S.includes(a)))return;let i=async function(e,...t){let i=this.transaction(e,r?"readwrite":"readonly"),n=i.store;return s&&(n=n.index(t.shift())),(await Promise.all([n[a](...t),r&&i.done]))[0]};return T.set(t,i),i}E={...e=E,get:(t,a,s)=>P(t,a)||e.get(t,a,s),has:(t,a)=>!!P(t,a)||e.has(t,a)};let C=["continue","continuePrimaryKey","advance"],N={},I=new WeakMap,U=new WeakMap,L={get(e,t){if(!C.includes(t))return e[t];let a=N[t];return a||(a=N[t]=function(...e){I.set(this,U.get(this)[t](...e))}),a}};async function*A(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;let a=new Proxy(t,L);for(U.set(a,t),R.set(a,x(t));t;)yield a,t=await (I.get(a)||t.continue()),I.delete(a)}function O(e,t){return t===Symbol.asyncIterator&&_(e,[IDBIndex,IDBObjectStore,IDBCursor])||"iterate"===t&&_(e,[IDBIndex,IDBObjectStore])}E={...t=E,get:(e,a,s)=>O(e,a)?A:t.get(e,a,s),has:(e,a)=>O(e,a)||t.has(e,a)};let M=async(e,t)=>{let s=null;if(e.url&&(s=new URL(e.url).origin),s!==self.location.origin)throw new l("cross-origin-copy-response",{origin:s});let r=e.clone(),i={headers:new Headers(r.headers),status:r.status,statusText:r.statusText},n=t?t(i):i,c=!function(){if(void 0===a){let e=new Response("");if("body"in e)try{new Response(e.body),a=!0}catch{a=!1}a=!1}return a}()?await r.blob():r.body;return new Response(c,n)},B="requests",K="queueName";var F=class{_db=null;async addEntry(e){let t=(await this.getDb()).transaction(B,"readwrite",{durability:"relaxed"});await t.store.add(e),await t.done}async getFirstEntryId(){return(await (await this.getDb()).transaction(B).store.openCursor())?.value.id}async getAllEntriesByQueueName(e){return await (await this.getDb()).getAllFromIndex(B,K,IDBKeyRange.only(e))||[]}async getEntryCountByQueueName(e){return(await this.getDb()).countFromIndex(B,K,IDBKeyRange.only(e))}async deleteEntry(e){await (await this.getDb()).delete(B,e)}async getFirstEntryByQueueName(e){return await this.getEndEntryFromIndex(IDBKeyRange.only(e),"next")}async getLastEntryByQueueName(e){return await this.getEndEntryFromIndex(IDBKeyRange.only(e),"prev")}async getEndEntryFromIndex(e,t){return(await (await this.getDb()).transaction(B).store.index(K).openCursor(e,t))?.value}async getDb(){return this._db||(this._db=await D("serwist-background-sync",3,{upgrade:this._upgradeDb})),this._db}_upgradeDb(e,t){t>0&&t<3&&e.objectStoreNames.contains(B)&&e.deleteObjectStore(B),e.createObjectStore(B,{autoIncrement:!0,keyPath:"id"}).createIndex(K,K,{unique:!1})}},W=class{_queueName;_queueDb;constructor(e){this._queueName=e,this._queueDb=new F}async pushEntry(e){delete e.id,e.queueName=this._queueName,await this._queueDb.addEntry(e)}async unshiftEntry(e){let t=await this._queueDb.getFirstEntryId();t?e.id=t-1:delete e.id,e.queueName=this._queueName,await this._queueDb.addEntry(e)}async popEntry(){return this._removeEntry(await this._queueDb.getLastEntryByQueueName(this._queueName))}async shiftEntry(){return this._removeEntry(await this._queueDb.getFirstEntryByQueueName(this._queueName))}async getAll(){return await this._queueDb.getAllEntriesByQueueName(this._queueName)}async size(){return await this._queueDb.getEntryCountByQueueName(this._queueName)}async deleteEntry(e){await this._queueDb.deleteEntry(e)}async _removeEntry(e){return e&&await this.deleteEntry(e.id),e}};let j=["method","referrer","referrerPolicy","mode","credentials","cache","redirect","integrity","keepalive"];var H=class e{_requestData;static async fromRequest(t){let a={url:t.url,headers:{}};for(let e of("GET"!==t.method&&(a.body=await t.clone().arrayBuffer()),t.headers.forEach((e,t)=>{a.headers[t]=e}),j))void 0!==t[e]&&(a[e]=t[e]);return new e(a)}constructor(e){"navigate"===e.mode&&(e.mode="same-origin"),this._requestData=e}toObject(){let e=Object.assign({},this._requestData);return e.headers=Object.assign({},this._requestData.headers),e.body&&(e.body=e.body.slice(0)),e}toRequest(){return new Request(this._requestData.url,this._requestData)}clone(){return new e(this.toObject())}};let $="serwist-background-sync",V=new Set,Q=e=>{let t={request:new H(e.requestData).toRequest(),timestamp:e.timestamp};return e.metadata&&(t.metadata=e.metadata),t};var G=class{_name;_onSync;_maxRetentionTime;_queueStore;_forceSyncFallback;_syncInProgress=!1;_requestsAddedDuringSync=!1;constructor(e,{forceSyncFallback:t,onSync:a,maxRetentionTime:s}={}){if(V.has(e))throw new l("duplicate-queue-name",{name:e});V.add(e),this._name=e,this._onSync=a||this.replayRequests,this._maxRetentionTime=s||10080,this._forceSyncFallback=!!t,this._queueStore=new W(this._name),this._addSyncListener()}get name(){return this._name}async pushRequest(e){await this._addRequest(e,"push")}async unshiftRequest(e){await this._addRequest(e,"unshift")}async popRequest(){return this._removeRequest("pop")}async shiftRequest(){return this._removeRequest("shift")}async getAll(){let e=await this._queueStore.getAll(),t=Date.now(),a=[];for(let s of e){let e=60*this._maxRetentionTime*1e3;t-s.timestamp>e?await this._queueStore.deleteEntry(s.id):a.push(Q(s))}return a}async size(){return await this._queueStore.size()}async _addRequest({request:e,metadata:t,timestamp:a=Date.now()},s){let r={requestData:(await H.fromRequest(e.clone())).toObject(),timestamp:a};switch(t&&(r.metadata=t),s){case"push":await this._queueStore.pushEntry(r);break;case"unshift":await this._queueStore.unshiftEntry(r)}this._syncInProgress?this._requestsAddedDuringSync=!0:await this.registerSync()}async _removeRequest(e){let t,a=Date.now();switch(e){case"pop":t=await this._queueStore.popEntry();break;case"shift":t=await this._queueStore.shiftEntry()}if(t){let s=60*this._maxRetentionTime*1e3;return a-t.timestamp>s?this._removeRequest(e):Q(t)}}async replayRequests(){let e;for(;e=await this.shiftRequest();)try{await fetch(e.request.clone())}catch{throw await this.unshiftRequest(e),new l("queue-replay-failed",{name:this._name})}}async registerSync(){if("sync"in self.registration&&!this._forceSyncFallback)try{await self.registration.sync.register(`${$}:${this._name}`)}catch(e){}}_addSyncListener(){"sync"in self.registration&&!this._forceSyncFallback?self.addEventListener("sync",e=>{if(e.tag===`${$}:${this._name}`){let t=async()=>{let t;this._syncInProgress=!0;try{await this._onSync({queue:this})}catch(e){if(e instanceof Error)throw e}finally{this._requestsAddedDuringSync&&!(t&&!e.lastChance)&&await this.registerSync(),this._syncInProgress=!1,this._requestsAddedDuringSync=!1}};e.waitUntil(t())}}):this._onSync({queue:this})}static get _queueNames(){return V}},z=class{_queue;constructor(e,t){this._queue=new G(e,t)}async fetchDidFail({request:e}){await this._queue.pushRequest({request:e})}};let Y={cacheWillUpdate:async({response:e})=>200===e.status||0===e.status?e:null};function J(e){return"string"==typeof e?new Request(e):e}var X=class{event;request;url;params;_cacheKeys={};_strategy;_handlerDeferred;_extendLifetimePromises;_plugins;_pluginStateMap;constructor(e,t){for(const a of(this.event=t.event,this.request=t.request,t.url&&(this.url=t.url,this.params=t.params),this._strategy=e,this._handlerDeferred=new p,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map,this._plugins))this._pluginStateMap.set(a,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){let{event:t}=this,a=J(e),s=await this.getPreloadResponse();if(s)return s;let r=this.hasCallback("fetchDidFail")?a.clone():null;try{for(let e of this.iterateCallbacks("requestWillFetch"))a=await e({request:a.clone(),event:t})}catch(e){if(e instanceof Error)throw new l("plugin-error-request-will-fetch",{thrownErrorMessage:e.message})}let i=a.clone();try{let e;for(let s of(e=await fetch(a,"navigate"===a.mode?void 0:this._strategy.fetchOptions),this.iterateCallbacks("fetchDidSucceed")))e=await s({event:t,request:i,response:e});return e}catch(e){throw r&&await this.runCallbacks("fetchDidFail",{error:e,event:t,originalRequest:r.clone(),request:i.clone()}),e}}async fetchAndCachePut(e){let t=await this.fetch(e),a=t.clone();return this.waitUntil(this.cachePut(e,a)),t}async cacheMatch(e){let t,a=J(e),{cacheName:s,matchOptions:r}=this._strategy,i=await this.getCacheKey(a,"read"),n={...r,cacheName:s};for(let e of(t=await caches.match(i,n),this.iterateCallbacks("cachedResponseWillBeUsed")))t=await e({cacheName:s,matchOptions:r,cachedResponse:t,request:i,event:this.event})||void 0;return t}async cachePut(e,t){let a=J(e);await h(0);let s=await this.getCacheKey(a,"write");if(!t)throw new l("cache-put-with-no-response",{url:new URL(String(s.url),location.href).href.replace(RegExp(`^${location.origin}`),"")});let r=await this._ensureResponseSafeToCache(t);if(!r)return!1;let{cacheName:i,matchOptions:n}=this._strategy,c=await self.caches.open(i),o=this.hasCallback("cacheDidUpdate"),u=o?await f(c,s.clone(),["__WB_REVISION__"],n):null;try{await c.put(s,o?r.clone():r)}catch(e){if(e instanceof Error)throw"QuotaExceededError"===e.name&&await m(),e}for(let e of this.iterateCallbacks("cacheDidUpdate"))await e({cacheName:i,oldResponse:u,newResponse:r.clone(),request:s,event:this.event});return!0}async getCacheKey(e,t){let a=`${e.url} | ${t}`;if(!this._cacheKeys[a]){let s=e;for(let e of this.iterateCallbacks("cacheKeyWillBeUsed"))s=J(await e({mode:t,request:s,event:this.event,params:this.params}));this._cacheKeys[a]=s}return this._cacheKeys[a]}hasCallback(e){for(let t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(let a of this.iterateCallbacks(e))await a(t)}*iterateCallbacks(e){for(let t of this._strategy.plugins)if("function"==typeof t[e]){let a=this._pluginStateMap.get(t),s=s=>{let r={...s,state:a};return t[e](r)};yield s}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){let e;for(;e=this._extendLifetimePromises.shift();)await e}destroy(){this._handlerDeferred.resolve(null)}async getPreloadResponse(){if(this.event instanceof FetchEvent&&"navigate"===this.event.request.mode&&"preloadResponse"in this.event)try{let e=await this.event.preloadResponse;if(e)return e}catch(e){return}}async _ensureResponseSafeToCache(e){let t=e,a=!1;for(let e of this.iterateCallbacks("cacheWillUpdate"))if(t=await e({request:this.request,response:t,event:this.event})||void 0,a=!0,!t)break;return!a&&t&&200!==t.status&&(t=void 0),t}},Z=class{cacheName;plugins;fetchOptions;matchOptions;constructor(e={}){this.cacheName=o(e.cacheName),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){let[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});let t=e.event,a="string"==typeof e.request?new Request(e.request):e.request,s=new X(this,e.url?{event:t,request:a,url:e.url,params:e.params}:{event:t,request:a}),r=this._getResponse(s,a,t);return[r,this._awaitComplete(r,s,a,t)]}async _getResponse(e,t,a){let s;await e.runCallbacks("handlerWillStart",{event:a,request:t});try{if(s=await this._handle(t,e),void 0===s||"error"===s.type)throw new l("no-response",{url:t.url})}catch(r){if(r instanceof Error){for(let i of e.iterateCallbacks("handlerDidError"))if(void 0!==(s=await i({error:r,event:a,request:t})))break}if(!s)throw r}for(let r of e.iterateCallbacks("handlerWillRespond"))s=await r({event:a,request:t,response:s});return s}async _awaitComplete(e,t,a,s){let r,i;try{r=await e}catch{}try{await t.runCallbacks("handlerDidRespond",{event:s,request:a,response:r}),await t.doneWaiting()}catch(e){e instanceof Error&&(i=e)}if(await t.runCallbacks("handlerDidComplete",{event:s,request:a,response:r,error:i}),t.destroy(),i)throw i}},ee=class extends Z{_networkTimeoutSeconds;constructor(e={}){super(e),this.plugins.some(e=>"cacheWillUpdate"in e)||this.plugins.unshift(Y),this._networkTimeoutSeconds=e.networkTimeoutSeconds||0}async _handle(e,t){let a,s=[],r=[];if(this._networkTimeoutSeconds){let{id:i,promise:n}=this._getTimeoutPromise({request:e,logs:s,handler:t});a=i,r.push(n)}let i=this._getNetworkPromise({timeoutId:a,request:e,logs:s,handler:t});r.push(i);let n=await t.waitUntil((async()=>await t.waitUntil(Promise.race(r))||await i)());if(!n)throw new l("no-response",{url:e.url});return n}_getTimeoutPromise({request:e,logs:t,handler:a}){let s;return{promise:new Promise(t=>{s=setTimeout(async()=>{t(await a.cacheMatch(e))},1e3*this._networkTimeoutSeconds)}),id:s}}async _getNetworkPromise({timeoutId:e,request:t,logs:a,handler:s}){let r,i;try{i=await s.fetchAndCachePut(t)}catch(e){e instanceof Error&&(r=e)}return e&&clearTimeout(e),(r||!i)&&(i=await s.cacheMatch(t)),i}},et=class extends Z{_networkTimeoutSeconds;constructor(e={}){super(e),this._networkTimeoutSeconds=e.networkTimeoutSeconds||0}async _handle(e,t){let a,s;try{let a=[t.fetch(e)];if(this._networkTimeoutSeconds){let e=h(1e3*this._networkTimeoutSeconds);a.push(e)}if(!(s=await Promise.race(a)))throw Error(`Timed out the network response after ${this._networkTimeoutSeconds} seconds.`)}catch(e){e instanceof Error&&(a=e)}if(!s)throw new l("no-response",{url:e.url,error:a});return s}};let ea=e=>e&&"object"==typeof e?e:{handle:e};var es=class{handler;match;method;catchHandler;constructor(e,t,a="GET"){this.handler=ea(t),this.match=e,this.method=a}setCatchHandler(e){this.catchHandler=ea(e)}},er=class e extends Z{_fallbackToNetwork;static defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:e})=>!e||e.status>=400?null:e};static copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:e})=>e.redirected?await M(e):e};constructor(t={}){t.cacheName=c(t.cacheName),super(t),this._fallbackToNetwork=!1!==t.fallbackToNetwork,this.plugins.push(e.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){let a=await t.getPreloadResponse();if(a)return a;let s=await t.cacheMatch(e);return s||(t.event&&"install"===t.event.type?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(e,t){let a,s=t.params||{};if(this._fallbackToNetwork){let r=s.integrity,i=e.integrity,n=!i||i===r;a=await t.fetch(new Request(e,{integrity:"no-cors"!==e.mode?i||r:void 0})),r&&n&&"no-cors"!==e.mode&&(this._useDefaultCacheabilityPluginIfNeeded(),await t.cachePut(e,a.clone()))}else throw new l("missing-precache-entry",{cacheName:this.cacheName,url:e.url});return a}async _handleInstall(e,t){this._useDefaultCacheabilityPluginIfNeeded();let a=await t.fetch(e);if(!await t.cachePut(e,a.clone()))throw new l("bad-precaching-response",{url:e.url,status:a.status});return a}_useDefaultCacheabilityPluginIfNeeded(){let t=null,a=0;for(let[s,r]of this.plugins.entries())r!==e.copyRedirectedCacheableResponsesPlugin&&(r===e.defaultPrecacheCacheabilityPlugin&&(t=s),r.cacheWillUpdate&&a++);0===a?this.plugins.push(e.defaultPrecacheCacheabilityPlugin):a>1&&null!==t&&this.plugins.splice(t,1)}},ei=class extends es{_allowlist;_denylist;constructor(e,{allowlist:t=[/./],denylist:a=[]}={}){super(e=>this._match(e),e),this._allowlist=t,this._denylist=a}_match({url:e,request:t}){if(t&&"navigate"!==t.mode)return!1;let a=e.pathname+e.search;for(let e of this._denylist)if(e.test(a))return!1;return!!this._allowlist.some(e=>e.test(a))}},en=class extends es{constructor(e,t,a){super(({url:t})=>{let a=e.exec(t.href);if(a)return t.origin!==location.origin&&0!==a.index?void 0:a.slice(1)},t,a)}};let ec=e=>{if(!e)throw new l("add-to-cache-list-unexpected-type",{entry:e});if("string"==typeof e){let t=new URL(e,location.href);return{cacheKey:t.href,url:t.href}}let{revision:t,url:a}=e;if(!a)throw new l("add-to-cache-list-unexpected-type",{entry:e});if(!t){let e=new URL(a,location.href);return{cacheKey:e.href,url:e.href}}let s=new URL(a,location.href),r=new URL(a,location.href);return s.searchParams.set("__WB_REVISION__",t),{cacheKey:s.href,url:r.href}};var eo=class{updatedURLs=[];notUpdatedURLs=[];handlerWillStart=async({request:e,state:t})=>{t&&(t.originalRequest=e)};cachedResponseWillBeUsed=async({event:e,state:t,cachedResponse:a})=>{if("install"===e.type&&t?.originalRequest&&t.originalRequest instanceof Request){let e=t.originalRequest.url;a?this.notUpdatedURLs.push(e):this.updatedURLs.push(e)}return a}};let el=async(e,t,a)=>{let s=t.map((e,t)=>({index:t,item:e})),r=async e=>{let t=[];for(;;){let r=s.pop();if(!r)return e(t);let i=await a(r.item);t.push({result:i,index:r.index})}},i=Array.from({length:e},()=>new Promise(r));return(await Promise.all(i)).flat().sort((e,t)=>e.indexe.result)};"u">typeof navigator&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent);let eh="cache-entries",eu=e=>{let t=new URL(e,location.href);return t.hash="",t.href};var ed=class{_cacheName;_db=null;constructor(e){this._cacheName=e}_getId(e){return`${this._cacheName}|${eu(e)}`}_upgradeDb(e){let t=e.createObjectStore(eh,{keyPath:"id"});t.createIndex("cacheName","cacheName",{unique:!1}),t.createIndex("timestamp","timestamp",{unique:!1})}_upgradeDbAndDeleteOldDbs(e){this._upgradeDb(e),this._cacheName&&function(e,{blocked:t}={}){let a=indexedDB.deleteDatabase(e);t&&a.addEventListener("blocked",e=>t(e.oldVersion,e)),q(a).then(()=>void 0)}(this._cacheName)}async setTimestamp(e,t){e=eu(e);let a={id:this._getId(e),cacheName:this._cacheName,url:e,timestamp:t},s=(await this.getDb()).transaction(eh,"readwrite",{durability:"relaxed"});await s.store.put(a),await s.done}async getTimestamp(e){return(await (await this.getDb()).get(eh,this._getId(e)))?.timestamp}async expireEntries(e,t){let a=await (await this.getDb()).transaction(eh,"readwrite").store.index("timestamp").openCursor(null,"prev"),s=[],r=0;for(;a;){let i=a.value;i.cacheName===this._cacheName&&(e&&i.timestamp=t?(a.delete(),s.push(i.url)):r++),a=await a.continue()}return s}async getDb(){return this._db||(this._db=await D("serwist-expiration",1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)})),this._db}},ef=class{_isRunning=!1;_rerunRequested=!1;_maxEntries;_maxAgeSeconds;_matchOptions;_cacheName;_timestampModel;constructor(e,t={}){this._maxEntries=t.maxEntries,this._maxAgeSeconds=t.maxAgeSeconds,this._matchOptions=t.matchOptions,this._cacheName=e,this._timestampModel=new ed(e)}async expireEntries(){if(this._isRunning){this._rerunRequested=!0;return}this._isRunning=!0;let e=this._maxAgeSeconds?Date.now()-1e3*this._maxAgeSeconds:0,t=await this._timestampModel.expireEntries(e,this._maxEntries),a=await self.caches.open(this._cacheName);for(let e of t)await a.delete(e,this._matchOptions);this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,this.expireEntries())}async updateTimestamp(e){await this._timestampModel.setTimestamp(e,Date.now())}async isURLExpired(e){if(!this._maxAgeSeconds)return!1;let t=await this._timestampModel.getTimestamp(e),a=Date.now()-1e3*this._maxAgeSeconds;return void 0===t||t{u.add(e)})(()=>this.deleteCacheAndMetadata())}_getCacheExpiration(e){if(e===o())throw new l("expire-custom-caches-only");let t=this._cacheExpirations.get(e);return t||(t=new ef(e,this._config),this._cacheExpirations.set(e,t)),t}cachedResponseWillBeUsed({event:e,cacheName:t,request:a,cachedResponse:s}){if(!s)return null;let r=this._isResponseDateFresh(s),i=this._getCacheExpiration(t),n="last-used"===this._config.maxAgeFrom,c=(async()=>{n&&await i.updateTimestamp(a.url),await i.expireEntries()})();try{e.waitUntil(c)}catch{}return r?s:null}_isResponseDateFresh(e){if("last-used"===this._config.maxAgeFrom)return!0;let t=Date.now();if(!this._config.maxAgeSeconds)return!0;let a=this._getDateHeaderTimestamp(e);return null===a||a>=t-1e3*this._config.maxAgeSeconds}_getDateHeaderTimestamp(e){if(!e.headers.has("date"))return null;let t=new Date(e.headers.get("date")).getTime();return Number.isNaN(t)?null:t}async cacheDidUpdate({cacheName:e,request:t}){let a=this._getCacheExpiration(e);await a.updateTimestamp(t.url),await a.expireEntries()}async deleteCacheAndMetadata(){for(let[e,t]of this._cacheExpirations)await self.caches.delete(e),await t.delete();this._cacheExpirations=new Map}};let em=/^\/(\w+\/)?collect/,ew=({serwist:e,cacheName:t,...a})=>{let s,r,c=t||n(i.googleAnalytics),o=new z("serwist-google-analytics",{maxRetentionTime:2880,onSync:async({queue:e})=>{let t;for(;t=await e.shiftRequest();){let{request:s,timestamp:r}=t,i=new URL(s.url);try{let e="POST"===s.method?new URLSearchParams(await s.clone().text()):i.searchParams,t=r-(Number(e.get("qt"))||0),n=Date.now()-t;if(e.set("qt",String(n)),a.parameterOverrides)for(let t of Object.keys(a.parameterOverrides)){let s=a.parameterOverrides[t];e.set(t,s)}"function"==typeof a.hitFilter&&a.hitFilter.call(null,e),await fetch(new Request(i.origin+i.pathname,{body:e.toString(),method:"POST",mode:"cors",credentials:"omit",headers:{"Content-Type":"text/plain"}}))}catch(a){throw await e.unshiftRequest(t),a}}}});for(let t of[new es(({url:e})=>"www.googletagmanager.com"===e.hostname&&"/gtm.js"===e.pathname,new ee({cacheName:c}),"GET"),new es(({url:e})=>"www.google-analytics.com"===e.hostname&&"/analytics.js"===e.pathname,new ee({cacheName:c}),"GET"),new es(({url:e})=>"www.googletagmanager.com"===e.hostname&&"/gtag/js"===e.pathname,new ee({cacheName:c}),"GET"),new es(s=({url:e})=>"www.google-analytics.com"===e.hostname&&em.test(e.pathname),r=new et({plugins:[o]}),"GET"),new es(s,r,"POST")])e.registerRoute(t)};var eg=class{_fallbackUrls;_serwist;constructor({fallbackUrls:e,serwist:t}){this._fallbackUrls=e,this._serwist=t}async handlerDidError(e){for(let t of this._fallbackUrls)if("string"==typeof t){let e=await this._serwist.matchPrecache(t);if(void 0!==e)return e}else if(t.matcher(e)){let e=await this._serwist.matchPrecache(t.url);if(void 0!==e)return e}}},ey=class extends Z{async _handle(e,t){let a,s=await t.cacheMatch(e);if(s);else try{s=await t.fetchAndCachePut(e)}catch(e){e instanceof Error&&(a=e)}if(!s)throw new l("no-response",{url:e.url,error:a});return s}},e_=class extends es{constructor(e,t){super(({request:a})=>{let s=e.getUrlsToPrecacheKeys();for(let r of function*(e,{directoryIndex:t="index.html",ignoreURLParametersMatching:a=[/^utm_/,/^fbclid$/],cleanURLs:s=!0,urlManipulation:r}={}){let i=new URL(e,location.href);i.hash="",yield i.href;let n=((e,t=[])=>{for(let a of[...e.searchParams.keys()])t.some(e=>e.test(a))&&e.searchParams.delete(a);return e})(i,a);if(yield n.href,t&&n.pathname.endsWith("/")){let e=new URL(n.href);e.pathname+=t,yield e.href}if(s){let e=new URL(n.href);e.pathname+=".html",yield e.href}if(r)for(let e of r({url:i}))yield e.href}(a.url,t)){let t=s.get(r);if(t)return{cacheKey:t,integrity:e.getIntegrityForPrecacheKey(t)}}},e.precacheStrategy)}},eb=class{_precacheController;constructor({precacheController:e}){this._precacheController=e}cacheKeyWillBeUsed=async({request:e,params:t})=>{let a=t?.cacheKey||this._precacheController.getPrecacheKeyForUrl(e.url);return a?new Request(a,{headers:e.headers}):e}},ev=class{_urlsToCacheKeys=new Map;_urlsToCacheModes=new Map;_cacheKeysToIntegrities=new Map;_concurrentPrecaching;_precacheStrategy;_routes;_defaultHandlerMap;_catchHandler;_requestRules;constructor({precacheEntries:e,precacheOptions:t,skipWaiting:a=!1,importScripts:s,navigationPreload:r=!1,cacheId:n,clientsClaim:o=!1,runtimeCaching:l,offlineAnalyticsConfig:h,disableDevLogs:u=!1,fallbacks:d,requestRules:f}={}){const{precacheStrategyOptions:p,precacheRouteOptions:m,precacheMiscOptions:w}=((e,t={})=>{let{cacheName:a,plugins:s=[],fetchOptions:r,matchOptions:i,fallbackToNetwork:n,directoryIndex:o,ignoreURLParametersMatching:l,cleanURLs:h,urlManipulation:u,cleanupOutdatedCaches:d,concurrency:f=10,navigateFallback:p,navigateFallbackAllowlist:m,navigateFallbackDenylist:w}=t??{};return{precacheStrategyOptions:{cacheName:c(a),plugins:[...s,new eb({precacheController:e})],fetchOptions:r,matchOptions:i,fallbackToNetwork:n},precacheRouteOptions:{directoryIndex:o,ignoreURLParametersMatching:l,cleanURLs:h,urlManipulation:u},precacheMiscOptions:{cleanupOutdatedCaches:d,concurrency:f,navigateFallback:p,navigateFallbackAllowlist:m,navigateFallbackDenylist:w}}})(this,t);if(this._concurrentPrecaching=w.concurrency,this._precacheStrategy=new er(p),this._routes=new Map,this._defaultHandlerMap=new Map,this._requestRules=f,this.handleInstall=this.handleInstall.bind(this),this.handleActivate=this.handleActivate.bind(this),this.handleFetch=this.handleFetch.bind(this),this.handleCache=this.handleCache.bind(this),s&&s.length>0&&self.importScripts(...s),r&&self.registration?.navigationPreload&&self.addEventListener("activate",e=>{e.waitUntil(self.registration.navigationPreload.enable().then(()=>{}))}),void 0!==n&&(e=>{var t=e;for(let e of Object.keys(i))(e=>{let a=t[e];"string"==typeof a&&(i[e]=a)})(e)})({prefix:n}),a?self.skipWaiting():self.addEventListener("message",e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()}),o&&self.addEventListener("activate",()=>self.clients.claim()),e&&e.length>0&&this.addToPrecacheList(e),w.cleanupOutdatedCaches&&(e=>{self.addEventListener("activate",t=>{t.waitUntil(g(c(e)).then(e=>{}))})})(p.cacheName),this.registerRoute(new e_(this,m)),w.navigateFallback&&this.registerRoute(new ei(this.createHandlerBoundToUrl(w.navigateFallback),{allowlist:w.navigateFallbackAllowlist,denylist:w.navigateFallbackDenylist})),void 0!==h&&("boolean"==typeof h?h&&ew({serwist:this}):ew({...h,serwist:this})),void 0!==l){if(void 0!==d){const e=new eg({fallbackUrls:d.entries,serwist:this});l.forEach(t=>{t.handler instanceof Z&&!t.handler.plugins.some(e=>"handlerDidError"in e)&&t.handler.plugins.push(e)})}for(const e of l)this.registerCapture(e.matcher,e.handler,e.method)}u&&(self.__WB_DISABLE_DEV_LOGS=!0)}get precacheStrategy(){return this._precacheStrategy}get routes(){return this._routes}addEventListeners(){self.addEventListener("install",this.handleInstall),self.addEventListener("activate",this.handleActivate),self.addEventListener("fetch",this.handleFetch),self.addEventListener("message",this.handleCache)}addToPrecacheList(e){let t=[];for(let a of e){"string"==typeof a?t.push(a):a&&!a.integrity&&void 0===a.revision&&t.push(a.url);let{cacheKey:e,url:s}=ec(a),r="string"!=typeof a&&a.revision?"reload":"default";if(this._urlsToCacheKeys.has(s)&&this._urlsToCacheKeys.get(s)!==e)throw new l("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(s),secondEntry:e});if("string"!=typeof a&&a.integrity){if(this._cacheKeysToIntegrities.has(e)&&this._cacheKeysToIntegrities.get(e)!==a.integrity)throw new l("add-to-cache-list-conflicting-integrities",{url:s});this._cacheKeysToIntegrities.set(e,a.integrity)}this._urlsToCacheKeys.set(s,e),this._urlsToCacheModes.set(s,r)}t.length>0&&console.warn(`Serwist is precaching URLs without revision info: ${t.join(", ")} -This is generally NOT safe. Learn more at https://bit.ly/wb-precache`)}handleInstall(e){return this.registerRequestRules(e),y(e,async()=>{let t=new eo;this.precacheStrategy.plugins.push(t),await el(this._concurrentPrecaching,Array.from(this._urlsToCacheKeys.entries()),async([t,a])=>{let s=this._cacheKeysToIntegrities.get(a),r=this._urlsToCacheModes.get(t),i=new Request(t,{integrity:s,cache:r,credentials:"same-origin"});await Promise.all(this.precacheStrategy.handleAll({event:e,request:i,url:new URL(i.url),params:{cacheKey:a}}))});let{updatedURLs:a,notUpdatedURLs:s}=t;return{updatedURLs:a,notUpdatedURLs:s}})}async registerRequestRules(e){if(this._requestRules&&e?.addRoutes)try{await e.addRoutes(this._requestRules),this._requestRules=void 0}catch(e){throw e}}handleActivate(e){return y(e,async()=>{let e=await self.caches.open(this.precacheStrategy.cacheName),t=await e.keys(),a=new Set(this._urlsToCacheKeys.values()),s=[];for(let r of t)a.has(r.url)||(await e.delete(r),s.push(r.url));return{deletedCacheRequests:s}})}handleFetch(e){let{request:t}=e,a=this.handleRequest({request:t,event:e});a&&e.respondWith(a)}handleCache(e){if(e.data&&"CACHE_URLS"===e.data.type){let{payload:t}=e.data,a=Promise.all(t.urlsToCache.map(t=>{let a;return a="string"==typeof t?new Request(t):new Request(...t),this.handleRequest({request:a,event:e})}));e.waitUntil(a),e.ports?.[0]&&a.then(()=>e.ports[0].postMessage(!0))}}setDefaultHandler(e,t="GET"){this._defaultHandlerMap.set(t,ea(e))}setCatchHandler(e){this._catchHandler=ea(e)}registerCapture(e,t,a){let s=((e,t,a)=>{if("string"==typeof e){let s=new URL(e,location.href);return new es(({url:e})=>e.href===s.href,t,a)}if(e instanceof RegExp)return new en(e,t,a);if("function"==typeof e)return new es(e,t,a);if(e instanceof es)return e;throw new l("unsupported-route-type",{moduleName:"serwist",funcName:"parseRoute",paramName:"capture"})})(e,t,a);return this.registerRoute(s),s}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new l("unregister-route-but-not-found-with-method",{method:e.method});let t=this._routes.get(e.method).indexOf(e);if(t>-1)this._routes.get(e.method).splice(t,1);else throw new l("unregister-route-route-not-registered")}getUrlsToPrecacheKeys(){return this._urlsToCacheKeys}getPrecachedUrls(){return[...this._urlsToCacheKeys.keys()]}getPrecacheKeyForUrl(e){let t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForPrecacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){let t=e instanceof Request?e.url:e,a=this.getPrecacheKeyForUrl(t);if(a)return(await self.caches.open(this.precacheStrategy.cacheName)).match(a)}createHandlerBoundToUrl(e){let t=this.getPrecacheKeyForUrl(e);if(!t)throw new l("non-precached-url",{url:e});return a=>(a.request=new Request(e),a.params={cacheKey:t,...a.params},this.precacheStrategy.handle(a))}handleRequest({request:e,event:t}){let a,s=new URL(e.url,location.href);if(!s.protocol.startsWith("http"))return;let r=s.origin===location.origin,{params:i,route:n}=this.findMatchingRoute({event:t,request:e,sameOrigin:r,url:s}),c=n?.handler,o=e.method;if(!c&&this._defaultHandlerMap.has(o)&&(c=this._defaultHandlerMap.get(o)),!c)return;try{a=c.handle({url:s,request:e,event:t,params:i})}catch(e){a=Promise.reject(e)}let l=n?.catchHandler;return a instanceof Promise&&(this._catchHandler||l)&&(a=a.catch(async a=>{if(l)try{return await l.handle({url:s,request:e,event:t,params:i})}catch(e){e instanceof Error&&(a=e)}if(this._catchHandler)return this._catchHandler.handle({url:s,request:e,event:t});throw a})),a}findMatchingRoute({url:e,sameOrigin:t,request:a,event:s}){for(let r of this._routes.get(a.method)||[]){let i,n=r.match({url:e,sameOrigin:t,request:a,event:s});if(n)return Array.isArray(i=n)&&0===i.length||n.constructor===Object&&0===Object.keys(n).length?i=void 0:"boolean"==typeof n&&(i=void 0),{route:r,params:i}}return{}}};let eR="/offline",eE=["pages","api-responses","next-static","static-media","fallback","offline-fallback"],eq=[{matcher:({url:e,sameOrigin:t})=>t&&e.pathname.startsWith("/api/"),handler:new ee({cacheName:"api-responses",networkTimeoutSeconds:5,plugins:[new ep({maxEntries:100,maxAgeSeconds:3600})]})},{matcher:({request:e})=>"navigate"===e.mode,handler:new ee({cacheName:"pages",networkTimeoutSeconds:5,plugins:[new ep({maxEntries:50,maxAgeSeconds:86400}),{handlerDidError:async()=>await caches.match(eR)||Response.error()}]})},{matcher:({url:e,sameOrigin:t})=>t&&e.pathname.startsWith("/_next/static/"),handler:new ey({cacheName:"next-static",plugins:[new ep({maxEntries:200,maxAgeSeconds:2592e3})]})},{matcher:({url:e})=>e.pathname.startsWith("/images/")||e.pathname.startsWith("/icons/")||/\.(?:png|jpe?g|gif|svg|webp|ico|woff2?)$/.test(e.pathname),handler:new ey({cacheName:"static-media",plugins:[new ep({maxEntries:100,maxAgeSeconds:2592e3})]})},{matcher:()=>!0,handler:new ee({cacheName:"fallback",networkTimeoutSeconds:5,plugins:[new ep({maxEntries:50,maxAgeSeconds:86400})]})}];new ev({precacheEntries:[{'revision':'f782881382efdee04951fb8fda52f691','url':'/_next/static/AAG__QkujHLyFLqyxgBSB/_buildManifest.js'},{'revision':'b6652df95db52feb4daf4eca35380933','url':'/_next/static/AAG__QkujHLyFLqyxgBSB/_ssgManifest.js'},{'revision':null,'url':'/_next/static/chunks/1079-304a546a4a673437.js'},{'revision':null,'url':'/_next/static/chunks/1896-359ed2e68a8c4f1d.js'},{'revision':null,'url':'/_next/static/chunks/1958-56cbbb8dba15fd2f.js'},{'revision':null,'url':'/_next/static/chunks/2004-a5d4899ef0da0bd8.js'},{'revision':null,'url':'/_next/static/chunks/2346-36e36720a5f6591a.js'},{'revision':null,'url':'/_next/static/chunks/4180-ed9d37a89d0dc424.js'},{'revision':null,'url':'/_next/static/chunks/4bd1b696-e356ca5ba0218e27.js'},{'revision':null,'url':'/_next/static/chunks/52774a7f.f2ab7a9b4b8ba576.js'},{'revision':null,'url':'/_next/static/chunks/5838-7e0aa455e9f24259.js'},{'revision':null,'url':'/_next/static/chunks/7363-209a1a709d8f324d.js'},{'revision':null,'url':'/_next/static/chunks/7602.2868ff821d53ee09.js'},{'revision':null,'url':'/_next/static/chunks/7918-9cfe56e3ee27ed27.js'},{'revision':null,'url':'/_next/static/chunks/8500-f62a38ff68ab7f42.js'},{'revision':null,'url':'/_next/static/chunks/9da6db1e-9623f3245f088d02.js'},{'revision':null,'url':'/_next/static/chunks/app/_global-error/page-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/_not-found/page-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/about/page-072b5f07665fa274.js'},{'revision':null,'url':'/_next/static/chunks/app/account/page-9300f08c33aa8887.js'},{'revision':null,'url':'/_next/static/chunks/app/admin/page-b3b6af59ae9681bb.js'},{'revision':null,'url':'/_next/static/chunks/app/api/accuracy/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/admin/stats/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/books/%5B...path%5D/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/checkout/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/content/%5B...path%5D/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/gamelines/%5Bsport%5D/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/games/%5Bid%5D/props/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/games/%5Bid%5D/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/games/tonight/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/hero-prop/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/hotlist/%5Bsport%5D/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/intelligence/feed/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/ledger/accuracy/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/ledger/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/lines/%5B...path%5D/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/odds/mlb/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/odds/nba/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/odds/soccer/%5Bleague%5D/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/odds/wnba/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/parlay/add-leg/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/parlay/calculate/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/parlay/grade/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/players/search/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/preferences/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/props/live/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/props/most-parlayed/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/props/top-graded/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/scan/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/schedule/%5Bsport%5D/pitchers/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/schedule/%5Bsport%5D/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/snapshot/%5Bsport%5D/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/stats/cascade/%5Bplayer%5D/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/stats/depth/%5Bteam%5D/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/stats/leaders/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/stats/lineup/%5Bteam%5D/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/stats/parlays-graded/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/stats/player/%5Bname%5D/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/stats/public/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/streaks/%5Bsport%5D/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/team/%5Babbr%5D/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/ticker/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/user/profile/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/user/recent-scans/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/user/scans/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/waitlist/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/webhook/nexapay/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/welcome-email/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/auth/callback/page-e6df9771a50edb87.js'},{'revision':null,'url':'/_next/static/chunks/app/blog/%5Bslug%5D/page-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/blog/page-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/compare/page-5e631b0c698c6f5f.js'},{'revision':null,'url':'/_next/static/chunks/app/dashboard/page-62cd345aa56e5baa.js'},{'revision':null,'url':'/_next/static/chunks/app/explore/page-8856c642532e2773.js'},{'revision':null,'url':'/_next/static/chunks/app/forgot-password/page-a251f52b4206e8d1.js'},{'revision':null,'url':'/_next/static/chunks/app/game/%5Bid%5D/page-3d020b802c020ad8.js'},{'revision':null,'url':'/_next/static/chunks/app/help/page-03c6534f006d09da.js'},{'revision':null,'url':'/_next/static/chunks/app/intelligence/page-772d69c9ecfe1503.js'},{'revision':null,'url':'/_next/static/chunks/app/invite/page-e1e3f46af5f1e44b.js'},{'revision':null,'url':'/_next/static/chunks/app/layout-03d79648328d9ec1.js'},{'revision':null,'url':'/_next/static/chunks/app/ledger/page-47459e4f664b707a.js'},{'revision':null,'url':'/_next/static/chunks/app/login/page-e75dd5939a169485.js'},{'revision':null,'url':'/_next/static/chunks/app/marketplace/page-cbada49ae96a7527.js'},{'revision':null,'url':'/_next/static/chunks/app/not-found-6cf954604c0add96.js'},{'revision':null,'url':'/_next/static/chunks/app/notifications/page-072b5f07665fa274.js'},{'revision':null,'url':'/_next/static/chunks/app/offline/page-a7a57ff039afc1af.js'},{'revision':null,'url':'/_next/static/chunks/app/onboarding/page-3483923fb16d41ff.js'},{'revision':null,'url':'/_next/static/chunks/app/opengraph-image/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/page-5fcb06eec53c778e.js'},{'revision':null,'url':'/_next/static/chunks/app/player/%5Bname%5D/page-a9a1a22752478255.js'},{'revision':null,'url':'/_next/static/chunks/app/pricing/page-5b9fc1cee887f2d3.js'},{'revision':null,'url':'/_next/static/chunks/app/privacy/page-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/profile/page-d607627acb1b73ab.js'},{'revision':null,'url':'/_next/static/chunks/app/report/page-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/responsible-gambling/page-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/scan/page-fa0499b15c4e8210.js'},{'revision':null,'url':'/_next/static/chunks/app/settings/page-eea60cdbf9380312.js'},{'revision':null,'url':'/_next/static/chunks/app/settings/security/page-697d02aa2d05cf7e.js'},{'revision':null,'url':'/_next/static/chunks/app/signup/page-f429c5ddc836e247.js'},{'revision':null,'url':'/_next/static/chunks/app/soccer/page-5a64e650908111d7.js'},{'revision':null,'url':'/_next/static/chunks/app/team/%5Babbr%5D/page-9ab56fcb07ae8687.js'},{'revision':null,'url':'/_next/static/chunks/app/terminal/page-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/terms/page-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/tracker/page-e23baec2b3735bb1.js'},{'revision':null,'url':'/_next/static/chunks/app/twitter-image/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/upgrade/cancel/page-3702e818a6853705.js'},{'revision':null,'url':'/_next/static/chunks/app/upgrade/desk/page-b88c47031c7d7d63.js'},{'revision':null,'url':'/_next/static/chunks/app/upgrade/success/page-ea358cb8f714f1ea.js'},{'revision':null,'url':'/_next/static/chunks/app/verify/page-9df376f065215168.js'},{'revision':null,'url':'/_next/static/chunks/app/welcome/page-259277230533599f.js'},{'revision':null,'url':'/_next/static/chunks/framework-95da69ac6843d788.js'},{'revision':null,'url':'/_next/static/chunks/main-a354262253293123.js'},{'revision':null,'url':'/_next/static/chunks/main-app-4231d5f500f33972.js'},{'revision':null,'url':'/_next/static/chunks/next/dist/client/components/builtin/app-error-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/next/dist/client/components/builtin/forbidden-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/next/dist/client/components/builtin/global-error-756d787dba63aa4d.js'},{'revision':null,'url':'/_next/static/chunks/next/dist/client/components/builtin/unauthorized-7eb567e5889fc982.js'},{'revision':'846118c33b2c0e922d7b3a7676f81f6f','url':'/_next/static/chunks/polyfills-42372ed130431b0a.js'},{'revision':null,'url':'/_next/static/chunks/webpack-42b9616650231776.js'},{'revision':null,'url':'/_next/static/css/6ee3c69ef5f8952b.css'},{'revision':'cd34c7793d9776838308cfbe5d93922b','url':'/_next/static/media/011e180705008d6f-s.woff2'},{'revision':'324703f03c390d2e2a4f387de85fe63d','url':'/_next/static/media/0aa834ed78bf6d07-s.woff2'},{'revision':'9dda5cfc9a46f256d0e131bb535e46f8','url':'/_next/static/media/19cfc7226ec3afaa-s.woff2'},{'revision':'7de6d31e5076eb437418b6e01998ee12','url':'/_next/static/media/20535187d867b7b9-s.woff2'},{'revision':'4e2553027f1d60eff32898367dd4d541','url':'/_next/static/media/21350d82a1f187e9-s.woff2'},{'revision':'0d11e07b5aaafda6ae2efc53256932ec','url':'/_next/static/media/37786be940ec402b-s.p.woff2'},{'revision':'5de0bff80f9f432b5cf52c1c2f80fe20','url':'/_next/static/media/46e154b2fcbd6033-s.woff2'},{'revision':'6041b3192dc3e1a50141d5d418a24199','url':'/_next/static/media/5356a6a4f2c8c8d8-s.woff2'},{'revision':'f572f7b57d27ec7fd8373961f0b762b0','url':'/_next/static/media/58f386aa6b1a2a92-s.woff2'},{'revision':'e829cbe042e8b2b2e6b99c0eec9e230d','url':'/_next/static/media/656feb427634a431-s.woff2'},{'revision':'54f02056e07c55023315568c637e3a96','url':'/_next/static/media/67957d42bae0796d-s.woff2'},{'revision':'e220ad1849c282590e47db0ff88fc3f3','url':'/_next/static/media/704b853f32d191d5-s.woff2'},{'revision':'662cde3543f3375874e26c26845cec22','url':'/_next/static/media/73cb51aac9c97f90-s.woff2'},{'revision':'afac1fab355fe8db5c2dcaa7623dffb3','url':'/_next/static/media/7ba5fb2a8c88521c-s.woff2'},{'revision':'c94e6e6c23e789fcb0fc60d790c9d2c1','url':'/_next/static/media/886030b0b59bc5a7-s.woff2'},{'revision':'01ba6c2a184b8cba08b0d57167664d75','url':'/_next/static/media/8e9860b6e62d6359-s.woff2'},{'revision':'17a5b2a15bf5647b49cadb9a3bb02e1c','url':'/_next/static/media/92eeb95d069020cc-s.woff2'},{'revision':'4a4e74bed5809194e4bc6538eb1a1e30','url':'/_next/static/media/939c4f875ee75fbb-s.woff2'},{'revision':'6708425c446b05de1c2d471a0eaf4099','url':'/_next/static/media/98e207f02528a563-s.p.woff2'},{'revision':'13dface50f6dc0bff1015561c84119e6','url':'/_next/static/media/991629005c80bdf1-s.woff2'},{'revision':'216ee1a35b060106ed2852cdd8c026c7','url':'/_next/static/media/99dcf268bda04fe5-s.woff2'},{'revision':'9e494903d6b0ffec1a1e14d34427d44d','url':'/_next/static/media/ba9851c3c22cd980-s.woff2'},{'revision':'782150e6836b9b074d1a798807adcb18','url':'/_next/static/media/bb3ef058b751a6ad-s.p.woff2'},{'revision':'027a89e9ab733a145db70f09b8a18b42','url':'/_next/static/media/c5fe6dc8356a8c31-s.woff2'},{'revision':'75fa2e527eaae805bbf44e3378d1232c','url':'/_next/static/media/d26bbd13d6b70f89-s.woff2'},{'revision':'0ba762bde65aaa682fcc089f8c57288e','url':'/_next/static/media/d29838c109ef09b4-s.woff2'},{'revision':'814fe1615d4dbc7bbd92d26a6bda0905','url':'/_next/static/media/d3ebbfd689654d3a-s.p.woff2'},{'revision':'e71a597e376ed91862e822b5a5de8c04','url':'/_next/static/media/db96af6b531dc71f-s.p.woff2'},{'revision':'d54db44de5ccb18886ece2fda72bdfe0','url':'/_next/static/media/df0a9ae256c0569c-s.woff2'},{'revision':'9fb609fe01d739bb9df558e1fba2498e','url':'/_next/static/media/e40af3453d7c920a-s.woff2'},{'revision':'65850a373e258f1c897a2b3d75eb74de','url':'/_next/static/media/e4af272ccee01ff0-s.p.woff2'},{'revision':'de1d49f26130d43f91829088086625f4','url':'/_next/static/media/ef4d5661765d0e49-s.woff2'},{'revision':'0f8d347d49960d05c9430d83e49edeb7','url':'/_next/static/media/f911b923c6adde36-s.woff2'},{'revision':'d7bc0f63f9618b8b700d028d7d242de8','url':'/apple-touch-icon.png'},{'revision':'5616f81ec5f8a9f726a17fb7ac66a54a','url':'/favicon-16.png'},{'revision':'1fc285cfb0116a0523eb34c779a7d282','url':'/favicon-32.png'},{'revision':'583b034f36839a8af92841771eef38b6','url':'/favicon.ico'},{'revision':'b15795128b3691e5703d0ce14ce10827','url':'/favicon.png'},{'revision':'44e9d71551be13574ac2e10063d03aa9','url':'/favicon.svg'},{'revision':'252b8f8c4d0f64c7cd120f182a6c74ab','url':'/icon-192.png'},{'revision':'3e3b53bbd210bd772b36b70165657e7c','url':'/icon-512.png'},{'revision':'252b8f8c4d0f64c7cd120f182a6c74ab','url':'/icons/icon-192.png'},{'revision':'3e3b53bbd210bd772b36b70165657e7c','url':'/icons/icon-512.png'},{'revision':'3e3b53bbd210bd772b36b70165657e7c','url':'/icons/icon-maskable-512.png'},{'revision':'bf670b1fafa1b3127bd50abe86d723b9','url':'/images/player-silhouette.svg'},{'revision':'d692f690fbd1564f090131e02be5ba9c','url':'/manifest.json'},{'revision':'9f61cf51298661d5c57a782534216240','url':'/og-image.png'},{'revision':'7c759c20b35840eacf9344692cb51061','url':'/og-image.svg'},{'revision':'9327802333275f11e68c3f19f20c160d','url':'/widget.js'}],skipWaiting:!0,clientsClaim:!0,navigationPreload:!0,runtimeCaching:eq}).addEventListeners(),self.addEventListener("install",e=>{e.waitUntil(caches.open("offline-fallback").then(e=>e.add(eR)).catch(()=>{}))}),self.addEventListener("activate",e=>{e.waitUntil(caches.keys().then(e=>Promise.all(e.filter(e=>!eE.includes(e)&&!e.startsWith("serwist")).map(e=>(console.log("[SW] deleting stale cache:",e),caches.delete(e))))))}),self.addEventListener("push",e=>{let t;if(!e.data)return;try{t=e.data.json()}catch{t={title:"VYNDR",body:e.data.text()}}let{title:a="VYNDR",body:s="",icon:r="/icons/icon-192.png",url:i="/",tag:n="vyndr-notification"}=t;e.waitUntil(self.registration.showNotification(a,{body:s,icon:r,badge:"/icons/icon-192.png",tag:n,data:{url:i}}))}),self.addEventListener("notificationclick",e=>{e.notification.close();let t=e.notification.data?.url??"/";e.waitUntil(self.clients.matchAll({type:"window",includeUncontrolled:!0}).then(e=>{let a=e.find(e=>e.url.endsWith(t));return a?a.focus():self.clients.openWindow(t)}))})})(); \ No newline at end of file +This is generally NOT safe. Learn more at https://bit.ly/wb-precache`)}handleInstall(e){return this.registerRequestRules(e),y(e,async()=>{let t=new eo;this.precacheStrategy.plugins.push(t),await el(this._concurrentPrecaching,Array.from(this._urlsToCacheKeys.entries()),async([t,a])=>{let s=this._cacheKeysToIntegrities.get(a),r=this._urlsToCacheModes.get(t),i=new Request(t,{integrity:s,cache:r,credentials:"same-origin"});await Promise.all(this.precacheStrategy.handleAll({event:e,request:i,url:new URL(i.url),params:{cacheKey:a}}))});let{updatedURLs:a,notUpdatedURLs:s}=t;return{updatedURLs:a,notUpdatedURLs:s}})}async registerRequestRules(e){if(this._requestRules&&e?.addRoutes)try{await e.addRoutes(this._requestRules),this._requestRules=void 0}catch(e){throw e}}handleActivate(e){return y(e,async()=>{let e=await self.caches.open(this.precacheStrategy.cacheName),t=await e.keys(),a=new Set(this._urlsToCacheKeys.values()),s=[];for(let r of t)a.has(r.url)||(await e.delete(r),s.push(r.url));return{deletedCacheRequests:s}})}handleFetch(e){let{request:t}=e,a=this.handleRequest({request:t,event:e});a&&e.respondWith(a)}handleCache(e){if(e.data&&"CACHE_URLS"===e.data.type){let{payload:t}=e.data,a=Promise.all(t.urlsToCache.map(t=>{let a;return a="string"==typeof t?new Request(t):new Request(...t),this.handleRequest({request:a,event:e})}));e.waitUntil(a),e.ports?.[0]&&a.then(()=>e.ports[0].postMessage(!0))}}setDefaultHandler(e,t="GET"){this._defaultHandlerMap.set(t,ea(e))}setCatchHandler(e){this._catchHandler=ea(e)}registerCapture(e,t,a){let s=((e,t,a)=>{if("string"==typeof e){let s=new URL(e,location.href);return new es(({url:e})=>e.href===s.href,t,a)}if(e instanceof RegExp)return new en(e,t,a);if("function"==typeof e)return new es(e,t,a);if(e instanceof es)return e;throw new l("unsupported-route-type",{moduleName:"serwist",funcName:"parseRoute",paramName:"capture"})})(e,t,a);return this.registerRoute(s),s}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new l("unregister-route-but-not-found-with-method",{method:e.method});let t=this._routes.get(e.method).indexOf(e);if(t>-1)this._routes.get(e.method).splice(t,1);else throw new l("unregister-route-route-not-registered")}getUrlsToPrecacheKeys(){return this._urlsToCacheKeys}getPrecachedUrls(){return[...this._urlsToCacheKeys.keys()]}getPrecacheKeyForUrl(e){let t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForPrecacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){let t=e instanceof Request?e.url:e,a=this.getPrecacheKeyForUrl(t);if(a)return(await self.caches.open(this.precacheStrategy.cacheName)).match(a)}createHandlerBoundToUrl(e){let t=this.getPrecacheKeyForUrl(e);if(!t)throw new l("non-precached-url",{url:e});return a=>(a.request=new Request(e),a.params={cacheKey:t,...a.params},this.precacheStrategy.handle(a))}handleRequest({request:e,event:t}){let a,s=new URL(e.url,location.href);if(!s.protocol.startsWith("http"))return;let r=s.origin===location.origin,{params:i,route:n}=this.findMatchingRoute({event:t,request:e,sameOrigin:r,url:s}),c=n?.handler,o=e.method;if(!c&&this._defaultHandlerMap.has(o)&&(c=this._defaultHandlerMap.get(o)),!c)return;try{a=c.handle({url:s,request:e,event:t,params:i})}catch(e){a=Promise.reject(e)}let l=n?.catchHandler;return a instanceof Promise&&(this._catchHandler||l)&&(a=a.catch(async a=>{if(l)try{return await l.handle({url:s,request:e,event:t,params:i})}catch(e){e instanceof Error&&(a=e)}if(this._catchHandler)return this._catchHandler.handle({url:s,request:e,event:t});throw a})),a}findMatchingRoute({url:e,sameOrigin:t,request:a,event:s}){for(let r of this._routes.get(a.method)||[]){let i,n=r.match({url:e,sameOrigin:t,request:a,event:s});if(n)return Array.isArray(i=n)&&0===i.length||n.constructor===Object&&0===Object.keys(n).length?i=void 0:"boolean"==typeof n&&(i=void 0),{route:r,params:i}}return{}}};let eR="/offline",eE=["pages","api-responses","next-static","static-media","fallback","offline-fallback"],eq=[{matcher:({url:e,sameOrigin:t})=>t&&e.pathname.startsWith("/api/"),handler:new ee({cacheName:"api-responses",networkTimeoutSeconds:5,plugins:[new ep({maxEntries:100,maxAgeSeconds:3600})]})},{matcher:({request:e})=>"navigate"===e.mode,handler:new ee({cacheName:"pages",networkTimeoutSeconds:5,plugins:[new ep({maxEntries:50,maxAgeSeconds:86400}),{handlerDidError:async()=>await caches.match(eR)||Response.error()}]})},{matcher:({url:e,sameOrigin:t})=>t&&e.pathname.startsWith("/_next/static/"),handler:new ey({cacheName:"next-static",plugins:[new ep({maxEntries:200,maxAgeSeconds:2592e3})]})},{matcher:({url:e})=>e.pathname.startsWith("/images/")||e.pathname.startsWith("/icons/")||/\.(?:png|jpe?g|gif|svg|webp|ico|woff2?)$/.test(e.pathname),handler:new ey({cacheName:"static-media",plugins:[new ep({maxEntries:100,maxAgeSeconds:2592e3})]})},{matcher:()=>!0,handler:new ee({cacheName:"fallback",networkTimeoutSeconds:5,plugins:[new ep({maxEntries:50,maxAgeSeconds:86400})]})}];new ev({precacheEntries:[{'revision':null,'url':'/_next/static/chunks/1079-304a546a4a673437.js'},{'revision':null,'url':'/_next/static/chunks/1896-359ed2e68a8c4f1d.js'},{'revision':null,'url':'/_next/static/chunks/1958-56cbbb8dba15fd2f.js'},{'revision':null,'url':'/_next/static/chunks/2004-a5d4899ef0da0bd8.js'},{'revision':null,'url':'/_next/static/chunks/2346-36e36720a5f6591a.js'},{'revision':null,'url':'/_next/static/chunks/4180-ed9d37a89d0dc424.js'},{'revision':null,'url':'/_next/static/chunks/4bd1b696-e356ca5ba0218e27.js'},{'revision':null,'url':'/_next/static/chunks/52774a7f.f2ab7a9b4b8ba576.js'},{'revision':null,'url':'/_next/static/chunks/5838-7e0aa455e9f24259.js'},{'revision':null,'url':'/_next/static/chunks/7363-209a1a709d8f324d.js'},{'revision':null,'url':'/_next/static/chunks/7602.2868ff821d53ee09.js'},{'revision':null,'url':'/_next/static/chunks/7918-9cfe56e3ee27ed27.js'},{'revision':null,'url':'/_next/static/chunks/8500-f62a38ff68ab7f42.js'},{'revision':null,'url':'/_next/static/chunks/9da6db1e-9623f3245f088d02.js'},{'revision':null,'url':'/_next/static/chunks/app/_global-error/page-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/_not-found/page-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/about/page-072b5f07665fa274.js'},{'revision':null,'url':'/_next/static/chunks/app/account/page-9300f08c33aa8887.js'},{'revision':null,'url':'/_next/static/chunks/app/admin/page-b3b6af59ae9681bb.js'},{'revision':null,'url':'/_next/static/chunks/app/api/accuracy/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/admin/stats/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/books/%5B...path%5D/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/checkout/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/content/%5B...path%5D/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/gamelines/%5Bsport%5D/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/games/%5Bid%5D/props/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/games/%5Bid%5D/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/games/tonight/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/hero-prop/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/hotlist/%5Bsport%5D/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/intelligence/feed/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/ledger/accuracy/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/ledger/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/lines/%5B...path%5D/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/odds/mlb/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/odds/nba/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/odds/soccer/%5Bleague%5D/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/odds/wnba/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/parlay/add-leg/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/parlay/calculate/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/parlay/grade/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/players/search/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/preferences/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/props/live/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/props/most-parlayed/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/props/top-graded/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/scan/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/schedule/%5Bsport%5D/pitchers/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/schedule/%5Bsport%5D/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/snapshot/%5Bsport%5D/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/stats/cascade/%5Bplayer%5D/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/stats/depth/%5Bteam%5D/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/stats/leaders/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/stats/lineup/%5Bteam%5D/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/stats/parlays-graded/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/stats/player/%5Bname%5D/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/stats/public/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/streaks/%5Bsport%5D/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/team/%5Babbr%5D/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/ticker/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/user/profile/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/user/recent-scans/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/user/scans/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/waitlist/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/webhook/nexapay/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/api/welcome-email/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/auth/callback/page-e6df9771a50edb87.js'},{'revision':null,'url':'/_next/static/chunks/app/blog/%5Bslug%5D/page-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/blog/page-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/compare/page-5e631b0c698c6f5f.js'},{'revision':null,'url':'/_next/static/chunks/app/dashboard/page-62cd345aa56e5baa.js'},{'revision':null,'url':'/_next/static/chunks/app/explore/page-8856c642532e2773.js'},{'revision':null,'url':'/_next/static/chunks/app/forgot-password/page-a251f52b4206e8d1.js'},{'revision':null,'url':'/_next/static/chunks/app/game/%5Bid%5D/page-3d020b802c020ad8.js'},{'revision':null,'url':'/_next/static/chunks/app/help/page-03c6534f006d09da.js'},{'revision':null,'url':'/_next/static/chunks/app/intelligence/page-772d69c9ecfe1503.js'},{'revision':null,'url':'/_next/static/chunks/app/invite/page-e1e3f46af5f1e44b.js'},{'revision':null,'url':'/_next/static/chunks/app/layout-03d79648328d9ec1.js'},{'revision':null,'url':'/_next/static/chunks/app/ledger/page-47459e4f664b707a.js'},{'revision':null,'url':'/_next/static/chunks/app/login/page-e75dd5939a169485.js'},{'revision':null,'url':'/_next/static/chunks/app/marketplace/page-cbada49ae96a7527.js'},{'revision':null,'url':'/_next/static/chunks/app/not-found-6cf954604c0add96.js'},{'revision':null,'url':'/_next/static/chunks/app/notifications/page-072b5f07665fa274.js'},{'revision':null,'url':'/_next/static/chunks/app/offline/page-a7a57ff039afc1af.js'},{'revision':null,'url':'/_next/static/chunks/app/onboarding/page-3483923fb16d41ff.js'},{'revision':null,'url':'/_next/static/chunks/app/opengraph-image/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/page-5fcb06eec53c778e.js'},{'revision':null,'url':'/_next/static/chunks/app/player/%5Bname%5D/page-a9a1a22752478255.js'},{'revision':null,'url':'/_next/static/chunks/app/pricing/page-5b9fc1cee887f2d3.js'},{'revision':null,'url':'/_next/static/chunks/app/privacy/page-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/profile/page-d607627acb1b73ab.js'},{'revision':null,'url':'/_next/static/chunks/app/report/page-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/responsible-gambling/page-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/scan/page-fa0499b15c4e8210.js'},{'revision':null,'url':'/_next/static/chunks/app/settings/page-eea60cdbf9380312.js'},{'revision':null,'url':'/_next/static/chunks/app/settings/security/page-697d02aa2d05cf7e.js'},{'revision':null,'url':'/_next/static/chunks/app/signup/page-f429c5ddc836e247.js'},{'revision':null,'url':'/_next/static/chunks/app/soccer/page-5a64e650908111d7.js'},{'revision':null,'url':'/_next/static/chunks/app/team/%5Babbr%5D/page-9ab56fcb07ae8687.js'},{'revision':null,'url':'/_next/static/chunks/app/terminal/page-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/terms/page-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/tracker/page-e23baec2b3735bb1.js'},{'revision':null,'url':'/_next/static/chunks/app/twitter-image/route-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/app/upgrade/cancel/page-3702e818a6853705.js'},{'revision':null,'url':'/_next/static/chunks/app/upgrade/desk/page-b88c47031c7d7d63.js'},{'revision':null,'url':'/_next/static/chunks/app/upgrade/success/page-ea358cb8f714f1ea.js'},{'revision':null,'url':'/_next/static/chunks/app/verify/page-9df376f065215168.js'},{'revision':null,'url':'/_next/static/chunks/app/welcome/page-259277230533599f.js'},{'revision':null,'url':'/_next/static/chunks/framework-95da69ac6843d788.js'},{'revision':null,'url':'/_next/static/chunks/main-a354262253293123.js'},{'revision':null,'url':'/_next/static/chunks/main-app-4231d5f500f33972.js'},{'revision':null,'url':'/_next/static/chunks/next/dist/client/components/builtin/app-error-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/next/dist/client/components/builtin/forbidden-7eb567e5889fc982.js'},{'revision':null,'url':'/_next/static/chunks/next/dist/client/components/builtin/global-error-756d787dba63aa4d.js'},{'revision':null,'url':'/_next/static/chunks/next/dist/client/components/builtin/unauthorized-7eb567e5889fc982.js'},{'revision':'846118c33b2c0e922d7b3a7676f81f6f','url':'/_next/static/chunks/polyfills-42372ed130431b0a.js'},{'revision':null,'url':'/_next/static/chunks/webpack-42b9616650231776.js'},{'revision':null,'url':'/_next/static/css/6ee3c69ef5f8952b.css'},{'revision':'cd34c7793d9776838308cfbe5d93922b','url':'/_next/static/media/011e180705008d6f-s.woff2'},{'revision':'324703f03c390d2e2a4f387de85fe63d','url':'/_next/static/media/0aa834ed78bf6d07-s.woff2'},{'revision':'9dda5cfc9a46f256d0e131bb535e46f8','url':'/_next/static/media/19cfc7226ec3afaa-s.woff2'},{'revision':'7de6d31e5076eb437418b6e01998ee12','url':'/_next/static/media/20535187d867b7b9-s.woff2'},{'revision':'4e2553027f1d60eff32898367dd4d541','url':'/_next/static/media/21350d82a1f187e9-s.woff2'},{'revision':'0d11e07b5aaafda6ae2efc53256932ec','url':'/_next/static/media/37786be940ec402b-s.p.woff2'},{'revision':'5de0bff80f9f432b5cf52c1c2f80fe20','url':'/_next/static/media/46e154b2fcbd6033-s.woff2'},{'revision':'6041b3192dc3e1a50141d5d418a24199','url':'/_next/static/media/5356a6a4f2c8c8d8-s.woff2'},{'revision':'f572f7b57d27ec7fd8373961f0b762b0','url':'/_next/static/media/58f386aa6b1a2a92-s.woff2'},{'revision':'e829cbe042e8b2b2e6b99c0eec9e230d','url':'/_next/static/media/656feb427634a431-s.woff2'},{'revision':'54f02056e07c55023315568c637e3a96','url':'/_next/static/media/67957d42bae0796d-s.woff2'},{'revision':'e220ad1849c282590e47db0ff88fc3f3','url':'/_next/static/media/704b853f32d191d5-s.woff2'},{'revision':'662cde3543f3375874e26c26845cec22','url':'/_next/static/media/73cb51aac9c97f90-s.woff2'},{'revision':'afac1fab355fe8db5c2dcaa7623dffb3','url':'/_next/static/media/7ba5fb2a8c88521c-s.woff2'},{'revision':'c94e6e6c23e789fcb0fc60d790c9d2c1','url':'/_next/static/media/886030b0b59bc5a7-s.woff2'},{'revision':'01ba6c2a184b8cba08b0d57167664d75','url':'/_next/static/media/8e9860b6e62d6359-s.woff2'},{'revision':'17a5b2a15bf5647b49cadb9a3bb02e1c','url':'/_next/static/media/92eeb95d069020cc-s.woff2'},{'revision':'4a4e74bed5809194e4bc6538eb1a1e30','url':'/_next/static/media/939c4f875ee75fbb-s.woff2'},{'revision':'6708425c446b05de1c2d471a0eaf4099','url':'/_next/static/media/98e207f02528a563-s.p.woff2'},{'revision':'13dface50f6dc0bff1015561c84119e6','url':'/_next/static/media/991629005c80bdf1-s.woff2'},{'revision':'216ee1a35b060106ed2852cdd8c026c7','url':'/_next/static/media/99dcf268bda04fe5-s.woff2'},{'revision':'9e494903d6b0ffec1a1e14d34427d44d','url':'/_next/static/media/ba9851c3c22cd980-s.woff2'},{'revision':'782150e6836b9b074d1a798807adcb18','url':'/_next/static/media/bb3ef058b751a6ad-s.p.woff2'},{'revision':'027a89e9ab733a145db70f09b8a18b42','url':'/_next/static/media/c5fe6dc8356a8c31-s.woff2'},{'revision':'75fa2e527eaae805bbf44e3378d1232c','url':'/_next/static/media/d26bbd13d6b70f89-s.woff2'},{'revision':'0ba762bde65aaa682fcc089f8c57288e','url':'/_next/static/media/d29838c109ef09b4-s.woff2'},{'revision':'814fe1615d4dbc7bbd92d26a6bda0905','url':'/_next/static/media/d3ebbfd689654d3a-s.p.woff2'},{'revision':'e71a597e376ed91862e822b5a5de8c04','url':'/_next/static/media/db96af6b531dc71f-s.p.woff2'},{'revision':'d54db44de5ccb18886ece2fda72bdfe0','url':'/_next/static/media/df0a9ae256c0569c-s.woff2'},{'revision':'9fb609fe01d739bb9df558e1fba2498e','url':'/_next/static/media/e40af3453d7c920a-s.woff2'},{'revision':'65850a373e258f1c897a2b3d75eb74de','url':'/_next/static/media/e4af272ccee01ff0-s.p.woff2'},{'revision':'de1d49f26130d43f91829088086625f4','url':'/_next/static/media/ef4d5661765d0e49-s.woff2'},{'revision':'0f8d347d49960d05c9430d83e49edeb7','url':'/_next/static/media/f911b923c6adde36-s.woff2'},{'revision':'f782881382efdee04951fb8fda52f691','url':'/_next/static/sQM07bLcPmpiV77YU1Tw5/_buildManifest.js'},{'revision':'b6652df95db52feb4daf4eca35380933','url':'/_next/static/sQM07bLcPmpiV77YU1Tw5/_ssgManifest.js'},{'revision':'d7bc0f63f9618b8b700d028d7d242de8','url':'/apple-touch-icon.png'},{'revision':'5616f81ec5f8a9f726a17fb7ac66a54a','url':'/favicon-16.png'},{'revision':'1fc285cfb0116a0523eb34c779a7d282','url':'/favicon-32.png'},{'revision':'583b034f36839a8af92841771eef38b6','url':'/favicon.ico'},{'revision':'b15795128b3691e5703d0ce14ce10827','url':'/favicon.png'},{'revision':'44e9d71551be13574ac2e10063d03aa9','url':'/favicon.svg'},{'revision':'252b8f8c4d0f64c7cd120f182a6c74ab','url':'/icon-192.png'},{'revision':'3e3b53bbd210bd772b36b70165657e7c','url':'/icon-512.png'},{'revision':'252b8f8c4d0f64c7cd120f182a6c74ab','url':'/icons/icon-192.png'},{'revision':'3e3b53bbd210bd772b36b70165657e7c','url':'/icons/icon-512.png'},{'revision':'3e3b53bbd210bd772b36b70165657e7c','url':'/icons/icon-maskable-512.png'},{'revision':'bf670b1fafa1b3127bd50abe86d723b9','url':'/images/player-silhouette.svg'},{'revision':'d692f690fbd1564f090131e02be5ba9c','url':'/manifest.json'},{'revision':'9f61cf51298661d5c57a782534216240','url':'/og-image.png'},{'revision':'7c759c20b35840eacf9344692cb51061','url':'/og-image.svg'},{'revision':'9327802333275f11e68c3f19f20c160d','url':'/widget.js'}],skipWaiting:!0,clientsClaim:!0,navigationPreload:!0,runtimeCaching:eq}).addEventListeners(),self.addEventListener("install",e=>{e.waitUntil(caches.open("offline-fallback").then(e=>e.add(eR)).catch(()=>{}))}),self.addEventListener("activate",e=>{e.waitUntil(caches.keys().then(e=>Promise.all(e.filter(e=>!eE.includes(e)&&!e.startsWith("serwist")).map(e=>(console.log("[SW] deleting stale cache:",e),caches.delete(e))))))}),self.addEventListener("push",e=>{let t;if(!e.data)return;try{t=e.data.json()}catch{t={title:"VYNDR",body:e.data.text()}}let{title:a="VYNDR",body:s="",icon:r="/icons/icon-192.png",url:i="/",tag:n="vyndr-notification"}=t;e.waitUntil(self.registration.showNotification(a,{body:s,icon:r,badge:"/icons/icon-192.png",tag:n,data:{url:i}}))}),self.addEventListener("notificationclick",e=>{e.notification.close();let t=e.notification.data?.url??"/";e.waitUntil(self.clients.matchAll({type:"window",includeUncontrolled:!0}).then(e=>{let a=e.find(e=>e.url.endsWith(t));return a?a.focus():self.clients.openWindow(t)}))})})(); \ No newline at end of file