@macrostrat/map-interface 1.0.9 → 1.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/CHANGELOG.md +7 -0
- package/package.json +4 -2
- package/src/container.ts +3 -3
- package/src/context-panel/index.ts +52 -9
- package/src/context-panel/main.module.sass +10 -2
- package/src/dev/map-page.ts +9 -6
- package/src/helpers.ts +20 -2
- package/src/main.module.sass +6 -1
- package/dist/main.cjs +0 -1917
- package/dist/main.cjs.map +0 -1
- package/dist/main.css +0 -951
- package/dist/main.css.map +0 -1
- package/dist/module.css +0 -951
- package/dist/module.css.map +0 -1
- package/dist/module.mjs +0 -1908
- package/dist/module.mjs.map +0 -1
- package/dist/types.d.ts +0 -260
- package/dist/types.d.ts.map +0 -1
package/dist/module.mjs
DELETED
|
@@ -1,1908 +0,0 @@
|
|
|
1
|
-
import "./module.css";
|
|
2
|
-
import {useMemo as $Zz0sd$useMemo, useState as $Zz0sd$useState, useEffect as $Zz0sd$useEffect, useCallback as $Zz0sd$useCallback, useRef as $Zz0sd$useRef} from "react";
|
|
3
|
-
import {Spinner as $Zz0sd$Spinner, Button as $Zz0sd$Button, Navbar as $Zz0sd$Navbar, Card as $Zz0sd$Card, Icon as $Zz0sd$Icon, Switch as $Zz0sd$Switch, Collapse as $Zz0sd$Collapse} from "@blueprintjs/core";
|
|
4
|
-
import $Zz0sd$macrostrathyper, {addClassNames as $Zz0sd$addClassNames} from "@macrostrat/hyper";
|
|
5
|
-
import {useMapStatus as $Zz0sd$useMapStatus, useFocusState as $Zz0sd$useFocusState, isCentered as $Zz0sd$isCentered, LocationFocusButton as $Zz0sd$LocationFocusButton, ZoomControl as $Zz0sd$ZoomControl, MapboxMapProvider as $Zz0sd$MapboxMapProvider, useMapPosition as $Zz0sd$useMapPosition, MapControlWrapper as $Zz0sd$MapControlWrapper, ThreeDControl as $Zz0sd$ThreeDControl, CompassControl as $Zz0sd$CompassControl, GlobeControl as $Zz0sd$GlobeControl, useMapRef as $Zz0sd$useMapRef, useMapEaseTo as $Zz0sd$useMapEaseTo, useMapDispatch as $Zz0sd$useMapDispatch, useMapConditionalStyle as $Zz0sd$useMapConditionalStyle} from "@macrostrat/mapbox-react";
|
|
6
|
-
import $Zz0sd$classnames from "classnames";
|
|
7
|
-
import {ErrorBoundary as $Zz0sd$ErrorBoundary, useToaster as $Zz0sd$useToaster, useDarkMode as $Zz0sd$useDarkMode, useStoredState as $Zz0sd$useStoredState, Spacer as $Zz0sd$Spacer, ToasterContext as $Zz0sd$ToasterContext, DevToolsButtonSlot as $Zz0sd$DevToolsButtonSlot, JSONView as $Zz0sd$JSONView, usePrevious as $Zz0sd$usePrevious} from "@macrostrat/ui-components";
|
|
8
|
-
import {formatCoordForZoomLevel as $Zz0sd$formatCoordForZoomLevel, normalizeLng as $Zz0sd$normalizeLng, metersToFeet as $Zz0sd$metersToFeet, getMapboxStyle as $Zz0sd$getMapboxStyle, mergeStyles as $Zz0sd$mergeStyles, mapViewInfo as $Zz0sd$mapViewInfo, getMapPosition as $Zz0sd$getMapPosition, setMapPosition as $Zz0sd$setMapPosition} from "@macrostrat/mapbox-utils";
|
|
9
|
-
import {format as $Zz0sd$format} from "d3-format";
|
|
10
|
-
import $Zz0sd$mapboxgl, {ScaleControl as $Zz0sd$ScaleControl, GeolocateControl as $Zz0sd$GeolocateControl, Marker as $Zz0sd$Marker} from "mapbox-gl";
|
|
11
|
-
import {asChromaColor as $Zz0sd$asChromaColor, toRGBAString as $Zz0sd$toRGBAString} from "@macrostrat/color-utils";
|
|
12
|
-
import {useTransition as $Zz0sd$useTransition} from "transition-hook";
|
|
13
|
-
import {debounce as $Zz0sd$debounce} from "underscore";
|
|
14
|
-
import $Zz0sd$useresizeobserver from "use-resize-observer";
|
|
15
|
-
import "mapbox-gl/dist/mapbox-gl.css";
|
|
16
|
-
import {tileToGeoJSON as $Zz0sd$tileToGeoJSON} from "@mapbox/tilebelt";
|
|
17
|
-
import {group as $Zz0sd$group} from "d3-array";
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
function $parcel$interopDefault(a) {
|
|
21
|
-
return a && a.__esModule ? a.default : a;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
function $parcel$export(e, n, v, s) {
|
|
25
|
-
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
function $parcel$exportWildcard(dest, source) {
|
|
29
|
-
Object.keys(source).forEach(function(key) {
|
|
30
|
-
if (key === 'default' || key === '__esModule' || Object.prototype.hasOwnProperty.call(dest, key)) {
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
Object.defineProperty(dest, key, {
|
|
35
|
-
enumerable: true,
|
|
36
|
-
get: function get() {
|
|
37
|
-
return source[key];
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
return dest;
|
|
43
|
-
}
|
|
44
|
-
var $6e914c81c8e053da$exports = {};
|
|
45
|
-
|
|
46
|
-
$parcel$export($6e914c81c8e053da$exports, "LoadingButton", () => $6e914c81c8e053da$export$4ec83e90d030b2f3);
|
|
47
|
-
$parcel$export($6e914c81c8e053da$exports, "MapLoadingButton", () => $6e914c81c8e053da$export$9e3bae3c08bde368);
|
|
48
|
-
$parcel$export($6e914c81c8e053da$exports, "FloatingNavbar", () => $6e914c81c8e053da$export$a8cc0062d02a3841);
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
var $fbe402416678c280$exports = {};
|
|
53
|
-
|
|
54
|
-
$parcel$export($fbe402416678c280$exports, "loading-button", () => $fbe402416678c280$export$fcaa8d3bc8e9cf1e, (v) => $fbe402416678c280$export$fcaa8d3bc8e9cf1e = v);
|
|
55
|
-
$parcel$export($fbe402416678c280$exports, "navbar-holder", () => $fbe402416678c280$export$d8779dd86528d602, (v) => $fbe402416678c280$export$d8779dd86528d602 = v);
|
|
56
|
-
$parcel$export($fbe402416678c280$exports, "searchbar", () => $fbe402416678c280$export$2ac23befe9d406ee, (v) => $fbe402416678c280$export$2ac23befe9d406ee = v);
|
|
57
|
-
$parcel$export($fbe402416678c280$exports, "searchbar-holder", () => $fbe402416678c280$export$3a39e67bbbcbd4ae, (v) => $fbe402416678c280$export$3a39e67bbbcbd4ae = v);
|
|
58
|
-
$parcel$export($fbe402416678c280$exports, "status-tongue", () => $fbe402416678c280$export$764ade2d69041360, (v) => $fbe402416678c280$export$764ade2d69041360 = v);
|
|
59
|
-
var $fbe402416678c280$export$fcaa8d3bc8e9cf1e;
|
|
60
|
-
var $fbe402416678c280$export$d8779dd86528d602;
|
|
61
|
-
var $fbe402416678c280$export$2ac23befe9d406ee;
|
|
62
|
-
var $fbe402416678c280$export$3a39e67bbbcbd4ae;
|
|
63
|
-
var $fbe402416678c280$export$764ade2d69041360;
|
|
64
|
-
$fbe402416678c280$export$fcaa8d3bc8e9cf1e = `_8hZKsW_loading-button`;
|
|
65
|
-
$fbe402416678c280$export$d8779dd86528d602 = `_8hZKsW_navbar-holder`;
|
|
66
|
-
$fbe402416678c280$export$2ac23befe9d406ee = `_8hZKsW_searchbar`;
|
|
67
|
-
$fbe402416678c280$export$3a39e67bbbcbd4ae = `_8hZKsW_searchbar-holder`;
|
|
68
|
-
$fbe402416678c280$export$764ade2d69041360 = `_8hZKsW_status-tongue`;
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
const $6e914c81c8e053da$var$h = (0, $Zz0sd$macrostrathyper).styled((0, (/*@__PURE__*/$parcel$interopDefault($fbe402416678c280$exports))));
|
|
73
|
-
const $6e914c81c8e053da$var$spinnerElement = $6e914c81c8e053da$var$h((0, $Zz0sd$Spinner), {
|
|
74
|
-
size: 16
|
|
75
|
-
});
|
|
76
|
-
function $6e914c81c8e053da$export$4ec83e90d030b2f3({ isLoading: isLoading = false, onClick: onClick, active: active = false, icon: icon = "menu" }) {
|
|
77
|
-
return $6e914c81c8e053da$var$h((0, $Zz0sd$Button), {
|
|
78
|
-
className: "loading-button",
|
|
79
|
-
icon: isLoading ? $6e914c81c8e053da$var$spinnerElement : icon,
|
|
80
|
-
large: false,
|
|
81
|
-
minimal: true,
|
|
82
|
-
onClick: onClick,
|
|
83
|
-
active: active && !isLoading
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
function $6e914c81c8e053da$export$9e3bae3c08bde368(props) {
|
|
87
|
-
const { isLoading: isLoading } = (0, $Zz0sd$useMapStatus)();
|
|
88
|
-
const mapIsLoading = (0, $Zz0sd$useMemo)(()=>isLoading, [
|
|
89
|
-
isLoading
|
|
90
|
-
]);
|
|
91
|
-
return $6e914c81c8e053da$var$h($6e914c81c8e053da$export$4ec83e90d030b2f3, {
|
|
92
|
-
...props,
|
|
93
|
-
isLoading: mapIsLoading
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
function $6e914c81c8e053da$export$a8cc0062d02a3841({ className: className, children: children, statusElement: statusElement = null }) {
|
|
97
|
-
return $6e914c81c8e053da$var$h("div.searchbar-holder", {
|
|
98
|
-
className: className
|
|
99
|
-
}, [
|
|
100
|
-
$6e914c81c8e053da$var$h("div.navbar-holder", [
|
|
101
|
-
$6e914c81c8e053da$var$h((0, $Zz0sd$Navbar), {
|
|
102
|
-
className: "searchbar panel"
|
|
103
|
-
}, children)
|
|
104
|
-
]),
|
|
105
|
-
$6e914c81c8e053da$var$h.if(statusElement != null)((0, $Zz0sd$Card), {
|
|
106
|
-
className: "status-tongue"
|
|
107
|
-
}, statusElement)
|
|
108
|
-
]);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
var $f50c3537aaff0cff$exports = {};
|
|
113
|
-
|
|
114
|
-
$parcel$export($f50c3537aaff0cff$exports, "InfoDrawerContainer", () => $f50c3537aaff0cff$export$83f9a19cf91c2d06);
|
|
115
|
-
$parcel$export($f50c3537aaff0cff$exports, "BaseInfoDrawer", () => $f50c3537aaff0cff$export$a5ddcc2a88716895);
|
|
116
|
-
$parcel$export($f50c3537aaff0cff$exports, "LocationPanel", () => $f50c3537aaff0cff$export$aa4baff5242ea6e1);
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
var $29ab0212ea6844d0$exports = {};
|
|
122
|
-
|
|
123
|
-
$parcel$export($29ab0212ea6844d0$exports, "copy-link-button", () => $29ab0212ea6844d0$export$d1352d0c31a65024, (v) => $29ab0212ea6844d0$export$d1352d0c31a65024 = v);
|
|
124
|
-
$parcel$export($29ab0212ea6844d0$exports, "infodrawer", () => $29ab0212ea6844d0$export$b5017f7ff265217d, (v) => $29ab0212ea6844d0$export$b5017f7ff265217d = v);
|
|
125
|
-
$parcel$export($29ab0212ea6844d0$exports, "infodrawer-body", () => $29ab0212ea6844d0$export$310e8f86a84c074f, (v) => $29ab0212ea6844d0$export$310e8f86a84c074f = v);
|
|
126
|
-
$parcel$export($29ab0212ea6844d0$exports, "infodrawer-contents", () => $29ab0212ea6844d0$export$69ed3ba502fbf15b, (v) => $29ab0212ea6844d0$export$69ed3ba502fbf15b = v);
|
|
127
|
-
$parcel$export($29ab0212ea6844d0$exports, "infodrawer-header-item", () => $29ab0212ea6844d0$export$333d72514239bce8, (v) => $29ab0212ea6844d0$export$333d72514239bce8 = v);
|
|
128
|
-
$parcel$export($29ab0212ea6844d0$exports, "left-icon", () => $29ab0212ea6844d0$export$f750577db09821ce, (v) => $29ab0212ea6844d0$export$f750577db09821ce = v);
|
|
129
|
-
$parcel$export($29ab0212ea6844d0$exports, "loading", () => $29ab0212ea6844d0$export$46c1c92549715335, (v) => $29ab0212ea6844d0$export$46c1c92549715335 = v);
|
|
130
|
-
$parcel$export($29ab0212ea6844d0$exports, "location-panel-header", () => $29ab0212ea6844d0$export$d821beb98a87c6d7, (v) => $29ab0212ea6844d0$export$d821beb98a87c6d7 = v);
|
|
131
|
-
$parcel$export($29ab0212ea6844d0$exports, "position-controls", () => $29ab0212ea6844d0$export$dfae07a3bf0fbd6, (v) => $29ab0212ea6844d0$export$dfae07a3bf0fbd6 = v);
|
|
132
|
-
$parcel$export($29ab0212ea6844d0$exports, "spacer", () => $29ab0212ea6844d0$export$8cc075c801fd6817, (v) => $29ab0212ea6844d0$export$8cc075c801fd6817 = v);
|
|
133
|
-
var $29ab0212ea6844d0$export$d1352d0c31a65024;
|
|
134
|
-
var $29ab0212ea6844d0$export$b5017f7ff265217d;
|
|
135
|
-
var $29ab0212ea6844d0$export$310e8f86a84c074f;
|
|
136
|
-
var $29ab0212ea6844d0$export$69ed3ba502fbf15b;
|
|
137
|
-
var $29ab0212ea6844d0$export$333d72514239bce8;
|
|
138
|
-
var $29ab0212ea6844d0$export$f750577db09821ce;
|
|
139
|
-
var $29ab0212ea6844d0$export$46c1c92549715335;
|
|
140
|
-
var $29ab0212ea6844d0$export$d821beb98a87c6d7;
|
|
141
|
-
var $29ab0212ea6844d0$export$dfae07a3bf0fbd6;
|
|
142
|
-
var $29ab0212ea6844d0$export$8cc075c801fd6817;
|
|
143
|
-
$29ab0212ea6844d0$export$d1352d0c31a65024 = `VPa3-W_copy-link-button`;
|
|
144
|
-
$29ab0212ea6844d0$export$b5017f7ff265217d = `VPa3-W_infodrawer`;
|
|
145
|
-
$29ab0212ea6844d0$export$310e8f86a84c074f = `VPa3-W_infodrawer-body`;
|
|
146
|
-
$29ab0212ea6844d0$export$69ed3ba502fbf15b = `VPa3-W_infodrawer-contents`;
|
|
147
|
-
$29ab0212ea6844d0$export$333d72514239bce8 = `VPa3-W_infodrawer-header-item`;
|
|
148
|
-
$29ab0212ea6844d0$export$f750577db09821ce = `VPa3-W_left-icon`;
|
|
149
|
-
$29ab0212ea6844d0$export$46c1c92549715335 = `VPa3-W_loading`;
|
|
150
|
-
$29ab0212ea6844d0$export$d821beb98a87c6d7 = `VPa3-W_location-panel-header`;
|
|
151
|
-
$29ab0212ea6844d0$export$dfae07a3bf0fbd6 = `VPa3-W_position-controls`;
|
|
152
|
-
$29ab0212ea6844d0$export$8cc075c801fd6817 = `VPa3-W_spacer`;
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
var $4fae2d573d730db8$exports = {};
|
|
157
|
-
|
|
158
|
-
$parcel$export($4fae2d573d730db8$exports, "ValueWithUnit", () => $4fae2d573d730db8$export$716098b85fd0efdf);
|
|
159
|
-
$parcel$export($4fae2d573d730db8$exports, "DegreeCoord", () => $4fae2d573d730db8$export$af8082af0bea3eb1);
|
|
160
|
-
$parcel$export($4fae2d573d730db8$exports, "LngLatCoords", () => $4fae2d573d730db8$export$f195b3550849e560);
|
|
161
|
-
$parcel$export($4fae2d573d730db8$exports, "Elevation", () => $4fae2d573d730db8$export$58bfb4f6ec5aa58d);
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
const $3e1bd09be8f70c4c$export$97c1b10e131a836d = (0, $Zz0sd$format)(".4~f");
|
|
166
|
-
const $3e1bd09be8f70c4c$export$b1cb0f7fb990b3ea = (0, $Zz0sd$format)(".3~f");
|
|
167
|
-
const $3e1bd09be8f70c4c$export$4c173b1b2f78faf7 = (0, $Zz0sd$format)(".2~f");
|
|
168
|
-
const $3e1bd09be8f70c4c$export$e54bbd2c33d17485 = (0, $Zz0sd$format)(".1~f");
|
|
169
|
-
const $3e1bd09be8f70c4c$export$bc135f63e2f56fd4 = (0, $Zz0sd$format)(".0f");
|
|
170
|
-
function $3e1bd09be8f70c4c$export$7c4d25c0c3217d8c(val, precision = 0) {
|
|
171
|
-
switch(precision){
|
|
172
|
-
case 4:
|
|
173
|
-
return $3e1bd09be8f70c4c$export$97c1b10e131a836d(val);
|
|
174
|
-
case 3:
|
|
175
|
-
return $3e1bd09be8f70c4c$export$b1cb0f7fb990b3ea(val);
|
|
176
|
-
case 2:
|
|
177
|
-
return $3e1bd09be8f70c4c$export$4c173b1b2f78faf7(val);
|
|
178
|
-
case 1:
|
|
179
|
-
return $3e1bd09be8f70c4c$export$e54bbd2c33d17485(val);
|
|
180
|
-
case 0:
|
|
181
|
-
return $3e1bd09be8f70c4c$export$bc135f63e2f56fd4(val);
|
|
182
|
-
default:
|
|
183
|
-
return $3e1bd09be8f70c4c$export$97c1b10e131a836d(val);
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
var $bb5f34705d9c44bc$exports = {};
|
|
189
|
-
|
|
190
|
-
$parcel$export($bb5f34705d9c44bc$exports, "applyMapPositionToHash", () => $bb5f34705d9c44bc$export$8391d1abb505ffb3);
|
|
191
|
-
$parcel$export($bb5f34705d9c44bc$exports, "getMapPositionForHash", () => $bb5f34705d9c44bc$export$80abf1cbcc3918e4);
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
function $bb5f34705d9c44bc$export$8391d1abb505ffb3(args, mapPosition) {
|
|
195
|
-
const pos = mapPosition?.camera;
|
|
196
|
-
if (pos == null) return;
|
|
197
|
-
const zoom = mapPosition.target?.zoom;
|
|
198
|
-
args.x = (0, $Zz0sd$formatCoordForZoomLevel)(pos.lng, zoom);
|
|
199
|
-
args.y = (0, $Zz0sd$formatCoordForZoomLevel)(pos.lat, zoom);
|
|
200
|
-
if (pos.bearing == 0 && pos.pitch == 0 && zoom != null) args.z = (0, $3e1bd09be8f70c4c$export$e54bbd2c33d17485)(zoom);
|
|
201
|
-
else if (pos.altitude != null) {
|
|
202
|
-
if (pos.altitude > 5000) args.z = (0, $3e1bd09be8f70c4c$export$4c173b1b2f78faf7)(pos.altitude / 1000) + "km";
|
|
203
|
-
else args.z = (0, $3e1bd09be8f70c4c$export$bc135f63e2f56fd4)(pos.altitude) + "m";
|
|
204
|
-
}
|
|
205
|
-
if (pos.bearing != 0) {
|
|
206
|
-
let az = pos.bearing;
|
|
207
|
-
if (az < 0) az += 360;
|
|
208
|
-
args.a = (0, $3e1bd09be8f70c4c$export$bc135f63e2f56fd4)(az);
|
|
209
|
-
}
|
|
210
|
-
if (pos.pitch != 0) args.e = (0, $3e1bd09be8f70c4c$export$bc135f63e2f56fd4)(pos.pitch);
|
|
211
|
-
}
|
|
212
|
-
function $bb5f34705d9c44bc$var$_fmt(x) {
|
|
213
|
-
if (Array.isArray(x)) x = x[0];
|
|
214
|
-
return parseFloat(x.toString());
|
|
215
|
-
}
|
|
216
|
-
function $bb5f34705d9c44bc$export$80abf1cbcc3918e4(hashData, centerPosition) {
|
|
217
|
-
const { x: x = centerPosition?.lng ?? 0, y: y = centerPosition?.lat ?? 0, z: // Different default for zoom depending on whether we have a marker
|
|
218
|
-
z = centerPosition != null ? 7 : 2, a: a = 0, e: e = 0 } = hashData;
|
|
219
|
-
const lng = $bb5f34705d9c44bc$var$_fmt(x);
|
|
220
|
-
const lat = $bb5f34705d9c44bc$var$_fmt(y);
|
|
221
|
-
let altitude = null;
|
|
222
|
-
let zoom = null;
|
|
223
|
-
const _z = z.toString();
|
|
224
|
-
if (_z.endsWith("km")) altitude = $bb5f34705d9c44bc$var$_fmt(_z.substring(0, _z.length - 2)) * 1000;
|
|
225
|
-
else if (_z.endsWith("m")) altitude = $bb5f34705d9c44bc$var$_fmt(_z.substring(0, _z.length - 1));
|
|
226
|
-
else zoom = $bb5f34705d9c44bc$var$_fmt(z);
|
|
227
|
-
const bearing = $bb5f34705d9c44bc$var$_fmt(a);
|
|
228
|
-
const pitch = $bb5f34705d9c44bc$var$_fmt(e);
|
|
229
|
-
let target = undefined;
|
|
230
|
-
if (bearing == 0 && pitch == 0 && zoom != null) target = {
|
|
231
|
-
lat: lat,
|
|
232
|
-
lng: lng,
|
|
233
|
-
zoom: zoom
|
|
234
|
-
};
|
|
235
|
-
return {
|
|
236
|
-
camera: {
|
|
237
|
-
lng: $bb5f34705d9c44bc$var$_fmt(x),
|
|
238
|
-
lat: $bb5f34705d9c44bc$var$_fmt(y),
|
|
239
|
-
altitude: altitude,
|
|
240
|
-
bearing: $bb5f34705d9c44bc$var$_fmt(a),
|
|
241
|
-
pitch: $bb5f34705d9c44bc$var$_fmt(e)
|
|
242
|
-
},
|
|
243
|
-
target: target
|
|
244
|
-
};
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
function $4fae2d573d730db8$export$716098b85fd0efdf(props) {
|
|
249
|
-
const { value: value, unit: unit } = props;
|
|
250
|
-
return (0, $Zz0sd$macrostrathyper)("span.value-with-unit", [
|
|
251
|
-
(0, $Zz0sd$macrostrathyper)("span.value", [
|
|
252
|
-
value
|
|
253
|
-
]),
|
|
254
|
-
(0, $Zz0sd$macrostrathyper)("span.spacer", [
|
|
255
|
-
" "
|
|
256
|
-
]),
|
|
257
|
-
(0, $Zz0sd$macrostrathyper)("span.unit", [
|
|
258
|
-
unit
|
|
259
|
-
])
|
|
260
|
-
]);
|
|
261
|
-
}
|
|
262
|
-
function $4fae2d573d730db8$export$af8082af0bea3eb1(props) {
|
|
263
|
-
const { value: value, labels: labels, precision: precision = 3, format: format = (0, $3e1bd09be8f70c4c$export$7c4d25c0c3217d8c) } = props;
|
|
264
|
-
const direction = value < 0 ? labels[1] : labels[0];
|
|
265
|
-
return (0, $Zz0sd$macrostrathyper)($4fae2d573d730db8$export$716098b85fd0efdf, {
|
|
266
|
-
value: format(Math.abs(value), precision) + "\xb0",
|
|
267
|
-
unit: direction
|
|
268
|
-
});
|
|
269
|
-
}
|
|
270
|
-
function $4fae2d573d730db8$export$f195b3550849e560(props) {
|
|
271
|
-
/** Formatted geographic coordinates */ const { position: position, className: className, precision: precision, zoom: zoom } = props;
|
|
272
|
-
let { format: format } = props;
|
|
273
|
-
if (position == null) return null;
|
|
274
|
-
let lat, lng;
|
|
275
|
-
if (Array.isArray(position)) [lng, lat] = position;
|
|
276
|
-
else ({ lat: lat, lng: lng } = position);
|
|
277
|
-
if (zoom != null && format == null && precision == null) format = (val, _)=>(0, $Zz0sd$formatCoordForZoomLevel)(val, zoom);
|
|
278
|
-
return (0, $Zz0sd$macrostrathyper)("div.lnglat-container", {
|
|
279
|
-
className: className
|
|
280
|
-
}, [
|
|
281
|
-
(0, $Zz0sd$macrostrathyper)("span.lnglat", [
|
|
282
|
-
(0, $Zz0sd$macrostrathyper)($4fae2d573d730db8$export$af8082af0bea3eb1, {
|
|
283
|
-
value: lat,
|
|
284
|
-
labels: [
|
|
285
|
-
"N",
|
|
286
|
-
"S"
|
|
287
|
-
],
|
|
288
|
-
precision: precision,
|
|
289
|
-
format: format
|
|
290
|
-
}),
|
|
291
|
-
", ",
|
|
292
|
-
(0, $Zz0sd$macrostrathyper)($4fae2d573d730db8$export$af8082af0bea3eb1, {
|
|
293
|
-
value: (0, $Zz0sd$normalizeLng)(lng),
|
|
294
|
-
labels: [
|
|
295
|
-
"E",
|
|
296
|
-
"W"
|
|
297
|
-
],
|
|
298
|
-
precision: precision,
|
|
299
|
-
format: format
|
|
300
|
-
})
|
|
301
|
-
])
|
|
302
|
-
]);
|
|
303
|
-
}
|
|
304
|
-
function $4fae2d573d730db8$export$58bfb4f6ec5aa58d(props) {
|
|
305
|
-
/** Renders an elevation value in meters and a parenthetical conversion to feet. */ const { elevation: elevation, className: className, includeFeet: includeFeet = true } = props;
|
|
306
|
-
if (elevation == null) return null;
|
|
307
|
-
return (0, $Zz0sd$macrostrathyper)("div.elevation", {
|
|
308
|
-
className: className
|
|
309
|
-
}, [
|
|
310
|
-
(0, $Zz0sd$macrostrathyper)($4fae2d573d730db8$export$716098b85fd0efdf, {
|
|
311
|
-
value: elevation,
|
|
312
|
-
unit: "m"
|
|
313
|
-
}),
|
|
314
|
-
(0, $Zz0sd$macrostrathyper).if(includeFeet)("span.secondary", [
|
|
315
|
-
" (",
|
|
316
|
-
(0, $Zz0sd$macrostrathyper)($4fae2d573d730db8$export$716098b85fd0efdf, {
|
|
317
|
-
value: (0, $Zz0sd$metersToFeet)(elevation),
|
|
318
|
-
unit: "ft"
|
|
319
|
-
}),
|
|
320
|
-
")"
|
|
321
|
-
])
|
|
322
|
-
]);
|
|
323
|
-
}
|
|
324
|
-
$parcel$exportWildcard($4fae2d573d730db8$exports, $bb5f34705d9c44bc$exports);
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
const $427faf94283514d4$var$h = (0, $Zz0sd$macrostrathyper).styled((0, (/*@__PURE__*/$parcel$interopDefault($29ab0212ea6844d0$exports))));
|
|
329
|
-
function $427faf94283514d4$var$PositionButton({ position: position, showCopyLink: showCopyLink = false }) {
|
|
330
|
-
const focusState = (0, $Zz0sd$useFocusState)(position);
|
|
331
|
-
const copyLinkIsVisible = (0, $Zz0sd$isCentered)(focusState) && showCopyLink;
|
|
332
|
-
return $427faf94283514d4$var$h("div.position-controls", [
|
|
333
|
-
$427faf94283514d4$var$h((0, $Zz0sd$LocationFocusButton), {
|
|
334
|
-
location: position,
|
|
335
|
-
focusState: focusState
|
|
336
|
-
}, []),
|
|
337
|
-
$427faf94283514d4$var$h.if(copyLinkIsVisible)($427faf94283514d4$var$CopyLinkButton, {
|
|
338
|
-
itemName: "position"
|
|
339
|
-
})
|
|
340
|
-
]);
|
|
341
|
-
}
|
|
342
|
-
function $427faf94283514d4$var$CopyLinkButton({ itemName: itemName, children: children, onClick: onClick, ...rest }) {
|
|
343
|
-
const toaster = (0, $Zz0sd$useToaster)();
|
|
344
|
-
let message = `Copied link`;
|
|
345
|
-
if (itemName != null) message += ` to ${itemName}`;
|
|
346
|
-
message += "!";
|
|
347
|
-
return $427faf94283514d4$var$h((0, $Zz0sd$Button), {
|
|
348
|
-
className: "copy-link-button",
|
|
349
|
-
rightIcon: $427faf94283514d4$var$h((0, $Zz0sd$Icon), {
|
|
350
|
-
icon: "link",
|
|
351
|
-
size: 12
|
|
352
|
-
}),
|
|
353
|
-
minimal: true,
|
|
354
|
-
small: true,
|
|
355
|
-
onClick () {
|
|
356
|
-
navigator.clipboard.writeText(window.location.href).then(()=>{
|
|
357
|
-
toaster?.show({
|
|
358
|
-
message: message,
|
|
359
|
-
intent: "success",
|
|
360
|
-
icon: "clipboard",
|
|
361
|
-
timeout: 1000
|
|
362
|
-
});
|
|
363
|
-
onClick?.();
|
|
364
|
-
}, ()=>{
|
|
365
|
-
toaster?.show({
|
|
366
|
-
message: "Failed to copy link",
|
|
367
|
-
intent: "danger",
|
|
368
|
-
icon: "error",
|
|
369
|
-
timeout: 1000
|
|
370
|
-
});
|
|
371
|
-
});
|
|
372
|
-
},
|
|
373
|
-
...rest
|
|
374
|
-
}, children ?? "Copy link");
|
|
375
|
-
}
|
|
376
|
-
function $427faf94283514d4$export$e9ff14c4822c2e8c(props) {
|
|
377
|
-
const { onClose: onClose, position: position, zoom: zoom = 7, elevation: elevation, showCopyPositionButton: showCopyPositionButton } = props;
|
|
378
|
-
return $427faf94283514d4$var$h("header.location-panel-header", [
|
|
379
|
-
$427faf94283514d4$var$h($427faf94283514d4$var$PositionButton, {
|
|
380
|
-
position: position,
|
|
381
|
-
showCopyLink: showCopyPositionButton
|
|
382
|
-
}),
|
|
383
|
-
$427faf94283514d4$var$h("div.spacer"),
|
|
384
|
-
$427faf94283514d4$var$h((0, $4fae2d573d730db8$export$f195b3550849e560), {
|
|
385
|
-
position: position,
|
|
386
|
-
zoom: zoom,
|
|
387
|
-
className: "infodrawer-header-item"
|
|
388
|
-
}),
|
|
389
|
-
$427faf94283514d4$var$h.if(elevation != null)((0, $4fae2d573d730db8$export$58bfb4f6ec5aa58d), {
|
|
390
|
-
elevation: elevation,
|
|
391
|
-
className: "infodrawer-header-item"
|
|
392
|
-
}),
|
|
393
|
-
$427faf94283514d4$var$h((0, $Zz0sd$Button), {
|
|
394
|
-
minimal: true,
|
|
395
|
-
icon: "cross",
|
|
396
|
-
onClick: onClose
|
|
397
|
-
})
|
|
398
|
-
]);
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
const $f50c3537aaff0cff$var$h = (0, $Zz0sd$macrostrathyper).styled((0, (/*@__PURE__*/$parcel$interopDefault($29ab0212ea6844d0$exports))));
|
|
406
|
-
function $f50c3537aaff0cff$export$83f9a19cf91c2d06(props) {
|
|
407
|
-
const className = (0, $Zz0sd$classnames)("infodrawer", props.className);
|
|
408
|
-
return $f50c3537aaff0cff$var$h((0, $Zz0sd$Card), {
|
|
409
|
-
...props,
|
|
410
|
-
className: className
|
|
411
|
-
});
|
|
412
|
-
}
|
|
413
|
-
function $f50c3537aaff0cff$export$a5ddcc2a88716895(props) {
|
|
414
|
-
const { className: className, headerElement: headerElement = null, title: title, onClose: onClose, children: children, ...rest } = props;
|
|
415
|
-
const header = headerElement ?? $f50c3537aaff0cff$var$h((0, $427faf94283514d4$export$e9ff14c4822c2e8c), {
|
|
416
|
-
onClose: onClose,
|
|
417
|
-
...rest
|
|
418
|
-
}, [
|
|
419
|
-
title == null ? null : $f50c3537aaff0cff$var$h("h3", [
|
|
420
|
-
title
|
|
421
|
-
])
|
|
422
|
-
]);
|
|
423
|
-
return $f50c3537aaff0cff$var$h($f50c3537aaff0cff$export$83f9a19cf91c2d06, {
|
|
424
|
-
className: className
|
|
425
|
-
}, [
|
|
426
|
-
header,
|
|
427
|
-
$f50c3537aaff0cff$var$h("div.infodrawer-body", $f50c3537aaff0cff$var$h("div.infodrawer-contents", $f50c3537aaff0cff$var$h((0, $Zz0sd$ErrorBoundary), null, children)))
|
|
428
|
-
]);
|
|
429
|
-
}
|
|
430
|
-
function $f50c3537aaff0cff$export$aa4baff5242ea6e1(props) {
|
|
431
|
-
const { children: children, className: className, loading: loading = false, ...rest } = props;
|
|
432
|
-
const cls = (0, $Zz0sd$classnames)("location-panel", className, {
|
|
433
|
-
loading: loading
|
|
434
|
-
});
|
|
435
|
-
return $f50c3537aaff0cff$var$h($f50c3537aaff0cff$export$a5ddcc2a88716895, {
|
|
436
|
-
className: cls,
|
|
437
|
-
...rest
|
|
438
|
-
}, children);
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
var $b6d2ac1192949c28$exports = {};
|
|
443
|
-
var $a281a0612311d660$exports = {};
|
|
444
|
-
|
|
445
|
-
$parcel$export($a281a0612311d660$exports, "h", () => $a281a0612311d660$export$dda1d9f60106f0e9);
|
|
446
|
-
$parcel$export($a281a0612311d660$exports, "MapInspector", () => $a281a0612311d660$export$c5febf3ae8816972);
|
|
447
|
-
$parcel$export($a281a0612311d660$exports, "DevMapPage", () => $a281a0612311d660$export$2391061fbdfb71ef);
|
|
448
|
-
// Import other components
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
var $64ee2eed3ed5ffbc$exports = {};
|
|
455
|
-
|
|
456
|
-
$parcel$export($64ee2eed3ed5ffbc$exports, "buildXRayStyle", () => $64ee2eed3ed5ffbc$export$eff5fb2e10d05b1d);
|
|
457
|
-
$parcel$export($64ee2eed3ed5ffbc$exports, "buildInspectorStyle", () => $64ee2eed3ed5ffbc$export$e739dc8dfc0db9a6);
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
async function $64ee2eed3ed5ffbc$export$eff5fb2e10d05b1d(baseStyle, params = null) {
|
|
461
|
-
const { inDarkMode: inDarkMode = false, color: color = "rgb(74, 242, 161)", mapboxToken: mapboxToken, xRaySources: xRaySources } = params;
|
|
462
|
-
const style = await (0, $Zz0sd$getMapboxStyle)(baseStyle, {
|
|
463
|
-
access_token: mapboxToken
|
|
464
|
-
});
|
|
465
|
-
const sources = xRaySources ?? Object.keys(style.sources);
|
|
466
|
-
let layers = [];
|
|
467
|
-
for (let layer of style.layers){
|
|
468
|
-
if (!sources.includes(layer.source)) {
|
|
469
|
-
layers.push(layer);
|
|
470
|
-
continue;
|
|
471
|
-
}
|
|
472
|
-
let newLayer = $64ee2eed3ed5ffbc$var$transformMapboxLayer(layer, color, inDarkMode);
|
|
473
|
-
if (newLayer != null) layers.push(newLayer);
|
|
474
|
-
}
|
|
475
|
-
return {
|
|
476
|
-
...style,
|
|
477
|
-
layers: layers
|
|
478
|
-
};
|
|
479
|
-
}
|
|
480
|
-
function $64ee2eed3ed5ffbc$var$transformMapboxLayer(layer, color, inDarkMode) {
|
|
481
|
-
const c = (0, $Zz0sd$asChromaColor)(color);
|
|
482
|
-
const xRayColor = (opacity = 1, darken = 0)=>{
|
|
483
|
-
if (!inDarkMode) return (0, $Zz0sd$toRGBAString)(c.darken(2 - darken).alpha(opacity));
|
|
484
|
-
return (0, $Zz0sd$toRGBAString)(c.alpha(opacity).darken(darken));
|
|
485
|
-
};
|
|
486
|
-
if (layer.type == "background") return null;
|
|
487
|
-
let newLayer = {
|
|
488
|
-
...layer
|
|
489
|
-
};
|
|
490
|
-
console.log(xRayColor(0.5));
|
|
491
|
-
if (layer.type == "fill") newLayer.paint = {
|
|
492
|
-
"fill-color": xRayColor(0.1),
|
|
493
|
-
"fill-outline-color": xRayColor(0.5)
|
|
494
|
-
};
|
|
495
|
-
else if (layer.type == "line") newLayer.paint = {
|
|
496
|
-
"line-color": xRayColor(0.5, 0),
|
|
497
|
-
"line-width": 1.5
|
|
498
|
-
};
|
|
499
|
-
else if (layer.type == "symbol") newLayer.paint = {
|
|
500
|
-
"text-color": xRayColor(1, -0.5),
|
|
501
|
-
"text-halo-color": "#000"
|
|
502
|
-
};
|
|
503
|
-
else if (layer.type == "circle") newLayer.paint = {
|
|
504
|
-
"circle-color": xRayColor(0.5, 0),
|
|
505
|
-
"circle-stroke-color": xRayColor(0.5, 1),
|
|
506
|
-
"circle-radius": 2
|
|
507
|
-
};
|
|
508
|
-
return newLayer;
|
|
509
|
-
}
|
|
510
|
-
async function $64ee2eed3ed5ffbc$export$e739dc8dfc0db9a6(baseStyle, overlayStyle = null, params = {}) {
|
|
511
|
-
const { mapboxToken: mapboxToken, xRay: xRay = false, xRaySources: _xRaySources, ...rest } = params;
|
|
512
|
-
let xRaySources = _xRaySources;
|
|
513
|
-
let style = await (0, $Zz0sd$getMapboxStyle)(baseStyle, {
|
|
514
|
-
access_token: mapboxToken
|
|
515
|
-
});
|
|
516
|
-
if (overlayStyle != null) {
|
|
517
|
-
const overlay = await (0, $Zz0sd$getMapboxStyle)(overlayStyle, {
|
|
518
|
-
access_token: mapboxToken
|
|
519
|
-
});
|
|
520
|
-
style = (0, $Zz0sd$mergeStyles)(style, overlay);
|
|
521
|
-
xRaySources ??= Object.keys(overlay.sources);
|
|
522
|
-
}
|
|
523
|
-
if (xRay) {
|
|
524
|
-
// If we haven't specified sources, then we'll use all of them
|
|
525
|
-
xRaySources ??= Object.keys(style.sources);
|
|
526
|
-
style = await $64ee2eed3ed5ffbc$export$eff5fb2e10d05b1d(style, {
|
|
527
|
-
...rest,
|
|
528
|
-
mapboxToken: mapboxToken,
|
|
529
|
-
xRaySources: xRaySources
|
|
530
|
-
});
|
|
531
|
-
}
|
|
532
|
-
return style;
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
var $4bdfa9cd8240b2fd$exports = {};
|
|
537
|
-
|
|
538
|
-
$parcel$export($4bdfa9cd8240b2fd$exports, "PanelCard", () => $4bdfa9cd8240b2fd$export$ec68dd77edbe678b);
|
|
539
|
-
$parcel$export($4bdfa9cd8240b2fd$exports, "DetailPanelStyle", () => $4bdfa9cd8240b2fd$export$612ca936d3ed4784);
|
|
540
|
-
$parcel$export($4bdfa9cd8240b2fd$exports, "MapStyledContainer", () => $4bdfa9cd8240b2fd$export$fa395a37c3898ae3);
|
|
541
|
-
$parcel$export($4bdfa9cd8240b2fd$exports, "MapAreaContainer", () => $4bdfa9cd8240b2fd$export$9fa5da0bcfd0a290);
|
|
542
|
-
|
|
543
|
-
var $1f5c274a1b8d54c3$exports = {};
|
|
544
|
-
|
|
545
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "map-container", () => $1f5c274a1b8d54c3$export$d7f2c44afcf5df56, (v) => $1f5c274a1b8d54c3$export$d7f2c44afcf5df56 = v);
|
|
546
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "show-panel-outlines", () => $1f5c274a1b8d54c3$export$e163bcc0a29d66c, (v) => $1f5c274a1b8d54c3$export$e163bcc0a29d66c = v);
|
|
547
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "map-view-container", () => $1f5c274a1b8d54c3$export$11aa7dc57218208d, (v) => $1f5c274a1b8d54c3$export$11aa7dc57218208d = v);
|
|
548
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "fit-viewport", () => $1f5c274a1b8d54c3$export$2a73fca7b70dce31, (v) => $1f5c274a1b8d54c3$export$2a73fca7b70dce31 = v);
|
|
549
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "compass-control", () => $1f5c274a1b8d54c3$export$cc73204c64cc0950, (v) => $1f5c274a1b8d54c3$export$cc73204c64cc0950 = v);
|
|
550
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "map-is-rotated", () => $1f5c274a1b8d54c3$export$d2972e7dfac51dc2, (v) => $1f5c274a1b8d54c3$export$d2972e7dfac51dc2 = v);
|
|
551
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "map-3d-control", () => $1f5c274a1b8d54c3$export$142b9410c523ef40, (v) => $1f5c274a1b8d54c3$export$142b9410c523ef40 = v);
|
|
552
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "map-3d-available", () => $1f5c274a1b8d54c3$export$6bc2d6545947abbc, (v) => $1f5c274a1b8d54c3$export$6bc2d6545947abbc = v);
|
|
553
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "globe-control", () => $1f5c274a1b8d54c3$export$b06313b17bd37b68, (v) => $1f5c274a1b8d54c3$export$b06313b17bd37b68 = v);
|
|
554
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "map-is-global", () => $1f5c274a1b8d54c3$export$ea9cfbb56edd0e47, (v) => $1f5c274a1b8d54c3$export$ea9cfbb56edd0e47 = v);
|
|
555
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "detail-panel-open", () => $1f5c274a1b8d54c3$export$62a60ea2feb29c53, (v) => $1f5c274a1b8d54c3$export$62a60ea2feb29c53 = v);
|
|
556
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "zoom-control", () => $1f5c274a1b8d54c3$export$61e54aa1efb913ad, (v) => $1f5c274a1b8d54c3$export$61e54aa1efb913ad = v);
|
|
557
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "detail-panel-fixed", () => $1f5c274a1b8d54c3$export$4a4f34b86d8e6504, (v) => $1f5c274a1b8d54c3$export$4a4f34b86d8e6504 = v);
|
|
558
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "detail-panel-holder", () => $1f5c274a1b8d54c3$export$f553ebb4e6df6c5f, (v) => $1f5c274a1b8d54c3$export$f553ebb4e6df6c5f = v);
|
|
559
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "map-control-stack", () => $1f5c274a1b8d54c3$export$c163dab1f00a51cb, (v) => $1f5c274a1b8d54c3$export$c163dab1f00a51cb = v);
|
|
560
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "main-row", () => $1f5c274a1b8d54c3$export$bc4885f800420ea3, (v) => $1f5c274a1b8d54c3$export$bc4885f800420ea3 = v);
|
|
561
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "map-ui", () => $1f5c274a1b8d54c3$export$7d4a718201bc0bd1, (v) => $1f5c274a1b8d54c3$export$7d4a718201bc0bd1 = v);
|
|
562
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "mapbox-map", () => $1f5c274a1b8d54c3$export$d0dcaf774d09fc4c, (v) => $1f5c274a1b8d54c3$export$d0dcaf774d09fc4c = v);
|
|
563
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "panel-card", () => $1f5c274a1b8d54c3$export$8eff531ff0f1cffe, (v) => $1f5c274a1b8d54c3$export$8eff531ff0f1cffe = v);
|
|
564
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "context-stack", () => $1f5c274a1b8d54c3$export$a15c1c170cdda69a, (v) => $1f5c274a1b8d54c3$export$a15c1c170cdda69a = v);
|
|
565
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "searchbar", () => $1f5c274a1b8d54c3$export$2ac23befe9d406ee, (v) => $1f5c274a1b8d54c3$export$2ac23befe9d406ee = v);
|
|
566
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "detail-stack", () => $1f5c274a1b8d54c3$export$bb1d4538b98f1621, (v) => $1f5c274a1b8d54c3$export$bb1d4538b98f1621 = v);
|
|
567
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "panel-container", () => $1f5c274a1b8d54c3$export$9dd9a0eceddf6af6, (v) => $1f5c274a1b8d54c3$export$9dd9a0eceddf6af6 = v);
|
|
568
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "panel-title", () => $1f5c274a1b8d54c3$export$9672a0c48c9048ad, (v) => $1f5c274a1b8d54c3$export$9672a0c48c9048ad = v);
|
|
569
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "spacer", () => $1f5c274a1b8d54c3$export$8cc075c801fd6817, (v) => $1f5c274a1b8d54c3$export$8cc075c801fd6817 = v);
|
|
570
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "searchbar-holder", () => $1f5c274a1b8d54c3$export$3a39e67bbbcbd4ae, (v) => $1f5c274a1b8d54c3$export$3a39e67bbbcbd4ae = v);
|
|
571
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "right-panel", () => $1f5c274a1b8d54c3$export$3332ecdf6c5467a, (v) => $1f5c274a1b8d54c3$export$3332ecdf6c5467a = v);
|
|
572
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "buttons", () => $1f5c274a1b8d54c3$export$bbea856fdb3e3c5f, (v) => $1f5c274a1b8d54c3$export$bbea856fdb3e3c5f = v);
|
|
573
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "tab-button", () => $1f5c274a1b8d54c3$export$76800529067ae833, (v) => $1f5c274a1b8d54c3$export$76800529067ae833 = v);
|
|
574
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "menu-card", () => $1f5c274a1b8d54c3$export$d94de0bab38fd59, (v) => $1f5c274a1b8d54c3$export$d94de0bab38fd59 = v);
|
|
575
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "narrow-card", () => $1f5c274a1b8d54c3$export$9769f988dc28baf, (v) => $1f5c274a1b8d54c3$export$9769f988dc28baf = v);
|
|
576
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "panel-header", () => $1f5c274a1b8d54c3$export$90b77e3be608e918, (v) => $1f5c274a1b8d54c3$export$90b77e3be608e918 = v);
|
|
577
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "minimal", () => $1f5c274a1b8d54c3$export$10c083462c34aef3, (v) => $1f5c274a1b8d54c3$export$10c083462c34aef3 = v);
|
|
578
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "context-panel-leave", () => $1f5c274a1b8d54c3$export$f3ad069e7751fe80, (v) => $1f5c274a1b8d54c3$export$f3ad069e7751fe80 = v);
|
|
579
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "narrow-enter", () => $1f5c274a1b8d54c3$export$c20b2d766062840f, (v) => $1f5c274a1b8d54c3$export$c20b2d766062840f = v);
|
|
580
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "menu-group", () => $1f5c274a1b8d54c3$export$3a4b737893473805, (v) => $1f5c274a1b8d54c3$export$3a4b737893473805 = v);
|
|
581
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "menu-content", () => $1f5c274a1b8d54c3$export$3eeb6f640f2fe17b, (v) => $1f5c274a1b8d54c3$export$3eeb6f640f2fe17b = v);
|
|
582
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "bp5-button-group", () => $1f5c274a1b8d54c3$export$6fe71a6d4f52db2a, (v) => $1f5c274a1b8d54c3$export$6fe71a6d4f52db2a = v);
|
|
583
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "detail-panel-container", () => $1f5c274a1b8d54c3$export$aa8359f513bf67ff, (v) => $1f5c274a1b8d54c3$export$aa8359f513bf67ff = v);
|
|
584
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "map-right-controls", () => $1f5c274a1b8d54c3$export$98a77ae0c82023e7, (v) => $1f5c274a1b8d54c3$export$98a77ae0c82023e7 = v);
|
|
585
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "map-controls", () => $1f5c274a1b8d54c3$export$802dc54769b48aa7, (v) => $1f5c274a1b8d54c3$export$802dc54769b48aa7 = v);
|
|
586
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "map-scale-control", () => $1f5c274a1b8d54c3$export$b56f659d649f0d92, (v) => $1f5c274a1b8d54c3$export$b56f659d649f0d92 = v);
|
|
587
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "detail-panel-enter", () => $1f5c274a1b8d54c3$export$e017ebf46ba443ed, (v) => $1f5c274a1b8d54c3$export$e017ebf46ba443ed = v);
|
|
588
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "infodrawer-stack", () => $1f5c274a1b8d54c3$export$69fa1b5d46c139b9, (v) => $1f5c274a1b8d54c3$export$69fa1b5d46c139b9 = v);
|
|
589
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "detail-panel", () => $1f5c274a1b8d54c3$export$c6930745f2610de0, (v) => $1f5c274a1b8d54c3$export$c6930745f2610de0 = v);
|
|
590
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "adaptive-width", () => $1f5c274a1b8d54c3$export$4db621d3143ef457, (v) => $1f5c274a1b8d54c3$export$4db621d3143ef457 = v);
|
|
591
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "context-panel-holder", () => $1f5c274a1b8d54c3$export$1113ec858cdbc244, (v) => $1f5c274a1b8d54c3$export$1113ec858cdbc244 = v);
|
|
592
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "context-panel-from", () => $1f5c274a1b8d54c3$export$90f42dafd5c24d2d, (v) => $1f5c274a1b8d54c3$export$90f42dafd5c24d2d = v);
|
|
593
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "context-panel-enter", () => $1f5c274a1b8d54c3$export$9ea3835d1b44cc08, (v) => $1f5c274a1b8d54c3$export$9ea3835d1b44cc08 = v);
|
|
594
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "detail-panel-floating", () => $1f5c274a1b8d54c3$export$50b37414f37debaa, (v) => $1f5c274a1b8d54c3$export$50b37414f37debaa = v);
|
|
595
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "detail-panel-from", () => $1f5c274a1b8d54c3$export$419647d5ce4279cb, (v) => $1f5c274a1b8d54c3$export$419647d5ce4279cb = v);
|
|
596
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "detail-panel-leave", () => $1f5c274a1b8d54c3$export$1d0f1d0b062c3bee, (v) => $1f5c274a1b8d54c3$export$1d0f1d0b062c3bee = v);
|
|
597
|
-
$parcel$export($1f5c274a1b8d54c3$exports, "context-panel", () => $1f5c274a1b8d54c3$export$b4dbb67ffc3cc7a9, (v) => $1f5c274a1b8d54c3$export$b4dbb67ffc3cc7a9 = v);
|
|
598
|
-
var $1f5c274a1b8d54c3$export$d7f2c44afcf5df56;
|
|
599
|
-
var $1f5c274a1b8d54c3$export$e163bcc0a29d66c;
|
|
600
|
-
var $1f5c274a1b8d54c3$export$11aa7dc57218208d;
|
|
601
|
-
var $1f5c274a1b8d54c3$export$2a73fca7b70dce31;
|
|
602
|
-
var $1f5c274a1b8d54c3$export$cc73204c64cc0950;
|
|
603
|
-
var $1f5c274a1b8d54c3$export$d2972e7dfac51dc2;
|
|
604
|
-
var $1f5c274a1b8d54c3$export$142b9410c523ef40;
|
|
605
|
-
var $1f5c274a1b8d54c3$export$6bc2d6545947abbc;
|
|
606
|
-
var $1f5c274a1b8d54c3$export$b06313b17bd37b68;
|
|
607
|
-
var $1f5c274a1b8d54c3$export$ea9cfbb56edd0e47;
|
|
608
|
-
var $1f5c274a1b8d54c3$export$62a60ea2feb29c53;
|
|
609
|
-
var $1f5c274a1b8d54c3$export$61e54aa1efb913ad;
|
|
610
|
-
var $1f5c274a1b8d54c3$export$4a4f34b86d8e6504;
|
|
611
|
-
var $1f5c274a1b8d54c3$export$f553ebb4e6df6c5f;
|
|
612
|
-
var $1f5c274a1b8d54c3$export$c163dab1f00a51cb;
|
|
613
|
-
var $1f5c274a1b8d54c3$export$bc4885f800420ea3;
|
|
614
|
-
var $1f5c274a1b8d54c3$export$7d4a718201bc0bd1;
|
|
615
|
-
var $1f5c274a1b8d54c3$export$d0dcaf774d09fc4c;
|
|
616
|
-
var $1f5c274a1b8d54c3$export$8eff531ff0f1cffe;
|
|
617
|
-
var $1f5c274a1b8d54c3$export$a15c1c170cdda69a;
|
|
618
|
-
var $1f5c274a1b8d54c3$export$2ac23befe9d406ee;
|
|
619
|
-
var $1f5c274a1b8d54c3$export$bb1d4538b98f1621;
|
|
620
|
-
var $1f5c274a1b8d54c3$export$9dd9a0eceddf6af6;
|
|
621
|
-
var $1f5c274a1b8d54c3$export$9672a0c48c9048ad;
|
|
622
|
-
var $1f5c274a1b8d54c3$export$8cc075c801fd6817;
|
|
623
|
-
var $1f5c274a1b8d54c3$export$3a39e67bbbcbd4ae;
|
|
624
|
-
var $1f5c274a1b8d54c3$export$3332ecdf6c5467a;
|
|
625
|
-
var $1f5c274a1b8d54c3$export$bbea856fdb3e3c5f;
|
|
626
|
-
var $1f5c274a1b8d54c3$export$76800529067ae833;
|
|
627
|
-
var $1f5c274a1b8d54c3$export$d94de0bab38fd59;
|
|
628
|
-
var $1f5c274a1b8d54c3$export$9769f988dc28baf;
|
|
629
|
-
var $1f5c274a1b8d54c3$export$90b77e3be608e918;
|
|
630
|
-
var $1f5c274a1b8d54c3$export$10c083462c34aef3;
|
|
631
|
-
var $1f5c274a1b8d54c3$export$f3ad069e7751fe80;
|
|
632
|
-
var $1f5c274a1b8d54c3$export$c20b2d766062840f;
|
|
633
|
-
var $1f5c274a1b8d54c3$export$3a4b737893473805;
|
|
634
|
-
var $1f5c274a1b8d54c3$export$3eeb6f640f2fe17b;
|
|
635
|
-
var $1f5c274a1b8d54c3$export$6fe71a6d4f52db2a;
|
|
636
|
-
var $1f5c274a1b8d54c3$export$aa8359f513bf67ff;
|
|
637
|
-
var $1f5c274a1b8d54c3$export$98a77ae0c82023e7;
|
|
638
|
-
var $1f5c274a1b8d54c3$export$802dc54769b48aa7;
|
|
639
|
-
var $1f5c274a1b8d54c3$export$b56f659d649f0d92;
|
|
640
|
-
var $1f5c274a1b8d54c3$export$e017ebf46ba443ed;
|
|
641
|
-
var $1f5c274a1b8d54c3$export$69fa1b5d46c139b9;
|
|
642
|
-
var $1f5c274a1b8d54c3$export$c6930745f2610de0;
|
|
643
|
-
var $1f5c274a1b8d54c3$export$4db621d3143ef457;
|
|
644
|
-
var $1f5c274a1b8d54c3$export$1113ec858cdbc244;
|
|
645
|
-
var $1f5c274a1b8d54c3$export$90f42dafd5c24d2d;
|
|
646
|
-
var $1f5c274a1b8d54c3$export$9ea3835d1b44cc08;
|
|
647
|
-
var $1f5c274a1b8d54c3$export$50b37414f37debaa;
|
|
648
|
-
var $1f5c274a1b8d54c3$export$419647d5ce4279cb;
|
|
649
|
-
var $1f5c274a1b8d54c3$export$1d0f1d0b062c3bee;
|
|
650
|
-
var $1f5c274a1b8d54c3$export$b4dbb67ffc3cc7a9;
|
|
651
|
-
$1f5c274a1b8d54c3$export$d7f2c44afcf5df56 = "map-container_4c0a66";
|
|
652
|
-
$1f5c274a1b8d54c3$export$e163bcc0a29d66c = "show-panel-outlines_4c0a66";
|
|
653
|
-
$1f5c274a1b8d54c3$export$11aa7dc57218208d = "map-view-container_4c0a66";
|
|
654
|
-
$1f5c274a1b8d54c3$export$2a73fca7b70dce31 = "fit-viewport_4c0a66";
|
|
655
|
-
$1f5c274a1b8d54c3$export$cc73204c64cc0950 = "compass-control_4c0a66";
|
|
656
|
-
$1f5c274a1b8d54c3$export$d2972e7dfac51dc2 = "map-is-rotated_4c0a66";
|
|
657
|
-
$1f5c274a1b8d54c3$export$142b9410c523ef40 = "map-3d-control_4c0a66";
|
|
658
|
-
$1f5c274a1b8d54c3$export$6bc2d6545947abbc = "map-3d-available_4c0a66";
|
|
659
|
-
$1f5c274a1b8d54c3$export$b06313b17bd37b68 = "globe-control_4c0a66";
|
|
660
|
-
$1f5c274a1b8d54c3$export$ea9cfbb56edd0e47 = "map-is-global_4c0a66";
|
|
661
|
-
$1f5c274a1b8d54c3$export$62a60ea2feb29c53 = "detail-panel-open_4c0a66";
|
|
662
|
-
$1f5c274a1b8d54c3$export$61e54aa1efb913ad = "zoom-control_4c0a66";
|
|
663
|
-
$1f5c274a1b8d54c3$export$4a4f34b86d8e6504 = "detail-panel-fixed_4c0a66";
|
|
664
|
-
$1f5c274a1b8d54c3$export$f553ebb4e6df6c5f = "detail-panel-holder_4c0a66";
|
|
665
|
-
$1f5c274a1b8d54c3$export$c163dab1f00a51cb = "map-control-stack_4c0a66";
|
|
666
|
-
$1f5c274a1b8d54c3$export$bc4885f800420ea3 = "main-row_4c0a66";
|
|
667
|
-
$1f5c274a1b8d54c3$export$7d4a718201bc0bd1 = "map-ui_4c0a66";
|
|
668
|
-
$1f5c274a1b8d54c3$export$d0dcaf774d09fc4c = "mapbox-map_4c0a66";
|
|
669
|
-
$1f5c274a1b8d54c3$export$8eff531ff0f1cffe = "panel-card_4c0a66";
|
|
670
|
-
$1f5c274a1b8d54c3$export$a15c1c170cdda69a = "context-stack_4c0a66";
|
|
671
|
-
$1f5c274a1b8d54c3$export$2ac23befe9d406ee = "searchbar_4c0a66";
|
|
672
|
-
$1f5c274a1b8d54c3$export$bb1d4538b98f1621 = "detail-stack_4c0a66";
|
|
673
|
-
$1f5c274a1b8d54c3$export$9dd9a0eceddf6af6 = "panel-container_4c0a66";
|
|
674
|
-
$1f5c274a1b8d54c3$export$9672a0c48c9048ad = "panel-title_4c0a66";
|
|
675
|
-
$1f5c274a1b8d54c3$export$8cc075c801fd6817 = "spacer_4c0a66";
|
|
676
|
-
$1f5c274a1b8d54c3$export$3a39e67bbbcbd4ae = "searchbar-holder_4c0a66";
|
|
677
|
-
$1f5c274a1b8d54c3$export$3332ecdf6c5467a = "right-panel_4c0a66";
|
|
678
|
-
$1f5c274a1b8d54c3$export$bbea856fdb3e3c5f = "buttons_4c0a66";
|
|
679
|
-
$1f5c274a1b8d54c3$export$76800529067ae833 = "tab-button_4c0a66";
|
|
680
|
-
$1f5c274a1b8d54c3$export$d94de0bab38fd59 = "menu-card_4c0a66";
|
|
681
|
-
$1f5c274a1b8d54c3$export$9769f988dc28baf = "narrow-card_4c0a66";
|
|
682
|
-
$1f5c274a1b8d54c3$export$90b77e3be608e918 = "panel-header_4c0a66";
|
|
683
|
-
$1f5c274a1b8d54c3$export$10c083462c34aef3 = "minimal_4c0a66";
|
|
684
|
-
$1f5c274a1b8d54c3$export$f3ad069e7751fe80 = "context-panel-leave_4c0a66";
|
|
685
|
-
$1f5c274a1b8d54c3$export$c20b2d766062840f = "narrow-enter_4c0a66";
|
|
686
|
-
$1f5c274a1b8d54c3$export$3a4b737893473805 = "menu-group_4c0a66";
|
|
687
|
-
$1f5c274a1b8d54c3$export$3eeb6f640f2fe17b = "menu-content_4c0a66";
|
|
688
|
-
$1f5c274a1b8d54c3$export$6fe71a6d4f52db2a = "bp5-button-group_4c0a66";
|
|
689
|
-
$1f5c274a1b8d54c3$export$aa8359f513bf67ff = "detail-panel-container_4c0a66";
|
|
690
|
-
$1f5c274a1b8d54c3$export$98a77ae0c82023e7 = "map-right-controls_4c0a66";
|
|
691
|
-
$1f5c274a1b8d54c3$export$802dc54769b48aa7 = "map-controls_4c0a66";
|
|
692
|
-
$1f5c274a1b8d54c3$export$b56f659d649f0d92 = "map-scale-control_4c0a66";
|
|
693
|
-
$1f5c274a1b8d54c3$export$e017ebf46ba443ed = "detail-panel-enter_4c0a66";
|
|
694
|
-
$1f5c274a1b8d54c3$export$69fa1b5d46c139b9 = "infodrawer-stack_4c0a66";
|
|
695
|
-
$1f5c274a1b8d54c3$export$c6930745f2610de0 = "detail-panel_4c0a66";
|
|
696
|
-
$1f5c274a1b8d54c3$export$4db621d3143ef457 = "adaptive-width_4c0a66";
|
|
697
|
-
$1f5c274a1b8d54c3$export$1113ec858cdbc244 = "context-panel-holder_4c0a66";
|
|
698
|
-
$1f5c274a1b8d54c3$export$90f42dafd5c24d2d = "context-panel-from_4c0a66";
|
|
699
|
-
$1f5c274a1b8d54c3$export$9ea3835d1b44cc08 = "context-panel-enter_4c0a66";
|
|
700
|
-
$1f5c274a1b8d54c3$export$50b37414f37debaa = "detail-panel-floating_4c0a66";
|
|
701
|
-
$1f5c274a1b8d54c3$export$419647d5ce4279cb = "detail-panel-from_4c0a66";
|
|
702
|
-
$1f5c274a1b8d54c3$export$1d0f1d0b062c3bee = "detail-panel-leave_4c0a66";
|
|
703
|
-
$1f5c274a1b8d54c3$export$b4dbb67ffc3cc7a9 = "context-panel_4c0a66";
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
var $91d5aa004eeb2226$exports = {};
|
|
711
|
-
|
|
712
|
-
$parcel$export($91d5aa004eeb2226$exports, "MapBottomControls", () => $91d5aa004eeb2226$export$db1a2e058a06fb5c);
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
const $91d5aa004eeb2226$var$h = (0, $Zz0sd$macrostrathyper).styled((0, (/*@__PURE__*/$parcel$interopDefault($1f5c274a1b8d54c3$exports))));
|
|
720
|
-
function $91d5aa004eeb2226$var$ScaleControl(props) {
|
|
721
|
-
const optionsRef = (0, $Zz0sd$useRef)({
|
|
722
|
-
maxWidth: 200,
|
|
723
|
-
unit: "metric"
|
|
724
|
-
});
|
|
725
|
-
return $91d5aa004eeb2226$var$h((0, $Zz0sd$MapControlWrapper), {
|
|
726
|
-
className: "map-scale-control",
|
|
727
|
-
control: (0, $Zz0sd$ScaleControl),
|
|
728
|
-
options: optionsRef.current,
|
|
729
|
-
...props
|
|
730
|
-
});
|
|
731
|
-
}
|
|
732
|
-
function $91d5aa004eeb2226$var$GeolocationControl(props) {
|
|
733
|
-
const optionsRef = (0, $Zz0sd$useRef)({
|
|
734
|
-
showAccuracyCircle: true,
|
|
735
|
-
showUserLocation: true,
|
|
736
|
-
trackUserLocation: true,
|
|
737
|
-
positionOptions: {
|
|
738
|
-
enableHighAccuracy: true
|
|
739
|
-
}
|
|
740
|
-
});
|
|
741
|
-
return $91d5aa004eeb2226$var$h((0, $Zz0sd$MapControlWrapper), {
|
|
742
|
-
control: (0, $Zz0sd$GeolocateControl),
|
|
743
|
-
options: optionsRef.current,
|
|
744
|
-
...props
|
|
745
|
-
});
|
|
746
|
-
}
|
|
747
|
-
function $91d5aa004eeb2226$export$db1a2e058a06fb5c({ children: children }) {
|
|
748
|
-
const { isInitialized: isInitialized } = (0, $Zz0sd$useMapStatus)();
|
|
749
|
-
if (!isInitialized) return null;
|
|
750
|
-
return $91d5aa004eeb2226$var$h("div.map-controls", [
|
|
751
|
-
$91d5aa004eeb2226$var$h($91d5aa004eeb2226$var$ScaleControl),
|
|
752
|
-
$91d5aa004eeb2226$var$h((0, $Zz0sd$ThreeDControl), {
|
|
753
|
-
className: "map-3d-control"
|
|
754
|
-
}),
|
|
755
|
-
$91d5aa004eeb2226$var$h((0, $Zz0sd$CompassControl), {
|
|
756
|
-
className: "compass-control"
|
|
757
|
-
}),
|
|
758
|
-
$91d5aa004eeb2226$var$h((0, $Zz0sd$GlobeControl), {
|
|
759
|
-
className: "globe-control"
|
|
760
|
-
}),
|
|
761
|
-
$91d5aa004eeb2226$var$h($91d5aa004eeb2226$var$GeolocationControl, {
|
|
762
|
-
className: "geolocation-control"
|
|
763
|
-
}),
|
|
764
|
-
// If we have global development tools enabled, show the button
|
|
765
|
-
$91d5aa004eeb2226$var$h((0, $Zz0sd$DevToolsButtonSlot), {
|
|
766
|
-
className: "map-control"
|
|
767
|
-
}),
|
|
768
|
-
children
|
|
769
|
-
]);
|
|
770
|
-
}
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
const $4bdfa9cd8240b2fd$var$h = (0, $Zz0sd$macrostrathyper).styled((0, (/*@__PURE__*/$parcel$interopDefault($1f5c274a1b8d54c3$exports))));
|
|
776
|
-
const $4bdfa9cd8240b2fd$export$ec68dd77edbe678b = (props)=>$4bdfa9cd8240b2fd$var$h((0, $Zz0sd$Card), {
|
|
777
|
-
...props,
|
|
778
|
-
className: (0, $Zz0sd$classnames)("panel-card", props.className)
|
|
779
|
-
});
|
|
780
|
-
var $4bdfa9cd8240b2fd$export$612ca936d3ed4784;
|
|
781
|
-
(function(DetailPanelStyle) {
|
|
782
|
-
DetailPanelStyle["FIXED"] = "fixed";
|
|
783
|
-
DetailPanelStyle["FLOATING"] = "floating";
|
|
784
|
-
})($4bdfa9cd8240b2fd$export$612ca936d3ed4784 || ($4bdfa9cd8240b2fd$export$612ca936d3ed4784 = {}));
|
|
785
|
-
function $4bdfa9cd8240b2fd$var$_MapAreaContainer({ children: children, className: className, navbar: navbar, contextPanel: contextPanel = null, detailPanel: detailPanel = null, detailPanelOpen: detailPanelOpen, contextPanelOpen: contextPanelOpen = true, bottomPanel: bottomPanel = null, mainPanel: mainPanel, mapControls: mapControls = $4bdfa9cd8240b2fd$var$h((0, $91d5aa004eeb2226$export$db1a2e058a06fb5c)), contextStackProps: contextStackProps = null, detailStackProps: detailStackProps = null, detailPanelStyle: detailPanelStyle = "floating", fitViewport: fitViewport = true, showPanelOutlines: showPanelOutlines = false, preventMapInteraction: preventMapInteraction = false, ...rest }) {
|
|
786
|
-
const _detailPanelOpen = detailPanelOpen ?? detailPanel != null;
|
|
787
|
-
const contextPanelTrans = (0, $Zz0sd$useTransition)(contextPanelOpen, 800);
|
|
788
|
-
const detailPanelTrans = (0, $Zz0sd$useTransition)(_detailPanelOpen, 800);
|
|
789
|
-
/*- We apply a custom style to the panel container when we are interacting
|
|
790
|
-
with the search bar, so that we can block map interactions until search
|
|
791
|
-
bar focus is lost.
|
|
792
|
-
- We also apply a custom style when the infodrawer is open so we can hide
|
|
793
|
-
the search bar on mobile platforms
|
|
794
|
-
- These styles are doubly applied so we can have both namespaced and
|
|
795
|
-
outside-accessible styles for each case.
|
|
796
|
-
*/ const mainUIClassNames = (0, $Zz0sd$classnames)("map-container", className, `detail-panel-${detailPanelStyle}`, `context-panel-${contextPanelTrans.stage}`, `map-context-${contextPanelTrans.stage}`, `detail-panel-${detailPanelTrans.stage}`, `map-detail-${detailPanelTrans.stage}`, {
|
|
797
|
-
"detail-panel-open": _detailPanelOpen,
|
|
798
|
-
"map-context-open": contextPanelOpen,
|
|
799
|
-
"show-panel-outlines": showPanelOutlines,
|
|
800
|
-
"fit-viewport": fitViewport
|
|
801
|
-
});
|
|
802
|
-
const mapControlsExt = $4bdfa9cd8240b2fd$var$h([
|
|
803
|
-
$4bdfa9cd8240b2fd$var$h((0, $Zz0sd$ZoomControl), {
|
|
804
|
-
className: "zoom-control"
|
|
805
|
-
}),
|
|
806
|
-
$4bdfa9cd8240b2fd$var$h("div.spacer"),
|
|
807
|
-
mapControls
|
|
808
|
-
]);
|
|
809
|
-
const detailStackExt = $4bdfa9cd8240b2fd$var$h("div.detail-stack.infodrawer-container", detailStackProps, [
|
|
810
|
-
$4bdfa9cd8240b2fd$var$h("div.detail-panel-holder", null, detailPanel),
|
|
811
|
-
$4bdfa9cd8240b2fd$var$h.if(detailPanelStyle == "floating")([
|
|
812
|
-
mapControlsExt
|
|
813
|
-
])
|
|
814
|
-
]);
|
|
815
|
-
return $4bdfa9cd8240b2fd$var$h($4bdfa9cd8240b2fd$export$fa395a37c3898ae3, {
|
|
816
|
-
className: mainUIClassNames
|
|
817
|
-
}, [
|
|
818
|
-
$4bdfa9cd8240b2fd$var$h("div.main-row", [
|
|
819
|
-
$4bdfa9cd8240b2fd$var$h("div.map-ui", {
|
|
820
|
-
...rest
|
|
821
|
-
}, [
|
|
822
|
-
$4bdfa9cd8240b2fd$var$h($4bdfa9cd8240b2fd$var$ContextStack, {
|
|
823
|
-
navbar: navbar,
|
|
824
|
-
...contextStackProps
|
|
825
|
-
}, [
|
|
826
|
-
$4bdfa9cd8240b2fd$var$h.if(contextPanelTrans.shouldMount)([
|
|
827
|
-
contextPanel
|
|
828
|
-
])
|
|
829
|
-
]),
|
|
830
|
-
//h(MapView),
|
|
831
|
-
children ?? mainPanel,
|
|
832
|
-
$4bdfa9cd8240b2fd$var$h.if(detailPanelStyle == "floating")([
|
|
833
|
-
detailStackExt
|
|
834
|
-
]),
|
|
835
|
-
$4bdfa9cd8240b2fd$var$h.if(detailPanelStyle == "fixed")("div.map-control-stack", mapControlsExt)
|
|
836
|
-
]),
|
|
837
|
-
$4bdfa9cd8240b2fd$var$h.if(detailPanelStyle == "fixed")([
|
|
838
|
-
detailStackExt
|
|
839
|
-
])
|
|
840
|
-
]),
|
|
841
|
-
$4bdfa9cd8240b2fd$var$h("div.bottom", null, bottomPanel)
|
|
842
|
-
]);
|
|
843
|
-
}
|
|
844
|
-
function $4bdfa9cd8240b2fd$var$ContextStack(props) {
|
|
845
|
-
const { adaptiveWidth: adaptiveWidth, navbar: navbar, children: children, ...rest } = props;
|
|
846
|
-
const props1 = (0, $Zz0sd$addClassNames)(rest, {
|
|
847
|
-
"adaptive-width": adaptiveWidth
|
|
848
|
-
});
|
|
849
|
-
return $4bdfa9cd8240b2fd$var$h("div.context-stack", props1, [
|
|
850
|
-
navbar,
|
|
851
|
-
$4bdfa9cd8240b2fd$var$h("div.context-panel-holder", null, children),
|
|
852
|
-
$4bdfa9cd8240b2fd$var$h("div.spacer")
|
|
853
|
-
]);
|
|
854
|
-
}
|
|
855
|
-
const $4bdfa9cd8240b2fd$var$MapProviders = ({ children: children })=>$4bdfa9cd8240b2fd$var$h((0, $Zz0sd$ToasterContext), $4bdfa9cd8240b2fd$var$h((0, $Zz0sd$MapboxMapProvider), children));
|
|
856
|
-
const $4bdfa9cd8240b2fd$export$9fa5da0bcfd0a290 = (props)=>$4bdfa9cd8240b2fd$var$h($4bdfa9cd8240b2fd$var$MapProviders, $4bdfa9cd8240b2fd$var$h($4bdfa9cd8240b2fd$var$_MapAreaContainer, props));
|
|
857
|
-
function $4bdfa9cd8240b2fd$export$fa395a37c3898ae3({ className: className, children: children }) {
|
|
858
|
-
const mapPosition = (0, $Zz0sd$useMapPosition)();
|
|
859
|
-
if (mapPosition != null) {
|
|
860
|
-
const { mapIsRotated: mapIsRotated, mapUse3D: mapUse3D, mapIsGlobal: mapIsGlobal } = (0, $Zz0sd$mapViewInfo)(mapPosition);
|
|
861
|
-
className = (0, $Zz0sd$classnames)(className, {
|
|
862
|
-
"map-is-rotated": mapIsRotated,
|
|
863
|
-
"map-3d-available": mapUse3D,
|
|
864
|
-
"map-is-global": mapIsGlobal
|
|
865
|
-
});
|
|
866
|
-
}
|
|
867
|
-
return $4bdfa9cd8240b2fd$var$h("div", {
|
|
868
|
-
className: className
|
|
869
|
-
}, children);
|
|
870
|
-
} //const _MapPage = compose(HotkeysProvider, MapPage);
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
var $4bc3dd5f0732eed3$exports = {};
|
|
875
|
-
|
|
876
|
-
$parcel$export($4bc3dd5f0732eed3$exports, "MapResizeManager", () => $4bc3dd5f0732eed3$export$31b2e088aff2dc5d);
|
|
877
|
-
$parcel$export($4bc3dd5f0732eed3$exports, "MapPaddingManager", () => $4bc3dd5f0732eed3$export$2ab96428dea558d6);
|
|
878
|
-
$parcel$export($4bc3dd5f0732eed3$exports, "MapMovedReporter", () => $4bc3dd5f0732eed3$export$f6eeee399afc4e9a);
|
|
879
|
-
$parcel$export($4bc3dd5f0732eed3$exports, "MapLoadingReporter", () => $4bc3dd5f0732eed3$export$e57f9eaa51773f82);
|
|
880
|
-
$parcel$export($4bc3dd5f0732eed3$exports, "MapMarker", () => $4bc3dd5f0732eed3$export$5c90a91c7455938c);
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
var $82fe09613877ffc2$exports = {};
|
|
887
|
-
|
|
888
|
-
$parcel$export($82fe09613877ffc2$exports, "getMapPadding", () => $82fe09613877ffc2$export$bb78f9f01775eef1);
|
|
889
|
-
$parcel$export($82fe09613877ffc2$exports, "useMapMarker", () => $82fe09613877ffc2$export$278090850f6b3a9f);
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
function $82fe09613877ffc2$var$calcMapPadding(rect, childRect) {
|
|
893
|
-
return {
|
|
894
|
-
left: Math.max(rect.left - childRect.left, 0),
|
|
895
|
-
top: Math.max(rect.top - childRect.top, 0),
|
|
896
|
-
right: Math.max(childRect.right - rect.right, 0),
|
|
897
|
-
bottom: Math.max(childRect.bottom - rect.bottom, 0)
|
|
898
|
-
};
|
|
899
|
-
}
|
|
900
|
-
function $82fe09613877ffc2$export$bb78f9f01775eef1(ref, parentRef) {
|
|
901
|
-
const rect = parentRef.current?.getBoundingClientRect();
|
|
902
|
-
const childRect = ref.current?.getBoundingClientRect();
|
|
903
|
-
if (rect == null || childRect == null) return;
|
|
904
|
-
return $82fe09613877ffc2$var$calcMapPadding(rect, childRect);
|
|
905
|
-
}
|
|
906
|
-
function $82fe09613877ffc2$export$278090850f6b3a9f(mapRef, markerRef, markerPosition) {
|
|
907
|
-
(0, $Zz0sd$useEffect)(()=>{
|
|
908
|
-
const map = mapRef.current;
|
|
909
|
-
if (map == null) return;
|
|
910
|
-
if (markerPosition == null) {
|
|
911
|
-
markerRef.current?.remove();
|
|
912
|
-
return;
|
|
913
|
-
}
|
|
914
|
-
const marker = markerRef.current ?? new (0, $Zz0sd$Marker)();
|
|
915
|
-
marker.setLngLat(markerPosition).addTo(map);
|
|
916
|
-
markerRef.current = marker;
|
|
917
|
-
return ()=>marker.remove();
|
|
918
|
-
}, [
|
|
919
|
-
mapRef.current,
|
|
920
|
-
markerPosition
|
|
921
|
-
]);
|
|
922
|
-
}
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
function $4bc3dd5f0732eed3$export$31b2e088aff2dc5d({ containerRef: containerRef }) {
|
|
926
|
-
const mapRef = (0, $Zz0sd$useMapRef)();
|
|
927
|
-
const debouncedResize = (0, $Zz0sd$useRef)((0, $Zz0sd$debounce)(()=>{
|
|
928
|
-
mapRef.current?.resize();
|
|
929
|
-
}, 100));
|
|
930
|
-
(0, $Zz0sd$useresizeobserver)({
|
|
931
|
-
ref: containerRef,
|
|
932
|
-
onResize: debouncedResize.current
|
|
933
|
-
});
|
|
934
|
-
return null;
|
|
935
|
-
}
|
|
936
|
-
function $4bc3dd5f0732eed3$export$2ab96428dea558d6({ containerRef: containerRef, parentRef: parentRef, infoMarkerPosition: infoMarkerPosition }) {
|
|
937
|
-
const mapRef = (0, $Zz0sd$useMapRef)();
|
|
938
|
-
const [padding, setPadding] = (0, $Zz0sd$useState)((0, $82fe09613877ffc2$export$bb78f9f01775eef1)(containerRef, parentRef));
|
|
939
|
-
const updateMapPadding = (0, $Zz0sd$useCallback)(()=>{
|
|
940
|
-
const newPadding = (0, $82fe09613877ffc2$export$bb78f9f01775eef1)(containerRef, parentRef);
|
|
941
|
-
setPadding(newPadding);
|
|
942
|
-
}, [
|
|
943
|
-
containerRef.current,
|
|
944
|
-
parentRef.current
|
|
945
|
-
]);
|
|
946
|
-
(0, $Zz0sd$useEffect)(()=>{
|
|
947
|
-
const map = mapRef.current;
|
|
948
|
-
if (map == null) return;
|
|
949
|
-
// Update map padding on load
|
|
950
|
-
updateMapPadding();
|
|
951
|
-
}, [
|
|
952
|
-
mapRef.current
|
|
953
|
-
]);
|
|
954
|
-
(0, $Zz0sd$useresizeobserver)({
|
|
955
|
-
ref: parentRef,
|
|
956
|
-
onResize (sz) {
|
|
957
|
-
updateMapPadding();
|
|
958
|
-
}
|
|
959
|
-
});
|
|
960
|
-
// Ideally, we would not have to do this when we know the infobox is loaded
|
|
961
|
-
(0, $Zz0sd$useMapEaseTo)({
|
|
962
|
-
center: infoMarkerPosition,
|
|
963
|
-
padding: padding
|
|
964
|
-
});
|
|
965
|
-
return null;
|
|
966
|
-
}
|
|
967
|
-
function $4bc3dd5f0732eed3$export$f6eeee399afc4e9a({ onMapMoved: onMapMoved = null }) {
|
|
968
|
-
const mapRef = (0, $Zz0sd$useMapRef)();
|
|
969
|
-
const dispatch = (0, $Zz0sd$useMapDispatch)();
|
|
970
|
-
const mapMovedCallback = (0, $Zz0sd$useCallback)(()=>{
|
|
971
|
-
const map = mapRef.current;
|
|
972
|
-
if (map == null) return;
|
|
973
|
-
const mapPosition = (0, $Zz0sd$getMapPosition)(map);
|
|
974
|
-
dispatch({
|
|
975
|
-
type: "map-moved",
|
|
976
|
-
payload: mapPosition
|
|
977
|
-
});
|
|
978
|
-
onMapMoved?.(mapPosition, map);
|
|
979
|
-
}, [
|
|
980
|
-
mapRef.current,
|
|
981
|
-
onMapMoved,
|
|
982
|
-
dispatch
|
|
983
|
-
]);
|
|
984
|
-
(0, $Zz0sd$useEffect)(()=>{
|
|
985
|
-
// Get the current value of the map. Useful for gradually moving away
|
|
986
|
-
// from class component
|
|
987
|
-
const map = mapRef.current;
|
|
988
|
-
if (map == null) return;
|
|
989
|
-
// Update the URI when the map moves
|
|
990
|
-
mapMovedCallback();
|
|
991
|
-
const cb = (0, $Zz0sd$debounce)(mapMovedCallback, 100);
|
|
992
|
-
map.on("moveend", cb);
|
|
993
|
-
return ()=>{
|
|
994
|
-
map?.off("moveend", cb);
|
|
995
|
-
};
|
|
996
|
-
}, [
|
|
997
|
-
mapMovedCallback
|
|
998
|
-
]);
|
|
999
|
-
return null;
|
|
1000
|
-
}
|
|
1001
|
-
function $4bc3dd5f0732eed3$export$e57f9eaa51773f82({ ignoredSources: ignoredSources, onMapLoading: onMapLoading = null, onMapIdle: onMapIdle = null, mapIsLoading: mapIsLoading }) {
|
|
1002
|
-
const mapRef = (0, $Zz0sd$useMapRef)();
|
|
1003
|
-
const loadingRef = (0, $Zz0sd$useRef)(false);
|
|
1004
|
-
const dispatch = (0, $Zz0sd$useMapDispatch)();
|
|
1005
|
-
(0, $Zz0sd$useEffect)(()=>{
|
|
1006
|
-
const map = mapRef.current;
|
|
1007
|
-
const mapIsLoading = loadingRef.current;
|
|
1008
|
-
if (map == null) return;
|
|
1009
|
-
let didSendLoading = false;
|
|
1010
|
-
const loadingCallback = (evt)=>{
|
|
1011
|
-
if (ignoredSources.includes(evt.sourceId) || mapIsLoading) return;
|
|
1012
|
-
if (didSendLoading) return;
|
|
1013
|
-
onMapLoading?.(evt);
|
|
1014
|
-
dispatch({
|
|
1015
|
-
type: "set-loading",
|
|
1016
|
-
payload: true
|
|
1017
|
-
});
|
|
1018
|
-
loadingRef.current = true;
|
|
1019
|
-
didSendLoading = true;
|
|
1020
|
-
};
|
|
1021
|
-
const idleCallback = (evt)=>{
|
|
1022
|
-
if (!mapIsLoading) return;
|
|
1023
|
-
dispatch({
|
|
1024
|
-
type: "set-loading",
|
|
1025
|
-
payload: false
|
|
1026
|
-
});
|
|
1027
|
-
loadingRef.current = false;
|
|
1028
|
-
onMapIdle?.(evt);
|
|
1029
|
-
};
|
|
1030
|
-
map.on("sourcedataloading", loadingCallback);
|
|
1031
|
-
map.on("idle", idleCallback);
|
|
1032
|
-
return ()=>{
|
|
1033
|
-
map?.off("sourcedataloading", loadingCallback);
|
|
1034
|
-
map?.off("idle", idleCallback);
|
|
1035
|
-
};
|
|
1036
|
-
}, [
|
|
1037
|
-
ignoredSources,
|
|
1038
|
-
mapRef.current,
|
|
1039
|
-
mapIsLoading
|
|
1040
|
-
]);
|
|
1041
|
-
return null;
|
|
1042
|
-
}
|
|
1043
|
-
function $4bc3dd5f0732eed3$export$5c90a91c7455938c({ position: position, setPosition: setPosition, centerMarker: centerMarker = true }) {
|
|
1044
|
-
const mapRef = (0, $Zz0sd$useMapRef)();
|
|
1045
|
-
const markerRef = (0, $Zz0sd$useRef)(null);
|
|
1046
|
-
(0, $82fe09613877ffc2$export$278090850f6b3a9f)(mapRef, markerRef, position);
|
|
1047
|
-
const handleMapClick = (0, $Zz0sd$useCallback)((event)=>{
|
|
1048
|
-
setPosition(event.lngLat, event, mapRef.current);
|
|
1049
|
-
// We should integrate this with the "easeToCenter" hook
|
|
1050
|
-
if (centerMarker) mapRef.current?.flyTo({
|
|
1051
|
-
center: event.lngLat,
|
|
1052
|
-
duration: 800
|
|
1053
|
-
});
|
|
1054
|
-
}, [
|
|
1055
|
-
mapRef.current,
|
|
1056
|
-
setPosition
|
|
1057
|
-
]);
|
|
1058
|
-
(0, $Zz0sd$useEffect)(()=>{
|
|
1059
|
-
const map = mapRef.current;
|
|
1060
|
-
if (map != null && setPosition != null) map.on("click", handleMapClick);
|
|
1061
|
-
return ()=>{
|
|
1062
|
-
map?.off("click", handleMapClick);
|
|
1063
|
-
};
|
|
1064
|
-
}, [
|
|
1065
|
-
mapRef.current,
|
|
1066
|
-
setPosition
|
|
1067
|
-
]);
|
|
1068
|
-
return null;
|
|
1069
|
-
}
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
var $9e150e311a3261e9$exports = {};
|
|
1074
|
-
|
|
1075
|
-
$parcel$export($9e150e311a3261e9$exports, "MapView", () => $9e150e311a3261e9$export$ab1e7a67d6ec5ad8);
|
|
1076
|
-
$parcel$export($9e150e311a3261e9$exports, "MapTerrainManager", () => $9e150e311a3261e9$export$cee395a8a2a00b29);
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
// We should merge this with code in @macrostrat/mapbox-react/src/terrain.ts:
|
|
1085
|
-
function $286fbb15f2139dc1$export$b730542ee281c4b1(map, shouldEnable, sourceID = null) {
|
|
1086
|
-
if (!map.style?._loaded) {
|
|
1087
|
-
map.once("style.load", ()=>{
|
|
1088
|
-
$286fbb15f2139dc1$export$b730542ee281c4b1(map, shouldEnable, sourceID);
|
|
1089
|
-
});
|
|
1090
|
-
return;
|
|
1091
|
-
}
|
|
1092
|
-
const currentTerrainSource = $286fbb15f2139dc1$var$getTerrainSourceID(map);
|
|
1093
|
-
let demSourceID = sourceID ?? currentTerrainSource ?? "mapbox-dem";
|
|
1094
|
-
console.log("Enabling 3D terrain with source", demSourceID);
|
|
1095
|
-
// Enable or disable terrain depending on our current desires...
|
|
1096
|
-
const currentTerrain = map.getTerrain();
|
|
1097
|
-
if (!shouldEnable) {
|
|
1098
|
-
if (currentTerrain != null) map.setTerrain(null);
|
|
1099
|
-
return;
|
|
1100
|
-
}
|
|
1101
|
-
if (currentTerrain != null) return;
|
|
1102
|
-
// Add a DEM source if one is not found already.
|
|
1103
|
-
if (map.getSource(demSourceID) == null) map.addSource(demSourceID, {
|
|
1104
|
-
type: "raster-dem",
|
|
1105
|
-
url: "mapbox://mapbox.mapbox-terrain-dem-v1",
|
|
1106
|
-
tileSize: 512,
|
|
1107
|
-
maxzoom: 14
|
|
1108
|
-
});
|
|
1109
|
-
// add a sky layer that will show when the map is highly pitched
|
|
1110
|
-
if (map.getLayer("sky") == null) map.addLayer({
|
|
1111
|
-
id: "sky",
|
|
1112
|
-
type: "sky",
|
|
1113
|
-
paint: {
|
|
1114
|
-
"sky-type": "atmosphere",
|
|
1115
|
-
"sky-atmosphere-sun": [
|
|
1116
|
-
0.0,
|
|
1117
|
-
0.0
|
|
1118
|
-
],
|
|
1119
|
-
"sky-atmosphere-sun-intensity": 15
|
|
1120
|
-
}
|
|
1121
|
-
});
|
|
1122
|
-
map.setTerrain({
|
|
1123
|
-
source: demSourceID,
|
|
1124
|
-
exaggeration: 1
|
|
1125
|
-
});
|
|
1126
|
-
console.log(map.getTerrain());
|
|
1127
|
-
}
|
|
1128
|
-
function $286fbb15f2139dc1$var$getTerrainSourceID(map) {
|
|
1129
|
-
for (const [key, source] of Object.entries(map.getStyle().sources)){
|
|
1130
|
-
if (source.type == "raster-dem") return key;
|
|
1131
|
-
}
|
|
1132
|
-
return null;
|
|
1133
|
-
}
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
const $9e150e311a3261e9$var$h = (0, $Zz0sd$macrostrathyper).styled((0, (/*@__PURE__*/$parcel$interopDefault($1f5c274a1b8d54c3$exports))));
|
|
1140
|
-
function $9e150e311a3261e9$var$defaultInitializeMap(container, args = {}) {
|
|
1141
|
-
const { mapPosition: mapPosition, ...rest } = args;
|
|
1142
|
-
console.log("Initializing map (default)", args);
|
|
1143
|
-
const map = new (0, $Zz0sd$mapboxgl).Map({
|
|
1144
|
-
container: container,
|
|
1145
|
-
maxZoom: 18,
|
|
1146
|
-
//maxTileCacheSize: 0,
|
|
1147
|
-
logoPosition: "bottom-left",
|
|
1148
|
-
trackResize: true,
|
|
1149
|
-
antialias: true,
|
|
1150
|
-
optimizeForTerrain: true,
|
|
1151
|
-
...rest
|
|
1152
|
-
});
|
|
1153
|
-
// set initial map position
|
|
1154
|
-
if (mapPosition != null) (0, $Zz0sd$setMapPosition)(map, mapPosition);
|
|
1155
|
-
//setMapPosition(map, mapPosition);
|
|
1156
|
-
return map;
|
|
1157
|
-
}
|
|
1158
|
-
const $9e150e311a3261e9$var$defaultMapPosition = {
|
|
1159
|
-
camera: {
|
|
1160
|
-
lat: 34,
|
|
1161
|
-
lng: -120,
|
|
1162
|
-
altitude: 300000
|
|
1163
|
-
}
|
|
1164
|
-
};
|
|
1165
|
-
function $9e150e311a3261e9$export$ab1e7a67d6ec5ad8(props) {
|
|
1166
|
-
let { terrainSourceID: terrainSourceID } = props;
|
|
1167
|
-
const { enableTerrain: enableTerrain = true, style: style, mapPosition: mapPosition = $9e150e311a3261e9$var$defaultMapPosition, initializeMap: initializeMap = $9e150e311a3261e9$var$defaultInitializeMap, children: children, mapboxToken: mapboxToken, accessToken: // Deprecated
|
|
1168
|
-
accessToken, infoMarkerPosition: infoMarkerPosition, transformRequest: transformRequest, projection: projection, onMapLoaded: onMapLoaded = null, onStyleLoaded: onStyleLoaded = null, onMapMoved: onMapMoved = null, ...rest } = props;
|
|
1169
|
-
if (enableTerrain) terrainSourceID ??= "mapbox-3d-dem";
|
|
1170
|
-
const _mapboxToken = mapboxToken ?? accessToken;
|
|
1171
|
-
if (_mapboxToken != null) (0, $Zz0sd$mapboxgl).accessToken = _mapboxToken;
|
|
1172
|
-
const dispatch = (0, $Zz0sd$useMapDispatch)();
|
|
1173
|
-
let mapRef = (0, $Zz0sd$useMapRef)();
|
|
1174
|
-
const ref = (0, $Zz0sd$useRef)();
|
|
1175
|
-
const parentRef = (0, $Zz0sd$useRef)();
|
|
1176
|
-
// Keep track of map position for reloads
|
|
1177
|
-
(0, $Zz0sd$useEffect)(()=>{
|
|
1178
|
-
console.log("Map updated", mapRef.current);
|
|
1179
|
-
}, [
|
|
1180
|
-
mapRef.current
|
|
1181
|
-
]);
|
|
1182
|
-
(0, $Zz0sd$useEffect)(()=>{
|
|
1183
|
-
if (style == null) return;
|
|
1184
|
-
if (mapRef.current != null) {
|
|
1185
|
-
console.log("Setting style", style);
|
|
1186
|
-
mapRef.current.setStyle(style);
|
|
1187
|
-
return;
|
|
1188
|
-
}
|
|
1189
|
-
const map = initializeMap(ref.current, {
|
|
1190
|
-
style: style,
|
|
1191
|
-
projection: projection,
|
|
1192
|
-
mapPosition: mapPosition,
|
|
1193
|
-
...rest
|
|
1194
|
-
});
|
|
1195
|
-
map.setPadding((0, $82fe09613877ffc2$export$bb78f9f01775eef1)(ref, parentRef), {
|
|
1196
|
-
animate: false
|
|
1197
|
-
});
|
|
1198
|
-
map.on("style.load", ()=>{
|
|
1199
|
-
onStyleLoaded?.(map);
|
|
1200
|
-
dispatch({
|
|
1201
|
-
type: "set-style-loaded",
|
|
1202
|
-
payload: true
|
|
1203
|
-
});
|
|
1204
|
-
});
|
|
1205
|
-
onMapLoaded?.(map);
|
|
1206
|
-
dispatch({
|
|
1207
|
-
type: "set-map",
|
|
1208
|
-
payload: map
|
|
1209
|
-
});
|
|
1210
|
-
}, [
|
|
1211
|
-
style
|
|
1212
|
-
]);
|
|
1213
|
-
// Map style updating
|
|
1214
|
-
// useEffect(() => {
|
|
1215
|
-
// if (mapRef?.current == null || style == null) return;
|
|
1216
|
-
// mapRef?.current?.setStyle(style);
|
|
1217
|
-
// }, [mapRef.current, style]);
|
|
1218
|
-
// Set map position if it changes
|
|
1219
|
-
// useEffect(() => {
|
|
1220
|
-
// const map = mapRef.current;
|
|
1221
|
-
// if (map == null || mapPosition == null) return;
|
|
1222
|
-
// setMapPosition(map, mapPosition);
|
|
1223
|
-
// }, [mapPosition]);
|
|
1224
|
-
const _computedMapPosition = (0, $Zz0sd$useMapPosition)();
|
|
1225
|
-
const { mapUse3D: mapUse3D, mapIsRotated: mapIsRotated } = (0, $Zz0sd$mapViewInfo)(_computedMapPosition);
|
|
1226
|
-
// Get map projection
|
|
1227
|
-
const _projection = mapRef.current?.getProjection()?.name ?? "mercator";
|
|
1228
|
-
const className = (0, $Zz0sd$classnames)({
|
|
1229
|
-
"is-rotated": mapIsRotated ?? false,
|
|
1230
|
-
"is-3d-available": mapUse3D ?? false
|
|
1231
|
-
}, `${_projection}-projection`);
|
|
1232
|
-
return $9e150e311a3261e9$var$h("div.map-view-container.main-view", {
|
|
1233
|
-
ref: parentRef
|
|
1234
|
-
}, [
|
|
1235
|
-
$9e150e311a3261e9$var$h("div.mapbox-map#map", {
|
|
1236
|
-
ref: ref,
|
|
1237
|
-
className: className
|
|
1238
|
-
}),
|
|
1239
|
-
$9e150e311a3261e9$var$h((0, $4bc3dd5f0732eed3$export$e57f9eaa51773f82), {
|
|
1240
|
-
ignoredSources: [
|
|
1241
|
-
"elevationMarker",
|
|
1242
|
-
"crossSectionEndpoints"
|
|
1243
|
-
]
|
|
1244
|
-
}),
|
|
1245
|
-
$9e150e311a3261e9$var$h((0, $4bc3dd5f0732eed3$export$f6eeee399afc4e9a), {
|
|
1246
|
-
onMapMoved: onMapMoved
|
|
1247
|
-
}),
|
|
1248
|
-
$9e150e311a3261e9$var$h((0, $4bc3dd5f0732eed3$export$31b2e088aff2dc5d), {
|
|
1249
|
-
containerRef: ref
|
|
1250
|
-
}),
|
|
1251
|
-
$9e150e311a3261e9$var$h((0, $4bc3dd5f0732eed3$export$2ab96428dea558d6), {
|
|
1252
|
-
containerRef: ref,
|
|
1253
|
-
parentRef: parentRef,
|
|
1254
|
-
infoMarkerPosition: infoMarkerPosition
|
|
1255
|
-
}),
|
|
1256
|
-
$9e150e311a3261e9$var$h($9e150e311a3261e9$export$cee395a8a2a00b29, {
|
|
1257
|
-
mapUse3D: mapUse3D,
|
|
1258
|
-
terrainSourceID: terrainSourceID
|
|
1259
|
-
}),
|
|
1260
|
-
children
|
|
1261
|
-
]);
|
|
1262
|
-
}
|
|
1263
|
-
function $9e150e311a3261e9$export$cee395a8a2a00b29({ mapUse3D: mapUse3D, terrainSourceID: terrainSourceID }) {
|
|
1264
|
-
const mapRef = (0, $Zz0sd$useMapRef)();
|
|
1265
|
-
(0, $Zz0sd$useEffect)(()=>{
|
|
1266
|
-
const map = mapRef.current;
|
|
1267
|
-
if (map == null) return;
|
|
1268
|
-
(0, $286fbb15f2139dc1$export$b730542ee281c4b1)(map, mapUse3D, terrainSourceID);
|
|
1269
|
-
}, [
|
|
1270
|
-
mapRef.current,
|
|
1271
|
-
mapUse3D
|
|
1272
|
-
]);
|
|
1273
|
-
return null;
|
|
1274
|
-
}
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
var $bfe9593b6c29b10b$exports = {};
|
|
1278
|
-
|
|
1279
|
-
$parcel$export($bfe9593b6c29b10b$exports, "feature-panel", () => $bfe9593b6c29b10b$export$d27ce8c17b289f33, (v) => $bfe9593b6c29b10b$export$d27ce8c17b289f33 = v);
|
|
1280
|
-
$parcel$export($bfe9593b6c29b10b$exports, "key-value", () => $bfe9593b6c29b10b$export$6025d8aaa4edba3b, (v) => $bfe9593b6c29b10b$export$6025d8aaa4edba3b = v);
|
|
1281
|
-
$parcel$export($bfe9593b6c29b10b$exports, "key", () => $bfe9593b6c29b10b$export$df61b30b684217c0, (v) => $bfe9593b6c29b10b$export$df61b30b684217c0 = v);
|
|
1282
|
-
$parcel$export($bfe9593b6c29b10b$exports, "value", () => $bfe9593b6c29b10b$export$2ab9a8f9f1186f14, (v) => $bfe9593b6c29b10b$export$2ab9a8f9f1186f14 = v);
|
|
1283
|
-
$parcel$export($bfe9593b6c29b10b$exports, "feature-properties", () => $bfe9593b6c29b10b$export$4f7f4a0a9b87a0a1, (v) => $bfe9593b6c29b10b$export$4f7f4a0a9b87a0a1 = v);
|
|
1284
|
-
$parcel$export($bfe9593b6c29b10b$exports, "feature-header", () => $bfe9593b6c29b10b$export$435bd1864bef6e22, (v) => $bfe9593b6c29b10b$export$435bd1864bef6e22 = v);
|
|
1285
|
-
$parcel$export($bfe9593b6c29b10b$exports, "feature-group", () => $bfe9593b6c29b10b$export$a1386d43b662271, (v) => $bfe9593b6c29b10b$export$a1386d43b662271 = v);
|
|
1286
|
-
$parcel$export($bfe9593b6c29b10b$exports, "tile-info", () => $bfe9593b6c29b10b$export$1ea80fe0e5d4f6be, (v) => $bfe9593b6c29b10b$export$1ea80fe0e5d4f6be = v);
|
|
1287
|
-
$parcel$export($bfe9593b6c29b10b$exports, "opacity-slider", () => $bfe9593b6c29b10b$export$802c81ec652235aa, (v) => $bfe9593b6c29b10b$export$802c81ec652235aa = v);
|
|
1288
|
-
$parcel$export($bfe9593b6c29b10b$exports, "unit-number", () => $bfe9593b6c29b10b$export$ce32b714ddd6b59, (v) => $bfe9593b6c29b10b$export$ce32b714ddd6b59 = v);
|
|
1289
|
-
$parcel$export($bfe9593b6c29b10b$exports, "unit", () => $bfe9593b6c29b10b$export$523c0b569236b342, (v) => $bfe9593b6c29b10b$export$523c0b569236b342 = v);
|
|
1290
|
-
$parcel$export($bfe9593b6c29b10b$exports, "page", () => $bfe9593b6c29b10b$export$523fb3936f49e028, (v) => $bfe9593b6c29b10b$export$523fb3936f49e028 = v);
|
|
1291
|
-
$parcel$export($bfe9593b6c29b10b$exports, "dev-index-page", () => $bfe9593b6c29b10b$export$ee954d6f5e1b21cc, (v) => $bfe9593b6c29b10b$export$ee954d6f5e1b21cc = v);
|
|
1292
|
-
var $bfe9593b6c29b10b$export$d27ce8c17b289f33;
|
|
1293
|
-
var $bfe9593b6c29b10b$export$6025d8aaa4edba3b;
|
|
1294
|
-
var $bfe9593b6c29b10b$export$df61b30b684217c0;
|
|
1295
|
-
var $bfe9593b6c29b10b$export$2ab9a8f9f1186f14;
|
|
1296
|
-
var $bfe9593b6c29b10b$export$4f7f4a0a9b87a0a1;
|
|
1297
|
-
var $bfe9593b6c29b10b$export$435bd1864bef6e22;
|
|
1298
|
-
var $bfe9593b6c29b10b$export$a1386d43b662271;
|
|
1299
|
-
var $bfe9593b6c29b10b$export$1ea80fe0e5d4f6be;
|
|
1300
|
-
var $bfe9593b6c29b10b$export$802c81ec652235aa;
|
|
1301
|
-
var $bfe9593b6c29b10b$export$ce32b714ddd6b59;
|
|
1302
|
-
var $bfe9593b6c29b10b$export$523c0b569236b342;
|
|
1303
|
-
var $bfe9593b6c29b10b$export$523fb3936f49e028;
|
|
1304
|
-
var $bfe9593b6c29b10b$export$ee954d6f5e1b21cc;
|
|
1305
|
-
$bfe9593b6c29b10b$export$d27ce8c17b289f33 = "feature-panel_48e225";
|
|
1306
|
-
$bfe9593b6c29b10b$export$6025d8aaa4edba3b = "key-value_48e225";
|
|
1307
|
-
$bfe9593b6c29b10b$export$df61b30b684217c0 = "key_48e225";
|
|
1308
|
-
$bfe9593b6c29b10b$export$2ab9a8f9f1186f14 = "value_48e225";
|
|
1309
|
-
$bfe9593b6c29b10b$export$4f7f4a0a9b87a0a1 = "feature-properties_48e225";
|
|
1310
|
-
$bfe9593b6c29b10b$export$435bd1864bef6e22 = "feature-header_48e225";
|
|
1311
|
-
$bfe9593b6c29b10b$export$a1386d43b662271 = "feature-group_48e225";
|
|
1312
|
-
$bfe9593b6c29b10b$export$1ea80fe0e5d4f6be = "tile-info_48e225";
|
|
1313
|
-
$bfe9593b6c29b10b$export$802c81ec652235aa = "opacity-slider_48e225";
|
|
1314
|
-
$bfe9593b6c29b10b$export$ce32b714ddd6b59 = "unit-number_48e225";
|
|
1315
|
-
$bfe9593b6c29b10b$export$523c0b569236b342 = "unit_48e225";
|
|
1316
|
-
$bfe9593b6c29b10b$export$523fb3936f49e028 = "page_48e225";
|
|
1317
|
-
$bfe9593b6c29b10b$export$ee954d6f5e1b21cc = "dev-index-page_48e225";
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
var $1d4d29ef2725aa16$exports = {};
|
|
1321
|
-
|
|
1322
|
-
$parcel$export($1d4d29ef2725aa16$exports, "TileExtentLayer", () => $1d4d29ef2725aa16$export$86c09739b12f23cd);
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
function $1d4d29ef2725aa16$export$86c09739b12f23cd({ tile: tile, color: color = "red" }) {
|
|
1327
|
-
const styleCallback = (0, $Zz0sd$useCallback)((map, val)=>{
|
|
1328
|
-
const style = map.getStyle();
|
|
1329
|
-
if (style.layers == null) return;
|
|
1330
|
-
style.layers = style.layers.filter((l)=>l.id != "tile-extent");
|
|
1331
|
-
if (val == null) return map.setStyle(style);
|
|
1332
|
-
const { x: x, y: y, z: z } = val;
|
|
1333
|
-
const extent = (0, $Zz0sd$tileToGeoJSON)([
|
|
1334
|
-
x,
|
|
1335
|
-
y,
|
|
1336
|
-
z
|
|
1337
|
-
]);
|
|
1338
|
-
const source = {
|
|
1339
|
-
type: "geojson",
|
|
1340
|
-
data: extent
|
|
1341
|
-
};
|
|
1342
|
-
const layer = {
|
|
1343
|
-
id: "tile-extent",
|
|
1344
|
-
type: "line",
|
|
1345
|
-
source: "tile-extent",
|
|
1346
|
-
paint: {
|
|
1347
|
-
"line-color": color,
|
|
1348
|
-
"line-width": 2
|
|
1349
|
-
}
|
|
1350
|
-
};
|
|
1351
|
-
style.sources["tile-extent"] = source;
|
|
1352
|
-
style.layers.push(layer);
|
|
1353
|
-
map.setStyle(style);
|
|
1354
|
-
}, [
|
|
1355
|
-
color
|
|
1356
|
-
]);
|
|
1357
|
-
const map = (0, $Zz0sd$useMapRef)();
|
|
1358
|
-
(0, $Zz0sd$useMapConditionalStyle)(map, tile, styleCallback);
|
|
1359
|
-
return null;
|
|
1360
|
-
}
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
var $b8c84b63e75fe4f2$exports = {};
|
|
1364
|
-
|
|
1365
|
-
$parcel$export($b8c84b63e75fe4f2$exports, "FeatureProperties", () => $b8c84b63e75fe4f2$export$2906e7f4b228efe9);
|
|
1366
|
-
$parcel$export($b8c84b63e75fe4f2$exports, "FeatureRecord", () => $b8c84b63e75fe4f2$export$dc87b4d46cea200d);
|
|
1367
|
-
$parcel$export($b8c84b63e75fe4f2$exports, "FeatureSelectionHandler", () => $b8c84b63e75fe4f2$export$214daccdda0f4ac6);
|
|
1368
|
-
$parcel$export($b8c84b63e75fe4f2$exports, "Features", () => $b8c84b63e75fe4f2$export$617d79dae526d2cf);
|
|
1369
|
-
$parcel$export($b8c84b63e75fe4f2$exports, "TileInfo", () => $b8c84b63e75fe4f2$export$43c75dec9d0b96c);
|
|
1370
|
-
$parcel$export($b8c84b63e75fe4f2$exports, "FeaturePanel", () => $b8c84b63e75fe4f2$export$43277c51a01761c1);
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
var $d570ac304373e71c$exports = {};
|
|
1379
|
-
|
|
1380
|
-
$parcel$export($d570ac304373e71c$exports, "ExpansionPanelSummary", () => $d570ac304373e71c$export$cea00a9d724d5a32);
|
|
1381
|
-
$parcel$export($d570ac304373e71c$exports, "InfoPanelSection", () => $d570ac304373e71c$export$39c134eb0b07cf0e);
|
|
1382
|
-
$parcel$export($d570ac304373e71c$exports, "ExpansionPanel", () => $d570ac304373e71c$export$40e646e38e6ed100);
|
|
1383
|
-
$parcel$export($d570ac304373e71c$exports, "SubExpansionPanel", () => $d570ac304373e71c$export$d7160281aff7c3b8);
|
|
1384
|
-
$parcel$export($d570ac304373e71c$exports, "ExpandableDetailsPanel", () => $d570ac304373e71c$export$44ad9ff780615135);
|
|
1385
|
-
$parcel$export($d570ac304373e71c$exports, "ExpansionBody", () => $d570ac304373e71c$export$263416b670b3f129);
|
|
1386
|
-
$parcel$export($d570ac304373e71c$exports, "PanelSubhead", () => $72e497a412b1da0a$export$ed081779ec3709aa);
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
var $3388ecc062e0c521$exports = {};
|
|
1391
|
-
|
|
1392
|
-
$parcel$export($3388ecc062e0c521$exports, "panel-subhead", () => $3388ecc062e0c521$export$bb6008c7ec506dc5, (v) => $3388ecc062e0c521$export$bb6008c7ec506dc5 = v);
|
|
1393
|
-
$parcel$export($3388ecc062e0c521$exports, "title", () => $3388ecc062e0c521$export$fb184b623420d9be, (v) => $3388ecc062e0c521$export$fb184b623420d9be = v);
|
|
1394
|
-
$parcel$export($3388ecc062e0c521$exports, "info-panel-section", () => $3388ecc062e0c521$export$198bd65f1c7a5309, (v) => $3388ecc062e0c521$export$198bd65f1c7a5309 = v);
|
|
1395
|
-
$parcel$export($3388ecc062e0c521$exports, "expansion-panel", () => $3388ecc062e0c521$export$1db06abc8684077f, (v) => $3388ecc062e0c521$export$1db06abc8684077f = v);
|
|
1396
|
-
$parcel$export($3388ecc062e0c521$exports, "sub-expansion-panel", () => $3388ecc062e0c521$export$e1943f56d410f24c, (v) => $3388ecc062e0c521$export$e1943f56d410f24c = v);
|
|
1397
|
-
$parcel$export($3388ecc062e0c521$exports, "expansion-panel-header", () => $3388ecc062e0c521$export$771f363b9f663d2c, (v) => $3388ecc062e0c521$export$771f363b9f663d2c = v);
|
|
1398
|
-
$parcel$export($3388ecc062e0c521$exports, "expansion-summary-title-help", () => $3388ecc062e0c521$export$47b2fa26e88e0093, (v) => $3388ecc062e0c521$export$47b2fa26e88e0093 = v);
|
|
1399
|
-
$parcel$export($3388ecc062e0c521$exports, "expansion-children", () => $3388ecc062e0c521$export$d8457cb7ae0c47fd, (v) => $3388ecc062e0c521$export$d8457cb7ae0c47fd = v);
|
|
1400
|
-
$parcel$export($3388ecc062e0c521$exports, "expansion-panel-subtext", () => $3388ecc062e0c521$export$f3447611ed163f53, (v) => $3388ecc062e0c521$export$f3447611ed163f53 = v);
|
|
1401
|
-
$parcel$export($3388ecc062e0c521$exports, "expandable-details-main", () => $3388ecc062e0c521$export$561f0c2134cd9732, (v) => $3388ecc062e0c521$export$561f0c2134cd9732 = v);
|
|
1402
|
-
$parcel$export($3388ecc062e0c521$exports, "expandable-details-header", () => $3388ecc062e0c521$export$ec357a59e90ee7ee, (v) => $3388ecc062e0c521$export$ec357a59e90ee7ee = v);
|
|
1403
|
-
$parcel$export($3388ecc062e0c521$exports, "expandable-details-children", () => $3388ecc062e0c521$export$ae8d16cb87fbdc31, (v) => $3388ecc062e0c521$export$ae8d16cb87fbdc31 = v);
|
|
1404
|
-
$parcel$export($3388ecc062e0c521$exports, "expandable-details-toggle", () => $3388ecc062e0c521$export$1089a6d45649b54c, (v) => $3388ecc062e0c521$export$1089a6d45649b54c = v);
|
|
1405
|
-
$parcel$export($3388ecc062e0c521$exports, "expandable-details", () => $3388ecc062e0c521$export$20a01d7b55fba18b, (v) => $3388ecc062e0c521$export$20a01d7b55fba18b = v);
|
|
1406
|
-
$parcel$export($3388ecc062e0c521$exports, "macrostrat-unit", () => $3388ecc062e0c521$export$fcdb9e479e3129ed, (v) => $3388ecc062e0c521$export$fcdb9e479e3129ed = v);
|
|
1407
|
-
$parcel$export($3388ecc062e0c521$exports, "expansion-body", () => $3388ecc062e0c521$export$2d112e83849a3cf7, (v) => $3388ecc062e0c521$export$2d112e83849a3cf7 = v);
|
|
1408
|
-
$parcel$export($3388ecc062e0c521$exports, "expansion-panel-detail-header", () => $3388ecc062e0c521$export$854d9fad3b5263eb, (v) => $3388ecc062e0c521$export$854d9fad3b5263eb = v);
|
|
1409
|
-
$parcel$export($3388ecc062e0c521$exports, "expansion-panel-detail-body", () => $3388ecc062e0c521$export$494f9067c39d24ef, (v) => $3388ecc062e0c521$export$494f9067c39d24ef = v);
|
|
1410
|
-
var $3388ecc062e0c521$export$bb6008c7ec506dc5;
|
|
1411
|
-
var $3388ecc062e0c521$export$fb184b623420d9be;
|
|
1412
|
-
var $3388ecc062e0c521$export$198bd65f1c7a5309;
|
|
1413
|
-
var $3388ecc062e0c521$export$1db06abc8684077f;
|
|
1414
|
-
var $3388ecc062e0c521$export$e1943f56d410f24c;
|
|
1415
|
-
var $3388ecc062e0c521$export$771f363b9f663d2c;
|
|
1416
|
-
var $3388ecc062e0c521$export$47b2fa26e88e0093;
|
|
1417
|
-
var $3388ecc062e0c521$export$d8457cb7ae0c47fd;
|
|
1418
|
-
var $3388ecc062e0c521$export$f3447611ed163f53;
|
|
1419
|
-
var $3388ecc062e0c521$export$561f0c2134cd9732;
|
|
1420
|
-
var $3388ecc062e0c521$export$ec357a59e90ee7ee;
|
|
1421
|
-
var $3388ecc062e0c521$export$ae8d16cb87fbdc31;
|
|
1422
|
-
var $3388ecc062e0c521$export$1089a6d45649b54c;
|
|
1423
|
-
var $3388ecc062e0c521$export$20a01d7b55fba18b;
|
|
1424
|
-
var $3388ecc062e0c521$export$fcdb9e479e3129ed;
|
|
1425
|
-
var $3388ecc062e0c521$export$2d112e83849a3cf7;
|
|
1426
|
-
var $3388ecc062e0c521$export$854d9fad3b5263eb;
|
|
1427
|
-
var $3388ecc062e0c521$export$494f9067c39d24ef;
|
|
1428
|
-
$3388ecc062e0c521$export$bb6008c7ec506dc5 = "panel-subhead_1340c8";
|
|
1429
|
-
$3388ecc062e0c521$export$fb184b623420d9be = "title_1340c8";
|
|
1430
|
-
$3388ecc062e0c521$export$198bd65f1c7a5309 = "info-panel-section_1340c8";
|
|
1431
|
-
$3388ecc062e0c521$export$1db06abc8684077f = "expansion-panel_1340c8";
|
|
1432
|
-
$3388ecc062e0c521$export$e1943f56d410f24c = "sub-expansion-panel_1340c8";
|
|
1433
|
-
$3388ecc062e0c521$export$771f363b9f663d2c = "expansion-panel-header_1340c8";
|
|
1434
|
-
$3388ecc062e0c521$export$47b2fa26e88e0093 = "expansion-summary-title-help_1340c8";
|
|
1435
|
-
$3388ecc062e0c521$export$d8457cb7ae0c47fd = "expansion-children_1340c8";
|
|
1436
|
-
$3388ecc062e0c521$export$f3447611ed163f53 = "expansion-panel-subtext_1340c8";
|
|
1437
|
-
$3388ecc062e0c521$export$561f0c2134cd9732 = "expandable-details-main_1340c8";
|
|
1438
|
-
$3388ecc062e0c521$export$ec357a59e90ee7ee = "expandable-details-header_1340c8";
|
|
1439
|
-
$3388ecc062e0c521$export$ae8d16cb87fbdc31 = "expandable-details-children_1340c8";
|
|
1440
|
-
$3388ecc062e0c521$export$1089a6d45649b54c = "expandable-details-toggle_1340c8";
|
|
1441
|
-
$3388ecc062e0c521$export$20a01d7b55fba18b = "expandable-details_1340c8";
|
|
1442
|
-
$3388ecc062e0c521$export$fcdb9e479e3129ed = "macrostrat-unit_1340c8";
|
|
1443
|
-
$3388ecc062e0c521$export$2d112e83849a3cf7 = "expansion-body_1340c8";
|
|
1444
|
-
$3388ecc062e0c521$export$854d9fad3b5263eb = "expansion-panel-detail-header_1340c8";
|
|
1445
|
-
$3388ecc062e0c521$export$494f9067c39d24ef = "expansion-panel-detail-body_1340c8";
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
const $72e497a412b1da0a$var$h = (0, $Zz0sd$macrostrathyper).styled((0, (/*@__PURE__*/$parcel$interopDefault($3388ecc062e0c521$exports))));
|
|
1452
|
-
function $72e497a412b1da0a$export$ed081779ec3709aa(props) {
|
|
1453
|
-
const { title: title, component: component = "h3", children: children, ...rest } = props;
|
|
1454
|
-
return $72e497a412b1da0a$var$h("div.panel-subhead", rest, [
|
|
1455
|
-
$72e497a412b1da0a$var$h(component, {
|
|
1456
|
-
className: "title"
|
|
1457
|
-
}, title),
|
|
1458
|
-
children
|
|
1459
|
-
]);
|
|
1460
|
-
}
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
const $d570ac304373e71c$var$h = (0, $Zz0sd$macrostrathyper).styled((0, (/*@__PURE__*/$parcel$interopDefault($3388ecc062e0c521$exports))));
|
|
1464
|
-
function $d570ac304373e71c$export$cea00a9d724d5a32(props) {
|
|
1465
|
-
const { expanded: expanded, children: children, onChange: onChange, className: className, title: title, titleComponent: titleComponent } = props;
|
|
1466
|
-
const icon = expanded ? "chevron-up" : "chevron-down";
|
|
1467
|
-
return $d570ac304373e71c$var$h((0, $72e497a412b1da0a$export$ed081779ec3709aa), {
|
|
1468
|
-
className: (0, $Zz0sd$classnames)("expansion-panel-header", className),
|
|
1469
|
-
onClick: onChange,
|
|
1470
|
-
title: title,
|
|
1471
|
-
component: titleComponent
|
|
1472
|
-
}, [
|
|
1473
|
-
children,
|
|
1474
|
-
$d570ac304373e71c$var$h((0, $Zz0sd$Icon), {
|
|
1475
|
-
icon: icon
|
|
1476
|
-
})
|
|
1477
|
-
]);
|
|
1478
|
-
}
|
|
1479
|
-
function $d570ac304373e71c$var$ExpansionPanelBase(props) {
|
|
1480
|
-
let { title: title, titleComponent: titleComponent = "h3", children: children, expanded: expanded, helpText: helpText, onChange: onChange = ()=>{}, sideComponent: sideComponent = null, className: className } = props;
|
|
1481
|
-
const [isOpen, setOpen] = (0, $Zz0sd$useState)(expanded || false);
|
|
1482
|
-
const onChange_ = ()=>{
|
|
1483
|
-
onChange();
|
|
1484
|
-
setOpen(!isOpen);
|
|
1485
|
-
};
|
|
1486
|
-
return $d570ac304373e71c$var$h("div.expansion-panel-base", {
|
|
1487
|
-
className: (0, $Zz0sd$classnames)(className, {
|
|
1488
|
-
expanded: isOpen,
|
|
1489
|
-
collapsed: !isOpen
|
|
1490
|
-
})
|
|
1491
|
-
}, [
|
|
1492
|
-
$d570ac304373e71c$var$h($d570ac304373e71c$export$cea00a9d724d5a32, {
|
|
1493
|
-
onChange: onChange_,
|
|
1494
|
-
expanded: isOpen,
|
|
1495
|
-
title: title,
|
|
1496
|
-
titleComponent: titleComponent
|
|
1497
|
-
}, $d570ac304373e71c$var$h("div.expansion-summary-title-help", [
|
|
1498
|
-
$d570ac304373e71c$var$h("span.expansion-panel-subtext", helpText),
|
|
1499
|
-
" ",
|
|
1500
|
-
sideComponent
|
|
1501
|
-
])),
|
|
1502
|
-
$d570ac304373e71c$var$h((0, $Zz0sd$Collapse), {
|
|
1503
|
-
isOpen: isOpen
|
|
1504
|
-
}, $d570ac304373e71c$var$h("div.expansion-children", null, children))
|
|
1505
|
-
]);
|
|
1506
|
-
}
|
|
1507
|
-
function $d570ac304373e71c$export$39c134eb0b07cf0e(props) {
|
|
1508
|
-
let { title: title, children: children, className: className, headerElement: headerElement = null } = props;
|
|
1509
|
-
return $d570ac304373e71c$var$h("div.info-panel-section", {
|
|
1510
|
-
className: className
|
|
1511
|
-
}, [
|
|
1512
|
-
$d570ac304373e71c$var$h("div.panel-subhead", null, headerElement ?? $d570ac304373e71c$var$h("h3", title)),
|
|
1513
|
-
$d570ac304373e71c$var$h("div.panel-content", null, children)
|
|
1514
|
-
]);
|
|
1515
|
-
}
|
|
1516
|
-
function $d570ac304373e71c$export$40e646e38e6ed100(props) {
|
|
1517
|
-
return $d570ac304373e71c$var$h($d570ac304373e71c$var$ExpansionPanelBase, {
|
|
1518
|
-
...props,
|
|
1519
|
-
className: "expansion-panel"
|
|
1520
|
-
});
|
|
1521
|
-
}
|
|
1522
|
-
function $d570ac304373e71c$export$d7160281aff7c3b8(props) {
|
|
1523
|
-
return $d570ac304373e71c$var$h($d570ac304373e71c$var$ExpansionPanelBase, {
|
|
1524
|
-
...props,
|
|
1525
|
-
className: "expansion-panel sub-expansion-panel",
|
|
1526
|
-
titleComponent: "h4"
|
|
1527
|
-
});
|
|
1528
|
-
}
|
|
1529
|
-
function $d570ac304373e71c$export$44ad9ff780615135(props) {
|
|
1530
|
-
let { title: title, children: children, value: value, headerElement: headerElement, className: className } = props;
|
|
1531
|
-
const [isOpen, setIsOpen] = (0, $Zz0sd$useState)(false);
|
|
1532
|
-
headerElement ??= $d570ac304373e71c$var$h([
|
|
1533
|
-
$d570ac304373e71c$var$h("div.title", title),
|
|
1534
|
-
value
|
|
1535
|
-
]);
|
|
1536
|
-
return $d570ac304373e71c$var$h("div.expandable-details", {
|
|
1537
|
-
className: className
|
|
1538
|
-
}, [
|
|
1539
|
-
$d570ac304373e71c$var$h("div.expandable-details-main", [
|
|
1540
|
-
$d570ac304373e71c$var$h("div.expandable-details-header", headerElement),
|
|
1541
|
-
$d570ac304373e71c$var$h("div.expandable-details-toggle", [
|
|
1542
|
-
$d570ac304373e71c$var$h((0, $Zz0sd$Button), {
|
|
1543
|
-
small: true,
|
|
1544
|
-
minimal: true,
|
|
1545
|
-
active: isOpen,
|
|
1546
|
-
onClick: ()=>setIsOpen(!isOpen),
|
|
1547
|
-
icon: "more"
|
|
1548
|
-
})
|
|
1549
|
-
])
|
|
1550
|
-
]),
|
|
1551
|
-
$d570ac304373e71c$var$h((0, $Zz0sd$Collapse), {
|
|
1552
|
-
isOpen: isOpen
|
|
1553
|
-
}, $d570ac304373e71c$var$h("div.expandable-details-children", null, children))
|
|
1554
|
-
]);
|
|
1555
|
-
}
|
|
1556
|
-
function $d570ac304373e71c$export$263416b670b3f129({ title: title, className: className, children: children }) {
|
|
1557
|
-
return $d570ac304373e71c$var$h("div.expansion-body", {
|
|
1558
|
-
className: className
|
|
1559
|
-
}, [
|
|
1560
|
-
$d570ac304373e71c$var$h("div.expansion-panel-detail-header", title),
|
|
1561
|
-
$d570ac304373e71c$var$h("div.expansion-panel-detail-body", null, children)
|
|
1562
|
-
]);
|
|
1563
|
-
}
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
const $b8c84b63e75fe4f2$var$h = (0, $Zz0sd$macrostrathyper).styled((0, (/*@__PURE__*/$parcel$interopDefault($bfe9593b6c29b10b$exports))));
|
|
1567
|
-
function $b8c84b63e75fe4f2$export$2906e7f4b228efe9({ data: data, ...rest }) {
|
|
1568
|
-
return $b8c84b63e75fe4f2$var$h("div.feature-properties", [
|
|
1569
|
-
$b8c84b63e75fe4f2$var$h((0, $Zz0sd$JSONView), {
|
|
1570
|
-
data: data,
|
|
1571
|
-
hideRoot: true,
|
|
1572
|
-
...rest
|
|
1573
|
-
})
|
|
1574
|
-
]);
|
|
1575
|
-
}
|
|
1576
|
-
function $b8c84b63e75fe4f2$export$dc87b4d46cea200d({ feature: feature }) {
|
|
1577
|
-
const props = feature.properties;
|
|
1578
|
-
return $b8c84b63e75fe4f2$var$h("div.feature-record", [
|
|
1579
|
-
$b8c84b63e75fe4f2$var$h.if(Object.keys(props).length > 0)($b8c84b63e75fe4f2$export$2906e7f4b228efe9, {
|
|
1580
|
-
data: props
|
|
1581
|
-
})
|
|
1582
|
-
]);
|
|
1583
|
-
}
|
|
1584
|
-
function $b8c84b63e75fe4f2$export$214daccdda0f4ac6({ selectedLocation: selectedLocation, setFeatures: setFeatures, radius: radius = 2 }) {
|
|
1585
|
-
const mapRef = (0, $Zz0sd$useMapRef)();
|
|
1586
|
-
const { isLoading: isLoading } = (0, $Zz0sd$useMapStatus)();
|
|
1587
|
-
const prevLocation = (0, $Zz0sd$usePrevious)(selectedLocation);
|
|
1588
|
-
(0, $Zz0sd$useEffect)(()=>{
|
|
1589
|
-
const map = mapRef?.current;
|
|
1590
|
-
if (map == null) return;
|
|
1591
|
-
if (selectedLocation == null) {
|
|
1592
|
-
setFeatures(null);
|
|
1593
|
-
return;
|
|
1594
|
-
}
|
|
1595
|
-
// Don't update if the location hasn't changed
|
|
1596
|
-
if (selectedLocation == prevLocation) return;
|
|
1597
|
-
const r = radius;
|
|
1598
|
-
const pt = map.project(selectedLocation);
|
|
1599
|
-
const bbox = [
|
|
1600
|
-
[
|
|
1601
|
-
pt.x - r,
|
|
1602
|
-
pt.y - r
|
|
1603
|
-
],
|
|
1604
|
-
[
|
|
1605
|
-
pt.x + r,
|
|
1606
|
-
pt.y + r
|
|
1607
|
-
]
|
|
1608
|
-
];
|
|
1609
|
-
const features = map.queryRenderedFeatures(bbox);
|
|
1610
|
-
setFeatures(features);
|
|
1611
|
-
}, [
|
|
1612
|
-
mapRef.current,
|
|
1613
|
-
prevLocation?.current,
|
|
1614
|
-
selectedLocation,
|
|
1615
|
-
isLoading
|
|
1616
|
-
]);
|
|
1617
|
-
return null;
|
|
1618
|
-
}
|
|
1619
|
-
function $b8c84b63e75fe4f2$var$FeatureHeader({ feature: feature }) {
|
|
1620
|
-
return $b8c84b63e75fe4f2$var$h("div.feature-header", [
|
|
1621
|
-
$b8c84b63e75fe4f2$var$h("h3", [
|
|
1622
|
-
$b8c84b63e75fe4f2$var$h($b8c84b63e75fe4f2$var$KeyValue, {
|
|
1623
|
-
label: "Source",
|
|
1624
|
-
value: feature.source
|
|
1625
|
-
}),
|
|
1626
|
-
$b8c84b63e75fe4f2$var$h($b8c84b63e75fe4f2$var$KeyValue, {
|
|
1627
|
-
label: "Source layer",
|
|
1628
|
-
value: feature.sourceLayer
|
|
1629
|
-
})
|
|
1630
|
-
])
|
|
1631
|
-
]);
|
|
1632
|
-
}
|
|
1633
|
-
function $b8c84b63e75fe4f2$var$KeyValue({ label: label, value: value }) {
|
|
1634
|
-
return $b8c84b63e75fe4f2$var$h("span.key-value", [
|
|
1635
|
-
$b8c84b63e75fe4f2$var$h("span.key", label),
|
|
1636
|
-
$b8c84b63e75fe4f2$var$h("code.value", value)
|
|
1637
|
-
]);
|
|
1638
|
-
}
|
|
1639
|
-
function $b8c84b63e75fe4f2$var$LoadingAwareFeatureSet({ features: features, sourceID: sourceID }) {
|
|
1640
|
-
const map = (0, $Zz0sd$useMapRef)();
|
|
1641
|
-
if (map?.current == null) return null;
|
|
1642
|
-
const [isLoaded, setIsLoaded] = (0, $Zz0sd$useState)(false);
|
|
1643
|
-
const sourceFeatures = features.filter((d)=>d.source == "burwell");
|
|
1644
|
-
(0, $Zz0sd$useEffect)(()=>{
|
|
1645
|
-
if (sourceFeatures.length > 0) {
|
|
1646
|
-
setIsLoaded(true);
|
|
1647
|
-
return;
|
|
1648
|
-
}
|
|
1649
|
-
const isLoaded = map.current.isSourceLoaded(sourceID);
|
|
1650
|
-
setIsLoaded(isLoaded);
|
|
1651
|
-
if (!isLoaded) map.current.once("sourcedata", (e)=>{
|
|
1652
|
-
if (e.sourceId == sourceID) setIsLoaded(true);
|
|
1653
|
-
});
|
|
1654
|
-
}, [
|
|
1655
|
-
map.current,
|
|
1656
|
-
sourceID,
|
|
1657
|
-
sourceFeatures.length
|
|
1658
|
-
]);
|
|
1659
|
-
if (!isLoaded) return $b8c84b63e75fe4f2$var$h((0, $Zz0sd$Spinner));
|
|
1660
|
-
return $b8c84b63e75fe4f2$var$h($b8c84b63e75fe4f2$export$617d79dae526d2cf, {
|
|
1661
|
-
features: sourceFeatures
|
|
1662
|
-
});
|
|
1663
|
-
}
|
|
1664
|
-
function $b8c84b63e75fe4f2$export$43c75dec9d0b96c({ feature: feature, showExtent: showExtent, setShowExtent: setShowExtent }) {
|
|
1665
|
-
if (feature == null) return null;
|
|
1666
|
-
const size = feature._vectorTileFeature._pbf.length;
|
|
1667
|
-
return $b8c84b63e75fe4f2$var$h("div.tile-info", [
|
|
1668
|
-
$b8c84b63e75fe4f2$var$h("h3", "Tile"),
|
|
1669
|
-
$b8c84b63e75fe4f2$var$h("div.tile-index", [
|
|
1670
|
-
$b8c84b63e75fe4f2$var$h($b8c84b63e75fe4f2$var$KeyValue, {
|
|
1671
|
-
label: "x",
|
|
1672
|
-
value: feature._x
|
|
1673
|
-
}),
|
|
1674
|
-
$b8c84b63e75fe4f2$var$h($b8c84b63e75fe4f2$var$KeyValue, {
|
|
1675
|
-
label: "y",
|
|
1676
|
-
value: feature._y
|
|
1677
|
-
}),
|
|
1678
|
-
$b8c84b63e75fe4f2$var$h($b8c84b63e75fe4f2$var$KeyValue, {
|
|
1679
|
-
label: "z",
|
|
1680
|
-
value: feature._z
|
|
1681
|
-
})
|
|
1682
|
-
]),
|
|
1683
|
-
$b8c84b63e75fe4f2$var$h("div.spacer"),
|
|
1684
|
-
$b8c84b63e75fe4f2$var$h($b8c84b63e75fe4f2$var$KeyValue, {
|
|
1685
|
-
label: "Size",
|
|
1686
|
-
value: $b8c84b63e75fe4f2$var$formatSize(size)
|
|
1687
|
-
}),
|
|
1688
|
-
$b8c84b63e75fe4f2$var$h((0, $Zz0sd$Switch), {
|
|
1689
|
-
label: "Show extent",
|
|
1690
|
-
alignIndicator: "right",
|
|
1691
|
-
checked: showExtent,
|
|
1692
|
-
onChange () {
|
|
1693
|
-
setShowExtent(!showExtent);
|
|
1694
|
-
}
|
|
1695
|
-
})
|
|
1696
|
-
]);
|
|
1697
|
-
}
|
|
1698
|
-
function $b8c84b63e75fe4f2$var$formatSize(size) {
|
|
1699
|
-
if (size > 1000000) return $b8c84b63e75fe4f2$var$h($b8c84b63e75fe4f2$var$UnitNumber, {
|
|
1700
|
-
value: size / 1000000,
|
|
1701
|
-
unit: "Mb"
|
|
1702
|
-
});
|
|
1703
|
-
if (size > 1000) return $b8c84b63e75fe4f2$var$h($b8c84b63e75fe4f2$var$UnitNumber, {
|
|
1704
|
-
value: size / 1000,
|
|
1705
|
-
unit: "Kb"
|
|
1706
|
-
});
|
|
1707
|
-
return `${size} bytes`;
|
|
1708
|
-
}
|
|
1709
|
-
function $b8c84b63e75fe4f2$var$UnitNumber({ value: value, unit: unit, precision: precision = 1 }) {
|
|
1710
|
-
return $b8c84b63e75fe4f2$var$h("span.unit-number", [
|
|
1711
|
-
$b8c84b63e75fe4f2$var$h("span.number", value.toFixed(precision)),
|
|
1712
|
-
$b8c84b63e75fe4f2$var$h("span.unit", unit)
|
|
1713
|
-
]);
|
|
1714
|
-
}
|
|
1715
|
-
function $b8c84b63e75fe4f2$export$43277c51a01761c1({ features: features, focusedSource: focusedSource = null, focusedSourceTitle: focusedSourceTitle = null }) {
|
|
1716
|
-
if (features == null) return null;
|
|
1717
|
-
let focusedSourcePanel = null;
|
|
1718
|
-
let filteredFeatures = features;
|
|
1719
|
-
let title = "Features";
|
|
1720
|
-
if (focusedSource != null) {
|
|
1721
|
-
title = "Basemap features";
|
|
1722
|
-
focusedSourcePanel = $b8c84b63e75fe4f2$var$h((0, $d570ac304373e71c$export$40e646e38e6ed100), {
|
|
1723
|
-
title: "Macrostrat features",
|
|
1724
|
-
className: "macrostrat-features",
|
|
1725
|
-
expanded: true
|
|
1726
|
-
}, [
|
|
1727
|
-
$b8c84b63e75fe4f2$var$h($b8c84b63e75fe4f2$var$LoadingAwareFeatureSet, {
|
|
1728
|
-
features: features,
|
|
1729
|
-
sourceID: focusedSource
|
|
1730
|
-
})
|
|
1731
|
-
]);
|
|
1732
|
-
filteredFeatures = features.filter((d)=>d.source != focusedSource);
|
|
1733
|
-
}
|
|
1734
|
-
return $b8c84b63e75fe4f2$var$h("div.feature-panel", [
|
|
1735
|
-
focusedSourcePanel,
|
|
1736
|
-
$b8c84b63e75fe4f2$var$h((0, $d570ac304373e71c$export$40e646e38e6ed100), {
|
|
1737
|
-
title: title,
|
|
1738
|
-
className: "basemap-features",
|
|
1739
|
-
expanded: focusedSource == null
|
|
1740
|
-
}, [
|
|
1741
|
-
$b8c84b63e75fe4f2$var$h($b8c84b63e75fe4f2$var$FeatureGroups, {
|
|
1742
|
-
features: filteredFeatures
|
|
1743
|
-
})
|
|
1744
|
-
])
|
|
1745
|
-
]);
|
|
1746
|
-
}
|
|
1747
|
-
function $b8c84b63e75fe4f2$var$FeatureGroups({ features: features }) {
|
|
1748
|
-
/** Group features by source and sourceLayer */ if (features == null) return null;
|
|
1749
|
-
const groups = (0, $Zz0sd$group)(features, (d)=>`${d.source} - ${d.sourceLayer}`);
|
|
1750
|
-
return $b8c84b63e75fe4f2$var$h("div.feature-groups", Array.from(groups).map(([key, features])=>{
|
|
1751
|
-
return $b8c84b63e75fe4f2$var$h("div.feature-group", [
|
|
1752
|
-
$b8c84b63e75fe4f2$var$h($b8c84b63e75fe4f2$var$FeatureHeader, {
|
|
1753
|
-
feature: features[0]
|
|
1754
|
-
}),
|
|
1755
|
-
$b8c84b63e75fe4f2$var$h($b8c84b63e75fe4f2$export$617d79dae526d2cf, {
|
|
1756
|
-
features: features
|
|
1757
|
-
})
|
|
1758
|
-
]);
|
|
1759
|
-
}));
|
|
1760
|
-
}
|
|
1761
|
-
function $b8c84b63e75fe4f2$export$617d79dae526d2cf({ features: features }) {
|
|
1762
|
-
return $b8c84b63e75fe4f2$var$h("div.features", features.map((feature, i)=>$b8c84b63e75fe4f2$var$h($b8c84b63e75fe4f2$export$dc87b4d46cea200d, {
|
|
1763
|
-
key: i,
|
|
1764
|
-
feature: feature
|
|
1765
|
-
})));
|
|
1766
|
-
}
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
const $a281a0612311d660$export$dda1d9f60106f0e9 = (0, $Zz0sd$macrostrathyper).styled((0, (/*@__PURE__*/$parcel$interopDefault($bfe9593b6c29b10b$exports))));
|
|
1770
|
-
function $a281a0612311d660$export$c5febf3ae8816972({ 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, fitViewport: fitViewport = true, projection: projection = null }) {
|
|
1771
|
-
/* We apply a custom style to the panel container when we are interacting
|
|
1772
|
-
with the search bar, so that we can block map interactions until search
|
|
1773
|
-
bar focus is lost.
|
|
1774
|
-
We also apply a custom style when the infodrawer is open so we can hide
|
|
1775
|
-
the search bar on mobile platforms
|
|
1776
|
-
*/ const dark = (0, $Zz0sd$useDarkMode)();
|
|
1777
|
-
const isEnabled = dark?.isEnabled;
|
|
1778
|
-
if (mapboxToken != null) (0, $Zz0sd$mapboxgl).accessToken = mapboxToken;
|
|
1779
|
-
style ??= isEnabled ? "mapbox://styles/mapbox/dark-v10" : "mapbox://styles/mapbox/light-v10";
|
|
1780
|
-
const [isOpen, setOpen] = (0, $Zz0sd$useState)(false);
|
|
1781
|
-
const [state, setState] = (0, $Zz0sd$useStoredState)("macrostrat:dev-map-page", {
|
|
1782
|
-
showTileExtent: false,
|
|
1783
|
-
xRay: false
|
|
1784
|
-
});
|
|
1785
|
-
const { showTileExtent: showTileExtent, xRay: xRay } = state;
|
|
1786
|
-
const [actualStyle, setActualStyle] = (0, $Zz0sd$useState)(style);
|
|
1787
|
-
console.log("actualStyle", actualStyle);
|
|
1788
|
-
(0, $Zz0sd$useEffect)(()=>{
|
|
1789
|
-
(0, $64ee2eed3ed5ffbc$export$e739dc8dfc0db9a6)(style, overlayStyle, {
|
|
1790
|
-
mapboxToken: mapboxToken,
|
|
1791
|
-
inDarkMode: isEnabled,
|
|
1792
|
-
xRay: xRay
|
|
1793
|
-
}).then(setActualStyle);
|
|
1794
|
-
}, [
|
|
1795
|
-
style,
|
|
1796
|
-
xRay,
|
|
1797
|
-
mapboxToken,
|
|
1798
|
-
isEnabled,
|
|
1799
|
-
overlayStyle
|
|
1800
|
-
]);
|
|
1801
|
-
const [inspectPosition, setInspectPosition] = (0, $Zz0sd$useState)(null);
|
|
1802
|
-
const [data, setData] = (0, $Zz0sd$useState)(null);
|
|
1803
|
-
const onSelectPosition = (0, $Zz0sd$useCallback)((position)=>{
|
|
1804
|
-
setInspectPosition(position);
|
|
1805
|
-
}, []);
|
|
1806
|
-
let detailElement = null;
|
|
1807
|
-
if (inspectPosition != null) detailElement = $a281a0612311d660$export$dda1d9f60106f0e9((0, $f50c3537aaff0cff$export$aa4baff5242ea6e1), {
|
|
1808
|
-
onClose () {
|
|
1809
|
-
setInspectPosition(null);
|
|
1810
|
-
},
|
|
1811
|
-
position: inspectPosition
|
|
1812
|
-
}, [
|
|
1813
|
-
$a281a0612311d660$export$dda1d9f60106f0e9((0, $b8c84b63e75fe4f2$export$43c75dec9d0b96c), {
|
|
1814
|
-
feature: data?.[0] ?? null,
|
|
1815
|
-
showExtent: showTileExtent,
|
|
1816
|
-
setShowExtent () {
|
|
1817
|
-
setState({
|
|
1818
|
-
...state,
|
|
1819
|
-
showTileExtent: !showTileExtent
|
|
1820
|
-
});
|
|
1821
|
-
}
|
|
1822
|
-
}),
|
|
1823
|
-
$a281a0612311d660$export$dda1d9f60106f0e9((0, $b8c84b63e75fe4f2$export$43277c51a01761c1), {
|
|
1824
|
-
features: data,
|
|
1825
|
-
focusedSource: focusedSource,
|
|
1826
|
-
focusedSourceTitle: focusedSourceTitle
|
|
1827
|
-
})
|
|
1828
|
-
]);
|
|
1829
|
-
let tile = null;
|
|
1830
|
-
if (showTileExtent && data?.[0] != null) {
|
|
1831
|
-
let f = data[0];
|
|
1832
|
-
tile = {
|
|
1833
|
-
x: f._x,
|
|
1834
|
-
y: f._y,
|
|
1835
|
-
z: f._z
|
|
1836
|
-
};
|
|
1837
|
-
}
|
|
1838
|
-
return $a281a0612311d660$export$dda1d9f60106f0e9((0, $4bdfa9cd8240b2fd$export$9fa5da0bcfd0a290), {
|
|
1839
|
-
navbar: $a281a0612311d660$export$dda1d9f60106f0e9((0, $6e914c81c8e053da$export$a8cc0062d02a3841), [
|
|
1840
|
-
headerElement ?? $a281a0612311d660$export$dda1d9f60106f0e9("h2", title),
|
|
1841
|
-
$a281a0612311d660$export$dda1d9f60106f0e9((0, $Zz0sd$Spacer)),
|
|
1842
|
-
$a281a0612311d660$export$dda1d9f60106f0e9((0, $6e914c81c8e053da$export$9e3bae3c08bde368), {
|
|
1843
|
-
active: isOpen,
|
|
1844
|
-
onClick: ()=>setOpen(!isOpen)
|
|
1845
|
-
})
|
|
1846
|
-
]),
|
|
1847
|
-
contextPanel: $a281a0612311d660$export$dda1d9f60106f0e9((0, $4bdfa9cd8240b2fd$export$ec68dd77edbe678b), [
|
|
1848
|
-
$a281a0612311d660$export$dda1d9f60106f0e9((0, $Zz0sd$Switch), {
|
|
1849
|
-
checked: xRay,
|
|
1850
|
-
label: "X-ray mode",
|
|
1851
|
-
onChange () {
|
|
1852
|
-
setState({
|
|
1853
|
-
...state,
|
|
1854
|
-
xRay: !xRay
|
|
1855
|
-
});
|
|
1856
|
-
}
|
|
1857
|
-
}),
|
|
1858
|
-
children
|
|
1859
|
-
]),
|
|
1860
|
-
detailPanel: detailElement,
|
|
1861
|
-
contextPanelOpen: isOpen,
|
|
1862
|
-
fitViewport: fitViewport
|
|
1863
|
-
}, $a281a0612311d660$export$dda1d9f60106f0e9((0, $9e150e311a3261e9$export$ab1e7a67d6ec5ad8), {
|
|
1864
|
-
style: actualStyle,
|
|
1865
|
-
transformRequest: transformRequest,
|
|
1866
|
-
mapPosition: mapPosition,
|
|
1867
|
-
projection: {
|
|
1868
|
-
name: "globe"
|
|
1869
|
-
},
|
|
1870
|
-
mapboxToken: mapboxToken
|
|
1871
|
-
}, [
|
|
1872
|
-
$a281a0612311d660$export$dda1d9f60106f0e9((0, $b8c84b63e75fe4f2$export$214daccdda0f4ac6), {
|
|
1873
|
-
selectedLocation: inspectPosition,
|
|
1874
|
-
setFeatures: setData
|
|
1875
|
-
}),
|
|
1876
|
-
$a281a0612311d660$export$dda1d9f60106f0e9((0, $4bc3dd5f0732eed3$export$5c90a91c7455938c), {
|
|
1877
|
-
position: inspectPosition,
|
|
1878
|
-
setPosition: onSelectPosition
|
|
1879
|
-
}),
|
|
1880
|
-
$a281a0612311d660$export$dda1d9f60106f0e9((0, $1d4d29ef2725aa16$export$86c09739b12f23cd), {
|
|
1881
|
-
tile: tile,
|
|
1882
|
-
color: isEnabled ? "white" : "black"
|
|
1883
|
-
})
|
|
1884
|
-
]));
|
|
1885
|
-
}
|
|
1886
|
-
const $a281a0612311d660$export$2391061fbdfb71ef = $a281a0612311d660$export$c5febf3ae8816972;
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
$parcel$exportWildcard($b6d2ac1192949c28$exports, $a281a0612311d660$exports);
|
|
1893
|
-
$parcel$exportWildcard($b6d2ac1192949c28$exports, $1d4d29ef2725aa16$exports);
|
|
1894
|
-
$parcel$exportWildcard($b6d2ac1192949c28$exports, $b8c84b63e75fe4f2$exports);
|
|
1895
|
-
$parcel$exportWildcard($b6d2ac1192949c28$exports, $64ee2eed3ed5ffbc$exports);
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
export {$6e914c81c8e053da$export$4ec83e90d030b2f3 as LoadingButton, $6e914c81c8e053da$export$9e3bae3c08bde368 as MapLoadingButton, $6e914c81c8e053da$export$a8cc0062d02a3841 as FloatingNavbar, $f50c3537aaff0cff$export$83f9a19cf91c2d06 as InfoDrawerContainer, $f50c3537aaff0cff$export$a5ddcc2a88716895 as BaseInfoDrawer, $f50c3537aaff0cff$export$aa4baff5242ea6e1 as LocationPanel, $a281a0612311d660$export$dda1d9f60106f0e9 as h, $a281a0612311d660$export$c5febf3ae8816972 as MapInspector, $a281a0612311d660$export$2391061fbdfb71ef as DevMapPage, $1d4d29ef2725aa16$export$86c09739b12f23cd as TileExtentLayer, $b8c84b63e75fe4f2$export$2906e7f4b228efe9 as FeatureProperties, $b8c84b63e75fe4f2$export$dc87b4d46cea200d as FeatureRecord, $b8c84b63e75fe4f2$export$214daccdda0f4ac6 as FeatureSelectionHandler, $b8c84b63e75fe4f2$export$617d79dae526d2cf as Features, $b8c84b63e75fe4f2$export$43c75dec9d0b96c as TileInfo, $b8c84b63e75fe4f2$export$43277c51a01761c1 as FeaturePanel, $64ee2eed3ed5ffbc$export$eff5fb2e10d05b1d as buildXRayStyle, $64ee2eed3ed5ffbc$export$e739dc8dfc0db9a6 as buildInspectorStyle, $4bdfa9cd8240b2fd$export$ec68dd77edbe678b as PanelCard, $4bdfa9cd8240b2fd$export$612ca936d3ed4784 as DetailPanelStyle, $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, $bb5f34705d9c44bc$export$8391d1abb505ffb3 as applyMapPositionToHash, $bb5f34705d9c44bc$export$80abf1cbcc3918e4 as getMapPositionForHash, $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, $72e497a412b1da0a$export$ed081779ec3709aa as PanelSubhead};
|
|
1908
|
-
//# sourceMappingURL=module.mjs.map
|