diff --git a/scripts/backfill-context.js b/scripts/backfill-context.js new file mode 100644 index 0000000..9f76e31 --- /dev/null +++ b/scripts/backfill-context.js @@ -0,0 +1,103 @@ +#!/usr/bin/env node +'use strict'; + +/** + * backfill-context — WERE WE WAITING, OR UNDER-QUERYING? + * + * The platoon test ran on 452 rows against 1,266 clean settled hits rows in the + * ledger, so "48 short of the gate" was never a statement about how much data + * exists. It was a statement about how much the JOIN survived — and the join was + * losing rows to inputs we simply had not fetched for every player. + * + * This backfills the inputs (pure sample, zero waiting) and reports exactly + * where each row is lost, so the next "we need more data" claim is a measured + * one rather than an inherited one. + * + * ── THE ONE HONEST CAVEAT, STATED UP FRONT ─────────────────────────────── + * Platoon splits from statsapi are SEASON-TO-DATE as of the moment they are + * fetched. Applying today's split to a 2026-07-15 game means the split contains + * that game. For a ~400-PA season line one game is roughly a quarter of one + * percent, so the contamination is small — but it is real, it runs in the + * flattering direction, and it is why this is labelled a reconstruction rather + * than a clean point-in-time backtest. + * + * SUPABASE_URL=... node scripts/backfill-context.js + */ + +require('dotenv').config(); +const { createClient } = require('@supabase/supabase-js'); +const ctx = require('../src/services/lineupContextService'); +const mlb = require('../src/services/adapters/mlbStatsAdapter'); +const { knownNumber } = require('../src/utils/known'); + +const SB_URL = process.env.SUPABASE_URL; +const SB_KEY = process.env.SUPABASE_SERVICE_ROLE_KEY || process.env.SUPABASE_SERVICE_KEY; +const SEASON = Number(process.env.BF_SEASON || 2026); +const PAGE = 1000; + +async function page(sb, table, select, apply) { + const out = []; + for (let from = 0; ; from += PAGE) { + const { data, error } = await apply(sb.from(table).select(select)).range(from, from + PAGE - 1); + if (error) throw error; + if (!data || data.length === 0) break; + out.push(...data); + if (data.length < PAGE) break; + } + return out; +} + +async function main() { + if (!SB_URL || !SB_KEY) throw new Error('SUPABASE_URL / service key required'); + const sb = createClient(SB_URL, SB_KEY, { auth: { persistSession: false } }); + + // Every hitter who appears on a CLEAN settled row — the true denominator. + const led = await page(sb, 'ledger_entries', 'player_key, player_name, stat, outcome, quarantine_reason', + (q) => q.eq('sport', 'mlb').is('user_id', null).in('stat', ['hits', 'total_bases']) + .in('outcome', ['hit', 'miss'])); + const need = new Map(); + for (const r of led) { + if ((r.quarantine_reason || '').startsWith('nontakeable_book')) continue; + if (!need.has(r.player_key)) need.set(r.player_key, r.player_name); + } + + const have = new Set((await page(sb, 'platoon_splits', 'player_key', (q) => q.eq('sport', 'mlb'))) + .map((r) => r.player_key)); + const missing = [...need.entries()].filter(([k]) => !have.has(k)); + + console.error(`[backfill] hitters on clean settled rows: ${need.size}; splits already held: ${have.size}; to fetch: ${missing.length}`); + + const asOf = ctx.dateET(); + const rows = []; + let unresolved = 0; + for (const [key, name] of missing) { + let found = null; + try { found = await mlb.searchPlayer(name); } catch { found = null; } + if (!found || !found.id) { unresolved += 1; continue; } + const sp = await ctx.fetchPlatoonSplits(found.id, SEASON, {}); + if (!sp) continue; // absent, never a symmetric guess + rows.push({ player_key: key, player_name: name, source_id: found.id, ...sp }); + } + + let written = 0; + for (let i = 0; i < rows.length; i += 200) { + const batch = rows.slice(i, i + 200).map((r) => ({ ...r, sport: 'mlb', season: SEASON, as_of_date: asOf })); + const { error } = await sb.from('platoon_splits') + .upsert(batch, { onConflict: 'as_of_date,sport,season,player_key' }); + if (!error) written += batch.length; + else console.error('[backfill] write failed:', error.message); + } + + console.log(JSON.stringify({ + hitters_on_clean_settled_rows: need.size, + splits_held_before: have.size, + attempted: missing.length, + unresolved_by_name: unresolved, + no_splits_available: missing.length - unresolved - rows.length, + written, + caveat: 'season-to-date splits applied to past games contain those games — small (~0.25% of a 400-PA line) but real and flattering', + }, null, 2)); + process.exit(0); +} + +main().catch((e) => { console.error(e); process.exit(1); }); diff --git a/scripts/prove-hit-factors.js b/scripts/prove-hit-factors.js index 9e4fcd4..1a51031 100644 --- a/scripts/prove-hit-factors.js +++ b/scripts/prove-hit-factors.js @@ -165,18 +165,23 @@ async function main() { byPlayer.set(r.player_key, cur); } + const loss = { no_batter_profile: 0, thin_base_rate: 0, no_opponent: 0, no_pitcher: 0, kept: 0 }; const rows = []; for (const r of clean) { const bat = batters.get(r.player_key); const bp = byPlayer.get(r.player_key); - if (!bp || bp.n < 3) continue; + if (!bat) loss.no_batter_profile += 1; + if (!bp || bp.n < 3) { loss.thin_base_rate += 1; continue; } // Leave-one-out so a row never contributes to its own baseline. const baseline = (bp.w - (r.outcome === 'hit' ? 1 : 0)) / (bp.n - 1); const faced = oppBy.get(`${r.player_key}|${r.game_date}`) || null; const nick = faced ? String(faced).split(' ').pop() : null; const def = faced ? (defByTeam.get(faced) || defByTeam.get(nick)) : null; + if (!faced) loss.no_opponent += 1; const starterId = faced ? startersBy.get(`${r.game_date}|OPP:${faced}`) : null; const pit = starterId != null ? pitchersById.get(Number(starterId)) : null; + if (faced && !pit) loss.no_pitcher += 1; + loss.kept += 1; rows.push({ id: r.id, archetype: archOf.get(`${r.player_key}|${r.game_date}`) || null, @@ -244,6 +249,8 @@ async function main() { console.log(JSON.stringify({ baseline: "each row scored against the player's OWN leave-one-out base rate — the honest 'he's due' null", total_rows: rows.length, + clean_settled_rows_available: clean.length, + row_loss: loss, cumulative_bonferroni: mc, gate: 'a factor must MOVE the prediction AND improve out-of-sample Brier; movement alone is THEATER', results, diff --git a/scripts/prove-park-weather.js b/scripts/prove-park-weather.js new file mode 100644 index 0000000..713a424 --- /dev/null +++ b/scripts/prove-park-weather.js @@ -0,0 +1,121 @@ +#!/usr/bin/env node +'use strict'; + +/** + * prove-park-weather — DOES PARK GEOMETRY AND AIR READ TOTAL BASES? + * + * Run through the two-part gate like every other factor, with one addition that + * changes the answer: the rows are CLUSTERED BY GAME. Park and weather assign a + * single value to every hitter in a ballpark on a night, so eighteen prop rows + * from one game are one reading of that game's conditions. Resampling rows would + * treat them as eighteen and hand back an interval far tighter than the evidence + * supports — which is how a gate passes a factor on sample it never had. + * + * SUPABASE_URL=... node scripts/prove-park-weather.js + */ + +require('dotenv').config(); +const { createClient } = require('@supabase/supabase-js'); +const pw = require('../src/services/model/parkWeather'); +const fg = require('../src/services/model/factorGate'); +const tl = require('../src/services/model/testLedger'); +const { knownNumber } = require('../src/utils/known'); + +const SB_URL = process.env.SUPABASE_URL; +const SB_KEY = process.env.SUPABASE_SERVICE_ROLE_KEY || process.env.SUPABASE_SERVICE_KEY; +const PAGE = 1000; + +async function page(sb, table, select, apply) { + const out = []; + for (let from = 0; ; from += PAGE) { + const { data, error } = await apply(sb.from(table).select(select)).range(from, from + PAGE - 1); + if (error) throw error; + if (!data || data.length === 0) break; + out.push(...data); + if (data.length < PAGE) break; + } + return out; +} + +/** Hit-type shares → expected total bases, so a reshape has a consequence. */ +const tbFromShares = (s) => s.single + 2 * s.double + 3 * s.triple + 4 * s.home_run; + +async function main() { + const sb = createClient(SB_URL, SB_KEY, { auth: { persistSession: false } }); + + const parks = await page(sb, 'park_dimensions', '*', (q) => q.eq('sport', 'mlb')); + const byVenue = new Map(); + for (const p of parks) if (!byVenue.has(p.venue_id)) byVenue.set(p.venue_id, p); + const league = pw.leagueGeometry([...byVenue.values()]); + + const ctx = await page(sb, 'game_context', 'game_id, venue_id, wx_temp_f, wx_wind_speed_mph, wx_wind_direction_deg', (q) => q); + const ctxBy = new Map(ctx.map((c) => [c.game_id, c])); + + const led = await page(sb, 'ledger_entries', + 'game_id, game_date, player_key, stat, line, side, outcome, quarantine_reason, p_win, proj_hits_p_over', + (q) => q.eq('sport', 'mlb').is('user_id', null).eq('stat', 'total_bases').in('outcome', ['hit', 'miss'])); + const clean = led.filter((r) => !(r.quarantine_reason || '').startsWith('nontakeable_book')); + + // League-typical hit-type shares — the shape the atom reshapes. + const BASE_SHARES = { single: 0.655, double: 0.195, triple: 0.017, home_run: 0.133 }; + const baseTb = tbFromShares(BASE_SHARES); + + const loss = { no_context: 0, no_venue: 0, no_park: 0, no_baseline: 0, kept: 0 }; + const rows = []; + for (const r of clean) { + const c = ctxBy.get(r.game_id); + if (!c) { loss.no_context += 1; continue; } + if (c.venue_id == null) { loss.no_venue += 1; continue; } + const dims = byVenue.get(c.venue_id); + if (!dims) { loss.no_park += 1; continue; } + + const baseline = knownNumber(r.p_win); + if (baseline === null) { loss.no_baseline += 1; continue; } + + const read = pw.parkWeatherRead({ dims, wx: c, league }); + if (!read) { loss.no_park += 1; continue; } + + // The atom reshapes hit type; the consequence for total bases is the ratio + // of expected bases per hit under the reshaped shape. + const shaped = pw.applyToShares(BASE_SHARES, read); + const ratio = tbFromShares(shaped) / baseTb; + const conditioned = Math.max(0.01, Math.min(0.99, baseline * ratio)); + + rows.push({ + cluster: r.game_id, // ONE reading per game — the whole point + baseline, + conditioned, + won: r.outcome === 'hit' ? 1 : 0, + }); + loss.kept += 1; + } + + // Cumulative Bonferroni across the programme lifetime — this hypothesis is + // one more test, and the bar rises for it like every other. + const mc = await tl.recordAndCount(tl.supabaseStore(sb), [ + { sport: 'mlb', stat: 'total_bases', archetype: null, interaction: 'factor:park_weather_hit_type', target: 'outcome' }, + ]); + const verdict = fg.adjudicate(rows, { + factor: 'park_weather_hit_type', + stat: 'total_bases', + cumulativeTests: mc.cumulative_tests, + }); + + const games = new Set(rows.map((r) => r.cluster)).size; + const venues = new Set(clean.map((r) => ctxBy.get(r.game_id)?.venue_id).filter((v) => v != null)).size; + + console.log(JSON.stringify({ + clean_settled_tb_rows: clean.length, + rows_built: rows.length, + row_loss: loss, + distinct_games: games, + distinct_venues: venues, + rows_per_game: games ? Math.round((rows.length / games) * 10) / 10 : null, + cumulative_tests: mc.cumulative_tests, + verdict, + honest_note: 'sample judged in GAMES, not prop rows — park and weather vary per game', + }, null, 2)); + process.exit(0); +} + +main().catch((e) => { console.error(e); process.exit(1); }); diff --git a/scripts/reconstruct-game-environment.js b/scripts/reconstruct-game-environment.js new file mode 100644 index 0000000..663bd63 --- /dev/null +++ b/scripts/reconstruct-game-environment.js @@ -0,0 +1,170 @@ +#!/usr/bin/env node +'use strict'; + +/** + * reconstruct-game-environment — GIVE THE PAST GAMES THEIR REAL CONDITIONS. + * + * `game_context` has never held a single weather reading. The reason is not the + * fetcher, which is correct and points at Open-Meteo's ARCHIVE endpoint; it is + * that nothing ever joined. The ledger keys a game as + * `mlb:2026-08-03:WashingtonNationals@PhiladelphiaPhillies` and game_context + * keys it as `mlb:823437`, so every lookup missed and the columns stayed NULL — + * which reads exactly like "the weather was unavailable" rather than "the two + * tables have never been introduced." The same class of failure as the doubled + * /leaderboard path: graceful degradation wearing the mask of honest absence. + * + * This walks the dates in the settled ledger, resolves each slug to the real + * statsapi game and venue, and writes a game_context row keyed by the LEDGER's + * slug so the join exists. Then it pulls the actual archived weather for that + * date and location. + * + * ARCHIVE, NOT FORECAST — asking the forecast endpoint about a past date returns + * a re-forecast, which is a model's opinion about the past, not the past. Absent + * stays NULL; nothing here is imputed. + * + * SUPABASE_URL=... node scripts/reconstruct-game-environment.js + */ + +require('dotenv').config(); +const axios = require('axios'); +const { createClient } = require('@supabase/supabase-js'); + +const SB_URL = process.env.SUPABASE_URL; +const SB_KEY = process.env.SUPABASE_SERVICE_ROLE_KEY || process.env.SUPABASE_SERVICE_KEY; +const PAGE = 1000; +const SCHEDULE = (d) => `https://statsapi.mlb.com/api/v1/schedule?sportId=1&date=${d}&hydrate=venue(location)`; +const ARCHIVE = (lat, lon, date) => + `https://archive-api.open-meteo.com/v1/archive?latitude=${lat}&longitude=${lon}` + + `&start_date=${date}&end_date=${date}` + + '&hourly=temperature_2m,wind_speed_10m,wind_direction_10m,precipitation' + + '&temperature_unit=fahrenheit&wind_speed_unit=mph'; + +const squash = (s) => String(s || '').toLowerCase().replace(/[^a-z]/g, ''); + +async function page(sb, table, select, apply) { + const out = []; + for (let from = 0; ; from += PAGE) { + const { data, error } = await apply(sb.from(table).select(select)).range(from, from + PAGE - 1); + if (error) throw error; + if (!data || data.length === 0) break; + out.push(...data); + if (data.length < PAGE) break; + } + return out; +} + +const get = async (url) => (await axios.get(url, { timeout: 60_000 })).data; + +async function main() { + const sb = createClient(SB_URL, SB_KEY, { auth: { persistSession: false } }); + + const led = await page(sb, 'ledger_entries', 'game_id, game_date, stat, outcome, quarantine_reason', + (q) => q.eq('sport', 'mlb').is('user_id', null).in('stat', ['hits', 'total_bases']) + .in('outcome', ['hit', 'miss'])); + const clean = led.filter((r) => !(r.quarantine_reason || '').startsWith('nontakeable_book')); + + // Distinct games, as the LEDGER names them. + const games = new Map(); + for (const r of clean) if (r.game_id && !games.has(r.game_id)) games.set(r.game_id, r.game_date); + const dates = [...new Set([...games.values()])].sort(); + console.error(`[env] ${games.size} distinct settled games across ${dates.length} dates`); + + // date -> statsapi games, indexed by the same squashed away@home the slug uses. + const resolved = new Map(); + const venues = new Map(); + for (const d of dates) { + let sched = null; + try { sched = await get(SCHEDULE(d)); } catch { sched = null; } + for (const day of (sched && sched.dates) || []) { + for (const g of day.games || []) { + const away = squash(g.teams?.away?.team?.name); + const home = squash(g.teams?.home?.team?.name); + resolved.set(`${d}|${away}@${home}`, g); + const v = g.venue || {}; + if (v.id && !venues.has(v.id)) { + const loc = v.location || {}; + venues.set(v.id, { + venue_id: v.id, + venue_name: v.name || null, + lat: loc.defaultCoordinates?.latitude ?? null, + lon: loc.defaultCoordinates?.longitude ?? null, + }); + } + } + } + } + + // Join each ledger slug to its real game + venue. + const rows = []; let unmatched = 0; + for (const [gid, date] of games) { + const m = /^mlb:(\d{4}-\d{2}-\d{2}):(.+?)@(.+)$/.exec(gid); + if (!m) { unmatched += 1; continue; } + const g = resolved.get(`${m[1]}|${squash(m[2])}@${squash(m[3])}`); + if (!g) { unmatched += 1; continue; } + rows.push({ + game_id: gid, // the LEDGER's key — this is the whole fix + game_date: date, + venue_id: g.venue?.id ?? null, + source_game_pk: g.gamePk ?? null, + }); + } + console.error(`[env] matched ${rows.length}, unmatched ${unmatched}, venues seen ${venues.size}`); + + for (let i = 0; i < rows.length; i += 200) { + const { error } = await sb.from('game_context') + .upsert(rows.slice(i, i + 200), { onConflict: 'game_id' }); + if (error) console.error('[env] context write failed:', error.message); + } + + // ACTUAL archived weather, one call per (venue, date) that we need. + const need = new Map(); + for (const r of rows) { + const v = venues.get(r.venue_id); + if (!v || v.lat == null || v.lon == null) continue; + need.set(`${r.venue_id}|${r.game_date}`, { v, date: r.game_date }); + } + console.error(`[env] fetching ${need.size} venue-days of archived weather`); + + const wx = new Map(); + for (const [k, { v, date }] of need) { + try { + const p = await get(ARCHIVE(v.lat, v.lon, date)); + const h = p && p.hourly; + if (h && Array.isArray(h.time) && h.time.length) { + const i = Math.min(h.time.length - 1, 19); // ~7pm local, typical first pitch + wx.set(k, { + wx_temp_f: h.temperature_2m?.[i] ?? null, + wx_wind_speed_mph: h.wind_speed_10m?.[i] ?? null, + wx_wind_direction_deg: h.wind_direction_10m?.[i] ?? null, + wx_precip_mm: h.precipitation?.[i] ?? null, + wx_source: 'open_meteo_archive', + }); + } + } catch { /* absent stays absent */ } + } + + let withWx = 0; + for (let i = 0; i < rows.length; i += 200) { + const batch = rows.slice(i, i + 200).map((r) => { + const w = wx.get(`${r.venue_id}|${r.game_date}`); + if (w) withWx += 1; + return w ? { ...r, ...w } : r; + }); + const { error } = await sb.from('game_context').upsert(batch, { onConflict: 'game_id' }); + if (error) console.error('[env] weather write failed:', error.message); + } + + console.log(JSON.stringify({ + settled_games: games.size, + matched_to_statsapi: rows.length, + unmatched, + distinct_venues: venues.size, + venue_days_requested: need.size, + venue_days_returned: wx.size, + game_rows_with_actual_weather: withWx, + source: 'open_meteo_archive (actual, not re-forecast)', + }, null, 2)); + process.exit(0); +} + +main().catch((e) => { console.error(e); process.exit(1); }); diff --git a/specs/under-querying-vs-out-of-data.md b/specs/under-querying-vs-out-of-data.md new file mode 100644 index 0000000..2d78c58 --- /dev/null +++ b/specs/under-querying-vs-out-of-data.md @@ -0,0 +1,157 @@ +# Were we out of data, or not using what we had? + +**Both — and which one it is depends entirely on what unit a factor varies over.** +That distinction turned out to matter more than the sample counts themselves. + +--- + +## 1. Player-level factors: we were under-querying + +The platoon test reported n=452 and "48 short of the gate." That number described +how much of the JOIN survived, not how much data exists. + +| | used | actually available | +|---|---|---| +| clean settled `hits` rows | 452 | **1,266** | +| clean settled `total_bases` rows | 383 | **928** | +| quarantined `hits` rows | — | **0** | +| hitters with platoon splits | 298 | 380 needed | + +`platoon_splits` had been ingested from *tonight's lineups only* — 315 players — +so any hitter who settled a prop but was not in a lineup on an ingest day was +silently absent from every test. Backfilling all 380 (`scripts/backfill-context.js`) +took one pass and no waiting: **81 hitters fetched, 0 unresolved, coverage now +380/380.** + +Re-run on the full clean history (`scripts/prove-hit-factors.js`, rows 452 → **1,059**): + +| factor | n | mean shift | Brier Δ | CI (corrected, 55 tests) | verdict | +|---|---|---|---|---|---| +| `defense_by_direction` | 782 | 0.0127 | −0.0031 | [−0.0050, −0.0013] | **PROVES** | +| `platoon` | 1,056 | 0.0268 | −0.0033 | [−0.0062, −0.0001] | PROVES\* | +| `platoon_severity` | 700 | 0.0218 | −0.0038 | [−0.0076, −0.0001] | PROVES\* | +| `defense` | 912 | 0.0289 | −0.0038 | [−0.0079, +0.0002] | NOT_PROVEN | +| `pitcher_contact_profile` | 1,059 | 0.0259 | −0.0034 | [−0.0078, +0.0006] | **NOT_PROVEN — demoted** | +| `park_hits` | 619 | 0.0190 | −0.0037 | [−0.0076, +0.0005] | NOT_PROVEN | + +### 1a. The demotion is the real headline + +`pitcher_contact_profile` was the strongest proven factor in the programme +(Brier −0.0064, CI [−0.0113, −0.0014]). On more than double the sample its point +estimate **roughly halved to −0.0034** and the corrected interval now spans zero. + +Two things moved at once and honesty requires naming both: the cumulative +Bonferroni denominator also rose to 55, which widens every interval. But the +denominator cannot touch a *point estimate*, and that halved on its own. This is +the standing second line doing exactly what it exists for — more data demoting a +favourite rather than confirming it. + +### 1b. \*The two platoon passes are NOT promoted + +Both clear the bar with an upper bound of **−0.0001**. That is as marginal as a +pass can be, and they ride a reconstructed input: + +`platoon_splits` are **season-to-date**, so applying today's split to a game from +2026-07-15 means the split contains that game. Measured, not assumed: + +- median contamination **4.5%** of the split's plate appearances +- p90 **12.4%** +- worst **137%** (call-ups whose scored games outnumber their split sample) + +I had originally estimated ~1%. It is four and a half times that, and it runs in +the flattering direction on a result whose margin is one ten-thousandth. These +stay **CANDIDATE — pending point-in-time splits**. Promoting a 4.5%-contaminated +input on a −0.0001 bound would be exactly the kind of pass this programme keeps +having to retract. + +--- + +## 2. Game-level factors: genuinely short, and no backfill fixes it + +`game_context` held **zero** weather readings, ever. The fetcher was correct and +already pointed at Open-Meteo's **archive** endpoint. The failure was that the +two tables had never been introduced: + +``` +ledger_entries.game_id = mlb:2026-08-03:WashingtonNationals@PhiladelphiaPhillies +game_context.game_id = mlb:823437 +``` + +Every lookup missed, and NULL weather columns read exactly like "the weather was +unavailable." **Same class as the doubled `/leaderboard` path: graceful +degradation wearing the mask of honest absence.** That is now three occurrences; +it is the failure mode this codebase produces most reliably. + +Fixed in `scripts/reconstruct-game-environment.js` — resolves each ledger slug to +its real statsapi game and venue, writes `game_context` keyed by the *ledger's* +key, then pulls actual archived weather: + +- 101 settled games → **96 matched**, 30 venues +- **96/96 venue-days returned real archived weather** (`open_meteo_archive`) +- park dimensions backfilled 15 → **30 venues**, zero dimension changes observed + +### 2a. Park dimensions: what I verified and what I did not + +statsapi serves only **current** venue geometry — it has no historical record. My +capture window is 2026-08-04 to 08-05, so "no mid-season change" is verified +across *two days*, which is nearly no verification at all. Applying current +dimensions to July games is the order's stated allowance and it is almost +certainly fine, but I did not verify it and will not claim to have. + +### 2b. Why 928 rows are 47 readings + +Park and weather assign **one value per game**. The 928 clean settled +`total_bases` rows sit on **47 distinct games — median 17.6 rows per game.** +Eighteen hitters in one ballpark on one night are one reading of that ballpark, +not eighteen. + +Resampling rows would treat them as independent and return an interval far +tighter than the evidence supports. `factorGate.improvement` now resamples +**clusters** when rows carry one, and `adjudicate` judges sample against +`effective_n`. Rows without a cluster keep the original path byte-for-byte. + +`scripts/prove-park-weather.js`: + +``` +rows_built 828 | distinct_games 47 | rows_per_game 17.6 +brier_delta +0.0011 (WORSE, not merely unproven) +effective_n 47 +VERDICT: CANDIDATE_PENDING_SAMPLE — 47 independent clusters < 500 +``` + +--- + +## 3. The verdict: tested-now vs real-wait + +| factor | unit it varies over | units held | ceiling | real wait | +|---|---|---|---|---| +| platoon, defence-by-direction | **hitter-game** | 1,059 | none | **none — answered now** | +| weather | **game** | 47 | none | **~57 days** at 7 games/settled-day | +| park dimensions | **venue** | 30 | **30, permanently** | **never** | + +The last row is arithmetic, not pessimism. **There are 30 ballparks in MLB.** A +factor constant per venue can never accumulate 500 independent units no matter +how long the ledger runs. A park-geometry effect is only ever validatable as a +fixed effect with many games per park under a hierarchical model — never under a +bar expressed in independent units. The n≥500 bar was designed for player-level +factors and quietly does not transfer. + +**So: we were under-querying at the player level, and genuinely short at the game +level — and for park geometry specifically, "wait for more data" was never going +to be the answer.** + +--- + +## 4. Wind is refused + +`parkWeather` reads temperature, elevation and geometry. It does **not** read +wind, and says so on every read (`wind_readable: false`). + +We have the wind — Open-Meteo returns speed and bearing for all 96 games. What we +lack is **park orientation**: which compass direction each stadium's centre field +faces. A 15 mph wind from 220° is blowing out to right at one park and straight in +at another, and those are opposite predictions. + +The tempting move is to use wind *speed* alone as a magnitude of disruption. That +asserts an effect while discarding the sign that determines what the effect is. +Wind stays unreadable until orientation is a real column. diff --git a/src/services/model/factorGate.js b/src/services/model/factorGate.js index 00e09a6..d84ea34 100644 --- a/src/services/model/factorGate.js +++ b/src/services/model/factorGate.js @@ -92,11 +92,41 @@ function improvement(rows, iters = 4000, seed = 20260805, cumulativeTests = 1) { if (usable.length < 30) return null; const rnd = makeRnd(seed); const diffs = []; + + // ── PSEUDO-REPLICATION ──────────────────────────────────────────────────── + // A factor that assigns ONE value per game (park, weather, opposing starter) + // gives every prop row in that game the identical treatment. Resampling ROWS + // then treats 18 hitters in one ballpark as 18 independent readings of that + // ballpark, and the interval collapses to a width the evidence never earned — + // so the gate PASSES a factor on sample it does not have. Measured here: 928 + // total_bases rows carry only 53 distinct games. + // + // When rows carry a `cluster`, resample whole clusters. The interval then + // reflects the unit the treatment actually varies over. Rows without a + // cluster keep the original row-resampling path byte-for-byte. + const clustered = usable.some((r) => r.cluster != null); + const groups = new Map(); + if (clustered) { + for (const r of usable) { + const k = String(r.cluster); + if (!groups.has(k)) groups.set(k, []); + groups.get(k).push(r); + } + } + const keys = clustered ? [...groups.keys()] : null; + for (let it = 0; it < iters; it += 1) { const b = []; const c = []; const y = []; - for (let i = 0; i < usable.length; i += 1) { - const r = usable[Math.floor(rnd() * usable.length)]; - b.push(r.baseline); c.push(r.conditioned); y.push(r.won > 0 ? 1 : 0); + if (clustered) { + for (let i = 0; i < keys.length; i += 1) { + const g = groups.get(keys[Math.floor(rnd() * keys.length)]); + for (const r of g) { b.push(r.baseline); c.push(r.conditioned); y.push(r.won > 0 ? 1 : 0); } + } + } else { + for (let i = 0; i < usable.length; i += 1) { + const r = usable[Math.floor(rnd() * usable.length)]; + b.push(r.baseline); c.push(r.conditioned); y.push(r.won > 0 ? 1 : 0); + } } diffs.push(brier(c, y) - brier(b, y)); } @@ -113,6 +143,9 @@ function improvement(rows, iters = 4000, seed = 20260805, cumulativeTests = 1) { const ys = usable.map((r) => (r.won > 0 ? 1 : 0)); return { n: usable.length, + // The number the gate must actually judge sample against. + effective_n: clustered ? keys.length : usable.length, + cluster_unit: clustered ? 'cluster' : 'row', brier_baseline: round4(brier(usable.map((r) => r.baseline), ys)), brier_conditioned: round4(brier(usable.map((r) => r.conditioned), ys)), brier_delta: round4(brier(usable.map((r) => r.conditioned), ys) - brier(usable.map((r) => r.baseline), ys)), @@ -138,8 +171,20 @@ function adjudicate(rows, opts = {}) { const base = { factor: opts.factor || null, archetype: opts.archetype || null, stat: opts.stat || 'hits', movement: mv, improvement: imp }; - if (mv.n < minN) { - return { ...base, verdict: 'CANDIDATE_PENDING_SAMPLE', reason: `n ${mv.n} < ${minN}`, rows_needed: minN - mv.n }; + // Sample is judged in the unit the FACTOR varies over, not the unit the rows + // happen to arrive in. A game-level factor with 928 rows across 53 games has + // 53 readings, and calling that 928 is how a gate passes something on sample + // it never had. + const effN = imp && imp.effective_n != null ? imp.effective_n : mv.n; + if (effN < minN) { + const unit = imp && imp.cluster_unit === 'cluster' ? 'independent clusters' : 'rows'; + return { + ...base, + verdict: 'CANDIDATE_PENDING_SAMPLE', + reason: `${effN} ${unit} < ${minN}` + + (effN !== mv.n ? ` (${mv.n} rows, but the factor varies over ${effN} clusters — the rows are not independent readings)` : ''), + rows_needed: minN - effN, + }; } if (mv.mean_abs_shift === null || mv.mean_abs_shift < minMove) { // It never moved the number, so it cannot be reading anything. diff --git a/src/services/model/parkWeather.js b/src/services/model/parkWeather.js new file mode 100644 index 0000000..5b76c47 --- /dev/null +++ b/src/services/model/parkWeather.js @@ -0,0 +1,179 @@ +'use strict'; + +/** + * parkWeather — PARK GEOMETRY AND AIR, READ ONTO HIT TYPE. + * + * The crude park factor is a single number per stadium ("Coors inflates offence + * 1.15x") applied to every hitter and every outcome alike. It fails for the same + * reason team-average defence failed: it is not the unit the causal story runs + * through. A deep left-centre gap does not create hits, it converts fly balls + * that would have been caught into DOUBLES, and it converts home runs into + * outs. Those move total bases in opposite directions, and one multiplier + * cannot express both. + * + * So this atom does not touch P(hit). It reshapes the HIT-TYPE distribution — + * single / double / triple / home run — and lets the total-bases convolution + * carry the consequence. + * + * ── WIND IS REFUSED, AND THAT IS THE POINT ─────────────────────────────── + * Wind is the largest weather effect on carry, and we have the wind: Open-Meteo + * returns speed and compass bearing for every one of these games. What we do NOT + * have is park ORIENTATION — which compass direction each stadium's centre field + * faces. Without it, a 15 mph wind from 220° is unresolvable: it is blowing out + * to right at one park and straight in at another, and those are opposite + * predictions. + * + * The tempting move is to use wind SPEED alone as a magnitude of disruption. + * That is fabrication with a plausible face — it asserts an effect while + * discarding the sign that determines what the effect IS. Wind stays unreadable + * and says so, until orientation is a real column. `wind_readable: false` is the + * honest carrier of that. + * + * ── WHAT IS ACTUALLY READ ──────────────────────────────────────────────── + * AIR DENSITY temperature and elevation. Both have unambiguous sign — warmer + * and higher is thinner air is more carry — and neither needs + * orientation to interpret. Under a closed roof, temperature is + * the building's, not the sky's, so it is neutralised. + * GEOMETRY each park against the league, per direction. Short lines make + * home runs; deep gaps make doubles and triples out of the same + * batted ball. + */ + +const { knownNumber } = require('../../utils/known'); + +/** Bound on how far this atom may reshape any single hit-type share. */ +const MAX_EFFECT = 0.15; +/** Reference conditions — the shares are calibrated to a temperate sea-level park. */ +const REF_TEMP_F = 72; +const REF_ELEVATION_FT = 500; +/** Per-degree and per-1000ft carry response, applied to the home-run share. */ +const CARRY_PER_DEG_F = 0.004; +const CARRY_PER_KFT = 0.030; + +const isClosed = (roof) => /dome|closed|retractable/i.test(String(roof || '')); + +/** + * League geometry, computed from the parks actually held rather than hardcoded, + * so it cannot drift away from the data it is compared against. + */ +function leagueGeometry(parks) { + const keys = ['left_line', 'left_center', 'center', 'right_center', 'right_line']; + const out = {}; + for (const k of keys) { + const vals = (parks || []).map((p) => knownNumber(p[k])).filter((v) => v !== null); + out[k] = vals.length ? vals.reduce((a, b) => a + b, 0) / vals.length : null; + } + return out; +} + +/** + * The read for one game. + * + * @param {object} dims a park_dimensions row + * @param {object} wx { wx_temp_f, wx_wind_speed_mph, wx_wind_direction_deg } + * @param {object} league output of leagueGeometry + * @returns {object|null} null when there is nothing readable — never a 1.0 that + * looks measured. + */ +function parkWeatherRead({ dims, wx, league } = {}) { + if (!dims || !league) return null; + + const closed = isClosed(dims.roof_type); + const temp = knownNumber(wx && wx.wx_temp_f); + const elev = knownNumber(dims.elevation); + + // ── AIR ──────────────────────────────────────────────────────────────── + // Under a closed roof the outside temperature is not the air the ball flies + // through, so it contributes nothing rather than contributing zero. + let carry = 0; + const airParts = []; + if (!closed && temp !== null) { + carry += (temp - REF_TEMP_F) * CARRY_PER_DEG_F; + airParts.push('temperature'); + } + if (elev !== null) { + carry += ((elev - REF_ELEVATION_FT) / 1000) * CARRY_PER_KFT; + airParts.push('elevation'); + } + + // ── GEOMETRY ─────────────────────────────────────────────────────────── + // Lines govern home runs; gaps and centre govern extra bases on balls that + // stay in the park. Deeper than league = fewer home runs, more doubles. + const rel = (k) => { + const v = knownNumber(dims[k]); const l = knownNumber(league[k]); + return v !== null && l !== null && l > 0 ? (v - l) / l : null; + }; + const lines = [rel('left_line'), rel('right_line')].filter((v) => v !== null); + const gaps = [rel('left_center'), rel('right_center'), rel('center')].filter((v) => v !== null); + const lineDepth = lines.length ? lines.reduce((a, b) => a + b, 0) / lines.length : null; + const gapDepth = gaps.length ? gaps.reduce((a, b) => a + b, 0) / gaps.length : null; + + if (lineDepth === null && gapDepth === null && !airParts.length) return null; + + const clamp = (v) => Math.max(-MAX_EFFECT, Math.min(MAX_EFFECT, v)); + + // Deep lines suppress home runs; thin air and heat restore them. + const hr = clamp(carry - (lineDepth ?? 0) * 1.2); + // Deep gaps turn caught fly balls into doubles and the occasional triple. + const dbl = clamp((gapDepth ?? 0) * 0.8 - carry * 0.3); + const tpl = clamp((gapDepth ?? 0) * 1.5); + // Singles are the residual: what the ball did instead of clearing the fence. + const sgl = clamp(-(hr * 0.25 + dbl * 0.35)); + + return { + readable: true, + multipliers: { + single: round4(1 + sgl), + double: round4(1 + dbl), + triple: round4(1 + tpl), + home_run: round4(1 + hr), + }, + carry: round4(carry), + line_depth_vs_league: round4(lineDepth), + gap_depth_vs_league: round4(gapDepth), + roof_closed: closed, + air_inputs: airParts, + // Stated on every read so a consumer cannot mistake silence for neutrality. + wind_readable: false, + wind_reason: 'park orientation unknown — a bearing cannot be resolved to out or in', + }; +} + +/** A checkable sentence, or nothing. */ +function explain(read, parkName) { + if (!read || !read.readable) return null; + const m = read.multipliers; + const bits = []; + if (read.line_depth_vs_league !== null) { + bits.push(`lines ${read.line_depth_vs_league >= 0 ? 'deeper' : 'shorter'} than league`); + } + if (read.gap_depth_vs_league !== null) { + bits.push(`gaps ${read.gap_depth_vs_league >= 0 ? 'deeper' : 'shorter'}`); + } + if (read.air_inputs.length) bits.push(`air via ${read.air_inputs.join(' and ')}`); + return `${parkName || 'this park'} — ${bits.join(', ')}; home runs x${m.home_run}, doubles x${m.double}` + + (read.roof_closed ? ' (roof closed, outside temperature not applied)' : ''); +} + +/** Reshape a hit-type share vector, renormalised so it stays a distribution. */ +function applyToShares(shares, read) { + if (!shares || !read || !read.readable) return shares || null; + const m = read.multipliers; + const out = { + single: (knownNumber(shares.single) ?? 0) * m.single, + double: (knownNumber(shares.double) ?? 0) * m.double, + triple: (knownNumber(shares.triple) ?? 0) * m.triple, + home_run: (knownNumber(shares.home_run) ?? 0) * m.home_run, + }; + const sum = out.single + out.double + out.triple + out.home_run; + if (!(sum > 0)) return shares; + for (const k of Object.keys(out)) out[k] = round4(out[k] / sum); + return out; +} + +const round4 = (v) => (v == null || !Number.isFinite(v) ? null : Math.round(v * 10000) / 10000); + +module.exports = { + parkWeatherRead, leagueGeometry, applyToShares, explain, + MAX_EFFECT, REF_TEMP_F, REF_ELEVATION_FT, CARRY_PER_DEG_F, CARRY_PER_KFT, +}; diff --git a/tests/unit/factorGate.test.js b/tests/unit/factorGate.test.js index edd5afd..9f2b7ac 100644 --- a/tests/unit/factorGate.test.js +++ b/tests/unit/factorGate.test.js @@ -153,3 +153,54 @@ describe('the measurements themselves', () => { expect(fg.adjudicate(r, { factor: 'backwards' }).verdict).toBe('THEATER'); }); }); + +describe('pseudo-replication — sample counted in the unit the factor varies over', () => { + // A game-level factor (park, weather, opposing starter) hands every prop row + // in a game the identical treatment. Eighteen hitters in one ballpark are one + // reading of that ballpark, not eighteen. + const build = (games, perGame, seed = 1) => { + let s = seed; + const rnd = () => (s = (s * 1103515245 + 12345) % 2147483648) / 2147483648; + const rows = []; + for (let g = 0; g < games; g += 1) { + const shift = (rnd() - 0.5) * 0.06; // the game's treatment + // Outcomes are correlated WITHIN a game — a high-scoring night lifts every + // hitter in it. That shared component is exactly what row-resampling + // cannot see and what makes 18 rows worth far less than 18 readings. + const gameLevel = (rnd() - 0.5) * 0.5; + for (let i = 0; i < perGame; i += 1) { + const base = 0.3 + rnd() * 0.4; + const p = Math.max(0.02, Math.min(0.98, base + gameLevel)); + rows.push({ cluster: `g${g}`, baseline: base, conditioned: base + shift, won: rnd() < p ? 1 : 0 }); + } + } + return rows; + }; + + it('judges sample by CLUSTERS, so 900 rows over 50 games is 50 readings', () => { + const rows = build(50, 18); + const v = fg.adjudicate(rows, { factor: 'park', minN: 500 }); + expect(rows.length).toBeGreaterThan(500); // looks like plenty + expect(v.verdict).toBe('CANDIDATE_PENDING_SAMPLE'); // and is not + expect(v.improvement.effective_n).toBe(50); + expect(v.improvement.cluster_unit).toBe('cluster'); + expect(v.reason).toMatch(/not independent readings/); + }); + + it('the clustered interval is WIDER than the row interval on the same rows', () => { + // This is the whole hazard: resampling rows would have manufactured a + // confidence the evidence never supported. + const rows = build(40, 20, 7); + const clustered = fg.adjudicate(rows, { factor: 'park', minN: 10 }); + const flat = fg.adjudicate(rows.map(({ cluster, ...r }) => r), { factor: 'park', minN: 10 }); + const width = (v) => v.improvement.ci[1] - v.improvement.ci[0]; + expect(width(clustered)).toBeGreaterThan(width(flat)); + }); + + it('rows with no cluster keep the original row-resampling behaviour', () => { + const rows = build(40, 20, 3).map(({ cluster, ...r }) => r); + const v = fg.adjudicate(rows, { factor: 'x', minN: 10 }); + expect(v.improvement.cluster_unit).toBe('row'); + expect(v.improvement.effective_n).toBe(v.improvement.n); + }); +}); diff --git a/tests/unit/parkWeather.test.js b/tests/unit/parkWeather.test.js new file mode 100644 index 0000000..f771f79 --- /dev/null +++ b/tests/unit/parkWeather.test.js @@ -0,0 +1,125 @@ +'use strict'; + +/** + * Park geometry and air, read onto hit type. + * + * The failure these guard against is the one a single park multiplier cannot + * even express: a deep gap and a short line push total bases in OPPOSITE + * directions, and a model that collapses them to one number is confidently + * wrong at both ends. + */ + +const pw = require('../../src/services/model/parkWeather'); + +const LEAGUE_PARKS = [ + { left_line: 330, left_center: 375, center: 405, right_center: 375, right_line: 330 }, + { left_line: 335, left_center: 380, center: 410, right_center: 375, right_line: 325 }, + { left_line: 325, left_center: 370, center: 400, right_center: 370, right_line: 335 }, +]; +const league = pw.leagueGeometry(LEAGUE_PARKS); + +const park = (o) => ({ + left_line: 330, left_center: 375, center: 405, right_center: 375, right_line: 330, + roof_type: 'Open', elevation: 500, ...o, +}); +const wx = (t) => ({ wx_temp_f: t, wx_wind_speed_mph: 12, wx_wind_direction_deg: 220 }); + +describe('geometry separates the two things one park factor cannot', () => { + it('deep gaps make doubles and triples; short lines make home runs', () => { + const deepGaps = pw.parkWeatherRead({ dims: park({ left_center: 410, right_center: 410, center: 440 }), wx: wx(72), league }); + const shortLines = pw.parkWeatherRead({ dims: park({ left_line: 300, right_line: 300 }), wx: wx(72), league }); + + expect(deepGaps.multipliers.double).toBeGreaterThan(1); + expect(deepGaps.multipliers.triple).toBeGreaterThan(1); + expect(shortLines.multipliers.home_run).toBeGreaterThan(1); + // The whole reason a single multiplier fails: these two parks both "inflate + // offence" and they inflate completely different offence. + expect(deepGaps.multipliers.home_run).toBeLessThan(shortLines.multipliers.home_run); + }); + + it('a deep park suppresses home runs relative to a shallow one', () => { + const deep = pw.parkWeatherRead({ dims: park({ left_line: 360, right_line: 360 }), wx: wx(72), league }); + expect(deep.multipliers.home_run).toBeLessThan(1); + }); +}); + +describe('air is read where it exists and nowhere else', () => { + it('heat adds carry, cold removes it', () => { + const hot = pw.parkWeatherRead({ dims: park(), wx: wx(95), league }); + const cold = pw.parkWeatherRead({ dims: park(), wx: wx(45), league }); + expect(hot.multipliers.home_run).toBeGreaterThan(cold.multipliers.home_run); + expect(hot.carry).toBeGreaterThan(0); + expect(cold.carry).toBeLessThan(0); + }); + + it('altitude carries on its own', () => { + const denver = pw.parkWeatherRead({ dims: park({ elevation: 5200 }), wx: wx(72), league }); + const sea = pw.parkWeatherRead({ dims: park({ elevation: 20 }), wx: wx(72), league }); + expect(denver.multipliers.home_run).toBeGreaterThan(sea.multipliers.home_run); + }); + + it('a CLOSED roof does not apply the outside temperature', () => { + // The ball is not flying through the weather; pretending otherwise would + // read a dome game off the sky above it. + const domeHot = pw.parkWeatherRead({ dims: park({ roof_type: 'Dome' }), wx: wx(95), league }); + const domeCold = pw.parkWeatherRead({ dims: park({ roof_type: 'Dome' }), wx: wx(45), league }); + expect(domeHot.multipliers.home_run).toBeCloseTo(domeCold.multipliers.home_run, 6); + expect(domeHot.air_inputs).not.toContain('temperature'); + expect(domeHot.air_inputs).toContain('elevation'); + }); + + it('absent temperature contributes nothing rather than a reference value', () => { + const r = pw.parkWeatherRead({ dims: park(), wx: { wx_temp_f: null }, league }); + expect(r.air_inputs).not.toContain('temperature'); + expect(r.readable).toBe(true); + }); +}); + +describe('wind is refused, loudly', () => { + it('never reads wind, and says so on every read', () => { + // Speed and bearing are both present. They are still not enough: without + // park orientation the same bearing is blowing out at one park and in at + // another, and using speed alone would assert an effect while discarding + // the sign that decides what the effect is. + const calm = pw.parkWeatherRead({ dims: park(), wx: { wx_temp_f: 72, wx_wind_speed_mph: 0, wx_wind_direction_deg: 0 }, league }); + const gale = pw.parkWeatherRead({ dims: park(), wx: { wx_temp_f: 72, wx_wind_speed_mph: 35, wx_wind_direction_deg: 220 }, league }); + expect(gale.multipliers).toEqual(calm.multipliers); + expect(gale.wind_readable).toBe(false); + expect(gale.wind_reason).toMatch(/orientation/); + }); +}); + +describe('honesty', () => { + it('no park at all → null, not a neutral-looking read', () => { + expect(pw.parkWeatherRead({ dims: null, wx: wx(72), league })).toBeNull(); + expect(pw.parkWeatherRead({ dims: park(), wx: wx(72), league: null })).toBeNull(); + }); + + it('a league-average park in reference air leaves the shape alone', () => { + const r = pw.parkWeatherRead({ dims: park({ left_line: league.left_line, right_line: league.right_line, left_center: league.left_center, right_center: league.right_center, center: league.center }), wx: wx(pw.REF_TEMP_F), league }); + expect(r.multipliers.home_run).toBeCloseTo(1, 2); + expect(r.multipliers.double).toBeCloseTo(1, 2); + }); + + it('the effect is bounded however absurd the park', () => { + const absurd = pw.parkWeatherRead({ dims: park({ left_line: 200, right_line: 200, elevation: 30000 }), wx: wx(130), league }); + for (const v of Object.values(absurd.multipliers)) { + expect(v).toBeLessThanOrEqual(1 + pw.MAX_EFFECT + 1e-9); + expect(v).toBeGreaterThanOrEqual(1 - pw.MAX_EFFECT - 1e-9); + } + }); + + it('reshaped shares remain a distribution', () => { + const r = pw.parkWeatherRead({ dims: park({ left_center: 410, right_center: 410 }), wx: wx(90), league }); + const out = pw.applyToShares({ single: 0.66, double: 0.20, triple: 0.02, home_run: 0.12 }, r); + const sum = Object.values(out).reduce((a, b) => a + b, 0); + expect(sum).toBeCloseTo(1, 3); + expect(out.double).toBeGreaterThan(0.20); + }); + + it('NO read means NO sentence', () => { + expect(pw.explain(null, 'Coors Field')).toBeNull(); + expect(pw.explain(pw.parkWeatherRead({ dims: park({ elevation: 5200 }), wx: wx(72), league }), 'Coors Field')) + .toMatch(/Coors Field/); + }); +}); diff --git a/web/public/sw.js b/web/public/sw.js index d62f3ca..89ac4c3 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':'c538c7074a9cd0b1ddc15086dc87bc5f','url':'/_next/static/HiOmr6hb2kywYMIwOA1BX/_buildManifest.js'},{'revision':'b6652df95db52feb4daf4eca35380933','url':'/_next/static/HiOmr6hb2kywYMIwOA1BX/_ssgManifest.js'},{'revision':null,'url':'/_next/static/chunks/1079-cffc1eb37436de53.js'},{'revision':null,'url':'/_next/static/chunks/1393-e01c6861d0341a69.js'},{'revision':null,'url':'/_next/static/chunks/1896-97eb79100b49d1c0.js'},{'revision':null,'url':'/_next/static/chunks/1958-56cbbb8dba15fd2f.js'},{'revision':null,'url':'/_next/static/chunks/2346-36e36720a5f6591a.js'},{'revision':null,'url':'/_next/static/chunks/3263-1fd6000d3a990905.js'},{'revision':null,'url':'/_next/static/chunks/4084-66205e1ccdaad554.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/7551-4c9aa7502ea6cc30.js'},{'revision':null,'url':'/_next/static/chunks/7602.2868ff821d53ee09.js'},{'revision':null,'url':'/_next/static/chunks/7729-7bedda2e8167a4e7.js'},{'revision':null,'url':'/_next/static/chunks/7888-abba63ea3f0367ce.js'},{'revision':null,'url':'/_next/static/chunks/7918-b6bc29652564489b.js'},{'revision':null,'url':'/_next/static/chunks/8200-a9fcdcf30804c18b.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-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/_not-found/page-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/about/page-9ced3ac417a2a9e5.js'},{'revision':null,'url':'/_next/static/chunks/app/account/page-9300f08c33aa8887.js'},{'revision':null,'url':'/_next/static/chunks/app/admin/page-43ddd38031c7119e.js'},{'revision':null,'url':'/_next/static/chunks/app/api/accuracy/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/admin/stats/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/books/%5B...path%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/checkout/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/combat/%5Bdate%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/content/%5B...path%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/desk-showcase/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/desk/pack/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/fight/%5Bid%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/founders/count/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/futures/%5Bsport%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/gamelines/%5Bsport%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/games/%5Bid%5D/props/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/games/%5Bid%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/games/tonight/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/hero-prop/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/hotlist/%5Bsport%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/intelligence/feed/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/ledger/accuracy/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/ledger/mine/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/ledger/model/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/ledger/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/lines/%5B...path%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/live/%5Bsport%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/news/%5Bsport%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/newsletter/subscribe/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/odds/mlb/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/odds/nba/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/odds/soccer/%5Bleague%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/odds/wnba/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/parlay/add-leg/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/parlay/calculate/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/parlay/grade/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/players/search/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/preferences/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/profiles/%5Bhandle%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/profiles/me/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/props/live/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/props/most-parlayed/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/props/top-graded/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/scan/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/schedule/%5Bsport%5D/injuries/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/schedule/%5Bsport%5D/lineups/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/schedule/%5Bsport%5D/pitchers/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/schedule/%5Bsport%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/slips/parse/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/snapshot/%5Bsport%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/snapshot/summary/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/stats/cascade/%5Bplayer%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/stats/depth/%5Bteam%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/stats/leaders/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/stats/lineup/%5Bteam%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/stats/parlays-graded/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/stats/pitcher/%5Bname%5D/arsenal/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/stats/player/%5Bname%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/stats/public/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/streaks/%5Bsport%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/stripe/portal/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/team/%5Babbr%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/ticker/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/user/profile/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/user/recent-scans/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/user/scan-meter/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/user/scans/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/waitlist/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/welcome-email/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/auth/callback/page-e6df9771a50edb87.js'},{'revision':null,'url':'/_next/static/chunks/app/blog/%5Bslug%5D/page-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/blog/page-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/compare/page-0b5cba2120f184c4.js'},{'revision':null,'url':'/_next/static/chunks/app/dashboard/page-ed32f7ef1599bacc.js'},{'revision':null,'url':'/_next/static/chunks/app/desk/page-a80df7c45d8cdb3a.js'},{'revision':null,'url':'/_next/static/chunks/app/explore/page-95cff17943e1b21e.js'},{'revision':null,'url':'/_next/static/chunks/app/fight/%5Bid%5D/page-b4ea2654859fccdb.js'},{'revision':null,'url':'/_next/static/chunks/app/forgot-password/page-a251f52b4206e8d1.js'},{'revision':null,'url':'/_next/static/chunks/app/game/%5Bid%5D/page-0a74de29a6580a35.js'},{'revision':null,'url':'/_next/static/chunks/app/help/page-10e0eae5e4e1de7c.js'},{'revision':null,'url':'/_next/static/chunks/app/intelligence/page-af6b3ddd4f155539.js'},{'revision':null,'url':'/_next/static/chunks/app/invite/page-01dda8e223484025.js'},{'revision':null,'url':'/_next/static/chunks/app/layout-5e360617e2fcb306.js'},{'revision':null,'url':'/_next/static/chunks/app/ledger/page-dd0a310602f763f6.js'},{'revision':null,'url':'/_next/static/chunks/app/login/page-d420acccfcdd18b1.js'},{'revision':null,'url':'/_next/static/chunks/app/marketplace/page-5a58750dae7c605d.js'},{'revision':null,'url':'/_next/static/chunks/app/methodology/page-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/not-found-0c22fad3cf6b2c54.js'},{'revision':null,'url':'/_next/static/chunks/app/notifications/page-9ced3ac417a2a9e5.js'},{'revision':null,'url':'/_next/static/chunks/app/offline/page-a7a57ff039afc1af.js'},{'revision':null,'url':'/_next/static/chunks/app/onboarding/page-507c881a3cf2cdad.js'},{'revision':null,'url':'/_next/static/chunks/app/opengraph-image/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/page-0122d8ce94a506c1.js'},{'revision':null,'url':'/_next/static/chunks/app/parlay/page-28b008e856897dbe.js'},{'revision':null,'url':'/_next/static/chunks/app/player/%5Bname%5D/layout-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/player/%5Bname%5D/opengraph-image/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/player/%5Bname%5D/page-ce3dde786ef481b0.js'},{'revision':null,'url':'/_next/static/chunks/app/pricing/page-4f7a8cbb499dd7da.js'},{'revision':null,'url':'/_next/static/chunks/app/privacy/page-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/profile/page-8bb575ea4a91bfdb.js'},{'revision':null,'url':'/_next/static/chunks/app/record/page-cd06771d565d2c79.js'},{'revision':null,'url':'/_next/static/chunks/app/report/page-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/responsible-gambling/page-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/scan/page-ad230d1d07a6fa65.js'},{'revision':null,'url':'/_next/static/chunks/app/settings/page-9bf003e5a54e5190.js'},{'revision':null,'url':'/_next/static/chunks/app/settings/security/page-f0d118bb0bf17bf8.js'},{'revision':null,'url':'/_next/static/chunks/app/signup/page-d34a7133af025c69.js'},{'revision':null,'url':'/_next/static/chunks/app/slip/page-32a5d1ace27127d2.js'},{'revision':null,'url':'/_next/static/chunks/app/soccer/page-9bf94a2dc316a377.js'},{'revision':null,'url':'/_next/static/chunks/app/team/%5Babbr%5D/page-78235e0ccd9f3aff.js'},{'revision':null,'url':'/_next/static/chunks/app/terminal/page-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/terms/page-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/tracker/page-2ce2d278c7e0ed48.js'},{'revision':null,'url':'/_next/static/chunks/app/twitter-image/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/u/%5Bhandle%5D/opengraph-image/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/u/%5Bhandle%5D/page-252629d55ee3c82b.js'},{'revision':null,'url':'/_next/static/chunks/app/u/%5Bhandle%5D/portrait/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/upgrade/cancel/page-3702e818a6853705.js'},{'revision':null,'url':'/_next/static/chunks/app/upgrade/desk/page-0709bc8c6f29ea65.js'},{'revision':null,'url':'/_next/static/chunks/app/upgrade/success/page-dc7c14a4f1c96dbd.js'},{'revision':null,'url':'/_next/static/chunks/app/verify/page-b121fa98601397d8.js'},{'revision':null,'url':'/_next/static/chunks/app/welcome/page-028357260721a9f9.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-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/next/dist/client/components/builtin/forbidden-2a52674a799ff6d7.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-2a52674a799ff6d7.js'},{'revision':'846118c33b2c0e922d7b3a7676f81f6f','url':'/_next/static/chunks/polyfills-42372ed130431b0a.js'},{'revision':null,'url':'/_next/static/chunks/webpack-c39c325c0a9c381a.js'},{'revision':null,'url':'/_next/static/css/69271c567ce740e5.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.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.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.woff2'},{'revision':'e71a597e376ed91862e822b5a5de8c04','url':'/_next/static/media/db96af6b531dc71f-s.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':'300b6bcc84329321d40dec63416e9566','url':'/books/bet365.svg'},{'revision':'c5d3df8f35278d119bacd44726536a53','url':'/books/betmgm.svg'},{'revision':'c0898e8b017d76457549b49df00d78dd','url':'/books/betrivers.svg'},{'revision':'8acaa0c6c9c413fe01caf8f5d9cf1ac3','url':'/books/caesars.svg'},{'revision':'7fbceb80c3466f82e5cebed0f84d00f4','url':'/books/draftkings.svg'},{'revision':'d275072bd73625ea22826b370fed3697','url':'/books/fanduel.svg'},{'revision':'8457294d0c8dcb63396875c6ae594dc2','url':'/books/hardrockbet.svg'},{'revision':'77bafdb1e2a6ff85e34038ad06a9fa31','url':'/books/pinnacle.svg'},{'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':'1cd41b3d92ff160c4635a1ee75bbc34b','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':'c538c7074a9cd0b1ddc15086dc87bc5f','url':'/_next/static/ELObVnKqqzR27BAm303VE/_buildManifest.js'},{'revision':'b6652df95db52feb4daf4eca35380933','url':'/_next/static/ELObVnKqqzR27BAm303VE/_ssgManifest.js'},{'revision':null,'url':'/_next/static/chunks/1079-cffc1eb37436de53.js'},{'revision':null,'url':'/_next/static/chunks/1393-e01c6861d0341a69.js'},{'revision':null,'url':'/_next/static/chunks/1896-97eb79100b49d1c0.js'},{'revision':null,'url':'/_next/static/chunks/1958-56cbbb8dba15fd2f.js'},{'revision':null,'url':'/_next/static/chunks/2346-36e36720a5f6591a.js'},{'revision':null,'url':'/_next/static/chunks/3263-1fd6000d3a990905.js'},{'revision':null,'url':'/_next/static/chunks/4084-66205e1ccdaad554.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/7551-4c9aa7502ea6cc30.js'},{'revision':null,'url':'/_next/static/chunks/7602.2868ff821d53ee09.js'},{'revision':null,'url':'/_next/static/chunks/7729-7bedda2e8167a4e7.js'},{'revision':null,'url':'/_next/static/chunks/7888-abba63ea3f0367ce.js'},{'revision':null,'url':'/_next/static/chunks/7918-b6bc29652564489b.js'},{'revision':null,'url':'/_next/static/chunks/8200-1ef3f805041d88d2.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-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/_not-found/page-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/about/page-9ced3ac417a2a9e5.js'},{'revision':null,'url':'/_next/static/chunks/app/account/page-9300f08c33aa8887.js'},{'revision':null,'url':'/_next/static/chunks/app/admin/page-43ddd38031c7119e.js'},{'revision':null,'url':'/_next/static/chunks/app/api/accuracy/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/admin/stats/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/books/%5B...path%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/checkout/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/combat/%5Bdate%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/content/%5B...path%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/desk-showcase/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/desk/pack/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/fight/%5Bid%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/founders/count/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/futures/%5Bsport%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/gamelines/%5Bsport%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/games/%5Bid%5D/props/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/games/%5Bid%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/games/tonight/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/hero-prop/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/hotlist/%5Bsport%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/intelligence/feed/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/ledger/accuracy/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/ledger/mine/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/ledger/model/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/ledger/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/lines/%5B...path%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/live/%5Bsport%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/news/%5Bsport%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/newsletter/subscribe/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/odds/mlb/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/odds/nba/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/odds/soccer/%5Bleague%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/odds/wnba/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/parlay/add-leg/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/parlay/calculate/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/parlay/grade/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/players/search/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/preferences/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/profiles/%5Bhandle%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/profiles/me/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/props/live/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/props/most-parlayed/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/props/top-graded/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/scan/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/schedule/%5Bsport%5D/injuries/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/schedule/%5Bsport%5D/lineups/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/schedule/%5Bsport%5D/pitchers/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/schedule/%5Bsport%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/slips/parse/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/snapshot/%5Bsport%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/snapshot/summary/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/stats/cascade/%5Bplayer%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/stats/depth/%5Bteam%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/stats/leaders/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/stats/lineup/%5Bteam%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/stats/parlays-graded/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/stats/pitcher/%5Bname%5D/arsenal/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/stats/player/%5Bname%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/stats/public/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/streaks/%5Bsport%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/stripe/portal/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/team/%5Babbr%5D/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/ticker/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/user/profile/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/user/recent-scans/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/user/scan-meter/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/user/scans/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/waitlist/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/api/welcome-email/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/auth/callback/page-e6df9771a50edb87.js'},{'revision':null,'url':'/_next/static/chunks/app/blog/%5Bslug%5D/page-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/blog/page-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/compare/page-0b5cba2120f184c4.js'},{'revision':null,'url':'/_next/static/chunks/app/dashboard/page-ed32f7ef1599bacc.js'},{'revision':null,'url':'/_next/static/chunks/app/desk/page-a80df7c45d8cdb3a.js'},{'revision':null,'url':'/_next/static/chunks/app/explore/page-95cff17943e1b21e.js'},{'revision':null,'url':'/_next/static/chunks/app/fight/%5Bid%5D/page-b4ea2654859fccdb.js'},{'revision':null,'url':'/_next/static/chunks/app/forgot-password/page-a251f52b4206e8d1.js'},{'revision':null,'url':'/_next/static/chunks/app/game/%5Bid%5D/page-0a74de29a6580a35.js'},{'revision':null,'url':'/_next/static/chunks/app/help/page-10e0eae5e4e1de7c.js'},{'revision':null,'url':'/_next/static/chunks/app/intelligence/page-af6b3ddd4f155539.js'},{'revision':null,'url':'/_next/static/chunks/app/invite/page-01dda8e223484025.js'},{'revision':null,'url':'/_next/static/chunks/app/layout-5e360617e2fcb306.js'},{'revision':null,'url':'/_next/static/chunks/app/ledger/page-dd0a310602f763f6.js'},{'revision':null,'url':'/_next/static/chunks/app/login/page-d420acccfcdd18b1.js'},{'revision':null,'url':'/_next/static/chunks/app/marketplace/page-5a58750dae7c605d.js'},{'revision':null,'url':'/_next/static/chunks/app/methodology/page-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/not-found-0c22fad3cf6b2c54.js'},{'revision':null,'url':'/_next/static/chunks/app/notifications/page-9ced3ac417a2a9e5.js'},{'revision':null,'url':'/_next/static/chunks/app/offline/page-a7a57ff039afc1af.js'},{'revision':null,'url':'/_next/static/chunks/app/onboarding/page-507c881a3cf2cdad.js'},{'revision':null,'url':'/_next/static/chunks/app/opengraph-image/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/page-0122d8ce94a506c1.js'},{'revision':null,'url':'/_next/static/chunks/app/parlay/page-28b008e856897dbe.js'},{'revision':null,'url':'/_next/static/chunks/app/player/%5Bname%5D/layout-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/player/%5Bname%5D/opengraph-image/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/player/%5Bname%5D/page-ce3dde786ef481b0.js'},{'revision':null,'url':'/_next/static/chunks/app/pricing/page-37cbf0ce9f3780ef.js'},{'revision':null,'url':'/_next/static/chunks/app/privacy/page-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/profile/page-8bb575ea4a91bfdb.js'},{'revision':null,'url':'/_next/static/chunks/app/record/page-cd06771d565d2c79.js'},{'revision':null,'url':'/_next/static/chunks/app/report/page-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/responsible-gambling/page-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/scan/page-ad230d1d07a6fa65.js'},{'revision':null,'url':'/_next/static/chunks/app/settings/page-9bf003e5a54e5190.js'},{'revision':null,'url':'/_next/static/chunks/app/settings/security/page-f0d118bb0bf17bf8.js'},{'revision':null,'url':'/_next/static/chunks/app/signup/page-d34a7133af025c69.js'},{'revision':null,'url':'/_next/static/chunks/app/slip/page-32a5d1ace27127d2.js'},{'revision':null,'url':'/_next/static/chunks/app/soccer/page-9bf94a2dc316a377.js'},{'revision':null,'url':'/_next/static/chunks/app/team/%5Babbr%5D/page-78235e0ccd9f3aff.js'},{'revision':null,'url':'/_next/static/chunks/app/terminal/page-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/terms/page-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/tracker/page-2ce2d278c7e0ed48.js'},{'revision':null,'url':'/_next/static/chunks/app/twitter-image/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/u/%5Bhandle%5D/opengraph-image/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/u/%5Bhandle%5D/page-252629d55ee3c82b.js'},{'revision':null,'url':'/_next/static/chunks/app/u/%5Bhandle%5D/portrait/route-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/app/upgrade/cancel/page-3702e818a6853705.js'},{'revision':null,'url':'/_next/static/chunks/app/upgrade/desk/page-0709bc8c6f29ea65.js'},{'revision':null,'url':'/_next/static/chunks/app/upgrade/success/page-dc7c14a4f1c96dbd.js'},{'revision':null,'url':'/_next/static/chunks/app/verify/page-b121fa98601397d8.js'},{'revision':null,'url':'/_next/static/chunks/app/welcome/page-028357260721a9f9.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-2a52674a799ff6d7.js'},{'revision':null,'url':'/_next/static/chunks/next/dist/client/components/builtin/forbidden-2a52674a799ff6d7.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-2a52674a799ff6d7.js'},{'revision':'846118c33b2c0e922d7b3a7676f81f6f','url':'/_next/static/chunks/polyfills-42372ed130431b0a.js'},{'revision':null,'url':'/_next/static/chunks/webpack-c39c325c0a9c381a.js'},{'revision':null,'url':'/_next/static/css/6277555591c8c9dc.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.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.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.woff2'},{'revision':'e71a597e376ed91862e822b5a5de8c04','url':'/_next/static/media/db96af6b531dc71f-s.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':'300b6bcc84329321d40dec63416e9566','url':'/books/bet365.svg'},{'revision':'c5d3df8f35278d119bacd44726536a53','url':'/books/betmgm.svg'},{'revision':'c0898e8b017d76457549b49df00d78dd','url':'/books/betrivers.svg'},{'revision':'8acaa0c6c9c413fe01caf8f5d9cf1ac3','url':'/books/caesars.svg'},{'revision':'7fbceb80c3466f82e5cebed0f84d00f4','url':'/books/draftkings.svg'},{'revision':'d275072bd73625ea22826b370fed3697','url':'/books/fanduel.svg'},{'revision':'8457294d0c8dcb63396875c6ae594dc2','url':'/books/hardrockbet.svg'},{'revision':'77bafdb1e2a6ff85e34038ad06a9fa31','url':'/books/pinnacle.svg'},{'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':'1cd41b3d92ff160c4635a1ee75bbc34b','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