{
  "version": 3,
  "sources": ["map_beyond_switzerland.js"],
  "sourcesContent": ["// @ts-check\n/*\n * static/js/map_beyond_switzerland.js \u2014 the winter map past the Swiss\n * border, on /map/ (SNOW-1460).\n *\n * Loaded only for a reader in the map_beyond_switzerland flag\n * (public/map.html), after the map bundle and the 3-D view, and after the\n * four files it reads at parse time: swisstopo_extent.js,\n * beyond_switzerland_core.js, osm_clip_core.js and alpine_relief_core.js.\n * contour_core.js is not one of them: only the contour worker imports it,\n * and the protocol's name comes from beyond_switzerland_core.\n * It does nothing unless `#map` carries data-map-beyond-switzerland. What\n * it owns:\n *\n *   - THE PROTOCOLS. `osmclip://`, `alpinerelief://` and `dem-contours://`\n *     (SNOW-1533), registered once per MapLibre namespace (the\n *     map_3d_terrain.registerDemProtocol pattern). Each handler posts\n *     {id, url} to its worker (osm_clip_worker.js, alpine_relief_worker.js,\n *     contour_worker.js) and resolves with the bytes of the matching reply.\n *     Contour tiles go to a pool of two contour workers in turn, each with\n *     its own elevation cache: tracing is the slow part, and one worker\n *     traces serially. With no `data-contour-worker-url` (the kill switch\n *     map_beyond_switzerland_contours is off) `dem-contours://` is not\n *     registered and the plan leaves the contours out. An abort posts {type: 'cancel', id} and\n *     rejects with an AbortError; a worker's error reply, or the worker\n *     failing, rejects. The workers start on the first tile request, each\n *     sent an `init` with the scripts it imports and the polygons it needs.\n *   - THE SPLICE. On every style.load, and on styledata (MapLibre 4.x does\n *     not always fire style.load after a setStyle; map.js reinstalls its\n *     own layers on styledata for the same reason), the winter style gets\n *     beyond_switzerland_core's plan: the OSM, relief and contour sources\n *     and layers. At boot, after a basemap swap and after the 3-D view's swap.\n *     The plan is idempotent, and a style already holding the OSM source is\n *     skipped before the style is read, so the repeated events cost\n *     nothing. If the style has loaded already when this runs, it splices\n *     at once.\n *   - THE 3-D COVERAGE. With the 3-D view on the page, it is handed the\n *     Alpine ring (window.pwaMapView.setCoverage).\n *   - THE RELIEF'S TUNING. Every reader gets alpine_relief_core's\n *     TUNING_DEFAULTS. `tune(values)` normalises a new one, posts it to the\n *     relief worker as {type: 'tune'} if the worker has started (its init\n *     carries the current one otherwise), and gives the relief source's\n *     tiles a `?v=` of alpine_relief_core.tuningKey so MapLibre fetches\n *     them again; a later splice adds the source with the same key, so a\n *     basemap swap keeps the tuning. Only with data-relief-tuning on `#map`\n *     (a staff reader; map_relief_tuning.js is the panel) is a tuning saved\n *     on this device under TUNING_STORAGE_KEY read back at boot.\n *\n * Publishes `window.pwaBeyondSwitzerland` (splice, tune, tuning,\n * TUNING_STORAGE_KEY) for the tuning panel, the debugger and the tests.\n */\n(function mapBeyondSwitzerlandInit() {\n  'use strict';\n\n  const mapEl = document.getElementById('map');\n  const core = self.pwaBeyondSwitzerlandCore;\n  const clipCore = self.pwaOsmClipCore;\n  const reliefCore = self.pwaAlpineReliefCore;\n  const extent = self.pwaSwisstopoExtent;\n  const win = /** @type {any} */ (window);\n  const map = win.snowdeskMap;\n  if (!mapEl || mapEl.dataset.mapBeyondSwitzerland !== 'true') return;\n  if (!core || !clipCore || !reliefCore || !extent || !map) return;\n\n  const data = mapEl.dataset;\n\n  /** Where the staff tuning panel keeps a tuning on this device. */\n  const TUNING_STORAGE_KEY = 'snowdesk.map.reliefTuning';\n\n  /** The relief's tuning now; the defaults until a staff reader sets one. */\n  let tuning = reliefCore.TUNING_DEFAULTS;\n  /** Whether `tuning` was set, so the relief tiles carry its key. */\n  let tuned = false;\n\n  /**\n   * One worker, started on the first request, answering {id, url} with\n   * {id, data} or {id, error}.\n   *\n   * @param {string} workerUrl\n   * @param {() => object} init The `init` message, built when it starts.\n   * @returns {{request: (url: string, abortController?: AbortController) => Promise<ArrayBuffer>, post: (message: object) => boolean}}\n   */\n  function workerChannel(workerUrl, init) {\n    /** @type {?Worker} */\n    let worker = null;\n    let nextId = 1;\n    /** @type {Map<number, {resolve: (data: ArrayBuffer) => void, reject: (err: Error) => void}>} */\n    const pending = new Map();\n\n    /** @param {MessageEvent} event */\n    const onMessage = (event) => {\n      const reply = event.data || {};\n      const entry = pending.get(reply.id);\n      if (!entry) return;\n      pending.delete(reply.id);\n      if (reply.error) entry.reject(new Error(reply.error));\n      else entry.resolve(reply.data);\n    };\n\n    /** The worker itself failed: every request in flight rejects. */\n    const onError = () => {\n      const failed = [...pending.values()];\n      pending.clear();\n      if (worker) worker.terminate();\n      worker = null;\n      for (const entry of failed) entry.reject(new Error(`beyond_switzerland: ${workerUrl} failed`));\n    };\n\n    /** @returns {Worker} */\n    const ensure = () => {\n      if (worker) return worker;\n      worker = new Worker(workerUrl);\n      worker.addEventListener('message', onMessage);\n      worker.addEventListener('error', onError);\n      worker.postMessage(init());\n      return worker;\n    };\n\n    return {\n      /** Post to the worker if it has started; an unstarted one's init carries it. */\n      post(message) {\n        if (!worker) return false;\n        worker.postMessage(message);\n        return true;\n      },\n      request(url, abortController) {\n        const signal = abortController ? abortController.signal : null;\n        if (signal && signal.aborted) return Promise.reject(new DOMException('Aborted', 'AbortError'));\n        const target = ensure();\n        const id = nextId;\n        nextId += 1;\n        return new Promise((resolve, reject) => {\n          pending.set(id, { resolve, reject });\n          if (signal) {\n            signal.addEventListener('abort', () => {\n              if (!pending.has(id)) return;\n              pending.delete(id);\n              target.postMessage({ type: 'cancel', id });\n              reject(new DOMException('Aborted', 'AbortError'));\n            }, { once: true });\n          }\n          target.postMessage({ id, url });\n        });\n      },\n    };\n  }\n\n  const osm = workerChannel(data.osmClipWorkerUrl || '', () => ({\n    type: 'init',\n    kitUrl: data.vectorTileKitUrl || '',\n    coreUrl: data.osmClipCoreUrl || '',\n    styleUrl: data.osmStyleUrl || '',\n    extent: extent.EXTENT,\n  }));\n  const relief = workerChannel(data.alpineReliefWorkerUrl || '', () => ({\n    type: 'init',\n    coreUrl: data.alpineReliefCoreUrl || '',\n    demTileUrl: data.demTileUrl || '',\n    relief: extent.DETAILED_RELIEF,\n    tuning,\n  }));\n  /**\n   * The contour workers: CONTOUR_WORKERS channels, each started on its first\n   * request with its own init (and so its own elevation cache), taken in\n   * turn, since one worker traces its tiles one after another.\n   */\n  const CONTOUR_WORKERS = 2;\n  /**\n   * SNOW-1533's kill switch: with map_beyond_switzerland_contours off the\n   * page names no contour worker, and no contours are planned or fetched.\n   */\n  const contours = Boolean(data.contourWorkerUrl);\n  const contourPool = Array.from({ length: CONTOUR_WORKERS }, () => workerChannel(data.contourWorkerUrl || '', () => ({\n    type: 'init',\n    kitUrl: data.vectorTileKitUrl || '',\n    clipCoreUrl: data.osmClipCoreUrl || '',\n    coreUrl: data.contourCoreUrl || '',\n    demTileUrl: data.demTileUrl || '',\n    extent: extent.EXTENT,\n    gate: core.ALPINE_GATE,\n  })));\n  let nextContour = 0;\n\n  /**\n   * The next contour worker, round-robin.\n   *\n   * @returns {ReturnType<typeof workerChannel>}\n   */\n  function contourChannel() {\n    const channel = contourPool[nextContour];\n    nextContour = (nextContour + 1) % contourPool.length;\n    return channel;\n  }\n\n  /**\n   * The relief source's tiles with the current tuning's key.\n   *\n   * @returns {string[]}\n   */\n  function reliefTiles() {\n    const key = reliefCore.tuningKey(tuning);\n    return core.reliefSource().tiles.map((/** @type {string} */ url) => `${url}?v=${key}`);\n  }\n\n  /** Point the relief source on the map at the current tuning's tiles. */\n  function applyTuning() {\n    const source = map.getSource(core.RELIEF_SOURCE_ID);\n    if (source && typeof source.setTiles === 'function') source.setTiles(reliefTiles());\n  }\n\n  /**\n   * Change the relief's tuning: what the worker paints with, and the tiles'\n   * key, so MapLibre paints them again.\n   *\n   * @param {unknown} values Anything normaliseTuning reads.\n   * @returns {Readonly<Record<string, number>>} The tuning now in use.\n   */\n  function tune(values) {\n    tuning = reliefCore.normaliseTuning(values);\n    tuned = true;\n    relief.post({ type: 'tune', tuning });\n    applyTuning();\n    return tuning;\n  }\n\n  /** @type {WeakSet<object>} The MapLibre namespaces the protocols are on. */\n  const registered = new WeakSet();\n\n  /**\n   * Register the protocols on a MapLibre namespace, once: the contours'\n   * only while the kill switch is on.\n   *\n   * @param {any} maplibre\n   * @returns {boolean} Whether this call registered them.\n   */\n  function registerProtocols(maplibre) {\n    if (!maplibre || typeof maplibre.addProtocol !== 'function' || registered.has(maplibre)) return false;\n    registered.add(maplibre);\n    maplibre.addProtocol(\n      clipCore.PROTOCOL,\n      (/** @type {{url: string}} */ params, /** @type {AbortController} */ abortController) =>\n        osm.request(params.url, abortController).then((bytes) => ({ data: bytes })),\n    );\n    maplibre.addProtocol(\n      reliefCore.PROTOCOL,\n      (/** @type {{url: string}} */ params, /** @type {AbortController} */ abortController) =>\n        relief.request(params.url, abortController).then((bytes) => ({ data: bytes })),\n    );\n    if (contours) maplibre.addProtocol(\n      core.CONTOUR_PROTOCOL,\n      (/** @type {{url: string}} */ params, /** @type {AbortController} */ abortController) =>\n        contourChannel().request(params.url, abortController).then((bytes) => ({ data: bytes })),\n    );\n    return true;\n  }\n\n  /**\n   * Add the plan to the map's style, if it is the winter style and not\n   * spliced yet.\n   *\n   * @returns {boolean} Whether anything was added.\n   */\n  function splice() {\n    // No isStyleLoaded() guard: in MapLibre 4.x it stays false until every\n    // source's tiles and the sprite are in, and once the map goes idle no\n    // further styledata is promised, so a guarded splice could never run.\n    // map_view_3d's reinstall works the same way: try, and let a style\n    // mid-swap throw into the catch; the next style.load splices.\n    let style;\n    try {\n      style = map.getStyle();\n    } catch (_err) {\n      return false;\n    }\n    // plan() refuses a style that already has the OSM source, so it is\n    // planned as if the source were absent; the adds below skip what exists.\n    const sources = Object.assign({}, style && style.sources);\n    delete sources[core.OSM_SOURCE_ID];\n    const plan = core.plan(Object.assign({}, style, { sources }), { contours });\n    if (!plan) return false;\n    // A tuned relief keeps its key across a basemap swap.\n    const reliefDef = plan.sources[core.RELIEF_SOURCE_ID];\n    if (tuned && reliefDef) plan.sources[core.RELIEF_SOURCE_ID] = Object.assign({}, reliefDef, { tiles: reliefTiles() });\n    const last = plan.layers.length ? plan.layers[plan.layers.length - 1].layer.id : null;\n    // Done once the last planned layer is in, not once the source is: an\n    // add that threw partway leaves the source but not the rest.\n    if (map.getSource(core.OSM_SOURCE_ID) && (!last || map.getLayer(last))) return false;\n    try {\n      for (const [id, source] of Object.entries(plan.sources)) {\n        if (!map.getSource(id)) map.addSource(id, source);\n      }\n      for (const { layer, beforeId } of plan.layers) {\n        if (map.getLayer(layer.id)) continue;\n        map.addLayer(layer, beforeId && map.getLayer(beforeId) ? beforeId : undefined);\n      }\n    } catch (err) {\n      console.warn('[map] SNOW-1460: splice failed; retried on the next style event', err);\n      return false;\n    }\n    return true;\n  }\n\n  // A staff reader's saved tuning, before the first splice adds the source.\n  if (data.reliefTuning !== undefined) {\n    try {\n      const saved = window.localStorage.getItem(TUNING_STORAGE_KEY);\n      if (saved) {\n        tuning = reliefCore.normaliseTuning(JSON.parse(saved));\n        tuned = true;\n      }\n    } catch (_err) {\n      // No storage, or junk in it: the defaults.\n    }\n  }\n\n  registerProtocols(win.maplibregl);\n  map.on('style.load', splice);\n  map.on('styledata', splice);\n  splice();\n\n  if (win.pwaMapView && typeof win.pwaMapView.setCoverage === 'function') {\n    win.pwaMapView.setCoverage(core.ALPINE_GATE);\n  }\n\n  window.pwaBeyondSwitzerland = Object.freeze({\n    splice,\n    tune,\n    tuning: () => tuning,\n    TUNING_STORAGE_KEY,\n  });\n})();\n"],
  "mappings": "CAmDC,UAAoC,CACnC,aAEA,MAAMA,EAAQ,SAAS,eAAe,KAAK,EACrCC,EAAO,KAAK,yBACZC,EAAW,KAAK,eAChBC,EAAa,KAAK,oBAClBC,EAAS,KAAK,mBACdC,EAA0B,OAC1BC,EAAMD,EAAI,YAEhB,GADI,CAACL,GAASA,EAAM,QAAQ,uBAAyB,QACjD,CAACC,GAAQ,CAACC,GAAY,CAACC,GAAc,CAACC,GAAU,CAACE,EAAK,OAE1D,MAAMC,EAAOP,EAAM,QAGbQ,EAAqB,4BAG3B,IAAIC,EAASN,EAAW,gBAEpBO,EAAQ,GAUZ,SAASC,EAAcC,EAAWC,EAAM,CAEtC,IAAIC,EAAS,KACTC,EAAS,EAEb,MAAMC,E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AAGsD,EAAW,CAAE,MAAOf,EAAY,CAAE,CAAC,GACnH,MAAMgB,EAAOF,EAAK,OAAO,OAASA,EAAK,OAAOA,EAAK,OAAO,OAAS,CAAC,EAAE,MAAM,GAAK,KAGjF,GAAIhD,EAAI,UAAUL,EAAK,aAAa,IAAM,CAACuD,GAAQlD,EAAI,SAASkD,CAAI,GAAI,MAAO,GAC/E,GAAI,CACF,SAAW,CAAC3B,EAAIc,CAAM,IAAK,OAAO,QAAQW,EAAK,OAAO,EAC/ChD,EAAI,UAAUuB,CAAE,GAAGvB,EAAI,UAAUuB,EAAIc,CAAM,EAElD,SAAW,CAAE,MAAAc,EAAO,SAAAC,CAAS,IAAKJ,EAAK,OACjChD,EAAI,SAASmD,EAAM,EAAE,GACzBnD,EAAI,SAASmD,EAAOC,GAAYpD,EAAI,SAASoD,CAAQ,EAAIA,EAAW,MAAS,CAEjF,OAASC,EAAK,CACZ,eAAQ,KAAK,kEAAmEA,CAAG,EAC5E,EACT,CACA,MAAO,EACT,CAGA,GAAIpD,EAAK,eAAiB,OACxB,GAAI,CACF,MAAMqD,EAAQ,OAAO,aAAa,QAAQpD,CAAkB,EACxDoD,IACFnD,EAASN,EAAW,gBAAgB,KAAK,MAAMyD,CAAK,CAAC,EACrDlD,EAAQ,GAEZ,MAAe,CAEf,CAGFqC,EAAkB1C,EAAI,UAAU,EAChCC,EAAI,GAAG,aAAc6C,CAAM,EAC3B7C,EAAI,GAAG,YAAa6C,CAAM,EAC1BA,EAAO,EAEH9C,EAAI,YAAc,OAAOA,EAAI,WAAW,aAAgB,YAC1DA,EAAI,WAAW,YAAYJ,EAAK,WAAW,EAG7C,OAAO,qBAAuB,OAAO,OAAO,CAC1C,OAAAkD,EACA,KAAAP,EACA,OAAQ,IAAMnC,EACd,mBAAAD,CACF,CAAC,CACH,GAAG",
  "names": ["mapEl", "core", "clipCore", "reliefCore", "extent", "win", "map", "data", "TUNING_STORAGE_KEY", "tuning", "tuned", "workerChannel", "workerUrl", "init", "worker", "nextId", "pending", "onMessage", "event", "reply", "entry", "onError", "failed", "ensure", "message", "url", "abortController", "signal", "target", "id", "resolve", "reject", "osm", "relief", "CONTOUR_WORKERS", "contours", "contourPool", "nextContour", "contourChannel", "channel", "reliefTiles", "key", "applyTuning", "source", "tune", "values", "registered", "registerProtocols", "maplibre", "params", "bytes", "splice", "style", "sources", "plan", "reliefDef", "last", "layer", "beforeId", "err", "saved"]
}
