// Per-page data Django injects via `{{ bootstrap|json_script:"bootstrap-data" }}` // in templates/app.html. Read once at boot, before the router/app are created. export const bootstrap: Record = (() => { const el = document.getElementById("bootstrap-data"); if (!el?.textContent) return {}; try { return JSON.parse(el.textContent); } catch { return {}; } })();