// One source per worker: the CBOR decode of a full relay firehose stays off the page's thread. import { runSource } from "./source.js"; let stop; onmessage = ({ data }) => { stop?.abort(); stop = new AbortController(); if (!data) return; runSource(data.url, { ...data, signal: stop.signal, emit: (frame, recv) => postMessage({ frame, recv }), status: (status) => postMessage({ status }) }); };