@prushforth/map 1.0.0-preview.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +89 -0
- package/demo/index.html +78 -0
- package/dist/cjs/AttributionButton-DgbgLHy4.js +106 -0
- package/dist/cjs/MapTileLayer-D4vp8bR4.js +454 -0
- package/dist/cjs/app-globals-DY--Q2Nl.js +775 -0
- package/dist/cjs/calculatePosition-CDcdNl7C.js +92 -0
- package/dist/cjs/gcds-ext-map.cjs.js +47 -0
- package/dist/cjs/gcds-ext-map_2.cjs.entry.js +8081 -0
- package/dist/cjs/index-CW_WOSnc.js +32697 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +14 -0
- package/dist/cjs/locale-_4nEyxeO.js +153 -0
- package/dist/cjs/map-a.cjs.entry.js +16 -0
- package/dist/cjs/map-caption.cjs.entry.js +55 -0
- package/dist/cjs/map-extent.cjs.entry.js +993 -0
- package/dist/cjs/map-feature.cjs.entry.js +636 -0
- package/dist/cjs/map-featurecaption.cjs.entry.js +14 -0
- package/dist/cjs/map-geometry.cjs.entry.js +36 -0
- package/dist/cjs/map-input.cjs.entry.js +348 -0
- package/dist/cjs/map-link.cjs.entry.js +6055 -0
- package/dist/cjs/map-meta.cjs.entry.js +40 -0
- package/dist/cjs/map-properties.cjs.entry.js +14 -0
- package/dist/cjs/map-select.cjs.entry.js +100 -0
- package/dist/cjs/map-span.cjs.entry.js +14 -0
- package/dist/cjs/map-style.cjs.entry.js +127 -0
- package/dist/cjs/map-tile.cjs.entry.js +274 -0
- package/dist/cjs/renderStyles-yOMXvf12.js +59 -0
- package/dist/collection/assets/canada.json +1 -0
- package/dist/collection/assets/images/w3community.ico +0 -0
- package/dist/collection/assets/mapml/en/apstile/arctic +18 -0
- package/dist/collection/assets/mapml/en/cbmtile/canvec +22 -0
- package/dist/collection/assets/mapml/en/cbmtile/cbmt +24 -0
- package/dist/collection/assets/mapml/en/cbmtile/cbmtgeom +20 -0
- package/dist/collection/assets/mapml/en/cbmtile/cbmtsimple +20 -0
- package/dist/collection/assets/mapml/en/cbmtile/current_conditions +33 -0
- package/dist/collection/assets/mapml/en/cbmtile/toporama +25 -0
- package/dist/collection/assets/mapml/en/custom/arcticsdi.mapml +18 -0
- package/dist/collection/assets/mapml/en/osmtile/cbmt +24 -0
- package/dist/collection/assets/mapml/en/osmtile/current_conditions +32 -0
- package/dist/collection/assets/mapml/en/osmtile/dark.mapml +19 -0
- package/dist/collection/assets/mapml/en/osmtile/light.mapml +19 -0
- package/dist/collection/assets/mapml/en/osmtile/osm +19 -0
- package/dist/collection/assets/mapml/en/osmtile/toporama +25 -0
- package/dist/collection/assets/mapml/fr/apstile/arctic +19 -0
- package/dist/collection/assets/mapml/fr/cbmtile/canvec +22 -0
- package/dist/collection/assets/mapml/fr/cbmtile/cbmt +24 -0
- package/dist/collection/assets/mapml/fr/cbmtile/cbmtgeom +20 -0
- package/dist/collection/assets/mapml/fr/cbmtile/cbmtsimple +20 -0
- package/dist/collection/assets/mapml/fr/cbmtile/current_conditions +25 -0
- package/dist/collection/assets/mapml/fr/cbmtile/toporama +25 -0
- package/dist/collection/assets/mapml/fr/osmtile/cbmt +24 -0
- package/dist/collection/assets/mapml/fr/osmtile/current_conditions +24 -0
- package/dist/collection/assets/mapml/fr/osmtile/dark.mapml +19 -0
- package/dist/collection/assets/mapml/fr/osmtile/light.mapml +19 -0
- package/dist/collection/assets/mapml/fr/osmtile/osm +19 -0
- package/dist/collection/assets/mapml/fr/osmtile/toporama +25 -0
- package/dist/collection/assets/pmtiles/darkTheme.js +19 -0
- package/dist/collection/assets/pmtiles/lightTheme.js +19 -0
- package/dist/collection/collection-manifest.json +28 -0
- package/dist/collection/components/gcds-ext-map/assets/pmtiles/darkTheme.js +19 -0
- package/dist/collection/components/gcds-ext-map/assets/pmtiles/lightTheme.js +19 -0
- package/dist/collection/components/gcds-ext-map/gcds-ext-map.css +2138 -0
- package/dist/collection/components/gcds-ext-map/gcds-ext-map.js +1517 -0
- package/dist/collection/components/gcds-ext-map/stories/gcds-ext-map.stories.js +367 -0
- package/dist/collection/components/map-a/map-a.js +89 -0
- package/dist/collection/components/map-caption/map-caption.js +52 -0
- package/dist/collection/components/map-extent/map-extent.js +809 -0
- package/dist/collection/components/map-feature/map-feature.js +724 -0
- package/dist/collection/components/map-featurecaption/map-featurecaption.js +6 -0
- package/dist/collection/components/map-geometry/map-geometry.js +57 -0
- package/dist/collection/components/map-input/map-input.js +355 -0
- package/dist/collection/components/map-layer/map-layer.js +1245 -0
- package/dist/collection/components/map-layer/stories/map-layer.stories.js +101 -0
- package/dist/collection/components/map-link/map-link.js +1149 -0
- package/dist/collection/components/map-meta/map-meta.js +82 -0
- package/dist/collection/components/map-properties/map-properties.js +7 -0
- package/dist/collection/components/map-select/map-select.js +145 -0
- package/dist/collection/components/map-span/map-span.js +7 -0
- package/dist/collection/components/map-style/map-style.js +144 -0
- package/dist/collection/components/map-tile/map-tile.js +370 -0
- package/dist/collection/components/utils/mapml/DOMTokenList.js +123 -0
- package/dist/collection/components/utils/mapml/DefaultMapOptions.js +11 -0
- package/dist/collection/components/utils/mapml/Util.js +1601 -0
- package/dist/collection/components/utils/mapml/control/AttributionButton.js +101 -0
- package/dist/collection/components/utils/mapml/control/FullscreenButton.js +181 -0
- package/dist/collection/components/utils/mapml/control/GeolocationButton.js +70 -0
- package/dist/collection/components/utils/mapml/control/LayerControl.js +212 -0
- package/dist/collection/components/utils/mapml/control/ReloadButton.js +75 -0
- package/dist/collection/components/utils/mapml/control/ScaleBar.js +108 -0
- package/dist/collection/components/utils/mapml/control/SearchButton.js +565 -0
- package/dist/collection/components/utils/mapml/elementSupport/extents/createLayerControlForExtent.js +259 -0
- package/dist/collection/components/utils/mapml/elementSupport/inputs/heightInput.js +18 -0
- package/dist/collection/components/utils/mapml/elementSupport/inputs/hiddenInput.js +19 -0
- package/dist/collection/components/utils/mapml/elementSupport/inputs/locationInput.js +127 -0
- package/dist/collection/components/utils/mapml/elementSupport/inputs/widthInput.js +18 -0
- package/dist/collection/components/utils/mapml/elementSupport/inputs/zoomInput.js +30 -0
- package/dist/collection/components/utils/mapml/elementSupport/layers/calculatePosition.js +88 -0
- package/dist/collection/components/utils/mapml/elementSupport/layers/createLayerControlForLayer.js +326 -0
- package/dist/collection/components/utils/mapml/elementSupport/layers/renderStyles.js +55 -0
- package/dist/collection/components/utils/mapml/elementSupport/viewers/matchMedia.js +251 -0
- package/dist/collection/components/utils/mapml/features/featureRenderer.js +342 -0
- package/dist/collection/components/utils/mapml/features/geometry.js +268 -0
- package/dist/collection/components/utils/mapml/features/path.js +485 -0
- package/dist/collection/components/utils/mapml/handlers/AnnounceMovement.js +154 -0
- package/dist/collection/components/utils/mapml/handlers/ContextMenu.js +1436 -0
- package/dist/collection/components/utils/mapml/handlers/FeatureIndex.js +116 -0
- package/dist/collection/components/utils/mapml/handlers/QueryHandler.js +476 -0
- package/dist/collection/components/utils/mapml/handlers/keyboard.js +60 -0
- package/dist/collection/components/utils/mapml/layers/Crosshair.js +108 -0
- package/dist/collection/components/utils/mapml/layers/DebugOverlay.js +357 -0
- package/dist/collection/components/utils/mapml/layers/FeatureIndexOverlay.js +239 -0
- package/dist/collection/components/utils/mapml/layers/ImageLayer.js +136 -0
- package/dist/collection/components/utils/mapml/layers/MapExtentLayer.js +114 -0
- package/dist/collection/components/utils/mapml/layers/MapFeatureLayer.js +623 -0
- package/dist/collection/components/utils/mapml/layers/MapLayer.js +640 -0
- package/dist/collection/components/utils/mapml/layers/MapTileLayer.js +450 -0
- package/dist/collection/components/utils/mapml/layers/TemplatedFeaturesOrTilesLayer.js +346 -0
- package/dist/collection/components/utils/mapml/layers/TemplatedImageLayer.js +276 -0
- package/dist/collection/components/utils/mapml/layers/TemplatedPMTilesLayer.js +135 -0
- package/dist/collection/components/utils/mapml/layers/TemplatedTileLayer.js +664 -0
- package/dist/collection/components/utils/utils.js +26 -0
- package/dist/collection/fonts/icons/LICENSE.txt +92 -0
- package/dist/collection/fonts/icons/README.md +543 -0
- package/dist/collection/fonts/icons/gcds-icons.css +110 -0
- package/dist/collection/fonts/icons/gcds-icons.eot +0 -0
- package/dist/collection/fonts/icons/gcds-icons.svg +82 -0
- package/dist/collection/fonts/icons/gcds-icons.ttf +0 -0
- package/dist/collection/fonts/icons/gcds-icons.woff +0 -0
- package/dist/collection/fonts/lato/LICENSE.txt +48 -0
- package/dist/collection/fonts/lato/README.md +195 -0
- package/dist/collection/fonts/lato/gcds-lato-italic.woff +0 -0
- package/dist/collection/fonts/lato/gcds-lato-italic.woff2 +0 -0
- package/dist/collection/fonts/lato/gcds-lato.css +30 -0
- package/dist/collection/fonts/lato/gcds-lato.woff +0 -0
- package/dist/collection/fonts/lato/gcds-lato.woff2 +0 -0
- package/dist/collection/fonts/noto-sans/LICENSE.txt +43 -0
- package/dist/collection/fonts/noto-sans/README.md +423 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-bold-italic.woff +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-bold-italic.woff2 +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-bold.woff +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-bold.woff2 +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-light-italic.woff +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-light-italic.woff2 +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-light.woff +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-light.woff2 +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-medium-italic.woff +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-medium-italic.woff2 +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-medium.woff +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-medium.woff2 +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-regular-italic.woff +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-regular-italic.woff2 +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-regular.woff +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-regular.woff2 +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-semibold-italic.woff +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-semibold-italic.woff2 +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-semibold.woff +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-semibold.woff2 +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans.css +89 -0
- package/dist/collection/fonts/noto-sans-mono/LICENSE.txt +93 -0
- package/dist/collection/fonts/noto-sans-mono/README.md +135 -0
- package/dist/collection/fonts/noto-sans-mono/gcds-noto-sans-mono.css +17 -0
- package/dist/collection/fonts/noto-sans-mono/gcds-noto-sans-mono.woff +0 -0
- package/dist/collection/fonts/noto-sans-mono/gcds-noto-sans-mono.woff2 +0 -0
- package/dist/collection/generated/locale.js +148 -0
- package/dist/collection/global/mapml-globals.js +916 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/leaflet-src.esm.js +14419 -0
- package/dist/components/gcds-ext-map.d.ts +11 -0
- package/dist/components/gcds-ext-map.js +10 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/components/index.js +1 -0
- package/dist/components/map-a.d.ts +11 -0
- package/dist/components/map-a.js +1 -0
- package/dist/components/map-caption.d.ts +11 -0
- package/dist/components/map-caption.js +1 -0
- package/dist/components/map-extent.d.ts +11 -0
- package/dist/components/map-extent.js +1 -0
- package/dist/components/map-feature.d.ts +11 -0
- package/dist/components/map-feature.js +1 -0
- package/dist/components/map-featurecaption.d.ts +11 -0
- package/dist/components/map-featurecaption.js +1 -0
- package/dist/components/map-geometry.d.ts +11 -0
- package/dist/components/map-geometry.js +1 -0
- package/dist/components/map-input.d.ts +11 -0
- package/dist/components/map-input.js +1 -0
- package/dist/components/map-layer.d.ts +11 -0
- package/dist/components/map-layer.js +1 -0
- package/dist/components/map-link.d.ts +11 -0
- package/dist/components/map-link.js +1 -0
- package/dist/components/map-meta.d.ts +11 -0
- package/dist/components/map-meta.js +1 -0
- package/dist/components/map-properties.d.ts +11 -0
- package/dist/components/map-properties.js +1 -0
- package/dist/components/map-select.d.ts +11 -0
- package/dist/components/map-select.js +1 -0
- package/dist/components/map-span.d.ts +11 -0
- package/dist/components/map-span.js +1 -0
- package/dist/components/map-style.d.ts +11 -0
- package/dist/components/map-style.js +1 -0
- package/dist/components/map-tile.d.ts +11 -0
- package/dist/components/map-tile.js +1 -0
- package/dist/components/p-B4YLD_Og.js +1 -0
- package/dist/components/p-BE41zrui.js +1 -0
- package/dist/components/p-Bpv_U_Lb.js +1 -0
- package/dist/components/p-CwRxGZga.js +5 -0
- package/dist/components/p-EYVT9Efh.js +1 -0
- package/dist/components/p-gwC_yeRa.js +1 -0
- package/dist/esm/AttributionButton-CfaoSLCu.js +103 -0
- package/dist/esm/MapTileLayer-DvC_iOIS.js +451 -0
- package/dist/esm/app-globals-De5ze2BD.js +773 -0
- package/dist/esm/calculatePosition-B4YLD_Og.js +90 -0
- package/dist/esm/gcds-ext-map.js +43 -0
- package/dist/esm/gcds-ext-map_2.entry.js +8078 -0
- package/dist/esm/index-BUsJ7i5g.js +32656 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +12 -0
- package/dist/esm/locale-Bpv_U_Lb.js +150 -0
- package/dist/esm/map-a.entry.js +14 -0
- package/dist/esm/map-caption.entry.js +53 -0
- package/dist/esm/map-extent.entry.js +991 -0
- package/dist/esm/map-feature.entry.js +634 -0
- package/dist/esm/map-featurecaption.entry.js +12 -0
- package/dist/esm/map-geometry.entry.js +34 -0
- package/dist/esm/map-input.entry.js +346 -0
- package/dist/esm/map-link.entry.js +6035 -0
- package/dist/esm/map-meta.entry.js +38 -0
- package/dist/esm/map-properties.entry.js +12 -0
- package/dist/esm/map-select.entry.js +98 -0
- package/dist/esm/map-span.entry.js +12 -0
- package/dist/esm/map-style.entry.js +125 -0
- package/dist/esm/map-tile.entry.js +272 -0
- package/dist/esm/renderStyles-EYVT9Efh.js +57 -0
- package/dist/gcds-ext-map/assets/canada.json +1 -0
- package/dist/gcds-ext-map/assets/images/w3community.ico +0 -0
- package/dist/gcds-ext-map/assets/mapml/en/apstile/arctic +18 -0
- package/dist/gcds-ext-map/assets/mapml/en/cbmtile/canvec +22 -0
- package/dist/gcds-ext-map/assets/mapml/en/cbmtile/cbmt +24 -0
- package/dist/gcds-ext-map/assets/mapml/en/cbmtile/cbmtgeom +20 -0
- package/dist/gcds-ext-map/assets/mapml/en/cbmtile/cbmtsimple +20 -0
- package/dist/gcds-ext-map/assets/mapml/en/cbmtile/current_conditions +33 -0
- package/dist/gcds-ext-map/assets/mapml/en/cbmtile/toporama +25 -0
- package/dist/gcds-ext-map/assets/mapml/en/custom/arcticsdi.mapml +18 -0
- package/dist/gcds-ext-map/assets/mapml/en/osmtile/cbmt +24 -0
- package/dist/gcds-ext-map/assets/mapml/en/osmtile/current_conditions +32 -0
- package/dist/gcds-ext-map/assets/mapml/en/osmtile/dark.mapml +19 -0
- package/dist/gcds-ext-map/assets/mapml/en/osmtile/light.mapml +19 -0
- package/dist/gcds-ext-map/assets/mapml/en/osmtile/osm +19 -0
- package/dist/gcds-ext-map/assets/mapml/en/osmtile/toporama +25 -0
- package/dist/gcds-ext-map/assets/mapml/fr/apstile/arctic +19 -0
- package/dist/gcds-ext-map/assets/mapml/fr/cbmtile/canvec +22 -0
- package/dist/gcds-ext-map/assets/mapml/fr/cbmtile/cbmt +24 -0
- package/dist/gcds-ext-map/assets/mapml/fr/cbmtile/cbmtgeom +20 -0
- package/dist/gcds-ext-map/assets/mapml/fr/cbmtile/cbmtsimple +20 -0
- package/dist/gcds-ext-map/assets/mapml/fr/cbmtile/current_conditions +25 -0
- package/dist/gcds-ext-map/assets/mapml/fr/cbmtile/toporama +25 -0
- package/dist/gcds-ext-map/assets/mapml/fr/osmtile/cbmt +24 -0
- package/dist/gcds-ext-map/assets/mapml/fr/osmtile/current_conditions +24 -0
- package/dist/gcds-ext-map/assets/mapml/fr/osmtile/dark.mapml +19 -0
- package/dist/gcds-ext-map/assets/mapml/fr/osmtile/light.mapml +19 -0
- package/dist/gcds-ext-map/assets/mapml/fr/osmtile/osm +19 -0
- package/dist/gcds-ext-map/assets/mapml/fr/osmtile/toporama +25 -0
- package/dist/gcds-ext-map/assets/pmtiles/darkTheme.js +19 -0
- package/dist/gcds-ext-map/assets/pmtiles/lightTheme.js +19 -0
- package/dist/gcds-ext-map/fonts/icons/LICENSE.txt +92 -0
- package/dist/gcds-ext-map/fonts/icons/README.md +543 -0
- package/dist/gcds-ext-map/fonts/icons/gcds-icons.css +110 -0
- package/dist/gcds-ext-map/fonts/icons/gcds-icons.eot +0 -0
- package/dist/gcds-ext-map/fonts/icons/gcds-icons.svg +82 -0
- package/dist/gcds-ext-map/fonts/icons/gcds-icons.ttf +0 -0
- package/dist/gcds-ext-map/fonts/icons/gcds-icons.woff +0 -0
- package/dist/gcds-ext-map/fonts/lato/LICENSE.txt +48 -0
- package/dist/gcds-ext-map/fonts/lato/README.md +195 -0
- package/dist/gcds-ext-map/fonts/lato/gcds-lato-italic.woff +0 -0
- package/dist/gcds-ext-map/fonts/lato/gcds-lato-italic.woff2 +0 -0
- package/dist/gcds-ext-map/fonts/lato/gcds-lato.css +30 -0
- package/dist/gcds-ext-map/fonts/lato/gcds-lato.woff +0 -0
- package/dist/gcds-ext-map/fonts/lato/gcds-lato.woff2 +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/LICENSE.txt +43 -0
- package/dist/gcds-ext-map/fonts/noto-sans/README.md +423 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-bold-italic.woff +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-bold-italic.woff2 +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-bold.woff +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-bold.woff2 +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-light-italic.woff +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-light-italic.woff2 +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-light.woff +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-light.woff2 +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-medium-italic.woff +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-medium-italic.woff2 +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-medium.woff +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-medium.woff2 +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-regular-italic.woff +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-regular-italic.woff2 +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-regular.woff +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-regular.woff2 +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-semibold-italic.woff +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-semibold-italic.woff2 +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-semibold.woff +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-semibold.woff2 +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans.css +89 -0
- package/dist/gcds-ext-map/fonts/noto-sans-mono/LICENSE.txt +93 -0
- package/dist/gcds-ext-map/fonts/noto-sans-mono/README.md +135 -0
- package/dist/gcds-ext-map/fonts/noto-sans-mono/gcds-noto-sans-mono.css +17 -0
- package/dist/gcds-ext-map/fonts/noto-sans-mono/gcds-noto-sans-mono.woff +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans-mono/gcds-noto-sans-mono.woff2 +0 -0
- package/dist/gcds-ext-map/gcds-ext-map.esm.js +1 -0
- package/dist/gcds-ext-map/index.esm.js +0 -0
- package/dist/gcds-ext-map/leaflet-src.esm.js +14419 -0
- package/dist/gcds-ext-map/p-1b22f774.entry.js +1 -0
- package/dist/gcds-ext-map/p-29b4ba34.entry.js +1 -0
- package/dist/gcds-ext-map/p-2dd09d44.entry.js +1 -0
- package/dist/gcds-ext-map/p-3fef47e5.entry.js +1 -0
- package/dist/gcds-ext-map/p-4e324a1d.entry.js +1 -0
- package/dist/gcds-ext-map/p-4f4a6873.entry.js +1 -0
- package/dist/gcds-ext-map/p-9cc5ad37.entry.js +1 -0
- package/dist/gcds-ext-map/p-9edfea7d.entry.js +1 -0
- package/dist/gcds-ext-map/p-B4YLD_Og.js +1 -0
- package/dist/gcds-ext-map/p-B8Id5Ptd.js +1 -0
- package/dist/gcds-ext-map/p-BUsJ7i5g.js +6 -0
- package/dist/gcds-ext-map/p-Bpv_U_Lb.js +1 -0
- package/dist/gcds-ext-map/p-CtOuMgy9.js +1 -0
- package/dist/gcds-ext-map/p-Dd474fsL.js +1 -0
- package/dist/gcds-ext-map/p-EYVT9Efh.js +1 -0
- package/dist/gcds-ext-map/p-a67d721d.entry.js +1 -0
- package/dist/gcds-ext-map/p-b16e862b.entry.js +1 -0
- package/dist/gcds-ext-map/p-b9cbf1e0.entry.js +10 -0
- package/dist/gcds-ext-map/p-cab5246e.entry.js +1 -0
- package/dist/gcds-ext-map/p-d58d409b.entry.js +1 -0
- package/dist/gcds-ext-map/p-dfa21368.entry.js +1 -0
- package/dist/gcds-ext-map/p-f211048a.entry.js +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/components/gcds-ext-map/gcds-ext-map.d.ts +125 -0
- package/dist/types/components/gcds-ext-map/stories/gcds-ext-map.stories.d.ts +230 -0
- package/dist/types/components/map-a/map-a.d.ts +7 -0
- package/dist/types/components/map-caption/map-caption.d.ts +7 -0
- package/dist/types/components/map-extent/map-extent.d.ts +53 -0
- package/dist/types/components/map-feature/map-feature.d.ts +50 -0
- package/dist/types/components/map-featurecaption/map-featurecaption.d.ts +3 -0
- package/dist/types/components/map-geometry/map-geometry.d.ts +7 -0
- package/dist/types/components/map-input/map-input.d.ts +24 -0
- package/dist/types/components/map-layer/map-layer.d.ts +85 -0
- package/dist/types/components/map-layer/stories/map-layer.stories.d.ts +96 -0
- package/dist/types/components/map-link/map-link.d.ts +66 -0
- package/dist/types/components/map-meta/map-meta.d.ts +11 -0
- package/dist/types/components/map-properties/map-properties.d.ts +3 -0
- package/dist/types/components/map-select/map-select.d.ts +13 -0
- package/dist/types/components/map-span/map-span.d.ts +5 -0
- package/dist/types/components/map-style/map-style.d.ts +17 -0
- package/dist/types/components/map-tile/map-tile.d.ts +32 -0
- package/dist/types/components/utils/mapml/DOMTokenList.d.ts +30 -0
- package/dist/types/components/utils/mapml/elementSupport/inputs/heightInput.d.ts +7 -0
- package/dist/types/components/utils/mapml/elementSupport/inputs/hiddenInput.d.ts +7 -0
- package/dist/types/components/utils/mapml/elementSupport/inputs/locationInput.d.ts +14 -0
- package/dist/types/components/utils/mapml/elementSupport/inputs/widthInput.d.ts +7 -0
- package/dist/types/components/utils/mapml/elementSupport/inputs/zoomInput.d.ts +11 -0
- package/dist/types/components/utils/mapml/layers/MapLayer.d.ts +69 -0
- package/dist/types/components/utils/utils.d.ts +2 -0
- package/dist/types/components.d.ts +521 -0
- package/dist/types/gcds-ext-map.d.ts +17 -0
- package/dist/types/generated/locale.d.ts +146 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/stencil-public-runtime.d.ts +1861 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +87 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={cmBack:"Back",cmForward:"Forward",cmReload:"Reload",cmToggleControls:"Toggle Controls",cmCopyCoords:"Copy",cmToggleDebug:"Toggle Debug Mode",cmCopyMapML:"Map",cmCopyExtent:"Extent",cmCopyLocation:"Location",cmPasteLayer:"Paste",cmViewSource:"View Map Source",lmZoomToLayer:"Zoom To Layer",lmCopyLayer:"Copy Layer",lmLayerSettings:"Layer Settings",lmRemoveLayer:"Remove Layer",lmZoomToExtent:"Zoom To Sub-layer",lmCopyExtent:"Copy Sub-layer",lmExtentSettings:"Sub-layer Settings",lmRemoveExtent:"Remove Sub-layer",lmStyle:"Style",lcOpacity:"Opacity",btnZoomIn:"Zoom in",btnZoomOut:"Zoom out",btnSearch:"Search",btnSearchClose:"Close search",searchPlaceholder:"Search…",searchResultWithNoName:"Unnamed",btnAttribution:"Map data attribution",btnFullScreen:"View fullscreen",btnExitFullScreen:"Exit fullscreen",btnLocTrackOn:"Show my location - location tracking on",btnMyLocTrackOn:"My current location, shown on map",btnLocTrackOff:"Show my location - location tracking off",btnMyLastKnownLocTrackOn:"My last known location, shown on map",btnLocTrackLastKnown:"Show my location - last known location shown",btnFocusMap:"Focus Map",btnFocusControls:"Focus Controls",btnPrevFeature:"Previous Feature",btnNextFeature:"Next Feature",amZoom:"zoom level",amColumn:"column",amRow:"row",amMaxZoom:"At maximum zoom level, zoom in disabled",amMinZoom:"At minimum zoom level, zoom out disabled",amZoomedOut:"Zoomed out of bounds, returning to",amDraggedOut:"Dragged out of bounds, returning to",amEastBound:"Reached east bound, panning east disabled",amWestBound:"Reached west bound, panning west disabled",amNorthBound:"Reached north bound, panning north disabled",amSouthBound:"Reached south bound, panning south disabled",kbdShortcuts:"Keyboard shortcuts",kbdMovement:"Movement keys",kbdFeature:"Feature navigation keys",kbdPanUp:"Pan up",kbdPanDown:"Pan down",kbdPanLeft:"Pan left",kbdPanRight:"Pan right",kbdPanIncrement:"pan increment",kbdZoom:"Zoom in/out 3 levels",kbdFocusMap:"Focus map",kbdFocusControls:"Focus controls",kbdPrevFeature:"Previous feature",kbdNextFeature:"Next feature",dfLayer:"Layer",dfExtent:"Sub-layer",dfPastedLayer:"Pasted Layer",dfFeatureCaption:"Feature",popupZoom:"Zoom to here",popupPropName:"Property name",popupPropValue:"Property value",fIndexNoFeatures:"No features found"},o={cmBack:"Retour",cmForward:"Vers l'avant",cmReload:"Rechargez",cmToggleControls:"Basculer les contrôles",cmCopyCoords:"Copie",cmToggleDebug:"Basculer le mode de débogage",cmCopyMapML:"Carte",cmCopyExtent:"Étendue",cmCopyLocation:"Localisation",cmPasteLayer:"Coller",cmViewSource:"Voir la source de la carte",lmZoomToLayer:"Zoomer sur la couche",lmCopyLayer:"Copier (la couche)",lmLayerSettings:"Paramètres de la couche",lmRemoveLayer:"Supprimer la couche",lmZoomToExtent:"Zoomer sur la sous-couche",lmCopyExtent:"Copier (la sous-couche)",lmExtentSettings:"Paramètres de la sous-couche",lmRemoveExtent:"Supprimer la sous-couche",lmStyle:"Style",lcOpacity:"Opacité",btnZoomIn:"Zoomer",btnZoomOut:"Dézoomer",btnSearch:"Rechercher",btnSearchClose:"Fermer la recherche",searchPlaceholder:"Rechercher…",searchResultWithNoName:"Sans nom",btnAttribution:"Attribution des données cartographiques",btnFullScreen:"Affichage plein écran",btnExitFullScreen:"Quitter le plein écran",btnLocTrackOn:"Afficher ma position - suivi de la position activé",btnMyLocTrackOn:"Ma position actuelle, affichée sur la carte",btnLocTrackOff:"Afficher ma position - suivi de la position désactivé",btnMyLastKnownLocTrackOn:"Ma dernière position connue, indiquée sur la carte",btnLocTrackLastKnown:"Afficher ma position - dernière position connue affichée",btnFocusMap:"Carte Focus",btnFocusControls:"Contrôles de Mise au Point",btnPrevFeature:"Fonctionnalité Précédente",btnNextFeature:"Fonctionnalité Suivante",amZoom:"Niveau de zoom",amColumn:"Colonne",amRow:"Rangée",amMaxZoom:"Au niveau de zoom maximal, le zoom avant est désactivé",amMinZoom:"Niveau de zoom minimum, le zoom arrière désactivé",amZoomedOut:"Zoomé en dehors des limites, retour à",amDraggedOut:"Traîné hors des limites, retour à",amEastBound:"Atteint la limite est, déplacement ver l'est désactivé",amWestBound:"Atteint la limite ouest, déplacement ver l'ouest désactivé",amNorthBound:"Atteint la limite nord, déplacement vers le nord désactivé",amSouthBound:"Atteint la limite sud, déplacement vers le sud désactivé",kbdShortcuts:"Raccourcis clavier",kbdMovement:"Touches de mouvement",kbdFeature:"Touches de navigation dans les éléments géographiques",kbdPanUp:"Panoramique vers le haut",kbdPanDown:"Panoramique en bas",kbdPanLeft:"Panoramique vers la gauche",kbdPanRight:"Panoramique vers la droite",kbdPanIncrement:"Incrémenter le panoramique",kbdZoom:"Zoom avant/arrière 3 niveaux",kbdFocusMap:"Centrer la cartehow a",kbdFocusControls:"Centrer les contrôles",kbdPrevFeature:"Élément géographique précédente",kbdNextFeature:"Élément géographique suivante",dfLayer:"Couche",dfExtent:"Sous-couche",dfPastedLayer:"Couche collée",dfFeatureCaption:"Élément géographique",popupZoom:"Zoomer ici",popupPropName:"Nom de la propriété",popupPropValue:"Valeur de la propriété",fIndexNoFeatures:"Aucun élément géographique trouvé"};export{e as a,o as l}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as t}from"./p-BUsJ7i5g.js";var i=t.Control.Attribution.extend({_getLocale:function(){return this.options.mapEl&&this.options.mapEl.locale?this.options.mapEl.locale:M.options.locale},onAdd:function(i){for(var s in i.attributionControl=this,this._container=t.DomUtil.create("details","leaflet-control-attribution"),t.DomEvent.disableClickPropagation(this._container),i._layers)i._layers[s].getAttribution&&this.addAttribution(i._layers[s].getAttribution());this._update(),i.on("layeradd",this._addAttribution,this);let u=document.createElement("dialog");u.setAttribute("class","shortcuts-dialog"),u.setAttribute("autofocus",""),u.onclick=function(t){t.stopPropagation()};let a=this._getLocale();return u.innerHTML=`<b>${a.kbdShortcuts} </b><button aria-label="Close" onclick='this.parentElement.close()'><span class="gcds-icon-close" aria-hidden="true"></span></button><ul><b>${a.kbdMovement}</b><li><kbd>↑</kbd> ${a.kbdPanUp}</li><li><kbd>↓</kbd> ${a.kbdPanDown}</li><li><kbd>←</kbd> ${a.kbdPanLeft}</li><li><kbd>→</kbd> ${a.kbdPanRight}</li><li><kbd>+</kbd> ${a.btnZoomIn}</li><li><kbd>-</kbd> ${a.btnZoomOut}</li><li><kbd>shift</kbd> + <kbd>←/↑/→/↓</kbd> 3x ${a.kbdPanIncrement}</li><li><kbd>ctrl</kbd> + <kbd>←/↑/→/↓</kbd> 0.2x ${a.kbdPanIncrement}</li><li><kbd>shift</kbd> + <kbd>+/-</kbd> ${a.kbdZoom}</li></ul><ul><b>${a.kbdFeature}</b><li><kbd>←/↑</kbd> ${a.kbdPrevFeature}</li><li><kbd>→/↓</kbd> ${a.kbdNextFeature}</li></ul>`,i._container.appendChild(u),this._container},_update:function(){if(!this._map)return;var t=[];for(var i in this._attributions)this._attributions[i]&&t.push(i);var s=[];this.options.prefix&&s.push(this.options.prefix),t.length&&s.push(t.join(", "));let u=this._getLocale();this._container.innerHTML=`<summary><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" height="30px" viewBox="0 0 24 24" width="30px" fill="currentColor"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"></path></svg></summary><div class="mapml-attribution-container"><button onclick="this.closest('.leaflet-container').querySelector('.shortcuts-dialog').showModal()" class="shortcuts-button mapml-button">${u.kbdShortcuts}</button> | `+s.join(' <span aria-hidden="true">|</span> ')+"</div>",this._container.setAttribute("role","group"),this._container.setAttribute("aria-label",`${u.btnAttribution}`)}});t.Map.mergeOptions({attributionControl:!1,toggleableAttributionControl:!0}),t.Map.addInitHook((function(){this.options.toggleableAttributionControl&&s({mapEl:this.options.mapEl}).addTo(this)}));var s=function(t){const s=t.mapEl&&t.mapEl.closest&&t.mapEl.closest(":lang(fr)")===t.mapEl,u=Object.assign(t,{prefix:`<img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIxMiIgdmlld0JveD0iMCAwIDE1NS4zOCA3NS4wMSI+PHBhdGggZD0iTTAsMCAzNi44NCwwIDM2Ljg0LDc1LjAxIDAsNzUuMDF6IE0xMTguNTQsMCAxNTUuMzgsMCAxNTUuMzgsNzUuMDEgMTE4LjU0LDc1LjAxeiBNNzIuNTgsMTUuNjEsNzcuODQsNC45bDUuMjIsMTAuMzJjLjY1LDEuMDksMS4xOCwxLDIuMjIuNDhsNC40OS0yLjIyTDg2Ljg1LDI3Ljg5Yy0uNjEsMi44MywxLDMuNjYsMi43NSwxLjc0TDk2LDIyLjc5bDEuNywzLjg3Yy41NywxLjE3LDEuNDMsMSwyLjU3Ljc5bDYuNjEtMS4zOS0yLjIyLDguMzUsMCwuMThjLS4yNiwxLjA5LS43OCwyLC40NCwyLjUzbDIuMzUsMS4xN0w5My43Nyw0OS44MmMtMS4zOSwxLjQzLS45MSwxLjg3LS4zOSwzLjQ4bDEuMjYsMy44Ny0xMi43MS0yLjNjLTEuNTctLjM5LTIuNjYtLjM5LTIuNy44N2wuNTIsMTQuNThINzUuOTNsLjUyLTE0LjU0YzAtMS40My0xLjA5LTEuMzktMy42Ni0uODZMNjEsNTcuMThsMS41Mi0zLjg3Yy41Mi0xLjQ4LjY2LTIuNDgtLjUyLTMuNDhMNDguMTEsMzguNDZsMi41Ny0xLjU3Yy43NC0uNTcuNzgtMS4xNy4zOS0yLjQ0TDQ4LjQ2LDI2bDYuNywxLjQzYzEuODcuNDQsMi4zOSwwLDIuODctMWwxLjg3LTMuODNMNjYuNTIsMzBjMS4xNywxLjM5LDIuODMuNDgsMi4zMS0xLjUyTDY1LjY1LDEyLjg2bDQuOTIsMi44M2MuNzguNDgsMS42MS42MSwyLjA5LS4zIiBmaWxsPSIjRUIyRDM3Ii8+PC9zdmc+" style="position: relative; top: 2px" alt="${s?"Système de design du gouvernement du Canada - Cartes":"Government of Canada Design System - Maps"}"> <a href="${s?"https://nrcan.github.io/gcds-ext-map/fr/composants/composants-de-carte/":"https://nrcan.github.io/gcds-ext-map/en/components/map-components/"}">${s?"Système de design GC - Cartes":"GC Design System - Maps"}</a> `});return new i(u)};export{i as AttributionButton,s as attributionButton}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{P as n,l as e,U as t,Q as a,C as r,A as m,F as i}from"./p-BUsJ7i5g.js";import{l as o,a as l}from"./p-Bpv_U_Lb.js";var u={featureIndexOverlayOption:!1,announceMovement:!1,announceScale:{metric:!0,imperial:!1},defaultExtCoor:"pcrs",defaultLocCoor:"gcrs",locale:l,localeFr:o};const s=function(){!function(o,l){let s={};o.M=s,s.mime="text/mapml";let x=l.head.querySelector("map-options");s.options=u,s.options.localeEn=JSON.parse(JSON.stringify(u.locale)),x&&(s.options=Object.assign(s.options,JSON.parse(x.innerHTML))),s.WGS84=new n.CRS("EPSG:4326","+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs ",{origin:[-180,90],bounds:e.bounds([[-180,-90],[180,90]]),resolutions:[.703125,.3515625,.17578125,.087890625,.0439453125,.02197265625,.010986328125,.0054931640625,.00274658203125,.001373291015625,.0006866455078125,.0003433227539062,.0001716613769531,858306884766e-16,429153442383e-16,214576721191e-16,107288360596e-16,53644180298e-16,26822090149e-16,13411045074e-16,6.705522537e-7,3.352761269e-7],crs:{tcrs:{horizontal:{name:"x",min:0,max:n=>Math.round(s.WGS84.options.bounds.getSize().x/s.WGS84.options.resolutions[n])},vertical:{name:"y",min:0,max:n=>Math.round(s.WGS84.options.bounds.getSize().y/s.WGS84.options.resolutions[n])},bounds:n=>e.bounds([s.WGS84.options.crs.tcrs.horizontal.min,s.WGS84.options.crs.tcrs.vertical.min],[s.WGS84.options.crs.tcrs.horizontal.max(n),s.WGS84.options.crs.tcrs.vertical.max(n)])},pcrs:{horizontal:{name:"longitude",get min(){return s.WGS84.options.crs.gcrs.horizontal.min},get max(){return s.WGS84.options.crs.gcrs.horizontal.max}},vertical:{name:"latitude",get min(){return s.WGS84.options.crs.gcrs.vertical.min},get max(){return s.WGS84.options.crs.gcrs.vertical.max}},get bounds(){return s.WGS84.options.bounds}},gcrs:{horizontal:{name:"longitude",min:-180,max:180},vertical:{name:"latitude",min:-90,max:90},get bounds(){return e.latLngBounds([s.WGS84.options.crs.gcrs.vertical.min,s.WGS84.options.crs.gcrs.horizontal.min],[s.WGS84.options.crs.gcrs.vertical.max,s.WGS84.options.crs.gcrs.horizontal.max])}},map:{horizontal:{name:"i",min:0,max:n=>n.getSize().x},vertical:{name:"j",min:0,max:n=>n.getSize().y},bounds:n=>e.bounds(e.point([0,0]),n.getSize())},tile:{horizontal:{name:"i",min:0,max:256},vertical:{name:"j",min:0,max:256},get bounds(){return e.bounds([s.WGS84.options.crs.tile.horizontal.min,s.WGS84.options.crs.tile.vertical.min],[s.WGS84.options.crs.tile.horizontal.max,s.WGS84.options.crs.tile.vertical.max])}},tilematrix:{horizontal:{name:"column",min:0,max:n=>Math.round(s.WGS84.options.crs.tcrs.horizontal.max(n)/s.WGS84.options.crs.tile.bounds.getSize().x)},vertical:{name:"row",min:0,max:n=>Math.round(s.WGS84.options.crs.tcrs.vertical.max(n)/s.WGS84.options.crs.tile.bounds.getSize().y)},bounds:n=>e.bounds([s.WGS84.options.crs.tilematrix.horizontal.min,s.WGS84.options.crs.tilematrix.vertical.min],[s.WGS84.options.crs.tilematrix.horizontal.max(n),s.WGS84.options.crs.tilematrix.vertical.max(n)])}}}),s.CBMTILE=new n.CRS("EPSG:3978","+proj=lcc +lat_1=49 +lat_2=77 +lat_0=49 +lon_0=-95 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs",{origin:[-34655800,3931e4],bounds:e.bounds([[-34655800,-39e6],[1e7,3931e4]]),resolutions:[38364.660062653464,22489.62831258996,13229.193125052918,7937.5158750317505,4630.2175937685215,2645.8386250105837,1587.5031750063501,926.0435187537042,529.1677250021168,317.50063500127004,185.20870375074085,111.12522225044451,66.1459656252646,38.36466006265346,22.48962831258996,13.229193125052918,7.9375158750317505,4.6302175937685215,2.6458386250105836,1.5875031750063502,.9260435187537043,.5291677250021167,.31750063500127,.18520870375074083,.11112522225044451,.06614596562526459],crs:{tcrs:{horizontal:{name:"x",min:0,max:n=>Math.round(s.CBMTILE.options.bounds.getSize().x/s.CBMTILE.options.resolutions[n])},vertical:{name:"y",min:0,max:n=>Math.round(s.CBMTILE.options.bounds.getSize().y/s.CBMTILE.options.resolutions[n])},bounds:n=>e.bounds([s.CBMTILE.options.crs.tcrs.horizontal.min,s.CBMTILE.options.crs.tcrs.vertical.min],[s.CBMTILE.options.crs.tcrs.horizontal.max(n),s.CBMTILE.options.crs.tcrs.vertical.max(n)])},pcrs:{horizontal:{name:"easting",get min(){return s.CBMTILE.options.bounds.min.x},get max(){return s.CBMTILE.options.bounds.max.x}},vertical:{name:"northing",get min(){return s.CBMTILE.options.bounds.min.y},get max(){return s.CBMTILE.options.bounds.max.y}},get bounds(){return s.CBMTILE.options.bounds}},gcrs:{horizontal:{name:"longitude",min:-141.01,max:-47.74},vertical:{name:"latitude",min:40.04,max:86.46},get bounds(){return e.latLngBounds([s.CBMTILE.options.crs.gcrs.vertical.min,s.CBMTILE.options.crs.gcrs.horizontal.min],[s.CBMTILE.options.crs.gcrs.vertical.max,s.CBMTILE.options.crs.gcrs.horizontal.max])}},map:{horizontal:{name:"i",min:0,max:n=>n.getSize().x},vertical:{name:"j",min:0,max:n=>n.getSize().y},bounds:n=>e.bounds(e.point([0,0]),n.getSize())},tile:{horizontal:{name:"i",min:0,max:256},vertical:{name:"j",min:0,max:256},get bounds(){return e.bounds([s.CBMTILE.options.crs.tile.horizontal.min,s.CBMTILE.options.crs.tile.vertical.min],[s.CBMTILE.options.crs.tile.horizontal.max,s.CBMTILE.options.crs.tile.vertical.max])}},tilematrix:{horizontal:{name:"column",min:0,max:n=>Math.round(s.CBMTILE.options.crs.tcrs.horizontal.max(n)/s.CBMTILE.options.crs.tile.bounds.getSize().x)},vertical:{name:"row",min:0,max:n=>Math.round(s.CBMTILE.options.crs.tcrs.vertical.max(n)/s.CBMTILE.options.crs.tile.bounds.getSize().y)},bounds:n=>e.bounds([0,0],[s.CBMTILE.options.crs.tilematrix.horizontal.max(n),s.CBMTILE.options.crs.tilematrix.vertical.max(n)])}}}),s.APSTILE=new n.CRS("EPSG:5936","+proj=stere +lat_0=90 +lat_ts=50 +lon_0=-150 +k=0.994 +x_0=2000000 +y_0=2000000 +datum=WGS84 +units=m +no_defs",{origin:[-28567784.109255,32567784.109255],bounds:e.bounds([[-28567784.109254867,-28567784.109254755],[32567784.109255023,32567784.10925506]]),resolutions:[238810.813354,119405.406677,59702.7033384999,29851.3516692501,14925.675834625,7462.83791731252,3731.41895865639,1865.70947932806,932.854739664032,466.427369832148,233.213684916074,116.606842458037,58.3034212288862,29.1517106145754,14.5758553072877,7.28792765351156,3.64396382688807,1.82198191331174,.910990956788164,.45549547826179],crs:{tcrs:{horizontal:{name:"x",min:0,max:n=>Math.round(s.APSTILE.options.bounds.getSize().x/s.APSTILE.options.resolutions[n])},vertical:{name:"y",min:0,max:n=>Math.round(s.APSTILE.options.bounds.getSize().y/s.APSTILE.options.resolutions[n])},bounds:n=>e.bounds([s.APSTILE.options.crs.tcrs.horizontal.min,s.APSTILE.options.crs.tcrs.vertical.min],[s.APSTILE.options.crs.tcrs.horizontal.max(n),s.APSTILE.options.crs.tcrs.vertical.max(n)])},pcrs:{horizontal:{name:"easting",get min(){return s.APSTILE.options.bounds.min.x},get max(){return s.APSTILE.options.bounds.max.x}},vertical:{name:"northing",get min(){return s.APSTILE.options.bounds.min.y},get max(){return s.APSTILE.options.bounds.max.y}},get bounds(){return s.APSTILE.options.bounds}},gcrs:{horizontal:{name:"longitude",min:-180,max:180},vertical:{name:"latitude",min:60,max:90},get bounds(){return e.latLngBounds([s.APSTILE.options.crs.gcrs.vertical.min,s.APSTILE.options.crs.gcrs.horizontal.min],[s.APSTILE.options.crs.gcrs.vertical.max,s.APSTILE.options.crs.gcrs.horizontal.max])}},map:{horizontal:{name:"i",min:0,max:n=>n.getSize().x},vertical:{name:"j",min:0,max:n=>n.getSize().y},bounds:n=>e.bounds(e.point([0,0]),n.getSize())},tile:{horizontal:{name:"i",min:0,max:256},vertical:{name:"j",min:0,max:256},get bounds(){return e.bounds([s.APSTILE.options.crs.tile.horizontal.min,s.APSTILE.options.crs.tile.vertical.min],[s.APSTILE.options.crs.tile.horizontal.max,s.APSTILE.options.crs.tile.vertical.max])}},tilematrix:{horizontal:{name:"column",min:0,max:n=>Math.round(s.APSTILE.options.crs.tcrs.horizontal.max(n)/s.APSTILE.options.crs.tile.bounds.getSize().x)},vertical:{name:"row",min:0,max:n=>Math.round(s.APSTILE.options.crs.tcrs.vertical.max(n)/s.APSTILE.options.crs.tile.bounds.getSize().y)},bounds:n=>e.bounds([0,0],[s.APSTILE.options.crs.tilematrix.horizontal.max(n),s.APSTILE.options.crs.tilematrix.vertical.max(n)])}}}),s.OSMTILE=e.CRS.EPSG3857,e.setOptions(s.OSMTILE,{origin:[-20037508.342787,20037508.342787],bounds:e.bounds([[-20037508.342787,-20037508.342787],[20037508.342787,20037508.342787]]),resolutions:[156543.0339,78271.51695,39135.758475,19567.8792375,9783.93961875,4891.969809375,2445.9849046875,1222.9924523438,611.49622617188,305.74811308594,152.87405654297,76.437028271484,38.218514135742,19.109257067871,9.5546285339355,4.7773142669678,2.3886571334839,1.1943285667419,.59716428337097,.29858214168549,.14929107084274,.074645535421371,.03732276771068573,.018661383855342866,.009330691927671433],crs:{tcrs:{horizontal:{name:"x",min:0,max:n=>Math.round(s.OSMTILE.options.bounds.getSize().x/s.OSMTILE.options.resolutions[n])},vertical:{name:"y",min:0,max:n=>Math.round(s.OSMTILE.options.bounds.getSize().y/s.OSMTILE.options.resolutions[n])},bounds:n=>e.bounds([s.OSMTILE.options.crs.tcrs.horizontal.min,s.OSMTILE.options.crs.tcrs.vertical.min],[s.OSMTILE.options.crs.tcrs.horizontal.max(n),s.OSMTILE.options.crs.tcrs.vertical.max(n)])},pcrs:{horizontal:{name:"easting",get min(){return s.OSMTILE.options.bounds.min.x},get max(){return s.OSMTILE.options.bounds.max.x}},vertical:{name:"northing",get min(){return s.OSMTILE.options.bounds.min.y},get max(){return s.OSMTILE.options.bounds.max.y}},get bounds(){return s.OSMTILE.options.bounds}},gcrs:{horizontal:{name:"longitude",get min(){return s.OSMTILE.unproject(s.OSMTILE.options.bounds.min).lng},get max(){return s.OSMTILE.unproject(s.OSMTILE.options.bounds.max).lng}},vertical:{name:"latitude",get min(){return s.OSMTILE.unproject(s.OSMTILE.options.bounds.min).lat},get max(){return s.OSMTILE.unproject(s.OSMTILE.options.bounds.max).lat}},get bounds(){return e.latLngBounds([s.OSMTILE.options.crs.gcrs.vertical.min,s.OSMTILE.options.crs.gcrs.horizontal.min],[s.OSMTILE.options.crs.gcrs.vertical.max,s.OSMTILE.options.crs.gcrs.horizontal.max])}},map:{horizontal:{name:"i",min:0,max:n=>n.getSize().x},vertical:{name:"j",min:0,max:n=>n.getSize().y},bounds:n=>e.bounds(e.point([0,0]),n.getSize())},tile:{horizontal:{name:"i",min:0,max:256},vertical:{name:"j",min:0,max:256},get bounds(){return e.bounds([s.OSMTILE.options.crs.tile.horizontal.min,s.OSMTILE.options.crs.tile.vertical.min],[s.OSMTILE.options.crs.tile.horizontal.max,s.OSMTILE.options.crs.tile.vertical.max])}},tilematrix:{horizontal:{name:"column",min:0,max:n=>Math.round(s.OSMTILE.options.crs.tcrs.horizontal.max(n)/s.OSMTILE.options.crs.tile.bounds.getSize().x)},vertical:{name:"row",min:0,max:n=>Math.round(s.OSMTILE.options.crs.tcrs.vertical.max(n)/s.OSMTILE.options.crs.tile.bounds.getSize().y)},bounds:n=>e.bounds([0,0],[s.OSMTILE.options.crs.tilematrix.horizontal.max(n),s.OSMTILE.options.crs.tilematrix.vertical.max(n)])}}}),s.geojson2mapml=t.geojson2mapml,s.mapml2geojson=t.mapml2geojson,e.Map.addInitHook("addHandler","query",a),e.Map.addInitHook("addHandler","contextMenu",r),e.Map.addInitHook("addHandler","announceMovement",m),e.Map.addInitHook("addHandler","featureIndex",i),s.TILE_SIZE=256,s.FALLBACK_PROJECTION="OSMTILE",s.FALLBACK_CS="TILEMATRIX",s.BLANK_TT_TREF="mapmltemplatedtileplaceholder",s.Util=t,s.defineCustomProjection=function(t){let a=JSON.parse(t);if(!(void 0!==a&&a.proj4string&&a.projection&&a.resolutions&&a.origin&&a.bounds))throw Error("Incomplete TCRS Definition");if(a.projection.indexOf(":")>=0)throw Error('":" is not permitted in projection name');if(s[a.projection.toUpperCase()])return a.projection.toUpperCase();let r=[256,512,1024,2048,4096].includes(a.tilesize)?a.tilesize:s.TILE_SIZE;return s[a.projection]=new n.CRS(a.projection,a.proj4string,{origin:a.origin,resolutions:a.resolutions,bounds:e.bounds(a.bounds),crs:{tcrs:{horizontal:{name:"x",min:0,max:n=>Math.round(s[a.projection].options.bounds.getSize().x/s[a.projection].options.resolutions[n])},vertical:{name:"y",min:0,max:n=>Math.round(s[a.projection].options.bounds.getSize().y/s[a.projection].options.resolutions[n])},bounds:n=>e.bounds([s[a.projection].options.crs.tcrs.horizontal.min,s[a.projection].options.crs.tcrs.vertical.min],[s[a.projection].options.crs.tcrs.horizontal.max(n),s[a.projection].options.crs.tcrs.vertical.max(n)])},pcrs:{horizontal:{name:"easting",get min(){return s[a.projection].options.bounds.min.x},get max(){return s[a.projection].options.bounds.max.x}},vertical:{name:"northing",get min(){return s[a.projection].options.bounds.min.y},get max(){return s[a.projection].options.bounds.max.y}},get bounds(){return s[a.projection].options.bounds}},gcrs:{horizontal:{name:"longitude",get min(){return s[a.projection].unproject(s.OSMTILE.options.bounds.min).lng},get max(){return s[a.projection].unproject(s.OSMTILE.options.bounds.max).lng}},vertical:{name:"latitude",get min(){return s[a.projection].unproject(s.OSMTILE.options.bounds.min).lat},get max(){return s[a.projection].unproject(s.OSMTILE.options.bounds.max).lat}},get bounds(){return e.latLngBounds([s[a.projection].options.crs.gcrs.vertical.min,s[a.projection].options.crs.gcrs.horizontal.min],[s[a.projection].options.crs.gcrs.vertical.max,s[a.projection].options.crs.gcrs.horizontal.max])}},map:{horizontal:{name:"i",min:0,max:n=>n.getSize().x},vertical:{name:"j",min:0,max:n=>n.getSize().y},bounds:n=>e.bounds([0,0],n.getSize())},tile:{horizontal:{name:"i",min:0,max:r},vertical:{name:"j",min:0,max:r},get bounds(){return e.bounds([s[a.projection].options.crs.tile.horizontal.min,s[a.projection].options.crs.tile.vertical.min],[s[a.projection].options.crs.tile.horizontal.max,s[a.projection].options.crs.tile.vertical.max])}},tilematrix:{horizontal:{name:"column",min:0,max:n=>Math.round(s[a.projection].options.crs.tcrs.horizontal.max(n)/s[a.projection].options.crs.tile.bounds.getSize().x)},vertical:{name:"row",min:0,max:n=>Math.round(s[a.projection].options.crs.tcrs.vertical.max(n)/s[a.projection].options.crs.tile.bounds.getSize().y)},bounds:n=>e.bounds([s[a.projection].options.crs.tilematrix.horizontal.min,s[a.projection].options.crs.tilematrix.vertical.min],[s[a.projection].options.crs.tilematrix.horizontal.max(n),s[a.projection].options.crs.tilematrix.vertical.max(n)])}}}),s[a.projection.toUpperCase()]=s[a.projection],a.projection}}(window,document)}||(()=>{});export{s as g}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){let t=e.link||e.styleElement;if(void 0===t)return;let n=(e=>{const t=Array.from(this._container.querySelectorAll(':scope > style, :scope > link[rel="stylesheet"]'));if(0===t.length){const e=this._container.lastChild;if(!e)return{position:"afterbegin",node:this._container};const t="SVG"===e.nodeName,n=e.classList?.contains("mapml-vector-container")||e.classList?.contains("mapml-extentlayer-container");return t||n?{position:"beforebegin",node:e}:{position:"afterend",node:e}}const n=e.mapStyle||e.mapLink;for(let e=0;e<t.length;e++){const o=t[e],i=o.mapStyle||o.mapLink;if(i&&n.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_FOLLOWING)return{position:"beforebegin",node:o}}return{position:"afterend",node:t.at(-1)}})(t);n.node.insertAdjacentElement(n.position,t)}export{e as r}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,g as e}from"./p-BUsJ7i5g.js";const n=class{constructor(e){t(this,e)}get el(){return e(this)}name;content;nameChanged(t,e){}contentChanged(t,e){}set contentValue(t){"cs"===this.name&&t&&!["tcrs","tilematrix","pcrs","gcrs","map","tile"].includes(t)||(this.content=t)}connectedCallback(){}disconnectedCallback(){}render(){return null}static get watchers(){return{name:[{nameChanged:0}],content:[{contentChanged:0}]}}};export{n as map_meta}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,g as s}from"./p-BUsJ7i5g.js";const i=class{constructor(s){t(this,s)}get el(){return s(this)}media;_mql;_changeHandler;_observer;styleElement;_stylesheetHost;async mediaChanged(t,s){s!==t&&await this._registerMediaQuery(t)}getMapEl(){return window.M?.Util?.getClosest?.(this.el,"gcds-ext-map")||this.el.closest("gcds-ext-map")}_connect(){this.styleElement=document.createElement("style"),this.styleElement.mapStyle=this.el,this.styleElement.textContent=this.el.textContent,this._copyAttributes(this.el,this.styleElement),Object.defineProperty(this.el,"styleElement",{get:()=>this.styleElement,configurable:!0,enumerable:!0}),this._stylesheetHost&&(this._stylesheetHost._layer?this._stylesheetHost._layer.renderStyles?.(this.el):this._stylesheetHost._templatedLayer?this._stylesheetHost._templatedLayer.renderStyles?.(this.el):this._stylesheetHost._extentLayer&&this._stylesheetHost._extentLayer.renderStyles?.(this.el),this._observer=new MutationObserver((()=>{this.styleElement.textContent=this.el.textContent})),this._observer.observe(this.el,{childList:!0,subtree:!0,characterData:!0}))}_disconnect(){this._observer&&(this._observer.disconnect(),this._observer=void 0),this._stylesheetHost&&this.styleElement&&(this.styleElement.remove(),this.styleElement=void 0)}_copyAttributes(t,s){Array.from(t.attributes).forEach((t=>{"media"!==t.nodeName&&"data-testid"!==t.nodeName&&s.setAttribute(t.nodeName,t.nodeValue)}))}async _registerMediaQuery(t){if(this._changeHandler||(this._changeHandler=()=>{this._disconnect(),this._mql&&this._mql.matches&&this._connect()}),t){const s=this.getMapEl();if(!s)return;"function"==typeof s.whenReady&&await s.whenReady(),this._mql&&this._mql.removeEventListener("change",this._changeHandler),this._mql=s.matchMedia(t),this._changeHandler(),this._mql.addEventListener("change",this._changeHandler)}else this._mql&&(this._mql.removeEventListener("change",this._changeHandler),this._mql=void 0,this._disconnect(),this._connect())}async connectedCallback(){this._stylesheetHost=this.el.getRootNode()instanceof ShadowRoot?this.el.getRootNode().host:this.el.parentElement,this._stylesheetHost&&(this.media?await this._registerMediaQuery(this.media):this._connect())}disconnectedCallback(){this._disconnect()}static get watchers(){return{media:[{mediaChanged:0}]}}};export{i as map_style}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import{l as t,U as e,r as i,g as o,M as n}from"./p-BUsJ7i5g.js";import{l as s,a}from"./p-Bpv_U_Lb.js";import{M as r}from"./p-B8Id5Ptd.js";import{r as l}from"./p-EYVT9Efh.js";class h{element;valueSet;attribute;domain;domtokenlist;constructor(t,e,i,o){const n=document.createElement("div");this.domtokenlist=n.classList,this.valueSet=!1,this.domtokenlist.value=t??"",this.element=e,this.attribute=i,this.domain=o}get isValueSet(){return this.valueSet}get length(){return this.domtokenlist.length}get value(){return this.domtokenlist.value}set value(t){null===t?this.domtokenlist.value="":(this.domtokenlist.value=t.toLowerCase(),this.valueSet=!0,this.element.setAttribute(this.attribute,this.domtokenlist.value),this.valueSet=!1)}item(t){return this.domtokenlist.item(t)}contains(t){return this.domtokenlist.contains(t)}add(t){this.domtokenlist.add(t),this.element.setAttribute(this.attribute,this.domtokenlist.value)}remove(t){this.domtokenlist.remove(t),this.element.setAttribute(this.attribute,this.domtokenlist.value)}replace(t,e){const i=this.domtokenlist.replace(t,e);return this.element.setAttribute(this.attribute,this.domtokenlist.value),i}supports(t){return this.domain.includes(t)}toggle(t,e){const i=this.domtokenlist.toggle(t,e);return this.element.setAttribute(this.attribute,this.domtokenlist.value),i}entries(){const t=this.domtokenlist;return t.entries?t.entries():this._manualEntries()}forEach(t,e){if(this.domtokenlist.forEach)this.domtokenlist.forEach(((i,o)=>t.call(e,i,o,this)));else for(let i=0;i<this.domtokenlist.length;i++)t.call(e,this.domtokenlist[i],i,this)}keys(){const t=this.domtokenlist;return t.keys?t.keys():this._manualKeys()}values(){const t=this.domtokenlist;return t.values?t.values():this._manualValues()}[Symbol.iterator](){return this.values()}*_manualEntries(){for(let t=0;t<this.domtokenlist.length;t++)yield[t,this.domtokenlist[t]]}*_manualKeys(){for(let t=0;t<this.domtokenlist.length;t++)yield t}*_manualValues(){for(let t=0;t<this.domtokenlist.length;t++)yield this.domtokenlist[t]}}const c="<".codePointAt(0),d=">".codePointAt(0),u="=".codePointAt(0),f="/".codePointAt(0),p=(t,e=0)=>{const i=t.at(e);if("delim"===(null==i?void 0:i._t)&&i.value===c){const i=t.at(e+1),o="delim"===(null==i?void 0:i._t)&&i.value===u&&!i.isAfterSpace;return{t:{t:"lt",isIncl:o},i:e+(o?2:1)}}},m=(t,e=0)=>{const i=t.at(e);if("delim"===(null==i?void 0:i._t)&&i.value===d){const i=t.at(e+1),o="delim"===(null==i?void 0:i._t)&&i.value===u&&!i.isAfterSpace;return{t:{t:"gt",isIncl:o},i:e+(o?2:1)}}},g=(t,e=0)=>{const i=((t,e=0)=>{const i=((t,e=0)=>{const i=t.at(e);if("number"===(null==i?void 0:i._t)&&i.value>=0){const o=t.at(e+1);if("delim"===(null==o?void 0:o._t)&&o.value===f){const o=t.at(e+2);if("number"===(null==o?void 0:o._t)&&o.value>=0)return{t:{_t:"ratio",left:i.value,right:o.value,start:i.start,end:o.end},i:e+3}}}})(t,e);if(i)return i;const o=t.at(e);return!o||"number"!==o._t&&"dimension"!==o._t?void 0:{t:"number"===o._t?{_t:"number",value:o.value,flag:o.flag,start:o.start,end:o.end}:{_t:"dimension",value:o.value,unit:o.unit,start:o.start,end:o.end},i:e+1}})(t,e);if(i)return i;const o=t.at(e);return"ident"===(null==o?void 0:o._t)?{t:{_t:"ident",value:o.value,start:o.start,end:o.end},i:e+1}:void 0},b=(t,e=0)=>{const i=((t,e=0)=>{var i,o;const n=t.at(e);if("("===(null==n?void 0:n._t)){const n=null!==(o=null!==(i=((t,e=0)=>{const i=t.at(e);if("ident"===(null==i?void 0:i._t)){const o=t.at(e+1);if("colon"===(null==o?void 0:o._t)){const o=g(t,e+2);if(o)return{t:{_t:"feature",context:"value",feature:i.value,value:o.t,start:i.start,end:o.t.end},i:o.i}}}})(t,e+1))&&void 0!==i?i:((t,e=0)=>{var i;const o=g(t,e);if(o){const e=((t,e=0)=>{var i,o;return null!==(o=null!==(i=p(t,e))&&void 0!==i?i:m(t,e))&&void 0!==o?o:((t,e=0)=>{const i=t.at(e);if("delim"===(null==i?void 0:i._t)&&i.value===u)return{t:{t:"eq"},i:e+1}})(t,e)})(t,o.i);if(e){const n=g(t,e.i);if(n){const s=null!==(i=p(t,n.i))&&void 0!==i?i:m(t,n.i);if(s){const i=g(t,s.i);if(i&&"ident"===n.t._t&&"ident"!==o.t._t&&"ident"!==i.t._t){if("lt"===e.t.t&&"lt"===s.t.t)return{t:{_t:"feature",context:"range",ops:2,feature:n.t.value,minValue:o.t,minOp:e.t.isIncl?"<=":"<",maxOp:s.t.isIncl?"<=":"<",maxValue:i.t,start:o.t.start,end:i.t.end},i:i.i};if("gt"===e.t.t&&"gt"===s.t.t)return{t:{_t:"feature",context:"range",ops:2,feature:n.t.value,minValue:i.t,minOp:s.t.isIncl?"<=":"<",maxOp:e.t.isIncl?"<=":"<",maxValue:o.t,start:o.t.start,end:i.t.end},i:i.i}}}let a="=";if("lt"===e.t.t?a=e.t.isIncl?"<=":"<":"gt"===e.t.t&&(a=e.t.isIncl?">=":">"),"ident"===o.t._t&&"ident"!==n.t._t)return{t:{_t:"feature",context:"range",feature:o.t.value,ops:1,op:a,value:n.t,start:o.t.start,end:n.t.end},i:n.i};if("ident"===n.t._t&&"ident"!==o.t._t){let t="=";return"<"===a?t=">":"<="===a?t=">=":">"===a?t="<":">="===a&&(t="<="),{t:{_t:"feature",context:"range",feature:n.t.value,ops:1,op:t,value:o.t,start:o.t.start,end:n.t.end},i:n.i}}}}}})(t,e+1))&&void 0!==o?o:((t,e=0)=>{const i=t.at(e);if("ident"===(null==i?void 0:i._t))return{t:{_t:"feature",context:"boolean",feature:i.value,start:i.start,end:i.end},i:e+1}})(t,e+1);if(n){const e=t.at(n.i);if(")"===(null==e?void 0:e._t))return{t:n.t,i:n.i+1}}}})(t,e);if(i)return{t:{_t:"in-parens",node:i.t},i:i.i};const o=t.at(e);if("("===(null==o?void 0:o._t)){const i=y(t,e+1);if(i){const e=t.at(i.i);if(")"===(null==e?void 0:e._t))return{t:{_t:"in-parens",node:i.t},i:i.i+1}}}const n=((t,e=0)=>{var i;const o=t.at(e);if(o&&("function"===o._t||"("===o._t)){const n=["("];let s=e+1,a=t.at(s);t:for(;a;){switch(a._t){case"function":case"(":n.push("(");break;case"{":case"[":n.push(a._t);break;case")":if("("===n.at(-1)&&n.pop(),0===n.length)break t;break;case"]":"["===n.at(-1)&&n.pop();break;case"}":"{"===n.at(-1)&&n.pop()}a=t.at(++s)}if(0===n.length)return{t:{_t:"general-enclosed",tokens:t.slice(e,s),start:o.start,end:(null!==(i=t.at(s))&&void 0!==i?i:t[s-1]).end},i:s}}})(t,e);return n?{t:{_t:"in-parens",node:n.t},i:n.i}:void 0},v=(t,e=0)=>{const i=t.at(e);if("ident"===(null==i?void 0:i._t)&&"or"===i.value){const i=b(t,e+1);if(i)return{t:i.t,i:i.i}}},w=(t,e=0)=>{const i=t.at(e);if("ident"===(null==i?void 0:i._t)&&"and"===i.value){const i=b(t,e+1);if(i)return{t:i.t,i:i.i}}},x=(t,e=0)=>{const i=t.at(e);if("ident"===(null==i?void 0:i._t)&&"not"===i.value){const i=b(t,e+1);if(i)return{t:i.t,i:i.i}}},y=(t,e=0)=>{const i=x(t,e);if(i)return{t:{_t:"condition",op:"not",nodes:[i.t],start:t[e].start,end:t[i.i-1].end},i:i.i};{const i=b(t,e);if(i){const o=w(t,i.i);if(o){const n=[o.t];let s=o.i,a=w(t,o.i);for(;a;)n.push(a.t),s=a.i,a=w(t,a.i);return{t:{_t:"condition",op:"and",nodes:[i.t,...n],start:t[e].start,end:t[s-1].end},i:s}}const n=v(t,i.i);if(n){const o=[n.t];let s=n.i,a=v(t,n.i);for(;a;)o.push(a.t),s=a.i,a=v(t,a.i);return{t:{_t:"condition",op:"or",nodes:[i.t,...o],start:t[e].start,end:t[s-1].end},i:s}}return{t:{_t:"condition",op:"and",nodes:[i.t],start:t[e].start,end:t[i.i-1].end},i:i.i}}}},k=(t,e=0)=>{const i=x(t,e);if(i)return{t:{_t:"condition",op:"not",nodes:[i.t],start:t[e].start,end:t[i.i-1].end},i:i.i};{const i=b(t,e);if(i){const o=w(t,i.i);if(o){const n=[o.t];let s=o.i,a=w(t,o.i);for(;a;)n.push(a.t),s=a.i,a=w(t,a.i);return{t:{_t:"condition",op:"and",nodes:[i.t,...n],start:t[e].start,end:t[s-1].end},i:s}}return{t:{_t:"condition",op:"and",nodes:[i.t],start:t[e].start,end:t[i.i-1].end},i:i.i}}}},_=t=>{const e=y(t,0);if(e)return{t:{_t:"query",condition:e.t,start:0,end:t[e.i-1].end},i:e.i};{const e=t.at(0);if("ident"===(null==e?void 0:e._t)){if("not"===e.value||"only"===e.value){const i=t.at(1);if("ident"===(null==i?void 0:i._t)){const o=t.at(2);if("ident"===(null==o?void 0:o._t)&&"and"===o.value){const o=k(t,3);if(o)return{t:{_t:"query",condition:o.t,type:i.value,prefix:e.value,start:0,end:t[o.i-1].end},i:o.i}}return{t:{_t:"query",type:i.value,prefix:e.value,start:0,end:i.end},i:2}}}const i=t.at(1);if("ident"===(null==i?void 0:i._t)&&"and"===i.value){const i=k(t,2);if(i)return{t:{_t:"query",condition:i.t,type:e.value,start:0,end:t[i.i-1].end},i:i.i}}return{t:{_t:"query",type:e.value,start:0,end:e.end},i:1}}}},z=t=>"object"==typeof t&&null!==t&&"_errid"in t;let C;const E=10,T=32,L=45,j=48,O=57,S=65,A=92,B=97,N=122,P=128,R=(t,e)=>{if(t.length<=e+1)return null;const i=t.at(e),o=[];for(let n=e+1;n<t.length;n+=1){const e=t.at(n);if(e===i)return[n,String.fromCodePoint(...o)];if(e===A){const e=F(t,n);if(null===e)return null;const[i,s]=e;o.push(s),n=i}else{if(e===E)return null;o.push(e)}}return null},q=(t,e)=>{const i=t.at(e);if(void 0===i)return!1;if(i===L){const i=t.at(e+1);return void 0!==i&&(i===L||95===i||i>=S&&i<=90||i>=B&&i<=N||i>=P||i===A&&!(t.length<=e+2)&&t.at(e+2)!==E)}return 95===i||i>=S&&i<=90||i>=B&&i<=N||i>=P||i===A&&!(t.length<=e+1)&&t.at(e+1)!==E},F=(t,e)=>{if(t.length<=e+1)return null;if(t.at(e)!==A)return null;const i=t.at(e+1);if(i===E)return null;if(i>=j&&i<=O||i>=S&&i<=70||i>=B&&i<=102){const o=[i],n=Math.min(e+7,t.length);let s=e+2;for(;s<n;s+=1){const e=t.at(s);if(!(e>=j&&e<=O||e>=S&&e<=70||e>=B&&e<=102))break;o.push(e)}if(s<t.length){const e=t.at(s);9!==e&&e!==T&&e!==E||(s+=1)}return[s-1,Number.parseInt(String.fromCodePoint(...o),16)]}return[e+1,i]},I=(t,e)=>{const i=$(t,e);if(null===i)return null;const[o,n,s]=i,a=Z(t,o+1);if(null!==a){const[t,e]=a;return[t,["dimension",n,e]]}return o+1<t.length&&37===t.at(o+1)?[o+1,["percentage",n]]:[o,["number",n,s]]},$=(t,e)=>{const i=t.at(e);if(void 0===i)return null;let o="integer";const n=[];for(43!==i&&i!==L||(e+=1,i===L&&n.push(L));e<t.length;){const i=t.at(e);if(!(i>=j&&i<=O))break;n.push(i),e+=1}if(e+1<t.length){const i=t.at(e),s=t.at(e+1);if(46===i&&s>=j&&s<=O)for(n.push(i,s),o="number",e+=2;e<t.length;){const i=t.at(e);if(!(i>=j&&i<=O))break;n.push(i),e+=1}}if(e+1<t.length){const i=t.at(e),s=t.at(e+1),a=t.at(e+2);if(69===i||101===i){let i=!1;if(s>=j&&s<=O?(n.push(69,s),e+=2,i=!0):(s===L||43===s)&&void 0!==a&&a>=j&&a<=O&&(n.push(69),s===L&&n.push(L),n.push(a),e+=3,i=!0),i)for(o="number";e<t.length;){const i=t.at(e);if(!(i>=j&&i<=O))break;n.push(i),e+=1}}}const s=String.fromCodePoint(...n);let a="number"===o?Number.parseFloat(s):Number.parseInt(s);return 0===a&&(a=0),Number.isNaN(a)?null:[e-1,a,o]},U=(t,e)=>{if(t.length<=e)return null;const i=[];for(let o=t.at(e);e<t.length;o=t.at(++e)){if(!(o===L||95===o||o>=S&&o<=90||o>=B&&o<=N||o>=P||o>=j&&o<=O)){{const o=F(t,e);if(null!==o){const[t,n]=o;i.push(n),e=t;continue}}break}i.push(o)}return 0===e?null:[e-1,String.fromCodePoint(...i)]},Z=(t,e)=>q(t,e)?U(t,e):null,D=(t,e)=>{let i=t.at(e);for(;9===i||i===T||i===E;)i=t.at(++e);const o=[];let n=!1;for(;e<t.length;){if(41===i)return[e,String.fromCodePoint(...o)];if(34===i||39===i||40===i)return null;if(9===i||i===T||i===E)!n&&o.length>0&&(n=!0);else if(i===A){const i=F(t,e);if(null===i||n)return null;const[s,a]=i;o.push(a),e=s}else{if(n)return null;o.push(i)}i=t.at(++e)}return null},V=(t,e)=>{const i=Z(t,e);if(null===i)return null;const[o,n]=i;if("url"===n.toLowerCase()){if(t.length>o+1&&40===t.at(o+1)){for(let e=2;o+e<t.length;e+=1){const i=t.at(o+e);if(34===i||39===i)return[o+1,n.toLowerCase(),"function"];if(9!==i&&i!==T&&i!==E){const i=D(t,o+e);if(null===i)return null;const[n,s]=i;return[n,s,"url"]}}return[o+1,n.toLowerCase(),"function"]}}else if(t.length>o+1&&40===t.at(o+1))return[o+1,n.toLowerCase(),"function"];return[o,n.toLowerCase(),"ident"]},H=t=>{const e=(t=>{const e=((t,e=0)=>{const i=[];for(;e<t.length;e+=1){const o=t.at(e),n=e;if(47===o&&42===t.at(e+1)){for(let i=t.at(e+=2);void 0!==i;i=t.at(++e))if(42===i&&47===t.at(e+1)){e+=1;break}}else if(9===o||o===T||o===E){let o=t.at(++e);for(;9===o||o===T||o===E;)o=t.at(++e);e-=1;const s=i.at(-1);"whitespace"===(null==s?void 0:s._t)?(i.pop(),i.push({_t:"whitespace",start:s.start,end:e})):i.push({_t:"whitespace",start:n,end:e})}else if(34===o){const o=R(t,e);if(null===o)return{_errid:"INVALID_STRING",start:e,end:e};const[s,a]=o;i.push({_t:"string",value:a,start:n,end:e=s})}else if(35===o){if(e+1<t.length){const o=t.at(e+1);if(95===o||o>=S&&o<=90||o>=B&&o<=N||o>=P||o>=j&&o<=O||o===A&&e+2<t.length&&t.at(e+2)!==E){const o=q(t,e+1)?"id":"unrestricted",s=U(t,e+1);if(null!==s){const[t,a]=s;e=t,i.push({_t:"hash",value:a.toLowerCase(),flag:o,start:n,end:e});continue}}}i.push({_t:"delim",value:o,start:n,end:e})}else if(39===o){const o=R(t,e);if(null===o)return{_errid:"INVALID_STRING",start:e,end:e};const[s,a]=o;i.push({_t:"string",value:a,start:n,end:e=s})}else if(40===o)i.push({_t:"(",start:n,end:e});else if(41===o)i.push({_t:")",start:n,end:e});else if(43===o){const s=I(t,e);if(null===s)i.push({_t:"delim",value:o,start:n,end:e});else{const[t,o]=s;e=t,i.push("dimension"===o[0]?{_t:"dimension",value:o[1],unit:o[2].toLowerCase(),flag:"number",start:n,end:e}:"number"===o[0]?{_t:o[0],value:o[1],flag:o[2],start:n,end:e}:{_t:o[0],value:o[1],flag:"number",start:n,end:e})}}else if(44===o)i.push({_t:"comma",start:n,end:e});else if(o===L){const s=I(t,e);if(null!==s){const[t,o]=s;e=t,i.push("dimension"===o[0]?{_t:"dimension",value:o[1],unit:o[2].toLowerCase(),flag:"number",start:n,end:e}:"number"===o[0]?{_t:o[0],value:o[1],flag:o[2],start:n,end:e}:{_t:o[0],value:o[1],flag:"number",start:n,end:e});continue}if(e+2<t.length){const o=t.at(e+1),s=t.at(e+2);if(o===L&&62===s){i.push({_t:"CDC",start:n,end:e+=2});continue}}const a=V(t,e);if(null!==a){const[t,o,s]=a;i.push({_t:s,value:o,start:n,end:e=t});continue}i.push({_t:"delim",value:o,start:n,end:e})}else if(46===o){const s=I(t,e);if(null!==s){const[t,o]=s;e=t,i.push("dimension"===o[0]?{_t:"dimension",value:o[1],unit:o[2].toLowerCase(),flag:"number",start:n,end:e}:"number"===o[0]?{_t:o[0],value:o[1],flag:o[2],start:n,end:e}:{_t:o[0],value:o[1],flag:"number",start:n,end:e});continue}i.push({_t:"delim",value:o,start:n,end:e})}else if(58===o)i.push({_t:"colon",start:n,end:e});else if(59===o)i.push({_t:"semicolon",start:n,end:e});else if(60===o){if(e+3<t.length){const o=t.at(e+1),s=t.at(e+2),a=t.at(e+3);if(33===o&&s===L&&a===L){i.push({_t:"CDO",start:n,end:e+=3});continue}}i.push({_t:"delim",value:o,start:n,end:e})}else if(64===o){const s=Z(t,e+1);if(null!==s){const[t,o]=s;e=t,i.push({_t:"at-keyword",value:o.toLowerCase(),start:n,end:e});continue}i.push({_t:"delim",value:o,start:n,end:e})}else if(91===o)i.push({_t:"[",start:n,end:e});else if(93===o)i.push({_t:"]",start:n,end:e});else if(123===o)i.push({_t:"{",start:n,end:e});else if(125===o)i.push({_t:"}",start:n,end:e});else if(o>=j&&o<=O){const o=I(t,e),[s,a]=o;e=s,i.push("dimension"===a[0]?{_t:"dimension",value:a[1],unit:a[2].toLowerCase(),flag:"number",start:n,end:e}:"number"===a[0]?{_t:a[0],value:a[1],flag:a[2],start:n,end:e}:{_t:a[0],value:a[1],flag:"number",start:n,end:e})}else if(95===o||o>=S&&o<=90||o>=B&&o<=N||o>=P||o===A){const s=V(t,e);if(null===s)i.push({_t:"delim",value:o,start:n,end:e});else{const[t,o,a]=s;i.push({_t:a,value:o,start:n,end:e=t})}}else i.push({_t:"delim",value:o,start:n,end:e})}return i.push({_t:"EOF",start:e,end:e}),i})((t=>{const e=(()=>{let t;return C?t=C:(t=new TextEncoder,C=t),t})().encode(t),i=[],o=e.length;for(let t=0;t<o;t+=1){const o=e.at(t);if(o<128)switch(o){case 0:i.push(65533);break;case 12:i.push(10);break;case 13:i.push(10),10===e.at(t+1)&&(t+=1);break;default:i.push(o)}else i.push(o<224?o<<59>>>53|e[++t]<<58>>>58:o<240?o<<60>>>48|e[++t]<<58>>>52|e[++t]<<58>>>58:o<<61>>>43|e[++t]<<58>>>46|e[++t]<<58>>>52|e[++t]<<58>>>58)}return i})(t));return z(e)?e:(t=>{const e=[];let i=!1;for(const o of t)switch(o._t){case"{":return{_errid:"NO_LCURLY",start:o.start,end:o.end};case"semicolon":return{_errid:"NO_SEMICOLON",start:o.start,end:o.end};case"whitespace":i=!0;break;case"EOF":break;default:e.push({...o,isAfterSpace:i}),i=!1}return e})(e)})(t);return z(e)?e:(t=>{const e=(t=>{const e=[[]],i=[];for(const o of t)if("comma"===o._t&&0===i.length)e.push([]);else{switch(o._t){case"function":case"(":i.push(")");break;case"[":i.push("]");break;case"{":i.push("}");break;case")":case"]":case"}":i.at(-1)===o._t&&i.pop()}e[e.length-1].push(o)}return e})(t);if(1===e.length&&0===e[0].length)return{_t:"query-list",nodes:[{_t:"query",type:"all",start:0,end:0}]};{const t=[];for(const i of e){const e=_(i);t.push(e&&e.i===i.length?e.t:void 0)}return{_t:"query-list",nodes:t}}})(e)},Y=t=>"number"===t._t&&"integer"===t.flag,X=t=>"dimension"===t._t&&tt(t.unit)||"number"===t._t&&"integer"===t.flag&&0===t.value,G=t=>"dimension"===t._t&&st(t.unit),J=t=>"ratio"===t._t||Y(t)&&t.value>=0,K=new Set(["cm","mm","q","in","pc","pt","px"]),W=t=>K.has(t.unit),Q=new Set([...K,"em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","svw","svh","svi","svb","svmin","svmax","lvw","lvh","lvi","lvb","lvmin","lvmax","dvw","dvh","dvi","dvb","dvmin","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"]),tt=t=>Q.has(t),et=(t,e)=>{const i="number"===t._t?{_t:"dimension",value:0,unit:"px"}:t,o="number"===e._t?{_t:"dimension",value:0,unit:"px"}:e;if(W(i)){const t=ot(i);if(W(o)){const e=ot(o);return t===e?"eq":t>e?"gt":"lt"}return 0===t&&0===o.value?"eq":"unknown"}if(W(o)){const t=et(o,i);return"lt"===t?"gt":"gt"===t?"lt":t}return 0===i.value&&0===o.value?"eq":"unknown"},it=new Map([["cm",96/2.54],["mm",96/25.4],["q",96/101.6],["in",96],["pc",16],["pt",96/72]]),ot=t=>{var e;return t.value*(null!==(e=it.get(t.unit))&&void 0!==e?e:1)},nt=new Set(["dpi","dpcm","dppx","x"]),st=t=>nt.has(t),at=new Map([["dpi",96],["dpcm",96/2.54],["dppx",1]]),rt=t=>{var e;return t.value*(null!==(e=at.get(t.unit))&&void 0!==e?e:1)},lt=(t,e)=>{const i=t.feature.startsWith("min-"),o=t.feature.startsWith("max-");if((i||o)&&"value"===t.context&&"ident"!==t.value._t)return lt({_t:"feature",context:"range",ops:1,feature:t.feature.slice(4),op:i?">=":"<=",value:t.value,start:t.start,end:t.end},e);{const i=e.features.get(t.feature);if(i){if("boolean"===t.context)return"discrete"===i.type&&(i.values.has("none")||i.values.has(0))||"range"===i.type&&("ratio"===i.valueType?i.canNumeratorBeZero:i.canBeZero)?e.solveUnknownFeature(t):"true";if("value"===t.context){if("discrete"===i.type){let o;if("ident"===t.value._t)o=t.value.value;else{if("number"!==t.value._t||"integer"!==t.value.flag)return"false";o=t.value.value}return i.values.has(o)?e.solveUnknownFeature(t):"false"}if("integer"===i.valueType)return Y(t.value)?t.value.value<0&&!i.canBeNegative||0===t.value.value&&!i.canBeZero?"false":e.solveUnknownFeature(t):"false";if("length"===i.valueType){if(X(t.value)){const o=et(t.value,{_t:"number",value:0});return"lt"===o&&!i.canBeNegative||"eq"===o&&!i.canBeZero?"false":e.solveUnknownFeature(t)}return"false"}if("ratio"===i.valueType)return J(t.value)&&("eq"!==((t,e)=>{const i="number"===t._t?t.value:t.left,o="number"===t._t?1:t.right,n="number"===e._t?e.value:e.left,s="number"===e._t?1:e.right;if(0===i&&0===o)return 0===n&&0===s?"eq":"incomparable";if(0===n&&0===s)return"incomparable";if(0===i&&0===n)return"eq";if(0===o&&0===s)return"eq";if(0!==i&&0!==n&&0!==o&&0!==s&&i*s==n*o)return"eq";const a=i/o,r=n/s;return a>r?"gt":a<r?"lt":"eq"})(t.value,{_t:"number",value:0})||i.canNumeratorBeZero)?e.solveUnknownFeature(t):"false";if(G(t.value)){const o=(t=>{const e=rt(t),i=rt({value:0,unit:"x"});return e===i?"eq":e>i?"gt":"lt"})(t.value);return"lt"===o&&!i.canBeNegative||"eq"===o&&!i.canBeZero?"false":e.solveUnknownFeature(t)}return"false"}if("discrete"===i.type)return"false";if(2===t.ops)return ct({op:"and",nodes:[{_t:"in-parens",node:{_t:"feature",context:"range",ops:1,feature:t.feature,op:"<"===t.minOp?">":">=",value:t.minValue,start:t.minValue.start,end:t.minValue.end}},{_t:"in-parens",node:{_t:"feature",context:"range",ops:1,feature:t.feature,op:t.maxOp,value:t.maxValue,start:t.maxValue.start,end:t.maxValue.end}}]},e);if("ratio"===i.valueType){if(J(t.value)){const o="number"===t.value._t?t.value.value:t.value.left,n="number"===t.value._t?1:t.value.right;return 0===o&&0!==n&&("="===t.op&&!i.canNumeratorBeZero||"<="===t.op&&!i.canNumeratorBeZero||"<"===t.op)||!(0!==o||0!==n||i.canNumeratorBeZero&&i.canDenominatorBeZero||"<"!==t.op&&">"!==t.op)?"false":">="===t.op&&0===o&&0!==n&&!i.canDenominatorBeZero||">"===t.op&&0===o&&0!==n&&!i.canNumeratorBeZero&&i.canDenominatorBeZero||"<="===t.op&&0!==o&&0===n&&(!i.canNumeratorBeZero||!i.canDenominatorBeZero)||"<"===t.op&&0!==o&&0===n&&!i.canDenominatorBeZero?"true":e.solveUnknownFeature(t)}return"false"}return"integer"===i.valueType?Y(t.value)?"="===t.op&&!i.canBeNegative&&t.value.value<0||"="===t.op&&!i.canBeZero&&0===t.value.value||"<="===t.op&&!i.canBeNegative&&t.value.value<0||"<="===t.op&&!i.canBeNegative&&!i.canBeZero&&0===t.value.value||"<"===t.op&&!i.canBeNegative&&t.value.value<=0||"<"===t.op&&!i.canBeNegative&&!i.canBeZero&&1===t.value.value?"false":">="===t.op&&!i.canBeNegative&&t.value.value<=0||">="===t.op&&!i.canBeNegative&&!i.canBeZero&&1===t.value.value||">"===t.op&&!i.canBeNegative&&t.value.value<0||">"===t.op&&!i.canBeNegative&&!i.canBeZero&&0===t.value.value?"true":e.solveUnknownFeature(t):"false":"length"===i.valueType?X(t.value)?"="===t.op&&!i.canBeNegative&&t.value.value<0||"="===t.op&&!i.canBeZero&&0===t.value.value||"<="===t.op&&!i.canBeNegative&&t.value.value<0||"<="===t.op&&!i.canBeNegative&&!i.canBeZero&&0===t.value.value||"<"===t.op&&!i.canBeNegative&&t.value.value<=0?"false":">="===t.op&&!i.canBeNegative&&t.value.value<=0||">"===t.op&&!i.canBeNegative&&t.value.value<0||">"===t.op&&!i.canBeNegative&&!i.canBeZero&&0===t.value.value?"true":e.solveUnknownFeature(t):"false":G(t.value)?"="===t.op&&!i.canBeNegative&&t.value.value<0||"="===t.op&&!i.canBeZero&&0===t.value.value||"<="===t.op&&!i.canBeNegative&&t.value.value<0||"<="===t.op&&!i.canBeNegative&&!i.canBeZero&&0===t.value.value||"<"===t.op&&!i.canBeNegative&&t.value.value<=0?"false":">="===t.op&&!i.canBeNegative&&t.value.value<=0||">"===t.op&&!i.canBeNegative&&t.value.value<0||">"===t.op&&!i.canBeNegative&&!i.canBeZero&&0===t.value.value?"true":e.solveUnknownFeature(t):"false"}return"false"}},ht=(t,e)=>"condition"===t.node._t?ct(t.node,e):"feature"===t.node._t?lt(t.node,e):e.solveGeneralEnclosed(t.node),ct=(t,e)=>"and"===t.op?ut(...t.nodes.map((t=>ht(t,e)))):"or"===t.op?ft(...t.nodes.map((t=>ht(t,e)))):dt(ht(t.nodes[0],e)),dt=t=>"true"===t?"false":"false"===t?"true":"unknown",ut=(...t)=>t.reduce(((t,e)=>"false"===t||"false"===e?"false":"unknown"===t||"unknown"===e?"unknown":"true"),"true"),ft=(...t)=>t.reduce(((t,e)=>"true"===t||"true"===e?"true":"unknown"===t||"unknown"===e?"unknown":"false"),"false"),pt={"color-gamut":{type:"discrete",values:["srgb","p3","rec2020"]},"display-mode":{type:"discrete",values:["fullscreen","standalone","minimal-ui","browser"]},"dynamic-range":{type:"discrete",values:["standard","high"]},"environment-blending":{type:"discrete",values:["opaque","additive","subtractive"]},orientation:{type:"discrete",values:["portrait","landscape"]},"prefers-color-scheme":{type:"discrete",values:["light","dark"]},"prefers-contrast":{type:"discrete",values:["no-preference","less","more","custom"]},"prefers-reduced-data":{type:"discrete",values:["no-preference","reduce"]},"prefers-reduced-motion":{type:"discrete",values:["no-preference","reduce"]},"prefers-reduced-transparency":{type:"discrete",values:["no-preference","reduce"]},scan:{type:"discrete",values:["interlace","progressive"]},"video-color-gamut":{type:"discrete",values:["srgb","p3","rec2020"]},"video-dynamic-range":{type:"discrete",values:["standard","high"]},"any-hover":{type:"discrete",values:["none","hover"]},"any-pointer":{type:"discrete",values:["none","coarse","fine"]},"forced-colors":{type:"discrete",values:["none","active"]},hover:{type:"discrete",values:["none","hover"]},"inverted-colors":{type:"discrete",values:["none","inverted"]},"nav-controls":{type:"discrete",values:["none","back"]},"overflow-block":{type:"discrete",values:["none","scroll","paged"]},"overflow-inline":{type:"discrete",values:["none","scroll"]},pointer:{type:"discrete",values:["none","coarse","fine"]},update:{type:"discrete",values:["none","slow","fast"]},scripting:{type:"discrete",values:["none","initial-only","enabled"]},grid:{type:"discrete",values:[0,1]},resolution:{type:"range",valueType:"resolution",canBeZero:!0,canBeNegative:!1,extraValues:{infinite:Number.POSITIVE_INFINITY}},"device-height":{type:"range",valueType:"length",canBeZero:!0,canBeNegative:!1},"device-width":{type:"range",valueType:"length",canBeZero:!0,canBeNegative:!1},height:{type:"range",valueType:"length",canBeZero:!0,canBeNegative:!1},width:{type:"range",valueType:"length",canBeZero:!0,canBeNegative:!1},"device-aspect-ratio":{type:"range",valueType:"ratio",canNumeratorBeZero:!0,canDenominatorBeZero:!0},"aspect-ratio":{type:"range",valueType:"ratio",canNumeratorBeZero:!0,canDenominatorBeZero:!0},color:{type:"range",valueType:"integer",canBeZero:!0,canBeNegative:!1},"horizontal-viewport-segments":{type:"range",valueType:"integer",canBeZero:!0,canBeNegative:!1},"color-index":{type:"range",valueType:"integer",canBeZero:!0,canBeNegative:!1},monochrome:{type:"range",valueType:"integer",canBeZero:!0,canBeNegative:!1},"vertical-viewport-segments":{type:"range",valueType:"integer",canBeZero:!0,canBeNegative:!1}},mt=t=>Object.entries(t),gt=t=>{var e,i,o,n,s,a;const r=new Map;for(const[o,n]of mt({...pt,...null==t?void 0:t.features}))r.set(o,"discrete"===n.type?{...n,values:new Set(null!==(e=n.values)&&void 0!==e?e:[])}:{...n,extraValues:new Map(mt(null!==(i=null==n?void 0:n.extraValues)&&void 0!==i?i:{}))});return{solveUnknownFeature:null!==(o=null==t?void 0:t.solveUnknownFeature)&&void 0!==o?o:()=>"unknown",solveGeneralEnclosed:null!==(n=null==t?void 0:t.solveGeneralEnclosed)&&void 0!==n?n:()=>"unknown",isMediaTypeScreen:null!==(s=null==t?void 0:t.isMediaTypeScreen)&&void 0!==s?s:"unknown",isLegacyBrowser:null!==(a=null==t?void 0:t.isLegacyBrowser)&&void 0!==a?a:"unknown",features:r}},bt=(t,e)=>{const i="string"==typeof t?H(t):t;return z(i)?"false":vt(i,gt(e))},vt=(t,e)=>{const i=t.nodes.map((t=>void 0===t?"false":((t,e)=>{if("true"===e.isLegacyBrowser&&"only"===t.prefix)return"false";let i;i=void 0===t.type||"all"===t.type?"true":"screen"===t.type?e.isMediaTypeScreen:"print"===t.type?dt(e.isMediaTypeScreen):"false";const o=void 0===t.condition?"true":ct(t.condition,e),n=ut(i,o);return"not"===t.prefix?dt(n):n})(t,e)));if(0===i.length)return"true";{let t="false";for(const e of i){if("true"===e)return"true";"unknown"===e&&(t="unknown")}return t}},wt=function(t){const e=H(t),i=this,o={"prefers-lang":{type:"discrete",get values(){return[navigator.language.substring(0,2)]}},"map-projection":{type:"discrete",get values(){return[i.projection.toLowerCase()]}},"map-zoom":{type:"range",valueType:"integer",canBeNegative:!1,canBeZero:!0,get extraValues(){return{min:0,max:i.zoom}}},"map-top-left-easting":{type:"range",valueType:"integer",canBeNegative:!0,canBeZero:!0,get values(){return[Math.trunc(i.extent.topLeft.pcrs.horizontal)]}},"map-top-left-northing":{type:"range",valueType:"integer",canBeNegative:!0,canBeZero:!0,get values(){return[Math.trunc(i.extent.topLeft.pcrs.vertical)]}},"map-bottom-right-easting":{type:"range",valueType:"integer",canBeNegative:!0,canBeZero:!0,get values(){return[Math.trunc(i.extent.bottomRight.pcrs.horizontal)]}},"map-bottom-right-northing":{type:"range",valueType:"integer",canBeNegative:!0,canBeZero:!0,get values(){return[Math.trunc(i.extent.bottomRight.pcrs.vertical)]}},"prefers-color-scheme":{type:"discrete",get values(){return[window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"]}},"prefers-map-content":{type:"discrete",get values(){return M.options.contentPreference}}},n=t=>{let e=t.feature,n=t.value.value;return"prefers-lang"===e?o["prefers-lang"].values.includes(n).toString():"map-zoom"===e||"map-top-left-easting"===e||"map-top-left-northing"===e||"map-bottom-right-easting"===e||"map-bottom-right-northing"===e?function(t){const{context:e,feature:o,value:n,op:s}=t;if(!o.startsWith("map-"))return"unknown";const a=function(t){switch(t){case"map-zoom":return i.zoom;case"map-top-left-easting":return Math.trunc(i.extent.topLeft.pcrs.horizontal);case"map-top-left-northing":return Math.trunc(i.extent.topLeft.pcrs.vertical);case"map-bottom-right-easting":return Math.trunc(i.extent.bottomRight.pcrs.horizontal);case"map-bottom-right-northing":return Math.trunc(i.extent.bottomRight.pcrs.vertical);default:return}}(o);if(void 0===a)return"unknown";if("value"===e)return a===n.value?"true":"false";if("range"===e)switch(s){case"<":return a<n.value?"true":"false";case"<=":return a<=n.value?"true":"false";case">":return a>n.value?"true":"false";case">=":return a>=n.value?"true":"false";case"=":return a===n.value?"true":"false";default:return"unknown"}return"unknown"}(t):"map-projection"===e?o["map-projection"].values.some((t=>t===n)).toString():"prefers-color-scheme"===e?o["prefers-color-scheme"].values.some((t=>t===n)).toString():"prefers-map-content"===e?o[e].values.some((t=>t===n)).toString():"false"};let s="true"===bt(e,{features:o,solveUnknownFeature:n});const a=Object.assign(new EventTarget,{matches:s,media:t,listeners:[],addEventListener(t,e){"change"===t&&(this.listeners.push(e),0!==this.listeners.length&&r(),EventTarget.prototype.addEventListener.call(this,t,e))},removeEventListener(t,e){"change"===t&&(this.listeners=this.listeners.filter((t=>t!==e)),0===this.listeners.length&&l(),EventTarget.prototype.removeEventListener.call(this,t,e))}}),r=()=>{const t=()=>{const t="true"===bt(e,{features:o,solveUnknownFeature:n});t!==a.matches&&(a.matches=t,a.dispatchEvent(new Event("change")))};t.bind(this),this.addEventListener("map-projectionchange",t),this.addEventListener("map-moveend",t);const i=window.matchMedia("(prefers-color-scheme: dark)");i.addEventListener("change",t),l=()=>{this.removeEventListener("map-projectionchange",t),this.removeEventListener("map-moveend",t),i.removeEventListener("change",t)}};let l;return a};var xt=t.Control.Layers.extend({options:{autoZIndex:!1,sortLayers:!0,sortFunction:function(t,e){return t.options.zIndex<e.options.zIndex?-1:t.options.zIndex>e.options.zIndex?1:0}},initialize:function(e,i){for(var o in t.setOptions(this,i),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,e)this._addLayer(e[o],o,!0)},onAdd:function(){return this._initLayout(),t.DomEvent.on(this._container.getElementsByTagName("a")[0],"keydown",this._focusFirstLayer,this._container),t.DomEvent.on(this._container,"contextmenu",this._preventDefaultContextMenu,this),this._update(),this._layers.length<1&&!this._map._showControls?this._container.setAttribute("hidden",""):this._map._showControls=!0,this._container},onRemove:function(){t.DomEvent.off(this._container.getElementsByTagName("a")[0],"keydown",this._focusFirstLayer,this._container)},addOrUpdateOverlay:function(t,e){for(var i=!1,o=0;o<this._layers.length;o++)if(this._layers[o].layer===t){i=!0,this._layers[o].name=e;break}return i||this.addOverlay(t,e),this._layers.length>0&&(this._container.removeAttribute("hidden"),this._map._showControls=!0),this._map?this._update():this},removeLayer:function(e){t.Control.Layers.prototype.removeLayer.call(this,e),0===this._layers.length&&this._container.setAttribute("hidden","")},_checkDisabledLayers:function(){},_focusFirstLayer:function(t){if("Enter"===t.key&&"leaflet-control-layers leaflet-control leaflet-control-layers-expanded"===this.className){var e=this.children[1].children[2].children[0].children[0].children[0].children[0];e&&setTimeout((()=>e.focus()),0)}},_update:function(){if(!this._container)return this;t.DomUtil.empty(this._baseLayersList),t.DomUtil.empty(this._overlaysList),this._layerControlInputs=[];var e,i,o,n,s=0;for(this.options.sortLayers&&this._layers.sort(((t,e)=>this.options.sortFunction(t.layer,e.layer,t.name,e.name))),o=0;o<this._layers.length;o++)this._addItem(n=this._layers[o]),i=i||n.overlay,e=e||!n.overlay,s+=n.overlay?0:1;return this.options.hideSingleBase&&(this._baseLayersList.style.display=(e=e&&s>1)?"":"none"),this._separator.style.display=i&&e?"":"none",this},_addItem:function(e){var i=e.layer._layerEl._layerControlHTML;return e.input=i.querySelector("input.leaflet-control-layers-selector"),this._layerControlInputs.push(e.input),e.input.layerId=t.stamp(e.layer),this._overlaysList.appendChild(i),i},collapse:function(e){if(this._container.className.includes("expanded")&&this._map.contextMenu._extentLayerMenu.hidden&&this._map.contextMenu._layerMenu.hidden)return"SELECT"===e.target.tagName||e.relatedTarget&&e.relatedTarget.parentElement&&("mapml-contextmenu mapml-layer-menu"===e.relatedTarget.className||"mapml-contextmenu mapml-layer-menu"===e.relatedTarget.parentElement.className)||this._map&&"block"===this._map.contextMenu._layerMenu.style.display||(t.DomUtil.removeClass(this._container,"leaflet-control-layers-expanded"),"touch"===e.originalEvent?.pointerType&&(this._container._isExpanded=!1)),this},_preventDefaultContextMenu:function(t){let e=this._map.mouseEventToLatLng(t),i=this._map.mouseEventToContainerPoint(t);t.preventDefault(),this._container._isExpanded||"touch"!==t.pointerType?this._map.fire("contextmenu",{originalEvent:t,containerPoint:i,latlng:e}):this._container._isExpanded=!0}}),yt=t.Control.extend({options:{position:"topleft"},_getLocale:function(t){return t.options.mapEl&&t.options.mapEl.locale?t.options.mapEl.locale:M.options.locale},onAdd:function(e){let i=this._getLocale(e),o=t.DomUtil.create("div","mapml-reload-button leaflet-bar"),n=t.DomUtil.create("button","mapml-reload-button",o);return n.innerHTML="<span aria-hidden='true'>↺</span>",n.title=i.cmReload,n.setAttribute("type","button"),n.classList.add("mapml-button"),n.setAttribute("aria-label","Reload"),t.DomEvent.disableClickPropagation(n),t.DomEvent.on(n,"click",t.DomEvent.stop),t.DomEvent.on(n,"click",this._goReload,this),this._reloadButton=n,this._updateDisabled(),e.on("moveend",this._updateDisabled,this),o},onRemove:function(t){t.off("moveend",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_goReload:function(){!this._disabled&&this._map.options.mapEl._history.length>1&&this._map.options.mapEl.reload()},_updateDisabled:function(){setTimeout((()=>{t.DomUtil.removeClass(this._reloadButton,"leaflet-disabled"),this._reloadButton.setAttribute("aria-disabled","false"),this._map&&(this._disabled||this._map.options.mapEl._history.length<=1)&&(t.DomUtil.addClass(this._reloadButton,"leaflet-disabled"),this._reloadButton.setAttribute("aria-disabled","true"))}),0)}}),kt=t.Control.Scale.extend({options:{maxWidth:100,updateWhenIdle:!0,position:"bottomleft"},onAdd:function(e){e._container.insertAdjacentHTML("beforeend","<output role='status' aria-live='polite' aria-atomic='true' class='mapml-screen-reader-output-scale'></output>"),this._container=t.DomUtil.create("div","mapml-control-scale");let i=t.Control.Scale.prototype.onAdd.call(this,e);return this._container.appendChild(i),this._container.setAttribute("tabindex",0),this._scaleControl=this,setTimeout((()=>{this._updateOutput(),this._focusOutput()}),0),e.on("zoomend moveend",this._updateOutput,this),this._map._container.addEventListener("focus",(()=>this._focusOutput())),this._container},onRemove:function(t){t.off("zoomend moveend",this._updateOutput,this)},getContainer:function(){return this._container},_pixelsToDistance:function(t,e){let i=96*window.devicePixelRatio;return"metric"===e?t/i*2.54:t/i},_scaleLength:function(t){let e=t.getAttribute("style");return parseInt(e.match(/width:\s*(\d+)px/)[1])},_focusOutput:function(){setTimeout((()=>{let t=this._map._container.querySelector(".mapml-screen-reader-output-scale");t.textContent="",setTimeout((()=>{t.textContent=this._container.getAttribute("aria-label")}),100)}),0)},_updateOutput:function(){let t="",e=this._scaleControl.getContainer().getElementsByClassName("leaflet-control-scale-line")[0];this.options.metric?(t=`${parseFloat(this._pixelsToDistance(this._scaleLength(e),"metric").toFixed(1))} centimeters to ${e.textContent.trim()}`,t=t.replace(/(\d+)\s*m\b/g,"$1 meters"),t=t.replace(/ km/g," kilometers")):(t=`${parseFloat(this._pixelsToDistance(this._scaleLength(e),"imperial").toFixed(1))} inches to ${e.textContent.trim()}`,t=t.replace(/ft/g,"feet"),t=t.replace(/mi/g,"miles")),this._container.setAttribute("aria-label",t),this._map._container.querySelector(".mapml-screen-reader-output-scale").textContent=t}});
|
|
2
|
+
/*! Version: 0.90.0
|
|
3
|
+
Copyright (c) 2016 Dominik Moritz */
|
|
4
|
+
/*!
|
|
5
|
+
Copyright (c) 2016 Dominik Moritz
|
|
6
|
+
|
|
7
|
+
This file is part of the leaflet locate control. It is licensed under the MIT license.
|
|
8
|
+
You can find the project at: https://github.com/domoritz/leaflet-locatecontrol
|
|
9
|
+
*/
|
|
10
|
+
const _t=3.2808399;function zt(t,e){e.split(" ").forEach((e=>{t.classList.add(e)}))}function Mt(t,e){e.split(" ").forEach((e=>{t.classList.remove(e)}))}function Ct(t,e,i){const o=document.createElement(t);return e&&(o.className=e),i?.append(o),o}const Et=t.Marker.extend({initialize(e,i){t.Util.setOptions(this,i),this._latlng=e,this.createIcon()},createIcon(){const e=this.options,i=[["stroke",e.color],["stroke-width",e.weight],["fill",e.fillColor],["fill-opacity",e.fillOpacity],["opacity",e.opacity]].filter((([,t])=>void 0!==t)).map((([t,e])=>`${t}="${e}"`)).join(" "),o=this._getIconSVG(e,i);this._locationIcon=new t.DivIcon({className:o.className,html:o.svg,iconSize:[o.w,o.h]}),this.setIcon(this._locationIcon)},_getIconSVG(t,e){const i=t.radius,o=i+t.weight,n=2*o;return{className:"leaflet-control-locate-location",svg:`<svg xmlns="http://www.w3.org/2000/svg" width="${n}" height="${n}" version="1.1" viewBox="-${o} -${o} ${n} ${n}"><circle r="${i}" ${e} /></svg>`,w:n,h:n}},setStyle(e){t.Util.setOptions(this,e),this.createIcon()}}),Tt=Et.extend({initialize(e,i,o){t.Util.setOptions(this,o),this._latlng=e,this._heading=i,this.createIcon()},setHeading(t){this._heading=t},_getIconSVG(t,e){const i=t.radius,o=i+t.weight+t.depth,n=2*o;return{className:"leaflet-control-locate-heading",svg:`<svg xmlns="http://www.w3.org/2000/svg" width="${n}" height="${n}" version="1.1" viewBox="-${o} -${o} ${n} ${n}"><path d="${this._arrowPoints(i,t.width,t.depth,this._heading)}" ${e} /></svg>`,w:n,h:n}},_arrowPoints(t,e,i,o){const n=(o-90)*Math.PI/180,s=Math.cos(n),a=Math.sin(n),r=-Math.sin(n),l=Math.cos(n),h=e/2,c=t*s,d=t*a;return`M ${c+h*r},${d+h*l} L ${c-h*r},${d-h*l} L ${c+i*s},${d+i*a} Z`}}),Lt=t.Control.extend({options:{position:"topleft",layer:void 0,setView:"untilPanOrZoom",keepCurrentZoomLevel:!1,initialZoomLevel:!1,getLocationBounds:t=>t.bounds,flyTo:!1,clickBehavior:{inView:"stop",outOfView:"setView",inViewNotFollowing:"inView"},returnToPrevBounds:!1,cacheLocation:!0,drawCircle:!0,drawMarker:!0,showCompass:!0,compassAccuracyThreshold:45,markerClass:Et,compassClass:Tt,circleStyle:{className:"leaflet-control-locate-circle",color:"#136AEC",fillColor:"#136AEC",fillOpacity:.15,weight:0},markerStyle:{className:"leaflet-control-locate-marker",color:"#fff",fillColor:"#2A93EE",fillOpacity:1,weight:3,opacity:1,radius:9},compassStyle:{fillColor:"#2A93EE",fillOpacity:1,weight:0,color:"#fff",opacity:1,radius:9,width:9,depth:6},followCircleStyle:{},followMarkerStyle:{},followCompassStyle:{},icon:"leaflet-control-locate-location-arrow",iconLoading:"leaflet-control-locate-spinner",iconElementTag:"span",textElementTag:"small",circlePadding:[0,0],metric:!0,createButtonCallback(t,e){const i=Ct("a","leaflet-bar-part leaflet-bar-part-single",t);i.title=e.strings.title,i.href="#",i.setAttribute("role","button"),i.setAttribute("aria-label",e.strings.title);const o=Ct(e.iconElementTag,e.icon,i);return o.classList.add("leaflet-locate-icon"),void 0!==e.strings.text&&(Ct(e.textElementTag,"leaflet-locate-text",i).textContent=e.strings.text,i.classList.add("leaflet-locate-text-active"),i.parentNode.style.display="flex"),{link:i,icon:o}},onLocationError(t){alert(t.message)},onLocationOutsideMapBounds(t){t.stop(),alert(t.options.strings.outsideMapBoundsMsg)},showPopup:!0,strings:{title:"Show me where I am",metersUnit:"meters",feetUnit:"feet",popup:"You are within {distance} {unit} from this point",outsideMapBoundsMsg:"You seem located outside the boundaries of the map"},locateOptions:{maxZoom:1/0,watch:!0,setView:!1}},initialize(t={}){this.options=function(t){const e={};for(const i in t){const o=t[i];e[i]=Array.isArray(o)?[...o]:o?.constructor===Object?{...o}:o}return e}(this.options);for(const e in t){const i=t[e],o=this.options[e];i?.constructor===Object&&o?.constructor===Object?Object.assign(o,i):this.options[e]=i}this.options.followMarkerStyle={...this.options.markerStyle,...this.options.followMarkerStyle},this.options.followCircleStyle={...this.options.circleStyle,...this.options.followCircleStyle},this.options.followCompassStyle={...this.options.compassStyle,...this.options.followCompassStyle}},onAdd(e){const i=Ct("div","leaflet-control-locate leaflet-bar leaflet-control");this._container=i,this._map=e,this._layer=this.options.layer||new t.LayerGroup,this._layer.addTo(e),this._event=void 0,this._compassHeading=null,this._prevBounds=null;const o=this.options.createButtonCallback(i,this.options);return this._link=o.link,this._icon=o.icon,this._linkClickHandler=t=>{t.stopPropagation(),t.preventDefault(),this._onClick()},this._linkDblClickHandler=t=>t.stopPropagation(),this._link.addEventListener("click",this._linkClickHandler),this._link.addEventListener("dblclick",this._linkDblClickHandler),this._resetVariables(),this._map.on("unload",this._unload,this),i},onRemove(){this._link&&this._linkClickHandler&&this._link.removeEventListener("click",this._linkClickHandler),this._link&&this._linkDblClickHandler&&this._link.removeEventListener("dblclick",this._linkDblClickHandler),this._map&&this._map.off("unload",this._unload,this),this._linkClickHandler=null,this._linkDblClickHandler=null,this.stop()},_onClick(){this._justClicked=!0;const t=this._isFollowing();if(this._userPanned=!1,this._userZoomed=!1,this._active&&!this._event)this.stop();else if(this._active){const e=this.options.clickBehavior;let i=e.outOfView;switch(this._map.getBounds().contains(this._event.latlng)&&(i=t?e.inView:e.inViewNotFollowing),e[i]&&(i=e[i]),i){case"setView":this.setView();break;case"stop":this.stop(),this.options.returnToPrevBounds&&(this.options.flyTo?this._map.flyToBounds:this._map.fitBounds).bind(this._map)(this._prevBounds)}}else this.options.returnToPrevBounds&&(this._prevBounds=this._map.getBounds()),this.start();this._updateContainerStyle()},start(){this._activate(),this._event&&(this._drawMarker(this._map),this.options.setView&&this.setView()),this._updateContainerStyle()},stop(){this._deactivate(),this._cleanClasses(),this._resetVariables(),this._removeMarker()},stopFollowing(){this._userPanned=!0,this._updateContainerStyle(),this._drawMarker()},_activate(){!this._active&&this._map&&(this._map.locate(this.options.locateOptions),this._map.fire("locateactivate",this),this._active=!0,this._map.on("locationfound",this._onLocationFound,this),this._map.on("locationerror",this._onLocationError,this),this._map.on("dragstart",this._onDrag,this),this._map.on("zoomstart",this._onZoom,this),this._map.on("zoomend",this._onZoomEnd,this),this._activateCompass())},async _activateCompass(){if(!this.options.showCompass)return;const e="ondeviceorientationabsolute"in window;if(!e&&!("ondeviceorientation"in window))return;const i=e?"deviceorientationabsolute":"deviceorientation",o=window.DeviceOrientationEvent;if(void 0!==o&&"function"==typeof o.requestPermission)try{if("granted"!==await o.requestPermission())return}catch(t){return void console.warn("DeviceOrientation permission denied or unavailable:",t)}this._compassEventName=i,t.DomEvent.on(window,i,this._onDeviceOrientation,this)},_deactivate(){this._active&&this._map&&(this._map.stopLocate(),this._map.fire("locatedeactivate",this),this._active=!1,this.options.cacheLocation||(this._event=void 0),this._map.off("locationfound",this._onLocationFound,this),this._map.off("locationerror",this._onLocationError,this),this._map.off("dragstart",this._onDrag,this),this._map.off("zoomstart",this._onZoom,this),this._map.off("zoomend",this._onZoomEnd,this),this._deactivateCompass())},_deactivateCompass(){this._compassEventName&&(this._compassHeading=null,t.DomEvent.off(window,this._compassEventName,this._onDeviceOrientation,this),this._compassEventName=null)},_shouldKeepCurrentZoom(){const t=this.options.keepCurrentZoomLevel;if(Array.isArray(t)&&2===t.length){const e=this._map.getZoom(),[i,o]=t;return e>=i&&e<=o}return!0===t},setView(){if(this._drawMarker(),this._isOutsideMapBounds())return this._event=void 0,void this.options.onLocationOutsideMapBounds(this);const{latlng:t}=this._event,e=this.options.flyTo;let i,o;this._justClicked&&!1!==this.options.initialZoomLevel?(i=e?"flyTo":"setView",o=[t,this.options.initialZoomLevel]):this._shouldKeepCurrentZoom()?(i=e?"flyTo":"panTo",o=[t]):(i=e?"flyToBounds":"fitBounds",o=[this.options.getLocationBounds(this._event),{padding:this.options.circlePadding,maxZoom:this.options.locateOptions.maxZoom}]),this._setViewIgnoringEvents(i,o)},_setViewIgnoringEvents(t,e){this._ignoreEvent=!0,this._map[t](...e),requestAnimationFrame((()=>{this._ignoreEvent=!1}))},_drawCompass(){if(!this._event)return;const t=this._event.latlng;if(this.options.showCompass&&t&&null!==this._compassHeading){const e=this._isFollowing()?this.options.followCompassStyle:this.options.compassStyle;this._compass?(this._compass.setLatLng(t),this._compass.setHeading(this._compassHeading),this._compass.setStyle&&this._compass.setStyle(e)):this._compass=new this.options.compassClass(t,this._compassHeading,e).addTo(this._layer)}!this._compass||this.options.showCompass&&null!==this._compassHeading||(this._compass.removeFrom(this._layer),this._compass=null)},_drawMarker(){if(!this._event)return;const e=this._event.latlng,i=this._event.accuracy??0,o=this._isFollowing();if(this.options.drawCircle){const n=o?this.options.followCircleStyle:this.options.circleStyle;if(this._circle)this._circle.setLatLng(e).setRadius(i).setStyle(n);else{const o={...n,radius:i};this._circle=new t.Circle(e,o).addTo(this._layer)}}if(this.options.drawMarker){const t=o?this.options.followMarkerStyle:this.options.markerStyle;this._marker?(this._marker.setLatLng(e),this._marker.setStyle&&this._marker.setStyle(t)):this._marker=new this.options.markerClass(e,t).addTo(this._layer)}this._drawCompass(),this._bindPopup(e,i)},_bindPopup(e,i){const o=this.options.strings.popup;if(!this.options.showPopup||!o)return;let n,s,a;this.options.metric?(n=i.toFixed(0),s=this.options.strings.metersUnit,a=null!=this._event?.altitude?this._event.altitude.toFixed(1):"N/A"):(n=(i*_t).toFixed(0),s=this.options.strings.feetUnit,a=null!=this._event?.altitude?(this._event.altitude*_t).toFixed(1):"N/A");const r=null!=this._event?.speed?this._event.speed.toFixed(2):"N/A",l=null!=this._event?.heading?this._event.heading.toFixed(0):"N/A",h={distance:n,unit:s,lat:e.lat.toFixed(6),lng:e.lng.toFixed(6),altitude:a,speed:r,heading:l};let c;c="string"==typeof o?t.Util.template(o,h):"function"==typeof o?o(h):o,this._marker&&this._marker.bindPopup(c)._popup.setLatLng(e),this._compass&&this._compass.bindPopup(c)._popup.setLatLng(e)},_removeMarker(){this._layer.clearLayers(),this._marker=void 0,this._circle=void 0,this._compass=void 0},_unload(){this.stop(),this._map&&this._map.off("unload",this._unload,this)},_setCompassHeading(t){Number.isFinite(t)?(this._compassHeading=Math.round(t),requestAnimationFrame((()=>this._drawCompass()))):(this._compassHeading=null,this._drawCompass())},_onCompassNeedsCalibration(){this._setCompassHeading()},_onDeviceOrientation(t){if(this._active)if(null!=t.webkitCompassHeading){const e=this.options.compassAccuracyThreshold;if("number"==typeof e&&null!=t.webkitCompassAccuracy&&(t.webkitCompassAccuracy<0||t.webkitCompassAccuracy>e))return void this._setCompassHeading();const i=window.screen?.orientation?.angle??0;this._setCompassHeading((t.webkitCompassHeading+i)%360)}else null!==t.alpha&&this._setCompassHeading(360-t.alpha)},_onLocationError(t){if(3===t.code&&this.options.locateOptions.watch)return this._timeoutCount=(this._timeoutCount||0)+1,this._map.fire("locationtimeout",{error:t,control:this,count:this._timeoutCount}),void(this._timeoutCount>=3&&this._container&&zt(this._container,"locate-timeout"));this._timeoutCount=0,this.stop(),this.options.onLocationError(t,this)},_onLocationFound(t){if((this._event?.latlng?.lat!==t.latlng.lat||this._event?.latlng?.lng!==t.latlng.lng||this._event?.accuracy!==t.accuracy)&&this._active){switch(this._timeoutCount=0,this._container&&Mt(this._container,"locate-timeout"),this._event=t,this._drawMarker(),this._updateContainerStyle(),this._map.fire("locatelocationfound",{...t,control:this}),this.options.setView){case"once":this._justClicked&&this.setView();break;case"untilPan":this._userPanned||this.setView();break;case"untilPanOrZoom":this._userPanned||this._userZoomed||this.setView();break;case"always":this.setView()}this._justClicked=!1}},_onDrag(){this._event&&!this._ignoreEvent&&(this._userPanned=!0,this._updateContainerStyle(),this._drawMarker())},_onZoom(){this._event&&!this._ignoreEvent&&(this._userZoomed=!0,this._updateContainerStyle(),this._drawMarker())},_onZoomEnd(){this._event&&this._drawCompass(),this._event&&!this._ignoreEvent&&this._marker&&!this._map.getBounds().pad(-.3).contains(this._marker.getLatLng())&&(this._userPanned=!0,this._updateContainerStyle(),this._drawMarker())},_isFollowing(){return!(!this._active||"always"!==this.options.setView&&("untilPan"===this.options.setView?this._userPanned:"untilPanOrZoom"!==this.options.setView||this._userPanned||this._userZoomed))},_isOutsideMapBounds(){return void 0!==this._event&&this._map.options.maxBounds&&!this._map.options.maxBounds.contains(this._event.latlng)},_updateContainerStyle(){this._container&&(this._active&&!this._event?this._setClasses("requesting"):this._isFollowing()?this._setClasses("following"):this._active?this._setClasses("active"):this._cleanClasses())},_setClasses(t){switch(t){case"requesting":Mt(this._container,"active following"),zt(this._container,"requesting"),Mt(this._icon,this.options.icon),zt(this._icon,this.options.iconLoading);break;case"active":Mt(this._container,"requesting following"),zt(this._container,"active"),Mt(this._icon,this.options.iconLoading),zt(this._icon,this.options.icon);break;case"following":Mt(this._container,"requesting"),zt(this._container,"active following"),Mt(this._icon,this.options.iconLoading),zt(this._icon,this.options.icon)}},_cleanClasses(){Mt(this._container,"requesting active following"),Mt(this._icon,this.options.iconLoading),zt(this._icon,this.options.icon)},_resetVariables(){this._active=!1,this._justClicked=!1,this._timeoutCount=0,this._container&&Mt(this._container,"locate-timeout"),this._userPanned=!1,this._userZoomed=!1}});var jt=t.Control.extend({options:{position:"bottomright"},_getLocale:function(t){return t.options.mapEl&&t.options.mapEl.locale?t.options.mapEl.locale:M.options.locale},onAdd:function(e){t.Control.CustomLocate=Lt.extend({start:function(){Lt.prototype.start.call(this),e.getContainer().focus()},stop:function(){Lt.prototype.stop.call(this),e.getContainer().focus()}});let i=this._getLocale(e);this.locateControl=new t.Control.CustomLocate({showPopup:!1,strings:{title:i.btnLocTrackOff},position:this.options.position,locateOptions:{maxZoom:16}}).addTo(e);var o=this.locateControl._container,n=this.locateControl;return new MutationObserver((function(){o.classList.contains("active")&&o.classList.contains("following")?(o.firstChild.title=i.btnLocTrackOn,n._marker.bindTooltip(i.btnMyLocTrackOn,{permanent:!0})):o.classList.contains("active")?(o.firstChild.title=i.btnLocTrackLastKnown,n._marker.bindTooltip(i.btnMyLastKnownLocTrackOn)):o.firstChild.title=i.btnLocTrackOff})).observe(o,{attributes:!0,attributeFilter:["class"]}),o},stop:function(){return this.locateControl.stop()}}),Ot=t.Control.extend({options:{position:"topleft",title:{false:M.options.locale.btnFullScreen,true:M.options.locale.btnExitFullScreen}},_getLocale:function(t){return t.options.mapEl&&t.options.mapEl.locale?t.options.mapEl.locale:M.options.locale},onAdd:function(e){let i=this._getLocale(e);this.options.title={false:i.btnFullScreen,true:i.btnExitFullScreen};var o=t.DomUtil.create("div","leaflet-control-fullscreen leaflet-bar leaflet-control");return this.link=t.DomUtil.create("a","leaflet-control-fullscreen-button leaflet-bar-part",o),this.link.href="#",this.link.setAttribute("role","button"),this._map=e,this._map.on("fullscreenchange",this._toggleTitle,this),this._toggleTitle(),t.DomEvent.on(this.link,"click",this._click,this),o},onRemove:function(t){t.off("fullscreenchange",this._toggleTitle,this)},_click:function(e){t.DomEvent.stopPropagation(e),t.DomEvent.preventDefault(e),this._map.toggleFullscreen(this.options)},_toggleTitle:function(){this.link.title=this.options.title[this._map.isFullscreen()]}});t.Map.include({isFullscreen:function(){return this._isFullscreen||!1},toggleFullscreen:function(t){var i=e.getClosest(this.getContainer(),"gcds-ext-map");this.isFullscreen()?t&&t.pseudoFullscreen?this._disablePseudoFullscreen(i):document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.msExitFullscreen?document.msExitFullscreen():this._disablePseudoFullscreen(i):t&&t.pseudoFullscreen?this._enablePseudoFullscreen(i):i.requestFullscreen?i.requestFullscreen():i.mozRequestFullScreen?i.mozRequestFullScreen():i.webkitRequestFullscreen?i.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):i.msRequestFullscreen?i.msRequestFullscreen():this._enablePseudoFullscreen(i),this.getContainer().focus()},_enablePseudoFullscreen:function(e){t.DomUtil.addClass(e,"leaflet-pseudo-fullscreen"),this._setFullscreen(!0),this.fire("fullscreenchange")},_disablePseudoFullscreen:function(e){t.DomUtil.removeClass(e,"leaflet-pseudo-fullscreen"),this._setFullscreen(!1),this.fire("fullscreenchange")},_setFullscreen:function(i){this._isFullscreen=i;var o=e.getClosest(this.getContainer(),"gcds-ext-map");i?t.DomUtil.addClass(o,"mapml-fullscreen-on"):t.DomUtil.removeClass(o,"mapml-fullscreen-on"),this.invalidateSize()},_onFullscreenChange:function(){var t=e.getClosest(this.getContainer(),":fullscreen"),i=e.getClosest(this.getContainer(),"gcds-ext-map");t!==i||this._isFullscreen?t!==i&&this._isFullscreen&&(this._setFullscreen(!1),this.fire("fullscreenchange")):(this._setFullscreen(!0),this.fire("fullscreenchange"))}}),t.Map.mergeOptions({fullscreenControl:!1}),t.Map.addInitHook((function(){var e;if(this.options.fullscreenControl&&(this.fullscreenControl=new Ot(this.options.fullscreenControl),this.addControl(this.fullscreenControl)),"onfullscreenchange"in document?e="fullscreenchange":"onmozfullscreenchange"in document?e="mozfullscreenchange":"onwebkitfullscreenchange"in document?e="webkitfullscreenchange":"onmsfullscreenchange"in document&&(e="MSFullscreenChange"),e){var i=t.Util.bind(this._onFullscreenChange,this);this.whenReady((function(){t.DomEvent.on(document,e,i)})),this.on("unload",(function(){t.DomEvent.off(document,e,i)}))}}));var St=t.Control.extend({options:{position:"topleft"},_getLocale:function(t){return t.options.mapEl&&t.options.mapEl.locale?t.options.mapEl.locale:M.options.locale},onAdd:function(e){let i=this._getLocale(e);this._locale=i;let o=t.DomUtil.create("div","mapml-search-control leaflet-bar"),n=t.DomUtil.create("button","mapml-search-button mapml-button",o);n.setAttribute("type","button"),n.setAttribute("aria-label",i.btnSearch||"Search"),n.title=i.btnSearch||"Search",n.innerHTML='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 15 15" fill="currentColor"><path d="M6 0C9.31 0 12 2.69 12 6C12 7.3 11.59 8.5 10.89 9.48L14.71 13.29C15.1 13.68 15.1 14.32 14.71 14.71C14.32 15.1 13.68 15.1 13.29 14.71L9.48 10.89C8.5 11.59 7.3 12 6 12C2.69 12 0 9.31 0 6C0 2.69 2.69 0 6 0ZM6 2C3.79 2 2 3.79 2 6C2 8.21 3.79 10 6 10C8.21 10 10 8.21 10 6C10 3.79 8.21 2 6 2Z"/></svg>',t.DomEvent.disableClickPropagation(n),t.DomEvent.on(n,"click",t.DomEvent.stop),t.DomEvent.on(n,"click",this._openPanel,this),t.DomEvent.on(n,"keydown",(function(e){"Enter"===e.key&&(t.DomEvent.stop(e),this._openPanel())}),this),this._button=n;let s=t.DomUtil.create("div","mapml-search-panel");s.setAttribute("hidden",""),e.getContainer().appendChild(s),t.DomEvent.disableClickPropagation(s),t.DomEvent.on(s,"mouseenter",(function(){e.scrollWheelZoom.disable()})),t.DomEvent.on(s,"mouseleave",(function(){e.scrollWheelZoom.enable()})),t.DomEvent.on(s,"wheel",t.DomEvent.stopPropagation);let a=t.DomUtil.create("input","mapml-search-input",s);a.setAttribute("type","search"),a.setAttribute("placeholder",i.searchPlaceholder||"Search..."),a.setAttribute("aria-label",i.btnSearch||"Search"),t.DomEvent.disableClickPropagation(a),t.DomEvent.on(a,"keydown",(function(e){if("Escape"===e.key)t.DomEvent.stop(e),this._input.value?(this._input.value="",this._results.innerHTML=""):this._closePanel();else if("Enter"===e.key)t.DomEvent.stop(e),this._debounceTimer&&(clearTimeout(this._debounceTimer),this._debounceTimer=null),this._doSearch(this._input.value.trim());else if("ArrowDown"===e.key||"Down"===e.key){t.DomEvent.stop(e);let i=this._results.querySelector(".mapml-search-result");i&&i.focus()}}),this),this._debounceTimer=null,this._abortController=null,this._isComposing=!1,t.DomEvent.on(a,"compositionstart",(function(){this._isComposing=!0}),this),t.DomEvent.on(a,"compositionend",(function(){this._isComposing=!1;let t=this._input.value.trim();t.length<2?this._results.innerHTML="":(this._debounceTimer&&clearTimeout(this._debounceTimer),this._debounceTimer=setTimeout((()=>{this._fetchSuggestions(t)}),300))}),this),t.DomEvent.on(a,"input",(function(){if(this._isComposing)return;this._debounceTimer&&clearTimeout(this._debounceTimer);let t=this._input.value.trim();t.length<2?this._results.innerHTML="":this._debounceTimer=setTimeout((()=>{this._fetchSuggestions(t)}),300)}),this),this._input=a;let r=t.DomUtil.create("div","mapml-search-results",s);this._results=r;let l=t.DomUtil.create("button","mapml-search-close mapml-button",s);return l.setAttribute("type","button"),l.setAttribute("aria-label",i.btnSearchClose||"Close search"),l.title=i.btnSearchClose||"Close search",l.innerHTML='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" height="18" width="18" viewBox="0 0 24 24" fill="currentColor"><path d="M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"/></svg>',t.DomEvent.disableClickPropagation(l),t.DomEvent.on(l,"click",t.DomEvent.stop),t.DomEvent.on(l,"click",this._closePanel,this),this._closeBtn=l,this._panel=s,this._mapEl=e.options.mapEl,this._onLoadedMetadata=()=>this._updateDisabled(),this._layerObserver=new MutationObserver((t=>{this._updateDisabled();for(let e of t)for(let t of e.addedNodes)!t.nodeName||"MAP-LAYER"!==t.nodeName.toUpperCase()&&"LAYER-"!==t.nodeName.toUpperCase()||t.addEventListener("loadedmetadata",this._onLoadedMetadata)})),this._layerObserver.observe(this._mapEl,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["checked","rel"]}),this._mapEl.querySelectorAll("map-layer, layer-").forEach((t=>t.addEventListener("loadedmetadata",this._onLoadedMetadata))),this._updateDisabled(),o},onRemove:function(){this._panel&&this._panel.parentNode&&this._panel.parentNode.removeChild(this._panel),this._layerObserver&&this._layerObserver.disconnect(),this._mapEl&&this._mapEl.querySelectorAll("map-layer, layer-").forEach((t=>t.removeEventListener("loadedmetadata",this._onLoadedMetadata))),t.DomEvent.off(this._button,"click",this._openPanel,this),t.DomEvent.off(this._closeBtn,"click",this._closePanel,this)},_hasSearchLayers:function(){let t=this._mapEl.querySelectorAll("map-layer[checked], layer-[checked]");for(let e of t){let t=e.src?e.shadowRoot:e;if(t&&t.querySelector("map-link[rel=search]"))return!0}return!1},_updateDisabled:function(){this._hasSearchLayers()?this._button.setAttribute("aria-disabled","false"):(this._button.setAttribute("aria-disabled","true"),this._panel.hasAttribute("hidden")||this._closePanel())},_openPanel:function(){"true"!==this._button.getAttribute("aria-disabled")&&(this._panel.removeAttribute("hidden"),this._input.value="",this._results.innerHTML="",setTimeout((()=>{this._panel.classList.add("mapml-search-panel-open"),this._input.focus()}),0))},_closePanel:function(){this._panel.classList.remove("mapml-search-panel-open"),this._abortController&&(this._abortController.abort(),this._abortController=null),this._debounceTimer&&(clearTimeout(this._debounceTimer),this._debounceTimer=null);let t=()=>{this._panel.setAttribute("hidden",""),this._button.focus(),this._panel.removeEventListener("transitionend",t)};this._panel.addEventListener("transitionend",t),setTimeout(t,300)},_getLinks:function(t){let e=[],i=this._mapEl.querySelectorAll("map-layer[checked], layer-[checked]");for(let o of i){let i=o.src?o.shadowRoot:o;if(i){let n=i.querySelector("map-link[rel="+t+"]");n&&e.push({link:n,layer:o})}}return e},_getSearchLinks:function(){return this._getLinks("search")},_getSuggestionsLinks:function(){return this._getLinks("suggestions")},_resolveUrl:function(t,e){let i=(t.getAttribute("tref")||"").replace("{searchTerms}",encodeURIComponent(e));if(t.getBase)try{return new URL(i,t.getBase()).href}catch(t){return i}return i},_fetchSuggestions:function(t){if("true"===this._button.getAttribute("aria-disabled"))return;let e=this._getSuggestionsLinks();if(0===e.length)return;this._abortController&&this._abortController.abort(),this._abortController=new AbortController;let i=this._abortController.signal,o=e.map((({link:e,layer:o})=>{let n=this._resolveUrl(e,t);return fetch(n,{signal:i}).then((t=>t.json())).then((t=>({data:t,link:e,layer:o})))}));Promise.allSettled(o).then((e=>{if(i.aborted)return;let o=e.filter((t=>"fulfilled"===t.status)).map((t=>t.value)),n=new CustomEvent("mapsuggestions",{bubbles:!0,cancelable:!0,detail:{query:t,responses:o,setResults:this._setResults.bind(this)}});!this._mapEl.dispatchEvent(n)||this._defaultSuggestionsHandler({query:t,responses:o})}))},_doSearch:function(t){if(!t||"true"===this._button.getAttribute("aria-disabled"))return;let e=this._getSearchLinks();if(0===e.length)return;this._abortController&&this._abortController.abort(),this._abortController=new AbortController;let i=this._abortController.signal,o=e.map((({link:e,layer:o})=>{let n=this._resolveUrl(e,t);return fetch(n,{signal:i}).then((t=>t.json())).then((t=>({data:t,link:e,layer:o})))}));Promise.allSettled(o).then((e=>{if(i.aborted)return;let o=e.filter((t=>"fulfilled"===t.status)).map((t=>t.value)),n=new CustomEvent("mapsearch",{bubbles:!0,cancelable:!0,detail:{query:t,responses:o,setResults:this._setResults.bind(this)}});!this._mapEl.dispatchEvent(n)||this._defaultSearchHandler({query:t,responses:o})}))},_defaultSuggestionsHandler:function({responses:t}){this._renderResults(t)},_defaultSearchHandler:function({responses:t}){this._renderResults(t);for(let{data:e}of t)if(e&&e.features){for(let t of e.features){this._navigateToFeature(t);break}break}this._input.focus()},_navigateToFeature:function(e){let i=this._map,o=e.bbox;if(o&&4===o.length||!e.properties||!e.properties.extent||4!==e.properties.extent.length||(o=e.properties.extent),o&&4===o.length){let[e,n,s,a]=o;i.fitBounds(t.latLngBounds([n,e],[a,s]))}else if(e.geometry&&e.geometry.coordinates&&e.geometry.coordinates.length>=2){let[t,o]=e.geometry.coordinates;i.setView([o,t],e.properties&&e.properties.zoom||14)}},_renderResults:function(t){this._results.innerHTML="";for(let{data:e,layer:i}of t)if(e&&e.features)for(let t of e.features){let e=document.createElement("button");e.className="mapml-search-result",e.setAttribute("type","button"),e.textContent=this._formatResultName(t.properties),e.addEventListener("click",((t,e)=>()=>this._selectResult(t,e))(t,i)),e.addEventListener("keydown",this._resultKeydown.bind(this)),this._results.appendChild(e)}},_resultKeydown:function(e){let i=e.target,o=i.previousElementSibling,n=i.nextElementSibling;"ArrowDown"===e.key||"ArrowRight"===e.key||"Down"===e.key||"Right"===e.key?(t.DomEvent.stop(e),n&&n.classList.contains("mapml-search-result")&&n.focus()):"ArrowUp"===e.key||"ArrowLeft"===e.key||"Up"===e.key||"Left"===e.key?(t.DomEvent.stop(e),o&&o.classList.contains("mapml-search-result")?o.focus():this._input.focus()):"Escape"===e.key&&(t.DomEvent.stop(e),this._input.focus())},_formatResultName:function(t){if(!t)return this._locale?.searchResultWithNoName||"Unnamed";if(t.display_name)return t.display_name;let e=[t.name];for(let i of["city","county","state","country"])t[i]&&t[i]!==t.name&&e.push(t[i]);return e.filter(Boolean).join(", ")||this._locale?.searchResultWithNoName||"Unnamed"},_selectResult:function(t){let e=this._formatResultName(t.properties);this._input.value=e,this._doSearch(e)},_setResults:function(t){if(this._results.innerHTML="",t&&Array.isArray(t))for(let e of t){let t=document.createElement("button");t.className="mapml-search-result",t.setAttribute("type","button"),t.textContent=e.text||"",t.addEventListener("click",(t=>()=>{null!=t.value?(this._input.value=t.value,this._doSearch(t.value)):this._navigateToItem(t)})(e)),t.addEventListener("keydown",this._resultKeydown.bind(this)),this._results.appendChild(t)}},_navigateToItem:function(e){let i=this._map;if(e.bbox&&4===e.bbox.length){let[o,n,s,a]=e.bbox;i.fitBounds(t.latLngBounds([n,o],[a,s]))}else null!=e.lat&&null!=e.lng&&i.setView([e.lat,e.lng],14)}}),At=t.Layer.extend({onAdd:function(e){let i=e.getSize();(i.x>400||i.y>300)&&(this._container=t.DomUtil.create("table","mapml-debug",e._container),this._panel=Nt({className:"mapml-debug-panel",pane:this._container}),e.addLayer(this._panel)),this._grid=Rt({className:"mapml-debug-grid",pane:e._panes.mapPane,zIndex:400,tileSize:e.options.crs.options.crs.tile.bounds.max.x}),e.addLayer(this._grid),this._vectors=Ft({className:"mapml-debug-vectors",pane:e._panes.mapPane,toolPane:this._container}),e.addLayer(this._vectors)},onRemove:function(e){e.removeLayer(this._grid),e.removeLayer(this._vectors),this._panel&&(e.removeLayer(this._panel),t.DomUtil.remove(this._container))}}),Bt=t.Layer.extend({initialize:function(e){t.setOptions(this,e)},onAdd:function(e){this._title=t.DomUtil.create("caption","mapml-debug-banner",this.options.pane),this._title.innerHTML="Debug mode",e.debug={},e.debug._infoContainer=this._debugContainer=t.DomUtil.create("tbody","mapml-debug-panel",this.options.pane);let i=e.debug._infoContainer;e.debug._tileCoord=t.DomUtil.create("tr","mapml-debug-coordinates",i),e.debug._tileMatrixCoord=t.DomUtil.create("tr","mapml-debug-coordinates",i),e.debug._mapCoord=t.DomUtil.create("tr","mapml-debug-coordinates",i),e.debug._tcrsCoord=t.DomUtil.create("tr","mapml-debug-coordinates",i),e.debug._pcrsCoord=t.DomUtil.create("tr","mapml-debug-coordinates",i),e.debug._gcrsCoord=t.DomUtil.create("tr","mapml-debug-coordinates",i),this._map.on("mousemove",this._updateCoords)},onRemove:function(){t.DomUtil.remove(this._title),this._debugContainer&&(t.DomUtil.remove(this._debugContainer),this._map.off("mousemove",this._updateCoords))},_updateCoords:function(t){if(this.contextMenu._visible)return;let e=this.options.mapEl,i=e._map.project(t.latlng),o=e._map.options.crs.scale(+e.zoom),n=e._map.options.crs.transformation.untransform(i,o),s=e._map.options.crs.options.crs.tile.bounds.max.x,a=i.x%s,r=i.y%s;a<0&&(a+=s),r<0&&(r+=s),this.debug._tileCoord.innerHTML=`\n <th scope="row">tile: </th>\n <td>i: ${Math.trunc(a)}, </td>\n <td>j: ${Math.trunc(r)}</td>\n `,this.debug._mapCoord.innerHTML=`\n <th scope="row">map: </th>\n <td>i: ${Math.trunc(t.containerPoint.x)}, </td>\n <td>j: ${Math.trunc(t.containerPoint.y)}</td>\n `,this.debug._gcrsCoord.innerHTML=`\n <th scope="row">gcrs: </th>\n <td>lon: ${t.latlng.lng.toFixed(6)}, </td>\n <td>lat: ${t.latlng.lat.toFixed(6)}</td>\n `,this.debug._tcrsCoord.innerHTML=`\n <th scope="row">tcrs: </th>\n <td>x: ${Math.trunc(i.x)}, </td>\n <td>y: ${Math.trunc(i.y)}</td>\n `,this.debug._tileMatrixCoord.innerHTML=`\n <th scope="row">tilematrix: </th>\n <td>column: ${Math.trunc(i.x/s)}, </td>\n <td>row: ${Math.trunc(i.y/s)}</td>\n `,this.debug._pcrsCoord.innerHTML=`\n <th scope="row">pcrs: </th>\n <td>easting: ${n.x.toFixed(2)}, </td>\n <td>northing: ${n.y.toFixed(2)}</td>\n `}}),Nt=function(t){return new Bt(t)},Pt=t.GridLayer.extend({initialize:function(e){t.setOptions(this,e),t.GridLayer.prototype.initialize.call(this,this._map)},createTile:function(e){let i=t.DomUtil.create("div","mapml-debug-tile");return i.setAttribute("col",e.x),i.setAttribute("row",e.y),i.setAttribute("zoom",e.z),i.innerHTML=[`col: ${e.x}`,`row: ${e.y}`,`zoom: ${e.z}`].join(", "),i.style.outline="1px dashed red",i}}),Rt=function(t){return new Pt(t)},qt=t.LayerGroup.extend({initialize:function(e){t.setOptions(this,e),t.LayerGroup.prototype.initialize.call(this,this._map,e)},onAdd:function(e){e.on("overlayremove",this._mapLayerUpdate,this),e.on("overlayadd",this._mapLayerUpdate,this);let i=e.options.crs.transformation.transform(t.point(0,0),e.options.crs.scale(0));this._centerVector=t.circle(e.options.crs.pointToLatLng(i,0),{radius:250,className:"mapml-debug-vectors projection-centre"}),this._centerVector.bindTooltip("Projection Center"),this._addBounds(e)},onRemove:function(){this.clearLayers()},_addBounds:function(e){setTimeout((()=>{let i=Object.keys(e._layers),o=e._layers,n=["#FF5733","#8DFF33","#3397FF","#E433FF","#F3FF33"],s=0;this.addLayer(this._centerVector);for(let e of i)if(o[e].layerBounds||o[e].extentBounds){let i;i=o[e].layerBounds?[o[e].layerBounds.min,t.point(o[e].layerBounds.max.x,o[e].layerBounds.min.y),o[e].layerBounds.max,t.point(o[e].layerBounds.min.x,o[e].layerBounds.max.y)]:[o[e].extentBounds.min,t.point(o[e].extentBounds.max.x,o[e].extentBounds.min.y),o[e].extentBounds.max,t.point(o[e].extentBounds.min.x,o[e].extentBounds.max.y)];let a=o[e].extentBounds&&o[e].options.linkEl.getLayerEl().hasAttribute("data-testid")?o[e].options.linkEl.getLayerEl().getAttribute("data-testid"):o[e].layerBounds&&o[e].options?._leafletLayer?._layerEl?.hasAttribute("data-testid")?o[e].options._leafletLayer._layerEl.getAttribute("data-testid"):"",r=$t(i,{className:this.options.className.concat(" ",a),color:n[s%n.length],weight:2,opacity:1,fillOpacity:.01,fill:!0});o[e].options._leafletLayer&&r.bindTooltip(o[e].options._leafletLayer._title,{sticky:!0}),this.addLayer(r),s++}if(e.totalLayerBounds){let i=[e.totalLayerBounds.min,t.point(e.totalLayerBounds.max.x,e.totalLayerBounds.min.y),e.totalLayerBounds.max,t.point(e.totalLayerBounds.min.x,e.totalLayerBounds.max.y)],o=$t(i,{className:"mapml-debug-vectors mapml-total-bounds",color:"#808080",weight:5,opacity:.5,fill:!1});this.addLayer(o)}}),0)},_mapLayerUpdate:function(t){this.clearLayers(),this._addBounds(t.target)}}),Ft=function(t){return new qt(t)},It=t.Path.extend({getCenter:function(){return this._map.options.crs.unproject(t.bounds(this._locations).getCenter())},options:{className:"mapml-debug-extent"},initialize:function(e,i){this._locations=e,t.setOptions(this,i)},_project:function(){this._rings=[];let e=this._map.options.crs.scale(this._map.getZoom()),i=this._map;for(let o=0;o<this._locations.length;o++){let n=i.options.crs.transformation.transform(this._locations[o],e);this._rings.push(t.point(n.x,n.y)._subtract(i.getPixelOrigin()))}this._parts=[this._rings]},_update:function(){this._map&&this._renderer._updatePoly(this,!0)}}),$t=function(t,e){return new It(t,e)},Ut=t.Layer.extend({onAdd:function(e){this._container=t.DomUtil.create("div","mapml-crosshair",e._container),this._container.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 100 100"><g stroke="#fff" stroke-linecap="round" stroke-linejoin="round"><circle cx="50.028" cy="50.219" r="3.923" stroke-width="2" color="currentColor" overflow="visible"/><path stroke-width="3" d="M4.973 54.424h31.768a4.204 4.204 0 1 0 0-8.409H4.973A4.203 4.203 0 0 0 .77 50.22a4.203 4.203 0 0 0 4.204 4.205z" color="currentColor" overflow="visible"/><path stroke-width="3" d="M54.232 5.165a4.204 4.204 0 1 0-8.408 0v31.767a4.204 4.204 0 1 0 8.408 0V5.165z"/><path stroke-width="3" d="M99.288 50.22a4.204 4.204 0 0 0-4.204-4.205H63.317a4.204 4.204 0 1 0 0 8.409h31.767a4.205 4.205 0 0 0 4.204-4.205zM45.823 95.274a4.204 4.204 0 1 0 8.409 0V63.506a4.204 4.204 0 1 0-8.409 0v31.768z" color="currentColor" overflow="visible"/></g></svg>',e.isFocused=!1,this._isQueryable=!1,e.on("layerchange layeradd layerremove overlayremove",this._toggleEvents,this),e.on("popupopen",this._isMapFocused,this),t.DomEvent.on(e._container,"keydown keyup mousedown",this._isMapFocused,this),this._addOrRemoveCrosshair()},onRemove:function(e){e.off("layerchange layeradd layerremove overlayremove",this._toggleEvents),e.off("popupopen",this._isMapFocused),t.DomEvent.off(e._container,"keydown keyup mousedown",this._isMapFocused)},_toggleEvents:function(){this._hasQueryableLayer()?this._map.on("viewreset move moveend",this._addOrRemoveCrosshair,this):this._map.off("viewreset move moveend",this._addOrRemoveCrosshair,this),this._addOrRemoveCrosshair()},_addOrRemoveCrosshair:function(){this._hasQueryableLayer()?this._container.removeAttribute("hidden"):this._container.setAttribute("hidden","")},_addOrRemoveMapOutline:function(){this._map.isFocused&&!this._outline?this._outline=t.DomUtil.create("div","mapml-outline",this._map._container):!this._map.isFocused&&this._outline&&(t.DomUtil.remove(this._outline),delete this._outline)},_hasQueryableLayer:function(){let t=this._map.options.mapEl.layers;if(this._map.isFocused)for(let e of t)if(e.queryable&&e.queryable())return!0;return!1},_isMapFocused:function(t){if(!this._map._container.parentNode.activeElement)return void(this._map.isFocused=!1);let e=this._map._container.parentNode.activeElement.classList.contains("leaflet-container");this._map.isFocused=!(e&&["keydown"].includes(t.type)&&t.shiftKey&&9===t.keyCode)&&e&&["keyup","keydown"].includes(t.type),this._map.isFocused&&this._map.fire("mapkeyboardfocused"),this._addOrRemoveMapOutline(),this._addOrRemoveCrosshair()}}),Zt=t.Layer.extend({onAdd:function(e){this._container=t.DomUtil.create("div","mapml-feature-index-box",e._container),this._container.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 100 100"><path fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M0 0h100v100H0z" color="#000" overflow="visible"/></svg>',this._output=t.DomUtil.create("output","mapml-feature-index",e._container),this._output.setAttribute("role","status"),this._output.setAttribute("aria-live","polite"),this._output.setAttribute("aria-atomic","true"),this._body=t.DomUtil.create("span","mapml-feature-index-content",this._output),this._body.index=0,this._output.initialFocus=!1,e.on("focus blur popupclose",this._addOrRemoveFeatureIndex,this),e.on("moveend focus templatedfeatureslayeradd",this._checkOverlap,this),e.on("keydown",this._onKeyDown,this),this._addOrRemoveFeatureIndex()},_calculateReticleBounds:function(){let i=this._map.getPixelBounds(),o=i.getCenter(),n=Math.abs(i.min.x-i.max.x)/this._map.options.mapEl.width,s=Math.abs(i.min.y-i.max.y)/this._map.options.mapEl.height,a=getComputedStyle(this._container).width.replace(/[^\d.]/g,"");"%"===getComputedStyle(this._container).width.slice(-1)&&(a=a*this._map.options.mapEl.width/100);let r=n*a/2,l=s*a/2,h=t.point(o.x-r,o.y+l),c=t.point(o.x+r,o.y-l),d=t.bounds(h,c);return e.pixelToPCRSBounds(d,this._map.getZoom(),this._map.options.projection)},_checkOverlap:function(e){if("focus"===e.type&&(this._output.initialFocus=!0),!this._output.initialFocus)return;if(this._output.popupClosed)return void(this._output.popupClosed=!1);this._map.fire("mapkeyboardfocused");let i=this._calculateReticleBounds(),o=this._map.featureIndex.inBoundFeatures,n=1,s=Object.keys(o),a=this._body,r=document.createElement("span");r.innerHTML=this._map.options.mapEl.locale.fIndexNoFeatures,a.innerHTML="",a.index=0,a.allFeatures=[],s.forEach((e=>{let s=o[e].layer,r=o[e].layer._layers,l=t.bounds();if(r?Object.keys(r).forEach((e=>{l||(l=t.bounds(s._layers[e]._bounds.min,s._layers[e]._bounds.max)),l.extend(s._layers[e]._bounds.min),l.extend(s._layers[e]._bounds.max)})):s._bounds&&(l=t.bounds(s._bounds.min,s._bounds.max)),i.overlaps(l)){let t=o[e].path.getAttribute("aria-label");n<8&&a.appendChild(this._updateOutput(t,n,n)),n%7!=0&&1!==n||a.allFeatures.push([]),a.allFeatures[Math.floor((n-1)/7)].push({label:t,index:n,layer:s}),a.allFeatures[1]&&1===a.allFeatures[1].length&&a.appendChild(this._updateOutput("More results",0,9)),n+=1}})),this._addToggleKeys(),1===n&&a.appendChild(r)},_updateOutput:function(t,e,i){let o=document.createElement("span");return o.setAttribute("data-index",e),o.innerHTML=`<kbd>${i}</kbd> `+t+"<span>, </span>",o},_addToggleKeys:function(){let t=this._body.allFeatures;for(let e=0;e<t.length;e++){if(0===t[e].length)return;t[e-1]&&t[e].push({label:"Previous results"}),t[e+1]&&t[e+1].length>0&&t[e].push({label:"More results"})}},_onKeyDown:function(t){let e=this._body,i=t.originalEvent.keyCode;if(i>=49&&i<=55){if(!e.allFeatures[e.index])return;let t=e.allFeatures[e.index][i-49];if(!t)return;let o=t.layer;o&&(this._map.featureIndex.currentIndex=t.index-1,o._popup?(this._map.closePopup(),o.openPopup()):o.options.group.focus())}else 56===i?this._newContent(e,-1):57===i&&this._newContent(e,1)},_newContent:function(t,e){let i=t.firstChild.getAttribute("data-index"),o=t.allFeatures[Math.floor((i-1)/7+e)];if(o&&o.length>0){t.innerHTML="",t.index+=e;for(let e=0;e<o.length;e++){let i=o[e],n=e+1;"More results"===i.label&&(n=9),"Previous results"===i.label&&(n=8),t.appendChild(this._updateOutput(i.label,i.index?i.index:0,n))}}},_addOrRemoveFeatureIndex:function(t){if(this._output.initialFocus){if(this._output.hasAttribute("aria-hidden")){let t=this;setTimeout((function(){t._output.removeAttribute("aria-hidden")}),100)}}else this._output.setAttribute("aria-hidden","true");t&&"popupclose"===t.type?(this._output.setAttribute("aria-hidden","true"),this._output.popupClosed=!0):t&&"focus"===t.type?(this._container.removeAttribute("hidden"),this._output.classList.remove("mapml-screen-reader-output")):t&&t.target._popup?this._container.setAttribute("hidden",""):t&&"blur"===t.type?(this._container.setAttribute("hidden",""),this._output.classList.add("mapml-screen-reader-output"),this._output.initialFocus=!1,this._addOrRemoveFeatureIndex()):(this._container.setAttribute("hidden",""),this._output.classList.add("mapml-screen-reader-output"))}});const Dt=class{constructor(t){i(this,t)}get el(){return o(this)}lat=0;lon=0;zoom=0;projection="OSMTILE";controls=!1;static=!1;_controlslist;locale;_controlsList;_source;_history=[];_historyIndex=-1;_traversalCall=!1;_map;_container;mapCaptionObserver;_featureIndexOverlay;_zoomControl;_layerControl;_reloadButton;_fullScreenControl;_geolocationButton;_scaleBar;_searchButton;_isInitialized=!1;_debug;_crosshair;_boundDropHandler;_boundDragoverHandler;controlsChanged(t){this._map&&(t?this._showControls():this._hideControls())}controlsListChanged(t){this._controlsList&&(this._controlsList.value=t,this._map&&this._toggleControls())}get controlsList(){return this._controlsList}set controlsList(t){!this._controlsList||"string"!=typeof t&&null!==t||(t?this.el.setAttribute("controlslist",t):this.el.removeAttribute("controlslist"),this._map&&this._toggleControls())}async projectionChanged(t,e){if(t&&this._map&&this._map.options.projection!==t){const i=(()=>{let e=this.lat,i=this.lon,o=this.zoom;this._map.options.crs=window.M[t],this._map.options.projection=t;let n=[];this._map.announceMovement?.disable();const s=this.el.querySelectorAll("map-layer,layer-");for(let t of Array.from(s)){t.removeAttribute("disabled");let e=this.el.removeChild(t);this.el.appendChild(e),e.whenReady&&n.push(e.whenReady())}return Promise.allSettled(n).then((()=>{const t=this.el.layers;if(1===t.length){const e=t[0];e.extent&&(this._map.setMinZoom(e.extent.zoom.minZoom),this._map.setMaxZoom(e.extent.zoom.maxZoom))}this.zoomTo(e,i,o),window.M.options.announceMovement&&this._map.announceMovement?.enable(),setTimeout((()=>{this.el.dispatchEvent(new CustomEvent("map-projectionchange"))}),0)}))}).bind(this);try{if(await this.whenProjectionDefined(t),await i(),this._map&&this._map.options.projection!==e&&this._resetHistory(),this._debug)for(let t=0;t<2;t++)this.toggleDebug()}catch{throw new Error("Undefined projection: "+t)}}}get extent(){let t=this._map,i=e.pixelToPCRSBounds(t.getPixelBounds(),t.getZoom(),t.options.projection),o=e._convertAndFormatPCRS(i,t.options.crs,this.projection),n=1/0,s=-1/0;const a=this.el.layers;for(let t=0;t<a.length;t++)a[t].extent&&(a[t].extent.zoom.minZoom<n&&(n=a[t].extent.zoom.minZoom),a[t].extent.zoom.maxZoom>s&&(s=a[t].extent.zoom.maxZoom));return o.zoom={minZoom:n!==1/0?n:t.getMinZoom(),maxZoom:s!==-1/0?s:t.getMaxZoom()},o}getWidth(){return+window.getComputedStyle(this.el).width.replace("px","")}getHeight(){return+window.getComputedStyle(this.el).height.replace("px","")}staticChanged(){this._map&&this._toggleStatic()}componentWillLoad(){this._source=this.el.outerHTML,this._history=[],this._historyIndex=-1,this._traversalCall=!1}async connectedCallback(){try{this.el._history=this._history,this.el._historyIndex=this._historyIndex,Object.defineProperty(this.el,"width",{get:()=>+window.getComputedStyle(this.el).width.replace("px",""),set:t=>{this.el.setAttribute("width",t)},enumerable:!0,configurable:!0}),Object.defineProperty(this.el,"height",{get:()=>+window.getComputedStyle(this.el).height.replace("px",""),set:t=>{this.el.setAttribute("height",t)},enumerable:!0,configurable:!0}),await this._ensureControlsLoaded(),await this.whenProjectionDefined(this.projection),this._setLocale(),this._initShadowRoot(),this._controlsList=new h(this.el.getAttribute("controlslist"),this.el,"controlslist",["noreload","nofullscreen","nozoom","nolayer","noscale","geolocation","search"]);const t=()=>{var e=window.getComputedStyle(this.el),i=e.width,o=e.height;if(!i.endsWith("px")||!o.endsWith("px"))return void requestAnimationFrame(t);var n=this.el.hasAttribute("width")?this.el.getAttribute("width"):parseInt(i.replace("px","")),s=this.el.hasAttribute("height")?this.el.getAttribute("height"):parseInt(o.replace("px",""));this._changeWidth(n),this._changeHeight(s),this._createMap(),this._isInitialized=!0;const a=new MutationObserver((t=>{t.forEach((t=>{if("attributes"===t.type&&t.attributeName){const e=this.el.getAttribute(t.attributeName);"width"===t.attributeName&&e?this._changeWidth(e):"height"===t.attributeName&&e&&this._changeHeight(e)}}))}));a.observe(this.el,{attributes:!0,attributeFilter:["width","height"]}),this.el._attributeObserver=a,this.el.setAttribute("role","application"),this._toggleStatic();let r=this.el.querySelector("map-caption");null!==r&&setTimeout((()=>{this.el.getAttribute("aria-label")===r.innerHTML&&(this.mapCaptionObserver=new MutationObserver((()=>{this.el.querySelector("map-caption")!==r&&this.el.removeAttribute("aria-label")})),this.mapCaptionObserver.observe(this.el,{childList:!0}))}),0)};t()}catch(t){throw console.log(t),new Error("Error: "+t)}}_setLocale(){if(this.el.closest(":lang(fr)")===this.el)this.locale=s;else if(this.el.closest(":lang(en)")===this.el)this.locale=a;else{const t=document.head.querySelector("map-options");if(t&&t.textContent)try{const e=JSON.parse(t.textContent);if(e.locale)return void(this.locale=e.locale)}catch(t){console.warn("Failed to parse map-options:",t)}this.locale=a}}_initShadowRoot(){let t=this.el.shadowRoot;if(t.querySelector('[aria-label="Interactive map"]'))return;const e=()=>{if(0===t.styleSheets.length)return void requestAnimationFrame(e);let i=document.createElement("style");i.innerHTML=":host {all: initial;display: inline-block;background-color: white;height: 150px;width: 300px;contain: layout size;border-width: 2px;border-style: inset;}",t.appendChild(i)};e(),this._container=document.createElement("div"),this._container.insertAdjacentHTML("beforeend","<output role='status' aria-live='polite' aria-atomic='true' class='mapml-screen-reader-output'></output>"),this._container.setAttribute("role","region"),this._container.setAttribute("aria-label","Interactive map"),t.appendChild(this._container),this.el._container=this._container;let i=document.createElement("style");i.innerHTML="gcds-ext-map > * { display: none!important; }",this.el.appendChild(i)}_createMap(){this._map||(this._map=t.map(this._container,{center:new t.LatLng(this.lat,this.lon),minZoom:0,maxZoom:window.M[this.projection].options.resolutions.length-1,projection:this.projection,query:!0,contextMenu:!0,announceMovement:!0,featureIndex:!0,mapEl:this.el,crs:window.M[this.projection],zoom:this.zoom,zoomControl:!1}),this.el._map=this._map,window._debugMap=this._map,this.el._history=this._history,this.el._historyIndex=this._historyIndex,Object.defineProperty(this.el,"controlsList",{get:()=>this._controlsList,set:t=>{!this._controlsList||"string"!=typeof t&&null!==t||(this._controlsList.value=t||"",this._map&&this._toggleControls())},configurable:!0,enumerable:!0}),Object.defineProperty(this.el,"layers",{get:()=>this.el.getElementsByTagName("map-layer"),configurable:!0,enumerable:!0}),Object.defineProperty(this.el,"locale",{get:()=>this.locale,configurable:!0,enumerable:!0}),Object.defineProperty(this.el,"extent",{get:()=>this.extent,configurable:!0,enumerable:!0}),Object.defineProperty(this.el,"width",{get:()=>this.getWidth(),set:t=>{this.el.setAttribute("width",t),this._isInitialized&&this._changeWidth(t)},configurable:!0,enumerable:!0}),Object.defineProperty(this.el,"height",{get:()=>this.getHeight(),set:t=>{this.el.setAttribute("height",t),this._isInitialized&&this._changeHeight(t)},configurable:!0,enumerable:!0}),Object.defineProperty(this.el,"zoomTo",{value:(t,e,i)=>this.zoomTo(t,e,i),writable:!0,configurable:!0}),Object.defineProperty(this.el,"zoomToExtent",{value:(t,e,i,o)=>this.zoomToExtent(t,e,i,o),writable:!0,configurable:!0}),Object.defineProperty(this.el,"back",{value:()=>this.back(),writable:!0,configurable:!0}),Object.defineProperty(this.el,"forward",{value:()=>this.forward(),writable:!0,configurable:!0}),Object.defineProperty(this.el,"reload",{value:()=>this.reload(),writable:!0,configurable:!0}),Object.defineProperty(this.el,"toggleDebug",{value:()=>this.toggleDebug(),writable:!0,configurable:!0}),Object.defineProperty(this.el,"viewSource",{value:()=>this.viewSource(),writable:!0,configurable:!0}),Object.defineProperty(this.el,"matchMedia",{value:(...t)=>wt.apply(this.el,t),writable:!0,configurable:!0}),Object.defineProperty(this.el,"geojson2mapml",{value:(t,e)=>this.geojson2mapml(t,e),writable:!0,configurable:!0}),Object.defineProperty(this.el,"defineCustomProjection",{value:t=>this.defineCustomProjection(t),writable:!0,configurable:!0}),this.el._toggleFullScreen=()=>this._toggleFullScreen(),this.el._toggleControls=()=>this._toggleControls(),this._addToHistory(),this._createControls(),this._toggleControls(),this._crosshair=new Ut(undefined).addTo(this._map),window.M.options.featureIndexOverlayOption&&(this._featureIndexOverlay=new Zt(void 0).addTo(this._map)),this._setUpEvents())}disconnectedCallback(){this._removeEvents(),this.el._attributeObserver&&(this.el._attributeObserver.disconnect(),delete this.el._attributeObserver),delete this._map,this._deleteControls()}async _ensureControlsLoaded(){try{await import("./p-CtOuMgy9.js"),await import("./p-BUsJ7i5g.js").then((function(t){return t.d})),await import("./p-BUsJ7i5g.js").then((function(t){return t.e})),await import("./p-BUsJ7i5g.js").then((function(t){return t.k})),await import("./p-BUsJ7i5g.js").then((function(t){return t.i}))}catch(t){console.error("Failed to load MapML controls:",t)}}_createControls(){let e=this._map.getSize().y,i=0;var o;this._layerControl=(o={collapsed:!0,mapEl:this.el},new xt(null,o)).addTo(this._map),this._map.on("movestart",this._layerControl.collapse,this._layerControl),this.el._layerControl=this._layerControl;let n=window.M.options.announceScale;"metric"===n&&(n={metric:!0,imperial:!1}),"imperial"===n&&(n={metric:!1,imperial:!0}),this._scaleBar||(this._scaleBar=function(t){return new kt(t)}(n).addTo(this._map),this.el._scaleBar=this._scaleBar),!this._zoomControl&&i+93<=e&&(i+=93,this._zoomControl=t.control.zoom({zoomInTitle:this.locale.btnZoomIn,zoomOutTitle:this.locale.btnZoomOut}).addTo(this._map),this.el._zoomControl=this._zoomControl),this._searchButton||(this._searchButton=function(t){return new St(t)}({mapEl:this.el}).addTo(this._map),this.el._searchButton=this._searchButton),!this._reloadButton&&i+49<=e&&(i+=49,this._reloadButton=new yt(void 0).addTo(this._map),this.el._reloadButton=this._reloadButton),!this._fullScreenControl&&i+49<=e&&(i+=49,this._fullScreenControl=new Ot(void 0).addTo(this._map),this.el._fullScreenControl=this._fullScreenControl),this._geolocationButton||(this._geolocationButton=new jt(void 0).addTo(this._map),this.el._geolocationButton=this._geolocationButton),this.el.locate=this.locate.bind(this)}_toggleControls(){!1===this.controls?(this._hideControls(),this._map.contextMenu.toggleContextMenuItem("Controls","disabled")):(this._showControls(),this._map.contextMenu.toggleContextMenuItem("Controls","enabled"))}_hideControls(){this._setControlsVisibility("search",!0),this._setControlsVisibility("fullscreen",!0),this._setControlsVisibility("layercontrol",!0),this._setControlsVisibility("reload",!0),this._setControlsVisibility("zoom",!0),this._setControlsVisibility("geolocation",!0),this._setControlsVisibility("scale",!0)}_showControls(){this._setControlsVisibility("search",!0),this._setControlsVisibility("fullscreen",!1),this._setControlsVisibility("layercontrol",!1),this._setControlsVisibility("reload",!1),this._setControlsVisibility("zoom",!1),this._setControlsVisibility("geolocation",!0),this._setControlsVisibility("scale",!1),this._controlsList&&this._controlsList.forEach((t=>{switch(t.toLowerCase()){case"nofullscreen":this._setControlsVisibility("fullscreen",!0);break;case"nolayer":this._setControlsVisibility("layercontrol",!0);break;case"noreload":this._setControlsVisibility("reload",!0);break;case"nozoom":this._setControlsVisibility("zoom",!0);break;case"geolocation":this._setControlsVisibility("geolocation",!1);break;case"search":this._setControlsVisibility("search",!1);break;case"noscale":this._setControlsVisibility("scale",!0)}})),this._layerControl&&0===this._layerControl._layers.length&&this._layerControl._container.setAttribute("hidden","")}_deleteControls(){delete this._searchButton,delete this._layerControl,delete this._zoomControl,delete this._reloadButton,delete this._fullScreenControl,delete this._geolocationButton,delete this._scaleBar}_setControlsVisibility(t,e){let i;switch(t){case"search":this._searchButton&&(i=this._searchButton._container);break;case"zoom":this._zoomControl&&(i=this._zoomControl._container);break;case"reload":this._reloadButton&&(i=this._reloadButton._container);break;case"fullscreen":this._fullScreenControl&&(i=this._fullScreenControl._container);break;case"layercontrol":this._layerControl&&(i=this._layerControl._container);break;case"geolocation":this._geolocationButton&&(i=this._geolocationButton._container);break;case"scale":this._scaleBar&&(i=this._scaleBar._container)}i&&(e?([...i.children].forEach((t=>{t.setAttribute("hidden","")})),i.setAttribute("hidden","")):([...i.children].forEach((t=>{t.removeAttribute("hidden")})),i.removeAttribute("hidden")))}_toggleStatic(){this._map&&(this.static?(this._map.dragging.disable(),this._map.touchZoom.disable(),this._map.doubleClickZoom.disable(),this._map.scrollWheelZoom.disable(),this._map.boxZoom.disable(),this._map.keyboard.disable(),this._zoomControl.disable()):(this._map.dragging.enable(),this._map.touchZoom.enable(),this._map.doubleClickZoom.enable(),this._map.scrollWheelZoom.enable(),this._map.boxZoom.enable(),this._map.keyboard.enable(),this._zoomControl.enable()))}_removeEvents(){this._map&&this._map.off(),this._boundDropHandler&&this.el.removeEventListener("drop",this._boundDropHandler,!1),this._boundDragoverHandler&&this.el.removeEventListener("dragover",this._boundDragoverHandler,!1)}_setUpEvents(){this._boundDropHandler=this._dropHandler.bind(this),this._boundDragoverHandler=this._dragoverHandler.bind(this),this.el.addEventListener("drop",this._boundDropHandler,!1),this.el.addEventListener("dragover",this._boundDragoverHandler,!1),this._map.on("moveend",(function(){this._updateMapCenter(),this._addToHistory(),this.el.dispatchEvent(new CustomEvent("map-moveend",{detail:{target:this}}))}),this),this._map.on("zoom",(function(){this.el.dispatchEvent(new CustomEvent("map-zoom",{detail:{target:this}}))}),this),this._map.on("zoomend",(function(){this._updateMapCenter(),this.el.dispatchEvent(new CustomEvent("zoomend",{detail:{target:this}}))}),this),this._map.on("locationfound",(function(t){this.el.dispatchEvent(new CustomEvent("maplocationfound",{detail:{latlng:t.latlng,accuracy:t.accuracy}}))}),this),this._map.on("locationerror",(function(t){this.el.dispatchEvent(new CustomEvent("maplocationerror",{detail:{message:t.message,code:t.code}}))}),this);const t=(t=>{this.whenLayersReady().then((()=>{t&&t.layer._layerEl&&(this._map.setMaxZoom(this.extent.zoom.maxZoom),this._map.setMinZoom(this.extent.zoom.minZoom))}))}).bind(this);this.whenLayersReady().then((()=>{this._map.setMaxZoom(this.extent.zoom.maxZoom),this._map.setMinZoom(this.extent.zoom.minZoom),this._map.on("layeradd layerremove",t,this)})),this.el.addEventListener("keydown",(t=>{86===t.keyCode&&t.ctrlKey?navigator.clipboard.readText().then((t=>{e._pasteLayer(this.el,t)})):32===t.keyCode&&"INPUT"!==this.el.shadowRoot.activeElement?.nodeName&&(t.preventDefault(),this._map.fire("keypress",{originalEvent:t}))}))}_dropHandler(t){t.preventDefault();let i=t.dataTransfer.getData("text");e._pasteLayer(this.el,i)}_dragoverHandler(t){t.preventDefault(),t.dataTransfer.dropEffect="copy"}toggleDebug(){this._debug?(this._debug.remove(),this._debug=void 0):this._debug=(new At).addTo(this._map)}locate(t){this._geolocationButton&&this._geolocationButton.stop(),t?(t.zoomTo&&(t.setView=t.zoomTo,delete t.zoomTo),this._map.locate(t)):this._map.locate({setView:!0,maxZoom:16})}_changeWidth(t){if(this._container){this._container.style.width=t+"px";const e=this.el.shadowRoot.styleSheets;e.length>0&&(e[e.length-1].cssRules[0].style.width=t+"px")}this._map&&this._map.invalidateSize(!1)}_changeHeight(t){if(this._container){this._container.style.height=t+"px";const e=this.el.shadowRoot.styleSheets;e.length>0&&(e[e.length-1].cssRules[0].style.height=t+"px")}this._map&&this._map.invalidateSize(!1)}_updateMapCenter(){if(this._map){const t=this._map.getCenter();this.lat=t.lat,this.lon=t.lng,this.zoom=this._map.getZoom(),this.el.setAttribute("lat",this.lat.toString()),this.el.setAttribute("lon",this.lon.toString()),this.el.setAttribute("zoom",this.zoom.toString())}}_resetHistory(){this._history=[],this._historyIndex=-1,this._traversalCall=!1,this._addToHistory()}_addToHistory(){if(this._traversalCall&&this._traversalCall>0)return void this._traversalCall--;let t=this._map.getPixelBounds().getCenter(),e={zoom:this._map.getZoom(),x:t.x,y:t.y};this._historyIndex++,this._history.splice(this._historyIndex,0,e),this._historyIndex+1!==this._history.length&&(this._history.length=this._historyIndex+1),this._updateNavigationControls(),this.el._history=this._history,this.el._historyIndex=this._historyIndex}_updateNavigationControls(){const t=this._historyIndex<this._history.length-1,e=this._historyIndex>0;this._map.contextMenu.toggleContextMenuItem("Back",this._historyIndex>0?"enabled":"disabled"),this._map.contextMenu.toggleContextMenuItem("Forward",t?"enabled":"disabled"),this._map.contextMenu.toggleContextMenuItem("Reload",e?"enabled":"disabled"),e?this._reloadButton?.enable():this._reloadButton?.disable()}back(){if(this._historyIndex<=0)return;let t=this._history[this._historyIndex];this._historyIndex--;let e=this._history[this._historyIndex];if(e.zoom!==t.zoom){this._traversalCall=2;let i=this._map.options.crs.scale(t.zoom)/this._map.options.crs.scale(e.zoom);this._map.panBy([e.x*i-t.x,e.y*i-t.y],{animate:!1}),this._map.setZoom(e.zoom)}else this._traversalCall=1,this._map.panBy([e.x-t.x,e.y-t.y]);this._updateNavigationControls(),this.el._historyIndex=this._historyIndex}forward(){let t=this._history,e=t[this._historyIndex];if(this._historyIndex<t.length-1){this._map.contextMenu.toggleContextMenuItem("Back","enabled"),this._historyIndex++;let i=t[this._historyIndex];if(this._historyIndex===t.length-1&&this._map.contextMenu.toggleContextMenuItem("Forward","disabled"),i.zoom!==e.zoom){this._traversalCall=2;let t=this._map.options.crs.scale(e.zoom)/this._map.options.crs.scale(i.zoom);this._map.panBy([i.x*t-e.x,i.y*t-e.y],{animate:!1}),this._map.setZoom(i.zoom)}else this._traversalCall=1,this._map.panBy([i.x-e.x,i.y-e.y]);this._updateNavigationControls(),this.el._historyIndex=this._historyIndex}}reload(){if(0===this._history.length)return;let t=this._history[0],e={zoom:this._map.getZoom(),x:this._map.getPixelBounds().getCenter().x,y:this._map.getPixelBounds().getCenter().y};if(this._history=[t],this._historyIndex=0,t.zoom!==e.zoom){this._traversalCall=2;let i=this._map.options.crs.scale(e.zoom)/this._map.options.crs.scale(t.zoom);this._map.panBy([t.x*i-e.x,t.y*i-e.y],{animate:!1}),this._map.setZoom(t.zoom)}else this._traversalCall=1,this._map.panBy([t.x-e.x,t.y-e.y]);this._updateNavigationControls(),this.el._history=this._history,this.el._historyIndex=this._historyIndex,this._map.getContainer().focus()}_toggleFullScreen(){this._map.toggleFullscreen()}viewSource(){let t=new Blob([this._source],{type:"text/plain"}),e=URL.createObjectURL(t);window.open(e),URL.revokeObjectURL(e)}zoomToExtent(e,i,o,n){this._map?(this._map.fitBounds(t.latLngBounds([+i,+e],[+n,+o])),this._updateMapCenter()):console.warn("Map is not initialized. Cannot zoom to extent.")}zoomTo(e,i,o){if(!this._map)return void console.warn("Map is not initialized. Cannot zoom to location.");const n=void 0!==o&&Number.isInteger(+o)?+o:this.zoom,s=new t.LatLng(+e,+i);this._map.setView(s,n)}async whenProjectionDefined(t){return new Promise(((e,i)=>{window.M[t]?e(window.M[t]):i(new Error("Projection "+t+" is not defined"))}))}defineCustomProjection(t){if(window.M&&window.M.defineCustomProjection)return window.M.defineCustomProjection(t),JSON.parse(t).projection;throw new Error("MapML API not loaded")}async whenReady(){return new Promise(((t,e)=>{let i,o;this.el._map?t():(i=setInterval((function(e){e._map&&(clearInterval(i),clearTimeout(o),t())}),200,this.el),o=setTimeout((function(){clearInterval(i),clearTimeout(o),e("Timeout reached waiting for map to be ready")}),5e3))}))}async whenLayersReady(){let t=[];const e=this.el.querySelectorAll("map-layer");for(let i=0;i<e.length;i++){const o=e[i];o.whenReady&&t.push(o.whenReady())}return Promise.allSettled(t)}geojson2mapml(t,i={}){void 0===i.projection&&(i.projection=this.projection);let o=e.geojson2mapml(t,i);return this.el.appendChild(o),o}render(){return null}static get watchers(){return{controls:[{controlsChanged:0}],_controlslist:[{controlsListChanged:0}],projection:[{projectionChanged:0}],static:[{staticChanged:0}]}}};Dt.style=" .leaflet-pane, .leaflet-tile, .leaflet-marker-icon, .leaflet-marker-shadow, .leaflet-tile-container, .leaflet-pane > svg, .leaflet-pane > canvas, .leaflet-zoom-box, .leaflet-image-layer, .leaflet-layer { position: absolute; left: 0; top: 0; } .leaflet-container { overflow: hidden; } .leaflet-tile, .leaflet-marker-icon, .leaflet-marker-shadow { -webkit-user-select: none; -moz-user-select: none; user-select: none; -webkit-user-drag: none; } .leaflet-tile::selection { background: transparent; } .leaflet-safari .leaflet-tile { image-rendering: -webkit-optimize-contrast; } .leaflet-safari .leaflet-tile-container { width: 1600px; height: 1600px; -webkit-transform-origin: 0 0; } .leaflet-marker-icon, .leaflet-marker-shadow { display: block; } .leaflet-container .leaflet-overlay-pane svg { max-width: none !important; max-height: none !important; } .leaflet-container .leaflet-marker-pane img, .leaflet-container .leaflet-shadow-pane img, .leaflet-container .leaflet-tile-pane img, .leaflet-container img.leaflet-image-layer, .leaflet-container .leaflet-tile { max-width: none !important; max-height: none !important; width: auto; padding: 0; } .leaflet-container img.leaflet-tile { mix-blend-mode: plus-lighter; } .leaflet-container.leaflet-touch-zoom { -ms-touch-action: pan-x pan-y; touch-action: pan-x pan-y; } .leaflet-container.leaflet-touch-drag { -ms-touch-action: pinch-zoom; touch-action: none; touch-action: pinch-zoom; } .leaflet-container.leaflet-touch-drag.leaflet-touch-zoom { -ms-touch-action: none; touch-action: none; } .leaflet-container { -webkit-tap-highlight-color: transparent; } .leaflet-container a { -webkit-tap-highlight-color: rgba(51, 181, 229, 0.4); } .leaflet-tile { filter: inherit; visibility: hidden; } .leaflet-tile-loaded { visibility: inherit; } .leaflet-zoom-box { width: 0; height: 0; -moz-box-sizing: border-box; box-sizing: border-box; z-index: 800; } .leaflet-overlay-pane svg { -moz-user-select: none; } .leaflet-pane { z-index: 400; } .leaflet-tile-pane { z-index: 200; } .leaflet-overlay-pane { z-index: 400; } .leaflet-shadow-pane { z-index: 500; } .leaflet-marker-pane { z-index: 600; } .leaflet-tooltip-pane { z-index: 650; } .leaflet-popup-pane { z-index: 700; } .leaflet-map-pane canvas { z-index: 100; } .leaflet-map-pane svg { z-index: 200; } .leaflet-vml-shape { width: 1px; height: 1px; } .lvml { behavior: url(#default#VML); display: inline-block; position: absolute; } .leaflet-control { position: relative; z-index: 800; pointer-events: visiblePainted; pointer-events: auto; } .leaflet-top, .leaflet-bottom { position: absolute; z-index: 1000; pointer-events: none; } .leaflet-top { top: 0; } .leaflet-right { right: 0; } .leaflet-bottom { bottom: 0; } .leaflet-left { left: 0; } .leaflet-control { float: left; clear: both; } .leaflet-right .leaflet-control { float: right; } .leaflet-top .leaflet-control { margin-top: 10px; } .leaflet-bottom .leaflet-control { margin-bottom: 10px; } .leaflet-left .leaflet-control { margin-left: 10px; } .leaflet-right .leaflet-control { margin-right: 10px; } .leaflet-fade-anim .leaflet-popup { opacity: 0; -webkit-transition: opacity 0.2s linear; -moz-transition: opacity 0.2s linear; transition: opacity 0.2s linear; } .leaflet-fade-anim .leaflet-map-pane .leaflet-popup { opacity: 1; } .leaflet-zoom-animated { -webkit-transform-origin: 0 0; -ms-transform-origin: 0 0; transform-origin: 0 0; } svg.leaflet-zoom-animated { will-change: transform; } .leaflet-zoom-anim .leaflet-zoom-animated { -webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1); -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1); transition: transform 0.25s cubic-bezier(0,0,0.25,1); } .leaflet-zoom-anim .leaflet-tile, .leaflet-pan-anim .leaflet-tile { -webkit-transition: none; -moz-transition: none; transition: none; } .leaflet-zoom-anim .leaflet-zoom-hide { visibility: hidden; } .leaflet-interactive { cursor: pointer; } .leaflet-grab { cursor: -webkit-grab; cursor: -moz-grab; cursor: grab; } .leaflet-crosshair, .leaflet-crosshair .leaflet-interactive { cursor: crosshair; } .leaflet-popup-pane, .leaflet-control { cursor: auto; } .leaflet-dragging .leaflet-grab, .leaflet-dragging .leaflet-grab .leaflet-interactive, .leaflet-dragging .leaflet-marker-draggable { cursor: move; cursor: -webkit-grabbing; cursor: -moz-grabbing; cursor: grabbing; } .leaflet-marker-icon, .leaflet-marker-shadow, .leaflet-image-layer, .leaflet-pane > svg path, .leaflet-tile-container { pointer-events: none; } .leaflet-marker-icon.leaflet-interactive, .leaflet-image-layer.leaflet-interactive, .leaflet-pane > svg path.leaflet-interactive, svg.leaflet-image-layer.leaflet-interactive path { pointer-events: visiblePainted; pointer-events: auto; } .leaflet-container { background: #ddd; outline-offset: 1px; } .leaflet-container a { color: #0078A8; } .leaflet-zoom-box { border: 2px dotted #38f; background: rgba(255,255,255,0.5); } .leaflet-container { font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif; font-size: 12px; font-size: 0.75rem; line-height: 1.5; } .leaflet-bar { box-shadow: 0 1px 5px rgba(0,0,0,0.65); border-radius: 4px; } .leaflet-bar a { background-color: #fff; border-bottom: 1px solid #ccc; width: 26px; height: 26px; line-height: 26px; display: block; text-align: center; text-decoration: none; color: black; } .leaflet-bar a, .leaflet-control-layers-toggle { background-position: 50% 50%; background-repeat: no-repeat; display: block; } .leaflet-bar a:hover, .leaflet-bar a:focus { background-color: #f4f4f4; } .leaflet-bar a:first-child { border-top-left-radius: 4px; border-top-right-radius: 4px; } .leaflet-bar a:last-child { border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-bottom: none; } .leaflet-bar a.leaflet-disabled { cursor: default; background-color: #f4f4f4; color: #bbb; } .leaflet-touch .leaflet-bar a { width: 30px; height: 30px; line-height: 30px; } .leaflet-touch .leaflet-bar a:first-child { border-top-left-radius: 2px; border-top-right-radius: 2px; } .leaflet-touch .leaflet-bar a:last-child { border-bottom-left-radius: 2px; border-bottom-right-radius: 2px; } .leaflet-control-zoom-in, .leaflet-control-zoom-out { font: bold 18px 'Lucida Console', Monaco, monospace; text-indent: 1px; } .leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out { font-size: 22px; } .leaflet-control-layers { box-shadow: 0 1px 5px rgba(0,0,0,0.4); background: #fff; border-radius: 5px; } .leaflet-control-layers-toggle { background-image: url(images/layers.png); width: 36px; height: 36px; } .leaflet-retina .leaflet-control-layers-toggle { background-image: url(images/layers-2x.png); background-size: 26px 26px; } .leaflet-touch .leaflet-control-layers-toggle { width: 44px; height: 44px; } .leaflet-control-layers .leaflet-control-layers-list, .leaflet-control-layers-expanded .leaflet-control-layers-toggle { display: none; } .leaflet-control-layers-expanded .leaflet-control-layers-list { display: block; position: relative; } .leaflet-control-layers-expanded { padding: 6px 10px 6px 6px; color: #333; background: #fff; } .leaflet-control-layers-scrollbar { overflow-y: scroll; overflow-x: hidden; padding-right: 5px; } .leaflet-control-layers-selector { margin-top: 2px; position: relative; top: 1px; } .leaflet-control-layers label { display: block; font-size: 13px; font-size: 1.08333em; } .leaflet-control-layers-separator { height: 0; border-top: 1px solid #ddd; margin: 5px -10px 5px -6px; } .leaflet-default-icon-path { background-image: url(images/marker-icon.png); } .leaflet-container .leaflet-control-attribution { background: #fff; background: rgba(255, 255, 255, 0.8); margin: 0; } .leaflet-control-attribution, .leaflet-control-scale-line { padding: 0 5px; color: #333; line-height: 1.4; } .leaflet-control-attribution a { text-decoration: none; } .leaflet-control-attribution a:hover, .leaflet-control-attribution a:focus { text-decoration: underline; } .leaflet-attribution-flag { display: inline !important; vertical-align: baseline !important; width: 1em; height: 0.6669em; } .leaflet-left .leaflet-control-scale { margin-left: 5px; } .leaflet-bottom .leaflet-control-scale { margin-bottom: 5px; } .leaflet-control-scale-line { border: 2px solid #777; border-top: none; line-height: 1.1; padding: 2px 5px 1px; white-space: nowrap; -moz-box-sizing: border-box; box-sizing: border-box; background: rgba(255, 255, 255, 0.8); text-shadow: 1px 1px #fff; } .leaflet-control-scale-line:not(:first-child) { border-top: 2px solid #777; border-bottom: none; margin-top: -2px; } .leaflet-control-scale-line:not(:first-child):not(:last-child) { border-bottom: 2px solid #777; } .leaflet-touch .leaflet-control-attribution, .leaflet-touch .leaflet-control-layers, .leaflet-touch .leaflet-bar { box-shadow: none; } .leaflet-touch .leaflet-control-layers, .leaflet-touch .leaflet-bar { border: 2px solid rgba(0,0,0,0.2); background-clip: padding-box; } .leaflet-popup { position: absolute; text-align: center; margin-bottom: 20px; } .leaflet-popup-content-wrapper { padding: 1px; text-align: left; border-radius: 12px; } .leaflet-popup-content { margin: 13px 24px 13px 20px; line-height: 1.3; font-size: 13px; font-size: 1.08333em; min-height: 1px; } .leaflet-popup-content p { margin: 17px 0; margin: 1.3em 0; } .leaflet-popup-tip-container { width: 40px; height: 20px; position: absolute; left: 50%; margin-top: -1px; margin-left: -20px; overflow: hidden; pointer-events: none; } .leaflet-popup-tip { width: 17px; height: 17px; padding: 1px; margin: -10px auto 0; pointer-events: auto; -webkit-transform: rotate(45deg); -moz-transform: rotate(45deg); -ms-transform: rotate(45deg); transform: rotate(45deg); } .leaflet-popup-content-wrapper, .leaflet-popup-tip { background: white; color: #333; box-shadow: 0 3px 14px rgba(0,0,0,0.4); } .leaflet-container a.leaflet-popup-close-button { position: absolute; top: 0; right: 0; border: none; text-align: center; width: 24px; height: 24px; font: 16px/24px Tahoma, Verdana, sans-serif; color: #757575; text-decoration: none; background: transparent; } .leaflet-container a.leaflet-popup-close-button:hover, .leaflet-container a.leaflet-popup-close-button:focus { color: #585858; } .leaflet-popup-scrolled { overflow: auto; } .leaflet-oldie .leaflet-popup-content-wrapper { -ms-zoom: 1; } .leaflet-oldie .leaflet-popup-tip { width: 24px; margin: 0 auto; -ms-filter: \"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)\"; filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678); } .leaflet-oldie .leaflet-control-zoom, .leaflet-oldie .leaflet-control-layers, .leaflet-oldie .leaflet-popup-content-wrapper, .leaflet-oldie .leaflet-popup-tip { border: 1px solid #999; } .leaflet-div-icon { background: #fff; border: 1px solid #666; } .leaflet-tooltip { position: absolute; padding: 6px; background-color: #fff; border: 1px solid #fff; border-radius: 3px; color: #222; white-space: nowrap; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; pointer-events: none; box-shadow: 0 1px 3px rgba(0,0,0,0.4); } .leaflet-tooltip.leaflet-interactive { cursor: pointer; pointer-events: auto; } .leaflet-tooltip-top:before, .leaflet-tooltip-bottom:before, .leaflet-tooltip-left:before, .leaflet-tooltip-right:before { position: absolute; pointer-events: none; border: 6px solid transparent; background: transparent; content: \"\"; } .leaflet-tooltip-bottom { margin-top: 6px; } .leaflet-tooltip-top { margin-top: -6px; } .leaflet-tooltip-bottom:before, .leaflet-tooltip-top:before { left: 50%; margin-left: -6px; } .leaflet-tooltip-top:before { bottom: 0; margin-bottom: -12px; border-top-color: #fff; } .leaflet-tooltip-bottom:before { top: 0; margin-top: -12px; margin-left: -6px; border-bottom-color: #fff; } .leaflet-tooltip-left { margin-left: -6px; } .leaflet-tooltip-right { margin-left: 6px; } .leaflet-tooltip-left:before, .leaflet-tooltip-right:before { top: 50%; margin-top: -6px; } .leaflet-tooltip-left:before { right: 0; margin-right: -12px; border-left-color: #fff; } .leaflet-tooltip-right:before { left: 0; margin-left: -12px; border-right-color: #fff; } @media print { .leaflet-control { -webkit-print-color-adjust: exact; print-color-adjust: exact; } } .leaflet-control-locate { --locate-control-icon-color: black; --locate-control-active-color: #2074b6; --locate-control-following-color: #fc8428; } .leaflet-control-locate a .leaflet-control-locate-location-arrow { background-color: var(--locate-control-icon-color); width: 16px; height: 16px; margin: 7px; display: inline-block; -webkit-mask-position: center; mask-position: center; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; } .leaflet-control-locate a .leaflet-control-locate-spinner { background-color: var(--locate-control-icon-color); width: 16px; height: 16px; margin: 7px; display: inline-block; -webkit-mask-position: center; mask-position: center; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; } .leaflet-control-locate a .leaflet-locate-icon { color: var(--locate-control-icon-color); } .leaflet-control-locate a .leaflet-control-locate-location-arrow { -webkit-mask-image: url(\"data:image/svg+xml;charset=UTF-8,<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 512 512\\\"><path d=\\\"M445 4 29 195c-48 23-32 93 19 93h176v176c0 51 70 67 93 19L508 67c16-38-25-79-63-63z\\\"/></svg>\"); mask-image: url(\"data:image/svg+xml;charset=UTF-8,<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 512 512\\\"><path d=\\\"M445 4 29 195c-48 23-32 93 19 93h176v176c0 51 70 67 93 19L508 67c16-38-25-79-63-63z\\\"/></svg>\"); } .leaflet-control-locate a .leaflet-control-locate-spinner { animation: 2s linear infinite leaflet-control-locate-spin; -webkit-mask-image: url(\"data:image/svg+xml;charset=UTF-8,<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 512 512\\\"><path d=\\\"M304 48a48 48 0 1 1-96 0 48 48 0 0 1 96 0zm-48 368a48 48 0 1 0 0 96 48 48 0 0 0 0-96zm208-208a48 48 0 1 0 0 96 48 48 0 0 0 0-96zM96 256a48 48 0 1 0-96 0 48 48 0 0 0 96 0zm13 99a48 48 0 1 0 0 96 48 48 0 0 0 0-96zm294 0a48 48 0 1 0 0 96 48 48 0 0 0 0-96zM109 61a48 48 0 1 0 0 96 48 48 0 0 0 0-96z\\\"/></svg>\"); mask-image: url(\"data:image/svg+xml;charset=UTF-8,<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 512 512\\\"><path d=\\\"M304 48a48 48 0 1 1-96 0 48 48 0 0 1 96 0zm-48 368a48 48 0 1 0 0 96 48 48 0 0 0 0-96zm208-208a48 48 0 1 0 0 96 48 48 0 0 0 0-96zM96 256a48 48 0 1 0-96 0 48 48 0 0 0 96 0zm13 99a48 48 0 1 0 0 96 48 48 0 0 0 0-96zm294 0a48 48 0 1 0 0 96 48 48 0 0 0 0-96zM109 61a48 48 0 1 0 0 96 48 48 0 0 0 0-96z\\\"/></svg>\"); } .leaflet-control-locate.active a .leaflet-control-locate-location-arrow { background-color: var(--locate-control-active-color); } .leaflet-control-locate.active a .leaflet-locate-icon { color: var(--locate-control-active-color); } .leaflet-control-locate.following a .leaflet-control-locate-location-arrow { background-color: var(--locate-control-following-color); } .leaflet-control-locate.following a .leaflet-locate-icon { color: var(--locate-control-following-color); } .leaflet-control-locate.locate-timeout a .leaflet-control-locate-spinner { background-color: #f39c12; } .leaflet-bar .leaflet-locate-text-active { text-overflow: ellipsis; white-space: nowrap; align-items: center; width: auto; max-width: 200px; padding: 0 10px; display: flex; overflow: hidden; } .leaflet-bar .leaflet-locate-text-active .leaflet-locate-icon { padding: 0 5px 0 0; } .leaflet-touch .leaflet-bar .leaflet-locate-text-active { width: 100%; } .leaflet-control-locate-location circle { animation: 4s infinite leaflet-control-locate-throb; } @keyframes leaflet-control-locate-throb { 0% { stroke-width: 1px; } 50% { stroke-width: 3px; transform: scale(.8); } 100% { stroke-width: 1px; } } @keyframes leaflet-control-locate-spin { 0% { transform: rotate(0); } 100% { transform: rotate(360deg); } } @font-face { font-family: 'Lato'; src: url('fonts/lato/gcds-lato.woff2') format('woff2'), url('fonts/lato/gcds-lato.woff') format('woff'); font-weight: 700; font-style: normal; } @font-face { font-family: 'Lato'; src: url('fonts/lato/gcds-lato-italic.woff2') format('woff2'), url('fonts/lato/gcds-lato-italic.woff') format('woff'); font-weight: 700; font-style: italic; } @font-face { font-family: 'Noto Sans'; src: url('fonts/noto-sans/gcds-noto-sans-light.woff2') format('woff2'), url('fonts/noto-sans/gcds-noto-sans-light.woff') format('woff'); font-weight: 300; font-style: normal; } @font-face { font-family: 'Noto Sans'; src: url('fonts/noto-sans/gcds-noto-sans-light-italic.woff2') format('woff2'), url('fonts/noto-sans/gcds-noto-sans-light-italic.woff') format('woff'); font-weight: 300; font-style: italic; } @font-face { font-family: 'Noto Sans'; src: url('fonts/noto-sans/gcds-noto-sans-regular.woff2') format('woff2'), url('fonts/noto-sans/gcds-noto-sans-regular.woff') format('woff'); font-weight: 400; font-style: normal; } @font-face { font-family: 'Noto Sans'; src: url('fonts/noto-sans/gcds-noto-sans-regular-italic.woff2') format('woff2'), url('fonts/noto-sans/gcds-noto-sans-regular-italic.woff') format('woff'); font-weight: 400; font-style: italic; } @font-face { font-family: 'Noto Sans'; src: url('fonts/noto-sans/gcds-noto-sans-medium.woff2') format('woff2'), url('fonts/noto-sans/gcds-noto-sans-medium.woff') format('woff'); font-weight: 500; font-style: normal; } @font-face { font-family: 'Noto Sans'; src: url('fonts/noto-sans/gcds-noto-sans-medium-italic.woff2') format('woff2'), url('fonts/noto-sans/gcds-noto-sans-medium-italic.woff') format('woff'); font-weight: 500; font-style: italic; } @font-face { font-family: 'Noto Sans'; src: url('fonts/noto-sans/gcds-noto-sans-semibold.woff2') format('woff2'), url('fonts/noto-sans/gcds-noto-sans-semibold.woff') format('woff'); font-weight: 600; font-style: normal; } @font-face { font-family: 'Noto Sans'; src: url('fonts/noto-sans/gcds-noto-sans-semibold-italic.woff2') format('woff2'), url('fonts/noto-sans/gcds-noto-sans-semibold-italic.woff') format('woff'); font-weight: 600; font-style: italic; } @font-face { font-family: 'Noto Sans'; src: url('fonts/noto-sans/gcds-noto-sans-bold.woff2') format('woff2'), url('fonts/noto-sans/gcds-noto-sans-bold.woff') format('woff'); font-weight: 700; font-style: normal; } @font-face { font-family: 'Noto Sans'; src: url('fonts/noto-sans/gcds-noto-sans-bold-italic.woff2') format('woff2'), url('fonts/noto-sans/gcds-noto-sans-bold-italic.woff') format('woff'); font-weight: 700; font-style: italic; } @font-face { font-family: 'Noto Sans Mono'; src: url('fonts/noto-sans-mono/gcds-noto-sans-mono.woff2') format('woff2'), url('fonts/noto-sans-mono/gcds-noto-sans-mono.woff') format('woff'); font-weight: 400; font-style: normal; } @font-face { font-family: 'gcds-icons'; src: url('fonts/icons/gcds-icons.eot'); src: url('fonts/icons/gcds-icons.eot#iefix') format('embedded-opentype'), url('fonts/icons/gcds-icons.ttf') format('truetype'), url('fonts/icons/gcds-icons.woff') format('woff'), url('fonts/icons/gcds-icons.svg') format('svg'); font-weight: normal; font-style: normal; font-display: swap; } [class^='gcds-icon-'], [class*=' gcds-icon-'] { font-family: 'gcds-icons' !important; speak: never; font-style: normal; font-weight: normal; font-variant: normal; text-transform: none; line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .gcds-icon-arrow-down:before { content: '\\f013'; } .gcds-icon-arrow-up:before { content: '\\f011'; } .gcds-icon-arrow-up-down:before { content: '\\f012'; } .gcds-icon-checkmark-circle:before { content: '\\f021'; } .gcds-icon-chevron-down:before { content: '\\f020'; } .gcds-icon-chevron-left:before { content: '\\f01f'; } .gcds-icon-chevron-right:before { content: '\\f01e'; } .gcds-icon-chevron-up:before { content: '\\f01d'; } .gcds-icon-close:before { content: '\\f01c'; } .gcds-icon-download:before { content: '\\f01b'; } .gcds-icon-email:before { content: '\\f01a'; } .gcds-icon-exclamation-circle:before { content: '\\f019'; } .gcds-icon-external:before { content: '\\f018'; } .gcds-icon-filter:before { content: '\\f005'; } .gcds-icon-info-circle:before { content: '\\f017'; } .gcds-icon-phone:before { content: '\\f016'; } .gcds-icon-search:before { content: '\\f002'; } .gcds-icon-sort:before { content: '\\f003'; } .gcds-icon-tune:before { content: '\\f000'; } .gcds-icon-warning-triangle:before { content: '\\f014'; } .leaflet-container { background-color: transparent; font-family: var(--gcds-font-families-body, 'Noto Sans', sans-serif); max-height: 100%; max-width: 100%; min-height: 100%; min-width: 100%; width: 100% !important; height: 100% !important; } .leaflet-tile img { position: absolute; left: 0; top: 0; } .leaflet-fade-anim .leaflet-image-layer { will-change: opacity; } .leaflet-image-layer { visibility: hidden; } .leaflet-image-loaded { visibility: inherit; } .leaflet-control-scale-line, .leaflet-container .leaflet-control-scale, .leaflet-container .leaflet-control-attribution { font-size: 12px; } .leaflet-container { container: leafletmap / size; } .mapml-control-scale { inset-block-end: var(--gcds-spacing-100, 8px); inset-inline-start: 0; } @container leafletmap (max-height: 250px) { .mapml-control-scale { inset-inline-start: 45px; } } .leaflet-control-layers-overlays fieldset:disabled span.mapml-layer-item-name { font-style: italic; } .mapml-button { background-color: transparent; border: none; border-radius: 0; color: inherit; font: inherit; line-height: inherit; margin: 0; padding: 0; overflow: hidden; text-align: inherit; text-transform: none; -webkit-appearance: none; -moz-appearance: none; appearance: none; } .leaflet-container a { color: revert; } .mapml-reload-button, .leaflet-control-container a, .leaflet-container a.leaflet-popup-close-button, .leaflet-container a.leaflet-popup-close-button:hover { color: var(--gcds-color-black, #000); } .mapml-layer-item-name a { color: revert; } .leaflet-top .leaflet-control { margin-top: 5px; } .leaflet-left .leaflet-control { margin-left: 5px; } .leaflet-bar a, .mapml-reload-button { background-color: var(--gcds-color-white, #fff); box-sizing: border-box; width: 44px !important; height: 44px !important; line-height: 44px !important; font-size: 34px !important; font-weight: var(--gcds-font-weights-bold, bold); text-align: center; } .mapml-reload-button:hover, .mapml-reload-button[aria-disabled=\"true\"] { background-color: var(--gcds-bg-light, #f4f4f4); } .mapml-reload-button[aria-disabled=\"true\"] { cursor: default; } button.mapml-button:disabled, .mapml-button[aria-disabled=\"true\"] { color: var(--gcds-disabled-text, #bbb); } button.mapml-contextmenu-item:disabled { opacity: .3; } .leaflet-control-layers-toggle { width: 44px !important; height: 44px !important; } .leaflet-bar a, .leaflet-control-layers, .mapml-reload-button { border-color: var(--gcds-color-grayscale-100, #e3e3e3) !important; } .leaflet-control-layers, .mapml-reload-button { border-radius: var(--gcds-border-radius-md, 4px) !important; } .leaflet-touch .leaflet-bar a:last-child { border-end-start-radius: var(--gcds-border-radius-md, 4px) !important; border-end-end-radius: var(--gcds-border-radius-md, 4px) !important; } .leaflet-touch .leaflet-bar a:first-child { border-start-start-radius: var(--gcds-border-radius-md, 4px) !important; border-start-end-radius: var(--gcds-border-radius-md, 4px) !important; } .leaflet-touch .leaflet-control-layers, .leaflet-touch .leaflet-bar { border-style: inherit; } .mapml-contextmenu, .mapml-debug, .leaflet-bar, .leaflet-control-layers, .leaflet-popup-content-wrapper, .leaflet-tooltip-pane .leaflet-tooltip, .leaflet-touch .leaflet-control-layers, .leaflet-touch .leaflet-bar, .leaflet-popup-tip, .leaflet-container .leaflet-control-attribution { box-shadow: rgb(0 0 0 / 30%) 0px 1px 4px -1px; } .leaflet-control-attribution a { color: var(--gcds-link-default); text-decoration: revert; @media (hover: hover) { &:hover { text-decoration-thickness: var(--gcds-link-hover-decoration-thickness); color: var(--gcds-link-hover); } } &:visited:not(:focus) { color: var(--gcds-link-visited); } &:focus { background-color: var(--gcds-link-focus-background); color: var(--gcds-link-focus-text); border-radius: var(--gcds-link-focus-border-radius); box-shadow: var(--gcds-link-focus-box-shadow); outline: var(--gcds-link-focus-outline-width) solid var(--gcds-link-focus-background); outline-offset: var(--gcds-link-focus-outline-offset); text-decoration: none; } } .leaflet-container .leaflet-control-attribution { background-color: var(--gcds-bg-white, #fff); border-radius: 1.5em; color: currentColor; margin: var(--gcds-spacing-50, 5px); min-height: 30px; min-width: 30px; padding: 0; } .leaflet-control-attribution summary { display: block; list-style: none; border-radius: 100%; position: absolute; bottom: 0; left: calc(100% - 30px); line-height: 0; width: 30px; height: 30px; } .leaflet-control-attribution summary svg { border-radius: 100%; width: inherit; height: inherit; } .mapml-attribution-container { padding: 5px 35px 5px 10px; } .leaflet-control-zoom-in, .leaflet-control-zoom-out { text-indent: unset; } .leaflet-control-fullscreen a { background-image: url(\"data:image/svg+xml,%0A%3Csvg width='26' height='52' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg transform='translate(0 -1000.4)'%3E%3Cuse transform='translate(0 26)' width='100%25' height='100%25' xlink:href='%23a'/%3E%3Cuse transform='translate(0 26)' width='100%25' height='100%25' xlink:href='%23b'/%3E%3Cuse transform='translate(0 26)' width='100%25' height='100%25' xlink:href='%23c'/%3E%3Cuse transform='translate(0 26)' width='100%25' height='100%25' xlink:href='%23d'/%3E%3Cpath id='a' transform='translate(0 1000.4)' d='M5 15v6h6v-2H7v-4z' color='%23000' fill='%23000'/%3E%3Cpath id='b' transform='translate(0 1000.4)' d='M21 15v6h-6v-2h4v-4z' color='%23000' fill='%23000'/%3E%3Cpath d='M10 1037.4v4l1 1h4l1-1v-4l-1-1h-4z' color='%23000' fill='%23000'/%3E%3Cpath id='d' d='M5 1011.4v-6h6v2H7v4z' color='%23000' fill='%23000'/%3E%3Cpath id='c' d='M21 1011.4v-6h-6v2h4v4z' color='%23000' fill='%23000'/%3E%3C/g%3E%3C/svg%3E\"); background-repeat: no-repeat; background-size: 38px 76px; background-position: 3px 3px; } :host(:fullscreen) .leaflet-control-fullscreen a { background-position: 3px -35px; } :host(:-webkit-full-screen) { width: 100%!important; height: 100%!important; } :host(.leaflet-pseudo-fullscreen) { position: fixed!important; width: 100%!important; height: 100%!important; top: 0!important; left: 0!important; z-index: 99999; } .leaflet-control-layers.leaflet-control { margin-inline-end: 5px; margin-inline-start: 5px; padding: 0; } .leaflet-control-layers-list { padding: 0; } .leaflet-control-layers fieldset { margin: 0; padding: 0; min-height: 44px; } .leaflet-control-layers label { display: inline; } .mapml-control-layers > :not(summary) { display: block; margin-block-start: var(--gcds-spacing-50, 5px); margin-inline-start: var(--gcds-spacing-175, 15px); width: calc(100% - var(--gcds-spacing-175, 15px)); } .mapml-layer-item-style > div { display: flex; } .mapml-layer-item-style input { margin-inline-start: 0; } .leaflet-control .leaflet-control-layers-toggle { background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath d='m11.99 18.54-7.37-5.73L3 14.07l9 7 9-7-1.63-1.27zM12 16l7.36-5.73L21 9l-9-7-9 7 1.63 1.27L12 16zm0-11.47L17.74 9 12 13.47 6.26 9 12 4.53z'/%3E%3C/svg%3E\"); background-size: 34px; } .leaflet-control-layers-selector { margin-top: revert; position: revert; } .mapml-contextmenu { border-radius: var(--gcds-border-radius-md, 4px); padding: var(--gcds-spacing-50, 4px) 0; background-color: var(--gcds-bg-white, #fff); cursor: default; position: absolute; width: fit-content; display: inline-block; z-index: 10001; } .mapml-contextmenu button.mapml-contextmenu-item { color: var(--gcds-text-primary, #222); font-size: 12px; line-height: 20px; text-decoration: none; padding: 0 var(--gcds-spacing-150, 12px); border-block-start: var(--gcds-border-width-sm, 1px) solid transparent; border-block-end: var(--gcds-border-width-sm, 1px) solid transparent; cursor: default; width: 100%; display: block; } .mapml-contextmenu button.mapml-contextmenu-item.over { background-color: var(--gcds-bg-light, #f4f4f4); border-block-start: var(--gcds-border-width-sm, 1px) solid var(--gcds-bg-light, #f0f0f0); border-block-end: var(--gcds-border-width-sm, 1px) solid var(--gcds-bg-light, #f0f0f0); } .mapml-contextmenu-separator { border-block-end: var(--gcds-border-width-sm, 1px) solid var(--gcds-color-grayscale-100, #e3e3e3); margin: var(--gcds-spacing-50, 5px) 0; } .mapml-contextmenu.mapml-submenu { width: 80px; margin-block-end: -2rem; width: fit-content; } @supports (contain: layout) { .mapml-contextmenu { position: fixed; } .mapml-contextmenu.mapml-submenu { position: absolute; } } .mapml-contextmenu-item[aria-controls] span::after { content:\">\"; } @supports (list-style-type: disclosure-open) { .mapml-contextmenu-item[aria-controls] span { display: inline-block; } .mapml-contextmenu-item[aria-controls] span::after { content:\"\"; display: list-item; list-style-type: disclosure-closed; margin-inline-start: 20px; } } .mapml-debug { contain: content; max-height: 100%; max-width: 100%; border-radius: var(--gcds-border-radius-md, 4px); padding: var(--gcds-spacing-50, 5px) var(--gcds-spacing-125, 10px); background-color: var(--gcds-bg-white, #fff); cursor: default; z-index: 1000; position: absolute; display: block; top: auto; inset-inline-end: var(--gcds-spacing-50, 5px); inset-block-end: var(--gcds-spacing-50, 5px); inset-inline-start: var(--gcds-spacing-50, 5px); width: -webkit-fit-content; width: -moz-fit-content; width: fit-content; font: inherit; } .mapml-debug-banner { font-weight: var(--gcds-font-weights-bold, bold); text-transform: uppercase; display: inline-block; text-align: inline-start; line-height: 2; } .mapml-debug-panel, .mapml-debug-grid { font-family: var(--gcds-font-families-monospace, monospace); } .mapml-debug-tile { text-indent: 6px; line-height: 1.8; } .mapml-debug-coordinates { padding-inline-start: var(--gcds-spacing-50, 4px); padding-inline-end: var(--gcds-spacing-50, 4px); } .mapml-debug, .mapml-debug * { border-collapse: collapse; border-spacing: 0; } .mapml-debug-coordinates:empty { display: none; } .mapml-debug-coordinates > * { display: inline; } :host(.mapml-fullscreen-on) .mapml-debug-grid { color: var(--gcds-color-white, #fff); text-shadow: 1px 1px 1px var(--gcds-color-black, #000), 1px 1px 1px var(--gcds-color-black, #000); } :host(.leaflet-drag-target) .leaflet-grab { cursor: move; cursor: -webkit-grabbing; cursor: -moz-grabbing; cursor: grabbing; } :host(.leaflet-drag-target) .leaflet-control { pointer-events: none; } .mapml-popup-button, .leaflet-popup-close-button, .leaflet-control :not([draggable=\"true\"]), .mapml-contextmenu :not([draggable=\"true\"]) { -webkit-user-drag: none; } .leaflet-control, .mapml-contextmenu, .mapml-debug, .mapml-focus-buttons, .mapml-layer-item-settings summary { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .leaflet-control a::selection, .leaflet-popup-close-button::selection, .leaflet-control-attribution::selection { background-color: transparent; } .mapml-feature-index-box, .leaflet-tooltip, .leaflet-crosshair *, .mapml-layer-item-settings .mapml-control-layers summary label, .mapml-contextmenu-item > *, .mapml-link-preview { pointer-events: none!important; } .leaflet-container :focus { outline-color: -webkit-focus-ring-color !important; outline-style: auto !important; outline-width: thin !important; outline: revert !important; } .leaflet-active:not(:focus) { outline: unset !important; } .leaflet-container:not(:focus-within) .mapml-outline { outline: 0; } .leaflet-container:not(:focus-within) .mapml-crosshair { display: none; } .leaflet-control a { -webkit-tap-highlight-color: initial; } .leaflet-zoom-box { border: thin dotted; background-color: rgba(255,255,255,0.33); } label, input, button, summary { cursor: pointer; } .mapml-draggable, .mapml-draggable * { cursor: row-resize; } .leaflet-crosshair { cursor: crosshair; } [hidden] { display: none!important; } .leaflet-container .mapml-contextmenu, .leaflet-container .leaflet-control-container { visibility: unset!important; } .mapml-crosshair { margin: -36px 0 0 -36px; width: 72px; height: 72px; left: 50%; inset-block-start: 50%; position: absolute; z-index: 10000; } .mapml-popup-button { padding: 0 var(--gcds-spacing-50, 4px) 0 var(--gcds-spacing-50, 4px); border: none; text-align: center; font-size: 16px; line-height: 14px; color: inherit; text-decoration: none; font-weight: var(--gcds-font-weights-bold, bold); background: transparent; white-space: nowrap; box-sizing: border-box; width: 44px; height: 44px; line-height: 44px; } .mapml-zoom-link { display: block; text-align: center; } .mapml-focus-buttons { white-space: nowrap; } .mapml-feature-count { display:inline; white-space: nowrap; text-align: center; padding: var(--gcds-spacing-25, 2px); } .mapml-focus-buttons button, .leaflet-container a.leaflet-popup-close-button { width: 44px; height: 44px; min-width: 44px; min-height: 44px; line-height: 44px; } .leaflet-popup-content { margin: 0; min-width: min-content; scrollbar-width: thin; } .mapml-popup-content { padding-block-start: 44px; } .mapml-focus-buttons { display: block; text-align: center; } .mapml-focus-buttons button { display: inline-block; padding: 0; } .leaflet-container a.leaflet-popup-close-button { padding: 0; font-size: 20px; } .leaflet-popup-content .mapml-feature-count { margin: 0; padding: 0 var(--gcds-spacing-50, 5px); line-height: 44px; } .mapml-popup-content hr:last-of-type { margin-block-end: 0; border-block-end: 0; border-block-start: var(--gcds-border-width-sm, 1px) solid var(--gcds-color-grayscale-100, #e3e3e3); } .mapml-popup-content :first-child { margin-block-start: 0; padding-block-start: 0; } .mapml-popup-content > :not(.mapml-focus-buttons) { padding: 0 var(--gcds-spacing-200, 1rem); } .leaflet-popup-tip-container { margin-top: -1px; } .mapml-outline { outline-style: auto; outline-offset: -2px; z-index: 1000; pointer-events: none; position: absolute; height: 100%; width: 100%; color: initial; } @media print { .leaflet-control { -webkit-print-color-adjust: exact; print-color-adjust: exact; } } .leaflet-pane > svg g.leaflet-interactive, svg.leaflet-image-layer.leaflet-interactive g { pointer-events: visiblePainted; pointer-events: auto; } .mapml-link-preview { position: absolute; inset-inline-start: 0; inset-block-end: 0; background-color: var(--gcds-color-grayscale-100, rgb(222, 225, 230)); border-start-end-radius: var(--gcds-spacing-50, 5px); z-index: 1050; max-width: 60%; } .mapml-link-preview > p { margin-block-start: 3px; margin-inline-end: var(--gcds-spacing-50, 5px); margin-block-end: var(--gcds-spacing-25, 2px); margin-inline-start: 3px; color: var(--gcds-text-secondary, rgb(60, 64, 67)); text-overflow: ellipsis; overflow-x: hidden; white-space: nowrap; } .mapml-button-icon { pointer-events: none; } .mapml-button-icon svg { fill: currentColor; } .mapml-layer-item, .mapml-layer-item * { box-sizing: border-box; } .mapml-layer-item, .mapml-layer-grouped-extents, .mapml-layer-extent { background-color: var(--gcds-bg-white, #fff); border: var(--gcds-border-width-sm, 1px) solid var(--gcds-bg-white, #fff); margin: 0; padding: 0; } .mapml-layer-item:not(:last-of-type) { border-block-end: var(--gcds-border-width-sm, 1px) solid var(--gcds-color-grayscale-100, #e3e3e3); } .mapml-layer-item[aria-grabbed=\"true\"], .mapml-layer-extent[aria-grabbed=\"true\"] { border: var(--gcds-border-width-sm, 1px) solid var(--gcds-color-grayscale-100, #e3e3e3); border-radius: 0; } .mapml-layer-item:first-of-type, .mapml-layer-extent:first-of-type { border-start-start-radius: var(--gcds-border-radius-md, 4px); border-start-end-radius: var(--gcds-border-radius-md, 4px); } .mapml-layer-item:last-of-type, .mapml-layer-extent:last-of-type { border-end-start-radius: var(--gcds-border-radius-md, 4px); border-end-end-radius: var(--gcds-border-radius-md, 4px); } .mapml-layer-item-properties { align-items: center; display: flex; justify-content: space-between; padding-inline-start: .5rem; } .mapml-layer-item-controls { margin-inline-start: auto; } .mapml-layer-item-controls button span { font-size: large; font-weight: var(--gcds-font-weights-bold, 900); vertical-align: middle; } .mapml-layer-item-controls button svg { vertical-align: text-bottom; } .mapml-layer-item-controls, .mapml-layer-item-remove-control, .mapml-layer-item-settings-control { align-items: center; display: flex; justify-content: center; } .mapml-layer-item-remove-control, .mapml-layer-item-settings-control { min-height: 44px; min-width: 44px; height: 44px; width: 44px; } label.mapml-layer-item-toggle { display: inline-flex; align-items: center; width: 100%; min-height: 44px; } .mapml-layer-item-name { word-break: break-word; padding-block-start: .25rem; padding-block-end: .25rem; padding-inline-start: .25rem; padding-inline-end: 1rem; } .mapml-layer-item-settings > * { display: block; padding-block-start: .25rem; padding-block-end: .25rem; padding-inline-start: 2rem; padding-inline-end: 1rem; } .mapml-screen-reader-output { clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; } .mapml-screen-reader-output-scale { clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px } .mapml-vector-container svg :is( [role=\"link\"]:focus, [role=\"link\"]:hover, [role=\"link\"]:focus path, [role=\"link\"]:hover path, [role=\"link\"] path:focus, [role=\"link\"] path:hover, [role=\"button\"]:focus, [role=\"button\"]:hover, [role=\"button\"]:focus path, [role=\"button\"]:hover path, [role=\"button\"] path:focus, [role=\"button\"] path:hover, path[tabindex=\"0\"]:focus ) { stroke: #0000EE; stroke: LinkText; } .mapml-vector-container svg :is( [role=\"link\"]:focus:not(:focus-visible), [role=\"link\"]:focus:not(:focus-visible) path, [role=\"link\"] path:focus:not(:focus-visible), [role=\"button\"]:focus:not(:focus-visible), [role=\"button\"]:focus:not(:focus-visible) path, [role=\"button\"] path:focus:not(:focus-visible), path[tabindex=\"0\"]:focus:not(:focus-visible) ) { outline: 0!important; } .mapml-layer-item-settings .mapml-layer-extent { padding-inline-start: 1.8rem; } .mapml-layer-item-settings .mapml-layer-extent .mapml-layer-item-properties{ padding-inline-start: 0; } .mapml-layer-item-settings .mapml-layer-extent .mapml-layer-item-details { padding-inline-start: 1.6rem; } .mapml-feature-index-box { margin: -8% 0 0 -8%; width: 16%; left: 50%; top: 50%; position: absolute; z-index: 10000; outline: var(--gcds-border-width-md, 2px) solid var(--gcds-bg-white, #fff); } .mapml-feature-index-box:after{ display: block; content: ''; padding-block-start: 100%; } .mapml-feature-index-box > svg { position: absolute; width: 100%; height: 100%; } .mapml-feature-index { outline: var(--gcds-border-width-sm, 1px) solid var(--gcds-color-black, #000000); contain: content; border-radius: var(--gcds-border-radius-md, 4px); background-color: var(--gcds-bg-white, #fff); cursor: default; z-index: 1000; position: absolute; inset-block-start: auto; left: 50%; -ms-transform: translateX(-50%); transform: translateX(-50%); inset-block-end: var(--gcds-spacing-350, 30px); padding-block-start: var(--gcds-spacing-50, 5px); height: 92px; width: 450px; font-size: 16px; } @container leafletmap (max-width: 650px ) { .mapml-feature-index { width: 70cqw; } } @container leafletmap (max-width: 390px ) { .mapml-feature-index { inset-block-end: 100px; } } .mapml-feature-index-content > span{ width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-block; padding-inline-start: var(--gcds-spacing-50, 5px); padding-inline-end: var(--gcds-spacing-50, 5px); } .shortcuts-dialog > ul > li > kbd, .mapml-feature-index-content > span > kbd{ background-color: var(--gcds-color-grayscale-150, lightgrey); padding-inline-end: var(--gcds-spacing-50, 4px); padding-inline-start: var(--gcds-spacing-50, 4px); border-radius: var(--gcds-border-radius-md, 4px); } .mapml-feature-index-content > span > span{ clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: pre; width: 1px; } .shortcuts-dialog > button{ position: absolute; inset-inline-end: var(--gcds-spacing-100, 8px); inset-block-start: var(--gcds-spacing-100, 8px); display: inline-flex; align-items: center; justify-content: center; font-size: 1.125rem; padding: var(--gcds-spacing-50, 4px); line-height: 1; } .shortcuts-dialog { position: relative; } .shortcuts-dialog > ul { padding: 0; list-style-type:none; } .mapml-tile-group > svg { overflow: visible; } :host { all: initial; display: inline-block; background-color: white; height: 150px; width: 300px; contain: layout size; border-width: 2px; border-style: inset; } :host(.mapml-fullscreen-on) { background-color: white; } .mapml-map-container { width: 100%; height: 100%; display: block; } @layer reset, default, display, size, variant, hover, visited, focus; @layer reset { :host { position: relative; aspect-ratio: var(--map-aspect); } } @layer default { :host { border: 2px inset; cursor: pointer; transition: all 0.35s; } :host([frameborder=\"0\"]) { border-width: 0; } :host([hidden]) { display: none !important; } } .mapml-search-control { z-index: 1000; } .mapml-search-button { width: 44px; height: 44px; line-height: 44px; display: flex; align-items: center; justify-content: center; cursor: pointer; background: var(--gcds-bg-white, #fff); border: none; border-radius: var(--gcds-border-radius-md, 4px); padding: 0; } .mapml-search-button:hover { background: var(--gcds-bg-light, #f4f4f4); } .mapml-search-button[aria-disabled=\"true\"] { cursor: default; } .mapml-search-button[aria-disabled=\"true\"]:hover { background: var(--gcds-bg-white, #fff); } .mapml-search-panel[hidden] { display: none !important; } .mapml-search-panel { position: absolute; inset-block-start: 0; inset-inline-start: 0; width: 250px; height: 100%; background: var(--gcds-bg-white, #fff); box-shadow: 2px 0 5px rgba(0,0,0,0.2); display: flex; flex-direction: column; transform: translateX(-100%); transition: transform 0.2s ease-in-out; z-index: 10000; } .mapml-search-panel-open { transform: translateX(0); } .mapml-search-input { width: calc(100% - 16px); margin: var(--gcds-spacing-100, 8px); padding-block: 6px; padding-inline: var(--gcds-spacing-100, 8px); border: var(--gcds-border-width-sm, 1px) solid var(--gcds-color-grayscale-200, #ccc); border-radius: var(--gcds-border-radius-md, 4px); font-family: inherit; font-size: 14px; box-sizing: border-box; } .mapml-search-input:focus { outline: 2px solid var(--gcds-input-focus-border, #4A90D9); border-color: var(--gcds-input-focus-border, #4A90D9); } .mapml-search-results { flex: 1; overflow-y: auto; padding-block-start: 0; padding-inline: var(--gcds-spacing-100, 8px); padding-block-end: var(--gcds-spacing-100, 8px); } .mapml-search-result { display: block; width: 100%; padding: var(--gcds-spacing-100, 8px); border: none; border-block-end: var(--gcds-border-width-sm, 1px) solid var(--gcds-color-grayscale-100, #eee); background: var(--gcds-bg-white, #fff); text-align: start; font-family: inherit; font-size: 14px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .mapml-search-result:hover { background: var(--gcds-bg-light, #f0f0f0); } .mapml-search-result:focus { outline: 2px solid var(--gcds-focus-border, #4A90D9); outline-offset: -2px; } .mapml-search-close { position: absolute; inset-inline-end: -24px; inset-block-start: 50%; transform: translateY(-50%); width: 24px; height: 36px; display: flex; align-items: center; justify-content: center; cursor: pointer; background: var(--gcds-bg-white, #fff); border: var(--gcds-border-width-sm, 1px) solid var(--gcds-color-grayscale-200, #ccc); border-inline-start: none; border-start-start-radius: 0; border-start-end-radius: var(--gcds-border-radius-md, 4px); border-end-end-radius: var(--gcds-border-radius-md, 4px); border-end-start-radius: 0; box-shadow: 2px 0 3px rgba(0,0,0,0.1); visibility: hidden; } .mapml-search-panel-open .mapml-search-close { visibility: visible; } ";var Vt=t.LayerGroup.extend({options:{zIndex:0,opacity:"1.0"},initialize:function(e,i,o){t.LayerGroup.prototype.initialize.call(this,null,o),e&&(this._href=e),this._layerEl=i,this._content=i.src?i.shadowRoot:i,t.setOptions(this,o),this._container=t.DomUtil.create("div","leaflet-layer"),this.changeOpacity(this.options.opacity),t.DomUtil.addClass(this._container,"mapml-layer"),this._initialize(this._content)},getContainer:function(){return this._container},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getHref:function(){return this._href??""},_updateZIndex:function(){this._container&&null!=this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},changeOpacity:function(t){this._container.style.opacity=t,this._layerEl._opacity=t,this._layerEl._opacitySlider&&(this._layerEl._opacitySlider.value=t)},titleIsReadOnly(){return!!this._titleIsReadOnly},setName(t){this.titleIsReadOnly()||(this._title=t,this._layerEl._layerControlHTML.querySelector(".mapml-layer-item-name").innerHTML=t)},getName(){return this._title},onAdd:function(e){this.getPane().appendChild(this._container),t.LayerGroup.prototype.onAdd.call(this,e),this.setZIndex(this.options.zIndex),e.on("popupopen",this._attachSkipButtons,this)},_calculateBounds:function(){let i,o;delete this.bounds,delete this.zoomBounds,i=this._layerEl.src&&this._layerEl.shadowRoot.querySelector(":host > map-meta[name=extent][content]")?e.getBoundsFromMeta(this._layerEl.shadowRoot):this._layerEl.querySelector(":scope > map-meta[name=extent][content]")?e.getBoundsFromMeta(this._layerEl):void 0,o=this._layerEl.src&&this._layerEl.shadowRoot.querySelector(":host > map-meta[name=zoom][content]")?e.getZoomBoundsFromMeta(this._layerEl.shadowRoot):this._layerEl.querySelector(":scope > map-meta[name=zoom][content]")?e.getZoomBoundsFromMeta(this._layerEl):void 0;const s=this._layerEl.src?this._layerEl.shadowRoot.querySelectorAll("map-extent"):this._layerEl.querySelectorAll("map-extent");if(["_staticTileLayer","_mapmlvectors","_extentLayer"].forEach((e=>{let a,l,h,c;if(o&&(a=o.maxZoom,l=o.minZoom,c=o.maxNativeZoom?o.maxNativeZoom:-1/0,h=o.minNativeZoom?o.minNativeZoom:1/0),"_extentLayer"===e&&s.length){for(let e=0;e<s.length;e++)if(s[e]._extentLayer?.bounds){let n=s[e]._extentLayer;i?i.extend(n.bounds):i=t.bounds(n.bounds.min,n.bounds.max),n.zoomBounds&&(o?(a=Math.max(a,n.zoomBounds.maxZoom),l=Math.min(l,n.zoomBounds.minZoom),c=Math.max(c,n.zoomBounds.maxNativeZoom),h=Math.min(h,n.zoomBounds.minNativeZoom),o.minZoom=l,o.maxZoom=a,o.minNativeZoom=h,o.maxNativeZoom=c):o=n.zoomBounds)}}else this.eachLayer("_mapmlvectors"===e?function(t){t instanceof n&&t.layerBounds&&(i?i.extend(t.layerBounds):i=t.layerBounds),t instanceof n&&t.zoomBounds&&(o?(a=Math.max(a,t.zoomBounds.maxZoom),l=Math.min(l,t.zoomBounds.minZoom),c=Math.max(c,t.zoomBounds.maxNativeZoom),h=Math.min(h,t.zoomBounds.minNativeZoom),o.minZoom=l,o.maxZoom=a,o.minNativeZoom=h,o.maxNativeZoom=c):o=t.zoomBounds)}:t=>{t instanceof r&&(t.layerBounds&&(i?i.extend(t.layerBounds):i=t.layerBounds),t.zoomBounds&&(a=Math.max(a,t.zoomBounds.maxZoom),l=Math.min(l,t.zoomBounds.minZoom),c=Math.max(c,t.zoomBounds.maxNativeZoom),h=Math.min(h,t.zoomBounds.minNativeZoom),o.minZoom=l,o.maxZoom=a,o.minNativeZoom=h,o.maxNativeZoom=c))})})),i)this.bounds=i;else{let e=M[this.options.projection].options.bounds;this.bounds=t.bounds(e.min,e.max)}o||(o={}),o.minZoom||(o.minZoom=0),o.maxZoom||(o.maxZoom=M[this.options.projection].options.resolutions.length-1),o.minNativeZoom===1/0&&(o.minNativeZoom=o.minZoom),o.maxNativeZoom===-1/0&&(o.maxNativeZoom=o.maxZoom),this.zoomBounds=o},onRemove:function(e){t.LayerGroup.prototype.onRemove.call(this,e),t.DomUtil.remove(this._container),e.off("popupopen",this._attachSkipButtons)},getAttribution:function(){return this.options.attribution},getBase:function(){return new URL(this._content.querySelector("map-base")?this._content.querySelector("map-base").getAttribute("href"):"MAP-LAYER"===this._content.nodeName||"LAYER-"===this._content.nodeName?this._content.baseURI:this._href,this._href).href},renderStyles:l,_initialize:function(){var e=this;e.getBase();var i=this._content;!function(){var o,n,s=i.querySelector("map-link[rel=license]");s&&(o=s.getAttribute("title"),n='<a href="'+s.getAttribute("href")+'" title="'+o+'">'+o+"</a>"),t.setOptions(e,{attribution:n});var a=i.querySelector("map-link[rel=legend]");a&&(e._legendUrl=a.getAttribute("href")),e._map&&e._map.hasLayer(e)&&e._map.attributionControl.addAttribution(e.getAttribution())}(),i.querySelector("map-title")?(e._title=i.querySelector("map-title").textContent.trim(),e._titleIsReadOnly=!0):e._layerEl&&e._layerEl.hasAttribute("label")&&(e._title=e._layerEl.getAttribute("label").trim()),e._layerEl.parentElement&&e._layerEl.parentElement._toggleControls()},getQueryTemplates:function(t,e){const i=this._layerEl.querySelectorAll("map-extent[checked] map-link[rel=query]").length?this._layerEl.querySelectorAll("map-extent[checked] map-link[rel=query]"):this._layerEl.shadowRoot.querySelectorAll("map-extent[checked] map-link[rel=query]").length?this._layerEl.shadowRoot.querySelectorAll("map-extent[checked] map-link[rel=query]"):null;if(i){var o=[];for(let n=0;n<i.length;n++){const s=i[n].extent.zoom.minZoom,a=i[n].extent.zoom.maxZoom,r=t=>s<=t&&t<=a;i[n].getBounds().contains(t)&&r(e)&&o.push(i[n]._templateVars)}return o}},_attachSkipButtons:function(e){let i,o,n=e.popup,s=e.target,a=n._container.getElementsByClassName("mapml-popup-content")[0];n._container.setAttribute("role","dialog"),a.setAttribute("tabindex","-1"),a.setAttribute("role","document"),n._count=0,n._source._eventParents?(i=n._source._eventParents[Object.keys(n._source._eventParents)[0]],o=n._source.group,m.call(n)):(i=(n._source._layerEl.querySelector("map-extent")||n._source._layerEl.shadowRoot.querySelector("map-extent"))._extentLayer,s.on("attachZoomLink",m,n)),n._container.querySelector('nav[class="mapml-focus-buttons"]')&&(t.DomUtil.remove(n._container.querySelector('nav[class="mapml-focus-buttons"]')),t.DomUtil.remove(n._container.querySelector("hr")));let r=t.DomUtil.create("nav","mapml-focus-buttons"),l=t.DomUtil.create("button","mapml-popup-button",r);l.type="button",l.title=s.options.mapEl.locale.kbdFocusMap,l.innerHTML="<span aria-hidden='true'>|❮</span>",t.DomEvent.on(l,"click",(e=>{t.DomEvent.stop(e),s.featureIndex._sortIndex(),s.closePopup(),s._container.focus()}),n);let h=t.DomUtil.create("button","mapml-popup-button",r);h.type="button",h.title=s.options.mapEl.locale.kbdPrevFeature,h.innerHTML="<span aria-hidden='true'>❮</span>",t.DomEvent.on(h,"click",i._previousFeature,n),t.DomUtil.create("p","mapml-feature-count",r).innerText=n._count+1+"/"+(this._totalFeatureCount?this._totalFeatureCount:1);let c=t.DomUtil.create("button","mapml-popup-button",r);c.type="button",c.title=s.options.mapEl.locale.kbdNextFeature,c.innerHTML="<span aria-hidden='true'>❯</span>",t.DomEvent.on(c,"click",i._nextFeature,n);let d=t.DomUtil.create("button","mapml-popup-button",r);d.type="button",d.title=s.options.mapEl.locale.kbdFocusControls,d.innerHTML="<span aria-hidden='true'>❯|</span>",t.DomEvent.on(d,"click",(e=>{s.featureIndex._sortIndex(),s.featureIndex.currentIndex=s.featureIndex.inBoundFeatures.length-1,s.featureIndex.inBoundFeatures[0]?.path.setAttribute("tabindex",-1),s.featureIndex.inBoundFeatures[s.featureIndex.currentIndex]?.path.setAttribute("tabindex",0),t.DomEvent.stop(e),s.closePopup(),s._controlContainer.querySelector("A:not([hidden])").focus()}),n);let u=t.DomUtil.create("hr","mapml-popup-divider");function f(e){let i=e.originalEvent.path||e.originalEvent.composedPath(),a=9===e.originalEvent.keyCode,r=e.originalEvent.shiftKey;(i[0].classList.contains("leaflet-popup-close-button")&&a&&!r||27===e.originalEvent.keyCode||i[0].classList.contains("leaflet-popup-close-button")&&13===e.originalEvent.keyCode||i[0].classList.contains("mapml-popup-content")&&a&&r||i[0]===n._content.querySelector("a")&&a&&r)&&setTimeout((()=>{s.closePopup(n),o.focus(),t.DomEvent.stop(e)}),0)}function p(e){let i=e.originalEvent.path||e.originalEvent.composedPath(),o=9===e.originalEvent.keyCode,a=e.originalEvent.shiftKey;13===e.originalEvent.keyCode&&i[0].classList.contains("leaflet-popup-close-button")||27===e.originalEvent.keyCode?(t.DomEvent.stopPropagation(e),s.closePopup(n),s._container.focus(),27!==e.originalEvent.keyCode&&(s._popupClosed=!0)):o&&i[0].classList.contains("leaflet-popup-close-button")?s.closePopup(n):i[0].classList.contains("mapml-popup-content")&&o&&a?(s.closePopup(n),setTimeout((()=>{t.DomEvent.stop(e),s._container.focus()}),0)):i[0]===n._content.querySelector("a")&&o&&a&&(s.closePopup(n),setTimeout((()=>{t.DomEvent.stop(e),s.getContainer.focus()}),0))}function m(e){let i=this._wrapper,o=e?e.currFeature:this._source._groupLayer._featureEl;if(i.querySelector("a.mapml-zoom-link")&&i.querySelector("a.mapml-zoom-link").remove(),!o.querySelector("map-geometry"))return;let n=o.extent.topLeft.gcrs,a=o.extent.bottomRight.gcrs,r=t.latLngBounds(t.latLng(n.horizontal,n.vertical),t.latLng(a.horizontal,a.vertical)).getCenter(!0),l=document.createElement("a");l.href=`#${o.getZoomToZoom()},${r.lng},${r.lat}`,l.innerHTML=`${s.options.mapEl.locale.popupZoom}`,l.className="mapml-zoom-link",l.onclick=l.onkeydown=function(t){(t instanceof MouseEvent||13===t.keyCode)&&(t.preventDefault(),o.zoomTo(),s.closePopup(),s.getContainer().focus())};let h=i.querySelector(".mapml-zoom-link");h&&h.remove(),i.insertBefore(l,i.querySelector("hr.mapml-popup-divider"))}n._navigationBar=r,n._content.parentElement.parentElement.appendChild(u),n._content.parentElement.parentElement.appendChild(r),a.focus(),o&&!M.options.featureIndexOverlayOption?(o.setAttribute("aria-expanded","true"),s.on("keydown",f)):s.on("keydown",p),s.on("popupclose",(function t(e){e.popup===n&&(s.off("keydown",f),s.off("keydown",p),s.off("popupopen",m),s.off("popupclose",t),o&&o.setAttribute("aria-expanded","false"))}))}}),Ht=function(t,e,i){return t||e?new Vt(t,e,i):null},Yt=async function(){var e=t.DomUtil.create("fieldset","mapml-layer-item"),i=t.DomUtil.create("input"),o=t.DomUtil.create("span","mapml-layer-item-name"),n=t.DomUtil.create("span"),s=t.DomUtil.create("div","mapml-layer-item-properties",e),a=t.DomUtil.create("div","mapml-layer-item-settings",e),r=t.DomUtil.create("label","mapml-layer-item-toggle",s),l=t.DomUtil.create("div","mapml-layer-item-controls",s),h=t.DomUtil.create("details","mapml-layer-item-opacity mapml-control-layers",a),c=t.DomUtil.create("input"),d=t.DomUtil.create("summary"),u=t.SVG.create("svg"),f=t.SVG.create("path"),p=t.SVG.create("path"),m=t.DomUtil.create("fieldset","mapml-layer-grouped-extents"),g=this.parentNode;c.setAttribute("data-testid","layer-item-opacity"),u.setAttribute("viewBox","0 0 24 24"),u.setAttribute("height","22"),u.setAttribute("width","22"),u.setAttribute("fill","currentColor"),f.setAttribute("d","M0 0h24v24H0z"),f.setAttribute("fill","none"),p.setAttribute("d","M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"),u.appendChild(f),u.appendChild(p),a.hidden=!0,n.setAttribute("aria-hidden",!0);let b=t.DomUtil.create("button","mapml-layer-item-remove-control",l);b.type="button",b.title=g.locale.lmRemoveLayer,b.innerHTML="<span aria-hidden='true'>✕</span>",b.classList.add("mapml-button"),t.DomEvent.on(b,"click",t.DomEvent.stop),t.DomEvent.on(b,"click",(t=>{let e,i,o=0;if(i="GCDS-EXT-MAP"===g.tagName?g.shadowRoot:g.querySelector(".mapml-web-map").shadowRoot,t.target.closest("fieldset").nextElementSibling&&!t.target.closest("fieldset").nextElementSibling.disbaled)for(e=t.target.closest("fieldset").previousElementSibling;e;)o+=2,e=e.previousElementSibling;else e="link";g.removeChild(t.target.closest("fieldset").querySelector("span").layer._layerEl),e=e?i.querySelector(".leaflet-control-attribution").firstElementChild:e=i.querySelectorAll("input")[o],e.focus()}),this._layer);let v=t.DomUtil.create("button","mapml-layer-item-settings-control",l);if(v.type="button",v.title=g.locale.lmLayerSettings,v.setAttribute("aria-expanded",!1),v.classList.add("mapml-button"),t.DomEvent.on(v,"click",(t=>{let e=this._layer._layerEl._layerControl._container;e._isExpanded||"touch"!==t.pointerType?!0===a.hidden?(v.setAttribute("aria-expanded",!0),a.hidden=!1):(v.setAttribute("aria-expanded",!1),a.hidden=!0):e._isExpanded=!0}),this._layer),i.defaultChecked=this.checked,i.type="checkbox",i.setAttribute("class","leaflet-control-layers-selector"),i.setAttribute("data-testid","layer-item-checkbox"),o.layer=this._layer,i.addEventListener("change",function(){this.checked=!this.checked,this.dispatchEvent(new CustomEvent("map-change")),this._layerControlCheckbox.focus()}.bind(this)),this._layer._legendUrl){var w=document.createElement("a");w.text=" "+this._layer._title,w.href=this._layer._legendUrl,w.target="_blank",w.draggable=!1,o.appendChild(w)}else o.innerHTML=this._layer._title;o.id="mapml-layer-item-name-{"+t.stamp(o)+"}",d.innerText=g.locale.lcOpacity,d.id="mapml-layer-item-opacity-"+t.stamp(d),h.appendChild(d),h.appendChild(c),c.setAttribute("type","range"),c.setAttribute("min","0"),c.setAttribute("max","1.0"),c.setAttribute("value",this._opacity||"1.0"),c.setAttribute("step","0.1"),c.setAttribute("aria-labelledby","mapml-layer-item-opacity-"+t.stamp(d)),c.value=this._opacity||"1.0",c.addEventListener("change",function(t){t&&t.target&&t.target.value>=0&&t.target.value<=1&&this._layer.changeOpacity(t.target.value)}.bind(this)),e.setAttribute("aria-grabbed","false"),e.setAttribute("aria-labelledby",o.id),e.ontouchstart=e.onmousedown=t=>{if("label"===t.target.parentElement.tagName.toLowerCase()&&"input"!==t.target.tagName.toLowerCase()||"label"===t.target.tagName.toLowerCase()){t=t instanceof TouchEvent?t.touches[0]:t;let i=e,o=e.parentNode,n=!1,s=t.clientY,a=Array.from(o.querySelectorAll("fieldset")).indexOf(e);document.body.ontouchmove=document.body.onmousemove=t=>{t.preventDefault();let e=(t=t instanceof TouchEvent?t.touches[0]:t).clientY-s;if(n=Math.abs(e)>15||n,o&&!n||o&&o.childElementCount<=1||o.getBoundingClientRect().top>i.getBoundingClientRect().bottom||o.getBoundingClientRect().bottom<i.getBoundingClientRect().top)return;o.classList.add("mapml-draggable"),i.style.transform="translateY("+e+"px)",i.style.pointerEvents="none";let a=t.clientX,r=t.clientY,l=("GCDS-EXT-MAP"===g.tagName?g.shadowRoot:g.querySelector(".mapml-web-map").shadowRoot).elementFromPoint(a,r),h=l&&l.closest("fieldset")?l.closest("fieldset"):i;h=Math.abs(e)<=h.offsetHeight?i:h,i.setAttribute("aria-grabbed","true"),i.setAttribute("aria-dropeffect","move"),h&&o===h.parentNode&&(h=h!==i.nextSibling?h:h.nextSibling,i!==h&&(s=t.clientY,i.style.transform=null),o.insertBefore(i,h))},document.body.ontouchend=document.body.onmouseup=()=>{let t=Array.from(o.querySelectorAll("fieldset")).indexOf(e);if(i.setAttribute("aria-grabbed","false"),i.removeAttribute("aria-dropeffect"),i.style.pointerEvents=null,i.style.transform=null,a!==t){let t=o.children,e=1;for(let e of t){let t=e.querySelector("span").layer._layerEl;t.setAttribute("data-moving",""),g.insertAdjacentElement("beforeend",t),t.removeAttribute("data-moving")}let i=g.querySelectorAll("map-layer,layer-");for(let t=0;t<i.length;t++){let o=i[t]._layer;o.options.zIndex!==e&&o.setZIndex(e),e++}}o.classList.remove("mapml-draggable"),document.body.ontouchmove=document.body.onmousemove=document.body.onmouseup=null}}},r.appendChild(i),r.appendChild(o),v.appendChild(n),n.appendChild(u);let x=this.src?this.shadowRoot:this;var y=x.querySelectorAll('map-link[rel=style],map-link[rel="self style"],map-link[rel="style self"]');let k;y&&(k=this.getAlternateStyles(y),k&&a.appendChild(k)),this._layerControlCheckbox=i,this._layerControlLabel=r,this._opacityControl=h,this._opacitySlider=c,this._layerControlHTML=e,this._layerItemSettingsHTML=a,this._propertiesGroupAnatomy=m,this._styles=k,m.setAttribute("aria-label","Sublayers"),m.setAttribute("hidden","");let _=x.querySelectorAll("map-extent:not([hidden])"),z=[];for(let t=0;t<_.length;t++)z.push(_[t].whenReady()),m.removeAttribute("hidden");await Promise.all(z);for(let t=0;t<_.length;t++)m.appendChild(_[t].getLayerControlHTML());return a.appendChild(m),this._layerControlHTML};const Xt=class{constructor(t){i(this,t)}get el(){return o(this)}src;checked;hidden=!1;opacity=1;_opacity;media;get opacityValue(){return this._opacity??this.opacity??1}_layer;_layerControl;_layerControlHTML;_layerItemSettingsHTML;_propertiesGroupAnatomy;disabled=!1;_fetchError=!1;_layerRegistry=new Map;srcChanged(t,e){e!==t&&(this._onRemove(),this.el.isConnected&&this._onAdd())}checkedChanged(t){if(this._layer){const e=this.getMapEl();if(e&&e._map){const i=e._map;t?i.addLayer(this._layer):i.removeLayer(this._layer)}this._layerControlCheckbox&&(this._layerControlCheckbox.checked=t)}}opacityChanged(t,e){e!==t&&this._layer&&(this._opacity=t,this._layer.changeOpacity(t),this._opacitySlider&&(this._opacitySlider.value=t.toString()))}mediaChanged(t,e){e!==t&&this._registerMediaQuery(t)}hiddenChanged(t,e){e!==t&&this._layer&&this._layerControl&&this._applyHiddenState(t)}_applyHiddenState(t){this._layer&&this._layerControl&&(t?this._layerControl.removeLayer(this._layer):(this._layerControl.addOrUpdateOverlay(this._layer,this.label),this._validateDisabled()))}loggedMessages;_observer;_mql;_changeHandler;_boundCreateLayerControlHTML;_layerControlCheckbox;_layerControlLabel;_opacityControl;_opacitySlider;_styles;get label(){return this._layer?this._layer.getName():this.el.hasAttribute("label")?this.el.getAttribute("label"):""}set label(t){t&&(this.el.setAttribute("label",t),this._layer&&this._layer.setName(t))}get extent(){return this._layer&&this._layer._calculateBounds(),this._layer?Object.assign(e._convertAndFormatPCRS(this._layer.bounds,window.M[this.getProjection()],this.getProjection()),{zoom:this._layer.zoomBounds}):null}_registerMediaQuery(t){if(this._changeHandler||(this._changeHandler=()=>{this._onRemove(),this._mql.matches&&this._onAdd(),this._validateDisabled()}),t){let e=this.getMapEl();if(!e)return;this._mql&&this._mql.removeEventListener("change",this._changeHandler),this._mql=e.matchMedia(t),this._changeHandler(),this._mql.addEventListener("change",this._changeHandler)}else this._mql&&(this._mql.removeEventListener("change",this._changeHandler),delete this._mql,this._onRemove(),this._onAdd(),this._validateDisabled())}getMapEl(){return e.getClosest(this.el,"gcds-ext-map")}componentWillLoad(){this.loggedMessages=new Set,Object.defineProperty(this.el,"queryable",{value:()=>this.queryable(),writable:!0,configurable:!0})}disconnectedCallback(){this.el.hasAttribute("data-moving")||(this._onRemove(),this._mql&&(this._changeHandler&&this._mql.removeEventListener("change",this._changeHandler),delete this._mql))}_onRemove(){this._observer&&this._observer.disconnect();let t=this._layer,e=this._layerControl;t&&t.off(),t&&t._map&&t._map.removeLayer(t),e&&!this.el.hasAttribute("hidden")&&e.removeLayer(t),delete this._layer,delete this._layerControl,delete this._layerControlHTML,delete this._fetchError,delete this.el._layer,delete this.el._layerControl,delete this.el._layerControlHTML,delete this.el._fetchError,this._layerControlCheckbox=void 0,this._layerControlLabel=void 0,this._opacityControl=void 0,this._opacitySlider=void 0,this._styles=void 0,this.el.shadowRoot.innerHTML="",this.src&&(this.el.innerHTML=""),this._layerRegistry.clear()}connectedCallback(){if(this.el.hasAttribute("data-moving"))return;this._boundCreateLayerControlHTML=Yt.bind(this.el),this.el._validateDisabled=this._validateDisabled.bind(this),Object.defineProperty(this.el,"disabled",{get:()=>this.disabled,set:t=>{this.disabled=t},configurable:!0,enumerable:!0}),Object.defineProperty(this.el,"_opacity",{get:()=>this._opacity,set:t=>{t!==this._opacity&&(this._opacity=t)},configurable:!0,enumerable:!0}),Object.defineProperty(this.el,"opacity",{get:()=>this.opacityValue,set:t=>{+t>1||+t<0||(this._opacity=t,this._layer?.changeOpacity(t))},configurable:!0,enumerable:!0}),Object.defineProperty(this.el,"whenElemsReady",{value:()=>this.whenElemsReady(),writable:!0,configurable:!0}),Object.defineProperty(this.el,"zoomTo",{value:()=>this.zoomTo(),writable:!0,configurable:!0}),Object.defineProperty(this.el,"mapml2geojson",{value:(t={})=>this.mapml2geojson(t),writable:!0,configurable:!0}),Object.defineProperty(this.el,"pasteFeature",{value:t=>this.pasteFeature(t),writable:!0,configurable:!0}),Object.defineProperty(this.el,"getAlternateStyles",{value:t=>this.getAlternateStyles(t),writable:!0,configurable:!0}),Object.defineProperty(this.el,"getOuterHTML",{value:()=>this.getOuterHTML(),writable:!0,configurable:!0}),Object.defineProperty(this.el,"getMapEl",{value:()=>this.getMapEl(),writable:!0,configurable:!0}),Object.defineProperty(this.el,"getProjection",{value:()=>this.getProjection(),writable:!0,configurable:!0}),Object.defineProperty(this.el,"label",{get:()=>this.label,set:t=>this.label=t,configurable:!0,enumerable:!0}),Object.defineProperty(this.el,"hidden",{get:()=>this.el.hasAttribute("hidden"),set:t=>{t?this.el.setAttribute("hidden",""):this.el.removeAttribute("hidden")},configurable:!0,enumerable:!0}),Object.defineProperty(this.el,"extent",{get:()=>this.extent,configurable:!0,enumerable:!0}),this.el._layerRegistry=this._layerRegistry;const t=this._onAdd.bind(this),e=this._onRemove.bind(this),i=this._registerMediaQuery.bind(this);let o=this.media;this.getMapEl().whenReady().then((()=>{e(),o?i(o):t()})).catch((t=>{throw new Error("Map never became ready: "+t)}))}_onAdd(){new Promise(((t,e)=>{this.el.addEventListener("changestyle",(t=>{t.stopPropagation(),t.detail&&(this.src=t.detail.src)}),{once:!0});let i=this.el.baseURI?this.el.baseURI:document.baseURI;const o=new Headers;if(o.append("Accept","text/mapml"),this.src)fetch(this.src,{headers:o}).then((t=>{if(!t.ok)throw new Error(`HTTP error! Status: ${t.status}`);const e=t.url;return t.text().then((t=>({text:t,url:e})))})).then((({text:t,url:e})=>{let i=(new DOMParser).parseFromString(t,"text/xml");if(i.querySelector("parsererror")||!i.querySelector("mapml-"))throw this._fetchError=!0,this.el._fetchError=this._fetchError,console.log("Error fetching layer content:\n\n"+t+"\n"),new Error("Parser error");return i._sourceUrl=e,i})).then((t=>{this._copyRemoteContentToShadowRoot(t.querySelector("mapml-"),t._sourceUrl),this._copyRemoteContentToShadowRoot(t.querySelector("mapml-"));let e=this.el.shadowRoot.querySelectorAll("*"),i=[];for(let t=0;t<e.length;t++)e[t].whenReady&&i.push(e[t].whenReady().catch((i=>(console.warn(`Element ${e[t].tagName} failed to become ready:`,i),null))));return Promise.allSettled(i)})).then((()=>{this._selectAlternateOrChangeProjection()})).then((()=>{this._layer=Ht(new URL(this.src,i).href,this.el,{projection:this.getProjection(),opacity:this.opacityValue}),this.el._layer=this._layer,this._createLayerControlHTML(),this._setLocalizedDefaultLabel(),this._attachedToMap(),this._runMutationObserver(this.el.shadowRoot.children),this._bindMutationObserver(),this._validateDisabled(),this.el.dispatchEvent(new CustomEvent("loadedmetadata",{detail:{target:this.el}})),t(void 0)})).catch((t=>{e(t)}));else{let i=this.el.querySelectorAll("*"),o=[];for(let t=0;t<i.length;t++)i[t].whenReady&&o.push(i[t].whenReady());Promise.allSettled(o).then((()=>{this._selectAlternateOrChangeProjection()})).then((()=>{this._layer=Ht(null,this.el,{projection:this.getProjection(),opacity:this.opacityValue}),this.el._layer=this._layer,this._createLayerControlHTML(),this._setLocalizedDefaultLabel(),this._attachedToMap(),this._runMutationObserver(this.el.children),this._bindMutationObserver(),this._validateDisabled(),this.el.dispatchEvent(new CustomEvent("loadedmetadata",{detail:{target:this.el}})),t(void 0)})).catch((t=>{e(t)}))}})).catch((t=>{if("changeprojection"===t.message){if(t.cause.href)console.log("Changing layer src to: "+t.cause.href),this.src=t.cause.href;else if(t.cause.mapprojection){console.log("Changing map projection to match layer: "+t.cause.mapprojection);const e=this.getMapEl();e&&(e.projection=t.cause.mapprojection)}}else"Failed to fetch"===t.message?(this._fetchError=!0,this.el._fetchError=this._fetchError):(console.log(t),this.el.dispatchEvent(new CustomEvent("error",{detail:{target:this.el}})))}))}_setLocalizedDefaultLabel(){if(!this._layer?._titleIsReadOnly&&!this._layer?._title){const t=this.getMapEl();t&&t.locale?.dfLayer&&(this.label=t.locale.dfLayer)}}_selectAlternateOrChangeProjection(){const t=this.src?this.el.shadowRoot:this.el,e=this.getMapEl();if(!t||!e)return;const i=this.getProjection()!==e.projection&&t.querySelector("map-link[rel=alternate][projection="+e.projection+"][href]");if(i){let e;const o=t.querySelector("map-base[href]");e=o?o.getAttribute("href"):this.src?new URL(this.src,this.el.baseURI||document.baseURI).href:this.el.baseURI||document.baseURI;const n=new URL(i.getAttribute("href"),e).href;throw new Error("changeprojection",{cause:{href:n}})}const o=this.getProjection();if(o!==e.projection&&1===e.layers?.length)throw new Error("changeprojection",{cause:{mapprojection:o}})}_copyRemoteContentToShadowRoot(t,e){const i=this.el.shadowRoot;if(!i||!t)return;const o=document.createDocumentFragment(),n=t.querySelectorAll("map-head > *, map-body > *");let s=Array.from(n).find((t=>"MAP-BASE"===t.nodeName));if(!s&&e)s=document.createElement("map-base"),s.setAttribute("href",e),o.appendChild(s);else if(s&&e){const t=new URL(s.getAttribute("href")||"",e).href;s.setAttribute("href",t)}for(let t=0;t<n.length;t++)o.appendChild(n[t]);i.appendChild(o)}getProjection(){let t=this.src?this.el.shadowRoot:this.el,i=this.getMapEl().projection;if(t.querySelector("map-meta[name=projection][content]"))i=e._metaContentToObject(t.querySelector("map-meta[name=projection]").getAttribute("content")).content||i;else if(t.querySelector("map-extent[units]")){const e=t=>{let e=t[0].attributes.units.value,i=!0;for(let o=0;o<t.length;o++)e!==t[o].attributes.units.value&&(i=!1);return i?e:null};i=e(Array.from(t.querySelectorAll("map-extent[units]")))||i}else{const t=this.el.querySelector("map-title"),e=`A projection was not assigned to the '${this.label||(t?t.textContent:"Unnamed")}' Layer. \nPlease specify a projection for that layer using a map-meta element. \nSee more here - https://maps4html.org/web-map-doc/docs/elements/meta/`;this.loggedMessages.has(e)||(console.log(e),this.loggedMessages.add(e))}return i}_attachedToMap(){const e=this.getMapEl();if(!e||!this._layer)return;let i=0,o=1;const n=e.children;for(i=0;i<n.length;i++)"MAP-LAYER"!==n[i].nodeName&&"LAYER-"!==n[i].nodeName||(n[i]===this.el?o=i+1:n[i]._layer&&n[i]._layer.setZIndex(i+1));t.setOptions(this._layer,{zIndex:o,mapprojection:e.projection?e.projection:"OSMTILE",opacity:window.getComputedStyle(this.el).opacity}),this.checked&&this._layer.addTo(e._map),e._map.on("moveend layeradd",this._validateDisabled,this),this._layer.on("add remove",this._validateDisabled,this),e._layerControl&&(this._layerControl=e._layerControl,this.el._layerControl=this._layerControl),e._layerControl&&!this.hidden&&this._layerControl.addOrUpdateOverlay(this._layer,this.label),this._layer._legendUrl&&(this.el.legendLinks=[{type:"application/octet-stream",href:this._layer._legendUrl,rel:"legend",lang:null,hreflang:null,sizes:null}])}_runMutationObserver(t){const e=t=>{this.whenReady().then((()=>{this._layer.renderStyles(t)}))},i=t=>{this.whenReady().then((()=>{this._layer.renderStyles(t)}))},o=t=>{this.whenReady().then((()=>{"function"==typeof t.whenReady?t.whenReady().then((()=>{delete this._layer.bounds,this._layer._calculateBounds(),this._validateDisabled()})):(delete this._layer.bounds,this._layer._calculateBounds(),this._validateDisabled())}))},n=this.src?this.el.shadowRoot:this.el,s=n instanceof ShadowRoot?":host":":scope",a=()=>{this.whenReady().then((()=>{this._layer._calculateBounds(),this._validateDisabled()}))};for(let r=0;r<t.length;++r){const l=t[r];switch(l.nodeName){case"MAP-LINK":l.link&&!l.link.isConnected&&e(l);break;case"MAP-STYLE":l.styleElement&&!l.styleElement.isConnected&&i(l);break;case"MAP-EXTENT":o(l);break;case"MAP-META":l.hasAttribute("name")&&("zoom"===l.getAttribute("name").toLowerCase()||"extent"===l.getAttribute("name").toLowerCase())&&l===n.querySelector(`${s} > [name=${l.getAttribute("name")}]`)&&l.hasAttribute("content")&&a()}}}_bindMutationObserver(){this._observer=new MutationObserver((t=>{for(let e of t)"childList"===e.type&&this._runMutationObserver(e.addedNodes)})),this._observer.observe(this.src?this.el.shadowRoot:this.el,{childList:!0})}_validateDisabled(){const t=()=>{let t=0,e=0;return this._layer.eachLayer((i=>{i instanceof r&&(t++,i.isVisible()||e++)})),{totalCount:t,disabledCount:e}},e=()=>{let t=0,e=0;return this._layer.eachLayer((i=>{i instanceof n&&(t++,i.isVisible()||e++)})),{totalCount:t,disabledCount:e}};setTimeout((()=>{let i=this._layer,o=i?._map;if(this._mql&&!this._mql.matches)return this.el.setAttribute("disabled",""),void(this.disabled=!0);if(o){const i=this.src?this.el.shadowRoot?.querySelectorAll("map-extent"):this.el.querySelectorAll("map-extent");let o=[];if(i)for(let t=0;t<i.length;t++)i[t].whenLinksReady&&o.push(i[t].whenLinksReady());Promise.allSettled(o).then((()=>{let o=0,n=0,s=["_staticTileLayer","_mapmlvectors","_extentLayer"];for(let a=0;a<s.length;a++){let r=s[a];if(this.checked)if("_extentLayer"===r&&i&&i.length>0)for(let t=0;t<i.length;t++)n++,i[t]._validateDisabled&&i[t]._validateDisabled()&&o++;else if("_mapmlvectors"===r){const t=e();n+=t.totalCount,o+=t.disabledCount}else{const e=t();n+=e.totalCount,o+=e.disabledCount}}o===n&&0!==o?(this.el.setAttribute("disabled",""),this.disabled=!0):(this.el.removeAttribute("disabled"),this.disabled=!1),this.toggleLayerControlDisabled()})).catch((t=>{console.log(t)}))}}),0)}toggleLayerControlDisabled(){let t=this._layerControlCheckbox,e=this._layerControlLabel,i=this._opacityControl,o=this._opacitySlider,n=this._styles;this.disabled?(t&&(t.disabled=!0),o&&(o.disabled=!0),e&&(e.style.fontStyle="italic"),i&&(i.style.fontStyle="italic"),n&&(n.style.fontStyle="italic",n.querySelectorAll("input").forEach((t=>{t.disabled=!0})))):(t&&(t.disabled=!1),o&&(o.disabled=!1),e&&(e.style.fontStyle="normal"),i&&(i.style.fontStyle="normal"),n&&(n.style.fontStyle="normal",n.querySelectorAll("input").forEach((t=>{t.disabled=!1}))))}queryable(){let t=this.src?this.el.shadowRoot:this.el;return!(!(t?.querySelector("map-extent[checked] > map-link[rel=query]:not([disabled])")&&this.checked&&this._layer)||this.el.hasAttribute("hidden"))}getAlternateStyles(e){if(e.length>1){const i=document.createElement("details"),o=document.createElement("summary"),n=this.getMapEl();o.innerText=n?.locale?.lmStyle||"Style",i.appendChild(o);for(let o=0;o<e.length;o++)i.appendChild(e[o].getLayerControlOption()),t.DomUtil.addClass(i,"mapml-layer-item-style mapml-control-layers");return i}return null}getOuterHTML(){let t=this.el.cloneNode(!0);if(this.el.hasAttribute("src")){let e=this._layer.getHref();t.setAttribute("src",e)}this.el.querySelector("map-link")&&t.querySelectorAll("map-link").forEach((t=>{t.hasAttribute("href")?t.setAttribute("href",decodeURI(new URL(t.getAttribute("href"),this.el.baseURI?this.el.baseURI:document.baseURI).href)):t.hasAttribute("tref")&&t.setAttribute("tref",decodeURI(new URL(t.getAttribute("tref"),this.el.baseURI?this.el.baseURI:document.baseURI).href))}));let e=t.outerHTML;return t.remove(),e}zoomTo(){this.whenReady().then((()=>{let i=this.getMapEl()?._map,o=this.extent,n=o.topLeft.pcrs,s=o.bottomRight.pcrs,a=t.bounds(t.point(n.horizontal,n.vertical),t.point(s.horizontal,s.vertical)),r=i.options.crs.unproject(a.getCenter(!0));i.setView(r,e.getMaxZoom(a,i,o.zoom.minZoom,o.zoom.maxZoom),{animate:!1})}))}pasteFeature(t){switch(typeof t){case"string":t.trim(),"<map-feature"===t.slice(0,12)&&"</map-feature>"===t.slice(-14)&&this.el.insertAdjacentHTML("beforeend",t);break;case"object":"MAP-FEATURE"===t.nodeName?.toUpperCase()&&this.el.appendChild(t)}}_createLayerControlHTML(){this._boundCreateLayerControlHTML&&this._boundCreateLayerControlHTML().then((t=>{this._layerControlHTML=t,this.el._layerControlHTML=this._layerControlHTML,this._layerControlCheckbox=this.el._layerControlCheckbox,this._layerControlLabel=this.el._layerControlLabel,this._opacityControl=this.el._opacityControl,this._opacitySlider=this.el._opacitySlider,this._layerItemSettingsHTML=this.el._layerItemSettingsHTML,this._propertiesGroupAnatomy=this.el._propertiesGroupAnatomy,this._styles=this.el._styles,this._opacitySlider&&void 0!==this._opacity&&(this._opacitySlider.value=this._opacity.toString())}))}async whenReady(){return new Promise(((t,e)=>{let i,o;this.el._layer&&this._layerControlHTML&&(!this.src||this.el.shadowRoot?.childNodes.length)?t():(i=setInterval((function(n){n._layer&&n._layerControlHTML&&(!n.src||n.shadowRoot?.childNodes.length)?(clearInterval(i),clearTimeout(o),t()):n._fetchError&&(clearInterval(i),clearTimeout(o),e("Error fetching layer content"))}),200,this.el),o=setTimeout((function(){clearInterval(i),clearTimeout(o),e("Timeout reached waiting for layer to be ready")}),5e3))}))}async whenElemsReady(){let t=[],e=this.src?this.el.shadowRoot:this.el;if(!e)return[];const i=Array.from(e.querySelectorAll("map-extent")),o=Array.from(e.querySelectorAll("map-feature"));for(let e of[...i,...o])"function"==typeof e.whenReady&&t.push(e.whenReady());return Promise.allSettled(t)}mapml2geojson(t={}){return e.mapml2geojson(this.el,t)}render(){return null}static get watchers(){return{src:[{srcChanged:0}],checked:[{checkedChanged:0}],_opacity:[{opacityChanged:0}],media:[{mediaChanged:0}],hidden:[{hiddenChanged:0}]}}};export{Dt as gcds_ext_map,Xt as map_layer}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r}from"./p-BUsJ7i5g.js";const s=class{constructor(s){r(this,s)}render(){return null}};export{s as map_featurecaption}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,g as e,h as s}from"./p-BUsJ7i5g.js";const c=class{constructor(e){t(this,e)}get el(){return e(this)}cs;csChanged(t,e){}connectedCallback(){Object.defineProperty(this.el,"cs",{get:()=>this.el.getAttribute("cs"),set:t=>{["tcrs","tilematrix","pcrs","gcrs","map","tile"].includes(t)&&(this.cs=t)},configurable:!0,enumerable:!0})}render(){return s("slot",{key:"419b5956ada9cc1d59880ed9168b1d539301ff85"})}static get watchers(){return{cs:[{csChanged:0}]}}};export{c as map_geometry}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,g as s}from"./p-BUsJ7i5g.js";const r=class{constructor(s){t(this,s)}get el(){return s(this)}href;target;type;inplace};export{r as map_a}
|