/* Relay — shared screen primitives */ function PageHeader({ title, subtitle, icon, children }) { return (
{icon && {icon}}

{title}

{subtitle &&
{subtitle}
}
{children}
); } function Segmented({ options, value, onChange, size = "md" }) { return (
{options.map((o) => { const id = typeof o === "string" ? o : o.id; const label = typeof o === "string" ? o : o.label; const active = value === id; return ( ); })}
); } // sortable column header function SortTH({ label, col, sort, setSort, align = "left", width }) { const active = sort.col === col; return ( ); } // vertical bar chart function BarChart({ data, height = 150, accent }) { const max = Math.max(1, ...data.map((d) => d.value)); return (
{data.map((d, i) => (
{d.top}
{d.label}
))}
); } // horizontal proportion bar (per-platform share) function ShareBar({ rows, total }) { return (
{rows.map((r) => (
{r.label}
{total ? Math.round((r.value / total) * 100) : 0}%
))}
); } function Scroller({ children, pad = "22px 26px" }) { return
{children}
; } Object.assign(window, { PageHeader, Segmented, SortTH, BarChart, ShareBar, Scroller });