// public/assets/js/eventsWorker.js

onmessage = function(e) {
  const { eventsUrl } = e.data;
  fetch(eventsUrl)
    .then(r => r.json())
    .then(data => postMessage({ type: 'events', data }));
};
