diff --git a/.eslintrc.json b/.eslintrc.json index 9d6a128..bcddb2c 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -9,26 +9,9 @@ "ecmaVersion": 2018 }, "rules": { - "indent": [ - "error", - 2 - ], - "linebreak-style": [ - "error", - "unix" - ], - "quotes": [ - "error", - "single", - { "avoidEscape": true } - ], - "semi": [ - "error", - "always" - ], - "no-console": [ - "off", - "always" - ] + "indent": ["error", 2], + "linebreak-style": ["error", "unix"], + "semi": ["error", "always"], + "no-console": ["off", "always"] } } diff --git a/.gitignore b/.gitignore index 7a874f3..b43bb8c 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,5 @@ sandbox shading *land-polygons* grid +dist +*.osm.pbf diff --git a/.prettierrc b/.prettierrc index 6e778b4..963354f 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,4 +1,3 @@ { - "trailingComma": "all", - "singleQuote": true + "printWidth": 120 } diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..ad92582 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "editor.formatOnSave": true +} diff --git a/README.md b/README.md index d23fc9d..29f11f8 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,14 @@ ## Features -* Mapnik configuration in Javascript adding all benefits of scripting (preventing repetition, programatic style generation, …) -* Map tile serving (TMS) -* PDF output -* Configurable map pre-rendering -* On-demand tile rendering (if tile is not rendered yet) -* Detection of dirty tiles (based on changes reported by imposm3) and rendering scheduling -* Easy style development and debugging (save and reload) -* Many features are configurable +- Mapnik configuration in Javascript adding all benefits of scripting (preventing repetition, programatic style generation, …) +- Map tile serving (TMS) +- PDF output +- Configurable map pre-rendering +- On-demand tile rendering (if tile is not rendered yet) +- Detection of dirty tiles (based on changes reported by imposm3) and rendering scheduling +- Easy style development and debugging (save and reload) +- Many features are configurable ## Demo diff --git a/config/default.json5 b/config/default.json5 index 72ca1b6..64fca45 100644 --- a/config/default.json5 +++ b/config/default.json5 @@ -1,19 +1,19 @@ { db: { - type: 'postgis', - host: 'localhost', + type: "postgis", + host: "localhost", port: 5432, - user: 'gis', - dbname: 'gis', - password: 'secret', + user: "gis", + dbname: "gis", + password: "secret", estimateExtent: false, - extent: '557173.4135719,4364860.6746929,3333877.3735052365809679,6659193.9171888176351786', + extent: "557173.4135719,4364860.6746929,3333877.3735052365809679,6659193.9171888176351786", max_size: 24, }, dirs: { - tiles: 'tiles', - expires: 'expires', - fonts: 'fonts', + tiles: "tiles", + expires: "expires", + fonts: "fonts", }, server: { port: 4000, @@ -35,15 +35,16 @@ limits: { minZoom: 0, maxZoom: 19, - polygon: 'limit.geojson', + polygon: "limit.geojson", scales: [1, 2, 3], cleanup: true, }, - prerender: { // set to null to disable pre-rendering + // set to null to disable pre-rendering + prerender: { // workers: 8, commented out = use num of cpus minZoom: 8, maxZoom: 14, - polygon: 'limit.geojson', + polygon: "limit.geojson", zoomPrio: [12, 13, 14, 15, 11, 16, 10, 9, 8], }, rerenderOlderThanMs: 0, // use 0 to disable @@ -52,9 +53,9 @@ notFoundAsTransparent: true, maxMapUseCount: false, format: { - extension: 'jpeg', - mimeType: 'image/jpeg', - codec: 'jpeg92', + extension: "jpeg", + mimeType: "image/jpeg", + codec: "jpeg92", }, minExpiredBatchSize: 500, expiresZoom: 14, // imposm3 is configured to check for expired tiles on zoom 14 diff --git a/config/docker.json5 b/config/docker.json5 index ece0ae1..fe2f604 100644 --- a/config/docker.json5 +++ b/config/docker.json5 @@ -1,11 +1,11 @@ { db: { - type: 'postgis', - host: 'freemap-postgis', + type: "postgis", + host: "freemap-postgis", port: 5432, - user: 'postgres', - dbname: 'postgres', - password: 'secret', + user: "postgres", + dbname: "postgres", + password: "secret", }, forceTileRendering: true, dumpXml: false, diff --git a/doc/DOCKER.md b/doc/DOCKER.md index 731a788..14a434f 100644 --- a/doc/DOCKER.md +++ b/doc/DOCKER.md @@ -4,7 +4,7 @@ ## Requirements -* Docker +- Docker ## Initial setup @@ -47,9 +47,9 @@ docker run --rm --name=freemap-mapnik -v $(pwd):/freemap-mapnik --network=freema Alternatives: -* open [preview.html](../preview.html) in your browser - * after changing and saving some style (eg. [app/style/index.js](../app/style/index.js)) just reload the page -* use any app where you can enter following TMS URL template: `http://localhost:4000/{z}/{x}/{y}` -* use JSOM - * use TMS map URL `tms[19]:http://localhost:4000/{zoom}/{x}/{y}` - * after changing and saving some style right-click the map and choose _FLush tile cache_. +- open [preview.html](../preview.html) in your browser + - after changing and saving some style (eg. [app/style/index.js](../app/style/index.js)) just reload the page +- use any app where you can enter following TMS URL template: `http://localhost:4000/{z}/{x}/{y}` +- use JSOM + - use TMS map URL `tms[19]:http://localhost:4000/{zoom}/{x}/{y}` + - after changing and saving some style right-click the map and choose _FLush tile cache_. diff --git a/doc/INSTALL.md b/doc/INSTALL.md index 3dab16a..8d3ab12 100644 --- a/doc/INSTALL.md +++ b/doc/INSTALL.md @@ -153,10 +153,8 @@ gdalwarp -overwrite -of GTiff -ot Float32 -co NBITS=16 -co TILED=YES -co PREDICT # -s_srs "+proj=krovak +ellps=bessel +nadgrids=slovak" ``` - gdal_translate -of AAIGrid square.tif square.asc - Convert HGT to tiff ``` diff --git a/freemap-mapserver.d.ts b/freemap-mapserver.d.ts new file mode 100644 index 0000000..3a60d64 --- /dev/null +++ b/freemap-mapserver.d.ts @@ -0,0 +1 @@ +declare module "freemap-mapserver"; diff --git a/index.js b/index.js deleted file mode 100644 index bb33108..0000000 --- a/index.js +++ /dev/null @@ -1,8 +0,0 @@ -const { startMapserver } = require('freemap-mapserver'); -const { mapnikConfig, generateFreemapStyle } = require('./style'); -const { initIcons } = require('./style/routes'); -const { legend } = require('./legend'); - -initIcons().then(() => { - startMapserver(mapnikConfig, generateFreemapStyle, legend); -}); diff --git a/index.ts b/index.ts new file mode 100644 index 0000000..c46fdbf --- /dev/null +++ b/index.ts @@ -0,0 +1,8 @@ +import { startMapserver } from "freemap-mapserver"; +import { mapnikConfig, generateFreemapStyle } from "./style"; +import { initIcons } from "./style/routes"; +import { legend } from "./legend"; + +initIcons().then(() => { + startMapserver(mapnikConfig, generateFreemapStyle, legend); +}); diff --git a/legend.js b/legend.js deleted file mode 100644 index f4956b5..0000000 --- a/legend.js +++ /dev/null @@ -1,1215 +0,0 @@ -function propsForZoom(zoom) { - const factor = Math.pow(2, 18 - zoom); - - return { - zoom, - bbox: [-0.00018 * factor, -0.00008 * factor, 0.00018 * factor, 0.00008 * factor], - }; -} - -const props = propsForZoom(18); - -const routeDefaults = { - id: 1, - h_red: 0, - h_blue: 0, - h_green: 0, - h_yellow: 0, - h_black: 0, - h_white: 0, - h_orange: 0, - h_purple: 0, - h_none: 0, - h_red_loc: 0, - h_blue_loc: 0, - h_green_loc: 0, - h_yellow_loc: 0, - h_black_loc: 0, - h_white_loc: 0, - h_orange_loc: 0, - h_purple_loc: 0, - h_none_loc: 0, - b_red: 0, - b_blue: 0, - b_green: 0, - b_yellow: 0, - b_black: 0, - b_white: 0, - b_orange: 0, - b_purple: 0, - b_none: 0, - s_red: 0, - s_blue: 0, - s_green: 0, - s_yellow: 0, - s_black: 0, - s_white: 0, - s_orange: 0, - s_purple: 0, - s_none: 0, - r_red: 0, - r_blue: 0, - r_green: 0, - r_yellow: 0, - r_black: 0, - r_white: 0, - r_orange: 0, - r_purple: 0, - r_none: 0, - refs1: '', - refs2: '', - off1: 0, - off2l: 0, -}; - -/** - * - * @param {string[]} styles - * @param {Record} properties - */ -function asLine(styles, properties, reverse, forZoom = 18) { - const factor = Math.pow(2, 18 - forZoom); - - return { - styles, - geojson: { - type: 'Feature', - geometry: { - type: 'LineString', - coordinates: [ - [reverse ? 0.00018 : -0.00018, reverse ? 0.00004 : -0.00004].map(x => x * factor), - [ reverse? -0.00018 : 0.00018, reverse ? -0.00004 : 0.00004].map(x => x * factor), - ], - }, - properties, - }, - }; -} - -/** - * - * @param {string[]} styles - * @param {Record} properties - */ -function asPoint(styles, properties, yOffset = 0) { - return { - styles, - geojson: { - type: 'Feature', - geometry: { type: 'Point', coordinates: [0, yOffset] }, - properties, - }, - }; -} - -/** - * - * @param {string[]} styles - * @param {Record} properties - */ -function asArea(styles, properties, forZoom = 18) { - const factor = Math.pow(2, 18 - forZoom); - - return { - styles, - geojson: { - type: 'Feature', - geometry: { - type: 'Polygon', - coordinates: [ - [ - [factor * -0.00015, factor * -0.00007], - [factor * -0.00017, factor * 0.00006], - [factor * 0.00015, factor * 0.00007], - [factor * 0.00017, factor * -0.00006], - [factor * -0.00015, factor * -0.00007], - ], - ], - }, - properties, - }, - }; -} - -const forest = asArea(['landcover'], { type: 'forest' }); - -const roadDefaults = { - class: 'highway', - service: '', - bridge: '', - tunnel: '', - tracktype: '', - oneway: 0, - trail_visibility: 1, -}; - -function road(type, en, sk, it, noForest = false, trailVisibility = 0) { - return { - categoryId: 'communications', - name: { - en, - sk, - it, - }, - layers: [ - noForest ? null : forest, - asLine(['higwayGlows', 'highways', 'highway_names'], { - ...roadDefaults, type, trail_visibility: 0.666 ** trailVisibility, - }), - ].filter(Boolean), - ...props, - }; -} - -function poi(categoryId, type, en, sk, it, eithEle, additional = {}) { - return { - categoryId, - name: { - en, - sk, - it, - }, - layers: [ - forest, - asPoint(['features', 'feature_names'], { - name: 'Abc', - type, - ele: eithEle ? 320 : '', - ...additional - }, eithEle ? -0.00005 : -0.00003), - ], - ...props, - }; -} - -function landcover(type, en, sk, it) { - return { - categoryId: 'landcover', - name: { - en, - sk, - it, - }, - layers: [asArea(['landcover'], { type })], - ...props - }; -} - - -const track1 = asLine(['higwayGlows', 'highways'], { - ...roadDefaults, - type: 'track', - tracktype: 'grade1', -}); - -const track3 = asLine(['higwayGlows', 'highways'], { - ...roadDefaults, - type: 'track', - tracktype: 'grade3', -}); - -const track3rev = asLine(['higwayGlows', 'highways'], { - ...roadDefaults, - type: 'track', - tracktype: 'grade3', -}, true); - -const legend = { - categories: [ - { - id: 'communications', - name: { - en: 'Roads', - sk: 'Cesty', - it: 'Strade', - }, - }, - { - id: 'railway', - name: { - en: 'Railways', - sk: 'Železnice', - it: 'Ferrovie', - }, - }, - { - id: 'landcover', - name: { - en: 'Land use', - sk: 'Plochy', - it: 'Uso del suolo', - }, - }, - { - id: 'borders', - name: { - en: 'Borders, areas', - sk: 'Hranice, oblasti', - it: 'Confini, aree', - }, - }, - { - id: 'accomodation', - name: { - en: 'Accomodation and shelters', - sk: 'Ubytovanie a prístrešky', - it: 'Alloggi e rifugi', - }, - }, - { - id: 'natural_poi', - name: { - en: 'Natural Points of Interest', - sk: 'Prírodné body záujmu', - it: 'Punti di interesse naturale', - }, - }, - { - id: 'gastro_poi', - name: { - en: 'Gastronomy', - sk: 'Gastronómia', - it: 'Gastronomia', - }, - }, - { - id: 'water', - name: { - en: 'Water', - sk: 'Voda', - it: 'Acqua', - }, - }, - { - id: 'poi', - name: { - en: 'Other Points of Interest', - sk: 'Ostatné body záujmu', - it: 'Altri punti di interesse', - }, - }, - { - id: 'terrain', - name: { - en: 'Terrain', - sk: 'Terén', - it: 'Terreno', - }, - }, - { - id: 'other', - name: { - en: 'Other', - sk: 'Ostatné', - it: 'Altri', - }, - }, - ], - items: [ - { - categoryId: 'terrain', - name: { - en: 'gully', - sk: 'roklina', - it: 'Canalone', - }, - layers: [ - forest, - asLine(['feature_lines'], { - type: 'gully' - }), - ], - ...props, - }, - { - categoryId: 'terrain', - name: { - en: 'cliff', - sk: 'bralo', - it: 'Rupe', - }, - layers: [ - forest, - asLine(['feature_lines_maskable'], { - type: 'cliff' - }), - ], - ...props, - }, - { - categoryId: 'terrain', - name: { - en: 'earth bank', - sk: 'ochranná hrádza', - it: 'Terrapieno', - }, - layers: [ - forest, - asLine(['feature_lines_maskable'], { - type: 'earth_bank' - }), - ], - ...props, - }, - { - categoryId: 'terrain', - name: { - en: 'embankment', - sk: 'nábrežie, násyp, hrádza', - it: 'Argine', - }, - layers: [ - forest, - asLine(['feature_lines'], { - type: 'embankment' - }), - ], - ...props, - }, - { - categoryId: 'terrain', - name: { - en: 'dyke', - sk: 'násyp, hrádza', - it: 'Diga', - }, - layers: [ - forest, - asLine(['feature_lines'], { - type: 'dyke' - }), - ], - ...props, - }, - { - categoryId: 'terrain', - name: { - en: 'cutline', - sk: 'prierez', - it: 'Area disboscata', - }, - layers: [ - forest, - asLine(['cutlines'], { - type: 'cutline' - }), - ], - ...props, - }, - { - categoryId: 'terrain', - name: { - en: 'tree row', - sk: 'stromoradie', - it: 'Filare di alberi', - }, - layers: [ - asLine(['feature_lines'], { - type: 'tree_row' - }, false, 16), - ], - ...propsForZoom(16), - }, - { - categoryId: 'communications', - name: { - en: 'international, national or regional hiking trail', - sk: 'medzinárodná, národná alebo regionálna turistická trasa', - it: 'Percorsi escursionistici internazionali, nazionali o regionali', - }, - layers: [ - forest, - track3rev, - asLine(['routes', 'route_names'], { - ...routeDefaults, - h_blue: 1, - off1: 1, - refs1: '2817', - }, true), - ], - ...props, - }, - { - categoryId: 'communications', - name: { - en: 'local hiking trail', - sk: 'miestna turistická trasa', - it: 'Percorso escursionistico locale', - }, - layers: [ - forest, - track3rev, - asLine(['routes', 'route_names'], { - ...routeDefaults, - h_blue_loc: 1, - off1: 1, - refs1: '1A', - }, true), - ], - ...props, - }, - { - categoryId: 'communications', - name: { - en: 'bicycle trail', - sk: 'cyklotrasa', - it: 'percorso ciclistico', - }, - layers: [ - forest, - track3, - asLine(['routes', 'route_names'], { - ...routeDefaults, - b_blue: 1, - off1: 1, - refs2: '028', - }), - ], - ...props, - }, - { - categoryId: 'communications', - name: { - en: 'x-country ski trail', - sk: 'lyžiarska (bežkárska) trasa', - it: 'percorso sci-alpinismo', - }, - layers: [ - forest, - track3, - asLine(['routes', 'route_names'], { - ...routeDefaults, - s_blue: 1, - off1: 1, - refs2: 'X2', - }), - ], - ...props, - }, - { - categoryId: 'communications', - name: { - en: 'horse trail', - sk: 'jazdecká trasa', - it: 'percorso a cavallo', - }, - layers: [ - forest, - track3rev, - asLine(['routes', 'route_names'], { - ...routeDefaults, - r_blue: 1, - off1: 1, - refs1: 'Neigh', - }, true), - ], - ...props, - }, - - road('motorway', 'highway, motorway', 'diaľnica a cesta pre motorové vozidlá', 'autostrada'), - road('primary', 'primary road', 'cesta 1. triedy', 'primaria'), - road('secondary', 'secondary road', 'cesta 2. triedy', 'secondaria'), - road('tertiary', 'tertiary road', 'cesta 3. triedy', 'terziaria'), - road('residential', 'street, unclassified road or road of unknown kind', 'ulica, neklasifikovaná cesta alebo cesta neznámeho druhu', 'residenziale'), - ...['', 1, 2, 3, 4, 5].map((grade) => ({ - categoryId: 'communications', - name: { - en: 'track ' + (grade ? `(grade ${grade})` : '(unknown grade)') + (grade === 1 ? ', service road' : ''), - sk: `lesná alebo poľná cesta (${grade ? `kvalita ${grade}` : 'neznáma kvalita'})${grade === 1 ? ', servisná/prístupová cesta' : ''}`, - it: 'traccia ' + (grade ? `(grade ${grade})` : '(grade sconosciuto)') + (grade === 1 ? ', strada di servizio' : ''), - }, - layers: [ - forest, - asLine(['higwayGlows', 'highways', 'highway_names'], { - ...roadDefaults, - type: 'track', - name: 'Abc', - tracktype: grade ? `grade${grade}` : '', - }), - ], - ...props, - })), - road('bridleway', 'bridleway', 'chodník pre kone', 'mulattiera'), - road('cycleway', 'cycleway', 'cyklochodník', 'pista ciclabile'), - road('path', 'sidewalk, path, platform, pedestrian', 'chodník, cestička, nástupište, pešia zóna', 'sentiero'), - road('steps', 'steps', 'schody', 'scale'), - road('construction', 'road in construction', 'komunikácia vo výstavbe', 'in costruzione'), - road('raceway', 'raceway', 'pretekárska dráha', 'pista'), - road('piste', 'piste', 'bežkárska dráha/zjazdovka', 'pista'), - road('via_ferrata', 'via ferrata', 'ferrata', 'via ferrata'), - { - categoryId: 'communications', - name: { - en: 'bridge', - sk: 'most', - it: 'ponte', - }, - layers: [ - forest, - asLine(['higwayGlows', 'highways', 'highway_names'], { - ...roadDefaults, - type: 'secondary', - name: 'Abc', - bridge: 1, - }), - ], - ...props, - }, - { - categoryId: 'communications', - name: { - en: 'tunnel', - sk: 'tunel', - it: 'tunnel', - }, - layers: [ - forest, - asLine(['higwayGlows', 'highways', 'highway_names'], { - ...roadDefaults, - type: 'secondary', - name: 'Abc', - tunnel: 1, - }), - ], - ...props, - }, - { - categoryId: 'communications', - name: { - en: 'access denied for pedestrians', - sk: 'zákaz vstupu pre chodcov', - it: 'accesso vietato ai pedoni', - }, - layers: [ - forest, - track1, - asLine(['accessRestrictions'], { - no_bicycle: 0, - no_foot: 1 - }), - ], - ...props, - }, - { - categoryId: 'communications', - name: { - en: 'access denied cyclists', - sk: 'zákaz vjazdu pre cyklistov', - it: 'accesso vietato ai ciclisti', - }, - layers: [ - forest, - track1, - asLine(['accessRestrictions'], { - no_bicycle: 1, - no_foot: 0 - }), - ], - ...props, - }, - { - categoryId: 'communications', - name: { - en: 'access denied for pedestrians or cyclists', - sk: 'zákaz vstupu pre chodcov a cyklistov', - it: 'accesso vietato a pedoni e ciclisti', - }, - layers: [ - forest, - track1, - asLine(['accessRestrictions'], { - no_bicycle: 1, - no_foot: 1 - }), - ], - ...props, - }, - { - categoryId: 'communications', - name: { - en: 'oneway', - sk: 'jednosmerka', - it: 'senso unico', - }, - layers: [ - forest, - asLine(['higwayGlows', 'highways'], { - type: 'service', - class: 'highway', - bridge: '', - tunnel: '', - tracktype: '', - oneway: 1 - }), - ], - ...props, - }, - road('path', 'excellent or unspecified trail visibility', 'viditeľnosť trasy je výborná alebo neurčená', 'visibilitò eccellente o non specificata', false, 0), - road('path', 'good trail visibility', 'viditeľnosť trasy je dobrá', 'buona visibilità della traccia', false, 1), - road('path', 'trail is mostly visible', 'trasa je väčšinou viditeľná', 'traccia prevalentemente visibile', false, 2), - road('path', 'trail is sometimes visible and sometimes not', 'trasa je striedavo viditeľná', 'traccia talvolta non visibile', false, 3), - road('path', 'trail is mostly not visible', 'trasa nie je väčšinou viditeľná', 'traccia prevalentemente non visibile', false, 4), - road('path', 'trail is not visible at all', 'trasa nie je vôbec viditeľná', 'traccia non visibile', false, 5), - { - categoryId: 'railway', - name: { - en: 'main railway', - sk: 'hlavná železničná trať', - it: 'ferrovia principale', - }, - layers: [ - forest, - asLine(['higwayGlows', 'highways'], { - ...roadDefaults, - name: 'Abc', - type: 'rail', - class: 'railway', - }), - ], - ...props, - }, - { - categoryId: 'railway', - name: { - en: 'service or light railway, tram railway', - sk: 'servisná alebo vedľajšia železničná trať, električková trať', - it: 'ferrovia di servizio, linea tram', - }, - layers: [ - forest, - asLine(['higwayGlows', 'highways'], { - ...roadDefaults, - name: 'Abc', - type: 'rail', - class: 'railway', - service: 'service', - }), - ], - ...props, - }, - { - categoryId: 'railway', - name: { - en: 'miniature, monorail, funicular, narrow_gauge or subway railway', - sk: 'miniatúrna koľaj, jednokoľajka, úzkokoľajka, pozemná lanová dráha alebo metro', - it: 'ferrovia in miniatura, monorotaia, funicolare, a scartamento ridotto o metropolitana', - }, - layers: [ - forest, - asLine(['higwayGlows', 'highways'], { - ...roadDefaults, - name: 'Abc', - type: 'miniature', - class: 'railway', - }), - ], - ...props, - }, - { - categoryId: 'railway', - name: { - en: 'railway in construction', - sk: 'železničná trať vo výstavbe', - it: 'ferrovia in costruzione', - }, - layers: [ - forest, - asLine(['higwayGlows', 'highways'], { - ...roadDefaults, - name: 'Abc', - type: 'construction', - class: 'railway', - }), - ], - ...props, - }, - { - categoryId: 'railway', - name: { - en: 'railway bridge', - sk: 'železničný most', - it: 'ponte della ferrovia', - }, - layers: [ - forest, - asLine(['higwayGlows', 'highways'], { - ...roadDefaults, - name: 'Abc', - type: 'rail', - class: 'railway', - bridge: 1, - }), - ], - ...props, - }, - { - categoryId: 'railway', - name: { - en: 'railway tunnel', - sk: 'železničný tunel', - it: 'tunnel ferroviario', - }, - layers: [ - forest, - asLine(['higwayGlows', 'highways'], { - ...roadDefaults, - name: 'Abc', - type: 'rail', - class: 'railway', - tunnel: 1, - }), - ], - ...props, - }, - poi('accomodation', 'hotel', 'hotel', 'hotel', 'hotel'), - poi('accomodation', 'motel', 'motel', 'motel', 'motel'), - poi('accomodation', 'guest_house', 'guest house', 'penzión', 'pensione'), - poi('accomodation', 'apartment', 'apartment', 'apartmán','appartamento'), - poi('accomodation', 'hostel', 'hostel', 'ubytovňa', 'ostello'), - poi('accomodation', 'chalet', 'chalet', 'chata', 'chalet'), - poi('accomodation', 'alpine_hut', 'alpine hut', 'horská chata', 'rifugio alpino'), - poi('accomodation', 'wilderness_hut', 'wilderness hut', 'chata v divočine', 'bivacco'), - poi('accomodation', 'building', 'building', 'budova', 'edificio'), - poi('accomodation', 'camp_site', 'camp site', 'kemp', 'campeggio'), - poi('accomodation', 'hunting_stand', 'hunting stand', 'poľovnícky posed', 'capanno di caccia'), - poi('accomodation', 'basic_hut', 'basic hut', 'jednoduchá chatka', 'capanno'), - poi('accomodation', 'shelter', 'shelter', 'prístrešok', 'riparo'), - poi('accomodation', 'picnic_shelter', 'picnic shelter', 'piknikový prístrešok', 'gazebo'), - poi('accomodation', 'weather_shelter', 'weather shelter', 'prístrešok pre nepriaznivé počasie', 'riparo'), - poi('accomodation', 'lean_to', 'lean-to shelter', 'prístrešok na bivak', 'tettoia'), - poi('accomodation', 'public_transport', 'public transport shelter', 'prístrešok hromadnej dopravy', 'riparo trasporti pubblici'), - - poi('poi', 'guidepost', 'guidepost', 'smerovník', 'guida', true), - poi('poi', 'board', 'board', 'tabuľa', 'pannello informativo'), - poi('poi', 'map', 'map', 'mapa', 'mappa'), - - poi('natural_poi', 'peak', 'peak', 'vrchol', 'cima', true), - poi('natural_poi', 'saddle', 'saddle', 'sedlo', 'sella'), - poi('natural_poi', 'cave_entrance', 'cave', 'jaskyňa', 'ingresso grotta'), - poi('natural_poi', 'arch', 'rock arch', 'skalné okno','arco di roccia'), - poi('natural_poi', 'rock', 'rock', 'skala', 'roccia'), - poi('natural_poi', 'stone', 'stone', 'balvan', 'pietra'), - poi('natural_poi', 'sinkhole', 'sinkhole', 'závrt', 'dolina'), - { - categoryId: 'natural_poi', - name: { - en: 'tree', - sk: 'strom', - it: 'albero', - }, - layers: [ - asPoint(['trees'], { - name: 'Abc', - type: 'tree', - }, 0), - ], - ...props, - }, - poi('natural_poi', 'tree', 'protected tree', 'chránený strom', 'albero protetto'), - poi('poi', 'viewpoint', 'viewpoint', 'výhľad', 'punto panoramico'), - - - poi('water', 'drinking_water', 'drinking water', 'pitná voda', 'acqua'), - poi('water', 'water_well', 'water well', 'studňa', 'pozzo'), - poi('water', 'spring', 'spring', 'prameň', 'sorgente', true), - poi('water', 'refitted_spring', 'refitted spring', 'upravený prameň', 'sorgente modificata', true), - poi('water', 'drinking_spring', 'drinkable spring', 'prameň pitnej vody', 'sorgente potabile', true), - poi('water', 'not_drinking_spring', 'not drinkable spring', 'prameň úžitkovej vody', 'sorgente non potabile', true), - poi('water', 'hot_spring', 'hot spring', 'termálny prameň', 'sorgente calda', true), - poi('water', 'watering_place', 'watering place', 'napájadlo','abbeveratoio'), - poi('water', 'waterfall', 'waterfall', 'vodopád', 'cascata'), - poi('water', 'dam', 'dam', 'vodopád', 'diga'), - poi('water', 'weir', 'weir', 'hrádza','stramazzo'), - poi('water', 'water_works', 'water works, covered water reservoir, water treatment plant', 'vodný zdroj, krytá vodná nádrž, čistička', 'opera idrica/trattamento acque'), - poi('water', 'fountain', 'fountain', 'fontána', 'fontanella'), - - poi('poi', 'castle', 'castle', 'hrad','castello'), - poi('poi', 'ruins', 'ruins', 'ruiny','rovine'), - - poi('poi', 'monument', 'monument', 'pomník', 'monumento'), - poi('poi', 'memorial', 'memorial', 'pamätník', 'memoriale'), - poi('poi', 'artwork', 'artwork', 'umelecké dielo', 'opera d\'arte'), - - poi('poi', 'townhall', 'townhall', 'radnica, obecný úrad','municipio'), - poi('poi', 'fire_station', 'fire station', 'hasičská stanica', 'pompieri'), - poi('poi', 'police', 'police', 'polícia', 'polizia'), - poi('poi', 'community_centre', 'community centre', 'dom kultúru, komunitné centrum','centro comunitario'), - poi('poi', 'office', 'office', 'informačné centrum', 'ufficio'), - poi('poi', 'hospital', 'hospital', 'nemocnica', 'ospedale'), - poi('poi', 'pharmacy', 'pharmacy', 'lekáreň', 'farmacia'), - poi('poi', 'bicycle', 'bicycle shop', 'cykloobchod', 'negozio bici'), - - poi('poi', 'church', 'church, chapel, cathedral, temple, basilica', 'kostol, cerkev, kaplnka, katedrála, chrám, bazilika', 'chiesa, cappella, cattedrale, tempio, basilica'), - poi('poi', 'wayside_shrine', 'wayside shrine', 'božia muka', 'edicola votiva'), - poi('poi', 'cross', 'cross', 'kríž', 'croce'), - - poi('poi', 'cinema', 'cinema', 'kino', 'cinema'), - poi('poi', 'theatre', 'theatre', 'divadlo','teatro'), - poi('poi', 'museum', 'museum', 'múzeum','museo'), - poi('poi', 'archaeological_site', 'archaeological site', 'archeologické nálezisko', 'sito archeologico'), - - poi('gastro_poi', 'pub', 'pub', 'hostinec, krčma', 'pub'), - poi('gastro_poi', 'cafe', 'cafe', 'kaviareň','caffè'), - poi('gastro_poi', 'bar', 'bar', 'bar', 'bar'), - poi('gastro_poi', 'restaurant', 'restaurant', 'reštaurácia','ristorante'), - poi('gastro_poi', 'convenience', 'convenience store', 'potraviny','minimarket'), - poi('gastro_poi', 'supermarket', 'supermarket', 'supermarket', 'supermercato'), - poi('gastro_poi', 'fast_food', 'fast food', 'rýchle občerstvenie','fastfood'), - poi('gastro_poi', 'confectionery', 'confectionery', 'cukráreň','pasticceria'), // also pastry - - poi('poi', 'bunker', 'bunker', 'bunker', 'bunker'), - poi('poi', 'boundary_stone', 'boundary stone', 'hraničný kameň', 'cippo di confine'), - - poi('poi', 'post_office', 'post office', 'pošta', 'ufficio postale'), - poi('poi', 'post_box', 'post box', 'poštová schránka', 'cassetta postale'), - poi('poi', 'telephone', 'telephone', 'telefón', 'telefono'), - - poi('railway', 'station', 'train station, halt', 'vlaková stanica, zastávka', 'stazione treni, fermata'), - poi('poi', 'bus_station', 'bus station', 'autobusová zastávka', 'stazione autobus'), - poi('poi', 'bus_stop', 'bus stop', 'autobusová zastávka', 'fermata autobus'), - poi('poi', 'taxi', 'taxi', 'taxi', 'taxi'), - poi('poi', 'fuel', 'fuel station', 'čerpacia stanica', 'stazione di servizio'), - - poi('poi', 'tower_observation', 'observation tower', 'vyhliadková veža', 'torre di osservazione'), - poi('poi', 'tower_communication', 'communication tower', 'komunikačná veža', 'torre comunicazioni'), - poi('poi', 'tower_bell_tower', 'bell tower', 'zvonica', 'torre campanaria'), - poi('poi', 'tower_other', 'tower', 'veža', 'torre'), - poi('poi', 'water_tower', 'water tower', 'vodná veža', 'torre acquedotto'), - poi('poi', 'chimney', 'chimney', 'komín', 'ciminiera'), - poi('poi', 'mast_other', 'mast', 'stožiar', 'antenna'), - - poi('poi', 'picnic_table', 'picnic table', 'stôl na piknik', 'tavolo da picnic'), - poi('poi', 'picnic_site', 'picnic site', 'miesto na piknik', 'area picnic'), - - poi('poi', 'feeding_place', 'feeding place', 'krmidlo', 'mangiatoia'), - poi('poi', 'beehive', 'beehive', 'včelí úľ', 'alveare'), - - poi('poi', 'horse_riding', 'horse riding', 'jazda na koni', 'equitazione'), - poi('poi', 'sauna', 'sauna', 'sauna', 'sauna'), - poi('poi', 'free_flying', 'paragliding', 'paraglajding', 'parapendio'), - poi('poi', 'golf_course', 'golf course', 'golfový kurt', 'golf'), - poi('poi', 'miniature_golf', 'miniature golf', 'minigolf', 'minigolf'), - poi('poi', 'soccer', 'socces', 'futbal', 'calcio'), - poi('poi', 'tennis', 'tennis', 'tenis', 'tennis'), - poi('poi', 'basketball', 'basketball', 'basketbal', 'pallacanestro'), - - poi('poi', 'forester\'s_lodge', 'forester\'s lodge', 'horáreň', 'casetta forestale'), - poi('poi', 'mine', 'mine, adit, mineshaft', 'baňa, štôlňa, šachta', 'miniera'), - poi('poi', 'disused_mine', 'disused mine, adit or mineshaft', 'zatvorená baňa, štôlňa alebo šachta', 'miniera in disuso, pozzo minerario'), - poi('poi', 'attraction', 'attraction', 'atrakcia', 'attrazione'), - - poi('poi', 'firepit', 'firepit', 'ohnisko', 'focolare'), - poi('poi', 'toilets', 'toilets', 'toalety', 'toilet'), - poi('poi', 'bench', 'bench', 'lavička', 'panchina'), - - poi('poi', 'lift_gate', 'lift gate', 'závora', 'sbarra'), - poi('poi', 'gate', 'gate', 'brána', 'cancello'), - poi('poi', 'ford', 'ford', 'brod', 'guado'), - poi('poi', 'waste_disposal', 'waste disposal', 'kontajner na odpad', 'smaltimento rifiuti'), - { - categoryId: 'water', - name: { - en: 'water area', - sk: 'vodná plocha', - it: 'area acquatica', - }, - layers: [asArea(['water_area', 'water_area_names'], { name: 'Abc' })], - ...props - }, - { - categoryId: 'water', - name: { - en: 'itermittend or seasonal water area', - sk: 'občasná alebo sezónna vodná plocha', - it: 'area acquatica intermittente o stagionale', - }, - layers: [asArea(['water_area', 'water_area_names'], { name: 'Abc', tmp: 1 })], - ...props - }, - landcover('forest', 'forest', 'les', 'foresta'), - landcover('meadow', 'meadow, park, village green, grassland', 'lúka, park, mestská zeleň, trávnatá plocha', 'prato, parco, area verde, pascolo'), - landcover('heath', 'heath', 'step', 'brughiera'), - landcover('scrub', 'scrub', 'kroviny', 'boscaglia'), - landcover('clearcut', 'clearcut', 'holorub', 'area disboscata'), - landcover('scree', 'scree', 'štrk','ghiaione'), - landcover('bare_rock', 'bare rock', 'holá skala', 'roccia nuda'), - landcover('wetland', 'wetland', 'mokraď', 'zona umida'), - landcover('bog', 'bog', 'rašelinisko','palude'), - landcover('marsh', 'marsh, fen, wet meadow', 'močiar, slatinisko, mokrá lúka', 'palude, prateria umida'), - landcover('swamp', 'swamp', 'bahnisko','pantano'), - landcover('reedbed', 'reedbed', 'rákosie','canneto'), - landcover('mangrove', 'mangrove', 'mangrovy','mangrovie'), - landcover('farmland', 'farmland', 'pole','terreno agricolo'), - landcover('farmyard', 'farmyard', 'družstvo','aia'), - landcover('orchard', 'orchard', 'ovocný sad','frutteto'), - landcover('vineyard', 'vineyard', 'vinica','vigneto'), - landcover('garden', 'garden', 'záhrada', 'giardino'), - landcover('plant_nursery', 'vivaio', 'lesná škôlka', ''), - landcover('beach', 'beach', 'pláž', 'spiaggia'), - landcover('residential', 'residential zone', 'obytná zóna', 'zona residenziale'), - landcover('commercial', 'commercial zone', 'komerčná zóna', 'zona commerciale'), - landcover('industrial', 'industrial zone, wastewater plant', 'industriálna zóna, ČOV', 'zona industriale'), - landcover('quarry', 'quarry', 'lom', 'cava'), - landcover('cemetery', 'cemetery', 'cintorín'), - landcover('playground', 'pitch, playground, golf course, track', 'ihrisko, detské ihrisko, golfové ihrisko, pretekárska dráha','campo da gioco, parco giochi, campo da golf, pista'), - landcover('parking', 'parking', 'parkovisko', 'parcheggio'), - landcover('bunker_silo', 'bunker silo', 'silo', 'sbancamento'), - landcover('landfill', 'landfill', 'skládka', 'discarica'), - { - categoryId: 'landcover', - name: { - en: 'solar power plant', - sk: 'slnečná elektráreň', - it: 'centrale fotovoltaica', - }, - layers: [asArea(['solar_power_plants'], {})], - ...props - }, - - { - categoryId: 'borders', - name: { - en: 'national park', - sk: 'národný park', - it: 'parco nazionale', - }, - layers: [asArea(['protected_areas'], { - type: 'national_park', - }, 10)], - ...propsForZoom(10), - }, - { - categoryId: 'borders', - name: { - en: 'protected area, nature reserve', - sk: 'chránená oblasť, prírodná rezervácia', - it: 'area protetta, riserva naturale', - }, - layers: [asArea(['protected_areas'], { - type: 'protected_area', - })], - ...props, - }, - { - categoryId: 'borders', - name: { - en: 'military zone', - sk: 'vojenská zóna', - it: 'zona militare', - }, - layers: [asArea(['military_areas'], { - type: 'military', - }, 10)], - ...propsForZoom(10), - }, - { - categoryId: 'borders', - name: { - en: 'state border', - sk: 'štátna hranica', - it: 'confine di stato', - }, - layers: [asArea(['borders'], {})], - ...props, - }, - { - categoryId: 'water', - name: { - en: 'river', - sk: 'rieka', - it: 'fiume', - }, - layers: [asLine(['water_line', 'water_line_names'], { - type: 'river', - tunnel: 0, - dasharray: '1000,0', - name: 'Abc', - })], - ...props, - }, - { - categoryId: 'water', - name: { - en: 'stream', - sk: 'potok', - it: 'torrente', - }, - layers: [asLine(['water_line', 'water_line_names'], { - type: 'stream', - tunnel: 0, - dasharray: '1000,0', - name: 'Abc', - })], - ...props, - }, - { - categoryId: 'water', - name: { - en: 'stream in culvert', - sk: 'potok v priepuste', - it: 'canale sotterraneo', - }, - layers: [asLine(['water_line', 'water_line_names'], { - type: 'stream', - tunnel: 1, - dasharray: '1000,0', - name: 'Abc', - })], - ...props, - }, - { - categoryId: 'water', - name: { - en: 'itermittend or seasonal stream', - sk: 'občasný alebo sezónny potok', - it: 'torrente intermittente o stagionale', - }, - layers: [asLine(['water_line', 'water_line_names'], { - type: 'stream', - tunnel: 0, - dasharray: '6,3', - name: 'Abc', - })], - ...props, - }, - { - categoryId: 'other', - name: { - en: 'aerialway', - sk: 'lanovka, vlek', - it: 'via aerea, teleferica', - }, - layers: [ - asLine(['aerialways', 'aerialway_names'], { - type: '', - name: 'Abc', - }), - ], - ...props, - }, - { - categoryId: 'other', - name: { - en: 'aeroway', - sk: 'letisková dráha', - it: 'pista atterraggio', - }, - layers: [ - asLine(['aeroways'], { - type: '', - name: 'Abc', - }), - ], - ...props, - }, - { - categoryId: 'other', - name: { - en: 'power line with power tower', - sk: 'vedenie vysokého napätia so stožiarom', - it: 'linea elettrica con torre di alimentazione', - }, - layers: [ - asLine(['feature_lines'], { - type: 'line', - }), - asPoint(['features'], { - type: 'tower', - }), - ], - ...props, - }, - { - categoryId: 'other', - name: { - en: 'minor power line with power pole', - sk: 'elektrické vedenie so stĺpom', - it: 'linea elettrica minore con palo di alimentazione', - }, - layers: [ - asLine(['feature_lines'], { - type: 'minor_line', - }), - asPoint(['features'], { - type: 'pole', - }), - ], - ...props, - }, - { - categoryId: 'other', - name: { - en: 'fence, wall', - sk: 'plot, múr', - it: 'recinzione, muro', - }, - layers: [asLine(['barrierways'], { - type: 'fence', - })], - ...props, - }, - { - categoryId: 'other', - name: { - en: 'locality name', - sk: 'názov lokality', - it: 'nome di località', - }, - layers: [ - forest, - asPoint(['locality_names'], { - type: 'locality', - name: 'Abc' - }), - ], - ...props, - }, - { - ...road('water_slide', 'water slide', 'tobogán', 'scivolo d\'acqua', true), - categoryId: 'other', - }, - { - categoryId: 'other', - name: { - en: 'pipeline', - sk: 'potrubie', - it: 'tubatura', - }, - layers: [asLine(['pipelines'], { - location: 'overground', - })], - ...props, - }, - { - categoryId: 'other', - name: { - en: 'underground pipeline', - sk: 'podzemné potrubie', - it: 'tubatura sotterranea', - }, - layers: [asLine(['pipelines'], { - location: 'underground', - })], - ...props, - }, - { - categoryId: 'other', - name: { - en: 'unfinished mapping, map feature for fixing', - sk: 'nedomapovaný prvok, prvok na opravenie', - it: 'mappatura incompiuta, indicatore per la correzione', - }, - layers: [ - asPoint(['fixmes'], {}), - ], - ...props, - }, - poi('other', 'picnic_shelter', 'private POI', 'súkromný bod záujmu', 'POI privato', undefined, { access: 'no' }), - ], -}; - -module.exports = { legend }; -// .layer('placenames', { type: 'csv', inline: ` -// id|name|type|wkt -// 1|Test 123|town|Point(21.219835 48.655111) -// ` }, { srs: '+init=epsg:4326', bufferSize: 1024 }) diff --git a/legend.ts b/legend.ts new file mode 100644 index 0000000..d88abaf --- /dev/null +++ b/legend.ts @@ -0,0 +1,1350 @@ +function propsForZoom(zoom: number) { + const factor = Math.pow(2, 18 - zoom); + + return { + zoom, + bbox: [-0.00018 * factor, -0.00008 * factor, 0.00018 * factor, 0.00008 * factor], + }; +} + +const props = propsForZoom(18); + +const routeDefaults = { + id: 1, + h_red: 0, + h_blue: 0, + h_green: 0, + h_yellow: 0, + h_black: 0, + h_white: 0, + h_orange: 0, + h_purple: 0, + h_none: 0, + h_red_loc: 0, + h_blue_loc: 0, + h_green_loc: 0, + h_yellow_loc: 0, + h_black_loc: 0, + h_white_loc: 0, + h_orange_loc: 0, + h_purple_loc: 0, + h_none_loc: 0, + b_red: 0, + b_blue: 0, + b_green: 0, + b_yellow: 0, + b_black: 0, + b_white: 0, + b_orange: 0, + b_purple: 0, + b_none: 0, + s_red: 0, + s_blue: 0, + s_green: 0, + s_yellow: 0, + s_black: 0, + s_white: 0, + s_orange: 0, + s_purple: 0, + s_none: 0, + r_red: 0, + r_blue: 0, + r_green: 0, + r_yellow: 0, + r_black: 0, + r_white: 0, + r_orange: 0, + r_purple: 0, + r_none: 0, + refs1: "", + refs2: "", + off1: 0, + off2l: 0, +}; + +/** + * + * @param {string[]} styles + * @param {Record} properties + */ +function asLine(styles: string[], properties: Record, reverse?: boolean, forZoom = 18) { + const factor = Math.pow(2, 18 - forZoom); + + return { + styles, + geojson: { + type: "Feature", + geometry: { + type: "LineString", + coordinates: [ + [reverse ? 0.00018 : -0.00018, reverse ? 0.00004 : -0.00004].map((x) => x * factor), + [reverse ? -0.00018 : 0.00018, reverse ? -0.00004 : 0.00004].map((x) => x * factor), + ], + }, + properties, + }, + }; +} + +/** + * + * @param {string[]} styles + * @param {Record} properties + */ +function asPoint(styles: string[], properties: Record, yOffset = 0) { + return { + styles, + geojson: { + type: "Feature", + geometry: { type: "Point", coordinates: [0, yOffset] }, + properties, + }, + }; +} + +/** + * + * @param {string[]} styles + * @param {Record} properties + */ +function asArea(styles: string[], properties: Record, forZoom = 18) { + const factor = Math.pow(2, 18 - forZoom); + + return { + styles, + geojson: { + type: "Feature", + geometry: { + type: "Polygon", + coordinates: [ + [ + [factor * -0.00015, factor * -0.00007], + [factor * -0.00017, factor * 0.00006], + [factor * 0.00015, factor * 0.00007], + [factor * 0.00017, factor * -0.00006], + [factor * -0.00015, factor * -0.00007], + ], + ], + }, + properties, + }, + }; +} + +const forest = asArea(["landcover"], { type: "forest" }); + +const roadDefaults = { + class: "highway", + service: "", + bridge: "", + tunnel: "", + tracktype: "", + oneway: 0, + trail_visibility: 1, +}; + +function road(type: string, en: string, sk: string, it: string, noForest = false, trailVisibility = 0) { + return { + categoryId: "communications", + name: { + en, + sk, + it, + }, + layers: [ + noForest ? null : forest, + asLine(["higwayGlows", "highways", "highway_names"], { + ...roadDefaults, + type, + trail_visibility: 0.666 ** trailVisibility, + }), + ].filter(Boolean), + ...props, + }; +} + +function poi( + categoryId: string, + type: string, + en: string, + sk: string, + it: string, + eithEle?: boolean, + additional: Record = {} +) { + return { + categoryId, + name: { + en, + sk, + it, + }, + layers: [ + forest, + asPoint( + ["features", "feature_names"], + { + name: "Abc", + type, + ele: eithEle ? 320 : "", + ...additional, + }, + eithEle ? -0.00005 : -0.00003 + ), + ], + ...props, + }; +} + +function landcover(type: string, en: string, sk: string, it: string) { + return { + categoryId: "landcover", + name: { + en, + sk, + it, + }, + layers: [asArea(["landcover"], { type })], + ...props, + }; +} + +const track1 = asLine(["higwayGlows", "highways"], { + ...roadDefaults, + type: "track", + tracktype: "grade1", +}); + +const track3 = asLine(["higwayGlows", "highways"], { + ...roadDefaults, + type: "track", + tracktype: "grade3", +}); + +const track3rev = asLine( + ["higwayGlows", "highways"], + { + ...roadDefaults, + type: "track", + tracktype: "grade3", + }, + true +); + +export const legend = { + categories: [ + { + id: "communications", + name: { + en: "Roads", + sk: "Cesty", + it: "Strade", + }, + }, + { + id: "railway", + name: { + en: "Railways", + sk: "Železnice", + it: "Ferrovie", + }, + }, + { + id: "landcover", + name: { + en: "Land use", + sk: "Plochy", + it: "Uso del suolo", + }, + }, + { + id: "borders", + name: { + en: "Borders, areas", + sk: "Hranice, oblasti", + it: "Confini, aree", + }, + }, + { + id: "accomodation", + name: { + en: "Accomodation and shelters", + sk: "Ubytovanie a prístrešky", + it: "Alloggi e rifugi", + }, + }, + { + id: "natural_poi", + name: { + en: "Natural Points of Interest", + sk: "Prírodné body záujmu", + it: "Punti di interesse naturale", + }, + }, + { + id: "gastro_poi", + name: { + en: "Gastronomy", + sk: "Gastronómia", + it: "Gastronomia", + }, + }, + { + id: "water", + name: { + en: "Water", + sk: "Voda", + it: "Acqua", + }, + }, + { + id: "poi", + name: { + en: "Other Points of Interest", + sk: "Ostatné body záujmu", + it: "Altri punti di interesse", + }, + }, + { + id: "terrain", + name: { + en: "Terrain", + sk: "Terén", + it: "Terreno", + }, + }, + { + id: "other", + name: { + en: "Other", + sk: "Ostatné", + it: "Altri", + }, + }, + ], + items: [ + { + categoryId: "terrain", + name: { + en: "gully", + sk: "roklina", + it: "Canalone", + }, + layers: [ + forest, + asLine(["feature_lines"], { + type: "gully", + }), + ], + ...props, + }, + { + categoryId: "terrain", + name: { + en: "cliff", + sk: "bralo", + it: "Rupe", + }, + layers: [ + forest, + asLine(["feature_lines_maskable"], { + type: "cliff", + }), + ], + ...props, + }, + { + categoryId: "terrain", + name: { + en: "earth bank", + sk: "ochranná hrádza", + it: "Terrapieno", + }, + layers: [ + forest, + asLine(["feature_lines_maskable"], { + type: "earth_bank", + }), + ], + ...props, + }, + { + categoryId: "terrain", + name: { + en: "embankment", + sk: "nábrežie, násyp, hrádza", + it: "Argine", + }, + layers: [ + forest, + asLine(["feature_lines"], { + type: "embankment", + }), + ], + ...props, + }, + { + categoryId: "terrain", + name: { + en: "dyke", + sk: "násyp, hrádza", + it: "Diga", + }, + layers: [ + forest, + asLine(["feature_lines"], { + type: "dyke", + }), + ], + ...props, + }, + { + categoryId: "terrain", + name: { + en: "cutline", + sk: "prierez", + it: "Area disboscata", + }, + layers: [ + forest, + asLine(["cutlines"], { + type: "cutline", + }), + ], + ...props, + }, + { + categoryId: "terrain", + name: { + en: "tree row", + sk: "stromoradie", + it: "Filare di alberi", + }, + layers: [ + asLine( + ["feature_lines"], + { + type: "tree_row", + }, + false, + 16 + ), + ], + ...propsForZoom(16), + }, + { + categoryId: "communications", + name: { + en: "international, national or regional hiking trail", + sk: "medzinárodná, národná alebo regionálna turistická trasa", + it: "Percorsi escursionistici internazionali, nazionali o regionali", + }, + layers: [ + forest, + track3rev, + asLine( + ["routes", "route_names"], + { + ...routeDefaults, + h_blue: 1, + off1: 1, + refs1: "2817", + }, + true + ), + ], + ...props, + }, + { + categoryId: "communications", + name: { + en: "local hiking trail", + sk: "miestna turistická trasa", + it: "Percorso escursionistico locale", + }, + layers: [ + forest, + track3rev, + asLine( + ["routes", "route_names"], + { + ...routeDefaults, + h_blue_loc: 1, + off1: 1, + refs1: "1A", + }, + true + ), + ], + ...props, + }, + { + categoryId: "communications", + name: { + en: "bicycle trail", + sk: "cyklotrasa", + it: "percorso ciclistico", + }, + layers: [ + forest, + track3, + asLine(["routes", "route_names"], { + ...routeDefaults, + b_blue: 1, + off1: 1, + refs2: "028", + }), + ], + ...props, + }, + { + categoryId: "communications", + name: { + en: "x-country ski trail", + sk: "lyžiarska (bežkárska) trasa", + it: "percorso sci-alpinismo", + }, + layers: [ + forest, + track3, + asLine(["routes", "route_names"], { + ...routeDefaults, + s_blue: 1, + off1: 1, + refs2: "X2", + }), + ], + ...props, + }, + { + categoryId: "communications", + name: { + en: "horse trail", + sk: "jazdecká trasa", + it: "percorso a cavallo", + }, + layers: [ + forest, + track3rev, + asLine( + ["routes", "route_names"], + { + ...routeDefaults, + r_blue: 1, + off1: 1, + refs1: "Neigh", + }, + true + ), + ], + ...props, + }, + + road("motorway", "highway, motorway", "diaľnica a cesta pre motorové vozidlá", "autostrada"), + road("primary", "primary road", "cesta 1. triedy", "primaria"), + road("secondary", "secondary road", "cesta 2. triedy", "secondaria"), + road("tertiary", "tertiary road", "cesta 3. triedy", "terziaria"), + road( + "residential", + "street, unclassified road or road of unknown kind", + "ulica, neklasifikovaná cesta alebo cesta neznámeho druhu", + "residenziale" + ), + ...["", 1, 2, 3, 4, 5].map((grade) => ({ + categoryId: "communications", + name: { + en: "track " + (grade ? `(grade ${grade})` : "(unknown grade)") + (grade === 1 ? ", service road" : ""), + sk: `lesná alebo poľná cesta (${grade ? `kvalita ${grade}` : "neznáma kvalita"})${ + grade === 1 ? ", servisná/prístupová cesta" : "" + }`, + it: + "traccia " + + (grade ? `(grade ${grade})` : "(grade sconosciuto)") + + (grade === 1 ? ", strada di servizio" : ""), + }, + layers: [ + forest, + asLine(["higwayGlows", "highways", "highway_names"], { + ...roadDefaults, + type: "track", + name: "Abc", + tracktype: grade ? `grade${grade}` : "", + }), + ], + ...props, + })), + road("bridleway", "bridleway", "chodník pre kone", "mulattiera"), + road("cycleway", "cycleway", "cyklochodník", "pista ciclabile"), + road("path", "sidewalk, path, platform, pedestrian", "chodník, cestička, nástupište, pešia zóna", "sentiero"), + road("steps", "steps", "schody", "scale"), + road("construction", "road in construction", "komunikácia vo výstavbe", "in costruzione"), + road("raceway", "raceway", "pretekárska dráha", "pista"), + road("piste", "piste", "bežkárska dráha/zjazdovka", "pista"), + road("via_ferrata", "via ferrata", "ferrata", "via ferrata"), + { + categoryId: "communications", + name: { + en: "bridge", + sk: "most", + it: "ponte", + }, + layers: [ + forest, + asLine(["higwayGlows", "highways", "highway_names"], { + ...roadDefaults, + type: "secondary", + name: "Abc", + bridge: 1, + }), + ], + ...props, + }, + { + categoryId: "communications", + name: { + en: "tunnel", + sk: "tunel", + it: "tunnel", + }, + layers: [ + forest, + asLine(["higwayGlows", "highways", "highway_names"], { + ...roadDefaults, + type: "secondary", + name: "Abc", + tunnel: 1, + }), + ], + ...props, + }, + { + categoryId: "communications", + name: { + en: "access denied for pedestrians", + sk: "zákaz vstupu pre chodcov", + it: "accesso vietato ai pedoni", + }, + layers: [ + forest, + track1, + asLine(["accessRestrictions"], { + no_bicycle: 0, + no_foot: 1, + }), + ], + ...props, + }, + { + categoryId: "communications", + name: { + en: "access denied cyclists", + sk: "zákaz vjazdu pre cyklistov", + it: "accesso vietato ai ciclisti", + }, + layers: [ + forest, + track1, + asLine(["accessRestrictions"], { + no_bicycle: 1, + no_foot: 0, + }), + ], + ...props, + }, + { + categoryId: "communications", + name: { + en: "access denied for pedestrians or cyclists", + sk: "zákaz vstupu pre chodcov a cyklistov", + it: "accesso vietato a pedoni e ciclisti", + }, + layers: [ + forest, + track1, + asLine(["accessRestrictions"], { + no_bicycle: 1, + no_foot: 1, + }), + ], + ...props, + }, + { + categoryId: "communications", + name: { + en: "oneway", + sk: "jednosmerka", + it: "senso unico", + }, + layers: [ + forest, + asLine(["higwayGlows", "highways"], { + type: "service", + class: "highway", + bridge: "", + tunnel: "", + tracktype: "", + oneway: 1, + }), + ], + ...props, + }, + road( + "path", + "excellent or unspecified trail visibility", + "viditeľnosť trasy je výborná alebo neurčená", + "visibilitò eccellente o non specificata", + false, + 0 + ), + road("path", "good trail visibility", "viditeľnosť trasy je dobrá", "buona visibilità della traccia", false, 1), + road( + "path", + "trail is mostly visible", + "trasa je väčšinou viditeľná", + "traccia prevalentemente visibile", + false, + 2 + ), + road( + "path", + "trail is sometimes visible and sometimes not", + "trasa je striedavo viditeľná", + "traccia talvolta non visibile", + false, + 3 + ), + road( + "path", + "trail is mostly not visible", + "trasa nie je väčšinou viditeľná", + "traccia prevalentemente non visibile", + false, + 4 + ), + road("path", "trail is not visible at all", "trasa nie je vôbec viditeľná", "traccia non visibile", false, 5), + { + categoryId: "railway", + name: { + en: "main railway", + sk: "hlavná železničná trať", + it: "ferrovia principale", + }, + layers: [ + forest, + asLine(["higwayGlows", "highways"], { + ...roadDefaults, + name: "Abc", + type: "rail", + class: "railway", + }), + ], + ...props, + }, + { + categoryId: "railway", + name: { + en: "service or light railway, tram railway", + sk: "servisná alebo vedľajšia železničná trať, električková trať", + it: "ferrovia di servizio, linea tram", + }, + layers: [ + forest, + asLine(["higwayGlows", "highways"], { + ...roadDefaults, + name: "Abc", + type: "rail", + class: "railway", + service: "service", + }), + ], + ...props, + }, + { + categoryId: "railway", + name: { + en: "miniature, monorail, funicular, narrow_gauge or subway railway", + sk: "miniatúrna koľaj, jednokoľajka, úzkokoľajka, pozemná lanová dráha alebo metro", + it: "ferrovia in miniatura, monorotaia, funicolare, a scartamento ridotto o metropolitana", + }, + layers: [ + forest, + asLine(["higwayGlows", "highways"], { + ...roadDefaults, + name: "Abc", + type: "miniature", + class: "railway", + }), + ], + ...props, + }, + { + categoryId: "railway", + name: { + en: "railway in construction", + sk: "železničná trať vo výstavbe", + it: "ferrovia in costruzione", + }, + layers: [ + forest, + asLine(["higwayGlows", "highways"], { + ...roadDefaults, + name: "Abc", + type: "construction", + class: "railway", + }), + ], + ...props, + }, + { + categoryId: "railway", + name: { + en: "railway bridge", + sk: "železničný most", + it: "ponte della ferrovia", + }, + layers: [ + forest, + asLine(["higwayGlows", "highways"], { + ...roadDefaults, + name: "Abc", + type: "rail", + class: "railway", + bridge: 1, + }), + ], + ...props, + }, + { + categoryId: "railway", + name: { + en: "railway tunnel", + sk: "železničný tunel", + it: "tunnel ferroviario", + }, + layers: [ + forest, + asLine(["higwayGlows", "highways"], { + ...roadDefaults, + name: "Abc", + type: "rail", + class: "railway", + tunnel: 1, + }), + ], + ...props, + }, + poi("accomodation", "hotel", "hotel", "hotel", "hotel"), + poi("accomodation", "motel", "motel", "motel", "motel"), + poi("accomodation", "guest_house", "guest house", "penzión", "pensione"), + poi("accomodation", "apartment", "apartment", "apartmán", "appartamento"), + poi("accomodation", "hostel", "hostel", "ubytovňa", "ostello"), + poi("accomodation", "chalet", "chalet", "chata", "chalet"), + poi("accomodation", "alpine_hut", "alpine hut", "horská chata", "rifugio alpino"), + poi("accomodation", "wilderness_hut", "wilderness hut", "chata v divočine", "bivacco"), + poi("accomodation", "building", "building", "budova", "edificio"), + poi("accomodation", "camp_site", "camp site", "kemp", "campeggio"), + poi("accomodation", "hunting_stand", "hunting stand", "poľovnícky posed", "capanno di caccia"), + poi("accomodation", "basic_hut", "basic hut", "jednoduchá chatka", "capanno"), + poi("accomodation", "shelter", "shelter", "prístrešok", "riparo"), + poi("accomodation", "picnic_shelter", "picnic shelter", "piknikový prístrešok", "gazebo"), + poi("accomodation", "weather_shelter", "weather shelter", "prístrešok pre nepriaznivé počasie", "riparo"), + poi("accomodation", "lean_to", "lean-to shelter", "prístrešok na bivak", "tettoia"), + poi( + "accomodation", + "public_transport", + "public transport shelter", + "prístrešok hromadnej dopravy", + "riparo trasporti pubblici" + ), + + poi("poi", "guidepost", "guidepost", "smerovník", "guida", true), + poi("poi", "board", "board", "tabuľa", "pannello informativo"), + poi("poi", "map", "map", "mapa", "mappa"), + + poi("natural_poi", "peak", "peak", "vrchol", "cima", true), + poi("natural_poi", "saddle", "saddle", "sedlo", "sella"), + poi("natural_poi", "cave_entrance", "cave", "jaskyňa", "ingresso grotta"), + poi("natural_poi", "arch", "rock arch", "skalné okno", "arco di roccia"), + poi("natural_poi", "rock", "rock", "skala", "roccia"), + poi("natural_poi", "stone", "stone", "balvan", "pietra"), + poi("natural_poi", "sinkhole", "sinkhole", "závrt", "dolina"), + { + categoryId: "natural_poi", + name: { + en: "tree", + sk: "strom", + it: "albero", + }, + layers: [ + asPoint( + ["trees"], + { + name: "Abc", + type: "tree", + }, + 0 + ), + ], + ...props, + }, + poi("natural_poi", "tree", "protected tree", "chránený strom", "albero protetto"), + poi("poi", "viewpoint", "viewpoint", "výhľad", "punto panoramico"), + + poi("water", "drinking_water", "drinking water", "pitná voda", "acqua"), + poi("water", "water_well", "water well", "studňa", "pozzo"), + poi("water", "spring", "spring", "prameň", "sorgente", true), + poi("water", "refitted_spring", "refitted spring", "upravený prameň", "sorgente modificata", true), + poi("water", "drinking_spring", "drinkable spring", "prameň pitnej vody", "sorgente potabile", true), + poi("water", "not_drinking_spring", "not drinkable spring", "prameň úžitkovej vody", "sorgente non potabile", true), + poi("water", "hot_spring", "hot spring", "termálny prameň", "sorgente calda", true), + poi("water", "watering_place", "watering place", "napájadlo", "abbeveratoio"), + poi("water", "waterfall", "waterfall", "vodopád", "cascata"), + poi("water", "dam", "dam", "vodopád", "diga"), + poi("water", "weir", "weir", "hrádza", "stramazzo"), + poi( + "water", + "water_works", + "water works, covered water reservoir, water treatment plant", + "vodný zdroj, krytá vodná nádrž, čistička", + "opera idrica/trattamento acque" + ), + poi("water", "fountain", "fountain", "fontána", "fontanella"), + + poi("poi", "castle", "castle", "hrad", "castello"), + poi("poi", "ruins", "ruins", "ruiny", "rovine"), + + poi("poi", "monument", "monument", "pomník", "monumento"), + poi("poi", "memorial", "memorial", "pamätník", "memoriale"), + poi("poi", "artwork", "artwork", "umelecké dielo", "opera d'arte"), + + poi("poi", "townhall", "townhall", "radnica, obecný úrad", "municipio"), + poi("poi", "fire_station", "fire station", "hasičská stanica", "pompieri"), + poi("poi", "police", "police", "polícia", "polizia"), + poi("poi", "community_centre", "community centre", "dom kultúru, komunitné centrum", "centro comunitario"), + poi("poi", "office", "office", "informačné centrum", "ufficio"), + poi("poi", "hospital", "hospital", "nemocnica", "ospedale"), + poi("poi", "pharmacy", "pharmacy", "lekáreň", "farmacia"), + poi("poi", "bicycle", "bicycle shop", "cykloobchod", "negozio bici"), + + poi( + "poi", + "church", + "church, chapel, cathedral, temple, basilica", + "kostol, cerkev, kaplnka, katedrála, chrám, bazilika", + "chiesa, cappella, cattedrale, tempio, basilica" + ), + poi("poi", "wayside_shrine", "wayside shrine", "božia muka", "edicola votiva"), + poi("poi", "cross", "cross", "kríž", "croce"), + + poi("poi", "cinema", "cinema", "kino", "cinema"), + poi("poi", "theatre", "theatre", "divadlo", "teatro"), + poi("poi", "museum", "museum", "múzeum", "museo"), + poi("poi", "archaeological_site", "archaeological site", "archeologické nálezisko", "sito archeologico"), + + poi("gastro_poi", "pub", "pub", "hostinec, krčma", "pub"), + poi("gastro_poi", "cafe", "cafe", "kaviareň", "caffè"), + poi("gastro_poi", "bar", "bar", "bar", "bar"), + poi("gastro_poi", "restaurant", "restaurant", "reštaurácia", "ristorante"), + poi("gastro_poi", "convenience", "convenience store", "potraviny", "minimarket"), + poi("gastro_poi", "supermarket", "supermarket", "supermarket", "supermercato"), + poi("gastro_poi", "fast_food", "fast food", "rýchle občerstvenie", "fastfood"), + poi("gastro_poi", "confectionery", "confectionery", "cukráreň", "pasticceria"), // also pastry + + poi("poi", "bunker", "bunker", "bunker", "bunker"), + poi("poi", "boundary_stone", "boundary stone", "hraničný kameň", "cippo di confine"), + + poi("poi", "post_office", "post office", "pošta", "ufficio postale"), + poi("poi", "post_box", "post box", "poštová schránka", "cassetta postale"), + poi("poi", "telephone", "telephone", "telefón", "telefono"), + + poi("railway", "station", "train station, halt", "vlaková stanica, zastávka", "stazione treni, fermata"), + poi("poi", "bus_station", "bus station", "autobusová zastávka", "stazione autobus"), + poi("poi", "bus_stop", "bus stop", "autobusová zastávka", "fermata autobus"), + poi("poi", "taxi", "taxi", "taxi", "taxi"), + poi("poi", "fuel", "fuel station", "čerpacia stanica", "stazione di servizio"), + + poi("poi", "tower_observation", "observation tower", "vyhliadková veža", "torre di osservazione"), + poi("poi", "tower_communication", "communication tower", "komunikačná veža", "torre comunicazioni"), + poi("poi", "tower_bell_tower", "bell tower", "zvonica", "torre campanaria"), + poi("poi", "tower_other", "tower", "veža", "torre"), + poi("poi", "water_tower", "water tower", "vodná veža", "torre acquedotto"), + poi("poi", "chimney", "chimney", "komín", "ciminiera"), + poi("poi", "mast_other", "mast", "stožiar", "antenna"), + + poi("poi", "picnic_table", "picnic table", "stôl na piknik", "tavolo da picnic"), + poi("poi", "picnic_site", "picnic site", "miesto na piknik", "area picnic"), + + poi("poi", "feeding_place", "feeding place", "krmidlo", "mangiatoia"), + poi("poi", "beehive", "beehive", "včelí úľ", "alveare"), + + poi("poi", "horse_riding", "horse riding", "jazda na koni", "equitazione"), + poi("poi", "sauna", "sauna", "sauna", "sauna"), + poi("poi", "free_flying", "paragliding", "paraglajding", "parapendio"), + poi("poi", "golf_course", "golf course", "golfový kurt", "golf"), + poi("poi", "miniature_golf", "miniature golf", "minigolf", "minigolf"), + poi("poi", "soccer", "socces", "futbal", "calcio"), + poi("poi", "tennis", "tennis", "tenis", "tennis"), + poi("poi", "basketball", "basketball", "basketbal", "pallacanestro"), + + poi("poi", "forester's_lodge", "forester's lodge", "horáreň", "casetta forestale"), + poi("poi", "mine", "mine, adit, mineshaft", "baňa, štôlňa, šachta", "miniera"), + poi( + "poi", + "disused_mine", + "disused mine, adit or mineshaft", + "zatvorená baňa, štôlňa alebo šachta", + "miniera in disuso, pozzo minerario" + ), + poi("poi", "attraction", "attraction", "atrakcia", "attrazione"), + + poi("poi", "firepit", "firepit", "ohnisko", "focolare"), + poi("poi", "toilets", "toilets", "toalety", "toilet"), + poi("poi", "bench", "bench", "lavička", "panchina"), + + poi("poi", "lift_gate", "lift gate", "závora", "sbarra"), + poi("poi", "gate", "gate", "brána", "cancello"), + poi("poi", "ford", "ford", "brod", "guado"), + poi("poi", "waste_disposal", "waste disposal", "kontajner na odpad", "smaltimento rifiuti"), + { + categoryId: "water", + name: { + en: "water area", + sk: "vodná plocha", + it: "area acquatica", + }, + layers: [asArea(["water_area", "water_area_names"], { name: "Abc" })], + ...props, + }, + { + categoryId: "water", + name: { + en: "itermittend or seasonal water area", + sk: "občasná alebo sezónna vodná plocha", + it: "area acquatica intermittente o stagionale", + }, + layers: [asArea(["water_area", "water_area_names"], { name: "Abc", tmp: 1 })], + ...props, + }, + landcover("forest", "forest", "les", "foresta"), + landcover( + "meadow", + "meadow, park, village green, grassland", + "lúka, park, mestská zeleň, trávnatá plocha", + "prato, parco, area verde, pascolo" + ), + landcover("heath", "heath", "step", "brughiera"), + landcover("scrub", "scrub", "kroviny", "boscaglia"), + landcover("clearcut", "clearcut", "holorub", "area disboscata"), + landcover("scree", "scree", "štrk", "ghiaione"), + landcover("bare_rock", "bare rock", "holá skala", "roccia nuda"), + landcover("wetland", "wetland", "mokraď", "zona umida"), + landcover("bog", "bog", "rašelinisko", "palude"), + landcover("marsh", "marsh, fen, wet meadow", "močiar, slatinisko, mokrá lúka", "palude, prateria umida"), + landcover("swamp", "swamp", "bahnisko", "pantano"), + landcover("reedbed", "reedbed", "rákosie", "canneto"), + landcover("mangrove", "mangrove", "mangrovy", "mangrovie"), + landcover("farmland", "farmland", "pole", "terreno agricolo"), + landcover("farmyard", "farmyard", "družstvo", "aia"), + landcover("orchard", "orchard", "ovocný sad", "frutteto"), + landcover("vineyard", "vineyard", "vinica", "vigneto"), + landcover("garden", "garden", "záhrada", "giardino"), + landcover("plant_nursery", "vivaio", "lesná škôlka", ""), + landcover("beach", "beach", "pláž", "spiaggia"), + landcover("residential", "residential zone", "obytná zóna", "zona residenziale"), + landcover("commercial", "commercial zone", "komerčná zóna", "zona commerciale"), + landcover("industrial", "industrial zone, wastewater plant", "industriálna zóna, ČOV", "zona industriale"), + landcover("quarry", "quarry", "lom", "cava"), + landcover("cemetery", "cemetery", "cintorín", "cimitero"), + landcover( + "playground", + "pitch, playground, golf course, track", + "ihrisko, detské ihrisko, golfové ihrisko, pretekárska dráha", + "campo da gioco, parco giochi, campo da golf, pista" + ), + landcover("parking", "parking", "parkovisko", "parcheggio"), + landcover("bunker_silo", "bunker silo", "silo", "sbancamento"), + landcover("landfill", "landfill", "skládka", "discarica"), + { + categoryId: "landcover", + name: { + en: "solar power plant", + sk: "slnečná elektráreň", + it: "centrale fotovoltaica", + }, + layers: [asArea(["solar_power_plants"], {})], + ...props, + }, + + { + categoryId: "borders", + name: { + en: "national park", + sk: "národný park", + it: "parco nazionale", + }, + layers: [ + asArea( + ["protected_areas"], + { + type: "national_park", + }, + 10 + ), + ], + ...propsForZoom(10), + }, + { + categoryId: "borders", + name: { + en: "protected area, nature reserve", + sk: "chránená oblasť, prírodná rezervácia", + it: "area protetta, riserva naturale", + }, + layers: [ + asArea(["protected_areas"], { + type: "protected_area", + }), + ], + ...props, + }, + { + categoryId: "borders", + name: { + en: "military zone", + sk: "vojenská zóna", + it: "zona militare", + }, + layers: [ + asArea( + ["military_areas"], + { + type: "military", + }, + 10 + ), + ], + ...propsForZoom(10), + }, + { + categoryId: "borders", + name: { + en: "state border", + sk: "štátna hranica", + it: "confine di stato", + }, + layers: [asArea(["borders"], {})], + ...props, + }, + { + categoryId: "water", + name: { + en: "river", + sk: "rieka", + it: "fiume", + }, + layers: [ + asLine(["water_line", "water_line_names"], { + type: "river", + tunnel: 0, + dasharray: "1000,0", + name: "Abc", + }), + ], + ...props, + }, + { + categoryId: "water", + name: { + en: "stream", + sk: "potok", + it: "torrente", + }, + layers: [ + asLine(["water_line", "water_line_names"], { + type: "stream", + tunnel: 0, + dasharray: "1000,0", + name: "Abc", + }), + ], + ...props, + }, + { + categoryId: "water", + name: { + en: "stream in culvert", + sk: "potok v priepuste", + it: "canale sotterraneo", + }, + layers: [ + asLine(["water_line", "water_line_names"], { + type: "stream", + tunnel: 1, + dasharray: "1000,0", + name: "Abc", + }), + ], + ...props, + }, + { + categoryId: "water", + name: { + en: "itermittend or seasonal stream", + sk: "občasný alebo sezónny potok", + it: "torrente intermittente o stagionale", + }, + layers: [ + asLine(["water_line", "water_line_names"], { + type: "stream", + tunnel: 0, + dasharray: "6,3", + name: "Abc", + }), + ], + ...props, + }, + { + categoryId: "other", + name: { + en: "aerialway", + sk: "lanovka, vlek", + it: "via aerea, teleferica", + }, + layers: [ + asLine(["aerialways", "aerialway_names"], { + type: "", + name: "Abc", + }), + ], + ...props, + }, + { + categoryId: "other", + name: { + en: "aeroway", + sk: "letisková dráha", + it: "pista atterraggio", + }, + layers: [ + asLine(["aeroways"], { + type: "", + name: "Abc", + }), + ], + ...props, + }, + { + categoryId: "other", + name: { + en: "power line with power tower", + sk: "vedenie vysokého napätia so stožiarom", + it: "linea elettrica con torre di alimentazione", + }, + layers: [ + asLine(["feature_lines"], { + type: "line", + }), + asPoint(["features"], { + type: "tower", + }), + ], + ...props, + }, + { + categoryId: "other", + name: { + en: "minor power line with power pole", + sk: "elektrické vedenie so stĺpom", + it: "linea elettrica minore con palo di alimentazione", + }, + layers: [ + asLine(["feature_lines"], { + type: "minor_line", + }), + asPoint(["features"], { + type: "pole", + }), + ], + ...props, + }, + { + categoryId: "other", + name: { + en: "fence, wall", + sk: "plot, múr", + it: "recinzione, muro", + }, + layers: [ + asLine(["barrierways"], { + type: "fence", + }), + ], + ...props, + }, + { + categoryId: "other", + name: { + en: "locality name", + sk: "názov lokality", + it: "nome di località", + }, + layers: [ + forest, + asPoint(["locality_names"], { + type: "locality", + name: "Abc", + }), + ], + ...props, + }, + { + ...road("water_slide", "water slide", "tobogán", "scivolo d'acqua", true), + categoryId: "other", + }, + { + categoryId: "other", + name: { + en: "pipeline", + sk: "potrubie", + it: "tubatura", + }, + layers: [ + asLine(["pipelines"], { + location: "overground", + }), + ], + ...props, + }, + { + categoryId: "other", + name: { + en: "underground pipeline", + sk: "podzemné potrubie", + it: "tubatura sotterranea", + }, + layers: [ + asLine(["pipelines"], { + location: "underground", + }), + ], + ...props, + }, + { + categoryId: "other", + name: { + en: "unfinished mapping, map feature for fixing", + sk: "nedomapovaný prvok, prvok na opravenie", + it: "mappatura incompiuta, indicatore per la correzione", + }, + layers: [asPoint(["fixmes"], {})], + ...props, + }, + poi("other", "picnic_shelter", "private POI", "súkromný bod záujmu", "POI privato", undefined, { access: "no" }), + ], +}; + +module.exports = { legend }; +// .layer('placenames', { type: 'csv', inline: ` +// id|name|type|wkt +// 1|Test 123|town|Point(21.219835 48.655111) +// ` }, { srs: '+init=epsg:4326', bufferSize: 1024 }) diff --git a/limit-sk.geojson b/limit-sk.geojson index 7a02ca0..883f998 100644 --- a/limit-sk.geojson +++ b/limit-sk.geojson @@ -19,82 +19,25 @@ "type": "Polygon", "coordinates": [ [ - [ - 22.17041015625, - 48.31973404047173 - ], - [ - 22.67578125, - 49.11702904077932 - ], - [ - 21.697998046875, - 49.51807644873301 - ], - [ - 20.247802734375, - 49.468124067331644 - ], - [ - 19.962158203125, - 49.296471602658066 - ], - [ - 19.489746093749996, - 49.674737880665994 - ], - [ - 18.468017578125, - 49.54659778073743 - ], - [ - 17.698974609375, - 48.95858066440977 - ], - [ - 17.061767578125, - 48.94415123418794 - ], - [ - 16.710205078125, - 48.39273786659243 - ], - [ - 16.98486328125, - 47.99727386804474 - ], - [ - 17.720947265625, - 47.67278567576541 - ], - [ - 18.951416015625, - 47.73193447949174 - ], - [ - 18.929443359375, - 47.99727386804474 - ], - [ - 20.093994140624996, - 48.10743118848039 - ], - [ - 20.643310546875, - 48.480204398955145 - ], - [ - 21.456298828125, - 48.480204398955145 - ], - [ - 21.73095703125, - 48.268569112964336 - ], - [ - 22.17041015625, - 48.31973404047173 - ] + [22.17041015625, 48.31973404047173], + [22.67578125, 49.11702904077932], + [21.697998046875, 49.51807644873301], + [20.247802734375, 49.468124067331644], + [19.962158203125, 49.296471602658066], + [19.489746093749996, 49.674737880665994], + [18.468017578125, 49.54659778073743], + [17.698974609375, 48.95858066440977], + [17.061767578125, 48.94415123418794], + [16.710205078125, 48.39273786659243], + [16.98486328125, 47.99727386804474], + [17.720947265625, 47.67278567576541], + [18.951416015625, 47.73193447949174], + [18.929443359375, 47.99727386804474], + [20.093994140624996, 48.10743118848039], + [20.643310546875, 48.480204398955145], + [21.456298828125, 48.480204398955145], + [21.73095703125, 48.268569112964336], + [22.17041015625, 48.31973404047173] ] ] } diff --git a/mapping.yaml b/mapping.yaml index ab4a4b2..bb0b039 100644 --- a/mapping.yaml +++ b/mapping.yaml @@ -32,8 +32,7 @@ generalized_tables: tolerance: 200 roads_gen1: source: roads - sql_filter: - type IN ('motorway', 'motorway_link', 'trunk', 'trunk_link', 'primary', + sql_filter: type IN ('motorway', 'motorway_link', 'trunk', 'trunk_link', 'primary', 'primary_link', 'secondary', 'secondary_link', 'tertiary', 'tertiary_link') OR class IN('railway') tolerance: 50 @@ -156,15 +155,15 @@ tables: leisure: mapping: leisure: - - park - - garden - - playground - - golf_course - - sports_centre - - pitch - - stadium - - dog_park # TODO - - track + - park + - garden + - playground + - golf_course + - sports_centre + - pitch + - stadium + - dog_park # TODO + - track tourism: mapping: tourism: @@ -1120,7 +1119,7 @@ tables: key: cutting args: values: - - 'yes' + - "yes" - left - right - name: ref @@ -1159,12 +1158,12 @@ tables: - intermediate - bad - horrible - - 'no' + - "no" type: linestring filters: reject: area: - - 'yes' + - "yes" mappings: railway: mapping: diff --git a/package-lock.json b/package-lock.json index 5cd6e13..0b75e18 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,11 +12,16 @@ "color-convert": "2.0.1", "config": "3.3.7", "freemap-mapserver": "github:FreemapSlovakia/freemap-mapserver#develop", - "jsnik": "0.0.9" + "jsxnik": "0.0.7" }, "devDependencies": { + "@types/color-convert": "2.0.0", + "@types/config": "3.3.0", + "@types/node": "^18.7.14", + "concurrently": "^7.3.0", "eslint": "8.10.0", - "nodemon": "2.0.15" + "nodemon": "^2.0.19", + "typescript": "^4.8.2" } }, "node_modules/@eslint/eslintrc": { @@ -120,18 +125,6 @@ "node": ">=4" } }, - "node_modules/@szmarczak/http-timer": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", - "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", - "dev": true, - "dependencies": { - "defer-to-connect": "^1.0.1" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/@turf/along": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/@turf/along/-/along-6.5.0.tgz", @@ -1696,6 +1689,27 @@ "url": "https://opencollective.com/turf" } }, + "node_modules/@types/color-convert": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@types/color-convert/-/color-convert-2.0.0.tgz", + "integrity": "sha512-m7GG7IKKGuJUXvkZ1qqG3ChccdIM/qBBo913z+Xft0nKCX4hAU/IxKwZBU4cpRZ7GS5kV4vOblUkILtSShCPXQ==", + "dev": true, + "dependencies": { + "@types/color-name": "*" + } + }, + "node_modules/@types/color-name": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", + "dev": true + }, + "node_modules/@types/config": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@types/config/-/config-3.3.0.tgz", + "integrity": "sha512-9kZSbl3/X3TVNowLCu5HFQdQmD+4287Om55avknEYkuo6R2dDrsp/EXEHUFvfYeG7m1eJ0WYGj+cbcUIhARJAQ==", + "dev": true + }, "node_modules/@types/formidable": { "version": "1.0.32", "resolved": "https://registry.npmjs.org/@types/formidable/-/formidable-1.0.32.tgz", @@ -1710,9 +1724,9 @@ "integrity": "sha512-1rkryxURpr6aWP7R786/UQOkJ3PcpQiWkAXBmdWc7ryFWqN6a4xfK7BtjXvFBKO9LjQ+MWQSWxYeZX1OApnArA==" }, "node_modules/@types/node": { - "version": "14.14.19", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.19.tgz", - "integrity": "sha512-4nhBPStMK04rruRVtVc6cDqhu7S9GZai0fpXgPXrFpcPX6Xul8xnrjSdGB4KPBVYG/R5+fXWdCM8qBoiULWGPQ==" + "version": "18.7.14", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.14.tgz", + "integrity": "sha512-6bbDaETVi8oyIARulOE9qF1/Qdi/23z6emrUh0fNJRUmjznqrixD4MpGDdgOFk5Xb0m2H6Xu42JGdvAxaJR/wA==" }, "node_modules/abbrev": { "version": "1.1.1", @@ -1779,15 +1793,6 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/ansi-align": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", - "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", - "dev": true, - "dependencies": { - "string-width": "^4.1.0" - } - }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -1884,25 +1889,6 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, - "node_modules/array-filter": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-1.0.0.tgz", - "integrity": "sha1-uveeYubvTCpMC4MSMtr/7CUfnYM=" - }, - "node_modules/available-typed-arrays": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.2.tgz", - "integrity": "sha512-XWX3OX8Onv97LMk/ftVyBibpGwY5a8SmuxZPzeOxqmuEqUCOM9ZE+uIaD1VNJ5QnvU2UQusvmKbuM1FR8QWGfQ==", - "dependencies": { - "array-filter": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -2457,28 +2443,6 @@ "safe-buffer": "~5.1.0" } }, - "node_modules/boxen": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz", - "integrity": "sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==", - "dev": true, - "dependencies": { - "ansi-align": "^3.0.0", - "camelcase": "^6.2.0", - "chalk": "^4.1.0", - "cli-boxes": "^2.2.1", - "string-width": "^4.2.2", - "type-fest": "^0.20.2", - "widest-line": "^3.1.0", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -2620,18 +2584,6 @@ "node": ">=6" } }, - "node_modules/camelcase": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", - "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/caw": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/caw/-/caw-2.0.1.tgz", @@ -2728,22 +2680,15 @@ "node": ">=10" } }, - "node_modules/ci-info": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", - "dev": true - }, - "node_modules/cli-boxes": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", - "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" } }, "node_modules/clone-response": { @@ -2832,6 +2777,53 @@ "quickselect": "^2.0.0" } }, + "node_modules/concurrently": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-7.3.0.tgz", + "integrity": "sha512-IiDwm+8DOcFEInca494A8V402tNTQlJaYq78RF2rijOrKEk/AOHTxhN4U1cp7GYKYX5Q6Ymh1dLTBlzIMN0ikA==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "date-fns": "^2.16.1", + "lodash": "^4.17.21", + "rxjs": "^7.0.0", + "shell-quote": "^1.7.3", + "spawn-command": "^0.0.2-1", + "supports-color": "^8.1.0", + "tree-kill": "^1.2.2", + "yargs": "^17.3.1" + }, + "bin": { + "concurrently": "dist/bin/concurrently.js" + }, + "engines": { + "node": "^12.20.0 || ^14.13.0 || >=16.0.0" + } + }, + "node_modules/concurrently/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/concurrently/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, "node_modules/config": { "version": "3.3.7", "resolved": "https://registry.npmjs.org/config/-/config-3.3.7.tgz", @@ -2852,23 +2844,6 @@ "proto-list": "~1.2.1" } }, - "node_modules/configstore": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", - "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", - "dev": true, - "dependencies": { - "dot-prop": "^5.2.0", - "graceful-fs": "^4.1.2", - "make-dir": "^3.0.0", - "unique-string": "^2.0.0", - "write-file-atomic": "^3.0.0", - "xdg-basedir": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/console-control-strings": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", @@ -2931,15 +2906,6 @@ "node": ">= 8" } }, - "node_modules/crypto-random-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", - "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/d3-array": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-1.2.4.tgz", @@ -2958,6 +2924,19 @@ "resolved": "https://registry.npmjs.org/d3-voronoi/-/d3-voronoi-1.1.2.tgz", "integrity": "sha1-Fodmfo8TotFYyAwUgMWinLDYlzw=" }, + "node_modules/date-fns": { + "version": "2.29.2", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.29.2.tgz", + "integrity": "sha512-0VNbwmWJDS/G3ySwFSJA3ayhbURMTJLtwM2DTxf9CWondCnh6DTNlO9JgRSq6ibf4eD0lfMJNBxUdEAHHix+bA==", + "dev": true, + "engines": { + "node": ">=0.11" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/date-fns" + } + }, "node_modules/debug": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", @@ -3138,27 +3117,12 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true, - "engines": { - "node": ">=4.0.0" - } - }, "node_modules/deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, - "node_modules/defer-to-connect": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", - "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", - "dev": true - }, "node_modules/define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -3170,11 +3134,6 @@ "node": ">= 0.4" } }, - "node_modules/defined": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", - "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=" - }, "node_modules/delegates": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", @@ -3225,29 +3184,6 @@ "node": ">=6.0.0" } }, - "node_modules/dot-prop": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", - "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", - "dev": true, - "dependencies": { - "is-obj": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/dotignore": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/dotignore/-/dotignore-0.1.2.tgz", - "integrity": "sha512-UGGGWfSauusaVJC+8fgV+NVvBXkCTmVv7sk6nojDZZvuOUNGUy0Zk4UpHQD6EDjS0jpBwcACvH4eofvyzBcRDw==", - "dependencies": { - "minimatch": "^3.0.4" - }, - "bin": { - "ignored": "bin/ignored" - } - }, "node_modules/download": { "version": "6.2.5", "resolved": "https://registry.npmjs.org/download/-/download-6.2.5.tgz", @@ -3407,43 +3343,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/es-get-iterator": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.2.tgz", - "integrity": "sha512-+DTO8GYwbMCwbywjimwZMHp8AuYXOS2JZFWoi2AlPOS3ebnII9w/NLpNZtA7A0YLaVDw+O7KFCeoIV7OPvM7hQ==", - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.0", - "has-symbols": "^1.0.1", - "is-arguments": "^1.1.0", - "is-map": "^2.0.2", - "is-set": "^2.0.2", - "is-string": "^1.0.5", - "isarray": "^2.0.5" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es-get-iterator/node_modules/is-arguments": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.0.tgz", - "integrity": "sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg==", - "dependencies": { - "call-bind": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es-get-iterator/node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" - }, "node_modules/es-to-primitive": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", @@ -3460,13 +3359,13 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/escape-goat": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", - "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "dev": true, "engines": { - "node": ">=8" + "node": ">=6" } }, "node_modules/escape-html": { @@ -3859,19 +3758,6 @@ "integrity": "sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw==", "dev": true }, - "node_modules/for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "dependencies": { - "is-callable": "^1.1.3" - } - }, - "node_modules/foreach": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=" - }, "node_modules/formidable": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.2.tgz", @@ -4083,6 +3969,15 @@ "quickselect": "^2.0.0" } }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, "node_modules/get-intrinsic": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", @@ -4149,30 +4044,6 @@ "node": ">= 6" } }, - "node_modules/global-dirs": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", - "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==", - "dev": true, - "dependencies": { - "ini": "2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/global-dirs/node_modules/ini": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", - "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/globals": { "version": "13.12.1", "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.1.tgz", @@ -4188,168 +4059,59 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/got": { - "version": "9.6.0", - "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", - "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", - "dev": true, + "node_modules/graceful-fs": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dependencies": { - "@sindresorhus/is": "^0.14.0", - "@szmarczak/http-timer": "^1.1.2", - "cacheable-request": "^6.0.0", - "decompress-response": "^3.3.0", - "duplexer3": "^0.1.4", - "get-stream": "^4.1.0", - "lowercase-keys": "^1.0.1", - "mimic-response": "^1.0.1", - "p-cancelable": "^1.0.0", - "to-readable-stream": "^1.0.0", - "url-parse-lax": "^3.0.0" + "function-bind": "^1.1.1" }, "engines": { - "node": ">=8.6" + "node": ">= 0.4.0" } }, - "node_modules/got/node_modules/@sindresorhus/is": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", - "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true, "engines": { - "node": ">=6" + "node": ">=4" } }, - "node_modules/got/node_modules/cacheable-request": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", - "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", - "dev": true, - "dependencies": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^3.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^4.1.0", - "responselike": "^1.0.2" - }, + "node_modules/has-symbol-support-x": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", + "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==", "engines": { - "node": ">=8" + "node": "*" } }, - "node_modules/got/node_modules/cacheable-request/node_modules/get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, - "dependencies": { - "pump": "^3.0.0" - }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "engines": { - "node": ">=8" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/got/node_modules/cacheable-request/node_modules/lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", - "dev": true, - "engines": { - "node": ">=8" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/got/node_modules/get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, + "node_modules/has-to-string-tag-x": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", + "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", "dependencies": { - "pump": "^3.0.0" + "has-symbol-support-x": "^1.4.1" }, "engines": { - "node": ">=6" - } - }, - "node_modules/got/node_modules/http-cache-semantics": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", - "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", - "dev": true - }, - "node_modules/got/node_modules/normalize-url": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", - "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/got/node_modules/p-cancelable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", - "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", - "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/has-symbol-support-x": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", - "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==", - "engines": { - "node": "*" - } - }, - "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-to-string-tag-x": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", - "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", - "dependencies": { - "has-symbol-support-x": "^1.4.1" - }, - "engines": { - "node": "*" + "node": "*" } }, "node_modules/has-tostringtag": { @@ -4371,15 +4133,6 @@ "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" }, - "node_modules/has-yarn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", - "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/http-assert": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/http-assert/-/http-assert-1.5.0.tgz", @@ -4508,15 +4261,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/import-lazy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", - "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -4573,14 +4317,6 @@ "node": ">= 0.4" } }, - "node_modules/is-bigint": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.1.tgz", - "integrity": "sha512-J0ELF4yHFxHy0cmSxZuheDOz2luOdVvqjwmEcj8H/L1JHeuEDSDbeRP+Dk9kFVk5RTFzbucJ2Kb9F7ixY2QaCg==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -4592,20 +4328,6 @@ "node": ">=8" } }, - "node_modules/is-boolean-object": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.0.tgz", - "integrity": "sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA==", - "dependencies": { - "call-bind": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-callable": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.1.tgz", @@ -4617,29 +4339,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-ci": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", - "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", - "dev": true, - "dependencies": { - "ci-info": "^2.0.0" - }, - "bin": { - "is-ci": "bin.js" - } - }, - "node_modules/is-core-module": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", - "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", - "dependencies": { - "has": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-date-object": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", @@ -4692,30 +4391,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-installed-globally": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", - "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", - "dev": true, - "dependencies": { - "global-dirs": "^3.0.0", - "is-path-inside": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-map": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz", - "integrity": "sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-natural-number": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-natural-number/-/is-natural-number-4.0.1.tgz", @@ -4729,18 +4404,6 @@ "node": ">= 0.4" } }, - "node_modules/is-npm": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz", - "integrity": "sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -4749,26 +4412,6 @@ "node": ">=0.12.0" } }, - "node_modules/is-number-object": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.4.tgz", - "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", - "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/is-object": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz", @@ -4777,15 +4420,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/is-plain-obj": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", @@ -4816,14 +4450,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-set": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz", - "integrity": "sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", @@ -4832,17 +4458,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-string": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", - "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-symbol": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", @@ -4857,150 +4472,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-typed-array": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.5.tgz", - "integrity": "sha512-S+GRDgJlR3PyEbsX/Fobd9cqpZBuvUS+8asRqYDMLCb2qMzt1oz5m5oxQCxOgUDxiWsOVNi4yaF+/uvdlHlYug==", - "dependencies": { - "available-typed-arrays": "^1.0.2", - "call-bind": "^1.0.2", - "es-abstract": "^1.18.0-next.2", - "foreach": "^2.0.5", - "has-symbols": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-typed-array/node_modules/es-abstract": { - "version": "1.18.0-next.2", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.2.tgz", - "integrity": "sha512-Ih4ZMFHEtZupnUh6497zEL4y2+w8+1ljnCyaTa+adcoafI1GOvMwFlDjBLfWR7y9VLfrjRJe9ocuHY1PSR9jjw==", - "dependencies": { - "call-bind": "^1.0.2", - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-negative-zero": "^2.0.1", - "is-regex": "^1.1.1", - "object-inspect": "^1.9.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.2", - "string.prototype.trimend": "^1.0.3", - "string.prototype.trimstart": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-typed-array/node_modules/is-callable": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", - "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-typed-array/node_modules/is-negative-zero": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", - "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-typed-array/node_modules/object-inspect": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", - "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-typed-array/node_modules/object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-typed-array/node_modules/string.prototype.trimend": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.3.tgz", - "integrity": "sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw==", - "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-typed-array/node_modules/string.prototype.trimstart": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.3.tgz", - "integrity": "sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg==", - "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, - "node_modules/is-weakmap": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz", - "integrity": "sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakset": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.1.tgz", - "integrity": "sha512-pi4vhbhVHGLxohUw7PhGsueT4vRGFoXhP7+RGN0jKIv9+8PWYCQTqtADngrxOm2g46hoH0+g8uZZBzMrvVGDmw==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-yarn-global": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", - "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==", - "dev": true - }, "node_modules/isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -5035,15 +4506,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/jsnik": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/jsnik/-/jsnik-0.0.9.tgz", - "integrity": "sha512-hFy7lAnymzWYu07CeSLt+1LAB49r+ah+aOwraNq1lPa7/uSIKsb/G5pG7Ef8mpD6zfUWsvh+ajCh872kPMoNpA==", - "dependencies": { - "tape": "^5.1.1", - "xmlbuilder": "15.1.1" - } - }, "node_modules/json-buffer": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", @@ -5080,6 +4542,11 @@ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" }, + "node_modules/jsxnik": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/jsxnik/-/jsxnik-0.0.7.tgz", + "integrity": "sha512-gJE0v5KQrAtL/JTpUF+zkaAvwcEZhVldPoICvNCRfNaNA3dIgUX17FbLsBmMJUjcshUnWqA1fq/R674x++CkNA==" + }, "node_modules/keygrip": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/keygrip/-/keygrip-1.1.0.tgz", @@ -5195,18 +4662,6 @@ "node": ">= 0.8" } }, - "node_modules/latest-version": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", - "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", - "dev": true, - "dependencies": { - "package-json": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -5220,6 +4675,12 @@ "node": ">= 0.8.0" } }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -5356,11 +4817,6 @@ "node": "*" } }, - "node_modules/minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" - }, "node_modules/minipass": { "version": "3.1.6", "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.6.tgz", @@ -5444,9 +4900,9 @@ } }, "node_modules/nodemon": { - "version": "2.0.15", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.15.tgz", - "integrity": "sha512-gdHMNx47Gw7b3kWxJV64NI+Q5nfl0y5DgDbiVtShiwa7Z0IZ07Ll4RLFo6AjrhzMtoEZn5PDE3/c2AbVsiCkpA==", + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.19.tgz", + "integrity": "sha512-4pv1f2bMDj0Eeg/MhGqxrtveeQ5/G/UVe9iO6uTZzjnRluSA4PVWf8CW99LUPwGB3eNIA7zUFoP77YuI7hOc0A==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -5456,10 +4912,10 @@ "minimatch": "^3.0.4", "pstree.remy": "^1.1.8", "semver": "^5.7.1", + "simple-update-notifier": "^1.0.7", "supports-color": "^5.5.0", "touch": "^3.1.0", - "undefsafe": "^2.0.5", - "update-notifier": "^5.1.0" + "undefsafe": "^2.0.5" }, "bin": { "nodemon": "bin/nodemon.js" @@ -5787,30 +5243,6 @@ "node": ">=4" } }, - "node_modules/package-json": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", - "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", - "dev": true, - "dependencies": { - "got": "^9.6.0", - "registry-auth-token": "^4.0.0", - "registry-url": "^5.0.0", - "semver": "^6.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/package-json/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -5847,11 +5279,6 @@ "node": ">=8" } }, - "node_modules/path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" - }, "node_modules/path-to-regexp": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.0.tgz", @@ -5993,18 +5420,6 @@ "node": ">=6" } }, - "node_modules/pupa": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", - "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", - "dev": true, - "dependencies": { - "escape-goat": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/qs": { "version": "6.9.4", "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.4.tgz", @@ -6076,30 +5491,6 @@ "quickselect": "^1.0.1" } }, - "node_modules/rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dev": true, - "dependencies": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "bin": { - "rc": "cli.js" - } - }, - "node_modules/rc/node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/readable-stream": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", @@ -6140,28 +5531,13 @@ "url": "https://github.com/sponsors/mysticatea" } }, - "node_modules/registry-auth-token": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz", - "integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==", - "dev": true, - "dependencies": { - "rc": "^1.2.8" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/registry-url": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", - "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true, - "dependencies": { - "rc": "^1.2.8" - }, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, "node_modules/require-from-string": { @@ -6220,14 +5596,6 @@ "lowercase-keys": "^1.0.0" } }, - "node_modules/resumer": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/resumer/-/resumer-0.0.0.tgz", - "integrity": "sha1-8ej0YeQGS6Oegq883CqMiT0HZ1k=", - "dependencies": { - "through": "~2.3.4" - } - }, "node_modules/rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -6247,6 +5615,15 @@ "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-2.0.4.tgz", "integrity": "sha512-l4NwboJM74Ilm4VKfbAtFeGq7aEjWL+5kVFcmgFA2MrdnQWx9iE/tUGvxY5HyMI7o/WpSIUFLbC5fbeaHgSCYg==" }, + "node_modules/rxjs": { + "version": "7.5.6", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.6.tgz", + "integrity": "sha512-dnyv2/YsXhnm461G+R/Pe5bWP41Nm6LBXEYWI6eiFP4fiwx6WRI/CD0zbdVAudd9xwLEF2IDcKXLHit0FYjUzw==", + "dev": true, + "dependencies": { + "tslib": "^2.1.0" + } + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -6291,27 +5668,6 @@ "semver": "bin/semver" } }, - "node_modules/semver-diff": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", - "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", - "dev": true, - "dependencies": { - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/semver-diff/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/semver-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-2.0.0.tgz", @@ -6360,32 +5716,38 @@ "node": ">=8" } }, - "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel/node_modules/object-inspect": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", - "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "node_modules/shell-quote": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.3.tgz", + "integrity": "sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw==", + "dev": true }, "node_modules/signal-exit": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" }, + "node_modules/simple-update-notifier": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-1.0.7.tgz", + "integrity": "sha512-BBKgR84BJQJm6WjWFMHgLVuo61FBDSj1z/xSFUIozqO6wO7ii0JxCqlIud7Enr/+LhlbNI0whErq96P2qHNWew==", + "dev": true, + "dependencies": { + "semver": "~7.0.0" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/simple-update-notifier/node_modules/semver": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", + "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/skmeans": { "version": "0.9.7", "resolved": "https://registry.npmjs.org/skmeans/-/skmeans-0.9.7.tgz", @@ -6413,6 +5775,12 @@ "node": ">=0.10.0" } }, + "node_modules/spawn-command": { + "version": "0.0.2-1", + "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz", + "integrity": "sha512-n98l9E2RMSJ9ON1AKisHzz7V42VDiBQGY6PB1BwRglz99wpVsSuGzQ+jOi6lFXBGVTCrRpltvjm+/XA+tpeJrg==", + "dev": true + }, "node_modules/splaytree": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/splaytree/-/splaytree-3.1.0.tgz", @@ -6431,142 +5799,28 @@ "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/string.prototype.trim": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.3.tgz", - "integrity": "sha512-16IL9pIBA5asNOSukPfxX2W68BaBvxyiRK16H3RA/lWW9BDosh+w7f+LhomPHpXJ82QEe7w7/rY/S1CV97raLg==", - "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trim/node_modules/es-abstract": { - "version": "1.18.0-next.2", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.2.tgz", - "integrity": "sha512-Ih4ZMFHEtZupnUh6497zEL4y2+w8+1ljnCyaTa+adcoafI1GOvMwFlDjBLfWR7y9VLfrjRJe9ocuHY1PSR9jjw==", - "dependencies": { - "call-bind": "^1.0.2", - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-negative-zero": "^2.0.1", - "is-regex": "^1.1.1", - "object-inspect": "^1.9.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.2", - "string.prototype.trimend": "^1.0.3", - "string.prototype.trimstart": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trim/node_modules/is-callable": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", - "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trim/node_modules/is-negative-zero": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", - "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trim/node_modules/object-inspect": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", - "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trim/node_modules/object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=0.10.0" } }, - "node_modules/string.prototype.trim/node_modules/string.prototype.trimend": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.3.tgz", - "integrity": "sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw==", + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "safe-buffer": "~5.2.0" } }, - "node_modules/string.prototype.trim/node_modules/string.prototype.trimstart": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.3.tgz", - "integrity": "sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg==", + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=8" } }, "node_modules/string.prototype.trimend": { @@ -6663,120 +5917,6 @@ "node": ">=4" } }, - "node_modules/tape": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/tape/-/tape-5.2.0.tgz", - "integrity": "sha512-J7stlwNrBEpHlZvbvPEAFvMmqIy79kMYvXiyekl5w6O7C2HF63bFKi8su70mdUtZZvNMm7EbIzLyI+fk6U9Ntg==", - "dependencies": { - "call-bind": "^1.0.2", - "deep-equal": "^2.0.5", - "defined": "^1.0.0", - "dotignore": "^0.1.2", - "for-each": "^0.3.3", - "glob": "^7.1.6", - "has": "^1.0.3", - "inherits": "^2.0.4", - "is-regex": "^1.1.2", - "minimist": "^1.2.5", - "object-inspect": "^1.9.0", - "object-is": "^1.1.4", - "object.assign": "^4.1.2", - "resolve": "^2.0.0-next.3", - "resumer": "^0.0.0", - "string.prototype.trim": "^1.2.3", - "through": "^2.3.8" - }, - "bin": { - "tape": "bin/tape" - } - }, - "node_modules/tape/node_modules/deep-equal": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.0.5.tgz", - "integrity": "sha512-nPiRgmbAtm1a3JsnLCf6/SLfXcjyN5v8L1TXzdCmHrXJ4hx+gW/w1YCcn7z8gJtSiDArZCgYtbao3QqLm/N1Sw==", - "dependencies": { - "call-bind": "^1.0.0", - "es-get-iterator": "^1.1.1", - "get-intrinsic": "^1.0.1", - "is-arguments": "^1.0.4", - "is-date-object": "^1.0.2", - "is-regex": "^1.1.1", - "isarray": "^2.0.5", - "object-is": "^1.1.4", - "object-keys": "^1.1.1", - "object.assign": "^4.1.2", - "regexp.prototype.flags": "^1.3.0", - "side-channel": "^1.0.3", - "which-boxed-primitive": "^1.0.1", - "which-collection": "^1.0.1", - "which-typed-array": "^1.1.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/tape/node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/tape/node_modules/is-regex": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.2.tgz", - "integrity": "sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg==", - "dependencies": { - "call-bind": "^1.0.2", - "has-symbols": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/tape/node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" - }, - "node_modules/tape/node_modules/object-inspect": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", - "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/tape/node_modules/object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/tape/node_modules/resolve": { - "version": "2.0.0-next.3", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.3.tgz", - "integrity": "sha512-W8LucSynKUIDu9ylraa7ueVZ7hc0uAgJBxVsQSKOXOyle8a93qXhcz+XAXZ8bIq2d6i4Ehddn6Evt+0/UwKk6Q==", - "dependencies": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/tar": { "version": "6.1.11", "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", @@ -6886,15 +6026,6 @@ "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==" }, - "node_modules/to-readable-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", - "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -6970,6 +6101,15 @@ "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "bin": { + "tree-kill": "cli.js" + } + }, "node_modules/trim-repeated": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz", @@ -6981,6 +6121,12 @@ "node": ">=0.10.0" } }, + "node_modules/tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", + "dev": true + }, "node_modules/tsscmp": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/tsscmp/-/tsscmp-1.0.6.tgz", @@ -7041,13 +6187,17 @@ "node": ">= 0.6" } }, - "node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "node_modules/typescript": { + "version": "4.8.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.2.tgz", + "integrity": "sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==", "dev": true, - "dependencies": { - "is-typedarray": "^1.0.0" + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" } }, "node_modules/unbzip2-stream": { @@ -7065,18 +6215,6 @@ "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", "dev": true }, - "node_modules/unique-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", - "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", - "dev": true, - "dependencies": { - "crypto-random-string": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", @@ -7085,49 +6223,6 @@ "node": ">= 0.8" } }, - "node_modules/update-notifier": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz", - "integrity": "sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==", - "dev": true, - "dependencies": { - "boxen": "^5.0.0", - "chalk": "^4.1.0", - "configstore": "^5.0.1", - "has-yarn": "^2.1.0", - "import-lazy": "^2.1.0", - "is-ci": "^2.0.0", - "is-installed-globally": "^0.4.0", - "is-npm": "^5.0.0", - "is-yarn-global": "^0.3.0", - "latest-version": "^5.1.0", - "pupa": "^2.1.1", - "semver": "^7.3.4", - "semver-diff": "^3.1.1", - "xdg-basedir": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/yeoman/update-notifier?sponsor=1" - } - }, - "node_modules/update-notifier/node_modules/semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/uri-js": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.0.tgz", @@ -7211,153 +6306,6 @@ "node": ">= 8" } }, - "node_modules/which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "dependencies": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-collection": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.1.tgz", - "integrity": "sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==", - "dependencies": { - "is-map": "^2.0.1", - "is-set": "^2.0.1", - "is-weakmap": "^2.0.1", - "is-weakset": "^2.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-typed-array": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.4.tgz", - "integrity": "sha512-49E0SpUe90cjpoc7BOJwyPHRqSAd12c10Qm2amdEZrJPCY2NDxaW01zHITrem+rnETY3dwrbH3UUrUwagfCYDA==", - "dependencies": { - "available-typed-arrays": "^1.0.2", - "call-bind": "^1.0.0", - "es-abstract": "^1.18.0-next.1", - "foreach": "^2.0.5", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.1", - "is-typed-array": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-typed-array/node_modules/es-abstract": { - "version": "1.18.0-next.2", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.2.tgz", - "integrity": "sha512-Ih4ZMFHEtZupnUh6497zEL4y2+w8+1ljnCyaTa+adcoafI1GOvMwFlDjBLfWR7y9VLfrjRJe9ocuHY1PSR9jjw==", - "dependencies": { - "call-bind": "^1.0.2", - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-negative-zero": "^2.0.1", - "is-regex": "^1.1.1", - "object-inspect": "^1.9.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.2", - "string.prototype.trimend": "^1.0.3", - "string.prototype.trimstart": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-typed-array/node_modules/is-callable": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", - "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-typed-array/node_modules/is-negative-zero": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", - "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-typed-array/node_modules/object-inspect": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", - "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-typed-array/node_modules/object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-typed-array/node_modules/string.prototype.trimend": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.3.tgz", - "integrity": "sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw==", - "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-typed-array/node_modules/string.prototype.trimstart": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.3.tgz", - "integrity": "sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg==", - "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/wide-align": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", @@ -7366,18 +6314,6 @@ "string-width": "^1.0.2 || 2 || 3 || 4" } }, - "node_modules/widest-line": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", - "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", - "dev": true, - "dependencies": { - "string-width": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", @@ -7409,35 +6345,6 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, - "node_modules/write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", - "dev": true, - "dependencies": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, - "node_modules/xdg-basedir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", - "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/xmlbuilder": { - "version": "15.1.1", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz", - "integrity": "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==", - "engines": { - "node": ">=8.0" - } - }, "node_modules/xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", @@ -7446,11 +6353,47 @@ "node": ">=0.4" } }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, + "node_modules/yargs": { + "version": "17.5.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz", + "integrity": "sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, "node_modules/yauzl": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", @@ -7551,15 +6494,6 @@ "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.7.0.tgz", "integrity": "sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==" }, - "@szmarczak/http-timer": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", - "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", - "dev": true, - "requires": { - "defer-to-connect": "^1.0.1" - } - }, "@turf/along": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/@turf/along/-/along-6.5.0.tgz", @@ -8803,6 +7737,27 @@ "d3-voronoi": "1.1.2" } }, + "@types/color-convert": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@types/color-convert/-/color-convert-2.0.0.tgz", + "integrity": "sha512-m7GG7IKKGuJUXvkZ1qqG3ChccdIM/qBBo913z+Xft0nKCX4hAU/IxKwZBU4cpRZ7GS5kV4vOblUkILtSShCPXQ==", + "dev": true, + "requires": { + "@types/color-name": "*" + } + }, + "@types/color-name": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", + "dev": true + }, + "@types/config": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@types/config/-/config-3.3.0.tgz", + "integrity": "sha512-9kZSbl3/X3TVNowLCu5HFQdQmD+4287Om55avknEYkuo6R2dDrsp/EXEHUFvfYeG7m1eJ0WYGj+cbcUIhARJAQ==", + "dev": true + }, "@types/formidable": { "version": "1.0.32", "resolved": "https://registry.npmjs.org/@types/formidable/-/formidable-1.0.32.tgz", @@ -8817,9 +7772,9 @@ "integrity": "sha512-1rkryxURpr6aWP7R786/UQOkJ3PcpQiWkAXBmdWc7ryFWqN6a4xfK7BtjXvFBKO9LjQ+MWQSWxYeZX1OApnArA==" }, "@types/node": { - "version": "14.14.19", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.19.tgz", - "integrity": "sha512-4nhBPStMK04rruRVtVc6cDqhu7S9GZai0fpXgPXrFpcPX6Xul8xnrjSdGB4KPBVYG/R5+fXWdCM8qBoiULWGPQ==" + "version": "18.7.14", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.14.tgz", + "integrity": "sha512-6bbDaETVi8oyIARulOE9qF1/Qdi/23z6emrUh0fNJRUmjznqrixD4MpGDdgOFk5Xb0m2H6Xu42JGdvAxaJR/wA==" }, "abbrev": { "version": "1.1.1", @@ -8868,15 +7823,6 @@ "uri-js": "^4.2.2" } }, - "ansi-align": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", - "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", - "dev": true, - "requires": { - "string-width": "^4.1.0" - } - }, "ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -8940,19 +7886,6 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, - "array-filter": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-1.0.0.tgz", - "integrity": "sha1-uveeYubvTCpMC4MSMtr/7CUfnYM=" - }, - "available-typed-arrays": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.2.tgz", - "integrity": "sha512-XWX3OX8Onv97LMk/ftVyBibpGwY5a8SmuxZPzeOxqmuEqUCOM9ZE+uIaD1VNJ5QnvU2UQusvmKbuM1FR8QWGfQ==", - "requires": { - "array-filter": "^1.0.0" - } - }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -9392,22 +8325,6 @@ } } }, - "boxen": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz", - "integrity": "sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==", - "dev": true, - "requires": { - "ansi-align": "^3.0.0", - "camelcase": "^6.2.0", - "chalk": "^4.1.0", - "cli-boxes": "^2.2.1", - "string-width": "^4.2.2", - "type-fest": "^0.20.2", - "widest-line": "^3.1.0", - "wrap-ansi": "^7.0.0" - } - }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -9513,12 +8430,6 @@ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true }, - "camelcase": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", - "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", - "dev": true - }, "caw": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/caw/-/caw-2.0.1.tgz", @@ -9587,17 +8498,16 @@ "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==" }, - "ci-info": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", - "dev": true - }, - "cli-boxes": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", - "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", - "dev": true + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } }, "clone-response": { "version": "1.0.2", @@ -9677,6 +8587,40 @@ } } }, + "concurrently": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-7.3.0.tgz", + "integrity": "sha512-IiDwm+8DOcFEInca494A8V402tNTQlJaYq78RF2rijOrKEk/AOHTxhN4U1cp7GYKYX5Q6Ymh1dLTBlzIMN0ikA==", + "dev": true, + "requires": { + "chalk": "^4.1.0", + "date-fns": "^2.16.1", + "lodash": "^4.17.21", + "rxjs": "^7.0.0", + "shell-quote": "^1.7.3", + "spawn-command": "^0.0.2-1", + "supports-color": "^8.1.0", + "tree-kill": "^1.2.2", + "yargs": "^17.3.1" + }, + "dependencies": { + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "config": { "version": "3.3.7", "resolved": "https://registry.npmjs.org/config/-/config-3.3.7.tgz", @@ -9694,20 +8638,6 @@ "proto-list": "~1.2.1" } }, - "configstore": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", - "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", - "dev": true, - "requires": { - "dot-prop": "^5.2.0", - "graceful-fs": "^4.1.2", - "make-dir": "^3.0.0", - "unique-string": "^2.0.0", - "write-file-atomic": "^3.0.0", - "xdg-basedir": "^4.0.0" - } - }, "console-control-strings": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", @@ -9757,12 +8687,6 @@ "which": "^2.0.1" } }, - "crypto-random-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", - "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", - "dev": true - }, "d3-array": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-1.2.4.tgz", @@ -9781,6 +8705,12 @@ "resolved": "https://registry.npmjs.org/d3-voronoi/-/d3-voronoi-1.1.2.tgz", "integrity": "sha1-Fodmfo8TotFYyAwUgMWinLDYlzw=" }, + "date-fns": { + "version": "2.29.2", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.29.2.tgz", + "integrity": "sha512-0VNbwmWJDS/G3ySwFSJA3ayhbURMTJLtwM2DTxf9CWondCnh6DTNlO9JgRSq6ibf4eD0lfMJNBxUdEAHHix+bA==", + "dev": true + }, "debug": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", @@ -9921,24 +8851,12 @@ "regexp.prototype.flags": "^1.2.0" } }, - "deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true - }, "deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, - "defer-to-connect": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", - "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", - "dev": true - }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -9947,11 +8865,6 @@ "object-keys": "^1.0.12" } }, - "defined": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", - "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=" - }, "delegates": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", @@ -9986,23 +8899,6 @@ "esutils": "^2.0.2" } }, - "dot-prop": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", - "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", - "dev": true, - "requires": { - "is-obj": "^2.0.0" - } - }, - "dotignore": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/dotignore/-/dotignore-0.1.2.tgz", - "integrity": "sha512-UGGGWfSauusaVJC+8fgV+NVvBXkCTmVv7sk6nojDZZvuOUNGUy0Zk4UpHQD6EDjS0jpBwcACvH4eofvyzBcRDw==", - "requires": { - "minimatch": "^3.0.4" - } - }, "download": { "version": "6.2.5", "resolved": "https://registry.npmjs.org/download/-/download-6.2.5.tgz", @@ -10131,36 +9027,6 @@ "string.prototype.trimstart": "^1.0.1" } }, - "es-get-iterator": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.2.tgz", - "integrity": "sha512-+DTO8GYwbMCwbywjimwZMHp8AuYXOS2JZFWoi2AlPOS3ebnII9w/NLpNZtA7A0YLaVDw+O7KFCeoIV7OPvM7hQ==", - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.0", - "has-symbols": "^1.0.1", - "is-arguments": "^1.1.0", - "is-map": "^2.0.2", - "is-set": "^2.0.2", - "is-string": "^1.0.5", - "isarray": "^2.0.5" - }, - "dependencies": { - "is-arguments": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.0.tgz", - "integrity": "sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg==", - "requires": { - "call-bind": "^1.0.0" - } - }, - "isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" - } - } - }, "es-to-primitive": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", @@ -10171,10 +9037,10 @@ "is-symbol": "^1.0.2" } }, - "escape-goat": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", - "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "dev": true }, "escape-html": { @@ -10470,19 +9336,6 @@ "integrity": "sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw==", "dev": true }, - "for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "requires": { - "is-callable": "^1.1.3" - } - }, - "foreach": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=" - }, "formidable": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.2.tgz", @@ -10668,6 +9521,12 @@ } } }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, "get-intrinsic": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", @@ -10716,23 +9575,6 @@ "is-glob": "^4.0.1" } }, - "global-dirs": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", - "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==", - "dev": true, - "requires": { - "ini": "2.0.0" - }, - "dependencies": { - "ini": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", - "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", - "dev": true - } - } - }, "globals": { "version": "13.12.1", "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.1.tgz", @@ -10742,92 +9584,6 @@ "type-fest": "^0.20.2" } }, - "got": { - "version": "9.6.0", - "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", - "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", - "dev": true, - "requires": { - "@sindresorhus/is": "^0.14.0", - "@szmarczak/http-timer": "^1.1.2", - "cacheable-request": "^6.0.0", - "decompress-response": "^3.3.0", - "duplexer3": "^0.1.4", - "get-stream": "^4.1.0", - "lowercase-keys": "^1.0.1", - "mimic-response": "^1.0.1", - "p-cancelable": "^1.0.0", - "to-readable-stream": "^1.0.0", - "url-parse-lax": "^3.0.0" - }, - "dependencies": { - "@sindresorhus/is": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", - "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", - "dev": true - }, - "cacheable-request": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", - "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", - "dev": true, - "requires": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^3.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^4.1.0", - "responselike": "^1.0.2" - }, - "dependencies": { - "get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", - "dev": true - } - } - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "http-cache-semantics": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", - "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", - "dev": true - }, - "normalize-url": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", - "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==", - "dev": true - }, - "p-cancelable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", - "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", - "dev": true - } - } - }, "graceful-fs": { "version": "4.2.4", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", @@ -10878,12 +9634,6 @@ "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" }, - "has-yarn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", - "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", - "dev": true - }, "http-assert": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/http-assert/-/http-assert-1.5.0.tgz", @@ -10978,12 +9728,6 @@ "resolve-from": "^4.0.0" } }, - "import-lazy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", - "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", - "dev": true - }, "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -11028,11 +9772,6 @@ "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==" }, - "is-bigint": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.1.tgz", - "integrity": "sha512-J0ELF4yHFxHy0cmSxZuheDOz2luOdVvqjwmEcj8H/L1JHeuEDSDbeRP+Dk9kFVk5RTFzbucJ2Kb9F7ixY2QaCg==" - }, "is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -11041,36 +9780,11 @@ "binary-extensions": "^2.0.0" } }, - "is-boolean-object": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.0.tgz", - "integrity": "sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA==", - "requires": { - "call-bind": "^1.0.0" - } - }, "is-callable": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.1.tgz", "integrity": "sha512-wliAfSzx6V+6WfMOmus1xy0XvSgf/dlStkvTfq7F0g4bOIW0PSUbnyse3NhDwdyYS1ozfUtAAySqTws3z9Eqgg==" }, - "is-ci": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", - "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", - "dev": true, - "requires": { - "ci-info": "^2.0.0" - } - }, - "is-core-module": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", - "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", - "requires": { - "has": "^1.0.3" - } - }, "is-date-object": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", @@ -11102,21 +9816,6 @@ "is-extglob": "^2.1.1" } }, - "is-installed-globally": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", - "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", - "dev": true, - "requires": { - "global-dirs": "^3.0.0", - "is-path-inside": "^3.0.2" - } - }, - "is-map": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz", - "integrity": "sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==" - }, "is-natural-number": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-natural-number/-/is-natural-number-4.0.1.tgz", @@ -11127,39 +9826,16 @@ "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.0.tgz", "integrity": "sha1-lVOxIbD6wohp2p7UWeIMdUN4hGE=" }, - "is-npm": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz", - "integrity": "sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA==", - "dev": true - }, "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" }, - "is-number-object": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.4.tgz", - "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==" - }, - "is-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", - "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", - "dev": true - }, "is-object": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz", "integrity": "sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==" }, - "is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true - }, "is-plain-obj": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", @@ -11178,129 +9854,18 @@ "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==" }, - "is-set": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz", - "integrity": "sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==" - }, "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" }, - "is-string": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", - "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==" - }, "is-symbol": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", "requires": { - "has-symbols": "^1.0.1" - } - }, - "is-typed-array": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.5.tgz", - "integrity": "sha512-S+GRDgJlR3PyEbsX/Fobd9cqpZBuvUS+8asRqYDMLCb2qMzt1oz5m5oxQCxOgUDxiWsOVNi4yaF+/uvdlHlYug==", - "requires": { - "available-typed-arrays": "^1.0.2", - "call-bind": "^1.0.2", - "es-abstract": "^1.18.0-next.2", - "foreach": "^2.0.5", - "has-symbols": "^1.0.1" - }, - "dependencies": { - "es-abstract": { - "version": "1.18.0-next.2", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.2.tgz", - "integrity": "sha512-Ih4ZMFHEtZupnUh6497zEL4y2+w8+1ljnCyaTa+adcoafI1GOvMwFlDjBLfWR7y9VLfrjRJe9ocuHY1PSR9jjw==", - "requires": { - "call-bind": "^1.0.2", - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-negative-zero": "^2.0.1", - "is-regex": "^1.1.1", - "object-inspect": "^1.9.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.2", - "string.prototype.trimend": "^1.0.3", - "string.prototype.trimstart": "^1.0.3" - } - }, - "is-callable": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", - "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==" - }, - "is-negative-zero": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", - "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==" - }, - "object-inspect": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", - "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==" - }, - "object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - } - }, - "string.prototype.trimend": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.3.tgz", - "integrity": "sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw==", - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3" - } - }, - "string.prototype.trimstart": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.3.tgz", - "integrity": "sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg==", - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3" - } - } - } - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, - "is-weakmap": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz", - "integrity": "sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==" - }, - "is-weakset": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.1.tgz", - "integrity": "sha512-pi4vhbhVHGLxohUw7PhGsueT4vRGFoXhP7+RGN0jKIv9+8PWYCQTqtADngrxOm2g46hoH0+g8uZZBzMrvVGDmw==" - }, - "is-yarn-global": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", - "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==", - "dev": true + "has-symbols": "^1.0.1" + } }, "isarray": { "version": "1.0.0", @@ -11330,15 +9895,6 @@ "argparse": "^2.0.1" } }, - "jsnik": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/jsnik/-/jsnik-0.0.9.tgz", - "integrity": "sha512-hFy7lAnymzWYu07CeSLt+1LAB49r+ah+aOwraNq1lPa7/uSIKsb/G5pG7Ef8mpD6zfUWsvh+ajCh872kPMoNpA==", - "requires": { - "tape": "^5.1.1", - "xmlbuilder": "15.1.1" - } - }, "json-buffer": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", @@ -11371,6 +9927,11 @@ } } }, + "jsxnik": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/jsxnik/-/jsxnik-0.0.7.tgz", + "integrity": "sha512-gJE0v5KQrAtL/JTpUF+zkaAvwcEZhVldPoICvNCRfNaNA3dIgUX17FbLsBmMJUjcshUnWqA1fq/R674x++CkNA==" + }, "keygrip": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/keygrip/-/keygrip-1.1.0.tgz", @@ -11470,15 +10031,6 @@ "resolve-path": "^1.4.0" } }, - "latest-version": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", - "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", - "dev": true, - "requires": { - "package-json": "^6.3.0" - } - }, "levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -11489,6 +10041,12 @@ "type-check": "~0.4.0" } }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, "lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -11584,11 +10142,6 @@ "brace-expansion": "^1.1.7" } }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" - }, "minipass": { "version": "3.1.6", "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.6.tgz", @@ -11646,9 +10199,9 @@ } }, "nodemon": { - "version": "2.0.15", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.15.tgz", - "integrity": "sha512-gdHMNx47Gw7b3kWxJV64NI+Q5nfl0y5DgDbiVtShiwa7Z0IZ07Ll4RLFo6AjrhzMtoEZn5PDE3/c2AbVsiCkpA==", + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.19.tgz", + "integrity": "sha512-4pv1f2bMDj0Eeg/MhGqxrtveeQ5/G/UVe9iO6uTZzjnRluSA4PVWf8CW99LUPwGB3eNIA7zUFoP77YuI7hOc0A==", "dev": true, "requires": { "chokidar": "^3.5.2", @@ -11657,10 +10210,10 @@ "minimatch": "^3.0.4", "pstree.remy": "^1.1.8", "semver": "^5.7.1", + "simple-update-notifier": "^1.0.7", "supports-color": "^5.5.0", "touch": "^3.1.0", - "undefsafe": "^2.0.5", - "update-notifier": "^5.1.0" + "undefsafe": "^2.0.5" }, "dependencies": { "debug": { @@ -11899,26 +10452,6 @@ "p-finally": "^1.0.0" } }, - "package-json": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", - "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", - "dev": true, - "requires": { - "got": "^9.6.0", - "registry-auth-token": "^4.0.0", - "registry-url": "^5.0.0", - "semver": "^6.2.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, "parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -11943,11 +10476,6 @@ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" - }, "path-to-regexp": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.0.tgz", @@ -12055,15 +10583,6 @@ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, - "pupa": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", - "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", - "dev": true, - "requires": { - "escape-goat": "^2.0.0" - } - }, "qs": { "version": "6.9.4", "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.4.tgz", @@ -12122,26 +10641,6 @@ "quickselect": "^1.0.1" } }, - "rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dev": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true - } - } - }, "readable-stream": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", @@ -12167,23 +10666,11 @@ "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", "dev": true }, - "registry-auth-token": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz", - "integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==", - "dev": true, - "requires": { - "rc": "^1.2.8" - } - }, - "registry-url": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", - "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", - "dev": true, - "requires": { - "rc": "^1.2.8" - } + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true }, "require-from-string": { "version": "2.0.2", @@ -12231,14 +10718,6 @@ "lowercase-keys": "^1.0.0" } }, - "resumer": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/resumer/-/resumer-0.0.0.tgz", - "integrity": "sha1-8ej0YeQGS6Oegq883CqMiT0HZ1k=", - "requires": { - "through": "~2.3.4" - } - }, "rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -12252,6 +10731,15 @@ "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-2.0.4.tgz", "integrity": "sha512-l4NwboJM74Ilm4VKfbAtFeGq7aEjWL+5kVFcmgFA2MrdnQWx9iE/tUGvxY5HyMI7o/WpSIUFLbC5fbeaHgSCYg==" }, + "rxjs": { + "version": "7.5.6", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.6.tgz", + "integrity": "sha512-dnyv2/YsXhnm461G+R/Pe5bWP41Nm6LBXEYWI6eiFP4fiwx6WRI/CD0zbdVAudd9xwLEF2IDcKXLHit0FYjUzw==", + "dev": true, + "requires": { + "tslib": "^2.1.0" + } + }, "safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -12275,23 +10763,6 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" }, - "semver-diff": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", - "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", - "dev": true, - "requires": { - "semver": "^6.3.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, "semver-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-2.0.0.tgz", @@ -12328,28 +10799,34 @@ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" }, - "side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "requires": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - }, - "dependencies": { - "object-inspect": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", - "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==" - } - } + "shell-quote": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.3.tgz", + "integrity": "sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw==", + "dev": true }, "signal-exit": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" }, + "simple-update-notifier": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-1.0.7.tgz", + "integrity": "sha512-BBKgR84BJQJm6WjWFMHgLVuo61FBDSj1z/xSFUIozqO6wO7ii0JxCqlIud7Enr/+LhlbNI0whErq96P2qHNWew==", + "dev": true, + "requires": { + "semver": "~7.0.0" + }, + "dependencies": { + "semver": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", + "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", + "dev": true + } + } + }, "skmeans": { "version": "0.9.7", "resolved": "https://registry.npmjs.org/skmeans/-/skmeans-0.9.7.tgz", @@ -12371,6 +10848,12 @@ "sort-keys": "^1.0.0" } }, + "spawn-command": { + "version": "0.0.2-1", + "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz", + "integrity": "sha512-n98l9E2RMSJ9ON1AKisHzz7V42VDiBQGY6PB1BwRglz99wpVsSuGzQ+jOi6lFXBGVTCrRpltvjm+/XA+tpeJrg==", + "dev": true + }, "splaytree": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/splaytree/-/splaytree-3.1.0.tgz", @@ -12404,83 +10887,6 @@ "strip-ansi": "^6.0.1" } }, - "string.prototype.trim": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.3.tgz", - "integrity": "sha512-16IL9pIBA5asNOSukPfxX2W68BaBvxyiRK16H3RA/lWW9BDosh+w7f+LhomPHpXJ82QEe7w7/rY/S1CV97raLg==", - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.1" - }, - "dependencies": { - "es-abstract": { - "version": "1.18.0-next.2", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.2.tgz", - "integrity": "sha512-Ih4ZMFHEtZupnUh6497zEL4y2+w8+1ljnCyaTa+adcoafI1GOvMwFlDjBLfWR7y9VLfrjRJe9ocuHY1PSR9jjw==", - "requires": { - "call-bind": "^1.0.2", - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-negative-zero": "^2.0.1", - "is-regex": "^1.1.1", - "object-inspect": "^1.9.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.2", - "string.prototype.trimend": "^1.0.3", - "string.prototype.trimstart": "^1.0.3" - } - }, - "is-callable": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", - "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==" - }, - "is-negative-zero": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", - "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==" - }, - "object-inspect": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", - "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==" - }, - "object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - } - }, - "string.prototype.trimend": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.3.tgz", - "integrity": "sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw==", - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3" - } - }, - "string.prototype.trimstart": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.3.tgz", - "integrity": "sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg==", - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3" - } - } - } - }, "string.prototype.trimend": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", @@ -12548,98 +10954,6 @@ "has-flag": "^3.0.0" } }, - "tape": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/tape/-/tape-5.2.0.tgz", - "integrity": "sha512-J7stlwNrBEpHlZvbvPEAFvMmqIy79kMYvXiyekl5w6O7C2HF63bFKi8su70mdUtZZvNMm7EbIzLyI+fk6U9Ntg==", - "requires": { - "call-bind": "^1.0.2", - "deep-equal": "^2.0.5", - "defined": "^1.0.0", - "dotignore": "^0.1.2", - "for-each": "^0.3.3", - "glob": "^7.1.6", - "has": "^1.0.3", - "inherits": "^2.0.4", - "is-regex": "^1.1.2", - "minimist": "^1.2.5", - "object-inspect": "^1.9.0", - "object-is": "^1.1.4", - "object.assign": "^4.1.2", - "resolve": "^2.0.0-next.3", - "resumer": "^0.0.0", - "string.prototype.trim": "^1.2.3", - "through": "^2.3.8" - }, - "dependencies": { - "deep-equal": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.0.5.tgz", - "integrity": "sha512-nPiRgmbAtm1a3JsnLCf6/SLfXcjyN5v8L1TXzdCmHrXJ4hx+gW/w1YCcn7z8gJtSiDArZCgYtbao3QqLm/N1Sw==", - "requires": { - "call-bind": "^1.0.0", - "es-get-iterator": "^1.1.1", - "get-intrinsic": "^1.0.1", - "is-arguments": "^1.0.4", - "is-date-object": "^1.0.2", - "is-regex": "^1.1.1", - "isarray": "^2.0.5", - "object-is": "^1.1.4", - "object-keys": "^1.1.1", - "object.assign": "^4.1.2", - "regexp.prototype.flags": "^1.3.0", - "side-channel": "^1.0.3", - "which-boxed-primitive": "^1.0.1", - "which-collection": "^1.0.1", - "which-typed-array": "^1.1.2" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "is-regex": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.2.tgz", - "integrity": "sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg==", - "requires": { - "call-bind": "^1.0.2", - "has-symbols": "^1.0.1" - } - }, - "isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" - }, - "object-inspect": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", - "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==" - }, - "object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - } - }, - "resolve": { - "version": "2.0.0-next.3", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.3.tgz", - "integrity": "sha512-W8LucSynKUIDu9ylraa7ueVZ7hc0uAgJBxVsQSKOXOyle8a93qXhcz+XAXZ8bIq2d6i4Ehddn6Evt+0/UwKk6Q==", - "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" - } - } - } - }, "tar": { "version": "6.1.11", "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", @@ -12736,12 +11050,6 @@ "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==" }, - "to-readable-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", - "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", - "dev": true - }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -12796,6 +11104,12 @@ "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" }, + "tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true + }, "trim-repeated": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz", @@ -12804,6 +11118,12 @@ "escape-string-regexp": "^1.0.2" } }, + "tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", + "dev": true + }, "tsscmp": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/tsscmp/-/tsscmp-1.0.6.tgz", @@ -12846,14 +11166,11 @@ "mime-types": "~2.1.24" } }, - "typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "dev": true, - "requires": { - "is-typedarray": "^1.0.0" - } + "typescript": { + "version": "4.8.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.2.tgz", + "integrity": "sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==", + "dev": true }, "unbzip2-stream": { "version": "1.4.3", @@ -12870,53 +11187,11 @@ "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", "dev": true }, - "unique-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", - "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", - "dev": true, - "requires": { - "crypto-random-string": "^2.0.0" - } - }, "unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" }, - "update-notifier": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz", - "integrity": "sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==", - "dev": true, - "requires": { - "boxen": "^5.0.0", - "chalk": "^4.1.0", - "configstore": "^5.0.1", - "has-yarn": "^2.1.0", - "import-lazy": "^2.1.0", - "is-ci": "^2.0.0", - "is-installed-globally": "^0.4.0", - "is-npm": "^5.0.0", - "is-yarn-global": "^0.3.0", - "latest-version": "^5.1.0", - "pupa": "^2.1.1", - "semver": "^7.3.4", - "semver-diff": "^3.1.1", - "xdg-basedir": "^4.0.0" - }, - "dependencies": { - "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - } - } - }, "uri-js": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.0.tgz", @@ -12981,110 +11256,6 @@ "isexe": "^2.0.0" } }, - "which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "requires": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" - } - }, - "which-collection": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.1.tgz", - "integrity": "sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==", - "requires": { - "is-map": "^2.0.1", - "is-set": "^2.0.1", - "is-weakmap": "^2.0.1", - "is-weakset": "^2.0.1" - } - }, - "which-typed-array": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.4.tgz", - "integrity": "sha512-49E0SpUe90cjpoc7BOJwyPHRqSAd12c10Qm2amdEZrJPCY2NDxaW01zHITrem+rnETY3dwrbH3UUrUwagfCYDA==", - "requires": { - "available-typed-arrays": "^1.0.2", - "call-bind": "^1.0.0", - "es-abstract": "^1.18.0-next.1", - "foreach": "^2.0.5", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.1", - "is-typed-array": "^1.1.3" - }, - "dependencies": { - "es-abstract": { - "version": "1.18.0-next.2", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.2.tgz", - "integrity": "sha512-Ih4ZMFHEtZupnUh6497zEL4y2+w8+1ljnCyaTa+adcoafI1GOvMwFlDjBLfWR7y9VLfrjRJe9ocuHY1PSR9jjw==", - "requires": { - "call-bind": "^1.0.2", - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-negative-zero": "^2.0.1", - "is-regex": "^1.1.1", - "object-inspect": "^1.9.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.2", - "string.prototype.trimend": "^1.0.3", - "string.prototype.trimstart": "^1.0.3" - } - }, - "is-callable": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", - "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==" - }, - "is-negative-zero": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", - "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==" - }, - "object-inspect": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", - "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==" - }, - "object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - } - }, - "string.prototype.trimend": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.3.tgz", - "integrity": "sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw==", - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3" - } - }, - "string.prototype.trimstart": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.3.tgz", - "integrity": "sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg==", - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3" - } - } - } - }, "wide-align": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", @@ -13093,15 +11264,6 @@ "string-width": "^1.0.2 || 2 || 3 || 4" } }, - "widest-line": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", - "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", - "dev": true, - "requires": { - "string-width": "^4.0.0" - } - }, "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", @@ -13124,39 +11286,43 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, - "write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", - "dev": true, - "requires": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, - "xdg-basedir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", - "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", - "dev": true - }, - "xmlbuilder": { - "version": "15.1.1", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz", - "integrity": "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==" - }, "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true + }, "yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, + "yargs": { + "version": "17.5.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz", + "integrity": "sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==", + "dev": true, + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.0.0" + } + }, + "yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true + }, "yauzl": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", diff --git a/package.json b/package.json index b445cd5..83ba7b5 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,9 @@ "description": "", "main": "index.js", "scripts": { - "start": "node --expose-gc --max-old-space-size=4096 --unhandled-rejections=strict .", + "dev": "concurrently \"tsc --watch --preserveWatchOutput\" \"nodemon --delay 250ms --watch dist --watch images -e js,svg dist\"", + "build": "tsc", + "start": "node --expose-gc --max-old-space-size=4096 --unhandled-rejections=strict dist", "watch": "nodemon --ext js,xml,svg,json5 --watch style --watch images --watch config --watch legend.js --exec npm run start" }, "author": "Martin Ždila ", @@ -13,10 +15,15 @@ "color-convert": "2.0.1", "config": "3.3.7", "freemap-mapserver": "github:FreemapSlovakia/freemap-mapserver#develop", - "jsnik": "0.0.9" + "jsxnik": "0.0.7" }, "devDependencies": { + "typescript": "^4.8.2", + "@types/color-convert": "2.0.0", + "@types/config": "3.3.0", "eslint": "8.10.0", - "nodemon": "2.0.15" + "@types/node": "^18.7.14", + "concurrently": "^7.3.0", + "nodemon": "^2.0.19" } } diff --git a/preview.html b/preview.html index 31e2ac6..b60f0e9 100644 --- a/preview.html +++ b/preview.html @@ -1,24 +1,22 @@ + + + Map Preview + + + + - - - Map Preview - - - - - - -
- - - + +
+ + diff --git a/slovenia/pdal_dtm.json b/slovenia/pdal_dtm.json index dbdb273..841a9ac 100644 --- a/slovenia/pdal_dtm.json +++ b/slovenia/pdal_dtm.json @@ -1,16 +1,16 @@ { - "pipeline": [ - "GK_535_153.laz", - { - "type": "filters.range", - "limits": "Classification[2:2]" - }, - { - "filename": "GK_535_153.tif", - "gdaldriver": "GTiff", - "resolution": 1.0, - "output_type": "mean", - "type": "writers.gdal" - } - ] + "pipeline": [ + "GK_535_153.laz", + { + "type": "filters.range", + "limits": "Classification[2:2]" + }, + { + "filename": "GK_535_153.tif", + "gdaldriver": "GTiff", + "resolution": 1.0, + "output_type": "mean", + "type": "writers.gdal" + } + ] } diff --git a/style/AerialwayNames.tsx b/style/AerialwayNames.tsx new file mode 100644 index 0000000..c17e904 --- /dev/null +++ b/style/AerialwayNames.tsx @@ -0,0 +1,22 @@ +import { Rule, Style, TextSymbolizer } from "jsxnik/mapnikConfig"; +import { font } from "./fontFactory"; +import { SqlLayer } from "./SqlLayer"; + +export function AerialwayNames() { + return ( + <> + + + + + ); +} diff --git a/style/Aerialways.tsx b/style/Aerialways.tsx new file mode 100644 index 0000000..274beee --- /dev/null +++ b/style/Aerialways.tsx @@ -0,0 +1,17 @@ +import { LineSymbolizer, Rule, Style } from "jsxnik/mapnikConfig"; +import { SqlLayer } from "./SqlLayer"; + +export function Aerialways() { + return ( + <> + + + + + ); +} diff --git a/style/Aeroways.tsx b/style/Aeroways.tsx new file mode 100644 index 0000000..0b8f48a --- /dev/null +++ b/style/Aeroways.tsx @@ -0,0 +1,38 @@ +import { LineSymbolizer, Style } from "jsxnik/mapnikConfig"; +import { hsl } from "./colors"; +import { RuleEx } from "./RuleEx"; +import { SqlLayer } from "./SqlLayer"; + +export function Aeroways() { + return ( + <> + + + + + ); +} diff --git a/style/Barrierways.tsx b/style/Barrierways.tsx new file mode 100644 index 0000000..60e254b --- /dev/null +++ b/style/Barrierways.tsx @@ -0,0 +1,18 @@ +import { LineSymbolizer, Style } from "jsxnik/mapnikConfig"; +import { hsl } from "./colors"; +import { RuleEx } from "./RuleEx"; +import { SqlLayer } from "./SqlLayer"; + +export function Barrierways() { + return ( + <> + + + + + ); +} diff --git a/style/BorderedPolygonSymbolizer.tsx b/style/BorderedPolygonSymbolizer.tsx new file mode 100644 index 0000000..73f962a --- /dev/null +++ b/style/BorderedPolygonSymbolizer.tsx @@ -0,0 +1,12 @@ +import { LineSymbolizer, PolygonSymbolizer } from "jsxnik/mapnikConfig"; + +type Props = { color: string }; + +export function BorderedPolygonSymbolizer({ color }: Props) { + return ( + <> + + + + ); +} diff --git a/style/Borders.tsx b/style/Borders.tsx new file mode 100644 index 0000000..c6d7237 --- /dev/null +++ b/style/Borders.tsx @@ -0,0 +1,34 @@ +import { LineSymbolizer, Style } from "jsxnik/mapnikConfig"; +import { hsl } from "./colors"; +import { RuleEx } from "./RuleEx"; +import { SqlLayer } from "./SqlLayer"; + +export function Borders() { + return ( + <> + + + + + ); +} diff --git a/style/BuildingNames.tsx b/style/BuildingNames.tsx new file mode 100644 index 0000000..e4a9753 --- /dev/null +++ b/style/BuildingNames.tsx @@ -0,0 +1,49 @@ +import { Style, TextSymbolizer } from "jsxnik/mapnikConfig"; +import { font } from "./fontFactory"; +import { Placements } from "./Placements"; +import { RuleEx } from "./RuleEx"; +import { SqlLayer } from "./SqlLayer"; + +export function BuildingNames() { + return ( + <> + + + + + ); +} diff --git a/style/Buildings.tsx b/style/Buildings.tsx new file mode 100644 index 0000000..24bad03 --- /dev/null +++ b/style/Buildings.tsx @@ -0,0 +1,18 @@ +import { PolygonSymbolizer, Style } from "jsxnik/mapnikConfig"; +import { colors } from "./colors"; +import { RuleEx } from "./RuleEx"; +import { SqlLayer } from "./SqlLayer"; + +export function Buildings() { + return ( + <> + + + + + ); +} diff --git a/style/Crop.tsx b/style/Crop.tsx new file mode 100644 index 0000000..2b1a693 --- /dev/null +++ b/style/Crop.tsx @@ -0,0 +1,19 @@ +import { PolygonSymbolizer, Rule, Style } from "jsxnik/mapnikConfig"; +import { DatasourceEx } from "./DatasourceEx"; +import { StyledLayer } from "./StyledLayer"; + +export function Crop() { + return ( + <> + + + + + + + ); +} diff --git a/style/Custom.tsx b/style/Custom.tsx new file mode 100644 index 0000000..8f8f2eb --- /dev/null +++ b/style/Custom.tsx @@ -0,0 +1,30 @@ +import { Layer, Raw, StyleName } from "jsxnik/mapnikConfig"; +import { DatasourceEx } from "./DatasourceEx"; + +export type CustomProps = { + styles: any[]; + layers: { styles: string[]; geojson: string }[]; +}; + +export function Custom(custom: CustomProps) { + return ( + <> + {custom.styles[0].style /* it is hacky to use freemap-mapserver without modification */} + + {custom.layers.map((layer) => ( + + {layer.styles.map((styleName) => ( + {styleName} + ))} + + + + ))} + + ); +} diff --git a/style/Cutlines.tsx b/style/Cutlines.tsx new file mode 100644 index 0000000..5d8b3f5 --- /dev/null +++ b/style/Cutlines.tsx @@ -0,0 +1,25 @@ +import { LineSymbolizer, Style } from "jsxnik/mapnikConfig"; +import { colors } from "./colors"; +import { RuleEx } from "./RuleEx"; +import { SqlLayer } from "./SqlLayer"; +import { seq } from "./utils"; + +export function Cutlines() { + return ( + <> + + + + + ); +} diff --git a/style/DatasourceEx.tsx b/style/DatasourceEx.tsx new file mode 100644 index 0000000..04eeed4 --- /dev/null +++ b/style/DatasourceEx.tsx @@ -0,0 +1,15 @@ +import { Datasource, Layer, Parameter, StyleName } from "jsxnik/mapnikConfig"; + +type Props = { + params: Record; +} & Omit[0], "children">; + +export function DatasourceEx({ params, ...rest }: Props) { + return ( + + {Object.entries(params).map(([name, value]) => ( + {value} + ))} + + ); +} diff --git a/style/Embankments.tsx b/style/Embankments.tsx new file mode 100644 index 0000000..2dda487 --- /dev/null +++ b/style/Embankments.tsx @@ -0,0 +1,26 @@ +import { LinePatternSymbolizer, Rule, Style } from "jsxnik/mapnikConfig"; +import { SqlLayer } from "./SqlLayer"; + +export function Embankments() { + /* TODO don't render on hi-res hillshading */ + + return ( + <> + + + + + ); +} diff --git a/style/FeatureLines.tsx b/style/FeatureLines.tsx new file mode 100644 index 0000000..00be553 --- /dev/null +++ b/style/FeatureLines.tsx @@ -0,0 +1,45 @@ +import { LinePatternSymbolizer, LineSymbolizer, Style } from "jsxnik/mapnikConfig"; +import { hsl } from "./colors"; +import { RuleEx } from "./RuleEx"; +import { SqlLayer } from "./SqlLayer"; +import { seq } from "./utils"; + +export function FeatureLines() { + return ( + <> + + + + + ); +} diff --git a/style/FeatureLinesMaskable.tsx b/style/FeatureLinesMaskable.tsx new file mode 100644 index 0000000..c5837dc --- /dev/null +++ b/style/FeatureLinesMaskable.tsx @@ -0,0 +1,58 @@ +import { LinePatternSymbolizer, LineSymbolizer, Style } from "jsxnik/mapnikConfig"; +import { colors } from "./colors"; +import { GdalLayer } from "./GdalLayer"; +import { RuleEx } from "./RuleEx"; +import { SqlLayer } from "./SqlLayer"; + +type Props = { shading: boolean }; + +export function FeatureLinesMaskable({ shading }: Props) { + return ( + <> + + + {shading ? ( + + {["pl", "sk" /*, "at", "ch" (AT / CH is not so detailed) */].map((cc) => ( + + ))} + + ) : ( + + )} + + ); +} diff --git a/style/Fixmes.tsx b/style/Fixmes.tsx new file mode 100644 index 0000000..8e10b9c --- /dev/null +++ b/style/Fixmes.tsx @@ -0,0 +1,16 @@ +import { MarkersSymbolizer, Rule, Style } from "jsxnik/mapnikConfig"; +import { SqlLayer } from "./SqlLayer"; + +export function Fixmes() { + return ( + <> + + + + + ); +} diff --git a/style/FontSets.tsx b/style/FontSets.tsx new file mode 100644 index 0000000..b3e3971 --- /dev/null +++ b/style/FontSets.tsx @@ -0,0 +1,31 @@ +import { Font, FontSet } from "jsxnik/mapnikConfig"; + +export function FontSets() { + return ( + <> + + + + + + + + + + + + + + + + + + + + + + + + + ); +} diff --git a/style/GdalLayer.tsx b/style/GdalLayer.tsx new file mode 100644 index 0000000..5b778de --- /dev/null +++ b/style/GdalLayer.tsx @@ -0,0 +1,17 @@ +import { DatasourceEx } from "./DatasourceEx"; +import { StyledLayer } from "./StyledLayer"; + +type Props = { + file: string; + children?: JSX.Element; +} & Omit[0], "children">; + +export function GdalLayer({ file, children, ...rest }: Props) { + return ( + + + + {children} + + ); +} diff --git a/style/Geonames.tsx b/style/Geonames.tsx new file mode 100644 index 0000000..ed58226 --- /dev/null +++ b/style/Geonames.tsx @@ -0,0 +1,39 @@ +import { Rule, Style, TextSymbolizer } from "jsxnik/mapnikConfig"; +import { font } from "./fontFactory"; +import { ShpLayer } from "./ShpLayer"; + +export function Geonames() { + return ( + <> + + + + + ); +} diff --git a/style/HighwayNames.tsx b/style/HighwayNames.tsx new file mode 100644 index 0000000..03b4835 --- /dev/null +++ b/style/HighwayNames.tsx @@ -0,0 +1,30 @@ +import { Style, TextSymbolizer } from "jsxnik/mapnikConfig"; +import { colors } from "./colors"; +import { font } from "./fontFactory"; +import { RuleEx } from "./RuleEx"; +import { SqlLayer } from "./SqlLayer"; + +export function HighwayNames() { + return ( + <> + + + + + ); +} diff --git a/style/Highways.tsx b/style/Highways.tsx new file mode 100644 index 0000000..70759ad --- /dev/null +++ b/style/Highways.tsx @@ -0,0 +1,369 @@ +import { LinePatternSymbolizer, LineSymbolizer, MarkersSymbolizer, Style } from "jsxnik/mapnikConfig"; +import { colors, hsl } from "./colors"; +import { RuleEx } from "./RuleEx"; +import { Rail } from "./Rail"; +import { seq, types } from "./utils"; +import { Road } from "./Road"; +import { SqlLayer } from "./SqlLayer"; + +const glowDflt = { stroke: hsl(0, 33, 70), strokeLinejoin: "round" as const }; +const highwayDflt = { stroke: colors.track, strokeLinejoin: "round" as const }; + +export function Highways() { + return ( + <> + + + + + + + + + + + + + + + + + ); +} diff --git a/style/Housenumbers.tsx b/style/Housenumbers.tsx new file mode 100644 index 0000000..c72366d --- /dev/null +++ b/style/Housenumbers.tsx @@ -0,0 +1,29 @@ +import { Rule, Style, TextSymbolizer } from "jsxnik/mapnikConfig"; +import { colors } from "./colors"; +import { font } from "./fontFactory"; +import { SqlLayer } from "./SqlLayer"; + +export function Housenumbers() { + return ( + <> + + + + + ); +} diff --git a/style/Landcover.tsx b/style/Landcover.tsx new file mode 100644 index 0000000..cbe3023 --- /dev/null +++ b/style/Landcover.tsx @@ -0,0 +1,189 @@ +import { LineSymbolizer, PolygonPatternSymbolizer, PolygonSymbolizer, Style } from "jsxnik/mapnikConfig"; +import { BorderedPolygonSymbolizer } from "./BorderedPolygonSymbolizer"; +import { colors, hsl } from "./colors"; +import { RuleEx } from "./RuleEx"; +import { SqlLayer } from "./SqlLayer"; + +function getLandcoverSelect(tblSuffix: "_gen0" | "_gen1" | "" = "") { + return ` + SELECT + CASE WHEN type = 'wetland' AND tags->'wetland' IN ('bog', 'reedbed', 'marsh', 'swamp', 'wet_meadow', 'mangrove', 'fen') THEN tags->'wetland' ELSE type END AS type, + geometry, + position(type || ',' IN 'pedestrian,footway,pitch,library,baracks,parking,cemetery,place_of_worship,dam,weir,clearcut,scrub,orchard,vineyard,landfill,scree,quarry,railway,park,garden,allotments,kindergarten,school,college,university,village_green,wetland,grass,recreation_ground,zoo,farmyard,retail,commercial,residential,industrial,fell,bare_rock,heath,meadow,wood,forest,golf_course,grassland,farm,farmland,') AS z_order + FROM + osm_landusages${tblSuffix} + WHERE + geometry && !bbox! + ORDER BY + z_order DESC, osm_id + `; +} + +export function Landcover() { + return ( + <> + + + + + + + + + ); +} diff --git a/style/LandcoverNames.tsx b/style/LandcoverNames.tsx new file mode 100644 index 0000000..6232d25 --- /dev/null +++ b/style/LandcoverNames.tsx @@ -0,0 +1,63 @@ +import { Style, TextSymbolizer } from "jsxnik/mapnikConfig"; +import { colors, hsl } from "./colors"; +import { font } from "./fontFactory"; +import { Placements } from "./Placements"; +import { RuleEx } from "./RuleEx"; +import { SqlLayer } from "./SqlLayer"; +import { seq } from "./utils"; + +export function LandcoverNames() { + return ( + <> + + + + + ); +} diff --git a/style/Legend.tsx b/style/Legend.tsx new file mode 100644 index 0000000..76dd390 --- /dev/null +++ b/style/Legend.tsx @@ -0,0 +1,30 @@ +import { Layer, StyleName } from "jsxnik/mapnikConfig"; +import { DatasourceEx } from "./DatasourceEx"; + +export type Props = { + legendLayers: { + styles: string[]; + geojson: unknown; // TODO GeoJSON + }[]; +}; + +export function Legend({ legendLayers }: Props) { + return ( + <> + {legendLayers.map((layer) => ( + + {layer.styles.map((style) => ( + {style} + ))} + + + + ))} + + ); +} diff --git a/style/LocalityNames.tsx b/style/LocalityNames.tsx new file mode 100644 index 0000000..622db29 --- /dev/null +++ b/style/LocalityNames.tsx @@ -0,0 +1,43 @@ +import { Style, TextSymbolizer } from "jsxnik/mapnikConfig"; +import { hsl } from "./colors"; +import { font } from "./fontFactory"; +import { Placements } from "./Placements"; +import { RuleEx } from "./RuleEx"; +import { SqlLayer } from "./SqlLayer"; + +export function LocalityNames() { + return ( + <> + + + + + ); +} diff --git a/style/MilitaryAreas.tsx b/style/MilitaryAreas.tsx new file mode 100644 index 0000000..0a25bf1 --- /dev/null +++ b/style/MilitaryAreas.tsx @@ -0,0 +1,26 @@ +import { LineSymbolizer, PolygonPatternSymbolizer, Style } from "jsxnik/mapnikConfig"; +import { hsl } from "./colors"; +import { RuleEx } from "./RuleEx"; +import { SqlLayer } from "./SqlLayer"; + +export function MilitaryAreas() { + return ( + <> + + + + + ); +} diff --git a/style/Pipelines.tsx b/style/Pipelines.tsx new file mode 100644 index 0000000..ac68630 --- /dev/null +++ b/style/Pipelines.tsx @@ -0,0 +1,39 @@ +import { LineSymbolizer, Style } from "jsxnik/mapnikConfig"; +import { hsl } from "./colors"; +import { RuleEx } from "./RuleEx"; +import { SqlLayer } from "./SqlLayer"; + +export function Pipelines() { + /* TODO split to several layers: underground/underwater, overground, overhead */ + + return ( + <> + + + + + ); +} diff --git a/style/Placements.tsx b/style/Placements.tsx new file mode 100644 index 0000000..942c904 --- /dev/null +++ b/style/Placements.tsx @@ -0,0 +1,11 @@ +import { Placement } from "jsxnik/mapnikConfig"; + +export function Placements() { + return ( + <> + {[3, -3, 6, -6, 9, -9].map((off) => ( + + ))} + + ); +} diff --git a/style/Placenames.tsx b/style/Placenames.tsx new file mode 100644 index 0000000..73bedfc --- /dev/null +++ b/style/Placenames.tsx @@ -0,0 +1,145 @@ +import { Style, TextSymbolizer } from "jsxnik/mapnikConfig"; +import { font } from "./fontFactory"; +import { Placements } from "./Placements"; +import { RuleEx } from "./RuleEx"; +import { SqlLayer } from "./SqlLayer"; +import { seq } from "./utils"; + +export function PlaceNames2() { + return ( + <> + + + + + ); +} + +export function PlaceNames1() { + return ( + <> + + + + + + + + + ); +} diff --git a/style/ProtectedAreaNames.tsx b/style/ProtectedAreaNames.tsx new file mode 100644 index 0000000..b000024 --- /dev/null +++ b/style/ProtectedAreaNames.tsx @@ -0,0 +1,60 @@ +import { Style, TextSymbolizer } from "jsxnik/mapnikConfig"; +import { hsl } from "./colors"; +import { font } from "./fontFactory"; +import { Placements } from "./Placements"; +import { RuleEx } from "./RuleEx"; +import { SqlLayer } from "./SqlLayer"; + +export function ProtectedAreaNames() { + return ( + <> + + + + + ); +} diff --git a/style/ProtectedAreas.tsx b/style/ProtectedAreas.tsx new file mode 100644 index 0000000..ba622ae --- /dev/null +++ b/style/ProtectedAreas.tsx @@ -0,0 +1,34 @@ +import { LinePatternSymbolizer, LineSymbolizer, PolygonPatternSymbolizer, Style } from "jsxnik/mapnikConfig"; +import { hsl } from "./colors"; +import { RuleEx } from "./RuleEx"; +import { SqlLayer } from "./SqlLayer"; + +export function ProtectedAreas() { + return ( + <> + + + + + ); +} diff --git a/style/Rail.tsx b/style/Rail.tsx new file mode 100644 index 0000000..beaf096 --- /dev/null +++ b/style/Rail.tsx @@ -0,0 +1,61 @@ +import { LineSymbolizer } from "jsxnik/mapnikConfig"; + +type Props = { + color: string; + weight: number; + sleeperWeight: number; + spacing: number; + glowWidth: number; +}; + +export function Rail({ color, weight, sleeperWeight, spacing, glowWidth }: Props) { + const gw = weight + glowWidth * 2; + + const sgw = sleeperWeight + glowWidth * 2; + + return ( + <> + {glowWidth !== undefined && ( + <> + + + + + )} + + + + + + + + + + + + + + + + ); +} diff --git a/style/Road.tsx b/style/Road.tsx new file mode 100644 index 0000000..c1a86c1 --- /dev/null +++ b/style/Road.tsx @@ -0,0 +1,33 @@ +import { LineSymbolizer } from "jsxnik/mapnikConfig"; + +type Props = { strokeWidth: number } & Parameters[0]; + +export function Road(props: Props) { + return ( + <> + + + + + + + + + + + + + ); +} diff --git a/style/RuleEx.tsx b/style/RuleEx.tsx new file mode 100644 index 0000000..86bc310 --- /dev/null +++ b/style/RuleEx.tsx @@ -0,0 +1,22 @@ +import { Filter, MaxScaleDenominator, MinScaleDenominator, Rule } from "jsxnik/mapnikConfig"; +import { types, zoomDenoms } from "./utils"; + +type Props = { + minZoom?: number; + maxZoom?: number; + type?: string | string[]; + filter?: string; + children: JSX.Element; +}; + +export function RuleEx({ minZoom, maxZoom, type, filter, children }: Props) { + return ( + + {minZoom !== undefined && {zoomDenoms[minZoom]}} + {maxZoom !== undefined && {zoomDenoms[maxZoom + 1]}} + {type != undefined && {types(...(Array.isArray(type) ? type : [type]))}} + {filter != undefined && {filter}} + {children} + + ); +} diff --git a/style/Sea.tsx b/style/Sea.tsx new file mode 100644 index 0000000..4ca3d63 --- /dev/null +++ b/style/Sea.tsx @@ -0,0 +1,24 @@ +import { Rule, Style } from "jsxnik/mapnikConfig"; +import { BorderedPolygonSymbolizer } from "./BorderedPolygonSymbolizer"; +import { ShpLayer } from "./ShpLayer"; + +export function Sea() { + return ( + <> + + + + + + + ); +} diff --git a/style/ShadingAndContours.tsx b/style/ShadingAndContours.tsx new file mode 100644 index 0000000..5287419 --- /dev/null +++ b/style/ShadingAndContours.tsx @@ -0,0 +1,174 @@ +import { LineSymbolizer, RasterSymbolizer, Rule, Style, TextSymbolizer } from "jsxnik/mapnikConfig"; +import { colors } from "./colors"; +import { DatasourceEx } from "./DatasourceEx"; +import { font } from "./fontFactory"; +import { GdalLayer } from "./GdalLayer"; +import { RuleEx } from "./RuleEx"; +import { SqlLayer } from "./SqlLayer"; +import { StyledLayer } from "./StyledLayer"; + +type Props0 = { + cc: string; + cutCcs: string[]; + contours: boolean; + shading: boolean; +}; + +function ContoursStyle() { + return ( + + ); +} + +function HillshadeStyle() { + return ( + + ); +} + +function CountryShadingAndContours({ cc, cutCcs, contours, shading }: Props0) { + return ( + + + + + {contours && ( + + )} + + {shading && } + + {cutCcs.map((cutCc) => ( + + ))} + + + ); +} + +type Props = { + contours: boolean; + shading: boolean; +}; + +export function ShadingAndCountours({ contours, shading }: Props) { + return ( + <> + {/* hillshading helper for mask */} + + + + + + + + + + + + + + + + + + + {/* to cut out detailed */} + + {["it", "at", "ch", "si", "pl", "sk"].map((cc) => ( + + ))} + + + {contours && } + + {shading && } + + + + ); +} diff --git a/style/ShpLayer.tsx b/style/ShpLayer.tsx new file mode 100644 index 0000000..d03ac33 --- /dev/null +++ b/style/ShpLayer.tsx @@ -0,0 +1,17 @@ +import { DatasourceEx } from "./DatasourceEx"; +import { StyledLayer } from "./StyledLayer"; + +type Props = { + file: string; + children?: JSX.Element; +} & Omit[0], "children">; + +export function ShpLayer({ file, children, ...rest }: Props) { + return ( + + + + {children} + + ); +} diff --git a/style/SolarPowerPlants.tsx b/style/SolarPowerPlants.tsx new file mode 100644 index 0000000..048b238 --- /dev/null +++ b/style/SolarPowerPlants.tsx @@ -0,0 +1,28 @@ +import { LineSymbolizer, PolygonPatternSymbolizer, Style } from "jsxnik/mapnikConfig"; +import { hsl } from "./colors"; +import { RuleEx } from "./RuleEx"; +import { SqlLayer } from "./SqlLayer"; + +export function SolarPowerPlants() { + return ( + <> + + + + + ); +} diff --git a/style/SqlLayer.tsx b/style/SqlLayer.tsx new file mode 100644 index 0000000..bd7cbcb --- /dev/null +++ b/style/SqlLayer.tsx @@ -0,0 +1,17 @@ +import { DatasourceEx } from "./DatasourceEx"; +import { StyledLayer } from "./StyledLayer"; + +type Props = { + sql: string; + children?: JSX.Element; +} & Omit[0], "children">; + +export function SqlLayer({ sql, children, ...rest }: Props) { + return ( + + + + {children} + + ); +} diff --git a/style/StyledLayer.tsx b/style/StyledLayer.tsx new file mode 100644 index 0000000..8a96484 --- /dev/null +++ b/style/StyledLayer.tsx @@ -0,0 +1,34 @@ +import { Layer, StyleName } from "jsxnik/mapnikConfig"; +import { zoomDenoms } from "./utils"; + +type Props = { + styleName: string | string[]; + maxZoom?: number; + minZoom?: number; +} & Parameters[0]; + +let _enabled = true; + +export function setLayersEnabled(enabled: boolean) { + _enabled = enabled; +} + +export function StyledLayer({ styleName, children, maxZoom, minZoom, ...rest }: Props) { + return ( + _enabled && ( + + {Array.isArray(styleName) ? ( + styleName.map((s) => {s}) + ) : ( + {styleName} + )} + + {children} + + ) + ); +} diff --git a/style/Trees.tsx b/style/Trees.tsx new file mode 100644 index 0000000..5430e03 --- /dev/null +++ b/style/Trees.tsx @@ -0,0 +1,38 @@ +import { MarkersSymbolizer, Style } from "jsxnik/mapnikConfig"; +import { colors } from "./colors"; +import { RuleEx } from "./RuleEx"; +import { SqlLayer } from "./SqlLayer"; +import { seq } from "./utils"; + +export function Trees() { + return ( + <> + + + + + ); +} diff --git a/style/ValleysRidges.tsx b/style/ValleysRidges.tsx new file mode 100644 index 0000000..d41998e --- /dev/null +++ b/style/ValleysRidges.tsx @@ -0,0 +1,67 @@ +import { Placement, Style, TextSymbolizer } from "jsxnik/mapnikConfig"; +import { font } from "./fontFactory"; +import { RuleEx } from "./RuleEx"; +import { SqlLayer } from "./SqlLayer"; +import { seq } from "./utils"; + +export function ValleysRidges() { + return ( + <> + + + + + + + ); +} diff --git a/style/WaterArea.tsx b/style/WaterArea.tsx new file mode 100644 index 0000000..41cd1dd --- /dev/null +++ b/style/WaterArea.tsx @@ -0,0 +1,41 @@ +import { PolygonPatternSymbolizer, PolygonSymbolizer, Style } from "jsxnik/mapnikConfig"; +import { BorderedPolygonSymbolizer } from "./BorderedPolygonSymbolizer"; +import { colors } from "./colors"; +import { RuleEx } from "./RuleEx"; +import { SqlLayer } from "./SqlLayer"; + +export function WaterArea() { + return ( + <> + + + + + + + ); +} diff --git a/style/WaterAreaNames.tsx b/style/WaterAreaNames.tsx new file mode 100644 index 0000000..c47e9d0 --- /dev/null +++ b/style/WaterAreaNames.tsx @@ -0,0 +1,50 @@ +import { Style, TextSymbolizer } from "jsxnik/mapnikConfig"; +import { font } from "./fontFactory"; +import { Placements } from "./Placements"; +import { RuleEx } from "./RuleEx"; +import { SqlLayer } from "./SqlLayer"; +import { seq } from "./utils"; + +export function WaterAreaNames() { + /* TODO to feature_names to consider z_order */ + return ( + <> + + + + + ); +} diff --git a/style/WaterLine.tsx b/style/WaterLine.tsx new file mode 100644 index 0000000..903960c --- /dev/null +++ b/style/WaterLine.tsx @@ -0,0 +1,72 @@ +import { LineSymbolizer, MarkersSymbolizer, Style } from "jsxnik/mapnikConfig"; +import { colors } from "./colors"; +import { RuleEx } from "./RuleEx"; +import { SqlLayer } from "./SqlLayer"; + +export function WaterLine() { + return ( + <> + + + + + + + + + ); +} diff --git a/style/WaterLineNames.tsx b/style/WaterLineNames.tsx new file mode 100644 index 0000000..b5c8fe7 --- /dev/null +++ b/style/WaterLineNames.tsx @@ -0,0 +1,64 @@ +import { Style, TextSymbolizer } from "jsxnik/mapnikConfig"; +import { font } from "./fontFactory"; +import { RuleEx } from "./RuleEx"; +import { SqlLayer } from "./SqlLayer"; + +export function WaterLineNames() { + return ( + <> + + + ''`, + sql={` + SELECT ${process.env.FM_CUSTOM_SQL || ""} ST_LineMerge(ST_Collect(geometry)) AS geometry, name, type + FROM osm_waterways + WHERE geometry && !bbox! AND type = 'river' AND name <> '' + GROUP BY name, type + `} + /> + + ''`, + sql={` + SELECT ${process.env.FM_CUSTOM_SQL || ""} ST_LineMerge(ST_Collect(geometry)) AS geometry, name, type + FROM osm_waterways WHERE geometry && !bbox! AND name <> '' + GROUP BY name, type + `} + /> + + ); +} diff --git a/style/colors.js b/style/colors.ts similarity index 73% rename from style/colors.js rename to style/colors.ts index be8bcfe..f483da1 100644 --- a/style/colors.js +++ b/style/colors.ts @@ -1,11 +1,11 @@ -const convert = require('color-convert'); +import convert from "color-convert"; -const colors = { +export const colors = { allotments: hsl(50, 45, 85), areaLabel: hsl(0, 0, 33), brownfield: hsl(30, 30, 60), building: hsl(0, 0, 50), - contour: 'black', + contour: "black", farmland: hsl(60, 70, 95), farmyard: hsl(50, 44, 80), forest: hsl(120, 40, 82), @@ -22,11 +22,6 @@ const colors = { waterLabelHalo: hsl(216, 30, 100), }; -function hsl(h, s, l) { - return `#${convert.hsl.hex(h, s, l)}`; +export function hsl(h: number, s: number, l: number) { + return `#${convert.hsl.hex([h, s, l])}`; } - -module.exports = { - colors, - hsl, -}; diff --git a/style/features.tsx b/style/features.tsx new file mode 100644 index 0000000..cc24b25 --- /dev/null +++ b/style/features.tsx @@ -0,0 +1,475 @@ +import { Format, MarkersSymbolizer, Placement, Style, TextSymbolizer } from "jsxnik/mapnikConfig"; +import { colors } from "./colors"; +import { font } from "./fontFactory"; +import { RuleEx } from "./RuleEx"; +import { SqlLayer } from "./SqlLayer"; +import { seq } from "./utils"; + +function poiIconProjection(ele = "null", access = "null", isolation = "null") { + return `osm_id, geometry, ${ele} AS ele, ${access} AS access, ${isolation} AS isolation`; +} + +function poiNameProjection(ele = "null", access = "null", isolation = "null") { + return `osm_id, geometry, name AS n, ${ele} AS ele, ${access} AS access, ${isolation} AS isolation`; +} + +function getFeaturesSql(zoom: number, mkProjection: (ele?: string, access?: string, isolation?: string) => string) { + const sqls = [ + `SELECT * FROM ( + SELECT + ${mkProjection("tags->'ele'", "null", "isolation")}, + CASE WHEN isolation > 4500 THEN 'peak1' + WHEN isolation BETWEEN 3000 AND 4500 THEN 'peak2' + WHEN isolation BETWEEN 1500 AND 3000 THEN 'peak3' + ELSE 'peak' END AS type + FROM + osm_features + NATURAL LEFT JOIN + isolations + WHERE + type = 'peak' AND name <> '' AND geometry && !bbox!`, + ]; + + if (zoom >= 12) { + sqls.push(` + UNION ALL + SELECT + ${mkProjection("ele")}, + CASE type + WHEN 'guidepost' THEN (CASE WHEN name = '' THEN 'guidepost_noname' ELSE 'guidepost' END) + ELSE type + END AS type + FROM + osm_infopoints + `); + } + + if (zoom >= 12 && zoom < 14) { + sqls.push(` + UNION ALL + SELECT + ${mkProjection("tags->'ele'")}, + type + FROM + osm_features + WHERE + type = 'aerodrome' AND tags ? 'icao' + + UNION ALL + SELECT + ${mkProjection("tags->'ele'")}, + type + FROM + osm_feature_polys + WHERE + type = 'aerodrome' AND tags ? 'icao' + `); + } + + if (zoom >= 14) { + // TODO distinguish various "spring types" (fountain, geyser, ...) + + sqls.push(` + UNION ALL + SELECT + ${mkProjection("null", "tags->'access'")}, + type + FROM + osm_sports + WHERE + type IN ('free_flying', 'soccer', 'tennis', 'basketball') + + UNION ALL + SELECT + ${mkProjection("tags->'ele'", "CASE WHEN type IN ('cave_entrance') THEN null ELSE tags->'access' END")}, + CASE type + WHEN 'communications_tower' THEN 'tower_communication' + WHEN 'shelter' THEN (CASE WHEN tags->'shelter_type' IN ('shopping_cart', 'lean_to', 'public_transport', 'picnic_shelter', 'basic_hut', 'weather_shelter') THEN tags->'shelter_type' ELSE 'shelter' END) + ELSE (CASE WHEN type IN ('mine', 'adit', 'mineshaft') AND tags->'disused' NOT IN ('', 'no') THEN 'disused_mine' ELSE type END) + END AS type + FROM + osm_features + WHERE + type <> 'peak' + AND (type <> 'tree' OR tags->'protected' NOT IN ('', 'no')) + AND (type <> 'saddle' OR name <> '') + + UNION ALL + SELECT + ${mkProjection("tags->'ele'", "CASE WHEN type IN ('cave_entrance') THEN null ELSE tags->'access' END")}, + CASE type WHEN 'communications_tower' THEN 'tower_communication' + WHEN 'shelter' THEN (CASE WHEN tags->'shelter_type' IN ('shopping_cart', 'lean_to', 'public_transport', 'picnic_shelter', 'basic_hut', 'weather_shelter') THEN tags->'shelter_type' ELSE 'shelter' END) + ELSE (CASE WHEN type IN ('mine', 'adit', 'mineshaft') AND tags->'disused' NOT IN ('', 'no') THEN 'disused_mine' ELSE type END) + END AS type + FROM + osm_feature_polys + + UNION ALL + SELECT + ${mkProjection("ele")}, + CASE WHEN type = 'hot_spring' THEN 'hot_spring' ELSE + CASE WHEN type = 'spring_box' OR refitted = 'yes' THEN 'refitted_' ELSE '' END || + CASE WHEN drinking_water = 'yes' OR drinking_water = 'treated' THEN 'drinking_' WHEN drinking_water = 'no' THEN 'not_drinking_' ELSE '' END || 'spring' + END AS type + FROM + osm_springs + + UNION ALL + SELECT + ${mkProjection()}, + 'ruins' AS type + FROM + osm_ruins + + UNION ALL + SELECT + ${mkProjection()}, + building AS type + FROM + osm_place_of_worships + WHERE + building IN ('chapel', 'church', 'basilica', 'temple') + + UNION ALL + SELECT + ${mkProjection("ele")}, + CONCAT("class", '_', CASE type + WHEN 'communication' THEN 'communication' + WHEN 'observation' THEN 'observation' + WHEN 'bell_tower' THEN 'bell_tower' + ELSE 'other' END) AS type + FROM + osm_towers + `); + } + + if (zoom >= 15) { + sqls.push(` + UNION ALL + SELECT + ${mkProjection()}, + type + FROM + osm_shops + WHERE + type IN ('convenience', 'fuel', 'confectionery', 'pastry', 'bicycle', 'supermarket') + + UNION ALL + SELECT + ${mkProjection("null", "tags->'access'")}, + 'building' AS type + FROM + osm_building_points + WHERE + type <> 'no' + + UNION ALL + SELECT + ${mkProjection()}, + type + FROM + osm_feature_lines + WHERE + type IN ('dam', 'weir') + `); + } + + if (zoom >= 17 && mkProjection !== poiNameProjection) { + sqls.push(` + UNION ALL + SELECT + ${mkProjection()}, + type + FROM + osm_barrierpoints + WHERE + type IN ('lift_gate', 'swing_gate', 'gate') + + UNION ALL + SELECT + ${mkProjection()}, + 'ford' AS type + FROM + osm_fords + `); + } + + sqls.push(` + ) AS abc LEFT JOIN z_order_poi USING (type) + WHERE + geometry && !bbox! + ORDER BY + z_order, isolation DESC nulls last, ele DESC nulls last, osm_id + `); + + return sqls.join(""); +} + +const N = false; +const Y = true; +const NN = null; + +// minIconZoom, minTextZoom, withEle, natural, types/icon, textOverrides +const pois: [number, number | null, boolean, boolean, string | string[], {}?][] = [ + [12, 12, N, N, "aerodrome"], + [12, 12, Y, N, "guidepost", { icon: "guidepost_x", font: { fontsetName: "bold", dy: -8 }, maxZoom: 12 }], + [13, 13, Y, N, "guidepost", { icon: "guidepost_xx", font: { fontsetName: "bold" }, maxZoom: 13 }], + [14, 14, Y, N, "guidepost", { icon: "guidepost_xx", font: { fontsetName: "bold" } }], + [10, 10, Y, Y, "peak1", { icon: "peak", font: { size: 13, dy: -8 } }], + [11, 11, Y, Y, "peak2", { icon: "peak", font: { size: 13, dy: -8 } }], + [12, 12, Y, Y, "peak3", { icon: "peak", font: { size: 13, dy: -8 } }], + [13, 13, Y, Y, "peak", { font: { size: 13, dy: -8 } }], + + [14, 14, N, N, "castle"], + [14, 15, Y, Y, "arch"], + [14, 15, Y, Y, "cave_entrance"], + [14, 15, Y, Y, "spring", { font: { fill: colors.waterLabel } }], + [14, 15, Y, Y, "refitted_spring", { font: { fill: colors.waterLabel } }], + [14, 15, Y, Y, "drinking_spring", { font: { fill: colors.waterLabel } }], + [14, 15, Y, Y, "not_drinking_spring", { font: { fill: colors.waterLabel } }], + [14, 15, Y, Y, "refitted_drinking_spring", { font: { fill: colors.waterLabel } }], + [14, 15, Y, Y, "refitted_not_drinking_spring", { font: { fill: colors.waterLabel } }], + [14, 15, Y, Y, "hot_spring", { font: { fill: colors.waterLabel } }], + [14, 15, Y, Y, "waterfall", { font: { fill: colors.waterLabel } }], + [14, 15, N, N, ["drinking_water", "water_point"], { font: { fill: colors.waterLabel } }], + [14, 15, N, N, "water_well", { font: { fill: colors.waterLabel } }], + [14, 15, Y, N, "monument"], + [14, 15, Y, Y, "viewpoint"], + [14, 15, Y, N, ["mine", "adit", "mineshaft"]], + [14, 15, Y, N, "disused_mine"], + [14, 15, Y, N, "hotel"], + [14, 15, Y, N, "chalet"], + [14, 15, Y, N, "hostel"], + [14, 15, Y, N, "motel"], + [14, 15, Y, N, "guest_house"], + [14, 15, Y, N, "apartment"], + [14, 15, Y, N, "wilderness_hut"], + [14, 15, Y, N, "alpine_hut"], + [14, 15, Y, N, "camp_site"], + [14, 15, N, N, "attraction"], + [14, 15, N, N, "hospital"], + [14, 15, N, N, "townhall"], + [14, 15, N, N, ["church", "chapel", "cathedral", "temple", "basilica"]], + [14, 15, Y, N, "tower_observation"], + [14, 15, Y, N, "archaeological_site"], + [14, 15, N, N, ["station", "halt"]], + [14, 15, N, N, "bus_station"], + [14, 15, N, N, "water_park"], + [14, 15, N, N, "museum"], + [14, 15, N, N, "free_flying"], + [14, 15, N, N, "forester's_lodge"], + [14, 15, N, N, "horse_riding"], + [14, 15, N, N, "golf_course"], + [14, 14, N, N, ["kindergarten", "recycling"], { font: { fill: colors.areaLabel }, icon: null }], // has no icon yet - render as area name + + [15, NN, Y, N, "guidepost_noname", { icon: "guidepost_x" }], + [15, 15, Y, Y, "saddle", { font: { size: 13, dy: -8 } }], + + [15, 16, N, N, "ruins"], + [15, 16, N, N, "chimney"], + [15, 16, N, N, "fire_station"], + [15, 16, N, N, "community_centre"], + [15, 16, N, N, "police"], + [15, 16, N, N, "office"], // information=office + [15, 16, N, N, "hunting_stand"], + [15, 16, Y, N, "shelter"], + // [15, 16, Y, N, 'shopping_cart'], + [15, 16, Y, N, "lean_to"], + [15, 16, Y, N, "public_transport"], + [15, 16, Y, N, "picnic_shelter"], + [15, 16, Y, N, "basic_hut"], + [15, 16, Y, N, "weather_shelter"], + [15, 16, N, Y, "rock"], + [15, 16, N, Y, "stone"], + [15, 16, N, Y, "sinkhole"], + [15, 16, N, N, "pharmacy"], + [15, 16, N, N, "cinema"], + [15, 16, N, N, "theatre"], + [15, 16, N, N, "memorial"], + [15, 16, N, N, "pub"], + [15, 16, N, N, "cafe"], + [15, 16, N, N, "bar"], + [15, 16, N, N, "restaurant"], + [15, 16, N, N, "convenience"], + [15, 16, N, N, "supermarket"], + [15, 16, N, N, "fast_food"], + [15, 16, N, N, ["confectionery", "pastry"]], + [15, 16, N, N, "fuel"], + [15, 16, N, N, "post_office"], + [15, 16, N, N, "bunker"], + [15, 16, N, N, "boundary_stone"], + [15, NN, N, N, "mast_other"], + [15, NN, N, N, "tower_other"], + [15, NN, N, N, ["tower_communication", "mast_communication"]], + [15, 16, N, N, "tower_bell_tower"], + [15, 16, N, N, "water_tower"], + [15, 16, N, N, "bus_stop"], + [15, 16, N, N, "sauna"], + [15, 16, N, N, "taxi"], + [15, 16, N, N, "bicycle"], + [15, 16, N, N, "building"], + [15, 15, N, Y, "tree"], + [15, 16, N, N, "bird_hide"], + [15, 16, N, N, "dam", { font: { fill: colors.waterLabel } }], + [15, 16, N, N, "weir", { font: { fill: colors.waterLabel } }], + [15, 15, N, N, ["school", "university", "college"], { font: { fill: colors.areaLabel }, icon: null }], // has no icon yet - render as area name + + [16, 17, N, N, "miniature_golf"], + [16, 17, N, N, "soccer"], + [16, 17, N, N, "tennis"], + [16, 17, N, N, "basketball"], + [16, NN, Y, N, ["guidepost_noname", "route_marker"], { icon: "guidepost_x" }], + [16, NN, N, N, "picnic_table"], + [16, NN, N, N, "outdoor_seating"], + [16, 17, N, N, "picnic_site"], + [16, 16, N, N, "board"], + [16, 17, N, N, "map"], + [16, 17, N, N, "artwork"], + [16, 17, N, N, "fountain", { font: { fill: colors.waterLabel } }], + [16, NN, N, N, "watering_place", { font: { fill: colors.waterLabel } }], + [16, NN, N, N, "feeding_place", { icon: "manger" }], + [16, NN, N, N, "game_feeding", { icon: "manger" }], + [16, 17, N, N, "playground"], + [ + 16, + 17, + N, + N, + ["water_works", "reservoir_covered", "pumping_station", "wastewater_plant"], + { font: { fill: colors.waterLabel } }, + ], + [16, 17, N, N, "cross"], + + [17, 18, N, N, "wayside_shrine"], + [17, 18, N, N, ["cross", "wayside_cross", "tree_shrine"]], // NOTE cross is also on lower zoom + [17, NN, N, N, "firepit"], + [17, NN, N, N, "toilets"], + [17, NN, N, N, "bench"], + [17, 18, N, N, "beehive", "apiary"], + [17, NN, N, N, ["lift_gate", "swing_gate"]], + [17, NN, N, N, "ford"], + + [18, 19, N, N, "post_box"], + [18, 19, N, N, "telephone"], + [18, NN, N, N, "gate"], + [18, NN, N, N, "waste_disposal"], +]; + +export function Features() { + return ( + <> + + + {seq(10, 17).map((zoom) => ( + + ))} + + ); +} + +export function FeatureNames() { + return ( + <> + + + {seq(10, 17).map((zoom) => ( + '' THEN chr(10) || chr(8203) ELSE '' END AS elehack + FROM (${getFeaturesSql(zoom, poiNameProjection)}) subq + `} + /> + ))} + + ); +} diff --git a/style/fontFactory.js b/style/fontFactory.ts similarity index 61% rename from style/fontFactory.js rename to style/fontFactory.ts index 5118b61..6c12499 100644 --- a/style/fontFactory.js +++ b/style/fontFactory.ts @@ -1,13 +1,11 @@ -const { colors } = require('./colors'); +import { colors } from "./colors"; -module.exports = { font }; - -function font() { +export function font() { return { // margin: 2, - fontsetName: 'regular', - fill: 'black', - haloFill: 'white', + fontsetName: "regular", + fill: "black", + haloFill: "white", haloRadius: 1.5, haloOpacity: 0.75, size: 12, @@ -22,7 +20,7 @@ function font() { nature() { return { ...this, - fontsetName: 'italic', + fontsetName: "italic", }; }, water() { @@ -32,17 +30,19 @@ function font() { haloFill: colors.waterLabelHalo, }; }, - if (cond, then) { + if(cond: boolean, then: any) { return cond ? then(this) : this; }, line(spacing = 200) { - return { ...this, placement: 'line', spacing }; + return { ...this, placement: "line", spacing }; }, end(props = {}) { - const i = { ...this, ...props }; - const o = {}; + const i: Record = { ...this, ...props }; + + const o: Record = {}; + for (const k of Object.keys(i)) { - if (typeof i[k] !== 'function') { + if (typeof i[k] !== "function") { o[k] = i[k]; } } diff --git a/style/highways.js b/style/highways.js deleted file mode 100644 index 5888647..0000000 --- a/style/highways.js +++ /dev/null @@ -1,150 +0,0 @@ -/* eslint-disable indent */ -const { colors, hsl } = require('./colors'); -const { types } = require('./jsnikExtensions'); - -const glowDflt = { stroke: hsl(0, 33, 70), strokeLinejoin: 'round' }; -const highwayDflt = { stroke: colors.track, strokeLinejoin: 'round' }; - -module.exports = { - highways, -}; - -function highways() { - return (map) => { - map - .style('highways') - .typesRule(14, 'pier') - .lineSymbolizer({ stroke: 'black', strokeWidth: 2 }) - .rule({ minZoom: 12, filter: "[class] = 'railway' and [type] = 'rail' and ([service] = 'main' or [service] = '')" }) - .rail({ color: 'black', weight: 1.5, sleeperWeight: 5, spacing: 9.5, glowWidth: 1 }) - .rule({ - minZoom: 13, - filter: `[class] = 'railway' and ([type] = 'rail' and [service] != 'main' and [service] != '' or ${types('light_rail', 'tram')})`, - }) - .rail({ color: hsl(0, 0, 20), weight: 1, sleeperWeight: 4.5, spacing: 9.5, glowWidth: 1 }) - .rule({ - minZoom: 13, - filter: `[class] = 'railway' and (${types('miniature', 'monorail', 'funicular', 'narrow_gauge', 'subway')})`, - }) - .rail({ color: hsl(0, 0, 20), weight: 1, sleeperWeight: 4.5, spacing: 7.5, glowWidth: 1 }) - .rule({ - minZoom: 14, - filter: `[class] = 'railway' and (${types('construction', 'disused', 'preserved')})`, - }) - .rail({ color: hsl(0, 0, 33), weight: 1, sleeperWeight: 4.5, spacing: 7.5, glowWidth: 1 }) - - .doInStyle((style) => { - for (let z = 8; z <= 11; z++) { - const koef = 0.8 * Math.pow(1.15, z - 8); - - style - .rule({ minZoom: z, maxZoom: z, filter: "[class] = 'railway' and [type] = 'rail' and ([service] = 'main' or [service] = '')" }) - .rail({ color: 'black', weight: koef, sleeperWeight: 10 / 3 * koef, spacing: 9.5 / 1.5 * koef, glowWidth: 0.5 * koef }); - } - for (let z = 8; z <= 11; z++) { - const koef = 0.5 * Math.pow(1.5, z - 8); - style - .typesRule(z, z, 'motorway', 'trunk', 'motorway_link', 'trunk_link') - .lineSymbolizer({ ...highwayDflt, strokeWidth: 1.6 * koef }) - .typesRule(z, z, 'primary', 'primary_link') - .lineSymbolizer({ ...highwayDflt, strokeWidth: 1.4 * koef }) - .typesRule(z, z, 'secondary', 'secondary_link') - .lineSymbolizer({ ...highwayDflt, strokeWidth: 1.2 * koef }) - .typesRule(z, z,'tertiary', 'tertiary_link') - .lineSymbolizer({ ...highwayDflt, strokeWidth: 1.0 * koef }) - ; - } - }) - - .typesRule(12, 'motorway', 'trunk') - .road({ ...highwayDflt, stroke: colors.road, strokeWidth: 2.5 }) - .typesRule(12, 'motorway_link', 'trunk_link', 'primary') - .road({ ...highwayDflt, stroke: colors.road, strokeWidth: 1.5 + 2/3 }) - .typesRule(12, 'primary_link', 'secondary') - .road({ ...highwayDflt, stroke: colors.road, strokeWidth: 1.5 + 1/3 }) - .typesRule(12, 'construction') - .road({ ...highwayDflt, stroke: 'yellow', strokeWidth: 1.5 + 1/3, strokeDasharray: '5,5' }) - .road({ ...highwayDflt, stroke: '#666', strokeWidth: 1.5 + 1/3, strokeDasharray: '0,5,5,0' }) - .typesRule(12, 'secondary_link', 'tertiary', 'tertiary_link') - .road({ ...highwayDflt, stroke: colors.road, strokeWidth: 1.5 }) - .typesRule(12, 14, 'living_street', 'residential', 'unclassified', 'road') - .road({ ...highwayDflt, strokeWidth: 1 }) - .typesRule(14, 'living_street', 'residential', 'unclassified', 'road') - .road({ ...highwayDflt, stroke: colors.road, strokeWidth: 1 }) - .typesRule(14, 'water_slide') - .road({ ...highwayDflt, stroke: hsl(180, 50, 50), strokeWidth: 1.5 }) - .rule({ minZoom: 14, filter: "[type] = 'service' and [service] = 'parking_aisle'" }) - .road({ ...highwayDflt, strokeWidth: 1 }) - .rule({ filter: "[type] = 'raceway' or ([type] = 'track' and [class] = 'leisure')", minZoom: 14 }) - .road({ ...highwayDflt, strokeWidth: 1.2, strokeDasharray: '9.5,1.5' }) - .typesRule(14, 'piste') - .road({ ...highwayDflt, strokeWidth: 1.2, stroke: 'white' }) - .typesRule(14, 'footway', 'pedestrian', 'platform') - .road({ ...highwayDflt, strokeWidth: 1, strokeDasharray: '4,2' }) - .typesRule(14, 'steps') - .linePatternSymbolizer({ file: 'images/steps.svg' }) - .doInStyle((style) => { - const w = [0.5, 0.75, 1]; - const zz = [[12, 12], [13, 13], [14]]; - for (const a of [0, 1, 2]) { - const k = w[a]; - style - .rule({ minZoom: zz[a][0], maxZoom: zz[a][1], filter: "[type] = 'service' and [service] != 'parking_aisle' or [type] = 'escape' or [type] = 'corridor' or [type] = 'bus_guideway'" }) - .road({ ...highwayDflt, strokeWidth: k * 1.2 }) - .typesRule(...zz[a], 'path') - .road({ ...highwayDflt, strokeWidth: k * 1, strokeDasharray: '3,3', strokeOpacity: '[trail_visibility]' }) - .typesRule(...zz[a], 'cycleway') - .road({ ...highwayDflt, strokeWidth: k * 1, strokeDasharray: '6,3', stroke: '#b400ff', strokeOpacity: '[trail_visibility]' }) - .typesRule(14, 'bridleway') - .road({ ...highwayDflt, strokeWidth: k * 1, strokeDasharray: '6,3', stroke: hsl(120, 50, 30), strokeOpacity: '[trail_visibility]' }) - .typesRule(...zz[a], 'via_ferrata') - .road({ ...highwayDflt, strokeWidth: k * 1, strokeDasharray: '4,4' }) - .doInStyle((style) => { - [undefined, '8,2', '6,4', '4,6', '2,8', '3,7,7,3'].forEach((strokeDasharray, i) => { - style - .rule({ - filter: `[class] = 'highway' and [type] = 'track' and [tracktype] = ${i === 5 ? "''" : `'grade${i + 1}'`}`, - minZoom: zz[a][0], - maxZoom: zz[a][1], - }) - .road({ ...highwayDflt, strokeWidth: k * 1.2, strokeDasharray, strokeOpacity: '[trail_visibility]' }); - }); - }); - } - }) - .rule({ minZoom: 14, filter: '[oneway] <> 0' }) - .markersSymbolizer({ file: 'images/highway-arrow.svg', spacing: 100, placement: 'line', transform: 'rotate(90 - [oneway] * 90, 0, 0)' }) - .style('higwayGlows') - .typesRule(14, 'footway', 'pedestrian', 'platform', 'steps') - .lineSymbolizer({ ...glowDflt, strokeWidth: 1 }) - .typesRule(14, 'via_ferrata') - .lineSymbolizer({ stroke: 'black', strokeWidth: 3, strokeDasharray: '0,4,4,0' }) - .lineSymbolizer({ ...glowDflt, strokeWidth: 1 }) - .typesRule(12, 'path') - .lineSymbolizer({ ...glowDflt, strokeWidth: 1, strokeOpacity: '[trail_visibility]' }) - .rule({ filter: "[type] = 'track' and [class] = 'highway'", minZoom: 12 }) - .lineSymbolizer({ ...glowDflt, strokeWidth: 1.2, strokeOpacity: '[trail_visibility]' }) - .rule({ filter: "[type] = 'raceway' or ([type] = 'track' and [class] = 'leisure')", minZoom: 14 }) - .lineSymbolizer({ ...glowDflt, strokeWidth: 1.2 }) - .typesRule(14, 'bridleway') - .lineSymbolizer({ ...glowDflt, strokeWidth: 1.2, stroke: hsl(120, 50, 80), strokeOpacity: '[trail_visibility]' }) - .typesRule('motorway', 'trunk') - .lineSymbolizer({ ...highwayDflt, strokeWidth: 4 }) - .typesRule('primary', 'motorway_link', 'trunk_link') - .lineSymbolizer({ ...highwayDflt, strokeWidth: 3 + 2/3 }) - .typesRule('primary_link', 'secondary', 'construction') - .lineSymbolizer({ ...highwayDflt, strokeWidth: 3 + 1/3 }) - .typesRule('secondary_link', 'tertiary', 'tertiary_link') - .lineSymbolizer({ ...highwayDflt, strokeWidth: 3 }) - .typesRule(14, 'living_street', 'residential', 'unclassified', 'road') - .lineSymbolizer({ ...highwayDflt, strokeWidth: 2.5 }) - .typesRule(14, 'piste') - .road({ ...highwayDflt, strokeWidth: 2.2, stroke: '#a0a0a0', strokeDasharray: '6,2', }) - .style('accessRestrictions') - .rule({ filter: '[no_bicycle] = 1' }) - .markersSymbolizer({ file: 'images/no_bicycle.svg', spacing: 48, placement: 'line', opacity: 0.75, ignorePlacement: true }) - .rule({ filter: '[no_foot] = 1' }) - .markersSymbolizer({ file: 'images/no_foot.svg', spacing: 48, spacingOffset: 0.001, placement: 'line', opacity: 0.75, ignorePlacement: true }) - ; - }; -} diff --git a/style/index.js b/style/index.js deleted file mode 100644 index c418e06..0000000 --- a/style/index.js +++ /dev/null @@ -1,675 +0,0 @@ -/* eslint-disable indent */ - -const config = require('config'); -const { createMap } = require('jsnik'); -const { mercSrs } = require('freemap-mapserver/lib/projections'); // TODO ugly - -const dbParams = config.get('db'); -const contoursCfg = config.get('mapFeatures.contours'); -const shadingCfg = config.get('mapFeatures.shading'); -const hikingTrailsCfg = config.get('mapFeatures.hikingTrails'); -const bicycleTrailsCfg = config.get('mapFeatures.bicycleTrails'); -const horseTrailsCfg = config.get('mapFeatures.horseTrails'); -const skiTrailsCfg = config.get('mapFeatures.skiTrails'); -const dumpXml = config.get('dumpXml'); - -const { font } = require('./fontFactory'); -const { colors, hsl } = require('./colors'); -const { extensions } = require('./jsnikExtensions'); - -const { layers } = require('./layers'); -const { routes } = require('./routes'); -const { highways } = require('./highways'); - -const N = false; -const Y = true; -const NN = null; - -// minIconZoom, minTextZoom, withEle, natural, types/icon, textOverrides -const pois = [ - [12, 12, N, N, 'aerodrome'], - [12, 12, Y, N, 'guidepost', { icon: 'guidepost_x', font: { fontsetName: 'bold', dy: -8 }, maxZoom: 12 }], - [13, 13, Y, N, 'guidepost', { icon: 'guidepost_xx', font: { fontsetName: 'bold' }, maxZoom: 13 }], - [14, 14, Y, N, 'guidepost', { icon: 'guidepost_xx', font: { fontsetName: 'bold' } }], - [10, 10, Y, Y, 'peak1', { icon: 'peak', font: { size: 13, dy: -8 } }], - [11, 11, Y, Y, 'peak2', { icon: 'peak', font: { size: 13, dy: -8 } }], - [12, 12, Y, Y, 'peak3', { icon: 'peak', font: { size: 13, dy: -8 } }], - [13, 13, Y, Y, 'peak', { font: { size: 13, dy: -8 } }], - - [14, 14, N, N, 'castle'], - [14, 15, Y, Y, 'arch'], - [14, 15, Y, Y, 'cave_entrance'], - [14, 15, Y, Y, 'spring', { font: { fill: colors.waterLabel } }], - [14, 15, Y, Y, 'refitted_spring', { font: { fill: colors.waterLabel } }], - [14, 15, Y, Y, 'drinking_spring', { font: { fill: colors.waterLabel } }], - [14, 15, Y, Y, 'not_drinking_spring', { font: { fill: colors.waterLabel } }], - [14, 15, Y, Y, 'refitted_drinking_spring', { font: { fill: colors.waterLabel } }], - [14, 15, Y, Y, 'refitted_not_drinking_spring', { font: { fill: colors.waterLabel } }], - [14, 15, Y, Y, 'hot_spring', { font: { fill: colors.waterLabel } }], - [14, 15, Y, Y, 'waterfall', { font: { fill: colors.waterLabel } }], - [14, 15, N, N, ['drinking_water', 'water_point'], { font: { fill: colors.waterLabel } }], - [14, 15, N, N, 'water_well', { font: { fill: colors.waterLabel } }], - [14, 15, Y, N, 'monument'], - [14, 15, Y, Y, 'viewpoint'], - [14, 15, Y, N, ['mine', 'adit', 'mineshaft']], - [14, 15, Y, N, 'disused_mine'], - [14, 15, Y, N, 'hotel'], - [14, 15, Y, N, 'chalet'], - [14, 15, Y, N, 'hostel'], - [14, 15, Y, N, 'motel'], - [14, 15, Y, N, 'guest_house'], - [14, 15, Y, N, 'apartment'], - [14, 15, Y, N, 'wilderness_hut'], - [14, 15, Y, N, 'alpine_hut'], - [14, 15, Y, N, 'camp_site'], - [14, 15, N, N, 'attraction'], - [14, 15, N, N, 'hospital'], - [14, 15, N, N, 'townhall'], - [14, 15, N, N, ['church', 'chapel', 'cathedral', 'temple', 'basilica']], - [14, 15, Y, N, 'tower_observation'], - [14, 15, Y, N, 'archaeological_site'], - [14, 15, N, N, ['station', 'halt']], - [14, 15, N, N, 'bus_station'], - [14, 15, N, N, 'water_park'], - [14, 15, N, N, 'museum'], - [14, 15, N, N, 'free_flying'], - [14, 15, N, N, 'forester\'s_lodge'], - [14, 15, N, N, 'horse_riding'], - [14, 15, N, N, 'golf_course'], - [14, 14, N, N, ['kindergarten', 'recycling'], - { font: { fill: colors.areaLabel }, icon: null }], // has no icon yet - render as area name - - [15, NN, Y, N, 'guidepost_noname', { icon: 'guidepost_x' }], - [15, 15, Y, Y, 'saddle', { font: { size: 13, dy: -8 } }], - - [15, 16, N, N, 'ruins'], - [15, 16, N, N, 'chimney'], - [15, 16, N, N, 'fire_station'], - [15, 16, N, N, 'community_centre'], - [15, 16, N, N, 'police'], - [15, 16, N, N, 'office'], // information=office - [15, 16, N, N, 'hunting_stand'], - [15, 16, Y, N, 'shelter'], - // [15, 16, Y, N, 'shopping_cart'], - [15, 16, Y, N, 'lean_to'], - [15, 16, Y, N, 'public_transport'], - [15, 16, Y, N, 'picnic_shelter'], - [15, 16, Y, N, 'basic_hut'], - [15, 16, Y, N, 'weather_shelter'], - [15, 16, N, Y, 'rock'], - [15, 16, N, Y, 'stone'], - [15, 16, N, Y, 'sinkhole'], - [15, 16, N, N, 'pharmacy'], - [15, 16, N, N, 'cinema'], - [15, 16, N, N, 'theatre'], - [15, 16, N, N, 'memorial'], - [15, 16, N, N, 'pub'], - [15, 16, N, N, 'cafe'], - [15, 16, N, N, 'bar'], - [15, 16, N, N, 'restaurant'], - [15, 16, N, N, 'convenience'], - [15, 16, N, N, 'supermarket'], - [15, 16, N, N, 'fast_food'], - [15, 16, N, N, ['confectionery', 'pastry']], - [15, 16, N, N, 'fuel'], - [15, 16, N, N, 'post_office'], - [15, 16, N, N, 'bunker'], - [15, 16, N, N, 'boundary_stone'], - [15, NN, N, N, 'mast_other'], - [15, NN, N, N, 'tower_other'], - [15, NN, N, N, ['tower_communication', 'mast_communication']], - [15, 16, N, N, 'tower_bell_tower'], - [15, 16, N, N, 'water_tower'], - [15, 16, N, N, 'bus_stop'], - [15, 16, N, N, 'sauna'], - [15, 16, N, N, 'taxi'], - [15, 16, N, N, 'bicycle'], - [15, 16, N, N, 'building'], - [15, 15, N, Y, 'tree'], - [15, 16, N, N, 'bird_hide'], - [15, 16, N, N, 'dam', { font: { fill: colors.waterLabel } }], - [15, 16, N, N, 'weir', { font: { fill: colors.waterLabel } }], - [15, 15, N, N, ['school', 'university', 'college'], - { font: { fill: colors.areaLabel }, icon: null }], // has no icon yet - render as area name - - [16, 17, N, N, 'miniature_golf'], - [16, 17, N, N, 'soccer'], - [16, 17, N, N, 'tennis'], - [16, 17, N, N, 'basketball'], - [16, NN, Y, N, ['guidepost_noname', 'route_marker'], { icon: 'guidepost_x' }], - [16, NN, N, N, 'picnic_table'], - [16, NN, N, N, 'outdoor_seating'], - [16, 17, N, N, 'picnic_site'], - [16, 16, N, N, 'board'], - [16, 17, N, N, 'map'], - [16, 17, N, N, 'artwork'], - [16, 17, N, N, 'fountain', { font: { fill: colors.waterLabel } }], - [16, NN, N, N, 'watering_place', { font: { fill: colors.waterLabel } }], - [16, NN, N, N, 'feeding_place', { icon: 'manger' }], - [16, NN, N, N, 'game_feeding', { icon: 'manger' }], - [16, 17, N, N, 'playground'], - [16, 17, N, N, ['water_works', 'reservoir_covered', 'pumping_station', 'wastewater_plant'], { font: { fill: colors.waterLabel } }], - [16, 17, N, N, 'cross'], - - - [17, 18, N, N, 'wayside_shrine'], - [17, 18, N, N, ['cross', 'wayside_cross', 'tree_shrine']], // NOTE cros sis also on lower zoom - [17, NN, N, N, 'firepit'], - [17, NN, N, N, 'toilets'], - [17, NN, N, N, 'bench'], - [17, 18, N, N, 'beehive', 'apiary'], - [17, NN, N, N, ['lift_gate', 'swing_gate']], - [17, NN, N, N, 'ford'], - - [18, 19, N, N, 'post_box'], - [18, 19, N, N, 'telephone'], - [18, NN, N, N, 'gate'], - [18, NN, N, N, 'waste_disposal'], -]; - -function generateFreemapStyle({ - features: { - shading, - contours, - hikingTrails, - bicycleTrails, - skiTrails, - horseTrails, - } = { - shading: shadingCfg, - contours: contoursCfg, - hikingTrails: hikingTrailsCfg, - bicycleTrails: bicycleTrailsCfg, - skiTrails: skiTrailsCfg, - horseTrails: horseTrailsCfg, - }, - custom, legendLayers, format } = {} -) { - return createMap({ - backgroundColor: legendLayers ? undefined : colors.water, - srs: mercSrs, - }, extensions) - .fontSet('regular', ['PT Sans Regular', 'Fira Sans Condensed Regular', 'Noto Sans Regular']) - .fontSet('italic', ['PT Sans Italic', 'Fira Sans Condensed Italic', 'Noto Sans Italic']) - .fontSet('bold', ['PT Sans Bold', 'Fira Sans Condensed Bold', 'Noto Sans Bold']) - .fontSet('narrow bold', ['PT Sans Narrow Bold', 'Fira Sans Extra Condensed Bold', 'Noto Sans Bold']) - .datasource({ name: 'db' }, dbParams) - .style('sea') - .rule() - .borderedPolygonSymbolizer('white') - .style('landcover') - .area(hsl(0, 0, 70), 'dam', 'weir') - .area(colors.forest, 'forest', 'wood') - .area(colors.farmland, 'farmland') - .area(colors.grassy, 'meadow', 'park', 'cemetery', 'village_green') - .area(colors.grassy, 'fell', 'grassland', 'grass') - // .polygonPatternSymbolizer({ file: 'images/fell.svg', alignment: 'global', opacity: 0.5 }) - .typesRule('cemetery') - .polygonPatternSymbolizer({ file: 'images/grave.svg', alignment: 'local', opacity: 0.5 }) - .area(colors.heath, 'heath') - .area('white', 'bare_rock') - .polygonPatternSymbolizer({ file: 'images/bare_rock.svg', alignment: 'global', opacity: 0.2 }) - .area(colors.orchard, 'vineyard') - .polygonPatternSymbolizer({ file: 'images/grapes.svg', alignment: 'global', opacity: 0.20 }) - .area(colors.orchard, 'garden') - .lineSymbolizer({ stroke: hsl(0, 0, 0), strokeWidth: 1, strokeOpacity: 0.2 }) - .area(colors.orchard, 'orchard') - .polygonPatternSymbolizer({ file: 'images/orchard.svg', alignment: 'global', opacity: 0.20 }) - .area(hsl(60, 90, 85), 'beach') - .polygonPatternSymbolizer({ file: 'images/sand.svg', alignment: 'global', opacity: 0.25 }) - .area(colors.scrub, 'scrub') - .polygonPatternSymbolizer({ file: 'images/scrub.svg', alignment: 'global', opacity: 0.2 }) - .area(colors.scrub, 'plant_nursery') - .polygonPatternSymbolizer({ file: 'images/plant_nursery.svg', alignment: 'global', opacity: 0.2 }) - .area(hsl(0, 0, 70), 'quarry') - .polygonPatternSymbolizer({ file: 'images/quarry.svg' }) - .area(hsl(0, 0, 90), 'scree') - .polygonPatternSymbolizer({ file: 'images/scree.svg', opacity: 0.33 }) - .area(colors.landfill, 'landfill') - .area(hsl(74, 29, 68), 'clearcut') - .polygonPatternSymbolizer({ file: 'images/stump.svg', opacity: 0.33 }) - .area(colors.brownfield, 'brownfield') - .area(hsl(0, 0, 88), 'residential', 'living_street') - .area(colors.farmyard, 'farmyard') - .area(colors.allotments, 'allotments') - .area(hsl(0, 0, 80), 'industrial', 'wastewater_plant') - .area(hsl(320, 40, 85), 'commercial', 'retail') - .typesRule('wetland') - .polygonPatternSymbolizer({ file: 'images/wetland.svg', alignment: 'global' }) - .area(colors.heath, 'bog') - .polygonPatternSymbolizer({ file: 'images/wetland.svg', alignment: 'global' }) - .polygonPatternSymbolizer({ file: 'images/bog.svg', alignment: 'global' }) - .area(colors.scrub, 'mangrove') - .polygonPatternSymbolizer({ file: 'images/wetland.svg', alignment: 'global' }) - .polygonPatternSymbolizer({ file: 'images/mangrove.svg', alignment: 'global' }) - .area(colors.grassy, 'reedbed') - .polygonPatternSymbolizer({ file: 'images/wetland.svg', alignment: 'global' }) - .polygonPatternSymbolizer({ file: 'images/reedbed.svg', alignment: 'global' }) - .area(colors.grassy, 'marsh', 'fen', 'wet_meadow') - .polygonPatternSymbolizer({ file: 'images/wetland.svg', alignment: 'global' }) - .polygonPatternSymbolizer({ file: 'images/marsh.svg', alignment: 'global' }) - .area(colors.grassy, 'swamp') - .polygonPatternSymbolizer({ file: 'images/wetland.svg', alignment: 'global' }) - .polygonPatternSymbolizer({ file: 'images/swamp.svg', alignment: 'global' }) - .typesRule(12, 'pitch', 'playground', 'golf_course', 'track') - .borderedPolygonSymbolizer(hsl(140, 50, 70)) - .lineSymbolizer({ stroke: hsl(140, 50, 40), strokeWidth: 1 }) - .typesRule(13, 'parking') - .polygonSymbolizer({ fill: hsl(0, 33, 80) }) - .lineSymbolizer({ stroke: hsl(0, 33, 65), strokeWidth: 1 }) - .typesRule(13, 'bunker_silo') - .polygonSymbolizer({ fill: hsl(50, 34, 35) }) - .lineSymbolizer({ stroke: hsl(50, 34, 20), strokeWidth: 1 }) - .style('water_area') - .rule({ minZoom: 8, maxZoom: 13, filter: '[tmp] = 1' }) - .polygonPatternSymbolizer({ file: 'images/temp_water.svg', alignment: 'local', transform: 'scale(0.5)' }) - .rule({ minZoom: 14, filter: '[tmp] = 1' }) - .polygonPatternSymbolizer({ file: 'images/temp_water.svg', alignment: 'local' }) - .rule({ minZoom: 8, filter: '[tmp] != 1' }) - .borderedPolygonSymbolizer(colors.water) - .rule({ maxZoom: 9, filter: '[tmp] != 1' }) - .polygonSymbolizer({ fill: colors.water }) - .style('solar_power_plants') - .rule({ minZoom: 12, maxZoom: 14, }) - .polygonPatternSymbolizer({ file: 'images/solar_small.svg', alignment: 'global' }) - .lineSymbolizer({ stroke: hsl(176, 153, 200), strokeWidth: 1 }) - .rule({ minZoom: 15 }) - .polygonPatternSymbolizer({ file: 'images/solar.svg', alignment: 'global' }) - .lineSymbolizer({ stroke: hsl(176, 153, 200), strokeWidth: 1 }) - .style('water_line') - .typesRule(0, 8, 'river') - .lineSymbolizer({ stroke: colors.water, strokeWidth: 'pow(1.5, @zoom - 8)' }) - .typesRule(9, 9, 'river') - .lineSymbolizer({ stroke: colors.water, strokeWidth: 1.5 }) - .typesRule(10, 11, 'river') - .lineSymbolizer({ stroke: colors.water, strokeWidth: 2.2, strokeOpacity: '1 - [tunnel] / 0.6', strokeDasharray: '[dasharray]' }) - .typesRule(12, 'river') - .lineSymbolizer({ stroke: colors.water, strokeWidth: 2.2, strokeOpacity: '1 - [tunnel] / 0.6', strokeDasharray: '[dasharray]', smooth: 0.5 }) - .rule({ filter: "[type] <> 'river'", minZoom: 12 }) - .lineSymbolizer({ stroke: colors.water, strokeWidth: 1.2, strokeOpacity: '1 - [tunnel] / 0.6', strokeDasharray: '[dasharray]', smooth: 0.5 }) - .rule({ minZoom: 14 }) - .markersSymbolizer({ file: 'images/waterway-arrow.svg', spacing: 300, placement: 'line' }) - .style('barrierways') - .rule({ minZoom: 16 }) - .lineSymbolizer({ stroke: hsl(0, 100, 50), strokeWidth: 1, strokeDasharray: '2,1' }) - .style('aeroways').doInStyle((style) => { - const aeroBgLine = { stroke: hsl(240, 30, 40) }; - const aeroFgLine = { stroke: 'white', strokeWidth: 1 }; - - style - .rule({ minZoom: 11, maxZoom: 11 }) - .lineSymbolizer({ ...aeroBgLine, strokeWidth: 3 }) - .lineSymbolizer({ ...aeroFgLine, strokeWidth: 0.5, strokeDasharray: '3,3' }) - .rule({ minZoom: 12, maxZoom: 13 }) - .lineSymbolizer({ ...aeroBgLine, strokeWidth: 5 }) - .lineSymbolizer({ ...aeroFgLine, strokeDasharray: '4,4' }) - .rule({ minZoom: 14 }) - .lineSymbolizer({ ...aeroBgLine, strokeWidth: 8 }) - .lineSymbolizer({ ...aeroFgLine, strokeDasharray: '6,6' }); - }) - .style('aerialways') - .rule() - .lineSymbolizer({ strokeWidth: 1, stroke: 'black' }) - .lineSymbolizer({ strokeWidth: 5, stroke: 'black', strokeDasharray: '1,25' }) - .style('buildings') - .rule({ minZoom: 13 }) - .polygonSymbolizer({ fill: colors.building }) - .style('ruin_polys') - .rule({ minZoom: 13 }) - .polygonSymbolizer({ fill: colors.ruin }) - .style('protected_areas') - .typesRule(8, 11, 'national_park') - .lineSymbolizer({ stroke: hsl(120, 100, 31), strokeWidth: 3, strokeDasharray: '25,7', strokeOpacity: 0.8 }) - .polygonPatternSymbolizer({ file: 'images/national_park_area.svg', alignment: 'global', opacity: 0.4 }) - .typesRule(12, 12, 'national_park') - .polygonPatternSymbolizer({ file: 'images/national_park_area.svg', alignment: 'global', opacity: 0.2 }) - .lineSymbolizer({ stroke: hsl(120, 100, 31), strokeWidth: 4, strokeDasharray: '25,7', strokeOpacity: 0.4 }) - .typesRule(13, 'national_park') - .lineSymbolizer({ stroke: hsl(120, 100, 31), strokeWidth: 4, strokeDasharray: '25,7', strokeOpacity: 0.4 }) - .typesRule(12, 'protected_area', 'nature_reserve') - .linePatternSymbolizer({ file: 'images/protected_area.svg' }) - .style('borders') - .rule({ maxZoom: 10 }) - .lineSymbolizer({ stroke: hsl(278, 100, 50), strokeWidth: '0.5 + 6 * pow(1.4, @zoom - 11)', strokeLinejoin: 'round' }) - .rule({ minZoom: 11 }) - .lineSymbolizer({ stroke: hsl(278, 100, 50), strokeWidth: 6, strokeLinejoin: 'round' }) - .style('cutlines').doInStyle((style) => { - for (let z = 12; z <= 16; z++) { - style.typesRule(z, z === 16 ? 20 : z, 'cutline') - .lineSymbolizer({ stroke: colors.scrub, strokeWidth: 2 + 0.33 * Math.pow(2, z - 12) }); - } - }) - .style('pipelines') - .rule({ minZoom: 11, filter: '[location] = "overground" or [location] = "overhead" or [location] = ""' }) - .lineSymbolizer({ stroke: hsl(0, 0, 50), strokeWidth: 2, strokeLinejoin: 'round' }) - .lineSymbolizer({ stroke: hsl(0, 0, 50), strokeWidth: 4, strokeLinejoin: 'round', strokeDasharray: '0,15,1.5,1.5,1.5,1' }) - .rule({ minZoom: 15, filter: '[location] = "underground" or [location] = "underwater"' }) - .lineSymbolizer({ stroke: hsl(0, 0, 50), strokeWidth: 2, strokeLinejoin: 'round', strokeOpacity: 0.33 }) - .lineSymbolizer({ stroke: hsl(0, 0, 50), strokeWidth: 4, strokeLinejoin: 'round', strokeDasharray: '0,15,1.5,1.5,1.5,1', strokeOpacity: 0.33 }) - - .style('feature_lines_maskable') - .typesRule(13, 'cliff') - .linePatternSymbolizer({ file: 'images/cliff.svg' }) - .lineSymbolizer({ stroke: colors.areaLabel, strokeWidth: 1 }) - .typesRule(14, 'earth_bank') - .linePatternSymbolizer({ file: 'images/earth_bank.svg' }) - .typesRule(16, 'dyke') - .linePatternSymbolizer({ file: 'images/dyke.svg' }) - .typesRule(16, 'embankment') - .linePatternSymbolizer({ file: 'images/embankment-half.svg' }) - .typesRule(16, 'gully') - .linePatternSymbolizer({ file: 'images/gully.svg' }) - .style('feature_lines') - .typesRule(16, 'weir') - .lineSymbolizer({ stroke: hsl(0, 0, 40), strokeWidth: 3, strokeDasharray: '9, 3' }) - .typesRule(16, 'dam') - .lineSymbolizer({ stroke: hsl(0, 0, 40), strokeWidth: 3 }) - .typesRule(13, 'line') - .lineSymbolizer({ stroke: 'black', strokeWidth: 1, strokeOpacity: 0.5 }) - .typesRule(14, 'minor_line') - .lineSymbolizer({ stroke: hsl(0, 0, 50), strokeWidth: 1, strokeOpacity: 0.5 }) - .doInStyle((style) => { - for (let z = 13; z <= 19; z++) { - style.typesRule(z, z === 16 ? 20 : z, 'tree_row') - .linePatternSymbolizer({ file: 'images/tree2.svg', transform: `scale(${(2 + Math.pow(2, z - 15)) / 4})` }); - } - }) - .style('embankments') - .rule({}) - .linePatternSymbolizer({ file: 'images/embankment.svg' }) // TODO don't render on hi-res hillshading - .style('mask') // hillshading helper for mask - .rule() - .rasterSymbolizer({ scaling: 'bilinear', opacity: 1.00 }) - .style('hillshade') - .rule({ /* minZoom: 8, */ maxZoom: 8 }) - .rasterSymbolizer({ scaling: 'lanczos', opacity: 1.00 }) - .rule({ minZoom: 9, maxZoom: 9 }) - .rasterSymbolizer({ scaling: 'lanczos', opacity: 0.90 }) - .rule({ minZoom: 10, maxZoom: 11 }) - .rasterSymbolizer({ scaling: 'lanczos', opacity: 0.75 }) - .rule({ minZoom: 12, maxZoom: 12 }) - .rasterSymbolizer({ scaling: 'lanczos', opacity: 0.65 }) - .rule({ minZoom: 13, maxZoom: 13 }) - .rasterSymbolizer({ scaling: 'bilinear', opacity: 0.55 }) - .rule({ minZoom: 14, maxZoom: 14 }) - .rasterSymbolizer({ scaling: 'bilinear', opacity: 0.65 }) - .rule({ minZoom: 15 }) - .rasterSymbolizer({ scaling: 'bilinear', opacity: 0.80 }) - .style('military_areas') - .rule({ minZoom: 10 }) - .lineSymbolizer({ stroke: hsl(0, 96, 39), strokeWidth: 3, strokeDasharray: '25,7', strokeOpacity: 0.8 }) - .rule({ minZoom: 10, maxZoom: 13 }) - .polygonPatternSymbolizer({ file: 'images/military_area.svg', alignment: 'global', opacity: 0.5 }) - .rule({ minZoom: 14 }) - .polygonPatternSymbolizer({ file: 'images/military_area.svg', alignment: 'global', opacity: 0.2 }) - .style('trees') - .doInStyle((style) => { - for (let z = 16; z <= 19; z++) { - const size = 2 + Math.pow(2, z - 15); - style - .rule({ minZoom: z, maxZoom: z }) - .markersSymbolizer({ - file: 'images/tree2.svg', width: size, height: size, fill: colors.forest, allowOverlap: true, ignorePlacement: true, - transform: 'scale(1 - ([type] = "shrub") * 0.5, 1 - ([type] = "shrub") * 0.5)', - }); - } - }) - .style('features') - .typesRule(16, 'pylon') - .markersSymbolizer({ file: 'images/power_tower.svg', allowOverlap: true, ignorePlacement: true }) - .typesRule(13, 'tower') - .markersSymbolizer({ file: 'images/power_tower.svg', allowOverlap: true, ignorePlacement: true }) - .typesRule(14, 'pole') - .markersSymbolizer({ file: 'images/power_pole.svg', allowOverlap: true, ignorePlacement: true }) - .poiIcons(pois) - // .rule({ minZoom: 16 }) // rest texts - // .textSymbolizer({ ...fontDfltWrap }, nameWithEle) - - // texts - .style('locality_names') - .typesRule(15, 'locality') - .textSymbolizer(font().wrap().end({ fill: hsl(0, 0, 40), size: 11, haloRadius: 1.5, haloOpacity: 0.2, placementType: 'list' }), '[name]') - .placements() - .style('feature_names') - .poiNames(pois) - .style('protected_area_names').doInStyle((style) => { - for (const z of [8, 9, 10]) { - style - .typesRule(z, z, 'national_park') - .textSymbolizer(font().nature().wrap().end({ - size: 9 + Math.pow(2, z - 7), - fill: hsl(120, 100, 25), - haloFill: 'white', - haloRadius: 1.5, - placement: 'interior', - placementType: 'list' - }), '[name]') - .placements(); - } - }) - .typesRule(12, 'protected_area', 'nature_reserve') - .textSymbolizer(font().nature().wrap().end({ - fill: hsl(120, 100, 25), - haloFill: 'white', - haloRadius: 1.5, - placement: 'interior', - placementType: 'list' - }), '[name]') - .placements() - .style('water_area_names') - .doInStyle((style) => { - for (let z = 10; z <= 16; z++) { - style.rule({ filter: `[area] > ${800000 / (1 << (2 * (z - 10)))}`, minZoom: z, maxZoom: z }) - .textSymbolizer(font().water().wrap().end({ placement: 'interior', placementType: 'list' }), '[name]') - .placements(); - } - }) - .rule({ minZoom: 17 }) - .textSymbolizer(font().water().wrap().end({ placement: 'interior', placementType: 'list' }), '[name]') - .placements() - .style('feature_poly_names') - .doInStyle((style) => { - for (let z = 12; z <= 16; z++) { - style.rule({ filter: `[area] > ${2400000 / (1 << (2 * (z - 10)))}`, minZoom: z, maxZoom: z }) - .textSymbolizer(font().wrap().end({ placement: 'interior', placementType: 'list', fill: colors.areaLabel }), '[name]'); - } - }) - .rule({ minZoom: 17 }) - .textSymbolizer(font().wrap().end({ placement: 'interior', placementType: 'list', fill: colors.areaLabel }), '[name]') - .placements() - .style('landcover_names') - .doInStyle((style) => { - for (const natural of [false, true]) { - const s = natural ? { fill: hsl(120, 100, 25), fontsetName: 'italic' } : { fill: colors.areaLabel }; - - for (let z = 12; z <= 17; z++) { - style.rule({ - filter: `(${natural ? '[natural]' : 'not ([natural])'})` + (z === 17 ? '' : ` and [area] > ${2400000 / (1 << (2 * (z - 10)))}`), - minZoom: z, - maxZoom: z === 17 ? undefined : z - }) - .textSymbolizer(font().wrap().end({ placement: 'interior', placementType: 'list', ...s }), '[name]') - .placements(); - } - } - }) - .style('building_names') - .rule({ minZoom: 17 }) - .textSymbolizer(font().wrap().end({ placement: 'interior', placementType: 'list' }), '[name]') - .placements() - .style('housenumbers') - .rule({}) - .textSymbolizer(font().end({ placement: 'interior', size: 8, haloOpacity: 0.5, fill: colors.areaLabel }), '[housenumber]') - .style('highway_names') - .rule({ minZoom: 15 }) - .textSymbolizer(font().line().end({ fill: colors.track }), '[name]') - .style('aerialway_names') - .rule() - .textSymbolizer(font().line().end({ fill: 'black', dy: 6 }), '[name]') - .style('valleys_ridges') - .doInStyle((style) => { - for (let z = 13; z < 18; z++) { - const opacity = 0.5 - (z - 13) / 10; - const cs = 3 + Math.pow(2.5, z - 12); - const size = 10 + Math.pow(2.5, z - 12); - const ts = style.rule({ minZoom: z, maxZoom: z }) - .textSymbolizer(font().nature().line(200).end({ - size, - characterSpacing: cs * 3, - haloRadius: 1.5, - haloOpacity: opacity * 0.9, - opacity, - lineSpacing: `[offset_factor] * ${6 + 3 * Math.pow(2.5, z - 12)}`, // this is to simulate dy adjusted to text orientation - placementType: 'list', - smooth: 0.2, - maxCharAngleDelta: 180, - // horizontalAlignment: 'adjust', - }), '[name] + "\n "') - .placement({ characterSpacing: cs * 2 }) - .placement({ characterSpacing: cs * 1.5 }) - .placement({ characterSpacing: cs }) - .placement({ characterSpacing: cs / 3 * 2 }) - .placement({ characterSpacing: cs / 3 }) - .placement({ characterSpacing: 0 }); - - if (z > 13) { - ts.placement({ characterSpacing: 0, size: size * 0.75 }); - } - if (z > 14) { - ts.placement({ characterSpacing: 0, size: size * 0.5 }); - } - } - }) - .style('water_line_names') - .typesRule(12, 'river') - .textSymbolizer(font().water().line(400).end({ characterSpacing: 2, simplifyAlgorithm: 'douglas-peucker', simplify: 10, maxCharAngleDelta: 30 }), '[name]') - .rule({ minZoom: 14, filter: "[type] <> 'river'" }) - .textSymbolizer(font().water().line(300).end({ characterSpacing: 2, simplifyAlgorithm: 'douglas-peucker', simplify: 10, maxCharAngleDelta: 30 }), '[name]') - .style('fixmes') - .rule() - .markersSymbolizer({ file: 'images/fixme.svg' }) - .style('placenames') - .doInStyle((style) => { - for (let z = 6; z < 20; z++) { - const opacity = z <= 14 ? 1 : 0.5; - const sc = 2.5 * Math.pow(1.2, z); - // TODO wrap it respecting its size - const placenamesFontStyle = font().wrap().end({ - margin: 3, - haloFill: 'white', - opacity, - haloOpacity: opacity * 0.9, - fontsetName: 'narrow bold', - characterSpacing: 1, - placementType: 'list' - }); - - style - .typesRule(z, z, 'city') - .textSymbolizer({ ...placenamesFontStyle, haloRadius: 2, textTransform: 'uppercase', size: 1.2 * sc }, '[name]') - .placements(); - - if (z > 8) { - style - .typesRule(z, z, 'town') - .textSymbolizer({ ...placenamesFontStyle, haloRadius: 2, textTransform: 'uppercase', size: 0.8 * sc }, '[name]') - .placements(); - } - - if (z > 10) { - style - .typesRule(z, z, 'village') - .textSymbolizer({ ...placenamesFontStyle, haloRadius: 1.5, textTransform: 'uppercase', size: 0.55 * sc}, '[name]') - .placements(); - } - - if (z > 11) { - style - .typesRule(z, z, 'suburb', 'hamlet') - .textSymbolizer({ ...placenamesFontStyle, haloRadius: 1.5, size: 0.5 * sc }, '[name]') - .placements(); - } - } - }) - .style('geonames') - .rule() - .textSymbolizer( - font().line().nature().end({ - haloFill: 'white', - characterSpacing: 1, - haloRadius: 2, - allowOverlap: true, - opacity: '0.8 - pow(1.5, @zoom - 9) / 5', - haloOpacity: '0.8 - pow(1.5, @zoom - 9) / 5', - size: '8 + pow(1.9, @zoom - 6)', - horizontalAlignment: 'adjust', - smooth: 0.2, - maxCharAngleDelta: 180, - }), - '[name]') - .doInMap((map) => { - const x = []; - if (hikingTrails) { - x.push('hiking'); - } - if (bicycleTrails) { - x.push('bicycle'); - } - if (skiTrails) { - x.push('ski'); - } - if (horseTrails) { - x.push('horse'); - } - if (x.length) { - map - .style('routeGlows').doInStyle(routes(true, ...x)) - .style('routes').doInStyle(routes(false, ...x)); - } - }) - .style('route_names') - .rule() - .textSymbolizer(font().line(500).end({ fill: 'black', size: 11, haloRadius: 1.5, haloOpacity: 0.2, dy: '4 + [off1] * 2.5' }), '[refs1]') - .textSymbolizer(font().line(500).end({ fill: 'black', size: 11, haloRadius: 1.5, haloOpacity: 0.2, dy: '-4 - [off2] * 4' }), '[refs2]') - .style('contours', { opacity: 0.33 }) - .rule({ minZoom: 13, maxZoom: 14, filter: '([height] % 100 = 0) and ([height] != 0)' }) - .lineSymbolizer({ stroke: colors.contour, strokeWidth: 0.4, smooth: 1 }) - .textSymbolizer(font().line().end({ fill: colors.contour, smooth: 1, upright: 'left' }), '[height]') - .rule({ minZoom: 12, maxZoom: 12, filter: '([height] % 50 = 0) and ([height] != 0)' }) - .lineSymbolizer({ stroke: colors.contour, strokeWidth: 0.2, smooth: 1 }) - .rule({ minZoom: 13, maxZoom: 14, filter: '([height] % 20 = 0) and ([height] != 0)' }) - .lineSymbolizer({ stroke: colors.contour, strokeWidth: 0.2, smooth: 1 }) - - .rule({ minZoom: 15, filter: '([height] % 100 = 0) and ([height] != 0)' }) - .lineSymbolizer({ stroke: colors.contour, strokeWidth: 0.6, smooth: 1 }) - .textSymbolizer(font().line().end({ fill: colors.contour, smooth: 1, upright: 'left' }), '[height]') - .rule({ minZoom: 15, filter: '([height] % 10 = 0) and ([height] != 0)' }) - .lineSymbolizer({ stroke: colors.contour, strokeWidth: 0.3, smooth: 1 }) - .rule({ minZoom: 15, filter: '([height] % 50 = 0) and ([height] % 100 != 0)' }) - .textSymbolizer(font().line().end({ fill: colors.contour, smooth: 1, upright: 'left' }), '[height]') - - .doInMap(map => { - if (format !== 'svg' && format !== 'pdf') { - map.style('crop', { imageFilters: 'agg-stack-blur(20,20)', imageFiltersInflate: true }) - .rule() - .polygonSymbolizer({ fill: 'red' }); - } - - return map; - }) - .doInMap(highways()) - .doInMap(layers(shading, contours, hikingTrails, bicycleTrails, skiTrails, horseTrails, format, custom, legendLayers)) - - .stringify({ pretty: dumpXml }); -} - -const mapnikConfig = generateFreemapStyle(); - -if (dumpXml) { - console.log('Mapnik config:', mapnikConfig); -} - -module.exports = { - mapnikConfig, - generateFreemapStyle, -}; diff --git a/style/index.tsx b/style/index.tsx new file mode 100644 index 0000000..a453f77 --- /dev/null +++ b/style/index.tsx @@ -0,0 +1,198 @@ +import config from "config"; +import { Map } from "jsxnik/mapnikConfig"; +import { serialize } from "jsxnik/serialize"; +import { AerialwayNames } from "./AerialwayNames"; +import { Aerialways } from "./Aerialways"; +import { Aeroways } from "./Aeroways"; +import { Barrierways } from "./Barrierways"; +import { Borders } from "./Borders"; +import { BuildingNames } from "./BuildingNames"; +import { Buildings } from "./Buildings"; +import { colors } from "./colors"; +import { Crop } from "./Crop"; +import { Custom } from "./Custom"; +import { Cutlines } from "./Cutlines"; +import { DatasourceEx } from "./DatasourceEx"; +import { Embankments } from "./Embankments"; +import { FeatureLines } from "./FeatureLines"; +import { FeatureLinesMaskable } from "./FeatureLinesMaskable"; +import { FeatureNames, Features } from "./features"; +import { Fixmes } from "./Fixmes"; +import { FontSets } from "./FontSets"; +import { Geonames } from "./Geonames"; +import { HighwayNames } from "./HighwayNames"; +import { Highways } from "./Highways"; +import { Housenumbers } from "./Housenumbers"; +import { Landcover } from "./Landcover"; +import { LandcoverNames } from "./LandcoverNames"; +import { Legend, Props as LegendProps } from "./Legend"; +import { LocalityNames } from "./LocalityNames"; +import { MilitaryAreas } from "./MilitaryAreas"; +import { Pipelines } from "./Pipelines"; +import { PlaceNames1, PlaceNames2 } from "./Placenames"; +import { ProtectedAreaNames } from "./ProtectedAreaNames"; +import { ProtectedAreas } from "./ProtectedAreas"; +import { RouteNames, Routes } from "./routes"; +import { Sea } from "./Sea"; +import { ShadingAndCountours } from "./ShadingAndContours"; +import { SolarPowerPlants } from "./SolarPowerPlants"; +import { setLayersEnabled } from "./StyledLayer"; +import { Trees } from "./Trees"; +import { ValleysRidges } from "./ValleysRidges"; +import { WaterArea } from "./WaterArea"; +import { WaterAreaNames } from "./WaterAreaNames"; +import { WaterLine } from "./WaterLine"; +import { WaterLineNames } from "./WaterLineNames"; + +const dbParams = config.get("db") as Record; +const contoursCfg = config.get("mapFeatures.contours") as boolean; +const shadingCfg = config.get("mapFeatures.shading") as boolean; +const hikingTrailsCfg = config.get("mapFeatures.hikingTrails") as boolean; +const bicycleTrailsCfg = config.get("mapFeatures.bicycleTrails") as boolean; +const horseTrailsCfg = config.get("mapFeatures.horseTrails") as boolean; +const skiTrailsCfg = config.get("mapFeatures.skiTrails") as boolean; +const dumpXml = config.get("dumpXml") as boolean; + +type Params = { + features?: { + shading: boolean; + contours: boolean; + hikingTrails: boolean; + bicycleTrails: boolean; + skiTrails: boolean; + horseTrails: boolean; + }; + custom?: { + styles: string[]; + layers: { styles: string[]; geojson: string }[]; + }; + legendLayers?: LegendProps["legendLayers"]; + format?: string; +}; + +export function generateFreemapStyle(params?: Parameters[0]) { + if (params?.legendLayers) { + try { + setLayersEnabled(false); + + return generateFreemapStyleInt(params); + } finally { + setLayersEnabled(true); + } + } + + return generateFreemapStyleInt(params); +} + +function generateFreemapStyleInt({ + features: { shading, contours, ...routeProps } = { + shading: shadingCfg, + contours: contoursCfg, + hikingTrails: hikingTrailsCfg, + bicycleTrails: bicycleTrailsCfg, + skiTrails: skiTrailsCfg, + horseTrails: horseTrailsCfg, + }, + custom, + legendLayers, + format, +}: Params = {}) { + return serialize( + + + + {!legendLayers && } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {(shading || contours) && } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {!legendLayers && format !== "svg" && format !== "pdf" && } + + {custom && } + + {legendLayers && } + + ); +} + +export const mapnikConfig = generateFreemapStyle(); + +if (dumpXml) { + console.log("Mapnik config:", mapnikConfig); +} diff --git a/style/jsnikExtensions.js b/style/jsnikExtensions.js deleted file mode 100644 index f8b1282..0000000 --- a/style/jsnikExtensions.js +++ /dev/null @@ -1,138 +0,0 @@ -const { font } = require('./fontFactory'); - -const extensions = { - style: { - typesRule(style, ...t) { - const q = [...t]; - - let minZoom, maxZoom; - - if (typeof q[0] === 'number' || typeof q[0] === 'undefined') { - minZoom = q.shift(); - } - - if (typeof q[0] === 'number' || typeof q[0] === 'undefined') { - maxZoom = q.shift(); - } - - return style.rule({ filter: types(...q), minZoom, maxZoom }); - }, - poiIcons(style, pois) { - for (const [minIcoZoom, , , , type, extra = {}] of pois) { - if (typeof minIcoZoom !== 'number') { - continue; - } - - const types = Array.isArray(type) ? type : [type]; - - const zoom = [minIcoZoom]; - - if (extra.maxZoom) { - zoom.push(extra.maxZoom); - } - - const r = style.typesRule(...zoom, ...types); - - for (const transform of [undefined, 'translate(6 - (abs([osm_id]) % 2) * 12, 0)', 'translate(-6 + (abs([osm_id]) % 2) * 12, 0)']) { - if (extra.icon !== null) { - // TODO find out a way to make it red if private - r.markersSymbolizer({ multiPolicy: 'whole', file: `images/${extra.icon || types[0]}.svg`, opacity: '1 - ([access] = "private" || [access] = "no") * 0.66', transform }); - } - } - } - - return style; // TODO remove - }, - poiNames(style, pois) { - for (const [, minTextZoom, withEle, natural, type, extra = {}] of pois) { - if (typeof minTextZoom !== 'number') { - continue; - } - - const fnt = font() - .wrap() - .if(natural, f => f.nature()) - .end({ placementType: 'list', dy: -10, ...(extra.font || {}) }); - - const { textSymbolizerEle } = style - .rule({ filter: types(...Array.isArray(type) ? type : [type]), minZoom: minTextZoom, maxZoom: extra.maxZoom }) - .textSymbolizer(fnt, withEle ? undefined : '[name]') - .placement({ dy: extra && extra.font && extra.font.dy ? -extra.font.dy : 10 }); - - if (withEle) { - textSymbolizerEle.text('[name]'); - textSymbolizerEle.ele('Format', { size: fnt.size * 0.92 }, '[elehack]'); - textSymbolizerEle.ele('Format', { size: fnt.size * 0.8 }, '[ele]'); - } - } - - return style; // TODO remove - }, - area(style, color, ...types) { - return style.typesRule(...types) - .borderedPolygonSymbolizer(color); - } - }, - textSymbolizer: { - placements(textSymbolizer) { - for (const off of [3, 6, 9]) { - textSymbolizer.placement({ dy: off }).placement({ dy: -off }); - } - - return textSymbolizer; - } - }, - rule: { - borderedPolygonSymbolizer(rule, color) { - return rule - .polygonSymbolizer({ fill: color }) - .lineSymbolizer({ stroke: color, strokeWidth: 1 }); - }, - rail(rule, { color, weight, sleeperWeight, spacing, glowWidth }) { - const gw = weight + glowWidth * 2; - - const sgw = sleeperWeight + glowWidth * 2; - - if (glowWidth) { - rule - .lineSymbolizer({ stroke: 'white', strokeWidth: gw }) - .lineSymbolizer({ stroke: 'white', strokeWidth: sgw, strokeDasharray: `0,${(spacing - gw) / 2},${gw},${(spacing - gw) / 2}` }); - } - - rule - .lineSymbolizer({ stroke: color, strokeWidth: weight }) - .lineSymbolizer({ stroke: color, strokeWidth: sleeperWeight, strokeDasharray: `0,${(spacing - weight) / 2},${weight},${(spacing - weight) / 2}` }) - .lineSymbolizer({ stroke: 'black', strokeWidth: '[bridge]', offset: sgw / 2 }) - .lineSymbolizer({ stroke: 'black', strokeWidth: '[bridge]', offset: - sgw / 2 }) - .lineSymbolizer({ stroke: 'black', strokeWidth: '[tunnel]', offset: sgw / 2, strokeDasharray: '3,3', strokeOpacity: 0.5 }) - .lineSymbolizer({ stroke: 'black', strokeWidth: '[tunnel]', offset: - sgw / 2, strokeDasharray: '3,3', strokeOpacity: 0.5 }) - .lineSymbolizer({ strokeOpacity: 0.8, stroke: '#ccc', strokeWidth: `[tunnel] * ${sgw}` }); - - return rule; - }, - road(rule, props) { - return rule - .lineSymbolizer(props) - .lineSymbolizer({ stroke: 'black', strokeWidth: '[bridge]', offset: props.strokeWidth / 2 + 1 }) - .lineSymbolizer({ stroke: 'black', strokeWidth: '[bridge]', offset: - props.strokeWidth / 2 - 1 }) - .lineSymbolizer({ stroke: 'black', strokeWidth: '[tunnel]', offset: props.strokeWidth / 2 + 1, strokeDasharray: '3,3', strokeOpacity: 0.5 }) - .lineSymbolizer({ stroke: 'black', strokeWidth: '[tunnel]', offset: - props.strokeWidth / 2 - 1, strokeDasharray: '3,3', strokeOpacity: 0.5 }) - .lineSymbolizer({ strokeOpacity: 0.8, stroke: '#ccc', strokeWidth: `[tunnel] * ${props.strokeWidth + 2}` }); - } - }, - map: { - sqlLayer(map, styleName, sql, atts = {}, nestedLayerFactory) { - const dsParams = { - table: `(${sql}) as foo`, - geometry_field: 'geometry' - }; - return map.layer(styleName, dsParams, atts, { base: 'db' }, nestedLayerFactory); - }, - } -}; - -function types(...type) { - return type.map((x) => `[type] = '${x.replace("'", "\\'")}'`).join(' or '); -} - -module.exports = { extensions, types }; diff --git a/style/layers.js b/style/layers.js deleted file mode 100644 index 7da06cc..0000000 --- a/style/layers.js +++ /dev/null @@ -1,904 +0,0 @@ -module.exports = { layers }; - -function poiIconProjection(ele = 'null', access = 'null', isolation = 'null') { - return `osm_id, geometry, ${ele} as ele, ${access} as access, ${isolation} as isolation`; -} - -function poiNameProjection(ele = 'null', access = 'null', isolation = 'null') { - return `osm_id, geometry, name as n, ${ele} as ele, ${access} as access, ${isolation} as isolation`; -} - -function getLandcoverSelect(tblSuffix) { - return ` - select - case when type = 'wetland' and tags->'wetland' in ('bog', 'reedbed', 'marsh', 'swamp', 'wet_meadow', 'mangrove', 'fen') then tags->'wetland' else type end as type, - geometry, - position(type || ',' in 'pedestrian,footway,pitch,library,baracks,parking,cemetery,place_of_worship,dam,weir,clearcut,scrub,orchard,vineyard,landfill,scree,quarry,railway,park,garden,allotments,kindergarten,school,college,university,village_green,wetland,grass,recreation_ground,zoo,farmyard,retail,commercial,residential,industrial,fell,bare_rock,heath,meadow,wood,forest,golf_course,grassland,farm,farmland,') as z_order - from - osm_landusages${tblSuffix} - where - geometry && !bbox! - order by - z_order desc, osm_id - `; -} - -function getFeaturesSql(zoom, mkProjection) { - const sqls = [`select * from ( - select - ${mkProjection("tags->'ele'", 'null', 'isolation')}, - case when isolation > 4500 then 'peak1' - when isolation between 3000 and 4500 then 'peak2' - when isolation between 1500 and 3000 then 'peak3' - else 'peak' end as type - from - osm_features - natural left join - isolations - where - type = 'peak' and name <> '' and geometry && !bbox!`]; - - if (zoom >= 12) { - sqls.push(` - union all - select - ${mkProjection('ele')}, - case type - when 'guidepost' then (case when name = '' then 'guidepost_noname' else 'guidepost' end) - else type - end as type - from - osm_infopoints - `); - } - - if (zoom >= 12 && zoom < 14) { - sqls.push(` - union all - select - ${mkProjection("tags->'ele'")}, - type - from - osm_features - where - type = 'aerodrome' and tags ? 'icao' - - union all - select - ${mkProjection("tags->'ele'")}, - type - from - osm_feature_polys - where - type = 'aerodrome' and tags ? 'icao' - `); - } - - if (zoom >= 14) { - // TODO distinguish various "spring types" (fountain, geyser, ...) - - sqls.push(` - union all - select - ${mkProjection('null', "tags->'access'")}, - type - from - osm_sports - where - type in ('free_flying', 'soccer', 'tennis', 'basketball') - - union all - select - ${mkProjection("tags->'ele'", "case when type in ('cave_entrance') then null else tags->'access' end")}, - case type - when 'communications_tower' then 'tower_communication' - when 'shelter' then (case when tags->'shelter_type' in ('shopping_cart', 'lean_to', 'public_transport', 'picnic_shelter', 'basic_hut', 'weather_shelter') then tags->'shelter_type' else 'shelter' end) - else (case when type in ('mine', 'adit', 'mineshaft') and tags->'disused' not in ('', 'no') then 'disused_mine' else type end) - end as type - from - osm_features - where - type <> 'peak' - and (type <> 'tree' or tags->'protected' not in ('', 'no')) - and (type <> 'saddle' or name <> '') - - union all - select - ${mkProjection("tags->'ele'", "case when type in ('cave_entrance') then null else tags->'access' end")}, - case type when 'communications_tower' then 'tower_communication' - when 'shelter' then (case when tags->'shelter_type' in ('shopping_cart', 'lean_to', 'public_transport', 'picnic_shelter', 'basic_hut', 'weather_shelter') then tags->'shelter_type' else 'shelter' end) - else (case when type in ('mine', 'adit', 'mineshaft') and tags->'disused' not in ('', 'no') then 'disused_mine' else type end) - end as type - from - osm_feature_polys - - union all - select - ${mkProjection('ele')}, - case when type = 'hot_spring' then 'hot_spring' else - case when type = 'spring_box' or refitted = 'yes' then 'refitted_' else '' end || - case when drinking_water = 'yes' or drinking_water = 'treated' then 'drinking_' when drinking_water = 'no' then 'not_drinking_' else '' end || 'spring' - end as type - from - osm_springs - - union all - select - ${mkProjection()}, - 'ruins' as type - from - osm_ruins - - union all - select - ${mkProjection()}, - building as type - from - osm_place_of_worships - where - building in ('chapel', 'church', 'basilica', 'temple') - - union all - select - ${mkProjection('ele')}, - concat("class", '_', case type - when 'communication' then 'communication' - when 'observation' then 'observation' - when 'bell_tower' then 'bell_tower' - else 'other' end) as type - from - osm_towers - `); - } - - if (zoom >= 15) { - sqls.push(` - union all - select - ${mkProjection()}, - type - from - osm_shops - where - type in ('convenience', 'fuel', 'confectionery', 'pastry', 'bicycle', 'supermarket') - - union all - select - ${mkProjection('null', "tags->'access'")}, - 'building' as type - from - osm_building_points - where - type <> 'no' - - union all - select - ${mkProjection()}, - type - from - osm_feature_lines - where - type in ('dam', 'weir') - `); - } - - if (zoom >= 17 && mkProjection !== poiNameProjection) { - sqls.push(` - union all - select - ${mkProjection()}, - type - from - osm_barrierpoints - where - type in ('lift_gate', 'swing_gate', 'gate') - - union all - select - ${mkProjection()}, - 'ford' as type - from - osm_fords - `); - } - - sqls.push(` - ) as abc left join z_order_poi using (type) - where - geometry && !bbox! - order - by z_order, isolation desc nulls last, ele desc nulls last, osm_id - `); - - return sqls.join(''); -} - -function layers(shading, contours, hikingTrails, bicycleTrails, skiTrails, horseTrails, format, custom, legendLayers) { - - const lefts = []; - - const rights = []; - - if (hikingTrails) { - lefts.push('hiking', 'foot'); - } - - if (horseTrails) { - lefts.push('horse'); - } - - if (bicycleTrails) { - rights.push('bicycle', 'mtb'); - } - - if (skiTrails) { - rights.push('ski', 'piste'); - } - - const [leftsIn, rightsIn] = [lefts, rights].map((side) => side.map(item => `'${item}'`).join(',') || "'_x_'"); - - if (legendLayers) { - return (map) => map.doInMap((map) => { - for (const layer of legendLayers) { - map.layer(layer.styles, { type: 'geojson', inline: JSON.stringify(layer.geojson) }, { srs: '+init=epsg:4326' }); - } - - return map; - }); - } - - const colorSql = ` - case - when "osmc:symbol" like 'red:%' then 0 - when "osmc:symbol" like 'blue:%' then 1 - when "osmc:symbol" like 'green:%' then 2 - when "osmc:symbol" like 'yellow:%' then 3 - when "osmc:symbol" like 'black:%' then 4 - when "osmc:symbol" like 'white:%' then 5 - when "osmc:symbol" like 'orange:%' then 6 - when "osmc:symbol" like 'violet:%' then 7 - when "osmc:symbol" like 'purple:%' then 7 - when colour = 'red' then 0 - when colour = 'blue' then 1 - when colour = 'green' then 2 - when colour = 'yellow' then 3 - when colour = 'black' then 4 - when colour = 'white' then 5 - when colour = 'orange' then 6 - when colour = 'violet' then 7 - when colour = 'purple' then 7 - else 8 - end - `; - - const getRoutesQuery = (includeNetworks) => ` - select - st_linemerge(st_collect(geometry)) as geometry, - idx(arr1, 0) as h_red, - idx(arr1, 1) as h_blue, - idx(arr1, 2) as h_green, - idx(arr1, 3) as h_yellow, - idx(arr1, 4) as h_black, - idx(arr1, 5) as h_white, - idx(arr1, 6) as h_orange, - idx(arr1, 7) as h_purple, - idx(arr1, 8) as h_none, - idx(arr1, 10) as h_red_loc, - idx(arr1, 11) as h_blue_loc, - idx(arr1, 12) as h_green_loc, - idx(arr1, 13) as h_yellow_loc, - idx(arr1, 14) as h_black_loc, - idx(arr1, 15) as h_white_loc, - idx(arr1, 16) as h_orange_loc, - idx(arr1, 17) as h_purple_loc, - idx(arr1, 18) as h_none_loc, - idx(arr2, 20) as b_red, - idx(arr2, 21) as b_blue, - idx(arr2, 22) as b_green, - idx(arr2, 23) as b_yellow, - idx(arr2, 24) as b_black, - idx(arr2, 25) as b_white, - idx(arr2, 26) as b_orange, - idx(arr2, 27) as b_purple, - idx(arr2, 28) as b_none, - idx(arr2, 30) as s_red, - idx(arr2, 31) as s_blue, - idx(arr2, 32) as s_green, - idx(arr2, 33) as s_yellow, - idx(arr2, 34) as s_black, - idx(arr2, 35) as s_white, - idx(arr2, 36) as s_orange, - idx(arr2, 37) as s_purple, - idx(arr2, 38) as s_none, - idx(arr1, 40) as r_red, - idx(arr1, 41) as r_blue, - idx(arr1, 42) as r_green, - idx(arr1, 43) as r_yellow, - idx(arr1, 44) as r_black, - idx(arr1, 45) as r_white, - idx(arr1, 46) as r_orange, - idx(arr1, 47) as r_purple, - idx(arr1, 48) as r_none, - refs1, - refs2, - icount(arr1 - array[1000, 1010, 1020, 1030, 1040]) as off1, - icount(arr2 - array[1000, 1010, 1020, 1030, 1040]) as off2 - from ( - select - array_to_string( - array( - select distinct itm from unnest( - array_agg( - case - when - osm_routes.type in (${leftsIn}) - then - case - when name <> '' and ref <> '' - then name || ' (' || ref || ')' - else coalesce(nullif(name, ''), nullif(ref, '')) end - else - null - end - ) - ) as itm order by itm - ), - ', ' - ) as refs1, - array_to_string( - array( - select distinct itm from unnest( - array_agg( - case - when - osm_routes.type in (${rightsIn}) - then - case - when name <> '' and ref <> '' - then name || ' (' || ref || ')' - else coalesce(nullif(name, ''), nullif(ref, '')) end - else - null - end - ) - ) as itm order by itm - ), - ', ' - ) as refs2, - first(geometry) as geometry, - uniq(sort(array_agg( - case - when osm_routes.type in (${leftsIn}) then - case - when ${!!horseTrails} and osm_routes.type = 'horse' then 40 - when ${!!hikingTrails} and osm_routes.type in ('hiking', 'foot') then (case when network in ('iwn', 'nwn', 'rwn') then 0 else 10 end) - else 1000 - end + - ${colorSql} - else 1000 - end - ))) as arr1, - uniq(sort(array_agg( - case - when osm_routes.type in (${rightsIn}) then - case - when ${!!bicycleTrails} and osm_routes.type in ('bicycle', 'mtb') then 20 - when ${!!skiTrails} and osm_routes.type in ('ski', 'piste') then 30 - else 1000 - end + - ${colorSql} - else - 1000 - end - ))) as arr2 - from osm_route_members join osm_routes on (osm_route_members.osm_id = osm_routes.osm_id and state <> 'proposed') - where ${!includeNetworks ? '' : `network in (${includeNetworks.map(n => `'${n}'`).join(',')}) and `}geometry && !bbox! - group by member - ) as aaa - group by - h_red, h_blue, h_green, h_yellow, h_black, h_white, h_orange, h_purple, h_none, - h_red_loc, h_blue_loc, h_green_loc, h_yellow_loc, h_black_loc, h_white_loc, h_orange_loc, h_purple_loc, h_none_loc, - b_red, b_blue, b_green, b_yellow, b_black, b_white, b_orange, b_purple, b_none, - s_red, s_blue, s_green, s_yellow, s_black, s_white, s_orange, s_purple, s_none, - r_red, r_blue, r_green, r_yellow, r_black, r_white, r_orange, r_purple, r_none, - off1, off2, refs1, refs2 - `; - - return map => map - .layer('sea', - { - type: 'shape', - file: 'simplified-land-polygons-complete-3857/simplified_land_polygons.shp', - }, - { srs: '+init=epsg:3857', maxZoom: 9 } - ) - .layer('sea', - { - type: 'shape', - file: 'land-polygons-split-3857/land_polygons.shp', - }, - { srs: '+init=epsg:3857', minZoom: 10 } - ) - .sqlLayer('landcover', - getLandcoverSelect('_gen0'), - { maxZoom: 9 }, - ) - .sqlLayer('landcover', - getLandcoverSelect('_gen1'), - { minZoom: 10, maxZoom: 11 }, - ) - .sqlLayer('landcover', - getLandcoverSelect(''), - { minZoom: 12, cacheFeatures: true }, - ) - .sqlLayer('cutlines', - "select geometry, type from osm_feature_lines where type = 'cutline'", - { minZoom: 13 }, - ) - .sqlLayer('water_area', - 'select geometry, type, intermittent OR seasonal as tmp from osm_waterareas_gen1', - { maxZoom: 11 }, - ) - .sqlLayer('water_area', - 'select geometry, type, intermittent OR seasonal as tmp from osm_waterareas', - { minZoom: 12 }, - ) - // TODO remove `where type = 'river'` once db is reimported - .sqlLayer('water_line', - "select geometry, type, tunnel, CASE WHEN intermittent OR seasonal THEN '6,3' ELSE '1000,0' END AS dasharray from osm_waterways_gen0 where type = 'river'", - { maxZoom: 9 }, - ) - // TODO remove `where type = 'river'` once db is reimported - .sqlLayer('water_line', - "select geometry, type, tunnel, CASE WHEN intermittent OR seasonal THEN '6,3' ELSE '1000,0' END AS dasharray from osm_waterways_gen1 where type = 'river'", - { minZoom: 10, maxZoom: 11 }, - ) - .sqlLayer('water_line', - "select geometry, type, tunnel, CASE WHEN intermittent OR seasonal THEN '6,3' ELSE '1000,0' END AS dasharray from osm_waterways", - { minZoom: 12 }, - ) - .sqlLayer('trees', - "select type, geometry from osm_features where type = 'tree' OR type = 'shrub'", - { minZoom: 16, bufferSize: 128 }, - ) - // TODO split to several layers: underground/underwater, overground, overhead - .sqlLayer('pipelines', - 'select geometry, location from osm_pipelines', - { minZoom: 13 }, - ) - .sqlLayer('feature_lines', - "select geometry, type from osm_feature_lines where type not in ('cutline', 'valley', 'ridge')", - { minZoom: 13, cacheFeatures: true }, - ) - .doInMap((map) => { - if (shading) { - map.sqlLayer('feature_lines_maskable', - "select geometry, type from osm_feature_lines where type not in ('cutline', 'valley', 'ridge')", // TODO for effectivity filter out cliffs/earth_banks - { minZoom: 13, compOp: 'src-over' }, - ({ layer }) => { - layer( - 'mask', - { - type: 'gdal', - file: 'shading/sk/mask.tif', - }, - { compOp: 'dst-out' }, - ); - - layer( - 'mask', - { - type: 'gdal', - file: 'shading/pl/mask.tif', - }, - { compOp: 'dst-out' }, - ); - - // AT / CH is not so detailed - // layer( - // 'mask', - // { - // type: 'gdal', - // file: 'shading/at/mask.tif', - // }, - // { compOp: 'dst-out' }, - // ); - } - ); - } else { - map.sqlLayer('feature_lines_maskable', - "select geometry, type from osm_feature_lines where type not in ('cutline', 'valley', 'ridge')", - { minZoom: 13, cacheFeatures: true }, - ); - } - }) - .sqlLayer('embankments', - 'select geometry from osm_roads where embankment = 1 and geometry && !bbox!', - { minZoom: 16 }, - ) - .sqlLayer('highways', - 'select geometry, type, tracktype, class, service, bridge, tunnel, oneway, power(0.666, greatest(0, trail_visibility - 1)) as trail_visibility from osm_roads_gen0 where geometry && !bbox! order by z_order, osm_id', - { maxZoom: 9, groupBy: 'tunnel' }, - ) - .sqlLayer('highways', - 'select geometry, type, tracktype, class, service, bridge, tunnel, oneway, power(0.666, greatest(0, trail_visibility - 1)) as trail_visibility from osm_roads_gen1 where geometry && !bbox! order by z_order, osm_id', - { minZoom: 10, maxZoom: 11, groupBy: 'tunnel' }, - ) - .sqlLayer('highways', - 'select geometry, type, tracktype, class, service, bridge, tunnel, oneway, power(0.666, greatest(0, trail_visibility - 1)) as trail_visibility from osm_roads_gen1 where geometry && !bbox! order by z_order, osm_id', - { maxZoom: 11, groupBy: 'tunnel' }, - ) - .sqlLayer(['higwayGlows', 'highways'], - // order bycase when type = 'rail' AND (service = 'main' OR service = '') then 1000 else z_order end - 'select geometry, type, tracktype, class, service, bridge, tunnel, oneway, power(0.666, greatest(0, trail_visibility - 1)) as trail_visibility from osm_roads where geometry && !bbox! order by z_order, osm_id', - { minZoom: 12, cacheFeatures: true, groupBy: 'tunnel' }, - ) - .sqlLayer('accessRestrictions', - "select case when bicycle not in ('', 'yes', 'designated', 'official', 'permissive') or bicycle = '' and vehicle not in ('', 'yes', 'designated', 'official', 'permissive') " - + "or bicycle = '' and vehicle = '' and access not in ('', 'yes', 'designated', 'official', 'permissive') then 1 else 0 end as no_bicycle, " - + "case when foot not in ('', 'yes', 'designated', 'official', 'permissive') or foot = '' and access not in ('', 'yes', 'designated', 'official', 'permissive') then 1 else 0 end as no_foot, " - + "geometry from osm_roads where type not in ('trunk', 'motorway', 'trunk_link', 'motorway_link') and geometry && !bbox!", - { minZoom: 14 }, - ) - .sqlLayer('aerialways', - 'select geometry, type from osm_aerialways', - { minZoom: 12 }, - ) - // .sqlLayer('highways', - // 'select geometry, type, tracktype, class, service, bridge, tunnel, oneway from osm_roads_gen0 order by z_order', - // { maxZoom: 13 }, - // ) - .sqlLayer('aeroways', - 'select geometry, type from osm_aeroways', - { minZoom: 11 }, - ) - .sqlLayer('solar_power_plants', - "select geometry from osm_power_generators where source = 'solar'", - { minZoom: 12 } - ) - .sqlLayer('buildings', - "select geometry, type from osm_buildings where type <> 'no'", - { minZoom: 13 }, - ) - .sqlLayer('barrierways', - 'select geometry, type from osm_barrierways', - { minZoom: 16 }, - ) - .doInMap((map) => { - function addShadingAndContours(cc, cutCcs) { - map.layer('mask', { - type: 'gdal', - file: `shading/${cc}/mask.tif`, - }, { compOp: 'src-over' }, {}, ({layer}) => { - layer( - 'sea', // any - { - table: `(select wkb_geometry from contour_${cc}_split limit 0) as foo`, // some empty data - }, - { compOp: 'src-in' }, - { base: 'db' }, - ({ layer }) => { - if (contours) { - layer( - 'contours', - { - table: `(select wkb_geometry, height from contour_${cc}_split) as foo`, - }, - { - minZoom: 12, - }, - { base: 'db' } - ); - } - - if (shading) { - layer( - 'hillshade', - { - type: 'gdal', - file: `shading/${cc}/final.tif`, - }, - { }, - { }, - ); - } - - for (const cutCc of cutCcs) { - layer('mask', { - type: 'gdal', - file: `shading/${cutCc}/mask.tif`, - }, { compOp: 'dst-out' }); - } - } - ); - }); - } - - if (shading || contours) { - addShadingAndContours('at', ['sk', 'ch', 'si']); - - addShadingAndContours('it', ['at', 'ch', 'si']); - - addShadingAndContours('ch', []); - - addShadingAndContours('si', []); - - addShadingAndContours('pl', ['sk']); - - addShadingAndContours('sk', []); - - map.layer( - 'sea', // any - { - table: '(select geom from contour_split limit 0) as foo', // // some empty data - }, - { compOp: 'src-over' }, - { base: 'db' }, - ({ layer }) => { - // to cut out detailed - - for (const cc of ['it', 'at', 'ch', 'si', 'pl', 'sk']) { - layer( - 'mask', - { - type: 'gdal', - file: `shading/${cc}/mask.tif`, - }, - {}, - ); - } - - layer( - 'sea', // any - { - table: '(select geom from contour_split limit 0) as foo', // // some empty data - }, - { compOp: 'src-out' }, - { base: 'db' }, - ({ layer }) => { - if (contours) { - layer( - 'contours', - { - table: '(select geom, height from contour_split) as foo', - }, - { - minZoom: 12, - }, - { base: 'db' } - ); - } - - if (shading) { - layer( - 'hillshade', - { - type: 'gdal', - file: 'shading/final.tiff', - }, - { }, - { }, - ); - } - }, - ); - }, - ); - } - }) - .sqlLayer('protected_areas', - 'select type, geometry from osm_protected_areas') - .sqlLayer('borders', - 'select st_linemerge(st_collect(geometry)) as geometry from osm_admin where admin_level = 2 and geometry && !bbox!', - { opacity: 0.5 }) - .sqlLayer('military_areas', - "select geometry from osm_landusages where type = 'military'") - // .sqlLayer(['routeGlows', 'routes'], - .sqlLayer('routes', - getRoutesQuery(['iwn', 'icn']), - { minZoom: 9, maxZoom: 9, bufferSize: 512 }, - ) - .sqlLayer('routes', - getRoutesQuery(['iwn', 'nwn', 'icn', 'ncn']), - { minZoom: 10, maxZoom: 10, bufferSize: 512 }, - ) - .sqlLayer('routes', - getRoutesQuery(['iwn', 'nwn', 'rwn', 'icn', 'ncn', 'rcn']), - { minZoom: 11, maxZoom: 11, bufferSize: 512 }, - ) - .sqlLayer('routes', - getRoutesQuery(), - { minZoom: 12, maxZoom: 13, bufferSize: 512 }, - ) - .sqlLayer('routes', - getRoutesQuery(), - { minZoom: 14, clearLabelCache: 'on', bufferSize: 2048 }, // NOTE clearing cache because of contour elevation labels - ) - .layer( - 'geonames', - { - type: 'shape', - file: 'geo-names/geo-names.shp', - }, - { srs: '+init=epsg:4326', bufferSize: 1024, minZoom: 9, maxZoom: 11 } - ) - .sqlLayer('placenames', - "select name, type, geometry from osm_places where type = 'city' AND geometry && !bbox! order by z_order desc, osm_id", - { bufferSize: 1024, maxZoom: 8, clearLabelCache: 'on' } - ) - .sqlLayer('placenames', - "select name, type, geometry from osm_places where (type = 'city' OR type = 'town') AND geometry && !bbox! order by z_order desc, osm_id", - { bufferSize: 1024, minZoom: 9, maxZoom: 10, clearLabelCache: 'on' } - ) - .sqlLayer('placenames', - "select name, type, geometry from osm_places where (type = 'city' OR type = 'town' OR type = 'town' OR type = 'village') AND geometry && !bbox! order by z_order desc, osm_id", - { bufferSize: 1024, minZoom: 11, maxZoom: 11, clearLabelCache: 'on' } - ) - .sqlLayer('placenames', - "select name, type, geometry from osm_places where type <> 'locality' AND geometry && !bbox! order by z_order desc, osm_id", - { bufferSize: 1024, minZoom: 12, maxZoom: 14, clearLabelCache: 'on' } - ) - .doInMap((map) => { - for (let zoom = 10; zoom <= 17; zoom++) { - map.sqlLayer('features', - getFeaturesSql(zoom, poiIconProjection), - { minZoom: zoom, maxZoom: zoom === 17 ? undefined : zoom, bufferSize: 256, cacheFeatures: true } - ); - } - - for (let zoom = 10; zoom <= 17; zoom++) { - map.sqlLayer('feature_names', - `select distinct on (osm_id) - *, - ${zoom < 15 ? "REGEXP_REPLACE(n, '(?<=.{30,})(.{0,30}).*', '\\2…')" : 'n'} as name, - case when ele <> '' then chr(10) || chr(8203) else '' end as elehack - from (${getFeaturesSql(zoom, poiNameProjection)}) subq`, - { minZoom: zoom, maxZoom: zoom === 17 ? undefined : zoom, bufferSize: 512, cacheFeatures: true } - ); - } - }) - // TODO to feature_names to consider z_order - .sqlLayer('water_area_names', ` - select - osm_waterareas.name, - osm_waterareas.geometry, - osm_waterareas.type, - osm_waterareas.area - from - osm_waterareas left join osm_feature_polys using (osm_id) - where - osm_feature_polys.osm_id is null - and osm_waterareas.type <> 'riverbank' - and osm_waterareas.water not in ('river', 'stream', 'canal', 'ditch') - `, { minZoom: 10, bufferSize: 1024 }, - ) - // TODO - // .sqlLayer('feature_line_names', - // "select geometry, name, type from osm_feature_lines where type <> 'valley'", - // { minZoom: 14 }, - // ) - .sqlLayer( - 'building_names', - `select - osm_buildings.name, osm_buildings.geometry - from osm_buildings - left join osm_landusages using (osm_id) - left join osm_feature_polys using (osm_id) - left join osm_features using (osm_id) - left join osm_place_of_worships using (osm_id) - left join osm_sports using (osm_id) - left join osm_ruins using (osm_id) - left join osm_towers using (osm_id) - left join osm_shops using (osm_id) - where - osm_buildings.type <> 'no' - and osm_landusages.osm_id is null - and osm_feature_polys.osm_id is null - and osm_features.osm_id is null - and osm_place_of_worships.osm_id is null - and osm_sports.osm_id is null - and osm_ruins.osm_id is null - and osm_towers.osm_id is null - and osm_shops.osm_id is null - order by osm_buildings.osm_id`, - { bufferSize: 512, minZoom: 17 }, - ) - .sqlLayer( - 'protected_area_names', - 'select type, name, geometry from osm_protected_areas', - { bufferSize: 1024, minZoom: 8 }, - ) - .sqlLayer('landcover_names', - `select - osm_landusages.geometry, osm_landusages.name, osm_landusages.area, - osm_landusages.type in ('forest', 'wood', 'scrub', 'heath', 'grassland', 'scree', 'meadow', 'fell', 'wetland') as natural - from - osm_landusages - left join - z_order_landuse using (type) - left join - osm_feature_polys using (osm_id) - left join - osm_sports on osm_landusages.osm_id = osm_sports.osm_id and osm_sports.type in ('soccer', 'tennis', 'basketball') -- NOTE filtering some POIs (hacky because it affects also lower zooms) - where - osm_feature_polys.osm_id is null and osm_sports.osm_id is null and osm_landusages.geometry && !bbox! - order - by z_order, osm_feature_polys.osm_id`, - { minZoom: 12, bufferSize: 1024 }, - ) - .sqlLayer( - 'locality_names', - "select name, type, geometry from osm_places where type = 'locality' order by osm_id", - { minZoom: 15, bufferSize: 1024 }, - ) - .sqlLayer('housenumbers', - `select coalesce(nullif("addr:streetnumber", ''), nullif("addr:housenumber", ''), nullif("addr:conscriptionnumber", '')) as housenumber, geometry - from osm_housenumbers where geometry && !bbox!`, - { minZoom: 18, bufferSize: 256 }) - .sqlLayer('highway_names', - "select name, st_linemerge(st_collect(geometry)) as geometry, type from osm_roads where geometry && !bbox! and name <> '' group by z_order, name, type order by z_order desc", - { minZoom: 15, bufferSize: 1024 }, - ) - .sqlLayer('route_names', - getRoutesQuery(), - { minZoom: 14, bufferSize: 2048 }, // NOTE probably must be same bufferSize as routes - ) - .sqlLayer('aerialway_names', - 'select geometry, name, type from osm_aerialways', - { minZoom: 16, bufferSize: 1024 }, - ) - .sqlLayer('water_line_names', - `select ${process.env.FM_CUSTOM_SQL || ''} st_linemerge(st_collect(geometry)) as geometry, name, type from osm_waterways where geometry && !bbox! and type = 'river' and name <> '' group by name, type`, - // `select ${process.env.FM_CUSTOM_SQL || ''} geometry, name, type from osm_waterways where type = 'river' and name <> ''`, - { minZoom: 12, maxZoom: 13, bufferSize: 1024 }, - ) - .sqlLayer('water_line_names', - `select ${process.env.FM_CUSTOM_SQL || ''} st_linemerge(st_collect(geometry)) as geometry, name, type from osm_waterways where geometry && !bbox! and name <> '' group by name, type`, - // `select ${process.env.FM_CUSTOM_SQL || ''} geometry, name, type from osm_waterways where name <> ''`, - { minZoom: 14, bufferSize: 1024 }, - ) - .sqlLayer('fixmes', - 'select geometry from osm_fixmes', - { minZoom: 14 }, - ) - .sqlLayer('valleys_ridges', - "select geometry, name, 0.8 as offset_factor from osm_feature_lines where type = 'valley' and name <> ''", - { minZoom: 13, clearLabelCache: 'on', bufferSize: 1024 }, - ) - .sqlLayer('valleys_ridges', - "select geometry, name, 0 as offset_factor from osm_feature_lines where type = 'ridge' and name <> ''", - { minZoom: 13, clearLabelCache: 'on', bufferSize: 1024 }, - ) - .sqlLayer('placenames', - "select name, type, geometry from osm_places where type <> 'locality' AND geometry && !bbox! order by z_order desc, osm_id", - { clearLabelCache: 'on', bufferSize: 1024, minZoom: 15 }, - ) - .doInMap(map => { - if (format !== 'svg' && format !== 'pdf') { - map.layer('crop', - { type: 'geojson', file: 'limit.geojson' }, - { srs: '+init=epsg:4326', compOp: 'dst-in' }, - ); - } - - if (custom) { - for (const style of custom.styles) { - map.mapEle.ele(style); - } - - for (const layer of custom.layers) { - map.layer( - layer.styles, - { - type: 'geojson', - inline: JSON.stringify(layer.geojson) - }, - { srs: '+init=epsg:4326' }, - ); - } - } - - return map; - }) - ; -} diff --git a/style/routes.js b/style/routes.js deleted file mode 100644 index 1c7017d..0000000 --- a/style/routes.js +++ /dev/null @@ -1,188 +0,0 @@ -/* eslint-disable indent */ -const os = require('os'); -const path = require('path'); -const fs = require('fs').promises; - -const routeColors = ['none', 'purple', 'orange', 'white', 'black', 'yellow', 'green', 'blue', 'red']; - -async function initIcons() { - const [horseSvg, skiSvg] = await Promise.all([ - fs.readFile('images/horse.svg', { encoding: 'UTF-8' }), - fs.readFile('images/ski.svg', { encoding: 'UTF-8' }), - ]); - - return Promise.all( - routeColors.map( - color => Promise.all([ - // TODO u - fs.writeFile(path.resolve(os.tmpdir(), `ski-${color}.svg`), skiSvg.replaceAll('#ff00ff', mapColor(color))), - fs.writeFile(path.resolve(os.tmpdir(), `horse-${color}.svg`), horseSvg.replaceAll('#ff00ff', mapColor(color))), - ]), - ), - ); -} - -module.exports = { - routes, - initIcons, -}; - -// types 'hiking' or combination of ['bicycle', 'ski'] -function routes(glows, ...types) { - const isHiking = types.includes('hiking'); - const isBicycle = types.includes('bicycle'); - const isSki = types.includes('ski'); - const isHorse = types.includes('horse'); - - return (style) => { - for (const zoomVar of [0, 1, 2]) { - const zoomParams = zoomVar === 0 ? { maxZoom: 11 } : zoomVar === 1 ? { minZoom: 12, maxZoom: 12 } : { minZoom: 13 }; - const zo = [1, 2, 3][zoomVar]; - const wf = [1.5, 1.5, 2][zoomVar]; - - const df = 1.25; - - const glowStyle = { - stroke: 'white', - strokeLinejoin: 'round', - strokeLinecap: 'butt', - strokeOpacity: 0.33, - }; - - for (const color of routeColors) { - // (maybe) order of route types influences drawing order (last = highest prio) - - if (isHorse) { - // horse riding - - const offset = `(${zo} + ([r_${color}] - 1) * ${wf} * ${df}) + 0.5`; - - const rRule = style.rule({ filter: `[r_${color}] > 0`, ...zoomParams }); - if (glows) { - rRule.lineSymbolizer({ - ...glowStyle, - strokeWidth: wf + 1, - offset, - }); - } else { - rRule.linePatternSymbolizer({ - file: `/tmp/horse-${color}.svg`, - offset, - transform: `scale(${wf / 2})`, - }); - - // rRule.lineSymbolizer({ - // stroke: mapColor(color), - // strokeWidth: wf, - // strokeLinejoin: 'round', - // strokeLinecap: 'butt', - // offset, - // strokeDasharray: `${wf * 3},${wf * 2}`, - // }); - } - } - - if (isSki) { - const offset = `-(${zo} + ([s_${color}] - 1) * ${wf * 2}) - 1`; - - const sRule = style.rule({ filter: `[s_${color}] > 0`, ...zoomParams }); - if (glows) { - sRule.lineSymbolizer({ - ...glowStyle, - strokeWidth: wf * 1.5 + 1, - offset, - }); - } else { - sRule.linePatternSymbolizer({ - file: `/tmp/ski-${color}.svg`, - offset, - transform: `scale(${wf / 2})`, - }); - - // sRule.lineSymbolizer({ - // stroke: mapColor(color), - // strokeWidth: wf, - // strokeLinejoin: 'round', - // strokeLinecap: 'butt', - // offset, - // strokeDasharray: `${wf * 3},${wf * 2}`, - // }); - } - } - - if (isBicycle && !glows) { - // bicycle - style.rule({ filter: `[b_${color}] > 0`, ...zoomParams }).lineSymbolizer({ - stroke: mapColor(color), - strokeWidth: wf * 2, - strokeLinejoin: 'round', - strokeLinecap: 'round', - offset: `-(${zo} + ([b_${color}] - 1) * ${wf * 2}) - 1`, - strokeDasharray: `0.001,${wf * 3}`, - }); - } - - if (isHiking) { - const o1 = `${zo} + ([h_${color}] - 1) * ${wf} * ${df} + 0.5`; - - // major hiking - const hRule = style.rule({ filter: `[h_${color}] > 0`, ...zoomParams }); - if (glows) { - hRule.lineSymbolizer({ - ...glowStyle, - strokeWidth: wf + 2, - offset: o1, - }); - } else { - hRule.lineSymbolizer({ - stroke: mapColor(color), - strokeWidth: wf, - strokeLinejoin: 'round', - strokeLinecap: 'butt', - offset: o1, - }); - } - - const o2 = `${zo} + ([h_${color}_loc] - 1) * ${wf} * ${df} + 0.5`; - - // local hiking - const lhRule = style.rule({ filter: `[h_${color}_loc] > 0`, ...zoomParams }); - if (glows) { - lhRule.lineSymbolizer({ - ...glowStyle, - strokeWidth: wf + 2, - offset: o2, - }); - } else { - lhRule.lineSymbolizer({ - stroke: mapColor(color), - strokeWidth: wf, - strokeLinejoin: 'round', - strokeLinecap: 'butt', - offset: o2, - strokeDasharray: `${wf * 3},${wf * 1}`, - }); - } - } - - } - } - }; -} - - -const colorMap = { - red: '#ff3030', - blue: '#5050ff', - green: '#00a000', - yellow: '#f0f000', - orange: '#ff8000', - black: 'black', - white: 'white', - purple: '#c000c0', - none: '#ff00ff', -}; - -function mapColor(color) { - return colorMap[color] || color; -} diff --git a/style/routes.tsx b/style/routes.tsx new file mode 100644 index 0000000..eef399b --- /dev/null +++ b/style/routes.tsx @@ -0,0 +1,488 @@ +import { LinePatternSymbolizer, LineSymbolizer, Rule, Style, TextSymbolizer } from "jsxnik/mapnikConfig"; +import { RuleEx } from "./RuleEx"; +import { tmpdir } from "os"; +import path from "path"; +import fs from "fs/promises"; +import { SqlLayer } from "./SqlLayer"; +import { font } from "./fontFactory"; + +export type RouteProps = { + hikingTrails: boolean; + bicycleTrails: boolean; + skiTrails: boolean; + horseTrails: boolean; +}; + +const colorMap: Record = { + none: "#ff00ff", + purple: "#c000c0", + orange: "#ff8000", + white: "white", + black: "black", + yellow: "#f0f000", + green: "#00a000", + blue: "#5050ff", + red: "#ff3030", +}; + +const colorSql = ` + CASE + WHEN "osmc:symbol" LIKE 'red:%' THEN 0 + WHEN "osmc:symbol" LIKE 'blue:%' THEN 1 + WHEN "osmc:symbol" LIKE 'green:%' THEN 2 + WHEN "osmc:symbol" LIKE 'yellow:%' THEN 3 + WHEN "osmc:symbol" LIKE 'black:%' THEN 4 + WHEN "osmc:symbol" LIKE 'white:%' THEN 5 + WHEN "osmc:symbol" LIKE 'orange:%' THEN 6 + WHEN "osmc:symbol" LIKE 'violet:%' THEN 7 + WHEN "osmc:symbol" LIKE 'purple:%' THEN 7 + WHEN colour = 'red' THEN 0 + WHEN colour = 'blue' THEN 1 + WHEN colour = 'green' THEN 2 + WHEN colour = 'yellow' THEN 3 + WHEN colour = 'black' THEN 4 + WHEN colour = 'white' THEN 5 + WHEN colour = 'orange' THEN 6 + WHEN colour = 'violet' THEN 7 + WHEN colour = 'purple' THEN 7 + ELSE 8 + END +`; + +const getRoutesQuery = ( + { hikingTrails, horseTrails, bicycleTrails, skiTrails }: RouteProps, + includeNetworks?: string[] +) => { + const lefts: string[] = []; + + const rights: string[] = []; + + if (hikingTrails) { + lefts.push("hiking", "foot"); + } + + if (horseTrails) { + lefts.push("horse"); + } + + if (bicycleTrails) { + rights.push("bicycle", "mtb"); + } + + if (skiTrails) { + rights.push("ski", "piste"); + } + + const [leftsIn, rightsIn] = [lefts, rights].map((side) => side.map((item) => `'${item}'`).join(",") || "'_x_'"); + + return ` + SELECT + ST_LineMerge(ST_Collect(geometry)) AS geometry, + idx(arr1, 0) AS h_red, + idx(arr1, 1) AS h_blue, + idx(arr1, 2) AS h_green, + idx(arr1, 3) AS h_yellow, + idx(arr1, 4) AS h_black, + idx(arr1, 5) AS h_white, + idx(arr1, 6) AS h_orange, + idx(arr1, 7) AS h_purple, + idx(arr1, 8) AS h_none, + idx(arr1, 10) AS h_red_loc, + idx(arr1, 11) AS h_blue_loc, + idx(arr1, 12) AS h_green_loc, + idx(arr1, 13) AS h_yellow_loc, + idx(arr1, 14) AS h_black_loc, + idx(arr1, 15) AS h_white_loc, + idx(arr1, 16) AS h_orange_loc, + idx(arr1, 17) AS h_purple_loc, + idx(arr1, 18) AS h_none_loc, + idx(arr2, 20) AS b_red, + idx(arr2, 21) AS b_blue, + idx(arr2, 22) AS b_green, + idx(arr2, 23) AS b_yellow, + idx(arr2, 24) AS b_black, + idx(arr2, 25) AS b_white, + idx(arr2, 26) AS b_orange, + idx(arr2, 27) AS b_purple, + idx(arr2, 28) AS b_none, + idx(arr2, 30) AS s_red, + idx(arr2, 31) AS s_blue, + idx(arr2, 32) AS s_green, + idx(arr2, 33) AS s_yellow, + idx(arr2, 34) AS s_black, + idx(arr2, 35) AS s_white, + idx(arr2, 36) AS s_orange, + idx(arr2, 37) AS s_purple, + idx(arr2, 38) AS s_none, + idx(arr1, 40) AS r_red, + idx(arr1, 41) AS r_blue, + idx(arr1, 42) AS r_green, + idx(arr1, 43) AS r_yellow, + idx(arr1, 44) AS r_black, + idx(arr1, 45) AS r_white, + idx(arr1, 46) AS r_orange, + idx(arr1, 47) AS r_purple, + idx(arr1, 48) AS r_none, + refs1, + refs2, + icount(arr1 - array[1000, 1010, 1020, 1030, 1040]) AS off1, + icount(arr2 - array[1000, 1010, 1020, 1030, 1040]) AS off2 + FROM ( + SELECT + array_to_string( + array( + SELECT distinct itm FROM unnest( + array_agg( + CASE + WHEN + osm_routes.type IN (${leftsIn}) + THEN + CASE + WHEN name <> '' AND ref <> '' + THEN name || ' (' || ref || ')' + ELSE COALESCE(NULLIF(name, ''), NULLIF(ref, '')) END + ELSE + null + END + ) + ) AS itm ORDER BY itm + ), + ', ' + ) AS refs1, + array_to_string( + array( + SELECT distinct itm FROM unnest( + array_agg( + CASE + WHEN + osm_routes.type IN (${rightsIn}) + THEN + CASE + WHEN name <> '' AND ref <> '' + THEN name || ' (' || ref || ')' + ELSE COALESCE(NULLIF(name, ''), NULLIF(ref, '')) END + ELSE + null + END + ) + ) AS itm ORDER BY itm + ), + ', ' + ) AS refs2, + first(geometry) AS geometry, + uniq(sort(array_agg( + CASE + WHEN osm_routes.type IN (${leftsIn}) THEN + CASE + WHEN ${!!horseTrails} AND osm_routes.type = 'horse' THEN 40 + WHEN ${!!hikingTrails} AND osm_routes.type IN ('hiking', 'foot') THEN (CASE WHEN network IN ('iwn', 'nwn', 'rwn') THEN 0 ELSE 10 END) + ELSE 1000 + END + + ${colorSql} + ELSE 1000 + END + ))) AS arr1, + uniq(sort(array_agg( + CASE + WHEN osm_routes.type IN (${rightsIn}) THEN + CASE + WHEN ${!!bicycleTrails} AND osm_routes.type IN ('bicycle', 'mtb') THEN 20 + WHEN ${!!skiTrails} AND osm_routes.type IN ('ski', 'piste') THEN 30 + ELSE 1000 + END + + ${colorSql} + ELSE + 1000 + END + ))) AS arr2 + FROM osm_route_members JOIN osm_routes ON (osm_route_members.osm_id = osm_routes.osm_id AND state <> 'proposed') + WHERE ${ + !includeNetworks ? "" : `network IN (${includeNetworks.map((n) => `'${n}'`).join(",")}) AND ` + }geometry && !bbox! + GROUP BY member + ) AS aaa + GROUP BY + h_red, h_blue, h_green, h_yellow, h_black, h_white, h_orange, h_purple, h_none, + h_red_loc, h_blue_loc, h_green_loc, h_yellow_loc, h_black_loc, h_white_loc, h_orange_loc, h_purple_loc, h_none_loc, + b_red, b_blue, b_green, b_yellow, b_black, b_white, b_orange, b_purple, b_none, + s_red, s_blue, s_green, s_yellow, s_black, s_white, s_orange, s_purple, s_none, + r_red, r_blue, r_green, r_yellow, r_black, r_white, r_orange, r_purple, r_none, + off1, off2, refs1, refs2 + `; +}; + +export async function initIcons() { + const [horseSvg, skiSvg] = await Promise.all([ + fs.readFile("images/horse.svg", { encoding: "utf8" }), + fs.readFile("images/ski.svg", { encoding: "utf8" }), + ]); + + return Promise.all( + Object.entries(colorMap).map(([color, colorValue]) => + Promise.all([ + // TODO u + fs.writeFile(path.resolve(tmpdir(), `ski-${color}.svg`), String(skiSvg).replaceAll("#ff00ff", colorValue)), + fs.writeFile(path.resolve(tmpdir(), `horse-${color}.svg`), String(horseSvg).replaceAll("#ff00ff", colorValue)), + ]) + ) + ); +} + +type Props = { + glows: boolean; + types: string[]; // 'hiking' or combination of ['bicycle', 'ski'] +}; + +function RouteStyles({ glows, types }: Props) { + const isHiking = types.includes("hiking"); + const isBicycle = types.includes("bicycle"); + const isSki = types.includes("ski"); + const isHorse = types.includes("horse"); + + return [0, 1, 2].flatMap((zoomVar) => { + const zoomParams = zoomVar === 0 ? { maxZoom: 11 } : zoomVar === 1 ? { minZoom: 12, maxZoom: 12 } : { minZoom: 13 }; + const zo = [1, 2, 3][zoomVar]; + const wf = [1.5, 1.5, 2][zoomVar]; + + const df = 1.25; + + const glowStyle = { + stroke: "white" as const, + strokeLinejoin: "round" as const, + strokeLinecap: "butt" as const, + strokeOpacity: 0.33, + }; + + return ( + <> + {Object.entries(colorMap).map(([color, colorValue]) => { + const elements: JSX.Element[] = []; + + // (maybe) order of route types influences drawing order (last = highest prio) + + if (isHorse) { + const offset = `(${zo} + ([r_${color}] - 1) * ${wf} * ${df}) + 0.5`; + + elements.push( + 0`} {...zoomParams}> + { + glows ? ( + + ) : ( + + ) + + // + } + + ); + } + + if (isSki) { + const offset = `-(${zo} + ([s_${color}] - 1) * ${wf * 2}) - 1`; + + elements.push( + 0`} {...zoomParams}> + { + glows ? ( + + ) : ( + + ) + + // + } + + ); + } + + if (isBicycle && !glows) { + elements.push( + 0`} {...zoomParams}> + + + ); + } + + if (isHiking) { + const o1 = `${zo} + ([h_${color}] - 1) * ${wf} * ${df} + 0.5`; + + // major hiking + elements.push( + 0`} {...zoomParams}> + {glows ? ( + + ) : ( + + )} + + ); + + const o2 = `${zo} + ([h_${color}_loc] - 1) * ${wf} * ${df} + 0.5`; + + // local hiking + elements.push( + 0`} {...zoomParams}> + {glows ? ( + + ) : ( + + )} + + ); + + return elements; + } + })} + + ); + }); +} + +export function Routes(routeProps: RouteProps) { + return ( + <> + {(() => { + const x: string[] = []; + + if (routeProps.hikingTrails) { + x.push("hiking"); + } + + if (routeProps.bicycleTrails) { + x.push("bicycle"); + } + + if (routeProps.skiTrails) { + x.push("ski"); + } + + if (routeProps.horseTrails) { + x.push("horse"); + } + + return x.length > 0 ? ( + <> + + + + + ) : undefined; + })()} + + + + + + + + + + + + ); +} + +export function RouteNames(routeProps: RouteProps) { + return ( + <> + + + + + ); +} diff --git a/style/utils.ts b/style/utils.ts new file mode 100644 index 0000000..f88a778 --- /dev/null +++ b/style/utils.ts @@ -0,0 +1,37 @@ +export function seq(from: number, toIncl: number) { + return Array.from({ length: toIncl + 1 - from }, (_, i) => i + from); +} + +export function types(...type: string[]) { + return type.map((x) => `[type] = '${x.replace("'", "\\'")}'`).join(" or "); +} + +export const zoomDenoms = [ + 1000000000, + 500000000, + 200000000, + 100000000, + 50000000, + 25000000, + 12500000, + 6500000, + 3000000, + 1500000, + 750000, // 10 + 400000, + 200000, + 100000, + 50000, + 25000, + 12500, + 5000, + 2500, + 1500, + 750, // 20 + 500, + 250, + 100, + 50, + 25, + 12.5, +]; diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..f95fb71 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "display": "Node 18", + "compilerOptions": { + "lib": ["es2022"], + "module": "commonjs", + "target": "es2022", + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "moduleResolution": "node", + "sourceMap": true, + "outDir": "dist", + "baseUrl": ".", + "jsx": "react-jsx", + "jsxImportSource": "jsxnik", + "allowJs": true + }, + "include": ["index.ts", "legend.ts", "style/**/*"] +}