footprint-globe 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -1
- package/dist/auto.cjs +1355 -0
- package/dist/auto.cjs.map +1 -0
- package/dist/auto.js +1353 -0
- package/dist/auto.js.map +1 -0
- package/dist/index.cjs +314 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +77 -1
- package/dist/index.d.ts +77 -1
- package/dist/index.js +307 -6
- package/dist/index.js.map +1 -1
- package/package.json +14 -3
package/dist/auto.cjs
ADDED
|
@@ -0,0 +1,1355 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/errors.ts
|
|
4
|
+
var USER_MESSAGES = {
|
|
5
|
+
CONFIG_INVALID: "\u914D\u7F6E\u683C\u5F0F\u6709\u8BEF\uFF0C\u8BF7\u68C0\u67E5\u6570\u636E\u540E\u91CD\u8BD5\u3002",
|
|
6
|
+
DATA_LOAD_FAILED: "\u6570\u636E\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u94FE\u63A5\u6216\u7F51\u7EDC\u540E\u91CD\u8BD5\u3002",
|
|
7
|
+
WEBGL_UNSUPPORTED: "\u5F53\u524D\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 3D \u6E32\u67D3\uFF0C\u5DF2\u5207\u6362\u4E3A\u5217\u8868\u89C6\u56FE\u3002",
|
|
8
|
+
MAPLIBRE_MISSING: "\u5730\u56FE\u5F15\u64CE\u52A0\u8F7D\u5931\u8D25\uFF0C\u5DF2\u5207\u6362\u4E3A\u5217\u8868\u89C6\u56FE\u3002",
|
|
9
|
+
RENDER_FAILED: "\u5730\u56FE\u6E32\u67D3\u5931\u8D25\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u540E\u91CD\u8BD5\u3002"
|
|
10
|
+
};
|
|
11
|
+
var FootprintError = class extends Error {
|
|
12
|
+
code;
|
|
13
|
+
detail;
|
|
14
|
+
userMessage;
|
|
15
|
+
constructor(code, detail, overrideMessage) {
|
|
16
|
+
const message = overrideMessage ?? USER_MESSAGES[code];
|
|
17
|
+
super(`[${code}] ${message}`);
|
|
18
|
+
this.name = "FootprintError";
|
|
19
|
+
this.code = code;
|
|
20
|
+
this.detail = detail;
|
|
21
|
+
this.userMessage = message;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
function configError(field, reason) {
|
|
25
|
+
return new FootprintError(
|
|
26
|
+
"CONFIG_INVALID",
|
|
27
|
+
{ field, reason },
|
|
28
|
+
`\u914D\u7F6E\u5B57\u6BB5 "${field}" \u65E0\u6548\uFF1A${reason}`
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
function dataError(reason, detail) {
|
|
32
|
+
return new FootprintError("DATA_LOAD_FAILED", detail ?? reason, `\u6570\u636E\u52A0\u8F7D\u5931\u8D25\uFF1A${reason}`);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// src/config/defaults.ts
|
|
36
|
+
var DEFAULT_STYLE = "https://tiles.openfreemap.org/styles/positron";
|
|
37
|
+
var DEFAULT_MAPLIBRE_URL = "https://cdn.jsdelivr.net/npm/maplibre-gl@5/dist/maplibre-gl.js";
|
|
38
|
+
var DEFAULT_CENTER = [100, 30];
|
|
39
|
+
var DEFAULT_ZOOM = 1.2;
|
|
40
|
+
var DEFAULT_FOG = {
|
|
41
|
+
color: "rgba(0,0,0,0)",
|
|
42
|
+
"high-color": "rgba(255,255,255,0.1)",
|
|
43
|
+
"space-color": "rgba(0,0,0,0)",
|
|
44
|
+
"horizon-blend": 0
|
|
45
|
+
};
|
|
46
|
+
var DEFAULT_CATEGORY_COLORS = {
|
|
47
|
+
residence: "#2563eb",
|
|
48
|
+
travel: "#f97316"};
|
|
49
|
+
var DEFAULT_CATEGORY_LABELS = {
|
|
50
|
+
residence: "\u5C45\u4F4F",
|
|
51
|
+
travel: "\u65C5\u884C"};
|
|
52
|
+
var LIMITS = {
|
|
53
|
+
MAX_PINS: 1e3,
|
|
54
|
+
// 1MB
|
|
55
|
+
MAX_NAME_LEN: 200,
|
|
56
|
+
MAX_NOTE_LEN: 500,
|
|
57
|
+
MAX_PHOTOS: 5,
|
|
58
|
+
MAX_CATEGORIES: 8
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
// src/config/validate.ts
|
|
62
|
+
var CATEGORY_ID_RE = /^[a-z][a-z0-9-]*$/;
|
|
63
|
+
var HEX_COLOR_RE = /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;
|
|
64
|
+
var DATA_ID_RE = /^[0-9a-zA-Z_-]{8}$/;
|
|
65
|
+
function isObject(v) {
|
|
66
|
+
return typeof v === "object" && v !== null && !Array.isArray(v);
|
|
67
|
+
}
|
|
68
|
+
function isFiniteNumber(v) {
|
|
69
|
+
return typeof v === "number" && Number.isFinite(v);
|
|
70
|
+
}
|
|
71
|
+
function validatePin(pin, categoryId, index) {
|
|
72
|
+
const errs = [];
|
|
73
|
+
const path = `categories[${categoryId}].pins[${index}]`;
|
|
74
|
+
if (!isObject(pin)) {
|
|
75
|
+
errs.push(configError(path, "\u5FC5\u987B\u662F\u5BF9\u8C61"));
|
|
76
|
+
return errs;
|
|
77
|
+
}
|
|
78
|
+
if (typeof pin.name !== "string" || pin.name.length === 0) {
|
|
79
|
+
errs.push(configError(`${path}.name`, "\u5FC5\u987B\u662F\u975E\u7A7A\u5B57\u7B26\u4E32"));
|
|
80
|
+
} else if (pin.name.length > LIMITS.MAX_NAME_LEN) {
|
|
81
|
+
errs.push(configError(`${path}.name`, `\u957F\u5EA6\u4E0D\u5F97\u8D85\u8FC7 ${LIMITS.MAX_NAME_LEN}`));
|
|
82
|
+
}
|
|
83
|
+
if (!Array.isArray(pin.coords) || pin.coords.length !== 2) {
|
|
84
|
+
errs.push(configError(`${path}.coords`, "\u5FC5\u987B\u662F [\u7ECF\u5EA6, \u7EAC\u5EA6] \u6570\u7EC4"));
|
|
85
|
+
} else {
|
|
86
|
+
const [lng, lat] = pin.coords;
|
|
87
|
+
if (!isFiniteNumber(lng) || lng < -180 || lng > 180) {
|
|
88
|
+
errs.push(configError(`${path}.coords[0]`, "\u7ECF\u5EA6\u5FC5\u987B\u5728 [-180, 180]"));
|
|
89
|
+
}
|
|
90
|
+
if (!isFiniteNumber(lat) || lat < -90 || lat > 90) {
|
|
91
|
+
errs.push(configError(`${path}.coords[1]`, "\u7EAC\u5EA6\u5FC5\u987B\u5728 [-90, 90]"));
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
if (pin.note !== void 0) {
|
|
95
|
+
if (typeof pin.note !== "string") {
|
|
96
|
+
errs.push(configError(`${path}.note`, "\u5FC5\u987B\u662F\u5B57\u7B26\u4E32"));
|
|
97
|
+
} else if (pin.note.length > LIMITS.MAX_NOTE_LEN) {
|
|
98
|
+
errs.push(configError(`${path}.note`, `\u957F\u5EA6\u4E0D\u5F97\u8D85\u8FC7 ${LIMITS.MAX_NOTE_LEN}`));
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
if (pin.photos !== void 0) {
|
|
102
|
+
if (!Array.isArray(pin.photos)) {
|
|
103
|
+
errs.push(configError(`${path}.photos`, "\u5FC5\u987B\u662F\u6570\u7EC4"));
|
|
104
|
+
} else if (pin.photos.length > LIMITS.MAX_PHOTOS) {
|
|
105
|
+
errs.push(configError(`${path}.photos`, `\u6700\u591A ${LIMITS.MAX_PHOTOS} \u5F20`));
|
|
106
|
+
} else if (!pin.photos.every((p) => typeof p === "string")) {
|
|
107
|
+
errs.push(configError(`${path}.photos`, "\u6570\u7EC4\u5143\u7D20\u5FC5\u987B\u662F\u5B57\u7B26\u4E32"));
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return errs;
|
|
111
|
+
}
|
|
112
|
+
function validateCategory(cat, index) {
|
|
113
|
+
const errs = [];
|
|
114
|
+
const path = `categories[${index}]`;
|
|
115
|
+
if (!isObject(cat)) {
|
|
116
|
+
errs.push(configError(path, "\u5FC5\u987B\u662F\u5BF9\u8C61"));
|
|
117
|
+
return errs;
|
|
118
|
+
}
|
|
119
|
+
if (typeof cat.id !== "string" || !CATEGORY_ID_RE.test(cat.id)) {
|
|
120
|
+
errs.push(configError(`${path}.id`, "\u5FC5\u987B\u5339\u914D ^[a-z][a-z0-9-]*$"));
|
|
121
|
+
}
|
|
122
|
+
if (typeof cat.label !== "string" || cat.label.length === 0) {
|
|
123
|
+
errs.push(configError(`${path}.label`, "\u5FC5\u987B\u662F\u975E\u7A7A\u5B57\u7B26\u4E32"));
|
|
124
|
+
}
|
|
125
|
+
if (typeof cat.color !== "string" || !HEX_COLOR_RE.test(cat.color)) {
|
|
126
|
+
errs.push(configError(`${path}.color`, "\u5FC5\u987B\u662F #RGB \u6216 #RRGGBB"));
|
|
127
|
+
}
|
|
128
|
+
if (cat.icon !== void 0) {
|
|
129
|
+
const valid = ["dot", "pin", "star"];
|
|
130
|
+
if (typeof cat.icon !== "string" || !valid.includes(cat.icon)) {
|
|
131
|
+
errs.push(configError(`${path}.icon`, `\u5FC5\u987B\u662F ${valid.join(" / ")}`));
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
if (!Array.isArray(cat.pins)) {
|
|
135
|
+
errs.push(configError(`${path}.pins`, "\u5FC5\u987B\u662F\u6570\u7EC4"));
|
|
136
|
+
} else {
|
|
137
|
+
const catId = typeof cat.id === "string" ? cat.id : String(index);
|
|
138
|
+
cat.pins.forEach((p, i) => {
|
|
139
|
+
errs.push(...validatePin(p, catId, i));
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
return errs;
|
|
143
|
+
}
|
|
144
|
+
function validateRenderConfig(rc) {
|
|
145
|
+
const errs = [];
|
|
146
|
+
if (!isObject(rc)) return errs;
|
|
147
|
+
if (rc.projection !== void 0) {
|
|
148
|
+
if (rc.projection !== "globe" && rc.projection !== "mercator") {
|
|
149
|
+
errs.push(configError("config.projection", "\u5FC5\u987B\u662F globe \u6216 mercator"));
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
if (rc.theme !== void 0) {
|
|
153
|
+
const valid = ["light", "dark", "auto"];
|
|
154
|
+
if (typeof rc.theme !== "string" || !valid.includes(rc.theme)) {
|
|
155
|
+
errs.push(configError("config.theme", `\u5FC5\u987B\u662F ${valid.join(" / ")}`));
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
if (rc.style !== void 0 && typeof rc.style !== "string") {
|
|
159
|
+
errs.push(configError("config.style", "\u5FC5\u987B\u662F\u5B57\u7B26\u4E32"));
|
|
160
|
+
}
|
|
161
|
+
if (rc.maplibreUrl !== void 0 && typeof rc.maplibreUrl !== "string") {
|
|
162
|
+
errs.push(configError("config.maplibreUrl", "\u5FC5\u987B\u662F\u5B57\u7B26\u4E32"));
|
|
163
|
+
}
|
|
164
|
+
if (rc.zoom !== void 0 && !isFiniteNumber(rc.zoom)) {
|
|
165
|
+
errs.push(configError("config.zoom", "\u5FC5\u987B\u662F\u6570\u5B57"));
|
|
166
|
+
}
|
|
167
|
+
if (rc.legend !== void 0 && typeof rc.legend !== "boolean") {
|
|
168
|
+
errs.push(configError("config.legend", "\u5FC5\u987B\u662F\u5E03\u5C14\u503C"));
|
|
169
|
+
}
|
|
170
|
+
if (rc.autorotate !== void 0 && typeof rc.autorotate !== "boolean") {
|
|
171
|
+
errs.push(configError("config.autorotate", "\u5FC5\u987B\u662F\u5E03\u5C14\u503C"));
|
|
172
|
+
}
|
|
173
|
+
if (rc.privacy !== void 0 && isObject(rc.privacy)) {
|
|
174
|
+
if (rc.privacy.blur !== void 0 && !isFiniteNumber(rc.privacy.blur)) {
|
|
175
|
+
errs.push(configError("config.privacy.blur", "\u5FC5\u987B\u662F\u6570\u5B57"));
|
|
176
|
+
}
|
|
177
|
+
if (rc.privacy.cityOnly !== void 0 && typeof rc.privacy.cityOnly !== "boolean") {
|
|
178
|
+
errs.push(configError("config.privacy.cityOnly", "\u5FC5\u987B\u662F\u5E03\u5C14\u503C"));
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
return errs;
|
|
182
|
+
}
|
|
183
|
+
function validateConfig(input) {
|
|
184
|
+
const errs = [];
|
|
185
|
+
if (!isObject(input)) {
|
|
186
|
+
errs.push(configError("root", "\u5FC5\u987B\u662F\u5BF9\u8C61"));
|
|
187
|
+
return errs;
|
|
188
|
+
}
|
|
189
|
+
if (input.version !== 1) {
|
|
190
|
+
errs.push(configError("version", "\u5FC5\u987B\u4E3A 1"));
|
|
191
|
+
}
|
|
192
|
+
if (input.dataId !== void 0) {
|
|
193
|
+
if (typeof input.dataId !== "string" || !DATA_ID_RE.test(input.dataId)) {
|
|
194
|
+
errs.push(configError("dataId", "\u5FC5\u987B\u662F 8 \u4F4D [0-9a-zA-Z_-]"));
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
if (!Array.isArray(input.categories)) {
|
|
198
|
+
errs.push(configError("categories", "\u5FC5\u987B\u662F\u6570\u7EC4"));
|
|
199
|
+
} else {
|
|
200
|
+
if (input.categories.length === 0) {
|
|
201
|
+
errs.push(configError("categories", "\u81F3\u5C11 1 \u4E2A\u5206\u7C7B"));
|
|
202
|
+
}
|
|
203
|
+
if (input.categories.length > LIMITS.MAX_CATEGORIES) {
|
|
204
|
+
errs.push(configError("categories", `\u6700\u591A ${LIMITS.MAX_CATEGORIES} \u4E2A\u5206\u7C7B`));
|
|
205
|
+
}
|
|
206
|
+
input.categories.forEach((c, i) => {
|
|
207
|
+
errs.push(...validateCategory(c, i));
|
|
208
|
+
});
|
|
209
|
+
const total = input.categories.reduce((sum, c) => {
|
|
210
|
+
if (isObject(c) && Array.isArray(c.pins)) return sum + c.pins.length;
|
|
211
|
+
return sum;
|
|
212
|
+
}, 0);
|
|
213
|
+
if (total > LIMITS.MAX_PINS) {
|
|
214
|
+
errs.push(configError("categories.pins", `\u603B\u6807\u8BB0\u6570\u4E0D\u5F97\u8D85\u8FC7 ${LIMITS.MAX_PINS}`));
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
if (input.config !== void 0) {
|
|
218
|
+
errs.push(...validateRenderConfig(input.config));
|
|
219
|
+
}
|
|
220
|
+
return errs;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
// src/config/normalize.ts
|
|
224
|
+
function isObject2(v) {
|
|
225
|
+
return typeof v === "object" && v !== null && !Array.isArray(v);
|
|
226
|
+
}
|
|
227
|
+
function isLegacyFormat(input) {
|
|
228
|
+
if (!isObject2(input)) return false;
|
|
229
|
+
if (input.version === 1) return false;
|
|
230
|
+
if (Array.isArray(input.categories)) return false;
|
|
231
|
+
return Array.isArray(input.residence) || Array.isArray(input.travel);
|
|
232
|
+
}
|
|
233
|
+
function normalizePins(raw) {
|
|
234
|
+
if (!Array.isArray(raw)) return [];
|
|
235
|
+
const out = [];
|
|
236
|
+
for (const item of raw) {
|
|
237
|
+
if (!isObject2(item)) continue;
|
|
238
|
+
if (typeof item.name !== "string") continue;
|
|
239
|
+
if (!Array.isArray(item.coords) || item.coords.length !== 2) continue;
|
|
240
|
+
const [lng, lat] = item.coords;
|
|
241
|
+
if (typeof lng !== "number" || typeof lat !== "number") continue;
|
|
242
|
+
const pin = { name: item.name, coords: [lng, lat] };
|
|
243
|
+
if (typeof item.date === "string") pin.date = item.date;
|
|
244
|
+
if (typeof item.note === "string") pin.note = item.note;
|
|
245
|
+
if (Array.isArray(item.photos)) {
|
|
246
|
+
pin.photos = item.photos.filter((p) => typeof p === "string");
|
|
247
|
+
}
|
|
248
|
+
out.push(pin);
|
|
249
|
+
}
|
|
250
|
+
return out;
|
|
251
|
+
}
|
|
252
|
+
function normalizeLegacy(input) {
|
|
253
|
+
const cats = [];
|
|
254
|
+
if (Array.isArray(input.residence) && input.residence.length > 0) {
|
|
255
|
+
cats.push({
|
|
256
|
+
id: "residence",
|
|
257
|
+
label: DEFAULT_CATEGORY_LABELS.residence,
|
|
258
|
+
color: DEFAULT_CATEGORY_COLORS.residence,
|
|
259
|
+
pins: normalizePins(input.residence)
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
if (Array.isArray(input.travel) && input.travel.length > 0) {
|
|
263
|
+
cats.push({
|
|
264
|
+
id: "travel",
|
|
265
|
+
label: DEFAULT_CATEGORY_LABELS.travel,
|
|
266
|
+
color: DEFAULT_CATEGORY_COLORS.travel,
|
|
267
|
+
pins: normalizePins(input.travel)
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
return cats;
|
|
271
|
+
}
|
|
272
|
+
function normalizeCategory(raw) {
|
|
273
|
+
if (!isObject2(raw)) return null;
|
|
274
|
+
if (typeof raw.id !== "string" || typeof raw.label !== "string") return null;
|
|
275
|
+
if (typeof raw.color !== "string") return null;
|
|
276
|
+
const cat = {
|
|
277
|
+
id: raw.id,
|
|
278
|
+
label: raw.label,
|
|
279
|
+
color: raw.color,
|
|
280
|
+
pins: normalizePins(raw.pins)
|
|
281
|
+
};
|
|
282
|
+
if (raw.icon === "dot" || raw.icon === "pin" || raw.icon === "star") {
|
|
283
|
+
cat.icon = raw.icon;
|
|
284
|
+
}
|
|
285
|
+
return cat;
|
|
286
|
+
}
|
|
287
|
+
function normalizeRenderConfig(raw) {
|
|
288
|
+
const rc = isObject2(raw) ? { ...raw } : {};
|
|
289
|
+
rc.projection ??= "globe";
|
|
290
|
+
rc.theme ??= "light";
|
|
291
|
+
rc.style ??= DEFAULT_STYLE;
|
|
292
|
+
rc.maplibreUrl ??= DEFAULT_MAPLIBRE_URL;
|
|
293
|
+
rc.center ??= DEFAULT_CENTER;
|
|
294
|
+
rc.zoom ??= DEFAULT_ZOOM;
|
|
295
|
+
rc.pitch ??= 0;
|
|
296
|
+
rc.bearing ??= 0;
|
|
297
|
+
rc.legend ??= true;
|
|
298
|
+
rc.autorotate ??= false;
|
|
299
|
+
rc.attribution ??= false;
|
|
300
|
+
rc.fog ??= DEFAULT_FOG;
|
|
301
|
+
rc.privacy ??= { blur: 0, cityOnly: false };
|
|
302
|
+
return rc;
|
|
303
|
+
}
|
|
304
|
+
function normalizeConfig(input) {
|
|
305
|
+
if (isLegacyFormat(input)) {
|
|
306
|
+
return {
|
|
307
|
+
version: 1,
|
|
308
|
+
categories: normalizeLegacy(input),
|
|
309
|
+
config: normalizeRenderConfig(void 0)
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
if (isObject2(input) && Array.isArray(input.categories)) {
|
|
313
|
+
const cfg = {
|
|
314
|
+
version: 1,
|
|
315
|
+
categories: input.categories.map(normalizeCategory).filter((c) => c !== null),
|
|
316
|
+
config: normalizeRenderConfig(input.config)
|
|
317
|
+
};
|
|
318
|
+
if (typeof input.dataId === "string") cfg.dataId = input.dataId;
|
|
319
|
+
if (Array.isArray(input.routes)) cfg.routes = input.routes;
|
|
320
|
+
return cfg;
|
|
321
|
+
}
|
|
322
|
+
return {
|
|
323
|
+
version: 1,
|
|
324
|
+
categories: [],
|
|
325
|
+
config: normalizeRenderConfig(void 0)
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
// src/data/loader.ts
|
|
330
|
+
function isObject3(v) {
|
|
331
|
+
return typeof v === "object" && v !== null && !Array.isArray(v);
|
|
332
|
+
}
|
|
333
|
+
function assertAllowedUrl(url) {
|
|
334
|
+
let u;
|
|
335
|
+
try {
|
|
336
|
+
const base = typeof location !== "undefined" ? location.href : void 0;
|
|
337
|
+
u = new URL(url, base);
|
|
338
|
+
} catch {
|
|
339
|
+
throw dataError("\u6570\u636E\u6E90 URL \u65E0\u6548");
|
|
340
|
+
}
|
|
341
|
+
if (u.protocol === "https:") return u;
|
|
342
|
+
const isLocal = /^(localhost|127\.0\.0\.1|::1|\[::1\])$/.test(u.hostname);
|
|
343
|
+
if (u.protocol === "http:" && isLocal) return u;
|
|
344
|
+
throw dataError("\u6570\u636E\u6E90\u5FC5\u987B\u4F7F\u7528 HTTPS\uFF08\u672C\u5730\u5F00\u53D1\u73AF\u5883 http://localhost \u9664\u5916\uFF09");
|
|
345
|
+
}
|
|
346
|
+
async function fetchJson(url) {
|
|
347
|
+
const resolved = assertAllowedUrl(url);
|
|
348
|
+
let res;
|
|
349
|
+
try {
|
|
350
|
+
res = await fetch(resolved.href);
|
|
351
|
+
} catch (e) {
|
|
352
|
+
throw dataError("\u7F51\u7EDC\u8BF7\u6C42\u5931\u8D25", e);
|
|
353
|
+
}
|
|
354
|
+
if (!res.ok) {
|
|
355
|
+
throw dataError(`\u8BF7\u6C42\u5931\u8D25\uFF1AHTTP ${res.status}`, res.status);
|
|
356
|
+
}
|
|
357
|
+
try {
|
|
358
|
+
return await res.json();
|
|
359
|
+
} catch (e) {
|
|
360
|
+
throw dataError("\u54CD\u5E94\u4E0D\u662F\u6709\u6548\u7684 JSON", e);
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
async function loadData(options = {}) {
|
|
364
|
+
const warnings = [];
|
|
365
|
+
if (options.id) {
|
|
366
|
+
throw dataError("\u77ED\u94FE\u6258\u7BA1\u5C1A\u672A\u5B9E\u73B0\uFF08\u8BA1\u5212 v1.1 \u63D0\u4F9B\uFF09");
|
|
367
|
+
}
|
|
368
|
+
if (options.src) {
|
|
369
|
+
const raw2 = await fetchJson(options.src);
|
|
370
|
+
return finalize(raw2, warnings);
|
|
371
|
+
}
|
|
372
|
+
if (options.data) {
|
|
373
|
+
let raw2;
|
|
374
|
+
try {
|
|
375
|
+
raw2 = JSON.parse(options.data);
|
|
376
|
+
} catch (e) {
|
|
377
|
+
throw dataError("inline JSON \u89E3\u6790\u5931\u8D25", e);
|
|
378
|
+
}
|
|
379
|
+
return finalize(raw2, warnings);
|
|
380
|
+
}
|
|
381
|
+
const varName = options.globalVar ?? "FOOTPRINT_PINS";
|
|
382
|
+
const g = globalThis;
|
|
383
|
+
const raw = g[varName];
|
|
384
|
+
if (raw === void 0) {
|
|
385
|
+
throw dataError(`\u672A\u627E\u5230\u5168\u5C40\u53D8\u91CF window.${varName}`);
|
|
386
|
+
}
|
|
387
|
+
return finalize(raw, warnings);
|
|
388
|
+
}
|
|
389
|
+
function finalize(raw, warnings) {
|
|
390
|
+
const config = normalizeConfig(raw);
|
|
391
|
+
let total = 0;
|
|
392
|
+
for (const cat of config.categories) total += cat.pins.length;
|
|
393
|
+
if (total > 1e3) {
|
|
394
|
+
warnings.push(`\u6807\u8BB0\u603B\u6570 ${total} \u8D85\u8FC7 1000\uFF0C\u5DF2\u622A\u65AD`);
|
|
395
|
+
let kept = 0;
|
|
396
|
+
for (const cat of config.categories) {
|
|
397
|
+
const room = 1e3 - kept;
|
|
398
|
+
if (cat.pins.length > room) {
|
|
399
|
+
cat.pins = cat.pins.slice(0, Math.max(0, room));
|
|
400
|
+
}
|
|
401
|
+
kept += cat.pins.length;
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
const errs = validateConfig(config);
|
|
405
|
+
if (errs.length > 0) {
|
|
406
|
+
const first = errs[0];
|
|
407
|
+
throw new FootprintError(
|
|
408
|
+
first.code,
|
|
409
|
+
{ ...isObject3(first.detail) ? first.detail : {}, all: errs },
|
|
410
|
+
first.userMessage
|
|
411
|
+
);
|
|
412
|
+
}
|
|
413
|
+
return { config, warnings };
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
// src/fallback/list-view.ts
|
|
417
|
+
var ListView = class {
|
|
418
|
+
container;
|
|
419
|
+
categories;
|
|
420
|
+
reason;
|
|
421
|
+
root = null;
|
|
422
|
+
constructor(opts) {
|
|
423
|
+
this.container = opts.container;
|
|
424
|
+
this.categories = opts.categories;
|
|
425
|
+
this.reason = opts.reason;
|
|
426
|
+
}
|
|
427
|
+
render() {
|
|
428
|
+
this.destroy();
|
|
429
|
+
const root = document.createElement("div");
|
|
430
|
+
root.className = "footprint-list";
|
|
431
|
+
root.setAttribute("role", "region");
|
|
432
|
+
root.setAttribute("aria-label", "\u8DB3\u8FF9\u5217\u8868");
|
|
433
|
+
root.setAttribute("part", "list");
|
|
434
|
+
const notice = document.createElement("p");
|
|
435
|
+
notice.className = "footprint-list__notice";
|
|
436
|
+
notice.textContent = this.reason;
|
|
437
|
+
root.appendChild(notice);
|
|
438
|
+
for (const cat of this.categories) {
|
|
439
|
+
if (cat.pins.length === 0) continue;
|
|
440
|
+
const group = document.createElement("section");
|
|
441
|
+
group.className = "footprint-list__group";
|
|
442
|
+
group.style.setProperty("--fp-marker-color", cat.color);
|
|
443
|
+
const heading = document.createElement("h3");
|
|
444
|
+
heading.className = "footprint-list__heading";
|
|
445
|
+
const dot = document.createElement("i");
|
|
446
|
+
dot.className = "footprint-legend__dot";
|
|
447
|
+
dot.setAttribute("aria-hidden", "true");
|
|
448
|
+
heading.appendChild(dot);
|
|
449
|
+
heading.appendChild(document.createTextNode(cat.label));
|
|
450
|
+
group.appendChild(heading);
|
|
451
|
+
const ul = document.createElement("ul");
|
|
452
|
+
ul.className = "footprint-list__items";
|
|
453
|
+
for (const pin of cat.pins) {
|
|
454
|
+
const li = document.createElement("li");
|
|
455
|
+
li.className = "footprint-list__item";
|
|
456
|
+
li.textContent = pin.name;
|
|
457
|
+
if (pin.note) {
|
|
458
|
+
li.title = pin.note;
|
|
459
|
+
}
|
|
460
|
+
ul.appendChild(li);
|
|
461
|
+
}
|
|
462
|
+
group.appendChild(ul);
|
|
463
|
+
root.appendChild(group);
|
|
464
|
+
}
|
|
465
|
+
this.container.appendChild(root);
|
|
466
|
+
this.root = root;
|
|
467
|
+
}
|
|
468
|
+
destroy() {
|
|
469
|
+
if (this.root) {
|
|
470
|
+
this.root.remove();
|
|
471
|
+
this.root = null;
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
};
|
|
475
|
+
|
|
476
|
+
// src/legend-view.ts
|
|
477
|
+
var LegendView = class {
|
|
478
|
+
container;
|
|
479
|
+
root = null;
|
|
480
|
+
constructor(container) {
|
|
481
|
+
this.container = container;
|
|
482
|
+
}
|
|
483
|
+
render(categories) {
|
|
484
|
+
this.destroy();
|
|
485
|
+
const root = document.createElement("div");
|
|
486
|
+
root.className = "footprint-legend";
|
|
487
|
+
root.setAttribute("role", "list");
|
|
488
|
+
root.setAttribute("part", "legend");
|
|
489
|
+
root.setAttribute("aria-label", "\u56FE\u4F8B");
|
|
490
|
+
for (const cat of categories) {
|
|
491
|
+
const item = document.createElement("span");
|
|
492
|
+
item.className = "footprint-legend__item";
|
|
493
|
+
item.setAttribute("role", "listitem");
|
|
494
|
+
const dot = document.createElement("i");
|
|
495
|
+
dot.className = "footprint-legend__dot";
|
|
496
|
+
dot.setAttribute("aria-hidden", "true");
|
|
497
|
+
dot.style.setProperty("--fp-marker-color", cat.color);
|
|
498
|
+
const label = document.createElement("span");
|
|
499
|
+
label.textContent = cat.label;
|
|
500
|
+
item.appendChild(dot);
|
|
501
|
+
item.appendChild(label);
|
|
502
|
+
root.appendChild(item);
|
|
503
|
+
}
|
|
504
|
+
this.container.appendChild(root);
|
|
505
|
+
this.root = root;
|
|
506
|
+
}
|
|
507
|
+
destroy() {
|
|
508
|
+
if (this.root) {
|
|
509
|
+
this.root.remove();
|
|
510
|
+
this.root = null;
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
};
|
|
514
|
+
|
|
515
|
+
// src/map-controller.ts
|
|
516
|
+
var DEFAULT_MAPLIBRE_URL2 = "https://cdn.jsdelivr.net/npm/maplibre-gl@5/dist/maplibre-gl.js";
|
|
517
|
+
var MAPLIBRE_CSS_URL = "https://cdn.jsdelivr.net/npm/maplibre-gl@5/dist/maplibre-gl.css";
|
|
518
|
+
function ensureMaplibreCss(url = MAPLIBRE_CSS_URL) {
|
|
519
|
+
const marker = "data-fp-maplibre-css";
|
|
520
|
+
if (document.querySelector(`[${marker}]`)) return;
|
|
521
|
+
const bundled = `.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px #0000001a}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}@media (hover:hover){.maplibregl-ctrl button:not(:disabled):hover{background-color:#0000000d}}.maplibregl-ctrl button:not(:disabled):active{background-color:#0000000d}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-globe .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%23333' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-globe-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%2333b5e5' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:#ffffff80;margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:#ffffff80;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:#0000000d}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:#000000bf;text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:#ffffffbf;border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px;white-space:nowrap}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}[dir=rtl] .maplibregl-popup-anchor-left{flex-direction:row-reverse}[dir=rtl] .maplibregl-popup-anchor-right{flex-direction:row}[dir=rtl] .maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-start}[dir=rtl] .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-start}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:#0000000d}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px #0000001a;padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px #00000059;box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@media (prefers-reduced-motion:reduce){.maplibregl-user-location-dot:before{animation:none}}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:#0006;color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(pointer:coarse){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}
|
|
522
|
+
` ;
|
|
523
|
+
{
|
|
524
|
+
const style = document.createElement("style");
|
|
525
|
+
style.setAttribute(marker, "1");
|
|
526
|
+
style.textContent = bundled;
|
|
527
|
+
document.head.appendChild(style);
|
|
528
|
+
return;
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
function loadMaplibreFromUrl(url) {
|
|
532
|
+
const g = globalThis;
|
|
533
|
+
if (g.maplibregl) {
|
|
534
|
+
ensureMaplibreCss();
|
|
535
|
+
return Promise.resolve(g.maplibregl);
|
|
536
|
+
}
|
|
537
|
+
return new Promise((resolve, reject) => {
|
|
538
|
+
const marker = "data-fp-maplibre-js";
|
|
539
|
+
const existing = document.querySelector(`script[${marker}]`);
|
|
540
|
+
const done = () => {
|
|
541
|
+
if (g.maplibregl) {
|
|
542
|
+
ensureMaplibreCss();
|
|
543
|
+
resolve(g.maplibregl);
|
|
544
|
+
} else {
|
|
545
|
+
reject(new FootprintError("MAPLIBRE_MISSING", "maplibregl \u672A\u6302\u8F7D\u5230 window"));
|
|
546
|
+
}
|
|
547
|
+
};
|
|
548
|
+
if (existing) {
|
|
549
|
+
existing.addEventListener("load", done, { once: true });
|
|
550
|
+
existing.addEventListener(
|
|
551
|
+
"error",
|
|
552
|
+
() => reject(new FootprintError("MAPLIBRE_MISSING", "script \u52A0\u8F7D\u5931\u8D25")),
|
|
553
|
+
{ once: true }
|
|
554
|
+
);
|
|
555
|
+
return;
|
|
556
|
+
}
|
|
557
|
+
const script = document.createElement("script");
|
|
558
|
+
script.src = url;
|
|
559
|
+
script.async = true;
|
|
560
|
+
script.setAttribute(marker, "1");
|
|
561
|
+
script.addEventListener("load", done, { once: true });
|
|
562
|
+
script.addEventListener(
|
|
563
|
+
"error",
|
|
564
|
+
() => reject(new FootprintError("MAPLIBRE_MISSING", "script \u52A0\u8F7D\u5931\u8D25")),
|
|
565
|
+
{ once: true }
|
|
566
|
+
);
|
|
567
|
+
document.head.appendChild(script);
|
|
568
|
+
});
|
|
569
|
+
}
|
|
570
|
+
async function resolveMaplibre(options, config = {}) {
|
|
571
|
+
if (options.maplibre) {
|
|
572
|
+
ensureMaplibreCss();
|
|
573
|
+
return options.maplibre;
|
|
574
|
+
}
|
|
575
|
+
const g = globalThis;
|
|
576
|
+
if (g.maplibregl) {
|
|
577
|
+
ensureMaplibreCss();
|
|
578
|
+
return g.maplibregl;
|
|
579
|
+
}
|
|
580
|
+
const url = options.maplibreUrl ?? config.maplibreUrl ?? DEFAULT_MAPLIBRE_URL2;
|
|
581
|
+
return loadMaplibreFromUrl(url);
|
|
582
|
+
}
|
|
583
|
+
var MapController = class {
|
|
584
|
+
container;
|
|
585
|
+
maplibre;
|
|
586
|
+
config;
|
|
587
|
+
map = null;
|
|
588
|
+
constructor(container, maplibre, config) {
|
|
589
|
+
this.container = container;
|
|
590
|
+
this.maplibre = maplibre;
|
|
591
|
+
this.config = config;
|
|
592
|
+
}
|
|
593
|
+
init() {
|
|
594
|
+
const Map2 = this.maplibre.Map;
|
|
595
|
+
const map = new Map2({
|
|
596
|
+
container: this.container,
|
|
597
|
+
style: this.config.style,
|
|
598
|
+
center: this.config.center,
|
|
599
|
+
zoom: this.config.zoom,
|
|
600
|
+
pitch: this.config.pitch ?? 0,
|
|
601
|
+
bearing: this.config.bearing ?? 0,
|
|
602
|
+
dragRotate: true,
|
|
603
|
+
touchPitch: true,
|
|
604
|
+
attributionControl: { compact: true }
|
|
605
|
+
});
|
|
606
|
+
this.map = map;
|
|
607
|
+
map.on("style.load", () => {
|
|
608
|
+
this.applyProjection(this.config.projection ?? "globe");
|
|
609
|
+
this.applyFog(this.config.fog ?? DEFAULT_FOG);
|
|
610
|
+
});
|
|
611
|
+
}
|
|
612
|
+
applyProjection(type) {
|
|
613
|
+
if (!this.map) return;
|
|
614
|
+
this.map.setProjection({ type });
|
|
615
|
+
}
|
|
616
|
+
applyFog(fog) {
|
|
617
|
+
if (!this.map || !fog) return;
|
|
618
|
+
const m = this.map;
|
|
619
|
+
try {
|
|
620
|
+
if (typeof m.setFog === "function") {
|
|
621
|
+
m.setFog({
|
|
622
|
+
color: fog.color ?? "rgba(0,0,0,0)",
|
|
623
|
+
"high-color": fog["high-color"] ?? "rgba(255,255,255,0.1)",
|
|
624
|
+
"space-color": fog["space-color"] ?? "rgba(0,0,0,0)",
|
|
625
|
+
"horizon-blend": fog["horizon-blend"] ?? 0
|
|
626
|
+
});
|
|
627
|
+
} else if (typeof m.setSky === "function") {
|
|
628
|
+
m.setSky({
|
|
629
|
+
"horizon-color": fog.color ?? "rgba(0,0,0,0)",
|
|
630
|
+
"sky-color": fog["high-color"] ?? "rgba(0,0,0,0)",
|
|
631
|
+
"fog-color": fog["space-color"] ?? "rgba(0,0,0,0)",
|
|
632
|
+
"horizon-fog-blend": fog["horizon-blend"] ?? 0
|
|
633
|
+
});
|
|
634
|
+
}
|
|
635
|
+
} catch {
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
getMap() {
|
|
639
|
+
return this.map;
|
|
640
|
+
}
|
|
641
|
+
destroy() {
|
|
642
|
+
if (!this.map) return;
|
|
643
|
+
try {
|
|
644
|
+
this.map.remove();
|
|
645
|
+
} catch {
|
|
646
|
+
}
|
|
647
|
+
this.map = null;
|
|
648
|
+
}
|
|
649
|
+
};
|
|
650
|
+
|
|
651
|
+
// src/marker-layer.ts
|
|
652
|
+
var MarkerLayer = class {
|
|
653
|
+
maplibre;
|
|
654
|
+
map;
|
|
655
|
+
popup;
|
|
656
|
+
onPinClick;
|
|
657
|
+
handles = [];
|
|
658
|
+
constructor(opts) {
|
|
659
|
+
this.maplibre = opts.maplibre;
|
|
660
|
+
this.map = opts.map;
|
|
661
|
+
this.popup = opts.popup;
|
|
662
|
+
this.onPinClick = opts.onPinClick;
|
|
663
|
+
}
|
|
664
|
+
render(categories) {
|
|
665
|
+
this.clear();
|
|
666
|
+
for (const category of categories) {
|
|
667
|
+
for (const pin of category.pins) {
|
|
668
|
+
this.addMarker(pin, category);
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
addMarker(pin, category) {
|
|
673
|
+
const el = document.createElement("button");
|
|
674
|
+
el.type = "button";
|
|
675
|
+
el.className = "footprint-marker";
|
|
676
|
+
el.style.setProperty("--fp-marker-color", category.color);
|
|
677
|
+
el.setAttribute("aria-label", pin.name);
|
|
678
|
+
el.dataset.category = category.id;
|
|
679
|
+
const open = () => {
|
|
680
|
+
this.popup.open(this.map, pin.coords, pin.name);
|
|
681
|
+
};
|
|
682
|
+
const close = () => {
|
|
683
|
+
this.popup.close();
|
|
684
|
+
};
|
|
685
|
+
const onClick = (e) => {
|
|
686
|
+
e.stopPropagation();
|
|
687
|
+
open();
|
|
688
|
+
this.onPinClick?.(pin, category);
|
|
689
|
+
};
|
|
690
|
+
el.addEventListener("mouseenter", open);
|
|
691
|
+
el.addEventListener("mouseleave", close);
|
|
692
|
+
el.addEventListener("focus", open);
|
|
693
|
+
el.addEventListener("blur", close);
|
|
694
|
+
el.addEventListener("click", onClick);
|
|
695
|
+
const marker = new this.maplibre.Marker({ element: el, anchor: "center" });
|
|
696
|
+
marker.setLngLat(pin.coords).addTo(this.map);
|
|
697
|
+
this.handles.push({
|
|
698
|
+
el,
|
|
699
|
+
destroy: () => {
|
|
700
|
+
el.removeEventListener("mouseenter", open);
|
|
701
|
+
el.removeEventListener("mouseleave", close);
|
|
702
|
+
el.removeEventListener("focus", open);
|
|
703
|
+
el.removeEventListener("blur", close);
|
|
704
|
+
el.removeEventListener("click", onClick);
|
|
705
|
+
el.remove();
|
|
706
|
+
}
|
|
707
|
+
});
|
|
708
|
+
}
|
|
709
|
+
clear() {
|
|
710
|
+
for (const h of this.handles) h.destroy();
|
|
711
|
+
this.handles = [];
|
|
712
|
+
}
|
|
713
|
+
/** 当前渲染的 marker 元素(测试用) */
|
|
714
|
+
getElements() {
|
|
715
|
+
return this.handles.map((h) => h.el);
|
|
716
|
+
}
|
|
717
|
+
destroy() {
|
|
718
|
+
this.clear();
|
|
719
|
+
}
|
|
720
|
+
};
|
|
721
|
+
|
|
722
|
+
// src/popup-manager.ts
|
|
723
|
+
var PopupManager = class {
|
|
724
|
+
maplibre;
|
|
725
|
+
active = null;
|
|
726
|
+
constructor(maplibre) {
|
|
727
|
+
this.maplibre = maplibre;
|
|
728
|
+
}
|
|
729
|
+
open(map, coords, text) {
|
|
730
|
+
this.close();
|
|
731
|
+
const popup = new this.maplibre.Popup({
|
|
732
|
+
offset: 8,
|
|
733
|
+
closeButton: false,
|
|
734
|
+
closeOnMove: false,
|
|
735
|
+
focusAfterOpen: false
|
|
736
|
+
});
|
|
737
|
+
popup.setLngLat(coords);
|
|
738
|
+
popup.setText(text);
|
|
739
|
+
popup.addTo(map);
|
|
740
|
+
this.active = popup;
|
|
741
|
+
}
|
|
742
|
+
close() {
|
|
743
|
+
if (!this.active) return;
|
|
744
|
+
try {
|
|
745
|
+
this.active.remove();
|
|
746
|
+
} catch {
|
|
747
|
+
}
|
|
748
|
+
this.active = null;
|
|
749
|
+
}
|
|
750
|
+
destroy() {
|
|
751
|
+
this.close();
|
|
752
|
+
}
|
|
753
|
+
};
|
|
754
|
+
|
|
755
|
+
// src/privacy.ts
|
|
756
|
+
function hashString(s) {
|
|
757
|
+
let h = 2166136261;
|
|
758
|
+
for (let i = 0; i < s.length; i++) {
|
|
759
|
+
h ^= s.charCodeAt(i);
|
|
760
|
+
h = Math.imul(h, 16777619);
|
|
761
|
+
}
|
|
762
|
+
return h >>> 0;
|
|
763
|
+
}
|
|
764
|
+
function mulberry32(seed) {
|
|
765
|
+
let s = seed >>> 0;
|
|
766
|
+
return () => {
|
|
767
|
+
s = s + 1831565813 | 0;
|
|
768
|
+
let t = Math.imul(s ^ s >>> 15, 1 | s);
|
|
769
|
+
t = t + Math.imul(t ^ t >>> 7, 61 | t) ^ t;
|
|
770
|
+
return ((t ^ t >>> 14) >>> 0) / 4294967296;
|
|
771
|
+
};
|
|
772
|
+
}
|
|
773
|
+
var KM_PER_DEG_LAT = 111.32;
|
|
774
|
+
function roundTo2(n) {
|
|
775
|
+
return Math.round(n * 100) / 100;
|
|
776
|
+
}
|
|
777
|
+
function applyPrivacy(pins, options) {
|
|
778
|
+
const blur = options.blur ?? 0;
|
|
779
|
+
const cityOnly = options.cityOnly ?? false;
|
|
780
|
+
if (blur <= 0 && !cityOnly) return pins;
|
|
781
|
+
return pins.map((pin) => {
|
|
782
|
+
let [lng, lat] = pin.coords;
|
|
783
|
+
if (blur > 0) {
|
|
784
|
+
const seed = hashString(`${pin.name}:${lng}:${lat}`);
|
|
785
|
+
const rand = mulberry32(seed);
|
|
786
|
+
const angle = rand() * Math.PI * 2;
|
|
787
|
+
const radius = Math.sqrt(rand()) * blur;
|
|
788
|
+
const dLat = radius * Math.cos(angle) / KM_PER_DEG_LAT;
|
|
789
|
+
const cosLat = Math.max(Math.cos(lat * Math.PI / 180), 0.01);
|
|
790
|
+
const dLng = radius * Math.sin(angle) / (KM_PER_DEG_LAT * cosLat);
|
|
791
|
+
lat = lat + dLat;
|
|
792
|
+
lng = lng + dLng;
|
|
793
|
+
lng = Math.max(-180, Math.min(180, lng));
|
|
794
|
+
lat = Math.max(-90, Math.min(90, lat));
|
|
795
|
+
}
|
|
796
|
+
if (cityOnly) {
|
|
797
|
+
lng = roundTo2(lng);
|
|
798
|
+
lat = roundTo2(lat);
|
|
799
|
+
}
|
|
800
|
+
return { ...pin, coords: [lng, lat] };
|
|
801
|
+
});
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
// src/theme-manager.ts
|
|
805
|
+
var ThemeManager = class {
|
|
806
|
+
container;
|
|
807
|
+
mediaQuery = null;
|
|
808
|
+
mediaHandler = null;
|
|
809
|
+
constructor(container) {
|
|
810
|
+
this.container = container;
|
|
811
|
+
}
|
|
812
|
+
apply(theme) {
|
|
813
|
+
this.detachMedia();
|
|
814
|
+
if (theme === "auto") {
|
|
815
|
+
if (typeof window !== "undefined" && window.matchMedia) {
|
|
816
|
+
this.mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
|
|
817
|
+
const sync = () => {
|
|
818
|
+
const dark = this.mediaQuery.matches;
|
|
819
|
+
this.container.setAttribute("data-fp-theme", dark ? "dark" : "light");
|
|
820
|
+
};
|
|
821
|
+
sync();
|
|
822
|
+
this.mediaHandler = sync;
|
|
823
|
+
this.mediaQuery.addEventListener("change", this.mediaHandler);
|
|
824
|
+
} else {
|
|
825
|
+
this.container.setAttribute("data-fp-theme", "light");
|
|
826
|
+
}
|
|
827
|
+
return;
|
|
828
|
+
}
|
|
829
|
+
this.container.setAttribute("data-fp-theme", theme);
|
|
830
|
+
}
|
|
831
|
+
detachMedia() {
|
|
832
|
+
if (this.mediaQuery && this.mediaHandler) {
|
|
833
|
+
this.mediaQuery.removeEventListener("change", this.mediaHandler);
|
|
834
|
+
}
|
|
835
|
+
this.mediaQuery = null;
|
|
836
|
+
this.mediaHandler = null;
|
|
837
|
+
}
|
|
838
|
+
destroy() {
|
|
839
|
+
this.detachMedia();
|
|
840
|
+
this.container.removeAttribute("data-fp-theme");
|
|
841
|
+
}
|
|
842
|
+
};
|
|
843
|
+
|
|
844
|
+
// src/globe.ts
|
|
845
|
+
function detectWebGL() {
|
|
846
|
+
try {
|
|
847
|
+
const canvas = document.createElement("canvas");
|
|
848
|
+
const g = canvas.getContext("webgl") || canvas.getContext("experimental-webgl");
|
|
849
|
+
return !!g;
|
|
850
|
+
} catch {
|
|
851
|
+
return false;
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
var FootprintGlobe = class {
|
|
855
|
+
container;
|
|
856
|
+
options;
|
|
857
|
+
config = null;
|
|
858
|
+
mapController = null;
|
|
859
|
+
markerLayer = null;
|
|
860
|
+
popupManager = null;
|
|
861
|
+
legendView = null;
|
|
862
|
+
themeManager = null;
|
|
863
|
+
listView = null;
|
|
864
|
+
listeners = /* @__PURE__ */ new Map();
|
|
865
|
+
destroyed = false;
|
|
866
|
+
ready = false;
|
|
867
|
+
constructor(container, options) {
|
|
868
|
+
this.container = container;
|
|
869
|
+
this.options = options;
|
|
870
|
+
void this.init();
|
|
871
|
+
}
|
|
872
|
+
async init() {
|
|
873
|
+
try {
|
|
874
|
+
const errs = validateConfig(this.options.config);
|
|
875
|
+
if (errs.length > 0) {
|
|
876
|
+
this.fail(errs[0]);
|
|
877
|
+
return;
|
|
878
|
+
}
|
|
879
|
+
let config = normalizeConfig(this.options.config);
|
|
880
|
+
const privacy = config.config?.privacy;
|
|
881
|
+
if (privacy && ((privacy.blur ?? 0) > 0 || privacy.cityOnly)) {
|
|
882
|
+
config = {
|
|
883
|
+
...config,
|
|
884
|
+
categories: config.categories.map((c) => ({
|
|
885
|
+
...c,
|
|
886
|
+
pins: applyPrivacy(c.pins, privacy)
|
|
887
|
+
}))
|
|
888
|
+
};
|
|
889
|
+
}
|
|
890
|
+
this.config = config;
|
|
891
|
+
if (!detectWebGL()) {
|
|
892
|
+
this.renderFallback("\u5F53\u524D\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 3D \u6E32\u67D3\uFF0C\u5DF2\u5207\u6362\u4E3A\u5217\u8868\u89C6\u56FE\u3002");
|
|
893
|
+
this.emitError(new FootprintError("WEBGL_UNSUPPORTED"));
|
|
894
|
+
return;
|
|
895
|
+
}
|
|
896
|
+
let maplibre;
|
|
897
|
+
try {
|
|
898
|
+
maplibre = await resolveMaplibre(
|
|
899
|
+
{ maplibre: this.options.maplibre, maplibreUrl: this.options.maplibreUrl },
|
|
900
|
+
config.config ?? {}
|
|
901
|
+
);
|
|
902
|
+
} catch (e) {
|
|
903
|
+
const err = e instanceof FootprintError ? e : new FootprintError("MAPLIBRE_MISSING", e);
|
|
904
|
+
this.renderFallback("\u5730\u56FE\u5F15\u64CE\u52A0\u8F7D\u5931\u8D25\uFF0C\u5DF2\u5207\u6362\u4E3A\u5217\u8868\u89C6\u56FE\u3002");
|
|
905
|
+
this.emitError(err);
|
|
906
|
+
return;
|
|
907
|
+
}
|
|
908
|
+
if (this.destroyed) return;
|
|
909
|
+
this.mapController = new MapController(this.container, maplibre, config.config ?? {});
|
|
910
|
+
this.mapController.init();
|
|
911
|
+
this.themeManager = new ThemeManager(this.container);
|
|
912
|
+
this.themeManager.apply(config.config?.theme ?? "light");
|
|
913
|
+
this.popupManager = new PopupManager(maplibre);
|
|
914
|
+
this.markerLayer = new MarkerLayer({
|
|
915
|
+
maplibre,
|
|
916
|
+
map: this.mapController.getMap(),
|
|
917
|
+
popup: this.popupManager,
|
|
918
|
+
onPinClick: (pin, category) => this.emit("marker:click", pin, category)
|
|
919
|
+
});
|
|
920
|
+
this.markerLayer.render(config.categories);
|
|
921
|
+
if (config.config?.legend !== false) {
|
|
922
|
+
this.legendView = new LegendView(this.container);
|
|
923
|
+
this.legendView.render(config.categories);
|
|
924
|
+
}
|
|
925
|
+
const map = this.mapController.getMap();
|
|
926
|
+
map?.on?.("click", () => this.popupManager?.close());
|
|
927
|
+
let styleErrorReported = false;
|
|
928
|
+
map?.on?.("error", (...args) => {
|
|
929
|
+
if (styleErrorReported) return;
|
|
930
|
+
const e = args[0];
|
|
931
|
+
const msg = e?.error?.message ?? "";
|
|
932
|
+
if (!/style|tile|fetch|network|Failed/i.test(msg)) return;
|
|
933
|
+
styleErrorReported = true;
|
|
934
|
+
this.emitError(
|
|
935
|
+
new FootprintError(
|
|
936
|
+
"DATA_LOAD_FAILED",
|
|
937
|
+
e?.error ?? new Error(msg),
|
|
938
|
+
`\u5E95\u56FE\u52A0\u8F7D\u5931\u8D25\uFF1A\u5F53\u524D\u7F51\u7EDC\u53EF\u80FD\u65E0\u6CD5\u8BBF\u95EE\u9ED8\u8BA4\u74E6\u7247\u6E90\uFF08tiles.openfreemap.org\uFF09\u3002\u53EF\u5728\u914D\u7F6E config.style \u4E2D\u5207\u6362\u4E3A\u53EF\u8BBF\u95EE\u7684\u74E6\u7247\u6837\u5F0F\uFF0C\u6216\u81EA\u6258\u7BA1\u74E6\u7247\u3002`
|
|
939
|
+
)
|
|
940
|
+
);
|
|
941
|
+
});
|
|
942
|
+
this.ready = true;
|
|
943
|
+
this.emit("ready");
|
|
944
|
+
this.options.onReady?.(this);
|
|
945
|
+
requestAnimationFrame(() => {
|
|
946
|
+
if (this.destroyed) return;
|
|
947
|
+
try {
|
|
948
|
+
map.resize?.();
|
|
949
|
+
} catch {
|
|
950
|
+
}
|
|
951
|
+
});
|
|
952
|
+
} catch (e) {
|
|
953
|
+
this.fail(e);
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
renderFallback(reason) {
|
|
957
|
+
if (!this.config) return;
|
|
958
|
+
this.listView = new ListView({
|
|
959
|
+
container: this.container,
|
|
960
|
+
categories: this.config.categories,
|
|
961
|
+
reason
|
|
962
|
+
});
|
|
963
|
+
this.listView.render();
|
|
964
|
+
}
|
|
965
|
+
fail(e) {
|
|
966
|
+
const err = e instanceof FootprintError ? e : new FootprintError("RENDER_FAILED", e);
|
|
967
|
+
console.error("[footprint-globe]", err);
|
|
968
|
+
this.emitError(err);
|
|
969
|
+
}
|
|
970
|
+
/** 触发 error 事件并回调 onError */
|
|
971
|
+
emitError(err) {
|
|
972
|
+
this.emit("error", err);
|
|
973
|
+
this.options.onError?.(err);
|
|
974
|
+
}
|
|
975
|
+
update(partial) {
|
|
976
|
+
if (this.destroyed || !this.config) return;
|
|
977
|
+
if (!this.ready) return;
|
|
978
|
+
const merged = {
|
|
979
|
+
version: 1,
|
|
980
|
+
dataId: partial.dataId ?? this.config.dataId,
|
|
981
|
+
categories: partial.categories ?? this.config.categories,
|
|
982
|
+
config: { ...this.config.config ?? {}, ...partial.config ?? {} },
|
|
983
|
+
routes: partial.routes ?? this.config.routes
|
|
984
|
+
};
|
|
985
|
+
const errs = validateConfig(merged);
|
|
986
|
+
if (errs.length > 0) {
|
|
987
|
+
this.fail(errs[0]);
|
|
988
|
+
return;
|
|
989
|
+
}
|
|
990
|
+
let next = normalizeConfig(merged);
|
|
991
|
+
const privacy = next.config?.privacy;
|
|
992
|
+
if (privacy && ((privacy.blur ?? 0) > 0 || privacy.cityOnly)) {
|
|
993
|
+
next = {
|
|
994
|
+
...next,
|
|
995
|
+
categories: next.categories.map((c) => ({
|
|
996
|
+
...c,
|
|
997
|
+
pins: applyPrivacy(c.pins, privacy)
|
|
998
|
+
}))
|
|
999
|
+
};
|
|
1000
|
+
}
|
|
1001
|
+
this.config = next;
|
|
1002
|
+
this.markerLayer?.render(next.categories);
|
|
1003
|
+
if (this.legendView) {
|
|
1004
|
+
this.legendView.render(next.categories);
|
|
1005
|
+
} else if (next.config?.legend !== false) {
|
|
1006
|
+
this.legendView = new LegendView(this.container);
|
|
1007
|
+
this.legendView.render(next.categories);
|
|
1008
|
+
} else {
|
|
1009
|
+
this.legendView = null;
|
|
1010
|
+
}
|
|
1011
|
+
const theme = next.config?.theme ?? "light";
|
|
1012
|
+
this.themeManager?.apply(theme);
|
|
1013
|
+
const projection = next.config?.projection ?? "globe";
|
|
1014
|
+
this.mapController?.applyProjection(projection);
|
|
1015
|
+
this.mapController?.applyFog(next.config?.fog);
|
|
1016
|
+
}
|
|
1017
|
+
destroy() {
|
|
1018
|
+
if (this.destroyed) return;
|
|
1019
|
+
this.destroyed = true;
|
|
1020
|
+
this.markerLayer?.destroy();
|
|
1021
|
+
this.markerLayer = null;
|
|
1022
|
+
this.legendView?.destroy();
|
|
1023
|
+
this.legendView = null;
|
|
1024
|
+
this.popupManager?.destroy();
|
|
1025
|
+
this.popupManager = null;
|
|
1026
|
+
this.themeManager?.destroy();
|
|
1027
|
+
this.themeManager = null;
|
|
1028
|
+
this.listView?.destroy();
|
|
1029
|
+
this.listView = null;
|
|
1030
|
+
this.mapController?.destroy();
|
|
1031
|
+
this.mapController = null;
|
|
1032
|
+
this.listeners.clear();
|
|
1033
|
+
this.ready = false;
|
|
1034
|
+
}
|
|
1035
|
+
getMap() {
|
|
1036
|
+
return this.mapController?.getMap() ?? null;
|
|
1037
|
+
}
|
|
1038
|
+
getConfig() {
|
|
1039
|
+
if (!this.ready || !this.config) throw new Error("FootprintGlobe not initialized");
|
|
1040
|
+
return this.config;
|
|
1041
|
+
}
|
|
1042
|
+
on(event, handler) {
|
|
1043
|
+
if (!this.listeners.has(event)) {
|
|
1044
|
+
this.listeners.set(event, /* @__PURE__ */ new Set());
|
|
1045
|
+
}
|
|
1046
|
+
this.listeners.get(event).add(handler);
|
|
1047
|
+
return () => {
|
|
1048
|
+
this.listeners.get(event)?.delete(handler);
|
|
1049
|
+
};
|
|
1050
|
+
}
|
|
1051
|
+
emit(event, ...args) {
|
|
1052
|
+
this.listeners.get(event)?.forEach((h) => {
|
|
1053
|
+
try {
|
|
1054
|
+
h(...args);
|
|
1055
|
+
} catch (e) {
|
|
1056
|
+
console.error("[footprint-globe] listener error", e);
|
|
1057
|
+
}
|
|
1058
|
+
});
|
|
1059
|
+
}
|
|
1060
|
+
};
|
|
1061
|
+
|
|
1062
|
+
// src/web/attributes.ts
|
|
1063
|
+
function parseBool(v) {
|
|
1064
|
+
if (v === null) return void 0;
|
|
1065
|
+
if (v === "true" || v === "1" || v === "") return true;
|
|
1066
|
+
if (v === "false" || v === "0") return false;
|
|
1067
|
+
return void 0;
|
|
1068
|
+
}
|
|
1069
|
+
function parseNumber(v) {
|
|
1070
|
+
if (v === null) return void 0;
|
|
1071
|
+
const n = Number(v);
|
|
1072
|
+
return Number.isFinite(n) ? n : void 0;
|
|
1073
|
+
}
|
|
1074
|
+
function parseCenter(v) {
|
|
1075
|
+
if (!v) return void 0;
|
|
1076
|
+
const parts = v.split(",").map((s) => Number(s.trim()));
|
|
1077
|
+
if (parts.length !== 2) return void 0;
|
|
1078
|
+
const [lng, lat] = parts;
|
|
1079
|
+
if (!Number.isFinite(lng) || !Number.isFinite(lat)) return void 0;
|
|
1080
|
+
return [lng, lat];
|
|
1081
|
+
}
|
|
1082
|
+
function parseAttributes(el) {
|
|
1083
|
+
const out = {};
|
|
1084
|
+
const id = el.getAttribute("data-id");
|
|
1085
|
+
if (id) out.id = id;
|
|
1086
|
+
const pins = el.getAttribute("data-pins");
|
|
1087
|
+
if (pins) out.pins = pins;
|
|
1088
|
+
const src = el.getAttribute("data-src");
|
|
1089
|
+
if (src) out.src = src;
|
|
1090
|
+
const maplibreUrl = el.getAttribute("maplibre-url");
|
|
1091
|
+
if (maplibreUrl) out.maplibreUrl = maplibreUrl;
|
|
1092
|
+
const height = el.getAttribute("height");
|
|
1093
|
+
if (height) out.height = height;
|
|
1094
|
+
const cfg = {};
|
|
1095
|
+
const theme = el.getAttribute("theme");
|
|
1096
|
+
if (theme === "light" || theme === "dark" || theme === "auto") cfg.theme = theme;
|
|
1097
|
+
const projection = el.getAttribute("projection");
|
|
1098
|
+
if (projection === "globe" || projection === "mercator") cfg.projection = projection;
|
|
1099
|
+
const center = parseCenter(el.getAttribute("center"));
|
|
1100
|
+
if (center) cfg.center = center;
|
|
1101
|
+
const zoom = parseNumber(el.getAttribute("zoom"));
|
|
1102
|
+
if (zoom !== void 0) cfg.zoom = zoom;
|
|
1103
|
+
const legend = parseBool(el.getAttribute("legend"));
|
|
1104
|
+
if (legend !== void 0) cfg.legend = legend;
|
|
1105
|
+
const autorotate = parseBool(el.getAttribute("autorotate"));
|
|
1106
|
+
if (autorotate !== void 0) cfg.autorotate = autorotate;
|
|
1107
|
+
const attribution = parseBool(el.getAttribute("attribution"));
|
|
1108
|
+
if (attribution !== void 0) cfg.attribution = attribution;
|
|
1109
|
+
const privacy = {};
|
|
1110
|
+
const blur = parseNumber(el.getAttribute("privacy-blur"));
|
|
1111
|
+
if (blur !== void 0) privacy.blur = blur;
|
|
1112
|
+
const cityOnly = parseBool(el.getAttribute("privacy-city-only"));
|
|
1113
|
+
if (cityOnly !== void 0) privacy.cityOnly = cityOnly;
|
|
1114
|
+
if (Object.keys(privacy).length > 0) cfg.privacy = privacy;
|
|
1115
|
+
if (Object.keys(cfg).length > 0) out.config = cfg;
|
|
1116
|
+
return out;
|
|
1117
|
+
}
|
|
1118
|
+
function mergeAttributeConfig(base, attrs) {
|
|
1119
|
+
if (!attrs.config) return base;
|
|
1120
|
+
return {
|
|
1121
|
+
...base,
|
|
1122
|
+
config: { ...base.config ?? {}, ...attrs.config }
|
|
1123
|
+
};
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
// src/web/styles.ts
|
|
1127
|
+
var RAW = "/* ============================================================\n * \u8DB3\u8FF9\u5730\u7403 \xB7 \u7EC4\u4EF6\u6837\u5F0F\n * \u5951\u7EA6\u4F9D\u636E\uFF1AADR-0001 \u51B3\u7B56 4\u3001PRD v1.1 \xA77.1\n * \u7C7B\u540D\u524D\u7F00\uFF1Afootprint-\n * CSS \u53D8\u91CF\u524D\u7F00\uFF1A--fp-\n * ============================================================ */\n\n:root {\n /* \u5C3A\u5BF8 */\n --fp-marker-size: 8px;\n --fp-marker-hover-scale: 1.15;\n --fp-globe-height: 400px;\n --fp-globe-radius: 12px;\n\n /* \u989C\u8272 */\n --fp-marker-color: #2563eb;\n --fp-marker-border: #fff;\n --fp-globe-bg: #eef2f7;\n --fp-legend-bg: rgba(255, 255, 255, 0.9);\n --fp-legend-color: #111827;\n\n /* \u9634\u5F71 */\n --fp-marker-shadow: 0 0 0 4px rgba(17, 24, 39, 0.08), 0 1px 3px rgba(0, 0, 0, 0.25);\n --fp-legend-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);\n\n /* \u5E03\u5C40 */\n --fp-legend-radius: 9999px;\n --fp-legend-gap: 0.75rem;\n}\n\n/* \u6697\u8272\u4E3B\u9898\u8986\u76D6 */\n[data-fp-theme='dark'] {\n --fp-globe-bg: #111827;\n --fp-legend-bg: rgba(17, 24, 39, 0.85);\n --fp-legend-color: #f9fafb;\n --fp-marker-border: #111827;\n}\n\n/* ===== \u5BB9\u5668 ===== */\n.footprint-globe {\n width: 100%;\n min-height: var(--fp-globe-height);\n border-radius: var(--fp-globe-radius);\n overflow: hidden;\n background: var(--fp-globe-bg);\n position: relative;\n}\n\n/* ===== \u6807\u8BB0 ===== */\n.footprint-marker {\n width: var(--fp-marker-size);\n height: var(--fp-marker-size);\n border-radius: 9999px;\n border: 1px solid var(--fp-marker-border);\n background: var(--fp-marker-color);\n box-shadow: var(--fp-marker-shadow);\n cursor: pointer;\n padding: 0;\n margin: 0;\n display: block;\n transition:\n transform 120ms ease,\n box-shadow 120ms ease;\n appearance: none;\n -webkit-appearance: none;\n}\n\n.footprint-marker:hover,\n.footprint-marker:focus-visible {\n transform: scale(var(--fp-marker-hover-scale));\n outline: none;\n}\n\n.footprint-marker:focus-visible {\n box-shadow:\n 0 0 0 2px var(--fp-marker-border),\n 0 0 0 6px var(--fp-marker-color);\n}\n\n/* ===== \u56FE\u4F8B ===== */\n.footprint-legend {\n position: absolute;\n right: 12px;\n bottom: 12px;\n display: flex;\n gap: var(--fp-legend-gap);\n align-items: center;\n padding: 0.5rem 0.75rem;\n border-radius: var(--fp-legend-radius);\n background: var(--fp-legend-bg);\n box-shadow: var(--fp-legend-shadow);\n backdrop-filter: blur(6px);\n color: var(--fp-legend-color);\n font-size: 0.85rem;\n line-height: 1.1;\n z-index: 1;\n}\n\n.footprint-legend__item {\n display: inline-flex;\n align-items: center;\n gap: 0.35rem;\n white-space: nowrap;\n}\n\n.footprint-legend__dot {\n width: 10px;\n height: 10px;\n border-radius: 9999px;\n display: inline-block;\n border: 2px solid var(--fp-marker-border);\n box-shadow: 0 0 0 2px rgba(17, 24, 39, 0.08);\n background: var(--fp-marker-color);\n}\n\n/* ===== \u964D\u7EA7\u5217\u8868 ===== */\n.footprint-list {\n padding: 1rem 1.25rem;\n background: var(--fp-globe-bg);\n border-radius: var(--fp-globe-radius);\n color: var(--fp-legend-color);\n font-size: 0.95rem;\n}\n\n.footprint-list__notice {\n margin: 0 0 1rem;\n padding: 0.6rem 0.8rem;\n border-radius: 8px;\n background: rgba(0, 0, 0, 0.05);\n font-size: 0.85rem;\n color: var(--fp-legend-color);\n}\n\n.footprint-list__group {\n margin-bottom: 1rem;\n}\n\n.footprint-list__heading {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n margin: 0 0 0.5rem;\n font-size: 0.95rem;\n font-weight: 600;\n}\n\n.footprint-list__items {\n margin: 0;\n padding-left: 1.4rem;\n list-style: disc;\n}\n\n.footprint-list__item {\n margin: 0.2rem 0;\n line-height: 1.5;\n}\n\n/* ===== \u54CD\u5E94\u5F0F ===== */\n@media (max-width: 768px) {\n .footprint-globe {\n min-height: 300px;\n }\n .footprint-legend {\n font-size: 0.78rem;\n padding: 0.4rem 0.6rem;\n gap: 0.5rem;\n }\n}\n\n/* ===== \u517C\u5BB9\u522B\u540D\uFF08\u4E00\u4E2A minor \u7248\u672C\u540E\u79FB\u9664\uFF09 ===== */\n.mapbox-globe {\n width: 100%;\n min-height: var(--fp-globe-height);\n border-radius: var(--fp-globe-radius);\n overflow: hidden;\n background: var(--fp-globe-bg);\n position: relative;\n}\n" ;
|
|
1128
|
+
function adaptRootSelector(css) {
|
|
1129
|
+
return css.replace(/(^|[^\w-]):root(\b)/g, "$1:host, :root$2");
|
|
1130
|
+
}
|
|
1131
|
+
var SHADOW_CSS = adaptRootSelector(RAW);
|
|
1132
|
+
var HOST_CSS = `
|
|
1133
|
+
:host {
|
|
1134
|
+
display: block;
|
|
1135
|
+
width: 100%;
|
|
1136
|
+
min-height: var(--fp-globe-height, 400px);
|
|
1137
|
+
border-radius: var(--fp-globe-radius, 12px);
|
|
1138
|
+
overflow: hidden;
|
|
1139
|
+
background: var(--fp-globe-bg, #eef2f7);
|
|
1140
|
+
}
|
|
1141
|
+
`;
|
|
1142
|
+
function getShadowStyle() {
|
|
1143
|
+
return HOST_CSS + "\n" + SHADOW_CSS;
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
// src/web/element.ts
|
|
1147
|
+
var DEFAULT_ARIA_LABEL = "\u8DB3\u8FF9\u5730\u7403";
|
|
1148
|
+
var FootprintGlobeElement = class extends HTMLElement {
|
|
1149
|
+
static get observedAttributes() {
|
|
1150
|
+
return [
|
|
1151
|
+
"data-id",
|
|
1152
|
+
"data-pins",
|
|
1153
|
+
"data-src",
|
|
1154
|
+
"maplibre-url",
|
|
1155
|
+
"theme",
|
|
1156
|
+
"projection",
|
|
1157
|
+
"center",
|
|
1158
|
+
"zoom",
|
|
1159
|
+
"height",
|
|
1160
|
+
"legend",
|
|
1161
|
+
"autorotate",
|
|
1162
|
+
"attribution",
|
|
1163
|
+
"privacy-blur",
|
|
1164
|
+
"privacy-city-only"
|
|
1165
|
+
];
|
|
1166
|
+
}
|
|
1167
|
+
root;
|
|
1168
|
+
container;
|
|
1169
|
+
instance = null;
|
|
1170
|
+
initToken = 0;
|
|
1171
|
+
ready = false;
|
|
1172
|
+
constructor() {
|
|
1173
|
+
super();
|
|
1174
|
+
this.root = this.attachShadow({ mode: "open" });
|
|
1175
|
+
const style = document.createElement("style");
|
|
1176
|
+
style.textContent = getShadowStyle();
|
|
1177
|
+
this.root.appendChild(style);
|
|
1178
|
+
this.container = document.createElement("div");
|
|
1179
|
+
this.container.className = "footprint-globe";
|
|
1180
|
+
this.container.setAttribute("part", "globe");
|
|
1181
|
+
this.root.appendChild(this.container);
|
|
1182
|
+
}
|
|
1183
|
+
connectedCallback() {
|
|
1184
|
+
if (!this.hasAttribute("role")) {
|
|
1185
|
+
this.setAttribute("role", "region");
|
|
1186
|
+
}
|
|
1187
|
+
if (!this.hasAttribute("aria-label")) {
|
|
1188
|
+
this.setAttribute("aria-label", DEFAULT_ARIA_LABEL);
|
|
1189
|
+
}
|
|
1190
|
+
void this.init();
|
|
1191
|
+
}
|
|
1192
|
+
disconnectedCallback() {
|
|
1193
|
+
this.destroy();
|
|
1194
|
+
}
|
|
1195
|
+
attributeChangedCallback() {
|
|
1196
|
+
if (!this.instance || !this.ready) return;
|
|
1197
|
+
const attrs = parseAttributes(this);
|
|
1198
|
+
if (attrs.config) {
|
|
1199
|
+
this.instance.update({ config: attrs.config });
|
|
1200
|
+
}
|
|
1201
|
+
if (attrs.height) {
|
|
1202
|
+
this.container.style.setProperty("--fp-globe-height", attrs.height);
|
|
1203
|
+
}
|
|
1204
|
+
}
|
|
1205
|
+
async init() {
|
|
1206
|
+
if (this.ready || this.instance) return;
|
|
1207
|
+
const token = ++this.initToken;
|
|
1208
|
+
try {
|
|
1209
|
+
const attrs = parseAttributes(this);
|
|
1210
|
+
let baseConfig;
|
|
1211
|
+
if (attrs.id || attrs.src || attrs.pins) {
|
|
1212
|
+
const r = await loadData({
|
|
1213
|
+
id: attrs.id,
|
|
1214
|
+
src: attrs.src,
|
|
1215
|
+
data: attrs.pins
|
|
1216
|
+
});
|
|
1217
|
+
baseConfig = r.config;
|
|
1218
|
+
} else {
|
|
1219
|
+
const g = globalThis.FOOTPRINT_PINS;
|
|
1220
|
+
if (!g) {
|
|
1221
|
+
this.renderError("\u672A\u63D0\u4F9B\u6570\u636E\u6E90\uFF1A\u8BF7\u8BBE\u7F6E data-pins\u3001data-src \u6216 window.FOOTPRINT_PINS");
|
|
1222
|
+
return;
|
|
1223
|
+
}
|
|
1224
|
+
const r = await loadData({ globalVar: "FOOTPRINT_PINS" });
|
|
1225
|
+
baseConfig = r.config;
|
|
1226
|
+
}
|
|
1227
|
+
if (token !== this.initToken) return;
|
|
1228
|
+
const config = mergeAttributeConfig(baseConfig, attrs);
|
|
1229
|
+
const errs = validateConfig(config);
|
|
1230
|
+
if (errs.length > 0) {
|
|
1231
|
+
this.renderError(errs[0].userMessage);
|
|
1232
|
+
return;
|
|
1233
|
+
}
|
|
1234
|
+
if (attrs.height) {
|
|
1235
|
+
this.container.style.setProperty("--fp-globe-height", attrs.height);
|
|
1236
|
+
}
|
|
1237
|
+
this.instance = new FootprintGlobe(this.container, {
|
|
1238
|
+
config,
|
|
1239
|
+
maplibreUrl: attrs.maplibreUrl,
|
|
1240
|
+
onReady: () => {
|
|
1241
|
+
this.ready = true;
|
|
1242
|
+
this.dispatchEvent(new CustomEvent("fp-ready", { bubbles: true }));
|
|
1243
|
+
},
|
|
1244
|
+
onError: (err) => {
|
|
1245
|
+
this.dispatchEvent(new CustomEvent("fp-error", { detail: err, bubbles: true }));
|
|
1246
|
+
}
|
|
1247
|
+
});
|
|
1248
|
+
} catch (e) {
|
|
1249
|
+
if (token !== this.initToken) return;
|
|
1250
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
1251
|
+
this.renderError(msg);
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
1254
|
+
renderError(msg) {
|
|
1255
|
+
this.container.innerHTML = "";
|
|
1256
|
+
const div = document.createElement("div");
|
|
1257
|
+
div.className = "footprint-error";
|
|
1258
|
+
div.setAttribute("part", "error");
|
|
1259
|
+
div.setAttribute("role", "alert");
|
|
1260
|
+
div.textContent = msg;
|
|
1261
|
+
this.container.appendChild(div);
|
|
1262
|
+
}
|
|
1263
|
+
// ===== 对外方法(S2-4) =====
|
|
1264
|
+
update(config) {
|
|
1265
|
+
this.instance?.update(config);
|
|
1266
|
+
}
|
|
1267
|
+
destroy() {
|
|
1268
|
+
this.initToken++;
|
|
1269
|
+
this.ready = false;
|
|
1270
|
+
this.instance?.destroy();
|
|
1271
|
+
this.instance = null;
|
|
1272
|
+
}
|
|
1273
|
+
getInstance() {
|
|
1274
|
+
return this.instance;
|
|
1275
|
+
}
|
|
1276
|
+
};
|
|
1277
|
+
function register() {
|
|
1278
|
+
if (typeof customElements === "undefined") return;
|
|
1279
|
+
if (!customElements.get("footprint-globe")) {
|
|
1280
|
+
customElements.define("footprint-globe", FootprintGlobeElement);
|
|
1281
|
+
}
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
// src/web/auto-init.ts
|
|
1285
|
+
var BOUND_ATTR = "data-fp-bound";
|
|
1286
|
+
var SELECTOR = ".footprint-globe";
|
|
1287
|
+
function isCustomElement(el) {
|
|
1288
|
+
return el.tagName.toLowerCase() === "footprint-globe";
|
|
1289
|
+
}
|
|
1290
|
+
function renderError(container, msg) {
|
|
1291
|
+
container.innerHTML = "";
|
|
1292
|
+
const div = document.createElement("div");
|
|
1293
|
+
div.className = "footprint-error";
|
|
1294
|
+
div.textContent = msg;
|
|
1295
|
+
container.appendChild(div);
|
|
1296
|
+
}
|
|
1297
|
+
async function initOne(el) {
|
|
1298
|
+
if (el.hasAttribute(BOUND_ATTR)) return;
|
|
1299
|
+
el.setAttribute(BOUND_ATTR, "1");
|
|
1300
|
+
if (isCustomElement(el)) return;
|
|
1301
|
+
try {
|
|
1302
|
+
const attrs = parseAttributes(el);
|
|
1303
|
+
let baseConfig;
|
|
1304
|
+
if (attrs.id || attrs.src || attrs.pins) {
|
|
1305
|
+
const r = await loadData({
|
|
1306
|
+
id: attrs.id,
|
|
1307
|
+
src: attrs.src,
|
|
1308
|
+
data: attrs.pins
|
|
1309
|
+
});
|
|
1310
|
+
baseConfig = r.config;
|
|
1311
|
+
} else {
|
|
1312
|
+
const g = globalThis.FOOTPRINT_PINS;
|
|
1313
|
+
if (!g) {
|
|
1314
|
+
renderError(el, "\u672A\u63D0\u4F9B\u6570\u636E\u6E90\uFF1A\u8BF7\u8BBE\u7F6E data-pins\u3001data-src \u6216 window.FOOTPRINT_PINS");
|
|
1315
|
+
return;
|
|
1316
|
+
}
|
|
1317
|
+
const r = await loadData({ globalVar: "FOOTPRINT_PINS" });
|
|
1318
|
+
baseConfig = r.config;
|
|
1319
|
+
}
|
|
1320
|
+
const config = mergeAttributeConfig(baseConfig, attrs);
|
|
1321
|
+
const errs = validateConfig(config);
|
|
1322
|
+
if (errs.length > 0) {
|
|
1323
|
+
renderError(el, errs[0].userMessage);
|
|
1324
|
+
return;
|
|
1325
|
+
}
|
|
1326
|
+
if (attrs.height) {
|
|
1327
|
+
el.style.setProperty("--fp-globe-height", attrs.height);
|
|
1328
|
+
}
|
|
1329
|
+
new FootprintGlobe(el, {
|
|
1330
|
+
config,
|
|
1331
|
+
maplibreUrl: attrs.maplibreUrl
|
|
1332
|
+
});
|
|
1333
|
+
} catch (e) {
|
|
1334
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
1335
|
+
renderError(el, msg);
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1338
|
+
function autoInit(root = document) {
|
|
1339
|
+
const nodes = root.querySelectorAll(SELECTOR);
|
|
1340
|
+
nodes.forEach((el) => void initOne(el));
|
|
1341
|
+
}
|
|
1342
|
+
function boot() {
|
|
1343
|
+
register();
|
|
1344
|
+
if (typeof document === "undefined") return;
|
|
1345
|
+
if (document.readyState === "loading") {
|
|
1346
|
+
document.addEventListener("DOMContentLoaded", () => autoInit(), { once: true });
|
|
1347
|
+
} else {
|
|
1348
|
+
autoInit();
|
|
1349
|
+
}
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
// src/web/auto-entry.ts
|
|
1353
|
+
boot();
|
|
1354
|
+
//# sourceMappingURL=auto.cjs.map
|
|
1355
|
+
//# sourceMappingURL=auto.cjs.map
|