import { bindSegmentEvents, loadSegments } from "./segments.js"; import { bindSegmentConfigEvents } from "./segments-config.js"; import { bindStationEvents } from "./stations.js"; import { bindViewTabs } from "./views.js"; import { startOpsSocket } from "./ws.js"; async function bootstrap() { bindViewTabs(); bindSegmentEvents(); bindStationEvents(); bindSegmentConfigEvents(); startOpsSocket(); try { await loadSegments(); } catch (err) { const root = document.getElementById("segmentList"); if (root) { root.innerHTML = `
`; } } } bootstrap();