@npm9912/v-map 0.1.0
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 +185 -0
- package/dist/cjs/_commonjsHelpers-B83fTs8d.js +36 -0
- package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
- package/dist/cjs/cesium-provider-BiFFyAl9.js +2598 -0
- package/dist/cjs/deck-provider-Ctq3Q8a1.js +47824 -0
- package/dist/cjs/geotiff-CEwvF9cG.js +47 -0
- package/dist/cjs/geotiff-source-RaNzzWkC.js +1522 -0
- package/dist/cjs/index-B1oGO1g-.js +10658 -0
- package/dist/cjs/index-B8LHqjyg.js +1765 -0
- package/dist/cjs/index-BIL4VsgP.js +310 -0
- package/dist/cjs/index-Blku2QY8.js +167 -0
- package/dist/cjs/index-CJvvX4yx.js +21 -0
- package/dist/cjs/index-CbVT-Con.js +699 -0
- package/dist/cjs/index-ISOEpMC3.js +20478 -0
- package/dist/cjs/index-JSwBbvGA.js +1621 -0
- package/dist/cjs/index.browser-DQhD8Jwl.js +6873 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/layer-extension-B_olS0rc.js +65 -0
- package/dist/cjs/leaflet-provider-DOqfs7g5.js +1815 -0
- package/dist/cjs/loader.cjs.js +13 -0
- package/dist/cjs/main-dist-7TykwFci.js +2655 -0
- package/dist/cjs/messages-D7h4m8Tx.js +186 -0
- package/dist/cjs/openlayers-provider-Dfeg6L4n.js +1604 -0
- package/dist/cjs/polygon-layer-B9PrN7vr.js +1300 -0
- package/dist/cjs/scenegraph-layer-DwNoxQdi.js +2530 -0
- package/dist/cjs/styleconfig-CVRqArk-.js +23 -0
- package/dist/cjs/v-map-builder.cjs.entry.js +3786 -0
- package/dist/cjs/v-map-layer-geojson_12.cjs.entry.js +40894 -0
- package/dist/cjs/v-map-layer-helper-iAzxAg9I.js +285 -0
- package/dist/cjs/v-map-layer-terrain-geotiff.cjs.entry.js +258 -0
- package/dist/cjs/v-map-layercontrol.cjs.entry.js +247 -0
- package/dist/cjs/v-map.cjs.js +25 -0
- package/dist/cjs/v-map.v-map-layer-osm.v-map-layergroup-BsXp3BoL.js +582 -0
- package/dist/cjs/v-map_3.cjs.entry.js +12 -0
- package/dist/collection/collection-manifest.json +30 -0
- package/dist/collection/components/v-map/v-map.css +3 -0
- package/dist/collection/components/v-map/v-map.js +467 -0
- package/dist/collection/components/v-map/v-map.test.js +33 -0
- package/dist/collection/components/v-map-builder/v-map-builder.css +1 -0
- package/dist/collection/components/v-map-builder/v-map-builder.js +913 -0
- package/dist/collection/components/v-map-builder/v-map-builder.test.js +56 -0
- package/dist/collection/components/v-map-layer-geojson/v-map-layer-geojson.js +862 -0
- package/dist/collection/components/v-map-layer-geojson/v-map-layer-geojson.test.js +42 -0
- package/dist/collection/components/v-map-layer-geotiff/v-map-layer-geotiff.css +4 -0
- package/dist/collection/components/v-map-layer-geotiff/v-map-layer-geotiff.js +500 -0
- package/dist/collection/components/v-map-layer-geotiff/v-map-layer-geotiff.test.js +38 -0
- package/dist/collection/components/v-map-layer-google/v-map-layer-google.css +1 -0
- package/dist/collection/components/v-map-layer-google/v-map-layer-google.js +442 -0
- package/dist/collection/components/v-map-layer-osm/error-api.test.js +108 -0
- package/dist/collection/components/v-map-layer-osm/v-map-layer-osm.css +4 -0
- package/dist/collection/components/v-map-layer-osm/v-map-layer-osm.js +311 -0
- package/dist/collection/components/v-map-layer-osm/v-map-layer-osm.test.js +36 -0
- package/dist/collection/components/v-map-layer-scatterplot/v-map-layer-scatterplot.css +1 -0
- package/dist/collection/components/v-map-layer-scatterplot/v-map-layer-scatterplot.js +305 -0
- package/dist/collection/components/v-map-layer-terrain/v-map-layer-terrain.css +3 -0
- package/dist/collection/components/v-map-layer-terrain/v-map-layer-terrain.js +548 -0
- package/dist/collection/components/v-map-layer-terrain/v-map-layer-terrain.test.js +36 -0
- package/dist/collection/components/v-map-layer-terrain-geotiff/v-map-layer-terrain-geotiff.css +3 -0
- package/dist/collection/components/v-map-layer-terrain-geotiff/v-map-layer-terrain-geotiff.js +735 -0
- package/dist/collection/components/v-map-layer-terrain-geotiff/v-map-layer-terrain-geotiff.test.js +42 -0
- package/dist/collection/components/v-map-layer-tile3d/v-map-layer-tile3d.css +3 -0
- package/dist/collection/components/v-map-layer-tile3d/v-map-layer-tile3d.js +449 -0
- package/dist/collection/components/v-map-layer-tile3d/v-map-layer-tile3d.test.js +50 -0
- package/dist/collection/components/v-map-layer-wcs/v-map-layer-wcs.css +1 -0
- package/dist/collection/components/v-map-layer-wcs/v-map-layer-wcs.js +448 -0
- package/dist/collection/components/v-map-layer-wcs/v-map-layer-wcs.test.js +39 -0
- package/dist/collection/components/v-map-layer-wfs/v-map-layer-wfs.css +1 -0
- package/dist/collection/components/v-map-layer-wfs/v-map-layer-wfs.js +489 -0
- package/dist/collection/components/v-map-layer-wfs/v-map-layer-wfs.test.js +43 -0
- package/dist/collection/components/v-map-layer-wkt/v-map-layer-wkt.css +1 -0
- package/dist/collection/components/v-map-layer-wkt/v-map-layer-wkt.js +811 -0
- package/dist/collection/components/v-map-layer-wkt/v-map-layer-wkt.test.js +34 -0
- package/dist/collection/components/v-map-layer-wms/v-map-layer-wms.css +1 -0
- package/dist/collection/components/v-map-layer-wms/v-map-layer-wms.js +453 -0
- package/dist/collection/components/v-map-layer-wms/v-map-layer-wms.test.js +36 -0
- package/dist/collection/components/v-map-layer-xyz/v-map-layer-xyz.css +1 -0
- package/dist/collection/components/v-map-layer-xyz/v-map-layer-xyz.js +331 -0
- package/dist/collection/components/v-map-layer-xyz/v-map-layer-xyz.test.js +28 -0
- package/dist/collection/components/v-map-layercontrol/v-map-layercontrol.css +74 -0
- package/dist/collection/components/v-map-layercontrol/v-map-layercontrol.js +277 -0
- package/dist/collection/components/v-map-layercontrol/v-map-layercontrol.test.js +134 -0
- package/dist/collection/components/v-map-layergroup/v-map-layergroup.css +4 -0
- package/dist/collection/components/v-map-layergroup/v-map-layergroup.js +212 -0
- package/dist/collection/components/v-map-layergroup/v-map-layergroup.test.js +39 -0
- package/dist/collection/components/v-map-style/v-map-style.css +38 -0
- package/dist/collection/components/v-map-style/v-map-style.js +492 -0
- package/dist/collection/components/v-map-style/v-map-style.unit.js +62 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/layer/v-map-layer-helper.js +281 -0
- package/dist/collection/layer/v-map-layer-helper.unit.js +234 -0
- package/dist/collection/lib/cesium-loader.js +58 -0
- package/dist/collection/lib/ensure-importmap.js +12 -0
- package/dist/collection/lib/ensure-importmap.unit.js +57 -0
- package/dist/collection/lib/versions.gen.js +6 -0
- package/dist/collection/lib/vstyle.js +8 -0
- package/dist/collection/map-provider/cesium/CesiumGeoTIFFTerrainProvider.js +285 -0
- package/dist/collection/map-provider/cesium/CesiumLayerGroups.js +159 -0
- package/dist/collection/map-provider/cesium/GeoTIFFImageryProvider.js +192 -0
- package/dist/collection/map-provider/cesium/GeoTIFFImageryProvider.test.js +57 -0
- package/dist/collection/map-provider/cesium/cesium-provider.js +1408 -0
- package/dist/collection/map-provider/cesium/i-layer.js +1 -0
- package/dist/collection/map-provider/cesium/layer-manager.js +467 -0
- package/dist/collection/map-provider/deck/DeckGLGeoTIFFLayer.js +483 -0
- package/dist/collection/map-provider/deck/DeckGLGeoTIFFTerrainLayer.js +410 -0
- package/dist/collection/map-provider/deck/LayerGroupWithModel.js +169 -0
- package/dist/collection/map-provider/deck/LayerGroups.js +192 -0
- package/dist/collection/map-provider/deck/LayerModel.js +1 -0
- package/dist/collection/map-provider/deck/RenderableGroup.js +1 -0
- package/dist/collection/map-provider/deck/deck-provider.js +1563 -0
- package/dist/collection/map-provider/geotiff/geotiff-source.js +172 -0
- package/dist/collection/map-provider/geotiff/utils/AABB2D.js +24 -0
- package/dist/collection/map-provider/geotiff/utils/BVHNode2D.js +166 -0
- package/dist/collection/map-provider/geotiff/utils/GeoTIFFTileProcessor.js +484 -0
- package/dist/collection/map-provider/geotiff/utils/Triangle.js +1 -0
- package/dist/collection/map-provider/geotiff/utils/Triangulation.js +321 -0
- package/dist/collection/map-provider/geotiff/utils/colormap-utils.js +190 -0
- package/dist/collection/map-provider/geotiff/utils/normalization-utils.js +122 -0
- package/dist/collection/map-provider/geotiff/utils/sampling-utils.js +108 -0
- package/dist/collection/map-provider/leaflet/GeoTIFFGridLayer.js +147 -0
- package/dist/collection/map-provider/leaflet/WCSGridLayer.js +124 -0
- package/dist/collection/map-provider/leaflet/google-map-tiles-layer.js +352 -0
- package/dist/collection/map-provider/leaflet/leaflet-helpers.js +94 -0
- package/dist/collection/map-provider/leaflet/leaflet-provider.js +1095 -0
- package/dist/collection/map-provider/ol/CustomGeoTiff.js +145 -0
- package/dist/collection/map-provider/ol/openlayers-helper.js +26 -0
- package/dist/collection/map-provider/ol/openlayers-provider.js +1427 -0
- package/dist/collection/map-provider/provider-factory.js +44 -0
- package/dist/collection/map-provider/provider-factory.unit.js +66 -0
- package/dist/collection/testing/browser-test-utils.js +49 -0
- package/dist/collection/testing/e2e-testing.js +122 -0
- package/dist/collection/testing/e2e-utils.js +70 -0
- package/dist/collection/testing/geotiff-test-server.js +100 -0
- package/dist/collection/testing/mocks/geostyler-lyrx-parser.js +12 -0
- package/dist/collection/testing/mocks/geostyler-mapbox-parser.js +12 -0
- package/dist/collection/testing/mocks/geostyler-qgis-parser.js +12 -0
- package/dist/collection/testing/mocks/geostyler-sld-parser.js +13 -0
- package/dist/collection/testing/mocks/geostyler-style.js +5 -0
- package/dist/collection/testing/setupTests.browser.js +1 -0
- package/dist/collection/testing/setupTests.stencil.js +20 -0
- package/dist/collection/testing/setupTests.vitest.js +59 -0
- package/dist/collection/testing/stencil-testing-wrapper.js +43 -0
- package/dist/collection/testing/styleMock.js +1 -0
- package/dist/collection/types/color.js +1 -0
- package/dist/collection/types/cssmode.js +1 -0
- package/dist/collection/types/flavour.js +1 -0
- package/dist/collection/types/layerconfig.js +1 -0
- package/dist/collection/types/lonlat.js +1 -0
- package/dist/collection/types/mapinitoptions.js +1 -0
- package/dist/collection/types/mapprovider.js +1 -0
- package/dist/collection/types/provideroptions.js +1 -0
- package/dist/collection/types/styleconfig.js +19 -0
- package/dist/collection/types/styling.js +13 -0
- package/dist/collection/types/styling.unit.js +37 -0
- package/dist/collection/types/vmaplayer.js +1 -0
- package/dist/collection/utils/async-mutex.js +28 -0
- package/dist/collection/utils/diff.js +142 -0
- package/dist/collection/utils/diff.unit.js +59 -0
- package/dist/collection/utils/dom-env.js +43 -0
- package/dist/collection/utils/dom-env.unit.js +92 -0
- package/dist/collection/utils/events.js +8 -0
- package/dist/collection/utils/logger.js +183 -0
- package/dist/collection/utils/logger.unit.js +98 -0
- package/dist/collection/utils/messages.js +12 -0
- package/dist/collection/utils/spatial-utils.js +27 -0
- package/dist/collection/utils/spatial-utils.unit.js +24 -0
- package/dist/components/_commonjsHelpers.js +1 -0
- package/dist/components/cesium-provider.js +1 -0
- package/dist/components/deck-provider.js +1 -0
- package/dist/components/events.js +1 -0
- package/dist/components/geotiff-source.js +1 -0
- package/dist/components/geotiff.js +4 -0
- package/dist/components/index.browser.js +15 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/components/index.js +1 -0
- package/dist/components/index2.js +1 -0
- package/dist/components/index3.js +1 -0
- package/dist/components/index4.js +1 -0
- package/dist/components/index5.js +1 -0
- package/dist/components/index6.js +1 -0
- package/dist/components/index7.js +1 -0
- package/dist/components/index8.js +7 -0
- package/dist/components/layer-extension.js +1 -0
- package/dist/components/leaflet-provider.js +1 -0
- package/dist/components/main-dist.js +1 -0
- package/dist/components/messages.js +1 -0
- package/dist/components/openlayers-provider.js +1 -0
- package/dist/components/polygon-layer.js +1 -0
- package/dist/components/scenegraph-layer.js +1 -0
- package/dist/components/styleconfig.js +1 -0
- package/dist/components/styling.js +1 -0
- package/dist/components/v-map-builder.d.ts +11 -0
- package/dist/components/v-map-builder.js +2 -0
- package/dist/components/v-map-layer-geojson.d.ts +11 -0
- package/dist/components/v-map-layer-geojson.js +1 -0
- package/dist/components/v-map-layer-geojson2.js +1 -0
- package/dist/components/v-map-layer-geotiff.d.ts +11 -0
- package/dist/components/v-map-layer-geotiff.js +1 -0
- package/dist/components/v-map-layer-geotiff2.js +1 -0
- package/dist/components/v-map-layer-google.d.ts +11 -0
- package/dist/components/v-map-layer-google.js +1 -0
- package/dist/components/v-map-layer-google2.js +1 -0
- package/dist/components/v-map-layer-helper.js +1 -0
- package/dist/components/v-map-layer-osm.d.ts +11 -0
- package/dist/components/v-map-layer-osm.js +1 -0
- package/dist/components/v-map-layer-osm2.js +1 -0
- package/dist/components/v-map-layer-scatterplot.d.ts +11 -0
- package/dist/components/v-map-layer-scatterplot.js +1 -0
- package/dist/components/v-map-layer-scatterplot2.js +1 -0
- package/dist/components/v-map-layer-terrain-geotiff.d.ts +11 -0
- package/dist/components/v-map-layer-terrain-geotiff.js +1 -0
- package/dist/components/v-map-layer-terrain.d.ts +11 -0
- package/dist/components/v-map-layer-terrain.js +1 -0
- package/dist/components/v-map-layer-terrain2.js +1 -0
- package/dist/components/v-map-layer-tile3d.d.ts +11 -0
- package/dist/components/v-map-layer-tile3d.js +1 -0
- package/dist/components/v-map-layer-tile3d2.js +1 -0
- package/dist/components/v-map-layer-wcs.d.ts +11 -0
- package/dist/components/v-map-layer-wcs.js +1 -0
- package/dist/components/v-map-layer-wcs2.js +1 -0
- package/dist/components/v-map-layer-wfs.d.ts +11 -0
- package/dist/components/v-map-layer-wfs.js +1 -0
- package/dist/components/v-map-layer-wfs2.js +1 -0
- package/dist/components/v-map-layer-wkt.d.ts +11 -0
- package/dist/components/v-map-layer-wkt.js +1 -0
- package/dist/components/v-map-layer-wkt2.js +1 -0
- package/dist/components/v-map-layer-wms.d.ts +11 -0
- package/dist/components/v-map-layer-wms.js +1 -0
- package/dist/components/v-map-layer-wms2.js +1 -0
- package/dist/components/v-map-layer-xyz.d.ts +11 -0
- package/dist/components/v-map-layer-xyz.js +1 -0
- package/dist/components/v-map-layer-xyz2.js +1 -0
- package/dist/components/v-map-layercontrol.d.ts +11 -0
- package/dist/components/v-map-layercontrol.js +1 -0
- package/dist/components/v-map-layergroup.d.ts +11 -0
- package/dist/components/v-map-layergroup.js +1 -0
- package/dist/components/v-map-layergroup2.js +1 -0
- package/dist/components/v-map-style.d.ts +11 -0
- package/dist/components/v-map-style.js +1 -0
- package/dist/components/v-map-style2.js +10 -0
- package/dist/components/v-map.d.ts +11 -0
- package/dist/components/v-map.js +1 -0
- package/dist/components/v-map2.js +1 -0
- package/dist/esm/_commonjsHelpers-E-ZsRS8r.js +32 -0
- package/dist/esm/app-globals-DQuL1Twl.js +3 -0
- package/dist/esm/cesium-provider-BJfAup3w.js +2596 -0
- package/dist/esm/deck-provider-C7U9VDEq.js +47709 -0
- package/dist/esm/geotiff-BEWxTIfH.js +45 -0
- package/dist/esm/geotiff-source-esnDnC-u.js +1516 -0
- package/dist/esm/index-B1zwA4IC.js +685 -0
- package/dist/esm/index-BBpiaTpT.js +165 -0
- package/dist/esm/index-BIEmlzCf.js +1697 -0
- package/dist/esm/index-BUHa4Jj0.js +307 -0
- package/dist/esm/index-DbSdn93t.js +20461 -0
- package/dist/esm/index-RpJarvr_.js +10656 -0
- package/dist/esm/index-jN06TXUp.js +14 -0
- package/dist/esm/index-jzneDarq.js +1613 -0
- package/dist/esm/index.browser-DhQAXuA7.js +6860 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/layer-extension-CZXK5goK.js +63 -0
- package/dist/esm/leaflet-provider-Q41TB6ku.js +1794 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/main-dist-CwnA7_Xn.js +2652 -0
- package/dist/esm/messages-CMKJzsgL.js +180 -0
- package/dist/esm/openlayers-provider-CMsDsQTQ.js +1602 -0
- package/dist/esm/polygon-layer-ByhxGhWC.js +1295 -0
- package/dist/esm/scenegraph-layer-09K_B6DT.js +2526 -0
- package/dist/esm/styleconfig-B-bAcABs.js +21 -0
- package/dist/esm/v-map-builder.entry.js +3784 -0
- package/dist/esm/v-map-layer-geojson_12.entry.js +40881 -0
- package/dist/esm/v-map-layer-helper-Dys44Cgo.js +283 -0
- package/dist/esm/v-map-layer-terrain-geotiff.entry.js +256 -0
- package/dist/esm/v-map-layercontrol.entry.js +245 -0
- package/dist/esm/v-map.js +21 -0
- package/dist/esm/v-map.v-map-layer-osm.v-map-layergroup-B4pFHuSf.js +572 -0
- package/dist/esm/v-map_3.entry.js +4 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/cesium-augment.d.ts +5 -0
- package/dist/types/components/v-map/v-map.d.ts +70 -0
- package/dist/types/components/v-map/v-map.test.d.ts +1 -0
- package/dist/types/components/v-map-builder/v-map-builder.d.ts +48 -0
- package/dist/types/components/v-map-builder/v-map-builder.test.d.ts +1 -0
- package/dist/types/components/v-map-layer-geojson/v-map-layer-geojson.d.ts +129 -0
- package/dist/types/components/v-map-layer-geojson/v-map-layer-geojson.test.d.ts +1 -0
- package/dist/types/components/v-map-layer-geotiff/v-map-layer-geotiff.d.ts +74 -0
- package/dist/types/components/v-map-layer-geotiff/v-map-layer-geotiff.test.d.ts +1 -0
- package/dist/types/components/v-map-layer-google/v-map-layer-google.d.ts +78 -0
- package/dist/types/components/v-map-layer-osm/error-api.test.d.ts +1 -0
- package/dist/types/components/v-map-layer-osm/v-map-layer-osm.d.ts +50 -0
- package/dist/types/components/v-map-layer-osm/v-map-layer-osm.test.d.ts +1 -0
- package/dist/types/components/v-map-layer-scatterplot/v-map-layer-scatterplot.d.ts +54 -0
- package/dist/types/components/v-map-layer-terrain/v-map-layer-terrain.d.ts +74 -0
- package/dist/types/components/v-map-layer-terrain/v-map-layer-terrain.test.d.ts +1 -0
- package/dist/types/components/v-map-layer-terrain-geotiff/v-map-layer-terrain-geotiff.d.ts +117 -0
- package/dist/types/components/v-map-layer-terrain-geotiff/v-map-layer-terrain-geotiff.test.d.ts +1 -0
- package/dist/types/components/v-map-layer-tile3d/v-map-layer-tile3d.d.ts +69 -0
- package/dist/types/components/v-map-layer-tile3d/v-map-layer-tile3d.test.d.ts +1 -0
- package/dist/types/components/v-map-layer-wcs/v-map-layer-wcs.d.ts +47 -0
- package/dist/types/components/v-map-layer-wcs/v-map-layer-wcs.test.d.ts +1 -0
- package/dist/types/components/v-map-layer-wfs/v-map-layer-wfs.d.ts +59 -0
- package/dist/types/components/v-map-layer-wfs/v-map-layer-wfs.test.d.ts +1 -0
- package/dist/types/components/v-map-layer-wkt/v-map-layer-wkt.d.ts +132 -0
- package/dist/types/components/v-map-layer-wkt/v-map-layer-wkt.test.d.ts +1 -0
- package/dist/types/components/v-map-layer-wms/v-map-layer-wms.d.ts +76 -0
- package/dist/types/components/v-map-layer-wms/v-map-layer-wms.test.d.ts +1 -0
- package/dist/types/components/v-map-layer-xyz/v-map-layer-xyz.d.ts +59 -0
- package/dist/types/components/v-map-layer-xyz/v-map-layer-xyz.test.d.ts +1 -0
- package/dist/types/components/v-map-layercontrol/v-map-layercontrol.d.ts +44 -0
- package/dist/types/components/v-map-layercontrol/v-map-layercontrol.test.d.ts +1 -0
- package/dist/types/components/v-map-layergroup/v-map-layergroup.d.ts +31 -0
- package/dist/types/components/v-map-layergroup/v-map-layergroup.test.d.ts +1 -0
- package/dist/types/components/v-map-style/v-map-style.d.ts +75 -0
- package/dist/types/components/v-map-style/v-map-style.unit.d.ts +1 -0
- package/dist/types/components.d.ts +2391 -0
- package/dist/types/globals.d.ts +16 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/layer/v-map-layer-helper.d.ts +45 -0
- package/dist/types/layer/v-map-layer-helper.unit.d.ts +1 -0
- package/dist/types/leaflet-augment.d.ts +15 -0
- package/dist/types/lib/cesium-loader.d.ts +3 -0
- package/dist/types/lib/ensure-importmap.d.ts +3 -0
- package/dist/types/lib/ensure-importmap.unit.d.ts +1 -0
- package/dist/types/lib/versions.gen.d.ts +5 -0
- package/dist/types/lib/vstyle.d.ts +44 -0
- package/dist/types/map-provider/cesium/CesiumGeoTIFFTerrainProvider.d.ts +92 -0
- package/dist/types/map-provider/cesium/CesiumLayerGroups.d.ts +64 -0
- package/dist/types/map-provider/cesium/GeoTIFFImageryProvider.d.ts +75 -0
- package/dist/types/map-provider/cesium/GeoTIFFImageryProvider.test.d.ts +1 -0
- package/dist/types/map-provider/cesium/cesium-provider.d.ts +87 -0
- package/dist/types/map-provider/cesium/i-layer.d.ts +11 -0
- package/dist/types/map-provider/cesium/layer-manager.d.ts +31 -0
- package/dist/types/map-provider/deck/DeckGLGeoTIFFLayer.d.ts +91 -0
- package/dist/types/map-provider/deck/DeckGLGeoTIFFTerrainLayer.d.ts +82 -0
- package/dist/types/map-provider/deck/LayerGroupWithModel.d.ts +55 -0
- package/dist/types/map-provider/deck/LayerGroups.d.ts +63 -0
- package/dist/types/map-provider/deck/LayerModel.d.ts +8 -0
- package/dist/types/map-provider/deck/RenderableGroup.d.ts +20 -0
- package/dist/types/map-provider/deck/deck-provider.d.ts +92 -0
- package/dist/types/map-provider/geotiff/geotiff-source.d.ts +30 -0
- package/dist/types/map-provider/geotiff/utils/AABB2D.d.ts +28 -0
- package/dist/types/map-provider/geotiff/utils/BVHNode2D.d.ts +36 -0
- package/dist/types/map-provider/geotiff/utils/GeoTIFFTileProcessor.d.ts +116 -0
- package/dist/types/map-provider/geotiff/utils/Triangle.d.ts +5 -0
- package/dist/types/map-provider/geotiff/utils/Triangulation.d.ts +94 -0
- package/dist/types/map-provider/geotiff/utils/colormap-utils.d.ts +47 -0
- package/dist/types/map-provider/geotiff/utils/normalization-utils.d.ts +39 -0
- package/dist/types/map-provider/geotiff/utils/sampling-utils.d.ts +13 -0
- package/dist/types/map-provider/leaflet/GeoTIFFGridLayer.d.ts +34 -0
- package/dist/types/map-provider/leaflet/WCSGridLayer.d.ts +38 -0
- package/dist/types/map-provider/leaflet/google-map-tiles-layer.d.ts +73 -0
- package/dist/types/map-provider/leaflet/leaflet-helpers.d.ts +6 -0
- package/dist/types/map-provider/leaflet/leaflet-provider.d.ts +73 -0
- package/dist/types/map-provider/ol/CustomGeoTiff.d.ts +14 -0
- package/dist/types/map-provider/ol/openlayers-helper.d.ts +2 -0
- package/dist/types/map-provider/ol/openlayers-provider.d.ts +80 -0
- package/dist/types/map-provider/provider-factory.d.ts +12 -0
- package/dist/types/map-provider/provider-factory.unit.d.ts +1 -0
- package/dist/types/namespaces.d.ts +3 -0
- package/dist/types/ol-augment.d.ts +3 -0
- package/dist/types/ol-override.d.ts +7 -0
- package/dist/types/ol.d.ts +10 -0
- package/dist/types/stencil-public-runtime.d.ts +1860 -0
- package/dist/types/testing/browser-test-utils.d.ts +6 -0
- package/dist/types/testing/e2e-testing.d.ts +5 -0
- package/dist/types/testing/e2e-utils.d.ts +4 -0
- package/dist/types/testing/geotiff-test-server.d.ts +5 -0
- package/dist/types/testing/mocks/geostyler-lyrx-parser.d.ts +11 -0
- package/dist/types/testing/mocks/geostyler-mapbox-parser.d.ts +11 -0
- package/dist/types/testing/mocks/geostyler-qgis-parser.d.ts +11 -0
- package/dist/types/testing/mocks/geostyler-sld-parser.d.ts +11 -0
- package/dist/types/testing/mocks/geostyler-style.d.ts +5 -0
- package/dist/types/testing/setupTests.browser.d.ts +1 -0
- package/dist/types/testing/setupTests.stencil.d.ts +1 -0
- package/dist/types/testing/setupTests.vitest.d.ts +1 -0
- package/dist/types/testing/stencil-testing-wrapper.d.ts +3 -0
- package/dist/types/types/color.d.ts +1 -0
- package/dist/types/types/cssmode.d.ts +1 -0
- package/dist/types/types/flavour.d.ts +1 -0
- package/dist/types/types/layerconfig.d.ts +207 -0
- package/dist/types/types/lonlat.d.ts +1 -0
- package/dist/types/types/mapinitoptions.d.ts +4 -0
- package/dist/types/types/mapprovider.d.ts +46 -0
- package/dist/types/types/provideroptions.d.ts +8 -0
- package/dist/types/types/styleconfig.d.ts +27 -0
- package/dist/types/types/styling.d.ts +24 -0
- package/dist/types/types/styling.unit.d.ts +1 -0
- package/dist/types/types/vmaplayer.d.ts +10 -0
- package/dist/types/utils/async-mutex.d.ts +7 -0
- package/dist/types/utils/diff.d.ts +64 -0
- package/dist/types/utils/diff.unit.d.ts +1 -0
- package/dist/types/utils/dom-env.d.ts +5 -0
- package/dist/types/utils/dom-env.unit.d.ts +1 -0
- package/dist/types/utils/events.d.ts +29 -0
- package/dist/types/utils/logger.d.ts +47 -0
- package/dist/types/utils/logger.unit.d.ts +1 -0
- package/dist/types/utils/messages.d.ts +12 -0
- package/dist/types/utils/spatial-utils.d.ts +6 -0
- package/dist/types/utils/spatial-utils.unit.d.ts +1 -0
- package/dist/types/versions.d.ts +7 -0
- package/dist/v-map/index.esm.js +0 -0
- package/dist/v-map/p--vVleK-M.js +1 -0
- package/dist/v-map/p-09d10db0.entry.js +1 -0
- package/dist/v-map/p-5eba6058.entry.js +10 -0
- package/dist/v-map/p-6b102336.entry.js +1 -0
- package/dist/v-map/p-B-bAcABs.js +1 -0
- package/dist/v-map/p-BBpiaTpT.js +1 -0
- package/dist/v-map/p-BdijL4Av.js +1 -0
- package/dist/v-map/p-Be3r33VF.js +4 -0
- package/dist/v-map/p-BeFu0ap4.js +1 -0
- package/dist/v-map/p-BxFJezdK.js +1 -0
- package/dist/v-map/p-CMKJzsgL.js +1 -0
- package/dist/v-map/p-CXfA_q8m.js +1 -0
- package/dist/v-map/p-CZqY0yW4.js +1 -0
- package/dist/v-map/p-CafTHT9i.js +1 -0
- package/dist/v-map/p-DCTHyf58.js +1 -0
- package/dist/v-map/p-DQuL1Twl.js +1 -0
- package/dist/v-map/p-DR9McdNX.js +1 -0
- package/dist/v-map/p-Dckgonw8.js +1 -0
- package/dist/v-map/p-DhQAXuA7.js +15 -0
- package/dist/v-map/p-DmICdG34.js +7 -0
- package/dist/v-map/p-DrOQ9V4h.js +1 -0
- package/dist/v-map/p-DvHXtWUg.js +1 -0
- package/dist/v-map/p-E-ZsRS8r.js +1 -0
- package/dist/v-map/p-MyTSFnEk.js +1 -0
- package/dist/v-map/p-RpJarvr_.js +1 -0
- package/dist/v-map/p-WaMDUuAz.js +1 -0
- package/dist/v-map/p-aa410e64.entry.js +2 -0
- package/dist/v-map/p-c21c93fe.entry.js +1 -0
- package/dist/v-map/p-jzneDarq.js +2 -0
- package/dist/v-map/p-uiIP-taz.js +1 -0
- package/dist/v-map/v-map.esm.js +1 -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 +193 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t=6378137,i=.0066943799901413165,s=484813681109536e-20,h=Math.PI/2,a=1e-10,e=.017453292519943295,r=57.29577951308232,n=Math.PI/4,o=2*Math.PI,M=3.14159265359,u={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667},l={mm:{to_meter:.001},cm:{to_meter:.01},ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937},fath:{to_meter:1.8288},kmi:{to_meter:1852},"us-ch":{to_meter:20.1168402336805},"us-mi":{to_meter:1609.34721869444},km:{to_meter:1e3},"ind-ft":{to_meter:.30479841},"ind-yd":{to_meter:.91439523},mi:{to_meter:1609.344},yd:{to_meter:.9144},ch:{to_meter:20.1168},link:{to_meter:.201168},dm:{to_meter:.1},in:{to_meter:.0254},"ind-ch":{to_meter:20.11669506},"us-in":{to_meter:.025400050800101},"us-yd":{to_meter:.914401828803658}},f=/[\s_\-\/\(\)]/g;function _(t,i){if(t[i])return t[i];for(var s,h=Object.keys(t),a=i.toLowerCase().replace(f,""),e=-1;++e<h.length;)if((s=h[e]).toLowerCase().replace(f,"")===a)return t[s]}function c(t){var i,s,h,a={},r=t.split("+").map((function(t){return t.trim()})).filter((function(t){return t})).reduce((function(t,i){var s=i.split("=");return s.push(!0),t[s[0].toLowerCase()]=s[1],t}),{}),n={proj:"projName",datum:"datumCode",rf:function(t){a.rf=parseFloat(t)},lat_0:function(t){a.lat0=t*e},lat_1:function(t){a.lat1=t*e},lat_2:function(t){a.lat2=t*e},lat_ts:function(t){a.lat_ts=t*e},lon_0:function(t){a.long0=t*e},lon_1:function(t){a.long1=t*e},lon_2:function(t){a.long2=t*e},alpha:function(t){a.alpha=parseFloat(t)*e},gamma:function(t){a.rectified_grid_angle=parseFloat(t)*e},lonc:function(t){a.longc=t*e},x_0:function(t){a.x0=parseFloat(t)},y_0:function(t){a.y0=parseFloat(t)},k_0:function(t){a.k0=parseFloat(t)},k:function(t){a.k0=parseFloat(t)},a:function(t){a.a=parseFloat(t)},b:function(t){a.b=parseFloat(t)},r:function(t){a.a=a.b=parseFloat(t)},r_a:function(){a.R_A=!0},zone:function(t){a.zone=parseInt(t,10)},south:function(){a.utmSouth=!0},towgs84:function(t){a.datum_params=t.split(",").map((function(t){return parseFloat(t)}))},to_meter:function(t){a.to_meter=parseFloat(t)},units:function(t){a.units=t;var i=_(l,t);i&&(a.to_meter=i.to_meter)},from_greenwich:function(t){a.from_greenwich=t*e},pm:function(t){var i=_(u,t);a.from_greenwich=(i||parseFloat(t))*e},nadgrids:function(t){"@null"===t?a.datumCode="none":a.nadgrids=t},axis:function(t){var i="ewnsud";3===t.length&&-1!==i.indexOf(t.substr(0,1))&&-1!==i.indexOf(t.substr(1,1))&&-1!==i.indexOf(t.substr(2,1))&&(a.axis=t)},approx:function(){a.approx=!0},over:function(){a.over=!0}};for(i in r)s=r[i],i in n?"function"==typeof(h=n[i])?h(s):a[h]=s:a[i]=s;return"string"==typeof a.datumCode&&"WGS84"!==a.datumCode&&(a.datumCode=a.datumCode.toLowerCase()),a.projStr=t,a}class g{static getId(t){const i=t.find((t=>Array.isArray(t)&&"ID"===t[0]));return i&&i.length>=3?{authority:i[1],code:parseInt(i[2],10)}:null}static convertUnit(t,i="unit"){if(!t||t.length<3)return{type:i,name:"unknown",conversion_factor:null};const s=t[1],h=parseFloat(t[2])||null,a=t.find((t=>Array.isArray(t)&&"ID"===t[0]));return{type:i,name:s,conversion_factor:h,id:a?{authority:a[1],code:parseInt(a[2],10)}:null}}static convertAxis(t){const i=t[1]||"Unknown";let s;const h=i.match(/^\((.)\)$/);if(h){const i=h[1].toUpperCase();if("E"===i)s="east";else if("N"===i)s="north";else if("U"===i)s="up";else{if(!t[2])throw new Error(`Unknown axis abbreviation: ${i}`);s=t[2]}}else s=t[2]||"unknown";const a=t.find((t=>Array.isArray(t)&&"ORDER"===t[0])),e=a?parseInt(a[1],10):null,r=t.find((t=>Array.isArray(t)&&("LENGTHUNIT"===t[0]||"ANGLEUNIT"===t[0]||"SCALEUNIT"===t[0])));return{name:i,direction:s,unit:this.convertUnit(r),order:e}}static extractAxes(t){return t.filter((t=>Array.isArray(t)&&"AXIS"===t[0])).map((t=>this.convertAxis(t))).sort(((t,i)=>(t.order||0)-(i.order||0)))}static convert(t,i={}){switch(t[0]){case"PROJCRS":i.type="ProjectedCRS",i.name=t[1],i.base_crs=t.find((t=>Array.isArray(t)&&"BASEGEOGCRS"===t[0]))?this.convert(t.find((t=>Array.isArray(t)&&"BASEGEOGCRS"===t[0]))):null,i.conversion=t.find((t=>Array.isArray(t)&&"CONVERSION"===t[0]))?this.convert(t.find((t=>Array.isArray(t)&&"CONVERSION"===t[0]))):null;const s=t.find((t=>Array.isArray(t)&&"CS"===t[0]));s&&(i.coordinate_system={type:s[1],axis:this.extractAxes(t)});const h=t.find((t=>Array.isArray(t)&&"LENGTHUNIT"===t[0]));if(h){const t=this.convertUnit(h);i.coordinate_system.unit=t}i.id=this.getId(t);break;case"BASEGEOGCRS":case"GEOGCRS":case"GEODCRS":i.type="GEODCRS"===t[0]?"GeodeticCRS":"GeographicCRS",i.name=t[1];const a=t.find((t=>Array.isArray(t)&&("DATUM"===t[0]||"ENSEMBLE"===t[0])));if(a){const s=this.convert(a);"ENSEMBLE"===a[0]?i.datum_ensemble=s:i.datum=s;const h=t.find((t=>Array.isArray(t)&&"PRIMEM"===t[0]));h&&"Greenwich"!==h[1]&&(s.prime_meridian={name:h[1],longitude:parseFloat(h[2])})}i.coordinate_system={type:"ellipsoidal",axis:this.extractAxes(t)},i.id=this.getId(t);break;case"DATUM":i.type="GeodeticReferenceFrame",i.name=t[1],i.ellipsoid=t.find((t=>Array.isArray(t)&&"ELLIPSOID"===t[0]))?this.convert(t.find((t=>Array.isArray(t)&&"ELLIPSOID"===t[0]))):null;break;case"ENSEMBLE":i.type="DatumEnsemble",i.name=t[1],i.members=t.filter((t=>Array.isArray(t)&&"MEMBER"===t[0])).map((t=>({type:"DatumEnsembleMember",name:t[1],id:this.getId(t)})));const e=t.find((t=>Array.isArray(t)&&"ENSEMBLEACCURACY"===t[0]));e&&(i.accuracy=parseFloat(e[1]));const r=t.find((t=>Array.isArray(t)&&"ELLIPSOID"===t[0]));r&&(i.ellipsoid=this.convert(r)),i.id=this.getId(t);break;case"ELLIPSOID":i.type="Ellipsoid",i.name=t[1],i.semi_major_axis=parseFloat(t[2]),i.inverse_flattening=parseFloat(t[3]),t.find((t=>Array.isArray(t)&&"LENGTHUNIT"===t[0]))&&this.convert(t.find((t=>Array.isArray(t)&&"LENGTHUNIT"===t[0])),i);break;case"CONVERSION":i.type="Conversion",i.name=t[1],i.method=t.find((t=>Array.isArray(t)&&"METHOD"===t[0]))?this.convert(t.find((t=>Array.isArray(t)&&"METHOD"===t[0]))):null,i.parameters=t.filter((t=>Array.isArray(t)&&"PARAMETER"===t[0])).map((t=>this.convert(t)));break;case"METHOD":i.type="Method",i.name=t[1],i.id=this.getId(t);break;case"PARAMETER":i.type="Parameter",i.name=t[1],i.value=parseFloat(t[2]),i.unit=this.convertUnit(t.find((t=>Array.isArray(t)&&("LENGTHUNIT"===t[0]||"ANGLEUNIT"===t[0]||"SCALEUNIT"===t[0])))),i.id=this.getId(t);break;case"BOUNDCRS":i.type="BoundCRS";const n=t.find((t=>Array.isArray(t)&&"SOURCECRS"===t[0]));if(n){const t=n.find((t=>Array.isArray(t)));i.source_crs=t?this.convert(t):null}const o=t.find((t=>Array.isArray(t)&&"TARGETCRS"===t[0]));if(o){const t=o.find((t=>Array.isArray(t)));i.target_crs=t?this.convert(t):null}const M=t.find((t=>Array.isArray(t)&&"ABRIDGEDTRANSFORMATION"===t[0]));i.transformation=M?this.convert(M):null;break;case"ABRIDGEDTRANSFORMATION":if(i.type="Transformation",i.name=t[1],i.method=t.find((t=>Array.isArray(t)&&"METHOD"===t[0]))?this.convert(t.find((t=>Array.isArray(t)&&"METHOD"===t[0]))):null,i.parameters=t.filter((t=>Array.isArray(t)&&("PARAMETER"===t[0]||"PARAMETERFILE"===t[0]))).map((t=>"PARAMETER"===t[0]?this.convert(t):"PARAMETERFILE"===t[0]?{name:t[1],value:t[2],id:{authority:"EPSG",code:8656}}:void 0)),7===i.parameters.length){const t=i.parameters[6];"Scale difference"===t.name&&(t.value=Math.round(1e12*(t.value-1))/1e6)}i.id=this.getId(t);break;case"AXIS":i.coordinate_system||(i.coordinate_system={type:"unspecified",axis:[]}),i.coordinate_system.axis.push(this.convertAxis(t));break;case"LENGTHUNIT":const u=this.convertUnit(t,"LinearUnit");i.coordinate_system&&i.coordinate_system.axis&&i.coordinate_system.axis.forEach((t=>{t.unit||(t.unit=u)})),u.conversion_factor&&1!==u.conversion_factor&&i.semi_major_axis&&(i.semi_major_axis={value:i.semi_major_axis,unit:u});break;default:i.keyword=t[0]}return i}}class w extends g{static convert(t,i={}){return super.convert(t,i),i.coordinate_system&&"Cartesian"===i.coordinate_system.subtype&&delete i.coordinate_system,i.usage&&delete i.usage,i}}class S extends g{static convert(t,i={}){super.convert(t,i);const s=t.find((t=>Array.isArray(t)&&"CS"===t[0]));s&&(i.coordinate_system={subtype:s[1],axis:this.extractAxes(t)});const h=t.find((t=>Array.isArray(t)&&"USAGE"===t[0]));if(h){const t=h.find((t=>Array.isArray(t)&&"SCOPE"===t[0])),s=h.find((t=>Array.isArray(t)&&"AREA"===t[0])),a=h.find((t=>Array.isArray(t)&&"BBOX"===t[0]));i.usage={},t&&(i.usage.scope=t[1]),s&&(i.usage.area=s[1]),a&&(i.usage.bbox=a.slice(1))}return i}}var E=/\s/,G=/[A-Za-z]/,v=/[A-Za-z84_]/,P=/[,\]]/,d=/[\d\.E\-\+]/;function m(t){if("string"!=typeof t)throw new Error("not a string");this.text=t.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=1}function N(t,i,s){Array.isArray(i)&&(s.unshift(i),i=null);var h=s.reduce((function(t,i){return p(i,t),t}),i?{}:t);i&&(t[i]=h)}function p(t,i){if(Array.isArray(t)){var s=t.shift();if("PARAMETER"===s&&(s=t.shift()),1===t.length)return Array.isArray(t[0])?(i[s]={},void p(t[0],i[s])):void(i[s]=t[0]);if(t.length)if("TOWGS84"!==s){if("AXIS"===s)return s in i||(i[s]=[]),void i[s].push(t);var h;switch(Array.isArray(s)||(i[s]={}),s){case"UNIT":case"PRIMEM":case"VERT_DATUM":return i[s]={name:t[0].toLowerCase(),convert:t[1]},void(3===t.length&&p(t[2],i[s]));case"SPHEROID":case"ELLIPSOID":return i[s]={name:t[0],a:t[1],rf:t[2]},void(4===t.length&&p(t[3],i[s]));case"EDATUM":case"ENGINEERINGDATUM":case"LOCAL_DATUM":case"DATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":return t[0]=["name",t[0]],void N(i,s,t);case"COMPD_CS":case"COMPOUNDCRS":case"FITTED_CS":case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"ENGCRS":case"ENGINEERINGCRS":return t[0]=["name",t[0]],N(i,s,t),void(i[s].type=s);default:for(h=-1;++h<t.length;)if(!Array.isArray(t[h]))return p(t,i[s]);return N(i,s,t)}}else i[s]=t;else i[s]=!0}else i[t]=!0}function b(t){return.017453292519943295*t}function A(t){const i=(t.projName||"").toLowerCase().replace(/_/g," ");t.long0||!t.longc||"albers conic equal area"!==i&&"lambert azimuthal equal area"!==i||(t.long0=t.longc),t.lat_ts||!t.lat1||"stereographic south pole"!==i&&"polar stereographic (variant b)"!==i?t.lat_ts||!t.lat0||"polar stereographic"!==i&&"polar stereographic (variant a)"!==i||(t.lat_ts=t.lat0,t.lat0=b(t.lat0>0?90:-90),delete t.lat1):(t.lat0=b(t.lat1>0?90:-90),t.lat_ts=t.lat1,delete t.lat1)}function y(t){let i={units:null,to_meter:void 0};return"string"==typeof t?(i.units=t.toLowerCase(),"metre"===i.units&&(i.units="meter"),"meter"===i.units&&(i.to_meter=1)):t&&t.name&&(i.units=t.name.toLowerCase(),"metre"===i.units&&(i.units="meter"),i.to_meter=t.conversion_factor),i}function I(t){return"object"==typeof t?t.value*t.unit.conversion_factor:t}function R(t,i){t.ellipsoid.radius?(i.a=t.ellipsoid.radius,i.rf=0):(i.a=I(t.ellipsoid.semi_major_axis),void 0!==t.ellipsoid.inverse_flattening?i.rf=t.ellipsoid.inverse_flattening:void 0!==t.ellipsoid.semi_major_axis&&void 0!==t.ellipsoid.semi_minor_axis&&(i.rf=i.a/(i.a-I(t.ellipsoid.semi_minor_axis))))}function C(t,i={}){return t&&"object"==typeof t?"BoundCRS"===t.type?(C(t.source_crs,i),t.transformation&&(t.transformation.method&&"NTv2"===t.transformation.method.name?i.nadgrids=t.transformation.parameters[0].value:i.datum_params=t.transformation.parameters.map((t=>t.value))),i):(Object.keys(t).forEach((s=>{const h=t[s];if(null!==h)switch(s){case"name":if(i.srsCode)break;i.name=h,i.srsCode=h;break;case"type":"GeographicCRS"===h?i.projName="longlat":"GeodeticCRS"===h?i.projName=t.coordinate_system&&"Cartesian"===t.coordinate_system.subtype?"geocent":"longlat":"ProjectedCRS"===h&&t.conversion&&t.conversion.method&&(i.projName=t.conversion.method.name);break;case"datum":case"datum_ensemble":h.ellipsoid&&(i.ellps=h.ellipsoid.name,R(h,i)),h.prime_meridian&&(i.from_greenwich=h.prime_meridian.longitude*Math.PI/180);break;case"ellipsoid":i.ellps=h.name,R(h,i);break;case"prime_meridian":i.long0=(h.longitude||0)*Math.PI/180;break;case"coordinate_system":if(h.axis){const t={east:"e",north:"n",west:"w",south:"s",up:"u",down:"d",geocentricx:"e",geocentricy:"n",geocentricz:"u"},s=h.axis.map((i=>t[i.direction.toLowerCase()]));if(s.every(Boolean)&&(i.axis=s.join(""),2===i.axis.length&&(i.axis+="u")),h.unit){const{units:t,to_meter:s}=y(h.unit);i.units=t,i.to_meter=s}else if(h.axis[0]&&h.axis[0].unit){const{units:t,to_meter:s}=y(h.axis[0].unit);i.units=t,i.to_meter=s}}break;case"id":h.authority&&h.code&&(i.title=h.authority+":"+h.code);break;case"conversion":h.method&&h.method.name&&(i.projName=h.method.name),h.parameters&&h.parameters.forEach((t=>{const s=t.name.toLowerCase().replace(/\s+/g,"_"),h=t.value;i[s]=t.unit&&t.unit.conversion_factor?h*t.unit.conversion_factor:"degree"===t.unit?h*Math.PI/180:h}));break;case"unit":h.name&&(i.units=h.name.toLowerCase(),"metre"===i.units&&(i.units="meter")),h.conversion_factor&&(i.to_meter=h.conversion_factor);break;case"base_crs":C(h,i),i.datumCode=h.id?h.id.authority+"_"+h.id.code:h.name}})),void 0!==i.latitude_of_false_origin&&(i.lat0=i.latitude_of_false_origin),void 0!==i.longitude_of_false_origin&&(i.long0=i.longitude_of_false_origin),void 0!==i.latitude_of_standard_parallel&&(i.lat0=i.latitude_of_standard_parallel,i.lat1=i.latitude_of_standard_parallel),void 0!==i.latitude_of_1st_standard_parallel&&(i.lat1=i.latitude_of_1st_standard_parallel),void 0!==i.latitude_of_2nd_standard_parallel&&(i.lat2=i.latitude_of_2nd_standard_parallel),void 0!==i.latitude_of_projection_centre&&(i.lat0=i.latitude_of_projection_centre),void 0!==i.longitude_of_projection_centre&&(i.longc=i.longitude_of_projection_centre),void 0!==i.easting_at_false_origin&&(i.x0=i.easting_at_false_origin),void 0!==i.northing_at_false_origin&&(i.y0=i.northing_at_false_origin),void 0!==i.latitude_of_natural_origin&&(i.lat0=i.latitude_of_natural_origin),void 0!==i.longitude_of_natural_origin&&(i.long0=i.longitude_of_natural_origin),void 0!==i.longitude_of_origin&&(i.long0=i.longitude_of_origin),void 0!==i.false_easting&&(i.x0=i.false_easting),i.easting_at_projection_centre&&(i.x0=i.easting_at_projection_centre),void 0!==i.false_northing&&(i.y0=i.false_northing),i.northing_at_projection_centre&&(i.y0=i.northing_at_projection_centre),void 0!==i.standard_parallel_1&&(i.lat1=i.standard_parallel_1),void 0!==i.standard_parallel_2&&(i.lat2=i.standard_parallel_2),void 0!==i.scale_factor_at_natural_origin&&(i.k0=i.scale_factor_at_natural_origin),void 0!==i.scale_factor_at_projection_centre&&(i.k0=i.scale_factor_at_projection_centre),void 0!==i.scale_factor_on_pseudo_standard_parallel&&(i.k0=i.scale_factor_on_pseudo_standard_parallel),void 0!==i.azimuth&&(i.alpha=i.azimuth),void 0!==i.azimuth_at_projection_centre&&(i.alpha=i.azimuth_at_projection_centre),i.angle_from_rectified_to_skew_grid&&(i.rectified_grid_angle=i.angle_from_rectified_to_skew_grid),A(i),i):t}m.prototype.readCharicter=function(){var t=this.text[this.place++];if(4!==this.state)for(;E.test(t);){if(this.place>=this.text.length)return;t=this.text[this.place++]}switch(this.state){case 1:return this.neutral(t);case 2:return this.keyword(t);case 4:return this.quoted(t);case 5:return this.afterquote(t);case 3:return this.number(t);case-1:return}},m.prototype.afterquote=function(t){if('"'===t)return this.word+='"',void(this.state=4);if(P.test(t))return this.word=this.word.trim(),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in afterquote yet, index '+this.place)},m.prototype.afterItem=function(t){return","===t?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=1)):"]"===t?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=1,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},m.prototype.number=function(t){if(!d.test(t)){if(P.test(t))return this.word=parseFloat(this.word),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in number yet, index '+this.place)}this.word+=t},m.prototype.quoted=function(t){'"'!==t?this.word+=t:this.state=5},m.prototype.keyword=function(t){if(v.test(t))this.word+=t;else{if("["===t){var i=[];return i.push(this.word),this.level++,null===this.root?this.root=i:this.currentObject.push(i),this.stack.push(this.currentObject),this.currentObject=i,void(this.state=1)}if(!P.test(t))throw new Error("havn't handled \""+t+'" in keyword yet, index '+this.place);this.afterItem(t)}},m.prototype.neutral=function(t){if(G.test(t))return this.word=t,void(this.state=2);if('"'===t)return this.word="",void(this.state=4);if(d.test(t))return this.word=t,void(this.state=3);if(!P.test(t))throw new Error("havn't handled \""+t+'" in neutral yet, index '+this.place);this.afterItem(t)},m.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(-1===this.state)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};var k=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function O(t){for(var i=Object.keys(t),s=0,h=i.length;s<h;++s){var a=i[s];-1!==k.indexOf(a)&&T(t[a]),"object"==typeof t[a]&&O(t[a])}}function T(t){if(t.AUTHORITY){var i=Object.keys(t.AUTHORITY)[0];i&&i in t.AUTHORITY&&(t.title=i+":"+t.AUTHORITY[i])}if("GEOGCS"===t.type?t.projName="longlat":"LOCAL_CS"===t.type?(t.projName="identity",t.local=!0):t.projName="object"==typeof t.PROJECTION?Object.keys(t.PROJECTION)[0]:t.PROJECTION,t.AXIS){for(var s="",h=0,a=t.AXIS.length;h<a;++h){var e=[t.AXIS[h][0].toLowerCase(),t.AXIS[h][1].toLowerCase()];-1!==e[0].indexOf("north")||("y"===e[0]||"lat"===e[0])&&"north"===e[1]?s+="n":-1!==e[0].indexOf("south")||("y"===e[0]||"lat"===e[0])&&"south"===e[1]?s+="s":-1!==e[0].indexOf("east")||("x"===e[0]||"lon"===e[0])&&"east"===e[1]?s+="e":-1===e[0].indexOf("west")&&("x"!==e[0]&&"lon"!==e[0]||"west"!==e[1])||(s+="w")}2===s.length&&(s+="u"),3===s.length&&(t.axis=s)}t.UNIT&&(t.units=t.UNIT.name.toLowerCase(),"metre"===t.units&&(t.units="meter"),t.UNIT.convert&&("GEOGCS"===t.type?t.DATUM&&t.DATUM.SPHEROID&&(t.to_meter=t.UNIT.convert*t.DATUM.SPHEROID.a):t.to_meter=t.UNIT.convert));var r=t.GEOGCS;function n(i){return i*(t.to_meter||1)}"GEOGCS"===t.type&&(r=t),r&&(t.datumCode=r.DATUM?r.DATUM.name.toLowerCase():r.name.toLowerCase(),"d_"===t.datumCode.slice(0,2)&&(t.datumCode=t.datumCode.slice(2)),"new_zealand_1949"===t.datumCode&&(t.datumCode="nzgd49"),"wgs_1984"!==t.datumCode&&"world_geodetic_system_1984"!==t.datumCode||("Mercator_Auxiliary_Sphere"===t.PROJECTION&&(t.sphere=!0),t.datumCode="wgs84"),"belge_1972"===t.datumCode&&(t.datumCode="rnb72"),r.DATUM&&r.DATUM.SPHEROID&&(t.ellps=r.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===t.ellps.toLowerCase().slice(0,13)&&(t.ellps="intl"),t.a=r.DATUM.SPHEROID.a,t.rf=parseFloat(r.DATUM.SPHEROID.rf)),r.DATUM&&r.DATUM.TOWGS84&&(t.datum_params=r.DATUM.TOWGS84),~t.datumCode.indexOf("osgb_1936")&&(t.datumCode="osgb36"),~t.datumCode.indexOf("osni_1952")&&(t.datumCode="osni52"),(~t.datumCode.indexOf("tm65")||~t.datumCode.indexOf("geodetic_datum_of_1965"))&&(t.datumCode="ire65"),"ch1903+"===t.datumCode&&(t.datumCode="ch1903"),~t.datumCode.indexOf("israel")&&(t.datumCode="isr93")),t.b&&!isFinite(t.b)&&(t.b=t.a),t.rectified_grid_angle&&(t.rectified_grid_angle=b(t.rectified_grid_angle)),[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",b],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",b],["x0","false_easting",n],["y0","false_northing",n],["long0","central_meridian",b],["lat0","latitude_of_origin",b],["lat0","standard_parallel_1",b],["lat1","standard_parallel_1",b],["lat2","standard_parallel_2",b],["azimuth","Azimuth"],["alpha","azimuth",b],["srsCode","name"]].forEach((function(i){return function(t,i){var s=i[0],h=i[1];!(s in t)&&h in t&&(t[s]=t[h],3===i.length&&(t[s]=i[2](t[s])))}(t,i)})),A(t)}function F(t){if("object"==typeof t)return C(t);const i=function(t){const i=t.toUpperCase();return i.includes("PROJCRS")||i.includes("GEOGCRS")||i.includes("BOUNDCRS")||i.includes("VERTCRS")||i.includes("LENGTHUNIT")||i.includes("ANGLEUNIT")||i.includes("SCALEUNIT")?"WKT2":(i.includes("PROJCS")||i.includes("GEOGCS")||i.includes("LOCAL_CS")||i.includes("VERT_CS")||i.includes("UNIT"),"WKT1")}(t);var s=new m(t).output();if("WKT2"===i)return C(function(t){const i=function(t){return t.find((t=>Array.isArray(t)&&"USAGE"===t[0]))?"2019":(t.find((t=>Array.isArray(t)&&"CS"===t[0])),"2015")}(t);return("2019"===i?S:w).convert(t)}(s));var h=s[0],a={};return p(s,a),O(a),a[h]}function L(t){var i=this;if(2===arguments.length){var s=arguments[1];"string"==typeof s?L[t]="+"===s.charAt(0)?c(arguments[1]):F(arguments[1]):s&&"object"==typeof s&&!("projName"in s)?L[t]=F(arguments[1]):(L[t]=s,s||delete L[t])}else if(1===arguments.length){if(Array.isArray(t))return t.map((function(t){return Array.isArray(t)?L.apply(i,t):L(t)}));if("string"==typeof t){if(t in L)return L[t]}else"EPSG"in t?L["EPSG:"+t.EPSG]=t:"ESRI"in t?L["ESRI:"+t.ESRI]=t:"IAU2000"in t?L["IAU2000:"+t.IAU2000]=t:console.log(t);return}}!function(t){t("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),t("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),t("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs");for(var i=1;i<=60;++i)t("EPSG:"+(32600+i),"+proj=utm +zone="+i+" +datum=WGS84 +units=m"),t("EPSG:"+(32700+i),"+proj=utm +zone="+i+" +south +datum=WGS84 +units=m");t("EPSG:5041","+title=WGS 84 / UPS North (E,N) +proj=stere +lat_0=90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +datum=WGS84 +units=m"),t("EPSG:5042","+title=WGS 84 / UPS South (E,N) +proj=stere +lat_0=-90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +datum=WGS84 +units=m"),t.WGS84=t["EPSG:4326"],t["EPSG:3785"]=t["EPSG:3857"],t.GOOGLE=t["EPSG:3857"],t["EPSG:900913"]=t["EPSG:3857"],t["EPSG:102113"]=t["EPSG:3857"]}(L);var D=["3857","900913","3785","102113"];function x(t,i){var s,h;if(t=t||{},!i)return t;for(h in i)void 0!==(s=i[h])&&(t[h]=s);return t}function U(t,i,s){var h=t*i;return s/Math.sqrt(1-h*h)}function j(t){return t<0?-1:1}function z(t,i){return i||Math.abs(t)<=M?t:t-j(t)*o}function W(t,i,s){var a=t*s;return a=Math.pow((1-a)/(1+a),.5*t),Math.tan(.5*(h-i))/a}function q(t,i){for(var s,a,e=.5*t,r=h-2*Math.atan(i),n=0;n<=15;n++)if(s=t*Math.sin(r),r+=a=h-2*Math.atan(i*Math.pow((1-s)/(1+s),e))-r,Math.abs(a)<=1e-10)return r;return-9999}function H(t){return t}var B=["longlat","identity"],V=[{init:function(){var t=this.b/this.a;this.es=1-t*t,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.k0=this.sphere?Math.cos(this.lat_ts):U(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k0=this.k?this.k:1)},forward:function(t){var i,s,e=t.x,o=t.y;if(o*r>90&&o*r<-90&&e*r>180&&e*r<-180)return null;if(Math.abs(Math.abs(o)-h)<=a)return null;if(this.sphere)i=this.x0+this.a*this.k0*z(e-this.long0,this.over),s=this.y0+this.a*this.k0*Math.log(Math.tan(n+.5*o));else{var M=Math.sin(o),u=W(this.e,o,M);i=this.x0+this.a*this.k0*z(e-this.long0,this.over),s=this.y0-this.a*this.k0*Math.log(u)}return t.x=i,t.y=s,t},inverse:function(t){var i,s,a=t.x-this.x0,e=t.y-this.y0;if(this.sphere)s=h-2*Math.atan(Math.exp(-e/(this.a*this.k0)));else{var r=Math.exp(-e/(this.a*this.k0));if(-9999===(s=q(this.e,r)))return null}return i=z(this.long0+a/(this.a*this.k0),this.over),t.x=i,t.y=s,t},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","Mercator_Variant_A","merc"]},{init:function(){},forward:H,inverse:H,names:B}],K={},J=[];function Q(t,i){var s=J.length;return t.names?(J[s]=t,t.names.forEach((function(t){K[t.toLowerCase()]=s})),this):(console.log(i),!0)}function Z(t){return t.replace(/[-\(\)\s]+/g," ").trim().replace(/ /g,"_")}var X={start:function(){V.forEach(Q)},add:Q,get:function(t){if(!t)return!1;var i=t.toLowerCase();return void 0!==K[i]&&J[K[i]]||(i=Z(i))in K&&J[K[i]]?J[K[i]]:void 0}},Y={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:6378249.2,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"},WGS84:{a:6378137,rf:298.257223563,ellipseName:"WGS 84"},sphere:{a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"}};const $=Y.WGS84;var tt={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},mgi:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Militar-Geographische Institut"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Ordnance Survey of Great Britain 1936"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"},EPSG_5451:{towgs84:"6.41,-49.05,-11.28,1.5657,0.5242,6.9718,-5.7649"},IGNF_LURESG:{towgs84:"-192.986,13.673,-39.309,-0.4099,-2.9332,2.6881,0.43"},EPSG_4614:{towgs84:"-119.4248,-303.65872,-11.00061,1.164298,0.174458,1.096259,3.657065"},EPSG_4615:{towgs84:"-494.088,-312.129,279.877,-1.423,-1.013,1.59,-0.748"},ESRI_37241:{towgs84:"-76.822,257.457,-12.817,2.136,-0.033,-2.392,-0.031"},ESRI_37249:{towgs84:"-440.296,58.548,296.265,1.128,10.202,4.559,-0.438"},ESRI_37245:{towgs84:"-511.151,-181.269,139.609,1.05,2.703,1.798,3.071"},EPSG_4178:{towgs84:"24.9,-126.4,-93.2,-0.063,-0.247,-0.041,1.01"},EPSG_4622:{towgs84:"-472.29,-5.63,-304.12,0.4362,-0.8374,0.2563,1.8984"},EPSG_4625:{towgs84:"126.93,547.94,130.41,-2.7867,5.1612,-0.8584,13.8227"},EPSG_5252:{towgs84:"0.023,0.036,-0.068,0.00176,0.00912,-0.01136,0.00439"},EPSG_4314:{towgs84:"597.1,71.4,412.1,0.894,0.068,-1.563,7.58"},EPSG_4282:{towgs84:"-178.3,-316.7,-131.5,5.278,6.077,10.979,19.166"},EPSG_4231:{towgs84:"-83.11,-97.38,-117.22,0.005693,-0.044698,0.044285,0.1218"},EPSG_4274:{towgs84:"-230.994,102.591,25.199,0.633,-0.239,0.9,1.95"},EPSG_4134:{towgs84:"-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.71006"},EPSG_4254:{towgs84:"18.38,192.45,96.82,0.056,-0.142,-0.2,-0.0013"},EPSG_4159:{towgs84:"-194.513,-63.978,-25.759,-3.4027,3.756,-3.352,-0.9175"},EPSG_4687:{towgs84:"0.072,-0.507,-0.245,0.0183,-0.0003,0.007,-0.0093"},EPSG_4227:{towgs84:"-83.58,-397.54,458.78,-17.595,-2.847,4.256,3.225"},EPSG_4746:{towgs84:"599.4,72.4,419.2,-0.062,-0.022,-2.723,6.46"},EPSG_4745:{towgs84:"612.4,77,440.2,-0.054,0.057,-2.797,2.55"},EPSG_6311:{towgs84:"8.846,-4.394,-1.122,-0.00237,-0.146528,0.130428,0.783926"},EPSG_4289:{towgs84:"565.7381,50.4018,465.2904,-0.395026,0.330772,-1.876073,4.07244"},EPSG_4230:{towgs84:"-68.863,-134.888,-111.49,-0.53,-0.14,0.57,-3.4"},EPSG_4154:{towgs84:"-123.02,-158.95,-168.47"},EPSG_4156:{towgs84:"570.8,85.7,462.8,4.998,1.587,5.261,3.56"},EPSG_4299:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4179:{towgs84:"33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84"},EPSG_4313:{towgs84:"-106.8686,52.2978,-103.7239,0.3366,-0.457,1.8422,-1.2747"},EPSG_4194:{towgs84:"163.511,127.533,-159.789"},EPSG_4195:{towgs84:"105,326,-102.5"},EPSG_4196:{towgs84:"-45,417,-3.5"},EPSG_4611:{towgs84:"-162.619,-276.959,-161.764,0.067753,-2.243648,-1.158828,-1.094246"},EPSG_4633:{towgs84:"137.092,131.66,91.475,-1.9436,-11.5993,-4.3321,-7.4824"},EPSG_4641:{towgs84:"-408.809,366.856,-412.987,1.8842,-0.5308,2.1655,-121.0993"},EPSG_4643:{towgs84:"-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7002"},EPSG_4300:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4188:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4660:{towgs84:"982.6087,552.753,-540.873,6.681627,-31.611492,-19.848161,16.805"},EPSG_4662:{towgs84:"97.295,-263.247,310.882,-1.5999,0.8386,3.1409,13.3259"},EPSG_3906:{towgs84:"577.88891,165.22205,391.18289,4.9145,-0.94729,-13.05098,7.78664"},EPSG_4307:{towgs84:"-209.3622,-87.8162,404.6198,0.0046,3.4784,0.5805,-1.4547"},EPSG_6892:{towgs84:"-76.269,-16.683,68.562,-6.275,10.536,-4.286,-13.686"},EPSG_4690:{towgs84:"221.597,152.441,176.523,2.403,1.3893,0.884,11.4648"},EPSG_4691:{towgs84:"218.769,150.75,176.75,3.5231,2.0037,1.288,10.9817"},EPSG_4629:{towgs84:"72.51,345.411,79.241,-1.5862,-0.8826,-0.5495,1.3653"},EPSG_4630:{towgs84:"165.804,216.213,180.26,-0.6251,-0.4515,-0.0721,7.4111"},EPSG_4692:{towgs84:"217.109,86.452,23.711,0.0183,-0.0003,0.007,-0.0093"},EPSG_9333:{towgs84:"0,0,0,-0.008393,0.000749,-0.010276,0"},EPSG_9059:{towgs84:"0,0,0"},EPSG_4312:{towgs84:"601.705,84.263,485.227,4.7354,1.3145,5.393,-2.3887"},EPSG_4123:{towgs84:"-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496"},EPSG_4309:{towgs84:"-124.45,183.74,44.64,-0.4384,0.5446,-0.9706,-2.1365"},ESRI_104106:{towgs84:"-283.088,-70.693,117.445,-1.157,0.059,-0.652,-4.058"},EPSG_4281:{towgs84:"-219.247,-73.802,269.529"},EPSG_4322:{towgs84:"0,0,4.5"},EPSG_4324:{towgs84:"0,0,1.9"},EPSG_4284:{towgs84:"43.822,-108.842,-119.585,1.455,-0.761,0.737,0.549"},EPSG_4277:{towgs84:"446.448,-125.157,542.06,0.15,0.247,0.842,-20.489"},EPSG_4207:{towgs84:"-282.1,-72.2,120,-1.529,0.145,-0.89,-4.46"},EPSG_4688:{towgs84:"347.175,1077.618,2623.677,33.9058,-70.6776,9.4013,186.0647"},EPSG_4689:{towgs84:"410.793,54.542,80.501,-2.5596,-2.3517,-0.6594,17.3218"},EPSG_4720:{towgs84:"0,0,4.5"},EPSG_4273:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},EPSG_4240:{towgs84:"204.64,834.74,293.8"},EPSG_4817:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},ESRI_104131:{towgs84:"426.62,142.62,460.09,4.98,4.49,-12.42,-17.1"},EPSG_4265:{towgs84:"-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68"},EPSG_4263:{towgs84:"-111.92,-87.85,114.5,1.875,0.202,0.219,0.032"},EPSG_4298:{towgs84:"-689.5937,623.84046,-65.93566,-0.02331,1.17094,-0.80054,5.88536"},EPSG_4270:{towgs84:"-253.4392,-148.452,386.5267,0.15605,0.43,-0.1013,-0.0424"},EPSG_4229:{towgs84:"-121.8,98.1,-10.7"},EPSG_4220:{towgs84:"-55.5,-348,-229.2"},EPSG_4214:{towgs84:"12.646,-155.176,-80.863"},EPSG_4232:{towgs84:"-345,3,223"},EPSG_4238:{towgs84:"-1.977,-13.06,-9.993,0.364,0.254,0.689,-1.037"},EPSG_4168:{towgs84:"-170,33,326"},EPSG_4131:{towgs84:"199,931,318.9"},EPSG_4152:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_5228:{towgs84:"572.213,85.334,461.94,4.9732,1.529,5.2484,3.5378"},EPSG_8351:{towgs84:"485.021,169.465,483.839,7.786342,4.397554,4.102655,0"},EPSG_4683:{towgs84:"-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06"},EPSG_4133:{towgs84:"0,0,0"},EPSG_7373:{towgs84:"0.819,-0.5762,-1.6446,-0.00378,-0.03317,0.00318,0.0693"},EPSG_9075:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9072:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9294:{towgs84:"1.16835,-1.42001,-2.24431,-0.00822,-0.05508,0.01818,0.23388"},EPSG_4212:{towgs84:"-267.434,173.496,181.814,-13.4704,8.7154,7.3926,14.7492"},EPSG_4191:{towgs84:"-44.183,-0.58,-38.489,2.3867,2.7072,-3.5196,-8.2703"},EPSG_4237:{towgs84:"52.684,-71.194,-13.975,-0.312,-0.1063,-0.3729,1.0191"},EPSG_4740:{towgs84:"-1.08,-0.27,-0.9"},EPSG_4124:{towgs84:"419.3836,99.3335,591.3451,0.850389,1.817277,-7.862238,-0.99496"},EPSG_5681:{towgs84:"584.9636,107.7175,413.8067,1.1155,0.2824,-3.1384,7.9922"},EPSG_4141:{towgs84:"23.772,17.49,17.859,-0.3132,-1.85274,1.67299,-5.4262"},EPSG_4204:{towgs84:"-85.645,-273.077,-79.708,2.289,-1.421,2.532,3.194"},EPSG_4319:{towgs84:"226.702,-193.337,-35.371,-2.229,-4.391,9.238,0.9798"},EPSG_4200:{towgs84:"24.82,-131.21,-82.66"},EPSG_4130:{towgs84:"0,0,0"},EPSG_4127:{towgs84:"-82.875,-57.097,-156.768,-2.158,1.524,-0.982,-0.359"},EPSG_4149:{towgs84:"674.374,15.056,405.346"},EPSG_4617:{towgs84:"-0.991,1.9072,0.5129,0.02579,0.00965,0.01166,0"},EPSG_4663:{towgs84:"-210.502,-66.902,-48.476,2.094,-15.067,-5.817,0.485"},EPSG_4664:{towgs84:"-211.939,137.626,58.3,-0.089,0.251,0.079,0.384"},EPSG_4665:{towgs84:"-105.854,165.589,-38.312,-0.003,-0.026,0.024,-0.048"},EPSG_4666:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},EPSG_4756:{towgs84:"-192.873,-39.382,-111.202,-0.00205,-0.0005,0.00335,0.0188"},EPSG_4723:{towgs84:"-179.483,-69.379,-27.584,-7.862,8.163,6.042,-13.925"},EPSG_4726:{towgs84:"8.853,-52.644,180.304,-0.393,-2.323,2.96,-24.081"},EPSG_4267:{towgs84:"-8.0,160.0,176.0"},EPSG_5365:{towgs84:"-0.16959,0.35312,0.51846,0.03385,-0.16325,0.03446,0.03693"},EPSG_4218:{towgs84:"304.5,306.5,-318.1"},EPSG_4242:{towgs84:"-33.722,153.789,94.959,-8.581,-4.478,4.54,8.95"},EPSG_4216:{towgs84:"-292.295,248.758,429.447,4.9971,2.99,6.6906,1.0289"},ESRI_104105:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},ESRI_104129:{towgs84:"0,0,0"},EPSG_4673:{towgs84:"174.05,-25.49,112.57"},EPSG_4202:{towgs84:"-124,-60,154"},EPSG_4203:{towgs84:"-117.763,-51.51,139.061,0.292,0.443,0.277,-0.191"},EPSG_3819:{towgs84:"595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408"},EPSG_8694:{towgs84:"-93.799,-132.737,-219.073,-1.844,0.648,-6.37,-0.169"},EPSG_4145:{towgs84:"275.57,676.78,229.6"},EPSG_4283:{towgs84:"0.06155,-0.01087,-0.04019,0.039492,0.032722,0.032898,-0.009994"},EPSG_4317:{towgs84:"2.3287,-147.0425,-92.0802,-0.309248,0.324822,0.497299,5.689063"},EPSG_4272:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993"},EPSG_4248:{towgs84:"-307.7,265.3,-363.5"},EPSG_5561:{towgs84:"24,-121,-76"},EPSG_5233:{towgs84:"-0.293,766.95,87.713,0.195704,1.695068,3.473016,-0.039338"},ESRI_104130:{towgs84:"-86,-98,-119"},ESRI_104102:{towgs84:"682,-203,480"},ESRI_37207:{towgs84:"7,-10,-26"},EPSG_4675:{towgs84:"59.935,118.4,-10.871"},ESRI_104109:{towgs84:"-89.121,-348.182,260.871"},ESRI_104112:{towgs84:"-185.583,-230.096,281.361"},ESRI_104113:{towgs84:"25.1,-275.6,222.6"},IGNF_WGS72G:{towgs84:"0,12,6"},IGNF_NTFG:{towgs84:"-168,-60,320"},IGNF_EFATE57G:{towgs84:"-127,-769,472"},IGNF_PGP50G:{towgs84:"324.8,153.6,172.1"},IGNF_REUN47G:{towgs84:"94,-948,-1262"},IGNF_CSG67G:{towgs84:"-186,230,110"},IGNF_GUAD48G:{towgs84:"-467,-16,-300"},IGNF_TAHI51G:{towgs84:"162,117,154"},IGNF_TAHAAG:{towgs84:"65,342,77"},IGNF_NUKU72G:{towgs84:"84,274,65"},IGNF_PETRELS72G:{towgs84:"365,194,166"},IGNF_WALL78G:{towgs84:"253,-133,-127"},IGNF_MAYO50G:{towgs84:"-382,-59,-262"},IGNF_TANNAG:{towgs84:"-139,-967,436"},IGNF_IGN72G:{towgs84:"-13,-348,292"},IGNF_ATIGG:{towgs84:"1118,23,66"},IGNF_FANGA84G:{towgs84:"150.57,158.33,118.32"},IGNF_RUSAT84G:{towgs84:"202.13,174.6,-15.74"},IGNF_KAUE70G:{towgs84:"126.74,300.1,-75.49"},IGNF_MOP90G:{towgs84:"-10.8,-1.8,12.77"},IGNF_MHPF67G:{towgs84:"338.08,212.58,-296.17"},IGNF_TAHI79G:{towgs84:"160.61,116.05,153.69"},IGNF_ANAA92G:{towgs84:"1.5,3.84,4.81"},IGNF_MARQUI72G:{towgs84:"330.91,-13.92,58.56"},IGNF_APAT86G:{towgs84:"143.6,197.82,74.05"},IGNF_TUBU69G:{towgs84:"237.17,171.61,-77.84"},IGNF_STPM50G:{towgs84:"11.363,424.148,373.13"},EPSG_4150:{towgs84:"674.374,15.056,405.346"},EPSG_4754:{towgs84:"-208.4058,-109.8777,-2.5764"},ESRI_104101:{towgs84:"372.87,149.23,585.29"},EPSG_4693:{towgs84:"0,-0.15,0.68"},EPSG_6207:{towgs84:"293.17,726.18,245.36"},EPSG_4153:{towgs84:"-133.63,-157.5,-158.62"},EPSG_4132:{towgs84:"-241.54,-163.64,396.06"},EPSG_4221:{towgs84:"-154.5,150.7,100.4"},EPSG_4266:{towgs84:"-80.7,-132.5,41.1"},EPSG_4193:{towgs84:"-70.9,-151.8,-41.4"},EPSG_5340:{towgs84:"-0.41,0.46,-0.35"},EPSG_4246:{towgs84:"-294.7,-200.1,525.5"},EPSG_4318:{towgs84:"-3.2,-5.7,2.8"},EPSG_4121:{towgs84:"-199.87,74.79,246.62"},EPSG_4223:{towgs84:"-260.1,5.5,432.2"},EPSG_4158:{towgs84:"-0.465,372.095,171.736"},EPSG_4285:{towgs84:"-128.16,-282.42,21.93"},EPSG_4613:{towgs84:"-404.78,685.68,45.47"},EPSG_4607:{towgs84:"195.671,332.517,274.607"},EPSG_4475:{towgs84:"-381.788,-57.501,-256.673"},EPSG_4208:{towgs84:"-157.84,308.54,-146.6"},EPSG_4743:{towgs84:"70.995,-335.916,262.898"},EPSG_4710:{towgs84:"-323.65,551.39,-491.22"},EPSG_7881:{towgs84:"-0.077,0.079,0.086"},EPSG_4682:{towgs84:"283.729,735.942,261.143"},EPSG_4739:{towgs84:"-156,-271,-189"},EPSG_4679:{towgs84:"-80.01,253.26,291.19"},EPSG_4750:{towgs84:"-56.263,16.136,-22.856"},EPSG_4644:{towgs84:"-10.18,-350.43,291.37"},EPSG_4695:{towgs84:"-103.746,-9.614,-255.95"},EPSG_4292:{towgs84:"-355,21,72"},EPSG_4302:{towgs84:"-61.702,284.488,472.052"},EPSG_4143:{towgs84:"-124.76,53,466.79"},EPSG_4606:{towgs84:"-153,153,307"},EPSG_4699:{towgs84:"-770.1,158.4,-498.2"},EPSG_4247:{towgs84:"-273.5,110.6,-357.9"},EPSG_4160:{towgs84:"8.88,184.86,106.69"},EPSG_4161:{towgs84:"-233.43,6.65,173.64"},EPSG_9251:{towgs84:"-9.5,122.9,138.2"},EPSG_9253:{towgs84:"-78.1,101.6,133.3"},EPSG_4297:{towgs84:"-198.383,-240.517,-107.909"},EPSG_4269:{towgs84:"0,0,0"},EPSG_4301:{towgs84:"-147,506,687"},EPSG_4618:{towgs84:"-59,-11,-52"},EPSG_4612:{towgs84:"0,0,0"},EPSG_4678:{towgs84:"44.585,-131.212,-39.544"},EPSG_4250:{towgs84:"-130,29,364"},EPSG_4144:{towgs84:"214,804,268"},EPSG_4147:{towgs84:"-17.51,-108.32,-62.39"},EPSG_4259:{towgs84:"-254.1,-5.36,-100.29"},EPSG_4164:{towgs84:"-76,-138,67"},EPSG_4211:{towgs84:"-378.873,676.002,-46.255"},EPSG_4182:{towgs84:"-422.651,-172.995,84.02"},EPSG_4224:{towgs84:"-143.87,243.37,-33.52"},EPSG_4225:{towgs84:"-205.57,168.77,-4.12"},EPSG_5527:{towgs84:"-67.35,3.88,-38.22"},EPSG_4752:{towgs84:"98,390,-22"},EPSG_4310:{towgs84:"-30,190,89"},EPSG_9248:{towgs84:"-192.26,65.72,132.08"},EPSG_4680:{towgs84:"124.5,-63.5,-281"},EPSG_4701:{towgs84:"-79.9,-158,-168.9"},EPSG_4706:{towgs84:"-146.21,112.63,4.05"},EPSG_4805:{towgs84:"682,-203,480"},EPSG_4201:{towgs84:"-165,-11,206"},EPSG_4210:{towgs84:"-157,-2,-299"},EPSG_4183:{towgs84:"-104,167,-38"},EPSG_4139:{towgs84:"11,72,-101"},EPSG_4668:{towgs84:"-86,-98,-119"},EPSG_4717:{towgs84:"-2,151,181"},EPSG_4732:{towgs84:"102,52,-38"},EPSG_4280:{towgs84:"-377,681,-50"},EPSG_4209:{towgs84:"-138,-105,-289"},EPSG_4261:{towgs84:"31,146,47"},EPSG_4658:{towgs84:"-73,46,-86"},EPSG_4721:{towgs84:"265.025,384.929,-194.046"},EPSG_4222:{towgs84:"-136,-108,-292"},EPSG_4601:{towgs84:"-255,-15,71"},EPSG_4602:{towgs84:"725,685,536"},EPSG_4603:{towgs84:"72,213.7,93"},EPSG_4605:{towgs84:"9,183,236"},EPSG_4621:{towgs84:"137,248,-430"},EPSG_4657:{towgs84:"-28,199,5"},EPSG_4316:{towgs84:"103.25,-100.4,-307.19"},EPSG_4642:{towgs84:"-13,-348,292"},EPSG_4698:{towgs84:"145,-187,103"},EPSG_4192:{towgs84:"-206.1,-174.7,-87.7"},EPSG_4311:{towgs84:"-265,120,-358"},EPSG_4135:{towgs84:"58,-283,-182"},ESRI_104138:{towgs84:"198,-226,-347"},EPSG_4245:{towgs84:"-11,851,5"},EPSG_4142:{towgs84:"-125,53,467"},EPSG_4213:{towgs84:"-106,-87,188"},EPSG_4253:{towgs84:"-133,-77,-51"},EPSG_4129:{towgs84:"-132,-110,-335"},EPSG_4713:{towgs84:"-77,-128,142"},EPSG_4239:{towgs84:"217,823,299"},EPSG_4146:{towgs84:"295,736,257"},EPSG_4155:{towgs84:"-83,37,124"},EPSG_4165:{towgs84:"-173,253,27"},EPSG_4672:{towgs84:"175,-38,113"},EPSG_4236:{towgs84:"-637,-549,-203"},EPSG_4251:{towgs84:"-90,40,88"},EPSG_4271:{towgs84:"-2,374,172"},EPSG_4175:{towgs84:"-88,4,101"},EPSG_4716:{towgs84:"298,-304,-375"},EPSG_4315:{towgs84:"-23,259,-9"},EPSG_4744:{towgs84:"-242.2,-144.9,370.3"},EPSG_4244:{towgs84:"-97,787,86"},EPSG_4293:{towgs84:"616,97,-251"},EPSG_4714:{towgs84:"-127,-769,472"},EPSG_4736:{towgs84:"260,12,-147"},EPSG_6883:{towgs84:"-235,-110,393"},EPSG_6894:{towgs84:"-63,176,185"},EPSG_4205:{towgs84:"-43,-163,45"},EPSG_4256:{towgs84:"41,-220,-134"},EPSG_4262:{towgs84:"639,405,60"},EPSG_4604:{towgs84:"174,359,365"},EPSG_4169:{towgs84:"-115,118,426"},EPSG_4620:{towgs84:"-106,-129,165"},EPSG_4184:{towgs84:"-203,141,53"},EPSG_4616:{towgs84:"-289,-124,60"},EPSG_9403:{towgs84:"-307,-92,127"},EPSG_4684:{towgs84:"-133,-321,50"},EPSG_4708:{towgs84:"-491,-22,435"},EPSG_4707:{towgs84:"114,-116,-333"},EPSG_4709:{towgs84:"145,75,-272"},EPSG_4712:{towgs84:"-205,107,53"},EPSG_4711:{towgs84:"124,-234,-25"},EPSG_4718:{towgs84:"230,-199,-752"},EPSG_4719:{towgs84:"211,147,111"},EPSG_4724:{towgs84:"208,-435,-229"},EPSG_4725:{towgs84:"189,-79,-202"},EPSG_4735:{towgs84:"647,1777,-1124"},EPSG_4722:{towgs84:"-794,119,-298"},EPSG_4728:{towgs84:"-307,-92,127"},EPSG_4734:{towgs84:"-632,438,-609"},EPSG_4727:{towgs84:"912,-58,1227"},EPSG_4729:{towgs84:"185,165,42"},EPSG_4730:{towgs84:"170,42,84"},EPSG_4733:{towgs84:"276,-57,149"},ESRI_37218:{towgs84:"230,-199,-752"},ESRI_37240:{towgs84:"-7,215,225"},ESRI_37221:{towgs84:"252,-209,-751"},ESRI_4305:{towgs84:"-123,-206,219"},ESRI_104139:{towgs84:"-73,-247,227"},EPSG_4748:{towgs84:"51,391,-36"},EPSG_4219:{towgs84:"-384,664,-48"},EPSG_4255:{towgs84:"-333,-222,114"},EPSG_4257:{towgs84:"-587.8,519.75,145.76"},EPSG_4646:{towgs84:"-963,510,-359"},EPSG_6881:{towgs84:"-24,-203,268"},EPSG_6882:{towgs84:"-183,-15,273"},EPSG_4715:{towgs84:"-104,-129,239"},IGNF_RGF93GDD:{towgs84:"0,0,0"},IGNF_RGM04GDD:{towgs84:"0,0,0"},IGNF_RGSPM06GDD:{towgs84:"0,0,0"},IGNF_RGTAAF07GDD:{towgs84:"0,0,0"},IGNF_RGFG95GDD:{towgs84:"0,0,0"},IGNF_RGNCG:{towgs84:"0,0,0"},IGNF_RGPFGDD:{towgs84:"0,0,0"},IGNF_ETRS89G:{towgs84:"0,0,0"},IGNF_RGR92GDD:{towgs84:"0,0,0"},EPSG_4173:{towgs84:"0,0,0"},EPSG_4180:{towgs84:"0,0,0"},EPSG_4619:{towgs84:"0,0,0"},EPSG_4667:{towgs84:"0,0,0"},EPSG_4075:{towgs84:"0,0,0"},EPSG_6706:{towgs84:"0,0,0"},EPSG_7798:{towgs84:"0,0,0"},EPSG_4661:{towgs84:"0,0,0"},EPSG_4669:{towgs84:"0,0,0"},EPSG_8685:{towgs84:"0,0,0"},EPSG_4151:{towgs84:"0,0,0"},EPSG_9702:{towgs84:"0,0,0"},EPSG_4758:{towgs84:"0,0,0"},EPSG_4761:{towgs84:"0,0,0"},EPSG_4765:{towgs84:"0,0,0"},EPSG_8997:{towgs84:"0,0,0"},EPSG_4023:{towgs84:"0,0,0"},EPSG_4670:{towgs84:"0,0,0"},EPSG_4694:{towgs84:"0,0,0"},EPSG_4148:{towgs84:"0,0,0"},EPSG_4163:{towgs84:"0,0,0"},EPSG_4167:{towgs84:"0,0,0"},EPSG_4189:{towgs84:"0,0,0"},EPSG_4190:{towgs84:"0,0,0"},EPSG_4176:{towgs84:"0,0,0"},EPSG_4659:{towgs84:"0,0,0"},EPSG_3824:{towgs84:"0,0,0"},EPSG_3889:{towgs84:"0,0,0"},EPSG_4046:{towgs84:"0,0,0"},EPSG_4081:{towgs84:"0,0,0"},EPSG_4558:{towgs84:"0,0,0"},EPSG_4483:{towgs84:"0,0,0"},EPSG_5013:{towgs84:"0,0,0"},EPSG_5264:{towgs84:"0,0,0"},EPSG_5324:{towgs84:"0,0,0"},EPSG_5354:{towgs84:"0,0,0"},EPSG_5371:{towgs84:"0,0,0"},EPSG_5373:{towgs84:"0,0,0"},EPSG_5381:{towgs84:"0,0,0"},EPSG_5393:{towgs84:"0,0,0"},EPSG_5489:{towgs84:"0,0,0"},EPSG_5593:{towgs84:"0,0,0"},EPSG_6135:{towgs84:"0,0,0"},EPSG_6365:{towgs84:"0,0,0"},EPSG_5246:{towgs84:"0,0,0"},EPSG_7886:{towgs84:"0,0,0"},EPSG_8431:{towgs84:"0,0,0"},EPSG_8427:{towgs84:"0,0,0"},EPSG_8699:{towgs84:"0,0,0"},EPSG_8818:{towgs84:"0,0,0"},EPSG_4757:{towgs84:"0,0,0"},EPSG_9140:{towgs84:"0,0,0"},EPSG_8086:{towgs84:"0,0,0"},EPSG_4686:{towgs84:"0,0,0"},EPSG_4737:{towgs84:"0,0,0"},EPSG_4702:{towgs84:"0,0,0"},EPSG_4747:{towgs84:"0,0,0"},EPSG_4749:{towgs84:"0,0,0"},EPSG_4674:{towgs84:"0,0,0"},EPSG_4755:{towgs84:"0,0,0"},EPSG_4759:{towgs84:"0,0,0"},EPSG_4762:{towgs84:"0,0,0"},EPSG_4763:{towgs84:"0,0,0"},EPSG_4764:{towgs84:"0,0,0"},EPSG_4166:{towgs84:"0,0,0"},EPSG_4170:{towgs84:"0,0,0"},EPSG_5546:{towgs84:"0,0,0"},EPSG_7844:{towgs84:"0,0,0"},EPSG_4818:{towgs84:"589,76,480"},EPSG_10328:{towgs84:"0,0,0"},EPSG_9782:{towgs84:"0,0,0"},EPSG_9777:{towgs84:"0,0,0"},EPSG_10690:{towgs84:"0,0,0"},EPSG_10639:{towgs84:"0,0,0"},EPSG_10739:{towgs84:"0,0,0"},EPSG_7686:{towgs84:"0,0,0"},EPSG_8900:{towgs84:"0,0,0"},EPSG_5886:{towgs84:"0,0,0"},EPSG_7683:{towgs84:"0,0,0"},EPSG_6668:{towgs84:"0,0,0"},EPSG_20046:{towgs84:"0,0,0"},EPSG_10299:{towgs84:"0,0,0"},EPSG_10310:{towgs84:"0,0,0"},EPSG_10475:{towgs84:"0,0,0"},EPSG_4742:{towgs84:"0,0,0"},EPSG_10671:{towgs84:"0,0,0"},EPSG_10762:{towgs84:"0,0,0"},EPSG_10725:{towgs84:"0,0,0"},EPSG_10791:{towgs84:"0,0,0"},EPSG_10800:{towgs84:"0,0,0"},EPSG_10305:{towgs84:"0,0,0"},EPSG_10941:{towgs84:"0,0,0"},EPSG_10968:{towgs84:"0,0,0"},EPSG_10875:{towgs84:"0,0,0"},EPSG_6318:{towgs84:"0,0,0"},EPSG_10910:{towgs84:"0,0,0"}};for(var it in tt){var st=tt[it];st.datumName&&(tt[st.datumName]=st)}var ht={};async function at(t,i){for(var s=[],h=await i.getImageCount(),a=h-1;a>=0;a--){var e=await i.getImage(a),r=await e.readRasters(),n=[e.getWidth(),e.getHeight()],o=e.getBoundingBox().map(rt),M=[e.fileDirectory.ModelPixelScale[0],e.fileDirectory.ModelPixelScale[1]].map(rt),u=o[0]+(n[0]-1)*M[0],l=o[3]-(n[1]-1)*M[1],f=r[0],_=r[1],c=[];for(let t=n[1]-1;t>=0;t--)for(let i=n[0]-1;i>=0;i--){var g=t*n[0]+i;c.push([-nt(_[g]),nt(f[g])])}s.push({del:M,lim:n,ll:[-u,l],cvs:c})}var w={header:{nSubgrids:h},subgrids:s};return ht[t]=w,w}function et(t){if(0===t.length)return null;var i="@"===t[0];return i&&(t=t.slice(1)),"null"===t?{name:"null",mandatory:!i,grid:null,isNull:!0}:{name:t,mandatory:!i,grid:ht[t]||null,isNull:!1}}function rt(t){return t*Math.PI/180}function nt(t){return t/3600*Math.PI/180}function ot(t,i,s){return String.fromCharCode.apply(null,new Uint8Array(t.buffer.slice(i,s)))}function Mt(t){return t.map((function(t){return[nt(t.longitudeShift),nt(t.latitudeShift)]}))}function ut(t,i,s){return{name:ot(t,i+8,i+16).trim(),parent:ot(t,i+24,i+24+8).trim(),lowerLatitude:t.getFloat64(i+72,s),upperLatitude:t.getFloat64(i+88,s),lowerLongitude:t.getFloat64(i+104,s),upperLongitude:t.getFloat64(i+120,s),latitudeInterval:t.getFloat64(i+136,s),longitudeInterval:t.getFloat64(i+152,s),gridNodeCount:t.getInt32(i+168,s)}}function lt(t,i,s,h,a){var e=i+176,r=16;!1===a&&(r=8);for(var n=[],o=0;o<s.gridNodeCount;o++){var M={latitudeShift:t.getFloat32(e+o*r,h),longitudeShift:t.getFloat32(e+o*r+4,h)};!1!==a&&(M.latitudeAccuracy=t.getFloat32(e+o*r+8,h),M.longitudeAccuracy=t.getFloat32(e+o*r+12,h)),n.push(M)}return n}function ft(t,i){if(!(this instanceof ft))return new ft(t);this.forward=null,this.inverse=null,this.init=null,this.names=null,i=i||function(t){if(t)throw t};var h=function(t){let i;if(function(t){return"string"==typeof t}(t))if(function(t){return t in L}(t))i=L[t];else if(function(t){return 0!==t.indexOf("+")&&-1!==t.indexOf("[")||"object"==typeof t&&!("srsCode"in t)}(t)){i=F(t);var s=function(t){var i=_(t,"extension");if(i)return _(i,"proj4")}(i);s&&(i=c(s))}else(function(t){return"+"===t[0]})(t)&&(i=c(t));else i="projName"in t?t:F(t);return i&&function(t){if(t.title)return 0===t.title.toLowerCase().indexOf("epsg:")&&D.indexOf(t.title.substr(5))>-1;var i=_(t,"authority");if(i){var s=_(i,"epsg");return s&&D.indexOf(s)>-1}}(i)?L["EPSG:3857"]:i}(t);if("object"==typeof h){var e=ft.projections.get(h.projName);if(e){if(h.datumCode&&"none"!==h.datumCode){var r=_(tt,h.datumCode);r&&(h.datum_params=h.datum_params||(r.towgs84?r.towgs84.split(","):null),h.ellps=r.ellipse,h.datumName=r.datumName?r.datumName:h.datumCode)}h.k0=h.k0||1,h.axis=h.axis||"enu",h.ellps=h.ellps||"wgs84",h.lat1=h.lat1||h.lat0;var n,o,M,u,l,f,g=function(t,i,s,h,e){if(!t){var r=_(Y,h);r||(r=$),t=r.a,i=r.b,s=r.rf}return s&&!i&&(i=(1-1/s)*t),(0===s||Math.abs(t-i)<a)&&(e=!0,i=t),{a:t,b:i,rf:s,sphere:e}}(h.a,h.b,h.rf,h.ellps,h.sphere),w=(l=((M=(n=g.a)*n)-(u=(o=g.b)*o))/M,f=0,h.R_A?(M=(n*=1-l*(.16666666666666666+l*(.04722222222222222+.022156084656084655*l)))*n,l=0):f=Math.sqrt(l),{es:l,e:f,ep2:(M-u)/u}),S=function(t){return void 0===t?null:t.split(",").map(et)}(h.nadgrids),E=h.datum||function(t,i,h,a,e,r,n){var o={};return o.datum_type=void 0===t||"none"===t?5:4,i&&(o.datum_params=i.map(parseFloat),0===o.datum_params[0]&&0===o.datum_params[1]&&0===o.datum_params[2]||(o.datum_type=1),o.datum_params.length>3&&(0===o.datum_params[3]&&0===o.datum_params[4]&&0===o.datum_params[5]&&0===o.datum_params[6]||(o.datum_type=2,o.datum_params[3]*=s,o.datum_params[4]*=s,o.datum_params[5]*=s,o.datum_params[6]=o.datum_params[6]/1e6+1))),n&&(o.datum_type=3,o.grids=n),o.a=h,o.b=a,o.es=e,o.ep2=r,o}(h.datumCode,h.datum_params,g.a,g.b,w.es,w.ep2,S);x(this,h),x(this,e),this.a=g.a,this.b=g.b,this.rf=g.rf,this.sphere=g.sphere,this.es=w.es,this.e=w.e,this.ep2=w.ep2,this.datum=E,"init"in this&&"function"==typeof this.init&&this.init(),i(null,this)}else i("Could not get projection name from: "+t)}else i("Could not parse to valid json: "+t)}function _t(t,i,s){var a,e,r,n=t.x,o=t.y,M=t.z?t.z:0;if(o<-h&&o>-1.001*h)o=-h;else if(o>h&&o<1.001*h)o=h;else{if(o<-h)return{x:-1/0,y:-1/0,z:t.z};if(o>h)return{x:1/0,y:1/0,z:t.z}}return n>Math.PI&&(n-=2*Math.PI),e=Math.sin(o),r=Math.cos(o),{x:((a=s/Math.sqrt(1-i*(e*e)))+M)*r*Math.cos(n),y:(a+M)*r*Math.sin(n),z:(a*(1-i)+M)*e}}function ct(t,i,s,h){var a,e,r,n,o,M,u,l,f,_,c,g,w,S,E,G=t.x,v=t.y,P=t.z?t.z:0;if(a=Math.sqrt(G*G+v*v),e=Math.sqrt(G*G+v*v+P*P),a/s<1e-12){if(S=0,e/s<1e-12)return E=-h,{x:t.x,y:t.y,z:t.z}}else S=Math.atan2(v,G);r=P/e,l=(n=a/e)*(1-i)*(o=1/Math.sqrt(1-i*(2-i)*n*n)),f=r*o,w=0;do{w++,M=i*(u=s/Math.sqrt(1-i*f*f))/(u+(E=a*l+P*f-u*(1-i*f*f))),g=(c=r*(o=1/Math.sqrt(1-M*(2-M)*n*n)))*l-(_=n*(1-M)*o)*f,l=_,f=c}while(g*g>1e-24&&w<30);return{x:S,y:Math.atan(c/Math.abs(_)),z:E}}function gt(t){return 1===t||2===t}function wt(t,i,s){if(null===t.grids||0===t.grids.length)return console.log("Grid shift grids not found"),-1;var h={x:-s.x,y:s.y},a={x:Number.NaN,y:Number.NaN},e=[];t:for(var n=0;n<t.grids.length;n++){var o=t.grids[n];if(e.push(o.name),o.isNull){a=h;break}if(null!==o.grid)for(var M=o.grid.subgrids,u=0,l=M.length;u<l;u++){var f=M[u],_=(Math.abs(f.del[1])+Math.abs(f.del[0]))/1e4;if(!(f.ll[1]-_>h.y||f.ll[0]-_>h.x||f.ll[1]+(f.lim[1]-1)*f.del[1]+_<h.y||f.ll[0]+(f.lim[0]-1)*f.del[0]+_<h.x||(a=St(h,i,f),isNaN(a.x))))break t}else if(o.mandatory)return console.log("Unable to find mandatory grid '"+o.name+"'"),-1}return isNaN(a.x)?(console.log("Failed to find a grid shift table for location '"+-h.x*r+" "+h.y*r+" tried: '"+e+"'"),-1):(s.x=-a.x,s.y=a.y,0)}function St(t,i,s){var h={x:Number.NaN,y:Number.NaN};if(isNaN(t.x))return h;var a={x:t.x,y:t.y};a.x-=s.ll[0],a.y-=s.ll[1],a.x=z(a.x-Math.PI)+Math.PI;var e=Et(a,s);if(i){if(isNaN(e.x))return h;e.x=a.x-e.x,e.y=a.y-e.y;var r,n,o=9;do{if(n=Et(e,s),isNaN(n.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}e.x+=(r={x:a.x-(n.x+e.x),y:a.y-(n.y+e.y)}).x,e.y+=r.y}while(o--&&Math.abs(r.x)>1e-12&&Math.abs(r.y)>1e-12);if(o<0)return console.log("Inverse grid shift iterator failed to converge."),h;h.x=z(e.x+s.ll[0]),h.y=e.y+s.ll[1]}else isNaN(e.x)||(h.x=t.x+e.x,h.y=t.y+e.y);return h}function Et(t,i){var s,h={x:t.x/i.del[0],y:t.y/i.del[1]},a=Math.floor(h.x),e=Math.floor(h.y),r=h.x-1*a,n=h.y-1*e,o={x:Number.NaN,y:Number.NaN};if(a<0||a>=i.lim[0])return o;if(e<0||e>=i.lim[1])return o;var M=i.cvs[s=e*i.lim[0]+a][0],u=i.cvs[s][1];s++;var l=i.cvs[s][0],f=i.cvs[s][1],_=i.cvs[s+=i.lim[0]][0],c=i.cvs[s][1];s--;var g=i.cvs[s][1],w=r*n,S=r*(1-n),E=(1-r)*(1-n),G=(1-r)*n;return o.x=E*M+S*l+G*i.cvs[s][0]+w*_,o.y=E*u+S*f+G*g+w*c,o}function Gt(t,i,s){var h,a,e,r=s.x,n=s.y,o=s.z||0,M={};for(e=0;e<3;e++)if(!i||2!==e||void 0!==s.z)switch(0===e?(h=r,a=-1!=="ew".indexOf(t.axis[e])?"x":"y"):1===e?(h=n,a=-1!=="ns".indexOf(t.axis[e])?"y":"x"):(h=o,a="z"),t.axis[e]){case"e":case"n":M[a]=h;break;case"w":case"s":M[a]=-h;break;case"u":void 0!==s[a]&&(M.z=h);break;case"d":void 0!==s[a]&&(M.z=-h);break;default:return null}return M}function vt(t){var i={x:t[0],y:t[1]};return t.length>2&&(i.z=t[2]),t.length>3&&(i.m=t[3]),i}function Pt(t){if("function"==typeof Number.isFinite){if(Number.isFinite(t))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof t||t!=t||!isFinite(t))throw new TypeError("coordinates must be finite numbers")}function dt(s,h,a,n){var o,M=void 0!==(a=Array.isArray(a)?vt(a):{x:a.x,y:a.y,z:a.z,m:a.m}).z;if(function(t){Pt(t.x),Pt(t.y)}(a),s.datum&&h.datum&&function(t,i){return(1===t.datum.datum_type||2===t.datum.datum_type||3===t.datum.datum_type)&&"WGS84"!==i.datumCode||(1===i.datum.datum_type||2===i.datum.datum_type||3===i.datum.datum_type)&&"WGS84"!==t.datumCode}(s,h)&&(a=dt(s,o=new ft("WGS84"),a,n),s=o),n&&"enu"!==s.axis&&(a=Gt(s,!1,a)),"longlat"===s.projName)a={x:a.x*e,y:a.y*e,z:a.z||0};else if(s.to_meter&&(a={x:a.x*s.to_meter,y:a.y*s.to_meter,z:a.z||0}),!(a=s.inverse(a)))return;if(s.from_greenwich&&(a.x+=s.from_greenwich),a=function(s,h,a){if(function(t,i){return t.datum_type===i.datum_type&&!(t.a!==i.a||Math.abs(t.es-i.es)>5e-11)&&(1===t.datum_type?t.datum_params[0]===i.datum_params[0]&&t.datum_params[1]===i.datum_params[1]&&t.datum_params[2]===i.datum_params[2]:2!==t.datum_type||t.datum_params[0]===i.datum_params[0]&&t.datum_params[1]===i.datum_params[1]&&t.datum_params[2]===i.datum_params[2]&&t.datum_params[3]===i.datum_params[3]&&t.datum_params[4]===i.datum_params[4]&&t.datum_params[5]===i.datum_params[5]&&t.datum_params[6]===i.datum_params[6])}(s,h))return a;if(5===s.datum_type||5===h.datum_type)return a;var e=s.a,r=s.es;if(3===s.datum_type){if(0!==wt(s,!1,a))return;e=t,r=i}var n=h.a,o=h.b,M=h.es;return 3===h.datum_type&&(n=t,o=6356752.314,M=i),r!==M||e!==n||gt(s.datum_type)||gt(h.datum_type)?(a=_t(a,r,e),gt(s.datum_type)&&(a=function(t,i,s){if(1===i)return{x:t.x+s[0],y:t.y+s[1],z:t.z+s[2]};if(2===i){var h=s[3],a=s[4],e=s[5],r=s[6];return{x:r*(t.x-e*t.y+a*t.z)+s[0],y:r*(e*t.x+t.y-h*t.z)+s[1],z:r*(-a*t.x+h*t.y+t.z)+s[2]}}}(a,s.datum_type,s.datum_params)),gt(h.datum_type)&&(a=function(t,i,s){if(1===i)return{x:t.x-s[0],y:t.y-s[1],z:t.z-s[2]};if(2===i){var h=s[3],a=s[4],e=s[5],r=s[6],n=(t.x-s[0])/r,o=(t.y-s[1])/r,M=(t.z-s[2])/r;return{x:n+e*o-a*M,y:-e*n+o+h*M,z:a*n-h*o+M}}}(a,h.datum_type,h.datum_params)),a=ct(a,M,n,o),3!==h.datum_type||0===wt(h,!0,a)?a:void 0):a}(s.datum,h.datum,a))return h.from_greenwich&&(a={x:a.x-h.from_greenwich,y:a.y,z:a.z||0}),"longlat"===h.projName?a={x:a.x*r,y:a.y*r,z:a.z||0}:(a=h.forward(a),h.to_meter&&(a={x:a.x/h.to_meter,y:a.y/h.to_meter,z:a.z||0})),n&&"enu"!==h.axis?Gt(h,!0,a):(a&&!M&&delete a.z,a)}(ft.projections=X).start();var mt=ft("WGS84");function Nt(t,i,s,h){var a,e,r;return Array.isArray(s)?(a=dt(t,i,s,h)||{x:NaN,y:NaN},s.length>2?void 0!==t.name&&"geocent"===t.name||void 0!==i.name&&"geocent"===i.name?"number"==typeof a.z?[a.x,a.y,a.z].concat(s.slice(3)):[a.x,a.y,s[2]].concat(s.slice(3)):[a.x,a.y].concat(s.slice(2)):[a.x,a.y]):(e=dt(t,i,s,h),2===(r=Object.keys(s)).length||r.forEach((function(h){if(void 0!==t.name&&"geocent"===t.name||void 0!==i.name&&"geocent"===i.name){if("x"===h||"y"===h||"z"===h)return}else if("x"===h||"y"===h)return;e[h]=s[h]})),e)}function pt(t){return t instanceof ft?t:"object"==typeof t&&"oProj"in t?t.oProj:ft(t)}var bt="AJSAJS",At="AFAFAF",yt=65,It=73,Rt=79,Ct={forward:kt,inverse:function(t){var i=Lt(xt(t.toUpperCase()));return i.lat&&i.lon?[i.lon,i.lat,i.lon,i.lat]:[i.left,i.bottom,i.right,i.top]},toPoint:Ot};function kt(t,i){return i=i||5,function(t,i){var s,h,a,e,r,n,o,M,u,l,f,_="00000"+t.easting,c="00000"+t.northing;return t.zoneNumber+t.zoneLetter+(u=t.easting,l=t.northing,f=Dt(t.zoneNumber),s=Math.floor(u/1e5),h=Math.floor(l/1e5)%20,e=bt.charCodeAt(a=f-1),r=At.charCodeAt(a),M=!1,(n=e+s-1)>90&&(n=n-90+yt-1,M=!0),(n===It||e<It&&n>It||(n>It||e<It)&&M)&&n++,(n===Rt||e<Rt&&n>Rt||(n>Rt||e<Rt)&&M)&&++n===It&&n++,n>90&&(n=n-90+yt-1),(o=r+h)>86?(o=o-86+yt-1,M=!0):M=!1,(o===It||r<It&&o>It||(o>It||r<It)&&M)&&o++,(o===Rt||r<Rt&&o>Rt||(o>Rt||r<Rt)&&M)&&++o===It&&o++,o>86&&(o=o-86+yt-1),String.fromCharCode(n)+String.fromCharCode(o))+_.substr(_.length-5,i)+c.substr(c.length-5,i)}(function(t){var i,s,h,a,e,r,n,o=t.lat,M=t.lon,u=6378137,l=.00669438,f=.9996,_=Tt(o),c=Tt(M);n=Math.floor((M+180)/6)+1,180===M&&(n=60),o>=56&&o<64&&M>=3&&M<12&&(n=32),o>=72&&o<84&&(M>=0&&M<9?n=31:M>=9&&M<21?n=33:M>=21&&M<33?n=35:M>=33&&M<42&&(n=37)),r=Tt(6*(n-1)-180+3),i=.006739496752268451,s=u/Math.sqrt(1-l*Math.sin(_)*Math.sin(_)),h=Math.tan(_)*Math.tan(_),a=i*Math.cos(_)*Math.cos(_);var g,w,S=f*s*((e=Math.cos(_)*(c-r))+(1-h+a)*e*e*e/6+(5-18*h+h*h+72*a-58*i)*e*e*e*e*e/120)+5e5,E=f*(u*(.9983242984503243*_-.002514607064228144*Math.sin(2*_)+2639046602129982e-21*Math.sin(4*_)-3.418046101696858e-9*Math.sin(6*_))+s*Math.tan(_)*(e*e/2+(5-h+9*a+4*a*a)*e*e*e*e/24+(61-58*h+h*h+600*a-2.2240339282485886)*e*e*e*e*e*e/720));return o<0&&(E+=1e7),{northing:Math.round(E),easting:Math.round(S),zoneNumber:n,zoneLetter:(g=o,w="Z",84>=g&&g>=72?w="X":72>g&&g>=64?w="W":64>g&&g>=56?w="V":56>g&&g>=48?w="U":48>g&&g>=40?w="T":40>g&&g>=32?w="S":32>g&&g>=24?w="R":24>g&&g>=16?w="Q":16>g&&g>=8?w="P":8>g&&g>=0?w="N":0>g&&g>=-8?w="M":-8>g&&g>=-16?w="L":-16>g&&g>=-24?w="K":-24>g&&g>=-32?w="J":-32>g&&g>=-40?w="H":-40>g&&g>=-48?w="G":-48>g&&g>=-56?w="F":-56>g&&g>=-64?w="E":-64>g&&g>=-72?w="D":-72>g&&g>=-80&&(w="C"),w)}}({lat:t[1],lon:t[0]}),i)}function Ot(t){var i=Lt(xt(t.toUpperCase()));return i.lat&&i.lon?[i.lon,i.lat]:[(i.left+i.right)/2,(i.top+i.bottom)/2]}function Tt(t){return t*(Math.PI/180)}function Ft(t){return t/Math.PI*180}function Lt(t){var i=t.northing,s=t.easting,h=t.zoneLetter,a=t.zoneNumber;if(a<0||a>60)return null;var e,r,n,o,M,u,l,f,_,c=.9996,g=6378137,w=.00669438,S=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),E=s-5e5,G=i;h<"N"&&(G-=1e7),l=6*(a-1)-180+3,e=.006739496752268451,_=(f=G/c/6367449.145945056)+(3*S/2-27*S*S*S/32)*Math.sin(2*f)+(21*S*S/16-55*S*S*S*S/32)*Math.sin(4*f)+151*S*S*S/96*Math.sin(6*f),r=g/Math.sqrt(1-w*Math.sin(_)*Math.sin(_)),n=Math.tan(_)*Math.tan(_),o=e*Math.cos(_)*Math.cos(_),M=.99330562*g/Math.pow(1-w*Math.sin(_)*Math.sin(_),1.5),u=E/(r*c);var v=_-r*Math.tan(_)/M*(u*u/2-(5+3*n+10*o-4*o*o-9*e)*u*u*u*u/24+(61+90*n+298*o+45*n*n-1.6983531815716497-3*o*o)*u*u*u*u*u*u/720);v=Ft(v);var P,d=(u-(1+2*n+o)*u*u*u/6+(5-2*o+28*n-3*o*o+8*e+24*n*n)*u*u*u*u*u/120)/Math.cos(_);if(d=l+Ft(d),t.accuracy){var m=Lt({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});P={top:m.lat,right:m.lon,bottom:v,left:d}}else P={lat:v,lon:d};return P}function Dt(t){var i=t%6;return 0===i&&(i=6),i}function xt(t){if(t&&0===t.length)throw"MGRSPoint coverting from nothing";for(var i,s=t.length,h=null,a="",e=0;!/[A-Z]/.test(i=t.charAt(e));){if(e>=2)throw"MGRSPoint bad conversion from: "+t;a+=i,e++}var r=parseInt(a,10);if(0===e||e+3>s)throw"MGRSPoint bad conversion from: "+t;var n=t.charAt(e++);if(n<="A"||"B"===n||"Y"===n||n>="Z"||"I"===n||"O"===n)throw"MGRSPoint zone letter "+n+" not handled: "+t;h=t.substring(e,e+=2);for(var o=Dt(r),M=function(t,i){for(var s=bt.charCodeAt(i-1),h=1e5,a=!1;s!==t.charCodeAt(0);){if(++s===It&&s++,s===Rt&&s++,s>90){if(a)throw"Bad character: "+t;s=yt,a=!0}h+=1e5}return h}(h.charAt(0),o),u=function(t,i){if(t>"V")throw"MGRSPoint given invalid Northing "+t;for(var s=At.charCodeAt(i-1),h=0,a=!1;s!==t.charCodeAt(0);){if(++s===It&&s++,s===Rt&&s++,s>86){if(a)throw"Bad character: "+t;s=yt,a=!0}h+=1e5}return h}(h.charAt(1),o);u<Ut(n);)u+=2e6;var l=s-e;if(l%2!=0)throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+t;var f,_,c,g=l/2,w=0,S=0;return g>0&&(f=1e5/Math.pow(10,g),_=t.substring(e,e+g),w=parseFloat(_)*f,c=t.substring(e+g),S=parseFloat(c)*f),{easting:w+M,northing:S+u,zoneLetter:n,zoneNumber:r,accuracy:f}}function Ut(t){var i;switch(t){case"C":i=11e5;break;case"D":i=2e6;break;case"E":i=28e5;break;case"F":i=37e5;break;case"G":i=46e5;break;case"H":i=55e5;break;case"J":i=64e5;break;case"K":i=73e5;break;case"L":i=82e5;break;case"M":i=91e5;break;case"N":i=0;break;case"P":i=8e5;break;case"Q":i=17e5;break;case"R":i=26e5;break;case"S":i=35e5;break;case"T":i=44e5;break;case"U":i=53e5;break;case"V":i=62e5;break;case"W":i=7e6;break;case"X":i=79e5;break;default:i=-1}if(i>=0)return i;throw"Invalid zone letter: "+t}function jt(t,i,s){if(!(this instanceof jt))return new jt(t,i,s);if(Array.isArray(t))this.x=t[0],this.y=t[1],this.z=t[2]||0;else if("object"==typeof t)this.x=t.x,this.y=t.y,this.z=t.z||0;else if("string"==typeof t&&void 0===i){var h=t.split(",");this.x=parseFloat(h[0]),this.y=parseFloat(h[1]),this.z=parseFloat(h[2])||0}else this.x=t,this.y=i,this.z=s||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}jt.fromMGRS=function(t){return new jt(Ot(t))},jt.prototype.toMGRS=function(t){return kt([this.x,this.y],t)};var zt=.046875,Wt=.01953125,qt=.01068115234375;function Ht(t){var i=[];i[0]=1-t*(.25+t*(zt+t*(Wt+t*qt))),i[1]=t*(.75-t*(zt+t*(Wt+t*qt)));var s=t*t;return i[2]=s*(.46875-t*(.013020833333333334+.007120768229166667*t)),i[3]=(s*=t)*(.3645833333333333-.005696614583333333*t),i[4]=s*t*.3076171875,i}function Bt(t,i,s,h){return h[0]*t-(s*=i)*(h[1]+(i*=i)*(h[2]+i*(h[3]+i*h[4])))}function Vt(t,i,s){for(var h=1/(1-i),e=t,r=20;r;--r){var n=Math.sin(e),o=1-i*n*n;if(e-=o=(Bt(e,n,Math.cos(e),s)-t)*(o*Math.sqrt(o))*h,Math.abs(o)<a)return e}return e}var Kt={init:function(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=Ht(this.es),this.ml0=Bt(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))},forward:function(t){var i,s,h,e=t.y,r=z(t.x-this.long0,this.over),n=Math.sin(e),o=Math.cos(e);if(this.es){var M=o*r,u=Math.pow(M,2),l=this.ep2*Math.pow(o,2),f=Math.pow(l,2),_=Math.abs(o)>a?Math.tan(e):0,c=Math.pow(_,2),g=Math.pow(c,2);i=1-this.es*Math.pow(n,2),M/=Math.sqrt(i);var w=Bt(e,n,o,this.en);s=this.a*(this.k0*M*(1+u/6*(1-c+l+u/20*(5-18*c+g+14*l-58*c*l+u/42*(61+179*g-g*c-479*c)))))+this.x0,h=this.a*(this.k0*(w-this.ml0+n*r*M/2*(1+u/12*(5-c+9*l+4*f+u/30*(61+g-58*c+270*l-330*c*l+u/56*(1385+543*g-g*c-3111*c))))))+this.y0}else{var S=o*Math.sin(r);if(Math.abs(Math.abs(S)-1)<a)return 93;if(s=.5*this.a*this.k0*Math.log((1+S)/(1-S))+this.x0,h=o*Math.cos(r)/Math.sqrt(1-Math.pow(S,2)),(S=Math.abs(h))>=1){if(S-1>a)return 93;h=0}else h=Math.acos(h);e<0&&(h=-h),h=this.a*this.k0*(h-this.lat0)+this.y0}return t.x=s,t.y=h,t},inverse:function(t){var i,s,e,r,n=1/this.a*(t.x-this.x0),o=1/this.a*(t.y-this.y0);if(this.es)if(s=Vt(i=this.ml0+o/this.k0,this.es,this.en),Math.abs(s)<h){var M=Math.sin(s),u=Math.cos(s),l=Math.abs(u)>a?Math.tan(s):0,f=this.ep2*Math.pow(u,2),_=Math.pow(f,2),c=Math.pow(l,2),g=Math.pow(c,2);i=1-this.es*Math.pow(M,2);var w=n*Math.sqrt(i)/this.k0,S=Math.pow(w,2);e=s-(i*=l)*S/(1-this.es)*.5*(1-S/12*(5+3*c-9*f*c+f-4*_-S/30*(61+90*c-252*f*c+45*g+46*f-S/56*(1385+3633*c+4095*g+1574*g*c)))),r=z(this.long0+w*(1-S/6*(1+2*c+f-S/20*(5+28*c+24*g+8*f*c+6*f-S/42*(61+662*c+1320*g+720*g*c))))/u,this.over)}else e=h*j(o),r=0;else{var E=Math.exp(n/this.k0),G=.5*(E-1/E),v=Math.cos(this.lat0+o/this.k0);i=Math.sqrt((1-Math.pow(v,2))/(1+Math.pow(G,2))),e=Math.asin(i),o<0&&(e=-e),r=0===G&&0===v?0:z(Math.atan2(G,v)+this.long0,this.over)}return t.x=r,t.y=e,t},names:["Fast_Transverse_Mercator","Fast Transverse Mercator"]};function Jt(t){var i=Math.exp(t);return(i-1/i)/2}function Qt(t,i){t=Math.abs(t),i=Math.abs(i);var s=Math.max(t,i),h=Math.min(t,i)/(s||1);return s*Math.sqrt(1+Math.pow(h,2))}function Zt(t,i){for(var s,h=2*Math.cos(2*i),a=t.length-1,e=t[a],r=0;--a>=0;)s=h*e-r+t[a],r=e,e=s;return i+s*Math.sin(2*i)}function Xt(t,i,s){for(var h,a,e=Math.sin(i),r=Math.cos(i),n=Jt(s),o=function(t){var i=Math.exp(t);return(i+1/i)/2}(s),M=2*r*o,u=-2*e*n,l=t.length-1,f=t[l],_=0,c=0,g=0;--l>=0;)h=c,a=_,f=M*(c=f)-h-u*(_=g)+t[l],g=u*c-a+M*_;return[(M=e*o)*f-(u=r*n)*g,M*g+u*f]}var Yt={init:function(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(Kt.init.apply(this),this.forward=Kt.forward,this.inverse=Kt.inverse),this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var t=this.es/(1+Math.sqrt(1-this.es)),i=t/(2-t),s=i;this.cgb[0]=i*(2+i*(-2/3+i*(i*(116/45+i*(26/45+i*(-2854/675)))-2))),this.cbg[0]=i*(i*(2/3+i*(4/3+i*(-82/45+i*(32/45+i*(4642/4725)))))-2),this.cgb[1]=(s*=i)*(7/3+i*(i*(-227/45+i*(2704/315+i*(2323/945)))-1.6)),this.cbg[1]=s*(5/3+i*(-16/15+i*(-13/9+i*(904/315+i*(-1522/945))))),this.cgb[2]=(s*=i)*(56/15+i*(-136/35+i*(-1262/105+i*(73814/2835)))),this.cbg[2]=s*(-26/15+i*(34/21+i*(1.6+i*(-12686/2835)))),this.cgb[3]=(s*=i)*(4279/630+i*(-332/35+i*(-399572/14175))),this.cbg[3]=s*(1237/630+i*(i*(-24832/14175)-2.4)),this.cgb[4]=(s*=i)*(4174/315+i*(-144838/6237)),this.cbg[4]=s*(-734/315+i*(109598/31185)),this.cgb[5]=(s*=i)*(601676/22275),this.cbg[5]=s*(444337/155925),s=Math.pow(i,2),this.Qn=this.k0/(1+i)*(1+s*(1/4+s*(1/64+s/256))),this.utg[0]=i*(i*(2/3+i*(-37/96+i*(1/360+i*(81/512+i*(-96199/604800)))))-.5),this.gtu[0]=i*(.5+i*(-2/3+i*(5/16+i*(41/180+i*(-127/288+i*(7891/37800)))))),this.utg[1]=s*(-1/48+i*(-1/15+i*(437/1440+i*(-46/105+i*(1118711/3870720))))),this.gtu[1]=s*(13/48+i*(i*(557/1440+i*(281/630+i*(-1983433/1935360)))-.6)),this.utg[2]=(s*=i)*(-17/480+i*(37/840+i*(209/4480+i*(-5569/90720)))),this.gtu[2]=s*(61/240+i*(-103/140+i*(15061/26880+i*(167603/181440)))),this.utg[3]=(s*=i)*(-4397/161280+i*(11/504+i*(830251/7257600))),this.gtu[3]=s*(49561/161280+i*(-179/168+i*(6601661/7257600))),this.utg[4]=(s*=i)*(-4583/161280+i*(108847/3991680)),this.gtu[4]=s*(34729/80640+i*(-3418889/1995840)),this.utg[5]=(s*=i)*(-20648693/638668800),this.gtu[5]=.6650675310896665*s;var h=Zt(this.cbg,this.lat0);this.Zb=-this.Qn*(h+function(t,i){for(var s,h=2*Math.cos(i),a=t.length-1,e=t[a],r=0;--a>=0;)s=h*e-r+t[a],r=e,e=s;return Math.sin(i)*s}(this.gtu,2*h))},forward:function(t){var i=z(t.x-this.long0,this.over),s=t.y;s=Zt(this.cbg,s);var h=Math.sin(s),a=Math.cos(s),e=Math.sin(i),r=Math.cos(i);s=Math.atan2(h,r*a),i=Math.atan2(e*a,Qt(h,a*r)),i=function(t){var i=Math.abs(t);return i=function(t){var i=1+t,s=i-1;return 0===s?t:t*Math.log(i)/s}(i*(1+i/(Qt(1,i)+1))),t<0?-i:i}(Math.tan(i));var n,o,M=Xt(this.gtu,2*s,2*i);return s+=M[0],i+=M[1],Math.abs(i)<=2.623395162778?(n=this.a*(this.Qn*i)+this.x0,o=this.a*(this.Qn*s+this.Zb)+this.y0):(n=1/0,o=1/0),t.x=n,t.y=o,t},inverse:function(t){var i,s,h=1/this.a*(t.x-this.x0),a=1/this.a*(t.y-this.y0);if(a=(a-this.Zb)/this.Qn,h/=this.Qn,Math.abs(h)<=2.623395162778){var e=Xt(this.utg,2*a,2*h);a+=e[0],h+=e[1],h=Math.atan(Jt(h));var r=Math.sin(a),n=Math.cos(a),o=Math.sin(h),M=Math.cos(h);a=Math.atan2(r*M,Qt(o,M*n)),i=z((h=Math.atan2(o,M*n))+this.long0,this.over),s=Zt(this.cgb,a)}else i=1/0,s=1/0;return t.x=i,t.y=s,t},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"]},$t={init:function(){var t=function(t,i){if(void 0===t){if((t=Math.floor(30*(z(i)+Math.PI)/Math.PI)+1)<0)return 0;if(t>60)return 60}return t}(this.zone,this.long0);if(void 0===t)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(t)-183)*e,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,Yt.init.apply(this),this.forward=Yt.forward,this.inverse=Yt.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"};function ti(t,i){return Math.pow((1-t)/(1+t),i)}var ii={init:function(){var t=Math.sin(this.lat0),i=Math.cos(this.lat0);i*=i,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*i*i/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+n)/(Math.pow(Math.tan(.5*this.lat0+n),this.C)*ti(this.e*t,this.ratexp))},forward:function(t){var i=t.x,s=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*s+n),this.C)*ti(this.e*Math.sin(s),this.ratexp))-h,t.x=this.C*i,t},inverse:function(t){for(var i=t.x/this.C,s=t.y,a=Math.pow(Math.tan(.5*s+n)/this.K,1/this.C),e=20;e>0&&(s=2*Math.atan(a*ti(this.e*Math.sin(t.y),-.5*this.e))-h,!(Math.abs(s-t.y)<1e-14));--e)t.y=s;return e?(t.x=i,t.y=s,t):null}},si={init:function(){ii.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(t){var i,s,h,a;return t.x=z(t.x-this.long0,this.over),ii.forward.apply(this,[t]),i=Math.sin(t.y),s=Math.cos(t.y),h=Math.cos(t.x),t.x=(a=this.k0*this.R2/(1+this.sinc0*i+this.cosc0*s*h))*s*Math.sin(t.x),t.y=a*(this.cosc0*i-this.sinc0*s*h),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){var i,s,h,a,e;if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,e=Qt(t.x,t.y)){var r=2*Math.atan2(e,this.R2);i=Math.sin(r),s=Math.cos(r),a=Math.asin(s*this.sinc0+t.y*i*this.cosc0/e),h=Math.atan2(t.x*i,e*this.cosc0*s-t.y*this.sinc0*i)}else a=this.phic0,h=0;return t.x=h,t.y=a,ii.inverse.apply(this,[t]),t.x=z(t.x+this.long0,this.over),t},names:["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]};function hi(t,i,s){return i*=s,Math.tan(.5*(h+t))*Math.pow((1-i)/(1+i),.5*s)}var ai={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=a&&(this.k0=.5*(1+j(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=a&&(this.con=this.lat0>0?1:-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=a&&Math.abs(Math.cos(this.lat_ts))>a&&(this.k0=.5*this.cons*U(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/W(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=U(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(hi(this.lat0,this.sinlat0,this.e))-h,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(t){var i,s,e,r,n,o,M=t.x,u=t.y,l=Math.sin(u),f=Math.cos(u),_=z(M-this.long0,this.over);return Math.abs(Math.abs(M-this.long0)-Math.PI)<=a&&Math.abs(u+this.lat0)<=a?(t.x=NaN,t.y=NaN,t):this.sphere?(i=2*this.k0/(1+this.sinlat0*l+this.coslat0*f*Math.cos(_)),t.x=this.a*i*f*Math.sin(_)+this.x0,t.y=this.a*i*(this.coslat0*l-this.sinlat0*f*Math.cos(_))+this.y0,t):(s=2*Math.atan(hi(u,l,this.e))-h,r=Math.cos(s),e=Math.sin(s),Math.abs(this.coslat0)<=a?(n=W(this.e,u*this.con,this.con*l),t.x=this.x0+(o=2*this.a*this.k0*n/this.cons)*Math.sin(M-this.long0),t.y=this.y0-this.con*o*Math.cos(M-this.long0),t):(Math.abs(this.sinlat0)<a?(i=2*this.a*this.k0/(1+r*Math.cos(_)),t.y=i*e):(i=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*e+this.cosX0*r*Math.cos(_))),t.y=i*(this.cosX0*e-this.sinX0*r*Math.cos(_))+this.y0),t.x=i*r*Math.sin(_)+this.x0,t))},inverse:function(t){var i,s,e,r;t.x-=this.x0,t.y-=this.y0;var n=Math.sqrt(t.x*t.x+t.y*t.y);if(this.sphere){var o=2*Math.atan(n/(2*this.a*this.k0));return i=this.long0,s=this.lat0,n<=a?(t.x=i,t.y=s,t):(s=Math.asin(Math.cos(o)*this.sinlat0+t.y*Math.sin(o)*this.coslat0/n),i=Math.abs(this.coslat0)<a?z(this.lat0>0?this.long0+Math.atan2(t.x,-1*t.y):this.long0+Math.atan2(t.x,t.y),this.over):z(this.long0+Math.atan2(t.x*Math.sin(o),n*this.coslat0*Math.cos(o)-t.y*this.sinlat0*Math.sin(o)),this.over),t.x=i,t.y=s,t)}if(Math.abs(this.coslat0)<=a){if(n<=a)return s=this.lat0,t.x=i=this.long0,t.y=s,t;t.x*=this.con,t.y*=this.con,s=this.con*q(this.e,n*this.cons/(2*this.a*this.k0)),i=this.con*z(this.con*this.long0+Math.atan2(t.x,-1*t.y),this.over)}else e=2*Math.atan(n*this.cosX0/(2*this.a*this.k0*this.ms1)),i=this.long0,n<=a?r=this.X0:(r=Math.asin(Math.cos(e)*this.sinX0+t.y*Math.sin(e)*this.cosX0/n),i=z(this.long0+Math.atan2(t.x*Math.sin(e),n*this.cosX0*Math.cos(e)-t.y*this.sinX0*Math.sin(e)),this.over)),s=-1*q(this.e,Math.tan(.5*(h+r)));return t.x=i,t.y=s,t},names:["stere","Stereographic_South_Pole","Polar_Stereographic_variant_A","Polar_Stereographic_variant_B","Polar_Stereographic"],ssfn_:hi},ei={init:function(){var t=this.lat0;this.lambda0=this.long0;var i=Math.sin(t),s=this.a,h=1/this.rf,a=2*h-Math.pow(h,2),e=this.e=Math.sqrt(a);this.R=this.k0*s*Math.sqrt(1-a)/(1-a*Math.pow(i,2)),this.alpha=Math.sqrt(1+a/(1-a)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(i/this.alpha);var r=Math.log(Math.tan(Math.PI/4+this.b0/2)),n=Math.log(Math.tan(Math.PI/4+t/2)),o=Math.log((1+e*i)/(1-e*i));this.K=r-this.alpha*n+this.alpha*e/2*o},forward:function(t){var i=Math.log(Math.tan(Math.PI/4-t.y/2)),s=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),h=2*(Math.atan(Math.exp(-this.alpha*(i+s)+this.K))-Math.PI/4),a=this.alpha*(t.x-this.lambda0),e=Math.atan(Math.sin(a)/(Math.sin(this.b0)*Math.tan(h)+Math.cos(this.b0)*Math.cos(a))),r=Math.asin(Math.cos(this.b0)*Math.sin(h)-Math.sin(this.b0)*Math.cos(h)*Math.cos(a));return t.y=this.R/2*Math.log((1+Math.sin(r))/(1-Math.sin(r)))+this.y0,t.x=this.R*e+this.x0,t},inverse:function(t){for(var i=(t.x-this.x0)/this.R,s=2*(Math.atan(Math.exp((t.y-this.y0)/this.R))-Math.PI/4),h=Math.asin(Math.cos(this.b0)*Math.sin(s)+Math.sin(this.b0)*Math.cos(s)*Math.cos(i)),a=Math.atan(Math.sin(i)/(Math.cos(this.b0)*Math.cos(i)-Math.sin(this.b0)*Math.tan(s))),e=this.lambda0+a/this.alpha,r=0,n=h,o=-1e3,M=0;Math.abs(n-o)>1e-7;){if(++M>20)return;r=1/this.alpha*(Math.log(Math.tan(Math.PI/4+h/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(n))/2)),o=n,n=2*Math.atan(Math.exp(r))-Math.PI/2}return t.x=e,t.y=n,t},names:["somerc"]},ri=1e-7,ni={init:function(){var t,i,s,e,r,M,u,l,f,_,c,g,w,S,E=0,G=0,v=0,P=0,d=0,m=0,N=0;this.no_off=(w=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],S="object"==typeof(g=this).projName?Object.keys(g.projName)[0]:g.projName,"no_uoff"in g||"no_off"in g||-1!==w.indexOf(S)||-1!==w.indexOf(Z(S))),this.no_rot="no_rot"in this;var p=!1;"alpha"in this&&(p=!0);var b=!1;if("rectified_grid_angle"in this&&(b=!0),p&&(N=this.alpha),b&&(E=this.rectified_grid_angle),p||b)G=this.longc;else if(v=this.long1,d=this.lat1,P=this.long2,m=this.lat2,Math.abs(d-m)<=ri||(t=Math.abs(d))<=ri||Math.abs(t-h)<=ri||Math.abs(Math.abs(this.lat0)-h)<=ri||Math.abs(Math.abs(m)-h)<=ri)throw new Error;var A=1-this.es;i=Math.sqrt(A),Math.abs(this.lat0)>a?(l=Math.sin(this.lat0),s=Math.cos(this.lat0),t=1-this.es*l*l,this.B=s*s,this.B=Math.sqrt(1+this.es*this.B*this.B/A),this.A=this.B*this.k0*i/t,(r=(e=this.B*i/(s*Math.sqrt(t)))*e-1)<=0?r=0:(r=Math.sqrt(r),this.lat0<0&&(r=-r)),this.E=r+=e,this.E*=Math.pow(W(this.e,this.lat0,l),this.B)):(this.B=1/i,this.A=this.k0,this.E=e=r=1),p||b?(p?(c=Math.asin(Math.sin(N)/e),b||(E=N)):(c=E,N=Math.asin(e*Math.sin(c))),this.lam0=G-Math.asin(.5*(r-1/r)*Math.tan(c))/this.B):(M=Math.pow(W(this.e,d,Math.sin(d)),this.B),u=Math.pow(W(this.e,m,Math.sin(m)),this.B),r=this.E/M,f=(u-M)/(u+M),_=((_=this.E*this.E)-u*M)/(_+u*M),(t=v-P)<-Math.PI?P-=o:t>Math.PI&&(P+=o),this.lam0=z(.5*(v+P)-Math.atan(_*Math.tan(.5*this.B*(v-P))/f)/this.B,this.over),c=Math.atan(2*Math.sin(this.B*z(v-this.lam0,this.over))/(r-1/r)),E=N=Math.asin(e*Math.sin(c))),this.singam=Math.sin(c),this.cosgam=Math.cos(c),this.sinrot=Math.sin(E),this.cosrot=Math.cos(E),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(e*e-1)/Math.cos(N))),this.lat0<0&&(this.u_0=-this.u_0)),r=.5*c,this.v_pole_n=this.ArB*Math.log(Math.tan(n-r)),this.v_pole_s=this.ArB*Math.log(Math.tan(n+r))},forward:function(t){var i,s,e,r,n,o,M,u,l={};if(t.x=t.x-this.lam0,Math.abs(Math.abs(t.y)-h)>a){if(i=.5*((n=this.E/Math.pow(W(this.e,t.y,Math.sin(t.y)),this.B))-(o=1/n)),s=.5*(n+o),r=Math.sin(this.B*t.x),e=(i*this.singam-r*this.cosgam)/s,Math.abs(Math.abs(e)-1)<a)throw new Error;u=.5*this.ArB*Math.log((1-e)/(1+e)),o=Math.cos(this.B*t.x),M=Math.abs(o)<ri?this.A*t.x:this.ArB*Math.atan2(i*this.cosgam+r*this.singam,o)}else u=t.y>0?this.v_pole_n:this.v_pole_s,M=this.ArB*t.y;return this.no_rot?(l.x=M,l.y=u):(l.x=u*this.cosrot+(M-=this.u_0)*this.sinrot,l.y=M*this.cosrot-u*this.sinrot),l.x=this.a*l.x+this.x0,l.y=this.a*l.y+this.y0,l},inverse:function(t){var i,s,e,r,n,o,M,u={};if(t.x=1/this.a*(t.x-this.x0),t.y=1/this.a*(t.y-this.y0),this.no_rot?(s=t.y,i=t.x):(s=t.x*this.cosrot-t.y*this.sinrot,i=t.y*this.cosrot+t.x*this.sinrot+this.u_0),r=.5*((e=Math.exp(-this.BrA*s))-1/e),n=.5*(e+1/e),M=((o=Math.sin(this.BrA*i))*this.cosgam+r*this.singam)/n,Math.abs(Math.abs(M)-1)<a)u.x=0,u.y=M<0?-h:h;else{if(u.y=this.E/Math.sqrt((1+M)/(1-M)),u.y=q(this.e,Math.pow(u.y,1/this.B)),u.y===1/0)throw new Error;u.x=-this.rB*Math.atan2(r*this.cosgam-o*this.singam,Math.cos(this.BrA*i))}return u.x+=this.lam0,u},names:["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Variant_B","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"]},oi={init:function(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<a)){var t=this.b/this.a;this.e=Math.sqrt(1-t*t);var i=Math.sin(this.lat1),s=Math.cos(this.lat1),e=U(this.e,i,s),r=W(this.e,this.lat1,i),n=Math.sin(this.lat2),o=Math.cos(this.lat2),M=U(this.e,n,o),u=W(this.e,this.lat2,n),l=Math.abs(Math.abs(this.lat0)-h)<a?0:W(this.e,this.lat0,Math.sin(this.lat0));this.ns=Math.abs(this.lat1-this.lat2)>a?Math.log(e/M)/Math.log(r/u):i,isNaN(this.ns)&&(this.ns=i),this.f0=e/(this.ns*Math.pow(r,this.ns)),this.rh=this.a*this.f0*Math.pow(l,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(t){var i=t.x,s=t.y;Math.abs(2*Math.abs(s)-Math.PI)<=a&&(s=j(s)*(h-2e-10));var e,r,n=Math.abs(Math.abs(s)-h);if(n>a)e=W(this.e,s,Math.sin(s)),r=this.a*this.f0*Math.pow(e,this.ns);else{if((n=s*this.ns)<=0)return null;r=0}var o=this.ns*z(i-this.long0,this.over);return t.x=this.k0*(r*Math.sin(o))+this.x0,t.y=this.k0*(this.rh-r*Math.cos(o))+this.y0,t},inverse:function(t){var i,s,a,e,r,n=(t.x-this.x0)/this.k0,o=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(i=Math.sqrt(n*n+o*o),s=1):(i=-Math.sqrt(n*n+o*o),s=-1);var M=0;if(0!==i&&(M=Math.atan2(s*n,s*o)),0!==i||this.ns>0){if(s=1/this.ns,a=Math.pow(i/(this.a*this.f0),s),-9999===(e=q(this.e,a)))return null}else e=-h;return r=z(M/this.ns+this.long0,this.over),t.x=r,t.y=e,t},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"]},Mi={init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(t){var i,s,h,a,e,r,n,o=t.y,M=z(t.x-this.long0,this.over);return i=Math.pow((1+this.e*Math.sin(o))/(1-this.e*Math.sin(o)),this.alfa*this.e/2),s=2*(Math.atan(this.k*Math.pow(Math.tan(o/2+this.s45),this.alfa)/i)-this.s45),h=-M*this.alfa,a=Math.asin(Math.cos(this.ad)*Math.sin(s)+Math.sin(this.ad)*Math.cos(s)*Math.cos(h)),e=Math.asin(Math.cos(s)*Math.sin(h)/Math.cos(a)),r=this.n*e,n=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(a/2+this.s45),this.n),t.y=n*Math.cos(r)/1,t.x=n*Math.sin(r)/1,this.czech||(t.y*=-1,t.x*=-1),t},inverse:function(t){var i,s,h,a,e,r,n,o=t.x;t.x=t.y,t.y=o,this.czech||(t.y*=-1,t.x*=-1),e=Math.sqrt(t.x*t.x+t.y*t.y),a=Math.atan2(t.y,t.x)/Math.sin(this.s0),h=2*(Math.atan(Math.pow(this.ro0/e,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),i=Math.asin(Math.cos(this.ad)*Math.sin(h)-Math.sin(this.ad)*Math.cos(h)*Math.cos(a)),s=Math.asin(Math.cos(h)*Math.sin(a)/Math.cos(i)),t.x=this.long0-s/this.alfa,r=i,n=0;var M=0;do{t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(i/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(r))/(1-this.e*Math.sin(r)),this.e/2))-this.s45),Math.abs(r-t.y)<1e-10&&(n=1),r=t.y,M+=1}while(0===n&&M<15);return M>=15?null:t},names:["Krovak","Krovak Modified","Krovak (North Orientated)","Krovak Modified (North Orientated)","krovak"]};function ui(t,i,s,h,a){return t*a-i*Math.sin(2*a)+s*Math.sin(4*a)-h*Math.sin(6*a)}function li(t){return 1-.25*t*(1+t/16*(3+1.25*t))}function fi(t){return.375*t*(1+.25*t*(1+.46875*t))}function _i(t){return.05859375*t*t*(1+.75*t)}function ci(t){return t*t*t*(35/3072)}function gi(t,i,s){var h=i*s;return t/Math.sqrt(1-h*h)}function wi(t){return Math.abs(t)<h?t:t-j(t)*Math.PI}function Si(t,i,s,h,a){var e,r;e=t/i;for(var n=0;n<15;n++)if(e+=r=(t-(i*e-s*Math.sin(2*e)+h*Math.sin(4*e)-a*Math.sin(6*e)))/(i-2*s*Math.cos(2*e)+4*h*Math.cos(4*e)-6*a*Math.cos(6*e)),Math.abs(r)<=1e-10)return e;return NaN}var Ei={init:function(){this.sphere||(this.e0=li(this.es),this.e1=fi(this.es),this.e2=_i(this.es),this.e3=ci(this.es),this.ml0=this.a*ui(this.e0,this.e1,this.e2,this.e3,this.lat0))},forward:function(t){var i,s,h=t.x,a=t.y;if(h=z(h-this.long0,this.over),this.sphere)i=this.a*Math.asin(Math.cos(a)*Math.sin(h)),s=this.a*(Math.atan2(Math.tan(a),Math.cos(h))-this.lat0);else{var e=Math.sin(a),r=Math.cos(a),n=gi(this.a,this.e,e),o=Math.tan(a)*Math.tan(a),M=h*Math.cos(a),u=M*M,l=this.es*r*r/(1-this.es);i=n*M*(1-u*o*(1/6-(8-o+8*l)*u/120)),s=this.a*ui(this.e0,this.e1,this.e2,this.e3,a)-this.ml0+n*e/r*u*(.5+(5-o+6*l)*u/24)}return t.x=i+this.x0,t.y=s+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var i,s,e=t.x/this.a,r=t.y/this.a;if(this.sphere){var n=r+this.lat0;i=Math.asin(Math.sin(n)*Math.cos(e)),s=Math.atan2(Math.tan(e),Math.cos(n))}else{var o=Si(this.ml0/this.a+r,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(o)-h)<=a)return t.x=this.long0,t.y=h,r<0&&(t.y*=-1),t;var M=gi(this.a,this.e,Math.sin(o)),u=M*M*M/this.a/this.a*(1-this.es),l=Math.pow(Math.tan(o),2),f=e*this.a/M,_=f*f;i=o-M*Math.tan(o)/u*f*f*(.5-(1+3*l)*f*f/24),s=f*(1-_*(l/3+(1+3*l)*l*_/15))/Math.cos(o)}return t.x=z(s+this.long0,this.over),t.y=wi(i),t},names:["Cassini","Cassini_Soldner","cass"]};function Gi(t,i){var s;return t>1e-7?(1-t*t)*(i/(1-(s=t*i)*s)-.5/t*Math.log((1-s)/(1+s))):2*i}var vi={init:function(){var t,i=Math.abs(this.lat0);if(this.mode=Math.abs(i-h)<a?this.lat0<0?1:2:Math.abs(i)<a?3:4,this.es>0)switch(this.qp=Gi(this.e,1),this.mmf=.5/(1-this.es),this.apa=function(t){var i,s=[];return s[0]=.3333333333333333*t,s[0]+=.17222222222222222*(i=t*t),s[1]=.06388888888888888*i,s[0]+=.10257936507936508*(i*=t),s[1]+=.0664021164021164*i,s[2]=.016415012942191543*i,s}(this.es),this.mode){case 2:case 1:this.dd=1;break;case 3:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case 4:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=Gi(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else 4===this.mode&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(t){var i,s,e,r,o,M,u,l,f,_,c=t.x,g=t.y;if(c=z(c-this.long0,this.over),this.sphere){if(o=Math.sin(g),_=Math.cos(g),e=Math.cos(c),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((s=this.mode===this.EQUIT?1+_*e:1+this.sinph0*o+this.cosph0*_*e)<=a)return null;i=(s=Math.sqrt(2/s))*_*Math.sin(c),s*=this.mode===this.EQUIT?o:this.cosph0*o-this.sinph0*_*e}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(e=-e),Math.abs(g+this.lat0)<a)return null;s=n-.5*g,i=(s=2*(this.mode===this.S_POLE?Math.cos(s):Math.sin(s)))*Math.sin(c),s*=e}}else{switch(u=0,l=0,f=0,e=Math.cos(c),r=Math.sin(c),o=Math.sin(g),M=Gi(this.e,o),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(u=M/this.qp,l=Math.sqrt(1-u*u)),this.mode){case this.OBLIQ:f=1+this.sinb1*u+this.cosb1*l*e;break;case this.EQUIT:f=1+l*e;break;case this.N_POLE:f=h+g,M=this.qp-M;break;case this.S_POLE:f=g-h,M=this.qp+M}if(Math.abs(f)<a)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:f=Math.sqrt(2/f),s=this.mode===this.OBLIQ?this.ymf*f*(this.cosb1*u-this.sinb1*l*e):(f=Math.sqrt(2/(1+l*e)))*u*this.ymf,i=this.xmf*f*l*r;break;case this.N_POLE:case this.S_POLE:M>=0?(i=(f=Math.sqrt(M))*r,s=e*(this.mode===this.S_POLE?f:-f)):i=s=0}}return t.x=this.a*i+this.x0,t.y=this.a*s+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var i,s,e,r,n,o,M,u,l,f,_=t.x/this.a,c=t.y/this.a;if(this.sphere){var g,w=0,S=0;if((s=.5*(g=Math.sqrt(_*_+c*c)))>1)return null;switch(s=2*Math.asin(s),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(S=Math.sin(s),w=Math.cos(s)),this.mode){case this.EQUIT:s=Math.abs(g)<=a?0:Math.asin(c*S/g),_*=S,c=w*g;break;case this.OBLIQ:s=Math.abs(g)<=a?this.lat0:Math.asin(w*this.sinph0+c*S*this.cosph0/g),_*=S*this.cosph0,c=(w-Math.sin(s)*this.sinph0)*g;break;case this.N_POLE:c=-c,s=h-s;break;case this.S_POLE:s-=h}i=0!==c||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(_,c):0}else{if(M=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(_/=this.dd,c*=this.dd,(o=Math.sqrt(_*_+c*c))<a)return t.x=this.long0,t.y=this.lat0,t;r=2*Math.asin(.5*o/this.rq),e=Math.cos(r),_*=r=Math.sin(r),this.mode===this.OBLIQ?(n=this.qp*(M=e*this.sinb1+c*r*this.cosb1/o),c=o*this.cosb1*e-c*this.sinb1*r):(n=this.qp*(M=c*r/o),c=o*e)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(c=-c),!(n=_*_+c*c))return t.x=this.long0,t.y=this.lat0,t;M=1-n/this.qp,this.mode===this.S_POLE&&(M=-M)}i=Math.atan2(_,c),f=(u=Math.asin(M))+u,s=u+(l=this.apa)[0]*Math.sin(f)+l[1]*Math.sin(f+f)+l[2]*Math.sin(f+f+f)}return t.x=z(this.long0+i,this.over),t.y=s,t},names:["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],S_POLE:1,N_POLE:2,EQUIT:3,OBLIQ:4};function Pi(t){return Math.abs(t)>1&&(t=t>1?1:-1),Math.asin(t)}var di={init:function(){Math.abs(this.lat1+this.lat2)<a||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=U(this.e3,this.sin_po,this.cos_po),this.qs1=Gi(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=U(this.e3,this.sin_po,this.cos_po),this.qs2=Gi(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=Gi(this.e3,this.sin_po),this.ns0=Math.abs(this.lat1-this.lat2)>a?(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(t){var i=t.x,s=t.y;this.sin_phi=Math.sin(s),this.cos_phi=Math.cos(s);var h=Gi(this.e3,this.sin_phi),a=this.a*Math.sqrt(this.c-this.ns0*h)/this.ns0,e=this.ns0*z(i-this.long0,this.over),r=a*Math.sin(e)+this.x0,n=this.rh-a*Math.cos(e)+this.y0;return t.x=r,t.y=n,t},inverse:function(t){var i,s,h,a,e;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns0>=0?(i=Math.sqrt(t.x*t.x+t.y*t.y),s=1):(i=-Math.sqrt(t.x*t.x+t.y*t.y),s=-1),h=0,0!==i&&(h=Math.atan2(s*t.x,s*t.y)),s=i*this.ns0/this.a,e=this.sphere?Math.asin((this.c-s*s)/(2*this.ns0)):this.phi1z(this.e3,(this.c-s*s)/this.ns0),a=z(h/this.ns0+this.long0,this.over),t.x=a,t.y=e,t},names:["Albers_Conic_Equal_Area","Albers_Equal_Area","Albers","aea"],phi1z:function(t,i){var s,h,e,r,n=Pi(.5*i);if(t<a)return n;for(var o=t*t,M=1;M<=25;M++)if(n+=r=.5*(e=1-(h=t*(s=Math.sin(n)))*h)*e/Math.cos(n)*(i/(1-o)-s/e+.5/t*Math.log((1-h)/(1+h))),Math.abs(r)<=1e-7)return n;return null}},mi={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1},forward:function(t){var i,s,h,e,r,n,o,M=t.y;return h=z(t.x-this.long0,this.over),i=Math.sin(M),s=Math.cos(M),e=Math.cos(h),(r=this.sin_p14*i+this.cos_p14*s*e)>0||Math.abs(r)<=a?(n=this.x0+1*this.a*s*Math.sin(h)/r,o=this.y0+1*this.a*(this.cos_p14*i-this.sin_p14*s*e)/r):(n=this.x0+this.infinity_dist*s*Math.sin(h),o=this.y0+this.infinity_dist*(this.cos_p14*i-this.sin_p14*s*e)),t.x=n,t.y=o,t},inverse:function(t){var i,s,h,a,e,r;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,(i=Math.sqrt(t.x*t.x+t.y*t.y))?(a=Math.atan2(i,this.rc),s=Math.sin(a),r=Pi((h=Math.cos(a))*this.sin_p14+t.y*s*this.cos_p14/i),e=Math.atan2(t.x*s,i*this.cos_p14*h-t.y*this.sin_p14*s),e=z(this.long0+e,this.over)):(r=this.phic0,e=0),t.x=e,t.y=r,t},names:["gnom"]},Ni={init:function(){this.sphere||(this.k0=U(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(t){var i,s,h=t.y,a=z(t.x-this.long0,this.over);if(this.sphere)i=this.x0+this.a*a*Math.cos(this.lat_ts),s=this.y0+this.a*Math.sin(h)/Math.cos(this.lat_ts);else{var e=Gi(this.e,Math.sin(h));i=this.x0+this.a*this.k0*a,s=this.y0+this.a*e*.5/this.k0}return t.x=i,t.y=s,t},inverse:function(t){var i,s;return t.x-=this.x0,t.y-=this.y0,this.sphere?(i=z(this.long0+t.x/this.a/Math.cos(this.lat_ts),this.over),s=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(s=function(t,i){var s=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(i)-s)<1e-6)return i<0?-1*h:h;for(var a,e,r,n,o=Math.asin(.5*i),M=0;M<30;M++)if(e=Math.sin(o),r=Math.cos(o),n=t*e,o+=a=Math.pow(1-n*n,2)/(2*r)*(i/(1-t*t)-e/(1-n*n)+.5/t*Math.log((1-n)/(1+n))),Math.abs(a)<=1e-10)return o;return NaN}(this.e,2*t.y*this.k0/this.a),i=z(this.long0+t.x/(this.a*this.k0),this.over)),t.x=i,t.y=s,t},names:["cea"]},pi={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(t){var i=t.y,s=z(t.x-this.long0,this.over),h=wi(i-this.lat0);return t.x=this.x0+this.a*s*this.rc,t.y=this.y0+this.a*h,t},inverse:function(t){var i=t.y;return t.x=z(this.long0+(t.x-this.x0)/(this.a*this.rc),this.over),t.y=wi(this.lat0+(i-this.y0)/this.a),t},names:["Equirectangular","Equidistant_Cylindrical","Equidistant_Cylindrical_Spherical","eqc"]},bi={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=li(this.es),this.e1=fi(this.es),this.e2=_i(this.es),this.e3=ci(this.es),this.ml0=this.a*ui(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(t){var i,s,h,e=t.y,r=z(t.x-this.long0,this.over);if(h=r*Math.sin(e),this.sphere)Math.abs(e)<=a?(i=this.a*r,s=-1*this.a*this.lat0):(i=this.a*Math.sin(h)/Math.tan(e),s=this.a*(wi(e-this.lat0)+(1-Math.cos(h))/Math.tan(e)));else if(Math.abs(e)<=a)i=this.a*r,s=-1*this.ml0;else{var n=gi(this.a,this.e,Math.sin(e))/Math.tan(e);i=n*Math.sin(h),s=this.a*ui(this.e0,this.e1,this.e2,this.e3,e)-this.ml0+n*(1-Math.cos(h))}return t.x=i+this.x0,t.y=s+this.y0,t},inverse:function(t){var i,s,h,e,r,n,o,M,u;if(h=t.x-this.x0,e=t.y-this.y0,this.sphere)if(Math.abs(e+this.a*this.lat0)<=a)i=z(h/this.a+this.long0,this.over),s=0;else{var l;for(o=h*h/this.a/this.a+(n=this.lat0+e/this.a)*n,M=n,r=20;r;--r)if(M+=u=-1*(n*(M*(l=Math.tan(M))+1)-M-.5*(M*M+o)*l)/((M-n)/l-1),Math.abs(u)<=a){s=M;break}i=z(this.long0+Math.asin(h*Math.tan(M)/this.a)/Math.sin(s),this.over)}else if(Math.abs(e+this.ml0)<=a)s=0,i=z(this.long0+h/this.a,this.over);else{var f,_,c,g,w;for(o=h*h/this.a/this.a+(n=(this.ml0+e)/this.a)*n,M=n,r=20;r;--r)if(w=this.e*Math.sin(M),f=Math.sqrt(1-w*w)*Math.tan(M),_=this.a*ui(this.e0,this.e1,this.e2,this.e3,M),c=this.e0-2*this.e1*Math.cos(2*M)+4*this.e2*Math.cos(4*M)-6*this.e3*Math.cos(6*M),M-=u=(n*(f*(g=_/this.a)+1)-g-.5*f*(g*g+o))/(this.es*Math.sin(2*M)*(g*g+o-2*n*g)/(4*f)+(n-g)*(f*c-2/Math.sin(2*M))-c),Math.abs(u)<=a){s=M;break}f=Math.sqrt(1-this.es*Math.pow(Math.sin(s),2))*Math.tan(s),i=z(this.long0+Math.asin(h*f/this.a)/Math.sin(s),this.over)}return t.x=i,t.y=s,t},names:["Polyconic","American_Polyconic","poly"]},Ai={init:function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function(t){var i,h=(t.y-this.lat0)/s*1e-5,a=t.x-this.long0,e=1,r=0;for(i=1;i<=10;i++)r+=this.A[i]*(e*=h);var n,o=r,M=a,u=1,l=0,f=0,_=0;for(i=1;i<=6;i++)n=l*o+u*M,f=f+this.B_re[i]*(u=u*o-l*M)-this.B_im[i]*(l=n),_=_+this.B_im[i]*u+this.B_re[i]*l;return t.x=_*this.a+this.x0,t.y=f*this.a+this.y0,t},inverse:function(t){var i,h,a=(t.y-this.y0)/this.a,e=(t.x-this.x0)/this.a,r=1,n=0,o=0,M=0;for(i=1;i<=6;i++)h=n*a+r*e,o=o+this.C_re[i]*(r=r*a-n*e)-this.C_im[i]*(n=h),M=M+this.C_im[i]*r+this.C_re[i]*n;for(var u=0;u<this.iterations;u++){var l,f=o,_=M,c=a,g=e;for(i=2;i<=6;i++)l=_*o+f*M,c+=(i-1)*(this.B_re[i]*(f=f*o-_*M)-this.B_im[i]*(_=l)),g+=(i-1)*(this.B_im[i]*f+this.B_re[i]*_);f=1,_=0;var w=this.B_re[1],S=this.B_im[1];for(i=2;i<=6;i++)l=_*o+f*M,w+=i*(this.B_re[i]*(f=f*o-_*M)-this.B_im[i]*(_=l)),S+=i*(this.B_im[i]*f+this.B_re[i]*_);var E=w*w+S*S;o=(c*w+g*S)/E,M=(g*w-c*S)/E}var G=o,v=M,P=1,d=0;for(i=1;i<=9;i++)d+=this.D[i]*(P*=G);var m=this.lat0+d*s*1e5;return t.x=this.long0+v,t.y=m,t},names:["New_Zealand_Map_Grid","nzmg"]},yi={init:function(){},forward:function(t){var i=t.y,s=z(t.x-this.long0,this.over),h=this.x0+this.a*s,a=this.y0+this.a*Math.log(Math.tan(Math.PI/4+i/2.5))*1.25;return t.x=h,t.y=a,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var i=z(this.long0+t.x/this.a,this.over),s=2.5*(Math.atan(Math.exp(.8*t.y/this.a))-Math.PI/4);return t.x=i,t.y=s,t},names:["Miller_Cylindrical","mill"]},Ii={init:function(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=Ht(this.es)},forward:function(t){var i,s,h=t.x,e=t.y;if(h=z(h-this.long0,this.over),this.sphere){if(this.m)for(var r=this.n*Math.sin(e),n=20;n;--n){var o=(this.m*e+Math.sin(e)-r)/(this.m+Math.cos(e));if(e-=o,Math.abs(o)<a)break}else e=1!==this.n?Math.asin(this.n*Math.sin(e)):e;i=this.a*this.C_x*h*(this.m+Math.cos(e)),s=this.a*this.C_y*e}else{var M=Math.sin(e),u=Math.cos(e);s=this.a*Bt(e,M,u,this.en),i=this.a*h*u/Math.sqrt(1-this.es*M*M)}return t.x=i,t.y=s,t},inverse:function(t){var i,s,e;return t.x-=this.x0,s=t.x/this.a,t.y-=this.y0,i=t.y/this.a,this.sphere?(i/=this.C_y,s/=this.C_x*(this.m+Math.cos(i)),this.m?i=Pi((this.m*i+Math.sin(i))/this.n):1!==this.n&&(i=Pi(Math.sin(i)/this.n)),s=z(s+this.long0,this.over),i=wi(i)):(i=Vt(t.y/this.a,this.es,this.en),(e=Math.abs(i))<h?(e=Math.sin(i),s=z(this.long0+t.x*Math.sqrt(1-this.es*e*e)/(this.a*Math.cos(i)),this.over)):e-a<h&&(s=this.long0)),t.x=s,t.y=i,t},names:["Sinusoidal","sinu"]},Ri={init:function(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0},forward:function(t){for(var i=t.y,s=z(t.x-this.long0,this.over),h=i,e=Math.PI*Math.sin(i);;){var r=-(h+Math.sin(h)-e)/(1+Math.cos(h));if(h+=r,Math.abs(r)<a)break}h/=2,Math.PI/2-Math.abs(i)<a&&(s=0);var n=.900316316158*this.a*s*Math.cos(h)+this.x0,o=1.4142135623731*this.a*Math.sin(h)+this.y0;return t.x=n,t.y=o,t},inverse:function(t){var i,s;t.x-=this.x0,t.y-=this.y0,s=t.y/(1.4142135623731*this.a),Math.abs(s)>.999999999999&&(s=.999999999999),i=Math.asin(s);var h=z(this.long0+t.x/(.900316316158*this.a*Math.cos(i)),this.over);h<-Math.PI&&(h=-Math.PI),h>Math.PI&&(h=Math.PI),s=(2*i+Math.sin(2*i))/Math.PI,Math.abs(s)>1&&(s=1);var a=Math.asin(s);return t.x=h,t.y=a,t},names:["Mollweide","moll"]},Ci={init:function(){Math.abs(this.lat1+this.lat2)<a||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=li(this.es),this.e1=fi(this.es),this.e2=_i(this.es),this.e3=ci(this.es),this.sin_phi=Math.sin(this.lat1),this.cos_phi=Math.cos(this.lat1),this.ms1=U(this.e,this.sin_phi,this.cos_phi),this.ml1=ui(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<a?this.ns=this.sin_phi:(this.sin_phi=Math.sin(this.lat2),this.cos_phi=Math.cos(this.lat2),this.ms2=U(this.e,this.sin_phi,this.cos_phi),this.ml2=ui(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=ui(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))},forward:function(t){var i,s=t.x,h=t.y;if(this.sphere)i=this.a*(this.g-h);else{var a=ui(this.e0,this.e1,this.e2,this.e3,h);i=this.a*(this.g-a)}var e=this.ns*z(s-this.long0,this.over),r=this.x0+i*Math.sin(e),n=this.y0+this.rh-i*Math.cos(e);return t.x=r,t.y=n,t},inverse:function(t){var i,s,h,a;t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns>=0?(s=Math.sqrt(t.x*t.x+t.y*t.y),i=1):(s=-Math.sqrt(t.x*t.x+t.y*t.y),i=-1);var e=0;return 0!==s&&(e=Math.atan2(i*t.x,i*t.y)),this.sphere?(a=z(this.long0+e/this.ns,this.over),h=wi(this.g-s/this.a),t.x=a,t.y=h,t):(h=Si(this.g-s/this.a,this.e0,this.e1,this.e2,this.e3),a=z(this.long0+e/this.ns,this.over),t.x=a,t.y=h,t)},names:["Equidistant_Conic","eqdc"]},ki={init:function(){this.R=this.a},forward:function(t){var i,s,e=t.y,r=z(t.x-this.long0,this.over);Math.abs(e)<=a&&(i=this.x0+this.R*r,s=this.y0);var n=Pi(2*Math.abs(e/Math.PI));(Math.abs(r)<=a||Math.abs(Math.abs(e)-h)<=a)&&(i=this.x0,s=e>=0?this.y0+Math.PI*this.R*Math.tan(.5*n):this.y0+Math.PI*this.R*-Math.tan(.5*n));var o=.5*Math.abs(Math.PI/r-r/Math.PI),M=o*o,u=Math.sin(n),l=Math.cos(n),f=l/(u+l-1),_=f*(2/u-1),c=_*_,g=Math.PI*this.R*(o*(f-c)+Math.sqrt(M*(f-c)*(f-c)-(c+M)*(f*f-c)))/(c+M);r<0&&(g=-g),i=this.x0+g;var w=M+f;return g=Math.PI*this.R*(_*w-o*Math.sqrt((c+M)*(M+1)-w*w))/(c+M),s=e>=0?this.y0+g:this.y0-g,t.x=i,t.y=s,t},inverse:function(t){var i,s,h,e,r,n,o,M,u,l,f,_;return t.x-=this.x0,t.y-=this.y0,f=Math.PI*this.R,r=(h=t.x/f)*h+(e=t.y/f)*e,f=3*(e*e/(M=-2*(n=-Math.abs(e)*(1+r))+1+2*e*e+r*r)+(2*(o=n-2*e*e+h*h)*o*o/M/M/M-9*n*o/M/M)/27)/(u=(n-o*o/3/M)/M)/(l=2*Math.sqrt(-u/3)),Math.abs(f)>1&&(f=f>=0?1:-1),_=Math.acos(f)/3,s=t.y>=0?(-l*Math.cos(_+Math.PI/3)-o/3/M)*Math.PI:-(-l*Math.cos(_+Math.PI/3)-o/3/M)*Math.PI,i=Math.abs(h)<a?this.long0:z(this.long0+Math.PI*(r-1+Math.sqrt(1+2*(h*h-e*e)+r*r))/2/h,this.over),t.x=i,t.y=s,t},names:["Van_der_Grinten_I","VanDerGrinten","Van_der_Grinten","vandg"]},Oi={init:function(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0),this.f=this.es/(1+Math.sqrt(1-this.es))},forward:function(t){var i,s,e,r,n,o,M,u,l,f,_,c=t.x,g=t.y,w=Math.sin(t.y),S=Math.cos(t.y),E=z(c-this.long0,this.over);return this.sphere?Math.abs(this.sin_p12-1)<=a?(t.x=this.x0+this.a*(h-g)*Math.sin(E),t.y=this.y0-this.a*(h-g)*Math.cos(E),t):Math.abs(this.sin_p12+1)<=a?(t.x=this.x0+this.a*(h+g)*Math.sin(E),t.y=this.y0+this.a*(h+g)*Math.cos(E),t):(l=this.sin_p12*w+this.cos_p12*S*Math.cos(E),u=(M=Math.acos(l))?M/Math.sin(M):1,t.x=this.x0+this.a*u*S*Math.sin(E),t.y=this.y0+this.a*u*(this.cos_p12*w-this.sin_p12*S*Math.cos(E)),t):(i=li(this.es),s=fi(this.es),e=_i(this.es),r=ci(this.es),Math.abs(this.sin_p12-1)<=a?(n=this.a*ui(i,s,e,r,h),o=this.a*ui(i,s,e,r,g),t.x=this.x0+(n-o)*Math.sin(E),t.y=this.y0-(n-o)*Math.cos(E),t):Math.abs(this.sin_p12+1)<=a?(n=this.a*ui(i,s,e,r,h),o=this.a*ui(i,s,e,r,g),t.x=this.x0+(n+o)*Math.sin(E),t.y=this.y0+(n+o)*Math.cos(E),t):Math.abs(c)<a&&Math.abs(g-this.lat0)<a?(t.x=t.y=0,t):(f=function(t,i,s,h,a,e){const r=h-i,n=Math.atan((1-e)*Math.tan(t)),o=Math.atan((1-e)*Math.tan(s)),M=Math.sin(n),u=Math.cos(n),l=Math.sin(o),f=Math.cos(o);let _,c,g,w,S,E,G,v,P,d,m,N,p,b,A,y=r,I=100;do{if(c=Math.sin(y),g=Math.cos(y),w=Math.sqrt(f*c*(f*c)+(u*l-M*f*g)*(u*l-M*f*g)),0===w)return{azi1:0,s12:0};S=M*l+u*f*g,E=Math.atan2(w,S),G=u*f*c/w,v=1-G*G,P=0!==v?S-2*M*l/v:0,d=e/16*v*(4+e*(4-3*v)),_=y,y=r+(1-d)*e*G*(E+d*w*(P+d*S*(2*P*P-1)))}while(Math.abs(y-_)>1e-12&&--I>0);return 0===I?{azi1:NaN,s12:NaN}:(m=v*(a*a-a*(1-e)*(a*(1-e)))/(a*(1-e)*(a*(1-e))),N=1+m/16384*(4096+m*(m*(320-175*m)-768)),p=m/1024*(256+m*(m*(74-47*m)-128)),b=p*w*(P+p/4*(S*(2*P*P-1)-p/6*P*(4*w*w-3)*(4*P*P-3))),A=a*(1-e)*N*(E-b),{azi1:Math.atan2(f*c,u*l-M*f*g),s12:A})}(this.lat0,this.long0,g,c,this.a,this.f),_=f.azi1,t.x=f.s12*Math.sin(_),t.y=f.s12*Math.cos(_),t))},inverse:function(t){var i,s,e,r,n,o,M,u,l,f,_,c,g,w,S;if(t.x-=this.x0,t.y-=this.y0,this.sphere){if((i=Math.sqrt(t.x*t.x+t.y*t.y))>2*h*this.a)return;return s=i/this.a,e=Math.sin(s),r=Math.cos(s),n=this.long0,Math.abs(i)<=a?o=this.lat0:(o=Pi(r*this.sin_p12+t.y*e*this.cos_p12/i),M=Math.abs(this.lat0)-h,n=Math.abs(M)<=a?z(this.lat0>=0?this.long0+Math.atan2(t.x,-t.y):this.long0-Math.atan2(-t.x,t.y),this.over):z(this.long0+Math.atan2(t.x*e,i*this.cos_p12*r-t.y*this.sin_p12*e),this.over)),t.x=n,t.y=o,t}return u=li(this.es),l=fi(this.es),f=_i(this.es),_=ci(this.es),Math.abs(this.sin_p12-1)<=a?(o=Si(((c=this.a*ui(u,l,f,_,h))-(i=Math.sqrt(t.x*t.x+t.y*t.y)))/this.a,u,l,f,_),n=z(this.long0+Math.atan2(t.x,-1*t.y),this.over),t.x=n,t.y=o,t):Math.abs(this.sin_p12+1)<=a?(c=this.a*ui(u,l,f,_,h),o=Si(((i=Math.sqrt(t.x*t.x+t.y*t.y))-c)/this.a,u,l,f,_),n=z(this.long0+Math.atan2(t.x,t.y),this.over),t.x=n,t.y=o,t):(g=Math.atan2(t.x,t.y),w=Math.sqrt(t.x*t.x+t.y*t.y),S=function(t,i,s,h,a,e){const r=Math.atan((1-e)*Math.tan(t)),n=Math.sin(r),o=Math.cos(r),M=Math.sin(s),u=Math.cos(s),l=Math.atan2(n,o*u),f=o*M,_=1-f*f,c=_*(a*a-a*(1-e)*(a*(1-e)))/(a*(1-e)*(a*(1-e))),g=1+c/16384*(4096+c*(c*(320-175*c)-768)),w=c/1024*(256+c*(c*(74-47*c)-128));let S,E,G,v,P,d=h/(a*(1-e)*g),m=100;do{E=Math.cos(2*l+d),G=Math.sin(d),v=Math.cos(d),P=w*G*(E+w/4*(v*(2*E*E-1)-w/6*E*(4*G*G-3)*(4*E*E-3))),S=d,d=h/(a*(1-e)*g)+P}while(Math.abs(d-S)>1e-12&&--m>0);if(0===m)return{lat2:NaN,lon2:NaN};const N=n*G-o*v*u,p=e/16*_*(4+e*(4-3*_));return{lat2:Math.atan2(n*v+o*G*u,(1-e)*Math.sqrt(f*f+N*N)),lon2:i+(Math.atan2(G*M,o*v-n*G*u)-(1-p)*e*f*(d+p*G*(E+p*v*(2*E*E-1))))}}(this.lat0,this.long0,g,w,this.a,this.f),t.x=S.lon2,t.y=S.lat2,t)},names:["Azimuthal_Equidistant","aeqd"]},Ti={init:function(){this.sin_p14=Math.sin(this.lat0||0),this.cos_p14=Math.cos(this.lat0||0)},forward:function(t){var i,s,h,e,r,n,o,M=t.y;return h=z(t.x-(this.long0||0),this.over),i=Math.sin(M),s=Math.cos(M),e=Math.cos(h),((r=this.sin_p14*i+this.cos_p14*s*e)>0||Math.abs(r)<=a)&&(n=1*this.a*s*Math.sin(h),o=(this.y0||0)+1*this.a*(this.cos_p14*i-this.sin_p14*s*e)),t.x=n,t.y=o,t},inverse:function(t){var i,s,e,r,n,o,M,u,l;return t.x-=this.x0||0,t.y-=this.y0||0,s=Pi((i=Math.sqrt(t.x*t.x+t.y*t.y))/this.a),e=Math.sin(s),r=Math.cos(s),l=this.lat0||0,o=u=this.long0||0,Math.abs(i)<=a?(M=l,t.x=o,t.y=M,t):(M=Pi(r*this.sin_p14+t.y*e*this.cos_p14/i),n=Math.abs(l)-h,Math.abs(n)<=a?(o=z(l>=0?u+Math.atan2(t.x,-t.y):u-Math.atan2(-t.x,t.y),this.over),t.x=o,t.y=M,t):(o=z(u+Math.atan2(t.x*e,i*this.cos_p14*r-t.y*this.sin_p14*e),this.over),t.x=o,t.y=M,t))},names:["ortho"]};function Fi(t,i,s,e){var r;return t<a?(e.value=1,r=0):(r=Math.atan2(i,s),Math.abs(r)<=n?e.value=1:r>n&&r<=h+n?(e.value=2,r-=h):r>h+n||r<=-(h+n)?(e.value=3,r=r>=0?r-M:r+M):(e.value=4,r+=h)),r}function Li(t,i){var s=t+i;return s<-M?s+=o:s>+M&&(s-=o),s}var Di={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.face=this.lat0>=h-n/2?5:this.lat0<=-(h-n/2)?6:Math.abs(this.long0)<=n?1:Math.abs(this.long0)<=h+n?this.long0>0?2:4:3,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(t){var i,s,a,e,r,o,u={x:0,y:0},l={value:0};if(t.x-=this.long0,i=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(t.y)):t.y,s=t.x,5===this.face)e=h-i,s>=n&&s<=h+n?(l.value=1,a=s-h):s>h+n||s<=-(h+n)?(l.value=2,a=s>0?s-M:s+M):s>-(h+n)&&s<=-n?(l.value=3,a=s+h):(l.value=4,a=s);else if(6===this.face)e=h+i,s>=n&&s<=h+n?(l.value=1,a=-s+h):s<n&&s>=-n?(l.value=2,a=-s):s<-n&&s>=-(h+n)?(l.value=3,a=-s-h):(l.value=4,a=s>0?-s+M:-s-M);else{var f,_,c,g,w,S;2===this.face?s=Li(s,+h):3===this.face?s=Li(s,+M):4===this.face&&(s=Li(s,-h)),g=Math.sin(i),w=Math.cos(i),S=Math.sin(s),f=w*Math.cos(s),_=w*S,c=g,1===this.face?a=Fi(e=Math.acos(f),c,_,l):2===this.face?a=Fi(e=Math.acos(_),c,-f,l):3===this.face?a=Fi(e=Math.acos(-f),c,-_,l):4===this.face?a=Fi(e=Math.acos(-_),c,f,l):(e=a=0,l.value=1)}return o=Math.atan(12/M*(a+Math.acos(Math.sin(a)*Math.cos(n))-h)),r=Math.sqrt((1-Math.cos(e))/(Math.cos(o)*Math.cos(o))/(1-Math.cos(Math.atan(1/Math.cos(a))))),2===l.value?o+=h:3===l.value?o+=M:4===l.value&&(o+=1.5*M),u.x=r*Math.cos(o),u.y=r*Math.sin(o),u.x=u.x*this.a+this.x0,u.y=u.y*this.a+this.y0,t.x=u.x,t.y=u.y,t},inverse:function(t){var i,s,a,e,r,n,o,u,l,f,_,c,g={lam:0,phi:0},w={value:0};if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,s=Math.atan(Math.sqrt(t.x*t.x+t.y*t.y)),i=Math.atan2(t.y,t.x),t.x>=0&&t.x>=Math.abs(t.y)?w.value=1:t.y>=0&&t.y>=Math.abs(t.x)?(w.value=2,i-=h):t.x<0&&-t.x>=Math.abs(t.y)?(w.value=3,i=i<0?i+M:i-M):(w.value=4,i+=h),l=M/12*Math.tan(i),r=Math.sin(l)/(Math.cos(l)-1/Math.sqrt(2)),n=Math.atan(r),(o=1-(a=Math.cos(i))*a*(e=Math.tan(s))*e*(1-Math.cos(Math.atan(1/Math.cos(n)))))<-1?o=-1:o>1&&(o=1),5===this.face)u=Math.acos(o),g.phi=h-u,g.lam=1===w.value?n+h:2===w.value?n<0?n+M:n-M:3===w.value?n-h:n;else if(6===this.face)u=Math.acos(o),g.phi=u-h,g.lam=1===w.value?-n+h:2===w.value?-n:3===w.value?-n-h:n<0?-n-M:-n+M;else{var S,E,G;l=(S=o)*S,E=(l+=(G=l>=1?0:Math.sqrt(1-l)*Math.sin(n))*G)>=1?0:Math.sqrt(1-l),2===w.value?(l=E,E=-G,G=l):3===w.value?(E=-E,G=-G):4===w.value&&(l=E,E=G,G=-l),2===this.face?(l=S,S=-E,E=l):3===this.face?(S=-S,E=-E):4===this.face&&(l=S,S=E,E=-l),g.phi=Math.acos(-G)-h,g.lam=Math.atan2(E,S),2===this.face?g.lam=Li(g.lam,-h):3===this.face?g.lam=Li(g.lam,-M):4===this.face&&(g.lam=Li(g.lam,+h))}return 0!==this.es&&(f=g.phi<0?1:0,_=Math.tan(g.phi),c=this.b/Math.sqrt(_*_+this.one_minus_f_squared),g.phi=Math.atan(Math.sqrt(this.a*this.a-c*c)/(this.one_minus_f*c)),f&&(g.phi=-g.phi)),g.lam+=this.long0,t.x=g.lam,t.y=g.phi,t},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]},xi=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],Ui=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],ji=.8487,zi=1.3523,Wi=r/5,qi=1/Wi,Hi=function(t,i){return t[0]+i*(t[1]+i*(t[2]+i*t[3]))},Bi={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(t){var i=z(t.x-this.long0,this.over),s=Math.abs(t.y),h=Math.floor(s*Wi);h<0?h=0:h>=18&&(h=17);var a={x:Hi(xi[h],s=r*(s-qi*h))*i,y:Hi(Ui[h],s)};return t.y<0&&(a.y=-a.y),a.x=a.x*this.a*ji+this.x0,a.y=a.y*this.a*zi+this.y0,a},inverse:function(t){var i={x:(t.x-this.x0)/(this.a*ji),y:Math.abs(t.y-this.y0)/(this.a*zi)};if(i.y>=1)i.x/=xi[18][0],i.y=t.y<0?-h:h;else{var s=Math.floor(18*i.y);for(s<0?s=0:s>=18&&(s=17);;)if(Ui[s][0]>i.y)--s;else{if(!(Ui[s+1][0]<=i.y))break;++s}var a=Ui[s],r=5*(i.y-a[0])/(Ui[s+1][0]-a[0]);r=function(t,i,s,h){for(var a=i;h;--h){var e=t(a);if(a-=e,Math.abs(e)<1e-10)break}return a}((function(t){return(Hi(a,t)-i.y)/function(t,i){return t[1]+i*(2*t[2]+3*i*t[3])}(a,t)}),r,0,100),i.x/=Hi(xi[s],r),i.y=(5*s+r)*e,t.y<0&&(i.y=-i.y)}return i.x=z(i.x+this.long0,this.over),i},names:["Robinson","robin"]},Vi={init:function(){this.name="geocent"},forward:function(t){return _t(t,this.es,this.a)},inverse:function(t){return ct(t,this.es,this.a,this.b)},names:["Geocentric","geocentric","geocent","Geocent"]},Ki={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}},Ji={init:function(){if(Object.keys(Ki).forEach(function(t){if(void 0===this[t])this[t]=Ki[t].def;else{if(Ki[t].num&&isNaN(this[t]))throw new Error("Invalid parameter value, must be numeric "+t+" = "+this[t]);Ki[t].num&&(this[t]=parseFloat(this[t]))}Ki[t].degrees&&(this[t]=this[t]*e)}.bind(this)),Math.abs(Math.abs(this.lat0)-h)<a?this.mode=this.lat0<0?1:0:Math.abs(this.lat0)<a?this.mode=2:(this.mode=3,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var t=this.tilt,i=this.azi;this.cg=Math.cos(i),this.sg=Math.sin(i),this.cw=Math.cos(t),this.sw=Math.sin(t)},forward:function(t){t.x-=this.long0;var i,s,h,a,e=Math.sin(t.y),r=Math.cos(t.y),n=Math.cos(t.x);switch(this.mode){case 3:s=this.sinph0*e+this.cosph0*r*n;break;case 2:s=r*n;break;case 1:s=-e;break;case 0:s=e}switch(i=(s=this.pn1/(this.p-s))*r*Math.sin(t.x),this.mode){case 3:s*=this.cosph0*e-this.sinph0*r*n;break;case 2:s*=e;break;case 0:s*=-r*n;break;case 1:s*=r*n}return i=(i*this.cg-s*this.sg)*this.cw*(a=1/((h=s*this.cg+i*this.sg)*this.sw*this.h1+this.cw)),s=h*a,t.x=i*this.a,t.y=s*this.a,t},inverse:function(t){t.x/=this.a,t.y/=this.a;var i,s,h,e={x:t.x,y:t.y};t.x=(i=this.pn1*t.x*(h=1/(this.pn1-t.y*this.sw)))*this.cg+(s=this.pn1*t.y*this.cw*h)*this.sg,t.y=s*this.cg-i*this.sg;var r=Qt(t.x,t.y);if(Math.abs(r)<a)e.x=0,e.y=t.y;else{var n,o;switch(o=1-r*r*this.pfact,o=(this.p-Math.sqrt(o))/(this.pn1/r+r/this.pn1),n=Math.sqrt(1-o*o),this.mode){case 3:e.y=Math.asin(n*this.sinph0+t.y*o*this.cosph0/r),t.y=(n-this.sinph0*Math.sin(e.y))*r,t.x*=o*this.cosph0;break;case 2:e.y=Math.asin(t.y*o/r),t.y=n*r,t.x*=o;break;case 0:e.y=Math.asin(n),t.y=-t.y;break;case 1:e.y=-Math.asin(n)}e.x=Math.atan2(t.x,t.y)}return t.x=e.x+this.long0,t.y=e.y,t},names:["Tilted_Perspective","tpers"]},Qi={init:function(){if(this.flip_axis="x"===this.sweep?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,0!==this.es){var t=1-this.es,i=1/t;this.radius_p=Math.sqrt(t),this.radius_p2=t,this.radius_p_inv2=i,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")},forward:function(t){var i,s,h,a,e=t.x,r=t.y;if(e-=this.long0,"ellipse"===this.shape){r=Math.atan(this.radius_p2*Math.tan(r));var n=this.radius_p/Qt(this.radius_p*Math.cos(r),Math.sin(r));if(s=n*Math.cos(e)*Math.cos(r),h=n*Math.sin(e)*Math.cos(r),a=n*Math.sin(r),(this.radius_g-s)*s-h*h-a*a*this.radius_p_inv2<0)return t.x=Number.NaN,t.y=Number.NaN,t;i=this.radius_g-s,this.flip_axis?(t.x=this.radius_g_1*Math.atan(h/Qt(a,i)),t.y=this.radius_g_1*Math.atan(a/i)):(t.x=this.radius_g_1*Math.atan(h/i),t.y=this.radius_g_1*Math.atan(a/Qt(h,i)))}else"sphere"===this.shape&&(i=Math.cos(r),s=Math.cos(e)*i,h=Math.sin(e)*i,a=Math.sin(r),i=this.radius_g-s,this.flip_axis?(t.x=this.radius_g_1*Math.atan(h/Qt(a,i)),t.y=this.radius_g_1*Math.atan(a/i)):(t.x=this.radius_g_1*Math.atan(h/i),t.y=this.radius_g_1*Math.atan(a/Qt(h,i))));return t.x=t.x*this.a,t.y=t.y*this.a,t},inverse:function(t){var i,s,h,a,e=-1,r=0,n=0;if(t.x=t.x/this.a,t.y=t.y/this.a,"ellipse"===this.shape){this.flip_axis?(n=Math.tan(t.y/this.radius_g_1),r=Math.tan(t.x/this.radius_g_1)*Qt(1,n)):(r=Math.tan(t.x/this.radius_g_1),n=Math.tan(t.y/this.radius_g_1)*Qt(1,r));var o=n/this.radius_p;if((h=(s=2*this.radius_g*e)*s-4*(i=r*r+o*o+e*e)*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;a=(-s-Math.sqrt(h))/(2*i),e=this.radius_g+a*e,r*=a,n*=a,t.x=Math.atan2(r,e),t.y=Math.atan(n*Math.cos(t.x)/e),t.y=Math.atan(this.radius_p_inv2*Math.tan(t.y))}else if("sphere"===this.shape){if(this.flip_axis?(n=Math.tan(t.y/this.radius_g_1),r=Math.tan(t.x/this.radius_g_1)*Math.sqrt(1+n*n)):(r=Math.tan(t.x/this.radius_g_1),n=Math.tan(t.y/this.radius_g_1)*Math.sqrt(1+r*r)),(h=(s=2*this.radius_g*e)*s-4*(i=r*r+n*n+e*e)*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;a=(-s-Math.sqrt(h))/(2*i),e=this.radius_g+a*e,r*=a,n*=a,t.x=Math.atan2(r,e),t.y=Math.atan(n*Math.cos(t.x)/e)}return t.x=t.x+this.long0,t},names:["Geostationary Satellite View","Geostationary_Satellite","geos"]},Zi=1.340264,Xi=-.081106,Yi=893e-6,$i=.003796,ts=Math.sqrt(3)/2,is={init:function(){this.es=0,this.long0=void 0!==this.long0?this.long0:0,this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0},forward:function(t){var i=z(t.x-this.long0,this.over),s=Math.asin(ts*Math.sin(t.y)),h=s*s,a=h*h*h;return t.x=i*Math.cos(s)/(ts*(Zi+3*Xi*h+a*(7*Yi+9*$i*h))),t.y=s*(Zi+Xi*h+a*(Yi+$i*h)),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a;var i,s,h,a,e=t.y;for(a=0;a<12&&(e-=h=(e*(Zi+Xi*(i=e*e)+(s=i*i*i)*(Yi+$i*i))-t.y)/(Zi+3*Xi*i+s*(7*Yi+9*$i*i)),!(Math.abs(h)<1e-9));++a);return t.x=ts*t.x*(Zi+3*Xi*(i=e*e)+(s=i*i*i)*(7*Yi+9*$i*i))/Math.cos(e),t.y=Math.asin(Math.sin(e)/ts),t.x=z(t.x+this.long0,this.over),t},names:["eqearth","Equal Earth","Equal_Earth"]},ss=1e-10;function hs(t){var i,s,h,a=z(t.x-(this.long0||0),this.over),e=t.y;return i=this.am1+this.m1-Bt(e,s=Math.sin(e),h=Math.cos(e),this.en),s=h*a/(i*Math.sqrt(1-this.es*s*s)),t.x=i*Math.sin(s),t.y=this.am1-i*Math.cos(s),t.x=this.a*t.x+(this.x0||0),t.y=this.a*t.y+(this.y0||0),t}function as(t){var i,s,a,e;if(t.x=(t.x-(this.x0||0))/this.a,t.y=(t.y-(this.y0||0))/this.a,s=Qt(t.x,t.y=this.am1-t.y),e=Vt(this.am1+this.m1-s,this.es,this.en),(i=Math.abs(e))<h)i=Math.sin(e),a=s*Math.atan2(t.x,t.y)*Math.sqrt(1-this.es*i*i)/Math.cos(e);else{if(!(Math.abs(i-h)<=ss))throw new Error;a=0}return t.x=z(a+(this.long0||0),this.over),t.y=wi(e),t}function es(t){var i,s,h=z(t.x-(this.long0||0),this.over),a=t.y;return s=this.cphi1+this.phi1-a,Math.abs(s)>ss?(t.x=s*Math.sin(i=h*Math.cos(a)/s),t.y=this.cphi1-s*Math.cos(i)):t.x=t.y=0,t.x=this.a*t.x+(this.x0||0),t.y=this.a*t.y+(this.y0||0),t}function rs(t){var i,s;t.x=(t.x-(this.x0||0))/this.a,t.y=(t.y-(this.y0||0))/this.a;var a=Qt(t.x,t.y=this.cphi1-t.y);if(s=this.cphi1+this.phi1-a,Math.abs(s)>h)throw new Error;return i=Math.abs(Math.abs(s)-h)<=ss?0:a*Math.atan2(t.x,t.y)/Math.cos(s),t.x=z(i+(this.long0||0),this.over),t.y=wi(s),t}var ns={init:function(){var t;if(this.phi1=this.lat1,Math.abs(this.phi1)<ss)throw new Error;this.es?(this.en=Ht(this.es),this.m1=Bt(this.phi1,this.am1=Math.sin(this.phi1),t=Math.cos(this.phi1),this.en),this.am1=t/(Math.sqrt(1-this.es*this.am1*this.am1)*this.am1),this.inverse=as,this.forward=hs):(this.cphi1=Math.abs(this.phi1)+ss>=h?0:1/Math.tan(this.phi1),this.inverse=rs,this.forward=es)},names:["bonne","Bonne (Werner lat_1=90)"]};const os={OBLIQUE:{forward:function(t,i){let{x:s,y:h}=i;s+=t.long0;const a=Math.cos(s),e=Math.sin(h),n=Math.cos(h);i.x=z(Math.atan2(n*Math.sin(s),t.sphip*n*a+t.cphip*e)+t.lamp),i.y=Math.asin(t.sphip*e-t.cphip*n*a);const o=t.obliqueProjection.forward(i);return t.isIdentity&&(o.x*=r,o.y*=r),o},inverse:function(t,i){t.isIdentity&&(i.x*=e,i.y*=e);const s=t.obliqueProjection.inverse(i);let{x:h,y:a}=s;if(h<Number.MAX_VALUE){h-=t.lamp;const s=Math.cos(h),e=Math.sin(a),r=Math.cos(a);i.x=Math.atan2(r*Math.sin(h),t.sphip*r*s-t.cphip*e),i.y=Math.asin(t.sphip*e+t.cphip*r*s)}return i.x=z(i.x+t.long0),i}},TRANSVERSE:{forward:function(t,i){let{x:s,y:h}=i;s+=t.long0;const a=Math.cos(h),e=Math.cos(s);i.x=z(Math.atan2(a*Math.sin(s),Math.sin(h))+t.lamp),i.y=Math.asin(-1*a*e);const n=t.obliqueProjection.forward(i);return t.isIdentity&&(n.x*=r,n.y*=r),n},inverse:function(t,i){t.isIdentity&&(i.x*=e,i.y*=e);const s=t.obliqueProjection.inverse(i);let{x:h,y:a}=s;if(h<Number.MAX_VALUE){const s=Math.cos(a);h-=t.lamp,i.x=Math.atan2(s*Math.sin(h),-1*Math.sin(a)),i.y=Math.asin(s*Math.cos(h))}return i.x=z(i.x+t.long0),i}}},Ms={ROTATE:{o_alpha:"oAlpha",o_lon_c:"oLongC",o_lat_c:"oLatC"},NEW_POLE:{o_lat_p:"oLatP",o_lon_p:"oLongP"},NEW_EQUATOR:{o_lon_1:"oLong1",o_lat_1:"oLat1",o_lon_2:"oLong2",o_lat_2:"oLat2"}};var us={init:function(){if(this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.title=this.title||"General Oblique Transformation",this.isIdentity=B.includes(this.o_proj),!this.o_proj)throw new Error("Missing parameter: o_proj");if("ob_tran"===this.o_proj)throw new Error("Invalid value for o_proj: "+this.o_proj);const t=ft(this.projStr.replace("+proj=ob_tran","").replace("+o_proj=","+proj=").trim());if(!t)throw new Error("Invalid parameter: o_proj. Unknown projection "+this.o_proj);let i;t.long0=0,this.obliqueProjection=t;const s=Object.keys(Ms),r=t=>{if(void 0===this[t])return;const i=parseFloat(this[t])*e;if(isNaN(i))throw new Error("Invalid value for "+t+": "+this[t]);return i};for(let t=0;t<s.length;t++){const h=Ms[s[t]],a=Object.entries(h);if(a.some((([t])=>void 0!==this[t]))){i=h;for(let t=0;t<a.length;t++){const[i,s]=a[t],h=r(i);if(void 0===h)throw new Error("Missing parameter: "+i+".");this[s]=h}break}}if(!i)throw new Error("No valid parameters provided for ob_tran projection.");const{lamp:n,phip:o}=function(t,i){let s,e;if(i===Ms.ROTATE){let i=t.oLongC,r=t.oLatC,n=t.oAlpha;if(Math.abs(Math.abs(r)-h)<=a)throw new Error("Invalid value for o_lat_c: "+t.o_lat_c+" should be < 90°");e=i+Math.atan2(-1*Math.cos(n),-1*Math.sin(n)*Math.sin(r)),s=Math.asin(Math.cos(r)*Math.sin(n))}else if(i===Ms.NEW_POLE)e=t.oLongP,s=t.oLatP;else{let i=t.oLong1,r=t.oLat1,n=t.oLong2,o=t.oLat2,M=Math.abs(r);if(Math.abs(r)>h-a)throw new Error("Invalid value for o_lat_1: "+t.o_lat_1+" should be < 90°");if(Math.abs(o)>h-a)throw new Error("Invalid value for o_lat_2: "+t.o_lat_2+" should be < 90°");if(Math.abs(r-o)<a)throw new Error("Invalid value for o_lat_1 and o_lat_2: o_lat_1 should be different from o_lat_2");if(M<a)throw new Error("Invalid value for o_lat_1: o_lat_1 should be different from zero");e=Math.atan2(Math.cos(r)*Math.sin(o)*Math.cos(i)-Math.sin(r)*Math.cos(o)*Math.cos(n),Math.sin(r)*Math.cos(o)*Math.sin(n)-Math.cos(r)*Math.sin(o)*Math.sin(i)),s=Math.atan(-1*Math.cos(e-i)/Math.tan(r))}return{lamp:e,phip:s}}(this,i);this.lamp=n,Math.abs(o)>a?(this.cphip=Math.cos(o),this.sphip=Math.sin(o),this.projectionType=os.OBLIQUE):this.projectionType=os.TRANSVERSE},forward:function(t){return this.projectionType.forward(this,t)},inverse:function(t){return this.projectionType.inverse(this,t)},names:["General Oblique Transformation","General_Oblique_Transformation","ob_tran"]};const ls=Object.assign((function(t,i,s){var h,a,e,r=!1;return void 0===i?(a=pt(t),h=mt,r=!0):(void 0!==i.x||Array.isArray(i))&&(s=i,a=pt(t),h=mt,r=!0),h||(h=pt(t)),a||(a=pt(i)),s?Nt(h,a,s):(e={forward:function(t,i){return Nt(h,a,t,i)},inverse:function(t,i){return Nt(a,h,t,i)}},r&&(e.oProj=a),e)}),{defaultDatum:"WGS84",Proj:ft,WGS84:new ft("WGS84"),Point:jt,toPoint:vt,defs:L,nadgrid:function(t,i,s){return i instanceof ArrayBuffer?function(t,i,s){var h=!0;void 0!==s&&!1===s.includeErrorFields&&(h=!1);var a=new DataView(i),e=function(t){var i=t.getInt32(8,!1);return 11!==i&&(11!==(i=t.getInt32(8,!0))&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}(a),r=function(t,i){return{nFields:t.getInt32(8,i),nSubgridFields:t.getInt32(24,i),nSubgrids:t.getInt32(40,i),shiftType:ot(t,56,64).trim(),fromSemiMajorAxis:t.getFloat64(120,i),fromSemiMinorAxis:t.getFloat64(136,i),toSemiMajorAxis:t.getFloat64(152,i),toSemiMinorAxis:t.getFloat64(168,i)}}(a,e),n=function(t,i,s,h){for(var a=176,e=[],r=0;r<i.nSubgrids;r++){var n=ut(t,a,s),o=lt(t,a,n,s,h),M=Math.round(1+(n.upperLongitude-n.lowerLongitude)/n.longitudeInterval),u=Math.round(1+(n.upperLatitude-n.lowerLatitude)/n.latitudeInterval);e.push({ll:[nt(n.lowerLongitude),nt(n.lowerLatitude)],del:[nt(n.longitudeInterval),nt(n.latitudeInterval)],lim:[M,u],count:n.gridNodeCount,cvs:Mt(o)});var l=16;!1===h&&(l=8),a+=176+n.gridNodeCount*l}return e}(a,r,e,h),o={header:r,subgrids:n};return ht[t]=o,o}(t,i,s):{ready:at(t,i)}},transform:dt,mgrs:Ct,version:"__VERSION__"});!function(t){t.Proj.projections.add(Kt),t.Proj.projections.add(Yt),t.Proj.projections.add($t),t.Proj.projections.add(si),t.Proj.projections.add(ai),t.Proj.projections.add(ei),t.Proj.projections.add(ni),t.Proj.projections.add(oi),t.Proj.projections.add(Mi),t.Proj.projections.add(Ei),t.Proj.projections.add(vi),t.Proj.projections.add(di),t.Proj.projections.add(mi),t.Proj.projections.add(Ni),t.Proj.projections.add(pi),t.Proj.projections.add(bi),t.Proj.projections.add(Ai),t.Proj.projections.add(yi),t.Proj.projections.add(Ii),t.Proj.projections.add(Ri),t.Proj.projections.add(Ci),t.Proj.projections.add(ki),t.Proj.projections.add(Oi),t.Proj.projections.add(Ti),t.Proj.projections.add(Di),t.Proj.projections.add(Bi),t.Proj.projections.add(Vi),t.Proj.projections.add(Ji),t.Proj.projections.add(Qi),t.Proj.projections.add(is),t.Proj.projections.add(ns),t.Proj.projections.add(us)}(ls);export{ls as default}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"ol/Map";import t from"ol/View";import r from"ol/layer/Vector";import o from"ol/layer/Group";import s from"ol/layer/Tile";import n from"ol/layer/Image";import a from"ol/source/Vector";import i from"ol/source/TileWMS";import c from"ol/source/OSM";import l from"ol/source/XYZ";import u from"ol/source/Google";import f from"ol/source/TileArcGISRest";import w from"ol/Image";import y from"ol/source/Image";import h from"ol/format/GeoJSON";import p from"ol/format/GML2";import m from"ol/format/GML3";import d from"ol/format/GML32";import g from"ol/format/WKT";import b from"ol/control/Control";import L from"ol/style/Style";import S from"ol/style/Fill";import j from"ol/style/Stroke";import G from"ol/style/Circle";import I from"ol/style/Icon";import v from"ol/style/Text";import{bbox as E}from"ol/loadingstrategy";import{get as F,fromLonLat as k}from"ol/proj";import{D as $}from"./p-B-bAcABs.js";import{w as P,e as T,l as x}from"./p-CMKJzsgL.js";import{O as W}from"./p-BxFJezdK.js";import C from"./p-RpJarvr_.js";import M from"ol/source/GeoTIFF";import{g as O}from"./p-CXfA_q8m.js";import{register as A}from"ol/proj/proj4";import R from"ol/layer/WebGLTile";import"./p-jzneDarq.js";import"./p-BdijL4Av.js";import"./p-E-ZsRS8r.js";async function z(e){return class extends M{geoKeys_=null;constructor(){super(e)}async getGeoKeys(){if(null!==this.geoKeys_)return this.geoKeys_;await this.getView();const e=this.sourceImagery_;return e&&e.length>0&&this.determineGeoKeys(e),this.geoKeys_}determineGeoKeys(e){if(!e||0===e.length)return;const t=e[0];for(let e=t.length-1;e>=0;--e){const o="function"==typeof(r=t[e]).getGeoKeys?r.getGeoKeys()||null:r.geoKeys||null;if(o){this.geoKeys_=o;break}}var r}async getProjectionParameters(){const e=await this.getGeoKeys();return e?O.toProj4(e):null}async getProj4String(){const e=await this.getProjectionParameters();return e&&e.proj4||null}async registerProjectionIfNeeded(){try{const e=await this.getProj4String(),t=this.getProjection()?.getCode();return F(t)||(null===e?(P(`Can not get proj string for code: ${t}`),null):(C.defs(t,e),A(C),F(t)))}catch(e){return T("Fehler bei der Registrierung der Projektion:",e),null}}}}class K{map;layers=[];baseLayers=[];googleLogoAdded=!1;projection="EPSG:3857";layerErrorCallbacks=new globalThis.Map;layerErrorCleanups=new globalThis.Map;async init(r){await async function(e){if(!e)return;const t="ol-css-sheet";if(e.querySelector(`style[data-id="${t}"]`))return;const r=`https://cdn.jsdelivr.net/npm/ol@${W}/ol.css`,o=await(await fetch(r)).text();if("adoptedStyleSheets"in Document.prototype){const t=new CSSStyleSheet;await t.replace(o),e.adoptedStyleSheets=[...e.adoptedStyleSheets??[],t]}else{const r=document.createElement("style");r.setAttribute("data-id",t),r.textContent=o,e.appendChild(r)}}(r.shadowRoot),Object.assign(r.target.style,{width:"100%",height:"100%",position:"relative",background:"#fff"}),this.map=new e({target:r.target,layers:[],view:new t({projection:this.projection,center:k(r?.mapInitOptions?.center??[0,0]),zoom:r?.mapInitOptions?.zoom??2})}),new ResizeObserver((()=>this.map?.updateSize())).observe(r.target)}async destroy(){this.map?.setTarget(void 0),this.map=void 0}async updateLayer(e,t){const r=await this._getLayerById(e);switch(t.type){case"geojson":await this.updateGeoJSONLayer(r,t.data);break;case"osm":await this.updateOSMLayer(r,t.data);break;case"wms":await this.updateWMSLayer(r,t.data);break;case"wfs":await this.updateWFSLayer(r,t.data);break;case"wcs":await this.updateWCSLayer(r,t.data);break;case"arcgis":await this.updateArcGISLayer(r,t.data);break;case"wkt":await this.updateWKTLayer(r,t.data);break;case"geotiff":await this.updateGeoTIFFLayer(r,t.data)}}async ensureGroup(e,t,r){await this._ensureGroup(e,t)}async _ensureGroup(e,t){if(!this.map)return null;let r=this.layers.find((t=>t.get?.("groupId")===e));return r||(r=new o({layers:[],properties:{groupId:e,visible:void 0===typeof t||t}}),this.map.addLayer(r),this.layers.push(r)),r}async setBaseLayer(e,t){if(null===t)return void x("ol - setBaseLayer - layerElementId is null.");const r=this.layers.find((t=>t.get?.("groupId")===e)),o=this.baseLayers.find((e=>e.get("layerElementId")===t));void 0!==o?(r.getLayers().clear(),r.getLayers().push(o)):x("ol - setBaseLayer - layer not found. layerElementId: "+t)}async addBaseLayer(e,t,r){if(null==r)return x("ol - addBaseLayer - layerElementId not set."),null;null==t&&x("ol - addBaseLayer - basemapid not set.");const o=await this._ensureGroup(e.groupId,e.groupVisible);if(null==o)return null;o.set("basemap",!0,!1);const s=await this.createLayer(e);if(null==s)return null;s.set("group",o),this.baseLayers.push(s);let n=null;if(s){n=crypto.randomUUID(),s.set("id",n,!1),s.set("layerElementId",r,!1);const a=e;void 0!==a.opacity&&s.setOpacity(a.opacity),void 0!==a.zIndex&&s.setZIndex(a.zIndex),a.visible?s.setVisible(!0):!1===a.visible&&s.setVisible(!1),t===r&&(o.getLayers().clear(),o.getLayers().push(s))}return n}async addLayerToGroup(e){const t=await this._ensureGroup(e.groupId,e.groupVisible);if(null==t)return null;const r=await this.createLayer(e);if(null===r)return null;r.set("group",t),t.getLayers().push(r);const o=crypto.randomUUID();r.set("id",o,!1);const s=e;return void 0!==s.opacity&&r.setOpacity(s.opacity),void 0!==s.zIndex&&r.setZIndex(s.zIndex),s.visible?r.setVisible(!0):!1===s.visible&&r.setVisible(!1),o}async createLayer(e){switch(e.type){case"geojson":return this.createGeoJSONLayer(e);case"xyz":return this.createXYZLayer(e);case"google":return this.createGoogleLayer(e);case"osm":return this.createOSMLayer(e);case"wms":return this.createWMSLayer(e);case"wfs":return this.createWFSLayer(e);case"wcs":return this.createWCSLayer(e);case"arcgis":return this.createArcGISLayer(e);case"wkt":return this.createWKTLayer(e);case"geotiff":return this.createGeoTIFFLayer(e);default:throw new Error(`Unsupported layer type: ${e.type}`)}}async updateWMSLayer(e,t){e.setSource(new i({url:t.url,params:{LAYERS:t.layers,TILED:!0,...t.extraParams??{}}}))}async updateOSMLayer(e,t){let r="https://tile.openstreetmap.org/{z}/{x}/{y}.png";t.url&&(r=t.url+"/{z}/{x}/{y}.png"),e.setSource(new c({url:r}))}async updateGeoJSONLayer(e,t){let r=null;const o={featureProjection:this.projection};if(t.geojson){const e=JSON.parse(t.geojson);r=new a({features:new h(o).readFeatures(e)})}else r=new a({url:t.url,format:new h(o)});let s;e.setSource(r),t.geostylerStyle?s=await this.createGeostylerStyleFunction(t.geostylerStyle):t.style&&(s=await this.createEnhancedStyleFunction(t.style)),s&&e.setStyle(s)}async updateWFSLayer(e,t){const r=this.mergeLayerConfig(e,"wfsConfig",t),o=await this.createWFSSpource(r);let s;e.setSource(o),r.geostylerStyle?s=await this.createGeostylerStyleFunction(r.geostylerStyle):r.style&&(s=await this.createEnhancedStyleFunction(r.style)),s&&e.setStyle(s)}async updateWCSLayer(e,t){const r=this.mergeLayerConfig(e,"wcsConfig",t),o=await this.createWcsSource(r);e.setSource(o)}async updateArcGISLayer(e,t){const r=e,o=r.getSource(),s={...o?.getParams?.()??{},...t?.params??{}};t?.token&&(s.token=t.token);const n={url:t?.url??o?.getUrls?.()?.[0],params:s,...t?.options??{}},a=new f(n);r.setSource(a)}async createEnhancedStyleFunction(e){function t(e,t){if(e.startsWith("rgba")){const r=e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);if(r){const[,e,o,s]=r;return`rgba(${e}, ${o}, ${s}, ${t})`}}else if(e.startsWith("rgb")){const r=e.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);if(r){const[,e,o,s]=r;return`rgba(${e}, ${o}, ${s}, ${t})`}}else if(e.startsWith("#")){const r=e.slice(1);return`rgba(${parseInt(r.slice(0,2),16)}, ${parseInt(r.slice(2,4),16)}, ${parseInt(r.slice(4,6),16)}, ${t})`}return e}return r=>{const o=[],s=r.getGeometry().getType(),n=new S({color:t(e.fillColor??"rgba(0,100,255,0.3)",e.fillOpacity??.3)}),a=e.strokeWidth??2,i=new j({color:t(e.strokeColor??"rgba(0,100,255,1)",e.strokeOpacity??1),width:a,lineDash:e.strokeDashArray});if(o.push(new L("Point"===s?e.iconUrl?{image:new I({src:e.iconUrl,size:e.iconSize||[32,32],anchor:e.iconAnchor||[.5,1]})}:{image:new G({radius:e.pointRadius??6,fill:new S({color:t(e.pointColor??"rgba(0,100,255,1)",e.pointOpacity??1)}),stroke:i})}:{fill:s.includes("Polygon")?n:void 0,stroke:i})),e.textProperty&&r.get(e.textProperty)){const t=e.textColor??"#000000",s=e.textSize??12,n=e.textHaloColor,a=e.textHaloWidth??2,i=e.textOffset||[0,0];o.push(new L({text:new v({text:String(r.get(e.textProperty)),font:`${s}px Arial`,fill:new S({color:t}),stroke:n?new j({color:n,width:a}):void 0,offsetX:i[0],offsetY:i[1]})}))}return o}}async createGeoJSONLayer(e){let t=null;const o={featureProjection:this.projection};if(e.geojson){const r=JSON.parse(e.geojson);t=new a({features:new h(o).readFeatures(r)})}else t=new a({url:e.url,format:new h(o)});let s;if(e.geostylerStyle)s=await this.createGeostylerStyleFunction(e.geostylerStyle);else{const t=e.style?{...$,...e.style}:$;s=await this.createEnhancedStyleFunction(t)}return new r({source:t,style:s})}async createWFSSpource(e){const t=(e.outputFormat??"application/json").toLowerCase();let r=new h;switch(t){case"gml2":r=new p;break;case"gml3":r=new m;break;case"gml32":r=new d}const o=this.getWFSGetFeatureUrl(e);return new a({format:r,url:o,strategy:E})}async createWFSLayer(e){const t=await this.createWFSSpource(e);let o;if(e.geostylerStyle)o=await this.createGeostylerStyleFunction(e.geostylerStyle);else{const t=e.style?{...$,...e.style}:$;o=await this.createEnhancedStyleFunction(t)}const s=new r({source:t,style:o});return s.set("wfsConfig",e,!1),s}async createGeostylerStyleFunction(e){const t=(e,t)=>null==e||"object"==typeof e&&e.name?t:e;return r=>{const o=[],s=r.getGeometry().getType();if(e.rules)for(const n of e.rules)if(n.symbolizers)for(const e of n.symbolizers)switch(e.kind){case"Fill":if(s.includes("Polygon")){const r=t(e.color,"rgba(0,100,255,0.3)"),s=t(e.outlineColor),n=t(e.outlineWidth,1);o.push(new L({fill:new S({color:r}),stroke:s?new j({color:s,width:n}):void 0}))}break;case"Line":{const r=t(e.color,"rgba(0,100,255,1)"),s=t(e.width,1),n=e.dasharray&&Array.isArray(e.dasharray)?e.dasharray.map((e=>t(e,0))):void 0;o.push(new L({stroke:new j({color:r,width:s,lineDash:n})}))}break;case"Mark":if("Point"===s){const r=t(e.color,"rgba(0,100,255,1)"),s=t(e.radius,6),n=t(e.strokeColor),a=t(e.strokeWidth,1);o.push(new L({image:new G({radius:s,fill:new S({color:r}),stroke:n?new j({color:n,width:a}):void 0})}))}break;case"Icon":if("Point"===s){const r=t(e.image),s=t(e.size,32),n=t(e.opacity,1);r&&"string"==typeof r&&o.push(new L({image:new I({src:r,size:[s,s],opacity:n})}))}break;case"Text":{const s=e,n=t(s.label);if(n&&r.get(n)){const e=t(s.color,"#000000"),a=t(s.size,12),i=t(s.font?.[0],"Arial"),c=t(s.haloColor),l=t(s.haloWidth,1),u=s.offset,f=u&&Array.isArray(u)?t(u[0],0):0,w=u&&Array.isArray(u)?t(u[1],0):0;o.push(new L({text:new v({text:String(r.get(n)),font:`${a}px ${i}`,fill:new S({color:e}),stroke:c?new j({color:c,width:l}):void 0,offsetX:f,offsetY:w})}))}}}return o.length>0?o:void 0}}async createXYZLayer(e){return new s({source:new l({url:e.url,attributions:e.attributions,maxZoom:e.maxZoom??19,...e.options??{}})})}async createGoogleLayer(e){if(!e.apiKey)throw new Error("Google-Layer benötigt 'apiKey' (Google Maps Platform).");const t=new u({key:e.apiKey,mapType:e.mapType??"roadmap",scale:e.scale??"scaleFactor2x",highDpi:e.highDpi??!0,language:e.language,region:e.region,imageFormat:e.imageFormat,styles:e.styles,layerTypes:e.layerTypes});t.on("change",(()=>{if("error"===t.getState()){const e=t.getError();T("Google source error",e),this.map.getTargetElement()?.dispatchEvent(new CustomEvent("google-source-error",{detail:{message:e??"Google source error"},bubbles:!0,composed:!0}))}}));const r=new s({source:t});if(!this.googleLogoAdded){class e extends b{constructor(){const e=document.createElement("img");e.style.pointerEvents="none",e.style.position="absolute",e.style.bottom="5px",e.style.left="5px",e.style.height="18px",e.alt="Google",e.src="https://developers.google.com/static/maps/documentation/images/google_on_white.png",super({element:e})}}this.map.addControl(new e),this.googleLogoAdded=!0}return r}async createOSMLayer(e){let t="https://tile.openstreetmap.org/{z}/{x}/{y}.png";return e.url&&(t=e.url+"/{z}/{x}/{y}.png"),new s({source:new c({url:t})})}async createWMSLayer(e){return new s({source:new i({url:e.url,params:{LAYERS:e.layers,TILED:!0,...e.extraParams??{}}})})}onLayerError(e,t){this.layerErrorCallbacks.set(e,t),this._getLayerById(e).then((t=>{t&&this.attachSourceErrorListeners(e,t)}))}offLayerError(e){this.layerErrorCleanups.get(e)?.(),this.layerErrorCleanups.delete(e),this.layerErrorCallbacks.delete(e)}attachSourceErrorListeners(e,t){this.layerErrorCleanups.get(e)?.();const r=this.layerErrorCallbacks.get(e);if(!r)return;const o=t.getSource?.();if(!o)return;const s=[];if("getTile"in o||o instanceof i||o instanceof c||o instanceof l||o instanceof u||o instanceof f){const e=()=>{r({type:"network",message:"Tile load error"})};o.on("tileloaderror",e),s.push((()=>o.un("tileloaderror",e)))}if(o instanceof a){const e=()=>{r({type:"network",message:"Feature load error"})};o.on("featuresloaderror",e),s.push((()=>o.un("featuresloaderror",e)))}if(o instanceof y){const e=()=>{r({type:"network",message:"Image load error"})};o.on("imageloaderror",e),s.push((()=>o.un("imageloaderror",e)))}const n=()=>{this.attachSourceErrorListeners(e,t)};t.on("change:source",n),s.push((()=>t.un("change:source",n))),this.layerErrorCleanups.set(e,(()=>s.forEach((e=>e()))))}async setView(e,t){this.map&&this.map.getView().animate({center:k(e),zoom:t,duration:0})}async _forEachLayer(e,t){if(e instanceof o){const r=e.getLayers().getArray();for(const e of r)if(await this._forEachLayer(e,t))return!0}else if(t(e))return!0;return!1}async _getLayerById(e){if(!this.map)return null;let t=null;return await this._forEachLayer(this.map.getLayerGroup(),(r=>{if(r.get("id")===e)return t=r,!0})),t||(t=this.baseLayers.find((t=>t.get("id")===e)),void 0===t?null:t)}async _getLayerGroupById(e){if(!this.map)return null;const t=this.layers.find((t=>t.get?.("groupId")===e));return void 0!==t?t:null}async removeLayer(e){if(!e)return;this.offLayerError(e);const t=await this._getLayerById(e);if(t){const e=t.get("group");e&&e.getLayers().remove(t)}}async setOpacity(e,t){if(!e)return;const r=await this._getLayerById(e);r&&r.setOpacity(t)}async setZIndex(e,t){if(!e)return;const r=await this._getLayerById(e);r&&r.setZIndex(t)}async setVisible(e,t){const r=await this._getLayerById(e);r&&r.setVisible(t)}async setGroupVisible(e,t){const r=await this._getLayerGroupById(e);r&&r.setVisible(t)}async updateWKTLayer(e,t){const r=new g;let o=null;const s=this.map?.getView()?.getProjection();if(t.wkt){const e=r.readFeature(t.wkt,{dataProjection:"EPSG:4326",featureProjection:s});o=new a({features:[e]})}else if(t.url){const e=await fetch(t.url);if(!e.ok)throw new Error(`Failed to fetch WKT: ${e.status}`);const n=await e.text(),i=r.readFeature(n,{dataProjection:"EPSG:4326",featureProjection:s});o=new a({features:[i]})}let n;o&&e.setSource(o),t.geostylerStyle?n=await this.createGeostylerStyleFunction(t.geostylerStyle):t.style&&(n=await this.createEnhancedStyleFunction(t.style)),n&&e.setStyle(n)}async createWKTLayer(e){const t=new g;let o=null;const s=this.map?.getView()?.getProjection();if(e.wkt)try{const r=t.readFeature(e.wkt,{dataProjection:"EPSG:4326",featureProjection:s});o=new a({features:[r]})}catch(e){T("Failed to parse WKT:",e),o=new a({features:[]})}else if(e.url)try{const r=await fetch(e.url);if(!r.ok)throw new Error(`Failed to fetch WKT: ${r.status}`);const n=await r.text(),i=t.readFeature(n,{dataProjection:"EPSG:4326",featureProjection:s});o=new a({features:[i]})}catch(e){T("Failed to load WKT from URL:",e),o=new a({features:[]})}else o=new a({features:[]});let n;if(e.geostylerStyle)n=await this.createGeostylerStyleFunction(e.geostylerStyle);else{const t=e.style?{...$,...e.style}:$;n=await this.createEnhancedStyleFunction(t)}return new r({source:o,style:n,opacity:e.opacity??1,visible:e.visible??!0,zIndex:e.zIndex??1e3})}async createGeoTIFFLayer(e){if(!e.url)throw new Error("GeoTIFF layer requires a URL");const t={url:e.url};null===e.nodata||isNaN(e.nodata)||(t.nodata=e.nodata);const r=new(await z({sources:[t],wrapX:!1}));return await r.registerProjectionIfNeeded(),new R({source:r,opacity:e.opacity??1,visible:e.visible??!0,zIndex:e.zIndex??100})}async createWCSLayer(e){const t=await this.createWcsSource(e),r=new n({source:t,visible:e.visible??!0,opacity:e.opacity??1});return r.set("wcsConfig",e,!1),r}getWFSGetFeatureUrl(e){return t=>{const r={service:"WFS",request:"GetFeature",version:e.version??"1.1.0",typeName:e.typeName,outputFormat:e.outputFormat??"application/json",bbox:t.join(","),srsName:e.srsName??this.projection,...e.params??{}};return this.appendParams(e.url,r)}}getWCSGetCoverageUrl(e,t){return r=>{const o=e.version??"2.0.1",s=e.format??"image/tiff",n=e.projection??this.projection,a={SERVICE:"WCS",REQUEST:"GetCoverage",VERSION:o,FORMAT:s};if(o.startsWith("2.0")){a.coverageId=e.coverageName;const[t,o,n,i]=r;a.subset=`X(${t},${n})`,a.subset2=`Y(${o},${i})`,(s.includes("tiff")||s.includes("geotiff"))&&(a["geotiff:compression"]="LZW")}else{a.COVERAGE=e.coverageName,a.BBOX=r.join(","),a.CRS=n;const o=Math.round((r[2]-r[0])/t),s=Math.round((r[3]-r[1])/t);a.WIDTH=o,a.HEIGHT=s}if(e.params&&Object.entries(e.params).forEach((([e,t])=>{"string"!=typeof t&&"number"!=typeof t||(a[e]=t)})),o.startsWith("2.0")){const t=a.subset2;delete a.subset2;const r=new URLSearchParams;Object.entries(a).forEach((([e,t])=>{null!=t&&r.append(e,String(t))})),t&&r.append("subset",String(t));const o=e.url;return`${o}${o.includes("?")?"&":"?"}${r.toString()}`}return this.appendParams(e.url,a)}}mergeLayerConfig(e,t,r){const o={...e.get(t)??{},...r};return e.set(t,o,!1),o}appendParams(e,t){const r=new URLSearchParams;return Object.entries(t).forEach((([e,t])=>{null!=t&&r.set(e,String(t))})),r.toString()?`${e}${e.includes("?")?"&":"?"}${r.toString()}`:e}async createWcsSource(e){const t=e.projection??this.projection,r=this.map?.getView()?.getResolution()??1,o=this.getWCSGetCoverageUrl(e,r);return new class extends y{urlFunction_;constructor(r){super({projection:t,resolutions:e.resolutions}),this.urlFunction_=r}getImageInternal(e,t,r,o){const s=this.urlFunction_(e),n=new w(e,t,r,s);return n.load=()=>{const e=n.getImage();e.src!==s&&(e.crossOrigin="anonymous",e.src=s)},n}}(o)}async createArcGISLayer(e){const t={...e.params??{}};e.token&&(t.token=e.token);const r={url:e.url,params:t,...e.options??{}};return new s({source:new f(r),visible:e.visible??!0})}async updateGeoTIFFLayer(e,t){if(!t.url)throw new Error("GeoTIFF update requires a URL");const r={url:t.url};null==t.nodata||isNaN(t.nodata)||(r.nodata=t.nodata);const o=new(await z({sources:[r],wrapX:!1}));await o.registerProjectionIfNeeded(),e.setSource(o)}getMap(){return this.map}}export{K as OpenLayersProvider}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as e,c as t,g as n,h as r}from"./p-jzneDarq.js";import{l as i,M as o,V as a}from"./p-CMKJzsgL.js";
|
|
2
|
+
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */var s=function(e){return"object"==typeof e&&null!==e},l=function(e,t){var n,r="";for(n=0;n<t;n+=1)r+=e;return r},c=function(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e};function u(e,t){var n="",r=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(n+='in "'+e.mark.name+'" '),n+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(n+="\n\n"+e.mark.snippet),r+" "+n):r}function f(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=u(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}(f.prototype=Object.create(Error.prototype)).constructor=f,f.prototype.toString=function(e){return this.name+": "+u(this,e)};var p=f;function d(e,t,n,r,i){var o="",a="",s=Math.floor(i/2)-1;return r-t>s&&(t=r-s+(o=" ... ").length),n-r>s&&(n=r+s-(a=" ...").length),{str:o+e.slice(t,n).replace(/\t/g,"→")+a,pos:r-t+o.length}}function m(e,t){return l(" ",t-e.length)+e}var h=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],y=["scalar","sequence","mapping"],b=function(e,t){if(t=t||{},Object.keys(t).forEach((function(t){if(-1===h.indexOf(t))throw new p('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=(r={},null!==(n=t.styleAliases||null)&&Object.keys(n).forEach((function(e){n[e].forEach((function(t){r[String(t)]=e}))})),r),-1===y.indexOf(this.kind))throw new p('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.');var n,r};function g(e,t){var n=[];return e[t].forEach((function(e){var t=n.length;n.forEach((function(n,r){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=r)})),n[t]=e})),n}function v(e){return this.extend(e)}v.prototype.extend=function(e){var t=[],n=[];if(e instanceof b)n.push(e);else if(Array.isArray(e))n=n.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new p("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit))}t.forEach((function(e){if(!(e instanceof b))throw new p("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new p("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new p("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),n.forEach((function(e){if(!(e instanceof b))throw new p("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var r=Object.create(v.prototype);return r.implicit=(this.implicit||[]).concat(t),r.explicit=(this.explicit||[]).concat(n),r.compiledImplicit=g(r,"implicit"),r.compiledExplicit=g(r,"explicit"),r.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function r(e){e.multi?(n.multi[e.kind].push(e),n.multi.fallback.push(e)):n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(r);return n}(r.compiledImplicit,r.compiledExplicit),r};var w=new v({explicit:[new b("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}}),new b("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}}),new b("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})]}),k=new b("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"}),j=new b("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function x(e){return 48<=e&&e<=55}function O(e){return 48<=e&&e<=57}var S=new b("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,r=e.length,i=0,o=!1;if(!r)return!1;if("-"!==(t=e[i])&&"+"!==t||(t=e[++i]),"0"===t){if(i+1===r)return!0;if("b"===(t=e[++i])){for(i++;i<r;i++)if("_"!==(t=e[i])){if("0"!==t&&"1"!==t)return!1;o=!0}return o&&"_"!==t}if("x"===t){for(i++;i<r;i++)if("_"!==(t=e[i])){if(!(48<=(n=e.charCodeAt(i))&&n<=57||65<=n&&n<=70||97<=n&&n<=102))return!1;o=!0}return o&&"_"!==t}if("o"===t){for(i++;i<r;i++)if("_"!==(t=e[i])){if(!x(e.charCodeAt(i)))return!1;o=!0}return o&&"_"!==t}}if("_"===t)return!1;for(;i<r;i++)if("_"!==(t=e[i])){if(!O(e.charCodeAt(i)))return!1;o=!0}return!(!o||"_"===t)},construct:function(e){var t,n=e,r=1;if(-1!==n.indexOf("_")&&(n=n.replace(/_/g,"")),"-"!==(t=n[0])&&"+"!==t||("-"===t&&(r=-1),t=(n=n.slice(1))[0]),"0"===n)return 0;if("0"===t){if("b"===n[1])return r*parseInt(n.slice(2),2);if("x"===n[1])return r*parseInt(n.slice(2),16);if("o"===n[1])return r*parseInt(n.slice(2),8)}return r*parseInt(n,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!c(e)},represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),A=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),N=/^[-+]?[0-9]+e/,z=new b("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!A.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||c(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(c(e))return"-0.0";return n=e.toString(10),N.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"}),F=w.extend({implicit:[k,j,S,z]}),C=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),E=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"),M=new b("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==C.exec(e)||null!==E.exec(e))},construct:function(e){var t,n,r,i,o,a,s,l,c=0,u=null;if(null===(t=C.exec(e))&&(t=E.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(o=+t[4],a=+t[5],s=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(u=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(u=-u)),l=new Date(Date.UTC(n,r,i,o,a,s,c)),u&&l.setTime(l.getTime()-u),l},instanceOf:Date,represent:function(e){return e.toISOString()}}),L=new b("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}}),T="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r",_=new b("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,r=0,i=e.length,o=T;for(n=0;n<i;n++)if(!((t=o.indexOf(e.charAt(n)))>64)){if(t<0)return!1;r+=6}return r%8==0},construct:function(e){var t,n,r=e.replace(/[\r\n=]/g,""),i=r.length,o=T,a=0,s=[];for(t=0;t<i;t++)t%4==0&&t&&(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)),a=a<<6|o.indexOf(r.charAt(t));return 0==(n=i%4*6)?(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)):18===n?(s.push(a>>10&255),s.push(a>>2&255)):12===n&&s.push(a>>4&255),new Uint8Array(s)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var t,n,r="",i=0,o=e.length,a=T;for(t=0;t<o;t++)t%3==0&&t&&(r+=a[i>>18&63],r+=a[i>>12&63],r+=a[i>>6&63],r+=a[63&i]),i=(i<<8)+e[t];return 0==(n=o%3)?(r+=a[i>>18&63],r+=a[i>>12&63],r+=a[i>>6&63],r+=a[63&i]):2===n?(r+=a[i>>10&63],r+=a[i>>4&63],r+=a[i<<2&63],r+=a[64]):1===n&&(r+=a[i>>2&63],r+=a[i<<4&63],r+=a[64],r+=a[64]),r}}),I=Object.prototype.hasOwnProperty,J=Object.prototype.toString,D=new b("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,r,i,o,a=[],s=e;for(t=0,n=s.length;t<n;t+=1){if(o=!1,"[object Object]"!==J.call(r=s[t]))return!1;for(i in r)if(I.call(r,i)){if(o)return!1;o=!0}if(!o)return!1;if(-1!==a.indexOf(i))return!1;a.push(i)}return!0},construct:function(e){return null!==e?e:[]}}),q=Object.prototype.toString,$=new b("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,r,i,o,a=e;for(o=new Array(a.length),t=0,n=a.length;t<n;t+=1){if("[object Object]"!==q.call(r=a[t]))return!1;if(1!==(i=Object.keys(r)).length)return!1;o[t]=[i[0],r[i[0]]]}return!0},construct:function(e){if(null===e)return[];var t,n,r,i,o,a=e;for(o=new Array(a.length),t=0,n=a.length;t<n;t+=1)r=a[t],i=Object.keys(r),o[t]=[i[0],r[i[0]]];return o}}),R=Object.prototype.hasOwnProperty,U=new b("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(e){if(null===e)return!0;var t,n=e;for(t in n)if(R.call(n,t)&&null!==n[t])return!1;return!0},construct:function(e){return null!==e?e:{}}}),Y=F.extend({implicit:[M,L],explicit:[_,D,$,U]}),B=Object.prototype.hasOwnProperty,G=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Z=/[\x85\u2028\u2029]/,K=/[,\[\]\{\}]/,P=/^(?:!|!!|![a-z\-]+!)$/i,W=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function V(e){return Object.prototype.toString.call(e)}function H(e){return 10===e||13===e}function Q(e){return 9===e||32===e}function X(e){return 9===e||32===e||10===e||13===e}function ee(e){return 44===e||91===e||93===e||123===e||125===e}function te(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function ne(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"
":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function re(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}for(var ie=new Array(256),oe=new Array(256),ae=0;ae<256;ae++)ie[ae]=ne(ae)?1:0,oe[ae]=ne(ae);function se(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Y,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function le(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=function(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);for(var n,r=/\r?\n|\r|\0/g,i=[0],o=[],a=-1;n=r.exec(e.buffer);)o.push(n.index),i.push(n.index+n[0].length),e.position<=n.index&&a<0&&(a=i.length-2);a<0&&(a=i.length-1);var s,c,u="",f=Math.min(e.line+t.linesAfter,o.length).toString().length,p=t.maxLength-(t.indent+f+3);for(s=1;s<=t.linesBefore&&!(a-s<0);s++)c=d(e.buffer,i[a-s],o[a-s],e.position-(i[a]-i[a-s]),p),u=l(" ",t.indent)+m((e.line-s+1).toString(),f)+" | "+c.str+"\n"+u;for(c=d(e.buffer,i[a],o[a],e.position,p),u+=l(" ",t.indent)+m((e.line+1).toString(),f)+" | "+c.str+"\n",u+=l("-",t.indent+f+3+c.pos)+"^\n",s=1;s<=t.linesAfter&&!(a+s>=o.length);s++)c=d(e.buffer,i[a+s],o[a+s],e.position-(i[a]-i[a+s]),p),u+=l(" ",t.indent)+m((e.line+s+1).toString(),f)+" | "+c.str+"\n";return u.replace(/\n$/,"")}(n),new p(t,n)}function ce(e,t){throw le(e,t)}function ue(e,t){e.onWarning&&e.onWarning.call(null,le(e,t))}var fe={YAML:function(e,t,n){var r,i,o;null!==e.version&&ce(e,"duplication of %YAML directive"),1!==n.length&&ce(e,"YAML directive accepts exactly one argument"),null===(r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&ce(e,"ill-formed argument of the YAML directive"),i=parseInt(r[1],10),o=parseInt(r[2],10),1!==i&&ce(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=o<2,1!==o&&2!==o&&ue(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var r,i;2!==n.length&&ce(e,"TAG directive accepts exactly two arguments"),i=n[1],P.test(r=n[0])||ce(e,"ill-formed tag handle (first argument) of the TAG directive"),B.call(e.tagMap,r)&&ce(e,'there is a previously declared suffix for "'+r+'" tag handle'),W.test(i)||ce(e,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch(t){ce(e,"tag prefix is malformed: "+i)}e.tagMap[r]=i}};function pe(e,t,n,r){var i,o,a,s;if(t<n){if(s=e.input.slice(t,n),r)for(i=0,o=s.length;i<o;i+=1)9===(a=s.charCodeAt(i))||32<=a&&a<=1114111||ce(e,"expected valid JSON character");else G.test(s)&&ce(e,"the stream contains non-printable characters");e.result+=s}}function de(e,t,n,r){var i,o,a,l;for(s(n)||ce(e,"cannot merge mappings; the provided source object is unacceptable"),a=0,l=(i=Object.keys(n)).length;a<l;a+=1)B.call(t,o=i[a])||(t[o]=n[o],r[o]=!0)}function me(e,t,n,r,i,o,a,s,l){var c,u;if(Array.isArray(i))for(c=0,u=(i=Array.prototype.slice.call(i)).length;c<u;c+=1)Array.isArray(i[c])&&ce(e,"nested arrays are not supported inside keys"),"object"==typeof i&&"[object Object]"===V(i[c])&&(i[c]="[object Object]");if("object"==typeof i&&"[object Object]"===V(i)&&(i="[object Object]"),i=String(i),null===t&&(t={}),"tag:yaml.org,2002:merge"===r)if(Array.isArray(o))for(c=0,u=o.length;c<u;c+=1)de(e,t,o[c],n);else de(e,t,o,n);else e.json||B.call(n,i)||!B.call(t,i)||(e.line=a||e.line,e.lineStart=s||e.lineStart,e.position=l||e.position,ce(e,"duplicated mapping key")),"__proto__"===i?Object.defineProperty(t,i,{configurable:!0,enumerable:!0,writable:!0,value:o}):t[i]=o,delete n[i];return t}function he(e){var t;10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):ce(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function ye(e,t,n){for(var r=0,i=e.input.charCodeAt(e.position);0!==i;){for(;Q(i);)9===i&&-1===e.firstTabInLine&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&35===i)do{i=e.input.charCodeAt(++e.position)}while(10!==i&&13!==i&&0!==i);if(!H(i))break;for(he(e),i=e.input.charCodeAt(e.position),r++,e.lineIndent=0;32===i;)e.lineIndent++,i=e.input.charCodeAt(++e.position)}return-1!==n&&0!==r&&e.lineIndent<n&&ue(e,"deficient indentation"),r}function be(e){var t,n=e.position;return!(45!==(t=e.input.charCodeAt(n))&&46!==t||t!==e.input.charCodeAt(n+1)||t!==e.input.charCodeAt(n+2)||0!==(t=e.input.charCodeAt(n+=3))&&!X(t))}function ge(e,t){1===t?e.result+=" ":t>1&&(e.result+=l("\n",t-1))}function ve(e,t){var n,r,i=e.tag,o=e.anchor,a=[],s=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),r=e.input.charCodeAt(e.position);0!==r&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,ce(e,"tab characters must not be used in indentation")),45===r)&&X(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,ye(e,!0,-1)&&e.lineIndent<=t)a.push(null),r=e.input.charCodeAt(e.position);else if(n=e.line,je(e,t,3,!1,!0),a.push(e.result),ye(e,!0,-1),r=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==r)ce(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!s&&(e.tag=i,e.anchor=o,e.kind="sequence",e.result=a,!0)}function we(e){var t,n,r,i,o=!1,a=!1;if(33!==(i=e.input.charCodeAt(e.position)))return!1;if(null!==e.tag&&ce(e,"duplication of a tag property"),60===(i=e.input.charCodeAt(++e.position))?(o=!0,i=e.input.charCodeAt(++e.position)):33===i?(a=!0,n="!!",i=e.input.charCodeAt(++e.position)):n="!",t=e.position,o){do{i=e.input.charCodeAt(++e.position)}while(0!==i&&62!==i);e.position<e.length?(r=e.input.slice(t,e.position),i=e.input.charCodeAt(++e.position)):ce(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==i&&!X(i);)33===i&&(a?ce(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),P.test(n)||ce(e,"named tag handle cannot contain such characters"),a=!0,t=e.position+1)),i=e.input.charCodeAt(++e.position);r=e.input.slice(t,e.position),K.test(r)&&ce(e,"tag suffix cannot contain flow indicator characters")}r&&!W.test(r)&&ce(e,"tag name cannot contain such characters: "+r);try{r=decodeURIComponent(r)}catch(t){ce(e,"tag name is malformed: "+r)}return o?e.tag=r:B.call(e.tagMap,n)?e.tag=e.tagMap[n]+r:"!"===n?e.tag="!"+r:"!!"===n?e.tag="tag:yaml.org,2002:"+r:ce(e,'undeclared tag handle "'+n+'"'),!0}function ke(e){var t,n;if(38!==(n=e.input.charCodeAt(e.position)))return!1;for(null!==e.anchor&&ce(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!X(n)&&!ee(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&ce(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function je(e,t,n,r,i){var o,a,s,c,u,f,p,d,m,h=1,y=!1,b=!1;if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=a=s=4===n||3===n,r&&ye(e,!0,-1)&&(y=!0,e.lineIndent>t?h=1:e.lineIndent===t?h=0:e.lineIndent<t&&(h=-1)),1===h)for(;we(e)||ke(e);)ye(e,!0,-1)?(y=!0,s=o,e.lineIndent>t?h=1:e.lineIndent===t?h=0:e.lineIndent<t&&(h=-1)):s=!1;if(s&&(s=y||i),1!==h&&4!==n||(d=1===n||2===n?t:t+1,m=e.position-e.lineStart,1===h?s&&(ve(e,m)||function(e,t,n){var r,i,o,a,s,l,c,u=e.tag,f=e.anchor,p={},d=Object.create(null),m=null,h=null,y=null,b=!1,g=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=p),c=e.input.charCodeAt(e.position);0!==c;){if(b||-1===e.firstTabInLine||(e.position=e.firstTabInLine,ce(e,"tab characters must not be used in indentation")),r=e.input.charCodeAt(e.position+1),o=e.line,63!==c&&58!==c||!X(r)){if(a=e.line,s=e.lineStart,l=e.position,!je(e,n,2,!1,!0))break;if(e.line===o){for(c=e.input.charCodeAt(e.position);Q(c);)c=e.input.charCodeAt(++e.position);if(58===c)X(c=e.input.charCodeAt(++e.position))||ce(e,"a whitespace character is expected after the key-value separator within a block mapping"),b&&(me(e,p,d,m,h,null,a,s,l),m=h=y=null),g=!0,b=!1,i=!1,m=e.tag,h=e.result;else{if(!g)return e.tag=u,e.anchor=f,!0;ce(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!g)return e.tag=u,e.anchor=f,!0;ce(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===c?(b&&(me(e,p,d,m,h,null,a,s,l),m=h=y=null),g=!0,b=!0,i=!0):b?(b=!1,i=!0):ce(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,c=r;if((e.line===o||e.lineIndent>t)&&(b&&(a=e.line,s=e.lineStart,l=e.position),je(e,t,4,!0,i)&&(b?h=e.result:y=e.result),b||(me(e,p,d,m,h,y,a,s,l),m=h=y=null),ye(e,!0,-1),c=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&0!==c)ce(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return b&&me(e,p,d,m,h,null,a,s,l),g&&(e.tag=u,e.anchor=f,e.kind="mapping",e.result=p),g}(e,m,d))||function(e,t){var n,r,i,o,a,s,l,c,u,f,p,d,m=!0,h=e.tag,y=e.anchor,b=Object.create(null);if(91===(d=e.input.charCodeAt(e.position)))a=93,c=!1,o=[];else{if(123!==d)return!1;a=125,c=!0,o={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=o),d=e.input.charCodeAt(++e.position);0!==d;){if(ye(e,!0,t),(d=e.input.charCodeAt(e.position))===a)return e.position++,e.tag=h,e.anchor=y,e.kind=c?"mapping":"sequence",e.result=o,!0;m?44===d&&ce(e,"expected the node content, but found ','"):ce(e,"missed comma between flow collection entries"),p=null,s=l=!1,63===d&&X(e.input.charCodeAt(e.position+1))&&(s=l=!0,e.position++,ye(e,!0,t)),n=e.line,r=e.lineStart,i=e.position,je(e,t,1,!1,!0),f=e.tag,u=e.result,ye(e,!0,t),d=e.input.charCodeAt(e.position),!l&&e.line!==n||58!==d||(s=!0,d=e.input.charCodeAt(++e.position),ye(e,!0,t),je(e,t,1,!1,!0),p=e.result),c?me(e,o,b,f,u,p,n,r,i):o.push(s?me(e,null,b,f,u,p,n,r,i):u),ye(e,!0,t),44===(d=e.input.charCodeAt(e.position))?(m=!0,d=e.input.charCodeAt(++e.position)):m=!1}ce(e,"unexpected end of the stream within a flow collection")}(e,d)?b=!0:(a&&function(e,t){var n,r,i,o,a,s=1,c=!1,u=!1,f=t,p=0,d=!1;if(124===(o=e.input.charCodeAt(e.position)))r=!1;else{if(62!==o)return!1;r=!0}for(e.kind="scalar",e.result="";0!==o;)if(43===(o=e.input.charCodeAt(++e.position))||45===o)1===s?s=43===o?3:2:ce(e,"repeat of a chomping mode identifier");else{if(!((i=48<=(a=o)&&a<=57?a-48:-1)>=0))break;0===i?ce(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?ce(e,"repeat of an indentation width identifier"):(f=t+i-1,u=!0)}if(Q(o)){do{o=e.input.charCodeAt(++e.position)}while(Q(o));if(35===o)do{o=e.input.charCodeAt(++e.position)}while(!H(o)&&0!==o)}for(;0!==o;){for(he(e),e.lineIndent=0,o=e.input.charCodeAt(e.position);(!u||e.lineIndent<f)&&32===o;)e.lineIndent++,o=e.input.charCodeAt(++e.position);if(!u&&e.lineIndent>f&&(f=e.lineIndent),H(o))p++;else{if(e.lineIndent<f){3===s?e.result+=l("\n",c?1+p:p):1===s&&c&&(e.result+="\n");break}for(r?Q(o)?(d=!0,e.result+=l("\n",c?1+p:p)):d?(d=!1,e.result+=l("\n",p+1)):0===p?c&&(e.result+=" "):e.result+=l("\n",p):e.result+=l("\n",c?1+p:p),c=!0,u=!0,p=0,n=e.position;!H(o)&&0!==o;)o=e.input.charCodeAt(++e.position);pe(e,n,e.position,!1)}}return!0}(e,d)||function(e,t){var n,r,i;if(39!==(n=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(pe(e,r,e.position,!0),39!==(n=e.input.charCodeAt(++e.position)))return!0;r=e.position,e.position++,i=e.position}else H(n)?(pe(e,r,i,!0),ge(e,ye(e,!1,t)),r=i=e.position):e.position===e.lineStart&&be(e)?ce(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);ce(e,"unexpected end of the stream within a single quoted scalar")}(e,d)||function(e,t){var n,r,i,o,a,s,l;if(34!==(s=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;0!==(s=e.input.charCodeAt(e.position));){if(34===s)return pe(e,n,e.position,!0),e.position++,!0;if(92===s){if(pe(e,n,e.position,!0),H(s=e.input.charCodeAt(++e.position)))ye(e,!1,t);else if(s<256&&ie[s])e.result+=oe[s],e.position++;else if((a=120===(l=s)?2:117===l?4:85===l?8:0)>0){for(i=a,o=0;i>0;i--)(a=te(s=e.input.charCodeAt(++e.position)))>=0?o=(o<<4)+a:ce(e,"expected hexadecimal character");e.result+=re(o),e.position++}else ce(e,"unknown escape sequence");n=r=e.position}else H(s)?(pe(e,n,r,!0),ge(e,ye(e,!1,t)),n=r=e.position):e.position===e.lineStart&&be(e)?ce(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}ce(e,"unexpected end of the stream within a double quoted scalar")}(e,d)?b=!0:function(e){var t,n,r;if(42!==(r=e.input.charCodeAt(e.position)))return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!X(r)&&!ee(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&ce(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),B.call(e.anchorMap,n)||ce(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],ye(e,!0,-1),!0}(e)?(b=!0,null===e.tag&&null===e.anchor||ce(e,"alias node should not have any properties")):function(e,t,n){var r,i,o,a,s,l,c,u,f=e.kind,p=e.result;if(X(u=e.input.charCodeAt(e.position))||ee(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(X(r=e.input.charCodeAt(e.position+1))||n&&ee(r)))return!1;for(e.kind="scalar",e.result="",i=o=e.position,a=!1;0!==u;){if(58===u){if(X(r=e.input.charCodeAt(e.position+1))||n&&ee(r))break}else if(35===u){if(X(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&be(e)||n&&ee(u))break;if(H(u)){if(s=e.line,l=e.lineStart,c=e.lineIndent,ye(e,!1,-1),e.lineIndent>=t){a=!0,u=e.input.charCodeAt(e.position);continue}e.position=o,e.line=s,e.lineStart=l,e.lineIndent=c;break}}a&&(pe(e,i,o,!1),ge(e,e.line-s),i=o=e.position,a=!1),Q(u)||(o=e.position+1),u=e.input.charCodeAt(++e.position)}return pe(e,i,o,!1),!!e.result||(e.kind=f,e.result=p,!1)}(e,d,1===n)&&(b=!0,null===e.tag&&(e.tag="?")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===h&&(b=s&&ve(e,m))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&ce(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),c=0,u=e.implicitTypes.length;c<u;c+=1)if((p=e.implicitTypes[c]).resolve(e.result)){e.result=p.construct(e.result),e.tag=p.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else if("!"!==e.tag){if(B.call(e.typeMap[e.kind||"fallback"],e.tag))p=e.typeMap[e.kind||"fallback"][e.tag];else for(p=null,c=0,u=(f=e.typeMap.multi[e.kind||"fallback"]).length;c<u;c+=1)if(e.tag.slice(0,f[c].tag.length)===f[c].tag){p=f[c];break}p||ce(e,"unknown tag !<"+e.tag+">"),null!==e.result&&p.kind!==e.kind&&ce(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+p.kind+'", not "'+e.kind+'"'),p.resolve(e.result,e.tag)?(e.result=p.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):ce(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||b}function xe(e){var t,n,r,i,o=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(i=e.input.charCodeAt(e.position))&&(ye(e,!0,-1),i=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==i));){for(a=!0,i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!X(i);)i=e.input.charCodeAt(++e.position);for(r=[],(n=e.input.slice(t,e.position)).length<1&&ce(e,"directive name must not be less than one character in length");0!==i;){for(;Q(i);)i=e.input.charCodeAt(++e.position);if(35===i){do{i=e.input.charCodeAt(++e.position)}while(0!==i&&!H(i));break}if(H(i))break;for(t=e.position;0!==i&&!X(i);)i=e.input.charCodeAt(++e.position);r.push(e.input.slice(t,e.position))}0!==i&&he(e),B.call(fe,n)?fe[n](e,n,r):ue(e,'unknown document directive "'+n+'"')}ye(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,ye(e,!0,-1)):a&&ce(e,"directives end mark is expected"),je(e,e.lineIndent-1,4,!1,!0),ye(e,!0,-1),e.checkLineBreaks&&Z.test(e.input.slice(o,e.position))&&ue(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&be(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,ye(e,!0,-1)):e.position<e.length-1&&ce(e,"end of the stream or a document separator is expected")}var Oe=function(e,t){var n=function(e,t){t=t||{},0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var n=new se(e,t),r=e.indexOf("\0");for(-1!==r&&(n.position=r,ce(n,"null byte is not allowed in input")),n.input+="\0";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)xe(n);return n.documents}(e,t);if(0!==n.length){if(1===n.length)return n[0];throw new p("expected a single document in the stream, but found more")}};function Se(e){if(null==e)return;if("boolean"==typeof e)return e?"true":"false";const t=String(e).toLowerCase();return"true"===t||"1"===t?"true":"false"===t||"0"===t?"false":t}function Ae(e){if(null==e)return;const t="number"==typeof e?e:Number(e);return Number.isFinite(t)?t:void 0}function Ne(e){if(null==e)return;if("object"!=typeof e)return JSON.stringify(e);const t=Object.keys(e).sort(),n={};for(const r of t)n[r]=e[r];return JSON.stringify(n)}function ze(e,t){return null==e&&null==t||null!=e&&null!=t&&Math.abs(e-t)<=1e-9}function Fe(e,t){return(e??void 0)===(t??void 0)}function Ce(e,t){const n={};e.type!==t.type&&(n.type={old:e.type,new:t.type});const r=Se(e.visible),i=Se(t.visible);Fe(r,i)||(n.visible={old:r,new:i});const o=Ae(e.opacity),a=Ae(t.opacity);ze(o,a)||(n.opacity={old:o,new:a});const s=Ae(e.zIndex),l=Ae(t.zIndex);ze(s,l)||(n.zIndex={old:s,new:l}),Fe(e.url,t.url)||(n.url={old:e.url,new:t.url}),Fe(e.layers,t.layers)||(n.layers={old:e.layers,new:t.layers});const c=Se(e.tiled),u=Se(t.tiled);return Fe(c,u)||(n.tiled={old:c,new:u}),Fe(Ne(e.style),Ne(t.style))||(n.style={old:e.style,new:t.style}),Fe(Ne(e.data),Ne(t.data))||(n.data={old:e.data,new:t.data}),n}const Ee="v-map-builder - ",Me=class{constructor(n){e(this,n),this.configReady=t(this,"configReady",7),this.configError=t(this,"configError",7)}get hostEl(){return n(this)}mapconfig;configReady;configError;current;async componentDidLoad(){i(Ee+o.COMPONENT_DID_LOAD),this.parseFromSlot()}async onMapConfigChanged(e,t){i(Ee+"onMapConfigChanged"),this.parseFromSlot()}parseFromSlot(){i(Ee+"parseFromSlot");try{const e=this.hostEl.querySelector('script[type*="json"], script[type*="yaml"], script[type*="yml"]');if(!e)throw new Error("No configuration <script> found.");const t=(e.type||"").toLowerCase(),n=e.textContent??"",r=t.includes("json")?JSON.parse(n):Oe(n),o=this.normalize(r);this.applyDiff(this.current,o),this.current=o,i(Ee+"emit configReady"),this.configReady.emit(o)}catch(e){const t=e,n=t?.message||"Unknown error";this.configError.emit({message:n,errors:t?.errors}),this.hostEl.dispatchEvent(new CustomEvent(a.Error,{detail:{type:"validation",message:n,cause:e},bubbles:!0,composed:!0}))}}normalizeLayerType(e){const t=String(e??"").toLowerCase();switch(t){case"osm":case"wms":case"wms-tiled":case"geojson":case"xyz":case"terrain":case"wfs":case"wcs":case"google":case"geotiff":case"tile3d":case"scatterplot":case"wkt":return t;default:return"custom"}}toOptionalString(e){if(null!=e)return"string"==typeof e?e:String(e)}toOptionalNumber(e){if(null==e||""===e)return;const t="number"==typeof e?e:Number(e);return Number.isFinite(t)?t:void 0}toOptionalBoolean(e){if(null==e||""===e)return;if("boolean"==typeof e)return e;const t=String(e).trim().toLowerCase();return!!["true","1","yes","y"].includes(t)||!["false","0","no","n"].includes(t)&&void 0}toCsv(e){if(null!=e)return Array.isArray(e)?e.map((e=>this.toOptionalString(e))).filter((e=>null!=e&&""!==e)).join(","):this.toOptionalString(e)}cleanRecord(e){if(!e)return;const t={};for(const[n,r]of Object.entries(e))null!=r&&(t[n]=r);return Object.keys(t).length?t:void 0}normalizeLayer(e,t,n){const r=this.normalizeLayerType(e?.type??e?.layerType),i={id:String(e?.id??`${t+1}-${n+1}`),type:r,visible:e?.visible,opacity:e?.opacity,zIndex:e?.zIndex};null!=e?.style&&(i.style=e.style);const o={},a=(e,t)=>{null!=t&&(i[e]=t)};switch(r){case"wms":case"wms-tiled":{const t=this.toOptionalString(e?.url),n=this.toOptionalString(e?.layers??e?.sublayers),i="wms-tiled"===r||this.toOptionalBoolean(e?.tiled);a("url",t),a("layers",n),void 0!==i&&a("tiled",i);const s=e?.params??e?.extraParams;Object.assign(o,this.cleanRecord({styles:e?.styles,format:e?.format,transparent:this.toOptionalBoolean(e?.transparent),tiled:i,version:e?.version,time:e?.time,params:s})??{});break}case"geojson":a("url",this.toOptionalString(e?.url)),Object.assign(o,this.cleanRecord({geojson:e?.geojson??e?.data,fillColor:e?.fillColor,fillOpacity:this.toOptionalNumber(e?.fillOpacity),strokeColor:e?.strokeColor,strokeWidth:this.toOptionalNumber(e?.strokeWidth),strokeOpacity:this.toOptionalNumber(e?.strokeOpacity),pointRadius:this.toOptionalNumber(e?.pointRadius),pointColor:e?.pointColor,iconUrl:e?.iconUrl,iconSize:e?.iconSize,textProperty:e?.textProperty,textColor:e?.textColor,textSize:this.toOptionalNumber(e?.textSize)})??{});break;case"xyz":a("url",this.toOptionalString(e?.url)),Object.assign(o,this.cleanRecord({attributions:e?.attributions,maxZoom:this.toOptionalNumber(e?.maxZoom),tileSize:this.toOptionalNumber(e?.tileSize),subdomains:this.toCsv(e?.subdomains)})??{});break;case"terrain":{const t=null!=e?.data&&"object"==typeof e.data?e.data:{};Object.assign(o,this.cleanRecord({elevationData:e?.elevationData??e?.url??t.elevationData,texture:e?.texture??t.texture,elevationDecoder:e?.elevationDecoder??t.elevationDecoder,wireframe:this.toOptionalBoolean(e?.wireframe??t.wireframe),color:e?.color??t.color,minZoom:this.toOptionalNumber(e?.minZoom??t.minZoom),maxZoom:this.toOptionalNumber(e?.maxZoom??t.maxZoom),meshMaxError:this.toOptionalNumber(e?.meshMaxError??t.meshMaxError)})??{});break}case"wfs":{const t=this.toOptionalString(e?.url);a("url",t),Object.assign(o,this.cleanRecord({url:t,typeName:e?.typeName??e?.layerName,version:e?.version,outputFormat:e?.outputFormat??e?.format,srsName:e?.srsName??e?.crs,params:e?.params})??{});break}case"wcs":{const t=this.toOptionalString(e?.url);a("url",t),Object.assign(o,this.cleanRecord({url:t,coverageName:e?.coverageName,format:e?.format,version:e?.version,projection:e?.projection,resolutions:e?.resolutions,params:e?.params})??{});break}case"google":Object.assign(o,this.cleanRecord({apiKey:e?.apiKey??e?.api_key,mapType:e?.mapType,language:e?.language,region:e?.region,scale:e?.scale,libraries:this.toCsv(e?.libraries),maxZoom:this.toOptionalNumber(e?.maxZoom),styles:e?.styles})??{});break;case"geotiff":case"osm":a("url",this.toOptionalString(e?.url));break;case"tile3d":a("url",this.toOptionalString(e?.url)),Object.assign(o,this.cleanRecord({tilesetOptions:e?.tilesetOptions??e?.options??e?.data,style:e?.style??e?.cesiumStyle})??{});break;case"scatterplot":Object.assign(o,this.cleanRecord({url:this.toOptionalString(e?.url),data:e?.data,getFillColor:e?.getFillColor,getRadius:this.toOptionalNumber(e?.getRadius)})??{});break;case"wkt":Object.assign(o,this.cleanRecord({wkt:e?.wkt,url:this.toOptionalString(e?.url),fillColor:e?.fillColor,fillOpacity:this.toOptionalNumber(e?.fillOpacity),strokeColor:e?.strokeColor,strokeWidth:this.toOptionalNumber(e?.strokeWidth),strokeOpacity:this.toOptionalNumber(e?.strokeOpacity),pointRadius:this.toOptionalNumber(e?.pointRadius),pointColor:e?.pointColor,iconUrl:e?.iconUrl,iconSize:e?.iconSize,textProperty:e?.textProperty,textColor:e?.textColor,textSize:this.toOptionalNumber(e?.textSize)})??{});break;default:{const t=e?.data&&"object"==typeof e.data?e.data:e;t&&"object"==typeof t&&Object.assign(o,this.cleanRecord(t)??{})}}return i.data=this.cleanRecord(o),i}normalize(e){const t=null!=e&&"object"==typeof e?e:{},n=null!=t.map&&"object"==typeof t.map?t.map:t;return{map:{flavour:String(n.flavour??"ol"),id:String(n.id??"map1"),zoom:Number(n.zoom??2),center:String(n.center??"0,0"),style:String(n.style??""),styles:this.normalizeStyles(n.styles),layerGroups:(Array.isArray(n.layerGroups)?n.layerGroups:[]).map(((e,t)=>({groupTitle:String(e.groupTitle??e.group??e.title??`Group ${t+1}`),basemapid:String(e.basemapid??""),visible:e.visible,layers:(Array.isArray(e.layers)?e.layers:[]).map(((e,n)=>this.normalizeLayer(e,t,n)))})))}}}normalizeStyles(e){return(Array.isArray(e)?e:e?[e]:[]).map(((e,t)=>this.normalizeStyle(e,t))).filter((e=>Boolean(e)))}normalizeStyle(e,t){if(null==e)return;const n="object"==typeof e&&null!==e?e:{content:e},r=n.key??n.id??n.name,o=String(null!=r?r:`style-${t+1}`),a=String(n.format??"sld").toLowerCase();let s;if(Array.isArray(n.layerTargets)){const e=n.layerTargets.map((e=>String(e).trim())).filter(Boolean);s=e.length?e.join(","):void 0}else if("string"==typeof n.layerTargets){const e=n.layerTargets.split(",").map((e=>e.trim())).filter(Boolean);s=e.length?e.join(","):void 0}const l=null==n.autoApply?void 0:"boolean"==typeof n.autoApply?n.autoApply:"false"!==String(n.autoApply).toLowerCase();let c=null!=n.src?String(n.src).trim():void 0;""===c&&(c=void 0);let u=null!=n.content?String(n.content):void 0;if(!c&&!u&&"string"==typeof n.source){const e=n.source.trim();e&&(/^(https?:)?\/\//.test(e)||e.startsWith("/")||e.startsWith("./")||e.startsWith("../")?c=e:u=e)}if(!c&&!u){if("string"!=typeof e)return void i(`${Ee}normalizeStyle: skipping style without src/content (key=${o})`);u=String(e)}return{key:o,format:a,src:c,content:u,layerTargets:s,autoApply:l,id:null!=n.id?String(n.id):void 0}}syncStyles(e,t){const n=Array.from(e.querySelectorAll('v-map-style[data-builder-style="true"]')),r=new Map;for(const e of n){const t=e.getAttribute("data-builder-style-id");t&&r.set(t,e)}const i=new Set,o=Array.from(e.children).find((e=>"v-map-style"!==e.tagName.toLowerCase()||"true"!==e.getAttribute("data-builder-style")));t.forEach(((t,n)=>{const a=t.key||`style-${n+1}`;let s=r.get(a);s&&s.parentElement===e?(s.setAttribute("data-builder-style","true"),s.setAttribute("data-builder-style-id",a)):(s=document.createElement("v-map-style"),s.setAttribute("data-builder-style","true"),s.setAttribute("data-builder-style-id",a)),i.add(a),this.ensureAttr(s,"format",t.format),this.ensureAttr(s,"layer-targets",t.layerTargets),s.autoApply=void 0===t.autoApply||t.autoApply,this.ensureAttr(s,"auto-apply",!0===t.autoApply?"":void 0),this.ensureAttr(s,"id",t.id),this.ensureAttr(s,"src",t.src),this.ensureAttr(s,"content",t.content);const l=o&&o.parentElement===e?o:null;s.isConnected&&s.parentElement===e?l&&e.insertBefore(s,l):e.insertBefore(s,l)}));for(const t of n){const n=t.getAttribute("data-builder-style-id")||"";i.has(n)||e.removeChild(t)}}ensureAttr(e,t,n){const r=null==n?void 0:String(n),i=e.getAttribute(t);null!=r?i!==r&&e.setAttribute(t,r):null!=i&&e.removeAttribute(t)}ensureGroup(e,t,n,r,i){let o=Array.from(e.children).find((e=>"v-map-layergroup"===e.tagName.toLowerCase()&&e.getAttribute("group-title")===t));return o||(o=document.createElement("v-map-layergroup"),o.setAttribute("group-title",t),e.insertBefore(o,(null!=i?e.children[i]:null)||null)),this.ensureAttr(o,"visible",r),n&&this.ensureAttr(o,"basemapid",n),o}toKebabCase(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}createLayerEl(e){const t=e.data||{},n={id:e.id,visible:e.visible,opacity:e.opacity,"z-index":e.zIndex,...e.style?{style:JSON.stringify(e.style)}:{}},r=(e,t,r)=>{if(null!=t)if(r?.json&&"string"!=typeof t)try{n[e]=JSON.stringify(t)}catch{n[e]=String(t)}else n[e]=t};let i;switch(e.type){case"osm":i=document.createElement("v-map-layer-osm");break;case"wms":case"wms-tiled":i=document.createElement("v-map-layer-wms"),r("url",e.url??t.url),r("layers",e.layers??t.layers),r("tiled","wms-tiled"===e.type||(t.tiled??e.tiled??void 0)),r("styles",t.styles),r("format",t.format),r("transparent",t.transparent),r("version",t.version),r("time",t.time),t.params&&r("params","string"==typeof t.params?t.params:JSON.stringify(t.params));break;case"geojson":{i=document.createElement("v-map-layer-geojson"),r("url",e.url??t.url);const n=t.geojson??t.data;void 0!==n&&r("geojson","string"==typeof n?n:JSON.stringify(n)),r("fill-color",t.fillColor),r("fill-opacity",t.fillOpacity),r("stroke-color",t.strokeColor),r("stroke-width",t.strokeWidth),r("stroke-opacity",t.strokeOpacity),r("point-radius",t.pointRadius),r("point-color",t.pointColor),r("icon-url",t.iconUrl),r("icon-size",t.iconSize),r("text-property",t.textProperty),r("text-color",t.textColor),r("text-size",t.textSize);break}case"xyz":i=document.createElement("v-map-layer-xyz"),r("url",e.url??t.url),r("attributions",t.attributions),r("max-zoom",t.maxZoom),r("tile-size",t.tileSize),r("subdomains",t.subdomains);break;case"terrain":i=document.createElement("v-map-layer-terrain"),r("elevation-data",t.elevationData),r("texture",t.texture),t.elevationDecoder&&r("elevation-decoder",t.elevationDecoder,{json:"string"!=typeof t.elevationDecoder}),r("wireframe",t.wireframe),t.color&&r("color",Array.isArray(t.color)?JSON.stringify(t.color):t.color),r("min-zoom",t.minZoom),r("max-zoom",t.maxZoom),r("mesh-max-error",t.meshMaxError);break;case"wfs":i=document.createElement("v-map-layer-wfs"),r("url",t.url??e.url),r("type-name",t.typeName),r("version",t.version),r("output-format",t.outputFormat),r("srs-name",t.srsName),t.params&&r("params","string"==typeof t.params?t.params:JSON.stringify(t.params));break;case"wcs":i=document.createElement("v-map-layer-wcs"),r("url",t.url??e.url),r("coverage-name",t.coverageName),r("format",t.format),r("version",t.version),r("projection",t.projection),t.resolutions&&r("resolutions","string"==typeof t.resolutions?t.resolutions:JSON.stringify(t.resolutions)),t.params&&r("params","string"==typeof t.params?t.params:JSON.stringify(t.params));break;case"google":i=document.createElement("v-map-layer-google"),r("api-key",t.apiKey),r("map-type",t.mapType),r("language",t.language),r("region",t.region),r("scale",t.scale),r("libraries",t.libraries),r("max-zoom",t.maxZoom),t.styles&&r("styles","string"==typeof t.styles?t.styles:JSON.stringify(t.styles));break;case"geotiff":i=document.createElement("v-map-layer-geotiff"),r("url",e.url??t.url);break;case"tile3d":i=document.createElement("v-map-layer-tile3d"),r("url",e.url??t.url),t.tilesetOptions&&r("tileset-options","string"==typeof t.tilesetOptions?t.tilesetOptions:JSON.stringify(t.tilesetOptions));break;case"scatterplot":i=document.createElement("v-map-layer-scatterplot"),r("url",t.url),t.data&&r("data","string"==typeof t.data?t.data:JSON.stringify(t.data)),r("get-fill-color",t.getFillColor),r("get-radius",t.getRadius);break;case"wkt":i=document.createElement("v-map-layer-wkt"),t.wkt&&r("wkt","string"==typeof t.wkt?t.wkt:JSON.stringify(t.wkt)),r("url",t.url),r("fill-color",t.fillColor),r("fill-opacity",t.fillOpacity),r("stroke-color",t.strokeColor),r("stroke-width",t.strokeWidth),r("stroke-opacity",t.strokeOpacity),r("point-radius",t.pointRadius),r("point-color",t.pointColor),r("icon-url",t.iconUrl),r("icon-size",t.iconSize),r("text-property",t.textProperty),r("text-color",t.textColor),r("text-size",t.textSize);break;default:if(i=document.createElement("v-map-layer-custom"),i.setAttribute("type",e.type),t&&"object"==typeof t)for(const[e,n]of Object.entries(t))r(this.toKebabCase(e),"object"==typeof n&&null!==n?JSON.stringify(n):n)}for(const[e,t]of Object.entries(n))this.ensureAttr(i,e,t);return i}patchLayer(e,t,n){for(const[r,i]of Object.entries(t)){const t=i.new;switch(r){case"visible":this.ensureAttr(e,"visible",t);break;case"opacity":this.ensureAttr(e,"opacity",t);break;case"zIndex":this.ensureAttr(e,"z-index",t);break;case"url":this.ensureAttr(e,"url",t);break;case"layers":this.ensureAttr(e,"layers",t);break;case"tiled":this.ensureAttr(e,"tiled",t);break;case"style":this.ensureAttr(e,"style",t?JSON.stringify(t):void 0);break;case"data":if(["terrain","wfs","wcs","wms","wms-tiled","geojson","xyz","google","tile3d","scatterplot","wkt"].includes(n.type)){const t=e.parentElement,r=this.createLayerEl(n);return void t.replaceChild(r,e)}if(e.setData?.(t),!e.setData){const n="object"==typeof t?JSON.stringify(t):t;this.ensureAttr(e,"data",n)}break;case"type":const r=e.parentElement,i=this.createLayerEl(n);return void r.replaceChild(i,e)}}}applyDiff(e,t){const n=this.hostEl;let r=Array.from(n.children).find((e=>"v-map"===e.tagName.toLowerCase()));r||(r=document.createElement("v-map"),n.appendChild(r)),this.ensureAttr(r,"flavour",t.map.flavour),this.ensureAttr(r,"id",t.map.id),this.ensureAttr(r,"zoom",String(t.map.zoom)),this.ensureAttr(r,"center",t.map.center),this.ensureAttr(r,"style",t.map.style),this.syncStyles(r,t.map.styles||[]);const i=new Set(t.map.layerGroups.map((e=>e.groupTitle)));Array.from(r.children).forEach((e=>{if("v-map-layergroup"!==e.tagName.toLowerCase())return;const t=e.getAttribute("group-title")||"";i.has(t)||r.removeChild(e)})),t.map.layerGroups.forEach(((e,t)=>{const n=this.ensureGroup(r,e.groupTitle,e.basemapid,e.visible,t),i=[];Array.from(n.children).forEach((e=>{const t=e.getAttribute("id")||"",n=e.tagName.toLowerCase().replace("v-map-layer-","");i.push({id:t,type:n})}));const{removed:o,updated:a,moved:s}=function(e,t){const n=new Map(e.map((e=>[e.id,e]))),r=new Map(t.map((e=>[e.id,e]))),i=[],o=[],a=[],s=[];for(const e of t){const t=n.get(e.id);if(!t){i.push(e);continue}const r=Ce(t,e);Object.keys(r).length?a.push({id:e.id,changes:r}):s.push(e.id)}for(const t of e)r.has(t.id)||o.push(t);const l=e.filter((e=>r.has(e.id))).map((e=>e.id)),c=t.filter((e=>n.has(e.id))).map((e=>e.id)),u=function(e,t){const n=e.length,r=t.length,i=Array.from({length:n+1},(()=>Array(r+1).fill(0)));for(let o=n-1;o>=0;o--)for(let n=r-1;n>=0;n--)i[o][n]=e[o]===t[n]?i[o+1][n+1]+1:Math.max(i[o+1][n],i[o][n+1]);const o=[];let a=0,s=0;for(;a<n&&s<r;)e[a]===t[s]?(o.push(e[a]),a++,s++):i[a+1][s]>=i[a][s+1]?a++:s++;return o}(l,c),f=new Set(u),p=[];for(const e of c)if(!f.has(e)&&!i.find((t=>t.id===e))){const t=l.indexOf(e),n=c.indexOf(e);-1!==t&&-1!==n&&p.push({id:e,from:t,to:n})}return{added:i,removed:o,updated:a,moved:p,unchangedIds:s}}(i,e.layers);for(const e of o){const t=Array.from(n.children).find((t=>t.getAttribute("id")===e.id));t&&n.removeChild(t)}for(const e of s){const t=Array.from(n.children).find((t=>t.getAttribute("id")===e.id));t&&n.insertBefore(t,n.children[e.to]||null)}for(const t of a){const r=Array.from(n.children).find((e=>e.getAttribute("id")===t.id));if(!r)continue;const i=e.layers.find((e=>e.id===t.id));this.patchLayer(r,t.changes,i)}e.layers.forEach(((e,t)=>{if(!Array.from(n.children).some((t=>t.getAttribute("id")===e.id))){const r=this.createLayerEl(e);n.insertBefore(r,n.children[t]||null)}}))}))}onSlotChange=()=>{i(Ee+"onSlotChange"),this.parseFromSlot()};render(){return i(Ee+o.COMPONENT_RENDER),r("div",{key:"0e041d9d068e0b31b1d1245888e8aa3668b22625",class:"root"},r("slot",{key:"0141bfb2be32531f9673bc8d0759943dd7ac63b1",name:"mapconfig",onSlotchange:this.onSlotChange}),r("slot",{key:"2df1c8fe43ea7ee4db3fc57875f0cec126b1fa97"}))}static get watchers(){return{mapconfig:[{onMapConfigChanged:0}]}}};Me.style=":host{display:block;height:100%}.root{height:100%}";export{Me as v_map_builder}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,g as t,h as i}from"./p-jzneDarq.js";const r=class{constructor(t){e(this,t)}for;get host(){return t(this)}layerGroups=[];observer;mapElement=null;async connectedCallback(){}async componentWillLoad(){this.findMapElement()}async disconnectedCallback(){this.observer?.disconnect()}findMapElement(){this.mapElement=document.getElementById(this.for),this.mapElement?(this.initObserver(),this.updateLayerGroupsFromDom()):setTimeout((()=>this.findMapElement()),100)}initObserver(){this.mapElement&&(this.observer=new MutationObserver((async()=>{this.updateLayerGroupsFromDom()})),this.observer.observe(this.mapElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["basemapid","visible","opacity","zindex"]}))}readBool(e,t,...i){if("boolean"==typeof e[t])return!!e[t];for(const t of i)if(e.hasAttribute(t))return!0;return!1}readNumber(e,t,i,...r){const a=e[t];if("number"==typeof a&&Number.isFinite(a))return a;for(const t of r){const i=e.getAttribute(t);if(null!=i&&""!==i){const e=Number(i);if(!Number.isNaN(e))return e}}return i}readString(e,t,i,...r){const a=e[t];if("string"==typeof a&&a.length)return a;for(const t of r){const i=e.getAttribute(t);if(i)return i}return i}updateLayerGroupsFromDom(){if(!this.mapElement)return;const e=Array.from(this.mapElement.querySelectorAll("v-map-layergroup"));this.layerGroups=e.map((e=>{let t=e.id;t||(t=`auto-${Math.random().toString(36).slice(2,9)}`,e.id=t);const i=this.readString(e,"label",t,"label"),r=e?.getAttribute("group-title")||void 0,a=this.readBool(e,"visible","visible"),s=e.getAttribute("basemapid");return{info:{element:e,id:t,visible:a,opacity:void 0,zIndex:void 0},label:i,groupTitle:r,basemapid:s,layers:this.getLayersFromDom(e)}})),this.layerGroups=this.cloneLayerGroups()}cloneLayerGroups(){return this.layerGroups.map((e=>({...e,info:{...e.info},layers:e.layers.map((e=>({...e,info:{...e.info}})))})))}getLayersFromDom(e){if(e)return Array.from(e.querySelectorAll("v-map-layer-wms, v-map-layer-osm, v-map-layer-geotiff, v-map-layer-geojson")).map((e=>{let t=e.id;t||(t=`auto-${Math.random().toString(36).slice(2,9)}`,e.id=t);const i=this.readString(e,"label",t,"label");return{info:{element:e,id:t,visible:this.readBool(e,"visible","visible"),opacity:this.readNumber(e,"opacity",1,"opacity"),zIndex:this.readNumber(e,"zIndex",0,"zindex")},label:i}}))}setBool(e,t,i,...r){e[t]=i;for(const t of r)i?e.setAttribute(t,""):e.removeAttribute(t)}setNumber(e,t,i,...r){e[t]=i;for(const t of r)e.setAttribute(t,String(i))}handleVisibilityChange(e,t){e.element&&(this.setBool(e.element,"visible",t,"visible"),e.visible=t,this.layerGroups=[...this.layerGroups])}handleOpacityChange(e,t){e.element&&(this.setNumber(e.element,"opacity",t,"opacity"),e.opacity=t,this.layerGroups=[...this.layerGroups])}handleZIndexChange(e,t){e.element&&(this.setNumber(e.element,"zIndex",t,"z-index","zindex"),e.zIndex=t,this.layerGroups=[...this.layerGroups])}handleBaseLayerChange(e,t){e.basemapid=t,e.info.element.setAttribute("basemapid",t),this.layerGroups=[...this.layerGroups]}render(){return 0===this.layerGroups.length?i("div",{class:"layer-control-empty"},"Keine Layer verfügbar"):i("div",{class:"layer-control"},this.layerGroups.map((e=>i("details",{key:e.info.id,class:"layer-group"},i("summary",{class:"layer-group-header"},i("input",{type:"checkbox",checked:e.info.visible,onChange:t=>{this.handleVisibilityChange(e.info,t.target.checked)},class:"layer-group-checkbox"}),i("span",{class:"layer-group-title"},e.groupTitle),null!==e.basemapid?i("select",{class:"basemap-selector",onChange:t=>this.handleBaseLayerChange(e,t.target.value)},e.layers.map((t=>i("option",{key:t.info.id,value:t.info.id,selected:e.basemapid===t.info.id},t.label)))):i("div",null)),i("div",{class:"layer-group-content"},e.layers.map((t=>i("div",{key:t.info.id,class:"layer-item"},i("label",{class:"layer-item-label",title:t.label},i("input",{name:`group-${e.info.id}`,type:"checkbox",checked:t.info.visible,onChange:e=>this.handleVisibilityChange(t.info,e.target.checked),class:"layer-item-checkbox"}),i("span",{class:"layer-item-title"},t.label)),i("div",{class:"layer-item-controls"},i("input",{type:"range",min:"0",max:"1",step:"0.1",value:String(t.info.opacity),onInput:e=>this.handleOpacityChange(t.info,parseFloat(e.target.value)),class:"layer-item-opacity","aria-label":`Opacity ${t.label}`}),i("input",{type:"number",min:"0",value:String(t.info.zIndex),onChange:e=>this.handleZIndexChange(t.info,parseInt(e.target.value,10)||0),class:"layer-item-zindex","aria-label":`Z-Index ${t.label}`}))))))))))}};r.style=".layer-control{background:white;padding:10px;border-radius:4px;box-shadow:0 2px 4px rgba(0, 0, 0, 0.1)}.layer-group{margin-bottom:10px;border:1px solid #eee;border-radius:4px}.layer-group summary{padding:5px;cursor:pointer;display:flex;align-items:center;gap:8px}.layer-item{margin:5px 0 5px 20px;display:flex;gap:8px;align-items:center}.layer-item input[type='range']{width:80px}.layer-item input[type='number']{width:40px}.layer-group-title{color:black}.layer-item-title{color:black}.layer-control button{background:#f0f0f0;border:1px solid #ccc;border-radius:3px;padding:2px 6px;margin-left:5px;cursor:pointer}.layer-control button:hover{background:#e0e0e0}.layer-group summary button{margin-left:auto}.layer-item button{margin-right:5px;color:#ff4444;border:none;background:none;font-size:1.2em;line-height:1;width:20px;height:20px;display:flex;align-items:center;justify-content:center}";export{r as v_map_layercontrol}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function t(t,e,n){const o="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==o;){const o=Object.getOwnPropertyDescriptor(t,e);if(o&&(!n||o.get))return o;t=Object.getPrototypeOf(t)}}var e,n=(e,n)=>{var o;Object.entries(null!=(o=n.o.t)?o:{}).map((([o,[l]])=>{if(31&l||32&l){const l=e[o],s=t(Object.getPrototypeOf(e),o,!0)||Object.getOwnPropertyDescriptor(e,o);s&&Object.defineProperty(e,o,{get(){return s.get.call(this)},set(t){s.set.call(this,t)},configurable:!0,enumerable:!0}),n.l.has(o)?e[o]=n.l.get(o):void 0!==l&&(e[o]=l)}}))},o=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},l=(t,e)=>{e&&(t.__stencil__getHostRef=()=>e,e.i=t,512&e.o.u&&n(t,e))},s=(t,e)=>e in t,i=(t,e)=>(0,console.error)(t,e),r=new Map,c=new Map,u="undefined"!=typeof window?window:{},a={u:0,p:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},f=t=>Promise.resolve(t),d=(()=>{try{return!!u.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),p=!!d&&(()=>!!u.document&&Object.getOwnPropertyDescriptor(u.document.adoptedStyleSheets,"length").writable)(),h=!1,m=[],v=[],y=(t,e)=>n=>{t.push(n),h||(h=!0,e&&4&a.u?w($):a.raf($))},b=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){i(t)}t.length=0},$=()=>{b(m),b(v),(h=m.length>0)&&a.raf($)},w=t=>f().then(t),g=y(v,!0);function j(){const t=this.attachShadow({mode:"open"});void 0===e&&(e=null),e&&(p?t.adoptedStyleSheets.push(e):t.adoptedStyleSheets=[...t.adoptedStyleSheets,e])}function S(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}var O,k=new WeakMap,E=t=>"sc-"+t.h,M=t=>"object"==(t=typeof t)||"function"===t,C=(t,e,...n)=>{let o=null,l=null,s=!1,i=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((s="function"!=typeof t&&!M(o))&&(o+=""),s&&i?r[r.length-1].m+=o:r.push(s?x(null,o):o),i=s)};if(c(n),e){e.key&&(l=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const u=x(t,null);return u.v=e,r.length>0&&(u.$=r),u.j=l,u},x=(t,e)=>({u:0,S:t,m:null!=e?e:null,O:null,$:null,v:null,j:null}),A={},L=(t,e)=>null==t||M(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&e?t+"":t,N=t=>{var e;return null==(e=o(t))?void 0:e.$hostElement$},P=(t,e,n)=>{const o=N(t);return{emit:t=>R(o,e,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:t})}},R=(t,e,n)=>{const o=a.ce(e,n);return t.dispatchEvent(o),o},D=(t,e,n,l,i,r)=>{if(n===l)return;let c=s(t,e),f=e.toLowerCase();if("class"===e){const e=t.classList,o=H(n);let s=H(l);e.remove(...o.filter((t=>t&&!s.includes(t)))),e.add(...s.filter((t=>t&&!o.includes(t))))}else if("key"===e);else if(c||"o"!==e[0]||"n"!==e[1]){if("a"===e[0]&&e.startsWith("attr:")){const n=e.slice(5);let s;{const e=o(t);if(e&&e.o&&e.o.t){const t=e.o.t[n];t&&t[1]&&(s=t[1])}}return s||(s=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==l||!1===l?!1===l&&""!==t.getAttribute(s)||t.removeAttribute(s):t.setAttribute(s,!0===l?"":l))}if("p"===e[0]&&e.startsWith("prop:")){const n=e.slice(5);try{t[n]=l}catch(t){}return}{const o=M(l);if((c||o&&null!==l)&&!i)try{if(t.tagName.includes("-"))t[e]!==l&&(t[e]=l);else{const o=null==l?"":l;"list"===e?c=!1:null!=n&&t[e]===o||("function"==typeof t.__lookupSetter__(e)?t[e]=o:t.setAttribute(e,o))}}catch(t){}null==l||!1===l?!1===l&&""!==t.getAttribute(e)||t.removeAttribute(e):(!c||4&r||i)&&!o&&1===t.nodeType&&t.setAttribute(e,l=!0===l?"":l)}}else if(e="-"===e[2]?e.slice(3):s(u,f)?f.slice(2):f[2]+e.slice(3),n||l){const o=e.endsWith(U);e=e.replace(W,""),n&&a.rel(t,e,n,o),l&&a.ael(t,e,l,o)}},T=/\s/,H=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(T):[]),U="Capture",W=RegExp(U+"$"),z=(t,e,n)=>{const o=11===e.O.nodeType&&e.O.host?e.O.host:e.O,l=t&&t.v||{},s=e.v||{};for(const t of F(Object.keys(l)))t in s||D(o,t,l[t],void 0,n,e.u);for(const t of F(Object.keys(s)))D(o,t,l[t],s[t],n,e.u)};function F(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var V=!1,q=!1,G=(t,e,n)=>{const o=e.$[n];let l,s,i=0;if(null!=o.m)l=o.O=u.document.createTextNode(o.m);else{if(!u.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(l=o.O=u.document.createElement(o.S),z(null,o,q),o.$){const e="template"===o.S?l.content:l;for(i=0;i<o.$.length;++i)s=G(t,o,i),s&&e.appendChild(s)}}return l["s-hn"]=O,l},Y=(t,e,n,o,l,s)=>{let i,r=t;for(r.shadowRoot&&r.tagName===O&&(r=r.shadowRoot),"template"===n.S&&(r=r.content);l<=s;++l)o[l]&&(i=G(null,n,l),i&&(o[l].O=i,I(r,i,e)))},Z=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.O;t&&t.remove()}}},_=(t,e,n=!1)=>t.S===e.S&&(n?(n&&!t.j&&e.j&&(t.j=e.j),!0):t.j===e.j),B=(t,e,n=!1)=>{const o=e.O=t.O,l=t.$,s=e.$,i=e.m;null==i?("slot"!==e.S||V||t.k!==e.k&&(e.O["s-sn"]=e.k||"",(t=>{a.u|=1;const e=t.closest(O.toLowerCase());if(null!=e){const n=Array.from(e.__childNodes||e.childNodes).find((t=>t["s-cr"])),o=Array.from(t.__childNodes||t.childNodes);for(const t of n?o.reverse():o)null!=t["s-sh"]&&(I(e,t,null!=n?n:null),t["s-sh"]=void 0)}a.u&=-2})(e.O.parentElement)),z(t,e,q),null!==l&&null!==s?((t,e,n,o,l=!1)=>{let s,i,r=0,c=0,u=0,a=0,f=e.length-1,d=e[0],p=e[f],h=o.length-1,m=o[0],v=o[h];const y="template"===n.S?t.content:t;for(;r<=f&&c<=h;)if(null==d)d=e[++r];else if(null==p)p=e[--f];else if(null==m)m=o[++c];else if(null==v)v=o[--h];else if(_(d,m,l))B(d,m,l),d=e[++r],m=o[++c];else if(_(p,v,l))B(p,v,l),p=e[--f],v=o[--h];else if(_(d,v,l))B(d,v,l),I(y,d.O,p.O.nextSibling),d=e[++r],v=o[--h];else if(_(p,m,l))B(p,m,l),I(y,p.O,d.O),p=e[--f],m=o[++c];else{for(u=-1,a=r;a<=f;++a)if(e[a]&&null!==e[a].j&&e[a].j===m.j){u=a;break}u>=0?(i=e[u],i.S!==m.S?s=G(e&&e[c],n,u):(B(i,m,l),e[u]=void 0,s=i.O),m=o[++c]):(s=G(e&&e[c],n,c),m=o[++c]),s&&I(d.O.parentNode,s,d.O)}r>f?Y(t,null==o[h+1]?null:o[h+1].O,n,o,c,h):c>h&&Z(e,r,f)})(o,l,e,s,n):null!==s?(null!==t.m&&(o.textContent=""),Y(o,null,e,s,0,s.length-1)):!n&&null!==l&&Z(l,0,l.length-1)):t.m!==i&&(o.data=i)},I=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),J=(t,e)=>{if(e&&!t.M&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.M=()=>{e["s-p"].splice(n-1,1),o()})))}},K=(t,e)=>{if(t.u|=16,4&t.u)return void(t.u|=512);J(t,t.C);const n=()=>Q(t,e);if(!e)return g(n);queueMicrotask((()=>{n()}))},Q=(t,e)=>{const n=t.$hostElement$,o=t.i;if(!o)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return e?(t.u|=256,t.A&&(t.A.map((([t,e])=>st(o,t,e,n))),t.A=void 0),t.L.length&&t.L.forEach((t=>t(n))),l=st(o,"componentWillLoad",void 0,n)):l=st(o,"componentWillUpdate",void 0,n),l=X(l,(()=>st(o,"componentWillRender",void 0,n))),X(l,(()=>et(t,o,e)))},X=(t,e)=>tt(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),tt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,et=async(t,e,n)=>{var o;const l=t.$hostElement$,s=l["s-rc"];n&&(t=>{const e=t.o,n=t.$hostElement$,o=e.u,l=((t,e)=>{var n,o,l;const s=E(e),i=c.get(s);if(!u.document)return s;if(t=11===t.nodeType?t:u.document,i)if("string"==typeof i){let l,r=k.get(t=t.head||t);if(r||k.set(t,r=new Set),!r.has(s)){l=u.document.createElement("style"),l.textContent=i;const c=null!=(n=a.N)?n:S(u.document);if(null!=c&&l.setAttribute("nonce",c),!(1&e.u))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(l,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(d){const e=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(i),p?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=i+e.textContent:t.prepend(l)}else t.append(l);1&e.u&&t.insertBefore(l,null),4&e.u&&(l.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),r&&r.add(s)}}else{let e=k.get(t);if(e||k.set(t,e=new Set),!e.has(s)){const n=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(i.constructor===n.CSSStyleSheet)o=i;else{o=new n.CSSStyleSheet;for(let t=0;t<i.cssRules.length;t++)o.insertRule(i.cssRules[t].cssText,t)}p?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],e.add(s)}}return s})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);nt(t,e,l,n),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>ot(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.u|=4,e.length=0)}},nt=(t,e,n,o)=>{try{e=e.render(),t.u&=-17,t.u|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.o,s=t.P||x(null,null),i=(t=>t&&t.S===A)(e)?e:C(null,null,e);if(O=o.tagName,l.R&&(i.v=i.v||{},l.R.forEach((([t,e])=>{i.v[e]=o[t]}))),n&&i.v)for(const t of Object.keys(i.v))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(i.v[t]=o[t]);i.S=null,i.u|=4,t.P=i,i.O=s.O=o.shadowRoot||o,V=!(!(1&l.u)||128&l.u),B(s,i,n)})(t,e,o)}catch(e){i(e,t.$hostElement$)}return null},ot=t=>{const e=t.$hostElement$,n=t.i,o=t.C;st(n,"componentDidRender",void 0,e),64&t.u?st(n,"componentDidUpdate",void 0,e):(t.u|=64,it(e),st(n,"componentDidLoad",void 0,e),t.D(e),o||lt()),t.T(e),t.M&&(t.M(),t.M=void 0),512&t.u&&w((()=>K(t,!1))),t.u&=-517},lt=()=>{w((()=>R(u,"appload",{detail:{namespace:"v-map"}})))},st=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){i(t,o)}},it=t=>t.classList.add("hydrated"),rt=(t,e,n,l)=>{const s=o(t);if(!s)return;if(!s)throw Error(`Couldn't find host element for "${l.h}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const r=s.$hostElement$,c=s.l.get(e),u=s.u,a=s.i;if(n=L(n,l.t[e][0]),!(8&u&&void 0!==c||n===c||Number.isNaN(c)&&Number.isNaN(n))){if(s.l.set(e,n),l.H){const t=l.H[e];t&&t.map((t=>{try{const[[o,l]]=Object.entries(t);(128&u||1&l)&&(a?a[o](n,c,e):s.L.push((()=>{s.i[o](n,c,e)})))}catch(t){i(t,r)}}))}if(2&u){if(a.componentShouldUpdate&&!1===a.componentShouldUpdate(n,c,e)&&!(16&u))return;16&u||K(s,!1)}}},ct=(e,n,l)=>{var s,i;const r=e.prototype;{e.watchers&&!n.H&&(n.H=e.watchers),e.deserializers&&!n.U&&(n.U=e.deserializers),e.serializers&&!n.W&&(n.W=e.serializers);const c=Object.entries(null!=(s=n.t)?s:{});if(c.map((([e,[s]])=>{if(31&s||2&l&&32&s){const{get:i,set:c}=t(r,e)||{};i&&(n.t[e][0]|=2048),c&&(n.t[e][0]|=4096),(1&l||!i)&&Object.defineProperty(r,e,{get(){{if(!(2048&n.t[e][0]))return((t,e)=>o(this).l.get(e))(0,e);const t=o(this),l=t?t.i:r;if(!l)return;return l[e]}},configurable:!0,enumerable:!0}),Object.defineProperty(r,e,{set(t){const i=o(this);if(i){if(c)return void 0===(32&s?this[e]:i.$hostElement$[e])&&i.l.get(e)&&(t=i.l.get(e)),c.call(this,L(t,s)),void rt(this,e,t=32&s?this[e]:i.$hostElement$[e],n);{if(!(1&l&&4096&n.t[e][0]))return rt(this,e,t,n),void(1&l&&!i.i&&i.L.push((()=>{4096&n.t[e][0]&&i.i[e]!==i.l.get(e)&&(i.i[e]=t)})));const o=()=>{const o=i.i[e];!i.l.get(e)&&o&&i.l.set(e,o),i.i[e]=L(t,s),rt(this,e,i.i[e],n)};i.i?o():i.L.push((()=>{o()}))}}}})}else 1&l&&64&s&&Object.defineProperty(r,e,{value(...t){var n;const l=o(this);return null==(n=null==l?void 0:l.F)?void 0:n.then((()=>{var n;return null==(n=l.i)?void 0:n[e](...t)}))}})})),1&l){const t=new Map;r.attributeChangedCallback=function(e,l,s){a.jmp((()=>{var i;const u=t.get(e),a=o(this);if(this.hasOwnProperty(u)&&(s=this[u],delete this[u]),r.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==s)return;if(null==u){const t=null==a?void 0:a.u;if(a&&t&&!(8&t)&&s!==l){const o=a.i,r=null==(i=n.H)?void 0:i[e];null==r||r.forEach((n=>{const[[i,r]]=Object.entries(n);null!=o[i]&&(128&t||1&r)&&o[i].call(o,s,l,e)}))}return}const f=c.find((([t])=>t===u));f&&4&f[1][0]&&(s=null!==s&&"false"!==s);const d=Object.getOwnPropertyDescriptor(r,u);s==this[u]||d.get&&!d.set||(this[u]=s)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(i=n.H)?i:{}),...c.filter((([t,e])=>31&e[0])).map((([e,o])=>{var l;const s=o[1]||e;return t.set(s,e),512&o[0]&&(null==(l=n.R)||l.push([e,s])),s}))]))}}return e},ut=(t,e)=>{st(t,"connectedCallback",void 0,e)},at=(t,e)=>{st(t,"disconnectedCallback",void 0,e||t)},ft=(t,e={})=>{var n;if(!u.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const l=[],s=e.exclude||[],f=u.customElements,p=u.document.head,h=p.querySelector("meta[charset]"),m=u.document.createElement("style"),v=[];let y,b=!0;if(Object.assign(a,e),a.p=new URL(e.resourcesUrl||"./",u.document.baseURI).href,t.map((t=>{t[1].map((e=>{var n,u,p;const h={u:e[0],h:e[1],t:e[2],V:e[3]};h.t=e[2],h.V=e[3],h.R=[],h.H=null!=(n=e[4])?n:{},h.W=null!=(u=e[5])?u:{},h.U=null!=(p=e[6])?p:{};const m=h.h,$=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){if(super(t),((t,e)=>{const n={u:0,$hostElement$:t,o:e,l:new Map,q:new Map};n.F=new Promise((t=>n.T=t)),n.G=new Promise((t=>n.D=t)),t["s-p"]=[],t["s-rc"]=[],n.L=[];const o=n;t.__stencil__getHostRef=()=>o})(t=this,h),1&h.u)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${h.h}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else j.call(t,h)}connectedCallback(){const t=o(this);t&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,dt(this,t,h.V)),y&&(clearTimeout(y),y=null),b?v.push(this):a.jmp((()=>(t=>{if(!(1&a.u)){const e=o(t);if(!e)return;const n=e.o,l=()=>{};if(1&e.u)dt(t,e,n.V),(null==e?void 0:e.i)?ut(e.i,t):(null==e?void 0:e.G)&&e.G.then((()=>ut(e.i,t)));else{e.u|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){J(e,e.C=n);break}}n.t&&Object.entries(n.t).map((([e,[n]])=>{if(31&n&&Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;try{if(!(32&e.u)){if(e.u|=32,n.Y){const l=((t,e)=>{const n=t.h.replace(/-/g,"_"),o=t.Y;if(!o)return;const l=r.get(o);return l?l[n]:import(`./${o}.entry.js`).then((t=>(r.set(o,t),t[n])),(t=>{i(t,e.$hostElement$)}))
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(l&&"then"in l){const t=()=>{};o=await l,t()}else o=l;if(!o)throw Error(`Constructor for "${n.h}#${e.Z}" was not found`);o.isProxied||(n.H=o.watchers,n.W=o.serializers,n.U=o.deserializers,ct(o,n,2),o.isProxied=!0);const s=()=>{};e.u|=8;try{new o(e)}catch(e){i(e,t)}e.u&=-9,e.u|=128,s(),ut(e.i,t)}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.u|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=E(n);if(!c.has(e)){const o=()=>{};((t,e,n)=>{let o=c.get(t);d&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,c.set(t,o)})(e,t,!!(1&n.u)),o()}}}const l=e.C,s=()=>K(e,!0);l&&l["s-rc"]?l["s-rc"].push(s):s()}catch(n){i(n,t),e.M&&(e.M(),e.M=void 0),e.D&&e.D(t)}})(t,e,n)}l()}})(this))))}disconnectedCallback(){a.jmp((()=>(async t=>{if(!(1&a.u)){const e=o(t);(null==e?void 0:e._)&&(e._.map((t=>t())),e._=void 0),(null==e?void 0:e.i)?at(e.i,t):(null==e?void 0:e.G)&&e.G.then((()=>at(e.i,t)))}k.has(t)&&k.delete(t),t.shadowRoot&&k.has(t.shadowRoot)&&k.delete(t.shadowRoot)})(this))),a.raf((()=>{var t;const e=o(this);if(!e)return;const n=v.findIndex((t=>t===this));n>-1&&v.splice(n,1),(null==(t=null==e?void 0:e.P)?void 0:t.O)instanceof Node&&!e.P.O.isConnected&&delete e.P.O}))}componentOnReady(){var t;return null==(t=o(this))?void 0:t.G}};h.Y=t[0],s.includes(m)||f.get(m)||(l.push(m),f.define(m,ct($,h,1)))}))})),l.length>0&&(m.textContent+=l.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",m.innerHTML.length)){m.setAttribute("data-styles","");const t=null!=(n=a.N)?n:S(u.document);null!=t&&m.setAttribute("nonce",t),p.insertBefore(m,h?h.nextSibling:p.firstChild)}b=!1,v.length?v.map((t=>t.connectedCallback())):a.jmp((()=>y=setTimeout(lt,30)))},dt=(t,e,n)=>{n&&u.document&&n.map((([n,o,l])=>{const s=ht(u.document,t,n),i=pt(e,l),r=mt(n);a.ael(s,o,i,r),(e._=e._||[]).push((()=>a.rel(s,o,i,r)))}))},pt=(t,e)=>n=>{var o;try{256&t.u?null==(o=t.i)||o[e](n):(t.A=t.A||[]).push([e,n])}catch(e){i(e,t.$hostElement$)}},ht=(t,e,n)=>4&n?t:e,mt=t=>({passive:!!(1&t),capture:!!(2&t)}),vt=t=>a.N=t;export{ft as b,P as c,N as g,C as h,f as p,l as r,vt as s}
|