@macrostrat/map-interface 0.0.8 → 0.0.10
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/{index.css → module.css} +1 -21
- package/dist/module.css.map +1 -0
- package/dist/{index.js → module.js} +346 -968
- package/dist/module.js.map +1 -0
- package/dist/types.d.ts +223 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +8 -7
- package/src/dev/index.ts +4 -179
- package/src/dev/map-page.ts +181 -0
- package/src/index.ts +5 -0
- package/dist/index.css.map +0 -1
- package/dist/index.js.map +0 -1
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import {useMemo as $Zz0sd$useMemo, createContext as $Zz0sd$createContext, useContext as $Zz0sd$useContext,
|
|
3
|
-
import {Spinner as $Zz0sd$Spinner, Button as $Zz0sd$Button, Navbar as $Zz0sd$Navbar, Card as $Zz0sd$Card, Icon as $Zz0sd$Icon,
|
|
1
|
+
import "./module.css";
|
|
2
|
+
import {useMemo as $Zz0sd$useMemo, createContext as $Zz0sd$createContext, useContext as $Zz0sd$useContext, useState as $Zz0sd$useState, useRef as $Zz0sd$useRef, Component as $Zz0sd$Component, useCallback as $Zz0sd$useCallback, useLayoutEffect as $Zz0sd$useLayoutEffect, useEffect as $Zz0sd$useEffect, forwardRef as $Zz0sd$forwardRef, isValidElement as $Zz0sd$isValidElement, cloneElement as $Zz0sd$cloneElement, useReducer as $Zz0sd$useReducer} from "react";
|
|
3
|
+
import {Spinner as $Zz0sd$Spinner, Button as $Zz0sd$Button, Navbar as $Zz0sd$Navbar, Card as $Zz0sd$Card, Icon as $Zz0sd$Icon, ButtonGroup as $Zz0sd$ButtonGroup, NonIdealState as $Zz0sd$NonIdealState, Intent as $Zz0sd$Intent, Alert as $Zz0sd$Alert, Collapse as $Zz0sd$Collapse, Tag as $Zz0sd$Tag, EditableText as $Zz0sd$EditableText, Toaster as $Zz0sd$Toaster, Classes as $Zz0sd$Classes, Slider as $Zz0sd$Slider, Callout as $Zz0sd$Callout, Overlay as $Zz0sd$Overlay, Position as $Zz0sd$Position, NavbarGroup as $Zz0sd$NavbarGroup, Alignment as $Zz0sd$Alignment, Switch as $Zz0sd$Switch} from "@blueprintjs/core";
|
|
4
4
|
import $Zz0sd$macrostrathyper, {hyperStyled as $Zz0sd$hyperStyled, classed as $Zz0sd$classed} from "@macrostrat/hyper";
|
|
5
|
-
import $Zz0sd$
|
|
6
|
-
import $Zz0sd$axios from "axios";
|
|
7
|
-
import $Zz0sd$mapboxgl, {FreeCameraOptions as $Zz0sd$FreeCameraOptions, MercatorCoordinate as $Zz0sd$MercatorCoordinate, ScaleControl as $Zz0sd$ScaleControl, GeolocateControl as $Zz0sd$GeolocateControl, Marker as $Zz0sd$Marker} from "mapbox-gl";
|
|
8
|
-
import $Zz0sd$mapboxglcontrolslibBaseBase from "mapbox-gl-controls/lib/Base/Base";
|
|
9
|
-
import $Zz0sd$mapboxglcontrolslibButtonButton from "mapbox-gl-controls/lib/Button/Button";
|
|
10
|
-
import {CompassControl as $Zz0sd$CompassControl, ZoomControl as $Zz0sd$ZoomControl} from "mapbox-gl-controls";
|
|
5
|
+
import {useMapStatus as $Zz0sd$useMapStatus, useFocusState as $Zz0sd$useFocusState, LocationFocusButton as $Zz0sd$LocationFocusButton, isCentered as $Zz0sd$isCentered, ZoomControl as $Zz0sd$ZoomControl, MapboxMapProvider as $Zz0sd$MapboxMapProvider, MapControlWrapper as $Zz0sd$MapControlWrapper, ThreeDControl as $Zz0sd$ThreeDControl, CompassControl as $Zz0sd$CompassControl, GlobeControl as $Zz0sd$GlobeControl, useMapRef as $Zz0sd$useMapRef, useMapEaseToCenter as $Zz0sd$useMapEaseToCenter, useMapDispatch as $Zz0sd$useMapDispatch, useMapConditionalStyle as $Zz0sd$useMapConditionalStyle} from "@macrostrat/mapbox-react";
|
|
11
6
|
import $Zz0sd$classnames from "classnames";
|
|
12
|
-
import $Zz0sd$turfbbox from "@turf/bbox";
|
|
13
7
|
import {memoize as $Zz0sd$memoize, debounce as $Zz0sd$debounce, isEqual as $Zz0sd$isEqual} from "underscore";
|
|
8
|
+
import $Zz0sd$axios from "axios";
|
|
14
9
|
import $Zz0sd$useasynceffect, {useAsyncEffect as $Zz0sd$useAsyncEffect} from "use-async-effect";
|
|
10
|
+
import $Zz0sd$immutabilityhelper from "immutability-helper";
|
|
15
11
|
import {stringify as $Zz0sd$stringify, parse as $Zz0sd$parse} from "query-string";
|
|
16
12
|
import $Zz0sd$reactjsontree from "react-json-tree";
|
|
17
13
|
import {pairs as $Zz0sd$pairs, group as $Zz0sd$group} from "d3-array";
|
|
@@ -23,6 +19,8 @@ import {DateInput as $Zz0sd$DateInput} from "@blueprintjs/datetime";
|
|
|
23
19
|
import "@blueprintjs/datetime/lib/css/blueprint-datetime.css";
|
|
24
20
|
import $Zz0sd$useelementdimensions from "use-element-dimensions";
|
|
25
21
|
import {format as $Zz0sd$format} from "d3-format";
|
|
22
|
+
import $Zz0sd$mapboxgl, {ScaleControl as $Zz0sd$ScaleControl, GeolocateControl as $Zz0sd$GeolocateControl, Marker as $Zz0sd$Marker} from "mapbox-gl";
|
|
23
|
+
import {getMapboxStyle as $Zz0sd$getMapboxStyle, mergeStyles as $Zz0sd$mergeStyles, mapViewInfo as $Zz0sd$mapViewInfo, getMapPosition as $Zz0sd$getMapPosition, setMapPosition as $Zz0sd$setMapPosition} from "@macrostrat/mapbox-utils";
|
|
26
24
|
import $Zz0sd$chromajs from "chroma-js";
|
|
27
25
|
import {useTransition as $Zz0sd$useTransition} from "transition-hook";
|
|
28
26
|
import $Zz0sd$useresizeobserver from "use-resize-observer";
|
|
@@ -34,6 +32,22 @@ function $parcel$interopDefault(a) {
|
|
|
34
32
|
function $parcel$export(e, n, v, s) {
|
|
35
33
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
36
34
|
}
|
|
35
|
+
function $parcel$exportWildcard(dest, source) {
|
|
36
|
+
Object.keys(source).forEach(function(key) {
|
|
37
|
+
if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
Object.defineProperty(dest, key, {
|
|
42
|
+
enumerable: true,
|
|
43
|
+
get: function get() {
|
|
44
|
+
return source[key];
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
return dest;
|
|
50
|
+
}
|
|
37
51
|
var $6e914c81c8e053da$exports = {};
|
|
38
52
|
|
|
39
53
|
$parcel$export($6e914c81c8e053da$exports, "LoadingButton", () => $6e914c81c8e053da$export$4ec83e90d030b2f3);
|
|
@@ -45,710 +59,20 @@ $parcel$export($6e914c81c8e053da$exports, "FloatingNavbar", () => $6e914c81c8e05
|
|
|
45
59
|
var $fbe402416678c280$exports = {};
|
|
46
60
|
|
|
47
61
|
$parcel$export($fbe402416678c280$exports, "searchbar", () => $fbe402416678c280$export$2ac23befe9d406ee, (v) => $fbe402416678c280$export$2ac23befe9d406ee = v);
|
|
48
|
-
$parcel$export($fbe402416678c280$exports, "searchbar-holder", () => $fbe402416678c280$export$3a39e67bbbcbd4ae, (v) => $fbe402416678c280$export$3a39e67bbbcbd4ae = v);
|
|
49
62
|
$parcel$export($fbe402416678c280$exports, "status-tongue", () => $fbe402416678c280$export$764ade2d69041360, (v) => $fbe402416678c280$export$764ade2d69041360 = v);
|
|
63
|
+
$parcel$export($fbe402416678c280$exports, "searchbar-holder", () => $fbe402416678c280$export$3a39e67bbbcbd4ae, (v) => $fbe402416678c280$export$3a39e67bbbcbd4ae = v);
|
|
50
64
|
$parcel$export($fbe402416678c280$exports, "navbar-holder", () => $fbe402416678c280$export$d8779dd86528d602, (v) => $fbe402416678c280$export$d8779dd86528d602 = v);
|
|
51
65
|
var $fbe402416678c280$export$2ac23befe9d406ee;
|
|
52
|
-
var $fbe402416678c280$export$3a39e67bbbcbd4ae;
|
|
53
66
|
var $fbe402416678c280$export$764ade2d69041360;
|
|
67
|
+
var $fbe402416678c280$export$3a39e67bbbcbd4ae;
|
|
54
68
|
var $fbe402416678c280$export$d8779dd86528d602;
|
|
55
69
|
$fbe402416678c280$export$2ac23befe9d406ee = `_8hZKsW_searchbar`;
|
|
56
|
-
$fbe402416678c280$export$3a39e67bbbcbd4ae = `_8hZKsW_searchbar-holder`;
|
|
57
70
|
$fbe402416678c280$export$764ade2d69041360 = `_8hZKsW_status-tongue`;
|
|
71
|
+
$fbe402416678c280$export$3a39e67bbbcbd4ae = `_8hZKsW_searchbar-holder`;
|
|
58
72
|
$fbe402416678c280$export$d8779dd86528d602 = `_8hZKsW_navbar-holder`;
|
|
59
73
|
|
|
60
74
|
|
|
61
75
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
const $dc75c8651942e3cf$var$MapContext = (0, $Zz0sd$createContext)({
|
|
65
|
-
mapRef: null,
|
|
66
|
-
status: {
|
|
67
|
-
isLoading: false,
|
|
68
|
-
isInitialized: false,
|
|
69
|
-
isStyleLoaded: false
|
|
70
|
-
},
|
|
71
|
-
position: null
|
|
72
|
-
});
|
|
73
|
-
const $dc75c8651942e3cf$var$MapDispatchContext = (0, $Zz0sd$createContext)(null);
|
|
74
|
-
function $dc75c8651942e3cf$export$79926a38b577730c() {
|
|
75
|
-
const { mapRef: mapRef } = (0, $Zz0sd$useContext)($dc75c8651942e3cf$var$MapContext);
|
|
76
|
-
return (0, $Zz0sd$useMemo)(()=>mapRef, [
|
|
77
|
-
mapRef
|
|
78
|
-
]);
|
|
79
|
-
}
|
|
80
|
-
function $dc75c8651942e3cf$export$6b15394f69cd8f33() {
|
|
81
|
-
const { status: status } = (0, $Zz0sd$useContext)($dc75c8651942e3cf$var$MapContext);
|
|
82
|
-
return (0, $Zz0sd$useMemo)(()=>status, [
|
|
83
|
-
status
|
|
84
|
-
]);
|
|
85
|
-
}
|
|
86
|
-
function $dc75c8651942e3cf$export$549a71cd2d2e3945() {
|
|
87
|
-
const { position: position } = (0, $Zz0sd$useContext)($dc75c8651942e3cf$var$MapContext);
|
|
88
|
-
return (0, $Zz0sd$useMemo)(()=>position, [
|
|
89
|
-
position
|
|
90
|
-
]);
|
|
91
|
-
}
|
|
92
|
-
function $dc75c8651942e3cf$export$54c1e9a8bb896c95() {
|
|
93
|
-
return $dc75c8651942e3cf$export$79926a38b577730c().current;
|
|
94
|
-
}
|
|
95
|
-
function $dc75c8651942e3cf$export$86f8f9f08863e403() {
|
|
96
|
-
return $dc75c8651942e3cf$export$79926a38b577730c().current;
|
|
97
|
-
}
|
|
98
|
-
function $dc75c8651942e3cf$export$5705f0dc4c1a0684() {
|
|
99
|
-
return (0, $Zz0sd$useContext)($dc75c8651942e3cf$var$MapDispatchContext);
|
|
100
|
-
}
|
|
101
|
-
function $dc75c8651942e3cf$var$mapReducer(state, action) {
|
|
102
|
-
switch(action.type){
|
|
103
|
-
case "set-map":
|
|
104
|
-
return (0, $Zz0sd$immutabilityhelper)(state, {
|
|
105
|
-
mapRef: {
|
|
106
|
-
current: {
|
|
107
|
-
$set: action.payload
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
status: {
|
|
111
|
-
isInitialized: {
|
|
112
|
-
$set: true
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
case "set-loading":
|
|
117
|
-
return (0, $Zz0sd$immutabilityhelper)(state, {
|
|
118
|
-
status: {
|
|
119
|
-
isLoading: {
|
|
120
|
-
$set: action.payload
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
});
|
|
124
|
-
case "set-initialized":
|
|
125
|
-
return (0, $Zz0sd$immutabilityhelper)(state, {
|
|
126
|
-
status: {
|
|
127
|
-
isInitialized: {
|
|
128
|
-
$set: action.payload
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
case "set-style-loaded":
|
|
133
|
-
return (0, $Zz0sd$immutabilityhelper)(state, {
|
|
134
|
-
status: {
|
|
135
|
-
isStyleLoaded: {
|
|
136
|
-
$set: action.payload
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
case "map-moved":
|
|
141
|
-
return {
|
|
142
|
-
...state,
|
|
143
|
-
position: action.payload
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
function $dc75c8651942e3cf$export$5e21c9300e1e71dd({ children: children }) {
|
|
148
|
-
const mapRef = (0, $Zz0sd$useRef)();
|
|
149
|
-
const [value, dispatch] = (0, $Zz0sd$useReducer)($dc75c8651942e3cf$var$mapReducer, {
|
|
150
|
-
mapRef: mapRef,
|
|
151
|
-
status: {
|
|
152
|
-
isLoading: false,
|
|
153
|
-
isInitialized: false,
|
|
154
|
-
isStyleLoaded: false
|
|
155
|
-
},
|
|
156
|
-
position: null
|
|
157
|
-
});
|
|
158
|
-
return (0, $Zz0sd$macrostrathyper)($dc75c8651942e3cf$var$MapDispatchContext.Provider, {
|
|
159
|
-
value: dispatch
|
|
160
|
-
}, (0, $Zz0sd$macrostrathyper)($dc75c8651942e3cf$var$MapContext.Provider, {
|
|
161
|
-
value: value
|
|
162
|
-
}, children));
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
function $16a1a67d6c9c7904$export$447c40024480b3c0(url) {
|
|
169
|
-
return url.replace("mapbox://styles/", "https://api.mapbox.com/styles/v1/");
|
|
170
|
-
}
|
|
171
|
-
async function $16a1a67d6c9c7904$export$2f09cfe1b8810033(style, params) {
|
|
172
|
-
if (typeof style !== "string") return style;
|
|
173
|
-
// We fetch styles if they aren't avaialable locally
|
|
174
|
-
let { data: data , status: status , statusText: statusText } = await (0, $Zz0sd$axios).get($16a1a67d6c9c7904$export$447c40024480b3c0(style), {
|
|
175
|
-
params: params
|
|
176
|
-
});
|
|
177
|
-
if (status !== 200) throw new Error(`Returned ${status}: ${statusText}`);
|
|
178
|
-
return data;
|
|
179
|
-
}
|
|
180
|
-
function $16a1a67d6c9c7904$export$e618dc39ac9ad607(...styles) {
|
|
181
|
-
let merged = {
|
|
182
|
-
...styles[0]
|
|
183
|
-
};
|
|
184
|
-
merged.sources = {};
|
|
185
|
-
merged.layers = [];
|
|
186
|
-
for (let s of styles){
|
|
187
|
-
merged.sources = {
|
|
188
|
-
...merged.sources,
|
|
189
|
-
...s.sources ?? {}
|
|
190
|
-
};
|
|
191
|
-
merged.layers = merged.layers.concat(s.layers);
|
|
192
|
-
merged.sprite = s.sprite ?? merged.sprite;
|
|
193
|
-
merged.glyphs = s.glyphs ?? merged.glyphs;
|
|
194
|
-
}
|
|
195
|
-
return merged;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
function $98c914c8d92d896f$export$7c8062fb47f5c43d(map) {
|
|
201
|
-
const pos = map.getFreeCameraOptions();
|
|
202
|
-
const cameraPos = pos.position.toLngLat();
|
|
203
|
-
let center = map.getCenter();
|
|
204
|
-
return {
|
|
205
|
-
camera: {
|
|
206
|
-
...cameraPos,
|
|
207
|
-
altitude: pos.position.toAltitude(),
|
|
208
|
-
bearing: map.getBearing(),
|
|
209
|
-
pitch: map.getPitch()
|
|
210
|
-
},
|
|
211
|
-
target: {
|
|
212
|
-
...center,
|
|
213
|
-
zoom: map.getZoom()
|
|
214
|
-
}
|
|
215
|
-
};
|
|
216
|
-
}
|
|
217
|
-
function $98c914c8d92d896f$export$1362a5c98ca0069c(map, pos) {
|
|
218
|
-
const { pitch: pitch = 0 , bearing: bearing = 0 , altitude: altitude } = pos.camera;
|
|
219
|
-
const zoom = pos.target?.zoom;
|
|
220
|
-
if (zoom != null && altitude == null && pitch == 0 && bearing == 0) {
|
|
221
|
-
const { lng: lng , lat: lat } = pos.target;
|
|
222
|
-
map.setCenter([
|
|
223
|
-
lng,
|
|
224
|
-
lat
|
|
225
|
-
]);
|
|
226
|
-
map.setZoom(zoom);
|
|
227
|
-
} else {
|
|
228
|
-
const { altitude: altitude , lng: lng , lat: lat } = pos.camera;
|
|
229
|
-
const cameraOptions = new (0, $Zz0sd$FreeCameraOptions)((0, $Zz0sd$MercatorCoordinate).fromLngLat({
|
|
230
|
-
lng: lng,
|
|
231
|
-
lat: lat
|
|
232
|
-
}, altitude), [
|
|
233
|
-
0,
|
|
234
|
-
0,
|
|
235
|
-
0,
|
|
236
|
-
1
|
|
237
|
-
]);
|
|
238
|
-
cameraOptions.setPitchBearing(pitch, bearing);
|
|
239
|
-
map.setFreeCameraOptions(cameraOptions);
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
function $b2a9fc2ffc60e62a$export$df38eeea86a10661(mapPosition) {
|
|
245
|
-
if (mapPosition == null) return {
|
|
246
|
-
mapIsRotated: false,
|
|
247
|
-
mapUse3D: false,
|
|
248
|
-
mapIsGlobal: false,
|
|
249
|
-
mapIsLoaded: false
|
|
250
|
-
};
|
|
251
|
-
// Switch to 3D mode at high zoom levels or with a rotated map
|
|
252
|
-
const pitch = mapPosition.camera.pitch ?? 0;
|
|
253
|
-
const bearing = mapPosition.camera.bearing ?? 0;
|
|
254
|
-
const alt = mapPosition.camera.altitude ?? 10000000;
|
|
255
|
-
const mapIsRotated = pitch != 0 || bearing != 0;
|
|
256
|
-
const mapIsGlobal = alt > 1600000;
|
|
257
|
-
let mapUse3D = false;
|
|
258
|
-
if (alt != null) mapUse3D = pitch > 0 && alt < 200000 || alt < 80000;
|
|
259
|
-
return {
|
|
260
|
-
mapIsRotated: mapIsRotated,
|
|
261
|
-
mapUse3D: mapUse3D,
|
|
262
|
-
mapIsGlobal: mapIsGlobal,
|
|
263
|
-
mapIsLoaded: true
|
|
264
|
-
};
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
function $bcda9afd15d68a9e$export$51bcefc0d73330c9(style, shouldRemove = true) {
|
|
269
|
-
// Disable labels on the map
|
|
270
|
-
for (let lyr of style.layers){
|
|
271
|
-
if (!("layout" in lyr)) continue;
|
|
272
|
-
const isLabelLayer = lyr.layout["text-field"] != null;
|
|
273
|
-
if (isLabelLayer) lyr.layout.visibility = shouldRemove ? "none" : "visible";
|
|
274
|
-
}
|
|
275
|
-
return style;
|
|
276
|
-
}
|
|
277
|
-
function $bcda9afd15d68a9e$export$548ed77deac280c0(map, visible, omitLayers = []) {
|
|
278
|
-
// Disable labels on the map
|
|
279
|
-
for (let lyr of map.getStyle().layers){
|
|
280
|
-
if (!("layout" in lyr)) continue;
|
|
281
|
-
const isLabelLayer = lyr.layout["text-field"] != null;
|
|
282
|
-
if (isLabelLayer && !omitLayers.includes(lyr.id)) map.setLayoutProperty(lyr.id, "visibility", visible ? "visible" : "none");
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
function $6546e155d824deab$export$16b2de187fda836f(mapRef, state, operator) {
|
|
290
|
-
/** Apply conditional style logic depending on a state value or object.
|
|
291
|
-
* The operator function can operate on the Map and the state, and is applied on state changes
|
|
292
|
-
* and on style load events. */ (0, $Zz0sd$useEffect)(()=>{
|
|
293
|
-
const map = mapRef.current;
|
|
294
|
-
if (map == null) return;
|
|
295
|
-
if (map.isStyleLoaded()) operator(map, state);
|
|
296
|
-
const fn = ()=>operator(map, state);
|
|
297
|
-
map.on("style.load", fn);
|
|
298
|
-
return ()=>{
|
|
299
|
-
map.off("style.load", fn);
|
|
300
|
-
};
|
|
301
|
-
}, [
|
|
302
|
-
mapRef.current,
|
|
303
|
-
state
|
|
304
|
-
]);
|
|
305
|
-
}
|
|
306
|
-
const $6546e155d824deab$var$_toggleMapLabels = (map, state)=>(0, $bcda9afd15d68a9e$export$548ed77deac280c0)(map, state.mapShowLabels, state.omitLayers);
|
|
307
|
-
function $6546e155d824deab$export$44d1ca598b5a6a5a(mapRef, mapShowLabels, omitLayers = []) {
|
|
308
|
-
$6546e155d824deab$export$16b2de187fda836f(mapRef, {
|
|
309
|
-
mapShowLabels: mapShowLabels,
|
|
310
|
-
omitLayers: omitLayers
|
|
311
|
-
}, $6546e155d824deab$var$_toggleMapLabels);
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
function $e4df11ee33ce76ab$export$4bdc7a93a40ca832({ className: className , control: control , options: options = {} }) {
|
|
324
|
-
/** A wrapper for using Mapbox GL controls with a Mapbox GL map */ const mapRef = (0, $dc75c8651942e3cf$export$79926a38b577730c)();
|
|
325
|
-
const controlContainer = (0, $Zz0sd$useRef)();
|
|
326
|
-
const controlRef = (0, $Zz0sd$useRef)();
|
|
327
|
-
// Memoize the options object so that we don't continually recreate the control.
|
|
328
|
-
const _options = (0, $Zz0sd$useRef)(options);
|
|
329
|
-
(0, $Zz0sd$useEffect)(()=>{
|
|
330
|
-
_options.current = options;
|
|
331
|
-
}, Object.values(options));
|
|
332
|
-
(0, $Zz0sd$useEffect)(()=>{
|
|
333
|
-
if (mapRef.current == null) return;
|
|
334
|
-
const ctrl = new control(_options);
|
|
335
|
-
controlRef.current = ctrl;
|
|
336
|
-
const controlElement = ctrl.onAdd(mapRef.current);
|
|
337
|
-
controlContainer.current.appendChild(controlElement);
|
|
338
|
-
return ()=>{
|
|
339
|
-
controlRef.current?.onRemove();
|
|
340
|
-
};
|
|
341
|
-
}, [
|
|
342
|
-
mapRef.current,
|
|
343
|
-
controlContainer.current,
|
|
344
|
-
control,
|
|
345
|
-
_options
|
|
346
|
-
]);
|
|
347
|
-
return (0, $Zz0sd$macrostrathyper)("div.map-control-wrapper", {
|
|
348
|
-
className: className,
|
|
349
|
-
ref: controlContainer
|
|
350
|
-
});
|
|
351
|
-
}
|
|
352
|
-
function $e4df11ee33ce76ab$export$9618410ded3c9550({ className: className }) {
|
|
353
|
-
const map = (0, $dc75c8651942e3cf$export$54c1e9a8bb896c95)();
|
|
354
|
-
const [mapIsGlobe, setIsGlobe] = (0, $Zz0sd$useState)(false);
|
|
355
|
-
(0, $Zz0sd$useEffect)(()=>{
|
|
356
|
-
// @ts-ignore
|
|
357
|
-
let proj = map?.getProjection().name;
|
|
358
|
-
setIsGlobe(proj == "globe");
|
|
359
|
-
}, [
|
|
360
|
-
map
|
|
361
|
-
]);
|
|
362
|
-
const nextProj = mapIsGlobe ? "mercator" : "globe";
|
|
363
|
-
const icon = mapIsGlobe ? "map" : "globe";
|
|
364
|
-
return (0, $Zz0sd$macrostrathyper)("div.map-control.globe-control.mapboxgl-ctrl-group.mapboxgl-ctrl.mapbox-control", {
|
|
365
|
-
className: className
|
|
366
|
-
}, [
|
|
367
|
-
(0, $Zz0sd$macrostrathyper)("button.globe-control-button", {
|
|
368
|
-
onClick () {
|
|
369
|
-
if (map == null) return;
|
|
370
|
-
// @ts-ignore
|
|
371
|
-
map.setProjection(nextProj);
|
|
372
|
-
setIsGlobe(nextProj == "globe");
|
|
373
|
-
}
|
|
374
|
-
}, (0, $Zz0sd$macrostrathyper)((0, $Zz0sd$Icon), {
|
|
375
|
-
icon: icon
|
|
376
|
-
})),
|
|
377
|
-
]);
|
|
378
|
-
}
|
|
379
|
-
// Control for managing map 3D settings
|
|
380
|
-
class $e4df11ee33ce76ab$var$_ThreeDControl extends (0, $Zz0sd$mapboxglcontrolslibBaseBase) {
|
|
381
|
-
constructor(){
|
|
382
|
-
super();
|
|
383
|
-
this.button = new (0, $Zz0sd$mapboxglcontrolslibButtonButton)();
|
|
384
|
-
}
|
|
385
|
-
insert() {
|
|
386
|
-
this.addClassName("mapbox-3d");
|
|
387
|
-
this.button.setText("3D");
|
|
388
|
-
this.button.onClick(()=>{
|
|
389
|
-
this.map.easeTo({
|
|
390
|
-
pitch: 60,
|
|
391
|
-
duration: 1000
|
|
392
|
-
});
|
|
393
|
-
});
|
|
394
|
-
this.addButton(this.button);
|
|
395
|
-
}
|
|
396
|
-
onAddControl() {
|
|
397
|
-
this.insert();
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
function $e4df11ee33ce76ab$export$48c390f0a3a80b5c({ className: className , options: options }) {
|
|
401
|
-
return (0, $Zz0sd$macrostrathyper)($e4df11ee33ce76ab$export$4bdc7a93a40ca832, {
|
|
402
|
-
className: (0, $Zz0sd$classnames)("compass-control", className),
|
|
403
|
-
control: (0, $Zz0sd$CompassControl),
|
|
404
|
-
options: options
|
|
405
|
-
});
|
|
406
|
-
}
|
|
407
|
-
const $e4df11ee33ce76ab$export$dd36b6cb96de1ba3 = ({ className: className , options: options })=>(0, $Zz0sd$macrostrathyper)($e4df11ee33ce76ab$export$4bdc7a93a40ca832, {
|
|
408
|
-
className: (0, $Zz0sd$classnames)("zoom-control", className),
|
|
409
|
-
control: (0, $Zz0sd$ZoomControl),
|
|
410
|
-
options: options
|
|
411
|
-
});
|
|
412
|
-
const $e4df11ee33ce76ab$export$6074b9b7c7aefb14 = ({ className: className , options: options })=>(0, $Zz0sd$macrostrathyper)($e4df11ee33ce76ab$export$4bdc7a93a40ca832, {
|
|
413
|
-
className: (0, $Zz0sd$classnames)("map-3d-control", className),
|
|
414
|
-
control: $e4df11ee33ce76ab$var$_ThreeDControl,
|
|
415
|
-
options: options
|
|
416
|
-
});
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
function $a7719da14af16a6e$export$15ef564db477f342(shouldEnable = true, sourceName = "terrain", sourceCfg = {}) {
|
|
422
|
-
const mapRef = (0, $dc75c8651942e3cf$export$79926a38b577730c)();
|
|
423
|
-
const map = mapRef.current;
|
|
424
|
-
(0, $Zz0sd$useEffect)(()=>{
|
|
425
|
-
if (map == null) return;
|
|
426
|
-
$a7719da14af16a6e$export$3fe56b75a48fd245(map, shouldEnable, sourceName, sourceCfg);
|
|
427
|
-
map.on("style.load", ()=>{
|
|
428
|
-
$a7719da14af16a6e$export$3fe56b75a48fd245(map, shouldEnable, sourceName, sourceCfg);
|
|
429
|
-
});
|
|
430
|
-
}, [
|
|
431
|
-
map,
|
|
432
|
-
shouldEnable,
|
|
433
|
-
sourceName
|
|
434
|
-
]);
|
|
435
|
-
}
|
|
436
|
-
function $a7719da14af16a6e$export$3fe56b75a48fd245(map, shouldEnable = true, sourceName = "terrain", sourceCfg = {}) {
|
|
437
|
-
if (!map.isStyleLoaded()) return;
|
|
438
|
-
if (shouldEnable) $a7719da14af16a6e$var$addDefault3DStyles(map, sourceName, sourceCfg);
|
|
439
|
-
// Enable or disable terrain depending on our current desires...
|
|
440
|
-
const currentTerrain = map.getTerrain();
|
|
441
|
-
if (shouldEnable && currentTerrain == null) map.setTerrain({
|
|
442
|
-
source: sourceName,
|
|
443
|
-
exaggeration: 1
|
|
444
|
-
});
|
|
445
|
-
else if (!shouldEnable && currentTerrain != null) map.setTerrain(null);
|
|
446
|
-
}
|
|
447
|
-
function $a7719da14af16a6e$var$addDefault3DStyles(map, sourceName = "terrain", sourceCfg = {}) {
|
|
448
|
-
const style = map.getStyle();
|
|
449
|
-
const hasTerrain = Object.values(style.sources).some((source)=>source.type === "raster-dem");
|
|
450
|
-
const hasSky = Object.values(style.layers).some((lyr)=>lyr.type == "sky");
|
|
451
|
-
if (!hasTerrain) map.addSource(sourceName, {
|
|
452
|
-
type: "raster-dem",
|
|
453
|
-
url: "mapbox://mapbox.mapbox-terrain-dem-v1",
|
|
454
|
-
tileSize: 512,
|
|
455
|
-
maxzoom: 14,
|
|
456
|
-
...sourceCfg
|
|
457
|
-
});
|
|
458
|
-
if (!hasSky) map.addLayer({
|
|
459
|
-
id: "sky",
|
|
460
|
-
type: "sky",
|
|
461
|
-
paint: {
|
|
462
|
-
"sky-type": "atmosphere",
|
|
463
|
-
"sky-atmosphere-sun": [
|
|
464
|
-
0.0,
|
|
465
|
-
0.0
|
|
466
|
-
],
|
|
467
|
-
"sky-atmosphere-sun-intensity": 15
|
|
468
|
-
}
|
|
469
|
-
});
|
|
470
|
-
if (map.getFog() == null) map.setFog({
|
|
471
|
-
color: "#ffffff",
|
|
472
|
-
// @ts-ignore
|
|
473
|
-
"space-color": [
|
|
474
|
-
"interpolate",
|
|
475
|
-
[
|
|
476
|
-
"linear"
|
|
477
|
-
],
|
|
478
|
-
[
|
|
479
|
-
"zoom"
|
|
480
|
-
],
|
|
481
|
-
4,
|
|
482
|
-
"hsl(215, 28%, 64%)",
|
|
483
|
-
7,
|
|
484
|
-
"hsl(209, 92%, 85%)",
|
|
485
|
-
],
|
|
486
|
-
"star-intensity": [
|
|
487
|
-
"interpolate",
|
|
488
|
-
[
|
|
489
|
-
"linear"
|
|
490
|
-
],
|
|
491
|
-
[
|
|
492
|
-
"zoom"
|
|
493
|
-
],
|
|
494
|
-
5,
|
|
495
|
-
0.35,
|
|
496
|
-
6,
|
|
497
|
-
0
|
|
498
|
-
],
|
|
499
|
-
range: [
|
|
500
|
-
5,
|
|
501
|
-
15
|
|
502
|
-
]
|
|
503
|
-
});
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
function $f02df3b20102b6a0$export$e86da36f9a8e87e6({ mapRef: mapRef , ...rest }) {
|
|
510
|
-
const { showTileBoundaries: showTileBoundaries = false , showTerrainWireframe: showTerrainWireframe = false , showCollisionBoxes: showCollisionBoxes = false , } = rest;
|
|
511
|
-
const ref = mapRef ?? (0, $dc75c8651942e3cf$export$79926a38b577730c)();
|
|
512
|
-
(0, $Zz0sd$useEffect)(()=>{
|
|
513
|
-
const map = ref.current;
|
|
514
|
-
if (map == null) return;
|
|
515
|
-
map.showTileBoundaries = showTileBoundaries;
|
|
516
|
-
map.showTerrainWireframe = showTerrainWireframe;
|
|
517
|
-
map.showCollisionBoxes = showCollisionBoxes;
|
|
518
|
-
map.triggerRepaint();
|
|
519
|
-
}, [
|
|
520
|
-
ref.current,
|
|
521
|
-
showTileBoundaries,
|
|
522
|
-
showTerrainWireframe,
|
|
523
|
-
showCollisionBoxes,
|
|
524
|
-
]);
|
|
525
|
-
return null;
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
var $7bb837c4f3322cbf$exports = {};
|
|
535
|
-
|
|
536
|
-
$parcel$export($7bb837c4f3322cbf$exports, "out-of-padding", () => $7bb837c4f3322cbf$export$399131e3fb0c6003, (v) => $7bb837c4f3322cbf$export$399131e3fb0c6003 = v);
|
|
537
|
-
$parcel$export($7bb837c4f3322cbf$exports, "off-center", () => $7bb837c4f3322cbf$export$e6ac8d2c206db13b, (v) => $7bb837c4f3322cbf$export$e6ac8d2c206db13b = v);
|
|
538
|
-
$parcel$export($7bb837c4f3322cbf$exports, "recenter-button", () => $7bb837c4f3322cbf$export$5480dcd3f23bfd2f, (v) => $7bb837c4f3322cbf$export$5480dcd3f23bfd2f = v);
|
|
539
|
-
$parcel$export($7bb837c4f3322cbf$exports, "recenter-label", () => $7bb837c4f3322cbf$export$81903ae29a3b2493, (v) => $7bb837c4f3322cbf$export$81903ae29a3b2493 = v);
|
|
540
|
-
var $7bb837c4f3322cbf$export$399131e3fb0c6003;
|
|
541
|
-
var $7bb837c4f3322cbf$export$e6ac8d2c206db13b;
|
|
542
|
-
var $7bb837c4f3322cbf$export$5480dcd3f23bfd2f;
|
|
543
|
-
var $7bb837c4f3322cbf$export$81903ae29a3b2493;
|
|
544
|
-
$7bb837c4f3322cbf$export$399131e3fb0c6003 = `y-HzBG_out-of-padding`;
|
|
545
|
-
$7bb837c4f3322cbf$export$e6ac8d2c206db13b = `y-HzBG_off-center`;
|
|
546
|
-
$7bb837c4f3322cbf$export$5480dcd3f23bfd2f = `y-HzBG_recenter-button`;
|
|
547
|
-
$7bb837c4f3322cbf$export$81903ae29a3b2493 = `y-HzBG_recenter-label`;
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
const $ce8e9806d0af9d7a$var$h = (0, $Zz0sd$macrostrathyper).styled((0, (/*@__PURE__*/$parcel$interopDefault($7bb837c4f3322cbf$exports))));
|
|
552
|
-
let $ce8e9806d0af9d7a$export$381b754041286ee7;
|
|
553
|
-
(function(PositionFocusState1) {
|
|
554
|
-
PositionFocusState1[PositionFocusState1["CENTERED"] = 0] = "CENTERED";
|
|
555
|
-
PositionFocusState1[PositionFocusState1["NEAR_CENTER"] = 1] = "NEAR_CENTER";
|
|
556
|
-
PositionFocusState1[PositionFocusState1["OFF_CENTER"] = 2] = "OFF_CENTER";
|
|
557
|
-
PositionFocusState1[PositionFocusState1["OUT_OF_PADDING"] = 3] = "OUT_OF_PADDING";
|
|
558
|
-
PositionFocusState1[PositionFocusState1["OUT_OF_VIEW"] = 4] = "OUT_OF_VIEW";
|
|
559
|
-
})($ce8e9806d0af9d7a$export$381b754041286ee7 || ($ce8e9806d0af9d7a$export$381b754041286ee7 = {}));
|
|
560
|
-
function $ce8e9806d0af9d7a$export$8b404ce881070dbb(pos) {
|
|
561
|
-
switch(pos){
|
|
562
|
-
case $ce8e9806d0af9d7a$export$381b754041286ee7.CENTERED:
|
|
563
|
-
return "centered";
|
|
564
|
-
case $ce8e9806d0af9d7a$export$381b754041286ee7.NEAR_CENTER:
|
|
565
|
-
return "near-center";
|
|
566
|
-
case $ce8e9806d0af9d7a$export$381b754041286ee7.OFF_CENTER:
|
|
567
|
-
return "off-center";
|
|
568
|
-
case $ce8e9806d0af9d7a$export$381b754041286ee7.OUT_OF_PADDING:
|
|
569
|
-
return "out-of-padding";
|
|
570
|
-
case $ce8e9806d0af9d7a$export$381b754041286ee7.OUT_OF_VIEW:
|
|
571
|
-
return "out-of-view";
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
function $ce8e9806d0af9d7a$export$74dc4d71c4c9a90e(pos) {
|
|
575
|
-
switch(pos){
|
|
576
|
-
case $ce8e9806d0af9d7a$export$381b754041286ee7.CENTERED:
|
|
577
|
-
case $ce8e9806d0af9d7a$export$381b754041286ee7.NEAR_CENTER:
|
|
578
|
-
return (0, $Zz0sd$Intent).NONE;
|
|
579
|
-
case $ce8e9806d0af9d7a$export$381b754041286ee7.OFF_CENTER:
|
|
580
|
-
return (0, $Zz0sd$Intent).PRIMARY;
|
|
581
|
-
case $ce8e9806d0af9d7a$export$381b754041286ee7.OUT_OF_PADDING:
|
|
582
|
-
return (0, $Zz0sd$Intent).SUCCESS;
|
|
583
|
-
case $ce8e9806d0af9d7a$export$381b754041286ee7.OUT_OF_VIEW:
|
|
584
|
-
return (0, $Zz0sd$Intent).WARNING;
|
|
585
|
-
}
|
|
586
|
-
}
|
|
587
|
-
function $ce8e9806d0af9d7a$export$7bd3facfe20e158a(position, padding) {
|
|
588
|
-
const mapRef = (0, $dc75c8651942e3cf$export$79926a38b577730c)();
|
|
589
|
-
const prevPosition = (0, $Zz0sd$useRef)(null);
|
|
590
|
-
const prevPadding = (0, $Zz0sd$useRef)(null);
|
|
591
|
-
// Handle map position easing (for both map padding and markers)
|
|
592
|
-
(0, $Zz0sd$useEffect)(()=>{
|
|
593
|
-
const map = mapRef.current;
|
|
594
|
-
if (map == null) return;
|
|
595
|
-
let opts = null;
|
|
596
|
-
if (position != prevPosition.current) {
|
|
597
|
-
opts ??= {};
|
|
598
|
-
opts.center = position;
|
|
599
|
-
}
|
|
600
|
-
if (padding != prevPadding.current) {
|
|
601
|
-
opts ??= {};
|
|
602
|
-
opts.padding = padding;
|
|
603
|
-
}
|
|
604
|
-
if (opts == null) return;
|
|
605
|
-
opts.duration = 800;
|
|
606
|
-
map.flyTo(opts);
|
|
607
|
-
map.once("moveend", ()=>{
|
|
608
|
-
/* Waiting until moveend to update the refs allows us to
|
|
609
|
-
batch overlapping movements together, which increases UI
|
|
610
|
-
smoothness when, e.g., flying to new panels */ prevPosition.current = position;
|
|
611
|
-
prevPadding.current = padding;
|
|
612
|
-
});
|
|
613
|
-
}, [
|
|
614
|
-
position,
|
|
615
|
-
padding
|
|
616
|
-
]);
|
|
617
|
-
}
|
|
618
|
-
function $ce8e9806d0af9d7a$var$greatCircleDistance(l1, l2) {
|
|
619
|
-
// get distance in radians between l1 and l2
|
|
620
|
-
const dLon = (l2[0] - l1[0]) * Math.PI / 180;
|
|
621
|
-
// Spherical law of cosines (accurate at large distances)
|
|
622
|
-
const lat1 = l1[1] * Math.PI / 180;
|
|
623
|
-
const lat2 = l2[1] * Math.PI / 180;
|
|
624
|
-
return Math.acos(Math.sin(lat1) * Math.sin(lat2) + Math.cos(lat1) * Math.cos(lat2) * Math.cos(dLon));
|
|
625
|
-
}
|
|
626
|
-
function $ce8e9806d0af9d7a$export$30e71709a35235ad(map, location) {
|
|
627
|
-
/** Determine whether the infomarker is positioned in the viewport */ if (location == null) return null;
|
|
628
|
-
const mapCenter = map.getCenter();
|
|
629
|
-
if (location.hasOwnProperty("lng") && location.hasOwnProperty("lat")) location = [
|
|
630
|
-
location.lng,
|
|
631
|
-
location.lat
|
|
632
|
-
];
|
|
633
|
-
if (!(location instanceof Array)) {
|
|
634
|
-
// Get geometry bounding box
|
|
635
|
-
const bounds = (0, $Zz0sd$turfbbox)(location);
|
|
636
|
-
location = [
|
|
637
|
-
(bounds[0] + bounds[2]) / 2,
|
|
638
|
-
(bounds[1] + bounds[3]) / 2
|
|
639
|
-
];
|
|
640
|
-
// For non-points this is extremely simplistic at the moment
|
|
641
|
-
}
|
|
642
|
-
const dist = $ce8e9806d0af9d7a$var$greatCircleDistance(location, mapCenter);
|
|
643
|
-
if (dist > Math.PI / 4) return $ce8e9806d0af9d7a$export$381b754041286ee7.OFF_CENTER;
|
|
644
|
-
else if (dist > Math.PI / 2) return $ce8e9806d0af9d7a$export$381b754041286ee7.OUT_OF_VIEW;
|
|
645
|
-
const markerPos = map.project(location);
|
|
646
|
-
const mapPos = map.project(mapCenter);
|
|
647
|
-
const dx = Math.abs(markerPos.x - mapPos.x);
|
|
648
|
-
const dy = Math.abs(markerPos.y - mapPos.y);
|
|
649
|
-
const padding = map.getPadding();
|
|
650
|
-
let { width: width , height: height } = map.getCanvas();
|
|
651
|
-
width /= 2;
|
|
652
|
-
height /= 2;
|
|
653
|
-
if (dx < 10 && dy < 10) return $ce8e9806d0af9d7a$export$381b754041286ee7.CENTERED;
|
|
654
|
-
if (dx < 150 && dy < 150) return $ce8e9806d0af9d7a$export$381b754041286ee7.NEAR_CENTER;
|
|
655
|
-
if (markerPos.x > padding.left && markerPos.x < width - padding.right && markerPos.y > padding.top && markerPos.y < height - padding.bottom) return $ce8e9806d0af9d7a$export$381b754041286ee7.OFF_CENTER;
|
|
656
|
-
if (markerPos.x > 0 && markerPos.x < width && markerPos.y > 0 && markerPos.y < height) return $ce8e9806d0af9d7a$export$381b754041286ee7.OUT_OF_PADDING;
|
|
657
|
-
return $ce8e9806d0af9d7a$export$381b754041286ee7.OUT_OF_VIEW;
|
|
658
|
-
}
|
|
659
|
-
function $ce8e9806d0af9d7a$export$ae79915617215704(position) {
|
|
660
|
-
const map = (0, $dc75c8651942e3cf$export$79926a38b577730c)();
|
|
661
|
-
const [focusState, setFocusState] = (0, $Zz0sd$useState)(null);
|
|
662
|
-
(0, $Zz0sd$useEffect)(()=>{
|
|
663
|
-
if (map.current == null || position == null) return;
|
|
664
|
-
const cb = ()=>{
|
|
665
|
-
setFocusState($ce8e9806d0af9d7a$export$30e71709a35235ad(map.current, position));
|
|
666
|
-
};
|
|
667
|
-
map.current?.on("move", cb);
|
|
668
|
-
cb();
|
|
669
|
-
return ()=>{
|
|
670
|
-
map.current?.off("move", cb);
|
|
671
|
-
};
|
|
672
|
-
}, [
|
|
673
|
-
map.current,
|
|
674
|
-
position
|
|
675
|
-
]);
|
|
676
|
-
return focusState;
|
|
677
|
-
}
|
|
678
|
-
function $ce8e9806d0af9d7a$export$ef19914521000df2(focusState) {
|
|
679
|
-
return focusState == $ce8e9806d0af9d7a$export$381b754041286ee7.CENTERED || focusState == $ce8e9806d0af9d7a$export$381b754041286ee7.NEAR_CENTER;
|
|
680
|
-
}
|
|
681
|
-
function $ce8e9806d0af9d7a$var$getCenterAndBestZoom(input) {
|
|
682
|
-
let box;
|
|
683
|
-
let center = null;
|
|
684
|
-
let zoom = null;
|
|
685
|
-
if (input instanceof Array) {
|
|
686
|
-
if (input.length === 2) point = input;
|
|
687
|
-
else if (input.length === 4) box = input;
|
|
688
|
-
}
|
|
689
|
-
if (input.hasOwnProperty("lat") && input.hasOwnProperty("lng")) center = [
|
|
690
|
-
input.lng,
|
|
691
|
-
input.lat
|
|
692
|
-
];
|
|
693
|
-
// If input is a geometry, get its bounding box
|
|
694
|
-
if (input.hasOwnProperty("type")) {
|
|
695
|
-
if (input.type === "Point") center = input.coordinates;
|
|
696
|
-
else box = (0, $Zz0sd$turfbbox)(input);
|
|
697
|
-
}
|
|
698
|
-
if (box != null) {
|
|
699
|
-
center = [
|
|
700
|
-
(box[0] + box[2]) / 2,
|
|
701
|
-
(box[1] + box[3]) / 2
|
|
702
|
-
];
|
|
703
|
-
const dist = $ce8e9806d0af9d7a$var$greatCircleDistance(center, [
|
|
704
|
-
box[0],
|
|
705
|
-
box[1]
|
|
706
|
-
]);
|
|
707
|
-
zoom = Math.log2(Math.PI * 2 / dist) - 1;
|
|
708
|
-
}
|
|
709
|
-
return {
|
|
710
|
-
center: center,
|
|
711
|
-
zoom: zoom
|
|
712
|
-
};
|
|
713
|
-
}
|
|
714
|
-
function $ce8e9806d0af9d7a$export$914b296afaaf39f6({ location: location , className: className , easeDuration: easeDuration = 800 , focusState: focusState = null , ...rest }) {
|
|
715
|
-
const map = (0, $dc75c8651942e3cf$export$79926a38b577730c)();
|
|
716
|
-
const defaultFocusState = $ce8e9806d0af9d7a$export$ae79915617215704(location);
|
|
717
|
-
focusState ??= defaultFocusState;
|
|
718
|
-
const _isCentered = $ce8e9806d0af9d7a$export$ef19914521000df2(focusState);
|
|
719
|
-
return $ce8e9806d0af9d7a$var$h((0, $Zz0sd$Button), {
|
|
720
|
-
minimal: true,
|
|
721
|
-
icon: "map-marker",
|
|
722
|
-
onClick () {
|
|
723
|
-
if (focusState == $ce8e9806d0af9d7a$export$381b754041286ee7.CENTERED) map.current?.resetNorth();
|
|
724
|
-
else {
|
|
725
|
-
let opts = {
|
|
726
|
-
duration: easeDuration
|
|
727
|
-
};
|
|
728
|
-
const { center: center , zoom: zoom } = $ce8e9806d0af9d7a$var$getCenterAndBestZoom(location);
|
|
729
|
-
if (center == null) return;
|
|
730
|
-
else opts = {
|
|
731
|
-
...opts,
|
|
732
|
-
center: center
|
|
733
|
-
};
|
|
734
|
-
if (zoom != null) opts = {
|
|
735
|
-
...opts,
|
|
736
|
-
zoom: zoom
|
|
737
|
-
};
|
|
738
|
-
map.current?.flyTo(opts);
|
|
739
|
-
}
|
|
740
|
-
},
|
|
741
|
-
className: (0, $Zz0sd$classnames)("recenter-button", className, $ce8e9806d0af9d7a$export$8b404ce881070dbb(focusState)),
|
|
742
|
-
intent: $ce8e9806d0af9d7a$export$74dc4d71c4c9a90e(focusState),
|
|
743
|
-
...rest
|
|
744
|
-
}, [
|
|
745
|
-
_isCentered ? null : $ce8e9806d0af9d7a$var$h("span.recenter-label", "Recenter")
|
|
746
|
-
]);
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
76
|
const $6e914c81c8e053da$var$h = (0, $Zz0sd$macrostrathyper).styled((0, (/*@__PURE__*/$parcel$interopDefault($fbe402416678c280$exports))));
|
|
753
77
|
const $6e914c81c8e053da$var$spinnerElement = $6e914c81c8e053da$var$h((0, $Zz0sd$Spinner), {
|
|
754
78
|
size: 16
|
|
@@ -763,7 +87,7 @@ function $6e914c81c8e053da$export$4ec83e90d030b2f3({ isLoading: isLoading = fals
|
|
|
763
87
|
});
|
|
764
88
|
}
|
|
765
89
|
function $6e914c81c8e053da$export$9e3bae3c08bde368(props) {
|
|
766
|
-
const { isLoading: isLoading } = (0, $
|
|
90
|
+
const { isLoading: isLoading } = (0, $Zz0sd$useMapStatus)();
|
|
767
91
|
const mapIsLoading = (0, $Zz0sd$useMemo)(()=>isLoading, [
|
|
768
92
|
isLoading
|
|
769
93
|
]);
|
|
@@ -798,33 +122,33 @@ $parcel$export($f50c3537aaff0cff$exports, "LocationPanel", () => $f50c3537aaff0c
|
|
|
798
122
|
|
|
799
123
|
var $29ab0212ea6844d0$exports = {};
|
|
800
124
|
|
|
801
|
-
$parcel$export($29ab0212ea6844d0$exports, "infodrawer-header-item", () => $29ab0212ea6844d0$export$333d72514239bce8, (v) => $29ab0212ea6844d0$export$333d72514239bce8 = v);
|
|
802
|
-
$parcel$export($29ab0212ea6844d0$exports, "position-controls", () => $29ab0212ea6844d0$export$dfae07a3bf0fbd6, (v) => $29ab0212ea6844d0$export$dfae07a3bf0fbd6 = v);
|
|
803
125
|
$parcel$export($29ab0212ea6844d0$exports, "infodrawer-body", () => $29ab0212ea6844d0$export$310e8f86a84c074f, (v) => $29ab0212ea6844d0$export$310e8f86a84c074f = v);
|
|
804
|
-
$parcel$export($29ab0212ea6844d0$exports, "location-panel-header", () => $29ab0212ea6844d0$export$d821beb98a87c6d7, (v) => $29ab0212ea6844d0$export$d821beb98a87c6d7 = v);
|
|
805
|
-
$parcel$export($29ab0212ea6844d0$exports, "left-icon", () => $29ab0212ea6844d0$export$f750577db09821ce, (v) => $29ab0212ea6844d0$export$f750577db09821ce = v);
|
|
806
126
|
$parcel$export($29ab0212ea6844d0$exports, "loading", () => $29ab0212ea6844d0$export$46c1c92549715335, (v) => $29ab0212ea6844d0$export$46c1c92549715335 = v);
|
|
127
|
+
$parcel$export($29ab0212ea6844d0$exports, "location-panel-header", () => $29ab0212ea6844d0$export$d821beb98a87c6d7, (v) => $29ab0212ea6844d0$export$d821beb98a87c6d7 = v);
|
|
128
|
+
$parcel$export($29ab0212ea6844d0$exports, "infodrawer-header-item", () => $29ab0212ea6844d0$export$333d72514239bce8, (v) => $29ab0212ea6844d0$export$333d72514239bce8 = v);
|
|
807
129
|
$parcel$export($29ab0212ea6844d0$exports, "spacer", () => $29ab0212ea6844d0$export$8cc075c801fd6817, (v) => $29ab0212ea6844d0$export$8cc075c801fd6817 = v);
|
|
808
|
-
$parcel$export($29ab0212ea6844d0$exports, "
|
|
130
|
+
$parcel$export($29ab0212ea6844d0$exports, "left-icon", () => $29ab0212ea6844d0$export$f750577db09821ce, (v) => $29ab0212ea6844d0$export$f750577db09821ce = v);
|
|
131
|
+
$parcel$export($29ab0212ea6844d0$exports, "position-controls", () => $29ab0212ea6844d0$export$dfae07a3bf0fbd6, (v) => $29ab0212ea6844d0$export$dfae07a3bf0fbd6 = v);
|
|
809
132
|
$parcel$export($29ab0212ea6844d0$exports, "copy-link-button", () => $29ab0212ea6844d0$export$d1352d0c31a65024, (v) => $29ab0212ea6844d0$export$d1352d0c31a65024 = v);
|
|
810
|
-
|
|
811
|
-
var $29ab0212ea6844d0$export$dfae07a3bf0fbd6;
|
|
133
|
+
$parcel$export($29ab0212ea6844d0$exports, "infodrawer", () => $29ab0212ea6844d0$export$b5017f7ff265217d, (v) => $29ab0212ea6844d0$export$b5017f7ff265217d = v);
|
|
812
134
|
var $29ab0212ea6844d0$export$310e8f86a84c074f;
|
|
813
|
-
var $29ab0212ea6844d0$export$d821beb98a87c6d7;
|
|
814
|
-
var $29ab0212ea6844d0$export$f750577db09821ce;
|
|
815
135
|
var $29ab0212ea6844d0$export$46c1c92549715335;
|
|
136
|
+
var $29ab0212ea6844d0$export$d821beb98a87c6d7;
|
|
137
|
+
var $29ab0212ea6844d0$export$333d72514239bce8;
|
|
816
138
|
var $29ab0212ea6844d0$export$8cc075c801fd6817;
|
|
817
|
-
var $29ab0212ea6844d0$export$
|
|
139
|
+
var $29ab0212ea6844d0$export$f750577db09821ce;
|
|
140
|
+
var $29ab0212ea6844d0$export$dfae07a3bf0fbd6;
|
|
818
141
|
var $29ab0212ea6844d0$export$d1352d0c31a65024;
|
|
819
|
-
$29ab0212ea6844d0$export$
|
|
820
|
-
$29ab0212ea6844d0$export$dfae07a3bf0fbd6 = `VPa3-W_position-controls`;
|
|
142
|
+
var $29ab0212ea6844d0$export$b5017f7ff265217d;
|
|
821
143
|
$29ab0212ea6844d0$export$310e8f86a84c074f = `VPa3-W_infodrawer-body`;
|
|
822
|
-
$29ab0212ea6844d0$export$d821beb98a87c6d7 = `VPa3-W_location-panel-header`;
|
|
823
|
-
$29ab0212ea6844d0$export$f750577db09821ce = `VPa3-W_left-icon`;
|
|
824
144
|
$29ab0212ea6844d0$export$46c1c92549715335 = `VPa3-W_loading`;
|
|
145
|
+
$29ab0212ea6844d0$export$d821beb98a87c6d7 = `VPa3-W_location-panel-header`;
|
|
146
|
+
$29ab0212ea6844d0$export$333d72514239bce8 = `VPa3-W_infodrawer-header-item`;
|
|
825
147
|
$29ab0212ea6844d0$export$8cc075c801fd6817 = `VPa3-W_spacer`;
|
|
826
|
-
$29ab0212ea6844d0$export$
|
|
148
|
+
$29ab0212ea6844d0$export$f750577db09821ce = `VPa3-W_left-icon`;
|
|
149
|
+
$29ab0212ea6844d0$export$dfae07a3bf0fbd6 = `VPa3-W_position-controls`;
|
|
827
150
|
$29ab0212ea6844d0$export$d1352d0c31a65024 = `VPa3-W_copy-link-button`;
|
|
151
|
+
$29ab0212ea6844d0$export$b5017f7ff265217d = `VPa3-W_infodrawer`;
|
|
828
152
|
|
|
829
153
|
|
|
830
154
|
|
|
@@ -1000,160 +324,47 @@ function $962bc0f04255cfc3$export$8b052fe25089340e(key1, initialState, isValid =
|
|
|
1000
324
|
]);
|
|
1001
325
|
if (!validator(initialValue)) initialValue = null;
|
|
1002
326
|
const [state1, _setState] = (0, $Zz0sd$useState)(initialValue ?? initialState);
|
|
1003
|
-
const setState = (0, $Zz0sd$useCallback)((nextState, validate = true)=>{
|
|
1004
|
-
if (validate && !validator(nextState)) throw `State ${nextState} is not valid.`;
|
|
1005
|
-
_setState(nextState);
|
|
1006
|
-
storage.set(nextState);
|
|
1007
|
-
}, [
|
|
1008
|
-
validator
|
|
1009
|
-
]);
|
|
1010
|
-
const resetState = (0, $Zz0sd$useCallback)(()=>{
|
|
1011
|
-
_setState(initialState);
|
|
1012
|
-
storage.remove();
|
|
1013
|
-
}, [
|
|
1014
|
-
initialState
|
|
1015
|
-
]);
|
|
1016
|
-
return [
|
|
1017
|
-
state1,
|
|
1018
|
-
setState,
|
|
1019
|
-
resetState
|
|
1020
|
-
];
|
|
1021
|
-
}
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
const $70366c8972398d2a$var$systemDarkMode = ()=>({
|
|
1031
|
-
isEnabled: $70366c8972398d2a$var$matcher?.matches ?? false,
|
|
1032
|
-
isAutoset: true
|
|
1033
|
-
});
|
|
1034
|
-
const $70366c8972398d2a$var$ValueContext = (0, $Zz0sd$createContext)({
|
|
1035
|
-
isEnabled: false,
|
|
1036
|
-
isAutoset: false
|
|
1037
|
-
});
|
|
1038
|
-
const $70366c8972398d2a$var$UpdaterContext = (0, $Zz0sd$createContext)(null);
|
|
1039
|
-
const $70366c8972398d2a$var$matcher = window?.matchMedia("(prefers-color-scheme: dark)");
|
|
1040
|
-
const $70366c8972398d2a$var$_DarkModeProvider = (props)=>{
|
|
1041
|
-
const { addBodyClasses: addBodyClasses = true , isEnabled: isEnabled1 , followSystem: followSystem = false , children: children , } = props;
|
|
1042
|
-
const [storedValue, updateValue, resetState] = (0, $962bc0f04255cfc3$export$8b052fe25089340e)("ui-dark-mode", $70366c8972398d2a$var$systemDarkMode());
|
|
1043
|
-
// Guards so that we don't error on an invalid stored value
|
|
1044
|
-
const value = {
|
|
1045
|
-
isEnabled: storedValue?.isEnabled ?? false,
|
|
1046
|
-
isAutoset: storedValue?.isAutoset ?? false
|
|
1047
|
-
};
|
|
1048
|
-
(0, $Zz0sd$useEffect)(()=>{
|
|
1049
|
-
if (!followSystem) return;
|
|
1050
|
-
updateValue($70366c8972398d2a$var$systemDarkMode());
|
|
1051
|
-
}, []);
|
|
1052
|
-
(0, $Zz0sd$useEffect)(()=>{
|
|
1053
|
-
// Update value if isEnabled is provided
|
|
1054
|
-
if (isEnabled1 == null) return;
|
|
1055
|
-
updateValue({
|
|
1056
|
-
isAutoset: false,
|
|
1057
|
-
isEnabled: isEnabled1
|
|
1058
|
-
});
|
|
1059
|
-
}, [
|
|
1060
|
-
isEnabled1
|
|
1061
|
-
]);
|
|
1062
|
-
// Manage dark mode body classes
|
|
1063
|
-
(0, $Zz0sd$useEffect)(()=>{
|
|
1064
|
-
if (!addBodyClasses) return;
|
|
1065
|
-
if (value.isEnabled) document.body.classList.add("bp4-dark");
|
|
1066
|
-
else document.body.classList.remove("bp4-dark");
|
|
1067
|
-
}, [
|
|
1068
|
-
storedValue
|
|
1069
|
-
]);
|
|
1070
|
-
const update = (enabled)=>{
|
|
1071
|
-
if (enabled == null) return resetState();
|
|
1072
|
-
const isEnabled = enabled ?? !value.isEnabled;
|
|
1073
|
-
updateValue({
|
|
1074
|
-
isAutoset: false,
|
|
1075
|
-
isEnabled: isEnabled
|
|
1076
|
-
});
|
|
1077
|
-
};
|
|
1078
|
-
const onSystemChange = (0, $Zz0sd$useCallback)((e)=>{
|
|
1079
|
-
if (value.isAutoset || followSystem) updateValue($70366c8972398d2a$var$systemDarkMode());
|
|
1080
|
-
}, [
|
|
1081
|
-
value.isAutoset,
|
|
1082
|
-
followSystem
|
|
1083
|
-
]);
|
|
1084
|
-
(0, $Zz0sd$useEffect)(()=>{
|
|
1085
|
-
if ($70366c8972398d2a$var$matcher == null) return;
|
|
1086
|
-
$70366c8972398d2a$var$matcher.addEventListener("change", onSystemChange);
|
|
1087
|
-
return ()=>{
|
|
1088
|
-
$70366c8972398d2a$var$matcher.removeEventListener("change", onSystemChange);
|
|
1089
|
-
};
|
|
1090
|
-
}, [
|
|
1091
|
-
onSystemChange
|
|
1092
|
-
]);
|
|
1093
|
-
return (0, $Zz0sd$macrostrathyper)($70366c8972398d2a$var$ValueContext.Provider, {
|
|
1094
|
-
value: value
|
|
1095
|
-
}, (0, $Zz0sd$macrostrathyper)($70366c8972398d2a$var$UpdaterContext.Provider, {
|
|
1096
|
-
value: update
|
|
1097
|
-
}, children));
|
|
1098
|
-
};
|
|
1099
|
-
const $70366c8972398d2a$export$6c869dfd601c964b = (props)=>{
|
|
1100
|
-
// Ensure that only one provider is active for an application
|
|
1101
|
-
const parentCtx = (0, $Zz0sd$useContext)($70366c8972398d2a$var$UpdaterContext);
|
|
1102
|
-
if (parentCtx != null) return props.children ?? null;
|
|
1103
|
-
return (0, $Zz0sd$macrostrathyper)($70366c8972398d2a$var$_DarkModeProvider, props);
|
|
1104
|
-
};
|
|
1105
|
-
const $70366c8972398d2a$export$4673cbff94e146e2 = ()=>(0, $Zz0sd$useContext)($70366c8972398d2a$var$ValueContext);
|
|
1106
|
-
const $70366c8972398d2a$export$da73e849bfb9b978 = ()=>$70366c8972398d2a$export$4673cbff94e146e2()?.isEnabled ?? false;
|
|
1107
|
-
const $70366c8972398d2a$export$2158f0320fd21632 = ()=>(0, $Zz0sd$useContext)($70366c8972398d2a$var$UpdaterContext);
|
|
1108
|
-
const $70366c8972398d2a$export$4ca1a7f9e076e79b = (props)=>{
|
|
1109
|
-
const { allowReset: allowReset = true , showText: showText = false , children: children , ...rest } = props;
|
|
1110
|
-
const { isEnabled: isEnabled , isAutoset: isAutoset } = $70366c8972398d2a$export$4673cbff94e146e2();
|
|
1111
|
-
const icon = isEnabled ? "flash" : "moon";
|
|
1112
|
-
const update = $70366c8972398d2a$export$2158f0320fd21632();
|
|
1113
|
-
const onClick = (event)=>{
|
|
1114
|
-
if (update == null) {
|
|
1115
|
-
console.warn("No DarkModeProvider is available");
|
|
1116
|
-
return;
|
|
1117
|
-
}
|
|
1118
|
-
if (allowReset && event.shiftKey) {
|
|
1119
|
-
update(null);
|
|
1120
|
-
return;
|
|
1121
|
-
}
|
|
1122
|
-
update(!isEnabled);
|
|
1123
|
-
};
|
|
1124
|
-
const active = !isAutoset;
|
|
1125
|
-
return (0, $Zz0sd$macrostrathyper)((0, $Zz0sd$Button), {
|
|
1126
|
-
active: active,
|
|
1127
|
-
...rest,
|
|
1128
|
-
icon: icon,
|
|
1129
|
-
onClick: onClick
|
|
327
|
+
const setState = (0, $Zz0sd$useCallback)((nextState, validate = true)=>{
|
|
328
|
+
if (validate && !validator(nextState)) throw `State ${nextState} is not valid.`;
|
|
329
|
+
_setState(nextState);
|
|
330
|
+
storage.set(nextState);
|
|
1130
331
|
}, [
|
|
1131
|
-
|
|
1132
|
-
isEnabled ? "Light" : "Dark"
|
|
1133
|
-
]),
|
|
1134
|
-
children,
|
|
332
|
+
validator
|
|
1135
333
|
]);
|
|
1136
|
-
|
|
334
|
+
const resetState = (0, $Zz0sd$useCallback)(()=>{
|
|
335
|
+
_setState(initialState);
|
|
336
|
+
storage.remove();
|
|
337
|
+
}, [
|
|
338
|
+
initialState
|
|
339
|
+
]);
|
|
340
|
+
return [
|
|
341
|
+
state1,
|
|
342
|
+
setState,
|
|
343
|
+
resetState
|
|
344
|
+
];
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
|
|
1137
348
|
|
|
1138
349
|
|
|
1139
350
|
|
|
1140
351
|
var $439cdbb36f71c7cb$exports = {};
|
|
1141
352
|
|
|
1142
|
-
$parcel$export($439cdbb36f71c7cb$exports, "flex-spacer", () => $439cdbb36f71c7cb$export$b3bb2ed7c69eb53c, (v) => $439cdbb36f71c7cb$export$b3bb2ed7c69eb53c = v);
|
|
1143
353
|
$parcel$export($439cdbb36f71c7cb$exports, "flex-row", () => $439cdbb36f71c7cb$export$1ec2a4762acd7aec, (v) => $439cdbb36f71c7cb$export$1ec2a4762acd7aec = v);
|
|
354
|
+
$parcel$export($439cdbb36f71c7cb$exports, "json-view-container", () => $439cdbb36f71c7cb$export$34a5cf3b4678f4f4, (v) => $439cdbb36f71c7cb$export$34a5cf3b4678f4f4 = v);
|
|
1144
355
|
$parcel$export($439cdbb36f71c7cb$exports, "root-hidden", () => $439cdbb36f71c7cb$export$e525b52bb498dd65, (v) => $439cdbb36f71c7cb$export$e525b52bb498dd65 = v);
|
|
1145
356
|
$parcel$export($439cdbb36f71c7cb$exports, "flex-col", () => $439cdbb36f71c7cb$export$39076b5dbe08a0a4, (v) => $439cdbb36f71c7cb$export$39076b5dbe08a0a4 = v);
|
|
1146
|
-
$parcel$export($439cdbb36f71c7cb$exports, "
|
|
1147
|
-
var $439cdbb36f71c7cb$export$b3bb2ed7c69eb53c;
|
|
357
|
+
$parcel$export($439cdbb36f71c7cb$exports, "flex-spacer", () => $439cdbb36f71c7cb$export$b3bb2ed7c69eb53c, (v) => $439cdbb36f71c7cb$export$b3bb2ed7c69eb53c = v);
|
|
1148
358
|
var $439cdbb36f71c7cb$export$1ec2a4762acd7aec;
|
|
359
|
+
var $439cdbb36f71c7cb$export$34a5cf3b4678f4f4;
|
|
1149
360
|
var $439cdbb36f71c7cb$export$e525b52bb498dd65;
|
|
1150
361
|
var $439cdbb36f71c7cb$export$39076b5dbe08a0a4;
|
|
1151
|
-
var $439cdbb36f71c7cb$export$
|
|
1152
|
-
$439cdbb36f71c7cb$export$b3bb2ed7c69eb53c = `_39DLrq_flex-spacer`;
|
|
362
|
+
var $439cdbb36f71c7cb$export$b3bb2ed7c69eb53c;
|
|
1153
363
|
$439cdbb36f71c7cb$export$1ec2a4762acd7aec = `_39DLrq_flex-row`;
|
|
364
|
+
$439cdbb36f71c7cb$export$34a5cf3b4678f4f4 = `_39DLrq_json-view-container`;
|
|
1154
365
|
$439cdbb36f71c7cb$export$e525b52bb498dd65 = `_39DLrq_root-hidden`;
|
|
1155
366
|
$439cdbb36f71c7cb$export$39076b5dbe08a0a4 = `_39DLrq_flex-col`;
|
|
1156
|
-
$439cdbb36f71c7cb$export$
|
|
367
|
+
$439cdbb36f71c7cb$export$b3bb2ed7c69eb53c = `_39DLrq_flex-spacer`;
|
|
1157
368
|
|
|
1158
369
|
|
|
1159
370
|
const $e94acad285dc5835$var$h = (0, $Zz0sd$hyperStyled)((0, (/*@__PURE__*/$parcel$interopDefault($439cdbb36f71c7cb$exports))));
|
|
@@ -1178,15 +389,13 @@ const $e94acad285dc5835$var$monokai = {
|
|
|
1178
389
|
base0F: "#cc6633"
|
|
1179
390
|
};
|
|
1180
391
|
function $e94acad285dc5835$export$bb1a5c615d2117e4(props) {
|
|
1181
|
-
const invertTheme = !(0, $70366c8972398d2a$export$da73e849bfb9b978)();
|
|
1182
392
|
return $e94acad285dc5835$var$h("div.json-view-container", {
|
|
1183
393
|
className: (0, $Zz0sd$classnames)(props.className, {
|
|
1184
|
-
"root-hidden": props.hideRoot
|
|
1185
|
-
"invert-theme": invertTheme
|
|
394
|
+
"root-hidden": props.hideRoot
|
|
1186
395
|
})
|
|
1187
396
|
}, $e94acad285dc5835$var$h((0, $Zz0sd$reactjsontree), {
|
|
1188
397
|
theme: $e94acad285dc5835$var$monokai,
|
|
1189
|
-
invertTheme:
|
|
398
|
+
invertTheme: false,
|
|
1190
399
|
...props
|
|
1191
400
|
}));
|
|
1192
401
|
}
|
|
@@ -2908,24 +2117,136 @@ const $33f06e347cd34062$export$9dcd2b1ca4768128 = $33f06e347cd34062$export$7460c
|
|
|
2908
2117
|
|
|
2909
2118
|
|
|
2910
2119
|
|
|
2120
|
+
const $70366c8972398d2a$var$systemDarkMode = ()=>({
|
|
2121
|
+
isEnabled: $70366c8972398d2a$var$matcher?.matches ?? false,
|
|
2122
|
+
isAutoset: true
|
|
2123
|
+
});
|
|
2124
|
+
const $70366c8972398d2a$var$ValueContext = (0, $Zz0sd$createContext)({
|
|
2125
|
+
isEnabled: false,
|
|
2126
|
+
isAutoset: false
|
|
2127
|
+
});
|
|
2128
|
+
const $70366c8972398d2a$var$UpdaterContext = (0, $Zz0sd$createContext)(null);
|
|
2129
|
+
const $70366c8972398d2a$var$matcher = window?.matchMedia("(prefers-color-scheme: dark)");
|
|
2130
|
+
const $70366c8972398d2a$var$_DarkModeProvider = (props)=>{
|
|
2131
|
+
const { addBodyClasses: addBodyClasses = true , isEnabled: isEnabled1 , followSystem: followSystem = false , children: children , } = props;
|
|
2132
|
+
const [storedValue, updateValue, resetState] = (0, $962bc0f04255cfc3$export$8b052fe25089340e)("ui-dark-mode", $70366c8972398d2a$var$systemDarkMode());
|
|
2133
|
+
// Guards so that we don't error on an invalid stored value
|
|
2134
|
+
const value = {
|
|
2135
|
+
isEnabled: storedValue?.isEnabled ?? false,
|
|
2136
|
+
isAutoset: storedValue?.isAutoset ?? false
|
|
2137
|
+
};
|
|
2138
|
+
(0, $Zz0sd$useEffect)(()=>{
|
|
2139
|
+
if (!followSystem) return;
|
|
2140
|
+
updateValue($70366c8972398d2a$var$systemDarkMode());
|
|
2141
|
+
}, []);
|
|
2142
|
+
(0, $Zz0sd$useEffect)(()=>{
|
|
2143
|
+
// Update value if isEnabled is provided
|
|
2144
|
+
if (isEnabled1 == null) return;
|
|
2145
|
+
updateValue({
|
|
2146
|
+
isAutoset: false,
|
|
2147
|
+
isEnabled: isEnabled1
|
|
2148
|
+
});
|
|
2149
|
+
}, [
|
|
2150
|
+
isEnabled1
|
|
2151
|
+
]);
|
|
2152
|
+
// Manage dark mode body classes
|
|
2153
|
+
(0, $Zz0sd$useEffect)(()=>{
|
|
2154
|
+
if (!addBodyClasses) return;
|
|
2155
|
+
if (value.isEnabled) document.body.classList.add("bp4-dark");
|
|
2156
|
+
else document.body.classList.remove("bp4-dark");
|
|
2157
|
+
}, [
|
|
2158
|
+
storedValue
|
|
2159
|
+
]);
|
|
2160
|
+
const update = (enabled)=>{
|
|
2161
|
+
if (enabled == null) return resetState();
|
|
2162
|
+
const isEnabled = enabled ?? !value.isEnabled;
|
|
2163
|
+
updateValue({
|
|
2164
|
+
isAutoset: false,
|
|
2165
|
+
isEnabled: isEnabled
|
|
2166
|
+
});
|
|
2167
|
+
};
|
|
2168
|
+
const onSystemChange = (0, $Zz0sd$useCallback)((e)=>{
|
|
2169
|
+
if (value.isAutoset || followSystem) updateValue($70366c8972398d2a$var$systemDarkMode());
|
|
2170
|
+
}, [
|
|
2171
|
+
value.isAutoset,
|
|
2172
|
+
followSystem
|
|
2173
|
+
]);
|
|
2174
|
+
(0, $Zz0sd$useEffect)(()=>{
|
|
2175
|
+
if ($70366c8972398d2a$var$matcher == null) return;
|
|
2176
|
+
$70366c8972398d2a$var$matcher.addEventListener("change", onSystemChange);
|
|
2177
|
+
return ()=>{
|
|
2178
|
+
$70366c8972398d2a$var$matcher.removeEventListener("change", onSystemChange);
|
|
2179
|
+
};
|
|
2180
|
+
}, [
|
|
2181
|
+
onSystemChange
|
|
2182
|
+
]);
|
|
2183
|
+
return (0, $Zz0sd$macrostrathyper)($70366c8972398d2a$var$ValueContext.Provider, {
|
|
2184
|
+
value: value
|
|
2185
|
+
}, (0, $Zz0sd$macrostrathyper)($70366c8972398d2a$var$UpdaterContext.Provider, {
|
|
2186
|
+
value: update
|
|
2187
|
+
}, children));
|
|
2188
|
+
};
|
|
2189
|
+
const $70366c8972398d2a$export$6c869dfd601c964b = (props)=>{
|
|
2190
|
+
// Ensure that only one provider is active for an application
|
|
2191
|
+
const parentCtx = (0, $Zz0sd$useContext)($70366c8972398d2a$var$UpdaterContext);
|
|
2192
|
+
if (parentCtx != null) return props.children ?? null;
|
|
2193
|
+
return (0, $Zz0sd$macrostrathyper)($70366c8972398d2a$var$_DarkModeProvider, props);
|
|
2194
|
+
};
|
|
2195
|
+
const $70366c8972398d2a$export$4673cbff94e146e2 = ()=>(0, $Zz0sd$useContext)($70366c8972398d2a$var$ValueContext);
|
|
2196
|
+
const $70366c8972398d2a$export$da73e849bfb9b978 = ()=>$70366c8972398d2a$export$4673cbff94e146e2()?.isEnabled ?? false;
|
|
2197
|
+
const $70366c8972398d2a$export$2158f0320fd21632 = ()=>(0, $Zz0sd$useContext)($70366c8972398d2a$var$UpdaterContext);
|
|
2198
|
+
const $70366c8972398d2a$export$4ca1a7f9e076e79b = (props)=>{
|
|
2199
|
+
const { allowReset: allowReset = true , showText: showText = false , children: children , ...rest } = props;
|
|
2200
|
+
const { isEnabled: isEnabled , isAutoset: isAutoset } = $70366c8972398d2a$export$4673cbff94e146e2();
|
|
2201
|
+
const icon = isEnabled ? "flash" : "moon";
|
|
2202
|
+
const update = $70366c8972398d2a$export$2158f0320fd21632();
|
|
2203
|
+
const onClick = (event)=>{
|
|
2204
|
+
if (update == null) {
|
|
2205
|
+
console.warn("No DarkModeProvider is available");
|
|
2206
|
+
return;
|
|
2207
|
+
}
|
|
2208
|
+
if (allowReset && event.shiftKey) {
|
|
2209
|
+
update(null);
|
|
2210
|
+
return;
|
|
2211
|
+
}
|
|
2212
|
+
update(!isEnabled);
|
|
2213
|
+
};
|
|
2214
|
+
const active = !isAutoset;
|
|
2215
|
+
return (0, $Zz0sd$macrostrathyper)((0, $Zz0sd$Button), {
|
|
2216
|
+
active: active,
|
|
2217
|
+
...rest,
|
|
2218
|
+
icon: icon,
|
|
2219
|
+
onClick: onClick
|
|
2220
|
+
}, [
|
|
2221
|
+
(0, $Zz0sd$macrostrathyper).if(showText)([
|
|
2222
|
+
isEnabled ? "Light" : "Dark"
|
|
2223
|
+
]),
|
|
2224
|
+
children,
|
|
2225
|
+
]);
|
|
2226
|
+
};
|
|
2227
|
+
|
|
2228
|
+
|
|
2229
|
+
|
|
2230
|
+
|
|
2231
|
+
|
|
2911
2232
|
|
|
2912
2233
|
var $4ec1d86cd773cb72$exports = {};
|
|
2913
2234
|
|
|
2914
|
-
$parcel$export($4ec1d86cd773cb72$exports, "bp4-slider-handle", () => $4ec1d86cd773cb72$export$4169bb8e8b0a147a, (v) => $4ec1d86cd773cb72$export$4169bb8e8b0a147a = v);
|
|
2915
|
-
$parcel$export($4ec1d86cd773cb72$exports, "mui-slider-disabled", () => $4ec1d86cd773cb72$export$223d74fd94b8aafd, (v) => $4ec1d86cd773cb72$export$223d74fd94b8aafd = v);
|
|
2916
|
-
$parcel$export($4ec1d86cd773cb72$exports, "nullable-slider", () => $4ec1d86cd773cb72$export$9d79918c5e5ccc23, (v) => $4ec1d86cd773cb72$export$9d79918c5e5ccc23 = v);
|
|
2917
2235
|
$parcel$export($4ec1d86cd773cb72$exports, "bp4-slider", () => $4ec1d86cd773cb72$export$cbeaddd6cc70281e, (v) => $4ec1d86cd773cb72$export$cbeaddd6cc70281e = v);
|
|
2236
|
+
$parcel$export($4ec1d86cd773cb72$exports, "mui-slider-disabled", () => $4ec1d86cd773cb72$export$223d74fd94b8aafd, (v) => $4ec1d86cd773cb72$export$223d74fd94b8aafd = v);
|
|
2918
2237
|
$parcel$export($4ec1d86cd773cb72$exports, "controls", () => $4ec1d86cd773cb72$export$cc1adf6fb659c762, (v) => $4ec1d86cd773cb72$export$cc1adf6fb659c762 = v);
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
var $4ec1d86cd773cb72$export$9d79918c5e5ccc23;
|
|
2238
|
+
$parcel$export($4ec1d86cd773cb72$exports, "bp4-slider-handle", () => $4ec1d86cd773cb72$export$4169bb8e8b0a147a, (v) => $4ec1d86cd773cb72$export$4169bb8e8b0a147a = v);
|
|
2239
|
+
$parcel$export($4ec1d86cd773cb72$exports, "nullable-slider", () => $4ec1d86cd773cb72$export$9d79918c5e5ccc23, (v) => $4ec1d86cd773cb72$export$9d79918c5e5ccc23 = v);
|
|
2922
2240
|
var $4ec1d86cd773cb72$export$cbeaddd6cc70281e;
|
|
2241
|
+
var $4ec1d86cd773cb72$export$223d74fd94b8aafd;
|
|
2923
2242
|
var $4ec1d86cd773cb72$export$cc1adf6fb659c762;
|
|
2924
|
-
$4ec1d86cd773cb72$export$4169bb8e8b0a147a
|
|
2925
|
-
$4ec1d86cd773cb72$export$
|
|
2926
|
-
$4ec1d86cd773cb72$export$9d79918c5e5ccc23 = `TW5XUq_nullable-slider`;
|
|
2243
|
+
var $4ec1d86cd773cb72$export$4169bb8e8b0a147a;
|
|
2244
|
+
var $4ec1d86cd773cb72$export$9d79918c5e5ccc23;
|
|
2927
2245
|
$4ec1d86cd773cb72$export$cbeaddd6cc70281e = `TW5XUq_bp4-slider`;
|
|
2246
|
+
$4ec1d86cd773cb72$export$223d74fd94b8aafd = `TW5XUq_mui-slider-disabled`;
|
|
2928
2247
|
$4ec1d86cd773cb72$export$cc1adf6fb659c762 = `TW5XUq_controls`;
|
|
2248
|
+
$4ec1d86cd773cb72$export$4169bb8e8b0a147a = `TW5XUq_bp4-slider-handle`;
|
|
2249
|
+
$4ec1d86cd773cb72$export$9d79918c5e5ccc23 = `TW5XUq_nullable-slider`;
|
|
2929
2250
|
|
|
2930
2251
|
|
|
2931
2252
|
const $23a8c77e45754d90$var$h = (0, $Zz0sd$hyperStyled)((0, (/*@__PURE__*/$parcel$interopDefault($4ec1d86cd773cb72$exports))));
|
|
@@ -3201,42 +2522,42 @@ function $dd30f84b43282b34$export$ae1920fef0a09de8(props) {
|
|
|
3201
2522
|
|
|
3202
2523
|
var $7798de452206f42d$exports = {};
|
|
3203
2524
|
|
|
3204
|
-
$parcel$export($7798de452206f42d$exports, "panel-outer", () => $7798de452206f42d$export$e671aa0933ea24f9, (v) => $7798de452206f42d$export$e671aa0933ea24f9 = v);
|
|
3205
|
-
$parcel$export($7798de452206f42d$exports, "minimal", () => $7798de452206f42d$export$10c083462c34aef3, (v) => $7798de452206f42d$export$10c083462c34aef3 = v);
|
|
3206
|
-
$parcel$export($7798de452206f42d$exports, "expander", () => $7798de452206f42d$export$f194ed9df726ec47, (v) => $7798de452206f42d$export$f194ed9df726ec47 = v);
|
|
3207
|
-
$parcel$export($7798de452206f42d$exports, "panel-content", () => $7798de452206f42d$export$8ca81bb4a7c3bee, (v) => $7798de452206f42d$export$8ca81bb4a7c3bee = v);
|
|
3208
|
-
$parcel$export($7798de452206f42d$exports, "overflow-hidden", () => $7798de452206f42d$export$15ee5781b96cbd33, (v) => $7798de452206f42d$export$15ee5781b96cbd33 = v);
|
|
3209
|
-
$parcel$export($7798de452206f42d$exports, "panel-container-inner", () => $7798de452206f42d$export$95530b1b29b21d7, (v) => $7798de452206f42d$export$95530b1b29b21d7 = v);
|
|
3210
2525
|
$parcel$export($7798de452206f42d$exports, "panel", () => $7798de452206f42d$export$21f42ab9b6679f44, (v) => $7798de452206f42d$export$21f42ab9b6679f44 = v);
|
|
2526
|
+
$parcel$export($7798de452206f42d$exports, "extra-space", () => $7798de452206f42d$export$cd109afefddca7db, (v) => $7798de452206f42d$export$cd109afefddca7db = v);
|
|
3211
2527
|
$parcel$export($7798de452206f42d$exports, "panel-container", () => $7798de452206f42d$export$9dd9a0eceddf6af6, (v) => $7798de452206f42d$export$9dd9a0eceddf6af6 = v);
|
|
2528
|
+
$parcel$export($7798de452206f42d$exports, "panel-content", () => $7798de452206f42d$export$8ca81bb4a7c3bee, (v) => $7798de452206f42d$export$8ca81bb4a7c3bee = v);
|
|
2529
|
+
$parcel$export($7798de452206f42d$exports, "overflow-hidden", () => $7798de452206f42d$export$15ee5781b96cbd33, (v) => $7798de452206f42d$export$15ee5781b96cbd33 = v);
|
|
2530
|
+
$parcel$export($7798de452206f42d$exports, "minimal", () => $7798de452206f42d$export$10c083462c34aef3, (v) => $7798de452206f42d$export$10c083462c34aef3 = v);
|
|
3212
2531
|
$parcel$export($7798de452206f42d$exports, "content-panel", () => $7798de452206f42d$export$75659614cf20214d, (v) => $7798de452206f42d$export$75659614cf20214d = v);
|
|
3213
|
-
$parcel$export($7798de452206f42d$exports, "panel-
|
|
2532
|
+
$parcel$export($7798de452206f42d$exports, "panel-outer", () => $7798de452206f42d$export$e671aa0933ea24f9, (v) => $7798de452206f42d$export$e671aa0933ea24f9 = v);
|
|
3214
2533
|
$parcel$export($7798de452206f42d$exports, "panel-column", () => $7798de452206f42d$export$b41821d1dd2069d4, (v) => $7798de452206f42d$export$b41821d1dd2069d4 = v);
|
|
3215
|
-
$parcel$export($7798de452206f42d$exports, "
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
var $7798de452206f42d$export$f194ed9df726ec47;
|
|
3219
|
-
var $7798de452206f42d$export$8ca81bb4a7c3bee;
|
|
3220
|
-
var $7798de452206f42d$export$15ee5781b96cbd33;
|
|
3221
|
-
var $7798de452206f42d$export$95530b1b29b21d7;
|
|
2534
|
+
$parcel$export($7798de452206f42d$exports, "panel-container-inner", () => $7798de452206f42d$export$95530b1b29b21d7, (v) => $7798de452206f42d$export$95530b1b29b21d7 = v);
|
|
2535
|
+
$parcel$export($7798de452206f42d$exports, "panel-header", () => $7798de452206f42d$export$90b77e3be608e918, (v) => $7798de452206f42d$export$90b77e3be608e918 = v);
|
|
2536
|
+
$parcel$export($7798de452206f42d$exports, "expander", () => $7798de452206f42d$export$f194ed9df726ec47, (v) => $7798de452206f42d$export$f194ed9df726ec47 = v);
|
|
3222
2537
|
var $7798de452206f42d$export$21f42ab9b6679f44;
|
|
2538
|
+
var $7798de452206f42d$export$cd109afefddca7db;
|
|
3223
2539
|
var $7798de452206f42d$export$9dd9a0eceddf6af6;
|
|
2540
|
+
var $7798de452206f42d$export$8ca81bb4a7c3bee;
|
|
2541
|
+
var $7798de452206f42d$export$15ee5781b96cbd33;
|
|
2542
|
+
var $7798de452206f42d$export$10c083462c34aef3;
|
|
3224
2543
|
var $7798de452206f42d$export$75659614cf20214d;
|
|
3225
|
-
var $7798de452206f42d$export$
|
|
2544
|
+
var $7798de452206f42d$export$e671aa0933ea24f9;
|
|
3226
2545
|
var $7798de452206f42d$export$b41821d1dd2069d4;
|
|
3227
|
-
var $7798de452206f42d$export$
|
|
3228
|
-
$7798de452206f42d$export$
|
|
3229
|
-
$7798de452206f42d$export$
|
|
3230
|
-
$7798de452206f42d$export$f194ed9df726ec47 = `TGPwIq_expander`;
|
|
3231
|
-
$7798de452206f42d$export$8ca81bb4a7c3bee = `TGPwIq_panel-content`;
|
|
3232
|
-
$7798de452206f42d$export$15ee5781b96cbd33 = `TGPwIq_overflow-hidden`;
|
|
3233
|
-
$7798de452206f42d$export$95530b1b29b21d7 = `TGPwIq_panel-container-inner`;
|
|
2546
|
+
var $7798de452206f42d$export$95530b1b29b21d7;
|
|
2547
|
+
var $7798de452206f42d$export$90b77e3be608e918;
|
|
2548
|
+
var $7798de452206f42d$export$f194ed9df726ec47;
|
|
3234
2549
|
$7798de452206f42d$export$21f42ab9b6679f44 = `TGPwIq_panel`;
|
|
2550
|
+
$7798de452206f42d$export$cd109afefddca7db = `TGPwIq_extra-space`;
|
|
3235
2551
|
$7798de452206f42d$export$9dd9a0eceddf6af6 = `TGPwIq_panel-container`;
|
|
2552
|
+
$7798de452206f42d$export$8ca81bb4a7c3bee = `TGPwIq_panel-content`;
|
|
2553
|
+
$7798de452206f42d$export$15ee5781b96cbd33 = `TGPwIq_overflow-hidden`;
|
|
2554
|
+
$7798de452206f42d$export$10c083462c34aef3 = `TGPwIq_minimal`;
|
|
3236
2555
|
$7798de452206f42d$export$75659614cf20214d = `TGPwIq_content-panel`;
|
|
3237
|
-
$7798de452206f42d$export$
|
|
2556
|
+
$7798de452206f42d$export$e671aa0933ea24f9 = `TGPwIq_panel-outer`;
|
|
3238
2557
|
$7798de452206f42d$export$b41821d1dd2069d4 = `TGPwIq_panel-column`;
|
|
3239
|
-
$7798de452206f42d$export$
|
|
2558
|
+
$7798de452206f42d$export$95530b1b29b21d7 = `TGPwIq_panel-container-inner`;
|
|
2559
|
+
$7798de452206f42d$export$90b77e3be608e918 = `TGPwIq_panel-header`;
|
|
2560
|
+
$7798de452206f42d$export$f194ed9df726ec47 = `TGPwIq_expander`;
|
|
3240
2561
|
|
|
3241
2562
|
|
|
3242
2563
|
|
|
@@ -3397,24 +2718,24 @@ const $e64decd575080523$export$25c607d6a337a384 = (props)=>$e64decd575080523$var
|
|
|
3397
2718
|
|
|
3398
2719
|
var $d75f5cd4dad80e8f$exports = {};
|
|
3399
2720
|
|
|
3400
|
-
$parcel$export($d75f5cd4dad80e8f$exports, "expanded", () => $d75f5cd4dad80e8f$export$52105d146316f63c, (v) => $d75f5cd4dad80e8f$export$52105d146316f63c = v);
|
|
3401
|
-
$parcel$export($d75f5cd4dad80e8f$exports, "user-interface", () => $d75f5cd4dad80e8f$export$e005ee6dda35184b, (v) => $d75f5cd4dad80e8f$export$e005ee6dda35184b = v);
|
|
3402
|
-
$parcel$export($d75f5cd4dad80e8f$exports, "spacer", () => $d75f5cd4dad80e8f$export$8cc075c801fd6817, (v) => $d75f5cd4dad80e8f$export$8cc075c801fd6817 = v);
|
|
3403
|
-
$parcel$export($d75f5cd4dad80e8f$exports, "three-column", () => $d75f5cd4dad80e8f$export$55d10750d58b7b01, (v) => $d75f5cd4dad80e8f$export$55d10750d58b7b01 = v);
|
|
3404
2721
|
$parcel$export($d75f5cd4dad80e8f$exports, "main-column", () => $d75f5cd4dad80e8f$export$9c88f9a435c40ccb, (v) => $d75f5cd4dad80e8f$export$9c88f9a435c40ccb = v);
|
|
2722
|
+
$parcel$export($d75f5cd4dad80e8f$exports, "three-column", () => $d75f5cd4dad80e8f$export$55d10750d58b7b01, (v) => $d75f5cd4dad80e8f$export$55d10750d58b7b01 = v);
|
|
2723
|
+
$parcel$export($d75f5cd4dad80e8f$exports, "user-interface", () => $d75f5cd4dad80e8f$export$e005ee6dda35184b, (v) => $d75f5cd4dad80e8f$export$e005ee6dda35184b = v);
|
|
3405
2724
|
$parcel$export($d75f5cd4dad80e8f$exports, "context-column", () => $d75f5cd4dad80e8f$export$9b1daf63e7965780, (v) => $d75f5cd4dad80e8f$export$9b1daf63e7965780 = v);
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
var $d75f5cd4dad80e8f$export$8cc075c801fd6817;
|
|
3409
|
-
var $d75f5cd4dad80e8f$export$55d10750d58b7b01;
|
|
2725
|
+
$parcel$export($d75f5cd4dad80e8f$exports, "spacer", () => $d75f5cd4dad80e8f$export$8cc075c801fd6817, (v) => $d75f5cd4dad80e8f$export$8cc075c801fd6817 = v);
|
|
2726
|
+
$parcel$export($d75f5cd4dad80e8f$exports, "expanded", () => $d75f5cd4dad80e8f$export$52105d146316f63c, (v) => $d75f5cd4dad80e8f$export$52105d146316f63c = v);
|
|
3410
2727
|
var $d75f5cd4dad80e8f$export$9c88f9a435c40ccb;
|
|
2728
|
+
var $d75f5cd4dad80e8f$export$55d10750d58b7b01;
|
|
2729
|
+
var $d75f5cd4dad80e8f$export$e005ee6dda35184b;
|
|
3411
2730
|
var $d75f5cd4dad80e8f$export$9b1daf63e7965780;
|
|
3412
|
-
$d75f5cd4dad80e8f$export$
|
|
3413
|
-
$d75f5cd4dad80e8f$export$
|
|
3414
|
-
$d75f5cd4dad80e8f$export$8cc075c801fd6817 = `tBd70W_spacer`;
|
|
3415
|
-
$d75f5cd4dad80e8f$export$55d10750d58b7b01 = `tBd70W_three-column`;
|
|
2731
|
+
var $d75f5cd4dad80e8f$export$8cc075c801fd6817;
|
|
2732
|
+
var $d75f5cd4dad80e8f$export$52105d146316f63c;
|
|
3416
2733
|
$d75f5cd4dad80e8f$export$9c88f9a435c40ccb = `tBd70W_main-column`;
|
|
2734
|
+
$d75f5cd4dad80e8f$export$55d10750d58b7b01 = `tBd70W_three-column`;
|
|
2735
|
+
$d75f5cd4dad80e8f$export$e005ee6dda35184b = `tBd70W_user-interface`;
|
|
3417
2736
|
$d75f5cd4dad80e8f$export$9b1daf63e7965780 = `tBd70W_context-column`;
|
|
2737
|
+
$d75f5cd4dad80e8f$export$8cc075c801fd6817 = `tBd70W_spacer`;
|
|
2738
|
+
$d75f5cd4dad80e8f$export$52105d146316f63c = `tBd70W_expanded`;
|
|
3418
2739
|
|
|
3419
2740
|
|
|
3420
2741
|
|
|
@@ -3577,6 +2898,12 @@ $1304e13f8704f9b3$export$24349bc9b29e1403.Panels = $1304e13f8704f9b3$var$SidePan
|
|
|
3577
2898
|
|
|
3578
2899
|
|
|
3579
2900
|
|
|
2901
|
+
var $4fae2d573d730db8$exports = {};
|
|
2902
|
+
|
|
2903
|
+
$parcel$export($4fae2d573d730db8$exports, "ValueWithUnit", () => $4fae2d573d730db8$export$716098b85fd0efdf);
|
|
2904
|
+
$parcel$export($4fae2d573d730db8$exports, "DegreeCoord", () => $4fae2d573d730db8$export$af8082af0bea3eb1);
|
|
2905
|
+
$parcel$export($4fae2d573d730db8$exports, "LngLatCoords", () => $4fae2d573d730db8$export$f195b3550849e560);
|
|
2906
|
+
$parcel$export($4fae2d573d730db8$exports, "Elevation", () => $4fae2d573d730db8$export$58bfb4f6ec5aa58d);
|
|
3580
2907
|
|
|
3581
2908
|
|
|
3582
2909
|
function $3e1bd09be8f70c4c$export$424827e271c4ba96(val, zoom) {
|
|
@@ -3696,13 +3023,13 @@ function $4fae2d573d730db8$export$58bfb4f6ec5aa58d(props) {
|
|
|
3696
3023
|
|
|
3697
3024
|
const $427faf94283514d4$var$h = (0, $Zz0sd$macrostrathyper).styled((0, (/*@__PURE__*/$parcel$interopDefault($29ab0212ea6844d0$exports))));
|
|
3698
3025
|
function $427faf94283514d4$var$PositionButton({ position: position }) {
|
|
3699
|
-
const focusState = (0, $
|
|
3026
|
+
const focusState = (0, $Zz0sd$useFocusState)(position);
|
|
3700
3027
|
return $427faf94283514d4$var$h("div.position-controls", [
|
|
3701
|
-
$427faf94283514d4$var$h((0, $
|
|
3028
|
+
$427faf94283514d4$var$h((0, $Zz0sd$LocationFocusButton), {
|
|
3702
3029
|
location: position,
|
|
3703
3030
|
focusState: focusState
|
|
3704
3031
|
}, []),
|
|
3705
|
-
(0, $
|
|
3032
|
+
(0, $Zz0sd$isCentered)(focusState) ? $427faf94283514d4$var$h($427faf94283514d4$var$CopyLinkButton, {
|
|
3706
3033
|
itemName: "position"
|
|
3707
3034
|
}) : null,
|
|
3708
3035
|
]);
|
|
@@ -3792,21 +3119,26 @@ function $f50c3537aaff0cff$export$aa4baff5242ea6e1(props) {
|
|
|
3792
3119
|
|
|
3793
3120
|
|
|
3794
3121
|
var $b6d2ac1192949c28$exports = {};
|
|
3122
|
+
var $a281a0612311d660$exports = {};
|
|
3123
|
+
|
|
3124
|
+
$parcel$export($a281a0612311d660$exports, "MacrostratVectorTileset", () => $a281a0612311d660$export$dce4b6e67bb5f25a);
|
|
3125
|
+
$parcel$export($a281a0612311d660$exports, "MacrostratRasterTileset", () => $a281a0612311d660$export$cc7c195070dfb906);
|
|
3126
|
+
$parcel$export($a281a0612311d660$exports, "h", () => $a281a0612311d660$export$dda1d9f60106f0e9);
|
|
3127
|
+
$parcel$export($a281a0612311d660$exports, "DevMapPage", () => $a281a0612311d660$export$2391061fbdfb71ef);
|
|
3795
3128
|
|
|
3796
|
-
$parcel$export($b6d2ac1192949c28$exports, "MacrostratVectorTileset", () => $b6d2ac1192949c28$export$dce4b6e67bb5f25a);
|
|
3797
|
-
$parcel$export($b6d2ac1192949c28$exports, "MacrostratRasterTileset", () => $b6d2ac1192949c28$export$cc7c195070dfb906);
|
|
3798
|
-
$parcel$export($b6d2ac1192949c28$exports, "h", () => $b6d2ac1192949c28$export$dda1d9f60106f0e9);
|
|
3799
|
-
$parcel$export($b6d2ac1192949c28$exports, "DevMapPage", () => $b6d2ac1192949c28$export$2391061fbdfb71ef);
|
|
3800
3129
|
|
|
3801
3130
|
|
|
3802
3131
|
|
|
3803
3132
|
|
|
3133
|
+
var $64ee2eed3ed5ffbc$exports = {};
|
|
3804
3134
|
|
|
3135
|
+
$parcel$export($64ee2eed3ed5ffbc$exports, "buildXRayStyle", () => $64ee2eed3ed5ffbc$export$eff5fb2e10d05b1d);
|
|
3136
|
+
$parcel$export($64ee2eed3ed5ffbc$exports, "buildInspectorStyle", () => $64ee2eed3ed5ffbc$export$e739dc8dfc0db9a6);
|
|
3805
3137
|
|
|
3806
3138
|
|
|
3807
3139
|
async function $64ee2eed3ed5ffbc$export$eff5fb2e10d05b1d(baseStyle, params = null) {
|
|
3808
3140
|
const { inDarkMode: inDarkMode = false , color: color = "rgb(74, 242, 161)" , mapboxToken: mapboxToken , xRaySources: xRaySources } = params;
|
|
3809
|
-
const style = await (0, $
|
|
3141
|
+
const style = await (0, $Zz0sd$getMapboxStyle)(baseStyle, {
|
|
3810
3142
|
access_token: mapboxToken
|
|
3811
3143
|
});
|
|
3812
3144
|
const sources = xRaySources ?? Object.keys(style.sources);
|
|
@@ -3856,14 +3188,14 @@ function $64ee2eed3ed5ffbc$var$transformMapboxLayer(layer, color, inDarkMode) {
|
|
|
3856
3188
|
async function $64ee2eed3ed5ffbc$export$e739dc8dfc0db9a6(baseStyle, overlayStyle = null, params = {}) {
|
|
3857
3189
|
const { mapboxToken: mapboxToken , xRay: xRay = false , xRaySources: _xRaySources , ...rest } = params;
|
|
3858
3190
|
let xRaySources = _xRaySources;
|
|
3859
|
-
let style = await (0, $
|
|
3191
|
+
let style = await (0, $Zz0sd$getMapboxStyle)(baseStyle, {
|
|
3860
3192
|
access_token: mapboxToken
|
|
3861
3193
|
});
|
|
3862
3194
|
if (overlayStyle != null) {
|
|
3863
|
-
const overlay = await (0, $
|
|
3195
|
+
const overlay = await (0, $Zz0sd$getMapboxStyle)(overlayStyle, {
|
|
3864
3196
|
access_token: mapboxToken
|
|
3865
3197
|
});
|
|
3866
|
-
style = (0, $
|
|
3198
|
+
style = (0, $Zz0sd$mergeStyles)(style, overlay);
|
|
3867
3199
|
xRaySources ??= Object.keys(overlay.sources);
|
|
3868
3200
|
}
|
|
3869
3201
|
if (xRay) {
|
|
@@ -4035,6 +3367,9 @@ $1f5c274a1b8d54c3$export$9ea3835d1b44cc08 = "context-panel-enter_4c0a66";
|
|
|
4035
3367
|
|
|
4036
3368
|
|
|
4037
3369
|
|
|
3370
|
+
var $91d5aa004eeb2226$exports = {};
|
|
3371
|
+
|
|
3372
|
+
$parcel$export($91d5aa004eeb2226$exports, "MapBottomControls", () => $91d5aa004eeb2226$export$db1a2e058a06fb5c);
|
|
4038
3373
|
|
|
4039
3374
|
|
|
4040
3375
|
|
|
@@ -4047,7 +3382,7 @@ function $91d5aa004eeb2226$var$ScaleControl(props) {
|
|
|
4047
3382
|
maxWidth: 200,
|
|
4048
3383
|
unit: "metric"
|
|
4049
3384
|
});
|
|
4050
|
-
return $91d5aa004eeb2226$var$h((0, $
|
|
3385
|
+
return $91d5aa004eeb2226$var$h((0, $Zz0sd$MapControlWrapper), {
|
|
4051
3386
|
className: "map-scale-control",
|
|
4052
3387
|
control: (0, $Zz0sd$ScaleControl),
|
|
4053
3388
|
options: optionsRef.current,
|
|
@@ -4063,7 +3398,7 @@ function $91d5aa004eeb2226$var$GeolocationControl(props) {
|
|
|
4063
3398
|
enableHighAccuracy: true
|
|
4064
3399
|
}
|
|
4065
3400
|
});
|
|
4066
|
-
return $91d5aa004eeb2226$var$h((0, $
|
|
3401
|
+
return $91d5aa004eeb2226$var$h((0, $Zz0sd$MapControlWrapper), {
|
|
4067
3402
|
control: (0, $Zz0sd$GeolocateControl),
|
|
4068
3403
|
options: optionsRef.current,
|
|
4069
3404
|
...props
|
|
@@ -4072,13 +3407,13 @@ function $91d5aa004eeb2226$var$GeolocationControl(props) {
|
|
|
4072
3407
|
function $91d5aa004eeb2226$export$db1a2e058a06fb5c() {
|
|
4073
3408
|
return $91d5aa004eeb2226$var$h("div.map-controls", [
|
|
4074
3409
|
$91d5aa004eeb2226$var$h($91d5aa004eeb2226$var$ScaleControl),
|
|
4075
|
-
$91d5aa004eeb2226$var$h((0, $
|
|
3410
|
+
$91d5aa004eeb2226$var$h((0, $Zz0sd$ThreeDControl), {
|
|
4076
3411
|
className: "map-3d-control"
|
|
4077
3412
|
}),
|
|
4078
|
-
$91d5aa004eeb2226$var$h((0, $
|
|
3413
|
+
$91d5aa004eeb2226$var$h((0, $Zz0sd$CompassControl), {
|
|
4079
3414
|
className: "compass-control"
|
|
4080
3415
|
}),
|
|
4081
|
-
$91d5aa004eeb2226$var$h((0, $
|
|
3416
|
+
$91d5aa004eeb2226$var$h((0, $Zz0sd$GlobeControl), {
|
|
4082
3417
|
className: "globe-control"
|
|
4083
3418
|
}),
|
|
4084
3419
|
$91d5aa004eeb2226$var$h($91d5aa004eeb2226$var$GeolocationControl, {
|
|
@@ -4133,7 +3468,7 @@ function $4bdfa9cd8240b2fd$var$_MapAreaContainer({ children: children , classNam
|
|
|
4133
3468
|
children ?? mainPanel,
|
|
4134
3469
|
$4bdfa9cd8240b2fd$var$h("div.detail-stack.infodrawer-container", detailStackProps, [
|
|
4135
3470
|
detailPanel,
|
|
4136
|
-
$4bdfa9cd8240b2fd$var$h((0, $
|
|
3471
|
+
$4bdfa9cd8240b2fd$var$h((0, $Zz0sd$ZoomControl), {
|
|
4137
3472
|
className: "zoom-control"
|
|
4138
3473
|
}),
|
|
4139
3474
|
$4bdfa9cd8240b2fd$var$h("div.spacer"),
|
|
@@ -4143,12 +3478,12 @@ function $4bdfa9cd8240b2fd$var$_MapAreaContainer({ children: children , classNam
|
|
|
4143
3478
|
$4bdfa9cd8240b2fd$var$h("div.bottom", null, bottomPanel),
|
|
4144
3479
|
]);
|
|
4145
3480
|
}
|
|
4146
|
-
const $4bdfa9cd8240b2fd$var$MapProviders = ({ children: children })=>$4bdfa9cd8240b2fd$var$h((0, $c8a29764c15c7584$export$9194c0aa0cd7a9ff), $4bdfa9cd8240b2fd$var$h((0, $
|
|
3481
|
+
const $4bdfa9cd8240b2fd$var$MapProviders = ({ children: children })=>$4bdfa9cd8240b2fd$var$h((0, $c8a29764c15c7584$export$9194c0aa0cd7a9ff), $4bdfa9cd8240b2fd$var$h((0, $Zz0sd$MapboxMapProvider), children));
|
|
4147
3482
|
const $4bdfa9cd8240b2fd$export$9fa5da0bcfd0a290 = (props)=>$4bdfa9cd8240b2fd$var$h($4bdfa9cd8240b2fd$var$MapProviders, $4bdfa9cd8240b2fd$var$h($4bdfa9cd8240b2fd$var$_MapAreaContainer, props));
|
|
4148
3483
|
function $4bdfa9cd8240b2fd$export$fa395a37c3898ae3({ className: className , children: children }) {
|
|
4149
|
-
const { mapPosition: mapPosition } = (0, $
|
|
3484
|
+
const { mapPosition: mapPosition } = (0, $Zz0sd$useMapStatus)();
|
|
4150
3485
|
if (mapPosition != null) {
|
|
4151
|
-
const { mapIsRotated: mapIsRotated , mapUse3D: mapUse3D , mapIsGlobal: mapIsGlobal } = (0, $
|
|
3486
|
+
const { mapIsRotated: mapIsRotated , mapUse3D: mapUse3D , mapIsGlobal: mapIsGlobal } = (0, $Zz0sd$mapViewInfo)(mapPosition);
|
|
4152
3487
|
className = (0, $Zz0sd$classnames)(className, {
|
|
4153
3488
|
"map-is-rotated": mapIsRotated,
|
|
4154
3489
|
"map-3d-available": mapUse3D,
|
|
@@ -4162,12 +3497,23 @@ function $4bdfa9cd8240b2fd$export$fa395a37c3898ae3({ className: className , chil
|
|
|
4162
3497
|
|
|
4163
3498
|
|
|
4164
3499
|
|
|
3500
|
+
var $4bc3dd5f0732eed3$exports = {};
|
|
3501
|
+
|
|
3502
|
+
$parcel$export($4bc3dd5f0732eed3$exports, "MapResizeManager", () => $4bc3dd5f0732eed3$export$31b2e088aff2dc5d);
|
|
3503
|
+
$parcel$export($4bc3dd5f0732eed3$exports, "MapPaddingManager", () => $4bc3dd5f0732eed3$export$2ab96428dea558d6);
|
|
3504
|
+
$parcel$export($4bc3dd5f0732eed3$exports, "MapMovedReporter", () => $4bc3dd5f0732eed3$export$f6eeee399afc4e9a);
|
|
3505
|
+
$parcel$export($4bc3dd5f0732eed3$exports, "MapLoadingReporter", () => $4bc3dd5f0732eed3$export$e57f9eaa51773f82);
|
|
3506
|
+
$parcel$export($4bc3dd5f0732eed3$exports, "MapMarker", () => $4bc3dd5f0732eed3$export$5c90a91c7455938c);
|
|
4165
3507
|
|
|
4166
3508
|
|
|
4167
3509
|
|
|
4168
3510
|
|
|
4169
3511
|
|
|
4170
3512
|
|
|
3513
|
+
var $82fe09613877ffc2$exports = {};
|
|
3514
|
+
|
|
3515
|
+
$parcel$export($82fe09613877ffc2$exports, "getMapPadding", () => $82fe09613877ffc2$export$bb78f9f01775eef1);
|
|
3516
|
+
$parcel$export($82fe09613877ffc2$exports, "useMapMarker", () => $82fe09613877ffc2$export$278090850f6b3a9f);
|
|
4171
3517
|
|
|
4172
3518
|
|
|
4173
3519
|
function $82fe09613877ffc2$var$calcMapPadding(rect, childRect) {
|
|
@@ -4204,7 +3550,7 @@ function $82fe09613877ffc2$export$278090850f6b3a9f(mapRef, markerRef, markerPosi
|
|
|
4204
3550
|
|
|
4205
3551
|
|
|
4206
3552
|
function $4bc3dd5f0732eed3$export$31b2e088aff2dc5d({ containerRef: containerRef }) {
|
|
4207
|
-
const mapRef = (0, $
|
|
3553
|
+
const mapRef = (0, $Zz0sd$useMapRef)();
|
|
4208
3554
|
const debouncedResize = (0, $Zz0sd$useRef)((0, $Zz0sd$debounce)(()=>{
|
|
4209
3555
|
mapRef.current?.resize();
|
|
4210
3556
|
}, 100));
|
|
@@ -4215,7 +3561,7 @@ function $4bc3dd5f0732eed3$export$31b2e088aff2dc5d({ containerRef: containerRef
|
|
|
4215
3561
|
return null;
|
|
4216
3562
|
}
|
|
4217
3563
|
function $4bc3dd5f0732eed3$export$2ab96428dea558d6({ containerRef: containerRef , parentRef: parentRef , infoMarkerPosition: infoMarkerPosition }) {
|
|
4218
|
-
const mapRef = (0, $
|
|
3564
|
+
const mapRef = (0, $Zz0sd$useMapRef)();
|
|
4219
3565
|
const [padding, setPadding] = (0, $Zz0sd$useState)((0, $82fe09613877ffc2$export$bb78f9f01775eef1)(containerRef, parentRef));
|
|
4220
3566
|
const updateMapPadding = (0, $Zz0sd$useCallback)(()=>{
|
|
4221
3567
|
const newPadding = (0, $82fe09613877ffc2$export$bb78f9f01775eef1)(containerRef, parentRef);
|
|
@@ -4238,16 +3584,16 @@ function $4bc3dd5f0732eed3$export$2ab96428dea558d6({ containerRef: containerRef
|
|
|
4238
3584
|
updateMapPadding();
|
|
4239
3585
|
}
|
|
4240
3586
|
});
|
|
4241
|
-
(0, $
|
|
3587
|
+
(0, $Zz0sd$useMapEaseToCenter)(infoMarkerPosition, padding);
|
|
4242
3588
|
return null;
|
|
4243
3589
|
}
|
|
4244
3590
|
function $4bc3dd5f0732eed3$export$f6eeee399afc4e9a({ onMapMoved: onMapMoved = null }) {
|
|
4245
|
-
const mapRef = (0, $
|
|
4246
|
-
const dispatch = (0, $
|
|
3591
|
+
const mapRef = (0, $Zz0sd$useMapRef)();
|
|
3592
|
+
const dispatch = (0, $Zz0sd$useMapDispatch)();
|
|
4247
3593
|
const mapMovedCallback = (0, $Zz0sd$useCallback)(()=>{
|
|
4248
3594
|
const map = mapRef.current;
|
|
4249
3595
|
if (map == null) return;
|
|
4250
|
-
const mapPosition = (0, $
|
|
3596
|
+
const mapPosition = (0, $Zz0sd$getMapPosition)(map);
|
|
4251
3597
|
dispatch({
|
|
4252
3598
|
type: "map-moved",
|
|
4253
3599
|
payload: mapPosition
|
|
@@ -4276,9 +3622,9 @@ function $4bc3dd5f0732eed3$export$f6eeee399afc4e9a({ onMapMoved: onMapMoved = nu
|
|
|
4276
3622
|
return null;
|
|
4277
3623
|
}
|
|
4278
3624
|
function $4bc3dd5f0732eed3$export$e57f9eaa51773f82({ ignoredSources: ignoredSources , onMapLoading: onMapLoading = null , onMapIdle: onMapIdle = null , mapIsLoading: mapIsLoading1 , }) {
|
|
4279
|
-
const mapRef = (0, $
|
|
3625
|
+
const mapRef = (0, $Zz0sd$useMapRef)();
|
|
4280
3626
|
const loadingRef = (0, $Zz0sd$useRef)(false);
|
|
4281
|
-
const dispatch = (0, $
|
|
3627
|
+
const dispatch = (0, $Zz0sd$useMapDispatch)();
|
|
4282
3628
|
(0, $Zz0sd$useEffect)(()=>{
|
|
4283
3629
|
const map = mapRef.current;
|
|
4284
3630
|
const mapIsLoading = loadingRef.current;
|
|
@@ -4318,7 +3664,7 @@ function $4bc3dd5f0732eed3$export$e57f9eaa51773f82({ ignoredSources: ignoredSour
|
|
|
4318
3664
|
return null;
|
|
4319
3665
|
}
|
|
4320
3666
|
function $4bc3dd5f0732eed3$export$5c90a91c7455938c({ position: position , setPosition: setPosition , centerMarker: centerMarker = true }) {
|
|
4321
|
-
const mapRef = (0, $
|
|
3667
|
+
const mapRef = (0, $Zz0sd$useMapRef)();
|
|
4322
3668
|
const markerRef = (0, $Zz0sd$useRef)(null);
|
|
4323
3669
|
(0, $82fe09613877ffc2$export$278090850f6b3a9f)(mapRef, markerRef, position);
|
|
4324
3670
|
const handleMapClick = (0, $Zz0sd$useCallback)((event)=>{
|
|
@@ -4445,8 +3791,8 @@ function $9e150e311a3261e9$export$ab1e7a67d6ec5ad8(props) {
|
|
|
4445
3791
|
const { enableTerrain: enableTerrain = true , style: style , transformRequest: transformRequest , mapPosition: mapPosition = $9e150e311a3261e9$var$defaultMapPosition , children: children , accessToken: accessToken , infoMarkerPosition: infoMarkerPosition , projection: projection , } = props;
|
|
4446
3792
|
if (enableTerrain) terrainSourceID ??= "mapbox-3d-dem";
|
|
4447
3793
|
if (accessToken != null) (0, $Zz0sd$mapboxgl).accessToken = accessToken;
|
|
4448
|
-
const dispatch = (0, $
|
|
4449
|
-
let mapRef = (0, $
|
|
3794
|
+
const dispatch = (0, $Zz0sd$useMapDispatch)();
|
|
3795
|
+
let mapRef = (0, $Zz0sd$useMapRef)();
|
|
4450
3796
|
const ref = (0, $Zz0sd$useRef)();
|
|
4451
3797
|
const parentRef = (0, $Zz0sd$useRef)();
|
|
4452
3798
|
// Keep track of map position for reloads
|
|
@@ -4487,12 +3833,12 @@ function $9e150e311a3261e9$export$ab1e7a67d6ec5ad8(props) {
|
|
|
4487
3833
|
(0, $Zz0sd$useEffect)(()=>{
|
|
4488
3834
|
const map = mapRef.current;
|
|
4489
3835
|
if (map == null || mapPosition == null) return;
|
|
4490
|
-
(0, $
|
|
3836
|
+
(0, $Zz0sd$setMapPosition)(map, mapPosition);
|
|
4491
3837
|
}, [
|
|
4492
3838
|
mapRef.current
|
|
4493
3839
|
]);
|
|
4494
|
-
const { mapPosition: _computedMapPosition } = (0, $
|
|
4495
|
-
const { mapUse3D: mapUse3D , mapIsRotated: mapIsRotated } = (0, $
|
|
3840
|
+
const { mapPosition: _computedMapPosition } = (0, $Zz0sd$useMapStatus)();
|
|
3841
|
+
const { mapUse3D: mapUse3D , mapIsRotated: mapIsRotated } = (0, $Zz0sd$mapViewInfo)(_computedMapPosition);
|
|
4496
3842
|
// Get map projection
|
|
4497
3843
|
const _projection = mapRef.current?.getProjection()?.name ?? "mercator";
|
|
4498
3844
|
const className = (0, $Zz0sd$classnames)({
|
|
@@ -4529,7 +3875,7 @@ function $9e150e311a3261e9$export$ab1e7a67d6ec5ad8(props) {
|
|
|
4529
3875
|
]);
|
|
4530
3876
|
}
|
|
4531
3877
|
function $9e150e311a3261e9$export$cee395a8a2a00b29({ mapUse3D: mapUse3D , terrainSourceID: terrainSourceID }) {
|
|
4532
|
-
const mapRef = (0, $
|
|
3878
|
+
const mapRef = (0, $Zz0sd$useMapRef)();
|
|
4533
3879
|
(0, $Zz0sd$useEffect)(()=>{
|
|
4534
3880
|
const map = mapRef.current;
|
|
4535
3881
|
if (map == null) return;
|
|
@@ -4585,6 +3931,9 @@ $bfe9593b6c29b10b$export$523fb3936f49e028 = "page_48e225";
|
|
|
4585
3931
|
$bfe9593b6c29b10b$export$ee954d6f5e1b21cc = "dev-index-page_48e225";
|
|
4586
3932
|
|
|
4587
3933
|
|
|
3934
|
+
var $1d4d29ef2725aa16$exports = {};
|
|
3935
|
+
|
|
3936
|
+
$parcel$export($1d4d29ef2725aa16$exports, "TileExtentLayer", () => $1d4d29ef2725aa16$export$86c09739b12f23cd);
|
|
4588
3937
|
|
|
4589
3938
|
|
|
4590
3939
|
|
|
@@ -4619,13 +3968,18 @@ function $1d4d29ef2725aa16$export$86c09739b12f23cd({ tile: tile , color: color =
|
|
|
4619
3968
|
}, [
|
|
4620
3969
|
color
|
|
4621
3970
|
]);
|
|
4622
|
-
const map1 = (0, $
|
|
4623
|
-
(0, $
|
|
3971
|
+
const map1 = (0, $Zz0sd$useMapRef)();
|
|
3972
|
+
(0, $Zz0sd$useMapConditionalStyle)(map1, tile, styleCallback);
|
|
4624
3973
|
return null;
|
|
4625
3974
|
}
|
|
4626
3975
|
|
|
4627
3976
|
|
|
3977
|
+
var $b8c84b63e75fe4f2$exports = {};
|
|
4628
3978
|
|
|
3979
|
+
$parcel$export($b8c84b63e75fe4f2$exports, "FeatureRecord", () => $b8c84b63e75fe4f2$export$dc87b4d46cea200d);
|
|
3980
|
+
$parcel$export($b8c84b63e75fe4f2$exports, "FeatureSelectionHandler", () => $b8c84b63e75fe4f2$export$214daccdda0f4ac6);
|
|
3981
|
+
$parcel$export($b8c84b63e75fe4f2$exports, "TileInfo", () => $b8c84b63e75fe4f2$export$43c75dec9d0b96c);
|
|
3982
|
+
$parcel$export($b8c84b63e75fe4f2$exports, "FeaturePanel", () => $b8c84b63e75fe4f2$export$43277c51a01761c1);
|
|
4629
3983
|
|
|
4630
3984
|
|
|
4631
3985
|
|
|
@@ -4633,6 +3987,15 @@ function $1d4d29ef2725aa16$export$86c09739b12f23cd({ tile: tile , color: color =
|
|
|
4633
3987
|
|
|
4634
3988
|
|
|
4635
3989
|
|
|
3990
|
+
var $d570ac304373e71c$exports = {};
|
|
3991
|
+
|
|
3992
|
+
$parcel$export($d570ac304373e71c$exports, "ExpansionPanelSummary", () => $d570ac304373e71c$export$cea00a9d724d5a32);
|
|
3993
|
+
$parcel$export($d570ac304373e71c$exports, "InfoPanelSection", () => $d570ac304373e71c$export$39c134eb0b07cf0e);
|
|
3994
|
+
$parcel$export($d570ac304373e71c$exports, "ExpansionPanel", () => $d570ac304373e71c$export$40e646e38e6ed100);
|
|
3995
|
+
$parcel$export($d570ac304373e71c$exports, "SubExpansionPanel", () => $d570ac304373e71c$export$d7160281aff7c3b8);
|
|
3996
|
+
$parcel$export($d570ac304373e71c$exports, "ExpandableDetailsPanel", () => $d570ac304373e71c$export$44ad9ff780615135);
|
|
3997
|
+
$parcel$export($d570ac304373e71c$exports, "ExpansionBody", () => $d570ac304373e71c$export$263416b670b3f129);
|
|
3998
|
+
|
|
4636
3999
|
|
|
4637
4000
|
|
|
4638
4001
|
var $3388ecc062e0c521$exports = {};
|
|
@@ -4829,8 +4192,8 @@ function $b8c84b63e75fe4f2$export$dc87b4d46cea200d({ feature: feature }) {
|
|
|
4829
4192
|
]);
|
|
4830
4193
|
}
|
|
4831
4194
|
function $b8c84b63e75fe4f2$export$214daccdda0f4ac6({ selectedLocation: selectedLocation , setFeatures: setFeatures , radius: radius = 2 }) {
|
|
4832
|
-
const mapRef = (0, $
|
|
4833
|
-
const { isLoading: isLoading } = (0, $
|
|
4195
|
+
const mapRef = (0, $Zz0sd$useMapRef)();
|
|
4196
|
+
const { isLoading: isLoading } = (0, $Zz0sd$useMapStatus)();
|
|
4834
4197
|
const prevLocation = $b8c84b63e75fe4f2$var$usePrevious(selectedLocation);
|
|
4835
4198
|
(0, $Zz0sd$useEffect)(()=>{
|
|
4836
4199
|
const map = mapRef?.current;
|
|
@@ -4883,7 +4246,7 @@ function $b8c84b63e75fe4f2$var$KeyValue({ label: label , value: value }) {
|
|
|
4883
4246
|
]);
|
|
4884
4247
|
}
|
|
4885
4248
|
function $b8c84b63e75fe4f2$var$LoadingAwareFeatureSet({ features: features , sourceID: sourceID }) {
|
|
4886
|
-
const map = (0, $
|
|
4249
|
+
const map = (0, $Zz0sd$useMapRef)();
|
|
4887
4250
|
if (map?.current == null) return null;
|
|
4888
4251
|
const [isLoaded1, setIsLoaded] = (0, $Zz0sd$useState)(false);
|
|
4889
4252
|
const sourceFeatures = features.filter((d)=>d.source == "burwell");
|
|
@@ -5007,19 +4370,19 @@ function $b8c84b63e75fe4f2$var$Features({ features: features1 }) {
|
|
|
5007
4370
|
}
|
|
5008
4371
|
|
|
5009
4372
|
|
|
5010
|
-
let $
|
|
4373
|
+
let $a281a0612311d660$export$dce4b6e67bb5f25a;
|
|
5011
4374
|
(function(MacrostratVectorTileset1) {
|
|
5012
4375
|
MacrostratVectorTileset1["Carto"] = "carto";
|
|
5013
4376
|
MacrostratVectorTileset1["CartoSlim"] = "carto-slim";
|
|
5014
4377
|
MacrostratVectorTileset1["IGCPOrogens"] = "igcp-orogens";
|
|
5015
|
-
})($
|
|
5016
|
-
let $
|
|
4378
|
+
})($a281a0612311d660$export$dce4b6e67bb5f25a || ($a281a0612311d660$export$dce4b6e67bb5f25a = {}));
|
|
4379
|
+
let $a281a0612311d660$export$cc7c195070dfb906;
|
|
5017
4380
|
(function(MacrostratRasterTileset1) {
|
|
5018
4381
|
MacrostratRasterTileset1["Carto"] = "carto";
|
|
5019
4382
|
MacrostratRasterTileset1["Emphasized"] = "emphasized";
|
|
5020
|
-
})($
|
|
5021
|
-
const $
|
|
5022
|
-
function $
|
|
4383
|
+
})($a281a0612311d660$export$cc7c195070dfb906 || ($a281a0612311d660$export$cc7c195070dfb906 = {}));
|
|
4384
|
+
const $a281a0612311d660$export$dda1d9f60106f0e9 = (0, $Zz0sd$macrostrathyper).styled((0, (/*@__PURE__*/$parcel$interopDefault($bfe9593b6c29b10b$exports))));
|
|
4385
|
+
function $a281a0612311d660$export$2391061fbdfb71ef({ title: title = "Map inspector" , headerElement: headerElement = null , transformRequest: transformRequest = null , mapPosition: mapPosition = null , mapboxToken: mapboxToken = null , overlayStyle: overlayStyle = null , children: children , style: style , focusedSource: focusedSource = null , focusedSourceTitle: focusedSourceTitle = null , projection: projection = null }) {
|
|
5023
4386
|
/* We apply a custom style to the panel container when we are interacting
|
|
5024
4387
|
with the search bar, so that we can block map interactions until search
|
|
5025
4388
|
bar focus is lost.
|
|
@@ -5055,13 +4418,13 @@ function $b6d2ac1192949c28$export$2391061fbdfb71ef({ title: title = "Map inspect
|
|
|
5055
4418
|
setInspectPosition(position);
|
|
5056
4419
|
}, []);
|
|
5057
4420
|
let detailElement = null;
|
|
5058
|
-
if (inspectPosition != null) detailElement = $
|
|
4421
|
+
if (inspectPosition != null) detailElement = $a281a0612311d660$export$dda1d9f60106f0e9((0, $f50c3537aaff0cff$export$aa4baff5242ea6e1), {
|
|
5059
4422
|
onClose () {
|
|
5060
4423
|
setInspectPosition(null);
|
|
5061
4424
|
},
|
|
5062
4425
|
position: inspectPosition
|
|
5063
4426
|
}, [
|
|
5064
|
-
$
|
|
4427
|
+
$a281a0612311d660$export$dda1d9f60106f0e9((0, $b8c84b63e75fe4f2$export$43c75dec9d0b96c), {
|
|
5065
4428
|
feature: data?.[0] ?? null,
|
|
5066
4429
|
showExtent: showTileExtent,
|
|
5067
4430
|
setShowExtent () {
|
|
@@ -5071,7 +4434,7 @@ function $b6d2ac1192949c28$export$2391061fbdfb71ef({ title: title = "Map inspect
|
|
|
5071
4434
|
});
|
|
5072
4435
|
}
|
|
5073
4436
|
}),
|
|
5074
|
-
$
|
|
4437
|
+
$a281a0612311d660$export$dda1d9f60106f0e9((0, $b8c84b63e75fe4f2$export$43277c51a01761c1), {
|
|
5075
4438
|
features: data,
|
|
5076
4439
|
focusedSource: focusedSource,
|
|
5077
4440
|
focusedSourceTitle: focusedSourceTitle
|
|
@@ -5086,17 +4449,18 @@ function $b6d2ac1192949c28$export$2391061fbdfb71ef({ title: title = "Map inspect
|
|
|
5086
4449
|
z: f._z
|
|
5087
4450
|
};
|
|
5088
4451
|
}
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
$
|
|
5093
|
-
$
|
|
4452
|
+
console.log("Style", actualStyle);
|
|
4453
|
+
return $a281a0612311d660$export$dda1d9f60106f0e9((0, $4bdfa9cd8240b2fd$export$9fa5da0bcfd0a290), {
|
|
4454
|
+
navbar: $a281a0612311d660$export$dda1d9f60106f0e9((0, $6e914c81c8e053da$export$a8cc0062d02a3841), [
|
|
4455
|
+
headerElement ?? $a281a0612311d660$export$dda1d9f60106f0e9("h2", title),
|
|
4456
|
+
$a281a0612311d660$export$dda1d9f60106f0e9((0, $9197c0703088e02c$export$d7a54cba636a8cd6)),
|
|
4457
|
+
$a281a0612311d660$export$dda1d9f60106f0e9((0, $6e914c81c8e053da$export$9e3bae3c08bde368), {
|
|
5094
4458
|
active: isOpen,
|
|
5095
4459
|
onClick: ()=>setOpen(!isOpen)
|
|
5096
4460
|
}),
|
|
5097
4461
|
]),
|
|
5098
|
-
contextPanel: $
|
|
5099
|
-
$
|
|
4462
|
+
contextPanel: $a281a0612311d660$export$dda1d9f60106f0e9((0, $4bdfa9cd8240b2fd$export$ec68dd77edbe678b), [
|
|
4463
|
+
$a281a0612311d660$export$dda1d9f60106f0e9((0, $Zz0sd$Switch), {
|
|
5100
4464
|
checked: xRay,
|
|
5101
4465
|
label: "X-ray mode",
|
|
5102
4466
|
onChange () {
|
|
@@ -5110,21 +4474,21 @@ function $b6d2ac1192949c28$export$2391061fbdfb71ef({ title: title = "Map inspect
|
|
|
5110
4474
|
]),
|
|
5111
4475
|
detailPanel: detailElement,
|
|
5112
4476
|
contextPanelOpen: isOpen
|
|
5113
|
-
}, $
|
|
4477
|
+
}, $a281a0612311d660$export$dda1d9f60106f0e9((0, $9e150e311a3261e9$export$ab1e7a67d6ec5ad8), {
|
|
5114
4478
|
style: actualStyle,
|
|
5115
4479
|
transformRequest: transformRequest,
|
|
5116
4480
|
mapPosition: mapPosition,
|
|
5117
4481
|
projection: "globe"
|
|
5118
4482
|
}, [
|
|
5119
|
-
$
|
|
4483
|
+
$a281a0612311d660$export$dda1d9f60106f0e9((0, $b8c84b63e75fe4f2$export$214daccdda0f4ac6), {
|
|
5120
4484
|
selectedLocation: inspectPosition,
|
|
5121
4485
|
setFeatures: setData
|
|
5122
4486
|
}),
|
|
5123
|
-
$
|
|
4487
|
+
$a281a0612311d660$export$dda1d9f60106f0e9((0, $4bc3dd5f0732eed3$export$5c90a91c7455938c), {
|
|
5124
4488
|
position: inspectPosition,
|
|
5125
4489
|
setPosition: onSelectPosition
|
|
5126
4490
|
}),
|
|
5127
|
-
$
|
|
4491
|
+
$a281a0612311d660$export$dda1d9f60106f0e9((0, $1d4d29ef2725aa16$export$86c09739b12f23cd), {
|
|
5128
4492
|
tile: tile,
|
|
5129
4493
|
color: isEnabled ? "white" : "black"
|
|
5130
4494
|
}),
|
|
@@ -5135,6 +4499,20 @@ function $b6d2ac1192949c28$export$2391061fbdfb71ef({ title: title = "Map inspect
|
|
|
5135
4499
|
|
|
5136
4500
|
|
|
5137
4501
|
|
|
4502
|
+
$parcel$exportWildcard($b6d2ac1192949c28$exports, $a281a0612311d660$exports);
|
|
4503
|
+
$parcel$exportWildcard($b6d2ac1192949c28$exports, $1d4d29ef2725aa16$exports);
|
|
4504
|
+
$parcel$exportWildcard($b6d2ac1192949c28$exports, $b8c84b63e75fe4f2$exports);
|
|
4505
|
+
$parcel$exportWildcard($b6d2ac1192949c28$exports, $64ee2eed3ed5ffbc$exports);
|
|
4506
|
+
|
|
4507
|
+
|
|
4508
|
+
|
|
4509
|
+
|
|
4510
|
+
|
|
4511
|
+
|
|
4512
|
+
|
|
4513
|
+
|
|
4514
|
+
|
|
4515
|
+
|
|
5138
4516
|
|
|
5139
|
-
export {$6e914c81c8e053da$export$4ec83e90d030b2f3 as LoadingButton, $6e914c81c8e053da$export$9e3bae3c08bde368 as MapLoadingButton, $6e914c81c8e053da$export$a8cc0062d02a3841 as FloatingNavbar, $f50c3537aaff0cff$export$83f9a19cf91c2d06 as InfoDrawerContainer, $f50c3537aaff0cff$export$aa4baff5242ea6e1 as LocationPanel, $
|
|
5140
|
-
//# sourceMappingURL=
|
|
4517
|
+
export {$6e914c81c8e053da$export$4ec83e90d030b2f3 as LoadingButton, $6e914c81c8e053da$export$9e3bae3c08bde368 as MapLoadingButton, $6e914c81c8e053da$export$a8cc0062d02a3841 as FloatingNavbar, $f50c3537aaff0cff$export$83f9a19cf91c2d06 as InfoDrawerContainer, $f50c3537aaff0cff$export$aa4baff5242ea6e1 as LocationPanel, $a281a0612311d660$export$dce4b6e67bb5f25a as MacrostratVectorTileset, $a281a0612311d660$export$cc7c195070dfb906 as MacrostratRasterTileset, $a281a0612311d660$export$dda1d9f60106f0e9 as h, $a281a0612311d660$export$2391061fbdfb71ef as DevMapPage, $1d4d29ef2725aa16$export$86c09739b12f23cd as TileExtentLayer, $b8c84b63e75fe4f2$export$dc87b4d46cea200d as FeatureRecord, $b8c84b63e75fe4f2$export$214daccdda0f4ac6 as FeatureSelectionHandler, $b8c84b63e75fe4f2$export$43c75dec9d0b96c as TileInfo, $b8c84b63e75fe4f2$export$43277c51a01761c1 as FeaturePanel, $64ee2eed3ed5ffbc$export$eff5fb2e10d05b1d as buildXRayStyle, $64ee2eed3ed5ffbc$export$e739dc8dfc0db9a6 as buildInspectorStyle, $4bdfa9cd8240b2fd$export$57b87f3e07d4bb90 as MapInterface, $4bdfa9cd8240b2fd$export$ec68dd77edbe678b as PanelCard, $4bdfa9cd8240b2fd$export$fa395a37c3898ae3 as MapStyledContainer, $4bdfa9cd8240b2fd$export$9fa5da0bcfd0a290 as MapAreaContainer, $9e150e311a3261e9$export$ab1e7a67d6ec5ad8 as MapView, $9e150e311a3261e9$export$cee395a8a2a00b29 as MapTerrainManager, $91d5aa004eeb2226$export$db1a2e058a06fb5c as MapBottomControls, $4bc3dd5f0732eed3$export$31b2e088aff2dc5d as MapResizeManager, $4bc3dd5f0732eed3$export$2ab96428dea558d6 as MapPaddingManager, $4bc3dd5f0732eed3$export$f6eeee399afc4e9a as MapMovedReporter, $4bc3dd5f0732eed3$export$e57f9eaa51773f82 as MapLoadingReporter, $4bc3dd5f0732eed3$export$5c90a91c7455938c as MapMarker, $82fe09613877ffc2$export$bb78f9f01775eef1 as getMapPadding, $82fe09613877ffc2$export$278090850f6b3a9f as useMapMarker, $4fae2d573d730db8$export$716098b85fd0efdf as ValueWithUnit, $4fae2d573d730db8$export$af8082af0bea3eb1 as DegreeCoord, $4fae2d573d730db8$export$f195b3550849e560 as LngLatCoords, $4fae2d573d730db8$export$58bfb4f6ec5aa58d as Elevation, $d570ac304373e71c$export$cea00a9d724d5a32 as ExpansionPanelSummary, $d570ac304373e71c$export$39c134eb0b07cf0e as InfoPanelSection, $d570ac304373e71c$export$40e646e38e6ed100 as ExpansionPanel, $d570ac304373e71c$export$d7160281aff7c3b8 as SubExpansionPanel, $d570ac304373e71c$export$44ad9ff780615135 as ExpandableDetailsPanel, $d570ac304373e71c$export$263416b670b3f129 as ExpansionBody};
|
|
4518
|
+
//# sourceMappingURL=module.js.map
|