@map-colonies/react-components 4.0.2 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/@map-colonies/react-components.es.js +1448 -1891
  2. package/dist/@map-colonies/react-components.umd.js +3 -3
  3. package/dist/assets/img/dragIcon.png +0 -0
  4. package/dist/assets/img/dragIconLight.png +0 -0
  5. package/dist/assets/img/glyphicons_067_cleaning.png +0 -0
  6. package/dist/assets/img/glyphicons_094_vector_path_square.png +0 -0
  7. package/dist/assets/img/glyphicons_095_vector_path_circle.png +0 -0
  8. package/dist/assets/img/glyphicons_096_vector_path_polygon.png +0 -0
  9. package/dist/assets/img/glyphicons_097_vector_path_line.png +0 -0
  10. package/dist/assets/img/glyphicons_242_google_maps.png +0 -0
  11. package/dist/assets/img/map-marker.gif +0 -0
  12. package/dist/assets/img/transparent-tile.png +0 -0
  13. package/dist/cesium-map/layers-manager.d.ts +4 -1
  14. package/dist/cesium-map/map.d.ts +3 -1
  15. package/dist/cesium-map/proxied.types.d.ts +1 -1
  16. package/dist/cssbaseline/index.d.ts +1 -1
  17. package/dist/file-picker/file-picker.d.ts +2 -2
  18. package/dist/smart-table/icons/KeyboardArrowDown.d.ts +1 -0
  19. package/dist/smart-table/icons/KeyboardArrowDown.js +8 -0
  20. package/dist/smart-table/icons/KeyboardArrowUp.d.ts +1 -0
  21. package/dist/smart-table/icons/KeyboardArrowUp.js +8 -0
  22. package/dist/smart-table/icons/utils/createSvgIcon.d.ts +1 -0
  23. package/dist/smart-table/icons/utils/createSvgIcon.js +1 -0
  24. package/package.json +8 -9
  25. package/dist/fonts/material-icons/MaterialIcons-Regular.eot +0 -0
  26. package/dist/fonts/material-icons/MaterialIcons-Regular.ijmap +0 -1
  27. package/dist/fonts/material-icons/MaterialIcons-Regular.svg +0 -2373
  28. package/dist/fonts/material-icons/MaterialIcons-Regular.ttf +0 -0
  29. package/dist/fonts/material-icons/MaterialIcons-Regular.woff +0 -0
  30. package/dist/fonts/material-icons/MaterialIcons-Regular.woff2 +0 -0
  31. package/dist/fonts/material-icons/README.md +0 -9
  32. package/dist/fonts/material-icons/codepoints +0 -932
  33. package/dist/fonts/material-icons/material-icons.css +0 -36
@@ -1,49 +1,50 @@
1
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}.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 Ut = Object.defineProperty;
3
- var Wt = (e, i, t) => i in e ? Ut(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t;
4
- var J = (e, i, t) => (Wt(e, typeof i != "symbol" ? i + "" : i, t), t);
5
- import { jsx as l, jsxs as D, Fragment as oe } from "react/jsx-runtime";
6
- import ve, { useState as k, useEffect as I, useMemo as ft, createContext as Se, useRef as Le, useContext as Pe, useCallback as ge, useLayoutEffect as jt } from "react";
7
- import { isValid as Ee, isBefore as Kt, format as rt } from "date-fns";
8
- import { he as yt, enUS as vt } from "date-fns/locale";
9
- import { MuiPickersUtilsProvider as Et, KeyboardDateTimePicker as Ue, KeyboardDatePicker as qt } from "@material-ui/pickers";
10
- import Ct from "@date-io/date-fns";
11
- import { createTheme as Yt, makeStyles as Me, createStyles as Re } from "@material-ui/core/styles";
12
- import { Box as Xt, ThemeProvider as wt, Popover as Zt, Paper as We, TableRow as ke, TableCell as we, TableSortLabel as Jt, IconButton as Qt, Collapse as ei, TableContainer as ti, Table as ii, TableBody as ni, Typography as ri, TablePagination as oi } from "@material-ui/core";
13
- import { useTheme as bt, ThemeProvider as si, Button as Ie, TextField as ai, Tooltip as je, Menu as li, MenuItem as He, Icon as be, Dialog as ci, DialogTitle as di, DialogContent as ui, Drawer as hi, DrawerHeader as pi, DrawerTitle as mi, DrawerContent as gi } from "@map-colonies/react-core";
14
- import { default as ys } from "@material-ui/core/useMediaQuery";
15
- import fi from "@turf/rewind";
16
- import { Map as yi, View as vi } from "ol";
2
+ var Xt = Object.defineProperty;
3
+ var Zt = (e, n, t) => n in e ? Xt(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
4
+ var X = (e, n, t) => (Zt(e, typeof n != "symbol" ? n + "" : n, t), t);
5
+ import { jsx as l, jsxs as R, Fragment as re } from "react/jsx-runtime";
6
+ import * as bt from "react";
7
+ import Ee, { useState as k, useEffect as I, useMemo as Tt, createContext as Le, useRef as ve, useContext as Pe, useCallback as me, useLayoutEffect as Jt } from "react";
8
+ import { isValid as Ce, isBefore as Qt, format as ot } from "date-fns";
9
+ import { he as _t, enUS as St } from "date-fns/locale";
10
+ import { MuiPickersUtilsProvider as Lt, KeyboardDateTimePicker as We, KeyboardDatePicker as en } from "@material-ui/pickers";
11
+ import Pt from "@date-io/date-fns";
12
+ import { createTheme as tn, makeStyles as Me, createStyles as Be } from "@material-ui/core/styles";
13
+ import { Box as nn, ThemeProvider as Mt, Popover as rn, Paper as je, TableRow as Ie, TableCell as be, TableSortLabel as on, IconButton as sn, Collapse as an, TableContainer as ln, Table as cn, TableBody as dn, Typography as un, TablePagination as hn } from "@material-ui/core";
14
+ import { useTheme as At, ThemeProvider as pn, Button as Oe, TextField as mn, Tooltip as Ke, Menu as gn, MenuItem as He, Icon as Te, Dialog as fn, DialogTitle as yn, DialogContent as vn, Drawer as En, DrawerHeader as Cn, DrawerTitle as wn, DrawerContent as bn } from "@map-colonies/react-core";
15
+ import { default as _s } from "@material-ui/core/useMediaQuery";
16
+ import Tn from "@turf/rewind";
17
+ import { Map as _n, View as Sn } from "ol";
17
18
  import "ol/ol.css";
18
- import { format as ot } from "ol/coordinate";
19
- import { defaults as Ei, FullScreen as st } from "ol/control";
20
- import Ge from "ol/control/MousePosition";
21
- import { transform as Ci } from "ol/proj";
22
- import { Tile as wi, Vector as bi } from "ol/layer";
23
- import { Vector as Ti, OSM as _i } from "ol/source";
24
- import { GeoJSON as Tt } from "ol/format";
25
- import { Draw as Si } from "ol/interaction";
26
- import { createBox as Li } from "ol/interaction/Draw";
27
- import Pi from "@material-ui/core/TableHead";
28
- import { KeyboardArrowUp as Mi, KeyboardArrowDown as Ai } from "@material-ui/icons";
29
- import xi from "@material-ui/core/CssBaseline";
30
- import ki from "@material-ui/core/ScopedCssBaseline";
31
- import { createPortal as Ii } from "react-dom";
32
- import { Viewer as Oi, Cesium3DTileset as Di, GeoJsonDataSource as Ri, ImageryLayer as Bi, Entity as Ni, EntityDescription as _t, PolygonGraphics as Fi, RectangleGraphics as Hi, CustomDataSource as Gi, PolylineGraphics as Vi } from "resium";
19
+ import { format as st } from "ol/coordinate";
20
+ import { defaults as Ln, FullScreen as at } from "ol/control";
21
+ import Ve from "ol/control/MousePosition";
22
+ import { transform as Pn } from "ol/proj";
23
+ import { Tile as Mn, Vector as An } from "ol/layer";
24
+ import { Vector as xn, OSM as kn } from "ol/source";
25
+ import { GeoJSON as xt } from "ol/format";
26
+ import { Draw as In } from "ol/interaction";
27
+ import { createBox as On } from "ol/interaction/Draw";
28
+ import Dn from "@material-ui/core/TableHead";
29
+ import { createSvgIcon as kt } from "@material-ui/core/utils";
30
+ import Rn from "@material-ui/core/CssBaseline";
31
+ import Bn from "@material-ui/core/ScopedCssBaseline";
32
+ import { createPortal as Nn } from "react-dom";
33
+ import { Viewer as Fn, Cesium3DTileset as Gn, GeoJsonDataSource as Hn, ImageryLayer as Vn, Entity as zn, EntityDescription as It, PolygonGraphics as $n, RectangleGraphics as Un, CustomDataSource as Wn, PolylineGraphics as jn } from "resium";
33
34
  import * as p from "cesium";
34
- import { ScreenSpaceEventType as St, Cartesian3 as me, Math as le, WebMercatorProjection as zi, EventHelper as $i, EllipsoidGeodesic as Ui, Cartesian2 as Te, SceneMode as ye, Cartographic as Be, UrlTemplateImageryProvider as Ze, WebMapServiceImageryProvider as Je, WebMapTileServiceImageryProvider as Qe, Event as Wi, SingleTileImageryProvider as ji, Rectangle as Ce, Viewer as Ki, Matrix4 as qi, OpenStreetMapImageryProvider as Yi, Color as Xi, PolygonHierarchy as Zi, PolylineDashMaterialProperty as Ji, ConstantProperty as Qi, ConstantPositionProperty as en, BoundingSphere as tn, Ellipsoid as nn, GeographicTilingScheme as rn, Resource as on, EllipsoidTerrainProvider as sn, CesiumTerrainProvider as an, VerticalOrigin as ln, LabelStyle as cn } from "cesium";
35
- import { Math as Es, sampleTerrainMostDetailed as Cs } from "cesium";
36
- import { get as Q, isNumber as Oe, isEmpty as Ke, isArray as dn, find as at } from "lodash";
37
- import un from "@turf/boolean-point-in-polygon";
38
- import * as Lt from "@turf/helpers";
39
- import Pt from "@turf/bbox";
40
- import Mt from "@turf/bbox-polygon";
41
- import hn from "textarea-caret";
42
- import pn, { setCaretPosition as mn } from "get-input-selection";
43
- import { ChonkyActions as N, FileHelper as At, setChonkyDefaults as gn, FullFileBrowser as fn } from "chonky";
44
- import { ChonkyIconFA as yn } from "chonky-icon-fontawesome";
45
- import vn from "filesize";
46
- var re = /* @__PURE__ */ ((e) => (e.BOX = "BOX", e.POLYGON = "POLYGON", e.UNKNOWN = "UNKNOWN", e))(re || {}), ce = /* @__PURE__ */ ((e) => (e.HE = "he", e.EN = "en", e.RU = "ru", e))(ce || {}), qe = /* @__PURE__ */ ((e) => (e.TOP_RIGHT = "TOP_RIGHT", e.BOTTOM_LEFT = "BOTTOM_LEFT", e))(qe || {});
35
+ import { ScreenSpaceEventType as Kn, Cartesian3 as ge, Math as le, WebMercatorProjection as qn, EventHelper as Yn, EllipsoidGeodesic as Xn, Cartesian2 as _e, SceneMode as ye, Cartographic as Ne, UrlTemplateImageryProvider as Je, WebMapServiceImageryProvider as Qe, WebMapTileServiceImageryProvider as et, Event as Zn, SingleTileImageryProvider as Jn, Rectangle as we, Viewer as Qn, Matrix4 as ei, OpenStreetMapImageryProvider as ti, Color as ni, PolygonHierarchy as ii, PolylineDashMaterialProperty as ri, ConstantProperty as oi, ConstantPositionProperty as si, BoundingSphere as ai, Ellipsoid as li, GeographicTilingScheme as ci, Resource as di, EllipsoidTerrainProvider as ui, CesiumTerrainProvider as hi, VerticalOrigin as pi, LabelStyle as mi } from "cesium";
36
+ import { Math as Ls, sampleTerrainMostDetailed as Ps } from "cesium";
37
+ import { get as Q, isNumber as De, isEmpty as qe, isArray as gi, find as lt } from "lodash";
38
+ import fi from "@turf/boolean-point-in-polygon";
39
+ import * as Ot from "@turf/helpers";
40
+ import Dt from "@turf/bbox";
41
+ import Rt from "@turf/bbox-polygon";
42
+ import yi from "textarea-caret";
43
+ import vi, { setCaretPosition as Ei } from "get-input-selection";
44
+ import { ChonkyActions as N, FileHelper as Bt, setChonkyDefaults as Ci, FullFileBrowser as wi } from "chonky";
45
+ import { ChonkyIconFA as bi } from "chonky-icon-fontawesome";
46
+ import Ti from "filesize";
47
+ var ie = /* @__PURE__ */ ((e) => (e.BOX = "BOX", e.POLYGON = "POLYGON", e.UNKNOWN = "UNKNOWN", e))(ie || {}), ce = /* @__PURE__ */ ((e) => (e.HE = "he", e.EN = "en", e.RU = "ru", e))(ce || {}), Ye = /* @__PURE__ */ ((e) => (e.TOP_RIGHT = "TOP_RIGHT", e.BOTTOM_LEFT = "BOTTOM_LEFT", e))(Ye || {});
47
48
  const Z = {
48
49
  // eslint-disable-next-line @typescript-eslint/naming-convention
49
50
  DATE_PICKER: {
@@ -72,17 +73,14 @@ const Z = {
72
73
  disableFuture: !0
73
74
  }
74
75
  }, ae = (e) => {
75
- const { children: i, ...t } = e;
76
- return /* @__PURE__ */ l(Xt, { ...t, children: i });
77
- }, xt = (e) => {
78
- const i = e.type === "dark";
79
- return ve.useMemo(() => En(e, i), [
80
- i,
81
- e
82
- ]);
83
- }, En = (e, i = !1) => Yt({
76
+ const { children: n, ...t } = e;
77
+ return /* @__PURE__ */ l(nn, { ...t, children: n });
78
+ }, Nt = (e) => {
79
+ const n = e.type === "dark";
80
+ return Ee.useMemo(() => _i(e, n), [n, e]);
81
+ }, _i = (e, n = !1) => tn({
84
82
  palette: {
85
- type: i ? "dark" : "light",
83
+ type: n ? "dark" : "light",
86
84
  primary: {
87
85
  main: e.primary
88
86
  },
@@ -97,111 +95,103 @@ const Z = {
97
95
  paper: e.background
98
96
  },
99
97
  text: {
100
- primary: i ? e.textPrimaryOnDark : e.textPrimaryOnLight,
101
- secondary: i ? e.textSecondaryOnDark : e.textSecondaryOnLight
98
+ primary: n ? e.textPrimaryOnDark : e.textPrimaryOnLight,
99
+ secondary: n ? e.textSecondaryOnDark : e.textSecondaryOnLight
102
100
  }
103
101
  }
104
102
  });
105
- const Cn = 2, wn = 0.5, bn = Me(
106
- (e) => Re({
103
+ const Si = 2, Li = 0.5, Pi = Me(
104
+ (e) => Be({
107
105
  container: {
108
- padding: e.spacing(Cn),
106
+ padding: e.spacing(Si),
109
107
  alignItems: "center"
110
108
  },
111
109
  setButton: {
112
110
  marginTop: e.spacing(1)
113
111
  },
114
112
  margin: {
115
- marginLeft: e.spacing(wn)
113
+ marginLeft: e.spacing(Li)
116
114
  }
117
115
  })
118
- ), Tn = (e) => {
119
- var U, V, j, O;
120
- const i = bn(), t = bt(), n = xt(t), [a, o] = k(null), [d, u] = k(null), [v, C] = k(
121
- Z.DATE_RANGE_PICKER.dateFormat
122
- ), S = e.controlsLayout ?? Z.DATE_RANGE_PICKER.controlsLayout, A = e.disableFuture ?? Z.DATE_RANGE_PICKER.disableFuture, L = ((U = e.local) == null ? void 0 : U.startPlaceHolderText) ?? Z.DATE_RANGE_PICKER.local.startPlaceHolderText, R = ((V = e.local) == null ? void 0 : V.endPlaceHolderText) ?? Z.DATE_RANGE_PICKER.local.endPlaceHolderText, z = ((j = e.local) == null ? void 0 : j.setText) ?? Z.DATE_RANGE_PICKER.local.setText, Y = (((O = e.local) == null ? void 0 : O.calendarLocale) ?? Z.DATE_RANGE_PICKER.local.calendarLocale) === ce.HE ? yt : vt;
116
+ ), Mi = (e) => {
117
+ var z, V, W, D;
118
+ const n = Pi(), t = At(), i = Nt(t), [a, r] = k(null), [d, h] = k(null), [v, C] = k(Z.DATE_RANGE_PICKER.dateFormat), S = e.controlsLayout ?? Z.DATE_RANGE_PICKER.controlsLayout, x = e.disableFuture ?? Z.DATE_RANGE_PICKER.disableFuture, L = ((z = e.local) == null ? void 0 : z.startPlaceHolderText) ?? Z.DATE_RANGE_PICKER.local.startPlaceHolderText, B = ((V = e.local) == null ? void 0 : V.endPlaceHolderText) ?? Z.DATE_RANGE_PICKER.local.endPlaceHolderText, U = ((W = e.local) == null ? void 0 : W.setText) ?? Z.DATE_RANGE_PICKER.local.setText, J = (((D = e.local) == null ? void 0 : D.calendarLocale) ?? Z.DATE_RANGE_PICKER.local.calendarLocale) === ce.HE ? _t : St;
123
119
  I(() => {
124
- o(e.from ?? null);
120
+ r(e.from ?? null);
125
121
  }, [e.from]), I(() => {
126
- u(e.to ?? null);
122
+ h(e.to ?? null);
127
123
  }, [e.to]), I(() => {
128
124
  C(e.dateFormat ?? Z.DATE_RANGE_PICKER.dateFormat);
129
125
  }, [e.dateFormat]);
130
- const F = Boolean(
131
- Ee(a) && !d || Ee(d) && !a || a && d && Ee(a) && Ee(d) && Kt(a, d)
132
- ), X = () => {
126
+ const G = Boolean(
127
+ Ce(a) && !d || Ce(d) && !a || a && d && Ce(a) && Ce(d) && Qt(a, d)
128
+ ), Y = () => {
133
129
  e.onChange({
134
- from: a && Ee(a) ? a : void 0,
135
- to: d && Ee(d) ? d : void 0
130
+ from: a && Ce(a) ? a : void 0,
131
+ to: d && Ce(d) ? d : void 0
136
132
  });
137
133
  };
138
- return /* @__PURE__ */ l(wt, { theme: n, children: /* @__PURE__ */ l(
134
+ return /* @__PURE__ */ l(Mt, { theme: i, children: /* @__PURE__ */ l(
139
135
  ae,
140
136
  {
141
- className: `${i.container} drpContainer`,
137
+ className: `${n.container} drpContainer`,
142
138
  display: "flex",
143
139
  flexDirection: S,
144
140
  width: S === "column" ? e.contentWidth : "unset",
145
- children: /* @__PURE__ */ D(Et, { utils: Ct, locale: Y, children: [
141
+ children: /* @__PURE__ */ R(Lt, { utils: Pt, locale: J, children: [
146
142
  /* @__PURE__ */ l(
147
- Ue,
143
+ We,
148
144
  {
149
145
  variant: "inline",
150
146
  placeholder: L,
151
- onChange: ($) => o($),
147
+ onChange: ($) => r($),
152
148
  value: a,
153
- disableFuture: A,
149
+ disableFuture: x,
154
150
  format: v,
155
151
  maxDate: e.maxDate,
156
152
  minDate: e.minDate
157
153
  }
158
154
  ),
159
155
  /* @__PURE__ */ l(
160
- Ue,
156
+ We,
161
157
  {
162
158
  variant: "inline",
163
- placeholder: R,
164
- className: i.margin,
165
- onChange: ($) => u($),
159
+ placeholder: B,
160
+ className: n.margin,
161
+ onChange: ($) => h($),
166
162
  value: d,
167
- disableFuture: A,
163
+ disableFuture: x,
168
164
  format: v,
169
165
  maxDate: e.maxDate,
170
166
  minDate: e.minDate
171
167
  }
172
168
  ),
173
- /* @__PURE__ */ l(si, { options: t, children: /* @__PURE__ */ l(
174
- Ie,
169
+ /* @__PURE__ */ l(pn, { use: t, children: /* @__PURE__ */ l(
170
+ Oe,
175
171
  {
176
- className: `${i.setButton} ${i.margin}`,
172
+ className: `${n.setButton} ${n.margin}`,
177
173
  raised: !0,
178
- onClick: X,
179
- disabled: !F,
180
- children: z
174
+ onClick: Y,
175
+ disabled: !G,
176
+ children: U
181
177
  }
182
178
  ) })
183
179
  ] })
184
180
  }
185
181
  ) });
186
- }, _n = (e) => {
187
- const { children: i, ...t } = e;
188
- return /* @__PURE__ */ l(Zt, { ...t, children: i });
182
+ }, Ai = (e) => {
183
+ const { children: n, ...t } = e;
184
+ return /* @__PURE__ */ l(rn, { ...t, children: n });
189
185
  };
190
- const Oo = (e) => {
191
- var V, j;
192
- const [i, t] = k(null), [n, a] = k(null), [o, d] = k(
193
- Z.DATE_RANGE_PICKER.dateFormat
194
- ), [u, v] = ve.useState(
195
- null
196
- ), C = (O) => {
197
- v(O.currentTarget);
198
- }, S = (O) => {
199
- O.currentTarget.tagName === "I" ? v(
200
- O.currentTarget.previousElementSibling
201
- ) : v(O.currentTarget);
202
- }, A = () => {
186
+ const Ho = (e) => {
187
+ var V, W;
188
+ const [n, t] = k(null), [i, a] = k(null), [r, d] = k(Z.DATE_RANGE_PICKER.dateFormat), [h, v] = Ee.useState(null), C = (D) => {
189
+ v(D.currentTarget);
190
+ }, S = (D) => {
191
+ D.currentTarget.tagName === "I" ? v(D.currentTarget.previousElementSibling) : v(D.currentTarget);
192
+ }, x = () => {
203
193
  v(null);
204
- }, L = Boolean(u), R = e.controlsLayout ?? "column";
194
+ }, L = Boolean(h), B = e.controlsLayout ?? "column";
205
195
  I(() => {
206
196
  t(e.from ?? null);
207
197
  }, [e.from]), I(() => {
@@ -209,24 +199,15 @@ const Oo = (e) => {
209
199
  }, [e.to]), I(() => {
210
200
  d(e.dateFormat ?? Z.DATE_RANGE_PICKER.dateFormat);
211
201
  }, [e.dateFormat]);
212
- const z = ((V = e.local) == null ? void 0 : V.startPlaceHolderText) ?? Z.DATE_RANGE_PICKER.local.startPlaceHolderText, K = ((j = e.local) == null ? void 0 : j.endPlaceHolderText) ?? Z.DATE_RANGE_PICKER.local.endPlaceHolderText, Y = e.renderAsButton === void 0 ? Z.DATE_RANGE_PICKER.renderAsButton : e.renderAsButton, F = e.offset === void 0 ? Z.DATE_RANGE_PICKER.offset : e.offset, X = e.disableFuture === void 0 ? Z.DATE_RANGE_PICKER.disableFuture : e.disableFuture, U = ft(() => `${i ? rt(i, o) : z} - ${n ? rt(n, o) : K}`, [i, n, o, z, K]);
213
- return /* @__PURE__ */ D(oe, { children: [
214
- Y ? /* @__PURE__ */ l(
215
- Ie,
216
- {
217
- style: { width: e.width },
218
- raised: !0,
219
- onClick: C,
220
- className: "drpOpener",
221
- children: U
222
- }
223
- ) : /* @__PURE__ */ l(
224
- ai,
202
+ const U = ((V = e.local) == null ? void 0 : V.startPlaceHolderText) ?? Z.DATE_RANGE_PICKER.local.startPlaceHolderText, K = ((W = e.local) == null ? void 0 : W.endPlaceHolderText) ?? Z.DATE_RANGE_PICKER.local.endPlaceHolderText, J = e.renderAsButton === void 0 ? Z.DATE_RANGE_PICKER.renderAsButton : e.renderAsButton, G = e.offset === void 0 ? Z.DATE_RANGE_PICKER.offset : e.offset, Y = e.disableFuture === void 0 ? Z.DATE_RANGE_PICKER.disableFuture : e.disableFuture, z = Tt(() => `${n ? ot(n, r) : U} - ${i ? ot(i, r) : K}`, [n, i, r, U, K]);
203
+ return /* @__PURE__ */ R(re, { children: [
204
+ J ? /* @__PURE__ */ l(Oe, { style: { width: e.width }, raised: !0, onClick: C, className: "drpOpener", children: z }) : /* @__PURE__ */ l(
205
+ mn,
225
206
  {
226
207
  className: "drpOpener",
227
208
  readOnly: !0,
228
209
  style: { width: e.width },
229
- value: U,
210
+ value: z,
230
211
  onClick: S,
231
212
  trailingIcon: {
232
213
  icon: "date_range",
@@ -235,117 +216,89 @@ const Oo = (e) => {
235
216
  }
236
217
  }
237
218
  ),
238
- /* @__PURE__ */ l(
239
- _n,
219
+ /* @__PURE__ */ l(Ai, { open: L, anchorEl: h, onClose: x, anchorOrigin: { vertical: "bottom", horizontal: "left" }, keepMounted: !0, children: /* @__PURE__ */ l(
220
+ Mi,
240
221
  {
241
- open: L,
242
- anchorEl: u,
243
- onClose: A,
244
- anchorOrigin: { vertical: "bottom", horizontal: "left" },
245
- keepMounted: !0,
246
- children: /* @__PURE__ */ l(
247
- Tn,
248
- {
249
- controlsLayout: R,
250
- contentWidth: ((u == null ? void 0 : u.clientWidth) ?? 0) - F,
251
- dateFormat: o,
252
- disableFuture: X,
253
- minDate: e.minDate,
254
- maxDate: e.maxDate,
255
- local: e.local,
256
- from: i ?? void 0,
257
- to: n ?? void 0,
258
- onChange: ({ from: O, to: $ }) => {
259
- t(O ?? null), a($ ?? null), e.onChange({ from: O, to: $ }), A();
260
- }
261
- }
262
- )
222
+ controlsLayout: B,
223
+ contentWidth: ((h == null ? void 0 : h.clientWidth) ?? 0) - G,
224
+ dateFormat: r,
225
+ disableFuture: Y,
226
+ minDate: e.minDate,
227
+ maxDate: e.maxDate,
228
+ local: e.local,
229
+ from: n ?? void 0,
230
+ to: i ?? void 0,
231
+ onChange: ({ from: D, to: $ }) => {
232
+ t(D ?? null), a($ ?? null), e.onChange({ from: D, to: $ }), x();
233
+ }
263
234
  }
264
- )
235
+ ) })
265
236
  ] });
266
237
  };
267
- const Do = (e) => {
268
- const i = bt(), t = xt(i), [n, a] = k(e.value), {
269
- format: o = Z.DATE_PICKER.dateFormat,
238
+ const Vo = (e) => {
239
+ const n = At(), t = Nt(n), [i, a] = k(e.value), {
240
+ format: r = Z.DATE_PICKER.dateFormat,
270
241
  variant: d = Z.DATE_PICKER.variant,
271
- disableFuture: u = Z.DATE_PICKER.disableFuture,
242
+ disableFuture: h = Z.DATE_PICKER.disableFuture,
272
243
  local: v,
273
244
  onChange: C,
274
245
  showTime: S = Z.DATE_PICKER.showTime,
275
- value: A,
246
+ value: x,
276
247
  ...L
277
- } = e, {
278
- placeHolderText: R = Z.DATE_PICKER.local.placeHolderText,
279
- calendarLocale: z
280
- } = v ?? {
248
+ } = e, { placeHolderText: B = Z.DATE_PICKER.local.placeHolderText, calendarLocale: U } = v ?? {
281
249
  placeHolderText: Z.DATE_PICKER.local.placeHolderText,
282
250
  calendarLocale: ce.EN
283
- }, K = z === ce.HE ? yt : vt, Y = (F) => {
284
- a(F), C(F);
251
+ }, K = U === ce.HE ? _t : St, J = (G) => {
252
+ a(G), C(G);
285
253
  };
286
- return /* @__PURE__ */ l(wt, { theme: t, children: /* @__PURE__ */ D(Et, { utils: Ct, locale: K, children: [
254
+ return /* @__PURE__ */ l(Mt, { theme: t, children: /* @__PURE__ */ R(Lt, { utils: Pt, locale: K, children: [
287
255
  S && /* @__PURE__ */ l(
288
- Ue,
256
+ We,
289
257
  {
290
258
  variant: d,
291
- placeholder: R,
292
- onChange: Y,
293
- value: n,
294
- disableFuture: u,
295
- format: o,
259
+ placeholder: B,
260
+ onChange: J,
261
+ value: i,
262
+ disableFuture: h,
263
+ format: r,
296
264
  ...L
297
265
  }
298
266
  ),
299
267
  !S && /* @__PURE__ */ l(
300
- qt,
268
+ en,
301
269
  {
302
270
  variant: d,
303
- placeholder: R,
304
- onChange: Y,
305
- value: n,
306
- disableFuture: u,
307
- format: o,
271
+ placeholder: B,
272
+ onChange: J,
273
+ value: i,
274
+ disableFuture: h,
275
+ format: r,
308
276
  ...L
309
277
  }
310
278
  )
311
279
  ] }) });
312
- }, Sn = 18, Ln = Me(
313
- (e) => Re({
280
+ }, xi = 18, ki = Me(
281
+ (e) => Be({
314
282
  drawingButton: {
315
- width: e.spacing(Sn)
283
+ width: e.spacing(xi)
316
284
  },
317
285
  fullWidth: {
318
286
  width: "100%",
319
287
  marginTop: "36px"
320
288
  }
321
289
  })
322
- ), Pn = (e) => {
323
- const i = Ln(), [t, n] = ve.useState(null), { isSelectionEnabled: a, onCancelDraw: o, onStartDraw: d, onReset: u } = e, v = (S) => {
324
- n(S.currentTarget);
290
+ ), Ii = (e) => {
291
+ const n = ki(), [t, i] = Ee.useState(null), { isSelectionEnabled: a, onCancelDraw: r, onStartDraw: d, onReset: h } = e, v = (S) => {
292
+ i(S.currentTarget);
325
293
  }, C = () => {
326
- n(null);
294
+ i(null);
327
295
  };
328
- return a ? /* @__PURE__ */ l(je, { content: "Cancel the ongoing draw", align: "bottomLeft", children: /* @__PURE__ */ l(Ie, { className: i.drawingButton, raised: !0, onClick: o, children: "Cancel Draw" }) }) : /* @__PURE__ */ D(ae, { position: "relative", children: [
329
- /* @__PURE__ */ l(
330
- je,
296
+ return a ? /* @__PURE__ */ l(Ke, { content: "Cancel the ongoing draw", align: "bottomLeft", children: /* @__PURE__ */ l(Oe, { className: n.drawingButton, raised: !0, onClick: r, children: "Cancel Draw" }) }) : /* @__PURE__ */ R(ae, { position: "relative", children: [
297
+ /* @__PURE__ */ l(Ke, { content: "draw an Area of interest to limit the search", align: "bottomLeft", children: /* @__PURE__ */ l(Oe, { className: n.drawingButton, raised: !0, onClick: v, children: "Draw AOI" }) }),
298
+ /* @__PURE__ */ R(
299
+ gn,
331
300
  {
332
- content: "draw an Area of interest to limit the search",
333
- align: "bottomLeft",
334
- children: /* @__PURE__ */ l(
335
- Ie,
336
- {
337
- className: i.drawingButton,
338
- raised: !0,
339
- onClick: v,
340
- children: "Draw AOI"
341
- }
342
- )
343
- }
344
- ),
345
- /* @__PURE__ */ D(
346
- li,
347
- {
348
- className: i.fullWidth,
301
+ className: n.fullWidth,
349
302
  open: Boolean(t),
350
303
  onClose: C,
351
304
  children: [
@@ -353,7 +306,7 @@ const Do = (e) => {
353
306
  He,
354
307
  {
355
308
  onClick: () => {
356
- d(re.POLYGON), C();
309
+ d(ie.POLYGON), C();
357
310
  },
358
311
  children: "Polygon"
359
312
  }
@@ -362,7 +315,7 @@ const Do = (e) => {
362
315
  He,
363
316
  {
364
317
  onClick: () => {
365
- d(re.BOX), C();
318
+ d(ie.BOX), C();
366
319
  },
367
320
  children: "Box"
368
321
  }
@@ -371,7 +324,7 @@ const Do = (e) => {
371
324
  He,
372
325
  {
373
326
  onClick: () => {
374
- u(), C();
327
+ h(), C();
375
328
  },
376
329
  children: "Clear"
377
330
  }
@@ -381,155 +334,138 @@ const Do = (e) => {
381
334
  )
382
335
  ] });
383
336
  };
384
- var ue = /* @__PURE__ */ ((e) => (e.WGS84 = "EPSG:4326", e.WEB_MERCATOR = "EPSG:3857", e))(ue || {});
385
- const Ye = 5, Xe = 2, kt = Se(null), Mn = kt.Provider, lt = 35, ct = 32, An = 10, xn = (e) => e !== void 0 && e !== ue.WGS84 ? Ci([lt, ct], ue.WGS84, e) : [lt, ct], kn = (e) => {
337
+ var he = /* @__PURE__ */ ((e) => (e.WGS84 = "EPSG:4326", e.WEB_MERCATOR = "EPSG:3857", e))(he || {});
338
+ const Xe = 5, Ze = 2, Ft = Le(null), Oi = Ft.Provider, ct = 35, dt = 32, Di = 10, Ri = (e) => e !== void 0 && e !== he.WGS84 ? Pn([ct, dt], he.WGS84, e) : [ct, dt], Bi = (e) => {
386
339
  switch (e) {
387
- case ue.WEB_MERCATOR:
388
- return (i) => ot(
389
- i,
390
- "Mercator: {y}m, {x}m",
391
- Xe
392
- );
393
- case ue.WGS84:
394
- return (i) => ot(
395
- i,
396
- "WGS84: {y}°N {x}°E",
397
- Ye
398
- );
340
+ case he.WEB_MERCATOR:
341
+ return (n) => st(n, "Mercator: {y}m, {x}m", Ze);
342
+ case he.WGS84:
343
+ return (n) => st(n, "WGS84: {y}°N {x}°E", Xe);
399
344
  default:
400
- return (i) => "";
345
+ return (n) => "";
401
346
  }
402
- }, et = () => {
403
- const e = Pe(kt);
347
+ }, tt = () => {
348
+ const e = Pe(Ft);
404
349
  if (e === null)
405
350
  throw new Error("map context is null, please check the provider");
406
351
  return e;
407
- }, In = (e) => {
408
- const i = Le(null), { allowFullScreen: t, showMousePosition: n, projection: a } = e, [o] = k(
409
- new yi({
410
- view: new vi({
411
- projection: a ?? ue.WGS84
352
+ }, Ni = (e) => {
353
+ const n = ve(null), { allowFullScreen: t, showMousePosition: i, projection: a } = e, [r] = k(
354
+ new _n({
355
+ view: new Sn({
356
+ projection: a ?? he.WGS84
412
357
  }),
413
- controls: Ei()
358
+ controls: Ln()
414
359
  })
415
360
  );
416
361
  I(() => {
417
- o.getView().setCenter(e.center ?? xn(e.projection));
418
- }, [o, e.center, e.projection]), I(() => {
419
- o.getView().setZoom(e.zoom ?? An);
420
- }, [o, e.zoom, e.projection]);
421
- const d = (u, v) => {
362
+ r.getView().setCenter(e.center ?? Ri(e.projection));
363
+ }, [r, e.center, e.projection]), I(() => {
364
+ r.getView().setZoom(e.zoom ?? Di);
365
+ }, [r, e.zoom, e.projection]);
366
+ const d = (h, v) => {
422
367
  v.getControls().forEach((S) => {
423
- S instanceof u && v.removeControl(S);
368
+ S instanceof h && v.removeControl(S);
424
369
  });
425
370
  };
426
371
  return I(() => {
427
- o.setTarget(i.current), t !== void 0 && t ? o.addControl(new st()) : d(st, o);
428
- }, [o, t]), I(() => {
429
- n !== void 0 && n ? (d(Ge, o), o.addControl(
430
- new Ge({
431
- coordinateFormat: kn(a ?? ue.WGS84),
432
- projection: a ?? ue.WGS84,
372
+ r.setTarget(n.current), t !== void 0 && t ? r.addControl(new at()) : d(at, r);
373
+ }, [r, t]), I(() => {
374
+ i !== void 0 && i ? (d(Ve, r), r.addControl(
375
+ new Ve({
376
+ coordinateFormat: Bi(a ?? he.WGS84),
377
+ projection: a ?? he.WGS84,
433
378
  undefinedHTML: "&nbsp;"
434
379
  })
435
- )) : d(Ge, o);
436
- }, [o, n, a]), /* @__PURE__ */ D(Mn, { value: o, children: [
437
- /* @__PURE__ */ l("div", { className: "map", ref: i }),
380
+ )) : d(Ve, r);
381
+ }, [r, i, a]), /* @__PURE__ */ R(Oi, { value: r, children: [
382
+ /* @__PURE__ */ l("div", { className: "map", ref: n }),
438
383
  e.children
439
384
  ] });
440
- }, It = Se(null), On = It.Provider, Dn = () => {
441
- const e = Pe(It);
385
+ }, Gt = Le(null), Fi = Gt.Provider, Gi = () => {
386
+ const e = Pe(Gt);
442
387
  if (e === null)
443
388
  throw new Error("tile layer context is null, please check the provider");
444
389
  return e;
445
- }, Rn = ({ options: e, children: i }) => {
446
- const t = et(), [n] = k(new wi(e));
447
- return I(() => (t.addLayer(n), () => {
448
- t.removeLayer(n);
449
- }), [t, n]), /* @__PURE__ */ l(On, { value: n, children: i });
450
- }, Ot = Se(null), Bn = Ot.Provider, Nn = () => {
451
- const e = Pe(Ot);
390
+ }, Hi = ({ options: e, children: n }) => {
391
+ const t = tt(), [i] = k(new Mn(e));
392
+ return I(() => (t.addLayer(i), () => {
393
+ t.removeLayer(i);
394
+ }), [t, i]), /* @__PURE__ */ l(Fi, { value: i, children: n });
395
+ }, Ht = Le(null), Vi = Ht.Provider, zi = () => {
396
+ const e = Pe(Ht);
452
397
  if (e === null)
453
398
  throw new Error("vector layer context is null, please check the provider");
454
399
  return e;
455
- }, Fn = ({ children: e }) => {
456
- const i = et(), [t] = k(new bi());
457
- return I(() => (i.addLayer(t), () => {
458
- i.removeLayer(t);
459
- }), [i, t]), /* @__PURE__ */ l(Bn, { value: t, children: e });
460
- }, Dt = Se(null), Hn = Dt.Provider, Gn = () => {
461
- const e = Pe(Dt);
400
+ }, $i = ({ children: e }) => {
401
+ const n = tt(), [t] = k(new An());
402
+ return I(() => (n.addLayer(t), () => {
403
+ n.removeLayer(t);
404
+ }), [n, t]), /* @__PURE__ */ l(Vi, { value: t, children: e });
405
+ }, Vt = Le(null), Ui = Vt.Provider, Wi = () => {
406
+ const e = Pe(Vt);
462
407
  if (e === null)
463
408
  throw new Error("vector source context is null, please check the provider");
464
409
  return e;
465
- }, Vn = ({ children: e }) => {
466
- const i = Nn(), [t] = k(new Ti());
410
+ }, ji = ({ children: e }) => {
411
+ const n = zi(), [t] = k(new xn());
467
412
  return I(() => {
468
- i.setSource(t);
469
- }, [t, i]), /* @__PURE__ */ l(Hn, { value: t, children: e });
470
- }, zn = ({ geometry: e }) => {
471
- const i = Gn();
413
+ n.setSource(t);
414
+ }, [t, n]), /* @__PURE__ */ l(Ui, { value: t, children: e });
415
+ }, Ki = ({ geometry: e }) => {
416
+ const n = Wi();
472
417
  return I(() => {
473
- const n = new Tt().readFeature(e);
474
- return i.addFeature(n), () => {
475
- i.removeFeature(n);
418
+ const i = new xt().readFeature(e);
419
+ return n.addFeature(i), () => {
420
+ n.removeFeature(i);
476
421
  };
477
- }, [e, i]), null;
478
- }, $n = (e) => {
479
- const i = Dn();
422
+ }, [e, n]), null;
423
+ }, qi = (e) => {
424
+ const n = Gi();
480
425
  return I(() => {
481
- i.setSource(new _i());
482
- }, [i]), null;
483
- }, Un = ({
484
- drawType: e,
485
- onPolygonSelected: i
486
- }) => {
487
- const t = et();
426
+ n.setSource(new kn());
427
+ }, [n]), null;
428
+ }, Yi = ({ drawType: e, onPolygonSelected: n }) => {
429
+ const t = tt();
488
430
  return I(() => {
489
- const n = {
431
+ const i = {
490
432
  type: "Circle"
491
433
  /* CIRCLE */
492
434
  };
493
435
  switch (e) {
494
- case re.BOX:
495
- n.geometryFunction = Li();
436
+ case ie.BOX:
437
+ i.geometryFunction = On();
496
438
  break;
497
- case re.POLYGON:
498
- n.type = "Polygon";
439
+ case ie.POLYGON:
440
+ i.type = "Polygon";
499
441
  break;
500
442
  default:
501
443
  return;
502
444
  }
503
- const a = new Si(n);
445
+ const a = new In(i);
504
446
  t.addInteraction(a);
505
- const o = (d) => {
506
- const v = new Tt().writeGeometryObject(d.feature.getGeometry());
507
- i == null || i(v);
447
+ const r = (d) => {
448
+ const v = new xt().writeGeometryObject(d.feature.getGeometry());
449
+ n == null || n(v);
508
450
  };
509
- return a.on("drawend", o), () => {
510
- a.un("drawend", o), t.removeInteraction(a);
451
+ return a.on("drawend", r), () => {
452
+ a.un("drawend", r), t.removeInteraction(a);
511
453
  };
512
- }, [i, e, t]), null;
454
+ }, [n, e, t]), null;
513
455
  };
514
- const Wn = (e) => {
515
- const i = (t) => {
516
- const n = fi(t);
517
- e.onPolygonSelection(n);
456
+ const Xi = (e) => {
457
+ const n = (t) => {
458
+ const i = Tn(t);
459
+ e.onPolygonSelection(i);
518
460
  };
519
- return /* @__PURE__ */ D(In, { allowFullScreen: !0, showMousePosition: !0, children: [
520
- /* @__PURE__ */ l(Rn, { children: /* @__PURE__ */ l($n, {}) }),
521
- e.selectionPolygon && /* @__PURE__ */ l(Fn, { children: /* @__PURE__ */ l(Vn, { children: /* @__PURE__ */ l(zn, { geometry: e.selectionPolygon }) }) }),
461
+ return /* @__PURE__ */ R(Ni, { allowFullScreen: !0, showMousePosition: !0, children: [
462
+ /* @__PURE__ */ l(Hi, { children: /* @__PURE__ */ l(qi, {}) }),
463
+ e.selectionPolygon && /* @__PURE__ */ l($i, { children: /* @__PURE__ */ l(ji, { children: /* @__PURE__ */ l(Ki, { geometry: e.selectionPolygon }) }) }),
522
464
  e.children,
523
- e.drawType !== void 0 && /* @__PURE__ */ l(
524
- Un,
525
- {
526
- drawType: e.drawType,
527
- onPolygonSelected: i
528
- }
529
- )
465
+ e.drawType !== void 0 && /* @__PURE__ */ l(Yi, { drawType: e.drawType, onPolygonSelected: n })
530
466
  ] });
531
- }, Ve = 1.5, jn = 80, Kn = Me(
532
- (e) => Re({
467
+ }, ze = 1.5, Zi = 80, Ji = Me(
468
+ (e) => Be({
533
469
  map: {
534
470
  height: "100%",
535
471
  width: "100%",
@@ -538,12 +474,12 @@ const Wn = (e) => {
538
474
  absolute: {
539
475
  position: "absolute",
540
476
  zIndex: 1e3,
541
- left: e.spacing(Ve),
542
- top: e.spacing(Ve)
477
+ left: e.spacing(ze),
478
+ top: e.spacing(ze)
543
479
  },
544
480
  contentContainer: {
545
- marginTop: e.spacing(Ve),
546
- width: e.spacing(jn)
481
+ marginTop: e.spacing(ze),
482
+ width: e.spacing(Zi)
547
483
  },
548
484
  filtersContainer: {
549
485
  display: "flex",
@@ -553,235 +489,207 @@ const Wn = (e) => {
553
489
  marginLeft: e.spacing(1)
554
490
  }
555
491
  })
556
- ), Ro = (e) => {
492
+ ), zo = (e) => {
557
493
  var v;
558
- const [i, t] = k(), [n, a] = k(), o = Kn(), d = (C) => {
494
+ const [n, t] = k(), [i, a] = k(), r = Ji(), d = (C) => {
559
495
  a(C), t(void 0), e.handlePolygonSelected(C);
560
- }, u = () => {
496
+ }, h = () => {
561
497
  a(void 0), e.handlePolygonReset();
562
498
  };
563
- return /* @__PURE__ */ D("div", { className: o.map, children: [
564
- /* @__PURE__ */ D("div", { className: `${o.absolute}`, children: [
565
- /* @__PURE__ */ D(We, { className: o.filtersContainer, children: [
499
+ return /* @__PURE__ */ R("div", { className: r.map, children: [
500
+ /* @__PURE__ */ R("div", { className: `${r.absolute}`, children: [
501
+ /* @__PURE__ */ R(je, { className: r.filtersContainer, children: [
566
502
  /* @__PURE__ */ l(
567
- Pn,
503
+ Ii,
568
504
  {
569
505
  onCancelDraw: () => t(void 0),
570
- onReset: u,
506
+ onReset: h,
571
507
  onStartDraw: t,
572
- isSelectionEnabled: i !== void 0
508
+ isSelectionEnabled: n !== void 0
573
509
  }
574
510
  ),
575
- (v = e.filters) == null ? void 0 : v.map((C, S) => /* @__PURE__ */ l("div", { className: o.filtersMargin, children: C }, S))
511
+ (v = e.filters) == null ? void 0 : v.map((C, S) => /* @__PURE__ */ l("div", { className: r.filtersMargin, children: C }, S))
576
512
  ] }),
577
- /* @__PURE__ */ l(We, { color: "red", className: `${o.contentContainer}`, children: e.children })
513
+ /* @__PURE__ */ l(je, { color: "red", className: `${r.contentContainer}`, children: e.children })
578
514
  ] }),
579
- /* @__PURE__ */ l(
580
- Wn,
581
- {
582
- children: e.mapContent,
583
- onPolygonSelection: d,
584
- drawType: i,
585
- selectionPolygon: n
586
- }
587
- )
515
+ /* @__PURE__ */ l(Xi, { children: e.mapContent, onPolygonSelection: d, drawType: n, selectionPolygon: i })
588
516
  ] });
589
517
  };
590
- function qn(e) {
591
- const { headCells: i, order: t, orderBy: n, onRequestSort: a, isCollapseable: o } = e, d = (u) => (v) => {
592
- a(v, u);
518
+ function Qi(e) {
519
+ const { headCells: n, order: t, orderBy: i, onRequestSort: a, isCollapseable: r } = e, d = (h) => (v) => {
520
+ a(v, h);
593
521
  };
594
- return /* @__PURE__ */ l(Pi, { children: /* @__PURE__ */ D(ke, { children: [
595
- o && /* @__PURE__ */ l(we, {}),
596
- i.map((u) => /* @__PURE__ */ l(
597
- we,
522
+ return /* @__PURE__ */ l(Dn, { children: /* @__PURE__ */ R(Ie, { children: [
523
+ r && /* @__PURE__ */ l(be, {}),
524
+ n.map((h) => /* @__PURE__ */ l(
525
+ be,
598
526
  {
599
- align: u.numeric ? "right" : "left",
600
- padding: u.disablePadding ? "none" : "default",
601
- sortDirection: n === u.id ? t : !1,
527
+ align: h.numeric ? "right" : "left",
528
+ padding: h.disablePadding ? "none" : "default",
529
+ sortDirection: i === h.id ? t : !1,
602
530
  children: /* @__PURE__ */ l(
603
- Jt,
531
+ on,
604
532
  {
605
- active: n === u.id,
606
- direction: n === u.id ? t : "asc",
607
- onClick: d(u.id),
608
- children: u.label
533
+ active: i === h.id,
534
+ direction: i === h.id ? t : "asc",
535
+ onClick: d(h.id),
536
+ children: h.label
609
537
  }
610
538
  )
611
539
  },
612
- u.id
540
+ h.id
613
541
  ))
614
542
  ] }) });
615
543
  }
616
- function Yn(e) {
617
- const {
618
- cellsMetadata: i,
619
- isRowSelected: t,
620
- item: n,
621
- onRowSelected: a,
622
- rowIndex: o,
623
- isCollapseable: d,
624
- collapsedElement: u
625
- } = e, [v, C] = k(!1), S = i.length;
626
- return /* @__PURE__ */ D(oe, { children: [
627
- /* @__PURE__ */ D(ke, { hover: !0, selected: t, onClick: () => {
628
- a == null || a(o);
544
+ const er = kt(
545
+ /* @__PURE__ */ bt.createElement("path", {
546
+ d: "M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"
547
+ }),
548
+ "KeyboardArrowDown"
549
+ ), tr = kt(
550
+ /* @__PURE__ */ bt.createElement("path", {
551
+ d: "M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"
552
+ }),
553
+ "KeyboardArrowUp"
554
+ );
555
+ function nr(e) {
556
+ const { cellsMetadata: n, isRowSelected: t, item: i, onRowSelected: a, rowIndex: r, isCollapseable: d, collapsedElement: h } = e, [v, C] = k(!1), S = n.length;
557
+ return /* @__PURE__ */ R(re, { children: [
558
+ /* @__PURE__ */ R(Ie, { hover: !0, selected: t, onClick: () => {
559
+ a == null || a(r);
629
560
  }, children: [
630
- d && /* @__PURE__ */ l(we, { padding: "checkbox", children: /* @__PURE__ */ l(
631
- Qt,
561
+ d && /* @__PURE__ */ l(be, { padding: "checkbox", children: /* @__PURE__ */ l(
562
+ sn,
632
563
  {
633
564
  "aria-label": "expand row",
634
565
  size: "small",
635
566
  onClick: (L) => {
636
567
  L.stopPropagation(), C(!v);
637
568
  },
638
- children: v ? /* @__PURE__ */ l(Mi, {}) : /* @__PURE__ */ l(Ai, {})
569
+ children: v ? /* @__PURE__ */ l(tr, {}) : /* @__PURE__ */ l(er, {})
639
570
  }
640
571
  ) }),
641
- i.map((L) => /* @__PURE__ */ l(
642
- we,
572
+ n.map((L) => /* @__PURE__ */ l(
573
+ be,
643
574
  {
644
575
  align: L.numeric ? "right" : "left",
645
576
  padding: L.disablePadding ? "none" : "default",
646
- children: L.transform ? L.transform(n[L.id]) : n[L.id]
577
+ children: L.transform ? L.transform(i[L.id]) : i[L.id]
647
578
  },
648
- L.id + o.toString()
579
+ L.id + r.toString()
649
580
  ))
650
581
  ] }),
651
- d && /* @__PURE__ */ l(ke, { children: /* @__PURE__ */ l(
652
- we,
653
- {
654
- style: { paddingBottom: 0, paddingTop: 0 },
655
- colSpan: S + 1,
656
- children: /* @__PURE__ */ l(ei, { in: v, unmountOnExit: !0, timeout: "auto", children: u == null ? void 0 : u(n) })
657
- }
658
- ) })
582
+ d && /* @__PURE__ */ l(Ie, { children: /* @__PURE__ */ l(be, { style: { paddingBottom: 0, paddingTop: 0 }, colSpan: S + 1, children: /* @__PURE__ */ l(an, { in: v, unmountOnExit: !0, timeout: "auto", children: h == null ? void 0 : h(i) }) }) })
659
583
  ] });
660
584
  }
661
- function Bo(e) {
662
- const [i, t] = k(""), [n, a] = k("asc"), {
663
- cellsMetadata: o,
585
+ function $o(e) {
586
+ const [n, t] = k(""), [i, a] = k("asc"), {
587
+ cellsMetadata: r,
664
588
  items: d,
665
- onRequestSort: u,
589
+ onRequestSort: h,
666
590
  onRowSelected: v,
667
591
  isCollapseable: C,
668
592
  collapsedElement: S,
669
- isDense: A,
593
+ isDense: x,
670
594
  page: L,
671
- rowsPerPage: R,
672
- count: z,
595
+ rowsPerPage: B,
596
+ count: U,
673
597
  handleChangePage: K,
674
- handleChangeRowsPerPage: Y
598
+ handleChangeRowsPerPage: J
675
599
  } = e;
676
- return /* @__PURE__ */ D(ti, { component: We, children: [
677
- /* @__PURE__ */ D(ii, { size: A ? "small" : "medium", children: [
600
+ return /* @__PURE__ */ R(ln, { component: je, children: [
601
+ /* @__PURE__ */ R(cn, { size: x ? "small" : "medium", children: [
678
602
  /* @__PURE__ */ l(
679
- qn,
603
+ Qi,
680
604
  {
681
- headCells: o,
682
- onRequestSort: (X, U) => {
683
- const V = i === U && n === "asc";
684
- a(V ? "desc" : "asc"), t(U), u(U, V ? "desc" : "asc");
605
+ headCells: r,
606
+ onRequestSort: (Y, z) => {
607
+ const V = n === z && i === "asc";
608
+ a(V ? "desc" : "asc"), t(z), h(z, V ? "desc" : "asc");
685
609
  },
686
- order: n,
687
- orderBy: i,
610
+ order: i,
611
+ orderBy: n,
688
612
  isCollapseable: C
689
613
  }
690
614
  ),
691
- /* @__PURE__ */ D(ni, { children: [
692
- d.map((X, U) => /* @__PURE__ */ l(
693
- Yn,
615
+ /* @__PURE__ */ R(dn, { children: [
616
+ d.map((Y, z) => /* @__PURE__ */ l(
617
+ nr,
694
618
  {
695
- item: X,
696
- rowIndex: U,
619
+ item: Y,
620
+ rowIndex: z,
697
621
  isCollapseable: C,
698
- cellsMetadata: o,
622
+ cellsMetadata: r,
699
623
  collapsedElement: S,
700
624
  isRowSelected: !1,
701
625
  onRowSelected: v
702
626
  },
703
- U
627
+ z
704
628
  )),
705
- (d.length === 0 || R > d.length) && /* @__PURE__ */ l(
706
- ke,
629
+ (d.length === 0 || B > d.length) && /* @__PURE__ */ l(
630
+ Ie,
707
631
  {
708
632
  style: {
709
- height: (A ? 33 : 53) * (R - d.length)
633
+ height: (x ? 33 : 53) * (B - d.length)
710
634
  },
711
- children: /* @__PURE__ */ l(
712
- we,
713
- {
714
- colSpan: C ? o.length + 1 : o.length,
715
- children: d.length === 0 && /* @__PURE__ */ l(ri, { align: "center", children: "No results :(" })
716
- }
717
- )
635
+ children: /* @__PURE__ */ l(be, { colSpan: C ? r.length + 1 : r.length, children: d.length === 0 && /* @__PURE__ */ l(un, { align: "center", children: "No results :(" }) })
718
636
  }
719
637
  )
720
638
  ] })
721
639
  ] }),
722
640
  /* @__PURE__ */ l(
723
- oi,
641
+ hn,
724
642
  {
725
- rowsPerPage: R,
643
+ rowsPerPage: B,
726
644
  rowsPerPageOptions: [5, 10],
727
645
  component: "div",
728
- count: z,
646
+ count: U,
729
647
  page: L,
730
648
  onPageChange: K,
731
- onRowsPerPageChange: Y
649
+ onRowsPerPageChange: J
732
650
  }
733
651
  )
734
652
  ] });
735
653
  }
736
- const No = (e) => {
737
- const { children: i, ...t } = e;
738
- return /* @__PURE__ */ l(xi, { ...t, children: i });
739
- }, Fo = (e) => {
740
- const { children: i, ...t } = e;
741
- return /* @__PURE__ */ l(ki, { ...t, children: i });
742
- }, dt = (e) => e * Math.PI / 180, Ae = (e) => e * (180 / Math.PI), Xn = (e) => 0.05 * (5916575505e-1 / Math.pow(2, e - 1) / 2) * (Math.cos(dt(85.362 / 2)) / Math.sin(dt(85.362 / 2)));
743
- const Zn = (e) => {
744
- const i = he(), t = Le(null), [n, a] = k({ x: 0, y: 0 });
654
+ const Uo = (e) => {
655
+ const { children: n, ...t } = e;
656
+ return /* @__PURE__ */ l(Rn, { ...t, children: n });
657
+ }, Wo = (e) => {
658
+ const { children: n, ...t } = e;
659
+ return /* @__PURE__ */ l(Bn, { ...t, children: n });
660
+ }, ut = (e) => e * Math.PI / 180, xe = (e) => e * (180 / Math.PI), ir = (e) => 0.05 * (5916575505e-1 / Math.pow(2, e - 1) / 2) * (Math.cos(ut(85.362 / 2)) / Math.sin(ut(85.362 / 2)));
661
+ const rr = (e) => {
662
+ const n = pe(), t = ve(null), [i, a] = k({ x: 0, y: 0 });
745
663
  return I(() => {
746
- i.screenSpaceEventHandler.setInputAction(
747
- (o) => {
748
- o != null && o.endPosition && a({ ...o.endPosition });
749
- },
750
- St.MOUSE_MOVE
751
- );
752
- }, [t, i]), I(() => {
753
- const o = i.scene.globe.ellipsoid, d = i.camera.pickEllipsoid(
754
- new me(n.x, n.y),
755
- o
756
- );
664
+ n.screenSpaceEventHandler.setInputAction((r) => {
665
+ r != null && r.endPosition && a({ ...r.endPosition });
666
+ }, Kn.MOUSE_MOVE);
667
+ }, [t, n]), I(() => {
668
+ const r = n.scene.globe.ellipsoid, d = n.camera.pickEllipsoid(new ge(i.x, i.y), r);
757
669
  if (d) {
758
- const u = o.cartesianToCartographic(d);
670
+ const h = r.cartesianToCartographic(d);
759
671
  if (t.current) {
760
672
  let v = "";
761
673
  switch (e.projection) {
762
- case ue.WEB_MERCATOR: {
763
- const S = new zi(o).project(u);
764
- v = `Mercator: ${S.y.toFixed(
765
- Xe
766
- )}m, ${S.x.toFixed(Xe)}m`, t.current.style.width = "220px";
674
+ case he.WEB_MERCATOR: {
675
+ const S = new qn(r).project(h);
676
+ v = `Mercator: ${S.y.toFixed(Ze)}m, ${S.x.toFixed(
677
+ Ze
678
+ )}m`, t.current.style.width = "220px";
767
679
  break;
768
680
  }
769
- case ue.WGS84: {
770
- const C = le.toDegrees(
771
- u.longitude
772
- ).toFixed(Ye);
773
- v = `WGS84: ${le.toDegrees(
774
- u.latitude
775
- ).toFixed(Ye)}°N ${C}°E`, t.current.style.width = "200px";
681
+ case he.WGS84: {
682
+ const C = le.toDegrees(h.longitude).toFixed(Xe);
683
+ v = `WGS84: ${le.toDegrees(h.latitude).toFixed(Xe)}°N ${C}°E`, t.current.style.width = "200px";
776
684
  break;
777
685
  }
778
686
  }
779
687
  t.current.innerHTML = v;
780
688
  }
781
689
  }
782
- }, [n, t, i, e.projection]), /* @__PURE__ */ l("div", { className: "trackerPosition", ref: t });
690
+ }, [i, t, n, e.projection]), /* @__PURE__ */ l("div", { className: "trackerPosition", ref: t });
783
691
  };
784
- const ze = [
692
+ const $e = [
785
693
  1,
786
694
  2,
787
695
  3,
@@ -814,64 +722,51 @@ const ze = [
814
722
  2e7,
815
723
  3e7,
816
724
  5e7
817
- ], Jn = (e, i, t, n) => {
818
- const a = Q(n, "METERS_UNIT") ?? "m", o = Q(n, "KILOMETERS_UNIT") ?? "km", d = {
725
+ ], or = (e, n, t, i) => {
726
+ const a = Q(i, "METERS_UNIT") ?? "m", r = Q(i, "KILOMETERS_UNIT") ?? "km", d = {
819
727
  barWidth: void 0,
820
728
  distanceLabel: void 0,
821
- lastLegendUpdate: i.lastLegendUpdate
822
- }, u = new Ui(), v = new Date().getTime();
729
+ lastLegendUpdate: n.lastLegendUpdate
730
+ }, h = new Xn(), v = new Date().getTime();
823
731
  if (v < d.lastLegendUpdate + 250)
824
732
  return;
825
733
  d.lastLegendUpdate = v;
826
- const C = e.scene.canvas.clientWidth, S = e.scene.canvas.clientHeight, A = e.scene.camera.getPickRay(
827
- new Te(C / 2 | 0, S - 1)
828
- ), L = e.scene.camera.getPickRay(
829
- new Te(1 + C / 2 | 0, S - 1)
830
- ), R = e.scene.globe, z = R.pick(A, e.scene), K = R.pick(L, e.scene);
831
- if (!z || !K)
734
+ const C = e.scene.canvas.clientWidth, S = e.scene.canvas.clientHeight, x = e.scene.camera.getPickRay(new _e(C / 2 | 0, S - 1)), L = e.scene.camera.getPickRay(new _e(1 + C / 2 | 0, S - 1)), B = e.scene.globe, U = B.pick(x, e.scene), K = B.pick(L, e.scene);
735
+ if (!U || !K)
832
736
  return;
833
- const Y = R.ellipsoid.cartesianToCartographic(
834
- z
835
- ), F = R.ellipsoid.cartesianToCartographic(
836
- K
837
- );
838
- u.setEndPoints(Y, F);
839
- const X = u.surfaceDistance, U = 100;
737
+ const J = B.ellipsoid.cartesianToCartographic(U), G = B.ellipsoid.cartesianToCartographic(K);
738
+ h.setEndPoints(J, G);
739
+ const Y = h.surfaceDistance, z = 100;
840
740
  let V;
841
- for (let j = ze.length - 1; !Oe(V) && j >= 0; --j)
842
- ze[j] / X < U && (V = ze[j]);
843
- if (Oe(V)) {
844
- let j = "";
845
- V >= 1e3 ? j = `${(V / 1e3).toString()} ${o}` : j = `${V.toString()} ${a}`, d.barWidth = V / X | 0, d.distanceLabel = j;
741
+ for (let W = $e.length - 1; !De(V) && W >= 0; --W)
742
+ $e[W] / Y < z && (V = $e[W]);
743
+ if (De(V)) {
744
+ let W = "";
745
+ V >= 1e3 ? W = `${(V / 1e3).toString()} ${r}` : W = `${V.toString()} ${a}`, d.barWidth = V / Y | 0, d.distanceLabel = W;
846
746
  }
847
747
  t(d);
848
- }, Qn = (e) => {
849
- const i = he(), [t, n] = k({
748
+ }, sr = (e) => {
749
+ const n = pe(), [t, i] = k({
850
750
  barWidth: void 0,
851
751
  distanceLabel: void 0,
852
752
  lastLegendUpdate: -1
853
753
  });
854
754
  I(() => {
855
- const o = (v) => {
856
- Jn(
857
- i,
858
- t,
859
- n,
860
- e.locale
861
- );
862
- }, d = new $i(), u = (v) => {
863
- i.scene.globe.tilesLoaded && (o(new MouseEvent("mouse")), d.removeAll());
755
+ const r = (v) => {
756
+ or(n, t, i, e.locale);
757
+ }, d = new Yn(), h = (v) => {
758
+ n.scene.globe.tilesLoaded && (r(new MouseEvent("mouse")), d.removeAll());
864
759
  };
865
- return d.add(i.scene.globe.tileLoadProgressEvent, u), i.camera.moveEnd.addEventListener(o), () => {
760
+ return d.add(n.scene.globe.tileLoadProgressEvent, h), n.camera.moveEnd.addEventListener(r), () => {
866
761
  try {
867
- Q(i, "_cesiumWidget") != null && i.camera.moveEnd.removeEventListener(o);
762
+ Q(n, "_cesiumWidget") != null && n.camera.moveEnd.removeEventListener(r);
868
763
  } catch (v) {
869
764
  console.log('CESIUM camera "moveEnd" remove listener failed', v);
870
765
  }
871
766
  };
872
- }, [i, e.locale, t]);
873
- const a = (o) => 5 + (125 - o) / 2;
874
- return /* @__PURE__ */ l("div", { className: "scalePosition", children: Oe(t.barWidth) && /* @__PURE__ */ D(oe, { children: [
767
+ }, [n, e.locale, t]);
768
+ const a = (r) => 5 + (125 - r) / 2;
769
+ return /* @__PURE__ */ l("div", { className: "scalePosition", children: De(t.barWidth) && /* @__PURE__ */ R(re, { children: [
875
770
  /* @__PURE__ */ l("div", { className: "distance-legend-label", children: t.distanceLabel }),
876
771
  /* @__PURE__ */ l(
877
772
  "div",
@@ -885,53 +780,51 @@ const ze = [
885
780
  }
886
781
  )
887
782
  ] }) });
888
- }, ie = {
783
+ }, ne = {
889
784
  MORPHING: ye.MORPHING,
890
785
  COLUMBUS_VIEW: ye.COLUMBUS_VIEW,
891
786
  SCENE2D: ye.SCENE2D,
892
787
  SCENE3D: ye.SCENE3D
893
788
  };
894
- const ut = (e, i) => {
895
- const n = Q(i.scene.globe, "_surface.tileProvider"), a = n._quadtree, o = i.canvas.height, d = Q(i.camera.frustum, "sseDenominator") ?? 1;
896
- for (let u = 0; u <= 19; u++)
897
- if (n.getLevelMaximumGeometricError(u) * o / (e * d) < a.maximumScreenSpaceError)
898
- return u;
789
+ const ht = (e, n) => {
790
+ const i = Q(n.scene.globe, "_surface.tileProvider"), a = i._quadtree, r = n.canvas.height, d = Q(n.camera.frustum, "sseDenominator") ?? 1;
791
+ for (let h = 0; h <= 19; h++)
792
+ if (i.getLevelMaximumGeometricError(h) * r / (e * d) < a.maximumScreenSpaceError)
793
+ return h;
899
794
  return null;
900
- }, er = (e, i) => {
795
+ }, ar = (e, n) => {
901
796
  e = e || 10;
902
797
  const t = [];
903
- let n = 1e5, a = 0;
904
- for (let o = 1e8; o > n; o = o - n) {
905
- const d = ut(o, i);
798
+ let i = 1e5, a = 0;
799
+ for (let r = 1e8; r > i; r = r - i) {
800
+ const d = ht(r, n);
906
801
  if (d === null)
907
802
  break;
908
803
  if (d !== a) {
909
- let u = o, v = o + n;
910
- for (; v - u > e; )
911
- o = u + (v - u) / 2, ut(o, i) === d ? u = o : v = o;
804
+ let h = r, v = r + i;
805
+ for (; v - h > e; )
806
+ r = h + (v - h) / 2, ht(r, n) === d ? h = r : v = r;
912
807
  t.push({
913
808
  level: d,
914
- height: Math.round(o)
915
- }), a = d, t.length >= 2 && (n = (t[t.length - 2].height - o) / 1e3);
809
+ height: Math.round(r)
810
+ }), a = d, t.length >= 2 && (i = (t[t.length - 2].height - r) / 1e3);
916
811
  }
917
812
  }
918
813
  return t;
919
- }, tr = (e) => {
920
- const i = he(), [t, n] = k(1), a = er(1, i);
814
+ }, lr = (e) => {
815
+ const n = pe(), [t, i] = k(1), a = ar(1, n);
921
816
  return I(() => {
922
- const o = () => {
923
- const d = i.camera, u = 0.5;
817
+ const r = () => {
818
+ const d = n.camera, h = 0.5;
924
819
  let v = 0;
925
- switch (i.scene.mode) {
926
- case ie.SCENE3D:
927
- v = i.scene.mapProjection.ellipsoid.cartesianToCartographic(
928
- d.positionWC
929
- ).height;
820
+ switch (n.scene.mode) {
821
+ case ne.SCENE3D:
822
+ v = n.scene.mapProjection.ellipsoid.cartesianToCartographic(d.positionWC).height;
930
823
  break;
931
- case ie.SCENE2D:
932
- v = (d.frustum.right - d.frustum.left) * u;
824
+ case ne.SCENE2D:
825
+ v = (d.frustum.right - d.frustum.left) * h;
933
826
  break;
934
- case ie.COLUMBUS_VIEW:
827
+ case ne.COLUMBUS_VIEW:
935
828
  v = d.position.z;
936
829
  break;
937
830
  default:
@@ -939,490 +832,317 @@ const ut = (e, i) => {
939
832
  break;
940
833
  }
941
834
  if (a.length > 0) {
942
- const C = a.reduce((S, A) => Math.abs(A.height - v) < Math.abs(S.height - v) ? A : S);
943
- n(C.level);
835
+ const C = a.reduce((S, x) => Math.abs(x.height - v) < Math.abs(S.height - v) ? x : S);
836
+ i(C.level);
944
837
  }
945
838
  };
946
- return i.camera.moveEnd.addEventListener(o), () => {
839
+ return n.camera.moveEnd.addEventListener(r), () => {
947
840
  try {
948
- Q(i, "_cesiumWidget") != null && i.camera.moveEnd.removeEventListener(o);
841
+ Q(n, "_cesiumWidget") != null && n.camera.moveEnd.removeEventListener(r);
949
842
  } catch (d) {
950
- console.log(
951
- 'CESIUM camera "moveEnd"(from zoom tracker) remove listener failed',
952
- d
953
- );
843
+ console.log('CESIUM camera "moveEnd"(from zoom tracker) remove listener failed', d);
954
844
  }
955
845
  };
956
- }, [i, a.length]), /* @__PURE__ */ D("div", { className: "zoomLevel", children: [
846
+ }, [n, a.length]), /* @__PURE__ */ R("div", { className: "zoomLevel", children: [
957
847
  /* @__PURE__ */ l("div", { className: "zoomLevelValue", children: t }),
958
848
  /* @__PURE__ */ l("div", { className: "zoomLevelLabel", children: Q(e.locale, "ZOOM_LABEL") ?? "zoom" })
959
849
  ] });
960
850
  };
961
- const ir = -1, nr = (e) => {
962
- const i = he(), [t, n] = k(), { sceneModes: a } = e, o = (d) => a.findIndex((u) => u === d) > ir;
851
+ const cr = -1, dr = (e) => {
852
+ const n = pe(), [t, i] = k(), { sceneModes: a } = e, r = (d) => a.findIndex((h) => h === d) > cr;
963
853
  return I(() => {
964
- n(i.scene.mode);
965
- }, []), /* @__PURE__ */ D(oe, { children: [
966
- o(ie.SCENE3D) && /* @__PURE__ */ l(
967
- be,
854
+ i(n.scene.mode);
855
+ }, []), /* @__PURE__ */ R(re, { children: [
856
+ r(ne.SCENE3D) && /* @__PURE__ */ l(
857
+ Te,
968
858
  {
969
- icon: /* @__PURE__ */ l(
970
- "div",
971
- {
972
- className: `mapViewIcon ${t === ie.SCENE3D ? "mapViewCurrent" : ""}`,
973
- 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" }) })
974
- }
975
- ),
859
+ icon: /* @__PURE__ */ l("div", { className: `mapViewIcon ${t === ne.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" }) }) }),
976
860
  onClick: () => {
977
- i.scene.morphTo3D(), n(ie.SCENE3D);
861
+ n.scene.morphTo3D(), i(ne.SCENE3D);
978
862
  }
979
863
  }
980
864
  ),
981
- o(ie.SCENE2D) && /* @__PURE__ */ l(
982
- be,
865
+ r(ne.SCENE2D) && /* @__PURE__ */ l(
866
+ Te,
983
867
  {
984
- icon: /* @__PURE__ */ l(
985
- "div",
986
- {
987
- className: `mapViewIcon ${t === ie.SCENE2D ? "mapViewCurrent" : ""}`,
988
- 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" }) })
989
- }
990
- ),
868
+ icon: /* @__PURE__ */ l("div", { className: `mapViewIcon ${t === ne.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" }) }) }),
991
869
  onClick: () => {
992
- i.scene.morphTo2D(), n(ie.SCENE2D);
870
+ n.scene.morphTo2D(), i(ne.SCENE2D);
993
871
  }
994
872
  }
995
873
  ),
996
- o(ie.COLUMBUS_VIEW) && /* @__PURE__ */ l(
997
- be,
874
+ r(ne.COLUMBUS_VIEW) && /* @__PURE__ */ l(
875
+ Te,
998
876
  {
999
- icon: /* @__PURE__ */ l(
1000
- "div",
1001
- {
1002
- className: `mapViewIcon ${t === ie.COLUMBUS_VIEW ? "mapViewCurrent" : ""}`,
1003
- 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" }) })
1004
- }
1005
- ),
877
+ icon: /* @__PURE__ */ l("div", { className: `mapViewIcon ${t === ne.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" }) }) }),
1006
878
  onClick: () => {
1007
- i.scene.morphToColumbusView(), n(ie.COLUMBUS_VIEW);
879
+ n.scene.morphToColumbusView(), i(ne.COLUMBUS_VIEW);
1008
880
  }
1009
881
  }
1010
882
  )
1011
883
  ] });
1012
884
  };
1013
- const rr = Me(
1014
- (e) => Re({
885
+ const ur = Me(
886
+ (e) => Be({
1015
887
  mapContainer: {
1016
888
  width: "60px",
1017
889
  height: "60px",
1018
890
  border: `${e.palette.background.paper} 2px solid`
1019
891
  }
1020
892
  })
1021
- ), or = (e) => {
1022
- const i = he(), { baseMaps: t } = e, [n, a] = k(" "), [o, d] = k(), u = rr();
893
+ ), hr = (e) => {
894
+ const n = pe(), { baseMaps: t } = e, [i, a] = k(" "), [r, d] = k(), h = ur();
1023
895
  I(() => {
1024
896
  const C = t == null ? void 0 : t.maps.find((S) => S.isCurrent);
1025
897
  C && (d(C), a(C.title !== void 0 ? C.title : " "));
1026
898
  }, [t]);
1027
899
  const v = (C) => {
1028
- var S, A;
900
+ var S, x;
1029
901
  if (t) {
1030
- (S = i.layersManager) == null || S.removeBaseMapLayers();
1031
- const L = t.maps.find(
1032
- (R) => R.id === C
1033
- );
1034
- L && ((A = i.layersManager) == null || A.setBaseMapLayers(L), d(L), t.maps.forEach((R) => {
1035
- R.isCurrent = L === R;
902
+ (S = n.layersManager) == null || S.removeBaseMapLayers();
903
+ const L = t.maps.find((B) => B.id === C);
904
+ L && ((x = n.layersManager) == null || x.setBaseMapLayers(L), d(L), t.maps.forEach((B) => {
905
+ B.isCurrent = L === B;
1036
906
  }));
1037
907
  }
1038
908
  };
1039
- return /* @__PURE__ */ D(oe, { children: [
1040
- /* @__PURE__ */ l("label", { className: "mapLabel", children: n }),
1041
- /* @__PURE__ */ l("ul", { className: "mapSelector", children: t == null ? void 0 : t.maps.map((C) => /* @__PURE__ */ l(
1042
- "li",
909
+ return /* @__PURE__ */ R(re, { children: [
910
+ /* @__PURE__ */ l("label", { className: "mapLabel", children: i }),
911
+ /* @__PURE__ */ l("ul", { className: "mapSelector", children: t == null ? void 0 : t.maps.map((C) => /* @__PURE__ */ l("li", { className: `mapContainer ${h.mapContainer} ${C === r ? "mapContainerSelected" : ""}`, children: /* @__PURE__ */ l(
912
+ "img",
1043
913
  {
1044
- className: `mapContainer ${u.mapContainer} ${C === o ? "mapContainerSelected" : ""}`,
1045
- children: /* @__PURE__ */ l(
1046
- "img",
1047
- {
1048
- alt: "",
1049
- className: "mapContainerImg",
1050
- src: C.thumbnail,
1051
- onMouseOver: () => {
1052
- a(C.title);
1053
- },
1054
- onMouseOut: () => {
1055
- a(
1056
- (o == null ? void 0 : o.title) !== void 0 ? o.title : " "
1057
- );
1058
- },
1059
- onClick: () => {
1060
- v(C.id);
1061
- }
1062
- }
1063
- )
1064
- },
1065
- C.id
1066
- )) })
914
+ alt: "",
915
+ className: "mapContainerImg",
916
+ src: C.thumbnail,
917
+ onMouseOver: () => {
918
+ a(C.title);
919
+ },
920
+ onMouseOut: () => {
921
+ a((r == null ? void 0 : r.title) !== void 0 ? r.title : " ");
922
+ },
923
+ onClick: () => {
924
+ v(C.id);
925
+ }
926
+ }
927
+ ) }, C.id)) })
1067
928
  ] });
1068
929
  };
1069
- const $e = "ic_settings_24px", sr = (e) => {
1070
- const [i, t] = k(!1), { sceneModes: n, baseMaps: a, locale: o } = e, d = Le(null), u = Q(o, "MAP_SETTINGS_DIALOG_TITLE") ?? "Map Settings", v = Q(o, "MAP_SETTINGS_SCENE_MODE_TITLE") ?? "Scene Mode", C = Q(o, "MAP_SETTINGS_BASE_MAP_TITLE") ?? "Base Map";
930
+ const Ue = "ic_settings_24px", pr = (e) => {
931
+ const [n, t] = k(!1), { sceneModes: i, baseMaps: a, locale: r } = e, d = ve(null), h = Q(r, "MAP_SETTINGS_DIALOG_TITLE") ?? "Map Settings", v = Q(r, "MAP_SETTINGS_SCENE_MODE_TITLE") ?? "Scene Mode", C = Q(r, "MAP_SETTINGS_BASE_MAP_TITLE") ?? "Base Map";
1071
932
  return I(() => {
1072
- const S = (A) => {
1073
- var z;
1074
- const L = A.target, R = Q(d, "current");
1075
- R && !R.contains(L) && L.id !== $e && ((z = L.parentElement) == null ? void 0 : z.id) !== $e && (document.removeEventListener("click", S, !1), t(!1));
933
+ const S = (x) => {
934
+ var U;
935
+ const L = x.target, B = Q(d, "current");
936
+ B && !B.contains(L) && L.id !== Ue && ((U = L.parentElement) == null ? void 0 : U.id) !== Ue && (document.removeEventListener("click", S, !1), t(!1));
1076
937
  };
1077
938
  return document.addEventListener("click", S, !1), () => {
1078
939
  document.removeEventListener("click", S, !1);
1079
940
  };
1080
- }), /* @__PURE__ */ D(oe, { children: [
941
+ }), /* @__PURE__ */ R(re, { children: [
1081
942
  /* @__PURE__ */ l(
1082
- be,
943
+ Te,
1083
944
  {
1084
- icon: /* @__PURE__ */ l("div", { className: "settingsIconContainer", children: /* @__PURE__ */ l(
1085
- "svg",
1086
- {
1087
- width: "100%",
1088
- height: "100%",
1089
- viewBox: "0 0 24 24",
1090
- id: $e,
1091
- x: "288",
1092
- y: "24",
1093
- 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" })
1094
- }
1095
- ) }),
945
+ icon: /* @__PURE__ */ l("div", { className: "settingsIconContainer", children: /* @__PURE__ */ l("svg", { width: "100%", height: "100%", viewBox: "0 0 24 24", id: Ue, 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" }) }) }),
1096
946
  onClick: () => {
1097
- t(!i);
947
+ t(!n);
1098
948
  }
1099
949
  }
1100
950
  ),
1101
- i && /* @__PURE__ */ l(
1102
- "div",
951
+ n && /* @__PURE__ */ l("div", { id: "dialog-portal-example", className: "settingsDialogPortal", ref: d, children: /* @__PURE__ */ R(
952
+ fn,
1103
953
  {
1104
- id: "dialog-portal-example",
1105
- className: "settingsDialogPortal",
1106
- ref: d,
1107
- children: /* @__PURE__ */ D(
1108
- ci,
1109
- {
1110
- open: i,
1111
- onClosed: () => {
1112
- t(!1);
1113
- },
1114
- children: [
1115
- /* @__PURE__ */ l(di, { children: u }),
1116
- /* @__PURE__ */ D(ui, { children: [
1117
- /* @__PURE__ */ l("h4", { className: "sectionLabel", children: v }),
1118
- /* @__PURE__ */ l(ae, { className: "mapScenesContainer", children: /* @__PURE__ */ l(nr, { sceneModes: n }) }),
1119
- /* @__PURE__ */ l(ae, { className: "baseMapsContainer", children: a && /* @__PURE__ */ D(oe, { children: [
1120
- /* @__PURE__ */ l("h4", { className: "sectionLabel", children: C }),
1121
- /* @__PURE__ */ l(or, { baseMaps: a })
1122
- ] }) })
1123
- ] })
1124
- ]
1125
- }
1126
- )
954
+ open: n,
955
+ onClosed: () => {
956
+ t(!1);
957
+ },
958
+ children: [
959
+ /* @__PURE__ */ l(yn, { children: h }),
960
+ /* @__PURE__ */ R(vn, { children: [
961
+ /* @__PURE__ */ l("h4", { className: "sectionLabel", children: v }),
962
+ /* @__PURE__ */ l(ae, { className: "mapScenesContainer", children: /* @__PURE__ */ l(dr, { sceneModes: i }) }),
963
+ /* @__PURE__ */ l(ae, { className: "baseMapsContainer", children: a && /* @__PURE__ */ R(re, { children: [
964
+ /* @__PURE__ */ l("h4", { className: "sectionLabel", children: C }),
965
+ /* @__PURE__ */ l(hr, { baseMaps: a })
966
+ ] }) })
967
+ ] })
968
+ ]
1127
969
  }
1128
- )
970
+ ) })
1129
971
  ] });
1130
972
  };
1131
- const ar = /* @__PURE__ */ l(
1132
- "svg",
1133
- {
1134
- xmlns: "http://www.w3.org/2000/svg",
1135
- enableBackground: "new 0 0 24 24",
1136
- height: "24",
1137
- width: "24",
1138
- viewBox: "0 0 612 612",
1139
- children: /* @__PURE__ */ D("g", { xmlns: "http://www.w3.org/2000/svg", children: [
1140
- /* @__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" }),
1141
- /* @__PURE__ */ l("circle", { cx: "270.1", cy: "56.3", r: "56.3" })
1142
- ] })
1143
- }
1144
- ), lr = ({ onClick: e }) => /* @__PURE__ */ l(ae, { onClick: e, className: "mapLegendToggleContainer", children: /* @__PURE__ */ l(be, { icon: ar, className: "mapLegendIcon" }) }), cr = ({
1145
- legend: { legendImg: e, legendDoc: i, layer: t },
1146
- docText: n,
1147
- imgText: a
1148
- }) => {
1149
- const o = ge(() => {
973
+ const mr = /* @__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__ */ R("g", { xmlns: "http://www.w3.org/2000/svg", children: [
974
+ /* @__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" }),
975
+ /* @__PURE__ */ l("circle", { cx: "270.1", cy: "56.3", r: "56.3" })
976
+ ] }) }), gr = ({ onClick: e }) => /* @__PURE__ */ l(ae, { onClick: e, className: "mapLegendToggleContainer", children: /* @__PURE__ */ l(Te, { icon: mr, className: "mapLegendIcon" }) }), fr = ({ legend: { legendImg: e, legendDoc: n, layer: t }, docText: i, imgText: a }) => {
977
+ const r = me(() => {
1150
978
  window.open(e, "_blank");
1151
979
  }, [e]);
1152
- ge(() => {
1153
- window.open(i, "_blank");
1154
- }, [i]);
1155
- const d = ge(() => {
1156
- const C = /* @__PURE__ */ l(ae, { className: "layerNameContainer", children: /* @__PURE__ */ l(
1157
- "h3",
1158
- {
1159
- style: { maxWidth: `${15}ch` },
1160
- className: "layerName",
1161
- children: t
1162
- }
1163
- ) });
1164
- return (t ?? "").length > 15 ? /* @__PURE__ */ l(je, { content: t, children: C }) : C;
1165
- }, [t]), u = ge(() => [
1166
- typeof e == "string" && /* @__PURE__ */ l(
1167
- "a",
1168
- {
1169
- className: "legendAction",
1170
- href: e,
1171
- target: "_blank",
1172
- rel: "noreferrer",
1173
- children: a
1174
- }
1175
- ),
1176
- typeof i == "string" && /* @__PURE__ */ l(
1177
- "a",
1178
- {
1179
- className: "legendAction",
1180
- href: i,
1181
- target: "_blank",
1182
- rel: "noreferrer",
1183
- children: n
1184
- }
1185
- )
1186
- ], [e, a, i, n]);
1187
- return /* @__PURE__ */ D(ae, { className: "mapLegend", children: [
980
+ me(() => {
981
+ window.open(n, "_blank");
982
+ }, [n]);
983
+ const d = me(() => {
984
+ const C = /* @__PURE__ */ l(ae, { className: "layerNameContainer", children: /* @__PURE__ */ l("h3", { style: { maxWidth: `${15}ch` }, className: "layerName", children: t }) });
985
+ return (t ?? "").length > 15 ? /* @__PURE__ */ l(Ke, { content: t, children: C }) : C;
986
+ }, [t]), h = me(() => [
987
+ typeof e == "string" && /* @__PURE__ */ l("a", { className: "legendAction", href: e, target: "_blank", rel: "noreferrer", children: a }),
988
+ typeof n == "string" && /* @__PURE__ */ l("a", { className: "legendAction", href: n, target: "_blank", rel: "noreferrer", children: i })
989
+ ], [e, a, n, i]);
990
+ return /* @__PURE__ */ R(ae, { className: "mapLegend", children: [
1188
991
  d(),
1189
- /* @__PURE__ */ l(
1190
- "img",
1191
- {
1192
- alt: "Map Legend",
1193
- className: "legendImg",
1194
- src: e,
1195
- onClick: o
1196
- }
1197
- ),
1198
- /* @__PURE__ */ l(ae, { className: "legendActionsContainer", children: u() })
992
+ /* @__PURE__ */ l("img", { alt: "Map Legend", className: "legendImg", src: e, onClick: r }),
993
+ /* @__PURE__ */ l(ae, { className: "legendActionsContainer", children: h() })
1199
994
  ] });
1200
- }, dr = ({
1201
- legends: e,
1202
- actionsTexts: { docText: i, imgText: t },
1203
- noLegendsText: n
1204
- }) => {
1205
- const a = ge(() => /* @__PURE__ */ l(ae, { className: "noLegendsContainer", children: /* @__PURE__ */ l("h2", { className: "noLegendsMsg", children: n }) }), [n]), o = ge(() => e.length ? e.map((d, u) => /* @__PURE__ */ l(
1206
- cr,
1207
- {
1208
- legend: d,
1209
- docText: i,
1210
- imgText: t
1211
- },
1212
- `${d.layer}_${u}`
1213
- )) : a(), [e]);
1214
- return /* @__PURE__ */ l(ae, { className: "mapLegendsList", children: o() });
1215
- }, ur = ({
995
+ }, yr = ({ legends: e, actionsTexts: { docText: n, imgText: t }, noLegendsText: i }) => {
996
+ const a = me(() => /* @__PURE__ */ l(ae, { className: "noLegendsContainer", children: /* @__PURE__ */ l("h2", { className: "noLegendsMsg", children: i }) }), [i]), r = me(() => e.length ? e.map((d, h) => /* @__PURE__ */ l(fr, { legend: d, docText: n, imgText: t }, `${d.layer}_${h}`)) : a(), [e]);
997
+ return /* @__PURE__ */ l(ae, { className: "mapLegendsList", children: r() });
998
+ }, vr = ({
1216
999
  isOpen: e,
1217
- toggleSidebar: i,
1000
+ toggleSidebar: n,
1218
1001
  title: t = "Map Legends",
1219
- noLegendsText: n = "No legends to display...",
1002
+ noLegendsText: i = "No legends to display...",
1220
1003
  actionsTexts: a = { docText: "Docs", imgText: "View Image" },
1221
- legends: o = []
1222
- }) => e ? /* @__PURE__ */ D(
1223
- hi,
1224
- {
1225
- className: "mapLegendSidebarContainer",
1226
- modal: !1,
1227
- dismissible: !0,
1228
- open: e,
1229
- children: [
1230
- /* @__PURE__ */ l(pi, { className: "sidebarHeaderContainer", children: /* @__PURE__ */ l(mi, { className: "sidebarTitle", children: t }) }),
1231
- /* @__PURE__ */ D(gi, { className: "sidebarContent", children: [
1232
- /* @__PURE__ */ l(
1233
- be,
1234
- {
1235
- onClick: i,
1236
- className: "mapLegendCloseBtn",
1237
- icon: { icon: "close", size: "small" }
1238
- }
1239
- ),
1240
- /* @__PURE__ */ l(
1241
- dr,
1242
- {
1243
- noLegendsText: n,
1244
- legends: o,
1245
- actionsTexts: a
1246
- }
1247
- )
1248
- ] })
1249
- ]
1250
- }
1251
- ) : null, Rt = (e, i, t) => {
1252
- let n;
1004
+ legends: r = []
1005
+ }) => e ? /* @__PURE__ */ R(En, { className: "mapLegendSidebarContainer", modal: !1, dismissible: !0, open: e, children: [
1006
+ /* @__PURE__ */ l(Cn, { className: "sidebarHeaderContainer", children: /* @__PURE__ */ l(wn, { className: "sidebarTitle", children: t }) }),
1007
+ /* @__PURE__ */ R(bn, { className: "sidebarContent", children: [
1008
+ /* @__PURE__ */ l(Te, { onClick: n, className: "mapLegendCloseBtn", icon: { icon: "close", size: "small" } }),
1009
+ /* @__PURE__ */ l(yr, { noLegendsText: i, legends: r, actionsTexts: a })
1010
+ ] })
1011
+ ] }) : null, zt = (e, n, t) => {
1012
+ let i;
1253
1013
  if (e.scene.mode !== ye.SCENE2D)
1254
- n = e.scene.pickPosition(new Te(i, t));
1014
+ i = e.scene.pickPosition(new _e(n, t));
1255
1015
  else {
1256
1016
  const a = e.scene.globe.ellipsoid;
1257
- n = e.camera.pickEllipsoid(new Te(i, t), a);
1017
+ i = e.camera.pickEllipsoid(new _e(n, t), a);
1258
1018
  }
1259
- return Be.fromCartesian(n);
1260
- }, hr = (e, i, t) => {
1261
- const n = Rt(e, i, t);
1019
+ return Ne.fromCartesian(i);
1020
+ }, Er = (e, n, t) => {
1021
+ const i = zt(e, n, t);
1262
1022
  return {
1263
1023
  type: "Feature",
1264
1024
  properties: {},
1265
1025
  geometry: {
1266
1026
  type: "Point",
1267
- coordinates: [
1268
- le.toDegrees(n.longitude),
1269
- le.toDegrees(n.latitude)
1270
- ]
1027
+ coordinates: [le.toDegrees(i.longitude), le.toDegrees(i.latitude)]
1271
1028
  }
1272
1029
  };
1273
- }, pr = (e, i, t) => {
1030
+ }, Cr = (e, n, t) => {
1274
1031
  try {
1275
- const n = Rt(e, i, t);
1032
+ const i = zt(e, n, t);
1276
1033
  return {
1277
- longitude: le.toDegrees(n.longitude),
1278
- latitude: le.toDegrees(n.latitude)
1034
+ longitude: le.toDegrees(i.longitude),
1035
+ latitude: le.toDegrees(i.latitude)
1279
1036
  };
1280
1037
  } catch {
1281
1038
  return;
1282
1039
  }
1283
- }, de = document.createElement("canvas"), te = de.getContext("2d"), ht = (e) => {
1284
- const n = (e == null ? void 0 : e.data) ?? [];
1285
- for (let a = 3; a < n.length; a += 4)
1286
- if (n[a] < 255)
1040
+ }, ue = document.createElement("canvas"), te = ue.getContext("2d"), pt = (e) => {
1041
+ const i = (e == null ? void 0 : e.data) ?? [];
1042
+ for (let a = 3; a < i.length; a += 4)
1043
+ if (i[a] < 255)
1287
1044
  return !0;
1288
1045
  return !1;
1289
- }, mr = async (e, i) => (i && i.tileTransparencyCheckedCounter++, new Promise((t, n) => {
1046
+ }, wr = async (e, n) => (n && n.tileTransparencyCheckedCounter++, new Promise((t, i) => {
1290
1047
  try {
1291
- te == null || te.clearRect(0, 0, de.width, de.height);
1048
+ te == null || te.clearRect(0, 0, ue.width, ue.height);
1292
1049
  let a;
1293
1050
  if (e instanceof HTMLImageElement)
1294
1051
  a = e;
1295
1052
  else if (e instanceof ImageBitmap) {
1296
- de.width = e.width, de.height = e.height, te == null || te.drawImage(e, 0, 0);
1297
- const o = te == null ? void 0 : te.getImageData(
1298
- 0,
1299
- 0,
1300
- de.width,
1301
- de.height
1302
- ), d = ht(o);
1303
- d && i && (i.tileTransparencyCheckedCounter = i.maxTilesForTransparencyCheck), t(d);
1053
+ ue.width = e.width, ue.height = e.height, te == null || te.drawImage(e, 0, 0);
1054
+ const r = te == null ? void 0 : te.getImageData(0, 0, ue.width, ue.height), d = pt(r);
1055
+ d && n && (n.tileTransparencyCheckedCounter = n.maxTilesForTransparencyCheck), t(d);
1304
1056
  return;
1305
1057
  } else
1306
1058
  a = new Image(), a.crossOrigin = "anonymous", a.src = e;
1307
1059
  a.onload = () => {
1308
- de.width = a.width, de.height = a.height, te == null || te.drawImage(a, 0, 0);
1309
- const o = te == null ? void 0 : te.getImageData(
1310
- 0,
1311
- 0,
1312
- de.width,
1313
- de.height
1314
- );
1315
- ht(o) ? (i && (i.tileTransparencyCheckedCounter = i.maxTilesForTransparencyCheck), t(!0)) : t(!1);
1060
+ ue.width = a.width, ue.height = a.height, te == null || te.drawImage(a, 0, 0);
1061
+ const r = te == null ? void 0 : te.getImageData(0, 0, ue.width, ue.height);
1062
+ pt(r) ? (n && (n.tileTransparencyCheckedCounter = n.maxTilesForTransparencyCheck), t(!0)) : t(!1);
1316
1063
  };
1317
1064
  } catch (a) {
1318
- console.error("Could not determine image transparency. Error => ", a), n(a);
1065
+ console.error("Could not determine image transparency. Error => ", a), i(a);
1319
1066
  }
1320
- })), xe = (e, i) => {
1321
- const { west: t, east: n, north: a, south: o } = e, {
1322
- west: d,
1323
- east: u,
1324
- north: v,
1325
- south: C
1326
- } = i;
1327
- return t >= d && n <= u && a <= v && o >= C;
1328
- }, Ne = 3, De = "hasTransparency";
1329
- function tt(e, i, t, n, a) {
1067
+ })), ke = (e, n) => {
1068
+ const { west: t, east: i, north: a, south: r } = e, { west: d, east: h, north: v, south: C } = n;
1069
+ return t >= d && i <= h && a <= v && r >= C;
1070
+ }, Fe = 3, Re = "hasTransparency";
1071
+ function nt(e, n, t, i, a) {
1330
1072
  return setTimeout(() => {
1331
- var u;
1332
- const o = (u = this.layerListInstance.find(
1073
+ var h;
1074
+ const r = (h = this.layerListInstance.find(
1333
1075
  /* eslint-disable */
1334
1076
  (v) => {
1335
1077
  var C, S;
1336
1078
  return ((C = v._imageryProvider._resource) == null ? void 0 : C._url) === ((S = this._resource) == null ? void 0 : S._url);
1337
1079
  }
1338
1080
  /* eslint-enable */
1339
- )) == null ? void 0 : u.meta, d = Q(o, De) === !0;
1340
- this.tileTransparencyCheckedCounter < Ne && !d && mr(a == null ? void 0 : a.url, this).then(
1341
- (v) => {
1342
- var C;
1343
- (C = this.mapViewer.layersManager) == null || C.addMetaToLayer(
1344
- { [De]: v },
1345
- /* eslint-disable */
1346
- (S) => S._imageryProvider._resource._url === this._resource._url
1347
- );
1348
- }
1349
- );
1350
- }, 0), e(i, t, n, a);
1081
+ )) == null ? void 0 : h.meta, d = Q(r, Re) === !0;
1082
+ this.tileTransparencyCheckedCounter < Fe && !d && wr(a == null ? void 0 : a.url, this).then((v) => {
1083
+ var C;
1084
+ (C = this.mapViewer.layersManager) == null || C.addMetaToLayer(
1085
+ { [Re]: v },
1086
+ /* eslint-disable */
1087
+ (S) => S._imageryProvider._resource._url === this._resource._url
1088
+ );
1089
+ });
1090
+ }, 0), e(n, t, i, a);
1351
1091
  }
1352
- class Bt extends Ze {
1353
- constructor(t, n) {
1092
+ class $t extends Je {
1093
+ constructor(t, i) {
1354
1094
  var a;
1355
1095
  super(t);
1356
- J(this, "layerListInstance");
1357
- J(this, "mapViewer");
1358
- J(this, "maxTilesForTransparencyCheck", Ne);
1359
- J(this, "tileTransparencyCheckedCounter", 0);
1360
- this.layerListInstance = (a = n.layersManager) == null ? void 0 : a.layerList, this.mapViewer = n;
1096
+ X(this, "layerListInstance");
1097
+ X(this, "mapViewer");
1098
+ X(this, "maxTilesForTransparencyCheck", Fe);
1099
+ X(this, "tileTransparencyCheckedCounter", 0);
1100
+ this.layerListInstance = (a = i.layersManager) == null ? void 0 : a.layerList, this.mapViewer = i;
1361
1101
  }
1362
- requestImage(t, n, a, o) {
1363
- return tt.call(
1364
- this,
1365
- super.requestImage.bind(this),
1366
- t,
1367
- n,
1368
- a,
1369
- o
1370
- );
1102
+ requestImage(t, i, a, r) {
1103
+ return nt.call(this, super.requestImage.bind(this), t, i, a, r);
1371
1104
  }
1372
1105
  }
1373
- class Nt extends Je {
1374
- constructor(t, n) {
1106
+ class Ut extends Qe {
1107
+ constructor(t, i) {
1375
1108
  var a;
1376
1109
  super(t);
1377
- J(this, "layerListInstance");
1378
- J(this, "mapViewer");
1379
- J(this, "maxTilesForTransparencyCheck", Ne);
1380
- J(this, "tileTransparencyCheckedCounter", 0);
1381
- this.layerListInstance = (a = n.layersManager) == null ? void 0 : a.layerList, this.mapViewer = n;
1110
+ X(this, "layerListInstance");
1111
+ X(this, "mapViewer");
1112
+ X(this, "maxTilesForTransparencyCheck", Fe);
1113
+ X(this, "tileTransparencyCheckedCounter", 0);
1114
+ this.layerListInstance = (a = i.layersManager) == null ? void 0 : a.layerList, this.mapViewer = i;
1382
1115
  }
1383
- requestImage(t, n, a, o) {
1384
- return tt.call(
1385
- this,
1386
- super.requestImage.bind(this),
1387
- t,
1388
- n,
1389
- a,
1390
- o
1391
- );
1116
+ requestImage(t, i, a, r) {
1117
+ return nt.call(this, super.requestImage.bind(this), t, i, a, r);
1392
1118
  }
1393
1119
  }
1394
- class Ft extends Qe {
1395
- constructor(t, n) {
1120
+ class Wt extends et {
1121
+ constructor(t, i) {
1396
1122
  var a;
1397
1123
  super(t);
1398
- J(this, "layerListInstance");
1399
- J(this, "mapViewer");
1400
- J(this, "maxTilesForTransparencyCheck", Ne);
1401
- J(this, "tileTransparencyCheckedCounter", 0);
1402
- this.layerListInstance = (a = n.layersManager) == null ? void 0 : a.layerList, this.mapViewer = n;
1124
+ X(this, "layerListInstance");
1125
+ X(this, "mapViewer");
1126
+ X(this, "maxTilesForTransparencyCheck", Fe);
1127
+ X(this, "tileTransparencyCheckedCounter", 0);
1128
+ this.layerListInstance = (a = i.layersManager) == null ? void 0 : a.layerList, this.mapViewer = i;
1403
1129
  }
1404
- requestImage(t, n, a, o) {
1405
- return tt.call(
1406
- this,
1407
- super.requestImage.bind(this),
1408
- t,
1409
- n,
1410
- a,
1411
- o
1412
- );
1130
+ requestImage(t, i, a, r) {
1131
+ return nt.call(this, super.requestImage.bind(this), t, i, a, r);
1413
1132
  }
1414
1133
  }
1415
- const gr = 1, fr = -1, pt = "TRANSPARENT_BASE_LAYER";
1416
- class yr {
1417
- constructor(i, t, n) {
1418
- J(this, "mapViewer");
1419
- J(this, "legendsList");
1420
- J(this, "layerUpdated");
1421
- J(this, "layers");
1422
- J(this, "legendsExtractor");
1423
- this.mapViewer = i, this.layers = this.mapViewer.imageryLayers._layers, this.legendsList = [], this.legendsExtractor = t, this.layerUpdated = new Wi(), n && this.layerUpdated.addEventListener(n, this), this.mapViewer.shouldOptimizedTileRequests && (this.layerUpdated.addEventListener((a) => {
1424
- const o = Object.keys(a);
1425
- o.length === 1 && o[0] === De && (this.markRelevantLayersForExtent(), this.hideNonRelevantLayers());
1134
+ const br = 1, Tr = -1, mt = "TRANSPARENT_BASE_LAYER";
1135
+ class _r {
1136
+ constructor(n, t, i, a) {
1137
+ X(this, "mapViewer");
1138
+ X(this, "legendsList");
1139
+ X(this, "layerUpdated");
1140
+ X(this, "layers");
1141
+ X(this, "legendsExtractor");
1142
+ X(this, "layerManagerFootprintMetaFieldPath");
1143
+ this.mapViewer = n, this.layers = this.mapViewer.imageryLayers._layers, this.legendsList = [], this.legendsExtractor = t, this.layerUpdated = new Zn(), this.layerManagerFootprintMetaFieldPath = a, i && this.layerUpdated.addEventListener(i, this), this.mapViewer.shouldOptimizedTileRequests && (this.layerUpdated.addEventListener((r) => {
1144
+ const d = Object.keys(r);
1145
+ d.length === 1 && d[0] === Re && (this.markRelevantLayersForExtent(), this.hideNonRelevantLayers());
1426
1146
  }), this.mapViewer.imageryLayers.layerRemoved.addEventListener(() => {
1427
1147
  this.setLegends(), this.markRelevantLayersForExtent(), this.hideNonRelevantLayers();
1428
1148
  }), this.mapViewer.imageryLayers.layerMoved.addEventListener(() => {
@@ -1436,54 +1156,45 @@ class yr {
1436
1156
  get layerList() {
1437
1157
  return this.layers;
1438
1158
  }
1439
- /* eslint-disable */
1440
- addMetaToLayer(i, t) {
1441
- const n = this.layers.find(t);
1442
- n && (n.meta = { ...n.meta ?? {}, ...i }, this.setLegends(), this.layerUpdated.raiseEvent(i));
1159
+ // It's a general place to extend layer's data. Should be done when all providers(different types) are initialized
1160
+ addMetaToLayer(n, t) {
1161
+ const i = this.layers.map((a) => a.imageryProvider.readyPromise);
1162
+ Promise.all(i).then((a) => {
1163
+ const r = this.layers.find(t);
1164
+ r && (r.meta = { ...r.meta ?? {}, ...n }, this.setLegends(), this.layerUpdated.raiseEvent(n));
1165
+ });
1443
1166
  }
1444
- /* eslint-enable */
1445
- setBaseMapLayers(i) {
1446
- i.baseRasteLayers.sort(
1447
- (n, a) => n.zIndex - a.zIndex
1448
- ).forEach((n, a) => {
1449
- this.addRasterLayer(n, a, i.id);
1450
- }), this.mapViewer.shouldOptimizedTileRequests && (this.removeLayer(pt), this.addTransparentImageryProvider());
1167
+ setBaseMapLayers(n) {
1168
+ n.baseRasteLayers.sort((i, a) => i.zIndex - a.zIndex).forEach((i, a) => {
1169
+ this.addRasterLayer(i, a, n.id);
1170
+ }), this.mapViewer.shouldOptimizedTileRequests && (this.removeLayer(mt), this.addTransparentImageryProvider());
1451
1171
  }
1452
- addRasterLayer(i, t, n) {
1172
+ addRasterLayer(n, t, i) {
1453
1173
  let a;
1454
- switch (i.type) {
1174
+ switch (n.type) {
1455
1175
  case "XYZ_LAYER": {
1456
- const o = i.options, d = this.mapViewer.shouldOptimizedTileRequests ? new Bt(o, this.mapViewer) : new Ze(o);
1457
- a = this.mapViewer.imageryLayers.addImageryProvider(
1458
- d,
1459
- t
1460
- );
1176
+ const r = n.options, d = this.mapViewer.shouldOptimizedTileRequests ? new $t(r, this.mapViewer) : new Je(r);
1177
+ a = this.mapViewer.imageryLayers.addImageryProvider(d, t);
1461
1178
  break;
1462
1179
  }
1463
1180
  case "WMS_LAYER": {
1464
- const o = i.options, d = this.mapViewer.shouldOptimizedTileRequests ? new Nt(o, this.mapViewer) : new Je(o);
1465
- a = this.mapViewer.imageryLayers.addImageryProvider(
1466
- d,
1467
- t
1468
- );
1181
+ const r = n.options, d = this.mapViewer.shouldOptimizedTileRequests ? new Ut(r, this.mapViewer) : new Qe(r);
1182
+ a = this.mapViewer.imageryLayers.addImageryProvider(d, t);
1469
1183
  break;
1470
1184
  }
1471
1185
  case "WMTS_LAYER": {
1472
- const o = i.options, d = this.mapViewer.shouldOptimizedTileRequests ? new Ft(o, this.mapViewer) : new Qe(o);
1473
- a = this.mapViewer.imageryLayers.addImageryProvider(
1474
- d,
1475
- t
1476
- );
1186
+ const r = n.options, d = this.mapViewer.shouldOptimizedTileRequests ? new Wt(r, this.mapViewer) : new et(r);
1187
+ a = this.mapViewer.imageryLayers.addImageryProvider(d, t);
1477
1188
  break;
1478
1189
  }
1479
1190
  }
1480
- a && (a.alpha = i.opacity, a.meta = {
1481
- parentBasetMapId: n,
1482
- ...i
1483
- }, i.show !== void 0 && (a.show = i.show));
1191
+ a && (a.alpha = n.opacity, a.meta = {
1192
+ parentBasetMapId: i,
1193
+ ...n
1194
+ }, n.show !== void 0 && (a.show = n.show));
1484
1195
  }
1485
- removeLayer(i) {
1486
- const t = this.findLayerById(i);
1196
+ removeLayer(n) {
1197
+ const t = this.findLayerById(n);
1487
1198
  t && this.mapViewer.imageryLayers.remove(t, !0);
1488
1199
  }
1489
1200
  removeBaseMapLayers() {
@@ -1497,87 +1208,82 @@ class yr {
1497
1208
  this.mapViewer.imageryLayers.remove(t, !0);
1498
1209
  });
1499
1210
  }
1500
- raise(i, t = 1) {
1501
- const n = this.findLayerById(i), a = (n == null ? void 0 : n.meta).zIndex;
1502
- if (n)
1503
- for (let o = 0; o < t; o++)
1504
- this.mapViewer.imageryLayers.raise(n);
1505
- this.updateLayersOrder(i, a, a + t);
1211
+ raise(n, t = 1) {
1212
+ const i = this.findLayerById(n), a = (i == null ? void 0 : i.meta).zIndex;
1213
+ if (i)
1214
+ for (let r = 0; r < t; r++)
1215
+ this.mapViewer.imageryLayers.raise(i);
1216
+ this.updateLayersOrder(n, a, a + t);
1506
1217
  }
1507
- lower(i, t = 1) {
1508
- const n = this.findLayerById(i), a = (n == null ? void 0 : n.meta).zIndex, o = this.getBaseLayersCount(), d = this.mapViewer.imageryLayers.indexOf(
1509
- n
1510
- );
1511
- if (d - t <= o && (t = d - o), n)
1512
- for (let u = 0; u < t; u++)
1513
- this.mapViewer.imageryLayers.lower(n);
1514
- this.updateLayersOrder(i, a, a - t);
1218
+ lower(n, t = 1) {
1219
+ const i = this.findLayerById(n), a = (i == null ? void 0 : i.meta).zIndex, r = this.getBaseLayersCount(), d = this.mapViewer.imageryLayers.indexOf(i);
1220
+ if (d - t <= r && (t = d - r), i)
1221
+ for (let h = 0; h < t; h++)
1222
+ this.mapViewer.imageryLayers.lower(i);
1223
+ this.updateLayersOrder(n, a, a - t);
1515
1224
  }
1516
- raiseToTop(i) {
1517
- const t = this.findLayerById(i), n = (t == null ? void 0 : t.meta).zIndex;
1518
- t && this.mapViewer.imageryLayers.raiseToTop(t), this.updateLayersOrder(
1519
- i,
1520
- n,
1521
- this.mapViewer.imageryLayers.length - this.getBaseLayersCount() - 1
1522
- );
1225
+ raiseToTop(n) {
1226
+ const t = this.findLayerById(n), i = (t == null ? void 0 : t.meta).zIndex;
1227
+ t && this.mapViewer.imageryLayers.raiseToTop(t), this.updateLayersOrder(n, i, this.mapViewer.imageryLayers.length - this.getBaseLayersCount() - 1);
1523
1228
  }
1524
- lowerToBottom(i) {
1525
- const t = this.findLayerById(i), n = this.getBaseLayersCount(), a = this.mapViewer.imageryLayers.indexOf(
1526
- t
1527
- );
1528
- this.lower(i, a - n);
1229
+ lowerToBottom(n) {
1230
+ const t = this.findLayerById(n), i = this.getBaseLayersCount(), a = this.mapViewer.imageryLayers.indexOf(t);
1231
+ this.lower(n, a - i);
1529
1232
  }
1530
1233
  length() {
1531
1234
  return this.mapViewer.imageryLayers.length;
1532
1235
  }
1533
- show(i, t) {
1534
- const n = this.get(i);
1535
- n !== void 0 && (n.show = t);
1236
+ show(n, t) {
1237
+ const i = this.get(n);
1238
+ i !== void 0 && (i.show = t);
1536
1239
  }
1537
- showAllNotBase(i) {
1538
- this.layers.filter((n) => !Q(n.meta, "parentBasetMapId")).forEach((n) => {
1240
+ showAllNotBase(n) {
1241
+ this.layers.filter((i) => !Q(i.meta, "parentBasetMapId")).forEach((i) => {
1539
1242
  var a;
1540
- this.show((a = n.meta) == null ? void 0 : a.id, i);
1243
+ this.show((a = i.meta) == null ? void 0 : a.id, n);
1541
1244
  });
1542
1245
  }
1543
- get(i) {
1544
- const t = this.findLayerById(i), n = this.mapViewer.imageryLayers.indexOf(
1545
- t
1546
- );
1547
- return n ? this.mapViewer.imageryLayers.get(n) : void 0;
1246
+ get(n) {
1247
+ const t = this.findLayerById(n), i = this.mapViewer.imageryLayers.indexOf(t);
1248
+ return i ? this.mapViewer.imageryLayers.get(i) : void 0;
1548
1249
  }
1549
- findLayerByPOI(i, t) {
1550
- const n = hr(this.mapViewer, i, t);
1551
- return this.layers.filter((d) => !Q(d.meta, "parentBasetMapId")).filter((d) => {
1552
- const u = Q(d.meta, "details.footprint");
1553
- return u !== void 0 ? un(n.geometry, {
1554
- type: "Feature",
1555
- properties: {},
1556
- geometry: u
1557
- }) && d.show : (console.warn("CesiumImageryLayer has no defined footprint", d.meta), !1);
1558
- }).sort((d, u) => {
1559
- var v, C;
1560
- return ((v = u.meta) == null ? void 0 : v.zIndex) - ((C = d.meta) == null ? void 0 : C.zIndex);
1561
- });
1250
+ pickImageryLayers(n) {
1251
+ var a;
1252
+ const t = this.mapViewer.camera.getPickRay(n);
1253
+ let i;
1254
+ return t && (i = (a = this.mapViewer.imageryLayers.pickImageryLayers(t, this.mapViewer.scene)) == null ? void 0 : a.filter((r) => !Q(r.meta, "parentBasetMapId"))), i;
1255
+ }
1256
+ findLayerByPOI(n, t) {
1257
+ if (this.layerManagerFootprintMetaFieldPath) {
1258
+ const i = Er(this.mapViewer, n, t);
1259
+ return this.layers.filter((d) => !Q(d.meta, "parentBasetMapId")).filter((d) => {
1260
+ const h = Q(d.meta, this.layerManagerFootprintMetaFieldPath);
1261
+ return h !== void 0 ? fi(i.geometry, {
1262
+ type: "Feature",
1263
+ properties: {},
1264
+ geometry: h
1265
+ }) && d.show : (console.warn("[LayerManager] [findLayerByPOI] CesiumImageryLayer has no defined footprint", d.meta), !1);
1266
+ }).sort((d, h) => {
1267
+ var v, C;
1268
+ return ((v = h.meta) == null ? void 0 : v.zIndex) - ((C = d.meta) == null ? void 0 : C.zIndex);
1269
+ });
1270
+ } else
1271
+ return console.warn("[LayerManager] [findLayerByPOI]layerManagerFootprintMetaFieldPath is not defined"), [];
1562
1272
  }
1563
1273
  addTransparentImageryProvider() {
1564
- const i = this.mapViewer.imageryLayers.addImageryProvider(
1565
- new ji({
1274
+ const n = this.mapViewer.imageryLayers.addImageryProvider(
1275
+ new Jn({
1566
1276
  url: "./assets/img/transparent-tile.png",
1567
1277
  /* eslint-disable @typescript-eslint/no-magic-numbers */
1568
- rectangle: new Ce(
1569
- -3.141592653589793,
1570
- -1.5707963267948966,
1571
- 3.141592653589793,
1572
- 1.5707963267948966
1573
- )
1278
+ rectangle: new we(-3.141592653589793, -1.5707963267948966, 3.141592653589793, 1.5707963267948966)
1574
1279
  /* eslint-enable @typescript-eslint/no-magic-numbers */
1575
1280
  }),
1576
1281
  0
1577
1282
  );
1578
- i.meta = {
1579
- id: pt,
1580
- skipRelevancyCheck: !0
1283
+ n.meta = {
1284
+ id: mt,
1285
+ skipRelevancyCheck: !0,
1286
+ parentBasetMapId: "TRANSPARENT_LAYER"
1581
1287
  };
1582
1288
  }
1583
1289
  setLegends() {
@@ -1586,82 +1292,82 @@ class yr {
1586
1292
  getBaseLayersCount() {
1587
1293
  return this.layers.filter((t) => !!Q(t.meta, "parentBasetMapId")).length;
1588
1294
  }
1589
- findLayerById(i) {
1590
- return this.layers.find((t) => t.meta !== void 0 ? t.meta.id === i : !1);
1295
+ findLayerById(n) {
1296
+ return this.layers.find((t) => t.meta !== void 0 ? t.meta.id === n : !1);
1591
1297
  }
1592
- updateLayersOrder(i, t, n) {
1593
- const a = t > n ? gr : fr, o = t < n ? t : n, d = t < n ? n : t;
1594
- this.layers.forEach((u) => {
1298
+ updateLayersOrder(n, t, i) {
1299
+ const a = t > i ? br : Tr, r = t < i ? t : i, d = t < i ? i : t;
1300
+ this.layers.forEach((h) => {
1595
1301
  var C;
1596
- if (!Q(u.meta, "parentBasetMapId")) {
1597
- const S = (C = u.meta) == null ? void 0 : C.zIndex;
1598
- u.meta.zIndex = S >= o && S <= d && S !== t ? S + a : S === t ? n : S;
1302
+ if (!Q(h.meta, "parentBasetMapId")) {
1303
+ const S = (C = h.meta) == null ? void 0 : C.zIndex;
1304
+ h.meta.zIndex = S >= r && S <= d && S !== t ? S + a : S === t ? i : S;
1599
1305
  }
1600
1306
  });
1601
1307
  }
1602
1308
  hideNonRelevantLayers() {
1603
- var i, t;
1604
- for (const n of this.layers)
1605
- ((i = n.meta) == null ? void 0 : i.relevantToExtent) !== n.show && n.imageryProvider.ready && (n.show = ((t = n.meta) == null ? void 0 : t.relevantToExtent) ?? !0);
1309
+ var n, t;
1310
+ for (const i of this.layers)
1311
+ ((n = i.meta) == null ? void 0 : n.relevantToExtent) !== i.show && i.imageryProvider.ready && (i.show = ((t = i.meta) == null ? void 0 : t.relevantToExtent) ?? !0);
1606
1312
  }
1607
1313
  markRelevantLayersForExtent() {
1608
- var i, t;
1314
+ var n, t;
1609
1315
  try {
1610
- const n = this.mapViewer.camera.computeViewRectangle();
1316
+ const i = this.mapViewer.camera.computeViewRectangle();
1611
1317
  for (let a = this.layers.length - 1; a >= 0; a--) {
1612
- const o = this.layers[a], d = !Ke(n) && !Ke(o.rectangle) && Ce.intersection(n, o.rectangle);
1613
- for (let u = this.layers.length - 1; u >= a; u--) {
1614
- if (((i = o.meta) == null ? void 0 : i.skipRelevancyCheck) === !0) {
1615
- o.meta = { ...o.meta, relevantToExtent: !0 };
1318
+ const r = this.layers[a], d = !qe(i) && !qe(r.rectangle) && we.intersection(i, r.rectangle);
1319
+ for (let h = this.layers.length - 1; h >= a; h--) {
1320
+ if (((n = r.meta) == null ? void 0 : n.skipRelevancyCheck) === !0) {
1321
+ r.meta = { ...r.meta, relevantToExtent: !0 };
1616
1322
  continue;
1617
1323
  }
1618
- const v = this.layers[u], C = ((t = v.meta) == null ? void 0 : t[De]) === !0;
1619
- if (o !== v)
1620
- if (d instanceof Ce) {
1621
- if (xe(n, o.rectangle))
1622
- if (xe(n, v.rectangle) && !C) {
1623
- o.meta = {
1624
- ...o.meta ?? {},
1324
+ const v = this.layers[h], C = ((t = v.meta) == null ? void 0 : t[Re]) === !0;
1325
+ if (r !== v)
1326
+ if (d instanceof we) {
1327
+ if (ke(i, r.rectangle))
1328
+ if (ke(i, v.rectangle) && !C) {
1329
+ r.meta = {
1330
+ ...r.meta ?? {},
1625
1331
  relevantToExtent: !1
1626
1332
  };
1627
1333
  break;
1628
1334
  } else
1629
- o.meta = {
1630
- ...o.meta ?? {},
1335
+ r.meta = {
1336
+ ...r.meta ?? {},
1631
1337
  relevantToExtent: !0
1632
1338
  };
1633
- if (xe(n, v.rectangle) && !C) {
1634
- o.meta = { ...o.meta ?? {}, relevantToExtent: !1 };
1339
+ if (ke(i, v.rectangle) && !C) {
1340
+ r.meta = { ...r.meta ?? {}, relevantToExtent: !1 };
1635
1341
  break;
1636
1342
  }
1637
- if (xe(o.rectangle, v.rectangle)) {
1638
- if (o.meta = {
1639
- ...o.meta ?? {},
1343
+ if (ke(r.rectangle, v.rectangle)) {
1344
+ if (r.meta = {
1345
+ ...r.meta ?? {},
1640
1346
  relevantToExtent: C
1641
1347
  }, !C)
1642
1348
  break;
1643
1349
  } else
1644
- o.meta = { ...o.meta ?? {}, relevantToExtent: !0 };
1350
+ r.meta = { ...r.meta ?? {}, relevantToExtent: !0 };
1645
1351
  } else
1646
- o.meta = { ...o.meta ?? {}, relevantToExtent: !1 };
1352
+ r.meta = { ...r.meta ?? {}, relevantToExtent: !1 };
1647
1353
  else
1648
- a === this.layers.length - 1 && (o.meta = {
1649
- ...o.meta ?? {},
1650
- relevantToExtent: d instanceof Ce
1354
+ a === this.layers.length - 1 && (r.meta = {
1355
+ ...r.meta ?? {},
1356
+ relevantToExtent: d instanceof we
1651
1357
  });
1652
1358
  }
1653
1359
  }
1654
- } catch (n) {
1655
- console.error(n);
1360
+ } catch (i) {
1361
+ console.error(i);
1656
1362
  }
1657
1363
  }
1658
1364
  }
1659
- const mt = 212, gt = 260, vr = 0;
1660
- class Ho extends Ki {
1661
- constructor(t, n) {
1662
- super(t, n);
1663
- J(this, "layersManager");
1664
- J(this, "useOptimizedTileRequests");
1365
+ const gt = 212, ft = 260, Sr = 0;
1366
+ class jo extends Qn {
1367
+ constructor(t, i) {
1368
+ super(t, i);
1369
+ X(this, "layersManager");
1370
+ X(this, "useOptimizedTileRequests");
1665
1371
  }
1666
1372
  get shouldOptimizedTileRequests() {
1667
1373
  return this.useOptimizedTileRequests ?? !1;
@@ -1670,16 +1376,14 @@ class Ho extends Ki {
1670
1376
  this.useOptimizedTileRequests = t;
1671
1377
  }
1672
1378
  }
1673
- const Ht = Se(null), Er = Ht.Provider, Cr = 1e4, he = () => {
1674
- const e = Pe(Ht);
1379
+ const jt = Le(null), Lr = jt.Provider, pe = () => {
1380
+ const e = Pe(jt);
1675
1381
  if (e === null)
1676
1382
  throw new Error("map context is null, please check the provider");
1677
1383
  return e;
1678
- }, Go = (e) => {
1679
- var E, T, b, w, _, P, H, W;
1680
- const i = Le(null), [t, n] = k(), [a, o] = k(), [d, u] = k(), [v, C] = k(), [S, A] = k(), [L, R] = k(), [z, K] = k(), [Y, F] = k(), [X, U] = k([]), [V, j] = k(), [O, $] = k(!1), [q, r] = k(void 0), [s, f] = k(
1681
- !1
1682
- ), [c, g] = k(), h = {
1384
+ }, Ko = (e) => {
1385
+ var T, b, w, _, P, H, j, O;
1386
+ const n = ve(null), [t, i] = k(), [a, r] = k(), [d, h] = k(), [v, C] = k(), [S, x] = k(), [L, B] = k(), U = ve(), [K, J] = k(), [G, Y] = k([]), [z, V] = k(), [W, D] = k(!1), $ = ve(), [q, o] = k(void 0), [s, f] = k(!1), [c, g] = k(), u = {
1683
1387
  fullscreenButton: !0,
1684
1388
  timeline: !1,
1685
1389
  animation: !1,
@@ -1689,67 +1393,55 @@ const Ht = Se(null), Er = Ht.Provider, Cr = 1e4, he = () => {
1689
1393
  homeButton: !1,
1690
1394
  sceneModePicker: !1,
1691
1395
  ...e
1692
- }, y = (M, x, B, G, pe) => {
1693
- const ne = t.container, ee = ne.clientWidth, se = ne.clientHeight, _e = G + pe;
1396
+ }, y = (M, A, F, de, oe) => {
1397
+ const ee = t.container, se = ee.clientWidth, Se = ee.clientHeight, Ae = de + oe;
1694
1398
  return {
1695
- left: `${ee - M < B ? M - (B - (ee - M)) : M}px`,
1696
- top: `${se - x < _e ? x - (_e - (se - x)) : x}px`
1399
+ left: `${se - M < F ? M - (F - (se - M)) : M}px`,
1400
+ top: `${Se - A < Ae ? A - (Ae - (Se - A)) : A}px`
1697
1401
  };
1698
- };
1402
+ }, m = me((M) => {
1403
+ if (n.current !== null) {
1404
+ const A = n.current.cesiumElement, F = { x: M.offsetX, y: M.offsetY };
1405
+ D(!1), o(F), g(Cr(A, F.x, F.y)), D(!0), $.current = M;
1406
+ }
1407
+ }, [n]);
1699
1408
  I(() => {
1700
1409
  var M;
1701
- if (i.current !== null) {
1702
- const x = i.current.cesiumElement;
1703
- e.imageryContextMenu && x.screenSpaceEventHandler.setInputAction(
1704
- (B) => {
1705
- const G = B.position;
1706
- $(!1), r(G), g(
1707
- pr(x, G.x, G.y)
1708
- ), $(!0);
1709
- },
1710
- St.RIGHT_CLICK
1711
- );
1410
+ if (n.current !== null) {
1411
+ const A = n.current.cesiumElement;
1412
+ e.imageryContextMenu && (A.scene.canvas.removeEventListener("contextmenu", m), A.scene.canvas.addEventListener("contextmenu", m));
1712
1413
  }
1713
- n((M = i.current) == null ? void 0 : M.cesiumElement);
1714
- }, [i, e.imageryContextMenu]), I(() => {
1414
+ i((M = n.current) == null ? void 0 : M.cesiumElement);
1415
+ }, [n, e.imageryContextMenu]), I(() => {
1715
1416
  var M;
1716
- t && (t.shouldOptimizedTileRequests = e.useOptimizedTileRequests ?? !1, t.layersManager = new yr(
1417
+ t && (t.shouldOptimizedTileRequests = e.useOptimizedTileRequests ?? !1, t.layersManager = new _r(
1717
1418
  t,
1718
1419
  (M = e.legends) == null ? void 0 : M.mapLegendsExtractor,
1719
1420
  () => {
1720
- var x;
1721
- U(
1722
- (x = t.layersManager) == null ? void 0 : x.legendsList
1723
- );
1724
- }
1421
+ var A;
1422
+ Y((A = t.layersManager) == null ? void 0 : A.legendsList);
1423
+ },
1424
+ e.layerManagerFootprintMetaFieldPath
1725
1425
  ));
1726
1426
  }, [t]), I(() => {
1727
1427
  t && (t.shouldOptimizedTileRequests = e.useOptimizedTileRequests ?? !1);
1728
1428
  }, [e.useOptimizedTileRequests, t]), I(() => {
1729
- F(
1730
- e.sceneModes ?? [
1731
- ie.SCENE2D,
1732
- ie.SCENE3D,
1733
- ie.COLUMBUS_VIEW
1734
- ]
1735
- );
1429
+ J(e.sceneModes ?? [ne.SCENE2D, ne.SCENE3D, ne.COLUMBUS_VIEW]);
1736
1430
  }, [e.sceneModes]), I(() => {
1737
- var x, B;
1738
- j(e.baseMaps);
1739
- const M = (x = e.baseMaps) == null ? void 0 : x.maps.find(
1740
- (G) => G.isCurrent
1741
- );
1742
- M && t && ((B = t.layersManager) == null || B.setBaseMapLayers(M));
1431
+ var A, F;
1432
+ V(e.baseMaps);
1433
+ const M = (A = e.baseMaps) == null ? void 0 : A.maps.find((de) => de.isCurrent);
1434
+ M && t && ((F = t.layersManager) == null || F.setBaseMapLayers(M));
1743
1435
  }, [e.baseMaps, t]), I(() => {
1744
- o(e.projection ?? ue.WGS84);
1436
+ r(e.projection ?? he.WGS84);
1745
1437
  }, [e.projection]), I(() => {
1746
- R(e.locale);
1438
+ B(e.locale);
1747
1439
  }, [e.locale]), I(() => {
1748
- u(e.showMousePosition ?? !0);
1440
+ h(e.showMousePosition ?? !0);
1749
1441
  }, [e.showMousePosition]), I(() => {
1750
1442
  C(e.showZoomLevel ?? !0);
1751
1443
  }, [e.showZoomLevel]), I(() => {
1752
- A(e.showScale ?? !0);
1444
+ x(e.showScale ?? !0);
1753
1445
  }, [e.showScale]), I(() => {
1754
1446
  const M = () => {
1755
1447
  if (t === void 0)
@@ -1758,135 +1450,97 @@ const Ht = Se(null), Er = Ht.Provider, Cr = 1e4, he = () => {
1758
1450
  latitude: 0,
1759
1451
  height: 0
1760
1452
  };
1761
- const B = () => {
1762
- const G = t.camera.positionCartographic;
1453
+ const A = () => {
1454
+ const F = t.camera.positionCartographic;
1763
1455
  return {
1764
- longitude: Ae(G.longitude),
1765
- latitude: Ae(G.latitude),
1766
- height: G.height
1456
+ longitude: xe(F.longitude),
1457
+ latitude: xe(F.latitude),
1458
+ height: F.height
1767
1459
  };
1768
1460
  };
1769
1461
  if (t.scene.mode === ye.SCENE3D) {
1770
- const G = new Te(
1462
+ const F = new _e(
1771
1463
  // eslint-disable-next-line @typescript-eslint/no-magic-numbers
1772
1464
  t.container.clientWidth / 2,
1773
1465
  // eslint-disable-next-line @typescript-eslint/no-magic-numbers
1774
1466
  t.container.clientHeight / 2
1775
- ), pe = t.scene.camera.getPickRay(G), ne = t.scene.globe.pick(
1776
- pe,
1777
- t.scene
1778
- ), ee = t.scene.globe.ellipsoid.cartesianToCartographic(
1779
- ne
1780
- );
1467
+ ), de = t.scene.camera.getPickRay(F), oe = t.scene.globe.pick(de, t.scene), ee = t.scene.globe.ellipsoid.cartesianToCartographic(oe);
1781
1468
  return ee !== void 0 ? {
1782
- longitude: Ae(ee.longitude),
1783
- latitude: Ae(ee.latitude),
1469
+ longitude: xe(ee.longitude),
1470
+ latitude: xe(ee.latitude),
1784
1471
  height: t.scene.camera.positionCartographic.height
1785
- } : B();
1472
+ } : A();
1786
1473
  } else
1787
- return B();
1788
- }, x = setInterval(() => {
1789
- if (t && t.scene.mode !== ye.MORPHING) {
1790
- const B = t.camera, G = {
1474
+ return A();
1475
+ };
1476
+ t && t.camera.moveEnd.addEventListener(() => {
1477
+ if (t.scene.mode !== ye.MORPHING) {
1478
+ const A = t.camera, F = {
1791
1479
  position: M(),
1792
- direction: B.direction.clone(),
1793
- up: B.up.clone(),
1794
- right: B.right.clone(),
1795
- transform: B.transform.clone(),
1796
- frustum: B.frustum.clone()
1480
+ direction: A.direction.clone(),
1481
+ up: A.up.clone(),
1482
+ right: A.right.clone(),
1483
+ transform: A.transform.clone(),
1484
+ frustum: A.frustum.clone()
1797
1485
  };
1798
- K(G);
1486
+ U.current = F;
1799
1487
  }
1800
- }, Cr);
1801
- return () => {
1802
- clearInterval(x);
1803
- };
1488
+ });
1804
1489
  }, [t]), I(() => {
1805
1490
  const M = () => {
1806
- t && z && t.camera.flyTo({
1807
- destination: me.fromDegrees(
1808
- z.position.longitude,
1809
- z.position.latitude,
1810
- z.position.height
1811
- ),
1812
- duration: 0
1813
- });
1491
+ if (t && U.current) {
1492
+ const A = U.current;
1493
+ t.camera.flyTo({
1494
+ destination: ge.fromDegrees(A.position.longitude, A.position.latitude, A.position.height),
1495
+ duration: 0
1496
+ });
1497
+ }
1814
1498
  };
1815
1499
  return t && t.scene.morphComplete.addEventListener(M), () => {
1816
1500
  if (t)
1817
1501
  try {
1818
- t.scene.morphComplete.removeEventListener(
1819
- M
1820
- );
1502
+ t.scene.morphComplete.removeEventListener(M);
1821
1503
  } catch {
1822
1504
  console.error("morphCompleteHandler event not cleaned");
1823
1505
  }
1824
1506
  };
1825
- }, [t, z]), I(() => {
1826
- const M = e.zoom, x = e.center;
1827
- t && Oe(M) && dn(x) && t.camera.flyTo({
1828
- destination: me.fromDegrees(
1829
- x[0],
1830
- x[1],
1831
- Xn(M)
1832
- ),
1507
+ }, [t]), I(() => {
1508
+ const M = e.zoom, A = e.center;
1509
+ t && De(M) && gi(A) && t.camera.flyTo({
1510
+ destination: ge.fromDegrees(A[0], A[1], ir(M)),
1833
1511
  duration: 0
1834
1512
  });
1835
1513
  }, [e.zoom, e.center, t]);
1836
- const m = ge(() => t && Ii(
1837
- /* @__PURE__ */ D(oe, { children: [
1838
- /* @__PURE__ */ D(ae, { className: "sideToolsContainer", children: [
1839
- /* @__PURE__ */ l(
1840
- sr,
1841
- {
1842
- sceneModes: Y,
1843
- baseMaps: V,
1844
- locale: L
1845
- }
1846
- ),
1847
- /* @__PURE__ */ l(
1848
- lr,
1849
- {
1850
- onClick: () => f(!s)
1851
- }
1852
- )
1514
+ const E = me(() => t && Nn(
1515
+ /* @__PURE__ */ R(re, { children: [
1516
+ /* @__PURE__ */ R(ae, { className: "sideToolsContainer", children: [
1517
+ /* @__PURE__ */ l(pr, { sceneModes: K, baseMaps: z, locale: L }),
1518
+ /* @__PURE__ */ l(gr, { onClick: () => f(!s) })
1853
1519
  ] }),
1854
- /* @__PURE__ */ D(ae, { className: "toolsContainer", children: [
1855
- d === !0 ? /* @__PURE__ */ l(Zn, { projection: a }) : /* @__PURE__ */ l(oe, {}),
1856
- v === !0 ? /* @__PURE__ */ l(tr, { locale: L }) : /* @__PURE__ */ l(oe, {}),
1857
- S === !0 ? /* @__PURE__ */ l(Qn, { locale: L }) : /* @__PURE__ */ l(oe, {})
1520
+ /* @__PURE__ */ R(ae, { className: "toolsContainer", children: [
1521
+ d === !0 ? /* @__PURE__ */ l(rr, { projection: a }) : /* @__PURE__ */ l(re, {}),
1522
+ v === !0 ? /* @__PURE__ */ l(lr, { locale: L }) : /* @__PURE__ */ l(re, {}),
1523
+ S === !0 ? /* @__PURE__ */ l(sr, { locale: L }) : /* @__PURE__ */ l(re, {})
1858
1524
  ] })
1859
1525
  ] }),
1860
1526
  document.querySelector(".cesium-viewer")
1861
- ), [
1862
- V,
1863
- L,
1864
- t,
1865
- a,
1866
- Y,
1867
- d,
1868
- S,
1869
- s
1870
- ]);
1871
- return /* @__PURE__ */ l(Oi, { className: "viewer", full: !0, ref: i, ...h, children: /* @__PURE__ */ D(Er, { value: t, children: [
1527
+ ), [z, L, t, a, K, d, S, s]);
1528
+ return /* @__PURE__ */ l(Fn, { className: "viewer", full: !0, ref: n, ...u, children: /* @__PURE__ */ R(Lr, { value: t, children: [
1872
1529
  /* @__PURE__ */ l(
1873
- ur,
1530
+ vr,
1874
1531
  {
1875
- title: (E = e.legends) == null ? void 0 : E.title,
1532
+ title: (T = e.legends) == null ? void 0 : T.title,
1876
1533
  isOpen: s,
1877
1534
  toggleSidebar: () => f(!s),
1878
- noLegendsText: (T = e.legends) == null ? void 0 : T.emptyText,
1879
- legends: ((b = e.legends) == null ? void 0 : b.legendsList) ?? X,
1880
- actionsTexts: (w = e.legends) == null ? void 0 : w.actionsTexts
1535
+ noLegendsText: (b = e.legends) == null ? void 0 : b.emptyText,
1536
+ legends: ((w = e.legends) == null ? void 0 : w.legendsList) ?? G,
1537
+ actionsTexts: (_ = e.legends) == null ? void 0 : _.actionsTexts
1881
1538
  }
1882
1539
  ),
1883
1540
  e.children,
1884
- m(),
1885
- e.imageryContextMenu && O && q && c && ve.cloneElement(e.imageryContextMenu, {
1886
- data: (_ = t == null ? void 0 : t.layersManager) == null ? void 0 : _.findLayerByPOI(
1887
- q.x,
1888
- q.y
1889
- ),
1541
+ E(),
1542
+ e.imageryContextMenu && W && q && c && Ee.cloneElement(e.imageryContextMenu, {
1543
+ data: (P = t == null ? void 0 : t.layersManager) == null ? void 0 : P.findLayerByPOI(q.x, q.y),
1890
1544
  position: {
1891
1545
  x: q.x,
1892
1546
  y: q.y
@@ -1895,142 +1549,139 @@ const Ht = Se(null), Er = Ht.Provider, Cr = 1e4, he = () => {
1895
1549
  style: y(
1896
1550
  q.x,
1897
1551
  q.y,
1898
- ((P = e.imageryContextMenuSize) == null ? void 0 : P.width) ?? gt,
1899
- ((H = e.imageryContextMenuSize) == null ? void 0 : H.height) ?? mt,
1900
- ((W = e.imageryContextMenuSize) == null ? void 0 : W.dynamicHeightIncrement) ?? vr
1552
+ ((H = e.imageryContextMenuSize) == null ? void 0 : H.width) ?? ft,
1553
+ ((j = e.imageryContextMenuSize) == null ? void 0 : j.height) ?? gt,
1554
+ ((O = e.imageryContextMenuSize) == null ? void 0 : O.dynamicHeightIncrement) ?? Sr
1901
1555
  ),
1902
1556
  size: e.imageryContextMenuSize ?? {
1903
- height: mt,
1904
- width: gt
1557
+ height: gt,
1558
+ width: ft
1905
1559
  },
1906
1560
  handleClose: () => {
1907
- $(!O);
1908
- }
1561
+ D(!W);
1562
+ },
1563
+ contextEvt: $.current
1909
1564
  })
1910
1565
  ] }) });
1911
- }, wr = 0, Vo = (e) => {
1912
- const i = he();
1566
+ }, Pr = 0, qo = (e) => {
1567
+ const n = pe();
1913
1568
  return /* @__PURE__ */ l(
1914
- Di,
1569
+ Gn,
1915
1570
  {
1916
1571
  ...e,
1917
1572
  onReady: (t) => {
1918
- e.isZoomTo === !0 && i.zoomTo(t);
1919
- const n = i.scene;
1920
- n.globe.depthTestAgainstTerrain = !0;
1921
- const a = Be.fromCartesian(
1922
- t.boundingSphere.center
1923
- ), o = e.heightFromGround ?? wr;
1924
- if (o) {
1925
- const d = me.fromRadians(
1926
- a.longitude,
1927
- a.latitude,
1928
- a.height
1929
- ), u = me.fromRadians(
1930
- a.longitude,
1931
- a.latitude,
1932
- a.height + o
1933
- ), v = me.subtract(
1934
- u,
1935
- d,
1936
- new me()
1937
- );
1938
- t.modelMatrix = qi.fromTranslation(v);
1573
+ e.isZoomTo === !0 && n.zoomTo(t);
1574
+ const i = n.scene;
1575
+ i.globe.depthTestAgainstTerrain = !0;
1576
+ const a = Ne.fromCartesian(t.boundingSphere.center), r = e.heightFromGround ?? Pr;
1577
+ if (r) {
1578
+ const d = ge.fromRadians(a.longitude, a.latitude, a.height), h = ge.fromRadians(a.longitude, a.latitude, a.height + r), v = ge.subtract(h, d, new ge());
1579
+ t.modelMatrix = ei.fromTranslation(v);
1939
1580
  }
1940
1581
  }
1941
1582
  }
1942
1583
  );
1943
- }, zo = (e) => /* @__PURE__ */ l(Ri, { ...e }), Fe = (e) => {
1944
- const { meta: i, ...t } = e, n = he();
1945
- return jt(() => {
1584
+ }, yt = 180, vt = 1e-3, Et = -1, Ct = (e) => Math.abs(e) / e, wt = (e) => {
1585
+ Math.abs(e[0]) === yt && Math.abs(e[1]) === yt / 2 && (e[0] += Et * Ct(e[0]) * vt, e[1] += Et * Ct(e[1]) * vt);
1586
+ }, Mr = (e) => {
1587
+ switch (e.type) {
1588
+ case "LineString":
1589
+ e.coordinates.forEach((n) => {
1590
+ wt(n);
1591
+ });
1592
+ break;
1593
+ case "Polygon":
1594
+ e.coordinates.forEach((n) => {
1595
+ n.forEach((t) => {
1596
+ wt(t);
1597
+ });
1598
+ });
1599
+ break;
1600
+ }
1601
+ }, Yo = (e) => {
1602
+ var i;
1603
+ const { data: n, ...t } = e;
1604
+ return (i = n == null ? void 0 : n.features) == null || i.forEach((a) => {
1605
+ Mr(a.geometry);
1606
+ }), /* @__PURE__ */ l(Hn, { data: n, ...t });
1607
+ }, Ge = (e) => {
1608
+ const { meta: n, ...t } = e, i = pe();
1609
+ return Jt(() => {
1946
1610
  var a;
1947
- (a = n.layersManager) == null || a.addMetaToLayer(
1948
- i,
1949
- /* eslint-disable */
1950
- i.searchLayerPredicate ?? ((o, d) => {
1951
- var u, v;
1952
- return i !== void 0 ? ((u = o._imageryProvider._resource) == null ? void 0 : u._url) === ((v = i.options) == null ? void 0 : v.url) : !1;
1953
- })
1954
- );
1955
- }, [i, n]), /* @__PURE__ */ l(Bi, { ...t });
1956
- }, $o = (e) => {
1957
- const { options: i, ...t } = e, n = he(), a = n.shouldOptimizedTileRequests ? new Nt(i, n) : new Je(i);
1958
- return /* @__PURE__ */ l(Fe, { ...t, imageryProvider: a });
1959
- }, Uo = (e) => {
1960
- const { options: i, ...t } = e, n = he(), a = n.shouldOptimizedTileRequests ? new Ft(i, n) : new Qe(i);
1961
- return /* @__PURE__ */ l(Fe, { ...t, imageryProvider: a });
1962
- }, Wo = (e) => {
1963
- const { options: i, ...t } = e, n = he(), a = n.shouldOptimizedTileRequests ? new Bt(i, n) : new Ze(i);
1964
- return /* @__PURE__ */ l(Fe, { ...t, imageryProvider: a });
1965
- }, jo = (e) => {
1966
- const { options: i, ...t } = e;
1967
- return /* @__PURE__ */ l(
1968
- Fe,
1969
- {
1970
- ...t,
1971
- imageryProvider: new Yi(i)
1972
- }
1973
- );
1974
- }, br = (e) => /* @__PURE__ */ l(Ni, { ...e }), Ko = (e) => /* @__PURE__ */ l(_t, { ...e }), Tr = (e) => /* @__PURE__ */ l(_t, { ...e }), _r = (e) => /* @__PURE__ */ l(Fi, { ...e }), Sr = (e) => /* @__PURE__ */ l(Hi, { ...e }), Lr = (e) => /* @__PURE__ */ l(Gi, { ...e }), Pr = (e) => /* @__PURE__ */ l(Vi, { ...e });
1611
+ (a = i.layersManager) == null || a.addMetaToLayer(n, n.searchLayerPredicate);
1612
+ }, [n, i]), /* @__PURE__ */ l(Vn, { ...t });
1613
+ }, Xo = (e) => {
1614
+ const { options: n, ...t } = e, i = pe(), a = i.shouldOptimizedTileRequests ? new Ut(n, i) : new Qe(n);
1615
+ return /* @__PURE__ */ l(Ge, { ...t, imageryProvider: a });
1616
+ }, Zo = (e) => {
1617
+ const { options: n, ...t } = e, i = pe(), a = i.shouldOptimizedTileRequests ? new Wt(n, i) : new et(n);
1618
+ return /* @__PURE__ */ l(Ge, { ...t, imageryProvider: a });
1619
+ }, Jo = (e) => {
1620
+ const { options: n, ...t } = e, i = pe(), a = i.shouldOptimizedTileRequests ? new $t(n, i) : new Je(n);
1621
+ return /* @__PURE__ */ l(Ge, { ...t, imageryProvider: a });
1622
+ }, Qo = (e) => {
1623
+ const { options: n, ...t } = e;
1624
+ return /* @__PURE__ */ l(Ge, { ...t, imageryProvider: new ti(n) });
1625
+ }, Ar = (e) => /* @__PURE__ */ l(zn, { ...e }), es = (e) => /* @__PURE__ */ l(It, { ...e }), xr = (e) => /* @__PURE__ */ l(It, { ...e }), kr = (e) => /* @__PURE__ */ l($n, { ...e }), Ir = (e) => /* @__PURE__ */ l(Un, { ...e }), Or = (e) => /* @__PURE__ */ l(Wn, { ...e }), Dr = (e) => /* @__PURE__ */ l(jn, { ...e });
1975
1626
  var fe = function() {
1976
- var e = p.Ellipsoid.WGS84, i, t = p.Material.fromType(p.Material.ColorType);
1977
- function n(r, s = new p.Color(1, 1, 0, 0.5), f = new p.Color(1, 1, 1, 1)) {
1978
- this._scene = r.scene, t.uniforms.color = s, i = f, this._tooltip = {
1627
+ var e = p.Ellipsoid.WGS84, n, t = p.Material.fromType(p.Material.ColorType);
1628
+ function i(o, s = new p.Color(1, 1, 0, 0.5), f = new p.Color(1, 1, 1, 1)) {
1629
+ this._scene = o.scene, t.uniforms.color = s, n = f, this._tooltip = {
1979
1630
  setVisible: () => {
1980
1631
  },
1981
1632
  showAt: () => {
1982
1633
  }
1983
1634
  }, this._surfaces = [], this.initialiseHandlers(), this.enhancePrimitives();
1984
1635
  }
1985
- n.prototype.initialiseHandlers = function() {
1986
- var r = this._scene, s = this, f = new p.ScreenSpaceEventHandler(r.canvas);
1987
- function c(h, y) {
1636
+ i.prototype.initialiseHandlers = function() {
1637
+ var o = this._scene, s = this, f = new p.ScreenSpaceEventHandler(o.canvas);
1638
+ function c(u, y) {
1988
1639
  if (s._handlersMuted != !0) {
1989
- var m = r.pick(y);
1990
- m && m.primitive && m.primitive[h] && m.primitive[h](y);
1640
+ var m = o.pick(y);
1641
+ m && m.primitive && m.primitive[u] && m.primitive[u](y);
1991
1642
  }
1992
1643
  }
1993
- f.setInputAction(function(h) {
1994
- c("leftClick", h.position);
1995
- }, p.ScreenSpaceEventType.LEFT_CLICK), f.setInputAction(function(h) {
1996
- c("leftDoubleClick", h.position);
1644
+ f.setInputAction(function(u) {
1645
+ c("leftClick", u.position);
1646
+ }, p.ScreenSpaceEventType.LEFT_CLICK), f.setInputAction(function(u) {
1647
+ c("leftDoubleClick", u.position);
1997
1648
  }, p.ScreenSpaceEventType.LEFT_DOUBLE_CLICK);
1998
1649
  var g;
1999
- f.setInputAction(function(h) {
1650
+ f.setInputAction(function(u) {
2000
1651
  if (s._handlersMuted != !0) {
2001
- var y = r.pick(h.endPosition);
2002
- g && (!y || g != y.primitive) && (!(g.isDestroyed && g.isDestroyed()) && g.mouseOut(h.endPosition), g = null), y && y.primitive && (y = y.primitive, y.mouseOut && (g = y), y.mouseMove && y.mouseMove(h.endPosition));
1652
+ var y = o.pick(u.endPosition);
1653
+ g && (!y || g != y.primitive) && (!(g.isDestroyed && g.isDestroyed()) && g.mouseOut(u.endPosition), g = null), y && y.primitive && (y = y.primitive, y.mouseOut && (g = y), y.mouseMove && y.mouseMove(u.endPosition));
2003
1654
  }
2004
- }, p.ScreenSpaceEventType.MOUSE_MOVE), f.setInputAction(function(h) {
2005
- c("leftUp", h.position);
2006
- }, p.ScreenSpaceEventType.LEFT_UP), f.setInputAction(function(h) {
2007
- c("leftDown", h.position);
1655
+ }, p.ScreenSpaceEventType.MOUSE_MOVE), f.setInputAction(function(u) {
1656
+ c("leftUp", u.position);
1657
+ }, p.ScreenSpaceEventType.LEFT_UP), f.setInputAction(function(u) {
1658
+ c("leftDown", u.position);
2008
1659
  }, p.ScreenSpaceEventType.LEFT_DOWN);
2009
- }, n.prototype.setListener = function(r, s, f) {
2010
- r[s] = f;
2011
- }, n.prototype.muteHandlers = function(r) {
2012
- this._handlersMuted = r;
2013
- }, n.prototype.registerEditableShape = function(r) {
1660
+ }, i.prototype.setListener = function(o, s, f) {
1661
+ o[s] = f;
1662
+ }, i.prototype.muteHandlers = function(o) {
1663
+ this._handlersMuted = o;
1664
+ }, i.prototype.registerEditableShape = function(o) {
2014
1665
  var s = this;
2015
- $(r, "mouseMove", function(f) {
2016
- r.setHighlighted(!0), r._editMode || s._tooltip.showAt(f, "Click to edit this shape");
2017
- }), $(r, "mouseOut", function(f) {
2018
- r.setHighlighted(!1), s._tooltip.setVisible(!1);
2019
- }), $(r, "leftClick", function(f) {
2020
- r.setEditMode(!0);
1666
+ $(o, "mouseMove", function(f) {
1667
+ o.setHighlighted(!0), o._editMode || s._tooltip.showAt(f, "Click to edit this shape");
1668
+ }), $(o, "mouseOut", function(f) {
1669
+ o.setHighlighted(!1), s._tooltip.setVisible(!1);
1670
+ }), $(o, "leftClick", function(f) {
1671
+ o.setEditMode(!0);
2021
1672
  });
2022
- }, n.prototype.startDrawing = function(r) {
2023
- this.disableAllEditMode(), this.editCleanUp && this.editCleanUp(), this.editCleanUp = r, this.muteHandlers(!0);
2024
- }, n.prototype.stopDrawing = function() {
1673
+ }, i.prototype.startDrawing = function(o) {
1674
+ this.disableAllEditMode(), this.editCleanUp && this.editCleanUp(), this.editCleanUp = o, this.muteHandlers(!0);
1675
+ }, i.prototype.stopDrawing = function() {
2025
1676
  this.editCleanUp && (this.editCleanUp(), this.editCleanUp = null), this.muteHandlers(!1);
2026
- }, n.prototype.disableAllHighlights = function() {
1677
+ }, i.prototype.disableAllHighlights = function() {
2027
1678
  this.setHighlighted(void 0);
2028
- }, n.prototype.setHighlighted = function(r) {
2029
- this._highlightedSurface && !this._highlightedSurface.isDestroyed() && this._highlightedSurface != r && this._highlightedSurface.setHighlighted(!1), this._highlightedSurface = r;
2030
- }, n.prototype.disableAllEditMode = function() {
1679
+ }, i.prototype.setHighlighted = function(o) {
1680
+ this._highlightedSurface && !this._highlightedSurface.isDestroyed() && this._highlightedSurface != o && this._highlightedSurface.setHighlighted(!1), this._highlightedSurface = o;
1681
+ }, i.prototype.disableAllEditMode = function() {
2031
1682
  this.setEdited(void 0);
2032
- }, n.prototype.setEdited = function(r) {
2033
- this._editedSurface && !this._editedSurface.isDestroyed() && this._editedSurface.setEditMode(!1), this._editedSurface = r;
1683
+ }, i.prototype.setEdited = function(o) {
1684
+ this._editedSurface && !this._editedSurface.isDestroyed() && this._editedSurface.setEditMode(!1), this._editedSurface = o;
2034
1685
  };
2035
1686
  var a = {
2036
1687
  ellipsoid: p.Ellipsoid.WGS84,
@@ -2039,15 +1690,15 @@ var fe = function() {
2039
1690
  asynchronous: !0,
2040
1691
  show: !0,
2041
1692
  debugShowBoundingVolume: !1
2042
- }, o = O(a, {
1693
+ }, r = D(a, {
2043
1694
  appearance: new p.EllipsoidSurfaceAppearance({
2044
1695
  aboveGround: !1
2045
1696
  }),
2046
1697
  material: t,
2047
1698
  granularity: Math.PI / 180
2048
- }), d = O(a, {}), u = O(a, {}), v = O(a, {}), C = O(o, {
1699
+ }), d = D(a, {}), h = D(a, {}), v = D(a, {}), C = D(r, {
2049
1700
  rotation: 0
2050
- }), S = O(a, {
1701
+ }), S = D(a, {
2051
1702
  width: 5,
2052
1703
  geodesic: !0,
2053
1704
  granularity: 1e4,
@@ -2055,16 +1706,16 @@ var fe = function() {
2055
1706
  aboveGround: !1
2056
1707
  }),
2057
1708
  material: t
2058
- }), A = function() {
2059
- function r() {
1709
+ }), x = function() {
1710
+ function o() {
2060
1711
  }
2061
- return r.prototype.initialiseOptions = function(s) {
2062
- j(this, s), 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;
2063
- }, r.prototype.setAttribute = function(s, f) {
1712
+ return o.prototype.initialiseOptions = function(s) {
1713
+ W(this, s), 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;
1714
+ }, o.prototype.setAttribute = function(s, f) {
2064
1715
  this[s] = f, this._createPrimitive = !0;
2065
- }, r.prototype.getAttribute = function(s) {
1716
+ }, o.prototype.getAttribute = function(s) {
2066
1717
  return this[s];
2067
- }, r.prototype.update = function(s, f, c) {
1718
+ }, o.prototype.update = function(s, f, c) {
2068
1719
  if (!p.defined(this.ellipsoid))
2069
1720
  throw new p.DeveloperError("this.ellipsoid must be defined.");
2070
1721
  if (!p.defined(this.appearance))
@@ -2104,28 +1755,28 @@ var fe = function() {
2104
1755
  })
2105
1756
  }));
2106
1757
  }
2107
- var h = this._primitive;
2108
- h.appearance.material = this.material, h.debugShowBoundingVolume = this.debugShowBoundingVolume, h.update(s, f, c), this._outlinePolygon && this._outlinePolygon.update(s, f, c);
1758
+ var u = this._primitive;
1759
+ u.appearance.material = this.material, u.debugShowBoundingVolume = this.debugShowBoundingVolume, u.update(s, f, c), this._outlinePolygon && this._outlinePolygon.update(s, f, c);
2109
1760
  }
2110
- }, r.prototype.isDestroyed = function() {
1761
+ }, o.prototype.isDestroyed = function() {
2111
1762
  return !1;
2112
- }, r.prototype.destroy = function() {
1763
+ }, o.prototype.destroy = function() {
2113
1764
  return this._primitive = this._primitive && this._primitive.destroy(), p.destroyObject(this);
2114
- }, r.prototype.setStrokeStyle = function(s, f) {
1765
+ }, o.prototype.setStrokeStyle = function(s, f) {
2115
1766
  (!this.strokeColor || !this.strokeColor.equals(s) || this.strokeWidth != f) && (this._createPrimitive = !0, this.strokeColor = s, this.strokeWidth = f);
2116
- }, r;
1767
+ }, o;
2117
1768
  }();
2118
- n.ExtentPrimitive = function() {
2119
- function r(s) {
1769
+ i.ExtentPrimitive = function() {
1770
+ function o(s) {
2120
1771
  if (!p.defined(s.extent))
2121
1772
  throw new p.DeveloperError("Extent is required");
2122
- s = O(s, o), this.initialiseOptions(s), this.setExtent(s.extent);
1773
+ s = D(s, r), this.initialiseOptions(s), this.setExtent(s.extent);
2123
1774
  }
2124
- return r.prototype = new A(), r.prototype.setExtent = function(s) {
1775
+ return o.prototype = new x(), o.prototype.setExtent = function(s) {
2125
1776
  this.setAttribute("extent", s);
2126
- }, r.prototype.getExtent = function() {
1777
+ }, o.prototype.getExtent = function() {
2127
1778
  return this.getAttribute("extent");
2128
- }, r.prototype.getGeometry = function() {
1779
+ }, o.prototype.getGeometry = function() {
2129
1780
  if (p.defined(this.extent))
2130
1781
  return new p.RectangleGeometry({
2131
1782
  rectangle: this.extent,
@@ -2135,20 +1786,20 @@ var fe = function() {
2135
1786
  ellipsoid: this.ellipsoid,
2136
1787
  granularity: this.granularity
2137
1788
  });
2138
- }, r.prototype.getOutlineGeometry = function() {
1789
+ }, o.prototype.getOutlineGeometry = function() {
2139
1790
  return new p.RectangleOutlineGeometry({
2140
1791
  rectangle: this.extent
2141
1792
  });
2142
- }, r;
2143
- }(), n.PolygonPrimitive = function() {
2144
- function r(s) {
2145
- s = O(s, o), this.initialiseOptions(s), this.isPolygon = !0;
1793
+ }, o;
1794
+ }(), i.PolygonPrimitive = function() {
1795
+ function o(s) {
1796
+ s = D(s, r), this.initialiseOptions(s), this.isPolygon = !0;
2146
1797
  }
2147
- return r.prototype = new A(), r.prototype.setPositions = function(s) {
1798
+ return o.prototype = new x(), o.prototype.setPositions = function(s) {
2148
1799
  this.setAttribute("positions", s);
2149
- }, r.prototype.getPositions = function() {
1800
+ }, o.prototype.getPositions = function() {
2150
1801
  return this.getAttribute("positions");
2151
- }, r.prototype.getGeometry = function() {
1802
+ }, o.prototype.getGeometry = function() {
2152
1803
  if (!(!p.defined(this.positions) || this.positions.length < 3))
2153
1804
  return p.PolygonGeometry.fromPositions({
2154
1805
  positions: this.positions,
@@ -2158,26 +1809,26 @@ var fe = function() {
2158
1809
  ellipsoid: this.ellipsoid,
2159
1810
  granularity: this.granularity
2160
1811
  });
2161
- }, r.prototype.getOutlineGeometry = function() {
1812
+ }, o.prototype.getOutlineGeometry = function() {
2162
1813
  return p.PolygonOutlineGeometry.fromPositions({
2163
1814
  positions: this.getPositions()
2164
1815
  });
2165
- }, r;
2166
- }(), n.CirclePrimitive = function() {
2167
- function r(s) {
1816
+ }, o;
1817
+ }(), i.CirclePrimitive = function() {
1818
+ function o(s) {
2168
1819
  if (!(p.defined(s.center) && p.defined(s.radius)))
2169
1820
  throw new p.DeveloperError("Center and radius are required");
2170
- s = O(s, o), this.initialiseOptions(s), this.setRadius(s.radius);
1821
+ s = D(s, r), this.initialiseOptions(s), this.setRadius(s.radius);
2171
1822
  }
2172
- return r.prototype = new A(), r.prototype.setCenter = function(s) {
1823
+ return o.prototype = new x(), o.prototype.setCenter = function(s) {
2173
1824
  this.setAttribute("center", s);
2174
- }, r.prototype.setRadius = function(s) {
1825
+ }, o.prototype.setRadius = function(s) {
2175
1826
  this.setAttribute("radius", Math.max(0.1, s));
2176
- }, r.prototype.getCenter = function() {
1827
+ }, o.prototype.getCenter = function() {
2177
1828
  return this.getAttribute("center");
2178
- }, r.prototype.getRadius = function() {
1829
+ }, o.prototype.getRadius = function() {
2179
1830
  return this.getAttribute("radius");
2180
- }, r.prototype.getGeometry = function() {
1831
+ }, o.prototype.getGeometry = function() {
2181
1832
  if (p.defined(this.center) && p.defined(this.radius))
2182
1833
  return new p.CircleGeometry({
2183
1834
  center: this.center,
@@ -2188,35 +1839,35 @@ var fe = function() {
2188
1839
  ellipsoid: this.ellipsoid,
2189
1840
  granularity: this.granularity
2190
1841
  });
2191
- }, r.prototype.getOutlineGeometry = function() {
1842
+ }, o.prototype.getOutlineGeometry = function() {
2192
1843
  return new p.CircleOutlineGeometry({
2193
1844
  center: this.getCenter(),
2194
1845
  radius: this.getRadius()
2195
1846
  });
2196
- }, r;
2197
- }(), n.EllipsePrimitive = function() {
2198
- function r(s) {
1847
+ }, o;
1848
+ }(), i.EllipsePrimitive = function() {
1849
+ function o(s) {
2199
1850
  if (!(p.defined(s.center) && p.defined(s.semiMajorAxis) && p.defined(s.semiMinorAxis)))
2200
1851
  throw new p.DeveloperError("Center and semi major and semi minor axis are required");
2201
- s = O(s, C), this.initialiseOptions(s);
1852
+ s = D(s, C), this.initialiseOptions(s);
2202
1853
  }
2203
- return r.prototype = new A(), r.prototype.setCenter = function(s) {
1854
+ return o.prototype = new x(), o.prototype.setCenter = function(s) {
2204
1855
  this.setAttribute("center", s);
2205
- }, r.prototype.setSemiMajorAxis = function(s) {
1856
+ }, o.prototype.setSemiMajorAxis = function(s) {
2206
1857
  s < this.getSemiMinorAxis() || this.setAttribute("semiMajorAxis", s);
2207
- }, r.prototype.setSemiMinorAxis = function(s) {
1858
+ }, o.prototype.setSemiMinorAxis = function(s) {
2208
1859
  s > this.getSemiMajorAxis() || this.setAttribute("semiMinorAxis", s);
2209
- }, r.prototype.setRotation = function(s) {
1860
+ }, o.prototype.setRotation = function(s) {
2210
1861
  return this.setAttribute("rotation", s);
2211
- }, r.prototype.getCenter = function() {
1862
+ }, o.prototype.getCenter = function() {
2212
1863
  return this.getAttribute("center");
2213
- }, r.prototype.getSemiMajorAxis = function() {
1864
+ }, o.prototype.getSemiMajorAxis = function() {
2214
1865
  return this.getAttribute("semiMajorAxis");
2215
- }, r.prototype.getSemiMinorAxis = function() {
1866
+ }, o.prototype.getSemiMinorAxis = function() {
2216
1867
  return this.getAttribute("semiMinorAxis");
2217
- }, r.prototype.getRotation = function() {
1868
+ }, o.prototype.getRotation = function() {
2218
1869
  return this.getAttribute("rotation");
2219
- }, r.prototype.getGeometry = function() {
1870
+ }, o.prototype.getGeometry = function() {
2220
1871
  if (p.defined(this.center) && p.defined(this.semiMajorAxis) && p.defined(this.semiMinorAxis))
2221
1872
  return new p.EllipseGeometry({
2222
1873
  ellipsoid: this.ellipsoid,
@@ -2229,31 +1880,31 @@ var fe = function() {
2229
1880
  stRotation: this.textureRotationAngle,
2230
1881
  granularity: this.granularity
2231
1882
  });
2232
- }, r.prototype.getOutlineGeometry = function() {
1883
+ }, o.prototype.getOutlineGeometry = function() {
2233
1884
  return new p.EllipseOutlineGeometry({
2234
1885
  center: this.getCenter(),
2235
1886
  semiMajorAxis: this.getSemiMajorAxis(),
2236
1887
  semiMinorAxis: this.getSemiMinorAxis(),
2237
1888
  rotation: this.getRotation()
2238
1889
  });
2239
- }, r;
2240
- }(), n.PolylinePrimitive = function() {
2241
- function r(s) {
2242
- s = O(s, S), this.initialiseOptions(s);
1890
+ }, o;
1891
+ }(), i.PolylinePrimitive = function() {
1892
+ function o(s) {
1893
+ s = D(s, S), this.initialiseOptions(s);
2243
1894
  }
2244
- return r.prototype = new A(), r.prototype.setPositions = function(s) {
1895
+ return o.prototype = new x(), o.prototype.setPositions = function(s) {
2245
1896
  this.setAttribute("positions", s);
2246
- }, r.prototype.setWidth = function(s) {
1897
+ }, o.prototype.setWidth = function(s) {
2247
1898
  this.setAttribute("width", s);
2248
- }, r.prototype.setGeodesic = function(s) {
1899
+ }, o.prototype.setGeodesic = function(s) {
2249
1900
  this.setAttribute("geodesic", s);
2250
- }, r.prototype.getPositions = function() {
1901
+ }, o.prototype.getPositions = function() {
2251
1902
  return this.getAttribute("positions");
2252
- }, r.prototype.getWidth = function() {
1903
+ }, o.prototype.getWidth = function() {
2253
1904
  return this.getAttribute("width");
2254
- }, r.prototype.getGeodesic = function(s) {
1905
+ }, o.prototype.getGeodesic = function(s) {
2255
1906
  return this.getAttribute("geodesic");
2256
- }, r.prototype.getGeometry = function() {
1907
+ }, o.prototype.getGeometry = function() {
2257
1908
  if (!(!p.defined(this.positions) || this.positions.length < 2))
2258
1909
  return new p.PolylineGeometry({
2259
1910
  positions: this.positions,
@@ -2262,42 +1913,42 @@ var fe = function() {
2262
1913
  vertexFormat: p.EllipsoidSurfaceAppearance.VERTEX_FORMAT,
2263
1914
  ellipsoid: this.ellipsoid
2264
1915
  });
2265
- }, r;
1916
+ }, o;
2266
1917
  }();
2267
1918
  var L = {
2268
1919
  iconUrl: "./assets/img/dragIcon.png",
2269
1920
  shiftX: 0,
2270
1921
  shiftY: 0
2271
- }, R = {
1922
+ }, B = {
2272
1923
  iconUrl: "./assets/img/dragIcon.png",
2273
1924
  shiftX: 0,
2274
1925
  shiftY: 0
2275
- }, z = {
1926
+ }, U = {
2276
1927
  iconUrl: "./assets/img/dragIconLight.png",
2277
1928
  shiftX: 0,
2278
1929
  shiftY: 0
2279
1930
  };
2280
- n.prototype.createBillboardGroup = function(r, s, f) {
2281
- var c = new n.BillboardGroup(this, s);
2282
- return c.addBillboards(r, f), c;
2283
- }, n.BillboardGroup = function(r, s) {
2284
- this._drawHelper = r, this._scene = r._scene, this._options = O(s, L);
1931
+ i.prototype.createBillboardGroup = function(o, s, f) {
1932
+ var c = new i.BillboardGroup(this, s);
1933
+ return c.addBillboards(o, f), c;
1934
+ }, i.BillboardGroup = function(o, s) {
1935
+ this._drawHelper = o, this._scene = o._scene, this._options = D(s, L);
2285
1936
  var f = new p.BillboardCollection();
2286
1937
  this._scene.primitives.add(f), this._billboards = f, this._orderedBillboards = [];
2287
- }, n.BillboardGroup.prototype.createBillboard = function(r, s) {
1938
+ }, i.BillboardGroup.prototype.createBillboard = function(o, s) {
2288
1939
  var f = this._billboards.add({
2289
1940
  show: !0,
2290
- position: r,
1941
+ position: o,
2291
1942
  pixelOffset: new p.Cartesian2(this._options.shiftX, this._options.shiftY),
2292
1943
  eyeOffset: new p.Cartesian3(0, 0, 0),
2293
1944
  horizontalOrigin: p.HorizontalOrigin.CENTER,
2294
1945
  verticalOrigin: p.VerticalOrigin.CENTER,
2295
1946
  scale: 1,
2296
1947
  image: this._options.iconUrl,
2297
- color: i
1948
+ color: n
2298
1949
  });
2299
1950
  if (s) {
2300
- let h = function(m) {
1951
+ let u = function(m) {
2301
1952
  g.enableRotate = m;
2302
1953
  }, y = function() {
2303
1954
  for (var m = 0, E = c._orderedBillboards.length; m < E && c._orderedBillboards[m] != f; ++m)
@@ -2315,7 +1966,7 @@ var fe = function() {
2315
1966
  s.dragHandlers.onDrag && s.dragHandlers.onDrag(y(), _);
2316
1967
  }
2317
1968
  function b(_) {
2318
- w.destroy(), h(!0), s.dragHandlers.onDragEnd && s.dragHandlers.onDragEnd(y(), _);
1969
+ w.destroy(), u(!0), s.dragHandlers.onDragEnd && s.dragHandlers.onDragEnd(y(), _);
2319
1970
  }
2320
1971
  var w = new p.ScreenSpaceEventHandler(c._scene.canvas);
2321
1972
  w.setInputAction(function(_) {
@@ -2323,7 +1974,7 @@ var fe = function() {
2323
1974
  P ? T(P) : b(P);
2324
1975
  }, p.ScreenSpaceEventType.MOUSE_MOVE), w.setInputAction(function(_) {
2325
1976
  b(c._scene.camera.pickEllipsoid(_.position, e));
2326
- }, p.ScreenSpaceEventType.LEFT_UP), h(!1), s.dragHandlers.onDragStart && s.dragHandlers.onDragStart(y(), c._scene.camera.pickEllipsoid(E, e));
1977
+ }, p.ScreenSpaceEventType.LEFT_UP), u(!1), s.dragHandlers.onDragStart && s.dragHandlers.onDragStart(y(), c._scene.camera.pickEllipsoid(E, e));
2327
1978
  });
2328
1979
  }
2329
1980
  s.onDoubleClick && $(f, "leftDoubleClick", function(m) {
@@ -2337,38 +1988,38 @@ var fe = function() {
2337
1988
  }));
2338
1989
  }
2339
1990
  return f;
2340
- }, n.BillboardGroup.prototype.insertBillboard = function(r, s, f) {
2341
- this._orderedBillboards.splice(r, 0, this.createBillboard(s, f));
2342
- }, n.BillboardGroup.prototype.addBillboard = function(r, s) {
2343
- this._orderedBillboards.push(this.createBillboard(r, s));
2344
- }, n.BillboardGroup.prototype.addBillboards = function(r, s) {
2345
- for (var f = 0; f < r.length; f++)
2346
- this.addBillboard(r[f], s);
2347
- }, n.BillboardGroup.prototype.updateBillboardsPositions = function(r) {
2348
- for (var s = 0; s < r.length; s++)
2349
- this.getBillboard(s).position = r[s];
2350
- }, n.BillboardGroup.prototype.countBillboards = function() {
1991
+ }, i.BillboardGroup.prototype.insertBillboard = function(o, s, f) {
1992
+ this._orderedBillboards.splice(o, 0, this.createBillboard(s, f));
1993
+ }, i.BillboardGroup.prototype.addBillboard = function(o, s) {
1994
+ this._orderedBillboards.push(this.createBillboard(o, s));
1995
+ }, i.BillboardGroup.prototype.addBillboards = function(o, s) {
1996
+ for (var f = 0; f < o.length; f++)
1997
+ this.addBillboard(o[f], s);
1998
+ }, i.BillboardGroup.prototype.updateBillboardsPositions = function(o) {
1999
+ for (var s = 0; s < o.length; s++)
2000
+ this.getBillboard(s).position = o[s];
2001
+ }, i.BillboardGroup.prototype.countBillboards = function() {
2351
2002
  return this._orderedBillboards.length;
2352
- }, n.BillboardGroup.prototype.getBillboard = function(r) {
2353
- return this._orderedBillboards[r];
2354
- }, n.BillboardGroup.prototype.removeBillboard = function(r) {
2355
- this._billboards.remove(this.getBillboard(r)), this._orderedBillboards.splice(r, 1);
2356
- }, n.BillboardGroup.prototype.remove = function() {
2003
+ }, i.BillboardGroup.prototype.getBillboard = function(o) {
2004
+ return this._orderedBillboards[o];
2005
+ }, i.BillboardGroup.prototype.removeBillboard = function(o) {
2006
+ this._billboards.remove(this.getBillboard(o)), this._orderedBillboards.splice(o, 1);
2007
+ }, i.BillboardGroup.prototype.remove = function() {
2357
2008
  this._billboards = this._billboards && this._billboards.removeAll() && this._billboards.destroy();
2358
- }, n.BillboardGroup.prototype.setOnTop = function() {
2009
+ }, i.BillboardGroup.prototype.setOnTop = function() {
2359
2010
  this._scene.primitives.raiseToTop(this._billboards);
2360
- }, n.prototype.startDrawingMarker = function(s) {
2361
- var s = O(s, L);
2011
+ }, i.prototype.startDrawingMarker = function(s) {
2012
+ var s = D(s, L);
2362
2013
  this.startDrawing(function() {
2363
- h.remove(), y.destroy(), g.setVisible(!1);
2014
+ u.remove(), y.destroy(), g.setVisible(!1);
2364
2015
  });
2365
2016
  var f = this, c = this._scene;
2366
2017
  c.primitives;
2367
- var g = this._tooltip, h = new n.BillboardGroup(this, s), y = new p.ScreenSpaceEventHandler(c.canvas);
2018
+ var g = this._tooltip, u = new i.BillboardGroup(this, s), y = new p.ScreenSpaceEventHandler(c.canvas);
2368
2019
  y.setInputAction(function(m) {
2369
2020
  if (m.position != null) {
2370
2021
  var E = c.camera.pickEllipsoid(m.position, e);
2371
- E && (h.addBillboard(E), f.stopDrawing(), s.callback(E));
2022
+ E && (u.addBillboard(E), f.stopDrawing(), s.callback(E));
2372
2023
  }
2373
2024
  }, p.ScreenSpaceEventType.LEFT_CLICK), y.setInputAction(function(m) {
2374
2025
  var E = m.endPosition;
@@ -2376,24 +2027,24 @@ var fe = function() {
2376
2027
  var T = c.camera.pickEllipsoid(E, e);
2377
2028
  T ? g.showAt(
2378
2029
  E,
2379
- "<p>Click to add your marker. Position is: </p>" + U(e.cartesianToCartographic(T))
2030
+ "<p>Click to add your marker. Position is: </p>" + z(e.cartesianToCartographic(T))
2380
2031
  ) : g.showAt(E, "<p>Click on the globe to add your marker.</p>");
2381
2032
  }
2382
2033
  }, p.ScreenSpaceEventType.MOUSE_MOVE);
2383
- }, n.prototype.startDrawingPolygon = function(s) {
2384
- var s = O(s, o);
2034
+ }, i.prototype.startDrawingPolygon = function(s) {
2035
+ var s = D(s, r);
2385
2036
  this.startDrawingPolyshape(!0, s);
2386
- }, n.prototype.startDrawingPolyline = function(s) {
2387
- var s = O(s, S);
2037
+ }, i.prototype.startDrawingPolyline = function(s) {
2038
+ var s = D(s, S);
2388
2039
  this.startDrawingPolyshape(!1, s);
2389
- }, n.prototype.startDrawingPolyshape = function(r, s) {
2040
+ }, i.prototype.startDrawingPolyshape = function(o, s) {
2390
2041
  this.startDrawing(function() {
2391
- g.remove(m), T.remove(), b.destroy(), h.setVisible(!1), F(c);
2042
+ g.remove(m), T.remove(), b.destroy(), u.setVisible(!1), G(c);
2392
2043
  });
2393
- var f = this, c = this._scene, g = c.primitives, h = this._tooltip, y = r ? 3 : 2, m;
2394
- r ? m = new fe.PolygonPrimitive(s) : m = new fe.PolylinePrimitive(s), m.asynchronous = !1, g.add(m);
2395
- var E = [], T = new n.BillboardGroup(this, L), b = new p.ScreenSpaceEventHandler(c.canvas);
2396
- Y(c), b.setInputAction(function(w) {
2044
+ var f = this, c = this._scene, g = c.primitives, u = this._tooltip, y = o ? 3 : 2, m;
2045
+ o ? m = new fe.PolygonPrimitive(s) : m = new fe.PolylinePrimitive(s), m.asynchronous = !1, g.add(m);
2046
+ var E = [], T = new i.BillboardGroup(this, L), b = new p.ScreenSpaceEventHandler(c.canvas);
2047
+ J(c), b.setInputAction(function(w) {
2397
2048
  if (w.position != null) {
2398
2049
  var _ = c.camera.pickEllipsoid(w.position, e);
2399
2050
  _ && (E.length == 0 && (E.push(_.clone()), T.addBillboard(E[0])), E.length >= y && (m.positions = E, m._createPrimitive = !0), E.push(_), T.addBillboard(_));
@@ -2402,10 +2053,10 @@ var fe = function() {
2402
2053
  var _ = w.endPosition;
2403
2054
  if (_ != null)
2404
2055
  if (E.length == 0)
2405
- h.showAt(_, "<p>Click to add first point</p>");
2056
+ u.showAt(_, "<p>Click to add first point</p>");
2406
2057
  else {
2407
2058
  var P = c.camera.pickEllipsoid(_, e);
2408
- P && (E.pop(), P.y += 1 + Math.random(), E.push(P), E.length >= y && (m.positions = E, m._createPrimitive = !0), T.getBillboard(E.length - 1).position = P, h.showAt(
2059
+ P && (E.pop(), P.y += 1 + Math.random(), E.push(P), E.length >= y && (m.positions = E, m._createPrimitive = !0), T.getBillboard(E.length - 1).position = P, u.showAt(
2409
2060
  _,
2410
2061
  "<p>Click to add new point (" + E.length + ")</p>" + (E.length > y ? "<p>Double click to finish drawing</p>" : "")
2411
2062
  ));
@@ -2416,38 +2067,38 @@ var fe = function() {
2416
2067
  if (E.length < y + 2)
2417
2068
  return;
2418
2069
  var P = c.camera.pickEllipsoid(_, e);
2419
- P && (F(c), f.stopDrawing(), typeof s.callback == "function" && (E.length - 1, s.callback(E)));
2070
+ P && (G(c), f.stopDrawing(), typeof s.callback == "function" && (E.length - 1, s.callback(E)));
2420
2071
  }
2421
2072
  }, p.ScreenSpaceEventType.LEFT_DOUBLE_CLICK);
2422
2073
  };
2423
- function K(r) {
2074
+ function K(o) {
2424
2075
  return e.cartographicArrayToCartesianArray([
2425
- p.Rectangle.northwest(r),
2426
- p.Rectangle.northeast(r),
2427
- p.Rectangle.southeast(r),
2428
- p.Rectangle.southwest(r)
2076
+ p.Rectangle.northwest(o),
2077
+ p.Rectangle.northeast(o),
2078
+ p.Rectangle.southeast(o),
2079
+ p.Rectangle.southwest(o)
2429
2080
  ]);
2430
2081
  }
2431
- function Y(r) {
2432
- r && (r.canvas.style.cursor = "crosshair");
2082
+ function J(o) {
2083
+ o && (o.canvas.style.cursor = "crosshair");
2433
2084
  }
2434
- function F(r) {
2435
- r && (r.canvas.style.cursor = "");
2085
+ function G(o) {
2086
+ o && (o.canvas.style.cursor = "");
2436
2087
  }
2437
- n.prototype.startDrawingExtent = function(s) {
2438
- var s = O(s, o);
2088
+ i.prototype.startDrawingExtent = function(s) {
2089
+ var s = D(s, r);
2439
2090
  this.startDrawing(function() {
2440
- m != null && g.remove(m), E != null && E.remove(), T.destroy(), h.setVisible(!1), F(c);
2091
+ m != null && g.remove(m), E != null && E.remove(), T.destroy(), u.setVisible(!1), G(c);
2441
2092
  });
2442
- var f = this, c = this._scene, g = this._scene.primitives, h = this._tooltip, y = null, m = null, E = null, T = new p.ScreenSpaceEventHandler(c.canvas);
2443
- Y(c);
2093
+ var f = this, c = this._scene, g = this._scene.primitives, u = this._tooltip, y = null, m = null, E = null, T = new p.ScreenSpaceEventHandler(c.canvas);
2094
+ J(c);
2444
2095
  function b(w) {
2445
2096
  m == null && (m = new fe.ExtentPrimitive({
2446
2097
  extent: w,
2447
2098
  material: s.material
2448
2099
  }), m.asynchronous = !1, g.add(m)), m.setExtent(w);
2449
2100
  var _ = K(w);
2450
- E == null ? (E = new n.BillboardGroup(f, L), E.addBillboards(_)) : E.updateBillboardsPositions(_);
2101
+ E == null ? (E = new i.BillboardGroup(f, L), E.addBillboards(_)) : E.updateBillboardsPositions(_);
2451
2102
  }
2452
2103
  T.setInputAction(function(w) {
2453
2104
  if (w.position != null) {
@@ -2455,141 +2106,141 @@ var fe = function() {
2455
2106
  if (_)
2456
2107
  if (m == null) {
2457
2108
  y = e.cartesianToCartographic(_);
2458
- var P = X(y, y);
2109
+ var P = Y(y, y);
2459
2110
  b(P);
2460
2111
  } else
2461
- f.stopDrawing(), typeof s.callback == "function" && s.callback(X(y, e.cartesianToCartographic(_)));
2112
+ f.stopDrawing(), typeof s.callback == "function" && s.callback(Y(y, e.cartesianToCartographic(_)));
2462
2113
  }
2463
2114
  }, p.ScreenSpaceEventType.LEFT_DOWN), T.setInputAction(function(w) {
2464
2115
  var _ = w.endPosition;
2465
2116
  if (_ != null)
2466
2117
  if (m == null)
2467
- h.showAt(_, "<p>Click to start drawing rectangle</p>");
2118
+ u.showAt(_, "<p>Click to start drawing rectangle</p>");
2468
2119
  else {
2469
2120
  var P = c.camera.pickEllipsoid(_, e);
2470
2121
  if (P) {
2471
- var H = X(y, e.cartesianToCartographic(P));
2472
- b(H), h.showAt(_, "<p>Drag to change rectangle extent</p><p>Click again to finish drawing</p>");
2122
+ var H = Y(y, e.cartesianToCartographic(P));
2123
+ b(H), u.showAt(_, "<p>Drag to change rectangle extent</p><p>Click again to finish drawing</p>");
2473
2124
  }
2474
2125
  }
2475
2126
  }, p.ScreenSpaceEventType.MOUSE_MOVE);
2476
- }, n.prototype.startDrawingCircle = function(s) {
2477
- var s = O(s, o);
2127
+ }, i.prototype.startDrawingCircle = function(s) {
2128
+ var s = D(s, r);
2478
2129
  this.startDrawing(function() {
2479
- y != null && g.remove(y), m.remove(), E.destroy(), h.setVisible(!1);
2130
+ y != null && g.remove(y), m.remove(), E.destroy(), u.setVisible(!1);
2480
2131
  });
2481
- var f = this, c = this._scene, g = this._scene.primitives, h = this._tooltip, y = null, m = null, E = new p.ScreenSpaceEventHandler(c.canvas);
2132
+ var f = this, c = this._scene, g = this._scene.primitives, u = this._tooltip, y = null, m = null, E = new p.ScreenSpaceEventHandler(c.canvas);
2482
2133
  E.setInputAction(function(T) {
2483
2134
  if (T.position != null) {
2484
2135
  var b = c.camera.pickEllipsoid(T.position, e);
2485
- b && (y == null ? (y = new n.CirclePrimitive({
2136
+ b && (y == null ? (y = new i.CirclePrimitive({
2486
2137
  center: b,
2487
2138
  radius: 0,
2488
2139
  asynchronous: !1,
2489
2140
  material: s.material
2490
- }), g.add(y), m = new n.BillboardGroup(f, L), m.addBillboards([b])) : (typeof s.callback == "function" && s.callback(y.getCenter(), y.getRadius()), f.stopDrawing()));
2141
+ }), g.add(y), m = new i.BillboardGroup(f, L), m.addBillboards([b])) : (typeof s.callback == "function" && s.callback(y.getCenter(), y.getRadius()), f.stopDrawing()));
2491
2142
  }
2492
2143
  }, p.ScreenSpaceEventType.LEFT_DOWN), E.setInputAction(function(T) {
2493
2144
  var b = T.endPosition;
2494
2145
  if (b != null)
2495
2146
  if (y == null)
2496
- h.showAt(b, "<p>Click to start drawing the circle</p>");
2147
+ u.showAt(b, "<p>Click to start drawing the circle</p>");
2497
2148
  else {
2498
2149
  var w = c.camera.pickEllipsoid(b, e);
2499
- w && (y.setRadius(p.Cartesian3.distance(y.getCenter(), w)), m.updateBillboardsPositions(w), h.showAt(b, "<p>Move mouse to change circle radius</p><p>Click again to finish drawing</p>"));
2150
+ w && (y.setRadius(p.Cartesian3.distance(y.getCenter(), w)), m.updateBillboardsPositions(w), u.showAt(b, "<p>Move mouse to change circle radius</p><p>Click again to finish drawing</p>"));
2500
2151
  }
2501
2152
  }, p.ScreenSpaceEventType.MOUSE_MOVE);
2502
- }, n.prototype.enhancePrimitives = function() {
2503
- var r = this;
2153
+ }, i.prototype.enhancePrimitives = function() {
2154
+ var o = this;
2504
2155
  p.Billboard.prototype.setEditable = function() {
2505
2156
  if (this._editable)
2506
2157
  return;
2507
2158
  this._editable = !0;
2508
2159
  var c = this, g = this;
2509
- function h(y) {
2510
- r._scene.screenSpaceCameraController.enableRotate = y;
2160
+ function u(y) {
2161
+ o._scene.screenSpaceCameraController.enableRotate = y;
2511
2162
  }
2512
2163
  $(c, "leftDown", function(y) {
2513
2164
  function m(b) {
2514
2165
  c.position = b, g.executeListeners({ name: "drag", positions: b });
2515
2166
  }
2516
2167
  function E(b) {
2517
- T.destroy(), h(!0), g.executeListeners({ name: "dragEnd", positions: b });
2168
+ T.destroy(), u(!0), g.executeListeners({ name: "dragEnd", positions: b });
2518
2169
  }
2519
- var T = new p.ScreenSpaceEventHandler(r._scene.canvas);
2170
+ var T = new p.ScreenSpaceEventHandler(o._scene.canvas);
2520
2171
  T.setInputAction(function(b) {
2521
- var w = r._scene.camera.pickEllipsoid(b.endPosition, e);
2172
+ var w = o._scene.camera.pickEllipsoid(b.endPosition, e);
2522
2173
  w ? m(w) : E(w);
2523
2174
  }, p.ScreenSpaceEventType.MOUSE_MOVE), T.setInputAction(function(b) {
2524
- E(r._scene.camera.pickEllipsoid(b.position, e));
2525
- }, p.ScreenSpaceEventType.LEFT_UP), h(!1);
2175
+ E(o._scene.camera.pickEllipsoid(b.position, e));
2176
+ }, p.ScreenSpaceEventType.LEFT_UP), u(!1);
2526
2177
  }), q(c);
2527
2178
  };
2528
2179
  function s(c) {
2529
- r._scene, !(this._highlighted && this._highlighted == c) && this._editMode !== !0 && (this._highlighted = c, c ? (r.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));
2180
+ o._scene, !(this._highlighted && this._highlighted == c) && this._editMode !== !0 && (this._highlighted = c, c ? (o.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));
2530
2181
  }
2531
2182
  function f(c) {
2532
2183
  if (this._editMode != c)
2533
- if (r.disableAllHighlights(), c) {
2534
- r.setEdited(this);
2535
- var g = r._scene, h = this;
2184
+ if (o.disableAllHighlights(), c) {
2185
+ o.setEdited(this);
2186
+ var g = o._scene, u = this;
2536
2187
  if (this._markers == null) {
2537
- let P = function(M, x) {
2538
- var B = M - 1 < 0 ? x.length - 1 : M - 1;
2539
- B < m.countBillboards() && (m.getBillboard(B).position = W(B)), B = M, B < m.countBillboards() && (m.getBillboard(B).position = W(B));
2188
+ let P = function(O, M) {
2189
+ var A = O - 1 < 0 ? M.length - 1 : O - 1;
2190
+ A < m.countBillboards() && (m.getBillboard(A).position = j(A)), A = O, A < m.countBillboards() && (m.getBillboard(A).position = j(A));
2540
2191
  }, H = function() {
2541
- h.executeListeners({
2192
+ u.executeListeners({
2542
2193
  name: "onEdited",
2543
- positions: h.positions
2194
+ positions: u.positions
2544
2195
  });
2545
- }, W = function(M) {
2546
- var x = h.positions;
2196
+ }, j = function(O) {
2197
+ var M = u.positions;
2547
2198
  return e.cartographicToCartesian(
2548
2199
  new p.EllipsoidGeodesic(
2549
- e.cartesianToCartographic(x[M]),
2550
- e.cartesianToCartographic(x[M < x.length - 1 ? M + 1 : 0])
2200
+ e.cartesianToCartographic(M[O]),
2201
+ e.cartesianToCartographic(M[O < M.length - 1 ? O + 1 : 0])
2551
2202
  ).interpolateUsingFraction(0.5)
2552
2203
  );
2553
2204
  };
2554
- var y = new n.BillboardGroup(r, R), m = new n.BillboardGroup(r, z), E = {
2205
+ var y = new i.BillboardGroup(o, B), m = new i.BillboardGroup(o, U), E = {
2555
2206
  dragHandlers: {
2556
- onDrag: function(M, x) {
2557
- h.positions[M] = x, P(M, h.positions), h._createPrimitive = !0;
2207
+ onDrag: function(O, M) {
2208
+ u.positions[O] = M, P(O, u.positions), u._createPrimitive = !0;
2558
2209
  },
2559
- onDragEnd: function(M, x) {
2560
- h._createPrimitive = !0, H();
2210
+ onDragEnd: function(O, M) {
2211
+ u._createPrimitive = !0, H();
2561
2212
  }
2562
2213
  },
2563
- onDoubleClick: function(M) {
2564
- h.positions.length < 4 || (h.positions.splice(M, 1), h._createPrimitive = !0, y.removeBillboard(M), m.removeBillboard(M), P(M, h.positions), H());
2214
+ onDoubleClick: function(O) {
2215
+ u.positions.length < 4 || (u.positions.splice(O, 1), u._createPrimitive = !0, y.removeBillboard(O), m.removeBillboard(O), P(O, u.positions), H());
2565
2216
  },
2566
2217
  tooltip: function() {
2567
- if (h.positions.length > 3)
2218
+ if (u.positions.length > 3)
2568
2219
  return "Double click to remove this point";
2569
2220
  }
2570
2221
  };
2571
- y.addBillboards(h.positions, E), this._markers = y;
2572
- for (var T = [], b = 0, w = h.positions.length + (this.isPolygon ? 0 : -1); b < w; b++)
2573
- T.push(W(b));
2222
+ y.addBillboards(u.positions, E), this._markers = y;
2223
+ for (var T = [], b = 0, w = u.positions.length + (this.isPolygon ? 0 : -1); b < w; b++)
2224
+ T.push(j(b));
2574
2225
  var _ = {
2575
2226
  dragHandlers: {
2576
- onDragStart: function(M, x) {
2577
- this.index = M + 1, h.positions.splice(this.index, 0, x), h._createPrimitive = !0;
2227
+ onDragStart: function(O, M) {
2228
+ this.index = O + 1, u.positions.splice(this.index, 0, M), u._createPrimitive = !0;
2578
2229
  },
2579
- onDrag: function(M, x) {
2580
- h.positions[this.index] = x, h._createPrimitive = !0;
2230
+ onDrag: function(O, M) {
2231
+ u.positions[this.index] = M, u._createPrimitive = !0;
2581
2232
  },
2582
- onDragEnd: function(M, x) {
2583
- y.insertBillboard(this.index, x, E), m.getBillboard(this.index - 1).position = W(this.index - 1), m.insertBillboard(this.index, W(this.index), _), h._createPrimitive = !0, H();
2233
+ onDragEnd: function(O, M) {
2234
+ y.insertBillboard(this.index, M, E), m.getBillboard(this.index - 1).position = j(this.index - 1), m.insertBillboard(this.index, j(this.index), _), u._createPrimitive = !0, H();
2584
2235
  }
2585
2236
  },
2586
2237
  tooltip: function() {
2587
2238
  return "Drag to create a new point";
2588
2239
  }
2589
2240
  };
2590
- m.addBillboards(T, _), this._editMarkers = m, this._globeClickhandler = new p.ScreenSpaceEventHandler(g.canvas), this._globeClickhandler.setInputAction(function(M) {
2591
- var x = g.pick(M.position);
2592
- x && x.primitive || h.setEditMode(!1);
2241
+ m.addBillboards(T, _), this._editMarkers = m, this._globeClickhandler = new p.ScreenSpaceEventHandler(g.canvas), this._globeClickhandler.setInputAction(function(O) {
2242
+ var M = g.pick(O.position);
2243
+ M && M.primitive || u.setEditMode(!1);
2593
2244
  }, p.ScreenSpaceEventType.LEFT_CLICK), y.setOnTop(), m.setOnTop();
2594
2245
  }
2595
2246
  this._editMode = !0;
@@ -2599,35 +2250,35 @@ var fe = function() {
2599
2250
  fe.PolylinePrimitive.prototype.setEditable = function() {
2600
2251
  if (!this.setEditMode) {
2601
2252
  var c = this;
2602
- c.isPolygon = !1, c.asynchronous = !1, r.registerEditableShape(c), c.setEditMode = f;
2253
+ c.isPolygon = !1, c.asynchronous = !1, o.registerEditableShape(c), c.setEditMode = f;
2603
2254
  var g = this.width;
2604
- c.setHighlighted = function(h) {
2605
- this._editMode !== !0 && (h ? (r.setHighlighted(this), this.setWidth(g * 2)) : this.setWidth(g));
2255
+ c.setHighlighted = function(u) {
2256
+ this._editMode !== !0 && (u ? (o.setHighlighted(this), this.setWidth(g * 2)) : this.setWidth(g));
2606
2257
  }, c.getExtent = function() {
2607
2258
  return p.Rectangle.fromCartographicArray(e.cartesianArrayToCartographicArray(this.positions));
2608
2259
  }, q(c), c.setEditMode(!1);
2609
2260
  }
2610
2261
  }, fe.PolygonPrimitive.prototype.setEditable = function() {
2611
2262
  var c = this;
2612
- c.asynchronous = !1, r._scene, r.registerEditableShape(c), c.setEditMode = f, c.setHighlighted = s, q(c), c.setEditMode(!1);
2263
+ c.asynchronous = !1, o._scene, o.registerEditableShape(c), c.setEditMode = f, c.setHighlighted = s, q(c), c.setEditMode(!1);
2613
2264
  }, fe.ExtentPrimitive.prototype.setEditable = function() {
2614
2265
  if (!this.setEditMode) {
2615
- var c = this, g = r._scene;
2616
- r.registerEditableShape(c), c.asynchronous = !1, c.setEditMode = function(h) {
2617
- if (this._editMode != h)
2618
- if (r.disableAllHighlights(), h) {
2619
- if (r.setEdited(this), this._markers == null) {
2266
+ var c = this, g = o._scene;
2267
+ o.registerEditableShape(c), c.asynchronous = !1, c.setEditMode = function(u) {
2268
+ if (this._editMode != u)
2269
+ if (o.disableAllHighlights(), u) {
2270
+ if (o.setEdited(this), this._markers == null) {
2620
2271
  let E = function() {
2621
2272
  c.executeListeners({
2622
2273
  name: "onEdited",
2623
2274
  extent: c.extent
2624
2275
  });
2625
2276
  };
2626
- var y = new n.BillboardGroup(r, R), m = {
2277
+ var y = new i.BillboardGroup(o, B), m = {
2627
2278
  dragHandlers: {
2628
2279
  onDrag: function(T, b) {
2629
2280
  var w = y.getBillboard((T + 2) % 4).position;
2630
- c.setExtent(X(e.cartesianToCartographic(w), e.cartesianToCartographic(b))), y.updateBillboardsPositions(K(c.extent));
2281
+ c.setExtent(Y(e.cartesianToCartographic(w), e.cartesianToCartographic(b))), y.updateBillboardsPositions(K(c.extent));
2631
2282
  },
2632
2283
  onDragEnd: function(T, b) {
2633
2284
  E();
@@ -2647,13 +2298,13 @@ var fe = function() {
2647
2298
  this._markers != null && (this._markers.remove(), this._markers = null, this._globeClickhandler.destroy()), this._editMode = !1;
2648
2299
  }, c.setHighlighted = s, q(c), c.setEditMode(!1);
2649
2300
  }
2650
- }, n.EllipsePrimitive.prototype.setEditable = function() {
2301
+ }, i.EllipsePrimitive.prototype.setEditable = function() {
2651
2302
  if (!this.setEditMode) {
2652
- var c = this, g = r._scene;
2653
- c.asynchronous = !1, r.registerEditableShape(c), c.setEditMode = function(h) {
2654
- if (this._editMode != h)
2655
- if (r.disableAllHighlights(), h) {
2656
- r.setEdited(this);
2303
+ var c = this, g = o._scene;
2304
+ c.asynchronous = !1, o.registerEditableShape(c), c.setEditMode = function(u) {
2305
+ if (this._editMode != u)
2306
+ if (o.disableAllHighlights(), u) {
2307
+ o.setEdited(this);
2657
2308
  var y = this;
2658
2309
  if (this._markers == null) {
2659
2310
  let T = function() {
@@ -2674,7 +2325,7 @@ var fe = function() {
2674
2325
  rotation: 0
2675
2326
  });
2676
2327
  };
2677
- var m = new n.BillboardGroup(r, R), E = {
2328
+ var m = new i.BillboardGroup(o, B), E = {
2678
2329
  dragHandlers: {
2679
2330
  onDrag: function(w, _) {
2680
2331
  var P = p.Cartesian3.distance(c.getCenter(), _);
@@ -2698,7 +2349,7 @@ var fe = function() {
2698
2349
  this._markers != null && (this._markers.remove(), this._markers = null, this._globeClickhandler.destroy()), this._editMode = !1;
2699
2350
  }, c.setHighlighted = s, q(c), c.setEditMode(!1);
2700
2351
  }
2701
- }, n.CirclePrimitive.prototype.getCircleCartesianCoordinates = function(c) {
2352
+ }, i.CirclePrimitive.prototype.getCircleCartesianCoordinates = function(c) {
2702
2353
  for (var g = p.CircleOutlineGeometry.createGeometry(
2703
2354
  new p.CircleOutlineGeometry({
2704
2355
  ellipsoid: e,
@@ -2706,16 +2357,16 @@ var fe = function() {
2706
2357
  radius: this.getRadius(),
2707
2358
  granularity: c
2708
2359
  })
2709
- ), h = 0, y, m = []; h < g.attributes.position.values.length; h += 3)
2710
- y = g.attributes.position.values, m.push(new p.Cartesian3(y[h], y[h + 1], y[h + 2]));
2360
+ ), u = 0, y, m = []; u < g.attributes.position.values.length; u += 3)
2361
+ y = g.attributes.position.values, m.push(new p.Cartesian3(y[u], y[u + 1], y[u + 2]));
2711
2362
  return m;
2712
- }, n.CirclePrimitive.prototype.setEditable = function() {
2363
+ }, i.CirclePrimitive.prototype.setEditable = function() {
2713
2364
  if (!this.setEditMode) {
2714
- var c = this, g = r._scene;
2715
- c.asynchronous = !1, r.registerEditableShape(c), c.setEditMode = function(h) {
2716
- if (this._editMode != h)
2717
- if (r.disableAllHighlights(), h) {
2718
- r.setEdited(this);
2365
+ var c = this, g = o._scene;
2366
+ c.asynchronous = !1, o.registerEditableShape(c), c.setEditMode = function(u) {
2367
+ if (this._editMode != u)
2368
+ if (o.disableAllHighlights(), u) {
2369
+ o.setEdited(this);
2719
2370
  var y = this;
2720
2371
  if (this._markers == null) {
2721
2372
  let T = function() {
@@ -2727,7 +2378,7 @@ var fe = function() {
2727
2378
  radius: c.getRadius()
2728
2379
  });
2729
2380
  };
2730
- var m = new n.BillboardGroup(r, R), E = {
2381
+ var m = new i.BillboardGroup(o, B), E = {
2731
2382
  dragHandlers: {
2732
2383
  onDrag: function(w, _) {
2733
2384
  c.setRadius(p.Cartesian3.distance(c.getCenter(), _)), m.updateBillboardsPositions(T());
@@ -2751,8 +2402,8 @@ var fe = function() {
2751
2402
  }, c.setHighlighted = s, q(c), c.setEditMode(!1);
2752
2403
  }
2753
2404
  };
2754
- }, n.DrawHelperWidget = function() {
2755
- function r(s, f) {
2405
+ }, i.DrawHelperWidget = function() {
2406
+ function o(s, f) {
2756
2407
  if (!p.defined(f.container))
2757
2408
  throw new p.DeveloperError("Container is required");
2758
2409
  var c = {
@@ -2764,19 +2415,19 @@ var fe = function() {
2764
2415
  clearIcon: "./assets/img/glyphicons_067_cleaning.png",
2765
2416
  polylineDrawingOptions: S,
2766
2417
  polygonDrawingOptions: d,
2767
- extentDrawingOptions: u,
2418
+ extentDrawingOptions: h,
2768
2419
  circleDrawingOptions: v
2769
2420
  };
2770
- j(f, c);
2771
- var g = this, h = document.createElement("DIV");
2772
- h.className = "toolbar", f.container.appendChild(h);
2421
+ W(f, c);
2422
+ var g = this, u = document.createElement("DIV");
2423
+ u.className = "toolbar", f.container.appendChild(u);
2773
2424
  function y(T, b, w, _) {
2774
2425
  var P = document.createElement("DIV");
2775
- P.className = "button", P.title = w, h.appendChild(P), P.onclick = _;
2426
+ P.className = "button", P.title = w, u.appendChild(P), P.onclick = _;
2776
2427
  var H = document.createElement("SPAN");
2777
2428
  P.appendChild(H);
2778
- var W = document.createElement("IMG");
2779
- return W.src = b, H.appendChild(W), P;
2429
+ var j = document.createElement("IMG");
2430
+ return j.src = b, H.appendChild(j), P;
2780
2431
  }
2781
2432
  var m = s._scene;
2782
2433
  y("marker", f.markerIcon, "Click to start drawing a 2D marker", function() {
@@ -2824,52 +2475,52 @@ var fe = function() {
2824
2475
  });
2825
2476
  });
2826
2477
  var E = document.createElement("DIV");
2827
- E.className = "divider", h.appendChild(E), y("clear", f.clearIcon, "Remove all primitives", function() {
2478
+ E.className = "divider", u.appendChild(E), y("clear", f.clearIcon, "Remove all primitives", function() {
2828
2479
  m.primitives.removeAll();
2829
2480
  }), q(this);
2830
2481
  }
2831
- return r;
2832
- }(), n.prototype.addToolbar = function(r, s) {
2833
- return s = O(s, { container: r }), new n.DrawHelperWidget(this, s);
2482
+ return o;
2483
+ }(), i.prototype.addToolbar = function(o, s) {
2484
+ return s = D(s, { container: o }), new i.DrawHelperWidget(this, s);
2834
2485
  };
2835
- function X(r, s) {
2486
+ function Y(o, s) {
2836
2487
  var f = new p.Rectangle();
2837
- f.west = Math.min(r.longitude, s.longitude), f.east = Math.max(r.longitude, s.longitude), f.south = Math.min(r.latitude, s.latitude), f.north = Math.max(r.latitude, s.latitude);
2488
+ f.west = Math.min(o.longitude, s.longitude), f.east = Math.max(o.longitude, s.longitude), f.south = Math.min(o.latitude, s.latitude), f.north = Math.max(o.latitude, s.latitude);
2838
2489
  var c = p.Math.EPSILON7;
2839
2490
  return f.east - f.west < c && (f.east += c * 2), f.north - f.south < c && (f.north += c * 2), f;
2840
2491
  }
2841
- function U(r, s) {
2842
- return r.longitude.toFixed(s || 3) + ", " + r.latitude.toFixed(s || 3);
2492
+ function z(o, s) {
2493
+ return o.longitude.toFixed(s || 3) + ", " + o.latitude.toFixed(s || 3);
2843
2494
  }
2844
- function V(r, s) {
2845
- if (r == null || typeof r != "object" || r.constructor != Object && r.constructor != Array)
2846
- return r;
2847
- if (r.constructor == Date || r.constructor == RegExp || r.constructor == Function || r.constructor == String || r.constructor == Number || r.constructor == Boolean)
2848
- return new r.constructor(r);
2849
- s = s || new r.constructor();
2850
- for (var f in r)
2851
- s[f] = typeof s[f] > "u" ? V(r[f], null) : s[f];
2495
+ function V(o, s) {
2496
+ if (o == null || typeof o != "object" || o.constructor != Object && o.constructor != Array)
2497
+ return o;
2498
+ if (o.constructor == Date || o.constructor == RegExp || o.constructor == Function || o.constructor == String || o.constructor == Number || o.constructor == Boolean)
2499
+ return new o.constructor(o);
2500
+ s = s || new o.constructor();
2501
+ for (var f in o)
2502
+ s[f] = typeof s[f] > "u" ? V(o[f], null) : s[f];
2852
2503
  return s;
2853
2504
  }
2854
- function j(r, s) {
2855
- r = r || {};
2505
+ function W(o, s) {
2506
+ o = o || {};
2856
2507
  var f;
2857
2508
  for (f in s)
2858
- r[f] === void 0 && (r[f] = V(s[f]));
2509
+ o[f] === void 0 && (o[f] = V(s[f]));
2859
2510
  }
2860
- function O(r, s) {
2861
- var f = V(r), c;
2511
+ function D(o, s) {
2512
+ var f = V(o), c;
2862
2513
  for (c in s)
2863
2514
  f[c] === void 0 && (f[c] = V(s[c]));
2864
2515
  return f;
2865
2516
  }
2866
- function $(r, s, f) {
2867
- r[s] = f;
2517
+ function $(o, s, f) {
2518
+ o[s] = f;
2868
2519
  }
2869
- function q(r) {
2870
- r._listeners = {}, r.addListener = function(s, f) {
2520
+ function q(o) {
2521
+ o._listeners = {}, o.addListener = function(s, f) {
2871
2522
  return this._listeners[s] = this._listeners[s] || [], this._listeners[s].push(f), this._listeners[s].length;
2872
- }, r.executeListeners = function(s, f) {
2523
+ }, o.executeListeners = function(s, f) {
2873
2524
  if (this._listeners[s.name] && this._listeners[s.name].length > 0)
2874
2525
  for (var c = 0; c < this._listeners[s.name].length; c++)
2875
2526
  this._listeners[s.name][c](s);
@@ -2877,218 +2528,169 @@ var fe = function() {
2877
2528
  f && f(s);
2878
2529
  };
2879
2530
  }
2880
- return n;
2531
+ return i;
2881
2532
  }();
2882
- const Mr = 2, Ar = (e, i) => {
2533
+ const Rr = 2, Br = (e, n) => {
2883
2534
  switch (e) {
2884
- case re.BOX: {
2885
- if (i.features.length !== Mr)
2535
+ case ie.BOX: {
2536
+ if (n.features.length !== Rr)
2886
2537
  throw new Error(`${e} must have 2 points`);
2887
- const t = at(i.features, (a) => {
2888
- var o;
2889
- return ((o = a.properties) == null ? void 0 : o.type) === qe.BOTTOM_LEFT;
2890
- }), n = at(i.features, (a) => {
2891
- var o;
2892
- return ((o = a.properties) == null ? void 0 : o.type) === qe.TOP_RIGHT;
2538
+ const t = lt(n.features, (a) => {
2539
+ var r;
2540
+ return ((r = a.properties) == null ? void 0 : r.type) === Ye.BOTTOM_LEFT;
2541
+ }), i = lt(n.features, (a) => {
2542
+ var r;
2543
+ return ((r = a.properties) == null ? void 0 : r.type) === Ye.TOP_RIGHT;
2893
2544
  });
2894
- if (n && t) {
2895
- if (t.geometry.coordinates[0] === n.geometry.coordinates[0] && t.geometry.coordinates[1] === n.geometry.coordinates[1])
2896
- throw new Error(
2897
- `${e} must define BOTTOM_LEFT and TOP_RIGHT different points`
2898
- );
2899
- return Ce.fromDegrees(
2545
+ if (i && t) {
2546
+ if (t.geometry.coordinates[0] === i.geometry.coordinates[0] && t.geometry.coordinates[1] === i.geometry.coordinates[1])
2547
+ throw new Error(`${e} must define BOTTOM_LEFT and TOP_RIGHT different points`);
2548
+ return we.fromDegrees(
2900
2549
  t.geometry.coordinates[0],
2901
2550
  t.geometry.coordinates[1],
2902
- n.geometry.coordinates[0],
2903
- n.geometry.coordinates[1]
2551
+ i.geometry.coordinates[0],
2552
+ i.geometry.coordinates[1]
2904
2553
  );
2905
2554
  } else
2906
- throw new Error(
2907
- `${e} geojson must define BOTTOM_LEFT and TOP_RIGHT points`
2908
- );
2555
+ throw new Error(`${e} geojson must define BOTTOM_LEFT and TOP_RIGHT points`);
2909
2556
  }
2910
2557
  default:
2911
2558
  throw new Error(`${e} type geoJSON still not supported`);
2912
2559
  }
2913
- }, xr = (e) => {
2914
- const i = e.map((t) => {
2915
- const n = Be.fromCartesian(t);
2916
- return [
2917
- le.toDegrees(n.longitude),
2918
- le.toDegrees(n.latitude)
2919
- ];
2560
+ }, Nr = (e) => {
2561
+ const n = e.map((t) => {
2562
+ const i = Ne.fromCartesian(t);
2563
+ return [le.toDegrees(i.longitude), le.toDegrees(i.latitude)];
2920
2564
  });
2921
- return i.push(i[0]), {
2565
+ return n.push(n[0]), {
2922
2566
  type: "Feature",
2923
2567
  properties: {},
2924
2568
  geometry: {
2925
2569
  type: "Polygon",
2926
- coordinates: [i]
2570
+ coordinates: [n]
2927
2571
  }
2928
2572
  };
2929
- }, kr = (e) => {
2930
- const i = Lt.lineString([
2931
- [
2932
- le.toDegrees(e.west),
2933
- le.toDegrees(e.south)
2934
- ],
2935
- [
2936
- le.toDegrees(e.east),
2937
- le.toDegrees(e.north)
2938
- ]
2573
+ }, Fr = (e) => {
2574
+ const n = Ot.lineString([
2575
+ [le.toDegrees(e.west), le.toDegrees(e.south)],
2576
+ [le.toDegrees(e.east), le.toDegrees(e.north)]
2939
2577
  ]);
2940
- return Mt(Pt(i));
2941
- }, Ir = (e) => {
2942
- const i = Lt.lineString([
2578
+ return Rt(Dt(n));
2579
+ }, Gr = (e) => {
2580
+ const n = Ot.lineString([
2943
2581
  [e.west, e.south],
2944
2582
  [e.east, e.north]
2945
2583
  ]);
2946
- return Mt(Pt(i)).geometry.coordinates[0].map(
2947
- (n) => me.fromRadiansArray(n)[0]
2948
- );
2584
+ return Rt(Dt(n)).geometry.coordinates[0].map((i) => ge.fromRadiansArray(i)[0]);
2949
2585
  };
2950
- class qo extends Xi {
2586
+ class ts extends ni {
2951
2587
  }
2952
- const Yo = (e) => {
2953
- const {
2954
- drawState: i,
2955
- drawingMaterial: t,
2956
- drawingVertexColor: n,
2957
- material: a,
2958
- hollow: o,
2959
- outlineWidth: d
2960
- } = e, u = he(), [v, C] = k();
2588
+ const ns = (e) => {
2589
+ const { drawState: n, drawingMaterial: t, drawingVertexColor: i, material: a, hollow: r, outlineWidth: d } = e, h = pe(), [v, C] = k();
2961
2590
  I(() => {
2962
2591
  C(
2963
2592
  // eslint-disable-next-line
2964
- new fe(u, t, n)
2593
+ new fe(h, t, i)
2965
2594
  );
2966
2595
  }, []), I(() => {
2967
2596
  if (v) {
2968
- const A = v;
2969
- if (i.drawing)
2970
- switch (i.type) {
2971
- case re.POLYGON:
2972
- u.scene.globe.depthTestAgainstTerrain = !1, A.startDrawingPolygon({
2597
+ const x = v;
2598
+ if (n.drawing)
2599
+ switch (n.type) {
2600
+ case ie.POLYGON:
2601
+ h.scene.globe.depthTestAgainstTerrain = !1, x.startDrawingPolygon({
2973
2602
  callback: (L) => {
2974
- i.handler({
2603
+ n.handler({
2975
2604
  primitive: L,
2976
- type: re.POLYGON,
2977
- geojson: xr(L)
2605
+ type: ie.POLYGON,
2606
+ geojson: Nr(L)
2978
2607
  });
2979
2608
  }
2980
2609
  });
2981
2610
  break;
2982
- case re.BOX:
2983
- u.scene.globe.depthTestAgainstTerrain = !1, A.startDrawingExtent({
2611
+ case ie.BOX:
2612
+ h.scene.globe.depthTestAgainstTerrain = !1, x.startDrawingExtent({
2984
2613
  callback: (L) => {
2985
- i.handler({
2614
+ n.handler({
2986
2615
  primitive: L,
2987
- type: re.BOX,
2988
- geojson: kr(L)
2616
+ type: ie.BOX,
2617
+ geojson: Fr(L)
2989
2618
  });
2990
2619
  }
2991
2620
  });
2992
2621
  break;
2993
2622
  default:
2994
- throw new Error(
2995
- `[CESIUM DRAW]: ${i.type} unrecognized primitive to draw.`
2996
- );
2623
+ throw new Error(`[CESIUM DRAW]: ${n.type} unrecognized primitive to draw.`);
2997
2624
  }
2998
2625
  else
2999
- A.stopDrawing(), u.scene.globe.depthTestAgainstTerrain = !0;
2626
+ x.stopDrawing(), h.scene.globe.depthTestAgainstTerrain = !0;
3000
2627
  }
3001
- }, [i, v]);
3002
- const S = (A) => {
3003
- let L = A.coordinates !== void 0 ? A.coordinates : Ar(
3004
- A.type,
3005
- A.geojson
3006
- );
3007
- if (o !== !0)
3008
- switch (A.type) {
3009
- case re.BOX:
3010
- return /* @__PURE__ */ l(
3011
- Sr,
3012
- {
3013
- coordinates: L,
3014
- material: a ?? t
3015
- }
3016
- );
3017
- case re.POLYGON:
3018
- return /* @__PURE__ */ l(
3019
- _r,
3020
- {
3021
- hierarchy: new Zi(L),
3022
- material: a ?? t
3023
- }
3024
- );
2628
+ }, [n, v]);
2629
+ const S = (x) => {
2630
+ let L = x.coordinates !== void 0 ? x.coordinates : Br(x.type, x.geojson);
2631
+ if (r !== !0)
2632
+ switch (x.type) {
2633
+ case ie.BOX:
2634
+ return /* @__PURE__ */ l(Ir, { coordinates: L, material: a ?? t });
2635
+ case ie.POLYGON:
2636
+ return /* @__PURE__ */ l(kr, { hierarchy: new ii(L), material: a ?? t });
3025
2637
  default:
3026
- return /* @__PURE__ */ l(oe, {});
2638
+ return /* @__PURE__ */ l(re, {});
3027
2639
  }
3028
2640
  else {
3029
- switch (A.type) {
3030
- case re.BOX:
3031
- L = Ir(L);
2641
+ switch (x.type) {
2642
+ case ie.BOX:
2643
+ L = Gr(L);
3032
2644
  break;
3033
- case re.POLYGON:
3034
- L = [
3035
- ...L,
3036
- L[0]
3037
- ];
2645
+ case ie.POLYGON:
2646
+ L = [...L, L[0]];
3038
2647
  break;
3039
2648
  default:
3040
- return /* @__PURE__ */ l(oe, {});
2649
+ return /* @__PURE__ */ l(re, {});
3041
2650
  }
3042
- return /* @__PURE__ */ l(
3043
- Pr,
3044
- {
3045
- positions: L,
3046
- width: d ?? 1,
3047
- material: a ?? t
3048
- }
3049
- );
2651
+ return /* @__PURE__ */ l(Dr, { positions: L, width: d ?? 1, material: a ?? t });
3050
2652
  }
3051
2653
  };
3052
- return /* @__PURE__ */ l(Lr, { ...e, children: e.drawings.map((A, L) => /* @__PURE__ */ D(br, { name: A.name, children: [
3053
- /* @__PURE__ */ D(Tr, { children: [
3054
- /* @__PURE__ */ D("h1", { children: [
2654
+ return /* @__PURE__ */ l(Or, { ...e, children: e.drawings.map((x, L) => /* @__PURE__ */ R(Ar, { name: x.name, children: [
2655
+ /* @__PURE__ */ R(xr, { children: [
2656
+ /* @__PURE__ */ R("h1", { children: [
3055
2657
  "Drawed Entity ",
3056
- A.name
2658
+ x.name
3057
2659
  ] }),
3058
2660
  /* @__PURE__ */ l("p", { children: "This is description of drawed entity" })
3059
2661
  ] }),
3060
- S(A)
3061
- ] }, A.id)) });
2662
+ S(x)
2663
+ ] }, x.id)) });
3062
2664
  };
3063
- class Xo extends Ji {
2665
+ class is extends ri {
3064
2666
  }
3065
- class Zo extends Qi {
2667
+ class rs extends oi {
3066
2668
  }
3067
- class Jo extends en {
2669
+ class os extends si {
3068
2670
  }
3069
- class Qo extends Te {
2671
+ class ss extends _e {
3070
2672
  }
3071
- class es extends me {
2673
+ class as extends ge {
3072
2674
  }
3073
- class ts extends Be {
2675
+ class ls extends Ne {
3074
2676
  }
3075
- class is extends tn {
2677
+ class cs extends ai {
3076
2678
  }
3077
- class ns extends nn {
2679
+ class ds extends li {
3078
2680
  }
3079
- class rs extends rn {
2681
+ class us extends ci {
3080
2682
  }
3081
- class os extends Ce {
2683
+ class hs extends we {
3082
2684
  }
3083
- class ss extends on {
2685
+ class ps extends di {
3084
2686
  }
3085
- class as extends sn {
2687
+ class ms extends ui {
3086
2688
  }
3087
- class ls extends an {
2689
+ class gs extends hi {
3088
2690
  }
3089
- const cs = ln, ds = cn;
3090
- const Or = 38, Dr = 40, Rr = 13, Br = 14, Nr = 27, Fr = 9, Hr = 10, Gr = 100, Vr = (e) => {
3091
- const [i, t] = k(e.defaultValue ?? ""), [n, a] = k(!1), [o, d] = k({
2691
+ const fs = pi, ys = mi;
2692
+ const Hr = 38, Vr = 40, zr = 13, $r = 14, Ur = 27, Wr = 9, jr = 10, Kr = 100, qr = (e) => {
2693
+ const [n, t] = k(e.defaultValue ?? ""), [i, a] = k(!1), [r, d] = k({
3092
2694
  helperVisible: !1,
3093
2695
  left: 0,
3094
2696
  right: 0,
@@ -3101,131 +2703,128 @@ const Or = 38, Dr = 40, Rr = 13, Br = 14, Nr = 27, Fr = 9, Hr = 10, Gr = 100, Vr
3101
2703
  value: "",
3102
2704
  caret: 0,
3103
2705
  width: "unset"
3104
- }), u = Le(null);
3105
- I(() => (window.addEventListener("resize", z), () => {
2706
+ }), h = ve(null);
2707
+ I(() => (window.addEventListener("resize", U), () => {
3106
2708
  try {
3107
- window.removeEventListener("resize", z);
2709
+ window.removeEventListener("resize", U);
3108
2710
  } catch (g) {
3109
2711
  console.log('WINDOW "resize" remove listener failed', g);
3110
2712
  }
3111
2713
  }), []), I(() => {
3112
2714
  typeof e.value < "u" && t(e.value), typeof e.defaultValue < "u" && t(e.defaultValue);
3113
2715
  }, [e.value, e.defaultValue]), I(() => {
3114
- const { options: g } = e, { caret: h } = o;
3115
- X(i, h, g);
2716
+ const { options: g } = e, { caret: u } = r;
2717
+ Y(n, u, g);
3116
2718
  }, [e]);
3117
- const v = (g, h, y) => {
2719
+ const v = (g, u, y) => {
3118
2720
  const { trigger: m, matchAny: E, regex: T } = e, b = new RegExp(T);
3119
2721
  let w = m;
3120
2722
  Array.isArray(w) || (w = new Array(m)), w.sort();
3121
2723
  const _ = {};
3122
- Array.isArray(y) && w.forEach((W) => {
3123
- _[W] = y;
2724
+ Array.isArray(y) && w.forEach((j) => {
2725
+ _[j] = y;
3124
2726
  });
3125
2727
  const P = C(w, b);
3126
2728
  let H = {};
3127
- for (let W = 0; W < P.length; W++) {
3128
- const { triggerStr: M, triggerMatch: x, triggerLength: B } = P[W];
3129
- for (let G = h - 1; G >= 0; --G) {
3130
- const ne = g.substring(G, h).match(b);
2729
+ for (let j = 0; j < P.length; j++) {
2730
+ const { triggerStr: O, triggerMatch: M, triggerLength: A } = P[j];
2731
+ for (let F = u - 1; F >= 0; --F) {
2732
+ const oe = g.substring(F, u).match(b);
3131
2733
  let ee = -1;
3132
- if (B > 0) {
3133
- const se = x ? G : G - B + 1;
3134
- if (se < 0 || (S(M, g, se) && (ee = se + B), !ne && ee < 0))
2734
+ if (A > 0) {
2735
+ const se = M ? F : F - A + 1;
2736
+ if (se < 0 || (S(O, g, se) && (ee = se + A), !oe && ee < 0))
3135
2737
  break;
3136
2738
  } else {
3137
- if (ne && G > 0)
2739
+ if (oe && F > 0)
3138
2740
  continue;
3139
- if (ee = G === 0 && ne ? 0 : G + 1, h - ee === 0)
2741
+ if (ee = F === 0 && oe ? 0 : F + 1, u - ee === 0)
3140
2742
  break;
3141
2743
  }
3142
2744
  if (ee >= 0) {
3143
- const se = _[M];
2745
+ const se = _[O];
3144
2746
  if (!Array.isArray(se))
3145
2747
  continue;
3146
- const _e = g.substring(ee, h), Gt = se.filter(($t) => {
3147
- const nt = $t.toLowerCase().indexOf(_e.toLowerCase());
3148
- return nt !== -1 && (E || nt === 0);
3149
- }), Vt = M, zt = _e.length;
2748
+ const Se = g.substring(ee, u), Ae = se.filter((Yt) => {
2749
+ const rt = Yt.toLowerCase().indexOf(Se.toLowerCase());
2750
+ return rt !== -1 && (E || rt === 0);
2751
+ }), Kt = O, qt = Se.length;
3150
2752
  H = {
3151
2753
  ...H,
3152
- trigger: Vt,
2754
+ trigger: Kt,
3153
2755
  matchStart: ee,
3154
- matchLength: zt,
3155
- options: Gt
2756
+ matchLength: qt,
2757
+ options: Ae
3156
2758
  };
3157
2759
  }
3158
2760
  }
3159
2761
  }
3160
2762
  return H;
3161
- }, C = (g, h) => g.map((m) => ({
2763
+ }, C = (g, u) => g.map((m) => ({
3162
2764
  triggerStr: m,
3163
- triggerMatch: m.match(h),
2765
+ triggerMatch: m.match(u),
3164
2766
  triggerLength: m.length
3165
- })), S = (g, h, y) => !g || !g.length || h.substr(y, g.length) === g, A = (g) => {
3166
- const { onChange: h, options: y, spaceRemovers: m, spacer: E, value: T } = e, b = i, w = g.target.value, _ = pn(L(g.target)).end;
3167
- if (w.length || F({
3168
- ...o,
2767
+ })), S = (g, u, y) => !g || !g.length || u.substr(y, g.length) === g, x = (g) => {
2768
+ const { onChange: u, options: y, spaceRemovers: m, spacer: E, value: T } = e, b = n, w = g.target.value, _ = vi(L(g.target)).end;
2769
+ if (w.length || G({
2770
+ ...r,
3169
2771
  helperVisible: !1
3170
- }), t(w), F({
3171
- ...o,
2772
+ }), t(w), G({
2773
+ ...r,
3172
2774
  caret: _,
3173
2775
  value: g.target.value
3174
2776
  }), !w.length || !_)
3175
- return h(g.target.value);
3176
- if (n && m.length && w.length > 2 && E.length) {
2777
+ return u(g.target.value);
2778
+ if (i && m.length && w.length > 2 && E.length) {
3177
2779
  for (let P = 0; P < Math.max(b.length, w.length); ++P)
3178
2780
  if (b[P] !== w[P]) {
3179
- if (P >= 2 && w[P - 1] === E && m.indexOf(w[P - 2]) === -1 && m.indexOf(w[P]) !== -1 && !Ke(v(w.substring(0, P - 2), _ - 3, y))) {
3180
- const H = `${w.slice(0, P - 1)}${w.slice(
3181
- P,
3182
- P + 1
3183
- )}${w.slice(P - 1, P)}${w.slice(P + 1)}`;
3184
- return Y(P + 1), u.current !== null && (u.current.value = H), T || F({
3185
- ...o,
2781
+ if (P >= 2 && w[P - 1] === E && m.indexOf(w[P - 2]) === -1 && m.indexOf(w[P]) !== -1 && !qe(v(w.substring(0, P - 2), _ - 3, y))) {
2782
+ const H = `${w.slice(0, P - 1)}${w.slice(P, P + 1)}${w.slice(P - 1, P)}${w.slice(P + 1)}`;
2783
+ return J(P + 1), h.current !== null && (h.current.value = H), T || G({
2784
+ ...r,
3186
2785
  value: H
3187
- }), h(H);
2786
+ }), u(H);
3188
2787
  }
3189
2788
  break;
3190
2789
  }
3191
2790
  a(!1);
3192
2791
  }
3193
- return X(w, _, y), h(g.target.value);
2792
+ return Y(w, _, y), u(g.target.value);
3194
2793
  }, L = (g) => {
3195
2794
  if (g !== void 0)
3196
2795
  if (g.children.length > 0) {
3197
- const h = g.getElementsByTagName("textarea");
3198
- if (h.length > 0)
3199
- return h[0];
2796
+ const u = g.getElementsByTagName("textarea");
2797
+ if (u.length > 0)
2798
+ return u[0];
3200
2799
  const y = g.getElementsByTagName("input");
3201
2800
  if (y.length > 0)
3202
2801
  return y[0];
3203
2802
  } else
3204
2803
  return g;
3205
- }, R = (g) => {
3206
- const { helperVisible: h, options: y, selection: m } = o, { onKeyDown: E, passThroughEnter: T } = e;
3207
- if (h)
2804
+ }, B = (g) => {
2805
+ const { helperVisible: u, options: y, selection: m } = r, { onKeyDown: E, passThroughEnter: T } = e;
2806
+ if (u)
3208
2807
  switch (g.keyCode) {
3209
- case Nr:
3210
- g.preventDefault(), U();
2808
+ case Ur:
2809
+ g.preventDefault(), z();
3211
2810
  break;
3212
- case Or:
3213
- g.preventDefault(), F({
3214
- ...o,
2811
+ case Hr:
2812
+ g.preventDefault(), G({
2813
+ ...r,
3215
2814
  selection: (y.length + m - 1) % y.length
3216
2815
  });
3217
2816
  break;
3218
- case Dr:
3219
- g.preventDefault(), F({
3220
- ...o,
2817
+ case Vr:
2818
+ g.preventDefault(), G({
2819
+ ...r,
3221
2820
  selection: (m + 1) % y.length
3222
2821
  });
3223
2822
  break;
3224
- case Br:
3225
- case Rr:
2823
+ case $r:
2824
+ case zr:
3226
2825
  T || g.preventDefault(), K(m);
3227
2826
  break;
3228
- case Fr:
2827
+ case Wr:
3229
2828
  K(m);
3230
2829
  break;
3231
2830
  default:
@@ -3234,92 +2833,73 @@ const Or = 38, Dr = 40, Rr = 13, Br = 14, Nr = 27, Fr = 9, Hr = 10, Gr = 100, Vr
3234
2833
  }
3235
2834
  else
3236
2835
  E(g);
3237
- }, z = () => {
3238
- F({
3239
- ...o,
2836
+ }, U = () => {
2837
+ G({
2838
+ ...r,
3240
2839
  helperVisible: !1
3241
2840
  });
3242
2841
  }, K = (g) => {
3243
- const { spacer: h, onSelect: y, changeOnSelect: m } = e, { matchStart: E, matchLength: T, options: b, trigger: w } = o, _ = b[g], P = i, H = P.substring(0, E - w.length), W = P.substring(E + T), M = { target: u.current }, x = m(w, _);
3244
- M.target !== null && (M.target.value = `${H}${x}${h}${W}`), A(M), M.target !== null && y(M.target.value), U(), Y(H.length + x.length + 1), a(!0);
3245
- }, Y = (g) => {
3246
- F({
3247
- ...o,
2842
+ const { spacer: u, onSelect: y, changeOnSelect: m } = e, { matchStart: E, matchLength: T, options: b, trigger: w } = r, _ = b[g], P = n, H = P.substring(0, E - w.length), j = P.substring(E + T), O = { target: h.current }, M = m(w, _);
2843
+ O.target !== null && (O.target.value = `${H}${M}${u}${j}`), x(O), O.target !== null && y(O.target.value), z(), J(H.length + M.length + 1), a(!0);
2844
+ }, J = (g) => {
2845
+ G({
2846
+ ...r,
3248
2847
  caret: g
3249
2848
  });
3250
- const h = L(u.current);
3251
- mn(h, g);
3252
- }, F = (g) => {
2849
+ const u = L(h.current);
2850
+ Ei(u, g);
2851
+ }, G = (g) => {
3253
2852
  setTimeout(() => {
3254
2853
  d({
3255
2854
  ...g
3256
2855
  });
3257
2856
  }, 0);
3258
- }, X = (g, h, y) => {
3259
- const m = u.current;
3260
- if (u.current === null)
2857
+ }, Y = (g, u, y) => {
2858
+ const m = h.current;
2859
+ if (h.current === null)
3261
2860
  return;
3262
2861
  const E = L(m);
3263
2862
  if (E === void 0)
3264
2863
  return;
3265
- const T = m.getBoundingClientRect(), b = v(g, h, y);
2864
+ const T = m.getBoundingClientRect(), b = v(g, u, y);
3266
2865
  if (Object.keys(b).length > 0 && E !== null) {
3267
- const w = hn(E, h), _ = E.getBoundingClientRect(), {
3268
- minChars: P,
3269
- onRequestOptions: H,
3270
- requestOnlyIfNoOptions: W,
3271
- mode: M
3272
- } = e;
3273
- let x, B, G, pe = "unset";
3274
- M === "assist" ? (x = m === E ? w.top + E.offsetTop : w.top + T.top, B = Math.min(
3275
- w.left + E.offsetLeft - Hr,
3276
- E.offsetLeft + _.width - Gr
3277
- )) : (x = T.top + m.offsetHeight, B = m.offsetLeft, G = m.offsetLeft - m.offsetWidth, pe = `${T.width}px`), b.matchLength >= P && (b.options.length > 1 || b.options.length === 1 && b.options[0].length !== b.matchLength) ? F({
3278
- ...o,
2866
+ const w = yi(E, u), _ = E.getBoundingClientRect(), { minChars: P, onRequestOptions: H, requestOnlyIfNoOptions: j, mode: O } = e;
2867
+ let M, A, F, de = "unset";
2868
+ O === "assist" ? (M = m === E ? w.top + E.offsetTop : w.top + T.top, A = Math.min(w.left + E.offsetLeft - jr, E.offsetLeft + _.width - Kr)) : (M = T.top + m.offsetHeight, A = m.offsetLeft, F = m.offsetLeft - m.offsetWidth, de = `${T.width}px`), b.matchLength >= P && (b.options.length > 1 || b.options.length === 1 && b.options[0].length !== b.matchLength) ? G({
2869
+ ...r,
3279
2870
  value: g,
3280
2871
  helperVisible: !0,
3281
- top: x,
3282
- left: B,
3283
- right: G,
3284
- width: pe,
2872
+ top: M,
2873
+ left: A,
2874
+ right: F,
2875
+ width: de,
3285
2876
  ...b
3286
- }) : ((!W || !b.options.length) && H(g.substr(b.matchStart, b.matchLength)), U());
2877
+ }) : ((!j || !b.options.length) && H(g.substr(b.matchStart, b.matchLength)), z());
3287
2878
  } else
3288
- U();
3289
- }, U = () => {
2879
+ z();
2880
+ }, z = () => {
3290
2881
  setTimeout(() => {
3291
- F({
3292
- ...o,
2882
+ G({
2883
+ ...r,
3293
2884
  helperVisible: !1,
3294
2885
  selection: 0
3295
2886
  });
3296
2887
  }, 100);
3297
2888
  }, V = () => {
3298
- const {
3299
- helperVisible: g,
3300
- left: h,
3301
- right: y,
3302
- matchStart: m,
3303
- matchLength: E,
3304
- options: T,
3305
- selection: b,
3306
- top: w,
3307
- value: _,
3308
- width: P
3309
- } = o;
2889
+ const { helperVisible: g, left: u, right: y, matchStart: m, matchLength: E, options: T, selection: b, top: w, value: _, width: P } = r;
3310
2890
  if (!g)
3311
2891
  return null;
3312
- const { maxOptions: H, offsetX: W, offsetY: M, direction: x } = e;
2892
+ const { maxOptions: H, offsetX: j, offsetY: O, direction: M } = e;
3313
2893
  if (T.length === 0)
3314
2894
  return null;
3315
2895
  if (b >= T.length)
3316
- return F({
3317
- ...o,
2896
+ return G({
2897
+ ...r,
3318
2898
  selection: 0
3319
2899
  }), null;
3320
- const B = H === 0 ? T.length : H, G = T.slice(0, B).map((ne, ee) => {
3321
- const se = ne.toLowerCase().indexOf(_.substr(m, E).toLowerCase());
3322
- return /* @__PURE__ */ D(
2900
+ const A = H === 0 ? T.length : H, F = T.slice(0, A).map((oe, ee) => {
2901
+ const se = oe.toLowerCase().indexOf(_.substr(m, E).toLowerCase());
2902
+ return /* @__PURE__ */ R(
3323
2903
  "li",
3324
2904
  {
3325
2905
  className: ee === b ? "active" : void 0,
@@ -3327,53 +2907,38 @@ const Or = 38, Dr = 40, Rr = 13, Br = 14, Nr = 27, Fr = 9, Hr = 10, Gr = 100, Vr
3327
2907
  K(ee);
3328
2908
  },
3329
2909
  onMouseEnter: () => {
3330
- F({
3331
- ...o,
2910
+ G({
2911
+ ...r,
3332
2912
  selection: ee
3333
2913
  });
3334
2914
  },
3335
2915
  children: [
3336
- ne.slice(0, se),
3337
- /* @__PURE__ */ l("strong", { children: ne.substr(se, E) }),
3338
- ne.slice(se + E)
2916
+ oe.slice(0, se),
2917
+ /* @__PURE__ */ l("strong", { children: oe.substr(se, E) }),
2918
+ oe.slice(se + E)
3339
2919
  ]
3340
2920
  },
3341
- ne
2921
+ oe
3342
2922
  );
3343
- }), pe = x === "ltr" ? { left: h + W } : { right: y + W };
3344
- return /* @__PURE__ */ l(
3345
- "ul",
3346
- {
3347
- className: "react-autocomplete-input",
3348
- style: { ...pe, top: w + M, width: P },
3349
- children: G
3350
- }
3351
- );
3352
- }, {
3353
- Component: j,
3354
- ComponentProps: O,
3355
- defaultValue: $,
3356
- disabled: q,
3357
- onBlur: r,
3358
- value: s,
3359
- ...f
3360
- } = e, c = Object.assign({}, f);
2923
+ }), de = M === "ltr" ? { left: u + j } : { right: y + j };
2924
+ return /* @__PURE__ */ l("ul", { className: "react-autocomplete-input", style: { ...de, top: w + O, width: P }, children: F });
2925
+ }, { Component: W, ComponentProps: D, defaultValue: $, disabled: q, onBlur: o, value: s, ...f } = e, c = Object.assign({}, f);
3361
2926
  return Object.keys(e).forEach((g) => {
3362
2927
  delete c[g];
3363
- }), /* @__PURE__ */ D(oe, { children: [
3364
- ve.cloneElement(j, {
2928
+ }), /* @__PURE__ */ R(re, { children: [
2929
+ Ee.cloneElement(W, {
3365
2930
  disabled: q,
3366
- onBlur: r,
3367
- onChange: A,
3368
- onKeyDown: R,
3369
- ref: u,
3370
- value: i,
2931
+ onBlur: o,
2932
+ onChange: x,
2933
+ onKeyDown: B,
2934
+ ref: h,
2935
+ value: n,
3371
2936
  ...c,
3372
- ...O
2937
+ ...D
3373
2938
  }),
3374
2939
  V()
3375
2940
  ] });
3376
- }, zr = {
2941
+ }, Yr = {
3377
2942
  Component: /* @__PURE__ */ l("textarea", {}),
3378
2943
  ComponentProps: {},
3379
2944
  defaultValue: void 0,
@@ -3389,7 +2954,7 @@ const Or = 38, Dr = 40, Rr = 13, Br = 14, Nr = 27, Fr = 9, Hr = 10, Gr = 100, Vr
3389
2954
  },
3390
2955
  onSelect: (e) => {
3391
2956
  },
3392
- changeOnSelect: (e, i) => `${e}${i}`,
2957
+ changeOnSelect: (e, n) => `${e}${n}`,
3393
2958
  options: [],
3394
2959
  regex: "^[A-Za-z0-9\\-_]+$",
3395
2960
  matchAny: !1,
@@ -3404,38 +2969,38 @@ const Or = 38, Dr = 40, Rr = 13, Br = 14, Nr = 27, Fr = 9, Hr = 10, Gr = 100, Vr
3404
2969
  passThroughEnter: !1,
3405
2970
  mode: "assist",
3406
2971
  direction: "ltr"
3407
- }, us = (e) => {
3408
- let i = {
3409
- ...zr,
2972
+ }, vs = (e) => {
2973
+ let n = {
2974
+ ...Yr,
3410
2975
  ...e
3411
2976
  };
3412
- return e.mode === "autocomplete" && (i = {
3413
- ...i,
2977
+ return e.mode === "autocomplete" && (n = {
2978
+ ...n,
3414
2979
  trigger: "",
3415
2980
  regex: ".",
3416
2981
  spacer: ""
3417
- }), /* @__PURE__ */ l(Vr, { ...i });
2982
+ }), /* @__PURE__ */ l(qr, { ...n });
3418
2983
  }, it = {
3419
- formatFileModDate: (e, i) => {
3420
- const t = At.getModDate(i);
2984
+ formatFileModDate: (e, n) => {
2985
+ const t = Bt.getModDate(n);
3421
2986
  return t ? e.formatDate(t, {
3422
2987
  dateStyle: "short",
3423
2988
  timeStyle: "short"
3424
2989
  }) : null;
3425
2990
  },
3426
- formatFileSize: (e, i) => {
3427
- if (!i || typeof i.size != "number")
2991
+ formatFileSize: (e, n) => {
2992
+ if (!n || typeof n.size != "number")
3428
2993
  return null;
3429
- const t = i.size, n = vn(t, {
2994
+ const t = n.size, i = Ti(t, {
3430
2995
  bits: !1,
3431
2996
  output: "object"
3432
2997
  });
3433
- return n.symbol === "B" ? `${Math.round(n.value / 10) / 100} KB` : n.symbol === "KB" ? `${Math.round(n.value)} ${n.symbol}` : `${n.value} ${n.symbol.toUpperCase()}`;
2998
+ 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()}`;
3434
2999
  }
3435
- }, $r = {
3000
+ }, Xr = {
3436
3001
  locale: ce.EN,
3437
3002
  formatters: { ...it }
3438
- }, Ur = {
3003
+ }, Zr = {
3439
3004
  locale: ce.RU,
3440
3005
  formatters: { ...it },
3441
3006
  messages: {
@@ -3475,7 +3040,7 @@ const Or = 38, Dr = 40, Rr = 13, Br = 14, Nr = 27, Fr = 9, Hr = 10, Gr = 100, Vr
3475
3040
  [`chonky.actions.${N.ToggleHiddenFiles.id}.button.name`]: "Скрытые файлы",
3476
3041
  [`chonky.actions.${N.ToggleShowFoldersFirst.id}.button.name`]: "Папки в начале"
3477
3042
  }
3478
- }, Wr = {
3043
+ }, Jr = {
3479
3044
  locale: ce.HE,
3480
3045
  formatters: { ...it },
3481
3046
  messages: {
@@ -3514,32 +3079,32 @@ const Or = 38, Dr = 40, Rr = 13, Br = 14, Nr = 27, Fr = 9, Hr = 10, Gr = 100, Vr
3514
3079
  [`chonky.actions.${N.ToggleHiddenFiles.id}.button.name`]: "קבצים נסתרים",
3515
3080
  [`chonky.actions.${N.ToggleShowFoldersFirst.id}.button.name`]: "הצגת תיקיות בראש הרשימה"
3516
3081
  }
3517
- }, jr = {
3518
- [ce.EN]: $r,
3519
- [ce.RU]: Ur,
3520
- [ce.HE]: Wr
3082
+ }, Qr = {
3083
+ [ce.EN]: Xr,
3084
+ [ce.RU]: Zr,
3085
+ [ce.HE]: Jr
3521
3086
  };
3522
- class hs extends At {
3087
+ class Es extends Bt {
3523
3088
  }
3524
- const ps = N, Kr = {
3089
+ const Cs = N, eo = {
3525
3090
  listView: N.EnableListView.id,
3526
3091
  gridView: N.EnableGridView.id
3527
3092
  };
3528
- gn({ iconComponent: yn });
3529
- const ms = ve.memo(
3530
- ve.forwardRef(
3093
+ Ci({ iconComponent: bi });
3094
+ const ws = Ee.memo(
3095
+ Ee.forwardRef(
3531
3096
  ({
3532
3097
  theme: e,
3533
- styles: i = { height: "100%", minWidth: "600px" },
3534
- defaultView: t = Kr.listView,
3535
- readOnlyMode: n = !1,
3098
+ styles: n = { height: "100%", minWidth: "600px" },
3099
+ defaultView: t = eo.listView,
3100
+ readOnlyMode: i = !1,
3536
3101
  locale: a,
3537
- files: o,
3102
+ files: r,
3538
3103
  folderChain: d,
3539
- onFileAction: u,
3104
+ onFileAction: h,
3540
3105
  ...v
3541
3106
  }, C) => {
3542
- const S = ge(
3107
+ const S = me(
3543
3108
  ($) => null,
3544
3109
  // file.thumbnailUrl ? `https://chonky.io${file.thumbnailUrl}` : null,
3545
3110
  []
@@ -3554,42 +3119,34 @@ const ms = ve.memo(
3554
3119
  }
3555
3120
  }
3556
3121
  })();
3557
- const A = ($) => $.replace(/([A-Z])/g, (q) => "-" + q.toLowerCase()), L = ft(() => e !== void 0 ? Object.keys(e).reduce(
3558
- (q, r) => {
3559
- const s = e[r];
3560
- return r = r.startsWith("--") ? r : `--fp-theme-${A(r)}`, q[r] = s, q;
3561
- },
3562
- {}
3563
- ) : {}, [e]), [R, z] = k(!1), [K, Y] = k(), [F, X] = k(
3564
- !1
3565
- ), [U, V] = k(), [j, O] = k();
3122
+ const x = ($) => $.replace(/([A-Z])/g, (q) => "-" + q.toLowerCase()), L = Tt(() => e !== void 0 ? Object.keys(e).reduce((q, o) => {
3123
+ const s = e[o];
3124
+ return o = o.startsWith("--") ? o : `--fp-theme-${x(o)}`, q[o] = s, q;
3125
+ }, {}) : {}, [e]), [B, U] = k(!1), [K, J] = k(), [G, Y] = k(!1), [z, V] = k(), [W, D] = k();
3566
3126
  return I(() => {
3567
- e && z(!0), Y(t), n ? X(!0) : V([
3568
- N.CreateFolder,
3569
- N.DeleteFiles
3570
- ]), a !== void 0 && O(jr[a]);
3571
- }, [e, t, n, a]), /* @__PURE__ */ l(
3127
+ e && U(!0), J(t), i ? Y(!0) : V([N.CreateFolder, N.DeleteFiles]), a !== void 0 && D(Qr[a]);
3128
+ }, [e, t, i, a]), /* @__PURE__ */ l(
3572
3129
  ae,
3573
3130
  {
3574
3131
  style: {
3575
- ...i,
3132
+ ...n,
3576
3133
  ...L
3577
3134
  },
3578
3135
  children: /* @__PURE__ */ l(
3579
- fn,
3136
+ wi,
3580
3137
  {
3581
3138
  ref: C,
3582
- files: o ?? [],
3139
+ files: r ?? [],
3583
3140
  folderChain: d,
3584
3141
  onFileAction: ($) => {
3585
- typeof u == "function" && u($);
3142
+ typeof h == "function" && h($);
3586
3143
  },
3587
3144
  thumbnailGenerator: S,
3588
3145
  defaultFileViewActionId: K,
3589
- disableDragAndDrop: F,
3590
- fileActions: U,
3591
- darkMode: R,
3592
- i18n: j,
3146
+ disableDragAndDrop: G,
3147
+ fileActions: z,
3148
+ darkMode: B,
3149
+ i18n: W,
3593
3150
  ...v
3594
3151
  }
3595
3152
  )
@@ -3599,64 +3156,64 @@ const ms = ve.memo(
3599
3156
  )
3600
3157
  );
3601
3158
  export {
3602
- us as Autocomplete,
3603
- qe as BboxCorner,
3159
+ vs as Autocomplete,
3160
+ Ye as BboxCorner,
3604
3161
  ae as Box,
3605
- Xe as COORDINATES_MERCATOR_FRACTION_DIGITS,
3606
- Ye as COORDINATES_WGS_FRACTION_DIGITS,
3607
- Vo as Cesium3DTileset,
3608
- is as CesiumBoundingSphere,
3609
- Qo as CesiumCartesian2,
3610
- es as CesiumCartesian3,
3611
- ts as CesiumCartographic,
3612
- ls as CesiumCesiumTerrainProvider,
3613
- qo as CesiumColor,
3614
- Jo as CesiumConstantPositionProperty,
3615
- Zo as CesiumConstantProperty,
3616
- Lr as CesiumCustomDataSource,
3617
- Yo as CesiumDrawingsDataSource,
3618
- ns as CesiumEllipsoid,
3619
- as as CesiumEllipsoidTerrainProvider,
3620
- br as CesiumEntity,
3621
- Ko as CesiumEntityDescription,
3622
- Tr as CesiumEntityStaticDescription,
3623
- rs as CesiumGeographicTilingScheme,
3624
- zo as CesiumGeojsonLayer,
3625
- Fe as CesiumImageryLayer,
3626
- ds as CesiumLabelStyle,
3627
- Go as CesiumMap,
3628
- Es as CesiumMath,
3629
- jo as CesiumOSMLayer,
3630
- _r as CesiumPolygonGraphics,
3631
- Xo as CesiumPolylineDashMaterialProperty,
3632
- os as CesiumRectangle,
3633
- Sr as CesiumRectangleGraphics,
3634
- ss as CesiumResource,
3635
- ie as CesiumSceneMode,
3636
- cs as CesiumVerticalOrigin,
3637
- Ho as CesiumViewer,
3638
- $o as CesiumWMSLayer,
3639
- Uo as CesiumWMTSLayer,
3640
- Wo as CesiumXYZLayer,
3641
- No as CssBaseline,
3642
- Do as DateTimePicker,
3643
- Tn as DateTimeRangePicker,
3644
- Oo as DateTimeRangePickerFormControl,
3645
- re as DrawType,
3646
- hs as FileHelper,
3647
- ms as FilePicker,
3648
- ps as FilePickerActions,
3649
- Kr as FilePickerView,
3650
- Ro as MapFilterContainer,
3651
- _n as Popover,
3652
- ue as Proj,
3653
- Fo as ScopedCssBaseline,
3654
- Bo as SmartTable,
3162
+ Ze as COORDINATES_MERCATOR_FRACTION_DIGITS,
3163
+ Xe as COORDINATES_WGS_FRACTION_DIGITS,
3164
+ qo as Cesium3DTileset,
3165
+ cs as CesiumBoundingSphere,
3166
+ ss as CesiumCartesian2,
3167
+ as as CesiumCartesian3,
3168
+ ls as CesiumCartographic,
3169
+ gs as CesiumCesiumTerrainProvider,
3170
+ ts as CesiumColor,
3171
+ os as CesiumConstantPositionProperty,
3172
+ rs as CesiumConstantProperty,
3173
+ Or as CesiumCustomDataSource,
3174
+ ns as CesiumDrawingsDataSource,
3175
+ ds as CesiumEllipsoid,
3176
+ ms as CesiumEllipsoidTerrainProvider,
3177
+ Ar as CesiumEntity,
3178
+ es as CesiumEntityDescription,
3179
+ xr as CesiumEntityStaticDescription,
3180
+ us as CesiumGeographicTilingScheme,
3181
+ Yo as CesiumGeojsonLayer,
3182
+ Ge as CesiumImageryLayer,
3183
+ ys as CesiumLabelStyle,
3184
+ Ko as CesiumMap,
3185
+ Ls as CesiumMath,
3186
+ Qo as CesiumOSMLayer,
3187
+ kr as CesiumPolygonGraphics,
3188
+ is as CesiumPolylineDashMaterialProperty,
3189
+ hs as CesiumRectangle,
3190
+ Ir as CesiumRectangleGraphics,
3191
+ ps as CesiumResource,
3192
+ ne as CesiumSceneMode,
3193
+ fs as CesiumVerticalOrigin,
3194
+ jo as CesiumViewer,
3195
+ Xo as CesiumWMSLayer,
3196
+ Zo as CesiumWMTSLayer,
3197
+ Jo as CesiumXYZLayer,
3198
+ Uo as CssBaseline,
3199
+ Vo as DateTimePicker,
3200
+ Mi as DateTimeRangePicker,
3201
+ Ho as DateTimeRangePickerFormControl,
3202
+ ie as DrawType,
3203
+ Es as FileHelper,
3204
+ ws as FilePicker,
3205
+ Cs as FilePickerActions,
3206
+ eo as FilePickerViewObj,
3207
+ zo as MapFilterContainer,
3208
+ Ai as Popover,
3209
+ he as Proj,
3210
+ Wo as ScopedCssBaseline,
3211
+ $o as SmartTable,
3655
3212
  ce as SupportedLocales,
3656
- Cs as cesiumSampleTerrainMostDetailed,
3213
+ Ps as cesiumSampleTerrainMostDetailed,
3657
3214
  it as defaultFormatters,
3658
- En as mapMcToMuiTheme,
3659
- he as useCesiumMap,
3660
- xt as useMappedMuiTheme,
3661
- ys as useMediaQuery
3215
+ _i as mapMcToMuiTheme,
3216
+ pe as useCesiumMap,
3217
+ Nt as useMappedMuiTheme,
3218
+ _s as useMediaQuery
3662
3219
  };