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AA,SAAwB,IAAI,CAAC,CAAC,CAAE,QAAS,CAAK,CAAE,IAC9C,EAAM,EACR,E,C","sources":["<anon>","frontend/js/clockSkew.ts","node_modules/@parcel/runtime-js/lib/runtime-6e2808532984d304.js","node_modules/@parcel/runtime-js/lib/helpers/browser/css-loader.js","node_modules/@parcel/runtime-js/lib/helpers/cacheLoader.js","node_modules/@parcel/runtime-js/lib/helpers/browser/js-loader.js","node_modules/@parcel/runtime-js/lib/runtime-4f147ef987a1291f.js","node_modules/@parcel/runtime-js/lib/runtime-d43956e75c6ea5f9.js","node_modules/@parcel/runtime-js/lib/runtime-59f456f3008e49b7.js","frontend/js/app.tsx","frontend/js/polyfills.ts"],"sourcesContent":["(() => {\n\nfunction $parcel$export(e, n, v, s) {\n  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\n\nvar $parcel$bundleURL;\nfunction $parcel$resolve(url) {\n  url = parcelRequire.i?.[url] || url;\n  if (!$parcel$bundleURL) {\n    try {\n      throw new Error();\n    } catch (err) {\n      var matches = ('' + err.stack).match(\n        /(https?|file|ftp|(chrome|moz|safari-web)-extension):\\/\\/[^)\\n]+/g,\n      );\n      if (matches) {\n        $parcel$bundleURL = matches[0];\n      } else {\n        return $parcel$distDir + url;\n      }\n    }\n  }\n  return new URL($parcel$distDir + url, $parcel$bundleURL).toString();\n}\n\nfunction $parcel$extendImportMap(map) {\n  Object.assign(parcelRequire.i ??= {}, map);\n}\n\n      var $parcel$global = globalThis;\n    var $parcel$distDir = \"../\";\n\nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequire94c2\"];\n\nif (parcelRequire == null) {\n  parcelRequire = function(id) {\n    if (id in $parcel$modules) {\n      return $parcel$modules[id].exports;\n    }\n    if (id in $parcel$inits) {\n      var init = $parcel$inits[id];\n      delete $parcel$inits[id];\n      var module = {id: id, exports: {}};\n      $parcel$modules[id] = module;\n      init.call(module.exports, module, module.exports);\n      return module.exports;\n    }\n    var err = new Error(\"Cannot find module '\" + id + \"'\");\n    err.code = 'MODULE_NOT_FOUND';\n    throw err;\n  };\n\n  parcelRequire.register = function register(id, init) {\n    $parcel$inits[id] = init;\n  };\n\n  $parcel$global[\"parcelRequire94c2\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\nparcelRegister(\"fQ7Le\", function(module, exports) {\n\n$parcel$export(module.exports, \"recordSkew\", () => $ffaea11cfec06492$export$def260633a3aacbc);\n$parcel$export(module.exports, \"now\", () => $ffaea11cfec06492$export$461939dd4422153);\n// Some clients (notably Windows PCs with stale clocks) have clocks\n// that drift seconds-to-minutes from real time, which makes \"X seconds ago\"\n// labels nonsense. Each response from our backend carries a `Date` header,\n// so we use it to estimate the offset between the client clock and real time\n// and apply it wherever we render relative times.\nlet $ffaea11cfec06492$var$skew = 0;\nfunction $ffaea11cfec06492$export$def260633a3aacbc(response) {\n    const dateHeader = response.headers.get(\"Date\");\n    if (!dateHeader) return;\n    const serverTime = Date.parse(dateHeader);\n    if (Number.isNaN(serverTime)) return;\n    const now = Date.now();\n    if (serverTime > now) $ffaea11cfec06492$var$skew = serverTime - now;\n    else // if skew is negative, assume it's due to network latency - we're only correcting for slow clocks\n    $ffaea11cfec06492$var$skew = 0;\n}\nfunction $ffaea11cfec06492$export$461939dd4422153() {\n    return Date.now() + $ffaea11cfec06492$var$skew;\n}\n\n});\n\nparcelRegister(\"cr4q5\", function(module, exports) {\n\n\n\n\nmodule.exports = Promise.all([\n    (parcelRequire(\"dpsEJ\"))($parcel$resolve(\"371hI\")),\n    (parcelRequire(\"2kW5t\"))($parcel$resolve(\"2aD4j\")),\n    (parcelRequire(\"2kW5t\"))($parcel$resolve(\"fhYoz\")),\n    (parcelRequire(\"2kW5t\"))($parcel$resolve(\"c3m4M\"))\n]).then(()=>parcelRequire('bjy5Q'));\n\n});\nparcelRegister(\"dpsEJ\", function(module, exports) {\n\"use strict\";\n\nvar $1AZhQ = parcelRequire(\"1AZhQ\");\nmodule.exports = $1AZhQ(function(bundle) {\n    return new Promise(function(resolve, reject) {\n        if (typeof document === 'undefined') return resolve();\n        var link = document.createElement('link');\n        link.rel = 'stylesheet';\n        link.href = bundle;\n        // Don't insert the same link element twice (e.g. if it was already in the HTML)\n        var existingLinks = document.getElementsByTagName('link');\n        if (Array.from(existingLinks).some(function(existing) {\n            return existing.href === link.href && existing.rel.indexOf('stylesheet') > -1;\n        })) {\n            resolve();\n            return;\n        }\n        link.onerror = function(e) {\n            link.onerror = link.onload = null;\n            link.remove();\n            reject(e);\n        };\n        link.onload = function() {\n            link.onerror = link.onload = null;\n            resolve();\n        };\n        document.getElementsByTagName('head')[0].appendChild(link);\n    });\n});\n\n});\nparcelRegister(\"1AZhQ\", function(module, exports) {\n\"use strict\";\nvar $1298b18491524f7b$var$cachedBundles = {};\nvar $1298b18491524f7b$var$cachedPreloads = {};\nvar $1298b18491524f7b$var$cachedPrefetches = {};\nfunction $1298b18491524f7b$var$getCache(type) {\n    switch(type){\n        case 'preload':\n            return $1298b18491524f7b$var$cachedPreloads;\n        case 'prefetch':\n            return $1298b18491524f7b$var$cachedPrefetches;\n        default:\n            return $1298b18491524f7b$var$cachedBundles;\n    }\n}\nmodule.exports = function(loader, type) {\n    return function(bundle) {\n        var cache = $1298b18491524f7b$var$getCache(type);\n        if (cache[bundle]) return cache[bundle];\n        return cache[bundle] = loader.apply(null, arguments).catch(function(e) {\n            delete cache[bundle];\n            throw e;\n        });\n    };\n};\n\n});\n\n\nparcelRegister(\"2kW5t\", function(module, exports) {\n\"use strict\";\n\nvar $1AZhQ = parcelRequire(\"1AZhQ\");\nmodule.exports = $1AZhQ(function(bundle) {\n    return new Promise(function(resolve, reject) {\n        // Don't insert the same script twice (e.g. if it was already in the HTML)\n        var existingScripts = document.getElementsByTagName('script');\n        if ([].concat(existingScripts).some(function(script) {\n            return script.src === bundle;\n        })) {\n            resolve();\n            return;\n        }\n        var preloadLink = document.createElement('link');\n        preloadLink.href = bundle;\n        preloadLink.rel = 'preload';\n        preloadLink.as = 'script';\n        document.head.appendChild(preloadLink);\n        var script = document.createElement('script');\n        script.async = true;\n        script.type = 'text/javascript';\n        script.src = bundle;\n        script.onerror = function(e) {\n            var error = new TypeError(\"Failed to fetch dynamically imported module: \".concat(bundle, \". Error: \").concat(e.message));\n            script.onerror = script.onload = null;\n            script.remove();\n            reject(error);\n        };\n        script.onload = function() {\n            script.onerror = script.onload = null;\n            resolve();\n        };\n        document.getElementsByTagName('head')[0].appendChild(script);\n    });\n});\n\n});\n\n\nparcelRegister(\"4Mcs8\", function(module, exports) {\n\n\n\nmodule.exports = Promise.all([\n    (parcelRequire(\"2kW5t\"))($parcel$resolve(\"dElhg\")),\n    (parcelRequire(\"2kW5t\"))($parcel$resolve(\"fhYoz\")),\n    (parcelRequire(\"2kW5t\"))($parcel$resolve(\"fQPn6\"))\n]).then(()=>parcelRequire('gvks6'));\n\n});\n\nparcelRegister(\"9uCHU\", function(module, exports) {\n\n\n\n\n\nmodule.exports = Promise.all([\n    (parcelRequire(\"2kW5t\"))($parcel$resolve(\"dElhg\")),\n    (parcelRequire(\"dpsEJ\"))($parcel$resolve(\"371hI\")),\n    (parcelRequire(\"2kW5t\"))($parcel$resolve(\"2aD4j\")),\n    (parcelRequire(\"2kW5t\"))($parcel$resolve(\"fhYoz\")),\n    (parcelRequire(\"2kW5t\"))($parcel$resolve(\"laetJ\"))\n]).then(()=>parcelRequire('9ULQw'));\n\n});\n\nvar $e87b1d1cbcc78dd4$exports = {};\n$parcel$extendImportMap({\n    \"c3m4M\": \"ServiceMapMap.f2bb5003.js\",\n    \"fhYoz\": \"ServiceMapMap.07a9b69a.js\",\n    \"2aD4j\": \"ServiceMapMap.cb3987ef.js\",\n    \"gEYZl\": \"osm_bright.5c32475d.json\",\n    \"douFH\": \"maplibre-worker.5ec6d756.js\",\n    \"371hI\": \"ServiceMapMap.b109d5a3.css\",\n    \"fQPn6\": \"mountServiceMap.410bd5da.js\",\n    \"dElhg\": \"mountServiceMap.609f0c14.js\",\n    \"laetJ\": \"mountBigMap.9a01bca4.js\"\n});\n\nif (typeof Object.hasOwn !== \"function\") Object.hasOwn = (o, key)=>Object.prototype.hasOwnProperty.call(o, key);\n\n\n\nvar $fQ7Le = parcelRequire(\"fQ7Le\");\nif (typeof window.globalThis === \"undefined\") window.globalThis = window;\nconst $520799f62a4e362f$var$mapLink = document.getElementById(\"map-link\");\nconst $520799f62a4e362f$var$hugeMap = document.getElementById(\"hugemap\");\n\n\n\nif (window.SERVICE_ID && $520799f62a4e362f$var$mapLink) {\n    const serviceId = window.SERVICE_ID;\n    let opened = false;\n    const openMap = ()=>{\n        if (!opened && window.location.hash === \"#map\") {\n            opened = true;\n            (parcelRequire(\"cr4q5\")).catch(()=>{\n            // never mind, ServiceMap will ask for it again\n            });\n            (parcelRequire(\"4Mcs8\")).then(({ default: mount })=>{\n                mount($520799f62a4e362f$var$mapLink, serviceId);\n            });\n        }\n    };\n    fetch(`/vehicles.json?service=${serviceId}`).then((response)=>{\n        (0, $fQ7Le.recordSkew)(response);\n        response.json().then((vehicles)=>{\n            const link = $520799f62a4e362f$var$mapLink.querySelector(\"a\");\n            if (opened || !link) return;\n            const count = vehicles.length;\n            if (count === 1) link.textContent = `Map (tracking ${count} bus)`;\n            else if (count) link.textContent = `Map (tracking ${count} buses)`;\n            else link.textContent = \"Map\";\n        });\n    }, ()=>{\n    // never mind\n    });\n    window.addEventListener(\"hashchange\", openMap);\n    openMap();\n} else if ($520799f62a4e362f$var$hugeMap) (parcelRequire(\"9uCHU\")).then(({ default: mount })=>{\n    mount($520799f62a4e362f$var$hugeMap);\n});\n\n})();\n//# sourceMappingURL=app.js.map\n","// Some clients (notably Windows PCs with stale clocks) have clocks\n// that drift seconds-to-minutes from real time, which makes \"X seconds ago\"\n// labels nonsense. Each response from our backend carries a `Date` header,\n// so we use it to estimate the offset between the client clock and real time\n// and apply it wherever we render relative times.\n\nlet skew = 0;\n\nexport function recordSkew(response: Response): void {\n  const dateHeader = response.headers.get(\"Date\");\n  if (!dateHeader) {\n    return;\n  }\n  const serverTime = Date.parse(dateHeader);\n  if (Number.isNaN(serverTime)) {\n    return;\n  }\n  const now = Date.now();\n  if (serverTime > now) {\n    skew = serverTime - now;\n  } else {\n    // if skew is negative, assume it's due to network latency - we're only correcting for slow clocks\n    skew = 0;\n  }\n}\n\nexport function now(): number {\n  return Date.now() + skew;\n}\n","module.exports = Promise.all([require(\"./helpers/browser/css-loader\")(parcelRequire.resolve(\"371hI\")), require(\"./helpers/browser/js-loader\")(parcelRequire.resolve(\"2aD4j\")), require(\"./helpers/browser/js-loader\")(parcelRequire.resolve(\"fhYoz\")), require(\"./helpers/browser/js-loader\")(parcelRequire.resolve(\"c3m4M\"))]).then(() => parcelRequire('bjy5Q'));","\"use strict\";\n\nvar cacheLoader = require('../cacheLoader');\nmodule.exports = cacheLoader(function (bundle) {\n  return new Promise(function (resolve, reject) {\n    if (typeof document === 'undefined') {\n      return resolve();\n    }\n    var link = document.createElement('link');\n    link.rel = 'stylesheet';\n    link.href = bundle;\n\n    // Don't insert the same link element twice (e.g. if it was already in the HTML)\n    var existingLinks = document.getElementsByTagName('link');\n    if (Array.from(existingLinks).some(function (existing) {\n      return existing.href === link.href && existing.rel.indexOf('stylesheet') > -1;\n    })) {\n      resolve();\n      return;\n    }\n    link.onerror = function (e) {\n      link.onerror = link.onload = null;\n      link.remove();\n      reject(e);\n    };\n    link.onload = function () {\n      link.onerror = link.onload = null;\n      resolve();\n    };\n    document.getElementsByTagName('head')[0].appendChild(link);\n  });\n});","\"use strict\";\n\nvar cachedBundles = {};\nvar cachedPreloads = {};\nvar cachedPrefetches = {};\nfunction getCache(type) {\n  switch (type) {\n    case 'preload':\n      return cachedPreloads;\n    case 'prefetch':\n      return cachedPrefetches;\n    default:\n      return cachedBundles;\n  }\n}\nmodule.exports = function (loader, type) {\n  return function (bundle) {\n    var cache = getCache(type);\n    if (cache[bundle]) {\n      return cache[bundle];\n    }\n    return cache[bundle] = loader.apply(null, arguments).catch(function (e) {\n      delete cache[bundle];\n      throw e;\n    });\n  };\n};","\"use strict\";\n\nvar cacheLoader = require('../cacheLoader');\nmodule.exports = cacheLoader(function (bundle) {\n  return new Promise(function (resolve, reject) {\n    // Don't insert the same script twice (e.g. if it was already in the HTML)\n    var existingScripts = document.getElementsByTagName('script');\n    if ([].concat(existingScripts).some(function (script) {\n      return script.src === bundle;\n    })) {\n      resolve();\n      return;\n    }\n    var preloadLink = document.createElement('link');\n    preloadLink.href = bundle;\n    preloadLink.rel = 'preload';\n    preloadLink.as = 'script';\n    document.head.appendChild(preloadLink);\n    var script = document.createElement('script');\n    script.async = true;\n    script.type = 'text/javascript';\n    script.src = bundle;\n    script.onerror = function (e) {\n      var error = new TypeError(\"Failed to fetch dynamically imported module: \".concat(bundle, \". Error: \").concat(e.message));\n      script.onerror = script.onload = null;\n      script.remove();\n      reject(error);\n    };\n    script.onload = function () {\n      script.onerror = script.onload = null;\n      resolve();\n    };\n    document.getElementsByTagName('head')[0].appendChild(script);\n  });\n});","module.exports = Promise.all([require(\"./helpers/browser/js-loader\")(parcelRequire.resolve(\"dElhg\")), require(\"./helpers/browser/js-loader\")(parcelRequire.resolve(\"fhYoz\")), require(\"./helpers/browser/js-loader\")(parcelRequire.resolve(\"fQPn6\"))]).then(() => parcelRequire('gvks6'));","module.exports = Promise.all([require(\"./helpers/browser/js-loader\")(parcelRequire.resolve(\"dElhg\")), require(\"./helpers/browser/css-loader\")(parcelRequire.resolve(\"371hI\")), require(\"./helpers/browser/js-loader\")(parcelRequire.resolve(\"2aD4j\")), require(\"./helpers/browser/js-loader\")(parcelRequire.resolve(\"fhYoz\")), require(\"./helpers/browser/js-loader\")(parcelRequire.resolve(\"laetJ\"))]).then(() => parcelRequire('9ULQw'));","parcelRequire.extendImportMap({\"c3m4M\":\"ServiceMapMap.f2bb5003.js\",\"fhYoz\":\"ServiceMapMap.07a9b69a.js\",\"2aD4j\":\"ServiceMapMap.cb3987ef.js\",\"gEYZl\":\"osm_bright.5c32475d.json\",\"douFH\":\"maplibre-worker.5ec6d756.js\",\"371hI\":\"ServiceMapMap.b109d5a3.css\",\"fQPn6\":\"mountServiceMap.410bd5da.js\",\"dElhg\":\"mountServiceMap.609f0c14.js\",\"laetJ\":\"mountBigMap.9a01bca4.js\"});","import \"./polyfills\";\n\nimport { recordSkew } from \"./clockSkew\";\n\ndeclare global {\n  interface Window {\n    SERVICE_ID?: number;\n    globalThis: Window;\n  }\n}\n\nif (typeof window.globalThis === \"undefined\") {\n  window.globalThis = window;\n}\n\nconst mapLink = document.getElementById(\"map-link\");\nconst hugeMap = document.getElementById(\"hugemap\");\n\nif (window.SERVICE_ID && mapLink) {\n  const serviceId = window.SERVICE_ID;\n\n  let opened = false;\n\n  const openMap = () => {\n    if (!opened && window.location.hash === \"#map\") {\n      opened = true;\n      import(\"./ServiceMapMap\").catch(() => {\n        // never mind, ServiceMap will ask for it again\n      });\n      import(\"./mountServiceMap\").then(({ default: mount }) => {\n        mount(mapLink, serviceId);\n      });\n    }\n  };\n\n  fetch(`/vehicles.json?service=${serviceId}`).then(\n    (response) => {\n      recordSkew(response);\n      response.json().then((vehicles: unknown[]) => {\n        const link = mapLink.querySelector(\"a\");\n        if (opened || !link) {\n          return;\n        }\n        const count = vehicles.length;\n        if (count === 1) {\n          link.textContent = `Map (tracking ${count} bus)`;\n        } else if (count) {\n          link.textContent = `Map (tracking ${count} buses)`;\n        } else {\n          link.textContent = \"Map\";\n        }\n      });\n    },\n    () => {\n      // never mind\n    },\n  );\n\n  window.addEventListener(\"hashchange\", openMap);\n  openMap();\n} else if (hugeMap) {\n  import(\"./mountBigMap\").then(({ default: mount }) => {\n    mount(hugeMap);\n  });\n}\n","declare global {\n  interface ObjectConstructor {\n    hasOwn(o: object, key: PropertyKey): boolean;\n  }\n}\n\nif (typeof Object.hasOwn !== \"function\") {\n  Object.hasOwn = (o, key) => Object.prototype.hasOwnProperty.call(o, key);\n}\n\nexport {};\n"],"names":["$parcel$export","e","n","v","s","Object","defineProperty","get","set","enumerable","configurable","$parcel$resolve","url","parcelRequire","i","$parcel$bundleURL","Error","err","matches","stack","match","$parcel$distDir","URL","toString","$parcel$global","globalThis","$parcel$modules","$parcel$inits","id","exports","init","module","call","code","register","parcelRegister","$ffaea11cfec06492$export$def260633a3aacbc","$ffaea11cfec06492$export$461939dd4422153","$ffaea11cfec06492$var$skew","response","dateHeader","headers","serverTime","Date","parse","Number","isNaN","now","Promise","all","then","$1AZhQ","bundle","resolve","reject","document","link","createElement","rel","href","Array","from","getElementsByTagName","some","existing","indexOf","onerror","onload","remove","appendChild","$1298b18491524f7b$var$cachedBundles","$1298b18491524f7b$var$cachedPreloads","$1298b18491524f7b$var$cachedPrefetches","loader","type","cache","$1298b18491524f7b$var$getCache","apply","arguments","catch","concat","script","src","preloadLink","as","head","async","error","TypeError","message","assign","hasOwn","o","key","prototype","hasOwnProperty","$fQ7Le","window","$520799f62a4e362f$var$mapLink","getElementById","$520799f62a4e362f$var$hugeMap","SERVICE_ID","serviceId","opened","openMap","location","hash","default","mount","fetch","recordSkew","json","vehicles","querySelector","count","length","textContent","addEventListener"],"version":3,"file":"app.js.map"}