@maptiler/sdk 3.1.0-rc1 → 3.1.0-rc3

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.
Files changed (33) hide show
  1. package/.husky/pre-commit +2 -1
  2. package/README.md +118 -0
  3. package/dist/maptiler-sdk.mjs +1054 -1034
  4. package/dist/maptiler-sdk.mjs.map +1 -1
  5. package/dist/src/Map.d.ts +3 -1
  6. package/dist/src/config.d.ts +1 -1
  7. package/dist/src/{MaptilerGeolocateControl.d.ts → controls/MaptilerGeolocateControl.d.ts} +1 -1
  8. package/dist/src/{MaptilerLogoControl.d.ts → controls/MaptilerLogoControl.d.ts} +2 -2
  9. package/dist/src/{MaptilerNavigationControl.d.ts → controls/MaptilerNavigationControl.d.ts} +1 -1
  10. package/dist/src/{MaptilerProjectionControl.d.ts → controls/MaptilerProjectionControl.d.ts} +1 -1
  11. package/dist/src/{MaptilerTerrainControl.d.ts → controls/MaptilerTerrainControl.d.ts} +1 -1
  12. package/dist/src/{Minimap.d.ts → controls/Minimap.d.ts} +1 -1
  13. package/dist/src/controls/index.d.ts +6 -0
  14. package/dist/src/custom-layers/extractCustomLayerStyle.d.ts +1 -2
  15. package/dist/src/helpers/stylehelper.d.ts +1 -1
  16. package/dist/src/helpers/vectorlayerhelpers.d.ts +1 -1
  17. package/dist/src/index.d.ts +7 -10
  18. package/dist/src/tools.d.ts +0 -2
  19. package/dist/src/utils/dom.d.ts +2 -0
  20. package/dist/src/utils/index.d.ts +1 -0
  21. package/dist/vite.config-test.d.ts +2 -0
  22. package/dist/vitest-setup-tests.d.ts +1 -0
  23. package/eslint.config.mjs +1 -1
  24. package/package.json +9 -5
  25. package/tsconfig.json +4 -1
  26. package/vite.config-dev.ts +4 -0
  27. package/vite.config-es.ts +4 -0
  28. package/vite.config-test.ts +7 -0
  29. package/vite.config-umd.ts +4 -0
  30. package/vitest-setup-tests.ts +4 -0
  31. /package/dist/src/{colorramp.d.ts → ColorRamp.d.ts} +0 -0
  32. /package/dist/src/{defaults.d.ts → constants/defaults.d.ts} +0 -0
  33. /package/dist/src/{unit.d.ts → types.d.ts} +0 -0
@@ -1,35 +1,17 @@
1
- var so = Object.defineProperty;
2
- var Vr = (r) => {
1
+ var io = Object.defineProperty;
2
+ var Kr = (r) => {
3
3
  throw TypeError(r);
4
4
  };
5
- var lo = (r, e, t) => e in r ? so(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
6
- var x = (r, e, t) => lo(r, typeof e != "symbol" ? e + "" : e, t), Bt = (r, e, t) => e.has(r) || Vr("Cannot " + t);
7
- var I = (r, e, t) => (Bt(r, e, "read from private field"), t ? t.call(r) : e.get(r)), ge = (r, e, t) => e.has(r) ? Vr("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), Ce = (r, e, t, n) => (Bt(r, e, "write to private field"), n ? n.call(r, t) : e.set(r, t), t), H = (r, e, t) => (Bt(r, e, "access private method"), t);
8
- import k from "maplibre-gl";
9
- import { Language as uo, getLanguageInfoFromCode as Hr, config as qt, MapStyle as Ke, mapStylePresetList as Gt, expandMapStyle as co, MapStyleVariant as po, ReferenceMapStyle as fo, toLanguageInfo as Kr, getLanguageInfoFromFlag as ho, geolocation as Xr } from "@maptiler/client";
10
- import { MapStyle as ip, MapStyleVariant as sp, ReferenceMapStyle as lp, ServiceError as up, areSameLanguages as cp, bufferToPixelDataBrowser as pp, circumferenceAtLatitude as fp, coordinates as dp, data as hp, elevation as yp, expandMapStyle as mp, geocoding as gp, geolocation as vp, getAutoLanguage as bp, getBufferToPixelDataParser as wp, getLanguageInfoFromCode as xp, getLanguageInfoFromFlag as Sp, getLanguageInfoFromKey as kp, getTileCache as Cp, isLanguageInfo as Lp, mapStylePresetList as Ep, math as Tp, misc as Ap, staticMaps as _p, styleToStyle as Mp, toLanguageInfo as Ip } from "@maptiler/client";
11
- import yo from "events";
12
- import { v4 as mo } from "uuid";
13
- import { Base64 as go } from "js-base64";
14
- const vo = "@maptiler/sdk", bo = "3.1.0rc1", wo = "The Javascript & TypeScript map SDK tailored for MapTiler Cloud", xo = "MapTiler", So = "dist/maptiler-sdk.mjs", ko = "dist/maptiler-sdk.d.ts", Co = "dist/maptiler-sdk.css", Lo = "module", Eo = { ".": { import: "./dist/maptiler-sdk.mjs", types: "./dist/maptiler-sdk.d.ts" }, "./dist/maptiler-sdk.css": { import: "./dist/maptiler-sdk.css" }, "./style.css": { import: "./dist/maptiler-sdk.css" } }, To = ["maptiler", "map", "sdk", "webmap", "cloud", "webGL", "maplibre"], Ao = "https://docs.maptiler.com/sdk-js/", _o = "BSD-3-Clause", Mo = { type: "git", url: "https://github.com/maptiler/maptiler-sdk-js.git" }, Io = { prepare: "husky", doc: "rm -rf docs/* && typedoc --out docs && cp -r images docs/", ncu: "npx npm-check-updates", lint: "npx eslint src", "lint:fix": "npx eslint src --fix", test: "vitest run -c vite.config-test.ts", "install:clean": "rm -rf build/ dist/ node_modules/ && npm ci", dev: 'concurrently "vite -c vite.config-dev.ts" "npm run dev-umd"', "dev-umd": "npm run build-css && tsc && NODE_ENV=development vite build -w -c vite.config-umd.ts", "build-css": "mkdir -p dist build && node scripts/replace-path-with-content.js src/style/style_template.css dist/tmp_maptiler-sdk.css && cat node_modules/maplibre-gl/dist/maplibre-gl.css dist/tmp_maptiler-sdk.css > dist/maptiler-sdk.css && rm dist/tmp_maptiler-sdk.css && cp dist/maptiler-sdk.css build/maptiler-sdk.css", "build-umd": "tsc && NODE_ENV=production vite build -c vite.config-umd.ts", "build-es": "tsc && NODE_ENV=production vite build -c vite.config-es.ts", build: "npm run build-es; npm run build-umd; npm run build-css", make: "npm run install:clean && npm run build" }, Po = { "@eslint/js": "^9.21.0", "@types/color-convert": "^2.0.4", "@types/color-name": "^2.0.0", "@types/uuid": "^10.0.0", "@types/xmldom": "^0.1.31", "@xmldom/xmldom": "^0.8.10", concurrently: "^9.1.2", eslint: "^9.21.0", "eslint-config-prettier": "^10.0.2", "eslint-plugin-prettier": "^5.2.3", husky: "^8.0.0", "lint-staged": "^15.4.3", prettier: "3.5.2", typedoc: "^0.27.6", typescript: "^5.7.3", "typescript-eslint": "^8.25.0", vite: "^6.0.7", "vite-plugin-dts": "^4.5.0", vitest: "^2.1.8" }, Ro = { "@maplibre/maplibre-gl-style-spec": "^23.0.0", "@maptiler/client": "^2.2.0", events: "^3.3.0", "gl-matrix": "^3.4.3", "js-base64": "^3.7.7", "maplibre-gl": "^5.0.1", uuid: "^11.0.5" }, Yn = {
15
- name: vo,
16
- version: bo,
17
- description: wo,
18
- author: xo,
19
- module: So,
20
- types: ko,
21
- style: Co,
22
- type: Lo,
23
- exports: Eo,
24
- keywords: To,
25
- homepage: Ao,
26
- license: _o,
27
- repository: Mo,
28
- scripts: Io,
29
- "lint-staged": { "*.ts": "npm run lint:fix" },
30
- devDependencies: Po,
31
- dependencies: Ro
32
- }, P = {
5
+ var so = (r, e, t) => e in r ? io(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
6
+ var x = (r, e, t) => so(r, typeof e != "symbol" ? e + "" : e, t), Bt = (r, e, t) => e.has(r) || Kr("Cannot " + t);
7
+ var I = (r, e, t) => (Bt(r, e, "read from private field"), t ? t.call(r) : e.get(r)), ge = (r, e, t) => e.has(r) ? Kr("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), Ce = (r, e, t, n) => (Bt(r, e, "write to private field"), n ? n.call(r, t) : e.set(r, t), t), H = (r, e, t) => (Bt(r, e, "access private method"), t);
8
+ import k, { addProtocol as Xr } from "maplibre-gl";
9
+ import { Language as lo, getLanguageInfoFromCode as Zr, config as qt, MapStyle as Ke, mapStylePresetList as Gt, expandMapStyle as uo, MapStyleVariant as co, ReferenceMapStyle as po, toLanguageInfo as Wr, getLanguageInfoFromFlag as fo, geolocation as Yr } from "@maptiler/client";
10
+ import { MapStyle as sp, MapStyleVariant as lp, ReferenceMapStyle as up, ServiceError as cp, areSameLanguages as pp, bufferToPixelDataBrowser as fp, circumferenceAtLatitude as dp, coordinates as hp, data as yp, elevation as mp, expandMapStyle as gp, geocoding as vp, geolocation as bp, getAutoLanguage as wp, getBufferToPixelDataParser as xp, getLanguageInfoFromCode as Sp, getLanguageInfoFromFlag as kp, getLanguageInfoFromKey as Cp, getTileCache as Lp, isLanguageInfo as Ep, mapStylePresetList as Tp, math as Ap, misc as _p, staticMaps as Mp, styleToStyle as Ip, toLanguageInfo as Pp } from "@maptiler/client";
11
+ import ho from "events";
12
+ import { v4 as yo } from "uuid";
13
+ import { Base64 as mo } from "js-base64";
14
+ const P = {
33
15
  /**
34
16
  * Language mode to display labels in both the local language and the language of the visitor's device, concatenated.
35
17
  * Note that if those two languages are the same, labels won't be duplicated.
@@ -76,14 +58,14 @@ const vo = "@maptiler/sdk", bo = "3.1.0rc1", wo = "The Javascript & TypeScript m
76
58
  isMode: !0,
77
59
  geocoding: !1
78
60
  },
79
- ...uo
61
+ ...lo
80
62
  };
81
- function Zr() {
63
+ function Jr() {
82
64
  if (typeof navigator > "u") {
83
- const e = Intl.DateTimeFormat().resolvedOptions().locale.split("-")[0], t = Hr(e);
65
+ const e = Intl.DateTimeFormat().resolvedOptions().locale.split("-")[0], t = Zr(e);
84
66
  return t || P.ENGLISH;
85
67
  }
86
- return Array.from(new Set(navigator.languages.map((e) => e.split("-")[0]))).map((e) => Hr(e)).filter((e) => e)[0] ?? P.LOCAL;
68
+ return Array.from(new Set(navigator.languages.map((e) => e.split("-")[0]))).map((e) => Zr(e)).filter((e) => e)[0] ?? P.LOCAL;
87
69
  }
88
70
  const V = {
89
71
  maptilerLogoURL: "https://api.maptiler.com/resources/logo.svg",
@@ -97,8 +79,8 @@ const V = {
97
79
  terrainSourceId: "maptiler-terrain"
98
80
  };
99
81
  Object.freeze(V);
100
- const gr = mo();
101
- class zo extends yo {
82
+ const br = yo();
83
+ class go extends ho {
102
84
  constructor() {
103
85
  super(...arguments);
104
86
  /**
@@ -188,32 +170,32 @@ class zo extends yo {
188
170
  return qt.fetch;
189
171
  }
190
172
  }
191
- const N = new zo(), { addProtocol: Wr } = k, ir = "localcache_source", sr = "localcache", $o = "maptiler_sdk", Fo = 1e3, Oo = 100, lr = typeof caches < "u";
192
- function jo(r, e) {
193
- if (lr && N.caching && N.session && r.host === V.maptilerApiHost) {
173
+ const N = new go(), lr = "localcache_source", ur = "localcache", vo = "maptiler_sdk", bo = 1e3, wo = 100, cr = typeof caches < "u";
174
+ function xo(r, e) {
175
+ if (cr && N.caching && N.session && r.host === V.maptilerApiHost) {
194
176
  if (e === "Source" && r.href.includes("tiles.json"))
195
- return r.href.replace("https://", `${ir}://`);
177
+ return r.href.replace("https://", `${lr}://`);
196
178
  if (e === "Tile" || e === "Glyphs")
197
- return r.href.replace("https://", `${sr}://`);
179
+ return r.href.replace("https://", `${ur}://`);
198
180
  }
199
181
  return r.href;
200
182
  }
201
183
  let Vt;
202
- async function Jn() {
203
- return Vt || (Vt = await caches.open($o)), Vt;
184
+ async function Yn() {
185
+ return Vt || (Vt = await caches.open(vo)), Vt;
204
186
  }
205
- let Yr = 0;
206
- async function No() {
207
- const r = await Jn(), e = await r.keys(), t = e.slice(0, Math.max(e.length - Fo, 0));
187
+ let Qr = 0;
188
+ async function So() {
189
+ const r = await Yn(), e = await r.keys(), t = e.slice(0, Math.max(e.length - bo, 0));
208
190
  for (const n of t)
209
191
  r.delete(n);
210
192
  }
211
- function Uo() {
212
- Wr(
213
- ir,
193
+ function ko() {
194
+ Xr(
195
+ lr,
214
196
  async (r, e) => {
215
197
  if (!r.url) throw new Error("");
216
- r.url = r.url.replace(`${ir}://`, "https://");
198
+ r.url = r.url.replace(`${lr}://`, "https://");
217
199
  const t = r;
218
200
  t.signal = e.signal;
219
201
  const n = await fetch(r.url, t), a = await n.json();
@@ -223,9 +205,9 @@ function Uo() {
223
205
  expires: n.headers.get("Expires")
224
206
  };
225
207
  }
226
- ), Wr(sr, async (r, e) => {
208
+ ), Xr(ur, async (r, e) => {
227
209
  if (!r.url) throw new Error("");
228
- r.url = r.url.replace(`${sr}://`, "https://");
210
+ r.url = r.url.replace(`${ur}://`, "https://");
229
211
  const t = new URL(r.url), n = new URL(t);
230
212
  n.searchParams.delete("mtsid"), n.searchParams.delete("key");
231
213
  const a = n.toString(), o = new URL(t);
@@ -234,17 +216,17 @@ function Uo() {
234
216
  data: await f.arrayBuffer(),
235
217
  cacheControl: f.headers.get("Cache-Control"),
236
218
  expires: f.headers.get("Expires")
237
- }), l = await Jn(), u = await l.match(a);
219
+ }), l = await Yn(), u = await l.match(a);
238
220
  if (u)
239
221
  return s(u);
240
222
  const c = r;
241
223
  c.signal = e.signal;
242
224
  const p = await fetch(i, c);
243
225
  return p.status >= 200 && p.status < 300 && (l.put(a, p.clone()).catch(() => {
244
- }), ++Yr > Oo && (No(), Yr = 0)), s(p);
226
+ }), ++Qr > wo && (So(), Qr = 0)), s(p);
245
227
  });
246
228
  }
247
- function Do() {
229
+ function Co() {
248
230
  if (typeof window > "u") return;
249
231
  const r = k.getRTLTextPluginStatus();
250
232
  if (r === "unavailable" || r === "requested")
@@ -253,18 +235,11 @@ function Do() {
253
235
  } catch {
254
236
  }
255
237
  }
256
- function Bo(r, e) {
238
+ function Lo(r, e) {
257
239
  for (const t of r)
258
240
  typeof e[t] == "function" && (e[t] = e[t].bind(e));
259
241
  }
260
- function he(r, e, t) {
261
- const n = window.document.createElement(r);
262
- return e !== void 0 && (n.className = e), t && t.appendChild(n), n;
263
- }
264
- function vr(r) {
265
- r.parentNode && r.parentNode.removeChild(r);
266
- }
267
- function Jr(r, e) {
242
+ function en(r, e) {
268
243
  let t = null;
269
244
  try {
270
245
  t = new URL(r);
@@ -273,40 +248,40 @@ function Jr(r, e) {
273
248
  url: r
274
249
  };
275
250
  }
276
- return t.host === V.maptilerApiHost && (t.searchParams.has("key") || t.searchParams.append("key", N.apiKey), N.session && t.searchParams.append("mtsid", gr)), {
277
- url: jo(t, e)
251
+ return t.host === V.maptilerApiHost && (t.searchParams.has("key") || t.searchParams.append("key", N.apiKey), N.session && t.searchParams.append("mtsid", br)), {
252
+ url: xo(t, e)
278
253
  };
279
254
  }
280
- function Qr(r) {
255
+ function tn(r) {
281
256
  return (e, t) => {
282
257
  if (r != null) {
283
- const n = r(e, t), a = Jr((n == null ? void 0 : n.url) ?? "", t);
258
+ const n = r(e, t), a = en((n == null ? void 0 : n.url) ?? "", t);
284
259
  return {
285
260
  ...n,
286
261
  ...a
287
262
  };
288
263
  }
289
- return Jr(e, t);
264
+ return en(e, t);
290
265
  };
291
266
  }
292
- function Qn() {
267
+ function Jn() {
293
268
  return Math.random().toString(36).substring(2);
294
269
  }
295
270
  function Lt(r) {
296
271
  return /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/gi.test(r);
297
272
  }
298
- function qo(r) {
273
+ function Eo(r) {
299
274
  try {
300
275
  return JSON.parse(r);
301
276
  } catch {
302
277
  }
303
278
  return null;
304
279
  }
305
- function Go() {
280
+ function To() {
306
281
  return document.createElement("canvas").getContext("webgl2") ? null : typeof WebGL2RenderingContext < "u" ? "Graphic rendering with WebGL2 has been disabled or is not supported by your graphic card. The map cannot be displayed." : "Your browser does not support graphic rendering with WebGL2. The map cannot be displayed.";
307
282
  }
308
- function Vo(r) {
309
- const e = Go();
283
+ function Ao(r) {
284
+ const e = To();
310
285
  if (!e) return;
311
286
  let t = null;
312
287
  if (typeof r == "string" ? t = document.getElementById(r) : r instanceof HTMLElement && (t = r), !t)
@@ -314,33 +289,33 @@ function Vo(r) {
314
289
  const n = document.createElement("div");
315
290
  throw n.innerHTML = e, n.classList.add("webgl-warning-div"), t.appendChild(n), new Error(e);
316
291
  }
317
- function Pu(r) {
292
+ function Ru(r) {
318
293
  const e = "The WebGL context was lost.", t = r.getContainer(), n = document.createElement("div");
319
294
  n.innerHTML = e, n.classList.add("webgl-warning-div"), t.appendChild(n);
320
295
  }
321
- function en(r, e) {
296
+ function rn(r, e) {
322
297
  return !(!Array.isArray(r) || r.length !== 2 || r[0] !== "get" || typeof r[1] != "string" || e && !r[1].startsWith("name:") || !e && r[1] !== "name");
323
298
  }
324
- function Ho(r, e, t) {
299
+ function _o(r, e, t) {
325
300
  const n = structuredClone(r), a = (o) => {
326
301
  if (typeof o != "string")
327
302
  for (let i = 0; i < o.length; i += 1)
328
- en(o[i], t) ? o[i] = structuredClone(e) : a(o[i]);
303
+ rn(o[i], t) ? o[i] = structuredClone(e) : a(o[i]);
329
304
  };
330
- return en(n, t) ? e : (a(n), n);
305
+ return rn(n, t) ? e : (a(n), n);
331
306
  }
332
- function Ko(r, e) {
307
+ function Mo(r, e) {
333
308
  const t = e ? /\{name:\S+\}/ : /\{name\}/;
334
309
  return {
335
310
  contains: t.test(r),
336
311
  exactMatch: new RegExp(`^${t.source}$`).test(r)
337
312
  };
338
313
  }
339
- function Xo(r, e, t) {
314
+ function Io(r, e, t) {
340
315
  const n = t ? /\{name:\S+\}/ : /\{name\}/, a = r.split(n);
341
316
  return ["concat", ...a.flatMap((s, l) => l === a.length - 1 ? [s] : [s, e])];
342
317
  }
343
- function Zo(r) {
318
+ function Po(r) {
344
319
  var n;
345
320
  const e = /\{name(?:\:(?<language>\S+))?\}/g, t = [];
346
321
  for (; ; ) {
@@ -351,7 +326,7 @@ function Zo(r) {
351
326
  }
352
327
  return t;
353
328
  }
354
- function Wo(r) {
329
+ function Ro(r) {
355
330
  return !Array.isArray(r) || r.length !== 2 || r[0] !== "get" || typeof r[1] != "string" ? null : r[1].trim() === "name" ? {
356
331
  isLanguage: !0,
357
332
  localization: null
@@ -360,17 +335,17 @@ function Wo(r) {
360
335
  localization: r[1].trim().split(":").pop()
361
336
  } : null;
362
337
  }
363
- function Yo(r) {
338
+ function zo(r) {
364
339
  const e = [], t = structuredClone(r), n = (a) => {
365
340
  if (typeof a != "string")
366
341
  for (let o = 0; o < a.length; o += 1) {
367
- const i = Wo(a[o]);
342
+ const i = Ro(a[o]);
368
343
  i ? e.push(i.localization) : n(a[o]);
369
344
  }
370
345
  };
371
346
  return n([t]), e;
372
347
  }
373
- function Jo(r, e) {
348
+ function $o(r, e) {
374
349
  const t = [];
375
350
  for (const o of r) {
376
351
  if (o.type !== "symbol")
@@ -381,10 +356,10 @@ function Jo(r, e) {
381
356
  const u = e.getLayoutProperty(s, "text-field");
382
357
  if (u)
383
358
  if (typeof u == "string") {
384
- const c = Zo(u);
359
+ const c = Po(u);
385
360
  t.push(c);
386
361
  } else {
387
- const c = Yo(u);
362
+ const c = zo(u);
388
363
  t.push(c);
389
364
  }
390
365
  }
@@ -396,132 +371,132 @@ function Jo(r, e) {
396
371
  o === null ? a.unlocalized += 1 : (o in a.localized || (a.localized[o] = 0), a.localized[o] += 1);
397
372
  return a;
398
373
  }
399
- let Ru = class extends k.Marker {
374
+ let zu = class extends k.Marker {
400
375
  addTo(e) {
401
376
  return super.addTo(e);
402
377
  }
403
378
  };
404
- class $u extends k.Popup {
379
+ class Fu extends k.Popup {
405
380
  addTo(e) {
406
381
  return super.addTo(e);
407
382
  }
408
383
  }
409
- class Fu extends k.Style {
384
+ class Ou extends k.Style {
410
385
  constructor(e, t = {}) {
411
386
  super(e, t);
412
387
  }
413
388
  }
414
- class Ou extends k.CanvasSource {
389
+ class ju extends k.CanvasSource {
415
390
  onAdd(e) {
416
391
  super.onAdd(e);
417
392
  }
418
393
  }
419
- class ju extends k.GeoJSONSource {
394
+ class Nu extends k.GeoJSONSource {
420
395
  onAdd(e) {
421
396
  super.onAdd(e);
422
397
  }
423
398
  }
424
- class Nu extends k.ImageSource {
399
+ class Uu extends k.ImageSource {
425
400
  onAdd(e) {
426
401
  super.onAdd(e);
427
402
  }
428
403
  }
429
- class Uu extends k.RasterTileSource {
404
+ class Du extends k.RasterTileSource {
430
405
  onAdd(e) {
431
406
  super.onAdd(e);
432
407
  }
433
408
  }
434
- class Du extends k.RasterDEMTileSource {
409
+ class Bu extends k.RasterDEMTileSource {
435
410
  onAdd(e) {
436
411
  super.onAdd(e);
437
412
  }
438
413
  }
439
- class Bu extends k.VectorTileSource {
414
+ class qu extends k.VectorTileSource {
440
415
  onAdd(e) {
441
416
  super.onAdd(e);
442
417
  }
443
418
  }
444
- class qu extends k.VideoSource {
419
+ class Gu extends k.VideoSource {
445
420
  onAdd(e) {
446
421
  super.onAdd(e);
447
422
  }
448
423
  }
449
- class Qo extends k.NavigationControl {
424
+ class Fo extends k.NavigationControl {
450
425
  onAdd(e) {
451
426
  return super.onAdd(e);
452
427
  }
453
428
  }
454
- class ei extends k.GeolocateControl {
429
+ class Oo extends k.GeolocateControl {
455
430
  onAdd(e) {
456
431
  return super.onAdd(e);
457
432
  }
458
433
  }
459
- class Gu extends k.AttributionControl {
434
+ class Vu extends k.AttributionControl {
460
435
  onAdd(e) {
461
436
  return super.onAdd(e);
462
437
  }
463
438
  }
464
- class ti extends k.LogoControl {
439
+ class jo extends k.LogoControl {
465
440
  onAdd(e) {
466
441
  return super.onAdd(e);
467
442
  }
468
443
  }
469
- class ri extends k.ScaleControl {
444
+ class No extends k.ScaleControl {
470
445
  onAdd(e) {
471
446
  return super.onAdd(e);
472
447
  }
473
448
  }
474
- class ni extends k.FullscreenControl {
449
+ class Uo extends k.FullscreenControl {
475
450
  onAdd(e) {
476
451
  return super.onAdd(e);
477
452
  }
478
453
  }
479
- class Vu extends k.TerrainControl {
454
+ class Hu extends k.TerrainControl {
480
455
  onAdd(e) {
481
456
  return super.onAdd(e);
482
457
  }
483
458
  }
484
- class Hu extends k.BoxZoomHandler {
459
+ class Ku extends k.BoxZoomHandler {
485
460
  constructor(e, t) {
486
461
  super(e, t);
487
462
  }
488
463
  }
489
- class Ku extends k.ScrollZoomHandler {
464
+ class Xu extends k.ScrollZoomHandler {
490
465
  constructor(e, t) {
491
466
  super(e, t);
492
467
  }
493
468
  }
494
- class Xu extends k.CooperativeGesturesHandler {
469
+ class Zu extends k.CooperativeGesturesHandler {
495
470
  constructor(e, t) {
496
471
  super(e, t);
497
472
  }
498
473
  }
499
- class Zu extends k.KeyboardHandler {
474
+ class Wu extends k.KeyboardHandler {
500
475
  constructor(e) {
501
476
  super(e);
502
477
  }
503
478
  }
504
- class Wu extends k.TwoFingersTouchPitchHandler {
479
+ class Yu extends k.TwoFingersTouchPitchHandler {
505
480
  constructor(e) {
506
481
  super(e);
507
482
  }
508
483
  }
509
- class Yu extends k.MapWheelEvent {
484
+ class Ju extends k.MapWheelEvent {
510
485
  constructor(e, t, n) {
511
486
  super(e, t, n);
512
487
  }
513
488
  }
514
- class Ju extends k.MapTouchEvent {
489
+ class Qu extends k.MapTouchEvent {
515
490
  constructor(e, t, n) {
516
491
  super(e, t, n);
517
492
  }
518
493
  }
519
- class Qu extends k.MapMouseEvent {
494
+ class ec extends k.MapMouseEvent {
520
495
  constructor(e, t, n, a = {}) {
521
496
  super(e, t, n, a);
522
497
  }
523
498
  }
524
- class tn extends ti {
499
+ class nn extends jo {
525
500
  constructor(t = {}) {
526
501
  super(t);
527
502
  x(this, "logoURL", "");
@@ -534,7 +509,7 @@ class tn extends ti {
534
509
  return n.style.backgroundRepeat = "no-repeat", n.style.cursor = "pointer", n.style.display = "block", n.style.height = "23px", n.style.margin = "0 0 -4px -4px", n.style.overflow = "hidden", n.style.width = "88px", n.style.backgroundImage = `url(${this.logoURL})`, n.style.backgroundSize = "100px 30px", n.style.width = "100px", n.style.height = "30px", n.target = "_blank", n.rel = "noopener", n.href = this.linkURL, n.setAttribute("aria-label", "MapTiler logo"), n.setAttribute("rel", "noopener"), this._container.appendChild(n), this._container.style.display = "block", this._map.on("resize", this._updateCompact), this._updateCompact(), this._container;
535
510
  }
536
511
  }
537
- var ai = 8, oi = {
512
+ var Do = 8, Bo = {
538
513
  version: {
539
514
  required: !0,
540
515
  type: "enum",
@@ -604,18 +579,18 @@ var ai = 8, oi = {
604
579
  type: "array",
605
580
  value: "layer"
606
581
  }
607
- }, ii = {
582
+ }, qo = {
608
583
  "*": {
609
584
  type: "source"
610
585
  }
611
- }, si = [
586
+ }, Go = [
612
587
  "source_vector",
613
588
  "source_raster",
614
589
  "source_raster_dem",
615
590
  "source_geojson",
616
591
  "source_video",
617
592
  "source_image"
618
- ], li = {
593
+ ], Vo = {
619
594
  type: {
620
595
  required: !0,
621
596
  type: "enum",
@@ -670,7 +645,7 @@ var ai = 8, oi = {
670
645
  "*": {
671
646
  type: "*"
672
647
  }
673
- }, ui = {
648
+ }, Ho = {
674
649
  type: {
675
650
  required: !0,
676
651
  type: "enum",
@@ -727,7 +702,7 @@ var ai = 8, oi = {
727
702
  "*": {
728
703
  type: "*"
729
704
  }
730
- }, ci = {
705
+ }, Ko = {
731
706
  type: {
732
707
  required: !0,
733
708
  type: "enum",
@@ -801,7 +776,7 @@ var ai = 8, oi = {
801
776
  "*": {
802
777
  type: "*"
803
778
  }
804
- }, pi = {
779
+ }, Xo = {
805
780
  type: {
806
781
  required: !0,
807
782
  type: "enum",
@@ -862,7 +837,7 @@ var ai = 8, oi = {
862
837
  promoteId: {
863
838
  type: "promoteId"
864
839
  }
865
- }, fi = {
840
+ }, Zo = {
866
841
  type: {
867
842
  required: !0,
868
843
  type: "enum",
@@ -885,7 +860,7 @@ var ai = 8, oi = {
885
860
  value: "number"
886
861
  }
887
862
  }
888
- }, di = {
863
+ }, Wo = {
889
864
  type: {
890
865
  required: !0,
891
866
  type: "enum",
@@ -907,7 +882,7 @@ var ai = 8, oi = {
907
882
  value: "number"
908
883
  }
909
884
  }
910
- }, hi = {
885
+ }, Yo = {
911
886
  id: {
912
887
  type: "string",
913
888
  required: !0
@@ -955,7 +930,7 @@ var ai = 8, oi = {
955
930
  paint: {
956
931
  type: "paint"
957
932
  }
958
- }, yi = [
933
+ }, Jo = [
959
934
  "layout_fill",
960
935
  "layout_line",
961
936
  "layout_circle",
@@ -965,7 +940,7 @@ var ai = 8, oi = {
965
940
  "layout_raster",
966
941
  "layout_hillshade",
967
942
  "layout_background"
968
- ], mi = {
943
+ ], Qo = {
969
944
  visibility: {
970
945
  type: "enum",
971
946
  values: {
@@ -975,7 +950,7 @@ var ai = 8, oi = {
975
950
  default: "visible",
976
951
  "property-type": "constant"
977
952
  }
978
- }, gi = {
953
+ }, ei = {
979
954
  "fill-sort-key": {
980
955
  type: "number",
981
956
  expression: {
@@ -996,7 +971,7 @@ var ai = 8, oi = {
996
971
  default: "visible",
997
972
  "property-type": "constant"
998
973
  }
999
- }, vi = {
974
+ }, ti = {
1000
975
  "circle-sort-key": {
1001
976
  type: "number",
1002
977
  expression: {
@@ -1017,7 +992,7 @@ var ai = 8, oi = {
1017
992
  default: "visible",
1018
993
  "property-type": "constant"
1019
994
  }
1020
- }, bi = {
995
+ }, ri = {
1021
996
  visibility: {
1022
997
  type: "enum",
1023
998
  values: {
@@ -1027,7 +1002,7 @@ var ai = 8, oi = {
1027
1002
  default: "visible",
1028
1003
  "property-type": "constant"
1029
1004
  }
1030
- }, wi = {
1005
+ }, ni = {
1031
1006
  "line-cap": {
1032
1007
  type: "enum",
1033
1008
  values: {
@@ -1113,7 +1088,7 @@ var ai = 8, oi = {
1113
1088
  default: "visible",
1114
1089
  "property-type": "constant"
1115
1090
  }
1116
- }, xi = {
1091
+ }, ai = {
1117
1092
  "symbol-placement": {
1118
1093
  type: "enum",
1119
1094
  values: {
@@ -1940,7 +1915,7 @@ var ai = 8, oi = {
1940
1915
  default: "visible",
1941
1916
  "property-type": "constant"
1942
1917
  }
1943
- }, Si = {
1918
+ }, oi = {
1944
1919
  visibility: {
1945
1920
  type: "enum",
1946
1921
  values: {
@@ -1950,7 +1925,7 @@ var ai = 8, oi = {
1950
1925
  default: "visible",
1951
1926
  "property-type": "constant"
1952
1927
  }
1953
- }, ki = {
1928
+ }, ii = {
1954
1929
  visibility: {
1955
1930
  type: "enum",
1956
1931
  values: {
@@ -1960,10 +1935,10 @@ var ai = 8, oi = {
1960
1935
  default: "visible",
1961
1936
  "property-type": "constant"
1962
1937
  }
1963
- }, Ci = {
1938
+ }, si = {
1964
1939
  type: "array",
1965
1940
  value: "*"
1966
- }, Li = {
1941
+ }, li = {
1967
1942
  type: "enum",
1968
1943
  values: {
1969
1944
  "==": {},
@@ -1980,14 +1955,14 @@ var ai = 8, oi = {
1980
1955
  has: {},
1981
1956
  "!has": {}
1982
1957
  }
1983
- }, Ei = {
1958
+ }, ui = {
1984
1959
  type: "enum",
1985
1960
  values: {
1986
1961
  Point: {},
1987
1962
  LineString: {},
1988
1963
  Polygon: {}
1989
1964
  }
1990
- }, Ti = {
1965
+ }, ci = {
1991
1966
  type: "array",
1992
1967
  minimum: 0,
1993
1968
  maximum: 24,
@@ -1996,11 +1971,11 @@ var ai = 8, oi = {
1996
1971
  "color"
1997
1972
  ],
1998
1973
  length: 2
1999
- }, Ai = {
1974
+ }, pi = {
2000
1975
  type: "array",
2001
1976
  value: "*",
2002
1977
  minimum: 1
2003
- }, _i = {
1978
+ }, fi = {
2004
1979
  anchor: {
2005
1980
  type: "enum",
2006
1981
  default: "viewport",
@@ -2061,7 +2036,7 @@ var ai = 8, oi = {
2061
2036
  },
2062
2037
  transition: !0
2063
2038
  }
2064
- }, Mi = {
2039
+ }, di = {
2065
2040
  "sky-color": {
2066
2041
  type: "color",
2067
2042
  "property-type": "data-constant",
@@ -2154,7 +2129,7 @@ var ai = 8, oi = {
2154
2129
  },
2155
2130
  transition: !0
2156
2131
  }
2157
- }, Ii = {
2132
+ }, hi = {
2158
2133
  source: {
2159
2134
  type: "string",
2160
2135
  required: !0
@@ -2164,7 +2139,7 @@ var ai = 8, oi = {
2164
2139
  minimum: 0,
2165
2140
  default: 1
2166
2141
  }
2167
- }, Pi = {
2142
+ }, yi = {
2168
2143
  type: {
2169
2144
  type: "projectionDefinition",
2170
2145
  default: "mercator",
@@ -2177,7 +2152,7 @@ var ai = 8, oi = {
2177
2152
  ]
2178
2153
  }
2179
2154
  }
2180
- }, Ri = [
2155
+ }, mi = [
2181
2156
  "paint_fill",
2182
2157
  "paint_line",
2183
2158
  "paint_circle",
@@ -2187,7 +2162,7 @@ var ai = 8, oi = {
2187
2162
  "paint_raster",
2188
2163
  "paint_hillshade",
2189
2164
  "paint_background"
2190
- ], zi = {
2165
+ ], gi = {
2191
2166
  "fill-antialias": {
2192
2167
  type: "boolean",
2193
2168
  default: !0,
@@ -2303,7 +2278,7 @@ var ai = 8, oi = {
2303
2278
  },
2304
2279
  "property-type": "cross-faded-data-driven"
2305
2280
  }
2306
- }, $i = {
2281
+ }, vi = {
2307
2282
  "line-opacity": {
2308
2283
  type: "number",
2309
2284
  default: 1,
@@ -2494,7 +2469,7 @@ var ai = 8, oi = {
2494
2469
  },
2495
2470
  "property-type": "color-ramp"
2496
2471
  }
2497
- }, Fi = {
2472
+ }, bi = {
2498
2473
  "circle-radius": {
2499
2474
  type: "number",
2500
2475
  default: 5,
@@ -2667,7 +2642,7 @@ var ai = 8, oi = {
2667
2642
  },
2668
2643
  "property-type": "data-driven"
2669
2644
  }
2670
- }, Oi = {
2645
+ }, wi = {
2671
2646
  "heatmap-radius": {
2672
2647
  type: "number",
2673
2648
  default: 30,
@@ -2758,7 +2733,7 @@ var ai = 8, oi = {
2758
2733
  },
2759
2734
  "property-type": "data-constant"
2760
2735
  }
2761
- }, ji = {
2736
+ }, xi = {
2762
2737
  "icon-opacity": {
2763
2738
  type: "number",
2764
2739
  default: 1,
@@ -3022,7 +2997,7 @@ var ai = 8, oi = {
3022
2997
  },
3023
2998
  "property-type": "data-constant"
3024
2999
  }
3025
- }, Ni = {
3000
+ }, Si = {
3026
3001
  "raster-opacity": {
3027
3002
  type: "number",
3028
3003
  default: 1,
@@ -3136,7 +3111,7 @@ var ai = 8, oi = {
3136
3111
  },
3137
3112
  "property-type": "data-constant"
3138
3113
  }
3139
- }, Ui = {
3114
+ }, ki = {
3140
3115
  "hillshade-illumination-direction": {
3141
3116
  type: "number",
3142
3117
  default: 335,
@@ -3216,7 +3191,7 @@ var ai = 8, oi = {
3216
3191
  },
3217
3192
  "property-type": "data-constant"
3218
3193
  }
3219
- }, Di = {
3194
+ }, Ci = {
3220
3195
  "background-color": {
3221
3196
  type: "color",
3222
3197
  default: "#000000",
@@ -3259,7 +3234,7 @@ var ai = 8, oi = {
3259
3234
  },
3260
3235
  "property-type": "data-constant"
3261
3236
  }
3262
- }, Bi = {
3237
+ }, Li = {
3263
3238
  duration: {
3264
3239
  type: "number",
3265
3240
  default: 300,
@@ -3272,27 +3247,27 @@ var ai = 8, oi = {
3272
3247
  minimum: 0,
3273
3248
  units: "milliseconds"
3274
3249
  }
3275
- }, qi = {
3250
+ }, Ei = {
3276
3251
  "*": {
3277
3252
  type: "string"
3278
3253
  }
3279
- }, Gi = {
3280
- $version: ai,
3281
- $root: oi,
3282
- sources: ii,
3283
- source: si,
3284
- source_vector: li,
3285
- source_raster: ui,
3286
- source_raster_dem: ci,
3287
- source_geojson: pi,
3288
- source_video: fi,
3289
- source_image: di,
3290
- layer: hi,
3291
- layout: yi,
3292
- layout_background: mi,
3293
- layout_fill: gi,
3294
- layout_circle: vi,
3295
- layout_heatmap: bi,
3254
+ }, Ti = {
3255
+ $version: Do,
3256
+ $root: Bo,
3257
+ sources: qo,
3258
+ source: Go,
3259
+ source_vector: Vo,
3260
+ source_raster: Ho,
3261
+ source_raster_dem: Ko,
3262
+ source_geojson: Xo,
3263
+ source_video: Zo,
3264
+ source_image: Wo,
3265
+ layer: Yo,
3266
+ layout: Jo,
3267
+ layout_background: Qo,
3268
+ layout_fill: ei,
3269
+ layout_circle: ti,
3270
+ layout_heatmap: ri,
3296
3271
  "layout_fill-extrusion": {
3297
3272
  visibility: {
3298
3273
  type: "enum",
@@ -3304,13 +3279,13 @@ var ai = 8, oi = {
3304
3279
  "property-type": "constant"
3305
3280
  }
3306
3281
  },
3307
- layout_line: wi,
3308
- layout_symbol: xi,
3309
- layout_raster: Si,
3310
- layout_hillshade: ki,
3311
- filter: Ci,
3312
- filter_operator: Li,
3313
- geometry_type: Ei,
3282
+ layout_line: ni,
3283
+ layout_symbol: ai,
3284
+ layout_raster: oi,
3285
+ layout_hillshade: ii,
3286
+ filter: si,
3287
+ filter_operator: li,
3288
+ geometry_type: ui,
3314
3289
  function: {
3315
3290
  expression: {
3316
3291
  type: "expression"
@@ -3352,14 +3327,14 @@ var ai = 8, oi = {
3352
3327
  required: !1
3353
3328
  }
3354
3329
  },
3355
- function_stop: Ti,
3356
- expression: Ai,
3357
- light: _i,
3358
- sky: Mi,
3359
- terrain: Ii,
3360
- projection: Pi,
3361
- paint: Ri,
3362
- paint_fill: zi,
3330
+ function_stop: ci,
3331
+ expression: pi,
3332
+ light: fi,
3333
+ sky: di,
3334
+ terrain: hi,
3335
+ projection: yi,
3336
+ paint: mi,
3337
+ paint_fill: gi,
3363
3338
  "paint_fill-extrusion": {
3364
3339
  "fill-extrusion-opacity": {
3365
3340
  type: "number",
@@ -3490,14 +3465,14 @@ var ai = 8, oi = {
3490
3465
  "property-type": "data-constant"
3491
3466
  }
3492
3467
  },
3493
- paint_line: $i,
3494
- paint_circle: Fi,
3495
- paint_heatmap: Oi,
3496
- paint_symbol: ji,
3497
- paint_raster: Ni,
3498
- paint_hillshade: Ui,
3499
- paint_background: Di,
3500
- transition: Bi,
3468
+ paint_line: vi,
3469
+ paint_circle: bi,
3470
+ paint_heatmap: wi,
3471
+ paint_symbol: xi,
3472
+ paint_raster: Si,
3473
+ paint_hillshade: ki,
3474
+ paint_background: Ci,
3475
+ transition: Li,
3501
3476
  "property-type": {
3502
3477
  "data-driven": {
3503
3478
  type: "property-type"
@@ -3518,7 +3493,7 @@ var ai = 8, oi = {
3518
3493
  type: "property-type"
3519
3494
  }
3520
3495
  },
3521
- promoteId: qi
3496
+ promoteId: Ei
3522
3497
  };
3523
3498
  class g {
3524
3499
  constructor(e, t, n, a) {
@@ -3536,14 +3511,14 @@ class le extends Error {
3536
3511
  super(t), this.message = t, this.key = e;
3537
3512
  }
3538
3513
  }
3539
- class br {
3514
+ class wr {
3540
3515
  constructor(e, t = []) {
3541
3516
  this.parent = e, this.bindings = {};
3542
3517
  for (const [n, a] of t)
3543
3518
  this.bindings[n] = a;
3544
3519
  }
3545
3520
  concat(e) {
3546
- return new br(this, e);
3521
+ return new wr(this, e);
3547
3522
  }
3548
3523
  get(e) {
3549
3524
  if (this.bindings[e])
@@ -3556,7 +3531,7 @@ class br {
3556
3531
  return this.bindings[e] ? !0 : this.parent ? this.parent.has(e) : !1;
3557
3532
  }
3558
3533
  }
3559
- const Et = { kind: "null" }, b = { kind: "number" }, M = { kind: "string" }, A = { kind: "boolean" }, ue = { kind: "color" }, Tt = { kind: "projectionDefinition" }, Ne = { kind: "object" }, _ = { kind: "value" }, Vi = { kind: "error" }, At = { kind: "collator" }, _t = { kind: "formatted" }, Mt = { kind: "padding" }, it = { kind: "resolvedImage" }, It = { kind: "variableAnchorOffsetCollection" };
3534
+ const Et = { kind: "null" }, b = { kind: "number" }, M = { kind: "string" }, A = { kind: "boolean" }, ue = { kind: "color" }, Tt = { kind: "projectionDefinition" }, Ne = { kind: "object" }, _ = { kind: "value" }, Ai = { kind: "error" }, At = { kind: "collator" }, _t = { kind: "formatted" }, Mt = { kind: "padding" }, it = { kind: "resolvedImage" }, It = { kind: "variableAnchorOffsetCollection" };
3560
3535
  function Z(r, e) {
3561
3536
  return {
3562
3537
  kind: "array",
@@ -3571,7 +3546,7 @@ function j(r) {
3571
3546
  } else
3572
3547
  return r.kind;
3573
3548
  }
3574
- const Hi = [
3549
+ const _i = [
3575
3550
  Et,
3576
3551
  b,
3577
3552
  M,
@@ -3595,14 +3570,14 @@ function Ye(r, e) {
3595
3570
  if (r.kind === e.kind)
3596
3571
  return null;
3597
3572
  if (r.kind === "value") {
3598
- for (const t of Hi)
3573
+ for (const t of _i)
3599
3574
  if (!Ye(t, e))
3600
3575
  return null;
3601
3576
  }
3602
3577
  }
3603
3578
  return `Expected ${j(r)} but found ${j(e)} instead.`;
3604
3579
  }
3605
- function wr(r, e) {
3580
+ function xr(r, e) {
3606
3581
  return e.some((t) => t.kind === r.kind);
3607
3582
  }
3608
3583
  function Ae(r, e) {
@@ -3611,15 +3586,15 @@ function Ae(r, e) {
3611
3586
  function $e(r, e) {
3612
3587
  return r.kind === "array" && e.kind === "array" ? r.itemType.kind === e.itemType.kind && typeof r.N == "number" : r.kind === e.kind;
3613
3588
  }
3614
- const ea = 0.96422, ta = 1, ra = 0.82521, na = 4 / 29, Ue = 6 / 29, aa = 3 * Ue * Ue, Ki = Ue * Ue * Ue, Xi = Math.PI / 180, Zi = 180 / Math.PI;
3615
- function oa(r) {
3589
+ const Qn = 0.96422, ea = 1, ta = 0.82521, ra = 4 / 29, Ue = 6 / 29, na = 3 * Ue * Ue, Mi = Ue * Ue * Ue, Ii = Math.PI / 180, Pi = 180 / Math.PI;
3590
+ function aa(r) {
3616
3591
  return r = r % 360, r < 0 && (r += 360), r;
3617
3592
  }
3618
- function ia([r, e, t, n]) {
3593
+ function oa([r, e, t, n]) {
3619
3594
  r = Ht(r), e = Ht(e), t = Ht(t);
3620
3595
  let a, o;
3621
- const i = Kt((0.2225045 * r + 0.7168786 * e + 0.0606169 * t) / ta);
3622
- r === e && e === t ? a = o = i : (a = Kt((0.4360747 * r + 0.3850649 * e + 0.1430804 * t) / ea), o = Kt((0.0139322 * r + 0.0971045 * e + 0.7141733 * t) / ra));
3596
+ const i = Kt((0.2225045 * r + 0.7168786 * e + 0.0606169 * t) / ea);
3597
+ r === e && e === t ? a = o = i : (a = Kt((0.4360747 * r + 0.3850649 * e + 0.1430804 * t) / Qn), o = Kt((0.0139322 * r + 0.0971045 * e + 0.7141733 * t) / ta));
3623
3598
  const s = 116 * i - 16;
3624
3599
  return [s < 0 ? 0 : s, 500 * (a - i), 200 * (i - o), n];
3625
3600
  }
@@ -3627,11 +3602,11 @@ function Ht(r) {
3627
3602
  return r <= 0.04045 ? r / 12.92 : Math.pow((r + 0.055) / 1.055, 2.4);
3628
3603
  }
3629
3604
  function Kt(r) {
3630
- return r > Ki ? Math.pow(r, 1 / 3) : r / aa + na;
3605
+ return r > Mi ? Math.pow(r, 1 / 3) : r / na + ra;
3631
3606
  }
3632
- function sa([r, e, t, n]) {
3607
+ function ia([r, e, t, n]) {
3633
3608
  let a = (r + 16) / 116, o = isNaN(e) ? a : a + e / 500, i = isNaN(t) ? a : a - t / 200;
3634
- return a = ta * Zt(a), o = ea * Zt(o), i = ra * Zt(i), [
3609
+ return a = ea * Zt(a), o = Qn * Zt(o), i = ta * Zt(i), [
3635
3610
  Xt(3.1338561 * o - 1.6168667 * a - 0.4906146 * i),
3636
3611
  // D50 -> sRGB
3637
3612
  Xt(-0.9787684 * o + 1.9161415 * a + 0.033454 * i),
@@ -3643,27 +3618,27 @@ function Xt(r) {
3643
3618
  return r = r <= 304e-5 ? 12.92 * r : 1.055 * Math.pow(r, 1 / 2.4) - 0.055, r < 0 ? 0 : r > 1 ? 1 : r;
3644
3619
  }
3645
3620
  function Zt(r) {
3646
- return r > Ue ? r * r * r : aa * (r - na);
3621
+ return r > Ue ? r * r * r : na * (r - ra);
3647
3622
  }
3648
- function Wi(r) {
3649
- const [e, t, n, a] = ia(r), o = Math.sqrt(t * t + n * n);
3650
- return [Math.round(o * 1e4) ? oa(Math.atan2(n, t) * Zi) : NaN, o, e, a];
3623
+ function Ri(r) {
3624
+ const [e, t, n, a] = oa(r), o = Math.sqrt(t * t + n * n);
3625
+ return [Math.round(o * 1e4) ? aa(Math.atan2(n, t) * Pi) : NaN, o, e, a];
3651
3626
  }
3652
- function Yi([r, e, t, n]) {
3653
- return r = isNaN(r) ? 0 : r * Xi, sa([t, Math.cos(r) * e, Math.sin(r) * e, n]);
3627
+ function zi([r, e, t, n]) {
3628
+ return r = isNaN(r) ? 0 : r * Ii, ia([t, Math.cos(r) * e, Math.sin(r) * e, n]);
3654
3629
  }
3655
- function Ji([r, e, t, n]) {
3656
- r = oa(r), e /= 100, t /= 100;
3630
+ function $i([r, e, t, n]) {
3631
+ r = aa(r), e /= 100, t /= 100;
3657
3632
  function a(o) {
3658
3633
  const i = (o + r / 30) % 12, s = e * Math.min(t, 1 - t);
3659
3634
  return t - s * Math.max(-1, Math.min(i - 3, 9 - i, 1));
3660
3635
  }
3661
3636
  return [a(0), a(8), a(4), n];
3662
3637
  }
3663
- function Qi(r) {
3638
+ function Fi(r) {
3664
3639
  if (r = r.toLowerCase().trim(), r === "transparent")
3665
3640
  return [0, 0, 0, 0];
3666
- const e = es[r];
3641
+ const e = Oi[r];
3667
3642
  if (e) {
3668
3643
  const [a, o, i] = e;
3669
3644
  return [a / 255, o / 255, i / 255, 1];
@@ -3714,9 +3689,9 @@ function Qi(r) {
3714
3689
  Oe(+s / E, 0, 1),
3715
3690
  Oe(+c / E, 0, 1),
3716
3691
  Oe(+d / E, 0, 1),
3717
- m ? rn(+m, w) : 1
3692
+ m ? an(+m, w) : 1
3718
3693
  ];
3719
- if (nn(L))
3694
+ if (on(L))
3720
3695
  return L;
3721
3696
  }
3722
3697
  }
@@ -3750,26 +3725,26 @@ function Qi(r) {
3750
3725
  +o,
3751
3726
  Oe(+s, 0, 100),
3752
3727
  Oe(+u, 0, 100),
3753
- p ? rn(+p, f) : 1
3728
+ p ? an(+p, f) : 1
3754
3729
  ];
3755
- if (nn(h))
3756
- return Ji(h);
3730
+ if (on(h))
3731
+ return $i(h);
3757
3732
  }
3758
3733
  }
3759
3734
  }
3760
3735
  function ct(r) {
3761
3736
  return parseInt(r.padEnd(2, r), 16) / 255;
3762
3737
  }
3763
- function rn(r, e) {
3738
+ function an(r, e) {
3764
3739
  return Oe(e ? r / 100 : r, 0, 1);
3765
3740
  }
3766
3741
  function Oe(r, e, t) {
3767
3742
  return Math.min(Math.max(e, r), t);
3768
3743
  }
3769
- function nn(r) {
3744
+ function on(r) {
3770
3745
  return !r.some(Number.isNaN);
3771
3746
  }
3772
- const es = {
3747
+ const Oi = {
3773
3748
  aliceblue: [240, 248, 255],
3774
3749
  antiquewhite: [250, 235, 215],
3775
3750
  aqua: [0, 255, 255],
@@ -3954,7 +3929,7 @@ class O {
3954
3929
  return e;
3955
3930
  if (typeof e != "string")
3956
3931
  return;
3957
- const t = Qi(e);
3932
+ const t = Fi(e);
3958
3933
  if (t)
3959
3934
  return new O(...t, !1);
3960
3935
  }
@@ -3973,7 +3948,7 @@ class O {
3973
3948
  * @returns Gien color, with reversed alpha blending, in HCL color space.
3974
3949
  */
3975
3950
  get hcl() {
3976
- return this.overwriteGetter("hcl", Wi(this.rgb));
3951
+ return this.overwriteGetter("hcl", Ri(this.rgb));
3977
3952
  }
3978
3953
  /**
3979
3954
  * Used in color interpolation.
@@ -3981,7 +3956,7 @@ class O {
3981
3956
  * @returns Gien color, with reversed alpha blending, in LAB color space.
3982
3957
  */
3983
3958
  get lab() {
3984
- return this.overwriteGetter("lab", ia(this.rgb));
3959
+ return this.overwriteGetter("lab", oa(this.rgb));
3985
3960
  }
3986
3961
  /**
3987
3962
  * Lazy getter pattern. When getter is called for the first time lazy value
@@ -4034,7 +4009,7 @@ class O {
4034
4009
  let S = u - o;
4035
4010
  u > o && S > 180 ? S -= 360 : u < o && o - u > 180 && (S += 360), d = o + n * S;
4036
4011
  } else isNaN(o) ? isNaN(u) ? d = NaN : (d = u, (s === 1 || s === 0) && (h = c)) : (d = o, (p === 1 || p === 0) && (h = i));
4037
- const [y, m, w, v] = Yi([
4012
+ const [y, m, w, v] = zi([
4038
4013
  d,
4039
4014
  h ?? xe(i, c, n),
4040
4015
  xe(s, p, n),
@@ -4043,7 +4018,7 @@ class O {
4043
4018
  return new O(y, m, w, v, !1);
4044
4019
  }
4045
4020
  case "lab": {
4046
- const [o, i, s, l] = sa(Je(e.lab, t.lab, n));
4021
+ const [o, i, s, l] = ia(Je(e.lab, t.lab, n));
4047
4022
  return new O(o, i, s, l, !1);
4048
4023
  }
4049
4024
  }
@@ -4053,7 +4028,7 @@ O.black = new O(0, 0, 0, 1);
4053
4028
  O.white = new O(1, 1, 1, 1);
4054
4029
  O.transparent = new O(0, 0, 0, 0);
4055
4030
  O.red = new O(1, 0, 0, 1);
4056
- class xr {
4031
+ class Sr {
4057
4032
  constructor(e, t, n) {
4058
4033
  e ? this.sensitivity = t ? "variant" : "case" : this.sensitivity = t ? "accent" : "base", this.locale = n, this.collator = new Intl.Collator(this.locale ? this.locale : [], { sensitivity: this.sensitivity, usage: "search" });
4059
4034
  }
@@ -4064,23 +4039,23 @@ class xr {
4064
4039
  return new Intl.Collator(this.locale ? this.locale : []).resolvedOptions().locale;
4065
4040
  }
4066
4041
  }
4067
- class ur {
4042
+ class pr {
4068
4043
  constructor(e, t, n, a, o) {
4069
4044
  this.text = e, this.image = t, this.scale = n, this.fontStack = a, this.textColor = o;
4070
4045
  }
4071
4046
  }
4072
- class ye {
4047
+ class he {
4073
4048
  constructor(e) {
4074
4049
  this.sections = e;
4075
4050
  }
4076
4051
  static fromString(e) {
4077
- return new ye([new ur(e, null, null, null, null)]);
4052
+ return new he([new pr(e, null, null, null, null)]);
4078
4053
  }
4079
4054
  isEmpty() {
4080
4055
  return this.sections.length === 0 ? !0 : !this.sections.some((e) => e.text.length !== 0 || e.image && e.image.name.length !== 0);
4081
4056
  }
4082
4057
  static factory(e) {
4083
- return e instanceof ye ? e : ye.fromString(e);
4058
+ return e instanceof he ? e : he.fromString(e);
4084
4059
  }
4085
4060
  toString() {
4086
4061
  return this.sections.length === 0 ? "" : this.sections.map((e) => e.text).join("");
@@ -4133,7 +4108,7 @@ class D {
4133
4108
  return this.message;
4134
4109
  }
4135
4110
  }
4136
- const ts = /* @__PURE__ */ new Set(["center", "left", "right", "top", "bottom", "top-left", "top-right", "bottom-left", "bottom-right"]);
4111
+ const ji = /* @__PURE__ */ new Set(["center", "left", "right", "top", "bottom", "top-left", "top-right", "bottom-left", "bottom-right"]);
4137
4112
  class se {
4138
4113
  constructor(e) {
4139
4114
  this.values = e.slice();
@@ -4144,7 +4119,7 @@ class se {
4144
4119
  if (!(!Array.isArray(e) || e.length < 1 || e.length % 2 !== 0)) {
4145
4120
  for (let t = 0; t < e.length; t += 2) {
4146
4121
  const n = e[t], a = e[t + 1];
4147
- if (typeof n != "string" || !ts.has(n) || !Array.isArray(a) || a.length !== 2 || typeof a[0] != "number" || typeof a[1] != "number")
4122
+ if (typeof n != "string" || !ji.has(n) || !Array.isArray(a) || a.length !== 2 || typeof a[0] != "number" || typeof a[1] != "number")
4148
4123
  return;
4149
4124
  }
4150
4125
  return new se(e);
@@ -4197,11 +4172,11 @@ class ae {
4197
4172
  return new ae(e, e, 1);
4198
4173
  }
4199
4174
  }
4200
- function la(r, e, t, n) {
4175
+ function sa(r, e, t, n) {
4201
4176
  return typeof r == "number" && r >= 0 && r <= 255 && typeof e == "number" && e >= 0 && e <= 255 && typeof t == "number" && t >= 0 && t <= 255 ? typeof n > "u" || typeof n == "number" && n >= 0 && n <= 1 ? null : `Invalid rgba value [${[r, e, t, n].join(", ")}]: 'a' must be between 0 and 1.` : `Invalid rgba value [${(typeof n == "number" ? [r, e, t, n] : [r, e, t]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`;
4202
4177
  }
4203
4178
  function Qe(r) {
4204
- if (r === null || typeof r == "string" || typeof r == "boolean" || typeof r == "number" || r instanceof ae || r instanceof O || r instanceof xr || r instanceof ye || r instanceof Y || r instanceof se || r instanceof Se)
4179
+ if (r === null || typeof r == "string" || typeof r == "boolean" || typeof r == "number" || r instanceof ae || r instanceof O || r instanceof Sr || r instanceof he || r instanceof Y || r instanceof se || r instanceof Se)
4205
4180
  return !0;
4206
4181
  if (Array.isArray(r)) {
4207
4182
  for (const e of r)
@@ -4229,9 +4204,9 @@ function B(r) {
4229
4204
  return ue;
4230
4205
  if (r instanceof ae)
4231
4206
  return Tt;
4232
- if (r instanceof xr)
4207
+ if (r instanceof Sr)
4233
4208
  return At;
4234
- if (r instanceof ye)
4209
+ if (r instanceof he)
4235
4210
  return _t;
4236
4211
  if (r instanceof Y)
4237
4212
  return Mt;
@@ -4259,7 +4234,7 @@ function B(r) {
4259
4234
  }
4260
4235
  function Xe(r) {
4261
4236
  const e = typeof r;
4262
- return r === null ? "" : e === "string" || e === "number" || e === "boolean" ? String(r) : r instanceof O || r instanceof ae || r instanceof ye || r instanceof Y || r instanceof se || r instanceof Se ? r.toString() : JSON.stringify(r);
4237
+ return r === null ? "" : e === "string" || e === "number" || e === "boolean" ? String(r) : r instanceof O || r instanceof ae || r instanceof he || r instanceof Y || r instanceof se || r instanceof Se ? r.toString() : JSON.stringify(r);
4263
4238
  }
4264
4239
  class De {
4265
4240
  constructor(e, t) {
@@ -4346,7 +4321,7 @@ class oe {
4346
4321
  return this.args.every((e) => e.outputDefined());
4347
4322
  }
4348
4323
  }
4349
- const an = {
4324
+ const sn = {
4350
4325
  "to-boolean": A,
4351
4326
  "to-color": ue,
4352
4327
  "to-number": b,
@@ -4360,11 +4335,11 @@ class we {
4360
4335
  if (e.length < 2)
4361
4336
  return t.error("Expected at least one argument.");
4362
4337
  const n = e[0];
4363
- if (!an[n])
4338
+ if (!sn[n])
4364
4339
  throw new Error(`Can't parse ${n} as it is not part of the known types`);
4365
4340
  if ((n === "to-boolean" || n === "to-string") && e.length !== 2)
4366
4341
  return t.error("Expected one argument.");
4367
- const a = an[n], o = [];
4342
+ const a = sn[n], o = [];
4368
4343
  for (let i = 1; i < e.length; i++) {
4369
4344
  const s = t.parse(e[i], i, _);
4370
4345
  if (!s)
@@ -4386,7 +4361,7 @@ class we {
4386
4361
  const o = e.parseColor(t);
4387
4362
  if (o)
4388
4363
  return o;
4389
- } else if (Array.isArray(t) && (t.length < 3 || t.length > 4 ? n = `Invalid rgba value ${JSON.stringify(t)}: expected an array containing either three or four numeric values.` : n = la(t[0], t[1], t[2], t[3]), !n))
4364
+ } else if (Array.isArray(t) && (t.length < 3 || t.length > 4 ? n = `Invalid rgba value ${JSON.stringify(t)}: expected an array containing either three or four numeric values.` : n = sa(t[0], t[1], t[2], t[3]), !n))
4390
4365
  return new O(t[0] / 255, t[1] / 255, t[2] / 255, t[3]);
4391
4366
  }
4392
4367
  throw new D(n || `Could not parse color from value '${typeof t == "string" ? t : JSON.stringify(t)}'`);
@@ -4423,7 +4398,7 @@ class we {
4423
4398
  throw new D(`Could not convert ${JSON.stringify(t)} to number.`);
4424
4399
  }
4425
4400
  case "formatted":
4426
- return ye.fromString(Xe(this.args[0].evaluate(e)));
4401
+ return he.fromString(Xe(this.args[0].evaluate(e)));
4427
4402
  case "resolvedImage":
4428
4403
  return Se.fromString(Xe(this.args[0].evaluate(e)));
4429
4404
  case "projectionDefinition":
@@ -4439,8 +4414,8 @@ class we {
4439
4414
  return this.args.every((e) => e.outputDefined());
4440
4415
  }
4441
4416
  }
4442
- const rs = ["Unknown", "Point", "LineString", "Polygon"];
4443
- class ua {
4417
+ const Ni = ["Unknown", "Point", "LineString", "Polygon"];
4418
+ class la {
4444
4419
  constructor() {
4445
4420
  this.globals = null, this.feature = null, this.featureState = null, this.formattedSection = null, this._parseColorCache = {}, this.availableImages = null, this.canonical = null;
4446
4421
  }
@@ -4448,7 +4423,7 @@ class ua {
4448
4423
  return this.feature && "id" in this.feature ? this.feature.id : null;
4449
4424
  }
4450
4425
  geometryType() {
4451
- return this.feature ? typeof this.feature.type == "number" ? rs[this.feature.type] : this.feature.type : null;
4426
+ return this.feature ? typeof this.feature.type == "number" ? Ni[this.feature.type] : this.feature.type : null;
4452
4427
  }
4453
4428
  geometry() {
4454
4429
  return this.feature && "geometry" in this.feature ? this.feature.geometry : null;
@@ -4465,7 +4440,7 @@ class ua {
4465
4440
  }
4466
4441
  }
4467
4442
  class Pt {
4468
- constructor(e, t, n = [], a, o = new br(), i = []) {
4443
+ constructor(e, t, n = [], a, o = new wr(), i = []) {
4469
4444
  this.registry = e, this.path = n, this.key = n.map((s) => `[${s}]`).join(""), this.scope = o, this.errors = i, this.expectedType = a, this._isConstant = t;
4470
4445
  }
4471
4446
  /**
@@ -4510,7 +4485,7 @@ class Pt {
4510
4485
  return null;
4511
4486
  }
4512
4487
  if (!(i instanceof De) && i.type.kind !== "resolvedImage" && this._isConstant(i)) {
4513
- const s = new ua();
4488
+ const s = new la();
4514
4489
  try {
4515
4490
  i = new De(i.type, i.evaluate(s));
4516
4491
  } catch (l) {
@@ -4610,7 +4585,7 @@ class zt {
4610
4585
  return !1;
4611
4586
  }
4612
4587
  }
4613
- class Sr {
4588
+ class kr {
4614
4589
  constructor(e, t, n) {
4615
4590
  this.type = e, this.index = t, this.input = n;
4616
4591
  }
@@ -4621,7 +4596,7 @@ class Sr {
4621
4596
  if (!n || !a)
4622
4597
  return null;
4623
4598
  const o = a.type;
4624
- return new Sr(o.itemType, n, a);
4599
+ return new kr(o.itemType, n, a);
4625
4600
  }
4626
4601
  evaluate(e) {
4627
4602
  const t = this.index.evaluate(e), n = this.input.evaluate(e);
@@ -4640,7 +4615,7 @@ class Sr {
4640
4615
  return !1;
4641
4616
  }
4642
4617
  }
4643
- class kr {
4618
+ class Cr {
4644
4619
  constructor(e, t) {
4645
4620
  this.type = A, this.needle = e, this.haystack = t;
4646
4621
  }
@@ -4648,7 +4623,7 @@ class kr {
4648
4623
  if (e.length !== 3)
4649
4624
  return t.error(`Expected 2 arguments, but found ${e.length - 1} instead.`);
4650
4625
  const n = t.parse(e[1], 1, _), a = t.parse(e[2], 2, _);
4651
- return !n || !a ? null : wr(n.type, [A, M, b, Et, _]) ? new kr(n, a) : t.error(`Expected first argument to be of type boolean, string, number or null, but found ${j(n.type)} instead`);
4626
+ return !n || !a ? null : xr(n.type, [A, M, b, Et, _]) ? new Cr(n, a) : t.error(`Expected first argument to be of type boolean, string, number or null, but found ${j(n.type)} instead`);
4652
4627
  }
4653
4628
  evaluate(e) {
4654
4629
  const t = this.needle.evaluate(e), n = this.haystack.evaluate(e);
@@ -4677,7 +4652,7 @@ class vt {
4677
4652
  const n = t.parse(e[1], 1, _), a = t.parse(e[2], 2, _);
4678
4653
  if (!n || !a)
4679
4654
  return null;
4680
- if (!wr(n.type, [A, M, b, Et, _]))
4655
+ if (!xr(n.type, [A, M, b, Et, _]))
4681
4656
  return t.error(`Expected first argument to be of type boolean, string, number or null, but found ${j(n.type)} instead`);
4682
4657
  if (e.length === 4) {
4683
4658
  const o = t.parse(e[3], 3, b);
@@ -4706,7 +4681,7 @@ class vt {
4706
4681
  return !1;
4707
4682
  }
4708
4683
  }
4709
- class Cr {
4684
+ class Lr {
4710
4685
  constructor(e, t, n, a, o, i) {
4711
4686
  this.inputType = e, this.type = t, this.input = n, this.cases = a, this.outputs = o, this.otherwise = i;
4712
4687
  }
@@ -4749,7 +4724,7 @@ class Cr {
4749
4724
  if (!s)
4750
4725
  return null;
4751
4726
  const l = t.parse(e[e.length - 1], e.length - 1, a);
4752
- return !l || s.type.kind !== "value" && t.concat(1).checkSubtype(n, s.type) ? null : new Cr(n, a, s, o, i, l);
4727
+ return !l || s.type.kind !== "value" && t.concat(1).checkSubtype(n, s.type) ? null : new Lr(n, a, s, o, i, l);
4753
4728
  }
4754
4729
  evaluate(e) {
4755
4730
  const t = this.input.evaluate(e);
@@ -4762,7 +4737,7 @@ class Cr {
4762
4737
  return this.outputs.every((e) => e.outputDefined()) && this.otherwise.outputDefined();
4763
4738
  }
4764
4739
  }
4765
- class Lr {
4740
+ class Er {
4766
4741
  constructor(e, t, n) {
4767
4742
  this.type = e, this.branches = t, this.otherwise = n;
4768
4743
  }
@@ -4788,7 +4763,7 @@ class Lr {
4788
4763
  return null;
4789
4764
  if (!n)
4790
4765
  throw new Error("Can't infer output type");
4791
- return new Lr(n, a, o);
4766
+ return new Er(n, a, o);
4792
4767
  }
4793
4768
  evaluate(e) {
4794
4769
  for (const [t, n] of this.branches)
@@ -4815,7 +4790,7 @@ class bt {
4815
4790
  const n = t.parse(e[1], 1, _), a = t.parse(e[2], 2, b);
4816
4791
  if (!n || !a)
4817
4792
  return null;
4818
- if (!wr(n.type, [Z(_), M, _]))
4793
+ if (!xr(n.type, [Z(_), M, _]))
4819
4794
  return t.error(`Expected first argument to be of type array or string, but found ${j(n.type)} instead`);
4820
4795
  if (e.length === 4) {
4821
4796
  const o = t.parse(e[3], 3, b);
@@ -4839,7 +4814,7 @@ class bt {
4839
4814
  return !1;
4840
4815
  }
4841
4816
  }
4842
- function ca(r, e) {
4817
+ function ua(r, e) {
4843
4818
  const t = r.length - 1;
4844
4819
  let n = 0, a = t, o = 0, i, s;
4845
4820
  for (; n <= a; )
@@ -4893,7 +4868,7 @@ class $t {
4893
4868
  const o = t.length;
4894
4869
  if (a >= t[o - 1])
4895
4870
  return n[o - 1].evaluate(e);
4896
- const i = ca(t, a);
4871
+ const i = ua(t, a);
4897
4872
  return n[i].evaluate(e);
4898
4873
  }
4899
4874
  eachChild(e) {
@@ -4905,13 +4880,13 @@ class $t {
4905
4880
  return this.outputs.every((e) => e.outputDefined());
4906
4881
  }
4907
4882
  }
4908
- function ns(r) {
4883
+ function Ui(r) {
4909
4884
  return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
4910
4885
  }
4911
- var Wt, on;
4912
- function as() {
4913
- if (on) return Wt;
4914
- on = 1, Wt = r;
4886
+ var Wt, ln;
4887
+ function Di() {
4888
+ if (ln) return Wt;
4889
+ ln = 1, Wt = r;
4915
4890
  function r(e, t, n, a) {
4916
4891
  this.cx = 3 * e, this.bx = 3 * (n - e) - this.cx, this.ax = 1 - this.cx - this.bx, this.cy = 3 * t, this.by = 3 * (a - t) - this.cy, this.ay = 1 - this.cy - this.by, this.p1x = e, this.p1y = t, this.p2x = n, this.p2y = a;
4917
4892
  }
@@ -4945,7 +4920,7 @@ function as() {
4945
4920
  }
4946
4921
  }, Wt;
4947
4922
  }
4948
- var os = as(), is = /* @__PURE__ */ ns(os);
4923
+ var Bi = Di(), qi = /* @__PURE__ */ Ui(Bi);
4949
4924
  class ce {
4950
4925
  constructor(e, t, n, a, o) {
4951
4926
  this.type = e, this.operator = t, this.interpolation = n, this.input = a, this.labels = [], this.outputs = [];
@@ -4960,7 +4935,7 @@ class ce {
4960
4935
  o = Yt(t, 1, n, a);
4961
4936
  else if (e.name === "cubic-bezier") {
4962
4937
  const i = e.controlPoints;
4963
- o = new is(i[0], i[1], i[2], i[3]).solve(Yt(t, 1, n, a));
4938
+ o = new qi(i[0], i[1], i[2], i[3]).solve(Yt(t, 1, n, a));
4964
4939
  }
4965
4940
  return o;
4966
4941
  }
@@ -5020,7 +4995,7 @@ class ce {
5020
4995
  const o = t.length;
5021
4996
  if (a >= t[o - 1])
5022
4997
  return n[o - 1].evaluate(e);
5023
- const i = ca(t, a), s = t[i], l = t[i + 1], u = ce.interpolationFactor(this.interpolation, a, s, l), c = n[i].evaluate(e), p = n[i + 1].evaluate(e);
4998
+ const i = ua(t, a), s = t[i], l = t[i + 1], u = ce.interpolationFactor(this.interpolation, a, s, l), c = n[i].evaluate(e), p = n[i + 1].evaluate(e);
5024
4999
  switch (this.operator) {
5025
5000
  case "interpolate":
5026
5001
  switch (this.type.kind) {
@@ -5092,48 +5067,48 @@ class et {
5092
5067
  return this.args.every((e) => e.outputDefined());
5093
5068
  }
5094
5069
  }
5095
- function sn(r, e) {
5070
+ function un(r, e) {
5096
5071
  return r === "==" || r === "!=" ? e.kind === "boolean" || e.kind === "string" || e.kind === "number" || e.kind === "null" || e.kind === "value" : e.kind === "string" || e.kind === "number" || e.kind === "value";
5097
5072
  }
5098
- function ss(r, e, t) {
5073
+ function Gi(r, e, t) {
5099
5074
  return e === t;
5100
5075
  }
5101
- function ls(r, e, t) {
5076
+ function Vi(r, e, t) {
5102
5077
  return e !== t;
5103
5078
  }
5104
- function us(r, e, t) {
5079
+ function Hi(r, e, t) {
5105
5080
  return e < t;
5106
5081
  }
5107
- function cs(r, e, t) {
5082
+ function Ki(r, e, t) {
5108
5083
  return e > t;
5109
5084
  }
5110
- function ps(r, e, t) {
5085
+ function Xi(r, e, t) {
5111
5086
  return e <= t;
5112
5087
  }
5113
- function fs(r, e, t) {
5088
+ function Zi(r, e, t) {
5114
5089
  return e >= t;
5115
5090
  }
5116
- function pa(r, e, t, n) {
5091
+ function ca(r, e, t, n) {
5117
5092
  return n.compare(e, t) === 0;
5118
5093
  }
5119
- function ds(r, e, t, n) {
5120
- return !pa(r, e, t, n);
5094
+ function Wi(r, e, t, n) {
5095
+ return !ca(r, e, t, n);
5121
5096
  }
5122
- function hs(r, e, t, n) {
5097
+ function Yi(r, e, t, n) {
5123
5098
  return n.compare(e, t) < 0;
5124
5099
  }
5125
- function ys(r, e, t, n) {
5100
+ function Ji(r, e, t, n) {
5126
5101
  return n.compare(e, t) > 0;
5127
5102
  }
5128
- function ms(r, e, t, n) {
5103
+ function Qi(r, e, t, n) {
5129
5104
  return n.compare(e, t) <= 0;
5130
5105
  }
5131
- function gs(r, e, t, n) {
5106
+ function es(r, e, t, n) {
5132
5107
  return n.compare(e, t) >= 0;
5133
5108
  }
5134
5109
  function qe(r, e, t) {
5135
5110
  const n = r !== "==" && r !== "!=";
5136
- return class fa {
5111
+ return class pa {
5137
5112
  constructor(o, i, s) {
5138
5113
  this.type = A, this.lhs = o, this.rhs = i, this.collator = s, this.hasUntypedArgument = o.type.kind === "value" || i.type.kind === "value";
5139
5114
  }
@@ -5144,12 +5119,12 @@ function qe(r, e, t) {
5144
5119
  let l = i.parse(o[1], 1, _);
5145
5120
  if (!l)
5146
5121
  return null;
5147
- if (!sn(s, l.type))
5122
+ if (!un(s, l.type))
5148
5123
  return i.concat(1).error(`"${s}" comparisons are not supported for type '${j(l.type)}'.`);
5149
5124
  let u = i.parse(o[2], 2, _);
5150
5125
  if (!u)
5151
5126
  return null;
5152
- if (!sn(s, u.type))
5127
+ if (!un(s, u.type))
5153
5128
  return i.concat(2).error(`"${s}" comparisons are not supported for type '${j(u.type)}'.`);
5154
5129
  if (l.type.kind !== u.type.kind && l.type.kind !== "value" && u.type.kind !== "value")
5155
5130
  return i.error(`Cannot compare types '${j(l.type)}' and '${j(u.type)}'.`);
@@ -5161,7 +5136,7 @@ function qe(r, e, t) {
5161
5136
  if (c = i.parse(o[3], 3, At), !c)
5162
5137
  return null;
5163
5138
  }
5164
- return new fa(l, u, c);
5139
+ return new pa(l, u, c);
5165
5140
  }
5166
5141
  evaluate(o) {
5167
5142
  const i = this.lhs.evaluate(o), s = this.rhs.evaluate(o);
@@ -5185,7 +5160,7 @@ function qe(r, e, t) {
5185
5160
  }
5186
5161
  };
5187
5162
  }
5188
- const vs = qe("==", ss, pa), bs = qe("!=", ls, ds), ws = qe("<", us, hs), xs = qe(">", cs, ys), Ss = qe("<=", ps, ms), ks = qe(">=", fs, gs);
5163
+ const ts = qe("==", Gi, ca), rs = qe("!=", Vi, Wi), ns = qe("<", Hi, Yi), as = qe(">", Ki, Ji), os = qe("<=", Xi, Qi), is = qe(">=", Zi, es);
5189
5164
  class Ft {
5190
5165
  constructor(e, t, n) {
5191
5166
  this.type = At, this.locale = n, this.caseSensitive = e, this.diacriticSensitive = t;
@@ -5206,7 +5181,7 @@ class Ft {
5206
5181
  return n.locale && (i = t.parse(n.locale, 1, M), !i) ? null : new Ft(a, o, i);
5207
5182
  }
5208
5183
  evaluate(e) {
5209
- return new xr(this.caseSensitive.evaluate(e), this.diacriticSensitive.evaluate(e), this.locale ? this.locale.evaluate(e) : null);
5184
+ return new Sr(this.caseSensitive.evaluate(e), this.diacriticSensitive.evaluate(e), this.locale ? this.locale.evaluate(e) : null);
5210
5185
  }
5211
5186
  eachChild(e) {
5212
5187
  e(this.caseSensitive), e(this.diacriticSensitive), this.locale && e(this.locale);
@@ -5215,7 +5190,7 @@ class Ft {
5215
5190
  return !1;
5216
5191
  }
5217
5192
  }
5218
- class Er {
5193
+ class Tr {
5219
5194
  constructor(e, t, n, a, o) {
5220
5195
  this.type = M, this.number = e, this.locale = t, this.currency = n, this.minFractionDigits = a, this.maxFractionDigits = o;
5221
5196
  }
@@ -5238,7 +5213,7 @@ class Er {
5238
5213
  if (a["min-fraction-digits"] && (s = t.parse(a["min-fraction-digits"], 1, b), !s))
5239
5214
  return null;
5240
5215
  let l = null;
5241
- return a["max-fraction-digits"] && (l = t.parse(a["max-fraction-digits"], 1, b), !l) ? null : new Er(n, o, i, s, l);
5216
+ return a["max-fraction-digits"] && (l = t.parse(a["max-fraction-digits"], 1, b), !l) ? null : new Tr(n, o, i, s, l);
5242
5217
  }
5243
5218
  evaluate(e) {
5244
5219
  return new Intl.NumberFormat(this.locale ? this.locale.evaluate(e) : [], {
@@ -5255,7 +5230,7 @@ class Er {
5255
5230
  return !1;
5256
5231
  }
5257
5232
  }
5258
- class Tr {
5233
+ class Ar {
5259
5234
  constructor(e) {
5260
5235
  this.type = _t, this.sections = e;
5261
5236
  }
@@ -5292,14 +5267,14 @@ class Tr {
5292
5267
  o = !0, a.push({ content: l, scale: null, font: null, textColor: null });
5293
5268
  }
5294
5269
  }
5295
- return new Tr(a);
5270
+ return new Ar(a);
5296
5271
  }
5297
5272
  evaluate(e) {
5298
5273
  const t = (n) => {
5299
5274
  const a = n.content.evaluate(e);
5300
- return B(a) === it ? new ur("", a, null, null, null) : new ur(Xe(a), null, n.scale ? n.scale.evaluate(e) : null, n.font ? n.font.evaluate(e).join(",") : null, n.textColor ? n.textColor.evaluate(e) : null);
5275
+ return B(a) === it ? new pr("", a, null, null, null) : new pr(Xe(a), null, n.scale ? n.scale.evaluate(e) : null, n.font ? n.font.evaluate(e).join(",") : null, n.textColor ? n.textColor.evaluate(e) : null);
5301
5276
  };
5302
- return new ye(this.sections.map(t));
5277
+ return new he(this.sections.map(t));
5303
5278
  }
5304
5279
  eachChild(e) {
5305
5280
  for (const t of this.sections)
@@ -5309,7 +5284,7 @@ class Tr {
5309
5284
  return !1;
5310
5285
  }
5311
5286
  }
5312
- class Ar {
5287
+ class _r {
5313
5288
  constructor(e) {
5314
5289
  this.type = it, this.input = e;
5315
5290
  }
@@ -5317,7 +5292,7 @@ class Ar {
5317
5292
  if (e.length !== 2)
5318
5293
  return t.error("Expected two arguments.");
5319
5294
  const n = t.parse(e[1], 1, M);
5320
- return n ? new Ar(n) : t.error("No image name provided.");
5295
+ return n ? new _r(n) : t.error("No image name provided.");
5321
5296
  }
5322
5297
  evaluate(e) {
5323
5298
  const t = this.input.evaluate(e), n = Se.fromString(t);
@@ -5330,7 +5305,7 @@ class Ar {
5330
5305
  return !1;
5331
5306
  }
5332
5307
  }
5333
- class _r {
5308
+ class Mr {
5334
5309
  constructor(e) {
5335
5310
  this.type = b, this.input = e;
5336
5311
  }
@@ -5338,7 +5313,7 @@ class _r {
5338
5313
  if (e.length !== 2)
5339
5314
  return t.error(`Expected 1 argument, but found ${e.length - 1} instead.`);
5340
5315
  const n = t.parse(e[1], 1);
5341
- return n ? n.type.kind !== "array" && n.type.kind !== "string" && n.type.kind !== "value" ? t.error(`Expected argument of type string or array, but found ${j(n.type)} instead.`) : new _r(n) : null;
5316
+ return n ? n.type.kind !== "array" && n.type.kind !== "string" && n.type.kind !== "value" ? t.error(`Expected argument of type string or array, but found ${j(n.type)} instead.`) : new Mr(n) : null;
5342
5317
  }
5343
5318
  evaluate(e) {
5344
5319
  const t = this.input.evaluate(e);
@@ -5356,24 +5331,24 @@ class _r {
5356
5331
  }
5357
5332
  }
5358
5333
  const pe = 8192;
5359
- function Cs(r, e) {
5360
- const t = Ls(r[0]), n = Ts(r[1]), a = Math.pow(2, e.z);
5334
+ function ss(r, e) {
5335
+ const t = ls(r[0]), n = cs(r[1]), a = Math.pow(2, e.z);
5361
5336
  return [Math.round(t * a * pe), Math.round(n * a * pe)];
5362
5337
  }
5363
- function Mr(r, e) {
5338
+ function Ir(r, e) {
5364
5339
  const t = Math.pow(2, e.z), n = (r[0] / pe + e.x) / t, a = (r[1] / pe + e.y) / t;
5365
- return [Es(n), As(a)];
5340
+ return [us(n), ps(a)];
5366
5341
  }
5367
- function Ls(r) {
5342
+ function ls(r) {
5368
5343
  return (180 + r) / 360;
5369
5344
  }
5370
- function Es(r) {
5345
+ function us(r) {
5371
5346
  return r * 360 - 180;
5372
5347
  }
5373
- function Ts(r) {
5348
+ function cs(r) {
5374
5349
  return (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + r * Math.PI / 360))) / 360;
5375
5350
  }
5376
- function As(r) {
5351
+ function ps(r) {
5377
5352
  return 360 / Math.PI * Math.atan(Math.exp((180 - r * 360) * Math.PI / 180)) - 90;
5378
5353
  }
5379
5354
  function st(r, e) {
@@ -5382,18 +5357,18 @@ function st(r, e) {
5382
5357
  function tt(r, e) {
5383
5358
  return !(r[0] <= e[0] || r[2] >= e[2] || r[1] <= e[1] || r[3] >= e[3]);
5384
5359
  }
5385
- function _s(r, e, t) {
5360
+ function fs(r, e, t) {
5386
5361
  return e[1] > r[1] != t[1] > r[1] && r[0] < (t[0] - e[0]) * (r[1] - e[1]) / (t[1] - e[1]) + e[0];
5387
5362
  }
5388
- function Ms(r, e, t) {
5363
+ function ds(r, e, t) {
5389
5364
  const n = r[0] - e[0], a = r[1] - e[1], o = r[0] - t[0], i = r[1] - t[1];
5390
5365
  return n * i - o * a === 0 && n * o <= 0 && a * i <= 0;
5391
5366
  }
5392
5367
  function Ot(r, e, t, n) {
5393
5368
  const a = [e[0] - r[0], e[1] - r[1]], o = [n[0] - t[0], n[1] - t[1]];
5394
- return zs(o, a) === 0 ? !1 : !!(ln(r, e, t, n) && ln(t, n, r, e));
5369
+ return gs(o, a) === 0 ? !1 : !!(cn(r, e, t, n) && cn(t, n, r, e));
5395
5370
  }
5396
- function Is(r, e, t) {
5371
+ function hs(r, e, t) {
5397
5372
  for (const n of t)
5398
5373
  for (let a = 0; a < n.length - 1; ++a)
5399
5374
  if (Ot(r, e, n[a], n[a + 1]))
@@ -5404,61 +5379,61 @@ function Ge(r, e, t = !1) {
5404
5379
  let n = !1;
5405
5380
  for (const a of e)
5406
5381
  for (let o = 0; o < a.length - 1; o++) {
5407
- if (Ms(r, a[o], a[o + 1]))
5382
+ if (ds(r, a[o], a[o + 1]))
5408
5383
  return t;
5409
- _s(r, a[o], a[o + 1]) && (n = !n);
5384
+ fs(r, a[o], a[o + 1]) && (n = !n);
5410
5385
  }
5411
5386
  return n;
5412
5387
  }
5413
- function Ps(r, e) {
5388
+ function ys(r, e) {
5414
5389
  for (const t of e)
5415
5390
  if (Ge(r, t))
5416
5391
  return !0;
5417
5392
  return !1;
5418
5393
  }
5419
- function da(r, e) {
5394
+ function fa(r, e) {
5420
5395
  for (const t of r)
5421
5396
  if (!Ge(t, e))
5422
5397
  return !1;
5423
5398
  for (let t = 0; t < r.length - 1; ++t)
5424
- if (Is(r[t], r[t + 1], e))
5399
+ if (hs(r[t], r[t + 1], e))
5425
5400
  return !1;
5426
5401
  return !0;
5427
5402
  }
5428
- function Rs(r, e) {
5403
+ function ms(r, e) {
5429
5404
  for (const t of e)
5430
- if (da(r, t))
5405
+ if (fa(r, t))
5431
5406
  return !0;
5432
5407
  return !1;
5433
5408
  }
5434
- function zs(r, e) {
5409
+ function gs(r, e) {
5435
5410
  return r[0] * e[1] - r[1] * e[0];
5436
5411
  }
5437
- function ln(r, e, t, n) {
5412
+ function cn(r, e, t, n) {
5438
5413
  const a = r[0] - t[0], o = r[1] - t[1], i = e[0] - t[0], s = e[1] - t[1], l = n[0] - t[0], u = n[1] - t[1], c = a * u - l * o, p = i * u - l * s;
5439
5414
  return c > 0 && p < 0 || c < 0 && p > 0;
5440
5415
  }
5441
- function Ir(r, e, t) {
5416
+ function Pr(r, e, t) {
5442
5417
  const n = [];
5443
5418
  for (let a = 0; a < r.length; a++) {
5444
5419
  const o = [];
5445
5420
  for (let i = 0; i < r[a].length; i++) {
5446
- const s = Cs(r[a][i], t);
5421
+ const s = ss(r[a][i], t);
5447
5422
  st(e, s), o.push(s);
5448
5423
  }
5449
5424
  n.push(o);
5450
5425
  }
5451
5426
  return n;
5452
5427
  }
5453
- function ha(r, e, t) {
5428
+ function da(r, e, t) {
5454
5429
  const n = [];
5455
5430
  for (let a = 0; a < r.length; a++) {
5456
- const o = Ir(r[a], e, t);
5431
+ const o = Pr(r[a], e, t);
5457
5432
  n.push(o);
5458
5433
  }
5459
5434
  return n;
5460
5435
  }
5461
- function ya(r, e, t, n) {
5436
+ function ha(r, e, t, n) {
5462
5437
  if (r[0] < t[0] || r[0] > t[2]) {
5463
5438
  const a = n * 0.5;
5464
5439
  let o = r[0] - t[0] > a ? -n : t[0] - r[0] > a ? n : 0;
@@ -5466,19 +5441,19 @@ function ya(r, e, t, n) {
5466
5441
  }
5467
5442
  st(e, r);
5468
5443
  }
5469
- function $s(r) {
5444
+ function vs(r) {
5470
5445
  r[0] = r[1] = 1 / 0, r[2] = r[3] = -1 / 0;
5471
5446
  }
5472
- function un(r, e, t, n) {
5447
+ function pn(r, e, t, n) {
5473
5448
  const a = Math.pow(2, n.z) * pe, o = [n.x * pe, n.y * pe], i = [];
5474
5449
  for (const s of r)
5475
5450
  for (const l of s) {
5476
5451
  const u = [l.x + o[0], l.y + o[1]];
5477
- ya(u, e, t, a), i.push(u);
5452
+ ha(u, e, t, a), i.push(u);
5478
5453
  }
5479
5454
  return i;
5480
5455
  }
5481
- function cn(r, e, t, n) {
5456
+ function fn(r, e, t, n) {
5482
5457
  const a = Math.pow(2, n.z) * pe, o = [n.x * pe, n.y * pe], i = [];
5483
5458
  for (const s of r) {
5484
5459
  const l = [];
@@ -5489,17 +5464,17 @@ function cn(r, e, t, n) {
5489
5464
  i.push(l);
5490
5465
  }
5491
5466
  if (e[2] - e[0] <= a / 2) {
5492
- $s(e);
5467
+ vs(e);
5493
5468
  for (const s of i)
5494
5469
  for (const l of s)
5495
- ya(l, e, t, a);
5470
+ ha(l, e, t, a);
5496
5471
  }
5497
5472
  return i;
5498
5473
  }
5499
- function Fs(r, e) {
5474
+ function bs(r, e) {
5500
5475
  const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0], n = [1 / 0, 1 / 0, -1 / 0, -1 / 0], a = r.canonicalID();
5501
5476
  if (e.type === "Polygon") {
5502
- const o = Ir(e.coordinates, n, a), i = un(r.geometry(), t, n, a);
5477
+ const o = Pr(e.coordinates, n, a), i = pn(r.geometry(), t, n, a);
5503
5478
  if (!tt(t, n))
5504
5479
  return !1;
5505
5480
  for (const s of i)
@@ -5507,31 +5482,31 @@ function Fs(r, e) {
5507
5482
  return !1;
5508
5483
  }
5509
5484
  if (e.type === "MultiPolygon") {
5510
- const o = ha(e.coordinates, n, a), i = un(r.geometry(), t, n, a);
5485
+ const o = da(e.coordinates, n, a), i = pn(r.geometry(), t, n, a);
5511
5486
  if (!tt(t, n))
5512
5487
  return !1;
5513
5488
  for (const s of i)
5514
- if (!Ps(s, o))
5489
+ if (!ys(s, o))
5515
5490
  return !1;
5516
5491
  }
5517
5492
  return !0;
5518
5493
  }
5519
- function Os(r, e) {
5494
+ function ws(r, e) {
5520
5495
  const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0], n = [1 / 0, 1 / 0, -1 / 0, -1 / 0], a = r.canonicalID();
5521
5496
  if (e.type === "Polygon") {
5522
- const o = Ir(e.coordinates, n, a), i = cn(r.geometry(), t, n, a);
5497
+ const o = Pr(e.coordinates, n, a), i = fn(r.geometry(), t, n, a);
5523
5498
  if (!tt(t, n))
5524
5499
  return !1;
5525
5500
  for (const s of i)
5526
- if (!da(s, o))
5501
+ if (!fa(s, o))
5527
5502
  return !1;
5528
5503
  }
5529
5504
  if (e.type === "MultiPolygon") {
5530
- const o = ha(e.coordinates, n, a), i = cn(r.geometry(), t, n, a);
5505
+ const o = da(e.coordinates, n, a), i = fn(r.geometry(), t, n, a);
5531
5506
  if (!tt(t, n))
5532
5507
  return !1;
5533
5508
  for (const s of i)
5534
- if (!Rs(s, o))
5509
+ if (!ms(s, o))
5535
5510
  return !1;
5536
5511
  }
5537
5512
  return !0;
@@ -5570,9 +5545,9 @@ class _e {
5570
5545
  evaluate(e) {
5571
5546
  if (e.geometry() != null && e.canonicalID() != null) {
5572
5547
  if (e.geometryType() === "Point")
5573
- return Fs(e, this.geometries);
5548
+ return bs(e, this.geometries);
5574
5549
  if (e.geometryType() === "LineString")
5575
- return Os(e, this.geometries);
5550
+ return ws(e, this.geometries);
5576
5551
  }
5577
5552
  return !1;
5578
5553
  }
@@ -5582,7 +5557,7 @@ class _e {
5582
5557
  return !0;
5583
5558
  }
5584
5559
  }
5585
- class ma {
5560
+ class ya {
5586
5561
  constructor(e = [], t = (n, a) => n < a ? -1 : n > a ? 1 : 0) {
5587
5562
  if (this.data = e, this.length = this.data.length, this.compare = t, this.length > 0)
5588
5563
  for (let n = (this.length >> 1) - 1; n >= 0; n--) this._down(n);
@@ -5618,28 +5593,28 @@ class ma {
5618
5593
  t[e] = o;
5619
5594
  }
5620
5595
  }
5621
- function js(r, e) {
5596
+ function xs(r, e) {
5622
5597
  if (r.length <= 1)
5623
5598
  return [r];
5624
5599
  const n = [];
5625
5600
  let a, o;
5626
5601
  for (const i of r) {
5627
- const s = Ns(i);
5602
+ const s = Ss(i);
5628
5603
  s !== 0 && (i.area = Math.abs(s), o === void 0 && (o = s < 0), o === s < 0 ? (a && n.push(a), a = [i]) : a.push(i));
5629
5604
  }
5630
5605
  return a && n.push(a), n;
5631
5606
  }
5632
- function Ns(r) {
5607
+ function Ss(r) {
5633
5608
  let e = 0;
5634
5609
  for (let t = 0, n = r.length, a = n - 1, o, i; t < n; a = t++)
5635
5610
  o = r[t], i = r[a], e += (i.x - o.x) * (o.y + i.y);
5636
5611
  return e;
5637
5612
  }
5638
- const Us = 6378.137, pn = 1 / 298.257223563, fn = pn * (2 - pn), dn = Math.PI / 180;
5639
- class Pr {
5613
+ const ks = 6378.137, dn = 1 / 298.257223563, hn = dn * (2 - dn), yn = Math.PI / 180;
5614
+ class Rr {
5640
5615
  constructor(e) {
5641
- const t = dn * Us * 1e3, n = Math.cos(e * dn), a = 1 / (1 - fn * (1 - n * n)), o = Math.sqrt(a);
5642
- this.kx = t * o * n, this.ky = t * o * a * (1 - fn);
5616
+ const t = yn * ks * 1e3, n = Math.cos(e * yn), a = 1 / (1 - hn * (1 - n * n)), o = Math.sqrt(a);
5617
+ this.kx = t * o * n, this.ky = t * o * a * (1 - hn);
5643
5618
  }
5644
5619
  /**
5645
5620
  * Given two points of the form [longitude, latitude], returns the distance.
@@ -5689,8 +5664,8 @@ class Pr {
5689
5664
  return e;
5690
5665
  }
5691
5666
  }
5692
- const cr = 100, pr = 50;
5693
- function ga(r, e) {
5667
+ const fr = 100, dr = 50;
5668
+ function ma(r, e) {
5694
5669
  return e[0] - r[0];
5695
5670
  }
5696
5671
  function wt(r) {
@@ -5699,7 +5674,7 @@ function wt(r) {
5699
5674
  function me(r, e) {
5700
5675
  return r[1] >= r[0] && r[1] < e;
5701
5676
  }
5702
- function fr(r, e) {
5677
+ function hr(r, e) {
5703
5678
  if (r[0] > r[1])
5704
5679
  return [null, null];
5705
5680
  const t = wt(r);
@@ -5720,7 +5695,7 @@ function fr(r, e) {
5720
5695
  [r[0] + n + 1, r[1]]
5721
5696
  ];
5722
5697
  }
5723
- function dr(r, e) {
5698
+ function yr(r, e) {
5724
5699
  if (!me(e, r.length))
5725
5700
  return [1 / 0, 1 / 0, -1 / 0, -1 / 0];
5726
5701
  const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
@@ -5728,18 +5703,18 @@ function dr(r, e) {
5728
5703
  st(t, r[n]);
5729
5704
  return t;
5730
5705
  }
5731
- function hr(r) {
5706
+ function mr(r) {
5732
5707
  const e = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
5733
5708
  for (const t of r)
5734
5709
  for (const n of t)
5735
5710
  st(e, n);
5736
5711
  return e;
5737
5712
  }
5738
- function hn(r) {
5713
+ function mn(r) {
5739
5714
  return r[0] !== -1 / 0 && r[1] !== -1 / 0 && r[2] !== 1 / 0 && r[3] !== 1 / 0;
5740
5715
  }
5741
- function Rr(r, e, t) {
5742
- if (!hn(r) || !hn(e))
5716
+ function zr(r, e, t) {
5717
+ if (!mn(r) || !mn(e))
5743
5718
  return NaN;
5744
5719
  let n = 0, a = 0;
5745
5720
  return r[2] < e[0] && (n = e[0] - r[2]), r[0] > e[2] && (n = r[0] - e[2]), r[1] > e[3] && (a = r[1] - e[3]), r[3] < e[1] && (a = e[1] - r[3]), t.distance([0, 0], [n, a]);
@@ -5748,11 +5723,11 @@ function Te(r, e, t) {
5748
5723
  const n = t.pointOnLine(e, r);
5749
5724
  return t.distance(r, n.point);
5750
5725
  }
5751
- function zr(r, e, t, n, a) {
5726
+ function $r(r, e, t, n, a) {
5752
5727
  const o = Math.min(Te(r, [t, n], a), Te(e, [t, n], a)), i = Math.min(Te(t, [r, e], a), Te(n, [r, e], a));
5753
5728
  return Math.min(o, i);
5754
5729
  }
5755
- function Ds(r, e, t, n, a) {
5730
+ function Cs(r, e, t, n, a) {
5756
5731
  if (!(me(e, r.length) && me(n, t.length)))
5757
5732
  return 1 / 0;
5758
5733
  let i = 1 / 0;
@@ -5762,12 +5737,12 @@ function Ds(r, e, t, n, a) {
5762
5737
  const p = t[c], f = t[c + 1];
5763
5738
  if (Ot(l, u, p, f))
5764
5739
  return 0;
5765
- i = Math.min(i, zr(l, u, p, f, a));
5740
+ i = Math.min(i, $r(l, u, p, f, a));
5766
5741
  }
5767
5742
  }
5768
5743
  return i;
5769
5744
  }
5770
- function Bs(r, e, t, n, a) {
5745
+ function Ls(r, e, t, n, a) {
5771
5746
  if (!(me(e, r.length) && me(n, t.length)))
5772
5747
  return NaN;
5773
5748
  let i = 1 / 0;
@@ -5777,7 +5752,7 @@ function Bs(r, e, t, n, a) {
5777
5752
  return i;
5778
5753
  return i;
5779
5754
  }
5780
- function qs(r, e, t) {
5755
+ function Es(r, e, t) {
5781
5756
  if (Ge(r, e, !0))
5782
5757
  return 0;
5783
5758
  let n = 1 / 0;
@@ -5791,7 +5766,7 @@ function qs(r, e, t) {
5791
5766
  }
5792
5767
  return n;
5793
5768
  }
5794
- function Gs(r, e, t, n) {
5769
+ function Ts(r, e, t, n) {
5795
5770
  if (!me(e, r.length))
5796
5771
  return NaN;
5797
5772
  for (let o = e[0]; o <= e[1]; ++o)
@@ -5805,26 +5780,26 @@ function Gs(r, e, t, n) {
5805
5780
  const f = l[p], d = l[u];
5806
5781
  if (Ot(i, s, f, d))
5807
5782
  return 0;
5808
- a = Math.min(a, zr(i, s, f, d, n));
5783
+ a = Math.min(a, $r(i, s, f, d, n));
5809
5784
  }
5810
5785
  }
5811
5786
  return a;
5812
5787
  }
5813
- function yn(r, e) {
5788
+ function gn(r, e) {
5814
5789
  for (const t of r)
5815
5790
  for (const n of t)
5816
5791
  if (Ge(n, e, !0))
5817
5792
  return !0;
5818
5793
  return !1;
5819
5794
  }
5820
- function Vs(r, e, t, n = 1 / 0) {
5821
- const a = hr(r), o = hr(e);
5822
- if (n !== 1 / 0 && Rr(a, o, t) >= n)
5795
+ function As(r, e, t, n = 1 / 0) {
5796
+ const a = mr(r), o = mr(e);
5797
+ if (n !== 1 / 0 && zr(a, o, t) >= n)
5823
5798
  return n;
5824
5799
  if (tt(a, o)) {
5825
- if (yn(r, e))
5800
+ if (gn(r, e))
5826
5801
  return 0;
5827
- } else if (yn(e, r))
5802
+ } else if (gn(e, r))
5828
5803
  return 0;
5829
5804
  let i = 1 / 0;
5830
5805
  for (const s of r)
@@ -5835,50 +5810,50 @@ function Vs(r, e, t, n = 1 / 0) {
5835
5810
  const w = d[m], v = d[h];
5836
5811
  if (Ot(p, f, w, v))
5837
5812
  return 0;
5838
- i = Math.min(i, zr(p, f, w, v, t));
5813
+ i = Math.min(i, $r(p, f, w, v, t));
5839
5814
  }
5840
5815
  }
5841
5816
  return i;
5842
5817
  }
5843
- function mn(r, e, t, n, a, o) {
5818
+ function vn(r, e, t, n, a, o) {
5844
5819
  if (!o)
5845
5820
  return;
5846
- const i = Rr(dr(n, o), a, t);
5821
+ const i = zr(yr(n, o), a, t);
5847
5822
  i < e && r.push([i, o, [0, 0]]);
5848
5823
  }
5849
5824
  function ft(r, e, t, n, a, o, i) {
5850
5825
  if (!o || !i)
5851
5826
  return;
5852
- const s = Rr(dr(n, o), dr(a, i), t);
5827
+ const s = zr(yr(n, o), yr(a, i), t);
5853
5828
  s < e && r.push([s, o, i]);
5854
5829
  }
5855
5830
  function xt(r, e, t, n, a = 1 / 0) {
5856
5831
  let o = Math.min(n.distance(r[0], t[0][0]), a);
5857
5832
  if (o === 0)
5858
5833
  return o;
5859
- const i = new ma([[0, [0, r.length - 1], [0, 0]]], ga), s = hr(t);
5834
+ const i = new ya([[0, [0, r.length - 1], [0, 0]]], ma), s = mr(t);
5860
5835
  for (; i.length > 0; ) {
5861
5836
  const l = i.pop();
5862
5837
  if (l[0] >= o)
5863
5838
  continue;
5864
- const u = l[1], c = e ? pr : cr;
5839
+ const u = l[1], c = e ? dr : fr;
5865
5840
  if (wt(u) <= c) {
5866
5841
  if (!me(u, r.length))
5867
5842
  return NaN;
5868
5843
  if (e) {
5869
- const p = Gs(r, u, t, n);
5844
+ const p = Ts(r, u, t, n);
5870
5845
  if (isNaN(p) || p === 0)
5871
5846
  return p;
5872
5847
  o = Math.min(o, p);
5873
5848
  } else
5874
5849
  for (let p = u[0]; p <= u[1]; ++p) {
5875
- const f = qs(r[p], t, n);
5850
+ const f = Es(r[p], t, n);
5876
5851
  if (o = Math.min(o, f), o === 0)
5877
5852
  return 0;
5878
5853
  }
5879
5854
  } else {
5880
- const p = fr(u, e);
5881
- mn(i, o, n, r, s, p[0]), mn(i, o, n, r, s, p[1]);
5855
+ const p = hr(u, e);
5856
+ vn(i, o, n, r, s, p[0]), vn(i, o, n, r, s, p[1]);
5882
5857
  }
5883
5858
  }
5884
5859
  return o;
@@ -5887,18 +5862,18 @@ function St(r, e, t, n, a, o = 1 / 0) {
5887
5862
  let i = Math.min(o, a.distance(r[0], t[0]));
5888
5863
  if (i === 0)
5889
5864
  return i;
5890
- const s = new ma([[0, [0, r.length - 1], [0, t.length - 1]]], ga);
5865
+ const s = new ya([[0, [0, r.length - 1], [0, t.length - 1]]], ma);
5891
5866
  for (; s.length > 0; ) {
5892
5867
  const l = s.pop();
5893
5868
  if (l[0] >= i)
5894
5869
  continue;
5895
- const u = l[1], c = l[2], p = e ? pr : cr, f = n ? pr : cr;
5870
+ const u = l[1], c = l[2], p = e ? dr : fr, f = n ? dr : fr;
5896
5871
  if (wt(u) <= p && wt(c) <= f) {
5897
5872
  if (!me(u, r.length) && me(c, t.length))
5898
5873
  return NaN;
5899
5874
  let d;
5900
5875
  if (e && n)
5901
- d = Ds(r, u, t, c, a), i = Math.min(i, d);
5876
+ d = Cs(r, u, t, c, a), i = Math.min(i, d);
5902
5877
  else if (e && !n) {
5903
5878
  const h = r.slice(u[0], u[1] + 1);
5904
5879
  for (let y = c[0]; y <= c[1]; ++y)
@@ -5910,19 +5885,19 @@ function St(r, e, t, n, a, o = 1 / 0) {
5910
5885
  if (d = Te(r[y], h, a), i = Math.min(i, d), i === 0)
5911
5886
  return i;
5912
5887
  } else
5913
- d = Bs(r, u, t, c, a), i = Math.min(i, d);
5888
+ d = Ls(r, u, t, c, a), i = Math.min(i, d);
5914
5889
  } else {
5915
- const d = fr(u, e), h = fr(c, n);
5890
+ const d = hr(u, e), h = hr(c, n);
5916
5891
  ft(s, i, a, r, t, d[0], h[0]), ft(s, i, a, r, t, d[0], h[1]), ft(s, i, a, r, t, d[1], h[0]), ft(s, i, a, r, t, d[1], h[1]);
5917
5892
  }
5918
5893
  }
5919
5894
  return i;
5920
5895
  }
5921
- function Hs(r, e) {
5922
- const t = r.geometry(), n = t.flat().map((i) => Mr([i.x, i.y], r.canonical));
5896
+ function _s(r, e) {
5897
+ const t = r.geometry(), n = t.flat().map((i) => Ir([i.x, i.y], r.canonical));
5923
5898
  if (t.length === 0)
5924
5899
  return NaN;
5925
- const a = new Pr(n[0][1]);
5900
+ const a = new Rr(n[0][1]);
5926
5901
  let o = 1 / 0;
5927
5902
  for (const i of e) {
5928
5903
  switch (i.type) {
@@ -5941,11 +5916,11 @@ function Hs(r, e) {
5941
5916
  }
5942
5917
  return o;
5943
5918
  }
5944
- function Ks(r, e) {
5945
- const t = r.geometry(), n = t.flat().map((i) => Mr([i.x, i.y], r.canonical));
5919
+ function Ms(r, e) {
5920
+ const t = r.geometry(), n = t.flat().map((i) => Ir([i.x, i.y], r.canonical));
5946
5921
  if (t.length === 0)
5947
5922
  return NaN;
5948
- const a = new Pr(n[0][1]);
5923
+ const a = new Rr(n[0][1]);
5949
5924
  let o = 1 / 0;
5950
5925
  for (const i of e) {
5951
5926
  switch (i.type) {
@@ -5964,11 +5939,11 @@ function Ks(r, e) {
5964
5939
  }
5965
5940
  return o;
5966
5941
  }
5967
- function Xs(r, e) {
5942
+ function Is(r, e) {
5968
5943
  const t = r.geometry();
5969
5944
  if (t.length === 0 || t[0].length === 0)
5970
5945
  return NaN;
5971
- const n = js(t).map((i) => i.map((s) => s.map((l) => Mr([l.x, l.y], r.canonical)))), a = new Pr(n[0][0][0][1]);
5946
+ const n = xs(t).map((i) => i.map((s) => s.map((l) => Ir([l.x, l.y], r.canonical)))), a = new Rr(n[0][0][0][1]);
5972
5947
  let o = 1 / 0;
5973
5948
  for (const i of e)
5974
5949
  for (const s of n) {
@@ -5980,7 +5955,7 @@ function Xs(r, e) {
5980
5955
  o = Math.min(o, xt(i.coordinates, !0, s, a, o));
5981
5956
  break;
5982
5957
  case "Polygon":
5983
- o = Math.min(o, Vs(s, i.coordinates, a, o));
5958
+ o = Math.min(o, As(s, i.coordinates, a, o));
5984
5959
  break;
5985
5960
  }
5986
5961
  if (o === 0)
@@ -6021,11 +5996,11 @@ class Me {
6021
5996
  evaluate(e) {
6022
5997
  if (e.geometry() != null && e.canonicalID() != null) {
6023
5998
  if (e.geometryType() === "Point")
6024
- return Hs(e, this.geometries);
5999
+ return _s(e, this.geometries);
6025
6000
  if (e.geometryType() === "LineString")
6026
- return Ks(e, this.geometries);
6001
+ return Ms(e, this.geometries);
6027
6002
  if (e.geometryType() === "Polygon")
6028
- return Xs(e, this.geometries);
6003
+ return Is(e, this.geometries);
6029
6004
  }
6030
6005
  return NaN;
6031
6006
  }
@@ -6035,33 +6010,33 @@ class Me {
6035
6010
  return !0;
6036
6011
  }
6037
6012
  }
6038
- const $r = {
6013
+ const Fr = {
6039
6014
  // special forms
6040
- "==": vs,
6041
- "!=": bs,
6042
- ">": xs,
6043
- "<": ws,
6044
- ">=": ks,
6045
- "<=": Ss,
6015
+ "==": ts,
6016
+ "!=": rs,
6017
+ ">": as,
6018
+ "<": ns,
6019
+ ">=": is,
6020
+ "<=": os,
6046
6021
  array: oe,
6047
- at: Sr,
6022
+ at: kr,
6048
6023
  boolean: oe,
6049
- case: Lr,
6024
+ case: Er,
6050
6025
  coalesce: et,
6051
6026
  collator: Ft,
6052
- format: Tr,
6053
- image: Ar,
6054
- in: kr,
6027
+ format: Ar,
6028
+ image: _r,
6029
+ in: Cr,
6055
6030
  "index-of": vt,
6056
6031
  interpolate: ce,
6057
6032
  "interpolate-hcl": ce,
6058
6033
  "interpolate-lab": ce,
6059
- length: _r,
6034
+ length: Mr,
6060
6035
  let: Rt,
6061
6036
  literal: De,
6062
- match: Cr,
6037
+ match: Lr,
6063
6038
  number: oe,
6064
- "number-format": Er,
6039
+ "number-format": Tr,
6065
6040
  object: oe,
6066
6041
  slice: bt,
6067
6042
  step: $t,
@@ -6122,7 +6097,7 @@ class ie {
6122
6097
  if (s.length === 1)
6123
6098
  t.errors.push(...l.errors);
6124
6099
  else {
6125
- const c = (s.length ? s : i).map(([f]) => Ws(f)).join(" | "), p = [];
6100
+ const c = (s.length ? s : i).map(([f]) => Rs(f)).join(" | "), p = [];
6126
6101
  for (let f = 1; f < e.length; f++) {
6127
6102
  const d = t.parse(e[f], 1 + p.length);
6128
6103
  if (!d)
@@ -6139,21 +6114,21 @@ class ie {
6139
6114
  e[n] = ie;
6140
6115
  }
6141
6116
  }
6142
- function gn(r, [e, t, n, a]) {
6117
+ function bn(r, [e, t, n, a]) {
6143
6118
  e = e.evaluate(r), t = t.evaluate(r), n = n.evaluate(r);
6144
- const o = a ? a.evaluate(r) : 1, i = la(e, t, n, o);
6119
+ const o = a ? a.evaluate(r) : 1, i = sa(e, t, n, o);
6145
6120
  if (i)
6146
6121
  throw new D(i);
6147
6122
  return new O(e / 255, t / 255, n / 255, o, !1);
6148
6123
  }
6149
- function vn(r, e) {
6124
+ function wn(r, e) {
6150
6125
  return r in e;
6151
6126
  }
6152
6127
  function Qt(r, e) {
6153
6128
  const t = e[r];
6154
6129
  return typeof t > "u" ? null : t;
6155
6130
  }
6156
- function Zs(r, e, t, n) {
6131
+ function Ps(r, e, t, n) {
6157
6132
  for (; t <= n; ) {
6158
6133
  const a = t + n >> 1;
6159
6134
  if (e[a] === r)
@@ -6165,9 +6140,9 @@ function Zs(r, e, t, n) {
6165
6140
  function Le(r) {
6166
6141
  return { type: r };
6167
6142
  }
6168
- ie.register($r, {
6143
+ ie.register(Fr, {
6169
6144
  error: [
6170
- Vi,
6145
+ Ai,
6171
6146
  [M],
6172
6147
  (r, [e]) => {
6173
6148
  throw new D(e.evaluate(r));
@@ -6189,23 +6164,23 @@ ie.register($r, {
6189
6164
  rgb: [
6190
6165
  ue,
6191
6166
  [b, b, b],
6192
- gn
6167
+ bn
6193
6168
  ],
6194
6169
  rgba: [
6195
6170
  ue,
6196
6171
  [b, b, b, b],
6197
- gn
6172
+ bn
6198
6173
  ],
6199
6174
  has: {
6200
6175
  type: A,
6201
6176
  overloads: [
6202
6177
  [
6203
6178
  [M],
6204
- (r, [e]) => vn(e.evaluate(r), r.properties())
6179
+ (r, [e]) => wn(e.evaluate(r), r.properties())
6205
6180
  ],
6206
6181
  [
6207
6182
  [M, Ne],
6208
- (r, [e, t]) => vn(e.evaluate(r), t.evaluate(r))
6183
+ (r, [e, t]) => wn(e.evaluate(r), t.evaluate(r))
6209
6184
  ]
6210
6185
  ]
6211
6186
  },
@@ -6517,7 +6492,7 @@ ie.register($r, {
6517
6492
  A,
6518
6493
  [M, Z(_)],
6519
6494
  // assumes v is a array literal with values sorted in ascending order and of a single type
6520
- (r, [e, t]) => Zs(r.properties()[e.value], t.value, 0, t.value.length - 1)
6495
+ (r, [e, t]) => Ps(r.properties()[e.value], t.value, 0, t.value.length - 1)
6521
6496
  ],
6522
6497
  all: {
6523
6498
  type: A,
@@ -6590,7 +6565,7 @@ ie.register($r, {
6590
6565
  (r, [e]) => e.evaluate(r).resolvedLocale()
6591
6566
  ]
6592
6567
  });
6593
- function Ws(r) {
6568
+ function Rs(r) {
6594
6569
  return Array.isArray(r) ? `(${r.map(j).join(", ")})` : `(${j(r.type)}...)`;
6595
6570
  }
6596
6571
  function kt(r) {
@@ -6646,7 +6621,7 @@ function Nt(r, e) {
6646
6621
  t && !Nt(n, e) && (t = !1);
6647
6622
  }), t;
6648
6623
  }
6649
- function yr(r) {
6624
+ function gr(r) {
6650
6625
  return { result: "success", value: r };
6651
6626
  }
6652
6627
  function je(r) {
@@ -6655,21 +6630,21 @@ function je(r) {
6655
6630
  function Ct(r) {
6656
6631
  return r["property-type"] === "data-driven" || r["property-type"] === "cross-faded-data-driven";
6657
6632
  }
6658
- function va(r) {
6633
+ function ga(r) {
6659
6634
  return !!r.expression && r.expression.parameters.indexOf("zoom") > -1;
6660
6635
  }
6661
- function ba(r) {
6636
+ function va(r) {
6662
6637
  return !!r.expression && r.expression.interpolated;
6663
6638
  }
6664
6639
  function R(r) {
6665
6640
  return r instanceof Number ? "number" : r instanceof String ? "string" : r instanceof Boolean ? "boolean" : Array.isArray(r) ? "array" : r === null ? "null" : typeof r;
6666
6641
  }
6667
- function Fr(r) {
6642
+ function Or(r) {
6668
6643
  return typeof r == "object" && r !== null && !Array.isArray(r);
6669
6644
  }
6670
- class Ys {
6645
+ class zs {
6671
6646
  constructor(e, t) {
6672
- this.expression = e, this._warningHistory = {}, this._evaluator = new ua(), this._defaultValue = t ? el(t) : null, this._enumValues = t && t.type === "enum" ? t.values : null;
6647
+ this.expression = e, this._warningHistory = {}, this._evaluator = new la(), this._defaultValue = t ? Os(t) : null, this._enumValues = t && t.type === "enum" ? t.values : null;
6673
6648
  }
6674
6649
  evaluateWithoutErrorHandling(e, t, n, a, o, i) {
6675
6650
  return this._evaluator.globals = e, this._evaluator.feature = t, this._evaluator.featureState = n, this._evaluator.canonical = a, this._evaluator.availableImages = o || null, this._evaluator.formattedSection = i, this.expression.evaluate(this._evaluator);
@@ -6688,14 +6663,14 @@ class Ys {
6688
6663
  }
6689
6664
  }
6690
6665
  }
6691
- function wa(r) {
6692
- return Array.isArray(r) && r.length > 0 && typeof r[0] == "string" && r[0] in $r;
6666
+ function ba(r) {
6667
+ return Array.isArray(r) && r.length > 0 && typeof r[0] == "string" && r[0] in Fr;
6693
6668
  }
6694
- function xa(r, e) {
6695
- const t = new Pt($r, kt, [], e ? Qs(e) : void 0), n = t.parse(r, void 0, void 0, void 0, e && e.type === "string" ? { typeAnnotation: "coerce" } : void 0);
6696
- return n ? yr(new Ys(n, e)) : je(t.errors);
6669
+ function wa(r, e) {
6670
+ const t = new Pt(Fr, kt, [], e ? Fs(e) : void 0), n = t.parse(r, void 0, void 0, void 0, e && e.type === "string" ? { typeAnnotation: "coerce" } : void 0);
6671
+ return n ? gr(new zs(n, e)) : je(t.errors);
6697
6672
  }
6698
- class bn {
6673
+ class xn {
6699
6674
  constructor(e, t) {
6700
6675
  this.kind = e, this._styleExpression = t, this.isStateDependent = e !== "constant" && !rt(t.expression);
6701
6676
  }
@@ -6706,7 +6681,7 @@ class bn {
6706
6681
  return this._styleExpression.evaluate(e, t, n, a, o, i);
6707
6682
  }
6708
6683
  }
6709
- class wn {
6684
+ class Sn {
6710
6685
  constructor(e, t, n, a) {
6711
6686
  this.kind = e, this.zoomStops = n, this._styleExpression = t, this.isStateDependent = e !== "camera" && !rt(t.expression), this.interpolationType = a;
6712
6687
  }
@@ -6720,27 +6695,27 @@ class wn {
6720
6695
  return this.interpolationType ? ce.interpolationFactor(this.interpolationType, e, t, n) : 0;
6721
6696
  }
6722
6697
  }
6723
- function Js(r, e) {
6724
- const t = xa(r, e);
6698
+ function $s(r, e) {
6699
+ const t = wa(r, e);
6725
6700
  if (t.result === "error")
6726
6701
  return t;
6727
6702
  const n = t.value.expression, a = jt(n);
6728
6703
  if (!a && !Ct(e))
6729
6704
  return je([new le("", "data expressions not supported")]);
6730
6705
  const o = Nt(n, ["zoom"]);
6731
- if (!o && !va(e))
6706
+ if (!o && !ga(e))
6732
6707
  return je([new le("", "zoom expressions not supported")]);
6733
6708
  const i = ht(n);
6734
6709
  if (!i && !o)
6735
6710
  return je([new le("", '"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);
6736
6711
  if (i instanceof le)
6737
6712
  return je([i]);
6738
- if (i instanceof ce && !ba(e))
6713
+ if (i instanceof ce && !va(e))
6739
6714
  return je([new le("", '"interpolate" expressions cannot be used with this property')]);
6740
6715
  if (!i)
6741
- return yr(a ? new bn("constant", t.value) : new bn("source", t.value));
6716
+ return gr(a ? new xn("constant", t.value) : new xn("source", t.value));
6742
6717
  const s = i instanceof ce ? i.interpolation : void 0;
6743
- return yr(a ? new wn("camera", t.value, i.labels, s) : new wn("composite", t.value, i.labels, s));
6718
+ return gr(a ? new Sn("camera", t.value, i.labels, s) : new Sn("composite", t.value, i.labels, s));
6744
6719
  }
6745
6720
  function ht(r) {
6746
6721
  let e = null;
@@ -6756,7 +6731,7 @@ function ht(r) {
6756
6731
  n instanceof le ? e = n : !e && n ? e = new le("", '"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.') : e && n && e !== n && (e = new le("", 'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'));
6757
6732
  }), e;
6758
6733
  }
6759
- function Qs(r) {
6734
+ function Fs(r) {
6760
6735
  const e = {
6761
6736
  color: ue,
6762
6737
  string: M,
@@ -6771,10 +6746,10 @@ function Qs(r) {
6771
6746
  };
6772
6747
  return r.type === "array" ? Z(e[r.value] || _, r.length) : e[r.type];
6773
6748
  }
6774
- function el(r) {
6775
- return r.type === "color" && Fr(r.default) ? new O(0, 0, 0, 0) : r.type === "color" ? O.parse(r.default) || null : r.type === "padding" ? Y.parse(r.default) || null : r.type === "variableAnchorOffsetCollection" ? se.parse(r.default) || null : r.type === "projectionDefinition" ? ae.parse(r.default) || null : r.default === void 0 ? null : r.default;
6749
+ function Os(r) {
6750
+ return r.type === "color" && Or(r.default) ? new O(0, 0, 0, 0) : r.type === "color" ? O.parse(r.default) || null : r.type === "padding" ? Y.parse(r.default) || null : r.type === "variableAnchorOffsetCollection" ? se.parse(r.default) || null : r.type === "projectionDefinition" ? ae.parse(r.default) || null : r.default === void 0 ? null : r.default;
6776
6751
  }
6777
- function Sa(r) {
6752
+ function xa(r) {
6778
6753
  if (r === !0 || r === !1)
6779
6754
  return !0;
6780
6755
  if (!Array.isArray(r) || r.length === 0)
@@ -6798,14 +6773,14 @@ function Sa(r) {
6798
6773
  case "any":
6799
6774
  case "all":
6800
6775
  for (const e of r.slice(1))
6801
- if (!Sa(e) && typeof e != "boolean")
6776
+ if (!xa(e) && typeof e != "boolean")
6802
6777
  return !1;
6803
6778
  return !0;
6804
6779
  default:
6805
6780
  return !0;
6806
6781
  }
6807
6782
  }
6808
- function ka(r) {
6783
+ function Sa(r) {
6809
6784
  const e = r.key, t = r.value;
6810
6785
  return t ? [new g(e, t, "constants have been deprecated as of v8")] : [];
6811
6786
  }
@@ -6859,7 +6834,7 @@ function J(r) {
6859
6834
  a[c] || n[c].required && n[c].default === void 0 && t[c] === void 0 && l.push(new g(e, t, `missing required property "${c}"`));
6860
6835
  return l;
6861
6836
  }
6862
- function Or(r) {
6837
+ function jr(r) {
6863
6838
  const e = r.value, t = r.valueSpec, n = r.validateSpec, a = r.style, o = r.styleSpec, i = r.key, s = r.arrayElementValidator || n;
6864
6839
  if (R(e) !== "array")
6865
6840
  return [new g(i, e, `array expected, ${R(e)} found`)];
@@ -6886,12 +6861,12 @@ function Or(r) {
6886
6861
  }));
6887
6862
  return u;
6888
6863
  }
6889
- function jr(r) {
6864
+ function Nr(r) {
6890
6865
  const e = r.key, t = r.value, n = r.valueSpec;
6891
6866
  let a = R(t);
6892
6867
  return a === "number" && t !== t && (a = "NaN"), a !== "number" ? [new g(e, t, `number expected, ${a} found`)] : "minimum" in n && t < n.minimum ? [new g(e, t, `${t} is less than the minimum value ${n.minimum}`)] : "maximum" in n && t > n.maximum ? [new g(e, t, `${t} is greater than the maximum value ${n.maximum}`)] : [];
6893
6868
  }
6894
- function Ca(r) {
6869
+ function ka(r) {
6895
6870
  const e = r.valueSpec, t = U(r.value.type);
6896
6871
  let n, a = {}, o, i;
6897
6872
  const s = t !== "categorical" && r.value.property === void 0, l = !s, u = R(r.value.stops) === "array" && R(r.value.stops[0]) === "array" && R(r.value.stops[0][0]) === "object", c = J({
@@ -6906,13 +6881,13 @@ function Ca(r) {
6906
6881
  default: h
6907
6882
  }
6908
6883
  });
6909
- return t === "identity" && s && c.push(new g(r.key, r.value, 'missing required property "property"')), t !== "identity" && !r.value.stops && c.push(new g(r.key, r.value, 'missing required property "stops"')), t === "exponential" && r.valueSpec.expression && !ba(r.valueSpec) && c.push(new g(r.key, r.value, "exponential functions not supported")), r.styleSpec.$version >= 8 && (l && !Ct(r.valueSpec) ? c.push(new g(r.key, r.value, "property functions not supported")) : s && !va(r.valueSpec) && c.push(new g(r.key, r.value, "zoom functions not supported"))), (t === "categorical" || u) && r.value.property === void 0 && c.push(new g(r.key, r.value, '"property" property is required')), c;
6884
+ return t === "identity" && s && c.push(new g(r.key, r.value, 'missing required property "property"')), t !== "identity" && !r.value.stops && c.push(new g(r.key, r.value, 'missing required property "stops"')), t === "exponential" && r.valueSpec.expression && !va(r.valueSpec) && c.push(new g(r.key, r.value, "exponential functions not supported")), r.styleSpec.$version >= 8 && (l && !Ct(r.valueSpec) ? c.push(new g(r.key, r.value, "property functions not supported")) : s && !ga(r.valueSpec) && c.push(new g(r.key, r.value, "zoom functions not supported"))), (t === "categorical" || u) && r.value.property === void 0 && c.push(new g(r.key, r.value, '"property" property is required')), c;
6910
6885
  function p(y) {
6911
6886
  if (t === "identity")
6912
6887
  return [new g(y.key, y.value, 'identity function may not have a "stops" property')];
6913
6888
  let m = [];
6914
6889
  const w = y.value;
6915
- return m = m.concat(Or({
6890
+ return m = m.concat(jr({
6916
6891
  key: y.key,
6917
6892
  value: w,
6918
6893
  valueSpec: y.valueSpec,
@@ -6945,7 +6920,7 @@ function Ca(r) {
6945
6920
  validateSpec: y.validateSpec,
6946
6921
  style: y.style,
6947
6922
  styleSpec: y.styleSpec,
6948
- objectElementValidators: { zoom: jr, value: d }
6923
+ objectElementValidators: { zoom: Nr, value: d }
6949
6924
  }));
6950
6925
  } else
6951
6926
  m = m.concat(d({
@@ -6956,7 +6931,7 @@ function Ca(r) {
6956
6931
  style: y.style,
6957
6932
  styleSpec: y.styleSpec
6958
6933
  }, w));
6959
- return wa(Re(w[1])) ? m.concat([new g(`${v}[1]`, w[1], "expressions are not allowed in function stops.")]) : m.concat(y.validateSpec({
6934
+ return ba(Re(w[1])) ? m.concat([new g(`${v}[1]`, w[1], "expressions are not allowed in function stops.")]) : m.concat(y.validateSpec({
6960
6935
  key: `${v}[1]`,
6961
6936
  value: w[1],
6962
6937
  valueSpec: e,
@@ -6991,7 +6966,7 @@ function Ca(r) {
6991
6966
  }
6992
6967
  }
6993
6968
  function Be(r) {
6994
- const e = (r.expressionContext === "property" ? Js : xa)(Re(r.value), r.valueSpec);
6969
+ const e = (r.expressionContext === "property" ? $s : wa)(Re(r.value), r.valueSpec);
6995
6970
  if (e.result === "error")
6996
6971
  return e.value.map((n) => new g(`${r.key}${n.key}`, r.value, n.message));
6997
6972
  const t = e.value.expression || e.value._styleExpression.expression;
@@ -7009,11 +6984,11 @@ function Be(r) {
7009
6984
  }
7010
6985
  return [];
7011
6986
  }
7012
- function tl(r) {
6987
+ function js(r) {
7013
6988
  const e = r.value, t = r.key, n = R(e);
7014
6989
  return n !== "boolean" ? [new g(t, e, `boolean expected, ${n} found`)] : [];
7015
6990
  }
7016
- function rl(r) {
6991
+ function Ns(r) {
7017
6992
  const e = r.key, t = r.value, n = R(t);
7018
6993
  return n !== "string" ? [new g(e, t, `color expected, ${n} found`)] : O.parse(String(t)) ? [] : [new g(e, t, `color expected, "${t}" found`)];
7019
6994
  }
@@ -7021,13 +6996,13 @@ function nt(r) {
7021
6996
  const e = r.key, t = r.value, n = r.valueSpec, a = [];
7022
6997
  return Array.isArray(n.values) ? n.values.indexOf(U(t)) === -1 && a.push(new g(e, t, `expected one of [${n.values.join(", ")}], ${JSON.stringify(t)} found`)) : Object.keys(n.values).indexOf(U(t)) === -1 && a.push(new g(e, t, `expected one of [${Object.keys(n.values).join(", ")}], ${JSON.stringify(t)} found`)), a;
7023
6998
  }
7024
- function Nr(r) {
7025
- return Sa(Re(r.value)) ? Be(gt({}, r, {
6999
+ function Ur(r) {
7000
+ return xa(Re(r.value)) ? Be(gt({}, r, {
7026
7001
  expressionContext: "filter",
7027
7002
  valueSpec: { value: "boolean" }
7028
- })) : La(r);
7003
+ })) : Ca(r);
7029
7004
  }
7030
- function La(r) {
7005
+ function Ca(r) {
7031
7006
  const e = r.value, t = r.key;
7032
7007
  if (R(e) !== "array")
7033
7008
  return [new g(t, e, `array expected, ${R(e)} found`)];
@@ -7068,7 +7043,7 @@ function La(r) {
7068
7043
  case "all":
7069
7044
  case "none":
7070
7045
  for (let i = 1; i < e.length; i++)
7071
- o = o.concat(La({
7046
+ o = o.concat(Ca({
7072
7047
  key: `${t}[${i}]`,
7073
7048
  value: e[i],
7074
7049
  style: r.style,
@@ -7082,7 +7057,7 @@ function La(r) {
7082
7057
  }
7083
7058
  return o;
7084
7059
  }
7085
- function Ea(r, e) {
7060
+ function La(r, e) {
7086
7061
  const t = r.key, n = r.validateSpec, a = r.style, o = r.styleSpec, i = r.value, s = r.objectKey, l = o[`${e}_${r.layerType}`];
7087
7062
  if (!l)
7088
7063
  return [];
@@ -7103,7 +7078,7 @@ function Ea(r, e) {
7103
7078
  return [new g(t, i, `"${s}" does not support interpolation syntax
7104
7079
  Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(p[1])} }\`.`)];
7105
7080
  const f = [];
7106
- return r.layerType === "symbol" && (s === "text-field" && a && !a.glyphs && f.push(new g(t, i, 'use of "text-field" requires a style "glyphs" property')), s === "text-font" && Fr(Re(i)) && U(i.type) === "identity" && f.push(new g(t, i, '"text-font" does not support identity functions'))), f.concat(n({
7081
+ return r.layerType === "symbol" && (s === "text-field" && a && !a.glyphs && f.push(new g(t, i, 'use of "text-field" requires a style "glyphs" property')), s === "text-font" && Or(Re(i)) && U(i.type) === "identity" && f.push(new g(t, i, '"text-font" does not support identity functions'))), f.concat(n({
7107
7082
  key: r.key,
7108
7083
  value: i,
7109
7084
  valueSpec: c,
@@ -7114,13 +7089,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
7114
7089
  propertyKey: s
7115
7090
  }));
7116
7091
  }
7092
+ function Ea(r) {
7093
+ return La(r, "paint");
7094
+ }
7117
7095
  function Ta(r) {
7118
- return Ea(r, "paint");
7096
+ return La(r, "layout");
7119
7097
  }
7120
7098
  function Aa(r) {
7121
- return Ea(r, "layout");
7122
- }
7123
- function _a(r) {
7124
7099
  let e = [];
7125
7100
  const t = r.value, n = r.key, a = r.style, o = r.styleSpec;
7126
7101
  !t.type && !t.ref && e.push(new g(n, t, 'either "type" or "ref" is required'));
@@ -7173,7 +7148,7 @@ function _a(r) {
7173
7148
  objectKey: "type"
7174
7149
  });
7175
7150
  },
7176
- filter: Nr,
7151
+ filter: Ur,
7177
7152
  layout(l) {
7178
7153
  return J({
7179
7154
  layer: t,
@@ -7184,7 +7159,7 @@ function _a(r) {
7184
7159
  validateSpec: l.validateSpec,
7185
7160
  objectElementValidators: {
7186
7161
  "*"(u) {
7187
- return Aa(gt({ layerType: i }, u));
7162
+ return Ta(gt({ layerType: i }, u));
7188
7163
  }
7189
7164
  }
7190
7165
  });
@@ -7199,7 +7174,7 @@ function _a(r) {
7199
7174
  validateSpec: l.validateSpec,
7200
7175
  objectElementValidators: {
7201
7176
  "*"(u) {
7202
- return Ta(gt({ layerType: i }, u));
7177
+ return Ea(gt({ layerType: i }, u));
7203
7178
  }
7204
7179
  }
7205
7180
  });
@@ -7211,7 +7186,7 @@ function ze(r) {
7211
7186
  const e = r.value, t = r.key, n = R(e);
7212
7187
  return n !== "string" ? [new g(t, e, `string expected, ${n} found`)] : [];
7213
7188
  }
7214
- function nl(r) {
7189
+ function Us(r) {
7215
7190
  var e;
7216
7191
  const t = (e = r.sourceName) !== null && e !== void 0 ? e : "", n = r.value, a = r.styleSpec, o = a.source_raster_dem, i = r.style;
7217
7192
  let s = [];
@@ -7232,10 +7207,10 @@ function nl(r) {
7232
7207
  })) : s.push(new g(d, n[d], `unknown property "${d}"`));
7233
7208
  return s;
7234
7209
  }
7235
- const xn = {
7236
- promoteId: al
7210
+ const kn = {
7211
+ promoteId: Ds
7237
7212
  };
7238
- function Ma(r) {
7213
+ function _a(r) {
7239
7214
  const e = r.value, t = r.key, n = r.styleSpec, a = r.style, o = r.validateSpec;
7240
7215
  if (!e.type)
7241
7216
  return [new g(t, e, '"type" is required')];
@@ -7250,11 +7225,11 @@ function Ma(r) {
7250
7225
  valueSpec: n[`source_${i.replace("-", "_")}`],
7251
7226
  style: r.style,
7252
7227
  styleSpec: n,
7253
- objectElementValidators: xn,
7228
+ objectElementValidators: kn,
7254
7229
  validateSpec: o
7255
7230
  }), s;
7256
7231
  case "raster-dem":
7257
- return s = nl({
7232
+ return s = Us({
7258
7233
  sourceName: t,
7259
7234
  value: e,
7260
7235
  style: r.style,
@@ -7269,7 +7244,7 @@ function Ma(r) {
7269
7244
  style: a,
7270
7245
  styleSpec: n,
7271
7246
  validateSpec: o,
7272
- objectElementValidators: xn
7247
+ objectElementValidators: kn
7273
7248
  }), e.cluster)
7274
7249
  for (const l in e.clusterProperties) {
7275
7250
  const [u, c] = e.clusterProperties[l], p = typeof u == "string" ? [u, ["accumulated"], ["get", l]] : u;
@@ -7317,7 +7292,7 @@ function Ma(r) {
7317
7292
  });
7318
7293
  }
7319
7294
  }
7320
- function al({ key: r, value: e }) {
7295
+ function Ds({ key: r, value: e }) {
7321
7296
  if (R(e) === "string")
7322
7297
  return ze({ key: r, value: e });
7323
7298
  {
@@ -7327,7 +7302,7 @@ function al({ key: r, value: e }) {
7327
7302
  return t;
7328
7303
  }
7329
7304
  }
7330
- function Ia(r) {
7305
+ function Ma(r) {
7331
7306
  const e = r.value, t = r.styleSpec, n = t.light, a = r.style;
7332
7307
  let o = [];
7333
7308
  const i = R(e);
@@ -7355,7 +7330,7 @@ function Ia(r) {
7355
7330
  }
7356
7331
  return o;
7357
7332
  }
7358
- function Pa(r) {
7333
+ function Ia(r) {
7359
7334
  const e = r.value, t = r.styleSpec, n = t.sky, a = r.style, o = R(e);
7360
7335
  if (e === void 0)
7361
7336
  return [];
@@ -7372,7 +7347,7 @@ function Pa(r) {
7372
7347
  })) : i = i.concat([new g(s, e[s], `unknown property "${s}"`)]);
7373
7348
  return i;
7374
7349
  }
7375
- function Ra(r) {
7350
+ function Pa(r) {
7376
7351
  const e = r.value, t = r.styleSpec, n = t.terrain, a = r.style;
7377
7352
  let o = [];
7378
7353
  const i = R(e);
@@ -7391,13 +7366,13 @@ function Ra(r) {
7391
7366
  })) : o = o.concat([new g(s, e[s], `unknown property "${s}"`)]);
7392
7367
  return o;
7393
7368
  }
7394
- function ol(r) {
7369
+ function Bs(r) {
7395
7370
  return ze(r).length === 0 ? [] : Be(r);
7396
7371
  }
7397
- function il(r) {
7372
+ function qs(r) {
7398
7373
  return ze(r).length === 0 ? [] : Be(r);
7399
7374
  }
7400
- function sl(r) {
7375
+ function Gs(r) {
7401
7376
  const e = r.key, t = r.value;
7402
7377
  if (R(t) === "array") {
7403
7378
  if (t.length < 1 || t.length > 4)
@@ -7415,13 +7390,13 @@ function sl(r) {
7415
7390
  }));
7416
7391
  return o;
7417
7392
  } else
7418
- return jr({
7393
+ return Nr({
7419
7394
  key: e,
7420
7395
  value: t,
7421
7396
  valueSpec: {}
7422
7397
  });
7423
7398
  }
7424
- function ll(r) {
7399
+ function Vs(r) {
7425
7400
  const e = r.key, t = r.value, n = R(t), a = r.styleSpec;
7426
7401
  if (n !== "array" || t.length < 1 || t.length % 2 !== 0)
7427
7402
  return [new g(e, t, "variableAnchorOffsetCollection requires a non-empty array of even length")];
@@ -7431,7 +7406,7 @@ function ll(r) {
7431
7406
  key: `${e}[${i}]`,
7432
7407
  value: t[i],
7433
7408
  valueSpec: a.layout_symbol["text-anchor"]
7434
- })), o = o.concat(Or({
7409
+ })), o = o.concat(jr({
7435
7410
  key: `${e}[${i + 1}]`,
7436
7411
  value: t[i + 1],
7437
7412
  valueSpec: {
@@ -7444,7 +7419,7 @@ function ll(r) {
7444
7419
  }));
7445
7420
  return o;
7446
7421
  }
7447
- function za(r) {
7422
+ function Ra(r) {
7448
7423
  let e = [];
7449
7424
  const t = r.value, n = r.key;
7450
7425
  if (Array.isArray(t)) {
@@ -7475,7 +7450,7 @@ function za(r) {
7475
7450
  value: t
7476
7451
  });
7477
7452
  }
7478
- function ul(r) {
7453
+ function Hs(r) {
7479
7454
  const e = r.value, t = r.styleSpec, n = t.projection, a = r.style, o = R(e);
7480
7455
  if (e === void 0)
7481
7456
  return [];
@@ -7492,57 +7467,57 @@ function ul(r) {
7492
7467
  })) : i = i.concat([new g(s, e[s], `unknown property "${s}"`)]);
7493
7468
  return i;
7494
7469
  }
7495
- function cl(r) {
7470
+ function Ks(r) {
7496
7471
  const e = r.key;
7497
7472
  let t = r.value;
7498
7473
  t = t instanceof String ? t.valueOf() : t;
7499
7474
  const n = R(t);
7500
- return n === "array" && !fl(t) && !pl(t) ? [new g(e, t, `projection expected, invalid array ${JSON.stringify(t)} found`)] : ["array", "string"].includes(n) ? [] : [new g(e, t, `projection expected, invalid type "${n}" found`)];
7475
+ return n === "array" && !Zs(t) && !Xs(t) ? [new g(e, t, `projection expected, invalid array ${JSON.stringify(t)} found`)] : ["array", "string"].includes(n) ? [] : [new g(e, t, `projection expected, invalid type "${n}" found`)];
7501
7476
  }
7502
- function pl(r) {
7477
+ function Xs(r) {
7503
7478
  return !!["interpolate", "step", "literal"].includes(r[0]);
7504
7479
  }
7505
- function fl(r) {
7480
+ function Zs(r) {
7506
7481
  return Array.isArray(r) && r.length === 3 && typeof r[0] == "string" && typeof r[1] == "string" && typeof r[2] == "number";
7507
7482
  }
7508
- const Sn = {
7483
+ const Cn = {
7509
7484
  "*"() {
7510
7485
  return [];
7511
7486
  },
7512
- array: Or,
7513
- boolean: tl,
7514
- number: jr,
7515
- color: rl,
7516
- constants: ka,
7487
+ array: jr,
7488
+ boolean: js,
7489
+ number: Nr,
7490
+ color: Ns,
7491
+ constants: Sa,
7517
7492
  enum: nt,
7518
- filter: Nr,
7519
- function: Ca,
7520
- layer: _a,
7493
+ filter: Ur,
7494
+ function: ka,
7495
+ layer: Aa,
7521
7496
  object: J,
7522
- source: Ma,
7523
- light: Ia,
7524
- sky: Pa,
7525
- terrain: Ra,
7526
- projection: ul,
7527
- projectionDefinition: cl,
7497
+ source: _a,
7498
+ light: Ma,
7499
+ sky: Ia,
7500
+ terrain: Pa,
7501
+ projection: Hs,
7502
+ projectionDefinition: Ks,
7528
7503
  string: ze,
7529
- formatted: ol,
7530
- resolvedImage: il,
7531
- padding: sl,
7532
- variableAnchorOffsetCollection: ll,
7533
- sprite: za
7504
+ formatted: Bs,
7505
+ resolvedImage: qs,
7506
+ padding: Gs,
7507
+ variableAnchorOffsetCollection: Vs,
7508
+ sprite: Ra
7534
7509
  };
7535
7510
  function Ze(r) {
7536
7511
  const e = r.value, t = r.valueSpec, n = r.styleSpec;
7537
- return r.validateSpec = Ze, t.expression && Fr(U(e)) ? Ca(r) : t.expression && wa(Re(e)) ? Be(r) : t.type && Sn[t.type] ? Sn[t.type](r) : J(gt({}, r, {
7512
+ return r.validateSpec = Ze, t.expression && Or(U(e)) ? ka(r) : t.expression && ba(Re(e)) ? Be(r) : t.type && Cn[t.type] ? Cn[t.type](r) : J(gt({}, r, {
7538
7513
  valueSpec: t.type ? n[t.type] : t
7539
7514
  }));
7540
7515
  }
7541
- function $a(r) {
7516
+ function za(r) {
7542
7517
  const e = r.value, t = r.key, n = ze(r);
7543
7518
  return n.length || (e.indexOf("{fontstack}") === -1 && n.push(new g(t, e, '"glyphs" url must include a "{fontstack}" token')), e.indexOf("{range}") === -1 && n.push(new g(t, e, '"glyphs" url must include a "{range}" token'))), n;
7544
7519
  }
7545
- function re(r, e = Gi) {
7520
+ function re(r, e = Ti) {
7546
7521
  let t = [];
7547
7522
  return t = t.concat(Ze({
7548
7523
  key: "",
@@ -7552,29 +7527,29 @@ function re(r, e = Gi) {
7552
7527
  style: r,
7553
7528
  validateSpec: Ze,
7554
7529
  objectElementValidators: {
7555
- glyphs: $a,
7530
+ glyphs: za,
7556
7531
  "*"() {
7557
7532
  return [];
7558
7533
  }
7559
7534
  }
7560
- })), r.constants && (t = t.concat(ka({
7535
+ })), r.constants && (t = t.concat(Sa({
7561
7536
  key: "constants",
7562
7537
  value: r.constants,
7563
7538
  style: r,
7564
7539
  styleSpec: e,
7565
7540
  validateSpec: Ze
7566
- }))), Fa(t);
7567
- }
7568
- re.source = de(fe(Ma));
7569
- re.sprite = de(fe(za));
7570
- re.glyphs = de(fe($a));
7571
- re.light = de(fe(Ia));
7572
- re.sky = de(fe(Pa));
7573
- re.terrain = de(fe(Ra));
7574
- re.layer = de(fe(_a));
7575
- re.filter = de(fe(Nr));
7576
- re.paintProperty = de(fe(Ta));
7577
- re.layoutProperty = de(fe(Aa));
7541
+ }))), $a(t);
7542
+ }
7543
+ re.source = de(fe(_a));
7544
+ re.sprite = de(fe(Ra));
7545
+ re.glyphs = de(fe(za));
7546
+ re.light = de(fe(Ma));
7547
+ re.sky = de(fe(Ia));
7548
+ re.terrain = de(fe(Pa));
7549
+ re.layer = de(fe(Aa));
7550
+ re.filter = de(fe(Ur));
7551
+ re.paintProperty = de(fe(Ea));
7552
+ re.layoutProperty = de(fe(Ta));
7578
7553
  function fe(r) {
7579
7554
  return function(e) {
7580
7555
  return r({
@@ -7583,15 +7558,15 @@ function fe(r) {
7583
7558
  });
7584
7559
  };
7585
7560
  }
7586
- function Fa(r) {
7561
+ function $a(r) {
7587
7562
  return [].concat(r).sort((e, t) => e.line - t.line);
7588
7563
  }
7589
7564
  function de(r) {
7590
7565
  return function(...e) {
7591
- return Fa(r.apply(this, e));
7566
+ return $a(r.apply(this, e));
7592
7567
  };
7593
7568
  }
7594
- function kn(r) {
7569
+ function Ln(r) {
7595
7570
  if (!r)
7596
7571
  return {
7597
7572
  style: Ke[Gt[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),
@@ -7600,7 +7575,7 @@ function kn(r) {
7600
7575
  isFallback: !0
7601
7576
  };
7602
7577
  if (typeof r == "string") {
7603
- const t = hl(r);
7578
+ const t = Ys(r);
7604
7579
  return t.isValidStyle ? {
7605
7580
  style: t.styleObject,
7606
7581
  requiresUrlMonitoring: !1,
@@ -7611,20 +7586,20 @@ function kn(r) {
7611
7586
  // default styles don't require URL monitoring
7612
7587
  isFallback: !0
7613
7588
  } : r.startsWith("http") ? { style: r, requiresUrlMonitoring: !0, isFallback: !1 } : r.toLowerCase().includes(".json") ? {
7614
- style: dl(r),
7589
+ style: Ws(r),
7615
7590
  requiresUrlMonitoring: !0,
7616
7591
  isFallback: !1
7617
7592
  } : {
7618
- style: co(r),
7593
+ style: uo(r),
7619
7594
  requiresUrlMonitoring: !0,
7620
7595
  isFallback: !1
7621
7596
  };
7622
7597
  }
7623
- return r instanceof po ? {
7598
+ return r instanceof co ? {
7624
7599
  style: r.getExpandedStyleURL(),
7625
7600
  requiresUrlMonitoring: !1,
7626
7601
  isFallback: !1
7627
- } : r instanceof fo ? {
7602
+ } : r instanceof po ? {
7628
7603
  style: r.getDefaultVariant().getExpandedStyleURL(),
7629
7604
  requiresUrlMonitoring: !1,
7630
7605
  isFallback: !1
@@ -7639,14 +7614,14 @@ function kn(r) {
7639
7614
  isFallback: !0
7640
7615
  };
7641
7616
  }
7642
- function dl(r) {
7617
+ function Ws(r) {
7643
7618
  try {
7644
7619
  return new URL(r).href;
7645
7620
  } catch {
7646
7621
  }
7647
7622
  return new URL(r, location.origin).href;
7648
7623
  }
7649
- function hl(r) {
7624
+ function Ys(r) {
7650
7625
  try {
7651
7626
  const e = JSON.parse(r), t = re(e);
7652
7627
  return {
@@ -7662,18 +7637,25 @@ function hl(r) {
7662
7637
  };
7663
7638
  }
7664
7639
  }
7665
- class yl {
7640
+ function ye(r, e, t) {
7641
+ const n = window.document.createElement(r);
7642
+ return e !== void 0 && (n.className = e), t && t.appendChild(n), n;
7643
+ }
7644
+ function Dr(r) {
7645
+ r.parentNode && r.parentNode.removeChild(r);
7646
+ }
7647
+ class Js {
7666
7648
  constructor() {
7667
7649
  x(this, "_map");
7668
7650
  x(this, "_container");
7669
7651
  x(this, "_terrainButton");
7670
- Bo(["_toggleTerrain", "_updateTerrainIcon"], this);
7652
+ Lo(["_toggleTerrain", "_updateTerrainIcon"], this);
7671
7653
  }
7672
7654
  onAdd(e) {
7673
- return this._map = e, this._container = he("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._terrainButton = he("button", "maplibregl-ctrl-terrain", this._container), he("span", "maplibregl-ctrl-icon", this._terrainButton).setAttribute("aria-hidden", "true"), this._terrainButton.type = "button", this._terrainButton.addEventListener("click", this._toggleTerrain), this._updateTerrainIcon(), this._map.on("terrain", this._updateTerrainIcon), this._container;
7655
+ return this._map = e, this._container = ye("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._terrainButton = ye("button", "maplibregl-ctrl-terrain", this._container), ye("span", "maplibregl-ctrl-icon", this._terrainButton).setAttribute("aria-hidden", "true"), this._terrainButton.type = "button", this._terrainButton.addEventListener("click", this._toggleTerrain), this._updateTerrainIcon(), this._map.on("terrain", this._updateTerrainIcon), this._container;
7674
7656
  }
7675
7657
  onRemove() {
7676
- vr(this._container), this._map.off("terrain", this._updateTerrainIcon), this._map = void 0;
7658
+ Dr(this._container), this._map.off("terrain", this._updateTerrainIcon), this._map = void 0;
7677
7659
  }
7678
7660
  _toggleTerrain() {
7679
7661
  this._map.hasTerrain() ? this._map.disableTerrain() : this._map.enableTerrain(), this._updateTerrainIcon();
@@ -7682,7 +7664,7 @@ class yl {
7682
7664
  this._terrainButton.classList.remove("maplibregl-ctrl-terrain"), this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"), this._map.hasTerrain() ? (this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"), this._terrainButton.title = this._map._getUIString("TerrainControl.Disable")) : (this._terrainButton.classList.add("maplibregl-ctrl-terrain"), this._terrainButton.title = this._map._getUIString("TerrainControl.Enable"));
7683
7665
  }
7684
7666
  }
7685
- class ml extends Qo {
7667
+ class Qs extends Fo {
7686
7668
  constructor(t = {}) {
7687
7669
  super({
7688
7670
  showCompass: t.showCompass ?? !0,
@@ -7708,11 +7690,11 @@ class ml extends Qo {
7708
7690
  return a.clickFunction = n, a;
7709
7691
  }
7710
7692
  }
7711
- const Cn = k.Marker, Ln = k.LngLat, gl = k.LngLatBounds;
7712
- class vl extends ei {
7693
+ const En = k.Marker, Tn = k.LngLat, el = k.LngLatBounds;
7694
+ class tl extends Oo {
7713
7695
  constructor() {
7714
7696
  super(...arguments);
7715
- x(this, "lastUpdatedCenter", new Ln(0, 0));
7697
+ x(this, "lastUpdatedCenter", new Tn(0, 0));
7716
7698
  /**
7717
7699
  * Update the camera location to center on the current position
7718
7700
  *
@@ -7721,12 +7703,12 @@ class vl extends ei {
7721
7703
  */
7722
7704
  x(this, "_updateCamera", (t) => {
7723
7705
  var c;
7724
- const n = new Ln(t.coords.longitude, t.coords.latitude), a = t.coords.accuracy, i = {
7706
+ const n = new Tn(t.coords.longitude, t.coords.latitude), a = t.coords.accuracy, i = {
7725
7707
  bearing: this._map.getBearing(),
7726
7708
  ...this.options.fitBoundsOptions,
7727
7709
  linear: !0
7728
7710
  }, s = this._map.getZoom();
7729
- s > (((c = this.options.fitBoundsOptions) == null ? void 0 : c.maxZoom) ?? 30) && (i.zoom = s), this._map.fitBounds(gl.fromLngLat(n, a), i, {
7711
+ s > (((c = this.options.fitBoundsOptions) == null ? void 0 : c.maxZoom) ?? 30) && (i.zoom = s), this._map.fitBounds(el.fromLngLat(n, a), i, {
7730
7712
  geolocateSource: !0
7731
7713
  // tag this camera change so it won't cause the control to change to background state
7732
7714
  });
@@ -7747,7 +7729,7 @@ class vl extends ei {
7747
7729
  const n = this._map._getUIString("GeolocateControl.FindMyLocation");
7748
7730
  this._geolocateButton.disabled = !1, this._geolocateButton.title = n, this._geolocateButton.setAttribute("aria-label", n);
7749
7731
  }
7750
- this.options.trackUserLocation && (this._geolocateButton.setAttribute("aria-pressed", "false"), this._watchState = "OFF"), this.options.showUserLocation && (this._dotElement = he("div", "maplibregl-user-location-dot"), this._userLocationDotMarker = new Cn({ element: this._dotElement }), this._circleElement = he("div", "maplibregl-user-location-accuracy-circle"), this._accuracyCircleMarker = new Cn({
7732
+ this.options.trackUserLocation && (this._geolocateButton.setAttribute("aria-pressed", "false"), this._watchState = "OFF"), this.options.showUserLocation && (this._dotElement = ye("div", "maplibregl-user-location-dot"), this._userLocationDotMarker = new En({ element: this._dotElement }), this._circleElement = ye("div", "maplibregl-user-location-accuracy-circle"), this._accuracyCircleMarker = new En({
7751
7733
  element: this._circleElement,
7752
7734
  pitchAlignment: "map"
7753
7735
  }), this.options.trackUserLocation && (this._watchState = "OFF"), this._map.on("move", this._onZoom)), this._geolocateButton.addEventListener("click", this.trigger.bind(this)), this._setup = !0, this.options.trackUserLocation && this._map.on("moveend", (n) => {
@@ -7789,7 +7771,7 @@ class vl extends ei {
7789
7771
  }
7790
7772
  }
7791
7773
  }
7792
- var K, ne, ve, be, X, ot, q, Oa, W, ja;
7774
+ var K, ne, ve, be, X, ot, q, Fa, W, Oa;
7793
7775
  class er {
7794
7776
  constructor(e, t) {
7795
7777
  ge(this, q);
@@ -7853,21 +7835,21 @@ class er {
7853
7835
  return I(this, X) || this.map.setGlyphs(e, t), H(this, q, W).call(this), this;
7854
7836
  }
7855
7837
  onAdd(e) {
7856
- Ce(this, ne, e), Ce(this, ve, he("div", "maplibregl-ctrl maplibregl-ctrl-group"));
7838
+ Ce(this, ne, e), Ce(this, ve, ye("div", "maplibregl-ctrl maplibregl-ctrl-group"));
7857
7839
  for (const [t, n] of Object.entries(I(this, K).containerStyle))
7858
7840
  I(this, ve).style.setProperty(t, n);
7859
- return I(this, K).container = I(this, ve), I(this, K).zoom = e.getZoom() + I(this, K).zoomAdjust, this.map = new Dr(I(this, K)), this.map.once("style.load", () => {
7841
+ return I(this, K).container = I(this, ve), I(this, K).zoom = e.getZoom() + I(this, K).zoomAdjust, this.map = new qr(I(this, K)), this.map.once("style.load", () => {
7860
7842
  this.map.resize();
7861
7843
  }), this.map.once("load", () => {
7862
- H(this, q, Oa).call(this, I(this, K).parentRect), Ce(this, ot, H(this, q, ja).call(this));
7844
+ H(this, q, Fa).call(this, I(this, K).parentRect), Ce(this, ot, H(this, q, Oa).call(this));
7863
7845
  }), I(this, ve);
7864
7846
  }
7865
7847
  onRemove() {
7866
7848
  var e;
7867
- (e = I(this, ot)) == null || e.call(this), vr(I(this, ve));
7849
+ (e = I(this, ot)) == null || e.call(this), Dr(I(this, ve));
7868
7850
  }
7869
7851
  }
7870
- K = new WeakMap(), ne = new WeakMap(), ve = new WeakMap(), be = new WeakMap(), X = new WeakMap(), ot = new WeakMap(), q = new WeakSet(), Oa = function(e) {
7852
+ K = new WeakMap(), ne = new WeakMap(), ve = new WeakMap(), be = new WeakMap(), X = new WeakMap(), ot = new WeakMap(), q = new WeakSet(), Fa = function(e) {
7871
7853
  e === void 0 || e.linePaint === void 0 && e.fillPaint === void 0 || (Ce(this, be, {
7872
7854
  type: "Feature",
7873
7855
  properties: {
@@ -7910,7 +7892,7 @@ K = new WeakMap(), ne = new WeakMap(), ve = new WeakMap(), be = new WeakMap(), X
7910
7892
  I(this, be).geometry.coordinates = [[l.toArray(), u.toArray(), s.toArray(), i.toArray(), l.toArray()]];
7911
7893
  const c = this.map.getSource("parentRect");
7912
7894
  c !== void 0 && c.setData(I(this, be));
7913
- }, ja = function() {
7895
+ }, Oa = function() {
7914
7896
  const { pitchAdjust: e } = I(this, K), t = () => {
7915
7897
  i("parent");
7916
7898
  }, n = () => {
@@ -7933,17 +7915,17 @@ K = new WeakMap(), ne = new WeakMap(), ve = new WeakMap(), be = new WeakMap(), X
7933
7915
  o();
7934
7916
  };
7935
7917
  };
7936
- class bl {
7918
+ class rl {
7937
7919
  constructor() {
7938
7920
  x(this, "map");
7939
7921
  x(this, "container");
7940
7922
  x(this, "projectionButton");
7941
7923
  }
7942
7924
  onAdd(e) {
7943
- return this.map = e, this.container = he("div", "maplibregl-ctrl maplibregl-ctrl-group"), this.projectionButton = he("button", "maplibregl-ctrl-projection", this.container), he("span", "maplibregl-ctrl-icon", this.projectionButton).setAttribute("aria-hidden", "true"), this.projectionButton.type = "button", this.projectionButton.addEventListener("click", this.toggleProjection.bind(this)), e.on("projectiontransition", this.updateProjectionIcon.bind(this)), this.updateProjectionIcon(), this.container;
7925
+ return this.map = e, this.container = ye("div", "maplibregl-ctrl maplibregl-ctrl-group"), this.projectionButton = ye("button", "maplibregl-ctrl-projection", this.container), ye("span", "maplibregl-ctrl-icon", this.projectionButton).setAttribute("aria-hidden", "true"), this.projectionButton.type = "button", this.projectionButton.addEventListener("click", this.toggleProjection.bind(this)), e.on("projectiontransition", this.updateProjectionIcon.bind(this)), this.updateProjectionIcon(), this.container;
7944
7926
  }
7945
7927
  onRemove() {
7946
- vr(this.container), this.map.off("projectiontransition", this.updateProjectionIcon), this.map = void 0;
7928
+ Dr(this.container), this.map.off("projectiontransition", this.updateProjectionIcon), this.map = void 0;
7947
7929
  }
7948
7930
  toggleProjection() {
7949
7931
  this.map.getProjection() === void 0 && this.map.setProjection({ type: "mercator" }), this.map.isGlobeProjection() ? this.map.enableMercatorProjection() : this.map.enableGlobeProjection(), this.updateProjectionIcon();
@@ -7952,6 +7934,25 @@ class bl {
7952
7934
  this.projectionButton.classList.remove("maplibregl-ctrl-projection-globe"), this.projectionButton.classList.remove("maplibregl-ctrl-projection-mercator"), this.map.isGlobeProjection() ? (this.projectionButton.classList.add("maplibregl-ctrl-projection-mercator"), this.projectionButton.title = "Enable Mercator projection") : (this.projectionButton.classList.add("maplibregl-ctrl-projection-globe"), this.projectionButton.title = "Enable Globe projection");
7953
7935
  }
7954
7936
  }
7937
+ const nl = "@maptiler/sdk", al = "3.1.0rc3", ol = "The Javascript & TypeScript map SDK tailored for MapTiler Cloud", il = "MapTiler", sl = "dist/maptiler-sdk.mjs", ll = "dist/maptiler-sdk.d.ts", ul = "dist/maptiler-sdk.css", cl = "module", pl = { ".": { import: "./dist/maptiler-sdk.mjs", types: "./dist/maptiler-sdk.d.ts" }, "./dist/maptiler-sdk.css": { import: "./dist/maptiler-sdk.css" }, "./style.css": { import: "./dist/maptiler-sdk.css" } }, fl = ["maptiler", "map", "sdk", "webmap", "cloud", "webGL", "maplibre"], dl = "https://docs.maptiler.com/sdk-js/", hl = "BSD-3-Clause", yl = { type: "git", url: "https://github.com/maptiler/maptiler-sdk-js.git" }, ml = { prepare: "husky", doc: "rm -rf docs/* && typedoc --out docs && cp -r images docs/", ncu: "npx npm-check-updates", lint: "eslint src", "lint:fix": "eslint src --fix", "test:watch": "vitest watch -c vite.config-test.ts --dom", test: "vitest run -c vite.config-test.ts --dom", "install:clean": "rm -rf build/ dist/ node_modules/ && npm ci", dev: 'concurrently "vite -c vite.config-dev.ts" "npm run dev-umd"', "dev-umd": "npm run build-css && tsc && NODE_ENV=development vite build -w -c vite.config-umd.ts", "build-css": "mkdir -p dist build && node scripts/replace-path-with-content.js src/style/style_template.css dist/tmp_maptiler-sdk.css && cat node_modules/maplibre-gl/dist/maplibre-gl.css dist/tmp_maptiler-sdk.css > dist/maptiler-sdk.css && rm dist/tmp_maptiler-sdk.css && cp dist/maptiler-sdk.css build/maptiler-sdk.css", "build-umd": "tsc && NODE_ENV=production vite build -c vite.config-umd.ts", "build-es": "tsc && NODE_ENV=production vite build -c vite.config-es.ts", build: "npm run build-es; npm run build-umd; npm run build-css", make: "npm run install:clean && npm run build" }, gl = { "@canvas/image-data": "^1.0.0", "@eslint/js": "^9.21.0", "@types/color-convert": "^2.0.4", "@types/color-name": "^2.0.0", "@types/uuid": "^10.0.0", "@types/xmldom": "^0.1.31", "@vitest/web-worker": "^3.0.9", "@xmldom/xmldom": "^0.8.10", concurrently: "^9.1.2", eslint: "^9.21.0", "eslint-config-prettier": "^10.0.2", "eslint-plugin-prettier": "^5.2.3", "happy-dom": "^17.4.4", husky: "^8.0.0", "lint-staged": "^15.4.3", prettier: "3.5.2", typedoc: "^0.27.6", typescript: "^5.7.3", "typescript-eslint": "^8.25.0", vite: "^6.0.7", "vite-plugin-dts": "^4.5.0", vitest: "^3.0.9" }, vl = { "@maplibre/maplibre-gl-style-spec": "^23.0.0", "@maptiler/client": "^2.2.0", events: "^3.3.0", "gl-matrix": "^3.4.3", "js-base64": "^3.7.7", "maplibre-gl": "^5.0.1", uuid: "^11.0.5" }, bl = {
7938
+ name: nl,
7939
+ version: al,
7940
+ description: ol,
7941
+ author: il,
7942
+ module: sl,
7943
+ types: ll,
7944
+ style: ul,
7945
+ type: cl,
7946
+ exports: pl,
7947
+ keywords: fl,
7948
+ homepage: dl,
7949
+ license: hl,
7950
+ repository: yl,
7951
+ scripts: ml,
7952
+ "lint-staged": { "*.ts": "npm run lint:fix" },
7953
+ devDependencies: gl,
7954
+ dependencies: vl
7955
+ };
7955
7956
  class wl {
7956
7957
  /**
7957
7958
  *
@@ -7985,7 +7986,7 @@ class wl {
7985
7986
  }
7986
7987
  preparePayload() {
7987
7988
  const e = new URL(V.telemetryURL);
7988
- return e.searchParams.append("sdk", Yn.version), e.searchParams.append("key", N.apiKey), e.searchParams.append("mtsid", gr), e.searchParams.append("session", N.session ? "1" : "0"), e.searchParams.append("caching", N.caching ? "1" : "0"), e.searchParams.append("lang-updated", this.map.isLanguageUpdated() ? "1" : "0"), e.searchParams.append("terrain", this.map.getTerrain() ? "1" : "0"), e.searchParams.append("globe", this.map.isGlobeProjection() ? "1" : "0"), this.registeredModules.size > 0 && e.searchParams.append("modules", Array.from(this.registeredModules).join("|")), e.href;
7989
+ return e.searchParams.append("sdk", bl.version), e.searchParams.append("key", N.apiKey), e.searchParams.append("mtsid", br), e.searchParams.append("session", N.session ? "1" : "0"), e.searchParams.append("caching", N.caching ? "1" : "0"), e.searchParams.append("lang-updated", this.map.isLanguageUpdated() ? "1" : "0"), e.searchParams.append("terrain", this.map.getTerrain() ? "1" : "0"), e.searchParams.append("globe", this.map.isGlobeProjection() ? "1" : "0"), this.registeredModules.size > 0 && e.searchParams.append("modules", Array.from(this.registeredModules).join("|")), e.href;
7989
7990
  }
7990
7991
  }
7991
7992
  var at = typeof Float32Array < "u" ? Float32Array : Array;
@@ -8009,7 +8010,7 @@ function kl(r, e, t) {
8009
8010
  var n = t[0], a = t[1], o = t[2];
8010
8011
  return r[0] = e[0] * n, r[1] = e[1] * n, r[2] = e[2] * n, r[3] = e[3] * n, r[4] = e[4] * a, r[5] = e[5] * a, r[6] = e[6] * a, r[7] = e[7] * a, r[8] = e[8] * o, r[9] = e[9] * o, r[10] = e[10] * o, r[11] = e[11] * o, r[12] = e[12], r[13] = e[13], r[14] = e[14], r[15] = e[15], r;
8011
8012
  }
8012
- function En(r, e, t) {
8013
+ function An(r, e, t) {
8013
8014
  var n = Math.sin(t), a = Math.cos(t), o = e[4], i = e[5], s = e[6], l = e[7], u = e[8], c = e[9], p = e[10], f = e[11];
8014
8015
  return e !== r && (r[0] = e[0], r[1] = e[1], r[2] = e[2], r[3] = e[3], r[12] = e[12], r[13] = e[13], r[14] = e[14], r[15] = e[15]), r[4] = o * a + u * n, r[5] = i * a + c * n, r[6] = s * a + p * n, r[7] = l * a + f * n, r[8] = u * a - o * n, r[9] = c * a - i * n, r[10] = p * a - s * n, r[11] = f * a - l * n, r;
8015
8016
  }
@@ -8017,7 +8018,7 @@ function Cl(r, e, t) {
8017
8018
  var n = Math.sin(t), a = Math.cos(t), o = e[0], i = e[1], s = e[2], l = e[3], u = e[8], c = e[9], p = e[10], f = e[11];
8018
8019
  return e !== r && (r[4] = e[4], r[5] = e[5], r[6] = e[6], r[7] = e[7], r[12] = e[12], r[13] = e[13], r[14] = e[14], r[15] = e[15]), r[0] = o * a - u * n, r[1] = i * a - c * n, r[2] = s * a - p * n, r[3] = l * a - f * n, r[8] = o * n + u * a, r[9] = i * n + c * a, r[10] = s * n + p * a, r[11] = l * n + f * a, r;
8019
8020
  }
8020
- function Tn(r, e, t) {
8021
+ function _n(r, e, t) {
8021
8022
  var n = Math.sin(t), a = Math.cos(t), o = e[0], i = e[1], s = e[2], l = e[3], u = e[4], c = e[5], p = e[6], f = e[7];
8022
8023
  return e !== r && (r[8] = e[8], r[9] = e[9], r[10] = e[10], r[11] = e[11], r[12] = e[12], r[13] = e[13], r[14] = e[14], r[15] = e[15]), r[0] = o * a + u * n, r[1] = i * a + c * n, r[2] = s * a + p * n, r[3] = l * a + f * n, r[4] = u * a - o * n, r[5] = c * a - i * n, r[6] = p * a - s * n, r[7] = f * a - l * n, r;
8023
8024
  }
@@ -8038,7 +8039,7 @@ function tr(r, e) {
8038
8039
  var t = e[0], n = e[1], a = e[2], o = t * t + n * n + a * a;
8039
8040
  return o > 0 && (o = 1 / Math.sqrt(o)), r[0] = e[0] * o, r[1] = e[1] * o, r[2] = e[2] * o, r;
8040
8041
  }
8041
- function An(r, e, t) {
8042
+ function Mn(r, e, t) {
8042
8043
  var n = e[0], a = e[1], o = e[2], i = t[0], s = t[1], l = t[2];
8043
8044
  return r[0] = a * l - o * s, r[1] = o * i - n * l, r[2] = n * s - a * i, r;
8044
8045
  }
@@ -8054,9 +8055,9 @@ function An(r, e, t) {
8054
8055
  function Al(r) {
8055
8056
  return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
8056
8057
  }
8057
- var rr, _n;
8058
+ var rr, In;
8058
8059
  function _l() {
8059
- return _n || (_n = 1, rr = {
8060
+ return In || (In = 1, rr = {
8060
8061
  aliceblue: [240, 248, 255],
8061
8062
  antiquewhite: [250, 235, 215],
8062
8063
  aqua: [0, 255, 255],
@@ -8207,10 +8208,10 @@ function _l() {
8207
8208
  yellowgreen: [154, 205, 50]
8208
8209
  }), rr;
8209
8210
  }
8210
- var nr, Mn;
8211
- function Na() {
8212
- if (Mn) return nr;
8213
- Mn = 1;
8211
+ var nr, Pn;
8212
+ function ja() {
8213
+ if (Pn) return nr;
8214
+ Pn = 1;
8214
8215
  const r = _l(), e = {};
8215
8216
  for (const a of Object.keys(r))
8216
8217
  e[r[a]] = a;
@@ -8510,11 +8511,11 @@ function Na() {
8510
8511
  return [(a[0] + a[1] + a[2]) / 3 / 255 * 100];
8511
8512
  }, nr;
8512
8513
  }
8513
- var ar, In;
8514
+ var ar, Rn;
8514
8515
  function Ml() {
8515
- if (In) return ar;
8516
- In = 1;
8517
- const r = Na();
8516
+ if (Rn) return ar;
8517
+ Rn = 1;
8518
+ const r = ja();
8518
8519
  function e() {
8519
8520
  const o = {}, i = Object.keys(r);
8520
8521
  for (let s = i.length, l = 0; l < s; l++)
@@ -8558,11 +8559,11 @@ function Ml() {
8558
8559
  return s;
8559
8560
  }, ar;
8560
8561
  }
8561
- var or, Pn;
8562
+ var or, zn;
8562
8563
  function Il() {
8563
- if (Pn) return or;
8564
- Pn = 1;
8565
- const r = Na(), e = Ml(), t = {}, n = Object.keys(r);
8564
+ if (zn) return or;
8565
+ zn = 1;
8566
+ const r = ja(), e = Ml(), t = {}, n = Object.keys(r);
8566
8567
  function a(i) {
8567
8568
  const s = function(...l) {
8568
8569
  const u = l[0];
@@ -8595,7 +8596,7 @@ function Il() {
8595
8596
  }
8596
8597
  var Pl = Il();
8597
8598
  const Rl = /* @__PURE__ */ Al(Pl);
8598
- function Rn({ gl: r, type: e, source: t }) {
8599
+ function $n({ gl: r, type: e, source: t }) {
8599
8600
  const n = r.createShader(e);
8600
8601
  if (n === null)
8601
8602
  throw new Error("Cannot create shader");
@@ -8604,11 +8605,11 @@ function Rn({ gl: r, type: e, source: t }) {
8604
8605
  return n;
8605
8606
  }
8606
8607
  function zl({ gl: r, vertexShaderSource: e, fragmentShaderSource: t }) {
8607
- const n = Rn({
8608
+ const n = $n({
8608
8609
  gl: r,
8609
8610
  type: r.VERTEX_SHADER,
8610
8611
  source: e
8611
- }), a = Rn({ gl: r, type: r.FRAGMENT_SHADER, source: t }), o = r.createProgram();
8612
+ }), a = $n({ gl: r, type: r.FRAGMENT_SHADER, source: t }), o = r.createProgram();
8612
8613
  if (r.attachShader(o, n), r.attachShader(o, a), r.linkProgram(o), !r.getProgramParameter(o, r.LINK_STATUS))
8613
8614
  throw console.error("Error: ", r.getProgramInfoLog(o)), new Error("Cannot link shader program");
8614
8615
  return o;
@@ -8619,7 +8620,7 @@ function $l(r, e, t) {
8619
8620
  throw new Error(`Cannot get uniform location for ${t}`);
8620
8621
  return n;
8621
8622
  }
8622
- function Ua({
8623
+ function Na({
8623
8624
  gl: r,
8624
8625
  vertexShaderSource: e,
8625
8626
  fragmentShaderSource: t,
@@ -8642,7 +8643,7 @@ function Ua({
8642
8643
  indexBufferLength: f
8643
8644
  };
8644
8645
  }
8645
- function Da(r) {
8646
+ function Ua(r) {
8646
8647
  if (!r)
8647
8648
  return [1, 1, 1, 0];
8648
8649
  if (r === "transparent")
@@ -8670,7 +8671,7 @@ function Ol(r) {
8670
8671
  const e = Fl;
8671
8672
  return e ? (e.fillStyle = r, e.fillStyle) : "#000000";
8672
8673
  }
8673
- const Ur = 1, Q = Ur / 2, ee = Ur / 2, te = Ur / 2, jl = [-0.5, -0.5, te, Q, -0.5, te, Q, ee, te, -0.5, ee, te], Nl = [-0.5, -0.5, -0.5, -0.5, ee, -0.5, Q, ee, -0.5, Q, -0.5, -0.5], Ul = [-0.5, ee, -0.5, -0.5, ee, te, Q, ee, te, Q, ee, -0.5], Dl = [-0.5, -0.5, -0.5, Q, -0.5, -0.5, Q, -0.5, te, -0.5, -0.5, te], Bl = [Q, -0.5, -0.5, Q, ee, -0.5, Q, ee, te, Q, -0.5, te], ql = [-0.5, -0.5, -0.5, -0.5, -0.5, te, -0.5, ee, te, -0.5, ee, -0.5], Gl = [...jl, ...Nl, ...Ul, ...Dl, ...Bl, ...ql], Vl = [
8674
+ const Br = 1, Q = Br / 2, ee = Br / 2, te = Br / 2, jl = [-0.5, -0.5, te, Q, -0.5, te, Q, ee, te, -0.5, ee, te], Nl = [-0.5, -0.5, -0.5, -0.5, ee, -0.5, Q, ee, -0.5, Q, -0.5, -0.5], Ul = [-0.5, ee, -0.5, -0.5, ee, te, Q, ee, te, Q, ee, -0.5], Dl = [-0.5, -0.5, -0.5, Q, -0.5, -0.5, Q, -0.5, te, -0.5, -0.5, te], Bl = [Q, -0.5, -0.5, Q, ee, -0.5, Q, ee, te, Q, -0.5, te], ql = [-0.5, -0.5, -0.5, -0.5, -0.5, te, -0.5, ee, te, -0.5, ee, -0.5], Gl = [...jl, ...Nl, ...Ul, ...Dl, ...Bl, ...ql], Vl = [
8674
8675
  // Front
8675
8676
  0,
8676
8677
  1,
@@ -8723,7 +8724,7 @@ void main(void) {
8723
8724
  vTextureCoord = vec3(-a_vertexPosition.x, a_vertexPosition.y, a_vertexPosition.z);
8724
8725
  gl_Position = u_projectionMatrix * u_modelViewMatrix * vec4(a_vertexPosition, 1.0);
8725
8726
  }
8726
- `, zn = `precision mediump float;
8727
+ `, Fn = `precision mediump float;
8727
8728
 
8728
8729
  varying vec3 vTextureCoord;
8729
8730
 
@@ -8788,7 +8789,7 @@ function Xl(r, e) {
8788
8789
  return r.TEXTURE_CUBE_MAP_NEGATIVE_Z;
8789
8790
  throw new Error(`[CubemapLayer][loadCubemapTexture]: Invalid key ${e}`);
8790
8791
  }
8791
- const Fe = "api.maptiler.com/resources/space", Zl = ["vertexPosition"], Wl = ["projectionMatrix", "modelViewMatrix", "cubeSampler", "bgColor", "fadeOpacity"], $n = "%USE_TEXTURE_MACRO_MARKER%", Yl = "#define USE_TEXTURE", Jl = {
8792
+ const Fe = "api.maptiler.com/resources/space", Zl = ["vertexPosition"], Wl = ["projectionMatrix", "modelViewMatrix", "cubeSampler", "bgColor", "fadeOpacity"], On = "%USE_TEXTURE_MACRO_MARKER%", Yl = "#define USE_TEXTURE", Jl = {
8792
8793
  color: "black",
8793
8794
  preset: "universe-dark"
8794
8795
  };
@@ -8801,7 +8802,7 @@ function Ql(r, e) {
8801
8802
  };
8802
8803
  return (r.faces || r.path) && delete t.preset, t;
8803
8804
  }
8804
- class Fn {
8805
+ class ir {
8805
8806
  constructor(e) {
8806
8807
  x(this, "id", "Cubemap Layer");
8807
8808
  x(this, "type", "custom");
@@ -8816,16 +8817,16 @@ class Fn {
8816
8817
  x(this, "cubemap");
8817
8818
  x(this, "texture");
8818
8819
  const t = Ql(e, Jl);
8819
- this.bgColor = Da(t.color), this.faces = On(t), this.useCubemapTexture = this.faces !== null;
8820
+ this.bgColor = Ua(t.color), this.faces = jn(t), this.useCubemapTexture = this.faces !== null;
8820
8821
  }
8821
8822
  updateCubemap() {
8822
8823
  this.useCubemapTexture = this.faces !== null;
8823
8824
  const e = Wl.filter((t) => t === "cubeSampler" ? this.useCubemapTexture : !0);
8824
- this.cubemap = Ua({
8825
+ this.cubemap = Na({
8825
8826
  gl: this.gl,
8826
8827
  vertexShaderSource: Hl,
8827
8828
  // Because we only want to use the read the texture in gl if we're supposed to
8828
- fragmentShaderSource: this.useCubemapTexture ? zn.replace($n, Yl) : zn.replace($n, ""),
8829
+ fragmentShaderSource: this.useCubemapTexture ? Fn.replace(On, Yl) : Fn.replace(On, ""),
8829
8830
  attributesKeys: Zl,
8830
8831
  uniformsKeys: e,
8831
8832
  vertices: Gl,
@@ -8866,9 +8867,9 @@ class Fn {
8866
8867
  throw new Error("Texture is undefined");
8867
8868
  e.useProgram(this.cubemap.shaderProgram), e.bindBuffer(e.ARRAY_BUFFER, this.cubemap.positionBuffer), e.vertexAttribPointer(this.cubemap.programInfo.attributesLocations.vertexPosition, 3, e.FLOAT, !1, 0, 0), e.enableVertexAttribArray(this.cubemap.programInfo.attributesLocations.vertexPosition);
8868
8869
  const n = 0.1, a = 1e4, o = e.canvas, i = o.clientWidth / o.clientHeight, s = this.map.transform, l = s.fov * (Math.PI / 180), u = We();
8869
- El(u, l, i, n, a), Tn(u, u, s.rollInRadians), En(u, u, -s.pitchInRadians), Tn(u, u, s.bearingInRadians);
8870
+ El(u, l, i, n, a), _n(u, u, s.rollInRadians), An(u, u, -s.pitchInRadians), _n(u, u, s.bearingInRadians);
8870
8871
  const c = s.center.lat * Math.PI / 180, p = s.center.lng * Math.PI / 180;
8871
- En(u, u, c), Cl(u, u, -p), e.uniformMatrix4fv(this.cubemap.programInfo.uniformsLocations.projectionMatrix, !1, u);
8872
+ An(u, u, c), Cl(u, u, -p), e.uniformMatrix4fv(this.cubemap.programInfo.uniformsLocations.projectionMatrix, !1, u);
8872
8873
  const f = We();
8873
8874
  if (e.uniformMatrix4fv(this.cubemap.programInfo.uniformsLocations.modelViewMatrix, !1, f), e.uniform4fv(this.cubemap.programInfo.uniformsLocations.bgColor, new Float32Array(this.bgColor)), this.useCubemapTexture && (e.uniform1f(this.cubemap.programInfo.uniformsLocations.fadeOpacity, this.currentFadeOpacity), e.activeTexture(e.TEXTURE0), e.bindTexture(e.TEXTURE_CUBE_MAP, this.texture), e.uniform1i(this.cubemap.programInfo.uniformsLocations.cubeSampler, 0)), this.cubemap.indexBuffer === void 0)
8874
8875
  throw new Error("Index buffer is undefined");
@@ -8877,7 +8878,7 @@ class Fn {
8877
8878
  e.bindBuffer(e.ELEMENT_ARRAY_BUFFER, this.cubemap.indexBuffer), e.drawElements(e.TRIANGLES, this.cubemap.indexBufferLength, e.UNSIGNED_SHORT, 0);
8878
8879
  }
8879
8880
  setCubemap(e) {
8880
- console.log("Setting cubemap", e), this.faces = On(e), this.updateCubemap(), this.cubeMapNeedsUpdate = !0;
8881
+ console.log("Setting cubemap", e), this.faces = jn(e), this.updateCubemap(), this.cubeMapNeedsUpdate = !0;
8881
8882
  }
8882
8883
  show() {
8883
8884
  this.map.setLayoutProperty(this.id, "visibility", "visible");
@@ -8886,7 +8887,7 @@ class Fn {
8886
8887
  this.map.setLayoutProperty(this.id, "visibility", "none");
8887
8888
  }
8888
8889
  }
8889
- function On(r) {
8890
+ function jn(r) {
8890
8891
  if (r.faces)
8891
8892
  return r.faces;
8892
8893
  if (r.preset)
@@ -8991,7 +8992,7 @@ void main() {
8991
8992
  He,
8992
8993
  He,
8993
8994
  0
8994
- ], jn = {
8995
+ ], Nn = {
8995
8996
  scale: 0.9,
8996
8997
  stops: [
8997
8998
  [0, "rgba(176, 208, 240, 1)"],
@@ -8999,7 +9000,7 @@ void main() {
8999
9000
  [0.2, "rgba(98, 168, 229, 0.0)"]
9000
9001
  ]
9001
9002
  };
9002
- class Nn {
9003
+ class sr {
9003
9004
  constructor(e) {
9004
9005
  x(this, "id", "Halo Layer");
9005
9006
  x(this, "type", "custom");
@@ -9009,16 +9010,16 @@ class Nn {
9009
9010
  x(this, "map");
9010
9011
  x(this, "plane");
9011
9012
  if (typeof e == "boolean") {
9012
- this.gradient = jn;
9013
+ this.gradient = Nn;
9013
9014
  return;
9014
9015
  }
9015
9016
  this.gradient = {
9016
- ...jn,
9017
+ ...Nn,
9017
9018
  ...e
9018
9019
  };
9019
9020
  }
9020
9021
  onAdd(e, t) {
9021
- this.map = e, this.plane = Ua({
9022
+ this.map = e, this.plane = Na({
9022
9023
  gl: t,
9023
9024
  vertexShaderSource: eu,
9024
9025
  fragmentShaderSource: tu,
@@ -9051,16 +9052,16 @@ class Nn {
9051
9052
  const s = this.plane.programInfo.uniformsLocations.matrix;
9052
9053
  e.uniformMatrix4fv(s, !1, i);
9053
9054
  const l = We(), u = this.map.transform.cameraPosition, c = tr(yt(), u), p = Tl(0, 1, 0), f = yt();
9054
- An(f, p, c), tr(f, f);
9055
+ Mn(f, p, c), tr(f, f);
9055
9056
  const d = yt();
9056
- An(d, c, f), tr(d, d), xl(l, f[0], f[1], f[2], 0, d[0], d[1], d[2], 0, c[0], c[1], c[2], 0, 0, 0, 0, 1);
9057
+ Mn(d, c, f), tr(d, d), xl(l, f[0], f[1], f[2], 0, d[0], d[1], d[2], 0, c[0], c[1], c[2], 0, 0, 0, 0, 1);
9057
9058
  const h = this.plane.programInfo.uniformsLocations.rotationMatrix;
9058
9059
  e.uniformMatrix4fv(h, !1, l);
9059
9060
  const y = this.gradient.stops.length, m = [], w = [];
9060
9061
  for (let v = 0; v <= y; v++)
9061
9062
  if (v < y) {
9062
9063
  m[v] = this.gradient.stops[v][0];
9063
- const S = Da(this.gradient.stops[v][1]);
9064
+ const S = Ua(this.gradient.stops[v][1]);
9064
9065
  w.push(...S);
9065
9066
  }
9066
9067
  e.uniform1i(this.plane.programInfo.uniformsLocations.stopsNumber, y), e.uniform1fv(this.plane.programInfo.uniformsLocations.stops, new Float32Array(m)), e.uniform4fv(this.plane.programInfo.uniformsLocations.colors, new Float32Array(w)), e.uniform1f(this.plane.programInfo.uniformsLocations.maxDistance, He), e.uniform1f(this.plane.programInfo.uniformsLocations.scale, o), e.drawArrays(e.TRIANGLE_STRIP, 0, 4);
@@ -9088,10 +9089,10 @@ const ou = {
9088
9089
  POINT: "POINT",
9089
9090
  COUNTRY: "COUNTRY"
9090
9091
  };
9091
- class Dr extends k.Map {
9092
+ class qr extends k.Map {
9092
9093
  constructor(t) {
9093
- Vo(t.container), t.apiKey && (N.apiKey = t.apiKey);
9094
- const { style: n, requiresUrlMonitoring: a, isFallback: o } = kn(t.style);
9094
+ Ao(t.container), t.apiKey && (N.apiKey = t.apiKey);
9095
+ const { style: n, requiresUrlMonitoring: a, isFallback: o } = Ln(t.style);
9095
9096
  o && console.warn(
9096
9097
  "Invalid style. A style must be a valid URL to a style.json, a JSON string representing a valid StyleSpecification or a valid StyleSpecification object. Fallback to default MapTiler style."
9097
9098
  ), N.apiKey || console.warn("MapTiler Cloud API key is not set. Visit https://maptiler.com and try Cloud for free!");
@@ -9107,7 +9108,7 @@ class Dr extends k.Map {
9107
9108
  ...t,
9108
9109
  style: n,
9109
9110
  maplibreLogo: !1,
9110
- transformRequest: Qr(t.transformRequest),
9111
+ transformRequest: tn(t.transformRequest),
9111
9112
  attributionControl: t.forceNoAttributionControl === !0 ? !1 : s
9112
9113
  };
9113
9114
  delete l.style;
@@ -9151,10 +9152,10 @@ class Dr extends k.Map {
9151
9152
  u();
9152
9153
  return;
9153
9154
  }
9154
- }), N.caching && !lr && console.warn("The cache API is only available in secure contexts. More info at https://developer.mozilla.org/en-US/docs/Web/API/Cache"), N.caching && lr && Uo(), typeof t.language > "u")
9155
+ }), N.caching && !cr && console.warn("The cache API is only available in secure contexts. More info at https://developer.mozilla.org/en-US/docs/Web/API/Cache"), N.caching && cr && ko(), typeof t.language > "u")
9155
9156
  this.primaryLanguage = N.primaryLanguage;
9156
9157
  else {
9157
- const h = Kr(t.language, P);
9158
+ const h = Wr(t.language, P);
9158
9159
  this.primaryLanguage = h ?? N.primaryLanguage;
9159
9160
  }
9160
9161
  this.forceLanguageUpdate = !(this.primaryLanguage === P.STYLE || this.primaryLanguage === P.STYLE_LOCK), this.languageAlwaysBeenStyle = this.primaryLanguage === P.STYLE, this.terrainExaggeration = t.terrainExaggeration ?? this.terrainExaggeration, this.curentProjection = t.projection, this.on("styledata", () => {
@@ -9218,23 +9219,23 @@ class Dr extends k.Map {
9218
9219
  if (t.forceNoAttributionControl !== !0)
9219
9220
  if ("logo" in h && h.logo) {
9220
9221
  const y = h.logo;
9221
- this.addControl(new tn({ logoURL: y }), t.logoPosition);
9222
- } else t.maptilerLogo && this.addControl(new tn(), t.logoPosition);
9222
+ this.addControl(new nn({ logoURL: y }), t.logoPosition);
9223
+ } else t.maptilerLogo && this.addControl(new nn(), t.logoPosition);
9223
9224
  if (t.scaleControl) {
9224
- const y = t.scaleControl === !0 || t.scaleControl === void 0 ? "bottom-right" : t.scaleControl, m = new ri({ unit: N.unit });
9225
+ const y = t.scaleControl === !0 || t.scaleControl === void 0 ? "bottom-right" : t.scaleControl, m = new No({ unit: N.unit });
9225
9226
  this.addControl(m, y), N.on("unit", (w) => {
9226
9227
  m.setUnit(w);
9227
9228
  });
9228
9229
  }
9229
9230
  if (t.navigationControl !== !1) {
9230
9231
  const y = t.navigationControl === !0 || t.navigationControl === void 0 ? "top-right" : t.navigationControl;
9231
- this.addControl(new ml(), y);
9232
+ this.addControl(new Qs(), y);
9232
9233
  }
9233
9234
  if (t.geolocateControl !== !1) {
9234
9235
  const y = t.geolocateControl === !0 || t.geolocateControl === void 0 ? "top-right" : t.geolocateControl;
9235
9236
  this.addControl(
9236
9237
  // new maplibregl.GeolocateControl({
9237
- new vl({
9238
+ new tl({
9238
9239
  positionOptions: {
9239
9240
  enableHighAccuracy: !0,
9240
9241
  maximumAge: 0,
@@ -9252,15 +9253,15 @@ class Dr extends k.Map {
9252
9253
  }
9253
9254
  if (t.terrainControl) {
9254
9255
  const y = t.terrainControl === !0 || t.terrainControl === void 0 ? "top-right" : t.terrainControl;
9255
- this.addControl(new yl(), y);
9256
+ this.addControl(new Js(), y);
9256
9257
  }
9257
9258
  if (t.projectionControl) {
9258
9259
  const y = t.projectionControl === !0 || t.projectionControl === void 0 ? "top-right" : t.projectionControl;
9259
- this.addControl(new bl(), y);
9260
+ this.addControl(new rl(), y);
9260
9261
  }
9261
9262
  if (t.fullscreenControl) {
9262
9263
  const y = t.fullscreenControl === !0 || t.fullscreenControl === void 0 ? "top-right" : t.fullscreenControl;
9263
- this.addControl(new ni({}), y);
9264
+ this.addControl(new Uo({}), y);
9264
9265
  }
9265
9266
  this.isReady = !0, this.fire("ready", { target: this });
9266
9267
  });
@@ -9283,15 +9284,15 @@ class Dr extends k.Map {
9283
9284
  scrollZoom: Ve,
9284
9285
  minZoom: lt,
9285
9286
  maxZoom: ut,
9286
- boxZoom: Ja,
9287
- locale: Qa,
9288
- fadeDuration: eo,
9289
- crossSourceCollisions: to,
9290
- clickTolerance: ro,
9291
- bounds: no,
9292
- fitBoundsOptions: ao,
9293
- pixelRatio: oo,
9294
- validateStyle: io
9287
+ boxZoom: Ya,
9288
+ locale: Ja,
9289
+ fadeDuration: Qa,
9290
+ crossSourceCollisions: eo,
9291
+ clickTolerance: to,
9292
+ bounds: ro,
9293
+ fitBoundsOptions: no,
9294
+ pixelRatio: ao,
9295
+ validateStyle: oo
9295
9296
  } = t;
9296
9297
  this.minimap = new er(h, {
9297
9298
  zoom: y,
@@ -9307,15 +9308,15 @@ class Dr extends k.Map {
9307
9308
  scrollZoom: Ve,
9308
9309
  minZoom: lt,
9309
9310
  maxZoom: ut,
9310
- boxZoom: Ja,
9311
- locale: Qa,
9312
- fadeDuration: eo,
9313
- crossSourceCollisions: to,
9314
- clickTolerance: ro,
9315
- bounds: no,
9316
- fitBoundsOptions: ao,
9317
- pixelRatio: oo,
9318
- validateStyle: io
9311
+ boxZoom: Ya,
9312
+ locale: Ja,
9313
+ fadeDuration: Qa,
9314
+ crossSourceCollisions: eo,
9315
+ clickTolerance: to,
9316
+ bounds: ro,
9317
+ fitBoundsOptions: no,
9318
+ pixelRatio: ao,
9319
+ validateStyle: oo
9319
9320
  }), this.addControl(this.minimap, h.position ?? "bottom-left");
9320
9321
  } else h === !0 ? (this.minimap = new er({}, t), this.addControl(this.minimap, "bottom-left")) : h !== void 0 && h !== !1 && (this.minimap = new er({}, t), this.addControl(this.minimap, h));
9321
9322
  });
@@ -9335,14 +9336,7 @@ class Dr extends k.Map {
9335
9336
  console.warn("[webglcontextlost]", "Unexpected loss of WebGL context!"), this.fire("webglContextLost", y);
9336
9337
  });
9337
9338
  const h = this.getLayersOrder()[0];
9338
- if (t.space) {
9339
- const y = Un({ map: this, property: "space" });
9340
- this.space = new Fn(t.space ?? y), this.addLayer(this.space, h);
9341
- }
9342
- if (t.halo) {
9343
- const y = Un({ map: this, property: "halo" });
9344
- this.halo = new Nn(t.halo ?? y), this.addLayer(this.halo, h);
9345
- }
9339
+ this.initSpace({ options: t, before: h }), this.initHalo({ options: t, before: h });
9346
9340
  }), this.telemetry = new wl(this);
9347
9341
  }
9348
9342
  getSpace() {
@@ -9350,10 +9344,10 @@ class Dr extends k.Map {
9350
9344
  }
9351
9345
  setSpace(t) {
9352
9346
  if (this.space) {
9353
- console.log("Setting spacebox", t), this.space.setCubemap(t);
9347
+ this.space.setCubemap(t);
9354
9348
  return;
9355
9349
  }
9356
- this.space = new Fn(t), this.once("load", () => {
9350
+ this.space = new ir(t), this.once("load", () => {
9357
9351
  const n = this.getLayersOrder()[0];
9358
9352
  this.space && this.addLayer(this.space, n);
9359
9353
  });
@@ -9366,12 +9360,30 @@ class Dr extends k.Map {
9366
9360
  this.halo.setGradient(t);
9367
9361
  return;
9368
9362
  }
9369
- this.halo = new Nn(t), this.once("load", () => {
9363
+ this.halo = new sr(t), this.once("load", () => {
9370
9364
  var s;
9371
9365
  const n = this.getLayersOrder(), a = n[0], o = n.indexOf(((s = this.space) == null ? void 0 : s.id) ?? "") + 2, i = n[o];
9372
9366
  this.halo && this.addLayer(this.halo, this.space ? i : a);
9373
9367
  });
9374
9368
  }
9369
+ initSpace({ options: t = this.options, before: n }) {
9370
+ if (this.space && this.removeLayer(this.space.id), t.space === !1) return;
9371
+ const a = Un({ map: this, property: "space" });
9372
+ if (t.space) {
9373
+ this.space = new ir(t.space), this.addLayer(this.space, n);
9374
+ return;
9375
+ }
9376
+ a && (this.space = new ir(a), this.addLayer(this.space, n));
9377
+ }
9378
+ initHalo({ options: t = this.options, before: n }) {
9379
+ if (this.halo && this.removeLayer(this.halo.id), t.halo === !1) return;
9380
+ const a = Un({ map: this, property: "halo" });
9381
+ if (t.halo) {
9382
+ this.halo = new sr(t.halo), this.addLayer(this.halo, n);
9383
+ return;
9384
+ }
9385
+ a && (this.halo = new sr(a), this.addLayer(this.halo, n));
9386
+ }
9375
9387
  /**
9376
9388
  * Recreates the map instance with the same options.
9377
9389
  * Useful for WebGL context loss.
@@ -9383,7 +9395,7 @@ class Dr extends k.Map {
9383
9395
  bearing: this.getBearing(),
9384
9396
  pitch: this.getPitch()
9385
9397
  };
9386
- this.remove(), Object.assign(this, new Dr({ ...this.options })), this.once("load", () => {
9398
+ this.remove(), Object.assign(this, new qr({ ...this.options })), this.once("load", () => {
9387
9399
  this.jumpTo(t);
9388
9400
  });
9389
9401
  }
@@ -9465,7 +9477,7 @@ class Dr extends k.Map {
9465
9477
  this.originalLabelStyle.clear(), (o = this.minimap) == null || o.setStyle(t), this.forceLanguageUpdate = !0, this.once("idle", () => {
9466
9478
  this.forceLanguageUpdate = !1;
9467
9479
  });
9468
- const a = kn(t);
9480
+ const a = Ln(t);
9469
9481
  if (a.requiresUrlMonitoring && this.monitorStyleUrl(a.style), a.isFallback) {
9470
9482
  if (this.getStyle())
9471
9483
  return console.warn(
@@ -9475,7 +9487,10 @@ class Dr extends k.Map {
9475
9487
  "Invalid style. A style must be a valid URL to a style.json, a JSON string representing a valid StyleSpecification or a valid StyleSpecification object. Fallback to default MapTiler style."
9476
9488
  );
9477
9489
  }
9478
- return this.styleInProcess = !0, super.setStyle(a.style, n), this;
9490
+ return this.styleInProcess = !0, this.once("style.load", () => {
9491
+ const i = this.getLayersOrder()[0];
9492
+ this.space && (console.log(this.space), this.initSpace({ before: i })), this.halo && this.initHalo({ before: i });
9493
+ }), super.setStyle(a.style, n), this;
9479
9494
  }
9480
9495
  /**
9481
9496
  * Adds a [MapLibre style layer](https://maplibre.org/maplibre-style-spec/layers)
@@ -9616,7 +9631,7 @@ class Dr extends k.Map {
9616
9631
  return (a = this.minimap) == null || a.setGlyphs(t, n), super.setGlyphs(t, n);
9617
9632
  }
9618
9633
  getStyleLanguage() {
9619
- return !this.style || !this.style.stylesheet || !this.style.stylesheet.metadata || typeof this.style.stylesheet.metadata != "object" ? null : "maptiler:language" in this.style.stylesheet.metadata && typeof this.style.stylesheet.metadata["maptiler:language"] == "string" ? ho(this.style.stylesheet.metadata["maptiler:language"]) : null;
9634
+ return !this.style || !this.style.stylesheet || !this.style.stylesheet.metadata || typeof this.style.stylesheet.metadata != "object" ? null : "maptiler:language" in this.style.stylesheet.metadata && typeof this.style.stylesheet.metadata["maptiler:language"] == "string" ? fo(this.style.stylesheet.metadata["maptiler:language"]) : null;
9620
9635
  }
9621
9636
  /**
9622
9637
  * Define the primary language of the map. Note that not all the languages shorthands provided are available.
@@ -9631,7 +9646,7 @@ class Dr extends k.Map {
9631
9646
  * Define the primary language of the map. Note that not all the languages shorthands provided are available.
9632
9647
  */
9633
9648
  setPrimaryLanguage(t) {
9634
- const n = this.getStyleLanguage(), a = Kr(t, P);
9649
+ const n = this.getStyleLanguage(), a = Wr(t, P);
9635
9650
  if (!a) {
9636
9651
  console.warn(`The language "${a}" is not supported.`);
9637
9652
  return;
@@ -9652,7 +9667,7 @@ class Dr extends k.Map {
9652
9667
  o = n;
9653
9668
  }
9654
9669
  let i = P.LOCAL.flag, s = ["get", i];
9655
- o.flag === P.VISITOR.flag ? (i = Zr().flag, s = [
9670
+ o.flag === P.VISITOR.flag ? (i = Jr().flag, s = [
9656
9671
  "case",
9657
9672
  ["all", ["has", i], ["has", P.LOCAL.flag]],
9658
9673
  [
@@ -9674,10 +9689,10 @@ class Dr extends k.Map {
9674
9689
  `, ["get", P.LOCAL.flag], { "font-scale": 1.1 }]
9675
9690
  ],
9676
9691
  ["get", P.LOCAL.flag]
9677
- ]) : o.flag === P.AUTO.flag ? (i = Zr().flag, s = ["coalesce", ["get", i], ["get", P.LOCAL.flag]]) : o === P.LOCAL ? (i = P.LOCAL.flag, s = ["get", i]) : (i = o.flag, s = ["coalesce", ["get", i], ["get", P.LOCAL.flag]]);
9692
+ ]) : o.flag === P.AUTO.flag ? (i = Jr().flag, s = ["coalesce", ["get", i], ["get", P.LOCAL.flag]]) : o === P.LOCAL ? (i = P.LOCAL.flag, s = ["get", i]) : (i = o.flag, s = ["coalesce", ["get", i], ["get", P.LOCAL.flag]]);
9678
9693
  const { layers: l } = this.getStyle(), u = this.originalLabelStyle.size === 0;
9679
9694
  if (u) {
9680
- const c = Jo(l, this);
9695
+ const c = $o(l, this);
9681
9696
  this.isStyleLocalized = Object.keys(c.localized).length > 0;
9682
9697
  }
9683
9698
  for (const c of l) {
@@ -9691,16 +9706,16 @@ class Dr extends k.Map {
9691
9706
  continue;
9692
9707
  let m;
9693
9708
  if (u ? (m = this.getLayoutProperty(h, "text-field"), this.originalLabelStyle.set(h, m)) : m = this.originalLabelStyle.get(h), typeof m == "string") {
9694
- const { contains: w, exactMatch: v } = Ko(m, this.isStyleLocalized);
9709
+ const { contains: w, exactMatch: v } = Mo(m, this.isStyleLocalized);
9695
9710
  if (!w) continue;
9696
9711
  if (v)
9697
9712
  this.setLayoutProperty(h, "text-field", s);
9698
9713
  else {
9699
- const S = Xo(m, s, this.isStyleLocalized);
9714
+ const S = Io(m, s, this.isStyleLocalized);
9700
9715
  this.setLayoutProperty(h, "text-field", S);
9701
9716
  }
9702
9717
  } else {
9703
- const w = Ho(m, s, this.isStyleLocalized);
9718
+ const w = _o(m, s, this.isStyleLocalized);
9704
9719
  this.setLayoutProperty(h, "text-field", w);
9705
9720
  }
9706
9721
  }
@@ -9810,14 +9825,14 @@ class Dr extends k.Map {
9810
9825
  });
9811
9826
  }
9812
9827
  async fitToIpBounds() {
9813
- const t = await Xr.info();
9828
+ const t = await Yr.info();
9814
9829
  this.fitBounds(t.country_bounds, {
9815
9830
  duration: 0,
9816
9831
  padding: 100
9817
9832
  });
9818
9833
  }
9819
9834
  async centerOnIpPoint(t) {
9820
- const n = await Xr.info();
9835
+ const n = await Yr.info();
9821
9836
  this.jumpTo({
9822
9837
  center: [n.longitude ?? 0, n.latitude ?? 0],
9823
9838
  zoom: t || 11
@@ -9825,7 +9840,7 @@ class Dr extends k.Map {
9825
9840
  }
9826
9841
  getCameraHash() {
9827
9842
  const t = new Float32Array(5), n = this.getCenter();
9828
- return t[0] = n.lng, t[1] = n.lat, t[2] = this.getZoom(), t[3] = this.getPitch(), t[4] = this.getBearing(), go.fromUint8Array(new Uint8Array(t.buffer));
9843
+ return t[0] = n.lng, t[1] = n.lat, t[2] = this.getZoom(), t[3] = this.getPitch(), t[4] = this.getBearing(), mo.fromUint8Array(new Uint8Array(t.buffer));
9829
9844
  }
9830
9845
  /**
9831
9846
  * Get the SDK config object.
@@ -9841,7 +9856,7 @@ class Dr extends k.Map {
9841
9856
  * @returns
9842
9857
  */
9843
9858
  getMaptilerSessionId() {
9844
- return gr;
9859
+ return br;
9845
9860
  }
9846
9861
  /**
9847
9862
  * Updates the requestManager's transform request with a new function.
@@ -9855,7 +9870,7 @@ class Dr extends k.Map {
9855
9870
  * map.setTransformRequest((url: string, resourceType: string) => {});
9856
9871
  */
9857
9872
  setTransformRequest(t) {
9858
- return super.setTransformRequest(Qr(t)), this;
9873
+ return super.setTransformRequest(tn(t)), this;
9859
9874
  }
9860
9875
  /**
9861
9876
  * Returns whether a globe projection is currently being used
@@ -9885,7 +9900,7 @@ class Dr extends k.Map {
9885
9900
  return this.languageIsUpdated;
9886
9901
  }
9887
9902
  }
9888
- function Br(r) {
9903
+ function Gr(r) {
9889
9904
  if (typeof DOMParser < "u") {
9890
9905
  const e = new DOMParser().parseFromString(r, "application/xml");
9891
9906
  if (e.querySelector("parsererror"))
@@ -9894,7 +9909,7 @@ function Br(r) {
9894
9909
  }
9895
9910
  throw new Error("No XML parser found");
9896
9911
  }
9897
- function Ba(r, e) {
9912
+ function Da(r, e) {
9898
9913
  if (!r.hasChildNodes())
9899
9914
  return !1;
9900
9915
  for (const t of Array.from(r.childNodes)) {
@@ -9909,9 +9924,9 @@ function Dn(r) {
9909
9924
  return new XMLSerializer().serializeToString(r);
9910
9925
  throw new Error("No XML serializer found");
9911
9926
  }
9912
- function qa(r) {
9913
- const e = typeof r == "string" ? Br(r) : r;
9914
- if (!Ba(e, "gpx"))
9927
+ function Ba(r) {
9928
+ const e = typeof r == "string" ? Gr(r) : r;
9929
+ if (!Da(e, "gpx"))
9915
9930
  throw new Error("The XML document is not valid GPX");
9916
9931
  const t = G(e, "trk"), n = G(e, "rte"), a = G(e, "wpt"), o = {
9917
9932
  type: "FeatureCollection",
@@ -9929,9 +9944,9 @@ function qa(r) {
9929
9944
  o.features.push(pu(i));
9930
9945
  return o;
9931
9946
  }
9932
- function Ga(r, e) {
9947
+ function qa(r, e) {
9933
9948
  let t = r;
9934
- if (typeof t == "string" && (t = Br(t)), !Ba(t, "kml"))
9949
+ if (typeof t == "string" && (t = Gr(t)), !Da(t, "kml"))
9935
9950
  throw new Error("The XML document is not valid KML");
9936
9951
  const n = {
9937
9952
  type: "FeatureCollection",
@@ -9958,7 +9973,7 @@ function Bn(r) {
9958
9973
  return n.startsWith("#") && (n = n.substring(1)), (n.length === 6 || n.length === 3) && (e = n), n.length === 8 && (t = Number.parseInt(n.substring(0, 2), 16) / 255, e = `#${n.substring(6, 8)}${n.substring(4, 6)}${n.substring(2, 4)}`), [e ?? "#000000", t ?? 1];
9959
9974
  }
9960
9975
  function iu(r) {
9961
- return Ka(r.split(" "));
9976
+ return Ha(r.split(" "));
9962
9977
  }
9963
9978
  function su(r) {
9964
9979
  let e = G(r, "coord");
@@ -9989,7 +10004,7 @@ function mt(r) {
9989
10004
  if (t = n[o], e[a] === "Point")
9990
10005
  s.push({
9991
10006
  type: "Point",
9992
- coordinates: Xa($(T(t, "coordinates")) ?? "")
10007
+ coordinates: Ka($(T(t, "coordinates")) ?? "")
9993
10008
  });
9994
10009
  else if (e[a] === "LineString")
9995
10010
  s.push({
@@ -10063,13 +10078,13 @@ function lu(r, e, t, n) {
10063
10078
  };
10064
10079
  return Ie(r, "id") && (w.id = Ie(r, "id") ?? void 0), [w];
10065
10080
  }
10066
- function Va(r, e) {
10081
+ function Ga(r, e) {
10067
10082
  const t = G(r, e), n = [], a = [];
10068
10083
  let o = [];
10069
10084
  const i = t.length;
10070
10085
  if (!(i < 2)) {
10071
10086
  for (let s = 0; s < i; s++) {
10072
- const l = Za(t[s]);
10087
+ const l = Xa(t[s]);
10073
10088
  n.push(l.coordinates), l.time && a.push(l.time), (l.heartRate || o.length) && (o.length === 0 && (o = new Array(s).fill(null)), o.push(l.heartRate));
10074
10089
  }
10075
10090
  return {
@@ -10083,7 +10098,7 @@ function uu(r) {
10083
10098
  const e = G(r, "trkseg"), t = [], n = [], a = [];
10084
10099
  let o;
10085
10100
  for (let s = 0; s < e.length; s++)
10086
- if (o = Va(e[s], "trkpt"), o !== void 0 && (o.line && t.push(o.line), o.times && o.times.length && n.push(o.times), a.length || o.heartRates && o.heartRates.length)) {
10101
+ if (o = Ga(e[s], "trkpt"), o !== void 0 && (o.line && t.push(o.line), o.times && o.times.length && n.push(o.times), a.length || o.heartRates && o.heartRates.length)) {
10087
10102
  if (!a.length)
10088
10103
  for (let l = 0; l < s; l++)
10089
10104
  a.push(new Array(t[l].length).fill(null));
@@ -10091,8 +10106,8 @@ function uu(r) {
10091
10106
  }
10092
10107
  if (t.length === 0) return;
10093
10108
  const i = {
10094
- ...qr(r),
10095
- ...Ha(T(r, "extensions"))
10109
+ ...Vr(r),
10110
+ ...Va(T(r, "extensions"))
10096
10111
  };
10097
10112
  return n.length !== 0 && (i.coordTimes = t.length === 1 ? n[0] : n), a.length !== 0 && (i.heartRates = t.length === 1 ? a[0] : a), t.length === 1 ? {
10098
10113
  type: "Feature",
@@ -10111,12 +10126,12 @@ function uu(r) {
10111
10126
  };
10112
10127
  }
10113
10128
  function cu(r) {
10114
- const e = Va(r, "rtept");
10129
+ const e = Ga(r, "rtept");
10115
10130
  return e === void 0 ? void 0 : {
10116
10131
  type: "Feature",
10117
10132
  properties: {
10118
- ...qr(r),
10119
- ...Ha(T(r, "extensions"))
10133
+ ...Vr(r),
10134
+ ...Va(T(r, "extensions"))
10120
10135
  },
10121
10136
  geometry: {
10122
10137
  type: "LineString",
@@ -10127,14 +10142,14 @@ function cu(r) {
10127
10142
  function pu(r) {
10128
10143
  return {
10129
10144
  type: "Feature",
10130
- properties: { ...qr(r), ...mr(r, ["sym"]) },
10145
+ properties: { ...Vr(r), ...vr(r, ["sym"]) },
10131
10146
  geometry: {
10132
10147
  type: "Point",
10133
- coordinates: Za(r).coordinates
10148
+ coordinates: Xa(r).coordinates
10134
10149
  }
10135
10150
  };
10136
10151
  }
10137
- function Ha(r) {
10152
+ function Va(r) {
10138
10153
  const e = {};
10139
10154
  if (r) {
10140
10155
  const t = T(r, "line");
@@ -10145,14 +10160,14 @@ function Ha(r) {
10145
10160
  }
10146
10161
  return e;
10147
10162
  }
10148
- function qr(r) {
10149
- const e = mr(r, ["name", "cmt", "desc", "type", "time", "keywords"]), t = G(r, "link");
10163
+ function Vr(r) {
10164
+ const e = vr(r, ["name", "cmt", "desc", "type", "time", "keywords"]), t = G(r, "link");
10150
10165
  if (t.length !== 0) {
10151
10166
  e.links = [];
10152
10167
  for (const n of Array.from(t)) {
10153
10168
  const a = {
10154
10169
  href: Ie(n, "href"),
10155
- ...mr(n, ["text", "type"])
10170
+ ...vr(n, ["text", "type"])
10156
10171
  };
10157
10172
  e.links.push(a);
10158
10173
  }
@@ -10182,28 +10197,28 @@ function T(r, e) {
10182
10197
  function fu(r) {
10183
10198
  return r.normalize && r.normalize(), r;
10184
10199
  }
10185
- function Ka(r) {
10200
+ function Ha(r) {
10186
10201
  return r.map(Number.parseFloat).map((e) => Number.isNaN(e) ? null : e);
10187
10202
  }
10188
10203
  function $(r) {
10189
10204
  return r && fu(r), r && r.textContent;
10190
10205
  }
10191
- function mr(r, e) {
10206
+ function vr(r, e) {
10192
10207
  const t = {};
10193
10208
  let n, a;
10194
10209
  for (a = 0; a < e.length; a++)
10195
10210
  n = T(r, e[a]), n && (t[e[a]] = $(n) ?? "");
10196
10211
  return t;
10197
10212
  }
10198
- function Xa(r) {
10199
- return Ka(r.replace(/\s*/g, "").split(","));
10213
+ function Ka(r) {
10214
+ return Ha(r.replace(/\s*/g, "").split(","));
10200
10215
  }
10201
10216
  function Vn(r) {
10202
10217
  const e = r.replace(/^\s*|\s*$/g, "").split(/\s+/), t = [];
10203
- for (const n of e) t.push(Xa(n));
10218
+ for (const n of e) t.push(Ka(n));
10204
10219
  return t;
10205
10220
  }
10206
- function Za(r) {
10221
+ function Xa(r) {
10207
10222
  const e = [Gn(r, "lon"), Gn(r, "lat")], t = T(r, "ele"), n = T(r, "gpxtpx:hr") || T(r, "hr"), a = T(r, "time");
10208
10223
  let o;
10209
10224
  return t && (o = Number.parseFloat($(t) ?? "0"), Number.isNaN(o) || e.push(o)), {
@@ -10215,25 +10230,183 @@ function Za(r) {
10215
10230
  function du(r) {
10216
10231
  let e = r;
10217
10232
  try {
10218
- typeof e == "string" && (e = Br(e));
10233
+ typeof e == "string" && (e = Gr(e));
10219
10234
  } catch {
10220
10235
  return null;
10221
10236
  }
10222
10237
  try {
10223
- return qa(e);
10238
+ return Ba(e);
10224
10239
  } catch {
10225
10240
  }
10226
10241
  try {
10227
- return Ga(e);
10242
+ return qa(e);
10228
10243
  } catch {
10229
10244
  }
10230
10245
  return null;
10231
10246
  }
10247
+ async function hu(r, e = {}) {
10248
+ const t = e.download ?? !1, n = await yu(r);
10249
+ if (t) {
10250
+ const a = e.filename ?? "maptiler_screenshot.png", o = document.createElement("a");
10251
+ o.style.display = "none", document.body.appendChild(o), o.href = URL.createObjectURL(n), o.download = a, o.click(), setTimeout(() => {
10252
+ document.body.removeChild(o), URL.revokeObjectURL(o.href);
10253
+ }, 0);
10254
+ }
10255
+ return n;
10256
+ }
10257
+ function yu(r) {
10258
+ return new Promise((e, t) => {
10259
+ r.redraw(), r.once("idle", () => {
10260
+ r.getCanvas().toBlob((n) => {
10261
+ if (!n) {
10262
+ t(Error("Screenshot could not be created."));
10263
+ return;
10264
+ }
10265
+ e(n);
10266
+ }, "image/png");
10267
+ });
10268
+ });
10269
+ }
10270
+ const Hn = [
10271
+ // https://colorhunt.co/palette/1d5b79468b97ef6262f3aa60
10272
+ ["#1D5B79", "#468B97", "#EF6262", "#F3AA60"],
10273
+ // https://colorhunt.co/palette/614bc333bbc585e6c5c8ffe0
10274
+ ["#614BC3", "#33BBC5", "#85E6C5", "#C8FFE0"],
10275
+ // https://colorhunt.co/palette/4619597a316fcd6688aed8cc
10276
+ ["#461959", "#7A316F", "#CD6688", "#AED8CC"],
10277
+ // https://colorhunt.co/palette/0079ff00dfa2f6fa70ff0060
10278
+ ["#0079FF", "#00DFA2", "#F6FA70", "#FF0060"],
10279
+ //https://colorhunt.co/palette/39b5e0a31acbff78f0f5ea5a
10280
+ ["#39B5E0", "#A31ACB", "#FF78F0", "#F5EA5A"],
10281
+ // https://colorhunt.co/palette/37e2d5590696c70a80fbcb0a
10282
+ ["#37E2D5", "#590696", "#C70A80", "#FBCB0A"],
10283
+ // https://colorhunt.co/palette/ffd36efff56d99ffcd9fb4ff
10284
+ ["#FFD36E", "#FFF56D", "#99FFCD", "#9FB4FF"],
10285
+ // https://colorhunt.co/palette/00ead3fff5b7ff449f005f99
10286
+ ["#00EAD3", "#FFF5B7", "#FF449F", "#005F99"],
10287
+ // https://colorhunt.co/palette/10a19d540375ff7000ffbf00
10288
+ ["#10A19D", "#540375", "#FF7000", "#FFBF00"]
10289
+ ];
10290
+ function Hr() {
10291
+ return Hn[~~(Math.random() * Hn.length)][~~(Math.random() * 4)];
10292
+ }
10293
+ function Ut() {
10294
+ return `maptiler_source_${Jn()}`;
10295
+ }
10296
+ function Dt() {
10297
+ return `maptiler_layer_${Jn()}`;
10298
+ }
10299
+ function Kn(r, e) {
10300
+ if (e <= r[0].zoom)
10301
+ return r[0].value;
10302
+ if (e >= r[r.length - 1].zoom)
10303
+ return r[r.length - 1].value;
10304
+ for (let t = 0; t < r.length - 1; t += 1)
10305
+ if (e >= r[t].zoom && e < r[t + 1].zoom) {
10306
+ const n = r[t + 1].zoom - r[t].zoom, a = (e - r[t].zoom) / n;
10307
+ return a * r[t + 1].value + (1 - a) * r[t].value;
10308
+ }
10309
+ return 0;
10310
+ }
10311
+ function Pe(r) {
10312
+ return ["interpolate", ["linear"], ["zoom"], ...r.flatMap((e) => [e.zoom, e.value])];
10313
+ }
10314
+ function F(r) {
10315
+ return ["interpolate", ["linear"], ["zoom"], ...r.flatMap((e) => [e.zoom, e.value])];
10316
+ }
10317
+ function mu(r, e) {
10318
+ if (typeof e == "number" && typeof r == "number")
10319
+ return 2 * e + r;
10320
+ if (typeof e == "number" && Array.isArray(r))
10321
+ return ["interpolate", ["linear"], ["zoom"], ...r.flatMap((t) => [t.zoom, 2 * e + t.value])];
10322
+ if (typeof r == "number" && Array.isArray(e))
10323
+ return ["interpolate", ["linear"], ["zoom"], ...e.flatMap((t) => [t.zoom, 2 * t.value + r])];
10324
+ if (Array.isArray(r) && Array.isArray(e)) {
10325
+ const t = Array.from(/* @__PURE__ */ new Set([...r.map((n) => n.zoom), ...e.map((n) => n.zoom)])).sort((n, a) => n < a ? -1 : 1);
10326
+ return ["interpolate", ["linear"], ["zoom"], ...t.flatMap((n) => [n, 2 * Kn(e, n) + Kn(r, n)])];
10327
+ }
10328
+ return 0;
10329
+ }
10330
+ function gu(r, e) {
10331
+ return ["interpolate", ["linear"], ["get", e], ...r.flatMap((t) => [t.propertyValue, t.value])];
10332
+ }
10333
+ function Za(r) {
10334
+ const e = r.trimStart(), t = `${e}${" ".repeat(r.length - e.length)}`, n = Array.from(t);
10335
+ if (!n.every((s) => s === " " || s === "_"))
10336
+ throw new Error("A dash pattern must be composed only of whitespace and underscore characters.");
10337
+ if (!(n.some((s) => s === "_") && n.some((s) => s === " ")))
10338
+ throw new Error("A dash pattern must contain at least one underscore and one whitespace character");
10339
+ const i = [1];
10340
+ for (let s = 1; s < n.length; s += 1) {
10341
+ const l = n[s - 1], u = n[s];
10342
+ l === u ? i[i.length - 1] += 1 : i.push(1);
10343
+ }
10344
+ return i;
10345
+ }
10346
+ function Xn(r, e) {
10347
+ return ["interpolate", ["linear"], ["get", e], ...r.flatMap((t) => [t.value, t.color])];
10348
+ }
10349
+ function Zn(r, e, t = !0) {
10350
+ return t ? [
10351
+ "interpolate",
10352
+ ["linear"],
10353
+ ["zoom"],
10354
+ 0,
10355
+ ["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.value, n.pointRadius * 0.025])],
10356
+ 2,
10357
+ ["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.value, n.pointRadius * 0.05])],
10358
+ 4,
10359
+ ["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.value, n.pointRadius * 0.1])],
10360
+ 8,
10361
+ ["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.value, n.pointRadius * 0.25])],
10362
+ 16,
10363
+ ["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.value, n.pointRadius])]
10364
+ ] : ["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.value, n.pointRadius])];
10365
+ }
10366
+ function vu(r, e, t = !0) {
10367
+ return t ? [
10368
+ "interpolate",
10369
+ ["linear"],
10370
+ ["zoom"],
10371
+ 0,
10372
+ ["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.propertyValue, n.value * 0.025])],
10373
+ 2,
10374
+ ["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.propertyValue, n.value * 0.05])],
10375
+ 4,
10376
+ ["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.propertyValue, n.value * 0.1])],
10377
+ 8,
10378
+ ["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.propertyValue, n.value * 0.25])],
10379
+ 16,
10380
+ ["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.propertyValue, n.value])]
10381
+ ] : ["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.propertyValue, n.value])];
10382
+ }
10383
+ function Wn(r, e) {
10384
+ return r.every((t) => t.color[3] === r[0].color[3]) ? r[0].color[3] ? r[0].color[3] / 255 : 1 : [
10385
+ "interpolate",
10386
+ ["linear"],
10387
+ ["get", e],
10388
+ ...r.getRawColorStops().flatMap((t) => {
10389
+ const n = t.value, a = t.color;
10390
+ return [n, a.length === 4 ? a[3] / 255 : 1];
10391
+ })
10392
+ ];
10393
+ }
10394
+ function bu(r, e = 10) {
10395
+ return [
10396
+ "interpolate",
10397
+ ["linear"],
10398
+ ["heatmap-density"],
10399
+ ...Array.from({ length: e + 1 }, (t, n) => {
10400
+ const a = n / e;
10401
+ return [a, r.getColorHex(a)];
10402
+ }).flat()
10403
+ ];
10404
+ }
10232
10405
  function dt(r) {
10233
10406
  const e = r.toString(16);
10234
10407
  return e.length === 1 ? `0${e}` : e;
10235
10408
  }
10236
- function hu(r) {
10409
+ function wu(r) {
10237
10410
  return `#${dt(r[0])}${dt(r[1])}${dt(r[2])}${r.length === 4 ? dt(r[3]) : ""}`;
10238
10411
  }
10239
10412
  class C extends Array {
@@ -10327,7 +10500,7 @@ class C extends Array {
10327
10500
  smooth: !0,
10328
10501
  withAlpha: !1
10329
10502
  }) {
10330
- return hu(this.getColor(t, n));
10503
+ return wu(this.getColor(t, n));
10331
10504
  }
10332
10505
  /**
10333
10506
  * Get the color of the color ramp at a relative position in [0, 1]
@@ -11170,164 +11343,6 @@ const Wa = {
11170
11343
  ]
11171
11344
  })
11172
11345
  };
11173
- async function yu(r, e = {}) {
11174
- const t = e.download ?? !1, n = await mu(r);
11175
- if (t) {
11176
- const a = e.filename ?? "maptiler_screenshot.png", o = document.createElement("a");
11177
- o.style.display = "none", document.body.appendChild(o), o.href = URL.createObjectURL(n), o.download = a, o.click(), setTimeout(() => {
11178
- document.body.removeChild(o), URL.revokeObjectURL(o.href);
11179
- }, 0);
11180
- }
11181
- return n;
11182
- }
11183
- function mu(r) {
11184
- return new Promise((e, t) => {
11185
- r.redraw(), r.once("idle", () => {
11186
- r.getCanvas().toBlob((n) => {
11187
- if (!n) {
11188
- t(Error("Screenshot could not be created."));
11189
- return;
11190
- }
11191
- e(n);
11192
- }, "image/png");
11193
- });
11194
- });
11195
- }
11196
- const Hn = [
11197
- // https://colorhunt.co/palette/1d5b79468b97ef6262f3aa60
11198
- ["#1D5B79", "#468B97", "#EF6262", "#F3AA60"],
11199
- // https://colorhunt.co/palette/614bc333bbc585e6c5c8ffe0
11200
- ["#614BC3", "#33BBC5", "#85E6C5", "#C8FFE0"],
11201
- // https://colorhunt.co/palette/4619597a316fcd6688aed8cc
11202
- ["#461959", "#7A316F", "#CD6688", "#AED8CC"],
11203
- // https://colorhunt.co/palette/0079ff00dfa2f6fa70ff0060
11204
- ["#0079FF", "#00DFA2", "#F6FA70", "#FF0060"],
11205
- //https://colorhunt.co/palette/39b5e0a31acbff78f0f5ea5a
11206
- ["#39B5E0", "#A31ACB", "#FF78F0", "#F5EA5A"],
11207
- // https://colorhunt.co/palette/37e2d5590696c70a80fbcb0a
11208
- ["#37E2D5", "#590696", "#C70A80", "#FBCB0A"],
11209
- // https://colorhunt.co/palette/ffd36efff56d99ffcd9fb4ff
11210
- ["#FFD36E", "#FFF56D", "#99FFCD", "#9FB4FF"],
11211
- // https://colorhunt.co/palette/00ead3fff5b7ff449f005f99
11212
- ["#00EAD3", "#FFF5B7", "#FF449F", "#005F99"],
11213
- // https://colorhunt.co/palette/10a19d540375ff7000ffbf00
11214
- ["#10A19D", "#540375", "#FF7000", "#FFBF00"]
11215
- ];
11216
- function Gr() {
11217
- return Hn[~~(Math.random() * Hn.length)][~~(Math.random() * 4)];
11218
- }
11219
- function Ut() {
11220
- return `maptiler_source_${Qn()}`;
11221
- }
11222
- function Dt() {
11223
- return `maptiler_layer_${Qn()}`;
11224
- }
11225
- function Kn(r, e) {
11226
- if (e <= r[0].zoom)
11227
- return r[0].value;
11228
- if (e >= r[r.length - 1].zoom)
11229
- return r[r.length - 1].value;
11230
- for (let t = 0; t < r.length - 1; t += 1)
11231
- if (e >= r[t].zoom && e < r[t + 1].zoom) {
11232
- const n = r[t + 1].zoom - r[t].zoom, a = (e - r[t].zoom) / n;
11233
- return a * r[t + 1].value + (1 - a) * r[t].value;
11234
- }
11235
- return 0;
11236
- }
11237
- function Pe(r) {
11238
- return ["interpolate", ["linear"], ["zoom"], ...r.flatMap((e) => [e.zoom, e.value])];
11239
- }
11240
- function F(r) {
11241
- return ["interpolate", ["linear"], ["zoom"], ...r.flatMap((e) => [e.zoom, e.value])];
11242
- }
11243
- function gu(r, e) {
11244
- if (typeof e == "number" && typeof r == "number")
11245
- return 2 * e + r;
11246
- if (typeof e == "number" && Array.isArray(r))
11247
- return ["interpolate", ["linear"], ["zoom"], ...r.flatMap((t) => [t.zoom, 2 * e + t.value])];
11248
- if (typeof r == "number" && Array.isArray(e))
11249
- return ["interpolate", ["linear"], ["zoom"], ...e.flatMap((t) => [t.zoom, 2 * t.value + r])];
11250
- if (Array.isArray(r) && Array.isArray(e)) {
11251
- const t = Array.from(/* @__PURE__ */ new Set([...r.map((n) => n.zoom), ...e.map((n) => n.zoom)])).sort((n, a) => n < a ? -1 : 1);
11252
- return ["interpolate", ["linear"], ["zoom"], ...t.flatMap((n) => [n, 2 * Kn(e, n) + Kn(r, n)])];
11253
- }
11254
- return 0;
11255
- }
11256
- function vu(r, e) {
11257
- return ["interpolate", ["linear"], ["get", e], ...r.flatMap((t) => [t.propertyValue, t.value])];
11258
- }
11259
- function Ya(r) {
11260
- const e = r.trimStart(), t = `${e}${" ".repeat(r.length - e.length)}`, n = Array.from(t);
11261
- if (!n.every((s) => s === " " || s === "_"))
11262
- throw new Error("A dash pattern must be composed only of whitespace and underscore characters.");
11263
- if (!(n.some((s) => s === "_") && n.some((s) => s === " ")))
11264
- throw new Error("A dash pattern must contain at least one underscore and one whitespace character");
11265
- const i = [1];
11266
- for (let s = 1; s < n.length; s += 1) {
11267
- const l = n[s - 1], u = n[s];
11268
- l === u ? i[i.length - 1] += 1 : i.push(1);
11269
- }
11270
- return i;
11271
- }
11272
- function Xn(r, e) {
11273
- return ["interpolate", ["linear"], ["get", e], ...r.flatMap((t) => [t.value, t.color])];
11274
- }
11275
- function Zn(r, e, t = !0) {
11276
- return t ? [
11277
- "interpolate",
11278
- ["linear"],
11279
- ["zoom"],
11280
- 0,
11281
- ["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.value, n.pointRadius * 0.025])],
11282
- 2,
11283
- ["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.value, n.pointRadius * 0.05])],
11284
- 4,
11285
- ["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.value, n.pointRadius * 0.1])],
11286
- 8,
11287
- ["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.value, n.pointRadius * 0.25])],
11288
- 16,
11289
- ["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.value, n.pointRadius])]
11290
- ] : ["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.value, n.pointRadius])];
11291
- }
11292
- function bu(r, e, t = !0) {
11293
- return t ? [
11294
- "interpolate",
11295
- ["linear"],
11296
- ["zoom"],
11297
- 0,
11298
- ["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.propertyValue, n.value * 0.025])],
11299
- 2,
11300
- ["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.propertyValue, n.value * 0.05])],
11301
- 4,
11302
- ["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.propertyValue, n.value * 0.1])],
11303
- 8,
11304
- ["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.propertyValue, n.value * 0.25])],
11305
- 16,
11306
- ["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.propertyValue, n.value])]
11307
- ] : ["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.propertyValue, n.value])];
11308
- }
11309
- function Wn(r, e) {
11310
- return r.every((t) => t.color[3] === r[0].color[3]) ? r[0].color[3] ? r[0].color[3] / 255 : 1 : [
11311
- "interpolate",
11312
- ["linear"],
11313
- ["get", e],
11314
- ...r.getRawColorStops().flatMap((t) => {
11315
- const n = t.value, a = t.color;
11316
- return [n, a.length === 4 ? a[3] / 255 : 1];
11317
- })
11318
- ];
11319
- }
11320
- function wu(r, e = 10) {
11321
- return [
11322
- "interpolate",
11323
- ["linear"],
11324
- ["heatmap-density"],
11325
- ...Array.from({ length: e + 1 }, (t, n) => {
11326
- const a = n / e;
11327
- return [a, r.getColorHex(a)];
11328
- }).flat()
11329
- ];
11330
- }
11331
11346
  async function xu(r, e, t = {}) {
11332
11347
  var a, o;
11333
11348
  if (!e.sourceId && !e.data)
@@ -11338,12 +11353,12 @@ async function xu(r, e, t = {}) {
11338
11353
  n = `https://api.maptiler.com/data/${e.data}/features.json?key=${N.apiKey}`;
11339
11354
  else if (((a = n.split(".").pop()) == null ? void 0 : a.toLowerCase().trim()) === "gpx") {
11340
11355
  const s = await (await fetch(n, t)).text();
11341
- n = qa(s);
11356
+ n = Ba(s);
11342
11357
  } else if (((o = n.split(".").pop()) == null ? void 0 : o.toLowerCase().trim()) === "kml") {
11343
11358
  const s = await (await fetch(n, t)).text();
11344
- n = Ga(s);
11359
+ n = qa(s);
11345
11360
  } else {
11346
- const i = qo(n) ?? du(n);
11361
+ const i = Eo(n) ?? du(n);
11347
11362
  i && (n = i);
11348
11363
  }
11349
11364
  if (!n)
@@ -11366,10 +11381,10 @@ function Su(r, e) {
11366
11381
  type: "geojson",
11367
11382
  data: e.data
11368
11383
  });
11369
- const o = e.lineWidth ?? 3, i = e.lineColor ?? Gr(), s = e.lineOpacity ?? 1, l = e.lineBlur ?? 0, u = e.lineGapWidth ?? 0;
11384
+ const o = e.lineWidth ?? 3, i = e.lineColor ?? Hr(), s = e.lineOpacity ?? 1, l = e.lineBlur ?? 0, u = e.lineGapWidth ?? 0;
11370
11385
  let c = e.lineDashArray ?? null;
11371
11386
  const p = e.outlineWidth ?? 1, f = e.outlineColor ?? "#FFFFFF", d = e.outlineOpacity ?? 1, h = e.outlineBlur ?? 0;
11372
- if (typeof c == "string" && (c = Ya(c)), e.outline === !0) {
11387
+ if (typeof c == "string" && (c = Za(c)), e.outline === !0) {
11373
11388
  const y = `${n}_outline`;
11374
11389
  a.polylineOutlineLayerId = y, r.addLayer(
11375
11390
  {
@@ -11385,7 +11400,7 @@ function Su(r, e) {
11385
11400
  paint: {
11386
11401
  "line-opacity": typeof d == "number" ? d : F(d),
11387
11402
  "line-color": typeof f == "string" ? f : Pe(f),
11388
- "line-width": gu(o, p),
11403
+ "line-width": mu(o, p),
11389
11404
  "line-blur": typeof h == "number" ? h : F(h)
11390
11405
  }
11391
11406
  },
@@ -11436,8 +11451,8 @@ function ku(r, e) {
11436
11451
  });
11437
11452
  }
11438
11453
  let o = e.outlineDashArray ?? null;
11439
- const i = e.outlineWidth ?? 1, s = e.outlineColor ?? "#FFFFFF", l = e.outlineOpacity ?? 1, u = e.outlineBlur ?? 0, c = e.fillColor ?? Gr(), p = e.fillOpacity ?? 1, f = e.outlinePosition ?? "center", d = e.pattern ?? null;
11440
- typeof o == "string" && (o = Ya(o));
11454
+ const i = e.outlineWidth ?? 1, s = e.outlineColor ?? "#FFFFFF", l = e.outlineOpacity ?? 1, u = e.outlineBlur ?? 0, c = e.fillColor ?? Hr(), p = e.fillOpacity ?? 1, f = e.outlinePosition ?? "center", d = e.pattern ?? null;
11455
+ typeof o == "string" && (o = Za(o));
11441
11456
  const h = (y = null) => {
11442
11457
  if (r.addLayer(
11443
11458
  {
@@ -11589,7 +11604,7 @@ function Cu(r, e) {
11589
11604
  e.beforeId
11590
11605
  );
11591
11606
  } else {
11592
- let L = typeof e.pointColor == "string" ? e.pointColor : Array.isArray(e.pointColor) ? e.pointColor.getColorHex(e.pointColor.getBounds().min) : Gr(), z = typeof e.pointRadius == "number" ? w ? F([
11607
+ let L = typeof e.pointColor == "string" ? e.pointColor : Array.isArray(e.pointColor) ? e.pointColor.getColorHex(e.pointColor.getBounds().min) : Hr(), z = typeof e.pointRadius == "number" ? w ? F([
11593
11608
  { zoom: 0, value: e.pointRadius * 0.025 },
11594
11609
  { zoom: 2, value: e.pointRadius * 0.05 },
11595
11610
  { zoom: 4, value: e.pointRadius * 0.1 },
@@ -11688,7 +11703,7 @@ function Lu(r, e) {
11688
11703
  { zoom: 16, value: 1 }
11689
11704
  ], p = e.property ?? null, f = e.weight ?? 1;
11690
11705
  let d = 1;
11691
- p ? typeof f == "number" ? (d = f, typeof e.weight == "number" && console.warn("The option `.property` is ignored when `.propertyValueWeights` is not of type `PropertyValueWeights`")) : Array.isArray(f) ? d = vu(f, p) : console.warn("The option `.property` is ignored when `.propertyValueWeights` is not of type `PropertyValueWeights`") : typeof f == "number" ? d = f : Array.isArray(f) && console.warn("The options `.propertyValueWeights` can only be used when `.property` is provided.");
11706
+ p ? typeof f == "number" ? (d = f, typeof e.weight == "number" && console.warn("The option `.property` is ignored when `.propertyValueWeights` is not of type `PropertyValueWeights`")) : Array.isArray(f) ? d = gu(f, p) : console.warn("The option `.property` is ignored when `.propertyValueWeights` is not of type `PropertyValueWeights`") : typeof f == "number" ? d = f : Array.isArray(f) && console.warn("The options `.propertyValueWeights` can only be used when `.property` is provided.");
11692
11707
  const h = [
11693
11708
  { zoom: 0, value: 50 * 0.025 },
11694
11709
  { zoom: 2, value: 50 * 0.05 },
@@ -11697,7 +11712,7 @@ function Lu(r, e) {
11697
11712
  { zoom: 16, value: 50 }
11698
11713
  ], y = e.radius ?? (i ? h : 10);
11699
11714
  let m = 1;
11700
- typeof y == "number" ? m = y : Array.isArray(y) && "zoom" in y[0] ? m = F(y) : p && Array.isArray(y) && "propertyValue" in y[0] ? m = bu(y, p, i) : !p && Array.isArray(y) && "propertyValue" in y[0] ? (m = F(h), console.warn("The option `.radius` can only be property-driven if the option `.property` is provided.")) : m = F(h);
11715
+ typeof y == "number" ? m = y : Array.isArray(y) && "zoom" in y[0] ? m = F(y) : p && Array.isArray(y) && "propertyValue" in y[0] ? m = vu(y, p, i) : !p && Array.isArray(y) && "propertyValue" in y[0] ? (m = F(h), console.warn("The option `.radius` can only be property-driven if the option `.property` is provided.")) : m = F(h);
11701
11716
  const w = {
11702
11717
  heatmapLayerId: n,
11703
11718
  heatmapSourceId: t
@@ -11719,7 +11734,7 @@ function Lu(r, e) {
11719
11734
  paint: {
11720
11735
  "heatmap-weight": d,
11721
11736
  "heatmap-intensity": typeof c == "number" ? c : F(c),
11722
- "heatmap-color": wu(l),
11737
+ "heatmap-color": bu(l),
11723
11738
  "heatmap-radius": m,
11724
11739
  "heatmap-opacity": typeof s == "number" ? s : F(s)
11725
11740
  }
@@ -11727,177 +11742,182 @@ function Lu(r, e) {
11727
11742
  e.beforeId
11728
11743
  ), w;
11729
11744
  }
11730
- const ec = {
11745
+ const Eu = {
11731
11746
  addPolyline: xu,
11732
11747
  addPolygon: ku,
11733
11748
  addPoint: Cu,
11734
11749
  addHeatmap: Lu,
11735
- takeScreenshot: yu
11736
- };
11737
- Do();
11738
- function tc() {
11739
- return Yn.version;
11740
- }
11741
- const rc = k.Map, nc = k.Marker, ac = k.Popup, oc = k.Style, ic = k.CanvasSource, sc = k.GeoJSONSource, lc = k.ImageSource, uc = k.RasterTileSource, cc = k.RasterDEMTileSource, pc = k.VectorTileSource, fc = k.VideoSource, dc = k.NavigationControl, hc = k.GeolocateControl, yc = k.AttributionControl, mc = k.LogoControl, gc = k.ScaleControl, vc = k.FullscreenControl, bc = k.TerrainControl, wc = k.BoxZoomHandler, xc = k.ScrollZoomHandler, Sc = k.CooperativeGesturesHandler, kc = k.KeyboardHandler, Cc = k.TwoFingersTouchPitchHandler, Lc = k.MapWheelEvent, Ec = k.MapTouchEvent, Tc = k.MapMouseEvent, Ac = k.config, _c = k.getVersion, {
11742
- setRTLTextPlugin: Mc,
11743
- getRTLTextPluginStatus: Ic,
11744
- LngLat: Pc,
11745
- LngLatBounds: Rc,
11746
- MercatorCoordinate: zc,
11747
- Evented: $c,
11748
- AJAXError: Fc,
11749
- prewarm: Oc,
11750
- clearPrewarmedResources: jc,
11751
- Hash: Nc,
11752
- Point: Uc,
11753
- EdgeInsets: Dc,
11754
- DragRotateHandler: Bc,
11755
- DragPanHandler: qc,
11756
- TwoFingersTouchZoomRotateHandler: Gc,
11757
- DoubleClickZoomHandler: Vc,
11758
- TwoFingersTouchZoomHandler: Hc,
11759
- TwoFingersTouchRotateHandler: Kc,
11760
- getWorkerCount: Xc,
11761
- setWorkerCount: Zc,
11762
- getMaxParallelImageRequests: Wc,
11763
- setMaxParallelImageRequests: Yc,
11764
- getWorkerUrl: Jc,
11765
- setWorkerUrl: Qc,
11766
- addSourceType: ep,
11767
- importScriptInWorkers: tp,
11768
- addProtocol: rp,
11769
- removeProtocol: np
11750
+ takeScreenshot: hu
11751
+ }, tc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11752
+ __proto__: null,
11753
+ helpers: Eu
11754
+ }, Symbol.toStringTag, { value: "Module" }));
11755
+ Co();
11756
+ function rc() {
11757
+ return "3.1.0rc3";
11758
+ }
11759
+ const nc = k.Map, ac = k.Marker, oc = k.Popup, ic = k.Style, sc = k.CanvasSource, lc = k.GeoJSONSource, uc = k.ImageSource, cc = k.RasterTileSource, pc = k.RasterDEMTileSource, fc = k.VectorTileSource, dc = k.VideoSource, hc = k.NavigationControl, yc = k.GeolocateControl, mc = k.AttributionControl, gc = k.LogoControl, vc = k.ScaleControl, bc = k.FullscreenControl, wc = k.TerrainControl, xc = k.BoxZoomHandler, Sc = k.ScrollZoomHandler, kc = k.CooperativeGesturesHandler, Cc = k.KeyboardHandler, Lc = k.TwoFingersTouchPitchHandler, Ec = k.MapWheelEvent, Tc = k.MapTouchEvent, Ac = k.MapMouseEvent, _c = k.config, Mc = k.getVersion, {
11760
+ setRTLTextPlugin: Ic,
11761
+ getRTLTextPluginStatus: Pc,
11762
+ LngLat: Rc,
11763
+ LngLatBounds: zc,
11764
+ MercatorCoordinate: $c,
11765
+ Evented: Fc,
11766
+ AJAXError: Oc,
11767
+ prewarm: jc,
11768
+ clearPrewarmedResources: Nc,
11769
+ Hash: Uc,
11770
+ Point: Dc,
11771
+ EdgeInsets: Bc,
11772
+ DragRotateHandler: qc,
11773
+ DragPanHandler: Gc,
11774
+ TwoFingersTouchZoomRotateHandler: Vc,
11775
+ DoubleClickZoomHandler: Hc,
11776
+ TwoFingersTouchZoomHandler: Kc,
11777
+ TwoFingersTouchRotateHandler: Xc,
11778
+ getWorkerCount: Zc,
11779
+ setWorkerCount: Wc,
11780
+ getMaxParallelImageRequests: Yc,
11781
+ setMaxParallelImageRequests: Jc,
11782
+ getWorkerUrl: Qc,
11783
+ setWorkerUrl: ep,
11784
+ addSourceType: tp,
11785
+ importScriptInWorkers: rp,
11786
+ addProtocol: np,
11787
+ removeProtocol: ap
11770
11788
  } = k;
11771
11789
  export {
11772
- Fc as AJAXError,
11773
- Gu as AttributionControl,
11774
- yc as AttributionControlMLGL,
11775
- Hu as BoxZoomHandler,
11776
- wc as BoxZoomHandlerMLGL,
11777
- Ou as CanvasSource,
11778
- ic as CanvasSourceMLGL,
11790
+ Oc as AJAXError,
11791
+ Vu as AttributionControl,
11792
+ mc as AttributionControlMLGL,
11793
+ Ku as BoxZoomHandler,
11794
+ xc as BoxZoomHandlerMLGL,
11795
+ ju as CanvasSource,
11796
+ sc as CanvasSourceMLGL,
11779
11797
  C as ColorRamp,
11780
11798
  Wa as ColorRampCollection,
11781
- Xu as CooperativeGesturesHandler,
11782
- Sc as CooperativeGesturesHandlerMLGL,
11783
- Vc as DoubleClickZoomHandler,
11784
- qc as DragPanHandler,
11785
- Bc as DragRotateHandler,
11786
- Dc as EdgeInsets,
11787
- $c as Evented,
11788
- ni as FullscreenControl,
11789
- vc as FullscreenControlMLGL,
11790
- ju as GeoJSONSource,
11791
- sc as GeoJSONSourceMLGL,
11792
- ei as GeolocateControl,
11793
- hc as GeolocateControlMLGL,
11799
+ Zu as CooperativeGesturesHandler,
11800
+ kc as CooperativeGesturesHandlerMLGL,
11801
+ ye as DOMcreate,
11802
+ Dr as DOMremove,
11803
+ Hc as DoubleClickZoomHandler,
11804
+ Gc as DragPanHandler,
11805
+ qc as DragRotateHandler,
11806
+ Bc as EdgeInsets,
11807
+ Fc as Evented,
11808
+ Uo as FullscreenControl,
11809
+ bc as FullscreenControlMLGL,
11810
+ Nu as GeoJSONSource,
11811
+ lc as GeoJSONSourceMLGL,
11812
+ Oo as GeolocateControl,
11813
+ yc as GeolocateControlMLGL,
11794
11814
  ou as GeolocationType,
11795
- Nc as Hash,
11796
- Nu as ImageSource,
11797
- lc as ImageSourceMLGL,
11798
- Zu as KeyboardHandler,
11799
- kc as KeyboardHandlerMLGL,
11815
+ Uc as Hash,
11816
+ Uu as ImageSource,
11817
+ uc as ImageSourceMLGL,
11818
+ Wu as KeyboardHandler,
11819
+ Cc as KeyboardHandlerMLGL,
11800
11820
  P as Language,
11801
- Pc as LngLat,
11802
- Rc as LngLatBounds,
11803
- ti as LogoControl,
11804
- mc as LogoControlMLGL,
11805
- Dr as Map,
11806
- rc as MapMLGL,
11807
- Qu as MapMouseEvent,
11808
- Tc as MapMouseEventMLGL,
11809
- ip as MapStyle,
11810
- sp as MapStyleVariant,
11811
- Ju as MapTouchEvent,
11812
- Ec as MapTouchEventMLGL,
11813
- Yu as MapWheelEvent,
11814
- Lc as MapWheelEventMLGL,
11815
- vl as MaptilerGeolocateControl,
11816
- tn as MaptilerLogoControl,
11817
- ml as MaptilerNavigationControl,
11818
- bl as MaptilerProjectionControl,
11819
- yl as MaptilerTerrainControl,
11820
- Ru as Marker,
11821
- nc as MarkerMLGL,
11822
- zc as MercatorCoordinate,
11823
- dc as NavigationControMLGL,
11824
- Qo as NavigationControl,
11825
- Uc as Point,
11826
- $u as Popup,
11827
- ac as PopupMLGL,
11828
- Du as RasterDEMTileSource,
11829
- cc as RasterDEMTileSourceMLGL,
11830
- Uu as RasterTileSource,
11831
- uc as RasterTileSourceMLGL,
11832
- lp as ReferenceMapStyle,
11833
- ri as ScaleControl,
11834
- gc as ScaleControlMLGL,
11835
- Ku as ScrollZoomHandler,
11836
- xc as ScrollZoomHandlerMLGL,
11837
- zo as SdkConfig,
11838
- up as ServiceError,
11839
- Fu as Style,
11840
- oc as StyleMLGL,
11841
- bc as TerrainControMLGL,
11842
- Vu as TerrainControl,
11843
- Wu as TwoFingersTouchPitchHandler,
11844
- Cc as TwoFingersTouchPitchHandlerMLGL,
11845
- Kc as TwoFingersTouchRotateHandler,
11846
- Hc as TwoFingersTouchZoomHandler,
11847
- Gc as TwoFingersTouchZoomRotateHandler,
11848
- Bu as VectorTileSource,
11849
- pc as VectorTileSourceMLGL,
11850
- qu as VideoSource,
11851
- fc as VideoSourceMLGL,
11852
- rp as addProtocol,
11853
- ep as addSourceType,
11854
- cp as areSameLanguages,
11855
- pp as bufferToPixelDataBrowser,
11856
- fp as circumferenceAtLatitude,
11857
- jc as clearPrewarmedResources,
11821
+ Rc as LngLat,
11822
+ zc as LngLatBounds,
11823
+ jo as LogoControl,
11824
+ gc as LogoControlMLGL,
11825
+ qr as Map,
11826
+ nc as MapMLGL,
11827
+ ec as MapMouseEvent,
11828
+ Ac as MapMouseEventMLGL,
11829
+ sp as MapStyle,
11830
+ lp as MapStyleVariant,
11831
+ Qu as MapTouchEvent,
11832
+ Tc as MapTouchEventMLGL,
11833
+ Ju as MapWheelEvent,
11834
+ Ec as MapWheelEventMLGL,
11835
+ tl as MaptilerGeolocateControl,
11836
+ nn as MaptilerLogoControl,
11837
+ Qs as MaptilerNavigationControl,
11838
+ rl as MaptilerProjectionControl,
11839
+ Js as MaptilerTerrainControl,
11840
+ zu as Marker,
11841
+ ac as MarkerMLGL,
11842
+ $c as MercatorCoordinate,
11843
+ hc as NavigationControMLGL,
11844
+ Fo as NavigationControl,
11845
+ Dc as Point,
11846
+ Fu as Popup,
11847
+ oc as PopupMLGL,
11848
+ Bu as RasterDEMTileSource,
11849
+ pc as RasterDEMTileSourceMLGL,
11850
+ Du as RasterTileSource,
11851
+ cc as RasterTileSourceMLGL,
11852
+ up as ReferenceMapStyle,
11853
+ No as ScaleControl,
11854
+ vc as ScaleControlMLGL,
11855
+ Xu as ScrollZoomHandler,
11856
+ Sc as ScrollZoomHandlerMLGL,
11857
+ go as SdkConfig,
11858
+ cp as ServiceError,
11859
+ Ou as Style,
11860
+ ic as StyleMLGL,
11861
+ wc as TerrainControMLGL,
11862
+ Hu as TerrainControl,
11863
+ Yu as TwoFingersTouchPitchHandler,
11864
+ Lc as TwoFingersTouchPitchHandlerMLGL,
11865
+ Xc as TwoFingersTouchRotateHandler,
11866
+ Kc as TwoFingersTouchZoomHandler,
11867
+ Vc as TwoFingersTouchZoomRotateHandler,
11868
+ qu as VectorTileSource,
11869
+ fc as VectorTileSourceMLGL,
11870
+ Gu as VideoSource,
11871
+ dc as VideoSourceMLGL,
11872
+ np as addProtocol,
11873
+ tp as addSourceType,
11874
+ pp as areSameLanguages,
11875
+ fp as bufferToPixelDataBrowser,
11876
+ dp as circumferenceAtLatitude,
11877
+ Nc as clearPrewarmedResources,
11858
11878
  N as config,
11859
- Ac as configMLGL,
11860
- dp as coordinates,
11861
- hp as data,
11862
- Pu as displayWebGLContextLostWarning,
11863
- yp as elevation,
11864
- mp as expandMapStyle,
11865
- gp as geocoding,
11866
- vp as geolocation,
11867
- bp as getAutoLanguage,
11868
- Zr as getBrowserLanguage,
11869
- wp as getBufferToPixelDataParser,
11870
- xp as getLanguageInfoFromCode,
11871
- Sp as getLanguageInfoFromFlag,
11872
- kp as getLanguageInfoFromKey,
11873
- _c as getMapLibreVersion,
11874
- Wc as getMaxParallelImageRequests,
11875
- Ic as getRTLTextPluginStatus,
11876
- Cp as getTileCache,
11877
- tc as getVersion,
11878
- Go as getWebGLSupportError,
11879
- Xc as getWorkerCount,
11880
- Jc as getWorkerUrl,
11881
- qa as gpx,
11879
+ _c as configMLGL,
11880
+ hp as coordinates,
11881
+ yp as data,
11882
+ Ru as displayWebGLContextLostWarning,
11883
+ mp as elevation,
11884
+ gp as expandMapStyle,
11885
+ vp as geocoding,
11886
+ bp as geolocation,
11887
+ wp as getAutoLanguage,
11888
+ Jr as getBrowserLanguage,
11889
+ xp as getBufferToPixelDataParser,
11890
+ Sp as getLanguageInfoFromCode,
11891
+ kp as getLanguageInfoFromFlag,
11892
+ Cp as getLanguageInfoFromKey,
11893
+ Mc as getMapLibreVersion,
11894
+ Yc as getMaxParallelImageRequests,
11895
+ Pc as getRTLTextPluginStatus,
11896
+ Lp as getTileCache,
11897
+ rc as getVersion,
11898
+ To as getWebGLSupportError,
11899
+ Zc as getWorkerCount,
11900
+ Qc as getWorkerUrl,
11901
+ Ba as gpx,
11882
11902
  du as gpxOrKml,
11883
- Ba as hasChildNodeWithName,
11884
- ec as helpers,
11885
- tp as importScriptInWorkers,
11886
- Lp as isLanguageInfo,
11887
- Ga as kml,
11888
- Ep as mapStylePresetList,
11889
- Tp as math,
11890
- Ap as misc,
11891
- Oc as prewarm,
11892
- np as removeProtocol,
11893
- Yc as setMaxParallelImageRequests,
11894
- Mc as setRTLTextPlugin,
11895
- Zc as setWorkerCount,
11896
- Qc as setWorkerUrl,
11897
- _p as staticMaps,
11898
- Br as str2xml,
11899
- Mp as styleToStyle,
11900
- Ip as toLanguageInfo,
11903
+ Da as hasChildNodeWithName,
11904
+ tc as helpers,
11905
+ rp as importScriptInWorkers,
11906
+ Ep as isLanguageInfo,
11907
+ qa as kml,
11908
+ Tp as mapStylePresetList,
11909
+ Ap as math,
11910
+ _p as misc,
11911
+ jc as prewarm,
11912
+ ap as removeProtocol,
11913
+ Jc as setMaxParallelImageRequests,
11914
+ Ic as setRTLTextPlugin,
11915
+ Wc as setWorkerCount,
11916
+ ep as setWorkerUrl,
11917
+ Mp as staticMaps,
11918
+ Gr as str2xml,
11919
+ Ip as styleToStyle,
11920
+ Pp as toLanguageInfo,
11901
11921
  Dn as xml2str
11902
11922
  };
11903
11923
  //# sourceMappingURL=maptiler-sdk.mjs.map