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