@map-colonies/react-components 4.4.1 → 4.5.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.
@@ -1,54 +1,56 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('body[dir=rtl] .drpOpener .mdc-text-field{direction:ltr}body[dir=rtl] .drpContainer .MuiInputLabel-formControl{right:0px;left:unset}body[dir=rtl] .drpContainer .MuiInputBase-input{direction:ltr;text-align:end}.map{height:100%;width:100%}.ol-mouse-position{top:auto!important;right:auto!important;bottom:8px;left:8px;background-color:#fff;opacity:.7;font-size:12px;padding:2px;border-radius:2px}.ol-zoom{top:2.5em;right:.5em;left:unset}.trackerPosition{background-color:var(--mdc-theme-surface);z-index:2000;padding:2px;border-radius:2px;font-size:12px;height:24px;text-align:center;line-height:20px;white-space:nowrap}.scalePosition{background-color:var(--mdc-theme-surface);padding:1px;border-radius:2px;font-size:12px;width:110px}.distance-legend-label{text-align:center}.distance-legend-scale-bar{background:var(--mdc-theme-on-surface);margin:0 auto;display:block;transition:all .5s ease-in-out}.zoomLevel{z-index:2000;background-color:var(--mdc-theme-surface);border-radius:2px;padding:2px;height:24px}.zoomLevelValue{margin:2px;font-size:14px;line-height:10px;text-align:center}.zoomLevelLabel{font-size:8px;line-height:8px}.mapViewIcon{fill:#fff;width:40px;height:40px;background:#303336;border:1px solid #444;border-radius:4px}.mapViewIcon:hover{background:#48b;border-color:#aef}.mapViewCurrent{fill:#aef;border:1px solid #aef;border-radius:4px}.mapSelector{width:260px;list-style:none;padding-left:0;display:flex;flex-wrap:wrap;grid-gap:4px;min-height:140px;margin-block-start:0px;padding-inline-start:0px}.mapContainerSelected{border:blueviolet 2px solid!important;border-radius:2px}.mapContainer:hover{border:tomato 2px solid;border-radius:2px}.mapContainerImg{width:100%;height:100%}.mapLabel{font-size:12px}.mapLabel:before{content:"\\a0"}.mapScenesContainer{display:flex;gap:8px}.settingsIconContainer,.mapLegendToggleContainer{fill:#fff;width:40px;height:40px;background:#303336;border:1px solid #444;border-radius:4px}.settingsIconContainer:hover,.mapLegendToggleContainer:hover{background:#48b;border-color:#aef}.baseMapsContainer{margin-top:12px;min-height:58%}.settingsDialogPortal{transform:translateZ(0);height:calc(100vh - 220px);max-height:460px;width:280px;position:absolute;top:40px;right:80px}.settingsDialogPortal .mdc-dialog__container{align-items:unset}.settingsDialogPortal .mdc-dialog .mdc-dialog__surface{max-height:unset}body[dir=rtl] .settingsDialogPortal{left:80px;right:unset}.sectionLabel{margin-block-end:.5em}.mapLegendSidebarContainer{width:340px;height:100%;position:relative;overflow-y:auto;overflow-x:hidden;font-size:16px}.mapLegendSidebarContainer.mdc-drawer--animate{transform:translate(0)!important;transition:none!important}.mapLegendSidebarContainer.mdc-drawer--dismissible{position:relative}div.MuiPaper-root{transition:none!important}.mapLegendCloseBtn{position:absolute;top:0;right:0;cursor:pointer;width:50px;height:50px;padding:20px;font-size:24px}body[dir=rtl] .mapLegendCloseBtn{right:unset;left:0}.mapLegendToggleContainer{display:flex;align-items:center;justify-content:center}.mapLegendIcon{width:2rem;height:2rem;transform:translate(8%,8%)}.sidebarHeaderContainer{text-align:center;margin-top:40px}.sidebarTitle{font-size:1.5rem;font-weight:700}.mapLegend{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:10px 14px}.layerNameContainer{width:90%;display:flex;justify-content:center;align-items:center}.layerName{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.legendImg{width:90%;height:150px;border:1px solid black;border-radius:5px;object-fit:cover;cursor:pointer}.legendActionsContainer{display:flex;flex-direction:row;align-self:center}.legendAction:not(:last-child):after{content:"|";margin:0 4px}.mapLegendsList{display:flex;flex-direction:column;padding:20px 0;width:100%;height:90%}.legendAction{text-decoration:underline;cursor:pointer;font-size:1.1rem;transition:all .1s ease-in-out;width:max-content}.legendAction:hover{filter:brightness(1.2)}.noLegendsContainer{width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center}.noLegendsMsg{text-align:center}.cesium-widget-credits{display:none!important}.cesium-viewer-fullscreenContainer{bottom:8px;right:8px;left:unset}body[dir=rtl] .cesium-viewer-fullscreenContainer{left:8px;right:unset}body[dir=rtl] .cesium-viewer-toolbar{left:5px;right:unset}.cesium-button.cesium-fullscreenButton{border-radius:14%}.toolsContainer{color:var(--mdc-theme-on-surface);display:flex;gap:8px;z-index:2000;position:absolute;bottom:12px;right:40px;opacity:.7}body[dir=rtl] .toolsContainer{left:40px;right:unset}.sideToolsContainer{display:flex;flex-direction:row;gap:8px;z-index:2000;position:absolute;top:12px;right:40px}body[dir=rtl] .sideToolsContainer{left:40px;right:unset}.viewer{display:flex;flex-direction:row}.viewer .mdc-linear-progress__bar-inner{border-top-width:10px}.twipsy{display:block;position:absolute;visibility:visible;max-width:200px;min-width:100px;padding:5px;font-size:11px;z-index:1000;opacity:.8;-khtml-opacity:.8;-moz-opacity:.8;filter:alpha(opacity=80)}.twipsy.left .twipsy-arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000}.twipsy.right .twipsy-arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #000000}.twipsy-inner{padding:3px 8px;background-color:#000;color:#fff;text-align:center;max-width:200px;text-decoration:none;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.twipsy-arrow{position:absolute;width:0;height:0}.toolbar{margin:0;padding:0;background:white}.toolbar>.button{margin:5px;padding:5px;border:1px solid #eee;cursor:pointer}.toolbar>.button:hover{background:#eee}.infoWindow{position:absolute;min-width:100px;max-width:300px}.infoWindow #frame{padding:10px;border:1px solid black;background:white}.infoWindow #close{float:right;margin:5px 2px;font-size:small;color:gray;cursor:pointer}.infoWindow #arrow{position:absolute;bottom:-8px;left:50%;margin-left:-10px;border-right:10px solid transparent;border-left:10px solid transparent;border-top:10px solid white}.react-autocomplete-input{background-clip:padding-box;background-color:#fff;bottom:auto;box-shadow:0 6px 12px #0000002d;display:block;font-size:14px;list-style:none;padding:1px;position:absolute;z-index:20000;margin-block-start:unset;margin-block-end:unset}.react-autocomplete-input>li{cursor:pointer;padding:10px;min-width:100px}.react-autocomplete-input>li.active{background-color:#337ab7;color:#fff}body[dir=rtl] .chonky-fileListWrapper [class^=listContainer-]{direction:rtl!important}body[dir=rtl] .chonky-fileEntryClickableWrapper [class^=listFileEntryProperty-],body[dir=rtl] .chonky-navbarContainer{direction:ltr!important}body[dir=rtl] .chonky-chonkyRoot{text-align:right}body[dir=rtl] .chonky-infoText{margin-left:unset;margin-right:12px}body[dir=rtl] .chonky-contextMenuList .MuiListItemText-root,body[dir=rtl] .chonky-dropdownList .MuiListItemText-root{text-align:right}body[dir=rtl] .chonky-icon{margin-right:unset;margin-left:8px}.chonky-chonkyRoot div[class^=folderBackSide]{box-shadow:unset}.chonky-chonkyRoot div[class^=folderBackSide]:after{border-color:var(--fp-theme-background, #fff) var(--fp-theme-background, #fff) transparent transparent}.chonky-chonkyRoot div[class^=listFileEntryIcon-]{color:#d5d5d5}.chonky-chonkyRoot div[class*=previewFile-d]{background-color:#d5d5d5}.chonky-chonkyRoot div[class^=selectionIndicator-]{background:var(--fp-theme-selection-background, #455570)}.chonky-chonkyRoot{background-color:var(--fp-theme-background, #fff)!important}.chonky-contextMenuList{background-color:var(--fp-theme-surface, #fff)!important}button[class*=chonky-activeButton],.chonky-selectionSizeText{color:var(--fp-theme-primary, #24aee9)!important}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
- var an = Object.defineProperty;
3
- var ln = (e, n, t) => n in e ? an(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
4
- var Z = (e, n, t) => (ln(e, typeof n != "symbol" ? n + "" : n, t), t);
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('body[dir=rtl] .drpOpener .mdc-text-field{direction:ltr}body[dir=rtl] .drpContainer .MuiInputLabel-formControl{right:0px;left:unset}body[dir=rtl] .drpContainer .MuiInputBase-input{direction:ltr;text-align:end}.map{height:100%;width:100%}.ol-mouse-position{top:auto!important;right:auto!important;bottom:8px;left:8px;background-color:#fff;opacity:.7;font-size:12px;padding:2px;border-radius:2px}.ol-zoom{top:2.5em;right:.5em;left:unset}.trackerPosition{background-color:var(--mdc-theme-surface);z-index:2000;padding:2px;border-radius:2px;font-size:12px;height:24px;text-align:center;line-height:20px;white-space:nowrap}.scalePosition{background-color:var(--mdc-theme-surface);padding:1px;border-radius:2px;font-size:12px;width:110px}.scale-tracker-label{text-align:center}.scale-tracker-bar{background:var(--mdc-theme-on-surface);margin:0 auto;display:block;transition:all .5s ease-in-out}.zoomLevel{z-index:2000;background-color:var(--mdc-theme-surface);border-radius:2px;padding:2px;height:24px}.zoomLevelValue{margin:2px;font-size:14px;line-height:10px;text-align:center}.zoomLevelLabel{font-size:8px;line-height:8px}.mapViewIcon{fill:#fff;width:40px;height:40px;background:#303336;border:1px solid #444;border-radius:4px}.mapViewIcon:hover{background:#48b;border-color:#aef}.mapViewCurrent{fill:#aef;border:1px solid #aef;border-radius:4px}.mapSelector{width:260px;list-style:none;padding-left:0;display:flex;flex-wrap:wrap;grid-gap:4px;min-height:140px;margin-block-start:0px;padding-inline-start:0px}.mapContainerSelected{border:blueviolet 2px solid!important;border-radius:2px}.mapContainer:hover{border:tomato 2px solid;border-radius:2px}.mapContainerImg{width:100%;height:100%}.mapLabel{font-size:12px}.mapLabel:before{content:"\\a0"}.mapScenesContainer{display:flex;gap:8px}.settingsIconContainer,.mapLegendToggleContainer{fill:#fff;width:40px;height:40px;background:#303336;border:1px solid #444;border-radius:4px}.settingsIconContainer:hover,.mapLegendToggleContainer:hover{background:#48b;border-color:#aef}.baseMapsContainer{margin-top:12px;min-height:58%}.settingsDialogPortal{transform:translateZ(0);height:calc(100vh - 220px);max-height:460px;width:280px;position:absolute;top:40px;right:80px}.settingsDialogPortal .mdc-dialog__container{align-items:unset}.settingsDialogPortal .mdc-dialog .mdc-dialog__surface{max-height:unset}body[dir=rtl] .settingsDialogPortal{left:80px;right:unset}.sectionLabel{margin-block-end:.5em}.mapLegendSidebarContainer{width:340px;height:100%;position:relative;overflow-y:auto;overflow-x:hidden;font-size:16px}.mapLegendSidebarContainer.mdc-drawer--animate{transform:translate(0)!important;transition:none!important}.mapLegendSidebarContainer.mdc-drawer--dismissible{position:relative}div.MuiPaper-root{transition:none!important}.mapLegendCloseBtn{position:absolute;top:0;right:0;cursor:pointer;width:50px;height:50px;padding:20px;font-size:24px}body[dir=rtl] .mapLegendCloseBtn{right:unset;left:0}.mapLegendToggleContainer{display:flex;align-items:center;justify-content:center}.mapLegendIcon{width:2rem;height:2rem;transform:translate(8%,8%)}.sidebarHeaderContainer{text-align:center;margin-top:40px}.sidebarTitle{font-size:1.5rem;font-weight:700}.mapLegend{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:10px 14px}.layerNameContainer{width:90%;display:flex;justify-content:center;align-items:center}.layerName{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.legendImg{width:90%;height:150px;border:1px solid black;border-radius:5px;object-fit:cover;cursor:pointer}.legendActionsContainer{display:flex;flex-direction:row;align-self:center}.legendAction:not(:last-child):after{content:"|";margin:0 4px}.mapLegendsList{display:flex;flex-direction:column;padding:20px 0;width:100%;height:90%}.legendAction{text-decoration:underline;cursor:pointer;font-size:1.1rem;transition:all .1s ease-in-out;width:max-content}.legendAction:hover{filter:brightness(1.2)}.noLegendsContainer{width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center}.noLegendsMsg{text-align:center}.cesium-widget-credits{display:none!important}.cesium-viewer-fullscreenContainer{bottom:8px;right:8px;left:unset}body[dir=rtl] .cesium-viewer-fullscreenContainer{left:8px;right:unset}body[dir=rtl] .cesium-viewer-toolbar{left:5px;right:unset}.cesium-button.cesium-fullscreenButton{border-radius:14%}.toolsContainer{color:var(--mdc-theme-on-surface);display:flex;gap:8px;z-index:2000;position:absolute;bottom:12px;right:40px;opacity:.7}body[dir=rtl] .toolsContainer{left:40px;right:unset}.sideToolsContainer{display:flex;flex-direction:row;gap:8px;z-index:2000;position:absolute;top:12px;right:40px}body[dir=rtl] .sideToolsContainer{left:40px;right:unset}.viewer{display:flex;flex-direction:row}.viewer .mdc-linear-progress__bar-inner{border-top-width:10px}.compass.rtl{right:unset;left:20px}.compass.ltr{left:unset;right:20px}.twipsy{display:block;position:absolute;visibility:visible;max-width:200px;min-width:100px;padding:5px;font-size:11px;z-index:1000;opacity:.8;-khtml-opacity:.8;-moz-opacity:.8;filter:alpha(opacity=80)}.twipsy.left .twipsy-arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000}.twipsy.right .twipsy-arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #000000}.twipsy-inner{padding:3px 8px;background-color:#000;color:#fff;text-align:center;max-width:200px;text-decoration:none;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.twipsy-arrow{position:absolute;width:0;height:0}.toolbar{margin:0;padding:0;background:white}.toolbar>.button{margin:5px;padding:5px;border:1px solid #eee;cursor:pointer}.toolbar>.button:hover{background:#eee}.infoWindow{position:absolute;min-width:100px;max-width:300px}.infoWindow #frame{padding:10px;border:1px solid black;background:white}.infoWindow #close{float:right;margin:5px 2px;font-size:small;color:gray;cursor:pointer}.infoWindow #arrow{position:absolute;bottom:-8px;left:50%;margin-left:-10px;border-right:10px solid transparent;border-left:10px solid transparent;border-top:10px solid white}.react-autocomplete-input{background-clip:padding-box;background-color:#fff;bottom:auto;box-shadow:0 6px 12px #0000002d;display:block;font-size:14px;list-style:none;padding:1px;position:absolute;z-index:20000;margin-block-start:unset;margin-block-end:unset}.react-autocomplete-input>li{cursor:pointer;padding:10px;min-width:100px}.react-autocomplete-input>li.active{background-color:#337ab7;color:#fff}body[dir=rtl] .chonky-fileListWrapper [class^=listContainer-]{direction:rtl!important}body[dir=rtl] .chonky-fileEntryClickableWrapper [class^=listFileEntryProperty-],body[dir=rtl] .chonky-navbarContainer{direction:ltr!important}body[dir=rtl] .chonky-chonkyRoot{text-align:right}body[dir=rtl] .chonky-infoText{margin-left:unset;margin-right:12px}body[dir=rtl] .chonky-contextMenuList .MuiListItemText-root,body[dir=rtl] .chonky-dropdownList .MuiListItemText-root{text-align:right}body[dir=rtl] .chonky-icon{margin-right:unset;margin-left:8px}.chonky-chonkyRoot div[class^=folderBackSide]{box-shadow:unset}.chonky-chonkyRoot div[class^=folderBackSide]:after{border-color:var(--fp-theme-background, #fff) var(--fp-theme-background, #fff) transparent transparent}.chonky-chonkyRoot div[class^=listFileEntryIcon-]{color:#d5d5d5}.chonky-chonkyRoot div[class*=previewFile-d]{background-color:#d5d5d5}.chonky-chonkyRoot div[class^=selectionIndicator-]{background:var(--fp-theme-selection-background, #455570)}.chonky-chonkyRoot{background-color:var(--fp-theme-background, #fff)!important}.chonky-contextMenuList{background-color:var(--fp-theme-surface, #fff)!important}button[class*=chonky-activeButton],.chonky-selectionSizeText{color:var(--fp-theme-primary, #24aee9)!important}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
+ var cn = Object.defineProperty;
3
+ var dn = (e, n, t) => n in e ? cn(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
4
+ var X = (e, n, t) => (dn(e, typeof n != "symbol" ? n + "" : n, t), t);
5
5
  import { jsx as l, jsxs as N, Fragment as te } from "react/jsx-runtime";
6
- import * as Ot from "react";
7
- import ve, { useState as A, useEffect as I, useMemo as $e, forwardRef as cn, createContext as Ie, useRef as be, useContext as xe, useCallback as me, useLayoutEffect as dn } from "react";
8
- import { isValid as _e, isBefore as un, format as pt, endOfDay as hn, isSameDay as gt } from "date-fns";
9
- import { he as Rt, enUS as Nt } from "date-fns/locale";
10
- import { MuiPickersUtilsProvider as Bt, KeyboardDateTimePicker as Qe, KeyboardDatePicker as mn } from "@material-ui/pickers";
11
- import Ft from "@date-io/date-fns";
12
- import { createTheme as pn, makeStyles as ke, createStyles as We } from "@material-ui/core/styles";
13
- import { Box as gn, ThemeProvider as Ht, Popover as fn, Paper as et, TableRow as He, TableCell as Me, TableSortLabel as yn, IconButton as vn, Collapse as En, TableContainer as Cn, Table as wn, TableBody as bn, Typography as Tn, TablePagination as _n } from "@material-ui/core";
14
- import { useTheme as Gt, ThemeProvider as Ln, Button as Ae, TextField as Ge, Tooltip as tt, Menu as Sn, MenuItem as je, Icon as Pe, Dialog as Mn, DialogTitle as Pn, DialogContent as Dn, Drawer as An, DrawerHeader as In, DrawerTitle as xn, DrawerContent as kn, LinearProgress as On } from "@map-colonies/react-core";
15
- import { default as js } from "@material-ui/core/useMediaQuery";
16
- import Rn, { registerLocale as Nn } from "react-datepicker";
17
- import Bn from "date-fns/locale/he";
18
- import Le from "moment";
19
- import Fn from "@turf/rewind";
20
- import { Map as Hn, View as Gn } from "ol";
6
+ import * as Rt from "react";
7
+ import Ee, { useState as I, useEffect as x, useMemo as ke, forwardRef as un, createContext as Oe, useRef as _e, useContext as Re, useCallback as me, useLayoutEffect as hn } from "react";
8
+ import { isValid as Se, isBefore as mn, format as yt, endOfDay as pn, isSameDay as vt } from "date-fns";
9
+ import { he as Nt, enUS as Bt } from "date-fns/locale";
10
+ import { MuiPickersUtilsProvider as Ft, KeyboardDateTimePicker as et, KeyboardDatePicker as gn } from "@material-ui/pickers";
11
+ import Ht from "@date-io/date-fns";
12
+ import { createTheme as fn, makeStyles as Ne, createStyles as Ue } from "@material-ui/core/styles";
13
+ import { Box as yn, ThemeProvider as Gt, Popover as vn, Paper as tt, TableRow as Ve, TableCell as De, TableSortLabel as En, IconButton as Cn, Collapse as wn, TableContainer as bn, Table as Tn, TableBody as _n, Typography as Ln, TablePagination as Sn } from "@material-ui/core";
14
+ import { useTheme as Vt, ThemeProvider as Mn, Button as Ae, TextField as ze, Tooltip as nt, Menu as Pn, MenuItem as qe, Icon as Ie, Dialog as Dn, DialogTitle as In, DialogContent as xn, Drawer as An, DrawerHeader as kn, DrawerTitle as On, DrawerContent as Rn, LinearProgress as Nn } from "@map-colonies/react-core";
15
+ import { default as Qs } from "@material-ui/core/useMediaQuery";
16
+ import Bn, { registerLocale as Fn } from "react-datepicker";
17
+ import Hn from "date-fns/locale/he";
18
+ import Me from "moment";
19
+ import Gn from "@turf/rewind";
20
+ import { Map as Vn, View as zn } from "ol";
21
21
  import "ol/ol.css";
22
- import { format as ft } from "ol/coordinate";
23
- import { defaults as Vn, FullScreen as yt } from "ol/control";
24
- import qe from "ol/control/MousePosition";
25
- import { transform as zn } from "ol/proj";
26
- import { Tile as $n, Vector as Wn } from "ol/layer";
27
- import { Vector as Un, OSM as Kn } from "ol/source";
28
- import { GeoJSON as Vt } from "ol/format";
29
- import { Draw as jn } from "ol/interaction";
30
- import { createBox as qn } from "ol/interaction/Draw";
31
- import Yn from "@material-ui/core/TableHead";
32
- import { createSvgIcon as zt } from "@material-ui/core/utils";
33
- import Xn from "@material-ui/core/CssBaseline";
34
- import Zn from "@material-ui/core/ScopedCssBaseline";
35
- import { createPortal as Jn } from "react-dom";
36
- import { Viewer as Qn, Cesium3DTileset as ei, GeoJsonDataSource as ti, ImageryLayer as ni, Entity as ii, EntityDescription as $t, PolygonGraphics as ri, RectangleGraphics as oi, CustomDataSource as si, PolylineGraphics as ai } from "resium";
22
+ import { format as Et } from "ol/coordinate";
23
+ import { defaults as $n, FullScreen as Ct } from "ol/control";
24
+ import Ye from "ol/control/MousePosition";
25
+ import { transform as Wn } from "ol/proj";
26
+ import { Tile as Un, Vector as Kn } from "ol/layer";
27
+ import { Vector as jn, OSM as qn } from "ol/source";
28
+ import { GeoJSON as zt } from "ol/format";
29
+ import { Draw as Yn } from "ol/interaction";
30
+ import { createBox as Xn } from "ol/interaction/Draw";
31
+ import Zn from "@material-ui/core/TableHead";
32
+ import { createSvgIcon as $t } from "@material-ui/core/utils";
33
+ import Jn from "@material-ui/core/CssBaseline";
34
+ import Qn from "@material-ui/core/ScopedCssBaseline";
35
+ import { createPortal as ei } from "react-dom";
36
+ import { Viewer as ti, Cesium3DTileset as ni, GeoJsonDataSource as ii, ImageryLayer as ri, Entity as oi, EntityDescription as Wt, PolygonGraphics as si, RectangleGraphics as ai, CustomDataSource as li, PolylineGraphics as ci } from "resium";
37
37
  import * as p from "cesium";
38
- import { ScreenSpaceEventType as li, Cartesian3 as pe, Math as ce, WebMercatorProjection as ci, SceneMode as we, Cartesian2 as Ee, Cartographic as Oe, EventHelper as di, EllipsoidGeodesic as ui, UrlTemplateImageryProvider as lt, WebMapServiceImageryProvider as ct, WebMapTileServiceImageryProvider as dt, Event as hi, SingleTileImageryProvider as mi, Rectangle as Se, Viewer as pi, Matrix4 as gi, OpenStreetMapImageryProvider as fi, Color as nt, PolygonHierarchy as yi, PolylineDashMaterialProperty as vi, ConstantProperty as Ei, ConstantPositionProperty as Ci, BoundingSphere as wi, Ellipsoid as Wt, GeographicTilingScheme as bi, Resource as Ti, EllipsoidTerrainProvider as _i, CesiumTerrainProvider as Li, VerticalOrigin as it, LabelStyle as Ut, viewerCesiumInspectorMixin as Si, sampleTerrainMostDetailed as Mi } from "cesium";
39
- import { Math as Ys, sampleTerrainMostDetailed as Xs } from "cesium";
40
- import { get as ee, isNumber as Ve, isEmpty as rt, isArray as Pi, find as vt } from "lodash";
41
- import Di from "@turf/boolean-point-in-polygon";
38
+ import { Math as ge, SceneMode as Te, Cartesian2 as Ce, Cartographic as Be, PolylineDashMaterialProperty as di, ConstantProperty as ui, ConstantPositionProperty as hi, Cartesian3 as ve, BoundingSphere as mi, Ellipsoid as Ut, GeographicTilingScheme as pi, Rectangle as Pe, Resource as gi, EllipsoidTerrainProvider as fi, CesiumTerrainProvider as yi, VerticalOrigin as it, LabelStyle as Kt, ScreenSpaceEventType as vi, WebMercatorProjection as Ei, EventHelper as Ci, EllipsoidGeodesic as wi, UrlTemplateImageryProvider as ct, WebMapServiceImageryProvider as dt, WebMapTileServiceImageryProvider as ut, Event as bi, SingleTileImageryProvider as Ti, Viewer as _i, Matrix4 as Li, OpenStreetMapImageryProvider as Si, Color as rt, PolygonHierarchy as Mi, viewerCesiumInspectorMixin as Pi, sampleTerrainMostDetailed as Di } from "cesium";
39
+ import { Math as ta, sampleTerrainMostDetailed as na } from "cesium";
40
+ import { get as Z, isNumber as $e, isEmpty as ot, isArray as Ii, cloneDeep as xi, find as wt } from "lodash";
41
+ import Ai from "@turf/boolean-point-in-polygon";
42
42
  import "@map-colonies/react-core/dist/linear-progress/styles";
43
- import * as Kt from "@turf/helpers";
44
- import jt from "@turf/bbox";
45
- import qt from "@turf/bbox-polygon";
46
- import Ai from "textarea-caret";
47
- import Ii, { setCaretPosition as xi } from "get-input-selection";
48
- import { ChonkyActions as G, FileHelper as Yt, setChonkyDefaults as ki, FullFileBrowser as Oi } from "chonky";
49
- import { ChonkyIconFA as Ri } from "chonky-icon-fontawesome";
50
- import Ni from "filesize";
51
- var se = /* @__PURE__ */ ((e) => (e.BOX = "BOX", e.POLYGON = "POLYGON", e.UNKNOWN = "UNKNOWN", e))(se || {}), de = /* @__PURE__ */ ((e) => (e.HE = "he", e.EN = "en", e.RU = "ru", e))(de || {}), ot = /* @__PURE__ */ ((e) => (e.TOP_RIGHT = "TOP_RIGHT", e.BOTTOM_LEFT = "BOTTOM_LEFT", e))(ot || {});
43
+ import ki from "@cmcleese/cesium-navigation";
44
+ import "@cmcleese/cesium-navigation/dist/index.css";
45
+ import * as jt from "@turf/helpers";
46
+ import qt from "@turf/bbox";
47
+ import Yt from "@turf/bbox-polygon";
48
+ import Oi from "textarea-caret";
49
+ import Ri, { setCaretPosition as Ni } from "get-input-selection";
50
+ import { ChonkyActions as G, FileHelper as Xt, setChonkyDefaults as Bi, FullFileBrowser as Fi } from "chonky";
51
+ import { ChonkyIconFA as Hi } from "chonky-icon-fontawesome";
52
+ import Gi from "filesize";
53
+ var ae = /* @__PURE__ */ ((e) => (e.BOX = "BOX", e.POLYGON = "POLYGON", e.UNKNOWN = "UNKNOWN", e))(ae || {}), ue = /* @__PURE__ */ ((e) => (e.HE = "he", e.EN = "en", e.RU = "ru", e))(ue || {}), st = /* @__PURE__ */ ((e) => (e.TOP_RIGHT = "TOP_RIGHT", e.BOTTOM_LEFT = "BOTTOM_LEFT", e))(st || {});
52
54
  const J = {
53
55
  // eslint-disable-next-line @typescript-eslint/naming-convention
54
56
  DATE_PICKER: {
@@ -56,7 +58,7 @@ const J = {
56
58
  local: {
57
59
  setText: "set",
58
60
  placeHolderText: "Enter the Date",
59
- calendarLocale: de.EN
61
+ calendarLocale: ue.EN
60
62
  },
61
63
  disableFuture: !0,
62
64
  showTime: !1,
@@ -70,19 +72,19 @@ const J = {
70
72
  setText: "set",
71
73
  startPlaceHolderText: "Start of time",
72
74
  endPlaceHolderText: "End of time",
73
- calendarLocale: de.EN
75
+ calendarLocale: ue.EN
74
76
  },
75
77
  renderAsButton: !0,
76
78
  offset: 0,
77
79
  disableFuture: !0
78
80
  }
79
- }, ae = (e) => {
81
+ }, ce = (e) => {
80
82
  const { children: n, ...t } = e;
81
- return /* @__PURE__ */ l(gn, { ...t, children: n });
82
- }, Xt = (e) => {
83
+ return /* @__PURE__ */ l(yn, { ...t, children: n });
84
+ }, Zt = (e) => {
83
85
  const n = e.type === "dark";
84
- return ve.useMemo(() => Bi(e, n), [n, e]);
85
- }, Bi = (e, n = !1) => pn({
86
+ return Ee.useMemo(() => Vi(e, n), [n, e]);
87
+ }, Vi = (e, n = !1) => fn({
86
88
  palette: {
87
89
  type: n ? "dark" : "light",
88
90
  primary: {
@@ -104,141 +106,141 @@ const J = {
104
106
  }
105
107
  }
106
108
  });
107
- const Fi = 2, Hi = 0.5, Gi = ke(
108
- (e) => We({
109
+ const zi = 2, $i = 0.5, Wi = Ne(
110
+ (e) => Ue({
109
111
  container: {
110
- padding: e.spacing(Fi),
112
+ padding: e.spacing(zi),
111
113
  alignItems: "center"
112
114
  },
113
115
  setButton: {
114
116
  marginTop: e.spacing(1)
115
117
  },
116
118
  margin: {
117
- marginLeft: e.spacing(Hi)
119
+ marginLeft: e.spacing($i)
118
120
  }
119
121
  })
120
- ), Vi = (e) => {
121
- var K, x, W, O;
122
- const n = Gi(), t = Gt(), i = Xt(t), [o, r] = A(null), [d, u] = A(null), [h, E] = A(J.DATE_RANGE_PICKER.dateFormat), C = e.controlsLayout ?? J.DATE_RANGE_PICKER.controlsLayout, L = e.disableFuture ?? J.DATE_RANGE_PICKER.disableFuture, b = ((K = e.local) == null ? void 0 : K.startPlaceHolderText) ?? J.DATE_RANGE_PICKER.local.startPlaceHolderText, P = ((x = e.local) == null ? void 0 : x.endPlaceHolderText) ?? J.DATE_RANGE_PICKER.local.endPlaceHolderText, B = ((W = e.local) == null ? void 0 : W.setText) ?? J.DATE_RANGE_PICKER.local.setText, q = (((O = e.local) == null ? void 0 : O.calendarLocale) ?? J.DATE_RANGE_PICKER.local.calendarLocale) === de.HE ? Rt : Nt;
123
- I(() => {
122
+ ), Ui = (e) => {
123
+ var j, A, $, k;
124
+ const n = Wi(), t = Vt(), i = Zt(t), [o, r] = I(null), [c, u] = I(null), [m, v] = I(J.DATE_RANGE_PICKER.dateFormat), E = e.controlsLayout ?? J.DATE_RANGE_PICKER.controlsLayout, _ = e.disableFuture ?? J.DATE_RANGE_PICKER.disableFuture, w = ((j = e.local) == null ? void 0 : j.startPlaceHolderText) ?? J.DATE_RANGE_PICKER.local.startPlaceHolderText, P = ((A = e.local) == null ? void 0 : A.endPlaceHolderText) ?? J.DATE_RANGE_PICKER.local.endPlaceHolderText, R = (($ = e.local) == null ? void 0 : $.setText) ?? J.DATE_RANGE_PICKER.local.setText, q = (((k = e.local) == null ? void 0 : k.calendarLocale) ?? J.DATE_RANGE_PICKER.local.calendarLocale) === ue.HE ? Nt : Bt;
125
+ x(() => {
124
126
  r(e.from ?? null);
125
- }, [e.from]), I(() => {
127
+ }, [e.from]), x(() => {
126
128
  u(e.to ?? null);
127
- }, [e.to]), I(() => {
128
- E(e.dateFormat ?? J.DATE_RANGE_PICKER.dateFormat);
129
+ }, [e.to]), x(() => {
130
+ v(e.dateFormat ?? J.DATE_RANGE_PICKER.dateFormat);
129
131
  }, [e.dateFormat]);
130
132
  const H = Boolean(
131
- _e(o) && !d || _e(d) && !o || o && d && _e(o) && _e(d) && un(o, d)
132
- ), Y = () => {
133
+ Se(o) && !c || Se(c) && !o || o && c && Se(o) && Se(c) && mn(o, c)
134
+ ), K = () => {
133
135
  e.onChange({
134
- from: o && _e(o) ? o : void 0,
135
- to: d && _e(d) ? d : void 0
136
+ from: o && Se(o) ? o : void 0,
137
+ to: c && Se(c) ? c : void 0
136
138
  });
137
139
  };
138
- return /* @__PURE__ */ l(Ht, { theme: i, children: /* @__PURE__ */ l(
139
- ae,
140
+ return /* @__PURE__ */ l(Gt, { theme: i, children: /* @__PURE__ */ l(
141
+ ce,
140
142
  {
141
143
  className: `${n.container} drpContainer`,
142
144
  display: "flex",
143
- flexDirection: C,
144
- width: C === "column" ? e.contentWidth : "unset",
145
- children: /* @__PURE__ */ N(Bt, { utils: Ft, locale: q, children: [
145
+ flexDirection: E,
146
+ width: E === "column" ? e.contentWidth : "unset",
147
+ children: /* @__PURE__ */ N(Ft, { utils: Ht, locale: q, children: [
146
148
  /* @__PURE__ */ l(
147
- Qe,
149
+ et,
148
150
  {
149
151
  variant: "inline",
150
- placeholder: b,
151
- onChange: (V) => r(V),
152
+ placeholder: w,
153
+ onChange: (W) => r(W),
152
154
  value: o,
153
- disableFuture: L,
154
- format: h,
155
+ disableFuture: _,
156
+ format: m,
155
157
  maxDate: e.maxDate,
156
158
  minDate: e.minDate
157
159
  }
158
160
  ),
159
161
  /* @__PURE__ */ l(
160
- Qe,
162
+ et,
161
163
  {
162
164
  variant: "inline",
163
165
  placeholder: P,
164
166
  className: n.margin,
165
- onChange: (V) => u(V),
166
- value: d,
167
- disableFuture: L,
168
- format: h,
167
+ onChange: (W) => u(W),
168
+ value: c,
169
+ disableFuture: _,
170
+ format: m,
169
171
  maxDate: e.maxDate,
170
172
  minDate: e.minDate
171
173
  }
172
174
  ),
173
- /* @__PURE__ */ l(Ln, { options: t, children: /* @__PURE__ */ l(
175
+ /* @__PURE__ */ l(Mn, { options: t, children: /* @__PURE__ */ l(
174
176
  Ae,
175
177
  {
176
178
  className: `${n.setButton} ${n.margin}`,
177
179
  raised: !0,
178
- onClick: Y,
180
+ onClick: K,
179
181
  disabled: !H,
180
- children: B
182
+ children: R
181
183
  }
182
184
  ) })
183
185
  ] })
184
186
  }
185
187
  ) });
186
- }, zi = (e) => {
188
+ }, Ki = (e) => {
187
189
  const { children: n, ...t } = e;
188
- return /* @__PURE__ */ l(fn, { ...t, children: n });
190
+ return /* @__PURE__ */ l(vn, { ...t, children: n });
189
191
  };
190
- const os = (e) => {
191
- var x, W;
192
- const [n, t] = A(null), [i, o] = A(null), [r, d] = A(J.DATE_RANGE_PICKER.dateFormat), [u, h] = ve.useState(null), E = (O) => {
193
- h(O.currentTarget);
194
- }, C = (O) => {
195
- O.currentTarget.tagName === "I" ? h(O.currentTarget.previousElementSibling) : h(O.currentTarget);
196
- }, L = () => {
197
- h(null);
198
- }, b = Boolean(u), P = e.controlsLayout ?? "column";
199
- I(() => {
192
+ const hs = (e) => {
193
+ var A, $;
194
+ const [n, t] = I(null), [i, o] = I(null), [r, c] = I(J.DATE_RANGE_PICKER.dateFormat), [u, m] = Ee.useState(null), v = (k) => {
195
+ m(k.currentTarget);
196
+ }, E = (k) => {
197
+ k.currentTarget.tagName === "I" ? m(k.currentTarget.previousElementSibling) : m(k.currentTarget);
198
+ }, _ = () => {
199
+ m(null);
200
+ }, w = Boolean(u), P = e.controlsLayout ?? "column";
201
+ x(() => {
200
202
  t(e.from ?? null);
201
- }, [e.from]), I(() => {
203
+ }, [e.from]), x(() => {
202
204
  o(e.to ?? null);
203
- }, [e.to]), I(() => {
204
- d(e.dateFormat ?? J.DATE_RANGE_PICKER.dateFormat);
205
+ }, [e.to]), x(() => {
206
+ c(e.dateFormat ?? J.DATE_RANGE_PICKER.dateFormat);
205
207
  }, [e.dateFormat]);
206
- const B = ((x = e.local) == null ? void 0 : x.startPlaceHolderText) ?? J.DATE_RANGE_PICKER.local.startPlaceHolderText, $ = ((W = e.local) == null ? void 0 : W.endPlaceHolderText) ?? J.DATE_RANGE_PICKER.local.endPlaceHolderText, q = e.renderAsButton === void 0 ? J.DATE_RANGE_PICKER.renderAsButton : e.renderAsButton, H = e.offset === void 0 ? J.DATE_RANGE_PICKER.offset : e.offset, Y = e.disableFuture === void 0 ? J.DATE_RANGE_PICKER.disableFuture : e.disableFuture, K = $e(() => `${n ? pt(n, r) : B} - ${i ? pt(i, r) : $}`, [n, i, r, B, $]);
208
+ const R = ((A = e.local) == null ? void 0 : A.startPlaceHolderText) ?? J.DATE_RANGE_PICKER.local.startPlaceHolderText, V = (($ = e.local) == null ? void 0 : $.endPlaceHolderText) ?? J.DATE_RANGE_PICKER.local.endPlaceHolderText, q = e.renderAsButton === void 0 ? J.DATE_RANGE_PICKER.renderAsButton : e.renderAsButton, H = e.offset === void 0 ? J.DATE_RANGE_PICKER.offset : e.offset, K = e.disableFuture === void 0 ? J.DATE_RANGE_PICKER.disableFuture : e.disableFuture, j = ke(() => `${n ? yt(n, r) : R} - ${i ? yt(i, r) : V}`, [n, i, r, R, V]);
207
209
  return /* @__PURE__ */ N(te, { children: [
208
- q ? /* @__PURE__ */ l(Ae, { style: { width: e.width }, raised: !0, onClick: E, className: "drpOpener", children: K }) : /* @__PURE__ */ l(
209
- Ge,
210
+ q ? /* @__PURE__ */ l(Ae, { style: { width: e.width }, raised: !0, onClick: v, className: "drpOpener", children: j }) : /* @__PURE__ */ l(
211
+ ze,
210
212
  {
211
213
  className: "drpOpener",
212
214
  readOnly: !0,
213
215
  style: { width: e.width },
214
- value: K,
215
- onClick: C,
216
+ value: j,
217
+ onClick: E,
216
218
  trailingIcon: {
217
219
  icon: "date_range",
218
220
  tabIndex: 0,
219
- onClick: C
221
+ onClick: E
220
222
  }
221
223
  }
222
224
  ),
223
- /* @__PURE__ */ l(zi, { open: b, anchorEl: u, onClose: L, anchorOrigin: { vertical: "bottom", horizontal: "left" }, keepMounted: !0, children: /* @__PURE__ */ l(
224
- Vi,
225
+ /* @__PURE__ */ l(Ki, { open: w, anchorEl: u, onClose: _, anchorOrigin: { vertical: "bottom", horizontal: "left" }, keepMounted: !0, children: /* @__PURE__ */ l(
226
+ Ui,
225
227
  {
226
228
  controlsLayout: P,
227
229
  contentWidth: ((u == null ? void 0 : u.clientWidth) ?? 0) - H,
228
230
  dateFormat: r,
229
- disableFuture: Y,
231
+ disableFuture: K,
230
232
  minDate: e.minDate,
231
233
  maxDate: e.maxDate,
232
234
  local: e.local,
233
235
  from: n ?? void 0,
234
236
  to: i ?? void 0,
235
- onChange: ({ from: O, to: V }) => {
236
- t(O ?? null), o(V ?? null), e.onChange({ from: O, to: V }), L();
237
+ onChange: ({ from: k, to: W }) => {
238
+ t(k ?? null), o(W ?? null), e.onChange({ from: k, to: W }), _();
237
239
  }
238
240
  }
239
241
  ) })
240
242
  ] });
241
- }, Ye = (e) => typeof e < "u" && e !== null && "startDate" in e && "endDate" in e, ss = ({
243
+ }, Xe = (e) => typeof e < "u" && e !== null && "startDate" in e && "endDate" in e, ms = ({
242
244
  endDate: e,
243
245
  startDate: n,
244
246
  setEndDate: t = () => {
@@ -247,51 +249,51 @@ const os = (e) => {
247
249
  },
248
250
  endTimeInputClassName: o = "",
249
251
  endTimeLabel: r = "",
250
- endTimeWrapperClassName: d = "",
252
+ endTimeWrapperClassName: c = "",
251
253
  timeRangeInputsWrapperClassName: u = "",
252
- startTimeInputClassName: h = "",
253
- startTimeLabel: E = "",
254
- startTimeWrapperClassName: C = ""
254
+ startTimeInputClassName: m = "",
255
+ startTimeLabel: v = "",
256
+ startTimeWrapperClassName: E = ""
255
257
  }) => /* @__PURE__ */ N("div", { className: `timeRangeWrapper ${u}`, children: [
256
- /* @__PURE__ */ l("div", { className: `startTimeWrapper ${C}`, children: /* @__PURE__ */ l(
257
- Ge,
258
+ /* @__PURE__ */ l("div", { className: `startTimeWrapper ${E}`, children: /* @__PURE__ */ l(
259
+ ze,
258
260
  {
259
- label: E,
261
+ label: v,
260
262
  disabled: n === null,
261
- className: `timeRangeInput ${h}`,
263
+ className: `timeRangeInput ${m}`,
262
264
  name: "start-time",
263
265
  type: "time",
264
- value: Le(n).format("HH:mm"),
265
- onChange: (L) => {
266
- const b = Le(n), P = Le(L.currentTarget.value, "HH:mm"), B = b.set({
266
+ value: Me(n).format("HH:mm"),
267
+ onChange: (_) => {
268
+ const w = Me(n), P = Me(_.currentTarget.value, "HH:mm"), R = w.set({
267
269
  hours: P.get("hours"),
268
270
  minutes: P.get("minutes")
269
271
  });
270
- i(B.toDate());
272
+ i(R.toDate());
271
273
  }
272
274
  }
273
275
  ) }),
274
- /* @__PURE__ */ l("div", { className: `endTimeWrapper ${d}`, children: /* @__PURE__ */ l(
275
- Ge,
276
+ /* @__PURE__ */ l("div", { className: `endTimeWrapper ${c}`, children: /* @__PURE__ */ l(
277
+ ze,
276
278
  {
277
279
  label: r,
278
280
  disabled: e === null,
279
281
  className: `timeRangeInput ${o}`,
280
282
  name: "end-time",
281
283
  type: "time",
282
- value: Le(e).format("HH:mm"),
283
- onChange: (L) => {
284
- const b = Le(e), P = Le(L.currentTarget.value, "HH:mm"), B = b.set({
284
+ value: Me(e).format("HH:mm"),
285
+ onChange: (_) => {
286
+ const w = Me(e), P = Me(_.currentTarget.value, "HH:mm"), R = w.set({
285
287
  hours: P.get("hours"),
286
288
  minutes: P.get("minutes")
287
289
  });
288
- t(B.toDate());
290
+ t(R.toDate());
289
291
  }
290
292
  }
291
293
  ) })
292
- ] }), $i = cn(
294
+ ] }), ji = un(
293
295
  ({ value: e, onClick: n, onInputClick: t, ...i }, o) => /* @__PURE__ */ l(
294
- Ge,
296
+ ze,
295
297
  {
296
298
  ...i,
297
299
  className: "dateRangeCustomInput",
@@ -303,37 +305,37 @@ const os = (e) => {
303
305
  value: e
304
306
  }
305
307
  )
306
- ), Wi = ({ setStartDate: e = () => {
308
+ ), qi = ({ setStartDate: e = () => {
307
309
  }, setEndDate: n = () => {
308
310
  }, shortcuts: t, dateRange: i, onShortcut: o }) => {
309
- const [r, d] = A(), u = $e(
310
- () => t.map((h) => h instanceof Function ? h() : h),
311
+ const [r, c] = I(), u = ke(
312
+ () => t.map((m) => m instanceof Function ? m() : m),
311
313
  [t]
312
314
  );
313
- return I(() => {
314
- for (const h of u) {
315
- const E = i.startDate && i.endDate && gt(h.startDate, i.startDate) && gt(h.endDate, i.endDate);
316
- r ? h.id === r && (E || d(void 0)) : E && d(h.id);
315
+ return x(() => {
316
+ for (const m of u) {
317
+ const v = i.startDate && i.endDate && vt(m.startDate, i.startDate) && vt(m.endDate, i.endDate);
318
+ r ? m.id === r && (v || c(void 0)) : v && c(m.id);
317
319
  }
318
- }, [i, r, u]), /* @__PURE__ */ l("div", { className: "shortcutsContainer", children: u.map((h, E) => {
319
- const C = () => {
320
- e(h.startDate), n(h.endDate);
320
+ }, [i, r, u]), /* @__PURE__ */ l("div", { className: "shortcutsContainer", children: u.map((m, v) => {
321
+ const E = () => {
322
+ e(m.startDate), n(m.endDate);
321
323
  };
322
324
  return /* @__PURE__ */ l(
323
325
  Ae,
324
326
  {
325
327
  type: "button",
326
- className: `shortcut ${r === h.id ? "selected" : ""}`,
327
- onClick: (L) => {
328
- C(), o == null || o({ startDate: h.startDate, endDate: h.endDate });
328
+ className: `shortcut ${r === m.id ? "selected" : ""}`,
329
+ onClick: (_) => {
330
+ E(), o == null || o({ startDate: m.startDate, endDate: m.endDate });
329
331
  },
330
332
  outlined: !0,
331
- children: h.label
333
+ children: m.label
332
334
  },
333
- h.id + E
335
+ m.id + v
334
336
  );
335
337
  }) });
336
- }, as = ve.forwardRef((e, n) => {
338
+ }, ps = Ee.forwardRef((e, n) => {
337
339
  const {
338
340
  // Time range input props
339
341
  // endTimeInputClassName,
@@ -348,152 +350,152 @@ const os = (e) => {
348
350
  dayClassName: i,
349
351
  monthClassName: o,
350
352
  selectsRange: r,
351
- onChange: d,
353
+ onChange: c,
352
354
  inputName: u,
353
- showMonthYearDropdown: h,
355
+ showMonthYearDropdown: m,
354
356
  // withTimeRange,
355
- withShortcuts: E,
356
- locale: C = "en"
357
- } = e, [L, b] = A(null), [P, B] = A(null), [$, q] = A(!1), H = r ? { startDate: L, endDate: P } : L;
358
- I(() => {
359
- C === "he" && Nn("he", Bn);
360
- }, [C]), I(() => {
361
- var x, W;
362
- ((x = e.startDate) == null ? void 0 : x.toString()) !== (L == null ? void 0 : L.toString()) && b(e.startDate), ((W = e.endDate) == null ? void 0 : W.toString()) !== (P == null ? void 0 : P.toString()) && B(e.endDate);
363
- }, [e.startDate, e.endDate, L, P]);
364
- const Y = $e(() => {
365
- let x = "pickerContainer" + (C === "he" ? " pickerContainer-rtl" : "");
366
- return E && r && (x += " pickerContainer-withShortcuts"), x;
367
- }, [C, E, r]), K = h ? {
357
+ withShortcuts: v,
358
+ locale: E = "en"
359
+ } = e, [_, w] = I(null), [P, R] = I(null), [V, q] = I(!1), H = r ? { startDate: _, endDate: P } : _;
360
+ x(() => {
361
+ E === "he" && Fn("he", Hn);
362
+ }, [E]), x(() => {
363
+ var A, $;
364
+ ((A = e.startDate) == null ? void 0 : A.toString()) !== (_ == null ? void 0 : _.toString()) && w(e.startDate), (($ = e.endDate) == null ? void 0 : $.toString()) !== (P == null ? void 0 : P.toString()) && R(e.endDate);
365
+ }, [e.startDate, e.endDate, _, P]);
366
+ const K = ke(() => {
367
+ let A = "pickerContainer" + (E === "he" ? " pickerContainer-rtl" : "");
368
+ return v && r && (A += " pickerContainer-withShortcuts"), A;
369
+ }, [E, v, r]), j = m ? {
368
370
  showMonthDropdown: !0,
369
371
  showYearDropdown: !0,
370
372
  dropdownMode: "select"
371
373
  } : {};
372
- return /* @__PURE__ */ l("div", { className: Y, style: { direction: C === "he" ? "rtl" : "ltr" }, children: /* @__PURE__ */ l(
373
- Rn,
374
+ return /* @__PURE__ */ l("div", { className: K, style: { direction: E === "he" ? "rtl" : "ltr" }, children: /* @__PURE__ */ l(
375
+ Bn,
374
376
  {
375
377
  ...e,
376
378
  ref: n,
377
379
  onClickOutside: () => q(!1),
378
- open: $,
379
- startDate: Ye(H) ? L : void 0,
380
- selected: L,
381
- endDate: Ye(H) ? P : void 0,
380
+ open: V,
381
+ startDate: Xe(H) ? _ : void 0,
382
+ selected: _,
383
+ endDate: Xe(H) ? P : void 0,
382
384
  monthsShown: e.monthsShown ?? 2,
383
385
  calendarClassName: `pickerCalendar ${t}`,
384
- weekDayClassName: (x) => `pickerWeek ${(i == null ? void 0 : i(x)) ?? ""}`,
385
- dayClassName: (x) => `pickerDay ${(i == null ? void 0 : i(x)) ?? ""}`,
386
- monthClassName: (x) => `pickerMonth ${(o == null ? void 0 : o(x)) ?? ""}`,
387
- onChange: (x, W) => {
388
- if (Array.isArray(x)) {
389
- const [O, V] = x;
390
- b(O), B(V), d == null || d({ startDate: O, endDate: V && hn(V) }, W);
386
+ weekDayClassName: (A) => `pickerWeek ${(i == null ? void 0 : i(A)) ?? ""}`,
387
+ dayClassName: (A) => `pickerDay ${(i == null ? void 0 : i(A)) ?? ""}`,
388
+ monthClassName: (A) => `pickerMonth ${(o == null ? void 0 : o(A)) ?? ""}`,
389
+ onChange: (A, $) => {
390
+ if (Array.isArray(A)) {
391
+ const [k, W] = A;
392
+ w(k), R(W), c == null || c({ startDate: k, endDate: W && pn(W) }, $);
391
393
  } else
392
- b(x), d == null || d(x, W);
394
+ w(A), c == null || c(A, $);
393
395
  },
394
- customInput: /* @__PURE__ */ l($i, { name: u, onInputClick: () => {
396
+ customInput: /* @__PURE__ */ l(ji, { name: u, onInputClick: () => {
395
397
  q(!0);
396
398
  } }),
397
- showTimeInput: !!(E && r),
399
+ showTimeInput: !!(v && r),
398
400
  timeInputLabel: "",
399
- customTimeInput: E && Ye(H) && /* @__PURE__ */ l(Wi, { onShortcut: (x) => {
400
- d == null || d(x), q(!1);
401
- }, shortcuts: E, setEndDate: B, setStartDate: b, dateRange: H }),
401
+ customTimeInput: v && Xe(H) && /* @__PURE__ */ l(qi, { onShortcut: (A) => {
402
+ c == null || c(A), q(!1);
403
+ }, shortcuts: v, setEndDate: R, setStartDate: w, dateRange: H }),
402
404
  showMonthYearDropdown: void 0,
403
- ...K
405
+ ...j
404
406
  }
405
407
  ) });
406
408
  });
407
- const ls = (e) => {
408
- const n = Gt(), t = Xt(n), [i, o] = A(e.value), {
409
+ const gs = (e) => {
410
+ const n = Vt(), t = Zt(n), [i, o] = I(e.value), {
409
411
  format: r = J.DATE_PICKER.dateFormat,
410
- variant: d = J.DATE_PICKER.variant,
412
+ variant: c = J.DATE_PICKER.variant,
411
413
  disableFuture: u = J.DATE_PICKER.disableFuture,
412
- local: h,
413
- onChange: E,
414
- showTime: C = J.DATE_PICKER.showTime,
415
- value: L,
416
- ...b
417
- } = e, { placeHolderText: P = J.DATE_PICKER.local.placeHolderText, calendarLocale: B } = h ?? {
414
+ local: m,
415
+ onChange: v,
416
+ showTime: E = J.DATE_PICKER.showTime,
417
+ value: _,
418
+ ...w
419
+ } = e, { placeHolderText: P = J.DATE_PICKER.local.placeHolderText, calendarLocale: R } = m ?? {
418
420
  placeHolderText: J.DATE_PICKER.local.placeHolderText,
419
- calendarLocale: de.EN
420
- }, $ = B === de.HE ? Rt : Nt, q = (H) => {
421
- o(H), E(H);
421
+ calendarLocale: ue.EN
422
+ }, V = R === ue.HE ? Nt : Bt, q = (H) => {
423
+ o(H), v(H);
422
424
  };
423
- return /* @__PURE__ */ l(Ht, { theme: t, children: /* @__PURE__ */ N(Bt, { utils: Ft, locale: $, children: [
424
- C && /* @__PURE__ */ l(
425
- Qe,
425
+ return /* @__PURE__ */ l(Gt, { theme: t, children: /* @__PURE__ */ N(Ft, { utils: Ht, locale: V, children: [
426
+ E && /* @__PURE__ */ l(
427
+ et,
426
428
  {
427
- variant: d,
429
+ variant: c,
428
430
  placeholder: P,
429
431
  onChange: q,
430
432
  value: i,
431
433
  disableFuture: u,
432
434
  format: r,
433
- ...b
435
+ ...w
434
436
  }
435
437
  ),
436
- !C && /* @__PURE__ */ l(
437
- mn,
438
+ !E && /* @__PURE__ */ l(
439
+ gn,
438
440
  {
439
- variant: d,
441
+ variant: c,
440
442
  placeholder: P,
441
443
  onChange: q,
442
444
  value: i,
443
445
  disableFuture: u,
444
446
  format: r,
445
- ...b
447
+ ...w
446
448
  }
447
449
  )
448
450
  ] }) });
449
- }, Ui = 18, Ki = ke(
450
- (e) => We({
451
+ }, Yi = 18, Xi = Ne(
452
+ (e) => Ue({
451
453
  drawingButton: {
452
- width: e.spacing(Ui)
454
+ width: e.spacing(Yi)
453
455
  },
454
456
  fullWidth: {
455
457
  width: "100%",
456
458
  marginTop: "36px"
457
459
  }
458
460
  })
459
- ), ji = (e) => {
460
- const n = Ki(), [t, i] = ve.useState(null), { isSelectionEnabled: o, onCancelDraw: r, onStartDraw: d, onReset: u } = e, h = (C) => {
461
- i(C.currentTarget);
462
- }, E = () => {
461
+ ), Zi = (e) => {
462
+ const n = Xi(), [t, i] = Ee.useState(null), { isSelectionEnabled: o, onCancelDraw: r, onStartDraw: c, onReset: u } = e, m = (E) => {
463
+ i(E.currentTarget);
464
+ }, v = () => {
463
465
  i(null);
464
466
  };
465
- return o ? /* @__PURE__ */ l(tt, { content: "Cancel the ongoing draw", align: "bottomLeft", children: /* @__PURE__ */ l(Ae, { className: n.drawingButton, raised: !0, onClick: r, children: "Cancel Draw" }) }) : /* @__PURE__ */ N(ae, { position: "relative", children: [
466
- /* @__PURE__ */ l(tt, { content: "draw an Area of interest to limit the search", align: "bottomLeft", children: /* @__PURE__ */ l(Ae, { className: n.drawingButton, raised: !0, onClick: h, children: "Draw AOI" }) }),
467
+ return o ? /* @__PURE__ */ l(nt, { content: "Cancel the ongoing draw", align: "bottomLeft", children: /* @__PURE__ */ l(Ae, { className: n.drawingButton, raised: !0, onClick: r, children: "Cancel Draw" }) }) : /* @__PURE__ */ N(ce, { position: "relative", children: [
468
+ /* @__PURE__ */ l(nt, { content: "draw an Area of interest to limit the search", align: "bottomLeft", children: /* @__PURE__ */ l(Ae, { className: n.drawingButton, raised: !0, onClick: m, children: "Draw AOI" }) }),
467
469
  /* @__PURE__ */ N(
468
- Sn,
470
+ Pn,
469
471
  {
470
472
  className: n.fullWidth,
471
473
  open: Boolean(t),
472
- onClose: E,
474
+ onClose: v,
473
475
  children: [
474
476
  /* @__PURE__ */ l(
475
- je,
477
+ qe,
476
478
  {
477
479
  onClick: () => {
478
- d(se.POLYGON), E();
480
+ c(ae.POLYGON), v();
479
481
  },
480
482
  children: "Polygon"
481
483
  }
482
484
  ),
483
485
  /* @__PURE__ */ l(
484
- je,
486
+ qe,
485
487
  {
486
488
  onClick: () => {
487
- d(se.BOX), E();
489
+ c(ae.BOX), v();
488
490
  },
489
491
  children: "Box"
490
492
  }
491
493
  ),
492
494
  /* @__PURE__ */ l(
493
- je,
495
+ qe,
494
496
  {
495
497
  onClick: () => {
496
- u(), E();
498
+ u(), v();
497
499
  },
498
500
  children: "Clear"
499
501
  }
@@ -503,138 +505,138 @@ const ls = (e) => {
503
505
  )
504
506
  ] });
505
507
  };
506
- var he = /* @__PURE__ */ ((e) => (e.WGS84 = "EPSG:4326", e.WEB_MERCATOR = "EPSG:3857", e))(he || {});
507
- const st = 5, at = 2, Zt = Ie(null), qi = Zt.Provider, Et = 35, Ct = 32, Yi = 10, Xi = (e) => e !== void 0 && e !== he.WGS84 ? zn([Et, Ct], he.WGS84, e) : [Et, Ct], Zi = (e) => {
508
+ var pe = /* @__PURE__ */ ((e) => (e.WGS84 = "EPSG:4326", e.WEB_MERCATOR = "EPSG:3857", e))(pe || {});
509
+ const at = 5, lt = 2, Jt = Oe(null), Ji = Jt.Provider, bt = 35, Tt = 32, Qi = 10, er = (e) => e !== void 0 && e !== pe.WGS84 ? Wn([bt, Tt], pe.WGS84, e) : [bt, Tt], tr = (e) => {
508
510
  switch (e) {
509
- case he.WEB_MERCATOR:
510
- return (n) => ft(n, "Mercator: {y}m, {x}m", at);
511
- case he.WGS84:
512
- return (n) => ft(n, "WGS84: {y}°N {x}°E", st);
511
+ case pe.WEB_MERCATOR:
512
+ return (n) => Et(n, "Mercator: {y}m, {x}m", lt);
513
+ case pe.WGS84:
514
+ return (n) => Et(n, "WGS84: {y}°N {x}°E", at);
513
515
  default:
514
516
  return (n) => "";
515
517
  }
516
- }, ut = () => {
517
- const e = xe(Zt);
518
+ }, ht = () => {
519
+ const e = Re(Jt);
518
520
  if (e === null)
519
521
  throw new Error("map context is null, please check the provider");
520
522
  return e;
521
- }, Ji = (e) => {
522
- const n = be(null), { allowFullScreen: t, showMousePosition: i, projection: o } = e, [r] = A(
523
- new Hn({
524
- view: new Gn({
525
- projection: o ?? he.WGS84
523
+ }, nr = (e) => {
524
+ const n = _e(null), { allowFullScreen: t, showMousePosition: i, projection: o } = e, [r] = I(
525
+ new Vn({
526
+ view: new zn({
527
+ projection: o ?? pe.WGS84
526
528
  }),
527
- controls: Vn()
529
+ controls: $n()
528
530
  })
529
531
  );
530
- I(() => {
531
- r.getView().setCenter(e.center ?? Xi(e.projection));
532
- }, [r, e.center, e.projection]), I(() => {
533
- r.getView().setZoom(e.zoom ?? Yi);
532
+ x(() => {
533
+ r.getView().setCenter(e.center ?? er(e.projection));
534
+ }, [r, e.center, e.projection]), x(() => {
535
+ r.getView().setZoom(e.zoom ?? Qi);
534
536
  }, [r, e.zoom, e.projection]);
535
- const d = (u, h) => {
536
- h.getControls().forEach((C) => {
537
- C instanceof u && h.removeControl(C);
537
+ const c = (u, m) => {
538
+ m.getControls().forEach((E) => {
539
+ E instanceof u && m.removeControl(E);
538
540
  });
539
541
  };
540
- return I(() => {
541
- r.setTarget(n.current), t !== void 0 && t ? r.addControl(new yt()) : d(yt, r);
542
- }, [r, t]), I(() => {
543
- i !== void 0 && i ? (d(qe, r), r.addControl(
544
- new qe({
545
- coordinateFormat: Zi(o ?? he.WGS84),
546
- projection: o ?? he.WGS84,
542
+ return x(() => {
543
+ r.setTarget(n.current), t !== void 0 && t ? r.addControl(new Ct()) : c(Ct, r);
544
+ }, [r, t]), x(() => {
545
+ i !== void 0 && i ? (c(Ye, r), r.addControl(
546
+ new Ye({
547
+ coordinateFormat: tr(o ?? pe.WGS84),
548
+ projection: o ?? pe.WGS84,
547
549
  undefinedHTML: "&nbsp;"
548
550
  })
549
- )) : d(qe, r);
550
- }, [r, i, o]), /* @__PURE__ */ N(qi, { value: r, children: [
551
+ )) : c(Ye, r);
552
+ }, [r, i, o]), /* @__PURE__ */ N(Ji, { value: r, children: [
551
553
  /* @__PURE__ */ l("div", { className: "map", ref: n }),
552
554
  e.children
553
555
  ] });
554
- }, Jt = Ie(null), Qi = Jt.Provider, er = () => {
555
- const e = xe(Jt);
556
+ }, Qt = Oe(null), ir = Qt.Provider, rr = () => {
557
+ const e = Re(Qt);
556
558
  if (e === null)
557
559
  throw new Error("tile layer context is null, please check the provider");
558
560
  return e;
559
- }, tr = ({ options: e, children: n }) => {
560
- const t = ut(), [i] = A(new $n(e));
561
- return I(() => (t.addLayer(i), () => {
561
+ }, or = ({ options: e, children: n }) => {
562
+ const t = ht(), [i] = I(new Un(e));
563
+ return x(() => (t.addLayer(i), () => {
562
564
  t.removeLayer(i);
563
- }), [t, i]), /* @__PURE__ */ l(Qi, { value: i, children: n });
564
- }, Qt = Ie(null), nr = Qt.Provider, ir = () => {
565
- const e = xe(Qt);
565
+ }), [t, i]), /* @__PURE__ */ l(ir, { value: i, children: n });
566
+ }, en = Oe(null), sr = en.Provider, ar = () => {
567
+ const e = Re(en);
566
568
  if (e === null)
567
569
  throw new Error("vector layer context is null, please check the provider");
568
570
  return e;
569
- }, rr = ({ children: e }) => {
570
- const n = ut(), [t] = A(new Wn());
571
- return I(() => (n.addLayer(t), () => {
571
+ }, lr = ({ children: e }) => {
572
+ const n = ht(), [t] = I(new Kn());
573
+ return x(() => (n.addLayer(t), () => {
572
574
  n.removeLayer(t);
573
- }), [n, t]), /* @__PURE__ */ l(nr, { value: t, children: e });
574
- }, en = Ie(null), or = en.Provider, sr = () => {
575
- const e = xe(en);
575
+ }), [n, t]), /* @__PURE__ */ l(sr, { value: t, children: e });
576
+ }, tn = Oe(null), cr = tn.Provider, dr = () => {
577
+ const e = Re(tn);
576
578
  if (e === null)
577
579
  throw new Error("vector source context is null, please check the provider");
578
580
  return e;
579
- }, ar = ({ children: e }) => {
580
- const n = ir(), [t] = A(new Un());
581
- return I(() => {
581
+ }, ur = ({ children: e }) => {
582
+ const n = ar(), [t] = I(new jn());
583
+ return x(() => {
582
584
  n.setSource(t);
583
- }, [t, n]), /* @__PURE__ */ l(or, { value: t, children: e });
584
- }, lr = ({ geometry: e }) => {
585
- const n = sr();
586
- return I(() => {
587
- const i = new Vt().readFeature(e);
585
+ }, [t, n]), /* @__PURE__ */ l(cr, { value: t, children: e });
586
+ }, hr = ({ geometry: e }) => {
587
+ const n = dr();
588
+ return x(() => {
589
+ const i = new zt().readFeature(e);
588
590
  return n.addFeature(i), () => {
589
591
  n.removeFeature(i);
590
592
  };
591
593
  }, [e, n]), null;
592
- }, cr = (e) => {
593
- const n = er();
594
- return I(() => {
595
- n.setSource(new Kn());
594
+ }, mr = (e) => {
595
+ const n = rr();
596
+ return x(() => {
597
+ n.setSource(new qn());
596
598
  }, [n]), null;
597
- }, dr = ({ drawType: e, onPolygonSelected: n }) => {
598
- const t = ut();
599
- return I(() => {
599
+ }, pr = ({ drawType: e, onPolygonSelected: n }) => {
600
+ const t = ht();
601
+ return x(() => {
600
602
  const i = {
601
603
  type: "Circle"
602
604
  /* CIRCLE */
603
605
  };
604
606
  switch (e) {
605
- case se.BOX:
606
- i.geometryFunction = qn();
607
+ case ae.BOX:
608
+ i.geometryFunction = Xn();
607
609
  break;
608
- case se.POLYGON:
610
+ case ae.POLYGON:
609
611
  i.type = "Polygon";
610
612
  break;
611
613
  default:
612
614
  return;
613
615
  }
614
- const o = new jn(i);
616
+ const o = new Yn(i);
615
617
  t.addInteraction(o);
616
- const r = (d) => {
617
- const h = new Vt().writeGeometryObject(d.feature.getGeometry());
618
- n == null || n(h);
618
+ const r = (c) => {
619
+ const m = new zt().writeGeometryObject(c.feature.getGeometry());
620
+ n == null || n(m);
619
621
  };
620
622
  return o.on("drawend", r), () => {
621
623
  o.un("drawend", r), t.removeInteraction(o);
622
624
  };
623
625
  }, [n, e, t]), null;
624
626
  };
625
- const ur = (e) => {
627
+ const gr = (e) => {
626
628
  const n = (t) => {
627
- const i = Fn(t);
629
+ const i = Gn(t);
628
630
  e.onPolygonSelection(i);
629
631
  };
630
- return /* @__PURE__ */ N(Ji, { allowFullScreen: !0, showMousePosition: !0, children: [
631
- /* @__PURE__ */ l(tr, { children: /* @__PURE__ */ l(cr, {}) }),
632
- e.selectionPolygon && /* @__PURE__ */ l(rr, { children: /* @__PURE__ */ l(ar, { children: /* @__PURE__ */ l(lr, { geometry: e.selectionPolygon }) }) }),
632
+ return /* @__PURE__ */ N(nr, { allowFullScreen: !0, showMousePosition: !0, children: [
633
+ /* @__PURE__ */ l(or, { children: /* @__PURE__ */ l(mr, {}) }),
634
+ e.selectionPolygon && /* @__PURE__ */ l(lr, { children: /* @__PURE__ */ l(ur, { children: /* @__PURE__ */ l(hr, { geometry: e.selectionPolygon }) }) }),
633
635
  e.children,
634
- e.drawType !== void 0 && /* @__PURE__ */ l(dr, { drawType: e.drawType, onPolygonSelected: n })
636
+ e.drawType !== void 0 && /* @__PURE__ */ l(pr, { drawType: e.drawType, onPolygonSelected: n })
635
637
  ] });
636
- }, Xe = 1.5, hr = 80, mr = ke(
637
- (e) => We({
638
+ }, Ze = 1.5, fr = 80, yr = Ne(
639
+ (e) => Ue({
638
640
  map: {
639
641
  height: "100%",
640
642
  width: "100%",
@@ -643,12 +645,12 @@ const ur = (e) => {
643
645
  absolute: {
644
646
  position: "absolute",
645
647
  zIndex: 1e3,
646
- left: e.spacing(Xe),
647
- top: e.spacing(Xe)
648
+ left: e.spacing(Ze),
649
+ top: e.spacing(Ze)
648
650
  },
649
651
  contentContainer: {
650
- marginTop: e.spacing(Xe),
651
- width: e.spacing(hr)
652
+ marginTop: e.spacing(Ze),
653
+ width: e.spacing(fr)
652
654
  },
653
655
  filtersContainer: {
654
656
  display: "flex",
@@ -658,18 +660,18 @@ const ur = (e) => {
658
660
  marginLeft: e.spacing(1)
659
661
  }
660
662
  })
661
- ), cs = (e) => {
662
- var h;
663
- const [n, t] = A(), [i, o] = A(), r = mr(), d = (E) => {
664
- o(E), t(void 0), e.handlePolygonSelected(E);
663
+ ), fs = (e) => {
664
+ var m;
665
+ const [n, t] = I(), [i, o] = I(), r = yr(), c = (v) => {
666
+ o(v), t(void 0), e.handlePolygonSelected(v);
665
667
  }, u = () => {
666
668
  o(void 0), e.handlePolygonReset();
667
669
  };
668
670
  return /* @__PURE__ */ N("div", { className: r.map, children: [
669
671
  /* @__PURE__ */ N("div", { className: `${r.absolute}`, children: [
670
- /* @__PURE__ */ N(et, { className: r.filtersContainer, children: [
672
+ /* @__PURE__ */ N(tt, { className: r.filtersContainer, children: [
671
673
  /* @__PURE__ */ l(
672
- ji,
674
+ Zi,
673
675
  {
674
676
  onCancelDraw: () => t(void 0),
675
677
  onReset: u,
@@ -677,31 +679,31 @@ const ur = (e) => {
677
679
  isSelectionEnabled: n !== void 0
678
680
  }
679
681
  ),
680
- (h = e.filters) == null ? void 0 : h.map((E, C) => /* @__PURE__ */ l("div", { className: r.filtersMargin, children: E }, C))
682
+ (m = e.filters) == null ? void 0 : m.map((v, E) => /* @__PURE__ */ l("div", { className: r.filtersMargin, children: v }, E))
681
683
  ] }),
682
- /* @__PURE__ */ l(et, { color: "red", className: `${r.contentContainer}`, children: e.children })
684
+ /* @__PURE__ */ l(tt, { color: "red", className: `${r.contentContainer}`, children: e.children })
683
685
  ] }),
684
- /* @__PURE__ */ l(ur, { children: e.mapContent, onPolygonSelection: d, drawType: n, selectionPolygon: i })
686
+ /* @__PURE__ */ l(gr, { children: e.mapContent, onPolygonSelection: c, drawType: n, selectionPolygon: i })
685
687
  ] });
686
688
  };
687
- function pr(e) {
688
- const { headCells: n, order: t, orderBy: i, onRequestSort: o, isCollapseable: r } = e, d = (u) => (h) => {
689
- o(h, u);
689
+ function vr(e) {
690
+ const { headCells: n, order: t, orderBy: i, onRequestSort: o, isCollapseable: r } = e, c = (u) => (m) => {
691
+ o(m, u);
690
692
  };
691
- return /* @__PURE__ */ l(Yn, { children: /* @__PURE__ */ N(He, { children: [
692
- r && /* @__PURE__ */ l(Me, {}),
693
+ return /* @__PURE__ */ l(Zn, { children: /* @__PURE__ */ N(Ve, { children: [
694
+ r && /* @__PURE__ */ l(De, {}),
693
695
  n.map((u) => /* @__PURE__ */ l(
694
- Me,
696
+ De,
695
697
  {
696
698
  align: u.numeric ? "right" : "left",
697
699
  padding: u.disablePadding ? "none" : "default",
698
700
  sortDirection: i === u.id ? t : !1,
699
701
  children: /* @__PURE__ */ l(
700
- yn,
702
+ En,
701
703
  {
702
704
  active: i === u.id,
703
705
  direction: i === u.id ? t : "asc",
704
- onClick: d(u.id),
706
+ onClick: c(u.id),
705
707
  children: u.label
706
708
  }
707
709
  )
@@ -710,184 +712,217 @@ function pr(e) {
710
712
  ))
711
713
  ] }) });
712
714
  }
713
- const gr = zt(
714
- /* @__PURE__ */ Ot.createElement("path", {
715
+ const Er = $t(
716
+ /* @__PURE__ */ Rt.createElement("path", {
715
717
  d: "M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"
716
718
  }),
717
719
  "KeyboardArrowDown"
718
- ), fr = zt(
719
- /* @__PURE__ */ Ot.createElement("path", {
720
+ ), Cr = $t(
721
+ /* @__PURE__ */ Rt.createElement("path", {
720
722
  d: "M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"
721
723
  }),
722
724
  "KeyboardArrowUp"
723
725
  );
724
- function yr(e) {
725
- const { cellsMetadata: n, isRowSelected: t, item: i, onRowSelected: o, rowIndex: r, isCollapseable: d, collapsedElement: u } = e, [h, E] = A(!1), C = n.length;
726
+ function wr(e) {
727
+ const { cellsMetadata: n, isRowSelected: t, item: i, onRowSelected: o, rowIndex: r, isCollapseable: c, collapsedElement: u } = e, [m, v] = I(!1), E = n.length;
726
728
  return /* @__PURE__ */ N(te, { children: [
727
- /* @__PURE__ */ N(He, { hover: !0, selected: t, onClick: () => {
729
+ /* @__PURE__ */ N(Ve, { hover: !0, selected: t, onClick: () => {
728
730
  o == null || o(r);
729
731
  }, children: [
730
- d && /* @__PURE__ */ l(Me, { padding: "checkbox", children: /* @__PURE__ */ l(
731
- vn,
732
+ c && /* @__PURE__ */ l(De, { padding: "checkbox", children: /* @__PURE__ */ l(
733
+ Cn,
732
734
  {
733
735
  "aria-label": "expand row",
734
736
  size: "small",
735
- onClick: (b) => {
736
- b.stopPropagation(), E(!h);
737
+ onClick: (w) => {
738
+ w.stopPropagation(), v(!m);
737
739
  },
738
- children: h ? /* @__PURE__ */ l(fr, {}) : /* @__PURE__ */ l(gr, {})
740
+ children: m ? /* @__PURE__ */ l(Cr, {}) : /* @__PURE__ */ l(Er, {})
739
741
  }
740
742
  ) }),
741
- n.map((b) => /* @__PURE__ */ l(
742
- Me,
743
+ n.map((w) => /* @__PURE__ */ l(
744
+ De,
743
745
  {
744
- align: b.numeric ? "right" : "left",
745
- padding: b.disablePadding ? "none" : "default",
746
- children: b.transform ? b.transform(i[b.id]) : i[b.id]
746
+ align: w.numeric ? "right" : "left",
747
+ padding: w.disablePadding ? "none" : "default",
748
+ children: w.transform ? w.transform(i[w.id]) : i[w.id]
747
749
  },
748
- b.id + r.toString()
750
+ w.id + r.toString()
749
751
  ))
750
752
  ] }),
751
- d && /* @__PURE__ */ l(He, { children: /* @__PURE__ */ l(Me, { style: { paddingBottom: 0, paddingTop: 0 }, colSpan: C + 1, children: /* @__PURE__ */ l(En, { in: h, unmountOnExit: !0, timeout: "auto", children: u == null ? void 0 : u(i) }) }) })
753
+ c && /* @__PURE__ */ l(Ve, { children: /* @__PURE__ */ l(De, { style: { paddingBottom: 0, paddingTop: 0 }, colSpan: E + 1, children: /* @__PURE__ */ l(wn, { in: m, unmountOnExit: !0, timeout: "auto", children: u == null ? void 0 : u(i) }) }) })
752
754
  ] });
753
755
  }
754
- function ds(e) {
755
- const [n, t] = A(""), [i, o] = A("asc"), {
756
+ function ys(e) {
757
+ const [n, t] = I(""), [i, o] = I("asc"), {
756
758
  cellsMetadata: r,
757
- items: d,
759
+ items: c,
758
760
  onRequestSort: u,
759
- onRowSelected: h,
760
- isCollapseable: E,
761
- collapsedElement: C,
762
- isDense: L,
763
- page: b,
761
+ onRowSelected: m,
762
+ isCollapseable: v,
763
+ collapsedElement: E,
764
+ isDense: _,
765
+ page: w,
764
766
  rowsPerPage: P,
765
- count: B,
766
- handleChangePage: $,
767
+ count: R,
768
+ handleChangePage: V,
767
769
  handleChangeRowsPerPage: q
768
770
  } = e;
769
- return /* @__PURE__ */ N(Cn, { component: et, children: [
770
- /* @__PURE__ */ N(wn, { size: L ? "small" : "medium", children: [
771
+ return /* @__PURE__ */ N(bn, { component: tt, children: [
772
+ /* @__PURE__ */ N(Tn, { size: _ ? "small" : "medium", children: [
771
773
  /* @__PURE__ */ l(
772
- pr,
774
+ vr,
773
775
  {
774
776
  headCells: r,
775
- onRequestSort: (Y, K) => {
776
- const x = n === K && i === "asc";
777
- o(x ? "desc" : "asc"), t(K), u(K, x ? "desc" : "asc");
777
+ onRequestSort: (K, j) => {
778
+ const A = n === j && i === "asc";
779
+ o(A ? "desc" : "asc"), t(j), u(j, A ? "desc" : "asc");
778
780
  },
779
781
  order: i,
780
782
  orderBy: n,
781
- isCollapseable: E
783
+ isCollapseable: v
782
784
  }
783
785
  ),
784
- /* @__PURE__ */ N(bn, { children: [
785
- d.map((Y, K) => /* @__PURE__ */ l(
786
- yr,
786
+ /* @__PURE__ */ N(_n, { children: [
787
+ c.map((K, j) => /* @__PURE__ */ l(
788
+ wr,
787
789
  {
788
- item: Y,
789
- rowIndex: K,
790
- isCollapseable: E,
790
+ item: K,
791
+ rowIndex: j,
792
+ isCollapseable: v,
791
793
  cellsMetadata: r,
792
- collapsedElement: C,
794
+ collapsedElement: E,
793
795
  isRowSelected: !1,
794
- onRowSelected: h
796
+ onRowSelected: m
795
797
  },
796
- K
798
+ j
797
799
  )),
798
- (d.length === 0 || P > d.length) && /* @__PURE__ */ l(
799
- He,
800
+ (c.length === 0 || P > c.length) && /* @__PURE__ */ l(
801
+ Ve,
800
802
  {
801
803
  style: {
802
- height: (L ? 33 : 53) * (P - d.length)
804
+ height: (_ ? 33 : 53) * (P - c.length)
803
805
  },
804
- children: /* @__PURE__ */ l(Me, { colSpan: E ? r.length + 1 : r.length, children: d.length === 0 && /* @__PURE__ */ l(Tn, { align: "center", children: "No results :(" }) })
806
+ children: /* @__PURE__ */ l(De, { colSpan: v ? r.length + 1 : r.length, children: c.length === 0 && /* @__PURE__ */ l(Ln, { align: "center", children: "No results :(" }) })
805
807
  }
806
808
  )
807
809
  ] })
808
810
  ] }),
809
811
  /* @__PURE__ */ l(
810
- _n,
812
+ Sn,
811
813
  {
812
814
  rowsPerPage: P,
813
815
  rowsPerPageOptions: [5, 10],
814
816
  component: "div",
815
- count: B,
816
- page: b,
817
- onPageChange: $,
817
+ count: R,
818
+ page: w,
819
+ onPageChange: V,
818
820
  onRowsPerPageChange: q
819
821
  }
820
822
  )
821
823
  ] });
822
824
  }
823
- const us = (e) => {
825
+ const vs = (e) => {
824
826
  const { children: n, ...t } = e;
825
- return /* @__PURE__ */ l(Xn, { ...t, children: n });
826
- }, hs = (e) => {
827
+ return /* @__PURE__ */ l(Jn, { ...t, children: n });
828
+ }, Es = (e) => {
827
829
  const { children: n, ...t } = e;
828
- return /* @__PURE__ */ l(Zn, { ...t, children: n });
829
- }, wt = (e) => e * Math.PI / 180, Be = (e) => e * (180 / Math.PI), vr = (e) => 0.05 * (5916575505e-1 / Math.pow(2, e - 1) / 2) * (Math.cos(wt(85.362 / 2)) / Math.sin(wt(85.362 / 2)));
830
- const Er = (e) => {
831
- const n = le(), t = be(null), [i, o] = A({ x: 0, y: 0 });
832
- return I(() => {
833
- n.screenSpaceEventHandler.setInputAction((r) => {
834
- r != null && r.endPosition && o({ ...r.endPosition });
835
- }, li.MOUSE_MOVE);
836
- }, [t, n]), I(() => {
837
- const r = n.scene.globe.ellipsoid, d = n.camera.pickEllipsoid(new pe(i.x, i.y), r);
838
- if (d) {
839
- const u = r.cartesianToCartographic(d);
840
- if (t.current) {
841
- let h = "";
842
- switch (e.projection) {
843
- case he.WEB_MERCATOR: {
844
- const C = new ci(r).project(u);
845
- h = `Mercator: ${C.y.toFixed(at)}m, ${C.x.toFixed(
846
- at
847
- )}m`, t.current.style.width = "220px";
848
- break;
849
- }
850
- case he.WGS84: {
851
- const E = ce.toDegrees(u.longitude).toFixed(st);
852
- h = `WGS84: ${ce.toDegrees(u.latitude).toFixed(st)}°N ${E}°E`, t.current.style.width = "200px";
853
- break;
854
- }
855
- }
856
- t.current.innerHTML = h;
857
- }
858
- }
859
- }, [i, t, n, e.projection]), /* @__PURE__ */ l("div", { className: "trackerPosition", ref: t });
860
- }, tn = (e, n, t) => {
830
+ return /* @__PURE__ */ l(Qn, { ...t, children: n });
831
+ }, _t = (e) => e * Math.PI / 180, Fe = (e) => e * (180 / Math.PI), br = (e) => 0.05 * (5916575505e-1 / Math.pow(2, e - 1) / 2) * (Math.cos(_t(85.362 / 2)) / Math.sin(_t(85.362 / 2)));
832
+ const nn = (e, n, t) => {
861
833
  let i;
862
- if (e.scene.mode !== we.SCENE2D)
863
- i = e.scene.pickPosition(new Ee(n, t));
834
+ if (e.scene.mode !== Te.SCENE2D)
835
+ i = e.scene.pickPosition(new Ce(n, t));
864
836
  else {
865
837
  const o = e.scene.globe.ellipsoid;
866
- i = e.camera.pickEllipsoid(new Ee(n, t), o);
838
+ i = e.camera.pickEllipsoid(new Ce(n, t), o);
867
839
  }
868
- return Oe.fromCartesian(i);
869
- }, Cr = (e, n, t) => {
870
- const i = tn(e, n, t);
840
+ return Be.fromCartesian(i);
841
+ }, Tr = (e, n, t) => {
842
+ const i = nn(e, n, t);
871
843
  return {
872
844
  type: "Feature",
873
845
  properties: {},
874
846
  geometry: {
875
847
  type: "Point",
876
- coordinates: [ce.toDegrees(i.longitude), ce.toDegrees(i.latitude)]
848
+ coordinates: [ge.toDegrees(i.longitude), ge.toDegrees(i.latitude)]
877
849
  }
878
850
  };
879
- }, wr = (e, n, t) => {
851
+ }, rn = (e, n, t) => {
880
852
  try {
881
- const i = tn(e, n, t);
853
+ const i = nn(e, n, t);
882
854
  return {
883
- longitude: ce.toDegrees(i.longitude),
884
- latitude: ce.toDegrees(i.latitude)
855
+ longitude: ge.toDegrees(i.longitude),
856
+ latitude: ge.toDegrees(i.latitude)
885
857
  };
886
858
  } catch {
887
859
  return;
888
860
  }
889
861
  };
890
- const Ze = [
862
+ class Cs extends di {
863
+ }
864
+ class ws extends ui {
865
+ }
866
+ class bs extends hi {
867
+ }
868
+ class Ts extends Ce {
869
+ }
870
+ class _s extends ve {
871
+ }
872
+ class _r extends Be {
873
+ }
874
+ class Ls extends mi {
875
+ }
876
+ class Ss extends Ut {
877
+ }
878
+ class Ms extends pi {
879
+ }
880
+ class Ps extends Pe {
881
+ }
882
+ class Ds extends gi {
883
+ }
884
+ class Is extends fi {
885
+ }
886
+ class xs extends yi {
887
+ }
888
+ const As = it, ks = Kt, Lr = (e) => {
889
+ const n = le(), t = _e(null), [i, o] = I({ x: 0, y: 0 });
890
+ return x(() => {
891
+ n.screenSpaceEventHandler.setInputAction((r) => {
892
+ if (r != null && r.endPosition) {
893
+ const c = { ...r.endPosition };
894
+ c.x = Math.ceil(c.x), c.y = Math.ceil(c.y), o(c);
895
+ }
896
+ }, vi.MOUSE_MOVE);
897
+ }, [t, n]), x(() => {
898
+ const r = n.scene.globe.ellipsoid;
899
+ if (i) {
900
+ const c = rn(n, i.x, i.y);
901
+ if (c) {
902
+ const u = new _r(c.longitude, c.latitude);
903
+ if (t.current) {
904
+ let m = "";
905
+ switch (e.projection) {
906
+ case pe.WEB_MERCATOR: {
907
+ const E = new Ei(r).project(u);
908
+ m = `Mercator: ${E.y.toFixed(lt)}m, ${E.x.toFixed(
909
+ lt
910
+ )}m`, t.current.style.width = "220px";
911
+ break;
912
+ }
913
+ case pe.WGS84: {
914
+ const v = u.longitude.toFixed(at);
915
+ m = `WGS84: ${u.latitude.toFixed(at)}°N ${v}°E`, t.current.style.width = "200px";
916
+ break;
917
+ }
918
+ }
919
+ t.current.innerHTML = m;
920
+ }
921
+ }
922
+ }
923
+ }, [i, t, n, e.projection]), /* @__PURE__ */ l("div", { className: "trackerPosition", ref: t });
924
+ };
925
+ const Je = [
891
926
  1,
892
927
  2,
893
928
  3,
@@ -920,56 +955,56 @@ const Ze = [
920
955
  2e7,
921
956
  3e7,
922
957
  5e7
923
- ], br = (e, n, t, i) => {
924
- const o = ee(i, "METERS_UNIT") ?? "m", r = ee(i, "KILOMETERS_UNIT") ?? "km", d = {
958
+ ], Sr = (e, n, t, i) => {
959
+ const o = Z(i, "METERS_UNIT") ?? "m", r = Z(i, "KILOMETERS_UNIT") ?? "km", c = {
925
960
  barWidth: void 0,
926
961
  distanceLabel: void 0,
927
962
  lastLegendUpdate: n.lastLegendUpdate
928
- }, u = new ui(), h = new Date().getTime();
929
- if (h < d.lastLegendUpdate + 250)
963
+ }, u = new wi(), m = new Date().getTime();
964
+ if (m < c.lastLegendUpdate + 250)
930
965
  return;
931
- d.lastLegendUpdate = h;
932
- const E = e.scene.canvas.clientWidth, C = e.scene.canvas.clientHeight, L = e.scene.camera.getPickRay(new Ee(E / 2 | 0, C - 1)), b = e.scene.camera.getPickRay(new Ee(1 + E / 2 | 0, C - 1)), P = e.scene.globe, B = P.pick(L, e.scene), $ = P.pick(b, e.scene);
933
- if (!B || !$)
966
+ c.lastLegendUpdate = m;
967
+ const v = e.scene.canvas.clientWidth, E = e.scene.canvas.clientHeight, _ = e.scene.camera.getPickRay(new Ce(v / 2 | 0, E - 1)), w = e.scene.camera.getPickRay(new Ce(1 + v / 2 | 0, E - 1)), P = e.scene.globe, R = P.pick(_, e.scene), V = P.pick(w, e.scene);
968
+ if (!R || !V)
934
969
  return;
935
- const q = P.ellipsoid.cartesianToCartographic(B), H = P.ellipsoid.cartesianToCartographic($);
970
+ const q = P.ellipsoid.cartesianToCartographic(R), H = P.ellipsoid.cartesianToCartographic(V);
936
971
  u.setEndPoints(q, H);
937
- const Y = u.surfaceDistance, K = 100;
938
- let x;
939
- for (let W = Ze.length - 1; !Ve(x) && W >= 0; --W)
940
- Ze[W] / Y < K && (x = Ze[W]);
941
- if (Ve(x)) {
942
- let W = "";
943
- x >= 1e3 ? W = `${(x / 1e3).toString()} ${r}` : W = `${x.toString()} ${o}`, d.barWidth = x / Y | 0, d.distanceLabel = W;
972
+ const K = u.surfaceDistance, j = 100;
973
+ let A;
974
+ for (let $ = Je.length - 1; !$e(A) && $ >= 0; --$)
975
+ Je[$] / K < j && (A = Je[$]);
976
+ if ($e(A)) {
977
+ let $ = "";
978
+ A >= 1e3 ? $ = `${(A / 1e3).toString()} ${r}` : $ = `${A.toString()} ${o}`, c.barWidth = A / K | 0, c.distanceLabel = $;
944
979
  }
945
- t(d);
946
- }, Tr = (e) => {
947
- const n = le(), [t, i] = A({
980
+ t(c);
981
+ }, Mr = (e) => {
982
+ const n = le(), [t, i] = I({
948
983
  barWidth: void 0,
949
984
  distanceLabel: void 0,
950
985
  lastLegendUpdate: -1
951
986
  });
952
- I(() => {
953
- const r = (h) => {
954
- br(n, t, i, e.locale);
955
- }, d = new di(), u = (h) => {
956
- n.scene.globe.tilesLoaded && (r(new MouseEvent("mouse")), d.removeAll());
987
+ x(() => {
988
+ const r = (m) => {
989
+ Sr(n, t, i, e.locale);
990
+ }, c = new Ci(), u = (m) => {
991
+ n.scene.globe.tilesLoaded && (r(new MouseEvent("mouse")), c.removeAll());
957
992
  };
958
- return d.add(n.scene.globe.tileLoadProgressEvent, u), n.camera.moveEnd.addEventListener(r), () => {
993
+ return c.add(n.scene.globe.tileLoadProgressEvent, u), n.camera.moveEnd.addEventListener(r), () => {
959
994
  try {
960
- ee(n, "_cesiumWidget") != null && n.camera.moveEnd.removeEventListener(r);
961
- } catch (h) {
962
- console.log('CESIUM camera "moveEnd" remove listener failed', h);
995
+ Z(n, "_cesiumWidget") != null && n.camera.moveEnd.removeEventListener(r);
996
+ } catch (m) {
997
+ console.log('CESIUM camera "moveEnd" remove listener failed', m);
963
998
  }
964
999
  };
965
1000
  }, [n, e.locale, t]);
966
1001
  const o = (r) => 5 + (125 - r) / 2;
967
- return /* @__PURE__ */ l("div", { className: "scalePosition", children: Ve(t.barWidth) && /* @__PURE__ */ N(te, { children: [
968
- /* @__PURE__ */ l("div", { className: "distance-legend-label", children: /* @__PURE__ */ l("bdi", { children: t.distanceLabel }) }),
1002
+ return /* @__PURE__ */ l("div", { className: "scalePosition", children: $e(t.barWidth) && /* @__PURE__ */ N(te, { children: [
1003
+ /* @__PURE__ */ l("div", { className: "scale-tracker-label", children: /* @__PURE__ */ l("bdi", { children: t.distanceLabel }) }),
969
1004
  /* @__PURE__ */ l(
970
1005
  "div",
971
1006
  {
972
- className: "distance-legend-scale-bar",
1007
+ className: "scale-tracker-bar",
973
1008
  style: {
974
1009
  height: "2px",
975
1010
  width: `${t.barWidth.toString()}px`,
@@ -979,80 +1014,90 @@ const Ze = [
979
1014
  )
980
1015
  ] }) });
981
1016
  }, oe = {
982
- MORPHING: we.MORPHING,
983
- COLUMBUS_VIEW: we.COLUMBUS_VIEW,
984
- SCENE2D: we.SCENE2D,
985
- SCENE3D: we.SCENE3D
1017
+ MORPHING: Te.MORPHING,
1018
+ COLUMBUS_VIEW: Te.COLUMBUS_VIEW,
1019
+ SCENE2D: Te.SCENE2D,
1020
+ SCENE3D: Te.SCENE3D
986
1021
  };
987
- const bt = (e, n) => {
988
- const i = ee(n.scene.globe, "_surface.tileProvider"), o = i._quadtree, r = n.canvas.height, d = ee(n.camera.frustum, "sseDenominator") ?? 1;
1022
+ const Lt = (e, n) => {
1023
+ const i = Z(n.scene.globe, "_surface.tileProvider"), o = i._quadtree, r = n.canvas.height, c = Z(n.camera.frustum, "sseDenominator") ?? 1;
989
1024
  for (let u = 0; u <= 19; u++)
990
- if (i.getLevelMaximumGeometricError(u) * r / (e * d) < o.maximumScreenSpaceError)
1025
+ if (i.getLevelMaximumGeometricError(u) * r / (e * c) < o.maximumScreenSpaceError)
991
1026
  return u;
992
1027
  return null;
993
- }, _r = (e, n) => {
1028
+ }, Pr = (e, n) => {
994
1029
  e = e || 10;
995
1030
  const t = [];
996
1031
  let i = 1e5, o = 0;
997
1032
  for (let r = 1e8; r > i; r = r - i) {
998
- const d = bt(r, n);
999
- if (d === null)
1033
+ const c = Lt(r, n);
1034
+ if (c === null)
1000
1035
  break;
1001
- if (d !== o) {
1002
- let u = r, h = r + i;
1003
- for (; h - u > e; )
1004
- r = u + (h - u) / 2, bt(r, n) === d ? u = r : h = r;
1036
+ if (c !== o) {
1037
+ let u = r, m = r + i;
1038
+ for (; m - u > e; )
1039
+ r = u + (m - u) / 2, Lt(r, n) === c ? u = r : m = r;
1005
1040
  t.push({
1006
- level: d,
1041
+ level: c,
1007
1042
  height: Math.round(r)
1008
- }), o = d, t.length >= 2 && (i = (t[t.length - 2].height - r) / 1e3);
1043
+ }), o = c, t.length >= 2 && (i = (t[t.length - 2].height - r) / 1e3);
1009
1044
  }
1010
1045
  }
1011
1046
  return t;
1012
- }, Lr = (e) => {
1013
- const n = le(), [t, i] = A(1), o = _r(1, n);
1014
- return I(() => {
1015
- const r = () => {
1016
- const d = n.camera, u = 0.5;
1017
- let h = 0;
1018
- switch (n.scene.mode) {
1019
- case oe.SCENE3D:
1020
- h = n.scene.mapProjection.ellipsoid.cartesianToCartographic(d.positionWC).height;
1021
- break;
1022
- case oe.SCENE2D:
1023
- h = (d.frustum.right - d.frustum.left) * u;
1024
- break;
1025
- case oe.COLUMBUS_VIEW:
1026
- h = d.position.z;
1027
- break;
1028
- default:
1029
- h = 0;
1030
- break;
1031
- }
1032
- if (o.length > 0) {
1033
- const E = o.reduce((C, L) => Math.abs(L.height - h) < Math.abs(C.height - h) ? L : C);
1034
- i(E.level);
1035
- }
1036
- };
1037
- return n.camera.moveEnd.addEventListener(r), () => {
1047
+ }, Dr = ({ locale: e = void 0, valueBy: n = "RENDERED_TILES" }) => {
1048
+ const t = le(), [i, o] = I(1), r = Pr(1, t), c = me(() => {
1049
+ const E = t.camera, _ = 0.5;
1050
+ let w = 0;
1051
+ switch (t.scene.mode) {
1052
+ case oe.SCENE3D:
1053
+ w = t.scene.mapProjection.ellipsoid.cartesianToCartographic(E.positionWC).height;
1054
+ break;
1055
+ case oe.SCENE2D:
1056
+ w = (E.frustum.right - E.frustum.left) * _;
1057
+ break;
1058
+ case oe.COLUMBUS_VIEW:
1059
+ w = E.position.z;
1060
+ break;
1061
+ default:
1062
+ w = 0;
1063
+ break;
1064
+ }
1065
+ if (r.length > 0) {
1066
+ const P = r.reduce((R, V) => Math.abs(V.height - w) < Math.abs(R.height - w) ? V : R);
1067
+ o(P.level);
1068
+ }
1069
+ }, [t, r]), u = me(() => {
1070
+ let E = 0;
1071
+ t.scene.globe._surface.forEachRenderedTile(function(_) {
1072
+ E = Math.max(E, _.level);
1073
+ }), o(E);
1074
+ }, [t]), v = ke(() => ({
1075
+ CALCULATION: c,
1076
+ RENDERED_TILES: u
1077
+ }), [c, u])[n];
1078
+ return x(() => {
1079
+ const E = t.scene.globe.tileLoadProgressEvent.addEventListener(function() {
1080
+ t.scene.globe.tilesLoaded && v();
1081
+ });
1082
+ return t.camera.moveEnd.addEventListener(v), () => {
1038
1083
  try {
1039
- ee(n, "_cesiumWidget") != null && n.camera.moveEnd.removeEventListener(r);
1040
- } catch (d) {
1041
- console.log('CESIUM camera "moveEnd"(from zoom tracker) remove listener failed', d);
1084
+ typeof Z(t, "_cesiumWidget") < "u" && (t.camera.moveEnd.removeEventListener(v), E());
1085
+ } catch (_) {
1086
+ console.log('CESIUM camera "moveEnd"(from zoom tracker) remove listener failed', _);
1042
1087
  }
1043
1088
  };
1044
- }, [n, o.length]), /* @__PURE__ */ N("div", { className: "zoomLevel", children: [
1045
- /* @__PURE__ */ l("div", { className: "zoomLevelValue", children: t }),
1046
- /* @__PURE__ */ l("div", { className: "zoomLevelLabel", children: ee(e.locale, "ZOOM_LABEL") ?? "zoom" })
1089
+ }, [t, v]), /* @__PURE__ */ N("div", { className: "zoomLevel", children: [
1090
+ /* @__PURE__ */ l("div", { className: "zoomLevelValue", children: i }),
1091
+ /* @__PURE__ */ l("div", { className: "zoomLevelLabel", children: Z(e, "ZOOM_LABEL") ?? "zoom" })
1047
1092
  ] });
1048
1093
  };
1049
- const Sr = -1, Mr = (e) => {
1050
- const n = le(), [t, i] = A(), { sceneModes: o } = e, r = (d) => o.findIndex((u) => u === d) > Sr;
1051
- return I(() => {
1094
+ const Ir = -1, xr = (e) => {
1095
+ const n = le(), [t, i] = I(), { sceneModes: o } = e, r = (c) => o.findIndex((u) => u === c) > Ir;
1096
+ return x(() => {
1052
1097
  i(n.scene.mode);
1053
1098
  }, []), /* @__PURE__ */ N(te, { children: [
1054
1099
  r(oe.SCENE3D) && /* @__PURE__ */ l(
1055
- Pe,
1100
+ Ie,
1056
1101
  {
1057
1102
  icon: /* @__PURE__ */ l("div", { className: `mapViewIcon ${t === oe.SCENE3D ? "mapViewCurrent" : ""}`, children: /* @__PURE__ */ l("svg", { width: "100%", height: "100%", viewBox: "0 0 64 64", children: /* @__PURE__ */ l("path", { d: "m 32.401392,4.9330437 c -7.087603,0 -14.096095,2.884602 -19.10793,7.8946843 -5.0118352,5.010083 -7.9296167,11.987468 -7.9296167,19.072999 0,7.085531 2.9177815,14.097848 7.9296167,19.107931 4.837653,4.835961 11.541408,7.631372 18.374354,7.82482 0.05712,0.01231 0.454119,0.139729 0.454119,0.139729 l 0.03493,-0.104797 c 0.08246,7.84e-4 0.162033,0.03493 0.244525,0.03493 0.08304,0 0.161515,-0.03414 0.244526,-0.03493 l 0.03493,0.104797 c 0,0 0.309474,-0.129487 0.349323,-0.139729 6.867765,-0.168094 13.582903,-2.965206 18.444218,-7.82482 2.558195,-2.5573 4.551081,-5.638134 5.903547,-8.977584 1.297191,-3.202966 2.02607,-6.661489 2.02607,-10.130347 0,-6.237309 -2.366261,-12.31219 -6.322734,-17.116794 -0.0034,-0.02316 0.0049,-0.04488 0,-0.06986 -0.01733,-0.08745 -0.104529,-0.278855 -0.104797,-0.279458 -5.31e-4,-0.0012 -0.522988,-0.628147 -0.523984,-0.62878 -3.47e-4,-2.2e-4 -0.133444,-0.03532 -0.244525,-0.06987 C 51.944299,13.447603 51.751076,13.104317 51.474391,12.827728 46.462556,7.8176457 39.488996,4.9330437 32.401392,4.9330437 z m -2.130866,3.5281554 0.104797,9.6762289 c -4.111695,-0.08361 -7.109829,-0.423664 -9.257041,-0.943171 1.198093,-2.269271 2.524531,-4.124404 3.91241,-5.414496 2.167498,-2.0147811 3.950145,-2.8540169 5.239834,-3.3185619 z m 2.794579,0 c 1.280302,0.4754953 3.022186,1.3285948 5.065173,3.2486979 1.424667,1.338973 2.788862,3.303645 3.982275,5.728886 -2.29082,0.403367 -5.381258,0.621049 -8.942651,0.698645 L 33.065105,8.4611991 z m 5.728886,0.2445256 c 4.004072,1.1230822 7.793098,3.1481363 10.724195,6.0782083 0.03468,0.03466 0.07033,0.06991 0.104797,0.104797 -0.45375,0.313891 -0.923054,0.663002 -1.956205,1.082899 -0.647388,0.263114 -1.906242,0.477396 -2.829511,0.733577 -1.382296,-2.988132 -3.027146,-5.368585 -4.785716,-7.0213781 -0.422866,-0.397432 -0.835818,-0.6453247 -1.25756,-0.9781032 z m -15.33525,0.7685092 c -0.106753,0.09503 -0.207753,0.145402 -0.31439,0.244526 -1.684973,1.5662541 -3.298068,3.8232211 -4.680919,6.5672591 -0.343797,-0.14942 -1.035052,-0.273198 -1.292493,-0.419186 -0.956528,-0.542427 -1.362964,-1.022024 -1.537018,-1.292493 -0.0241,-0.03745 -0.01868,-0.0401 -0.03493,-0.06986 2.250095,-2.163342 4.948824,-3.869984 7.859752,-5.0302421 z m -9.641296,7.0912431 c 0.464973,0.571618 0.937729,1.169056 1.956205,1.746612 0.349907,0.198425 1.107143,0.335404 1.537018,0.523983 -1.20166,3.172984 -1.998037,7.051901 -2.165798,11.772162 C 14.256557,30.361384 12.934823,30.161483 12.280427,29.90959 10.644437,29.279855 9.6888882,28.674891 9.1714586,28.267775 8.6540289,27.860658 8.6474751,27.778724 8.6474751,27.778724 l -0.069864,0.03493 C 9.3100294,23.691285 11.163248,19.798527 13.817445,16.565477 z m 37.552149,0.523984 c 2.548924,3.289983 4.265057,7.202594 4.890513,11.318043 -0.650428,0.410896 -1.756876,1.001936 -3.563088,1.606882 -1.171552,0.392383 -3.163859,0.759153 -4.960377,1.117832 -0.04367,-4.752703 -0.784809,-8.591423 -1.88634,-11.807094 0.917574,-0.263678 2.170552,-0.486495 2.864443,-0.76851 1.274693,-0.518066 2.003942,-1.001558 2.654849,-1.467153 z m -31.439008,2.619917 c 2.487341,0.672766 5.775813,1.137775 10.479669,1.222628 l 0.104797,10.689263 0,0.03493 0,0.733577 c -5.435005,-0.09059 -9.512219,-0.519044 -12.610536,-1.117831 0.106127,-4.776683 0.879334,-8.55791 2.02607,-11.562569 z m 23.264866,0.31439 c 1.073459,3.067541 1.833795,6.821314 1.816476,11.702298 -3.054474,0.423245 -7.062018,0.648559 -11.702298,0.698644 l 0,-0.838373 -0.104796,-10.654331 c 4.082416,-0.0864 7.404468,-0.403886 9.990618,-0.908238 z M 8.2632205,30.922625 c 0.7558676,0.510548 1.5529563,1.013339 3.0041715,1.57195 0.937518,0.360875 2.612202,0.647642 3.91241,0.978102 0.112814,3.85566 0.703989,7.107756 1.606883,9.920754 -1.147172,-0.324262 -2.644553,-0.640648 -3.423359,-0.978102 -1.516688,-0.657177 -2.386627,-1.287332 -2.864443,-1.71168 -0.477816,-0.424347 -0.489051,-0.489051 -0.489051,-0.489051 L 9.8002387,40.319395 C 8.791691,37.621767 8.1584238,34.769583 8.1584238,31.900727 c 0,-0.330153 0.090589,-0.648169 0.1047967,-0.978102 z m 48.2763445,0.419186 c 0.0047,0.188973 0.06986,0.36991 0.06986,0.558916 0,2.938869 -0.620228,5.873558 -1.676747,8.628261 -0.07435,0.07583 -0.06552,0.07411 -0.454119,0.349323 -0.606965,0.429857 -1.631665,1.042044 -3.318562,1.676747 -1.208528,0.454713 -3.204964,0.850894 -5.135038,1.25756 0.84593,-2.765726 1.41808,-6.005357 1.606883,-9.815957 2.232369,-0.413371 4.483758,-0.840201 5.938479,-1.327425 1.410632,-0.472457 2.153108,-0.89469 2.96924,-1.327425 z m -38.530252,2.864443 c 3.208141,0.56697 7.372279,0.898588 12.575603,0.978103 l 0.174662,9.885821 c -4.392517,-0.06139 -8.106722,-0.320566 -10.863925,-0.803441 -1.051954,-2.664695 -1.692909,-6.043794 -1.88634,-10.060483 z m 26.793022,0.31439 c -0.246298,3.923551 -0.877762,7.263679 -1.816476,9.885822 -2.561957,0.361954 -5.766249,0.560708 -9.431703,0.62878 l -0.174661,-9.815957 c 4.491734,-0.04969 8.334769,-0.293032 11.42284,-0.698645 z M 12.035901,44.860585 c 0.09977,0.04523 0.105535,0.09465 0.209594,0.139729 1.337656,0.579602 3.441099,1.058072 5.589157,1.537018 1.545042,3.399208 3.548524,5.969402 5.589157,7.789888 -3.034411,-1.215537 -5.871615,-3.007978 -8.174142,-5.309699 -1.245911,-1.245475 -2.271794,-2.662961 -3.213766,-4.156936 z m 40.69605,0 c -0.941972,1.493975 -1.967855,2.911461 -3.213765,4.156936 -2.74253,2.741571 -6.244106,4.696717 -9.955686,5.868615 0.261347,-0.241079 0.507495,-0.394491 0.768509,-0.663713 1.674841,-1.727516 3.320792,-4.181056 4.645987,-7.265904 2.962447,-0.503021 5.408965,-1.122293 7.161107,-1.781544 0.284034,-0.106865 0.337297,-0.207323 0.593848,-0.31439 z m -31.404076,2.305527 c 2.645807,0.376448 5.701178,0.649995 9.466635,0.698645 l 0.139729,7.789888 c -1.38739,-0.480844 -3.316218,-1.29837 -5.659022,-3.388427 -1.388822,-1.238993 -2.743668,-3.0113 -3.947342,-5.100106 z m 20.365491,0.104797 c -1.04872,2.041937 -2.174337,3.779068 -3.353494,4.995309 -1.853177,1.911459 -3.425515,2.82679 -4.611055,3.353494 l -0.139729,-7.789887 c 3.13091,-0.05714 5.728238,-0.278725 8.104278,-0.558916 z" }) }) }),
1058
1103
  onClick: () => {
@@ -1061,7 +1106,7 @@ const Sr = -1, Mr = (e) => {
1061
1106
  }
1062
1107
  ),
1063
1108
  r(oe.SCENE2D) && /* @__PURE__ */ l(
1064
- Pe,
1109
+ Ie,
1065
1110
  {
1066
1111
  icon: /* @__PURE__ */ l("div", { className: `mapViewIcon ${t === oe.SCENE2D ? "mapViewCurrent" : ""}`, children: /* @__PURE__ */ l("svg", { width: "100%", height: "100%", viewBox: "0 0 64 64", children: /* @__PURE__ */ l("path", { d: "m 2.9825053,17.550598 0,1.368113 0,26.267766 0,1.368113 1.36811,0 54.9981397,0 1.36811,0 0,-1.368113 0,-26.267766 0,-1.368113 -1.36811,0 -54.9981397,0 -1.36811,0 z m 2.73623,2.736226 10.3292497,0 0,10.466063 -10.3292497,0 0,-10.466063 z m 13.0654697,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 10.32926,0 0,10.466063 -10.32926,0 0,-10.466063 z m -41.9326497,13.202288 10.3292497,0 0,10.329252 -10.3292497,0 0,-10.329252 z m 13.0654697,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 10.32926,0 0,10.329252 -10.32926,0 0,-10.329252 z" }) }) }),
1067
1112
  onClick: () => {
@@ -1070,7 +1115,7 @@ const Sr = -1, Mr = (e) => {
1070
1115
  }
1071
1116
  ),
1072
1117
  r(oe.COLUMBUS_VIEW) && /* @__PURE__ */ l(
1073
- Pe,
1118
+ Ie,
1074
1119
  {
1075
1120
  icon: /* @__PURE__ */ l("div", { className: `mapViewIcon ${t === oe.COLUMBUS_VIEW ? "mapViewCurrent" : ""}`, children: /* @__PURE__ */ l("svg", { width: "100%", height: "100%", viewBox: "0 0 64 64", children: /* @__PURE__ */ l("path", { d: "m 14.723969,17.675598 -0.340489,0.817175 -11.1680536,26.183638 -0.817175,1.872692 2.076986,0 54.7506996,0 2.07698,0 -0.81717,-1.872692 -11.16805,-26.183638 -0.34049,-0.817175 -0.91933,0 -32.414586,0 -0.919322,0 z m 1.838643,2.723916 6.196908,0 -2.928209,10.418977 -7.729111,0 4.460412,-10.418977 z m 9.02297,0 4.903049,0 0,10.418977 -7.831258,0 2.928209,-10.418977 z m 7.626964,0 5.584031,0 2.62176,10.418977 -8.205791,0 0,-10.418977 z m 8.410081,0 5.51593,0 4.46042,10.418977 -7.38863,0 -2.58772,-10.418977 z m -30.678091,13.142892 8.103649,0 -2.89416,10.282782 -9.6018026,0 4.3923136,-10.282782 z m 10.929711,0 8.614384,0 0,10.282782 -11.508544,0 2.89416,-10.282782 z m 11.338299,0 8.852721,0 2.58772,10.282782 -11.440441,0 0,-10.282782 z m 11.678781,0 7.86531,0 4.39231,10.282782 -9.6699,0 -2.58772,-10.282782 z" }) }) }),
1076
1121
  onClick: () => {
@@ -1080,87 +1125,87 @@ const Sr = -1, Mr = (e) => {
1080
1125
  )
1081
1126
  ] });
1082
1127
  };
1083
- const Pr = ke(
1084
- (e) => We({
1128
+ const Ar = Ne(
1129
+ (e) => Ue({
1085
1130
  mapContainer: {
1086
1131
  width: "60px",
1087
1132
  height: "60px",
1088
1133
  border: `${e.palette.background.paper} 2px solid`
1089
1134
  }
1090
1135
  })
1091
- ), Dr = (e) => {
1092
- const n = le(), { baseMaps: t } = e, [i, o] = A(" "), [r, d] = A(), u = Pr();
1093
- I(() => {
1094
- const E = t == null ? void 0 : t.maps.find((C) => C.isCurrent);
1095
- E && (d(E), o(E.title !== void 0 ? E.title : " "));
1136
+ ), kr = (e) => {
1137
+ const n = le(), { baseMaps: t } = e, [i, o] = I(" "), [r, c] = I(), u = Ar();
1138
+ x(() => {
1139
+ const v = t == null ? void 0 : t.maps.find((E) => E.isCurrent);
1140
+ v && (c(v), o(v.title !== void 0 ? v.title : " "));
1096
1141
  }, [t]);
1097
- const h = (E) => {
1098
- var C, L;
1142
+ const m = (v) => {
1143
+ var E, _;
1099
1144
  if (t) {
1100
- (C = n.layersManager) == null || C.removeBaseMapLayers();
1101
- const b = t.maps.find((P) => P.id === E);
1102
- b && ((L = n.layersManager) == null || L.setBaseMapLayers(b), d(b), t.maps.forEach((P) => {
1103
- P.isCurrent = b === P;
1145
+ (E = n.layersManager) == null || E.removeBaseMapLayers();
1146
+ const w = t.maps.find((P) => P.id === v);
1147
+ w && ((_ = n.layersManager) == null || _.setBaseMapLayers(w), c(w), t.maps.forEach((P) => {
1148
+ P.isCurrent = w === P;
1104
1149
  }));
1105
1150
  }
1106
1151
  };
1107
1152
  return /* @__PURE__ */ N(te, { children: [
1108
1153
  /* @__PURE__ */ l("label", { className: "mapLabel", children: i }),
1109
- /* @__PURE__ */ l("ul", { className: "mapSelector", children: t == null ? void 0 : t.maps.map((E) => /* @__PURE__ */ l("li", { className: `mapContainer ${u.mapContainer} ${E === r ? "mapContainerSelected" : ""}`, children: /* @__PURE__ */ l(
1154
+ /* @__PURE__ */ l("ul", { className: "mapSelector", children: t == null ? void 0 : t.maps.map((v) => /* @__PURE__ */ l("li", { className: `mapContainer ${u.mapContainer} ${v === r ? "mapContainerSelected" : ""}`, children: /* @__PURE__ */ l(
1110
1155
  "img",
1111
1156
  {
1112
1157
  alt: "",
1113
1158
  className: "mapContainerImg",
1114
- src: E.thumbnail,
1159
+ src: v.thumbnail,
1115
1160
  onMouseOver: () => {
1116
- o(E.title);
1161
+ o(v.title);
1117
1162
  },
1118
1163
  onMouseOut: () => {
1119
1164
  o((r == null ? void 0 : r.title) !== void 0 ? r.title : " ");
1120
1165
  },
1121
1166
  onClick: () => {
1122
- h(E.id);
1167
+ m(v.id);
1123
1168
  }
1124
1169
  }
1125
- ) }, E.id)) })
1170
+ ) }, v.id)) })
1126
1171
  ] });
1127
1172
  };
1128
- const Je = "ic_settings_24px", Ar = (e) => {
1129
- const [n, t] = A(!1), { sceneModes: i, baseMaps: o, locale: r } = e, d = be(null), u = ee(r, "MAP_SETTINGS_DIALOG_TITLE") ?? "Map Settings", h = ee(r, "MAP_SETTINGS_SCENE_MODE_TITLE") ?? "Scene Mode", E = ee(r, "MAP_SETTINGS_BASE_MAP_TITLE") ?? "Base Map";
1130
- return I(() => {
1131
- const C = (L) => {
1132
- var B;
1133
- const b = L.target, P = ee(d, "current");
1134
- P && !P.contains(b) && b.id !== Je && ((B = b.parentElement) == null ? void 0 : B.id) !== Je && (document.removeEventListener("click", C, !1), t(!1));
1173
+ const Qe = "ic_settings_24px", Or = (e) => {
1174
+ const [n, t] = I(!1), { sceneModes: i, baseMaps: o, locale: r } = e, c = _e(null), u = Z(r, "MAP_SETTINGS_DIALOG_TITLE") ?? "Map Settings", m = Z(r, "MAP_SETTINGS_SCENE_MODE_TITLE") ?? "Scene Mode", v = Z(r, "MAP_SETTINGS_BASE_MAP_TITLE") ?? "Base Map";
1175
+ return x(() => {
1176
+ const E = (_) => {
1177
+ var R;
1178
+ const w = _.target, P = Z(c, "current");
1179
+ P && !P.contains(w) && w.id !== Qe && ((R = w.parentElement) == null ? void 0 : R.id) !== Qe && (document.removeEventListener("click", E, !1), t(!1));
1135
1180
  };
1136
- return document.addEventListener("click", C, !1), () => {
1137
- document.removeEventListener("click", C, !1);
1181
+ return document.addEventListener("click", E, !1), () => {
1182
+ document.removeEventListener("click", E, !1);
1138
1183
  };
1139
1184
  }), /* @__PURE__ */ N(te, { children: [
1140
1185
  /* @__PURE__ */ l(
1141
- Pe,
1186
+ Ie,
1142
1187
  {
1143
- icon: /* @__PURE__ */ l("div", { className: "settingsIconContainer", children: /* @__PURE__ */ l("svg", { width: "100%", height: "100%", viewBox: "0 0 24 24", id: Je, x: "288", y: "24", children: /* @__PURE__ */ l("path", { d: "M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65A.488.488 0 0 0 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.23.09.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z" }) }) }),
1188
+ icon: /* @__PURE__ */ l("div", { className: "settingsIconContainer", children: /* @__PURE__ */ l("svg", { width: "100%", height: "100%", viewBox: "0 0 24 24", id: Qe, x: "288", y: "24", children: /* @__PURE__ */ l("path", { d: "M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65A.488.488 0 0 0 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.23.09.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z" }) }) }),
1144
1189
  onClick: () => {
1145
1190
  t(!n);
1146
1191
  }
1147
1192
  }
1148
1193
  ),
1149
- n && /* @__PURE__ */ l("div", { id: "dialog-portal-example", className: "settingsDialogPortal", ref: d, children: /* @__PURE__ */ N(
1150
- Mn,
1194
+ n && /* @__PURE__ */ l("div", { id: "dialog-portal-example", className: "settingsDialogPortal", ref: c, children: /* @__PURE__ */ N(
1195
+ Dn,
1151
1196
  {
1152
1197
  open: n,
1153
1198
  onClosed: () => {
1154
1199
  t(!1);
1155
1200
  },
1156
1201
  children: [
1157
- /* @__PURE__ */ l(Pn, { children: u }),
1158
- /* @__PURE__ */ N(Dn, { children: [
1159
- /* @__PURE__ */ l("h4", { className: "sectionLabel", children: h }),
1160
- /* @__PURE__ */ l(ae, { className: "mapScenesContainer", children: /* @__PURE__ */ l(Mr, { sceneModes: i }) }),
1161
- /* @__PURE__ */ l(ae, { className: "baseMapsContainer", children: o && /* @__PURE__ */ N(te, { children: [
1162
- /* @__PURE__ */ l("h4", { className: "sectionLabel", children: E }),
1163
- /* @__PURE__ */ l(Dr, { baseMaps: o })
1202
+ /* @__PURE__ */ l(In, { children: u }),
1203
+ /* @__PURE__ */ N(xn, { children: [
1204
+ /* @__PURE__ */ l("h4", { className: "sectionLabel", children: m }),
1205
+ /* @__PURE__ */ l(ce, { className: "mapScenesContainer", children: /* @__PURE__ */ l(xr, { sceneModes: i }) }),
1206
+ /* @__PURE__ */ l(ce, { className: "baseMapsContainer", children: o && /* @__PURE__ */ N(te, { children: [
1207
+ /* @__PURE__ */ l("h4", { className: "sectionLabel", children: v }),
1208
+ /* @__PURE__ */ l(kr, { baseMaps: o })
1164
1209
  ] }) })
1165
1210
  ] })
1166
1211
  ]
@@ -1168,32 +1213,32 @@ const Je = "ic_settings_24px", Ar = (e) => {
1168
1213
  ) })
1169
1214
  ] });
1170
1215
  };
1171
- const Ir = /* @__PURE__ */ l("svg", { xmlns: "http://www.w3.org/2000/svg", enableBackground: "new 0 0 24 24", height: "24", width: "24", viewBox: "0 0 612 612", children: /* @__PURE__ */ N("g", { xmlns: "http://www.w3.org/2000/svg", children: [
1216
+ const Rr = /* @__PURE__ */ l("svg", { xmlns: "http://www.w3.org/2000/svg", enableBackground: "new 0 0 24 24", height: "24", width: "24", viewBox: "0 0 612 612", children: /* @__PURE__ */ N("g", { xmlns: "http://www.w3.org/2000/svg", children: [
1172
1217
  /* @__PURE__ */ l("path", { d: "M322.4,173.9l-129,16.2l-4.6,21.4l25.3,4.7c16.5,3.9,19.8,9.9,16.2,26.4l-41.5,195.3c-10.9,50.5,5.9,74.3,45.5,74.3 c30.7,0,66.3-14.2,82.5-33.6l4.9-23.4c-11.3,9.9-27.7,13.9-38.6,13.9c-15.5,0-21.1-10.9-17.1-30L322.4,173.9z" }),
1173
1218
  /* @__PURE__ */ l("circle", { cx: "270.1", cy: "56.3", r: "56.3" })
1174
- ] }) }), xr = ({ onClick: e }) => /* @__PURE__ */ l(ae, { onClick: e, className: "mapLegendToggleContainer", children: /* @__PURE__ */ l(Pe, { icon: Ir, className: "mapLegendIcon" }) }), kr = ({ legend: { legendImg: e, legendDoc: n, layer: t }, docText: i, imgText: o }) => {
1219
+ ] }) }), Nr = ({ onClick: e }) => /* @__PURE__ */ l(ce, { onClick: e, className: "mapLegendToggleContainer", children: /* @__PURE__ */ l(Ie, { icon: Rr, className: "mapLegendIcon" }) }), Br = ({ legend: { legendImg: e, legendDoc: n, layer: t }, docText: i, imgText: o }) => {
1175
1220
  const r = me(() => {
1176
1221
  window.open(e, "_blank");
1177
1222
  }, [e]);
1178
1223
  me(() => {
1179
1224
  window.open(n, "_blank");
1180
1225
  }, [n]);
1181
- const d = me(() => {
1182
- const E = /* @__PURE__ */ l(ae, { className: "layerNameContainer", children: /* @__PURE__ */ l("h3", { style: { maxWidth: `${15}ch` }, className: "layerName", children: t }) });
1183
- return (t ?? "").length > 15 ? /* @__PURE__ */ l(tt, { content: t, children: E }) : E;
1226
+ const c = me(() => {
1227
+ const v = /* @__PURE__ */ l(ce, { className: "layerNameContainer", children: /* @__PURE__ */ l("h3", { style: { maxWidth: `${15}ch` }, className: "layerName", children: t }) });
1228
+ return (t ?? "").length > 15 ? /* @__PURE__ */ l(nt, { content: t, children: v }) : v;
1184
1229
  }, [t]), u = me(() => [
1185
1230
  typeof e == "string" && /* @__PURE__ */ l("a", { className: "legendAction", href: e, target: "_blank", rel: "noreferrer", children: o }),
1186
1231
  typeof n == "string" && /* @__PURE__ */ l("a", { className: "legendAction", href: n, target: "_blank", rel: "noreferrer", children: i })
1187
1232
  ], [e, o, n, i]);
1188
- return /* @__PURE__ */ N(ae, { className: "mapLegend", children: [
1189
- d(),
1233
+ return /* @__PURE__ */ N(ce, { className: "mapLegend", children: [
1234
+ c(),
1190
1235
  /* @__PURE__ */ l("img", { alt: "Map Legend", className: "legendImg", src: e, onClick: r }),
1191
- /* @__PURE__ */ l(ae, { className: "legendActionsContainer", children: u() })
1236
+ /* @__PURE__ */ l(ce, { className: "legendActionsContainer", children: u() })
1192
1237
  ] });
1193
- }, Or = ({ legends: e, actionsTexts: { docText: n, imgText: t }, noLegendsText: i }) => {
1194
- const o = me(() => /* @__PURE__ */ l(ae, { className: "noLegendsContainer", children: /* @__PURE__ */ l("h2", { className: "noLegendsMsg", children: i }) }), [i]), r = me(() => e.length ? e.map((d, u) => /* @__PURE__ */ l(kr, { legend: d, docText: n, imgText: t }, `${d.layer}_${u}`)) : o(), [e]);
1195
- return /* @__PURE__ */ l(ae, { className: "mapLegendsList", children: r() });
1196
- }, Rr = ({
1238
+ }, Fr = ({ legends: e, actionsTexts: { docText: n, imgText: t }, noLegendsText: i }) => {
1239
+ const o = me(() => /* @__PURE__ */ l(ce, { className: "noLegendsContainer", children: /* @__PURE__ */ l("h2", { className: "noLegendsMsg", children: i }) }), [i]), r = me(() => e.length ? e.map((c, u) => /* @__PURE__ */ l(Br, { legend: c, docText: n, imgText: t }, `${c.layer}_${u}`)) : o(), [e]);
1240
+ return /* @__PURE__ */ l(ce, { className: "mapLegendsList", children: r() });
1241
+ }, Hr = ({
1197
1242
  isOpen: e,
1198
1243
  toggleSidebar: n,
1199
1244
  title: t = "Map Legends",
@@ -1201,117 +1246,117 @@ const Ir = /* @__PURE__ */ l("svg", { xmlns: "http://www.w3.org/2000/svg", enabl
1201
1246
  actionsTexts: o = { docText: "Docs", imgText: "View Image" },
1202
1247
  legends: r = []
1203
1248
  }) => e ? /* @__PURE__ */ N(An, { className: "mapLegendSidebarContainer", modal: !1, dismissible: !0, open: e, children: [
1204
- /* @__PURE__ */ l(In, { className: "sidebarHeaderContainer", children: /* @__PURE__ */ l(xn, { className: "sidebarTitle", children: t }) }),
1205
- /* @__PURE__ */ N(kn, { className: "sidebarContent", children: [
1206
- /* @__PURE__ */ l(Pe, { onClick: n, className: "mapLegendCloseBtn", icon: { icon: "close", size: "small" } }),
1207
- /* @__PURE__ */ l(Or, { noLegendsText: i, legends: r, actionsTexts: o })
1249
+ /* @__PURE__ */ l(kn, { className: "sidebarHeaderContainer", children: /* @__PURE__ */ l(On, { className: "sidebarTitle", children: t }) }),
1250
+ /* @__PURE__ */ N(Rn, { className: "sidebarContent", children: [
1251
+ /* @__PURE__ */ l(Ie, { onClick: n, className: "mapLegendCloseBtn", icon: { icon: "close", size: "small" } }),
1252
+ /* @__PURE__ */ l(Fr, { noLegendsText: i, legends: r, actionsTexts: o })
1208
1253
  ] })
1209
- ] }) : null, ue = document.createElement("canvas"), re = ue.getContext("2d"), Tt = (e) => {
1254
+ ] }) : null, he = document.createElement("canvas"), re = he.getContext("2d"), St = (e) => {
1210
1255
  const i = (e == null ? void 0 : e.data) ?? [];
1211
1256
  for (let o = 3; o < i.length; o += 4)
1212
1257
  if (i[o] < 255)
1213
1258
  return !0;
1214
1259
  return !1;
1215
- }, Nr = async (e, n) => (n && n.tileTransparencyCheckedCounter++, new Promise((t, i) => {
1260
+ }, Gr = async (e, n) => (n && n.tileTransparencyCheckedCounter++, new Promise((t, i) => {
1216
1261
  try {
1217
- re == null || re.clearRect(0, 0, ue.width, ue.height);
1262
+ re == null || re.clearRect(0, 0, he.width, he.height);
1218
1263
  let o;
1219
1264
  if (e instanceof HTMLImageElement)
1220
1265
  o = e;
1221
1266
  else if (e instanceof ImageBitmap) {
1222
- ue.width = e.width, ue.height = e.height, re == null || re.drawImage(e, 0, 0);
1223
- const r = re == null ? void 0 : re.getImageData(0, 0, ue.width, ue.height), d = Tt(r);
1224
- d && n && (n.tileTransparencyCheckedCounter = n.maxTilesForTransparencyCheck), t(d);
1267
+ he.width = e.width, he.height = e.height, re == null || re.drawImage(e, 0, 0);
1268
+ const r = re == null ? void 0 : re.getImageData(0, 0, he.width, he.height), c = St(r);
1269
+ c && n && (n.tileTransparencyCheckedCounter = n.maxTilesForTransparencyCheck), t(c);
1225
1270
  return;
1226
1271
  } else
1227
1272
  o = new Image(), o.crossOrigin = "anonymous", o.src = e;
1228
1273
  o.onload = () => {
1229
- ue.width = o.width, ue.height = o.height, re == null || re.drawImage(o, 0, 0);
1230
- const r = re == null ? void 0 : re.getImageData(0, 0, ue.width, ue.height);
1231
- Tt(r) ? (n && (n.tileTransparencyCheckedCounter = n.maxTilesForTransparencyCheck), t(!0)) : t(!1);
1274
+ he.width = o.width, he.height = o.height, re == null || re.drawImage(o, 0, 0);
1275
+ const r = re == null ? void 0 : re.getImageData(0, 0, he.width, he.height);
1276
+ St(r) ? (n && (n.tileTransparencyCheckedCounter = n.maxTilesForTransparencyCheck), t(!0)) : t(!1);
1232
1277
  };
1233
1278
  } catch (o) {
1234
1279
  console.error("Could not determine image transparency. Error => ", o), i(o);
1235
1280
  }
1236
- })), Fe = (e, n) => {
1237
- const { west: t, east: i, north: o, south: r } = e, { west: d, east: u, north: h, south: E } = n;
1238
- return t >= d && i <= u && o <= h && r >= E;
1239
- }, Ue = 3, ze = "hasTransparency";
1240
- function ht(e, n, t, i, o) {
1281
+ })), He = (e, n) => {
1282
+ const { west: t, east: i, north: o, south: r } = e, { west: c, east: u, north: m, south: v } = n;
1283
+ return t >= c && i <= u && o <= m && r >= v;
1284
+ }, Ke = 3, We = "hasTransparency";
1285
+ function mt(e, n, t, i, o) {
1241
1286
  return setTimeout(() => {
1242
1287
  var u;
1243
1288
  const r = (u = this.layerListInstance.find(
1244
1289
  /* eslint-disable */
1245
- (h) => {
1246
- var E, C;
1247
- return ((E = h._imageryProvider._resource) == null ? void 0 : E._url) === ((C = this._resource) == null ? void 0 : C._url);
1290
+ (m) => {
1291
+ var v, E;
1292
+ return ((v = m._imageryProvider._resource) == null ? void 0 : v._url) === ((E = this._resource) == null ? void 0 : E._url);
1248
1293
  }
1249
1294
  /* eslint-enable */
1250
- )) == null ? void 0 : u.meta, d = ee(r, ze) === !0;
1251
- this.tileTransparencyCheckedCounter < Ue && !d && Nr(o == null ? void 0 : o.url, this).then((h) => {
1252
- var E;
1253
- (E = this.mapViewer.layersManager) == null || E.addMetaToLayer(
1254
- { [ze]: h },
1295
+ )) == null ? void 0 : u.meta, c = Z(r, We) === !0;
1296
+ this.tileTransparencyCheckedCounter < Ke && !c && Gr(o == null ? void 0 : o.url, this).then((m) => {
1297
+ var v;
1298
+ (v = this.mapViewer.layersManager) == null || v.addMetaToLayer(
1299
+ { [We]: m },
1255
1300
  /* eslint-disable */
1256
- (C) => C._imageryProvider._resource._url === this._resource._url
1301
+ (E) => E._imageryProvider._resource._url === this._resource._url
1257
1302
  );
1258
1303
  });
1259
1304
  }, 0), e(n, t, i, o);
1260
1305
  }
1261
- class nn extends lt {
1306
+ class on extends ct {
1262
1307
  constructor(t, i) {
1263
1308
  var o;
1264
1309
  super(t);
1265
- Z(this, "layerListInstance");
1266
- Z(this, "mapViewer");
1267
- Z(this, "maxTilesForTransparencyCheck", Ue);
1268
- Z(this, "tileTransparencyCheckedCounter", 0);
1310
+ X(this, "layerListInstance");
1311
+ X(this, "mapViewer");
1312
+ X(this, "maxTilesForTransparencyCheck", Ke);
1313
+ X(this, "tileTransparencyCheckedCounter", 0);
1269
1314
  this.layerListInstance = (o = i.layersManager) == null ? void 0 : o.layerList, this.mapViewer = i;
1270
1315
  }
1271
1316
  requestImage(t, i, o, r) {
1272
- return ht.call(this, super.requestImage.bind(this), t, i, o, r);
1317
+ return mt.call(this, super.requestImage.bind(this), t, i, o, r);
1273
1318
  }
1274
1319
  }
1275
- class rn extends ct {
1320
+ class sn extends dt {
1276
1321
  constructor(t, i) {
1277
1322
  var o;
1278
1323
  super(t);
1279
- Z(this, "layerListInstance");
1280
- Z(this, "mapViewer");
1281
- Z(this, "maxTilesForTransparencyCheck", Ue);
1282
- Z(this, "tileTransparencyCheckedCounter", 0);
1324
+ X(this, "layerListInstance");
1325
+ X(this, "mapViewer");
1326
+ X(this, "maxTilesForTransparencyCheck", Ke);
1327
+ X(this, "tileTransparencyCheckedCounter", 0);
1283
1328
  this.layerListInstance = (o = i.layersManager) == null ? void 0 : o.layerList, this.mapViewer = i;
1284
1329
  }
1285
1330
  requestImage(t, i, o, r) {
1286
- return ht.call(this, super.requestImage.bind(this), t, i, o, r);
1331
+ return mt.call(this, super.requestImage.bind(this), t, i, o, r);
1287
1332
  }
1288
1333
  }
1289
- class on extends dt {
1334
+ class an extends ut {
1290
1335
  constructor(t, i) {
1291
1336
  var o;
1292
1337
  super(t);
1293
- Z(this, "layerListInstance");
1294
- Z(this, "mapViewer");
1295
- Z(this, "maxTilesForTransparencyCheck", Ue);
1296
- Z(this, "tileTransparencyCheckedCounter", 0);
1338
+ X(this, "layerListInstance");
1339
+ X(this, "mapViewer");
1340
+ X(this, "maxTilesForTransparencyCheck", Ke);
1341
+ X(this, "tileTransparencyCheckedCounter", 0);
1297
1342
  this.layerListInstance = (o = i.layersManager) == null ? void 0 : o.layerList, this.mapViewer = i;
1298
1343
  }
1299
1344
  requestImage(t, i, o, r) {
1300
- return ht.call(this, super.requestImage.bind(this), t, i, o, r);
1345
+ return mt.call(this, super.requestImage.bind(this), t, i, o, r);
1301
1346
  }
1302
1347
  }
1303
- const Br = 1, Fr = -1, _t = "TRANSPARENT_BASE_LAYER";
1304
- class Hr {
1348
+ const Vr = 1, zr = -1, Mt = "TRANSPARENT_BASE_LAYER";
1349
+ class $r {
1305
1350
  constructor(n, t, i, o) {
1306
- Z(this, "mapViewer");
1307
- Z(this, "legendsList");
1308
- Z(this, "layerUpdated");
1309
- Z(this, "layers");
1310
- Z(this, "legendsExtractor");
1311
- Z(this, "layerManagerFootprintMetaFieldPath");
1312
- this.mapViewer = n, this.layers = this.mapViewer.imageryLayers._layers, this.legendsList = [], this.legendsExtractor = t, this.layerUpdated = new hi(), this.layerManagerFootprintMetaFieldPath = o, i && this.layerUpdated.addEventListener(i, this), this.mapViewer.shouldOptimizedTileRequests && (this.layerUpdated.addEventListener((r) => {
1313
- const d = Object.keys(r);
1314
- d.length === 1 && d[0] === ze && (this.markRelevantLayersForExtent(), this.hideNonRelevantLayers());
1351
+ X(this, "mapViewer");
1352
+ X(this, "legendsList");
1353
+ X(this, "layerUpdated");
1354
+ X(this, "layers");
1355
+ X(this, "legendsExtractor");
1356
+ X(this, "layerManagerFootprintMetaFieldPath");
1357
+ this.mapViewer = n, this.layers = this.mapViewer.imageryLayers._layers, this.legendsList = [], this.legendsExtractor = t, this.layerUpdated = new bi(), this.layerManagerFootprintMetaFieldPath = o, i && this.layerUpdated.addEventListener(i, this), this.mapViewer.shouldOptimizedTileRequests && (this.layerUpdated.addEventListener((r) => {
1358
+ const c = Object.keys(r);
1359
+ c.length === 1 && c[0] === We && (this.markRelevantLayersForExtent(), this.hideNonRelevantLayers());
1315
1360
  }), this.mapViewer.imageryLayers.layerRemoved.addEventListener(() => {
1316
1361
  this.setLegends(), this.markRelevantLayersForExtent(), this.hideNonRelevantLayers();
1317
1362
  }), this.mapViewer.imageryLayers.layerMoved.addEventListener(() => {
@@ -1336,24 +1381,24 @@ class Hr {
1336
1381
  setBaseMapLayers(n) {
1337
1382
  n.baseRasteLayers.sort((i, o) => i.zIndex - o.zIndex).forEach((i, o) => {
1338
1383
  this.addRasterLayer(i, o, n.id);
1339
- }), this.mapViewer.shouldOptimizedTileRequests && (this.removeLayer(_t), this.addTransparentImageryProvider());
1384
+ }), this.mapViewer.shouldOptimizedTileRequests && (this.removeLayer(Mt), this.addTransparentImageryProvider());
1340
1385
  }
1341
1386
  addRasterLayer(n, t, i) {
1342
1387
  let o;
1343
1388
  switch (n.type) {
1344
1389
  case "XYZ_LAYER": {
1345
- const r = n.options, d = this.mapViewer.shouldOptimizedTileRequests ? new nn(r, this.mapViewer) : new lt(r);
1346
- o = this.mapViewer.imageryLayers.addImageryProvider(d, t);
1390
+ const r = n.options, c = this.mapViewer.shouldOptimizedTileRequests ? new on(r, this.mapViewer) : new ct(r);
1391
+ o = this.mapViewer.imageryLayers.addImageryProvider(c, t);
1347
1392
  break;
1348
1393
  }
1349
1394
  case "WMS_LAYER": {
1350
- const r = n.options, d = this.mapViewer.shouldOptimizedTileRequests ? new rn(r, this.mapViewer) : new ct(r);
1351
- o = this.mapViewer.imageryLayers.addImageryProvider(d, t);
1395
+ const r = n.options, c = this.mapViewer.shouldOptimizedTileRequests ? new sn(r, this.mapViewer) : new dt(r);
1396
+ o = this.mapViewer.imageryLayers.addImageryProvider(c, t);
1352
1397
  break;
1353
1398
  }
1354
1399
  case "WMTS_LAYER": {
1355
- const r = n.options, d = this.mapViewer.shouldOptimizedTileRequests ? new on(r, this.mapViewer) : new dt(r);
1356
- o = this.mapViewer.imageryLayers.addImageryProvider(d, t);
1400
+ const r = n.options, c = this.mapViewer.shouldOptimizedTileRequests ? new an(r, this.mapViewer) : new ut(r);
1401
+ o = this.mapViewer.imageryLayers.addImageryProvider(c, t);
1357
1402
  break;
1358
1403
  }
1359
1404
  }
@@ -1367,13 +1412,13 @@ class Hr {
1367
1412
  t && this.mapViewer.imageryLayers.remove(t, !0);
1368
1413
  }
1369
1414
  removeBaseMapLayers() {
1370
- this.layers.filter((t) => !!ee(t.meta, "parentBasetMapId")).forEach((t) => {
1415
+ this.layers.filter((t) => !!Z(t.meta, "parentBasetMapId")).forEach((t) => {
1371
1416
  this.mapViewer.imageryLayers.remove(t, !0);
1372
1417
  });
1373
1418
  }
1374
1419
  // Remove all non base layers
1375
1420
  removeNotBaseMapLayers() {
1376
- this.layers.filter((t) => !ee(t.meta, "parentBasetMapId")).forEach((t) => {
1421
+ this.layers.filter((t) => !Z(t.meta, "parentBasetMapId")).forEach((t) => {
1377
1422
  this.mapViewer.imageryLayers.remove(t, !0);
1378
1423
  });
1379
1424
  }
@@ -1385,8 +1430,8 @@ class Hr {
1385
1430
  this.updateLayersOrder(n, o, o + t);
1386
1431
  }
1387
1432
  lower(n, t = 1) {
1388
- const i = this.findLayerById(n), o = (i == null ? void 0 : i.meta).zIndex, r = this.getBaseLayersCount(), d = this.mapViewer.imageryLayers.indexOf(i);
1389
- if (d - t <= r && (t = d - r), i)
1433
+ const i = this.findLayerById(n), o = (i == null ? void 0 : i.meta).zIndex, r = this.getBaseLayersCount(), c = this.mapViewer.imageryLayers.indexOf(i);
1434
+ if (c - t <= r && (t = c - r), i)
1390
1435
  for (let u = 0; u < t; u++)
1391
1436
  this.mapViewer.imageryLayers.lower(i);
1392
1437
  this.updateLayersOrder(n, o, o - t);
@@ -1407,7 +1452,7 @@ class Hr {
1407
1452
  i !== void 0 && (i.show = t);
1408
1453
  }
1409
1454
  showAllNotBase(n) {
1410
- this.layers.filter((i) => !ee(i.meta, "parentBasetMapId")).forEach((i) => {
1455
+ this.layers.filter((i) => !Z(i.meta, "parentBasetMapId")).forEach((i) => {
1411
1456
  var o;
1412
1457
  this.show((o = i.meta) == null ? void 0 : o.id, n);
1413
1458
  });
@@ -1420,37 +1465,37 @@ class Hr {
1420
1465
  var o;
1421
1466
  const t = this.mapViewer.camera.getPickRay(n);
1422
1467
  let i;
1423
- return t && (i = (o = this.mapViewer.imageryLayers.pickImageryLayers(t, this.mapViewer.scene)) == null ? void 0 : o.filter((r) => !ee(r.meta, "parentBasetMapId"))), i;
1468
+ return t && (i = (o = this.mapViewer.imageryLayers.pickImageryLayers(t, this.mapViewer.scene)) == null ? void 0 : o.filter((r) => !Z(r.meta, "parentBasetMapId"))), i;
1424
1469
  }
1425
1470
  findLayerByPOI(n, t, i = !0) {
1426
1471
  if (this.layerManagerFootprintMetaFieldPath) {
1427
- const o = Cr(this.mapViewer, n, t);
1428
- return this.layers.filter((u) => !ee(u.meta, "parentBasetMapId")).filter((u) => {
1429
- const h = ee(u.meta, this.layerManagerFootprintMetaFieldPath);
1430
- return h !== void 0 ? Di(o.geometry, {
1472
+ const o = Tr(this.mapViewer, n, t);
1473
+ return this.layers.filter((u) => !Z(u.meta, "parentBasetMapId")).filter((u) => {
1474
+ const m = Z(u.meta, this.layerManagerFootprintMetaFieldPath);
1475
+ return m !== void 0 ? Ai(o.geometry, {
1431
1476
  type: "Feature",
1432
1477
  properties: {},
1433
- geometry: h
1478
+ geometry: m
1434
1479
  }) && (i ? u.show : !0) : (console.warn("[LayerManager] [findLayerByPOI] CesiumImageryLayer has no defined footprint", u.meta), !1);
1435
- }).sort((u, h) => {
1436
- var E, C;
1437
- return ((E = h.meta) == null ? void 0 : E.zIndex) - ((C = u.meta) == null ? void 0 : C.zIndex);
1480
+ }).sort((u, m) => {
1481
+ var v, E;
1482
+ return ((v = m.meta) == null ? void 0 : v.zIndex) - ((E = u.meta) == null ? void 0 : E.zIndex);
1438
1483
  });
1439
1484
  } else
1440
1485
  return console.warn("[LayerManager] [findLayerByPOI]layerManagerFootprintMetaFieldPath is not defined"), [];
1441
1486
  }
1442
1487
  addTransparentImageryProvider() {
1443
1488
  const n = this.mapViewer.imageryLayers.addImageryProvider(
1444
- new mi({
1489
+ new Ti({
1445
1490
  url: "./assets/img/transparent-tile.png",
1446
1491
  /* eslint-disable @typescript-eslint/no-magic-numbers */
1447
- rectangle: new Se(-3.141592653589793, -1.5707963267948966, 3.141592653589793, 1.5707963267948966)
1492
+ rectangle: new Pe(-3.141592653589793, -1.5707963267948966, 3.141592653589793, 1.5707963267948966)
1448
1493
  /* eslint-enable @typescript-eslint/no-magic-numbers */
1449
1494
  }),
1450
1495
  0
1451
1496
  );
1452
1497
  n.meta = {
1453
- id: _t,
1498
+ id: Mt,
1454
1499
  skipRelevancyCheck: !0,
1455
1500
  parentBasetMapId: "TRANSPARENT_LAYER"
1456
1501
  };
@@ -1459,18 +1504,18 @@ class Hr {
1459
1504
  typeof this.legendsExtractor < "u" && (this.legendsList = this.legendsExtractor(this.layers));
1460
1505
  }
1461
1506
  getBaseLayersCount() {
1462
- return this.layers.filter((t) => !!ee(t.meta, "parentBasetMapId")).length;
1507
+ return this.layers.filter((t) => !!Z(t.meta, "parentBasetMapId")).length;
1463
1508
  }
1464
1509
  findLayerById(n) {
1465
1510
  return this.layers.find((t) => t.meta !== void 0 ? t.meta.id === n : !1);
1466
1511
  }
1467
1512
  updateLayersOrder(n, t, i) {
1468
- const o = t > i ? Br : Fr, r = t < i ? t : i, d = t < i ? i : t;
1513
+ const o = t > i ? Vr : zr, r = t < i ? t : i, c = t < i ? i : t;
1469
1514
  this.layers.forEach((u) => {
1470
- var E;
1471
- if (!ee(u.meta, "parentBasetMapId")) {
1472
- const C = (E = u.meta) == null ? void 0 : E.zIndex;
1473
- u.meta.zIndex = C >= r && C <= d && C !== t ? C + o : C === t ? i : C;
1515
+ var v;
1516
+ if (!Z(u.meta, "parentBasetMapId")) {
1517
+ const E = (v = u.meta) == null ? void 0 : v.zIndex;
1518
+ u.meta.zIndex = E >= r && E <= c && E !== t ? E + o : E === t ? i : E;
1474
1519
  }
1475
1520
  });
1476
1521
  }
@@ -1484,17 +1529,17 @@ class Hr {
1484
1529
  try {
1485
1530
  const i = this.mapViewer.camera.computeViewRectangle();
1486
1531
  for (let o = this.layers.length - 1; o >= 0; o--) {
1487
- const r = this.layers[o], d = !rt(i) && !rt(r.rectangle) && Se.intersection(i, r.rectangle);
1532
+ const r = this.layers[o], c = !ot(i) && !ot(r.rectangle) && Pe.intersection(i, r.rectangle);
1488
1533
  for (let u = this.layers.length - 1; u >= o; u--) {
1489
1534
  if (((n = r.meta) == null ? void 0 : n.skipRelevancyCheck) === !0) {
1490
1535
  r.meta = { ...r.meta, relevantToExtent: !0 };
1491
1536
  continue;
1492
1537
  }
1493
- const h = this.layers[u], E = ((t = h.meta) == null ? void 0 : t[ze]) === !0;
1494
- if (r !== h)
1495
- if (d instanceof Se) {
1496
- if (Fe(i, r.rectangle))
1497
- if (Fe(i, h.rectangle) && !E) {
1538
+ const m = this.layers[u], v = ((t = m.meta) == null ? void 0 : t[We]) === !0;
1539
+ if (r !== m)
1540
+ if (c instanceof Pe) {
1541
+ if (He(i, r.rectangle))
1542
+ if (He(i, m.rectangle) && !v) {
1498
1543
  r.meta = {
1499
1544
  ...r.meta ?? {},
1500
1545
  relevantToExtent: !1
@@ -1505,15 +1550,15 @@ class Hr {
1505
1550
  ...r.meta ?? {},
1506
1551
  relevantToExtent: !0
1507
1552
  };
1508
- if (Fe(i, h.rectangle) && !E) {
1553
+ if (He(i, m.rectangle) && !v) {
1509
1554
  r.meta = { ...r.meta ?? {}, relevantToExtent: !1 };
1510
1555
  break;
1511
1556
  }
1512
- if (Fe(r.rectangle, h.rectangle)) {
1557
+ if (He(r.rectangle, m.rectangle)) {
1513
1558
  if (r.meta = {
1514
1559
  ...r.meta ?? {},
1515
- relevantToExtent: E
1516
- }, !E)
1560
+ relevantToExtent: v
1561
+ }, !v)
1517
1562
  break;
1518
1563
  } else
1519
1564
  r.meta = { ...r.meta ?? {}, relevantToExtent: !0 };
@@ -1522,7 +1567,7 @@ class Hr {
1522
1567
  else
1523
1568
  o === this.layers.length - 1 && (r.meta = {
1524
1569
  ...r.meta ?? {},
1525
- relevantToExtent: d instanceof Se
1570
+ relevantToExtent: c instanceof Pe
1526
1571
  });
1527
1572
  }
1528
1573
  }
@@ -1531,12 +1576,29 @@ class Hr {
1531
1576
  }
1532
1577
  }
1533
1578
  }
1534
- const Lt = 212, St = 260, Gr = 0;
1535
- class ms extends pi {
1579
+ const Wr = (e) => {
1580
+ const n = le(), { enableCompass: t = !0, enableZoomControls: i = !1, lockCompassNavigation: o = !1, locale: r = { DIRECTION: "ltr" } } = e;
1581
+ return x(() => {
1582
+ if (typeof Z(n, "cesiumNavigation") > "u") {
1583
+ n.extend(ki, {
1584
+ enableCompass: t,
1585
+ enableZoomControls: i,
1586
+ enableDistanceLegend: !1
1587
+ }), n.cesiumNavigation.setNavigationLocked(o);
1588
+ const c = document.querySelector(".compass");
1589
+ c && r.DIRECTION && c.classList.add(r.DIRECTION);
1590
+ }
1591
+ return () => {
1592
+ var c;
1593
+ (c = n.cesiumNavigation) == null || c.destroy();
1594
+ };
1595
+ }, [n, t, i, r.DIRECTION, o]), null;
1596
+ }, Pt = 212, Dt = 260, Ur = 0;
1597
+ class Os extends _i {
1536
1598
  constructor(t, i) {
1537
1599
  super(t, i);
1538
- Z(this, "layersManager");
1539
- Z(this, "useOptimizedTileRequests");
1600
+ X(this, "layersManager");
1601
+ X(this, "useOptimizedTileRequests");
1540
1602
  }
1541
1603
  get shouldOptimizedTileRequests() {
1542
1604
  return this.useOptimizedTileRequests ?? !1;
@@ -1545,14 +1607,14 @@ class ms extends pi {
1545
1607
  this.useOptimizedTileRequests = t;
1546
1608
  }
1547
1609
  }
1548
- const sn = Ie(null), Vr = sn.Provider, le = () => {
1549
- const e = xe(sn);
1610
+ const ln = Oe(null), Kr = ln.Provider, le = () => {
1611
+ const e = Re(ln);
1550
1612
  if (e === null)
1551
1613
  throw new Error("map context is null, please check the provider");
1552
1614
  return e;
1553
- }, ps = (e) => {
1554
- var D, U, X, R, z, Q, ie, ge;
1555
- const n = be(null), [t, i] = A(), [o, r] = A(), [d, u] = A(), [h, E] = A(), [C, L] = A(), [b, P] = A(), [B, $] = A(!1), [q, H] = A(), Y = be(), [K, x] = A(), [W, O] = A([]), [V, ne] = A(), [s, a] = A(!1), y = be(), [c, f] = A(void 0), [m, v] = A(!1), [g, w] = A(), S = {
1615
+ }, Rs = (e) => {
1616
+ var Y, O, z, Q, ie, fe, de, se;
1617
+ const n = _e(null), [t, i] = I(), [o, r] = I(), [c, u] = I(), [m, v] = I(), [E, _] = I(), [w, P] = I(), [R, V] = I(), [q, H] = I(!1), [K, j] = I(), A = _e(), [$, k] = I(), [W, ne] = I([]), [s, a] = I(), [y, d] = I(!1), f = _e(), [h, C] = I(void 0), [g, b] = I(!1), [S, L] = I(), T = {
1556
1618
  fullscreenButton: !0,
1557
1619
  timeline: !1,
1558
1620
  animation: !1,
@@ -1563,248 +1625,251 @@ const sn = Ie(null), Vr = sn.Provider, le = () => {
1563
1625
  sceneModePicker: !1,
1564
1626
  imageryProvider: !1,
1565
1627
  ...e
1566
- }, _ = (F, k, j, fe, Te) => {
1567
- const ye = t.container, Re = ye.clientWidth, Ne = ye.clientHeight, De = fe + Te;
1628
+ }, M = (B, F, ee, we, Le) => {
1629
+ const ye = t.container, xe = ye.clientWidth, gt = ye.clientHeight, ft = we + Le;
1568
1630
  return {
1569
- left: `${Re - F < j ? F - (j - (Re - F)) : F}px`,
1570
- top: `${Ne - k < De ? k - (De - (Ne - k)) : k}px`
1631
+ left: `${xe - B < ee ? B - (ee - (xe - B)) : B}px`,
1632
+ top: `${gt - F < ft ? F - (ft - (gt - F)) : F}px`
1571
1633
  };
1572
- }, T = me((F) => {
1634
+ }, D = me((B) => {
1573
1635
  if (n.current !== null) {
1574
- const k = n.current.cesiumElement, j = { x: F.offsetX, y: F.offsetY };
1575
- a(!1), f(j), w(wr(k, j.x, j.y)), a(!0), y.current = F;
1636
+ const F = n.current.cesiumElement, ee = { x: B.offsetX, y: B.offsetY };
1637
+ d(!1), C(ee), L(rn(F, ee.x, ee.y)), d(!0), f.current = B;
1576
1638
  }
1577
1639
  }, [n]);
1578
- I(() => {
1579
- var F;
1640
+ x(() => {
1641
+ var B;
1580
1642
  if (n.current !== null) {
1581
- const k = n.current.cesiumElement;
1582
- e.imageryContextMenu && (k.scene.canvas.removeEventListener("contextmenu", T), k.scene.canvas.addEventListener("contextmenu", T));
1643
+ const F = n.current.cesiumElement;
1644
+ e.imageryContextMenu && (F.scene.canvas.removeEventListener("contextmenu", D), F.scene.canvas.addEventListener("contextmenu", D));
1583
1645
  }
1584
- i((F = n.current) == null ? void 0 : F.cesiumElement);
1585
- }, [n, e.imageryContextMenu]), I(() => {
1586
- var F;
1587
- t && (t.shouldOptimizedTileRequests = e.useOptimizedTileRequests ?? !1, t.layersManager = new Hr(
1646
+ i((B = n.current) == null ? void 0 : B.cesiumElement);
1647
+ }, [n, e.imageryContextMenu]), x(() => {
1648
+ var B;
1649
+ t && (t.shouldOptimizedTileRequests = e.useOptimizedTileRequests ?? !1, t.layersManager = new $r(
1588
1650
  t,
1589
- (F = e.legends) == null ? void 0 : F.mapLegendsExtractor,
1651
+ (B = e.legends) == null ? void 0 : B.mapLegendsExtractor,
1590
1652
  () => {
1591
- var k;
1592
- O((k = t.layersManager) == null ? void 0 : k.legendsList);
1653
+ var F;
1654
+ ne((F = t.layersManager) == null ? void 0 : F.legendsList);
1593
1655
  },
1594
1656
  e.layerManagerFootprintMetaFieldPath
1595
1657
  ));
1596
- }, [t]), I(() => {
1658
+ }, [t]), x(() => {
1597
1659
  t && (t.shouldOptimizedTileRequests = e.useOptimizedTileRequests ?? !1);
1598
- }, [e.useOptimizedTileRequests, t]), I(() => {
1599
- x(e.sceneModes ?? [oe.SCENE2D, oe.SCENE3D, oe.COLUMBUS_VIEW]);
1600
- }, [e.sceneModes]), I(() => {
1601
- var k, j;
1602
- ne(e.baseMaps);
1603
- const F = (k = e.baseMaps) == null ? void 0 : k.maps.find((fe) => fe.isCurrent);
1604
- F && t && ((j = t.layersManager) == null || j.setBaseMapLayers(F));
1605
- }, [e.baseMaps, t]), I(() => {
1606
- r(e.projection ?? he.WGS84);
1607
- }, [e.projection]), I(() => {
1608
- H(e.locale);
1609
- }, [e.locale]), I(() => {
1660
+ }, [e.useOptimizedTileRequests, t]), x(() => {
1661
+ k(e.sceneModes ?? [oe.SCENE2D, oe.SCENE3D, oe.COLUMBUS_VIEW]);
1662
+ }, [e.sceneModes]), x(() => {
1663
+ var F, ee;
1664
+ a(e.baseMaps);
1665
+ const B = (F = e.baseMaps) == null ? void 0 : F.maps.find((we) => we.isCurrent);
1666
+ B && t && ((ee = t.layersManager) == null || ee.setBaseMapLayers(B));
1667
+ }, [e.baseMaps, t]), x(() => {
1668
+ r(e.projection ?? pe.WGS84);
1669
+ }, [e.projection]), x(() => {
1670
+ j(e.locale);
1671
+ }, [e.locale]), x(() => {
1610
1672
  u(e.showMousePosition ?? !0);
1611
- }, [e.showMousePosition]), I(() => {
1612
- E(e.showZoomLevel ?? !0);
1613
- }, [e.showZoomLevel]), I(() => {
1614
- L(e.showScale ?? !0);
1615
- }, [e.showScale]), I(() => {
1616
- P(e.showLoadingProgress ?? !0);
1617
- }, [e.showLoadingProgress]), I(() => {
1618
- const F = () => {
1673
+ }, [e.showMousePosition]), x(() => {
1674
+ v(e.showZoomLevel ?? !0);
1675
+ }, [e.showZoomLevel]), x(() => {
1676
+ _(e.showScale ?? !0);
1677
+ }, [e.showScale]), x(() => {
1678
+ P(e.showCompass ?? !0);
1679
+ }, [e.showCompass]), x(() => {
1680
+ V(e.showLoadingProgress ?? !0);
1681
+ }, [e.showLoadingProgress]), x(() => {
1682
+ const B = () => {
1619
1683
  if (t === void 0)
1620
1684
  return {
1621
1685
  longitude: 0,
1622
1686
  latitude: 0,
1623
1687
  height: 0
1624
1688
  };
1625
- const k = () => {
1626
- const j = t.camera.positionCartographic;
1689
+ const F = () => {
1690
+ const ee = t.camera.positionCartographic;
1627
1691
  return {
1628
- longitude: Be(j.longitude),
1629
- latitude: Be(j.latitude),
1630
- height: j.height
1692
+ longitude: Fe(ee.longitude),
1693
+ latitude: Fe(ee.latitude),
1694
+ height: ee.height
1631
1695
  };
1632
1696
  };
1633
- if (t.scene.mode === we.SCENE3D) {
1634
- const j = new Ee(
1697
+ if (t.scene.mode === Te.SCENE3D) {
1698
+ const ee = new Ce(
1635
1699
  // eslint-disable-next-line @typescript-eslint/no-magic-numbers
1636
1700
  t.container.clientWidth / 2,
1637
1701
  // eslint-disable-next-line @typescript-eslint/no-magic-numbers
1638
1702
  t.container.clientHeight / 2
1639
- ), fe = t.scene.camera.getPickRay(j), Te = t.scene.globe.pick(fe, t.scene);
1640
- if (!Te)
1703
+ ), we = t.scene.camera.getPickRay(ee), Le = t.scene.globe.pick(we, t.scene);
1704
+ if (!Le)
1641
1705
  return {
1642
1706
  longitude: 0,
1643
1707
  latitude: 0,
1644
1708
  height: 0
1645
1709
  };
1646
- const ye = t.scene.globe.ellipsoid.cartesianToCartographic(Te);
1710
+ const ye = t.scene.globe.ellipsoid.cartesianToCartographic(Le);
1647
1711
  return ye !== void 0 ? {
1648
- longitude: Be(ye.longitude),
1649
- latitude: Be(ye.latitude),
1712
+ longitude: Fe(ye.longitude),
1713
+ latitude: Fe(ye.latitude),
1650
1714
  height: t.scene.camera.positionCartographic.height
1651
- } : k();
1715
+ } : F();
1652
1716
  } else
1653
- return k();
1717
+ return F();
1654
1718
  };
1655
1719
  t && (t.camera.moveEnd.addEventListener(() => {
1656
- if (t.scene.mode !== we.MORPHING) {
1657
- const k = t.camera, j = {
1658
- position: F(),
1659
- direction: k.direction.clone(),
1660
- up: k.up.clone(),
1661
- right: k.right.clone(),
1662
- transform: k.transform.clone(),
1663
- frustum: k.frustum.clone()
1720
+ if (t.scene.mode !== Te.MORPHING) {
1721
+ const F = t.camera, ee = {
1722
+ position: B(),
1723
+ direction: F.direction.clone(),
1724
+ up: F.up.clone(),
1725
+ right: F.right.clone(),
1726
+ transform: F.transform.clone(),
1727
+ frustum: F.frustum.clone()
1664
1728
  };
1665
- Y.current = j;
1729
+ A.current = ee;
1666
1730
  }
1667
- }), b && t.scene.globe.tileLoadProgressEvent.addEventListener(function() {
1668
- t.scene.globe.tilesLoaded === !0 ? $(!1) : $(!0);
1731
+ }), R && t.scene.globe.tileLoadProgressEvent.addEventListener(function() {
1732
+ t.scene.globe.tilesLoaded === !0 ? H(!1) : H(!0);
1669
1733
  }));
1670
- }, [t]), I(() => {
1671
- const F = () => {
1672
- if (t && Y.current) {
1673
- const k = Y.current;
1734
+ }, [t]), x(() => {
1735
+ const B = () => {
1736
+ if (t && A.current) {
1737
+ const F = A.current;
1674
1738
  t.camera.flyTo({
1675
- destination: pe.fromDegrees(k.position.longitude, k.position.latitude, k.position.height),
1739
+ destination: ve.fromDegrees(F.position.longitude, F.position.latitude, F.position.height),
1676
1740
  duration: 0
1677
1741
  });
1678
1742
  }
1679
1743
  };
1680
- return t && t.scene.morphComplete.addEventListener(F), () => {
1744
+ return t && t.scene.morphComplete.addEventListener(B), () => {
1681
1745
  if (t)
1682
1746
  try {
1683
- t.scene.morphComplete.removeEventListener(F);
1747
+ t.scene.morphComplete.removeEventListener(B);
1684
1748
  } catch {
1685
1749
  console.error("morphCompleteHandler event not cleaned");
1686
1750
  }
1687
1751
  };
1688
- }, [t]), I(() => {
1689
- const F = e.zoom, k = e.center;
1690
- t && Ve(F) && Pi(k) && t.camera.flyTo({
1691
- destination: pe.fromDegrees(k[0], k[1], vr(F)),
1752
+ }, [t]), x(() => {
1753
+ const B = e.zoom, F = e.center;
1754
+ t && $e(B) && Ii(F) && t.camera.flyTo({
1755
+ destination: ve.fromDegrees(F[0], F[1], br(B)),
1692
1756
  duration: 0
1693
1757
  });
1694
1758
  }, [e.zoom, e.center, t]);
1695
- const M = me(() => t && Jn(
1759
+ const U = me(() => t && ei(
1696
1760
  /* @__PURE__ */ N(te, { children: [
1697
- b === !0 ? B && /* @__PURE__ */ l(On, { style: { position: "absolute", top: 0, height: "10px", zIndex: 4 } }) : /* @__PURE__ */ l(te, {}),
1698
- /* @__PURE__ */ N(ae, { className: "sideToolsContainer", children: [
1699
- /* @__PURE__ */ l(Ar, { sceneModes: K, baseMaps: V, locale: q }),
1700
- /* @__PURE__ */ l(xr, { onClick: () => v(!m) })
1761
+ R === !0 ? q && /* @__PURE__ */ l(Nn, { style: { position: "absolute", top: 0, height: "10px", zIndex: 4 } }) : /* @__PURE__ */ l(te, {}),
1762
+ /* @__PURE__ */ N(ce, { className: "sideToolsContainer", children: [
1763
+ /* @__PURE__ */ l(Or, { sceneModes: $, baseMaps: s, locale: K }),
1764
+ /* @__PURE__ */ l(Nr, { onClick: () => b(!g) })
1701
1765
  ] }),
1702
- /* @__PURE__ */ N(ae, { className: "toolsContainer", children: [
1703
- d === !0 ? /* @__PURE__ */ l(Er, { projection: o }) : /* @__PURE__ */ l(te, {}),
1704
- h === !0 ? /* @__PURE__ */ l(Lr, { locale: q }) : /* @__PURE__ */ l(te, {}),
1705
- C === !0 ? /* @__PURE__ */ l(Tr, { locale: q }) : /* @__PURE__ */ l(te, {})
1766
+ /* @__PURE__ */ N(ce, { className: "toolsContainer", children: [
1767
+ c === !0 ? /* @__PURE__ */ l(Lr, { projection: o }) : /* @__PURE__ */ l(te, {}),
1768
+ m === !0 ? /* @__PURE__ */ l(Dr, { locale: K, valueBy: "RENDERED_TILES" }) : /* @__PURE__ */ l(te, {}),
1769
+ E === !0 ? /* @__PURE__ */ l(Mr, { locale: K }) : /* @__PURE__ */ l(te, {}),
1770
+ w === !0 ? /* @__PURE__ */ l(Wr, { locale: K }) : /* @__PURE__ */ l(te, {})
1706
1771
  ] })
1707
1772
  ] }),
1708
1773
  document.querySelector(".cesium-viewer")
1709
- ), [V, q, t, o, K, d, C, m, B]);
1710
- return /* @__PURE__ */ l(Qn, { className: "viewer", full: !0, ref: n, ...S, children: /* @__PURE__ */ N(Vr, { value: t, children: [
1774
+ ), [s, K, t, o, $, c, E, g, q]);
1775
+ return /* @__PURE__ */ l(ti, { className: "viewer", full: !0, ref: n, ...T, children: /* @__PURE__ */ N(Kr, { value: t, children: [
1711
1776
  /* @__PURE__ */ l(
1712
- Rr,
1777
+ Hr,
1713
1778
  {
1714
- title: (D = e.legends) == null ? void 0 : D.title,
1715
- isOpen: m,
1716
- toggleSidebar: () => v(!m),
1717
- noLegendsText: (U = e.legends) == null ? void 0 : U.emptyText,
1718
- legends: ((X = e.legends) == null ? void 0 : X.legendsList) ?? W,
1719
- actionsTexts: (R = e.legends) == null ? void 0 : R.actionsTexts
1779
+ title: (Y = e.legends) == null ? void 0 : Y.title,
1780
+ isOpen: g,
1781
+ toggleSidebar: () => b(!g),
1782
+ noLegendsText: (O = e.legends) == null ? void 0 : O.emptyText,
1783
+ legends: ((z = e.legends) == null ? void 0 : z.legendsList) ?? W,
1784
+ actionsTexts: (Q = e.legends) == null ? void 0 : Q.actionsTexts
1720
1785
  }
1721
1786
  ),
1722
1787
  e.children,
1723
- M(),
1724
- e.imageryContextMenu && s && c && g && ve.cloneElement(e.imageryContextMenu, {
1725
- data: (z = t == null ? void 0 : t.layersManager) == null ? void 0 : z.findLayerByPOI(c.x, c.y, !1),
1788
+ U(),
1789
+ e.imageryContextMenu && y && h && S && Ee.cloneElement(e.imageryContextMenu, {
1790
+ data: (ie = t == null ? void 0 : t.layersManager) == null ? void 0 : ie.findLayerByPOI(h.x, h.y, !1),
1726
1791
  position: {
1727
- x: c.x,
1728
- y: c.y
1792
+ x: h.x,
1793
+ y: h.y
1729
1794
  },
1730
- coordinates: g,
1731
- style: _(
1732
- c.x,
1733
- c.y,
1734
- ((Q = e.imageryContextMenuSize) == null ? void 0 : Q.width) ?? St,
1735
- ((ie = e.imageryContextMenuSize) == null ? void 0 : ie.height) ?? Lt,
1736
- ((ge = e.imageryContextMenuSize) == null ? void 0 : ge.dynamicHeightIncrement) ?? Gr
1795
+ coordinates: S,
1796
+ style: M(
1797
+ h.x,
1798
+ h.y,
1799
+ ((fe = e.imageryContextMenuSize) == null ? void 0 : fe.width) ?? Dt,
1800
+ ((de = e.imageryContextMenuSize) == null ? void 0 : de.height) ?? Pt,
1801
+ ((se = e.imageryContextMenuSize) == null ? void 0 : se.dynamicHeightIncrement) ?? Ur
1737
1802
  ),
1738
1803
  size: e.imageryContextMenuSize ?? {
1739
- height: Lt,
1740
- width: St
1804
+ height: Pt,
1805
+ width: Dt
1741
1806
  },
1742
1807
  handleClose: () => {
1743
- a(!s);
1808
+ d(!y);
1744
1809
  },
1745
- contextEvt: y.current
1810
+ contextEvt: f.current
1746
1811
  })
1747
1812
  ] }) });
1748
- }, zr = 0, gs = (e) => {
1813
+ }, jr = 0, Ns = (e) => {
1749
1814
  const n = le();
1750
1815
  return /* @__PURE__ */ l(
1751
- ei,
1816
+ ni,
1752
1817
  {
1753
1818
  ...e,
1754
1819
  onReady: (t) => {
1755
1820
  e.isZoomTo === !0 && n.zoomTo(t);
1756
1821
  const i = n.scene;
1757
1822
  i.globe.depthTestAgainstTerrain = !0;
1758
- const o = Oe.fromCartesian(t.boundingSphere.center), r = e.heightFromGround ?? zr;
1823
+ const o = Be.fromCartesian(t.boundingSphere.center), r = e.heightFromGround ?? jr;
1759
1824
  if (r) {
1760
- const d = pe.fromRadians(o.longitude, o.latitude, o.height), u = pe.fromRadians(o.longitude, o.latitude, o.height + r), h = pe.subtract(u, d, new pe());
1761
- t.modelMatrix = gi.fromTranslation(h);
1825
+ const c = ve.fromRadians(o.longitude, o.latitude, o.height), u = ve.fromRadians(o.longitude, o.latitude, o.height + r), m = ve.subtract(u, c, new ve());
1826
+ t.modelMatrix = Li.fromTranslation(m);
1762
1827
  }
1763
1828
  }
1764
1829
  }
1765
1830
  );
1766
- }, Mt = 180, Pt = 1e-3, Dt = -1, At = (e) => Math.abs(e) / e, It = (e) => {
1767
- Math.abs(e[0]) === Mt && (e[0] += Dt * At(e[0]) * Pt), Math.abs(e[1]) === Mt / 2 && (e[1] += Dt * At(e[1]) * Pt);
1768
- }, xt = (e) => {
1831
+ }, Ge = 180, It = 1e-3, xt = (e) => Math.abs(e) / e, At = (e) => {
1832
+ Ge - Math.abs(e[0]) < It && (e[0] = xt(e[0]) * (Ge - 1)), Ge / 2 - Math.abs(e[1]) < It && (e[1] = xt(e[1]) * (Ge / 2 - 1));
1833
+ }, kt = (e) => {
1769
1834
  switch (e.type) {
1770
1835
  case "LineString":
1771
1836
  e.coordinates.forEach((n) => {
1772
- It(n);
1837
+ At(n);
1773
1838
  });
1774
1839
  break;
1775
1840
  case "Polygon":
1776
1841
  e.coordinates.forEach((n) => {
1777
1842
  n.forEach((t) => {
1778
- It(t);
1843
+ At(t);
1779
1844
  });
1780
1845
  });
1781
1846
  break;
1782
1847
  }
1783
- }, fs = (e) => {
1784
- const { data: n, ...t } = e;
1785
- return n && (typeof n.features < "u" ? n.features.forEach((i) => {
1786
- xt(i.geometry);
1787
- }) : xt(n)), /* @__PURE__ */ l(ti, { data: n, ...t });
1788
- }, Ke = (e) => {
1848
+ }, Bs = (e) => {
1849
+ const { data: n, ...t } = e, i = xi(n);
1850
+ return i && (typeof i.features < "u" ? i.features.forEach((o) => {
1851
+ kt(o.geometry);
1852
+ }) : kt(i)), /* @__PURE__ */ l(ii, { data: i, ...t });
1853
+ }, je = (e) => {
1789
1854
  const { meta: n, ...t } = e, i = le();
1790
- return dn(() => {
1855
+ return hn(() => {
1791
1856
  var o;
1792
1857
  (o = i.layersManager) == null || o.addMetaToLayer(n, n.searchLayerPredicate);
1793
- }, [n, i]), /* @__PURE__ */ l(ni, { ...t });
1794
- }, ys = (e) => {
1795
- const { options: n, ...t } = e, i = le(), o = i.shouldOptimizedTileRequests ? new rn(n, i) : new ct(n);
1796
- return /* @__PURE__ */ l(Ke, { ...t, imageryProvider: o });
1797
- }, vs = (e) => {
1798
- const { options: n, ...t } = e, i = le(), o = i.shouldOptimizedTileRequests ? new on(n, i) : new dt(n);
1799
- return /* @__PURE__ */ l(Ke, { ...t, imageryProvider: o });
1800
- }, Es = (e) => {
1801
- const { options: n, ...t } = e, i = le(), o = i.shouldOptimizedTileRequests ? new nn(n, i) : new lt(n);
1802
- return /* @__PURE__ */ l(Ke, { ...t, imageryProvider: o });
1803
- }, Cs = (e) => {
1858
+ }, [n, i]), /* @__PURE__ */ l(ri, { ...t });
1859
+ }, Fs = (e) => {
1860
+ const { options: n, ...t } = e, i = le(), o = i.shouldOptimizedTileRequests ? new sn(n, i) : new dt(n);
1861
+ return /* @__PURE__ */ l(je, { ...t, imageryProvider: o });
1862
+ }, Hs = (e) => {
1863
+ const { options: n, ...t } = e, i = le(), o = i.shouldOptimizedTileRequests ? new an(n, i) : new ut(n);
1864
+ return /* @__PURE__ */ l(je, { ...t, imageryProvider: o });
1865
+ }, Gs = (e) => {
1866
+ const { options: n, ...t } = e, i = le(), o = i.shouldOptimizedTileRequests ? new on(n, i) : new ct(n);
1867
+ return /* @__PURE__ */ l(je, { ...t, imageryProvider: o });
1868
+ }, Vs = (e) => {
1804
1869
  const { options: n, ...t } = e;
1805
- return /* @__PURE__ */ l(Ke, { ...t, imageryProvider: new fi(n) });
1806
- }, $r = (e) => /* @__PURE__ */ l(ii, { ...e }), ws = (e) => /* @__PURE__ */ l($t, { ...e }), Wr = (e) => /* @__PURE__ */ l($t, { ...e }), Ur = (e) => /* @__PURE__ */ l(ri, { ...e }), Kr = (e) => /* @__PURE__ */ l(oi, { ...e }), jr = (e) => /* @__PURE__ */ l(si, { ...e }), qr = (e) => /* @__PURE__ */ l(ai, { ...e });
1807
- var Ce = function() {
1870
+ return /* @__PURE__ */ l(je, { ...t, imageryProvider: new Si(n) });
1871
+ }, qr = (e) => /* @__PURE__ */ l(oi, { ...e }), zs = (e) => /* @__PURE__ */ l(Wt, { ...e }), Yr = (e) => /* @__PURE__ */ l(Wt, { ...e }), Xr = (e) => /* @__PURE__ */ l(si, { ...e }), Zr = (e) => /* @__PURE__ */ l(ai, { ...e }), Jr = (e) => /* @__PURE__ */ l(li, { ...e }), Qr = (e) => /* @__PURE__ */ l(ci, { ...e });
1872
+ var be = function() {
1808
1873
  var e = p.Ellipsoid.WGS84, n, t = p.Material.fromType(p.Material.ColorType);
1809
1874
  function i(s, a = new p.Color(1, 1, 0, 0.5), y = new p.Color(1, 1, 1, 1)) {
1810
1875
  this._scene = s.scene, t.uniforms.color = a, n = y, this._tooltip = {
@@ -1816,27 +1881,27 @@ var Ce = function() {
1816
1881
  }
1817
1882
  i.prototype.initialiseHandlers = function() {
1818
1883
  var s = this._scene, a = this, y = new p.ScreenSpaceEventHandler(s.canvas);
1819
- function c(m, v) {
1884
+ function d(h, C) {
1820
1885
  if (a._handlersMuted != !0) {
1821
- var g = s.pick(v);
1822
- g && g.primitive && g.primitive[m] && g.primitive[m](v);
1886
+ var g = s.pick(C);
1887
+ g && g.primitive && g.primitive[h] && g.primitive[h](C);
1823
1888
  }
1824
1889
  }
1825
- y.setInputAction(function(m) {
1826
- c("leftClick", m.position);
1827
- }, p.ScreenSpaceEventType.LEFT_CLICK), y.setInputAction(function(m) {
1828
- c("leftDoubleClick", m.position);
1890
+ y.setInputAction(function(h) {
1891
+ d("leftClick", h.position);
1892
+ }, p.ScreenSpaceEventType.LEFT_CLICK), y.setInputAction(function(h) {
1893
+ d("leftDoubleClick", h.position);
1829
1894
  }, p.ScreenSpaceEventType.LEFT_DOUBLE_CLICK);
1830
1895
  var f;
1831
- y.setInputAction(function(m) {
1896
+ y.setInputAction(function(h) {
1832
1897
  if (a._handlersMuted != !0) {
1833
- var v = s.pick(m.endPosition);
1834
- f && (!v || f != v.primitive) && (!(f.isDestroyed && f.isDestroyed()) && f.mouseOut(m.endPosition), f = null), v && v.primitive && (v = v.primitive, v.mouseOut && (f = v), v.mouseMove && v.mouseMove(m.endPosition));
1898
+ var C = s.pick(h.endPosition);
1899
+ f && (!C || f != C.primitive) && (!(f.isDestroyed && f.isDestroyed()) && f.mouseOut(h.endPosition), f = null), C && C.primitive && (C = C.primitive, C.mouseOut && (f = C), C.mouseMove && C.mouseMove(h.endPosition));
1835
1900
  }
1836
- }, p.ScreenSpaceEventType.MOUSE_MOVE), y.setInputAction(function(m) {
1837
- c("leftUp", m.position);
1838
- }, p.ScreenSpaceEventType.LEFT_UP), y.setInputAction(function(m) {
1839
- c("leftDown", m.position);
1901
+ }, p.ScreenSpaceEventType.MOUSE_MOVE), y.setInputAction(function(h) {
1902
+ d("leftUp", h.position);
1903
+ }, p.ScreenSpaceEventType.LEFT_UP), y.setInputAction(function(h) {
1904
+ d("leftDown", h.position);
1840
1905
  }, p.ScreenSpaceEventType.LEFT_DOWN);
1841
1906
  }, i.prototype.setListener = function(s, a, y) {
1842
1907
  s[a] = y;
@@ -1844,11 +1909,11 @@ var Ce = function() {
1844
1909
  this._handlersMuted = s;
1845
1910
  }, i.prototype.registerEditableShape = function(s) {
1846
1911
  var a = this;
1847
- V(s, "mouseMove", function(y) {
1912
+ W(s, "mouseMove", function(y) {
1848
1913
  s.setHighlighted(!0), s._editMode || a._tooltip.showAt(y, "Click to edit this shape");
1849
- }), V(s, "mouseOut", function(y) {
1914
+ }), W(s, "mouseOut", function(y) {
1850
1915
  s.setHighlighted(!1), a._tooltip.setVisible(!1);
1851
- }), V(s, "leftClick", function(y) {
1916
+ }), W(s, "leftClick", function(y) {
1852
1917
  s.setEditMode(!0);
1853
1918
  });
1854
1919
  }, i.prototype.startDrawing = function(s) {
@@ -1871,15 +1936,15 @@ var Ce = function() {
1871
1936
  asynchronous: !0,
1872
1937
  show: !0,
1873
1938
  debugShowBoundingVolume: !1
1874
- }, r = O(o, {
1939
+ }, r = k(o, {
1875
1940
  appearance: new p.EllipsoidSurfaceAppearance({
1876
1941
  aboveGround: !1
1877
1942
  }),
1878
1943
  material: t,
1879
1944
  granularity: Math.PI / 180
1880
- }), d = O(o, {}), u = O(o, {}), h = O(o, {}), E = O(r, {
1945
+ }), c = k(o, {}), u = k(o, {}), m = k(o, {}), v = k(r, {
1881
1946
  rotation: 0
1882
- }), C = O(o, {
1947
+ }), E = k(o, {
1883
1948
  width: 5,
1884
1949
  geodesic: !0,
1885
1950
  granularity: 1e4,
@@ -1887,16 +1952,16 @@ var Ce = function() {
1887
1952
  aboveGround: !1
1888
1953
  }),
1889
1954
  material: t
1890
- }), L = function() {
1955
+ }), _ = function() {
1891
1956
  function s() {
1892
1957
  }
1893
1958
  return s.prototype.initialiseOptions = function(a) {
1894
- W(this, a), this._ellipsoid = void 0, this._granularity = void 0, this._height = void 0, this._textureRotationAngle = void 0, this._id = void 0, this._createPrimitive = !0, this._primitive = void 0, this._outlinePolygon = void 0;
1959
+ $(this, a), this._ellipsoid = void 0, this._granularity = void 0, this._height = void 0, this._textureRotationAngle = void 0, this._id = void 0, this._createPrimitive = !0, this._primitive = void 0, this._outlinePolygon = void 0;
1895
1960
  }, s.prototype.setAttribute = function(a, y) {
1896
1961
  this[a] = y, this._createPrimitive = !0;
1897
1962
  }, s.prototype.getAttribute = function(a) {
1898
1963
  return this[a];
1899
- }, s.prototype.update = function(a, y, c) {
1964
+ }, s.prototype.update = function(a, y, d) {
1900
1965
  if (!p.defined(this.ellipsoid))
1901
1966
  throw new p.DeveloperError("this.ellipsoid must be defined.");
1902
1967
  if (!p.defined(this.appearance))
@@ -1936,8 +2001,8 @@ var Ce = function() {
1936
2001
  })
1937
2002
  }));
1938
2003
  }
1939
- var m = this._primitive;
1940
- m.appearance.material = this.material, m.debugShowBoundingVolume = this.debugShowBoundingVolume, m.update(a, y, c), this._outlinePolygon && this._outlinePolygon.update(a, y, c);
2004
+ var h = this._primitive;
2005
+ h.appearance.material = this.material, h.debugShowBoundingVolume = this.debugShowBoundingVolume, h.update(a, y, d), this._outlinePolygon && this._outlinePolygon.update(a, y, d);
1941
2006
  }
1942
2007
  }, s.prototype.isDestroyed = function() {
1943
2008
  return !1;
@@ -1951,9 +2016,9 @@ var Ce = function() {
1951
2016
  function s(a) {
1952
2017
  if (!p.defined(a.extent))
1953
2018
  throw new p.DeveloperError("Extent is required");
1954
- a = O(a, r), this.initialiseOptions(a), this.setExtent(a.extent);
2019
+ a = k(a, r), this.initialiseOptions(a), this.setExtent(a.extent);
1955
2020
  }
1956
- return s.prototype = new L(), s.prototype.setExtent = function(a) {
2021
+ return s.prototype = new _(), s.prototype.setExtent = function(a) {
1957
2022
  this.setAttribute("extent", a);
1958
2023
  }, s.prototype.getExtent = function() {
1959
2024
  return this.getAttribute("extent");
@@ -1974,9 +2039,9 @@ var Ce = function() {
1974
2039
  }, s;
1975
2040
  }(), i.PolygonPrimitive = function() {
1976
2041
  function s(a) {
1977
- a = O(a, r), this.initialiseOptions(a), this.isPolygon = !0;
2042
+ a = k(a, r), this.initialiseOptions(a), this.isPolygon = !0;
1978
2043
  }
1979
- return s.prototype = new L(), s.prototype.setPositions = function(a) {
2044
+ return s.prototype = new _(), s.prototype.setPositions = function(a) {
1980
2045
  this.setAttribute("positions", a);
1981
2046
  }, s.prototype.getPositions = function() {
1982
2047
  return this.getAttribute("positions");
@@ -1999,9 +2064,9 @@ var Ce = function() {
1999
2064
  function s(a) {
2000
2065
  if (!(p.defined(a.center) && p.defined(a.radius)))
2001
2066
  throw new p.DeveloperError("Center and radius are required");
2002
- a = O(a, r), this.initialiseOptions(a), this.setRadius(a.radius);
2067
+ a = k(a, r), this.initialiseOptions(a), this.setRadius(a.radius);
2003
2068
  }
2004
- return s.prototype = new L(), s.prototype.setCenter = function(a) {
2069
+ return s.prototype = new _(), s.prototype.setCenter = function(a) {
2005
2070
  this.setAttribute("center", a);
2006
2071
  }, s.prototype.setRadius = function(a) {
2007
2072
  this.setAttribute("radius", Math.max(0.1, a));
@@ -2030,9 +2095,9 @@ var Ce = function() {
2030
2095
  function s(a) {
2031
2096
  if (!(p.defined(a.center) && p.defined(a.semiMajorAxis) && p.defined(a.semiMinorAxis)))
2032
2097
  throw new p.DeveloperError("Center and semi major and semi minor axis are required");
2033
- a = O(a, E), this.initialiseOptions(a);
2098
+ a = k(a, v), this.initialiseOptions(a);
2034
2099
  }
2035
- return s.prototype = new L(), s.prototype.setCenter = function(a) {
2100
+ return s.prototype = new _(), s.prototype.setCenter = function(a) {
2036
2101
  this.setAttribute("center", a);
2037
2102
  }, s.prototype.setSemiMajorAxis = function(a) {
2038
2103
  a < this.getSemiMinorAxis() || this.setAttribute("semiMajorAxis", a);
@@ -2071,9 +2136,9 @@ var Ce = function() {
2071
2136
  }, s;
2072
2137
  }(), i.PolylinePrimitive = function() {
2073
2138
  function s(a) {
2074
- a = O(a, C), this.initialiseOptions(a);
2139
+ a = k(a, E), this.initialiseOptions(a);
2075
2140
  }
2076
- return s.prototype = new L(), s.prototype.setPositions = function(a) {
2141
+ return s.prototype = new _(), s.prototype.setPositions = function(a) {
2077
2142
  this.setAttribute("positions", a);
2078
2143
  }, s.prototype.setWidth = function(a) {
2079
2144
  this.setAttribute("width", a);
@@ -2096,7 +2161,7 @@ var Ce = function() {
2096
2161
  });
2097
2162
  }, s;
2098
2163
  }();
2099
- var b = {
2164
+ var w = {
2100
2165
  iconUrl: "./assets/img/dragIcon.png",
2101
2166
  shiftX: 0,
2102
2167
  shiftY: 0
@@ -2104,16 +2169,16 @@ var Ce = function() {
2104
2169
  iconUrl: "./assets/img/dragIcon.png",
2105
2170
  shiftX: 0,
2106
2171
  shiftY: 0
2107
- }, B = {
2172
+ }, R = {
2108
2173
  iconUrl: "./assets/img/dragIconLight.png",
2109
2174
  shiftX: 0,
2110
2175
  shiftY: 0
2111
2176
  };
2112
2177
  i.prototype.createBillboardGroup = function(s, a, y) {
2113
- var c = new i.BillboardGroup(this, a);
2114
- return c.addBillboards(s, y), c;
2178
+ var d = new i.BillboardGroup(this, a);
2179
+ return d.addBillboards(s, y), d;
2115
2180
  }, i.BillboardGroup = function(s, a) {
2116
- this._drawHelper = s, this._scene = s._scene, this._options = O(a, b);
2181
+ this._drawHelper = s, this._scene = s._scene, this._options = k(a, w);
2117
2182
  var y = new p.BillboardCollection();
2118
2183
  this._scene.primitives.add(y), this._billboards = y, this._orderedBillboards = [];
2119
2184
  }, i.BillboardGroup.prototype.createBillboard = function(s, a) {
@@ -2129,43 +2194,43 @@ var Ce = function() {
2129
2194
  color: n
2130
2195
  });
2131
2196
  if (a) {
2132
- let m = function(g) {
2197
+ let h = function(g) {
2133
2198
  f.enableRotate = g;
2134
- }, v = function() {
2135
- for (var g = 0, w = c._orderedBillboards.length; g < w && c._orderedBillboards[g] != y; ++g)
2199
+ }, C = function() {
2200
+ for (var g = 0, b = d._orderedBillboards.length; g < b && d._orderedBillboards[g] != y; ++g)
2136
2201
  ;
2137
2202
  return g;
2138
2203
  };
2139
- var c = this, f = this._scene.screenSpaceCameraController;
2204
+ var d = this, f = this._scene.screenSpaceCameraController;
2140
2205
  if (a.dragHandlers) {
2141
- var c = this;
2142
- V(y, "leftDown", function(w) {
2206
+ var d = this;
2207
+ W(y, "leftDown", function(b) {
2143
2208
  function S(M) {
2144
2209
  y.position = M;
2145
- for (var D = 0, U = c._orderedBillboards.length; D < U && c._orderedBillboards[D] != y; ++D)
2210
+ for (var D = 0, U = d._orderedBillboards.length; D < U && d._orderedBillboards[D] != y; ++D)
2146
2211
  ;
2147
- a.dragHandlers.onDrag && a.dragHandlers.onDrag(v(), M);
2212
+ a.dragHandlers.onDrag && a.dragHandlers.onDrag(C(), M);
2148
2213
  }
2149
- function _(M) {
2150
- T.destroy(), m(!0), a.dragHandlers.onDragEnd && a.dragHandlers.onDragEnd(v(), M);
2214
+ function L(M) {
2215
+ T.destroy(), h(!0), a.dragHandlers.onDragEnd && a.dragHandlers.onDragEnd(C(), M);
2151
2216
  }
2152
- var T = new p.ScreenSpaceEventHandler(c._scene.canvas);
2217
+ var T = new p.ScreenSpaceEventHandler(d._scene.canvas);
2153
2218
  T.setInputAction(function(M) {
2154
- var D = c._scene.camera.pickEllipsoid(M.endPosition, e);
2155
- D ? S(D) : _(D);
2219
+ var D = d._scene.camera.pickEllipsoid(M.endPosition, e);
2220
+ D ? S(D) : L(D);
2156
2221
  }, p.ScreenSpaceEventType.MOUSE_MOVE), T.setInputAction(function(M) {
2157
- _(c._scene.camera.pickEllipsoid(M.position, e));
2158
- }, p.ScreenSpaceEventType.LEFT_UP), m(!1), a.dragHandlers.onDragStart && a.dragHandlers.onDragStart(v(), c._scene.camera.pickEllipsoid(w, e));
2222
+ L(d._scene.camera.pickEllipsoid(M.position, e));
2223
+ }, p.ScreenSpaceEventType.LEFT_UP), h(!1), a.dragHandlers.onDragStart && a.dragHandlers.onDragStart(C(), d._scene.camera.pickEllipsoid(b, e));
2159
2224
  });
2160
2225
  }
2161
- a.onDoubleClick && V(y, "leftDoubleClick", function(g) {
2162
- a.onDoubleClick(v());
2163
- }), a.onClick && V(y, "leftClick", function(g) {
2164
- a.onClick(v());
2165
- }), a.tooltip && (V(y, "mouseMove", function(g) {
2166
- c._drawHelper._tooltip.showAt(g, a.tooltip());
2167
- }), V(y, "mouseOut", function(g) {
2168
- c._drawHelper._tooltip.setVisible(!1);
2226
+ a.onDoubleClick && W(y, "leftDoubleClick", function(g) {
2227
+ a.onDoubleClick(C());
2228
+ }), a.onClick && W(y, "leftClick", function(g) {
2229
+ a.onClick(C());
2230
+ }), a.tooltip && (W(y, "mouseMove", function(g) {
2231
+ d._drawHelper._tooltip.showAt(g, a.tooltip());
2232
+ }), W(y, "mouseOut", function(g) {
2233
+ d._drawHelper._tooltip.setVisible(!1);
2169
2234
  }));
2170
2235
  }
2171
2236
  return y;
@@ -2190,69 +2255,69 @@ var Ce = function() {
2190
2255
  }, i.BillboardGroup.prototype.setOnTop = function() {
2191
2256
  this._scene.primitives.raiseToTop(this._billboards);
2192
2257
  }, i.prototype.startDrawingMarker = function(a) {
2193
- var a = O(a, b);
2258
+ var a = k(a, w);
2194
2259
  this.startDrawing(function() {
2195
- m.remove(), v.destroy(), f.setVisible(!1);
2260
+ h.remove(), C.destroy(), f.setVisible(!1);
2196
2261
  });
2197
- var y = this, c = this._scene;
2198
- c.primitives;
2199
- var f = this._tooltip, m = new i.BillboardGroup(this, a), v = new p.ScreenSpaceEventHandler(c.canvas);
2200
- v.setInputAction(function(g) {
2262
+ var y = this, d = this._scene;
2263
+ d.primitives;
2264
+ var f = this._tooltip, h = new i.BillboardGroup(this, a), C = new p.ScreenSpaceEventHandler(d.canvas);
2265
+ C.setInputAction(function(g) {
2201
2266
  if (g.position != null) {
2202
- var w = c.camera.pickEllipsoid(g.position, e);
2203
- w && (m.addBillboard(w), y.stopDrawing(), a.callback(w));
2267
+ var b = d.camera.pickEllipsoid(g.position, e);
2268
+ b && (h.addBillboard(b), y.stopDrawing(), a.callback(b));
2204
2269
  }
2205
- }, p.ScreenSpaceEventType.LEFT_CLICK), v.setInputAction(function(g) {
2206
- var w = g.endPosition;
2207
- if (w != null) {
2208
- var S = c.camera.pickEllipsoid(w, e);
2270
+ }, p.ScreenSpaceEventType.LEFT_CLICK), C.setInputAction(function(g) {
2271
+ var b = g.endPosition;
2272
+ if (b != null) {
2273
+ var S = d.camera.pickEllipsoid(b, e);
2209
2274
  S ? f.showAt(
2210
- w,
2211
- "<p>Click to add your marker. Position is: </p>" + K(e.cartesianToCartographic(S))
2212
- ) : f.showAt(w, "<p>Click on the globe to add your marker.</p>");
2275
+ b,
2276
+ "<p>Click to add your marker. Position is: </p>" + j(e.cartesianToCartographic(S))
2277
+ ) : f.showAt(b, "<p>Click on the globe to add your marker.</p>");
2213
2278
  }
2214
2279
  }, p.ScreenSpaceEventType.MOUSE_MOVE);
2215
2280
  }, i.prototype.startDrawingPolygon = function(a) {
2216
- var a = O(a, r);
2281
+ var a = k(a, r);
2217
2282
  this.startDrawingPolyshape(!0, a);
2218
2283
  }, i.prototype.startDrawingPolyline = function(a) {
2219
- var a = O(a, C);
2284
+ var a = k(a, E);
2220
2285
  this.startDrawingPolyshape(!1, a);
2221
2286
  }, i.prototype.startDrawingPolyshape = function(s, a) {
2222
2287
  this.startDrawing(function() {
2223
- f.remove(g), S.remove(), _.destroy(), m.setVisible(!1), H(c);
2288
+ f.remove(g), S.remove(), L.destroy(), h.setVisible(!1), H(d);
2224
2289
  });
2225
- var y = this, c = this._scene, f = c.primitives, m = this._tooltip, v = s ? 3 : 2, g;
2226
- s ? g = new Ce.PolygonPrimitive(a) : g = new Ce.PolylinePrimitive(a), g.asynchronous = !1, f.add(g);
2227
- var w = [], S = new i.BillboardGroup(this, b), _ = new p.ScreenSpaceEventHandler(c.canvas);
2228
- q(c), _.setInputAction(function(T) {
2290
+ var y = this, d = this._scene, f = d.primitives, h = this._tooltip, C = s ? 3 : 2, g;
2291
+ s ? g = new be.PolygonPrimitive(a) : g = new be.PolylinePrimitive(a), g.asynchronous = !1, f.add(g);
2292
+ var b = [], S = new i.BillboardGroup(this, w), L = new p.ScreenSpaceEventHandler(d.canvas);
2293
+ q(d), L.setInputAction(function(T) {
2229
2294
  if (T.position != null) {
2230
- var M = c.camera.pickEllipsoid(T.position, e);
2231
- M && (w.length == 0 && (w.push(M.clone()), S.addBillboard(w[0])), w.length >= v && (g.positions = w, g._createPrimitive = !0), w.push(M), S.addBillboard(M));
2295
+ var M = d.camera.pickEllipsoid(T.position, e);
2296
+ M && (b.length == 0 && (b.push(M.clone()), S.addBillboard(b[0])), b.length >= C && (g.positions = b, g._createPrimitive = !0), b.push(M), S.addBillboard(M));
2232
2297
  }
2233
- }, p.ScreenSpaceEventType.LEFT_CLICK), _.setInputAction(function(T) {
2298
+ }, p.ScreenSpaceEventType.LEFT_CLICK), L.setInputAction(function(T) {
2234
2299
  var M = T.endPosition;
2235
2300
  if (M != null)
2236
- if (w.length == 0)
2237
- m.showAt(M, "<p>Click to add first point</p>");
2301
+ if (b.length == 0)
2302
+ h.showAt(M, "<p>Click to add first point</p>");
2238
2303
  else {
2239
- var D = c.camera.pickEllipsoid(M, e);
2240
- D && (w.pop(), D.y += 1 + Math.random(), w.push(D), w.length >= v && (g.positions = w, g._createPrimitive = !0), S.getBillboard(w.length - 1).position = D, m.showAt(
2304
+ var D = d.camera.pickEllipsoid(M, e);
2305
+ D && (b.pop(), D.y += 1 + Math.random(), b.push(D), b.length >= C && (g.positions = b, g._createPrimitive = !0), S.getBillboard(b.length - 1).position = D, h.showAt(
2241
2306
  M,
2242
- "<p>Click to add new point (" + w.length + ")</p>" + (w.length > v ? "<p>Double click to finish drawing</p>" : "")
2307
+ "<p>Click to add new point (" + b.length + ")</p>" + (b.length > C ? "<p>Double click to finish drawing</p>" : "")
2243
2308
  ));
2244
2309
  }
2245
- }, p.ScreenSpaceEventType.MOUSE_MOVE), _.setInputAction(function(T) {
2310
+ }, p.ScreenSpaceEventType.MOUSE_MOVE), L.setInputAction(function(T) {
2246
2311
  var M = T.position;
2247
2312
  if (M != null) {
2248
- if (w.length < v + 2)
2313
+ if (b.length < C + 2)
2249
2314
  return;
2250
- var D = c.camera.pickEllipsoid(M, e);
2251
- D && (H(c), y.stopDrawing(), typeof a.callback == "function" && (w.length - 1, a.callback(w)));
2315
+ var D = d.camera.pickEllipsoid(M, e);
2316
+ D && (H(d), y.stopDrawing(), typeof a.callback == "function" && (b.length - 1, a.callback(b)));
2252
2317
  }
2253
2318
  }, p.ScreenSpaceEventType.LEFT_DOUBLE_CLICK);
2254
2319
  };
2255
- function $(s) {
2320
+ function V(s) {
2256
2321
  return e.cartographicArrayToCartesianArray([
2257
2322
  p.Rectangle.northwest(s),
2258
2323
  p.Rectangle.northeast(s),
@@ -2267,68 +2332,68 @@ var Ce = function() {
2267
2332
  s && (s.canvas.style.cursor = "");
2268
2333
  }
2269
2334
  i.prototype.startDrawingExtent = function(a) {
2270
- var a = O(a, r);
2335
+ var a = k(a, r);
2271
2336
  this.startDrawing(function() {
2272
- g != null && f.remove(g), w != null && w.remove(), S.destroy(), m.setVisible(!1), H(c);
2337
+ g != null && f.remove(g), b != null && b.remove(), S.destroy(), h.setVisible(!1), H(d);
2273
2338
  });
2274
- var y = this, c = this._scene, f = this._scene.primitives, m = this._tooltip, v = null, g = null, w = null, S = new p.ScreenSpaceEventHandler(c.canvas);
2275
- q(c);
2276
- function _(T) {
2277
- g == null && (g = new Ce.ExtentPrimitive({
2339
+ var y = this, d = this._scene, f = this._scene.primitives, h = this._tooltip, C = null, g = null, b = null, S = new p.ScreenSpaceEventHandler(d.canvas);
2340
+ q(d);
2341
+ function L(T) {
2342
+ g == null && (g = new be.ExtentPrimitive({
2278
2343
  extent: T,
2279
2344
  material: a.material
2280
2345
  }), g.asynchronous = !1, f.add(g)), g.setExtent(T);
2281
- var M = $(T);
2282
- w == null ? (w = new i.BillboardGroup(y, b), w.addBillboards(M)) : w.updateBillboardsPositions(M);
2346
+ var M = V(T);
2347
+ b == null ? (b = new i.BillboardGroup(y, w), b.addBillboards(M)) : b.updateBillboardsPositions(M);
2283
2348
  }
2284
2349
  S.setInputAction(function(T) {
2285
2350
  if (T.position != null) {
2286
- var M = c.camera.pickEllipsoid(T.position, e);
2351
+ var M = d.camera.pickEllipsoid(T.position, e);
2287
2352
  if (M)
2288
2353
  if (g == null) {
2289
- v = e.cartesianToCartographic(M);
2290
- var D = Y(v, v);
2291
- _(D);
2354
+ C = e.cartesianToCartographic(M);
2355
+ var D = K(C, C);
2356
+ L(D);
2292
2357
  } else
2293
- y.stopDrawing(), typeof a.callback == "function" && a.callback(Y(v, e.cartesianToCartographic(M)));
2358
+ y.stopDrawing(), typeof a.callback == "function" && a.callback(K(C, e.cartesianToCartographic(M)));
2294
2359
  }
2295
2360
  }, p.ScreenSpaceEventType.LEFT_DOWN), S.setInputAction(function(T) {
2296
2361
  var M = T.endPosition;
2297
2362
  if (M != null)
2298
2363
  if (g == null)
2299
- m.showAt(M, "<p>Click to start drawing rectangle</p>");
2364
+ h.showAt(M, "<p>Click to start drawing rectangle</p>");
2300
2365
  else {
2301
- var D = c.camera.pickEllipsoid(M, e);
2366
+ var D = d.camera.pickEllipsoid(M, e);
2302
2367
  if (D) {
2303
- var U = Y(v, e.cartesianToCartographic(D));
2304
- _(U), m.showAt(M, "<p>Drag to change rectangle extent</p><p>Click again to finish drawing</p>");
2368
+ var U = K(C, e.cartesianToCartographic(D));
2369
+ L(U), h.showAt(M, "<p>Drag to change rectangle extent</p><p>Click again to finish drawing</p>");
2305
2370
  }
2306
2371
  }
2307
2372
  }, p.ScreenSpaceEventType.MOUSE_MOVE);
2308
2373
  }, i.prototype.startDrawingCircle = function(a) {
2309
- var a = O(a, r);
2374
+ var a = k(a, r);
2310
2375
  this.startDrawing(function() {
2311
- v != null && f.remove(v), g.remove(), w.destroy(), m.setVisible(!1);
2376
+ C != null && f.remove(C), g.remove(), b.destroy(), h.setVisible(!1);
2312
2377
  });
2313
- var y = this, c = this._scene, f = this._scene.primitives, m = this._tooltip, v = null, g = null, w = new p.ScreenSpaceEventHandler(c.canvas);
2314
- w.setInputAction(function(S) {
2378
+ var y = this, d = this._scene, f = this._scene.primitives, h = this._tooltip, C = null, g = null, b = new p.ScreenSpaceEventHandler(d.canvas);
2379
+ b.setInputAction(function(S) {
2315
2380
  if (S.position != null) {
2316
- var _ = c.camera.pickEllipsoid(S.position, e);
2317
- _ && (v == null ? (v = new i.CirclePrimitive({
2318
- center: _,
2381
+ var L = d.camera.pickEllipsoid(S.position, e);
2382
+ L && (C == null ? (C = new i.CirclePrimitive({
2383
+ center: L,
2319
2384
  radius: 0,
2320
2385
  asynchronous: !1,
2321
2386
  material: a.material
2322
- }), f.add(v), g = new i.BillboardGroup(y, b), g.addBillboards([_])) : (typeof a.callback == "function" && a.callback(v.getCenter(), v.getRadius()), y.stopDrawing()));
2387
+ }), f.add(C), g = new i.BillboardGroup(y, w), g.addBillboards([L])) : (typeof a.callback == "function" && a.callback(C.getCenter(), C.getRadius()), y.stopDrawing()));
2323
2388
  }
2324
- }, p.ScreenSpaceEventType.LEFT_DOWN), w.setInputAction(function(S) {
2325
- var _ = S.endPosition;
2326
- if (_ != null)
2327
- if (v == null)
2328
- m.showAt(_, "<p>Click to start drawing the circle</p>");
2389
+ }, p.ScreenSpaceEventType.LEFT_DOWN), b.setInputAction(function(S) {
2390
+ var L = S.endPosition;
2391
+ if (L != null)
2392
+ if (C == null)
2393
+ h.showAt(L, "<p>Click to start drawing the circle</p>");
2329
2394
  else {
2330
- var T = c.camera.pickEllipsoid(_, e);
2331
- T && (v.setRadius(p.Cartesian3.distance(v.getCenter(), T)), g.updateBillboardsPositions(T), m.showAt(_, "<p>Move mouse to change circle radius</p><p>Click again to finish drawing</p>"));
2395
+ var T = d.camera.pickEllipsoid(L, e);
2396
+ T && (C.setRadius(p.Cartesian3.distance(C.getCenter(), T)), g.updateBillboardsPositions(T), h.showAt(L, "<p>Move mouse to change circle radius</p><p>Click again to finish drawing</p>"));
2332
2397
  }
2333
2398
  }, p.ScreenSpaceEventType.MOUSE_MOVE);
2334
2399
  }, i.prototype.enhancePrimitives = function() {
@@ -2337,281 +2402,281 @@ var Ce = function() {
2337
2402
  if (this._editable)
2338
2403
  return;
2339
2404
  this._editable = !0;
2340
- var c = this, f = this;
2341
- function m(v) {
2342
- s._scene.screenSpaceCameraController.enableRotate = v;
2405
+ var d = this, f = this;
2406
+ function h(C) {
2407
+ s._scene.screenSpaceCameraController.enableRotate = C;
2343
2408
  }
2344
- V(c, "leftDown", function(v) {
2345
- function g(_) {
2346
- c.position = _, f.executeListeners({ name: "drag", positions: _ });
2409
+ W(d, "leftDown", function(C) {
2410
+ function g(L) {
2411
+ d.position = L, f.executeListeners({ name: "drag", positions: L });
2347
2412
  }
2348
- function w(_) {
2349
- S.destroy(), m(!0), f.executeListeners({ name: "dragEnd", positions: _ });
2413
+ function b(L) {
2414
+ S.destroy(), h(!0), f.executeListeners({ name: "dragEnd", positions: L });
2350
2415
  }
2351
2416
  var S = new p.ScreenSpaceEventHandler(s._scene.canvas);
2352
- S.setInputAction(function(_) {
2353
- var T = s._scene.camera.pickEllipsoid(_.endPosition, e);
2354
- T ? g(T) : w(T);
2355
- }, p.ScreenSpaceEventType.MOUSE_MOVE), S.setInputAction(function(_) {
2356
- w(s._scene.camera.pickEllipsoid(_.position, e));
2357
- }, p.ScreenSpaceEventType.LEFT_UP), m(!1);
2358
- }), ne(c);
2417
+ S.setInputAction(function(L) {
2418
+ var T = s._scene.camera.pickEllipsoid(L.endPosition, e);
2419
+ T ? g(T) : b(T);
2420
+ }, p.ScreenSpaceEventType.MOUSE_MOVE), S.setInputAction(function(L) {
2421
+ b(s._scene.camera.pickEllipsoid(L.position, e));
2422
+ }, p.ScreenSpaceEventType.LEFT_UP), h(!1);
2423
+ }), ne(d);
2359
2424
  };
2360
- function a(c) {
2361
- s._scene, !(this._highlighted && this._highlighted == c) && this._editMode !== !0 && (this._highlighted = c, c ? (s.setHighlighted(this), this._strokeColor = this.strokeColor, this.setStrokeStyle(p.Color.fromCssColorString("white"), this.strokeWidth)) : this._strokeColor ? this.setStrokeStyle(this._strokeColor, this.strokeWidth) : this.setStrokeStyle(void 0, void 0));
2425
+ function a(d) {
2426
+ s._scene, !(this._highlighted && this._highlighted == d) && this._editMode !== !0 && (this._highlighted = d, d ? (s.setHighlighted(this), this._strokeColor = this.strokeColor, this.setStrokeStyle(p.Color.fromCssColorString("white"), this.strokeWidth)) : this._strokeColor ? this.setStrokeStyle(this._strokeColor, this.strokeWidth) : this.setStrokeStyle(void 0, void 0));
2362
2427
  }
2363
- function y(c) {
2364
- if (this._editMode != c)
2365
- if (s.disableAllHighlights(), c) {
2428
+ function y(d) {
2429
+ if (this._editMode != d)
2430
+ if (s.disableAllHighlights(), d) {
2366
2431
  s.setEdited(this);
2367
- var f = s._scene, m = this;
2432
+ var f = s._scene, h = this;
2368
2433
  if (this._markers == null) {
2369
- let D = function(R, z) {
2370
- var Q = R - 1 < 0 ? z.length - 1 : R - 1;
2371
- Q < g.countBillboards() && (g.getBillboard(Q).position = X(Q)), Q = R, Q < g.countBillboards() && (g.getBillboard(Q).position = X(Q));
2434
+ let D = function(O, z) {
2435
+ var Q = O - 1 < 0 ? z.length - 1 : O - 1;
2436
+ Q < g.countBillboards() && (g.getBillboard(Q).position = Y(Q)), Q = O, Q < g.countBillboards() && (g.getBillboard(Q).position = Y(Q));
2372
2437
  }, U = function() {
2373
- m.executeListeners({
2438
+ h.executeListeners({
2374
2439
  name: "onEdited",
2375
- positions: m.positions
2440
+ positions: h.positions
2376
2441
  });
2377
- }, X = function(R) {
2378
- var z = m.positions;
2442
+ }, Y = function(O) {
2443
+ var z = h.positions;
2379
2444
  return e.cartographicToCartesian(
2380
2445
  new p.EllipsoidGeodesic(
2381
- e.cartesianToCartographic(z[R]),
2382
- e.cartesianToCartographic(z[R < z.length - 1 ? R + 1 : 0])
2446
+ e.cartesianToCartographic(z[O]),
2447
+ e.cartesianToCartographic(z[O < z.length - 1 ? O + 1 : 0])
2383
2448
  ).interpolateUsingFraction(0.5)
2384
2449
  );
2385
2450
  };
2386
- var v = new i.BillboardGroup(s, P), g = new i.BillboardGroup(s, B), w = {
2451
+ var C = new i.BillboardGroup(s, P), g = new i.BillboardGroup(s, R), b = {
2387
2452
  dragHandlers: {
2388
- onDrag: function(R, z) {
2389
- m.positions[R] = z, D(R, m.positions), m._createPrimitive = !0;
2453
+ onDrag: function(O, z) {
2454
+ h.positions[O] = z, D(O, h.positions), h._createPrimitive = !0;
2390
2455
  },
2391
- onDragEnd: function(R, z) {
2392
- m._createPrimitive = !0, U();
2456
+ onDragEnd: function(O, z) {
2457
+ h._createPrimitive = !0, U();
2393
2458
  }
2394
2459
  },
2395
- onDoubleClick: function(R) {
2396
- m.positions.length < 4 || (m.positions.splice(R, 1), m._createPrimitive = !0, v.removeBillboard(R), g.removeBillboard(R), D(R, m.positions), U());
2460
+ onDoubleClick: function(O) {
2461
+ h.positions.length < 4 || (h.positions.splice(O, 1), h._createPrimitive = !0, C.removeBillboard(O), g.removeBillboard(O), D(O, h.positions), U());
2397
2462
  },
2398
2463
  tooltip: function() {
2399
- if (m.positions.length > 3)
2464
+ if (h.positions.length > 3)
2400
2465
  return "Double click to remove this point";
2401
2466
  }
2402
2467
  };
2403
- v.addBillboards(m.positions, w), this._markers = v;
2404
- for (var S = [], _ = 0, T = m.positions.length + (this.isPolygon ? 0 : -1); _ < T; _++)
2405
- S.push(X(_));
2468
+ C.addBillboards(h.positions, b), this._markers = C;
2469
+ for (var S = [], L = 0, T = h.positions.length + (this.isPolygon ? 0 : -1); L < T; L++)
2470
+ S.push(Y(L));
2406
2471
  var M = {
2407
2472
  dragHandlers: {
2408
- onDragStart: function(R, z) {
2409
- this.index = R + 1, m.positions.splice(this.index, 0, z), m._createPrimitive = !0;
2473
+ onDragStart: function(O, z) {
2474
+ this.index = O + 1, h.positions.splice(this.index, 0, z), h._createPrimitive = !0;
2410
2475
  },
2411
- onDrag: function(R, z) {
2412
- m.positions[this.index] = z, m._createPrimitive = !0;
2476
+ onDrag: function(O, z) {
2477
+ h.positions[this.index] = z, h._createPrimitive = !0;
2413
2478
  },
2414
- onDragEnd: function(R, z) {
2415
- v.insertBillboard(this.index, z, w), g.getBillboard(this.index - 1).position = X(this.index - 1), g.insertBillboard(this.index, X(this.index), M), m._createPrimitive = !0, U();
2479
+ onDragEnd: function(O, z) {
2480
+ C.insertBillboard(this.index, z, b), g.getBillboard(this.index - 1).position = Y(this.index - 1), g.insertBillboard(this.index, Y(this.index), M), h._createPrimitive = !0, U();
2416
2481
  }
2417
2482
  },
2418
2483
  tooltip: function() {
2419
2484
  return "Drag to create a new point";
2420
2485
  }
2421
2486
  };
2422
- g.addBillboards(S, M), this._editMarkers = g, this._globeClickhandler = new p.ScreenSpaceEventHandler(f.canvas), this._globeClickhandler.setInputAction(function(R) {
2423
- var z = f.pick(R.position);
2424
- z && z.primitive || m.setEditMode(!1);
2425
- }, p.ScreenSpaceEventType.LEFT_CLICK), v.setOnTop(), g.setOnTop();
2487
+ g.addBillboards(S, M), this._editMarkers = g, this._globeClickhandler = new p.ScreenSpaceEventHandler(f.canvas), this._globeClickhandler.setInputAction(function(O) {
2488
+ var z = f.pick(O.position);
2489
+ z && z.primitive || h.setEditMode(!1);
2490
+ }, p.ScreenSpaceEventType.LEFT_CLICK), C.setOnTop(), g.setOnTop();
2426
2491
  }
2427
2492
  this._editMode = !0;
2428
2493
  } else
2429
2494
  this._markers != null && (this._markers.remove(), this._editMarkers.remove(), this._markers = null, this._editMarkers = null, this._globeClickhandler.destroy()), this._editMode = !1;
2430
2495
  }
2431
- Ce.PolylinePrimitive.prototype.setEditable = function() {
2496
+ be.PolylinePrimitive.prototype.setEditable = function() {
2432
2497
  if (!this.setEditMode) {
2433
- var c = this;
2434
- c.isPolygon = !1, c.asynchronous = !1, s.registerEditableShape(c), c.setEditMode = y;
2498
+ var d = this;
2499
+ d.isPolygon = !1, d.asynchronous = !1, s.registerEditableShape(d), d.setEditMode = y;
2435
2500
  var f = this.width;
2436
- c.setHighlighted = function(m) {
2437
- this._editMode !== !0 && (m ? (s.setHighlighted(this), this.setWidth(f * 2)) : this.setWidth(f));
2438
- }, c.getExtent = function() {
2501
+ d.setHighlighted = function(h) {
2502
+ this._editMode !== !0 && (h ? (s.setHighlighted(this), this.setWidth(f * 2)) : this.setWidth(f));
2503
+ }, d.getExtent = function() {
2439
2504
  return p.Rectangle.fromCartographicArray(e.cartesianArrayToCartographicArray(this.positions));
2440
- }, ne(c), c.setEditMode(!1);
2505
+ }, ne(d), d.setEditMode(!1);
2441
2506
  }
2442
- }, Ce.PolygonPrimitive.prototype.setEditable = function() {
2443
- var c = this;
2444
- c.asynchronous = !1, s._scene, s.registerEditableShape(c), c.setEditMode = y, c.setHighlighted = a, ne(c), c.setEditMode(!1);
2445
- }, Ce.ExtentPrimitive.prototype.setEditable = function() {
2507
+ }, be.PolygonPrimitive.prototype.setEditable = function() {
2508
+ var d = this;
2509
+ d.asynchronous = !1, s._scene, s.registerEditableShape(d), d.setEditMode = y, d.setHighlighted = a, ne(d), d.setEditMode(!1);
2510
+ }, be.ExtentPrimitive.prototype.setEditable = function() {
2446
2511
  if (!this.setEditMode) {
2447
- var c = this, f = s._scene;
2448
- s.registerEditableShape(c), c.asynchronous = !1, c.setEditMode = function(m) {
2449
- if (this._editMode != m)
2450
- if (s.disableAllHighlights(), m) {
2512
+ var d = this, f = s._scene;
2513
+ s.registerEditableShape(d), d.asynchronous = !1, d.setEditMode = function(h) {
2514
+ if (this._editMode != h)
2515
+ if (s.disableAllHighlights(), h) {
2451
2516
  if (s.setEdited(this), this._markers == null) {
2452
- let w = function() {
2453
- c.executeListeners({
2517
+ let b = function() {
2518
+ d.executeListeners({
2454
2519
  name: "onEdited",
2455
- extent: c.extent
2520
+ extent: d.extent
2456
2521
  });
2457
2522
  };
2458
- var v = new i.BillboardGroup(s, P), g = {
2523
+ var C = new i.BillboardGroup(s, P), g = {
2459
2524
  dragHandlers: {
2460
- onDrag: function(S, _) {
2461
- var T = v.getBillboard((S + 2) % 4).position;
2462
- c.setExtent(Y(e.cartesianToCartographic(T), e.cartesianToCartographic(_))), v.updateBillboardsPositions($(c.extent));
2525
+ onDrag: function(S, L) {
2526
+ var T = C.getBillboard((S + 2) % 4).position;
2527
+ d.setExtent(K(e.cartesianToCartographic(T), e.cartesianToCartographic(L))), C.updateBillboardsPositions(V(d.extent));
2463
2528
  },
2464
- onDragEnd: function(S, _) {
2465
- w();
2529
+ onDragEnd: function(S, L) {
2530
+ b();
2466
2531
  }
2467
2532
  },
2468
2533
  tooltip: function() {
2469
2534
  return "Drag to change the corners of this extent";
2470
2535
  }
2471
2536
  };
2472
- v.addBillboards($(c.extent), g), this._markers = v, this._globeClickhandler = new p.ScreenSpaceEventHandler(f.canvas), this._globeClickhandler.setInputAction(function(S) {
2473
- var _ = f.pick(S.position);
2474
- _ && !_.isDestroyed() && _.primitive || c.setEditMode(!1);
2475
- }, p.ScreenSpaceEventType.LEFT_CLICK), v.setOnTop();
2537
+ C.addBillboards(V(d.extent), g), this._markers = C, this._globeClickhandler = new p.ScreenSpaceEventHandler(f.canvas), this._globeClickhandler.setInputAction(function(S) {
2538
+ var L = f.pick(S.position);
2539
+ L && !L.isDestroyed() && L.primitive || d.setEditMode(!1);
2540
+ }, p.ScreenSpaceEventType.LEFT_CLICK), C.setOnTop();
2476
2541
  }
2477
2542
  this._editMode = !0;
2478
2543
  } else
2479
2544
  this._markers != null && (this._markers.remove(), this._markers = null, this._globeClickhandler.destroy()), this._editMode = !1;
2480
- }, c.setHighlighted = a, ne(c), c.setEditMode(!1);
2545
+ }, d.setHighlighted = a, ne(d), d.setEditMode(!1);
2481
2546
  }
2482
2547
  }, i.EllipsePrimitive.prototype.setEditable = function() {
2483
2548
  if (!this.setEditMode) {
2484
- var c = this, f = s._scene;
2485
- c.asynchronous = !1, s.registerEditableShape(c), c.setEditMode = function(m) {
2486
- if (this._editMode != m)
2487
- if (s.disableAllHighlights(), m) {
2549
+ var d = this, f = s._scene;
2550
+ d.asynchronous = !1, s.registerEditableShape(d), d.setEditMode = function(h) {
2551
+ if (this._editMode != h)
2552
+ if (s.disableAllHighlights(), h) {
2488
2553
  s.setEdited(this);
2489
- var v = this;
2554
+ var C = this;
2490
2555
  if (this._markers == null) {
2491
2556
  let S = function() {
2492
2557
  return p.EllipseOutlineGeometry(
2493
2558
  e,
2494
- c.getCenter(),
2495
- c.getSemiMajorAxis(),
2496
- c.getSemiMinorAxis(),
2497
- c.getRotation() + Math.PI / 2,
2559
+ d.getCenter(),
2560
+ d.getSemiMajorAxis(),
2561
+ d.getSemiMinorAxis(),
2562
+ d.getRotation() + Math.PI / 2,
2498
2563
  Math.PI / 2
2499
2564
  ).splice(0, 4);
2500
- }, _ = function() {
2501
- c.executeListeners({
2565
+ }, L = function() {
2566
+ d.executeListeners({
2502
2567
  name: "onEdited",
2503
- center: c.getCenter(),
2504
- semiMajorAxis: c.getSemiMajorAxis(),
2505
- semiMinorAxis: c.getSemiMinorAxis(),
2568
+ center: d.getCenter(),
2569
+ semiMajorAxis: d.getSemiMajorAxis(),
2570
+ semiMinorAxis: d.getSemiMinorAxis(),
2506
2571
  rotation: 0
2507
2572
  });
2508
2573
  };
2509
- var g = new i.BillboardGroup(s, P), w = {
2574
+ var g = new i.BillboardGroup(s, P), b = {
2510
2575
  dragHandlers: {
2511
2576
  onDrag: function(T, M) {
2512
- var D = p.Cartesian3.distance(c.getCenter(), M);
2513
- T % 2 == 0 ? c.setSemiMajorAxis(D) : c.setSemiMinorAxis(D), g.updateBillboardsPositions(S());
2577
+ var D = p.Cartesian3.distance(d.getCenter(), M);
2578
+ T % 2 == 0 ? d.setSemiMajorAxis(D) : d.setSemiMinorAxis(D), g.updateBillboardsPositions(S());
2514
2579
  },
2515
2580
  onDragEnd: function(T, M) {
2516
- _();
2581
+ L();
2517
2582
  }
2518
2583
  },
2519
2584
  tooltip: function() {
2520
2585
  return "Drag to change the excentricity and radius";
2521
2586
  }
2522
2587
  };
2523
- g.addBillboards(S(), w), this._markers = g, this._globeClickhandler = new p.ScreenSpaceEventHandler(f.canvas), this._globeClickhandler.setInputAction(function(T) {
2588
+ g.addBillboards(S(), b), this._markers = g, this._globeClickhandler = new p.ScreenSpaceEventHandler(f.canvas), this._globeClickhandler.setInputAction(function(T) {
2524
2589
  var M = f.pick(T.position);
2525
- M && M.primitive || v.setEditMode(!1);
2590
+ M && M.primitive || C.setEditMode(!1);
2526
2591
  }, p.ScreenSpaceEventType.LEFT_CLICK), g.setOnTop();
2527
2592
  }
2528
2593
  this._editMode = !0;
2529
2594
  } else
2530
2595
  this._markers != null && (this._markers.remove(), this._markers = null, this._globeClickhandler.destroy()), this._editMode = !1;
2531
- }, c.setHighlighted = a, ne(c), c.setEditMode(!1);
2596
+ }, d.setHighlighted = a, ne(d), d.setEditMode(!1);
2532
2597
  }
2533
- }, i.CirclePrimitive.prototype.getCircleCartesianCoordinates = function(c) {
2598
+ }, i.CirclePrimitive.prototype.getCircleCartesianCoordinates = function(d) {
2534
2599
  for (var f = p.CircleOutlineGeometry.createGeometry(
2535
2600
  new p.CircleOutlineGeometry({
2536
2601
  ellipsoid: e,
2537
2602
  center: this.getCenter(),
2538
2603
  radius: this.getRadius(),
2539
- granularity: c
2604
+ granularity: d
2540
2605
  })
2541
- ), m = 0, v, g = []; m < f.attributes.position.values.length; m += 3)
2542
- v = f.attributes.position.values, g.push(new p.Cartesian3(v[m], v[m + 1], v[m + 2]));
2606
+ ), h = 0, C, g = []; h < f.attributes.position.values.length; h += 3)
2607
+ C = f.attributes.position.values, g.push(new p.Cartesian3(C[h], C[h + 1], C[h + 2]));
2543
2608
  return g;
2544
2609
  }, i.CirclePrimitive.prototype.setEditable = function() {
2545
2610
  if (!this.setEditMode) {
2546
- var c = this, f = s._scene;
2547
- c.asynchronous = !1, s.registerEditableShape(c), c.setEditMode = function(m) {
2548
- if (this._editMode != m)
2549
- if (s.disableAllHighlights(), m) {
2611
+ var d = this, f = s._scene;
2612
+ d.asynchronous = !1, s.registerEditableShape(d), d.setEditMode = function(h) {
2613
+ if (this._editMode != h)
2614
+ if (s.disableAllHighlights(), h) {
2550
2615
  s.setEdited(this);
2551
- var v = this;
2616
+ var C = this;
2552
2617
  if (this._markers == null) {
2553
2618
  let S = function() {
2554
- return v.getCircleCartesianCoordinates(p.Math.PI_OVER_TWO);
2555
- }, _ = function() {
2556
- c.executeListeners({
2619
+ return C.getCircleCartesianCoordinates(p.Math.PI_OVER_TWO);
2620
+ }, L = function() {
2621
+ d.executeListeners({
2557
2622
  name: "onEdited",
2558
- center: c.getCenter(),
2559
- radius: c.getRadius()
2623
+ center: d.getCenter(),
2624
+ radius: d.getRadius()
2560
2625
  });
2561
2626
  };
2562
- var g = new i.BillboardGroup(s, P), w = {
2627
+ var g = new i.BillboardGroup(s, P), b = {
2563
2628
  dragHandlers: {
2564
2629
  onDrag: function(T, M) {
2565
- c.setRadius(p.Cartesian3.distance(c.getCenter(), M)), g.updateBillboardsPositions(S());
2630
+ d.setRadius(p.Cartesian3.distance(d.getCenter(), M)), g.updateBillboardsPositions(S());
2566
2631
  },
2567
2632
  onDragEnd: function(T, M) {
2568
- _();
2633
+ L();
2569
2634
  }
2570
2635
  },
2571
2636
  tooltip: function() {
2572
2637
  return "Drag to change the radius";
2573
2638
  }
2574
2639
  };
2575
- g.addBillboards(S(), w), this._markers = g, this._globeClickhandler = new p.ScreenSpaceEventHandler(f.canvas), this._globeClickhandler.setInputAction(function(T) {
2640
+ g.addBillboards(S(), b), this._markers = g, this._globeClickhandler = new p.ScreenSpaceEventHandler(f.canvas), this._globeClickhandler.setInputAction(function(T) {
2576
2641
  var M = f.pick(T.position);
2577
- M && M.primitive || v.setEditMode(!1);
2642
+ M && M.primitive || C.setEditMode(!1);
2578
2643
  }, p.ScreenSpaceEventType.LEFT_CLICK), g.setOnTop();
2579
2644
  }
2580
2645
  this._editMode = !0;
2581
2646
  } else
2582
2647
  this._markers != null && (this._markers.remove(), this._markers = null, this._globeClickhandler.destroy()), this._editMode = !1;
2583
- }, c.setHighlighted = a, ne(c), c.setEditMode(!1);
2648
+ }, d.setHighlighted = a, ne(d), d.setEditMode(!1);
2584
2649
  }
2585
2650
  };
2586
2651
  }, i.DrawHelperWidget = function() {
2587
2652
  function s(a, y) {
2588
2653
  if (!p.defined(y.container))
2589
2654
  throw new p.DeveloperError("Container is required");
2590
- var c = {
2655
+ var d = {
2591
2656
  markerIcon: "./assets/img/glyphicons_242_google_maps.png",
2592
2657
  polylineIcon: "./assets/img/glyphicons_097_vector_path_line.png",
2593
2658
  polygonIcon: "./assets/img/glyphicons_096_vector_path_polygon.png",
2594
2659
  circleIcon: "./assets/img/glyphicons_095_vector_path_circle.png",
2595
2660
  extentIcon: "./assets/img/glyphicons_094_vector_path_square.png",
2596
2661
  clearIcon: "./assets/img/glyphicons_067_cleaning.png",
2597
- polylineDrawingOptions: C,
2598
- polygonDrawingOptions: d,
2662
+ polylineDrawingOptions: E,
2663
+ polygonDrawingOptions: c,
2599
2664
  extentDrawingOptions: u,
2600
- circleDrawingOptions: h
2665
+ circleDrawingOptions: m
2601
2666
  };
2602
- W(y, c);
2603
- var f = this, m = document.createElement("DIV");
2604
- m.className = "toolbar", y.container.appendChild(m);
2605
- function v(S, _, T, M) {
2667
+ $(y, d);
2668
+ var f = this, h = document.createElement("DIV");
2669
+ h.className = "toolbar", y.container.appendChild(h);
2670
+ function C(S, L, T, M) {
2606
2671
  var D = document.createElement("DIV");
2607
- D.className = "button", D.title = T, m.appendChild(D), D.onclick = M;
2672
+ D.className = "button", D.title = T, h.appendChild(D), D.onclick = M;
2608
2673
  var U = document.createElement("SPAN");
2609
2674
  D.appendChild(U);
2610
- var X = document.createElement("IMG");
2611
- return X.src = _, U.appendChild(X), D;
2675
+ var Y = document.createElement("IMG");
2676
+ return Y.src = L, U.appendChild(Y), D;
2612
2677
  }
2613
2678
  var g = a._scene;
2614
- v("marker", y.markerIcon, "Click to start drawing a 2D marker", function() {
2679
+ C("marker", y.markerIcon, "Click to start drawing a 2D marker", function() {
2615
2680
  a.startDrawingMarker({
2616
2681
  callback: function(S) {
2617
2682
  f.executeListeners({
@@ -2620,7 +2685,7 @@ var Ce = function() {
2620
2685
  });
2621
2686
  }
2622
2687
  });
2623
- }), v("polyline", y.polylineIcon, "Click to start drawing a 2D polyline", function() {
2688
+ }), C("polyline", y.polylineIcon, "Click to start drawing a 2D polyline", function() {
2624
2689
  a.startDrawingPolyline({
2625
2690
  callback: function(S) {
2626
2691
  f.executeListeners({
@@ -2629,7 +2694,7 @@ var Ce = function() {
2629
2694
  });
2630
2695
  }
2631
2696
  });
2632
- }), v("polygon", y.polygonIcon, "Click to start drawing a 2D polygon", function() {
2697
+ }), C("polygon", y.polygonIcon, "Click to start drawing a 2D polygon", function() {
2633
2698
  a.startDrawingPolygon({
2634
2699
  callback: function(S) {
2635
2700
  f.executeListeners({
@@ -2638,64 +2703,64 @@ var Ce = function() {
2638
2703
  });
2639
2704
  }
2640
2705
  });
2641
- }), v("extent", y.extentIcon, "Click to start drawing an Extent", function() {
2706
+ }), C("extent", y.extentIcon, "Click to start drawing an Extent", function() {
2642
2707
  a.startDrawingExtent({
2643
2708
  callback: function(S) {
2644
2709
  f.executeListeners({ name: "extentCreated", extent: S });
2645
2710
  }
2646
2711
  });
2647
- }), v("circle", y.circleIcon, "Click to start drawing a Circle", function() {
2712
+ }), C("circle", y.circleIcon, "Click to start drawing a Circle", function() {
2648
2713
  a.startDrawingCircle({
2649
- callback: function(S, _) {
2714
+ callback: function(S, L) {
2650
2715
  f.executeListeners({
2651
2716
  name: "circleCreated",
2652
2717
  center: S,
2653
- radius: _
2718
+ radius: L
2654
2719
  });
2655
2720
  }
2656
2721
  });
2657
2722
  });
2658
- var w = document.createElement("DIV");
2659
- w.className = "divider", m.appendChild(w), v("clear", y.clearIcon, "Remove all primitives", function() {
2723
+ var b = document.createElement("DIV");
2724
+ b.className = "divider", h.appendChild(b), C("clear", y.clearIcon, "Remove all primitives", function() {
2660
2725
  g.primitives.removeAll();
2661
2726
  }), ne(this);
2662
2727
  }
2663
2728
  return s;
2664
2729
  }(), i.prototype.addToolbar = function(s, a) {
2665
- return a = O(a, { container: s }), new i.DrawHelperWidget(this, a);
2730
+ return a = k(a, { container: s }), new i.DrawHelperWidget(this, a);
2666
2731
  };
2667
- function Y(s, a) {
2732
+ function K(s, a) {
2668
2733
  var y = new p.Rectangle();
2669
2734
  y.west = Math.min(s.longitude, a.longitude), y.east = Math.max(s.longitude, a.longitude), y.south = Math.min(s.latitude, a.latitude), y.north = Math.max(s.latitude, a.latitude);
2670
- var c = p.Math.EPSILON7;
2671
- return y.east - y.west < c && (y.east += c * 2), y.north - y.south < c && (y.north += c * 2), y;
2735
+ var d = p.Math.EPSILON7;
2736
+ return y.east - y.west < d && (y.east += d * 2), y.north - y.south < d && (y.north += d * 2), y;
2672
2737
  }
2673
- function K(s, a) {
2738
+ function j(s, a) {
2674
2739
  return s.longitude.toFixed(a || 3) + ", " + s.latitude.toFixed(a || 3);
2675
2740
  }
2676
- function x(s, a) {
2741
+ function A(s, a) {
2677
2742
  if (s == null || typeof s != "object" || s.constructor != Object && s.constructor != Array)
2678
2743
  return s;
2679
2744
  if (s.constructor == Date || s.constructor == RegExp || s.constructor == Function || s.constructor == String || s.constructor == Number || s.constructor == Boolean)
2680
2745
  return new s.constructor(s);
2681
2746
  a = a || new s.constructor();
2682
2747
  for (var y in s)
2683
- a[y] = typeof a[y] > "u" ? x(s[y], null) : a[y];
2748
+ a[y] = typeof a[y] > "u" ? A(s[y], null) : a[y];
2684
2749
  return a;
2685
2750
  }
2686
- function W(s, a) {
2751
+ function $(s, a) {
2687
2752
  s = s || {};
2688
2753
  var y;
2689
2754
  for (y in a)
2690
- s[y] === void 0 && (s[y] = x(a[y]));
2755
+ s[y] === void 0 && (s[y] = A(a[y]));
2691
2756
  }
2692
- function O(s, a) {
2693
- var y = x(s), c;
2694
- for (c in a)
2695
- y[c] === void 0 && (y[c] = x(a[c]));
2757
+ function k(s, a) {
2758
+ var y = A(s), d;
2759
+ for (d in a)
2760
+ y[d] === void 0 && (y[d] = A(a[d]));
2696
2761
  return y;
2697
2762
  }
2698
- function V(s, a, y) {
2763
+ function W(s, a, y) {
2699
2764
  s[a] = y;
2700
2765
  }
2701
2766
  function ne(s) {
@@ -2703,30 +2768,30 @@ var Ce = function() {
2703
2768
  return this._listeners[a] = this._listeners[a] || [], this._listeners[a].push(y), this._listeners[a].length;
2704
2769
  }, s.executeListeners = function(a, y) {
2705
2770
  if (this._listeners[a.name] && this._listeners[a.name].length > 0)
2706
- for (var c = 0; c < this._listeners[a.name].length; c++)
2707
- this._listeners[a.name][c](a);
2771
+ for (var d = 0; d < this._listeners[a.name].length; d++)
2772
+ this._listeners[a.name][d](a);
2708
2773
  else
2709
2774
  y && y(a);
2710
2775
  };
2711
2776
  }
2712
2777
  return i;
2713
2778
  }();
2714
- const Yr = 2, Xr = (e, n) => {
2779
+ const eo = 2, to = (e, n) => {
2715
2780
  switch (e) {
2716
- case se.BOX: {
2717
- if (n.features.length !== Yr)
2781
+ case ae.BOX: {
2782
+ if (n.features.length !== eo)
2718
2783
  throw new Error(`${e} must have 2 points`);
2719
- const t = vt(n.features, (o) => {
2784
+ const t = wt(n.features, (o) => {
2720
2785
  var r;
2721
- return ((r = o.properties) == null ? void 0 : r.type) === ot.BOTTOM_LEFT;
2722
- }), i = vt(n.features, (o) => {
2786
+ return ((r = o.properties) == null ? void 0 : r.type) === st.BOTTOM_LEFT;
2787
+ }), i = wt(n.features, (o) => {
2723
2788
  var r;
2724
- return ((r = o.properties) == null ? void 0 : r.type) === ot.TOP_RIGHT;
2789
+ return ((r = o.properties) == null ? void 0 : r.type) === st.TOP_RIGHT;
2725
2790
  });
2726
2791
  if (i && t) {
2727
2792
  if (t.geometry.coordinates[0] === i.geometry.coordinates[0] && t.geometry.coordinates[1] === i.geometry.coordinates[1])
2728
2793
  throw new Error(`${e} must define BOTTOM_LEFT and TOP_RIGHT different points`);
2729
- return Se.fromDegrees(
2794
+ return Pe.fromDegrees(
2730
2795
  t.geometry.coordinates[0],
2731
2796
  t.geometry.coordinates[1],
2732
2797
  i.geometry.coordinates[0],
@@ -2738,10 +2803,10 @@ const Yr = 2, Xr = (e, n) => {
2738
2803
  default:
2739
2804
  throw new Error(`${e} type geoJSON still not supported`);
2740
2805
  }
2741
- }, Zr = (e) => {
2806
+ }, no = (e) => {
2742
2807
  const n = e.map((t) => {
2743
- const i = Oe.fromCartesian(t);
2744
- return [ce.toDegrees(i.longitude), ce.toDegrees(i.latitude)];
2808
+ const i = Be.fromCartesian(t);
2809
+ return [ge.toDegrees(i.longitude), ge.toDegrees(i.latitude)];
2745
2810
  });
2746
2811
  return n.push(n[0]), {
2747
2812
  type: "Feature",
@@ -2751,51 +2816,51 @@ const Yr = 2, Xr = (e, n) => {
2751
2816
  coordinates: [n]
2752
2817
  }
2753
2818
  };
2754
- }, Jr = (e) => {
2755
- const n = Kt.lineString([
2756
- [ce.toDegrees(e.west), ce.toDegrees(e.south)],
2757
- [ce.toDegrees(e.east), ce.toDegrees(e.north)]
2819
+ }, io = (e) => {
2820
+ const n = jt.lineString([
2821
+ [ge.toDegrees(e.west), ge.toDegrees(e.south)],
2822
+ [ge.toDegrees(e.east), ge.toDegrees(e.north)]
2758
2823
  ]);
2759
- return qt(jt(n));
2760
- }, Qr = (e) => {
2761
- const n = Kt.lineString([
2824
+ return Yt(qt(n));
2825
+ }, ro = (e) => {
2826
+ const n = jt.lineString([
2762
2827
  [e.west, e.south],
2763
2828
  [e.east, e.north]
2764
2829
  ]);
2765
- return qt(jt(n)).geometry.coordinates[0].map((i) => pe.fromRadiansArray(i)[0]);
2830
+ return Yt(qt(n)).geometry.coordinates[0].map((i) => ve.fromRadiansArray(i)[0]);
2766
2831
  };
2767
- class bs extends nt {
2832
+ class $s extends rt {
2768
2833
  }
2769
- const Ts = (e) => {
2770
- const { drawState: n, drawingMaterial: t, drawingVertexColor: i, material: o, hollow: r, outlineWidth: d } = e, u = le(), [h, E] = A();
2771
- I(() => {
2772
- E(
2834
+ const Ws = (e) => {
2835
+ const { drawState: n, drawingMaterial: t, drawingVertexColor: i, material: o, hollow: r, outlineWidth: c } = e, u = le(), [m, v] = I();
2836
+ x(() => {
2837
+ v(
2773
2838
  // eslint-disable-next-line
2774
- new Ce(u, t, i)
2839
+ new be(u, t, i)
2775
2840
  );
2776
- }, []), I(() => {
2777
- if (h) {
2778
- const L = h;
2841
+ }, []), x(() => {
2842
+ if (m) {
2843
+ const _ = m;
2779
2844
  if (n.drawing)
2780
2845
  switch (n.type) {
2781
- case se.POLYGON:
2782
- u.scene.globe.depthTestAgainstTerrain = !1, L.startDrawingPolygon({
2783
- callback: (b) => {
2846
+ case ae.POLYGON:
2847
+ u.scene.globe.depthTestAgainstTerrain = !1, _.startDrawingPolygon({
2848
+ callback: (w) => {
2784
2849
  n.handler({
2785
- primitive: b,
2786
- type: se.POLYGON,
2787
- geojson: Zr(b)
2850
+ primitive: w,
2851
+ type: ae.POLYGON,
2852
+ geojson: no(w)
2788
2853
  });
2789
2854
  }
2790
2855
  });
2791
2856
  break;
2792
- case se.BOX:
2793
- u.scene.globe.depthTestAgainstTerrain = !1, L.startDrawingExtent({
2794
- callback: (b) => {
2857
+ case ae.BOX:
2858
+ u.scene.globe.depthTestAgainstTerrain = !1, _.startDrawingExtent({
2859
+ callback: (w) => {
2795
2860
  n.handler({
2796
- primitive: b,
2797
- type: se.BOX,
2798
- geojson: Jr(b)
2861
+ primitive: w,
2862
+ type: ae.BOX,
2863
+ geojson: io(w)
2799
2864
  });
2800
2865
  }
2801
2866
  });
@@ -2804,147 +2869,120 @@ const Ts = (e) => {
2804
2869
  throw new Error(`[CESIUM DRAW]: ${n.type} unrecognized primitive to draw.`);
2805
2870
  }
2806
2871
  else
2807
- L.stopDrawing(), u.scene.globe.depthTestAgainstTerrain = !0;
2872
+ _.stopDrawing(), u.scene.globe.depthTestAgainstTerrain = !0;
2808
2873
  }
2809
- }, [n, h]);
2810
- const C = (L) => {
2874
+ }, [n, m]);
2875
+ const E = (_) => {
2811
2876
  try {
2812
- let b = L.coordinates !== void 0 ? L.coordinates : Xr(L.type, L.geojson);
2877
+ let w = _.coordinates !== void 0 ? _.coordinates : to(_.type, _.geojson);
2813
2878
  if (r !== !0)
2814
- switch (L.type) {
2815
- case se.BOX:
2816
- return /* @__PURE__ */ l(Kr, { coordinates: b, material: o ?? t });
2817
- case se.POLYGON:
2818
- return /* @__PURE__ */ l(Ur, { hierarchy: new yi(b), material: o ?? t });
2879
+ switch (_.type) {
2880
+ case ae.BOX:
2881
+ return /* @__PURE__ */ l(Zr, { coordinates: w, material: o ?? t });
2882
+ case ae.POLYGON:
2883
+ return /* @__PURE__ */ l(Xr, { hierarchy: new Mi(w), material: o ?? t });
2819
2884
  default:
2820
2885
  return /* @__PURE__ */ l(te, {});
2821
2886
  }
2822
2887
  else {
2823
- switch (L.type) {
2824
- case se.BOX:
2825
- b = Qr(b);
2888
+ switch (_.type) {
2889
+ case ae.BOX:
2890
+ w = ro(w);
2826
2891
  break;
2827
- case se.POLYGON:
2828
- b = [...b, b[0]];
2892
+ case ae.POLYGON:
2893
+ w = [...w, w[0]];
2829
2894
  break;
2830
2895
  default:
2831
2896
  return /* @__PURE__ */ l(te, {});
2832
2897
  }
2833
- return /* @__PURE__ */ l(qr, { clampToGround: !0, positions: b, width: d ?? 1, material: o ?? t });
2898
+ return /* @__PURE__ */ l(Qr, { clampToGround: !0, positions: w, width: c ?? 1, material: o ?? t });
2834
2899
  }
2835
- } catch (b) {
2836
- return console.error(b), /* @__PURE__ */ l(te, {});
2900
+ } catch (w) {
2901
+ return console.error(w), /* @__PURE__ */ l(te, {});
2837
2902
  }
2838
2903
  };
2839
- return /* @__PURE__ */ l(jr, { ...e, children: e.drawings.map((L, b) => /* @__PURE__ */ N($r, { name: L.name, children: [
2840
- /* @__PURE__ */ N(Wr, { children: [
2904
+ return /* @__PURE__ */ l(Jr, { ...e, children: e.drawings.map((_, w) => /* @__PURE__ */ N(qr, { name: _.name, children: [
2905
+ /* @__PURE__ */ N(Yr, { children: [
2841
2906
  /* @__PURE__ */ N("h1", { children: [
2842
2907
  "Drawed Entity ",
2843
- L.name
2908
+ _.name
2844
2909
  ] }),
2845
2910
  /* @__PURE__ */ l("p", { children: "This is description of drawed entity" })
2846
2911
  ] }),
2847
- C(L)
2848
- ] }, L.id)) });
2849
- };
2850
- class _s extends vi {
2851
- }
2852
- class Ls extends Ei {
2853
- }
2854
- class Ss extends Ci {
2855
- }
2856
- class Ms extends Ee {
2857
- }
2858
- class Ps extends pe {
2859
- }
2860
- class Ds extends Oe {
2861
- }
2862
- class As extends wi {
2863
- }
2864
- class Is extends Wt {
2865
- }
2866
- class xs extends bi {
2867
- }
2868
- class ks extends Se {
2869
- }
2870
- class Os extends Ti {
2871
- }
2872
- class Rs extends _i {
2873
- }
2874
- class Ns extends Li {
2875
- }
2876
- const Bs = it, Fs = Ut, Hs = (e) => {
2912
+ E(_)
2913
+ ] }, _.id)) });
2914
+ }, Us = (e) => {
2877
2915
  const n = le();
2878
- return I(() => {
2879
- n.extend(Si);
2916
+ return x(() => {
2917
+ n.extend(Pi);
2880
2918
  }, [n]), /* @__PURE__ */ l(te, {});
2881
- }, eo = -25, kt = 2, Gs = (e) => {
2882
- const n = le(), t = (r, d = ",") => r.slice(r.indexOf(`
2919
+ }, oo = -25, Ot = 2, Ks = (e) => {
2920
+ const n = le(), t = (r, c = ",") => r.slice(r.indexOf(`
2883
2921
  `) + 1).split(`
2884
- `).map((E) => {
2885
- const C = E.split(d);
2922
+ `).map((v) => {
2923
+ const E = v.split(c);
2886
2924
  return {
2887
- cartographic: Oe.fromDegrees(parseFloat(C[0]), parseFloat(C[1])),
2888
- cartesian: new Ee(parseFloat(C[0]), parseFloat(C[1]))
2925
+ cartographic: Be.fromDegrees(parseFloat(E[0]), parseFloat(E[1])),
2926
+ cartesian: new Ce(parseFloat(E[0]), parseFloat(E[1]))
2889
2927
  };
2890
2928
  }), i = (r) => {
2891
2929
  var u;
2892
2930
  r.preventDefault(), r.persist();
2893
- const d = new FileReader();
2894
- d.onload = (h) => {
2895
- var b;
2896
- const E = (b = h.target) == null ? void 0 : b.result, C = t(E), L = Wt.WGS84;
2931
+ const c = new FileReader();
2932
+ c.onload = (m) => {
2933
+ var w;
2934
+ const v = (w = m.target) == null ? void 0 : w.result, E = t(v), _ = Ut.WGS84;
2897
2935
  console.log(`Loaded CSV content:
2898
- `, E), Mi(
2936
+ `, v), Di(
2899
2937
  n.terrainProvider,
2900
- C.map((P) => P.cartographic)
2938
+ E.map((P) => P.cartographic)
2901
2939
  ).then(
2902
2940
  (P) => {
2903
- console.log(P), P = P.slice(0, P.length - 1), n.scene.globe.depthTestAgainstTerrain = !0, n.entities.suspendEvents(), n.entities.removeAll(), P.forEach((B, $) => {
2941
+ console.log(P), P = P.slice(0, P.length - 1), n.scene.globe.depthTestAgainstTerrain = !0, n.entities.suspendEvents(), n.entities.removeAll(), P.forEach((R, V) => {
2904
2942
  n.entities.add({
2905
- name: ($ + kt).toString(),
2906
- position: L.cartographicToCartesian(B),
2943
+ name: (V + Ot).toString(),
2944
+ position: _.cartographicToCartesian(R),
2907
2945
  billboard: {
2908
2946
  verticalOrigin: it.BOTTOM,
2909
2947
  scale: 0.7,
2910
2948
  image: "assets/img/map-marker.gif"
2911
2949
  },
2912
2950
  label: {
2913
- text: ($ + kt).toString(),
2951
+ text: (V + Ot).toString(),
2914
2952
  font: "14pt monospace",
2915
- fillColor: nt.BLACK,
2916
- style: Ut.FILL_AND_OUTLINE,
2953
+ fillColor: rt.BLACK,
2954
+ style: Kt.FILL_AND_OUTLINE,
2917
2955
  outlineWidth: 4,
2918
- outlineColor: nt.BLACK,
2956
+ outlineColor: rt.BLACK,
2919
2957
  verticalOrigin: it.BOTTOM,
2920
- pixelOffset: new Ee(0, eo)
2958
+ pixelOffset: new Ce(0, oo)
2921
2959
  },
2922
2960
  description: `
2923
- Long: ${C[$].cartesian.x} </br>
2924
- Lat: ${C[$].cartesian.y} </br>
2925
- Height(m): <span style="font-weight: 500">${B.height}</span>
2961
+ Long: ${E[V].cartesian.x} </br>
2962
+ Lat: ${E[V].cartesian.y} </br>
2963
+ Height(m): <span style="font-weight: 500">${R.height}</span>
2926
2964
  `
2927
2965
  });
2928
- }), n.entities.resumeEvents(), r.target.files !== null && (o(`terranian_heights_${r.target.files[0].name}`, C), r.target.value = ""), console.log("Pinned point count is ", n.entities.values.length);
2966
+ }), n.entities.resumeEvents(), r.target.files !== null && (o(`terranian_heights_${r.target.files[0].name}`, E), r.target.value = ""), console.log("Pinned point count is ", n.entities.values.length);
2929
2967
  },
2930
2968
  (P) => {
2931
2969
  console.error("ERROR while sampleTerrainMostDetailed:", P);
2932
2970
  }
2933
2971
  );
2934
- }, (u = r.target.files) != null && u[0] && d.readAsText(r.target.files[0]);
2935
- }, o = (r, d) => {
2936
- const u = (b) => {
2972
+ }, (u = r.target.files) != null && u[0] && c.readAsText(r.target.files[0]);
2973
+ }, o = (r, c) => {
2974
+ const u = (w) => {
2937
2975
  let P = "";
2938
- return P += b.cartesian.x.toString() + ",", P += b.cartesian.y.toString() + ",", P += b.cartographic.height.toString(), P + `
2976
+ return P += w.cartesian.x.toString() + ",", P += w.cartesian.y.toString() + ",", P += w.cartographic.height.toString(), P + `
2939
2977
  `;
2940
2978
  };
2941
- let h = `long,lat,height
2979
+ let m = `long,lat,height
2942
2980
  `;
2943
- d.forEach((b) => {
2944
- h += u(b);
2981
+ c.forEach((w) => {
2982
+ m += u(w);
2945
2983
  });
2946
- const E = new Blob([h], { type: "text/csv;charset=utf-8;" }), C = document.createElement("a"), L = URL.createObjectURL(E);
2947
- C.setAttribute("href", L), C.setAttribute("download", r), C.style.visibility = "hidden", document.body.appendChild(C), C.click(), document.body.removeChild(C);
2984
+ const v = new Blob([m], { type: "text/csv;charset=utf-8;" }), E = document.createElement("a"), _ = URL.createObjectURL(v);
2985
+ E.setAttribute("href", _), E.setAttribute("download", r), E.style.visibility = "hidden", document.body.appendChild(E), E.click(), document.body.removeChild(E);
2948
2986
  };
2949
2987
  return /* @__PURE__ */ l(te, { children: /* @__PURE__ */ l(
2950
2988
  "input",
@@ -2958,8 +2996,8 @@ const Bs = it, Fs = Ut, Hs = (e) => {
2958
2996
  }
2959
2997
  ) });
2960
2998
  };
2961
- const to = 38, no = 40, io = 13, ro = 14, oo = 27, so = 9, ao = 10, lo = 100, co = (e) => {
2962
- const [n, t] = A(e.defaultValue ?? ""), [i, o] = A(!1), [r, d] = A({
2999
+ const so = 38, ao = 40, lo = 13, co = 14, uo = 27, ho = 9, mo = 10, po = 100, go = (e) => {
3000
+ const [n, t] = I(e.defaultValue ?? ""), [i, o] = I(!1), [r, c] = I({
2963
3001
  helperVisible: !1,
2964
3002
  left: 0,
2965
3003
  right: 0,
@@ -2972,69 +3010,69 @@ const to = 38, no = 40, io = 13, ro = 14, oo = 27, so = 9, ao = 10, lo = 100, co
2972
3010
  value: "",
2973
3011
  caret: 0,
2974
3012
  width: "unset"
2975
- }), u = be(null);
2976
- I(() => (window.addEventListener("resize", B), () => {
3013
+ }), u = _e(null);
3014
+ x(() => (window.addEventListener("resize", R), () => {
2977
3015
  try {
2978
- window.removeEventListener("resize", B);
3016
+ window.removeEventListener("resize", R);
2979
3017
  } catch (f) {
2980
3018
  console.log('WINDOW "resize" remove listener failed', f);
2981
3019
  }
2982
- }), []), I(() => {
3020
+ }), []), x(() => {
2983
3021
  typeof e.value < "u" && t(e.value), typeof e.defaultValue < "u" && t(e.defaultValue);
2984
- }, [e.value, e.defaultValue]), I(() => {
2985
- const { options: f } = e, { caret: m } = r;
2986
- Y(n, m, f);
3022
+ }, [e.value, e.defaultValue]), x(() => {
3023
+ const { options: f } = e, { caret: h } = r;
3024
+ K(n, h, f);
2987
3025
  }, [e]);
2988
- const h = (f, m, v) => {
2989
- const { trigger: g, matchAny: w, regex: S } = e, _ = new RegExp(S);
3026
+ const m = (f, h, C) => {
3027
+ const { trigger: g, matchAny: b, regex: S } = e, L = new RegExp(S);
2990
3028
  let T = g;
2991
3029
  Array.isArray(T) || (T = new Array(g)), T.sort();
2992
3030
  const M = {};
2993
- Array.isArray(v) && T.forEach((X) => {
2994
- M[X] = v;
3031
+ Array.isArray(C) && T.forEach((Y) => {
3032
+ M[Y] = C;
2995
3033
  });
2996
- const D = E(T, _);
3034
+ const D = v(T, L);
2997
3035
  let U = {};
2998
- for (let X = 0; X < D.length; X++) {
2999
- const { triggerStr: R, triggerMatch: z, triggerLength: Q } = D[X];
3000
- for (let ie = m - 1; ie >= 0; --ie) {
3001
- const F = f.substring(ie, m).match(_);
3002
- let k = -1;
3036
+ for (let Y = 0; Y < D.length; Y++) {
3037
+ const { triggerStr: O, triggerMatch: z, triggerLength: Q } = D[Y];
3038
+ for (let ie = h - 1; ie >= 0; --ie) {
3039
+ const de = f.substring(ie, h).match(L);
3040
+ let se = -1;
3003
3041
  if (Q > 0) {
3004
- const j = z ? ie : ie - Q + 1;
3005
- if (j < 0 || (C(R, f, j) && (k = j + Q), !F && k < 0))
3042
+ const B = z ? ie : ie - Q + 1;
3043
+ if (B < 0 || (E(O, f, B) && (se = B + Q), !de && se < 0))
3006
3044
  break;
3007
3045
  } else {
3008
- if (F && ie > 0)
3046
+ if (de && ie > 0)
3009
3047
  continue;
3010
- if (k = ie === 0 && F ? 0 : ie + 1, m - k === 0)
3048
+ if (se = ie === 0 && de ? 0 : ie + 1, h - se === 0)
3011
3049
  break;
3012
3050
  }
3013
- if (k >= 0) {
3014
- const j = M[R];
3015
- if (!Array.isArray(j))
3051
+ if (se >= 0) {
3052
+ const B = M[O];
3053
+ if (!Array.isArray(B))
3016
3054
  continue;
3017
- const fe = f.substring(k, m), Te = j.filter((Ne) => {
3018
- const De = Ne.toLowerCase().indexOf(fe.toLowerCase());
3019
- return De !== -1 && (w || De === 0);
3020
- }), ye = R, Re = fe.length;
3055
+ const F = f.substring(se, h), ee = B.filter((ye) => {
3056
+ const xe = ye.toLowerCase().indexOf(F.toLowerCase());
3057
+ return xe !== -1 && (b || xe === 0);
3058
+ }), we = O, Le = F.length;
3021
3059
  U = {
3022
3060
  ...U,
3023
- trigger: ye,
3024
- matchStart: k,
3025
- matchLength: Re,
3026
- options: Te
3061
+ trigger: we,
3062
+ matchStart: se,
3063
+ matchLength: Le,
3064
+ options: ee
3027
3065
  };
3028
3066
  }
3029
3067
  }
3030
3068
  }
3031
3069
  return U;
3032
- }, E = (f, m) => f.map((g) => ({
3070
+ }, v = (f, h) => f.map((g) => ({
3033
3071
  triggerStr: g,
3034
- triggerMatch: g.match(m),
3072
+ triggerMatch: g.match(h),
3035
3073
  triggerLength: g.length
3036
- })), C = (f, m, v) => !f || !f.length || m.substr(v, f.length) === f, L = (f) => {
3037
- const { onChange: m, options: v, spaceRemovers: g, spacer: w, value: S } = e, _ = n, T = f.target.value, M = Ii(b(f.target)).end;
3074
+ })), E = (f, h, C) => !f || !f.length || h.substr(C, f.length) === f, _ = (f) => {
3075
+ const { onChange: h, options: C, spaceRemovers: g, spacer: b, value: S } = e, L = n, T = f.target.value, M = Ri(w(f.target)).end;
3038
3076
  if (T.length || H({
3039
3077
  ...r,
3040
3078
  helperVisible: !1
@@ -3043,110 +3081,110 @@ const to = 38, no = 40, io = 13, ro = 14, oo = 27, so = 9, ao = 10, lo = 100, co
3043
3081
  caret: M,
3044
3082
  value: f.target.value
3045
3083
  }), !T.length || !M)
3046
- return m(f.target.value);
3047
- if (i && g.length && T.length > 2 && w.length) {
3048
- for (let D = 0; D < Math.max(_.length, T.length); ++D)
3049
- if (_[D] !== T[D]) {
3050
- if (D >= 2 && T[D - 1] === w && g.indexOf(T[D - 2]) === -1 && g.indexOf(T[D]) !== -1 && !rt(h(T.substring(0, D - 2), M - 3, v))) {
3084
+ return h(f.target.value);
3085
+ if (i && g.length && T.length > 2 && b.length) {
3086
+ for (let D = 0; D < Math.max(L.length, T.length); ++D)
3087
+ if (L[D] !== T[D]) {
3088
+ if (D >= 2 && T[D - 1] === b && g.indexOf(T[D - 2]) === -1 && g.indexOf(T[D]) !== -1 && !ot(m(T.substring(0, D - 2), M - 3, C))) {
3051
3089
  const U = `${T.slice(0, D - 1)}${T.slice(D, D + 1)}${T.slice(D - 1, D)}${T.slice(D + 1)}`;
3052
3090
  return q(D + 1), u.current !== null && (u.current.value = U), S || H({
3053
3091
  ...r,
3054
3092
  value: U
3055
- }), m(U);
3093
+ }), h(U);
3056
3094
  }
3057
3095
  break;
3058
3096
  }
3059
3097
  o(!1);
3060
3098
  }
3061
- return Y(T, M, v), m(f.target.value);
3062
- }, b = (f) => {
3099
+ return K(T, M, C), h(f.target.value);
3100
+ }, w = (f) => {
3063
3101
  if (f !== void 0)
3064
3102
  if (f.children.length > 0) {
3065
- const m = f.getElementsByTagName("textarea");
3066
- if (m.length > 0)
3067
- return m[0];
3068
- const v = f.getElementsByTagName("input");
3069
- if (v.length > 0)
3070
- return v[0];
3103
+ const h = f.getElementsByTagName("textarea");
3104
+ if (h.length > 0)
3105
+ return h[0];
3106
+ const C = f.getElementsByTagName("input");
3107
+ if (C.length > 0)
3108
+ return C[0];
3071
3109
  } else
3072
3110
  return f;
3073
3111
  }, P = (f) => {
3074
- const { helperVisible: m, options: v, selection: g } = r, { onKeyDown: w, passThroughEnter: S } = e;
3075
- if (m)
3112
+ const { helperVisible: h, options: C, selection: g } = r, { onKeyDown: b, passThroughEnter: S } = e;
3113
+ if (h)
3076
3114
  switch (f.keyCode) {
3077
- case oo:
3078
- f.preventDefault(), K();
3115
+ case uo:
3116
+ f.preventDefault(), j();
3079
3117
  break;
3080
- case to:
3118
+ case so:
3081
3119
  f.preventDefault(), H({
3082
3120
  ...r,
3083
- selection: (v.length + g - 1) % v.length
3121
+ selection: (C.length + g - 1) % C.length
3084
3122
  });
3085
3123
  break;
3086
- case no:
3124
+ case ao:
3087
3125
  f.preventDefault(), H({
3088
3126
  ...r,
3089
- selection: (g + 1) % v.length
3127
+ selection: (g + 1) % C.length
3090
3128
  });
3091
3129
  break;
3092
- case ro:
3093
- case io:
3094
- S || f.preventDefault(), $(g);
3130
+ case co:
3131
+ case lo:
3132
+ S || f.preventDefault(), V(g);
3095
3133
  break;
3096
- case so:
3097
- $(g);
3134
+ case ho:
3135
+ V(g);
3098
3136
  break;
3099
3137
  default:
3100
- w(f);
3138
+ b(f);
3101
3139
  break;
3102
3140
  }
3103
3141
  else
3104
- w(f);
3105
- }, B = () => {
3142
+ b(f);
3143
+ }, R = () => {
3106
3144
  H({
3107
3145
  ...r,
3108
3146
  helperVisible: !1
3109
3147
  });
3110
- }, $ = (f) => {
3111
- const { spacer: m, onSelect: v, changeOnSelect: g } = e, { matchStart: w, matchLength: S, options: _, trigger: T } = r, M = _[f], D = n, U = D.substring(0, w - T.length), X = D.substring(w + S), R = { target: u.current }, z = g(T, M);
3112
- R.target !== null && (R.target.value = `${U}${z}${m}${X}`), L(R), R.target !== null && v(R.target.value), K(), q(U.length + z.length + 1), o(!0);
3148
+ }, V = (f) => {
3149
+ const { spacer: h, onSelect: C, changeOnSelect: g } = e, { matchStart: b, matchLength: S, options: L, trigger: T } = r, M = L[f], D = n, U = D.substring(0, b - T.length), Y = D.substring(b + S), O = { target: u.current }, z = g(T, M);
3150
+ O.target !== null && (O.target.value = `${U}${z}${h}${Y}`), _(O), O.target !== null && C(O.target.value), j(), q(U.length + z.length + 1), o(!0);
3113
3151
  }, q = (f) => {
3114
3152
  H({
3115
3153
  ...r,
3116
3154
  caret: f
3117
3155
  });
3118
- const m = b(u.current);
3119
- xi(m, f);
3156
+ const h = w(u.current);
3157
+ Ni(h, f);
3120
3158
  }, H = (f) => {
3121
3159
  setTimeout(() => {
3122
- d({
3160
+ c({
3123
3161
  ...f
3124
3162
  });
3125
3163
  }, 0);
3126
- }, Y = (f, m, v) => {
3164
+ }, K = (f, h, C) => {
3127
3165
  const g = u.current;
3128
3166
  if (u.current === null)
3129
3167
  return;
3130
- const w = b(g);
3131
- if (w === void 0)
3168
+ const b = w(g);
3169
+ if (b === void 0)
3132
3170
  return;
3133
- const S = g.getBoundingClientRect(), _ = h(f, m, v);
3134
- if (Object.keys(_).length > 0 && w !== null) {
3135
- const T = Ai(w, m), M = w.getBoundingClientRect(), { minChars: D, onRequestOptions: U, requestOnlyIfNoOptions: X, mode: R } = e;
3136
- let z, Q, ie, ge = "unset";
3137
- R === "assist" ? (z = g === w ? T.top + w.offsetTop : T.top + S.top, Q = Math.min(T.left + w.offsetLeft - ao, w.offsetLeft + M.width - lo)) : (z = S.top + g.offsetHeight, Q = g.offsetLeft, ie = g.offsetLeft - g.offsetWidth, ge = `${S.width}px`), _.matchLength >= D && (_.options.length > 1 || _.options.length === 1 && _.options[0].length !== _.matchLength) ? H({
3171
+ const S = g.getBoundingClientRect(), L = m(f, h, C);
3172
+ if (Object.keys(L).length > 0 && b !== null) {
3173
+ const T = Oi(b, h), M = b.getBoundingClientRect(), { minChars: D, onRequestOptions: U, requestOnlyIfNoOptions: Y, mode: O } = e;
3174
+ let z, Q, ie, fe = "unset";
3175
+ O === "assist" ? (z = g === b ? T.top + b.offsetTop : T.top + S.top, Q = Math.min(T.left + b.offsetLeft - mo, b.offsetLeft + M.width - po)) : (z = S.top + g.offsetHeight, Q = g.offsetLeft, ie = g.offsetLeft - g.offsetWidth, fe = `${S.width}px`), L.matchLength >= D && (L.options.length > 1 || L.options.length === 1 && L.options[0].length !== L.matchLength) ? H({
3138
3176
  ...r,
3139
3177
  value: f,
3140
3178
  helperVisible: !0,
3141
3179
  top: z,
3142
3180
  left: Q,
3143
3181
  right: ie,
3144
- width: ge,
3145
- ..._
3146
- }) : ((!X || !_.options.length) && U(f.substr(_.matchStart, _.matchLength)), K());
3182
+ width: fe,
3183
+ ...L
3184
+ }) : ((!Y || !L.options.length) && U(f.substr(L.matchStart, L.matchLength)), j());
3147
3185
  } else
3148
- K();
3149
- }, K = () => {
3186
+ j();
3187
+ }, j = () => {
3150
3188
  setTimeout(() => {
3151
3189
  H({
3152
3190
  ...r,
@@ -3154,60 +3192,60 @@ const to = 38, no = 40, io = 13, ro = 14, oo = 27, so = 9, ao = 10, lo = 100, co
3154
3192
  selection: 0
3155
3193
  });
3156
3194
  }, 100);
3157
- }, x = () => {
3158
- const { helperVisible: f, left: m, right: v, matchStart: g, matchLength: w, options: S, selection: _, top: T, value: M, width: D } = r;
3195
+ }, A = () => {
3196
+ const { helperVisible: f, left: h, right: C, matchStart: g, matchLength: b, options: S, selection: L, top: T, value: M, width: D } = r;
3159
3197
  if (!f)
3160
3198
  return null;
3161
- const { maxOptions: U, offsetX: X, offsetY: R, direction: z } = e;
3199
+ const { maxOptions: U, offsetX: Y, offsetY: O, direction: z } = e;
3162
3200
  if (S.length === 0)
3163
3201
  return null;
3164
- if (_ >= S.length)
3202
+ if (L >= S.length)
3165
3203
  return H({
3166
3204
  ...r,
3167
3205
  selection: 0
3168
3206
  }), null;
3169
- const Q = U === 0 ? S.length : U, ie = S.slice(0, Q).map((F, k) => {
3170
- const j = F.toLowerCase().indexOf(M.substr(g, w).toLowerCase());
3207
+ const Q = U === 0 ? S.length : U, ie = S.slice(0, Q).map((de, se) => {
3208
+ const B = de.toLowerCase().indexOf(M.substr(g, b).toLowerCase());
3171
3209
  return /* @__PURE__ */ N(
3172
3210
  "li",
3173
3211
  {
3174
- className: k === _ ? "active" : void 0,
3212
+ className: se === L ? "active" : void 0,
3175
3213
  onClick: () => {
3176
- $(k);
3214
+ V(se);
3177
3215
  },
3178
3216
  onMouseEnter: () => {
3179
3217
  H({
3180
3218
  ...r,
3181
- selection: k
3219
+ selection: se
3182
3220
  });
3183
3221
  },
3184
3222
  children: [
3185
- F.slice(0, j),
3186
- /* @__PURE__ */ l("strong", { children: F.substr(j, w) }),
3187
- F.slice(j + w)
3223
+ de.slice(0, B),
3224
+ /* @__PURE__ */ l("strong", { children: de.substr(B, b) }),
3225
+ de.slice(B + b)
3188
3226
  ]
3189
3227
  },
3190
- F
3228
+ de
3191
3229
  );
3192
- }), ge = z === "ltr" ? { left: m + X } : { right: v + X };
3193
- return /* @__PURE__ */ l("ul", { className: "react-autocomplete-input", style: { ...ge, top: T + R, width: D }, children: ie });
3194
- }, { Component: W, ComponentProps: O, defaultValue: V, disabled: ne, onBlur: s, value: a, ...y } = e, c = Object.assign({}, y);
3230
+ }), fe = z === "ltr" ? { left: h + Y } : { right: C + Y };
3231
+ return /* @__PURE__ */ l("ul", { className: "react-autocomplete-input", style: { ...fe, top: T + O, width: D }, children: ie });
3232
+ }, { Component: $, ComponentProps: k, defaultValue: W, disabled: ne, onBlur: s, value: a, ...y } = e, d = Object.assign({}, y);
3195
3233
  return Object.keys(e).forEach((f) => {
3196
- delete c[f];
3234
+ delete d[f];
3197
3235
  }), /* @__PURE__ */ N(te, { children: [
3198
- ve.cloneElement(W, {
3236
+ Ee.cloneElement($, {
3199
3237
  disabled: ne,
3200
3238
  onBlur: s,
3201
- onChange: L,
3239
+ onChange: _,
3202
3240
  onKeyDown: P,
3203
3241
  ref: u,
3204
3242
  value: n,
3205
- ...c,
3206
- ...O
3243
+ ...d,
3244
+ ...k
3207
3245
  }),
3208
- x()
3246
+ A()
3209
3247
  ] });
3210
- }, uo = {
3248
+ }, fo = {
3211
3249
  Component: /* @__PURE__ */ l("textarea", {}),
3212
3250
  ComponentProps: {},
3213
3251
  defaultValue: void 0,
@@ -3238,9 +3276,9 @@ const to = 38, no = 40, io = 13, ro = 14, oo = 27, so = 9, ao = 10, lo = 100, co
3238
3276
  passThroughEnter: !1,
3239
3277
  mode: "assist",
3240
3278
  direction: "ltr"
3241
- }, Vs = (e) => {
3279
+ }, js = (e) => {
3242
3280
  let n = {
3243
- ...uo,
3281
+ ...fo,
3244
3282
  ...e
3245
3283
  };
3246
3284
  return e.mode === "autocomplete" && (n = {
@@ -3248,10 +3286,10 @@ const to = 38, no = 40, io = 13, ro = 14, oo = 27, so = 9, ao = 10, lo = 100, co
3248
3286
  trigger: "",
3249
3287
  regex: ".",
3250
3288
  spacer: ""
3251
- }), /* @__PURE__ */ l(co, { ...n });
3252
- }, mt = {
3289
+ }), /* @__PURE__ */ l(go, { ...n });
3290
+ }, pt = {
3253
3291
  formatFileModDate: (e, n) => {
3254
- const t = Yt.getModDate(n);
3292
+ const t = Xt.getModDate(n);
3255
3293
  return t ? e.formatDate(t, {
3256
3294
  dateStyle: "short",
3257
3295
  timeStyle: "short"
@@ -3260,18 +3298,18 @@ const to = 38, no = 40, io = 13, ro = 14, oo = 27, so = 9, ao = 10, lo = 100, co
3260
3298
  formatFileSize: (e, n) => {
3261
3299
  if (!n || typeof n.size != "number")
3262
3300
  return null;
3263
- const t = n.size, i = Ni(t, {
3301
+ const t = n.size, i = Gi(t, {
3264
3302
  bits: !1,
3265
3303
  output: "object"
3266
3304
  });
3267
3305
  return i.symbol === "B" ? `${Math.round(i.value / 10) / 100} KB` : i.symbol === "KB" ? `${Math.round(i.value)} ${i.symbol}` : `${i.value} ${i.symbol.toUpperCase()}`;
3268
3306
  }
3269
- }, ho = {
3270
- locale: de.EN,
3271
- formatters: { ...mt }
3272
- }, mo = {
3273
- locale: de.RU,
3274
- formatters: { ...mt },
3307
+ }, yo = {
3308
+ locale: ue.EN,
3309
+ formatters: { ...pt }
3310
+ }, vo = {
3311
+ locale: ue.RU,
3312
+ formatters: { ...pt },
3275
3313
  messages: {
3276
3314
  "chonky.toolbar.searchPlaceholder": "Поиск",
3277
3315
  "chonky.toolbar.visibleFileCount": `{fileCount, plural,
@@ -3309,9 +3347,9 @@ const to = 38, no = 40, io = 13, ro = 14, oo = 27, so = 9, ao = 10, lo = 100, co
3309
3347
  [`chonky.actions.${G.ToggleHiddenFiles.id}.button.name`]: "Скрытые файлы",
3310
3348
  [`chonky.actions.${G.ToggleShowFoldersFirst.id}.button.name`]: "Папки в начале"
3311
3349
  }
3312
- }, po = {
3313
- locale: de.HE,
3314
- formatters: { ...mt },
3350
+ }, Eo = {
3351
+ locale: ue.HE,
3352
+ formatters: { ...pt },
3315
3353
  messages: {
3316
3354
  "chonky.toolbar.searchPlaceholder": "חיפוש",
3317
3355
  "chonky.toolbar.visibleFileCount": `{fileCount, plural,
@@ -3348,37 +3386,37 @@ const to = 38, no = 40, io = 13, ro = 14, oo = 27, so = 9, ao = 10, lo = 100, co
3348
3386
  [`chonky.actions.${G.ToggleHiddenFiles.id}.button.name`]: "קבצים נסתרים",
3349
3387
  [`chonky.actions.${G.ToggleShowFoldersFirst.id}.button.name`]: "הצגת תיקיות בראש הרשימה"
3350
3388
  }
3351
- }, go = {
3352
- [de.EN]: ho,
3353
- [de.RU]: mo,
3354
- [de.HE]: po
3389
+ }, Co = {
3390
+ [ue.EN]: yo,
3391
+ [ue.RU]: vo,
3392
+ [ue.HE]: Eo
3355
3393
  };
3356
- class zs extends Yt {
3394
+ class qs extends Xt {
3357
3395
  }
3358
- const $s = G, fo = {
3396
+ const Ys = G, wo = {
3359
3397
  listView: G.EnableListView.id,
3360
3398
  gridView: G.EnableGridView.id
3361
3399
  };
3362
- ki({ iconComponent: Ri });
3363
- const Ws = ve.memo(
3364
- ve.forwardRef(
3400
+ Bi({ iconComponent: Hi });
3401
+ const Xs = Ee.memo(
3402
+ Ee.forwardRef(
3365
3403
  ({
3366
3404
  theme: e,
3367
3405
  styles: n = { height: "100%", minWidth: "600px" },
3368
- defaultView: t = fo.listView,
3406
+ defaultView: t = wo.listView,
3369
3407
  readOnlyMode: i = !1,
3370
3408
  locale: o,
3371
3409
  files: r,
3372
- folderChain: d,
3410
+ folderChain: c,
3373
3411
  onFileAction: u,
3374
- ...h
3375
- }, E) => {
3376
- const C = me(
3377
- (V) => null,
3412
+ ...m
3413
+ }, v) => {
3414
+ const E = me(
3415
+ (W) => null,
3378
3416
  // file.thumbnailUrl ? `https://chonky.io${file.thumbnailUrl}` : null,
3379
3417
  []
3380
3418
  );
3381
- ke({
3419
+ Ne({
3382
3420
  "@global": {
3383
3421
  ".chonky-dropdownList": {
3384
3422
  backgroundColor: `${e == null ? void 0 : e.surface} !important`
@@ -3388,35 +3426,35 @@ const Ws = ve.memo(
3388
3426
  }
3389
3427
  }
3390
3428
  })();
3391
- const L = (V) => V.replace(/([A-Z])/g, (ne) => "-" + ne.toLowerCase()), b = $e(() => e !== void 0 ? Object.keys(e).reduce((ne, s) => {
3429
+ const _ = (W) => W.replace(/([A-Z])/g, (ne) => "-" + ne.toLowerCase()), w = ke(() => e !== void 0 ? Object.keys(e).reduce((ne, s) => {
3392
3430
  const a = e[s];
3393
- return s = s.startsWith("--") ? s : `--fp-theme-${L(s)}`, ne[s] = a, ne;
3394
- }, {}) : {}, [e]), [P, B] = A(!1), [$, q] = A(), [H, Y] = A(!1), [K, x] = A(), [W, O] = A();
3395
- return I(() => {
3396
- e && B(!0), q(t), i ? Y(!0) : x([G.CreateFolder, G.DeleteFiles]), o !== void 0 && O(go[o]);
3431
+ return s = s.startsWith("--") ? s : `--fp-theme-${_(s)}`, ne[s] = a, ne;
3432
+ }, {}) : {}, [e]), [P, R] = I(!1), [V, q] = I(), [H, K] = I(!1), [j, A] = I(), [$, k] = I();
3433
+ return x(() => {
3434
+ e && R(!0), q(t), i ? K(!0) : A([G.CreateFolder, G.DeleteFiles]), o !== void 0 && k(Co[o]);
3397
3435
  }, [e, t, i, o]), /* @__PURE__ */ l(
3398
- ae,
3436
+ ce,
3399
3437
  {
3400
3438
  style: {
3401
3439
  ...n,
3402
- ...b
3440
+ ...w
3403
3441
  },
3404
3442
  children: /* @__PURE__ */ l(
3405
- Oi,
3443
+ Fi,
3406
3444
  {
3407
- ref: E,
3445
+ ref: v,
3408
3446
  files: r ?? [],
3409
- folderChain: d,
3410
- onFileAction: (V) => {
3411
- typeof u == "function" && u(V);
3447
+ folderChain: c,
3448
+ onFileAction: (W) => {
3449
+ typeof u == "function" && u(W);
3412
3450
  },
3413
- thumbnailGenerator: C,
3414
- defaultFileViewActionId: $,
3451
+ thumbnailGenerator: E,
3452
+ defaultFileViewActionId: V,
3415
3453
  disableDragAndDrop: H,
3416
- fileActions: K,
3454
+ fileActions: j,
3417
3455
  darkMode: P,
3418
- i18n: W,
3419
- ...h
3456
+ i18n: $,
3457
+ ...m
3420
3458
  }
3421
3459
  )
3422
3460
  }
@@ -3425,76 +3463,76 @@ const Ws = ve.memo(
3425
3463
  )
3426
3464
  );
3427
3465
  export {
3428
- Vs as Autocomplete,
3429
- ot as BboxCorner,
3430
- ae as Box,
3431
- at as COORDINATES_MERCATOR_FRACTION_DIGITS,
3432
- st as COORDINATES_WGS_FRACTION_DIGITS,
3433
- gs as Cesium3DTileset,
3434
- As as CesiumBoundingSphere,
3435
- Ms as CesiumCartesian2,
3436
- Ps as CesiumCartesian3,
3437
- Ds as CesiumCartographic,
3438
- Ns as CesiumCesiumTerrainProvider,
3439
- bs as CesiumColor,
3440
- Ss as CesiumConstantPositionProperty,
3441
- Ls as CesiumConstantProperty,
3442
- jr as CesiumCustomDataSource,
3443
- Ts as CesiumDrawingsDataSource,
3444
- Is as CesiumEllipsoid,
3445
- Rs as CesiumEllipsoidTerrainProvider,
3446
- $r as CesiumEntity,
3447
- ws as CesiumEntityDescription,
3448
- Wr as CesiumEntityStaticDescription,
3449
- xs as CesiumGeographicTilingScheme,
3450
- fs as CesiumGeojsonLayer,
3451
- Ke as CesiumImageryLayer,
3452
- Fs as CesiumLabelStyle,
3453
- ps as CesiumMap,
3454
- Ys as CesiumMath,
3455
- Cs as CesiumOSMLayer,
3456
- Ur as CesiumPolygonGraphics,
3457
- _s as CesiumPolylineDashMaterialProperty,
3458
- ks as CesiumRectangle,
3459
- Kr as CesiumRectangleGraphics,
3460
- Os as CesiumResource,
3466
+ js as Autocomplete,
3467
+ st as BboxCorner,
3468
+ ce as Box,
3469
+ lt as COORDINATES_MERCATOR_FRACTION_DIGITS,
3470
+ at as COORDINATES_WGS_FRACTION_DIGITS,
3471
+ Ns as Cesium3DTileset,
3472
+ Ls as CesiumBoundingSphere,
3473
+ Ts as CesiumCartesian2,
3474
+ _s as CesiumCartesian3,
3475
+ _r as CesiumCartographic,
3476
+ xs as CesiumCesiumTerrainProvider,
3477
+ $s as CesiumColor,
3478
+ bs as CesiumConstantPositionProperty,
3479
+ ws as CesiumConstantProperty,
3480
+ Jr as CesiumCustomDataSource,
3481
+ Ws as CesiumDrawingsDataSource,
3482
+ Ss as CesiumEllipsoid,
3483
+ Is as CesiumEllipsoidTerrainProvider,
3484
+ qr as CesiumEntity,
3485
+ zs as CesiumEntityDescription,
3486
+ Yr as CesiumEntityStaticDescription,
3487
+ Ms as CesiumGeographicTilingScheme,
3488
+ Bs as CesiumGeojsonLayer,
3489
+ je as CesiumImageryLayer,
3490
+ ks as CesiumLabelStyle,
3491
+ Rs as CesiumMap,
3492
+ ta as CesiumMath,
3493
+ Vs as CesiumOSMLayer,
3494
+ Xr as CesiumPolygonGraphics,
3495
+ Cs as CesiumPolylineDashMaterialProperty,
3496
+ Ps as CesiumRectangle,
3497
+ Zr as CesiumRectangleGraphics,
3498
+ Ds as CesiumResource,
3461
3499
  oe as CesiumSceneMode,
3462
- Bs as CesiumVerticalOrigin,
3463
- ms as CesiumViewer,
3464
- ys as CesiumWMSLayer,
3465
- vs as CesiumWMTSLayer,
3466
- Es as CesiumXYZLayer,
3467
- Er as CoordinatesTrackerTool,
3468
- us as CssBaseline,
3469
- as as DateRangePicker,
3470
- ls as DateTimePicker,
3471
- Vi as DateTimeRangePicker,
3472
- os as DateTimeRangePickerFormControl,
3473
- Ce as DrawHelper,
3474
- se as DrawType,
3475
- zs as FileHelper,
3476
- Ws as FilePicker,
3477
- $s as FilePickerActions,
3478
- fo as FilePickerViewObj,
3479
- Hs as InspectorTool,
3480
- cs as MapFilterContainer,
3481
- zi as Popover,
3482
- he as Proj,
3483
- Tr as ScaleTrackerTool,
3484
- hs as ScopedCssBaseline,
3485
- ds as SmartTable,
3486
- de as SupportedLocales,
3487
- Gs as TerrainianHeightTool,
3488
- ss as TimeRangeInput,
3489
- Lr as ZoomLevelTrackerTool,
3490
- Xs as cesiumSampleTerrainMostDetailed,
3491
- mt as defaultFormatters,
3492
- Ye as isDateRange,
3493
- Bi as mapMcToMuiTheme,
3494
- Zr as polygonToGeoJSON,
3495
- Jr as rectangleToGeoJSON,
3496
- Qr as rectangleToPositions,
3500
+ As as CesiumVerticalOrigin,
3501
+ Os as CesiumViewer,
3502
+ Fs as CesiumWMSLayer,
3503
+ Hs as CesiumWMTSLayer,
3504
+ Gs as CesiumXYZLayer,
3505
+ Lr as CoordinatesTrackerTool,
3506
+ vs as CssBaseline,
3507
+ ps as DateRangePicker,
3508
+ gs as DateTimePicker,
3509
+ Ui as DateTimeRangePicker,
3510
+ hs as DateTimeRangePickerFormControl,
3511
+ be as DrawHelper,
3512
+ ae as DrawType,
3513
+ qs as FileHelper,
3514
+ Xs as FilePicker,
3515
+ Ys as FilePickerActions,
3516
+ wo as FilePickerViewObj,
3517
+ Us as InspectorTool,
3518
+ fs as MapFilterContainer,
3519
+ Ki as Popover,
3520
+ pe as Proj,
3521
+ Mr as ScaleTrackerTool,
3522
+ Es as ScopedCssBaseline,
3523
+ ys as SmartTable,
3524
+ ue as SupportedLocales,
3525
+ Ks as TerrainianHeightTool,
3526
+ ms as TimeRangeInput,
3527
+ Dr as ZoomLevelTrackerTool,
3528
+ na as cesiumSampleTerrainMostDetailed,
3529
+ pt as defaultFormatters,
3530
+ Xe as isDateRange,
3531
+ Vi as mapMcToMuiTheme,
3532
+ no as polygonToGeoJSON,
3533
+ io as rectangleToGeoJSON,
3534
+ ro as rectangleToPositions,
3497
3535
  le as useCesiumMap,
3498
- Xt as useMappedMuiTheme,
3499
- js as useMediaQuery
3536
+ Zt as useMappedMuiTheme,
3537
+ Qs as useMediaQuery
3500
3538
  };