{
  "version": 3,
  "sources": ["slope_classes_core.js"],
  "sourcesContent": ["/*\n * static/js/slope_classes_core.js \u2014 the slope-class ramp, in one place\n * (SNOW-1073).\n *\n * Five classes of steep ground, 30/35/40/45/50+ degrees, each with its\n * colour. The ramp is the SLF slope classification swisstopo's\n * \"Slope classes over 30\u00B0\" raster painted with (SNOW-691): those are the\n * colours a Swiss ski tourer already reads as slope angle, so Snowdesk kept\n * them when it stopped showing that raster.\n *\n * Two modules paint with it, and they must agree to the hex:\n *\n *   - terrain_filter_core.js \u2014 the terrain filter's \"colour by slope class\"\n *     mode, which paints the map's slope layer from our own terrain-class\n *     tiles (SLOPE_PALETTE);\n *   - route_slope_core.js \u2014 a saved route's core from z14, its rail and its\n *     elevation profile, which add a sixth \"gentle\" bucket in front.\n *\n * So a route crossing a shaded face is the colour of the shading under it,\n * and both colours come from the same terrain model (swissALTI3D on the\n * 5 m grid) with the same 5\u00B0 boundaries. See\n * docs/decisions/slope-layer-is-painted-from-our-class-tiles.md.\n *\n * Must load before both of those modules: each reads this at parse time.\n *\n * Exports (frozen `self.pwaSlopeClassesCore`):\n *\n *   CLASSES \u2014 the five steep classes, gentlest first\n */\n\n// @ts-check\n\n(function () {\n  'use strict';\n\n  /**\n   * The five painted classes, gentlest first.\n   *\n   * `from` is inclusive and `to` exclusive, so exactly 35\u00B0 is in\n   * `slope-35`; the classes are named for their lower bound. `token` names\n   * the `@theme` custom property the legend swatch is painted with\n   * (`src/css/main.css`) and `hex` is that token's value \u2014 MapLibre paint\n   * properties and canvas pixels cannot read a custom property, so the\n   * literal is kept here and a Vitest test asserts the two agree.\n   *\n   * Nothing under 30\u00B0 is painted on the map, which is why there is no\n   * entry for it here: route_slope_core.js adds its own gentle bucket\n   * because a LINE cannot be transparent without appearing to break.\n   */\n  const CLASSES = Object.freeze([\n    Object.freeze({ id: 'slope-30', from: 30, to: 35, token: '--color-slope-30', hex: '#f2e50a' }),\n    Object.freeze({ id: 'slope-35', from: 35, to: 40, token: '--color-slope-35', hex: '#f46f24' }),\n    Object.freeze({ id: 'slope-40', from: 40, to: 45, token: '--color-slope-40', hex: '#de055b' }),\n    Object.freeze({ id: 'slope-45', from: 45, to: 50, token: '--color-slope-45', hex: '#c889bb' }),\n    Object.freeze({ id: 'slope-50', from: 50, to: null, token: '--color-slope-50', hex: '#4b4b4b' }),\n  ]);\n\n  self.pwaSlopeClassesCore = Object.freeze({\n    CLASSES: CLASSES,\n  });\n})();\n"],
  "mappings": "CAgCC,UAAY,CACX,aAgBA,MAAMA,EAAU,OAAO,OAAO,CAC5B,OAAO,OAAO,CAAE,GAAI,WAAY,KAAM,GAAI,GAAI,GAAI,MAAO,mBAAoB,IAAK,SAAU,CAAC,EAC7F,OAAO,OAAO,CAAE,GAAI,WAAY,KAAM,GAAI,GAAI,GAAI,MAAO,mBAAoB,IAAK,SAAU,CAAC,EAC7F,OAAO,OAAO,CAAE,GAAI,WAAY,KAAM,GAAI,GAAI,GAAI,MAAO,mBAAoB,IAAK,SAAU,CAAC,EAC7F,OAAO,OAAO,CAAE,GAAI,WAAY,KAAM,GAAI,GAAI,GAAI,MAAO,mBAAoB,IAAK,SAAU,CAAC,EAC7F,OAAO,OAAO,CAAE,GAAI,WAAY,KAAM,GAAI,GAAI,KAAM,MAAO,mBAAoB,IAAK,SAAU,CAAC,CACjG,CAAC,EAED,KAAK,oBAAsB,OAAO,OAAO,CACvC,QAASA,CACX,CAAC,CACH,GAAG",
  "names": ["CLASSES"]
}
