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