@maptiler/sdk 3.0.0-rc.5 → 3.0.1

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 (51) hide show
  1. package/{readme.md → README.md} +2 -0
  2. package/dist/maptiler-sdk.css +3 -3
  3. package/dist/maptiler-sdk.d.ts +1 -0
  4. package/dist/maptiler-sdk.mjs +911 -990
  5. package/dist/maptiler-sdk.mjs.map +1 -1
  6. package/dist/src/MLAdapters/AttributionControl.d.ts +0 -1
  7. package/dist/src/MLAdapters/BoxZoomHandler.d.ts +0 -1
  8. package/dist/src/MLAdapters/CanvasSource.d.ts +0 -1
  9. package/dist/src/MLAdapters/CooperativeGesturesHandler.d.ts +0 -1
  10. package/dist/src/MLAdapters/FullscreenControl.d.ts +0 -1
  11. package/dist/src/MLAdapters/GeoJSONSource.d.ts +0 -1
  12. package/dist/src/MLAdapters/GeolocateControl.d.ts +0 -1
  13. package/dist/src/MLAdapters/ImageSource.d.ts +0 -1
  14. package/dist/src/MLAdapters/KeyboardHandler.d.ts +0 -1
  15. package/dist/src/MLAdapters/LogoControl.d.ts +0 -1
  16. package/dist/src/MLAdapters/MapMouseEvent.d.ts +0 -1
  17. package/dist/src/MLAdapters/MapTouchEvent.d.ts +0 -1
  18. package/dist/src/MLAdapters/MapWheelEvent.d.ts +0 -1
  19. package/dist/src/MLAdapters/Marker.d.ts +0 -1
  20. package/dist/src/MLAdapters/NavigationControl.d.ts +0 -1
  21. package/dist/src/MLAdapters/Popup.d.ts +0 -1
  22. package/dist/src/MLAdapters/RasterDEMTileSource.d.ts +0 -1
  23. package/dist/src/MLAdapters/RasterTileSource.d.ts +0 -1
  24. package/dist/src/MLAdapters/ScaleControl.d.ts +0 -1
  25. package/dist/src/MLAdapters/ScrollZoomHandler.d.ts +0 -1
  26. package/dist/src/MLAdapters/Style.d.ts +0 -1
  27. package/dist/src/MLAdapters/TerrainControl.d.ts +0 -1
  28. package/dist/src/MLAdapters/TwoFingersTouchPitchHandler.d.ts +0 -1
  29. package/dist/src/MLAdapters/VectorTileSource.d.ts +0 -1
  30. package/dist/src/MLAdapters/VideoSource.d.ts +0 -1
  31. package/dist/src/Map.d.ts +0 -1
  32. package/dist/src/MaptilerGeolocateControl.d.ts +0 -1
  33. package/dist/src/MaptilerLogoControl.d.ts +0 -1
  34. package/dist/src/MaptilerNavigationControl.d.ts +0 -1
  35. package/dist/src/MaptilerProjectionControl.d.ts +0 -1
  36. package/dist/src/MaptilerTerrainControl.d.ts +0 -1
  37. package/dist/src/Minimap.d.ts +0 -1
  38. package/dist/src/Telemetry.d.ts +0 -1
  39. package/dist/src/caching.d.ts +0 -1
  40. package/dist/src/config.d.ts +0 -1
  41. package/dist/src/helpers/index.d.ts +0 -1
  42. package/dist/src/helpers/screenshot.d.ts +0 -1
  43. package/dist/src/helpers/stylehelper.d.ts +0 -1
  44. package/dist/src/helpers/vectorlayerhelpers.d.ts +0 -1
  45. package/dist/src/index.d.ts +1 -2
  46. package/dist/src/language.d.ts +0 -1
  47. package/dist/src/mapstyle.d.ts +0 -1
  48. package/dist/src/tools.d.ts +0 -1
  49. package/package.json +18 -18
  50. package/vite.config-dev.ts +30 -0
  51. /package/{vite.config.ts → vite.config-test.ts} +0 -0
@@ -1,87 +1,34 @@
1
- var Ia = Object.defineProperty;
2
- var Ir = (r) => {
1
+ var Ta = Object.defineProperty;
2
+ var Er = (r) => {
3
3
  throw TypeError(r);
4
4
  };
5
- var Ea = (r, e, t) => e in r ? Ia(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
6
- var L = (r, e, t) => Ea(r, typeof e != "symbol" ? e + "" : e, t), Pt = (r, e, t) => e.has(r) || Ir("Cannot " + t);
7
- var I = (r, e, t) => (Pt(r, e, "read from private field"), t ? t.call(r) : e.get(r)), ye = (r, e, t) => e.has(r) ? Ir("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), Se = (r, e, t, n) => (Pt(r, e, "write to private field"), n ? n.call(r, t) : e.set(r, t), t), G = (r, e, t) => (Pt(r, e, "access private method"), t);
5
+ var Ia = (r, e, t) => e in r ? Ta(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
6
+ var L = (r, e, t) => Ia(r, typeof e != "symbol" ? e + "" : e, t), Pt = (r, e, t) => e.has(r) || Er("Cannot " + t);
7
+ var E = (r, e, t) => (Pt(r, e, "read from private field"), t ? t.call(r) : e.get(r)), ye = (r, e, t) => e.has(r) ? Er("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), Se = (r, e, t, n) => (Pt(r, e, "write to private field"), n ? n.call(r, t) : e.set(r, t), t), G = (r, e, t) => (Pt(r, e, "access private method"), t);
8
8
  import S from "maplibre-gl";
9
- import { Language as za, getLanguageInfoFromCode as Er, config as Rt, MapStyle as qe, mapStylePresetList as $t, expandMapStyle as _a, MapStyleVariant as Pa, ReferenceMapStyle as Ra, toLanguageInfo as zr, getLanguageInfoFromFlag as $a, geolocation as _r } from "@maptiler/client";
10
- import { MapStyle as Gu, MapStyleVariant as Hu, ReferenceMapStyle as Ku, ServiceError as Wu, areSameLanguages as Zu, bufferToPixelDataBrowser as Ju, circumferenceAtLatitude as Yu, coordinates as Xu, data as Qu, elevation as ec, expandMapStyle as tc, geocoding as rc, geolocation as nc, getAutoLanguage as ac, getBufferToPixelDataParser as oc, getLanguageInfoFromCode as ic, getLanguageInfoFromFlag as sc, getLanguageInfoFromKey as lc, getTileCache as uc, isLanguageInfo as cc, mapStylePresetList as pc, math as fc, misc as dc, staticMaps as yc, styleToStyle as mc, toLanguageInfo as hc } from "@maptiler/client";
11
- import ja from "events";
12
- import { v4 as Na } from "uuid";
13
- import { Base64 as Fa } from "js-base64";
14
- const Oa = "@maptiler/sdk", Da = "3.0.0-rc.5", qa = "The Javascript & TypeScript map SDK tailored for MapTiler Cloud", Ua = "dist/maptiler-sdk.mjs", Ba = "dist/maptiler-sdk.d.ts", Va = "dist/maptiler-sdk.css", Ga = "module", Ha = {
15
- ".": {
16
- import: "./dist/maptiler-sdk.mjs",
17
- types: "./dist/maptiler-sdk.d.ts"
18
- },
19
- "./dist/maptiler-sdk.css": {
20
- import: "./dist/maptiler-sdk.css"
21
- },
22
- "./style.css": {
23
- import: "./dist/maptiler-sdk.css"
24
- }
25
- }, Ka = [
26
- "maptiler",
27
- "map",
28
- "sdk",
29
- "webmap",
30
- "cloud",
31
- "webGL",
32
- "maplibre"
33
- ], Wa = "https://docs.maptiler.com/sdk-js/", Za = "BSD-3-Clause", Ja = {
34
- type: "git",
35
- url: "https://github.com/maptiler/maptiler-sdk-js.git"
36
- }, Ya = {
37
- biome: "biome check --max-diagnostics=1000",
38
- "biome:fix": "npx @biomejs/biome check --max-diagnostics=1000 --write",
39
- doc: "rm -rf docs/* && typedoc --out docs && cp -r images docs/",
40
- test: "vitest run",
41
- "build-css": "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",
42
- "build-umd": "tsc && NODE_ENV=production vite build -c vite.config-umd.ts",
43
- "build-es": "tsc && NODE_ENV=production vite build -c vite.config-es.ts",
44
- build: "npm run build-es; npm run build-umd; npm run build-css",
45
- make: "npm run biome:fix && npm run build",
46
- "dev-umd": "npm run build-css && tsc && NODE_ENV=dev vite build -w -c vite.config-umd.ts",
47
- help: "vite build --help"
48
- }, Xa = "MapTiler", Qa = {
49
- "@biomejs/biome": "1.8.3",
50
- "@types/uuid": "^9.0.2",
51
- "@types/xmldom": "^0.1.31",
52
- "@xmldom/xmldom": "^0.8.10",
53
- serve: "^14.2.0",
54
- terser: "^5.17.1",
55
- typedoc: "^0.24.8",
56
- typescript: "^5.1.6",
57
- vite: "^5.3.4",
58
- "vite-plugin-dts": "^4.0.0-beta.0",
59
- vitest: "^0.34.2"
60
- }, eo = {
61
- "@maplibre/maplibre-gl-style-spec": "^22.0.1",
62
- "@maptiler/client": "^2.2.0",
63
- events: "^3.3.0",
64
- "js-base64": "^3.7.4",
65
- "maplibre-gl": "^5.0.0-pre.10",
66
- uuid: "^9.0.0"
67
- }, Sn = {
68
- name: Oa,
69
- version: Da,
70
- description: qa,
71
- module: Ua,
72
- types: Ba,
73
- style: Va,
74
- type: Ga,
75
- exports: Ha,
76
- keywords: Ka,
77
- homepage: Wa,
78
- license: Za,
79
- repository: Ja,
80
- scripts: Ya,
81
- author: Xa,
82
- devDependencies: Qa,
83
- dependencies: eo
84
- }, E = {
9
+ import { Language as Ea, getLanguageInfoFromCode as Mr, config as Rt, MapStyle as qe, mapStylePresetList as $t, expandMapStyle as Ma, MapStyleVariant as za, ReferenceMapStyle as _a, toLanguageInfo as zr, getLanguageInfoFromFlag as Pa, geolocation as _r } from "@maptiler/client";
10
+ import { MapStyle as Uu, MapStyleVariant as Vu, ReferenceMapStyle as Gu, ServiceError as Hu, areSameLanguages as Ku, bufferToPixelDataBrowser as Wu, circumferenceAtLatitude as Zu, coordinates as Ju, data as Yu, elevation as Xu, expandMapStyle as Qu, geocoding as ec, geolocation as tc, getAutoLanguage as rc, getBufferToPixelDataParser as nc, getLanguageInfoFromCode as ac, getLanguageInfoFromFlag as oc, getLanguageInfoFromKey as ic, getTileCache as sc, isLanguageInfo as lc, mapStylePresetList as uc, math as cc, misc as pc, staticMaps as fc, styleToStyle as dc, toLanguageInfo as yc } from "@maptiler/client";
11
+ import Ra from "events";
12
+ import { v4 as $a } from "uuid";
13
+ import { Base64 as ja } from "js-base64";
14
+ const Na = "@maptiler/sdk", Fa = "3.0.1", Oa = "The Javascript & TypeScript map SDK tailored for MapTiler Cloud", Da = "dist/maptiler-sdk.mjs", qa = "dist/maptiler-sdk.d.ts", Ba = "dist/maptiler-sdk.css", Ua = "module", Va = { ".": { 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" } }, Ga = ["maptiler", "map", "sdk", "webmap", "cloud", "webGL", "maplibre"], Ha = "https://docs.maptiler.com/sdk-js/", Ka = "BSD-3-Clause", Wa = { type: "git", url: "https://github.com/maptiler/maptiler-sdk-js.git" }, Za = { biome: "biome check --max-diagnostics=1000", "biome:fix": "npx @biomejs/biome check --max-diagnostics=1000 --write", doc: "rm -rf docs/* && typedoc --out docs && cp -r images docs/", test: "vitest run -c vite.config-test.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 biome:fix && npm run build", 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", ncu: "npx npm-check-updates" }, Ja = "MapTiler", Ya = { "@biomejs/biome": "1.9.4", "@types/uuid": "^10.0.0", "@types/xmldom": "^0.1.31", "@xmldom/xmldom": "^0.8.10", concurrently: "^9.1.2", typedoc: "^0.27.6", typescript: "^5.7.3", vite: "^6.0.7", "vite-plugin-dts": "^4.5.0", vitest: "^2.1.8" }, Xa = { "@maplibre/maplibre-gl-style-spec": "^23.0.0", "@maptiler/client": "^2.2.0", events: "^3.3.0", "js-base64": "^3.7.7", "maplibre-gl": "^5.0.1", uuid: "^11.0.5" }, wn = {
15
+ name: Na,
16
+ version: Fa,
17
+ description: Oa,
18
+ module: Da,
19
+ types: qa,
20
+ style: Ba,
21
+ type: Ua,
22
+ exports: Va,
23
+ keywords: Ga,
24
+ homepage: Ha,
25
+ license: Ka,
26
+ repository: Wa,
27
+ scripts: Za,
28
+ author: Ja,
29
+ devDependencies: Ya,
30
+ dependencies: Xa
31
+ }, M = {
85
32
  /**
86
33
  * Language mode to display labels in both the local language and the language of the visitor's device, concatenated.
87
34
  * Note that if those two languages are the same, labels won't be duplicated.
@@ -121,14 +68,14 @@ const Oa = "@maptiler/sdk", Da = "3.0.0-rc.5", qa = "The Javascript & TypeScript
121
68
  isMode: !0,
122
69
  geocoding: !1
123
70
  },
124
- ...za
71
+ ...Ea
125
72
  };
126
73
  function Pr() {
127
74
  if (typeof navigator > "u") {
128
- const e = Intl.DateTimeFormat().resolvedOptions().locale.split("-")[0], t = Er(e);
129
- return t || E.ENGLISH;
75
+ const e = Intl.DateTimeFormat().resolvedOptions().locale.split("-")[0], t = Mr(e);
76
+ return t || M.ENGLISH;
130
77
  }
131
- return Array.from(new Set(navigator.languages.map((e) => e.split("-")[0]))).map((e) => Er(e)).filter((e) => e)[0] ?? E.LOCAL;
78
+ return Array.from(new Set(navigator.languages.map((e) => e.split("-")[0]))).map((e) => Mr(e)).filter((e) => e)[0] ?? M.LOCAL;
132
79
  }
133
80
  const V = {
134
81
  maptilerLogoURL: "https://api.maptiler.com/resources/logo.svg",
@@ -136,14 +83,14 @@ const V = {
136
83
  maptilerApiHost: "api.maptiler.com",
137
84
  telemetryURL: "https://api.maptiler.com/metrics",
138
85
  rtlPluginURL: "https://cdn.maptiler.com/mapbox-gl-rtl-text/v0.2.3/mapbox-gl-rtl-text.min.js",
139
- primaryLanguage: E.STYLE,
140
- secondaryLanguage: E.LOCAL,
86
+ primaryLanguage: M.STYLE,
87
+ secondaryLanguage: M.LOCAL,
141
88
  terrainSourceURL: "https://api.maptiler.com/tiles/terrain-rgb-v2/tiles.json",
142
89
  terrainSourceId: "maptiler-terrain"
143
90
  };
144
91
  Object.freeze(V);
145
- const nr = Na();
146
- class to extends ja {
92
+ const nr = $a();
93
+ class Qa extends Ra {
147
94
  constructor() {
148
95
  super(...arguments);
149
96
  /**
@@ -233,8 +180,8 @@ class to extends ja {
233
180
  return Rt.fetch;
234
181
  }
235
182
  }
236
- const F = new to(), { addProtocol: Rr } = S, Ht = "localcache_source", Kt = "localcache", ro = "maptiler_sdk", no = 1e3, ao = 100, Wt = typeof caches < "u";
237
- function oo(r, e) {
183
+ const F = new Qa(), { addProtocol: Rr } = S, Ht = "localcache_source", Kt = "localcache", eo = "maptiler_sdk", to = 1e3, ro = 100, Wt = typeof caches < "u";
184
+ function no(r, e) {
238
185
  if (Wt && F.caching && F.session && r.host === V.maptilerApiHost) {
239
186
  if (e === "Source" && r.href.includes("tiles.json"))
240
187
  return r.href.replace("https://", `${Ht}://`);
@@ -244,16 +191,16 @@ function oo(r, e) {
244
191
  return r.href;
245
192
  }
246
193
  let jt;
247
- async function xn() {
248
- return jt || (jt = await caches.open(ro)), jt;
194
+ async function Sn() {
195
+ return jt || (jt = await caches.open(eo)), jt;
249
196
  }
250
197
  let $r = 0;
251
- async function io() {
252
- const r = await xn(), e = await r.keys(), t = e.slice(0, Math.max(e.length - no, 0));
198
+ async function ao() {
199
+ const r = await Sn(), e = await r.keys(), t = e.slice(0, Math.max(e.length - to, 0));
253
200
  for (const n of t)
254
201
  r.delete(n);
255
202
  }
256
- function so() {
203
+ function oo() {
257
204
  Rr(
258
205
  Ht,
259
206
  async (r, e) => {
@@ -281,18 +228,18 @@ function so() {
281
228
  data: await m.arrayBuffer(),
282
229
  cacheControl: m.headers.get("Cache-Control"),
283
230
  expires: m.headers.get("Expires")
284
- }), l = await xn(), u = await l.match(a);
231
+ }), l = await Sn(), u = await l.match(a);
285
232
  if (u)
286
233
  return s(u);
287
234
  const c = r;
288
235
  c.signal = e.signal;
289
236
  const p = await fetch(i, c);
290
237
  return p.status >= 200 && p.status < 300 && (l.put(a, p.clone()).catch(() => {
291
- }), ++$r > ao && (io(), $r = 0)), s(p);
238
+ }), ++$r > ro && (ao(), $r = 0)), s(p);
292
239
  }
293
240
  );
294
241
  }
295
- function lo() {
242
+ function io() {
296
243
  if (typeof window > "u") return;
297
244
  const r = S.getRTLTextPluginStatus();
298
245
  if (r === "unavailable" || r === "requested")
@@ -301,7 +248,7 @@ function lo() {
301
248
  } catch {
302
249
  }
303
250
  }
304
- function uo(r, e) {
251
+ function so(r, e) {
305
252
  for (const t of r)
306
253
  typeof e[t] == "function" && (e[t] = e[t].bind(e));
307
254
  }
@@ -322,7 +269,7 @@ function jr(r, e) {
322
269
  };
323
270
  }
324
271
  return t.host === V.maptilerApiHost && (t.searchParams.has("key") || t.searchParams.append("key", F.apiKey), F.session && t.searchParams.append("mtsid", nr)), {
325
- url: oo(t, e)
272
+ url: no(t, e)
326
273
  };
327
274
  }
328
275
  function Nr(r) {
@@ -337,24 +284,24 @@ function Nr(r) {
337
284
  return jr(e, t);
338
285
  };
339
286
  }
340
- function kn() {
287
+ function xn() {
341
288
  return Math.random().toString(36).substring(2);
342
289
  }
343
290
  function ht(r) {
344
291
  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);
345
292
  }
346
- function co(r) {
293
+ function lo(r) {
347
294
  try {
348
295
  return JSON.parse(r);
349
296
  } catch {
350
297
  }
351
298
  return null;
352
299
  }
353
- function po() {
300
+ function uo() {
354
301
  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.";
355
302
  }
356
- function fo(r) {
357
- const e = po();
303
+ function co(r) {
304
+ const e = uo();
358
305
  if (!e) return;
359
306
  let t = null;
360
307
  if (typeof r == "string" ? t = document.getElementById(r) : r instanceof HTMLElement && (t = r), !t)
@@ -362,7 +309,7 @@ function fo(r) {
362
309
  const n = document.createElement("div");
363
310
  throw n.innerHTML = e, n.classList.add("webgl-warning-div"), t.appendChild(n), new Error(e);
364
311
  }
365
- function yo(r) {
312
+ function po(r) {
366
313
  const e = "The WebGL context was lost.";
367
314
  let t = null;
368
315
  if (typeof r == "string" ? t = document.getElementById(r) : r instanceof HTMLElement && (t = r), !t)
@@ -373,7 +320,7 @@ function yo(r) {
373
320
  function Fr(r, e) {
374
321
  return !(!Array.isArray(r) || r.length !== 2 || r[0] !== "get" || typeof r[1] != "string" || e && !r[1].startsWith("name:") || !e && r[1] !== "name");
375
322
  }
376
- function mo(r, e, t) {
323
+ function fo(r, e, t) {
377
324
  const n = structuredClone(r), a = (o) => {
378
325
  if (typeof o != "string")
379
326
  for (let i = 0; i < o.length; i += 1)
@@ -381,20 +328,20 @@ function mo(r, e, t) {
381
328
  };
382
329
  return Fr(n, t) ? e : (a(n), n);
383
330
  }
384
- function ho(r, e) {
331
+ function yo(r, e) {
385
332
  const t = e ? /\{name:\S+\}/ : /\{name\}/;
386
333
  return {
387
334
  contains: t.test(r),
388
335
  exactMatch: new RegExp(`^${t.source}$`).test(r)
389
336
  };
390
337
  }
391
- function go(r, e, t) {
338
+ function mo(r, e, t) {
392
339
  const n = t ? /\{name:\S+\}/ : /\{name\}/, a = r.split(n);
393
340
  return ["concat", ...a.flatMap(
394
341
  (s, l) => l === a.length - 1 ? [s] : [s, e]
395
342
  )];
396
343
  }
397
- function vo(r) {
344
+ function ho(r) {
398
345
  var n;
399
346
  const e = /\{name(?:\:(?<language>\S+))?\}/g, t = [];
400
347
  for (; ; ) {
@@ -405,7 +352,7 @@ function vo(r) {
405
352
  }
406
353
  return t;
407
354
  }
408
- function bo(r) {
355
+ function go(r) {
409
356
  return !Array.isArray(r) || r.length !== 2 || r[0] !== "get" || typeof r[1] != "string" ? null : r[1].trim() === "name" ? {
410
357
  isLanguage: !0,
411
358
  localization: null
@@ -414,17 +361,17 @@ function bo(r) {
414
361
  localization: r[1].trim().split(":").pop()
415
362
  } : null;
416
363
  }
417
- function wo(r) {
364
+ function vo(r) {
418
365
  const e = [], t = structuredClone(r), n = (a) => {
419
366
  if (typeof a != "string")
420
367
  for (let o = 0; o < a.length; o += 1) {
421
- const i = bo(a[o]);
368
+ const i = go(a[o]);
422
369
  i ? e.push(i.localization) : n(a[o]);
423
370
  }
424
371
  };
425
372
  return n([t]), e;
426
373
  }
427
- function So(r, e) {
374
+ function bo(r, e) {
428
375
  const t = [];
429
376
  for (const o of r) {
430
377
  if (o.type !== "symbol")
@@ -435,10 +382,10 @@ function So(r, e) {
435
382
  const u = e.getLayoutProperty(s, "text-field");
436
383
  if (u)
437
384
  if (typeof u == "string") {
438
- const c = vo(u);
385
+ const c = ho(u);
439
386
  t.push(c);
440
387
  } else {
441
- const c = wo(u);
388
+ const c = vo(u);
442
389
  t.push(c);
443
390
  }
444
391
  }
@@ -450,132 +397,132 @@ function So(r, e) {
450
397
  o === null ? a.unlocalized += 1 : (o in a.localized || (a.localized[o] = 0), a.localized[o] += 1);
451
398
  return a;
452
399
  }
453
- let vl = class extends S.Marker {
400
+ let hl = class extends S.Marker {
454
401
  addTo(e) {
455
402
  return super.addTo(e);
456
403
  }
457
404
  };
458
- class wl extends S.Popup {
405
+ class vl extends S.Popup {
459
406
  addTo(e) {
460
407
  return super.addTo(e);
461
408
  }
462
409
  }
463
- class Sl extends S.Style {
410
+ class bl extends S.Style {
464
411
  constructor(e, t = {}) {
465
412
  super(e, t);
466
413
  }
467
414
  }
468
- class xl extends S.CanvasSource {
415
+ class wl extends S.CanvasSource {
469
416
  onAdd(e) {
470
417
  super.onAdd(e);
471
418
  }
472
419
  }
473
- class kl extends S.GeoJSONSource {
420
+ class Sl extends S.GeoJSONSource {
474
421
  onAdd(e) {
475
422
  super.onAdd(e);
476
423
  }
477
424
  }
478
- class Ll extends S.ImageSource {
425
+ class xl extends S.ImageSource {
479
426
  onAdd(e) {
480
427
  super.onAdd(e);
481
428
  }
482
429
  }
483
- class Cl extends S.RasterTileSource {
430
+ class kl extends S.RasterTileSource {
484
431
  onAdd(e) {
485
432
  super.onAdd(e);
486
433
  }
487
434
  }
488
- class Al extends S.RasterDEMTileSource {
435
+ class Ll extends S.RasterDEMTileSource {
489
436
  onAdd(e) {
490
437
  super.onAdd(e);
491
438
  }
492
439
  }
493
- class Tl extends S.VectorTileSource {
440
+ class Cl extends S.VectorTileSource {
494
441
  onAdd(e) {
495
442
  super.onAdd(e);
496
443
  }
497
444
  }
498
- class Ml extends S.VideoSource {
445
+ class Al extends S.VideoSource {
499
446
  onAdd(e) {
500
447
  super.onAdd(e);
501
448
  }
502
449
  }
503
- class xo extends S.NavigationControl {
450
+ class wo extends S.NavigationControl {
504
451
  onAdd(e) {
505
452
  return super.onAdd(e);
506
453
  }
507
454
  }
508
- class ko extends S.GeolocateControl {
455
+ class So extends S.GeolocateControl {
509
456
  onAdd(e) {
510
457
  return super.onAdd(e);
511
458
  }
512
459
  }
513
- class Il extends S.AttributionControl {
460
+ class Tl extends S.AttributionControl {
514
461
  onAdd(e) {
515
462
  return super.onAdd(e);
516
463
  }
517
464
  }
518
- class Lo extends S.LogoControl {
465
+ class xo extends S.LogoControl {
519
466
  onAdd(e) {
520
467
  return super.onAdd(e);
521
468
  }
522
469
  }
523
- class Co extends S.ScaleControl {
470
+ class ko extends S.ScaleControl {
524
471
  onAdd(e) {
525
472
  return super.onAdd(e);
526
473
  }
527
474
  }
528
- class Ao extends S.FullscreenControl {
475
+ class Lo extends S.FullscreenControl {
529
476
  onAdd(e) {
530
477
  return super.onAdd(e);
531
478
  }
532
479
  }
533
- class El extends S.TerrainControl {
480
+ class Il extends S.TerrainControl {
534
481
  onAdd(e) {
535
482
  return super.onAdd(e);
536
483
  }
537
484
  }
538
- class zl extends S.BoxZoomHandler {
485
+ class El extends S.BoxZoomHandler {
539
486
  constructor(e, t) {
540
487
  super(e, t);
541
488
  }
542
489
  }
543
- class _l extends S.ScrollZoomHandler {
490
+ class Ml extends S.ScrollZoomHandler {
544
491
  constructor(e, t) {
545
492
  super(e, t);
546
493
  }
547
494
  }
548
- class Pl extends S.CooperativeGesturesHandler {
495
+ class zl extends S.CooperativeGesturesHandler {
549
496
  constructor(e, t) {
550
497
  super(e, t);
551
498
  }
552
499
  }
553
- class Rl extends S.KeyboardHandler {
500
+ class _l extends S.KeyboardHandler {
554
501
  constructor(e) {
555
502
  super(e);
556
503
  }
557
504
  }
558
- class $l extends S.TwoFingersTouchPitchHandler {
505
+ class Pl extends S.TwoFingersTouchPitchHandler {
559
506
  constructor(e) {
560
507
  super(e);
561
508
  }
562
509
  }
563
- class jl extends S.MapWheelEvent {
510
+ class Rl extends S.MapWheelEvent {
564
511
  constructor(e, t, n) {
565
512
  super(e, t, n);
566
513
  }
567
514
  }
568
- class Nl extends S.MapTouchEvent {
515
+ class $l extends S.MapTouchEvent {
569
516
  constructor(e, t, n) {
570
517
  super(e, t, n);
571
518
  }
572
519
  }
573
- class Fl extends S.MapMouseEvent {
520
+ class jl extends S.MapMouseEvent {
574
521
  constructor(e, t, n, a = {}) {
575
522
  super(e, t, n, a);
576
523
  }
577
524
  }
578
- class Or extends Lo {
525
+ class Or extends xo {
579
526
  constructor(t = {}) {
580
527
  super(t);
581
528
  L(this, "logoURL", "");
@@ -588,7 +535,7 @@ class Or extends Lo {
588
535
  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;
589
536
  }
590
537
  }
591
- var To = 8, Mo = {
538
+ var Co = 8, Ao = {
592
539
  version: {
593
540
  required: !0,
594
541
  type: "enum",
@@ -658,18 +605,18 @@ var To = 8, Mo = {
658
605
  type: "array",
659
606
  value: "layer"
660
607
  }
661
- }, Io = {
608
+ }, To = {
662
609
  "*": {
663
610
  type: "source"
664
611
  }
665
- }, Eo = [
612
+ }, Io = [
666
613
  "source_vector",
667
614
  "source_raster",
668
615
  "source_raster_dem",
669
616
  "source_geojson",
670
617
  "source_video",
671
618
  "source_image"
672
- ], zo = {
619
+ ], Eo = {
673
620
  type: {
674
621
  required: !0,
675
622
  type: "enum",
@@ -724,7 +671,7 @@ var To = 8, Mo = {
724
671
  "*": {
725
672
  type: "*"
726
673
  }
727
- }, _o = {
674
+ }, Mo = {
728
675
  type: {
729
676
  required: !0,
730
677
  type: "enum",
@@ -781,7 +728,7 @@ var To = 8, Mo = {
781
728
  "*": {
782
729
  type: "*"
783
730
  }
784
- }, Po = {
731
+ }, zo = {
785
732
  type: {
786
733
  required: !0,
787
734
  type: "enum",
@@ -855,7 +802,7 @@ var To = 8, Mo = {
855
802
  "*": {
856
803
  type: "*"
857
804
  }
858
- }, Ro = {
805
+ }, _o = {
859
806
  type: {
860
807
  required: !0,
861
808
  type: "enum",
@@ -916,7 +863,7 @@ var To = 8, Mo = {
916
863
  promoteId: {
917
864
  type: "promoteId"
918
865
  }
919
- }, $o = {
866
+ }, Po = {
920
867
  type: {
921
868
  required: !0,
922
869
  type: "enum",
@@ -939,7 +886,7 @@ var To = 8, Mo = {
939
886
  value: "number"
940
887
  }
941
888
  }
942
- }, jo = {
889
+ }, Ro = {
943
890
  type: {
944
891
  required: !0,
945
892
  type: "enum",
@@ -961,7 +908,7 @@ var To = 8, Mo = {
961
908
  value: "number"
962
909
  }
963
910
  }
964
- }, No = {
911
+ }, $o = {
965
912
  id: {
966
913
  type: "string",
967
914
  required: !0
@@ -1009,7 +956,7 @@ var To = 8, Mo = {
1009
956
  paint: {
1010
957
  type: "paint"
1011
958
  }
1012
- }, Fo = [
959
+ }, jo = [
1013
960
  "layout_fill",
1014
961
  "layout_line",
1015
962
  "layout_circle",
@@ -1019,7 +966,7 @@ var To = 8, Mo = {
1019
966
  "layout_raster",
1020
967
  "layout_hillshade",
1021
968
  "layout_background"
1022
- ], Oo = {
969
+ ], No = {
1023
970
  visibility: {
1024
971
  type: "enum",
1025
972
  values: {
@@ -1029,7 +976,7 @@ var To = 8, Mo = {
1029
976
  default: "visible",
1030
977
  "property-type": "constant"
1031
978
  }
1032
- }, Do = {
979
+ }, Fo = {
1033
980
  "fill-sort-key": {
1034
981
  type: "number",
1035
982
  expression: {
@@ -1050,7 +997,7 @@ var To = 8, Mo = {
1050
997
  default: "visible",
1051
998
  "property-type": "constant"
1052
999
  }
1053
- }, qo = {
1000
+ }, Oo = {
1054
1001
  "circle-sort-key": {
1055
1002
  type: "number",
1056
1003
  expression: {
@@ -1071,7 +1018,7 @@ var To = 8, Mo = {
1071
1018
  default: "visible",
1072
1019
  "property-type": "constant"
1073
1020
  }
1074
- }, Uo = {
1021
+ }, Do = {
1075
1022
  visibility: {
1076
1023
  type: "enum",
1077
1024
  values: {
@@ -1081,7 +1028,7 @@ var To = 8, Mo = {
1081
1028
  default: "visible",
1082
1029
  "property-type": "constant"
1083
1030
  }
1084
- }, Bo = {
1031
+ }, qo = {
1085
1032
  "line-cap": {
1086
1033
  type: "enum",
1087
1034
  values: {
@@ -1167,7 +1114,7 @@ var To = 8, Mo = {
1167
1114
  default: "visible",
1168
1115
  "property-type": "constant"
1169
1116
  }
1170
- }, Vo = {
1117
+ }, Bo = {
1171
1118
  "symbol-placement": {
1172
1119
  type: "enum",
1173
1120
  values: {
@@ -1994,7 +1941,7 @@ var To = 8, Mo = {
1994
1941
  default: "visible",
1995
1942
  "property-type": "constant"
1996
1943
  }
1997
- }, Go = {
1944
+ }, Uo = {
1998
1945
  visibility: {
1999
1946
  type: "enum",
2000
1947
  values: {
@@ -2004,7 +1951,7 @@ var To = 8, Mo = {
2004
1951
  default: "visible",
2005
1952
  "property-type": "constant"
2006
1953
  }
2007
- }, Ho = {
1954
+ }, Vo = {
2008
1955
  visibility: {
2009
1956
  type: "enum",
2010
1957
  values: {
@@ -2014,10 +1961,10 @@ var To = 8, Mo = {
2014
1961
  default: "visible",
2015
1962
  "property-type": "constant"
2016
1963
  }
2017
- }, Ko = {
1964
+ }, Go = {
2018
1965
  type: "array",
2019
1966
  value: "*"
2020
- }, Wo = {
1967
+ }, Ho = {
2021
1968
  type: "enum",
2022
1969
  values: {
2023
1970
  "==": {},
@@ -2034,14 +1981,14 @@ var To = 8, Mo = {
2034
1981
  has: {},
2035
1982
  "!has": {}
2036
1983
  }
2037
- }, Zo = {
1984
+ }, Ko = {
2038
1985
  type: "enum",
2039
1986
  values: {
2040
1987
  Point: {},
2041
1988
  LineString: {},
2042
1989
  Polygon: {}
2043
1990
  }
2044
- }, Jo = {
1991
+ }, Wo = {
2045
1992
  type: "array",
2046
1993
  minimum: 0,
2047
1994
  maximum: 24,
@@ -2050,11 +1997,11 @@ var To = 8, Mo = {
2050
1997
  "color"
2051
1998
  ],
2052
1999
  length: 2
2053
- }, Yo = {
2000
+ }, Zo = {
2054
2001
  type: "array",
2055
2002
  value: "*",
2056
2003
  minimum: 1
2057
- }, Xo = {
2004
+ }, Jo = {
2058
2005
  anchor: {
2059
2006
  type: "enum",
2060
2007
  default: "viewport",
@@ -2115,7 +2062,7 @@ var To = 8, Mo = {
2115
2062
  },
2116
2063
  transition: !0
2117
2064
  }
2118
- }, Qo = {
2065
+ }, Yo = {
2119
2066
  "sky-color": {
2120
2067
  type: "color",
2121
2068
  "property-type": "data-constant",
@@ -2208,7 +2155,7 @@ var To = 8, Mo = {
2208
2155
  },
2209
2156
  transition: !0
2210
2157
  }
2211
- }, ei = {
2158
+ }, Xo = {
2212
2159
  source: {
2213
2160
  type: "string",
2214
2161
  required: !0
@@ -2218,7 +2165,7 @@ var To = 8, Mo = {
2218
2165
  minimum: 0,
2219
2166
  default: 1
2220
2167
  }
2221
- }, ti = {
2168
+ }, Qo = {
2222
2169
  type: {
2223
2170
  type: "projectionDefinition",
2224
2171
  default: "mercator",
@@ -2231,7 +2178,7 @@ var To = 8, Mo = {
2231
2178
  ]
2232
2179
  }
2233
2180
  }
2234
- }, ri = [
2181
+ }, ei = [
2235
2182
  "paint_fill",
2236
2183
  "paint_line",
2237
2184
  "paint_circle",
@@ -2241,7 +2188,7 @@ var To = 8, Mo = {
2241
2188
  "paint_raster",
2242
2189
  "paint_hillshade",
2243
2190
  "paint_background"
2244
- ], ni = {
2191
+ ], ti = {
2245
2192
  "fill-antialias": {
2246
2193
  type: "boolean",
2247
2194
  default: !0,
@@ -2357,7 +2304,7 @@ var To = 8, Mo = {
2357
2304
  },
2358
2305
  "property-type": "cross-faded-data-driven"
2359
2306
  }
2360
- }, ai = {
2307
+ }, ri = {
2361
2308
  "line-opacity": {
2362
2309
  type: "number",
2363
2310
  default: 1,
@@ -2548,7 +2495,7 @@ var To = 8, Mo = {
2548
2495
  },
2549
2496
  "property-type": "color-ramp"
2550
2497
  }
2551
- }, oi = {
2498
+ }, ni = {
2552
2499
  "circle-radius": {
2553
2500
  type: "number",
2554
2501
  default: 5,
@@ -2721,7 +2668,7 @@ var To = 8, Mo = {
2721
2668
  },
2722
2669
  "property-type": "data-driven"
2723
2670
  }
2724
- }, ii = {
2671
+ }, ai = {
2725
2672
  "heatmap-radius": {
2726
2673
  type: "number",
2727
2674
  default: 30,
@@ -2812,7 +2759,7 @@ var To = 8, Mo = {
2812
2759
  },
2813
2760
  "property-type": "data-constant"
2814
2761
  }
2815
- }, si = {
2762
+ }, oi = {
2816
2763
  "icon-opacity": {
2817
2764
  type: "number",
2818
2765
  default: 1,
@@ -3076,7 +3023,7 @@ var To = 8, Mo = {
3076
3023
  },
3077
3024
  "property-type": "data-constant"
3078
3025
  }
3079
- }, li = {
3026
+ }, ii = {
3080
3027
  "raster-opacity": {
3081
3028
  type: "number",
3082
3029
  default: 1,
@@ -3190,7 +3137,7 @@ var To = 8, Mo = {
3190
3137
  },
3191
3138
  "property-type": "data-constant"
3192
3139
  }
3193
- }, ui = {
3140
+ }, si = {
3194
3141
  "hillshade-illumination-direction": {
3195
3142
  type: "number",
3196
3143
  default: 335,
@@ -3270,7 +3217,7 @@ var To = 8, Mo = {
3270
3217
  },
3271
3218
  "property-type": "data-constant"
3272
3219
  }
3273
- }, ci = {
3220
+ }, li = {
3274
3221
  "background-color": {
3275
3222
  type: "color",
3276
3223
  default: "#000000",
@@ -3313,7 +3260,7 @@ var To = 8, Mo = {
3313
3260
  },
3314
3261
  "property-type": "data-constant"
3315
3262
  }
3316
- }, pi = {
3263
+ }, ui = {
3317
3264
  duration: {
3318
3265
  type: "number",
3319
3266
  default: 300,
@@ -3326,27 +3273,27 @@ var To = 8, Mo = {
3326
3273
  minimum: 0,
3327
3274
  units: "milliseconds"
3328
3275
  }
3329
- }, fi = {
3276
+ }, ci = {
3330
3277
  "*": {
3331
3278
  type: "string"
3332
3279
  }
3333
- }, di = {
3334
- $version: To,
3335
- $root: Mo,
3336
- sources: Io,
3337
- source: Eo,
3338
- source_vector: zo,
3339
- source_raster: _o,
3340
- source_raster_dem: Po,
3341
- source_geojson: Ro,
3342
- source_video: $o,
3343
- source_image: jo,
3344
- layer: No,
3345
- layout: Fo,
3346
- layout_background: Oo,
3347
- layout_fill: Do,
3348
- layout_circle: qo,
3349
- layout_heatmap: Uo,
3280
+ }, pi = {
3281
+ $version: Co,
3282
+ $root: Ao,
3283
+ sources: To,
3284
+ source: Io,
3285
+ source_vector: Eo,
3286
+ source_raster: Mo,
3287
+ source_raster_dem: zo,
3288
+ source_geojson: _o,
3289
+ source_video: Po,
3290
+ source_image: Ro,
3291
+ layer: $o,
3292
+ layout: jo,
3293
+ layout_background: No,
3294
+ layout_fill: Fo,
3295
+ layout_circle: Oo,
3296
+ layout_heatmap: Do,
3350
3297
  "layout_fill-extrusion": {
3351
3298
  visibility: {
3352
3299
  type: "enum",
@@ -3358,13 +3305,13 @@ var To = 8, Mo = {
3358
3305
  "property-type": "constant"
3359
3306
  }
3360
3307
  },
3361
- layout_line: Bo,
3362
- layout_symbol: Vo,
3363
- layout_raster: Go,
3364
- layout_hillshade: Ho,
3365
- filter: Ko,
3366
- filter_operator: Wo,
3367
- geometry_type: Zo,
3308
+ layout_line: qo,
3309
+ layout_symbol: Bo,
3310
+ layout_raster: Uo,
3311
+ layout_hillshade: Vo,
3312
+ filter: Go,
3313
+ filter_operator: Ho,
3314
+ geometry_type: Ko,
3368
3315
  function: {
3369
3316
  expression: {
3370
3317
  type: "expression"
@@ -3406,14 +3353,14 @@ var To = 8, Mo = {
3406
3353
  required: !1
3407
3354
  }
3408
3355
  },
3409
- function_stop: Jo,
3410
- expression: Yo,
3411
- light: Xo,
3412
- sky: Qo,
3413
- terrain: ei,
3414
- projection: ti,
3415
- paint: ri,
3416
- paint_fill: ni,
3356
+ function_stop: Wo,
3357
+ expression: Zo,
3358
+ light: Jo,
3359
+ sky: Yo,
3360
+ terrain: Xo,
3361
+ projection: Qo,
3362
+ paint: ei,
3363
+ paint_fill: ti,
3417
3364
  "paint_fill-extrusion": {
3418
3365
  "fill-extrusion-opacity": {
3419
3366
  type: "number",
@@ -3544,14 +3491,14 @@ var To = 8, Mo = {
3544
3491
  "property-type": "data-constant"
3545
3492
  }
3546
3493
  },
3547
- paint_line: ai,
3548
- paint_circle: oi,
3549
- paint_heatmap: ii,
3550
- paint_symbol: si,
3551
- paint_raster: li,
3552
- paint_hillshade: ui,
3553
- paint_background: ci,
3554
- transition: pi,
3494
+ paint_line: ri,
3495
+ paint_circle: ni,
3496
+ paint_heatmap: ai,
3497
+ paint_symbol: oi,
3498
+ paint_raster: ii,
3499
+ paint_hillshade: si,
3500
+ paint_background: li,
3501
+ transition: ui,
3555
3502
  "property-type": {
3556
3503
  "data-driven": {
3557
3504
  type: "property-type"
@@ -3572,7 +3519,7 @@ var To = 8, Mo = {
3572
3519
  type: "property-type"
3573
3520
  }
3574
3521
  },
3575
- promoteId: fi
3522
+ promoteId: ci
3576
3523
  };
3577
3524
  class h {
3578
3525
  constructor(e, t, n, a) {
@@ -3610,7 +3557,7 @@ class or {
3610
3557
  return this.bindings[e] ? !0 : this.parent ? this.parent.has(e) : !1;
3611
3558
  }
3612
3559
  }
3613
- const gt = { kind: "null" }, g = { kind: "number" }, M = { kind: "string" }, C = { kind: "boolean" }, ie = { kind: "color" }, vt = { kind: "projectionDefinition" }, Re = { kind: "object" }, A = { kind: "value" }, yi = { kind: "error" }, bt = { kind: "collator" }, wt = { kind: "formatted" }, St = { kind: "padding" }, Xe = { kind: "resolvedImage" }, xt = { kind: "variableAnchorOffsetCollection" };
3560
+ const gt = { kind: "null" }, g = { kind: "number" }, I = { kind: "string" }, C = { kind: "boolean" }, ie = { kind: "color" }, vt = { kind: "projectionDefinition" }, Re = { kind: "object" }, A = { kind: "value" }, fi = { kind: "error" }, bt = { kind: "collator" }, wt = { kind: "formatted" }, St = { kind: "padding" }, Xe = { kind: "resolvedImage" }, xt = { kind: "variableAnchorOffsetCollection" };
3614
3561
  function W(r, e) {
3615
3562
  return {
3616
3563
  kind: "array",
@@ -3625,10 +3572,10 @@ function N(r) {
3625
3572
  } else
3626
3573
  return r.kind;
3627
3574
  }
3628
- const mi = [
3575
+ const di = [
3629
3576
  gt,
3630
3577
  g,
3631
- M,
3578
+ I,
3632
3579
  C,
3633
3580
  ie,
3634
3581
  vt,
@@ -3649,7 +3596,7 @@ function Ve(r, e) {
3649
3596
  if (r.kind === e.kind)
3650
3597
  return null;
3651
3598
  if (r.kind === "value") {
3652
- for (const t of mi)
3599
+ for (const t of di)
3653
3600
  if (!Ve(t, e))
3654
3601
  return null;
3655
3602
  }
@@ -3665,15 +3612,15 @@ function Le(r, e) {
3665
3612
  function ze(r, e) {
3666
3613
  return r.kind === "array" && e.kind === "array" ? r.itemType.kind === e.itemType.kind && typeof r.N == "number" : r.kind === e.kind;
3667
3614
  }
3668
- const Ln = 0.96422, Cn = 1, An = 0.82521, Tn = 4 / 29, $e = 6 / 29, Mn = 3 * $e * $e, hi = $e * $e * $e, gi = Math.PI / 180, vi = 180 / Math.PI;
3615
+ const kn = 0.96422, Ln = 1, Cn = 0.82521, An = 4 / 29, $e = 6 / 29, Tn = 3 * $e * $e, yi = $e * $e * $e, mi = Math.PI / 180, hi = 180 / Math.PI;
3669
3616
  function In(r) {
3670
3617
  return r = r % 360, r < 0 && (r += 360), r;
3671
3618
  }
3672
3619
  function En([r, e, t, n]) {
3673
3620
  r = Nt(r), e = Nt(e), t = Nt(t);
3674
3621
  let a, o;
3675
- const i = Ft((0.2225045 * r + 0.7168786 * e + 0.0606169 * t) / Cn);
3676
- r === e && e === t ? a = o = i : (a = Ft((0.4360747 * r + 0.3850649 * e + 0.1430804 * t) / Ln), o = Ft((0.0139322 * r + 0.0971045 * e + 0.7141733 * t) / An));
3622
+ const i = Ft((0.2225045 * r + 0.7168786 * e + 0.0606169 * t) / Ln);
3623
+ r === e && e === t ? a = o = i : (a = Ft((0.4360747 * r + 0.3850649 * e + 0.1430804 * t) / kn), o = Ft((0.0139322 * r + 0.0971045 * e + 0.7141733 * t) / Cn));
3677
3624
  const s = 116 * i - 16;
3678
3625
  return [s < 0 ? 0 : s, 500 * (a - i), 200 * (i - o), n];
3679
3626
  }
@@ -3681,11 +3628,11 @@ function Nt(r) {
3681
3628
  return r <= 0.04045 ? r / 12.92 : Math.pow((r + 0.055) / 1.055, 2.4);
3682
3629
  }
3683
3630
  function Ft(r) {
3684
- return r > hi ? Math.pow(r, 1 / 3) : r / Mn + Tn;
3631
+ return r > yi ? Math.pow(r, 1 / 3) : r / Tn + An;
3685
3632
  }
3686
- function zn([r, e, t, n]) {
3633
+ function Mn([r, e, t, n]) {
3687
3634
  let a = (r + 16) / 116, o = isNaN(e) ? a : a + e / 500, i = isNaN(t) ? a : a - t / 200;
3688
- return a = Cn * Dt(a), o = Ln * Dt(o), i = An * Dt(i), [
3635
+ return a = Ln * Dt(a), o = kn * Dt(o), i = Cn * Dt(i), [
3689
3636
  Ot(3.1338561 * o - 1.6168667 * a - 0.4906146 * i),
3690
3637
  // D50 -> sRGB
3691
3638
  Ot(-0.9787684 * o + 1.9161415 * a + 0.033454 * i),
@@ -3697,16 +3644,16 @@ function Ot(r) {
3697
3644
  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;
3698
3645
  }
3699
3646
  function Dt(r) {
3700
- return r > $e ? r * r * r : Mn * (r - Tn);
3647
+ return r > $e ? r * r * r : Tn * (r - An);
3701
3648
  }
3702
- function bi(r) {
3649
+ function gi(r) {
3703
3650
  const [e, t, n, a] = En(r), o = Math.sqrt(t * t + n * n);
3704
- return [Math.round(o * 1e4) ? In(Math.atan2(n, t) * vi) : NaN, o, e, a];
3651
+ return [Math.round(o * 1e4) ? In(Math.atan2(n, t) * hi) : NaN, o, e, a];
3705
3652
  }
3706
- function wi([r, e, t, n]) {
3707
- return r = isNaN(r) ? 0 : r * gi, zn([t, Math.cos(r) * e, Math.sin(r) * e, n]);
3653
+ function vi([r, e, t, n]) {
3654
+ return r = isNaN(r) ? 0 : r * mi, Mn([t, Math.cos(r) * e, Math.sin(r) * e, n]);
3708
3655
  }
3709
- function Si([r, e, t, n]) {
3656
+ function bi([r, e, t, n]) {
3710
3657
  r = In(r), e /= 100, t /= 100;
3711
3658
  function a(o) {
3712
3659
  const i = (o + r / 30) % 12, s = e * Math.min(t, 1 - t);
@@ -3714,10 +3661,10 @@ function Si([r, e, t, n]) {
3714
3661
  }
3715
3662
  return [a(0), a(8), a(4), n];
3716
3663
  }
3717
- function xi(r) {
3664
+ function wi(r) {
3718
3665
  if (r = r.toLowerCase().trim(), r === "transparent")
3719
3666
  return [0, 0, 0, 0];
3720
- const e = ki[r];
3667
+ const e = Si[r];
3721
3668
  if (e) {
3722
3669
  const [a, o, i] = e;
3723
3670
  return [a / 255, o / 255, i / 255, 1];
@@ -3807,7 +3754,7 @@ function xi(r) {
3807
3754
  p ? Dr(+p, m) : 1
3808
3755
  ];
3809
3756
  if (qr(d))
3810
- return Si(d);
3757
+ return bi(d);
3811
3758
  }
3812
3759
  }
3813
3760
  }
@@ -3823,7 +3770,7 @@ function _e(r, e, t) {
3823
3770
  function qr(r) {
3824
3771
  return !r.some(Number.isNaN);
3825
3772
  }
3826
- const ki = {
3773
+ const Si = {
3827
3774
  aliceblue: [240, 248, 255],
3828
3775
  antiquewhite: [250, 235, 215],
3829
3776
  aqua: [0, 255, 255],
@@ -4008,7 +3955,7 @@ class $ {
4008
3955
  return e;
4009
3956
  if (typeof e != "string")
4010
3957
  return;
4011
- const t = xi(e);
3958
+ const t = wi(e);
4012
3959
  if (t)
4013
3960
  return new $(...t, !1);
4014
3961
  }
@@ -4027,7 +3974,7 @@ class $ {
4027
3974
  * @returns Gien color, with reversed alpha blending, in HCL color space.
4028
3975
  */
4029
3976
  get hcl() {
4030
- return this.overwriteGetter("hcl", bi(this.rgb));
3977
+ return this.overwriteGetter("hcl", gi(this.rgb));
4031
3978
  }
4032
3979
  /**
4033
3980
  * Used in color interpolation.
@@ -4088,7 +4035,7 @@ class $ {
4088
4035
  let T = u - o;
4089
4036
  u > o && T > 180 ? T -= 360 : u < o && o - u > 180 && (T += 360), f = o + n * T;
4090
4037
  } else isNaN(o) ? isNaN(u) ? f = NaN : (f = u, (s === 1 || s === 0) && (d = c)) : (f = o, (p === 1 || p === 0) && (d = i));
4091
- const [y, v, w, b] = wi([
4038
+ const [y, v, w, b] = vi([
4092
4039
  f,
4093
4040
  d ?? ve(i, c, n),
4094
4041
  ve(s, p, n),
@@ -4097,7 +4044,7 @@ class $ {
4097
4044
  return new $(y, v, w, b, !1);
4098
4045
  }
4099
4046
  case "lab": {
4100
- const [o, i, s, l] = zn(Ge(e.lab, t.lab, n));
4047
+ const [o, i, s, l] = Mn(Ge(e.lab, t.lab, n));
4101
4048
  return new $(o, i, s, l, !1);
4102
4049
  }
4103
4050
  }
@@ -4187,7 +4134,7 @@ class D {
4187
4134
  return this.message;
4188
4135
  }
4189
4136
  }
4190
- const Li = /* @__PURE__ */ new Set(["center", "left", "right", "top", "bottom", "top-left", "top-right", "bottom-left", "bottom-right"]);
4137
+ const xi = /* @__PURE__ */ new Set(["center", "left", "right", "top", "bottom", "top-left", "top-right", "bottom-left", "bottom-right"]);
4191
4138
  class ne {
4192
4139
  constructor(e) {
4193
4140
  this.values = e.slice();
@@ -4198,7 +4145,7 @@ class ne {
4198
4145
  if (!(!Array.isArray(e) || e.length < 1 || e.length % 2 !== 0)) {
4199
4146
  for (let t = 0; t < e.length; t += 2) {
4200
4147
  const n = e[t], a = e[t + 1];
4201
- if (typeof n != "string" || !Li.has(n) || !Array.isArray(a) || a.length !== 2 || typeof a[0] != "number" || typeof a[1] != "number")
4148
+ if (typeof n != "string" || !xi.has(n) || !Array.isArray(a) || a.length !== 2 || typeof a[0] != "number" || typeof a[1] != "number")
4202
4149
  return;
4203
4150
  }
4204
4151
  return new ne(e);
@@ -4251,7 +4198,7 @@ class ee {
4251
4198
  return new ee(e, e, 1);
4252
4199
  }
4253
4200
  }
4254
- function _n(r, e, t, n) {
4201
+ function zn(r, e, t, n) {
4255
4202
  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.`;
4256
4203
  }
4257
4204
  function He(r) {
@@ -4274,7 +4221,7 @@ function q(r) {
4274
4221
  if (r === null)
4275
4222
  return gt;
4276
4223
  if (typeof r == "string")
4277
- return M;
4224
+ return I;
4278
4225
  if (typeof r == "boolean")
4279
4226
  return C;
4280
4227
  if (typeof r == "number")
@@ -4311,7 +4258,7 @@ function q(r) {
4311
4258
  } else
4312
4259
  return Re;
4313
4260
  }
4314
- function Ue(r) {
4261
+ function Be(r) {
4315
4262
  const e = typeof r;
4316
4263
  return r === null ? "" : e === "string" || e === "number" || e === "boolean" ? String(r) : r instanceof $ || r instanceof ee || r instanceof fe || r instanceof J || r instanceof ne || r instanceof be ? r.toString() : JSON.stringify(r);
4317
4264
  }
@@ -4339,7 +4286,7 @@ class je {
4339
4286
  }
4340
4287
  }
4341
4288
  const nt = {
4342
- string: M,
4289
+ string: I,
4343
4290
  number: g,
4344
4291
  boolean: C,
4345
4292
  object: Re
@@ -4400,11 +4347,11 @@ class te {
4400
4347
  return this.args.every((e) => e.outputDefined());
4401
4348
  }
4402
4349
  }
4403
- const Ur = {
4350
+ const Br = {
4404
4351
  "to-boolean": C,
4405
4352
  "to-color": ie,
4406
4353
  "to-number": g,
4407
- "to-string": M
4354
+ "to-string": I
4408
4355
  };
4409
4356
  class ge {
4410
4357
  constructor(e, t) {
@@ -4414,11 +4361,11 @@ class ge {
4414
4361
  if (e.length < 2)
4415
4362
  return t.error("Expected at least one argument.");
4416
4363
  const n = e[0];
4417
- if (!Ur[n])
4364
+ if (!Br[n])
4418
4365
  throw new Error(`Can't parse ${n} as it is not part of the known types`);
4419
4366
  if ((n === "to-boolean" || n === "to-string") && e.length !== 2)
4420
4367
  return t.error("Expected one argument.");
4421
- const a = Ur[n], o = [];
4368
+ const a = Br[n], o = [];
4422
4369
  for (let i = 1; i < e.length; i++) {
4423
4370
  const s = t.parse(e[i], i, A);
4424
4371
  if (!s)
@@ -4440,7 +4387,7 @@ class ge {
4440
4387
  const o = e.parseColor(t);
4441
4388
  if (o)
4442
4389
  return o;
4443
- } 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 = _n(t[0], t[1], t[2], t[3]), !n))
4390
+ } 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 = zn(t[0], t[1], t[2], t[3]), !n))
4444
4391
  return new $(t[0] / 255, t[1] / 255, t[2] / 255, t[3]);
4445
4392
  }
4446
4393
  throw new D(n || `Could not parse color from value '${typeof t == "string" ? t : JSON.stringify(t)}'`);
@@ -4477,13 +4424,13 @@ class ge {
4477
4424
  throw new D(`Could not convert ${JSON.stringify(t)} to number.`);
4478
4425
  }
4479
4426
  case "formatted":
4480
- return fe.fromString(Ue(this.args[0].evaluate(e)));
4427
+ return fe.fromString(Be(this.args[0].evaluate(e)));
4481
4428
  case "resolvedImage":
4482
- return be.fromString(Ue(this.args[0].evaluate(e)));
4429
+ return be.fromString(Be(this.args[0].evaluate(e)));
4483
4430
  case "projectionDefinition":
4484
4431
  return this.args[0].evaluate(e);
4485
4432
  default:
4486
- return Ue(this.args[0].evaluate(e));
4433
+ return Be(this.args[0].evaluate(e));
4487
4434
  }
4488
4435
  }
4489
4436
  eachChild(e) {
@@ -4493,61 +4440,16 @@ class ge {
4493
4440
  return this.args.every((e) => e.outputDefined());
4494
4441
  }
4495
4442
  }
4496
- function Ci(r, e) {
4497
- if (r.length <= 1)
4498
- return [r];
4499
- const n = [];
4500
- let a, o;
4501
- for (const i of r) {
4502
- const s = Pn(i);
4503
- 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));
4504
- }
4505
- return a && n.push(a), n;
4506
- }
4507
- function Pn(r) {
4508
- let e = 0;
4509
- for (let t = 0, n = r.length, a = n - 1, o, i; t < n; a = t++)
4510
- o = r[t], i = r[a], e += (i.x - o.x) * (o.y + i.y);
4511
- return e;
4512
- }
4513
- function Ai(r) {
4514
- const e = r.length;
4515
- for (let t = 0, n; t < e; t++) {
4516
- const a = Pn(r[t]);
4517
- if (a !== 0) {
4518
- if (n === void 0)
4519
- n = a < 0;
4520
- else if (n === a < 0)
4521
- return !0;
4522
- }
4523
- }
4524
- return !1;
4525
- }
4526
- const Br = ["Unknown", "Point", "LineString", "Polygon"], Ti = {
4527
- Unknown: "Unknown",
4528
- Point: "Point",
4529
- MultiPoint: "Point",
4530
- LineString: "LineString",
4531
- MultiLineString: "LineString",
4532
- Polygon: "Polygon",
4533
- MultiPolygon: "Polygon"
4534
- };
4535
- class Rn {
4443
+ const ki = ["Unknown", "Point", "LineString", "Polygon"];
4444
+ class _n {
4536
4445
  constructor() {
4537
4446
  this.globals = null, this.feature = null, this.featureState = null, this.formattedSection = null, this._parseColorCache = {}, this.availableImages = null, this.canonical = null;
4538
4447
  }
4539
4448
  id() {
4540
4449
  return this.feature && "id" in this.feature ? this.feature.id : null;
4541
4450
  }
4542
- geometryDollarType() {
4543
- return this.feature ? typeof this.feature.type == "number" ? Br[this.feature.type] : Ti[this.feature.type] : null;
4544
- }
4545
4451
  geometryType() {
4546
- let e = this.feature.type;
4547
- if (typeof e != "number" || (e = Br[this.feature.type], e === "Unknown"))
4548
- return e;
4549
- const t = this.geometry();
4550
- return t.length === 1 ? e : e !== "Polygon" ? `Multi${e}` : Ai(t) ? "MultiPolygon" : "Polygon";
4452
+ return this.feature ? typeof this.feature.type == "number" ? ki[this.feature.type] : this.feature.type : null;
4551
4453
  }
4552
4454
  geometry() {
4553
4455
  return this.feature && "geometry" in this.feature ? this.feature.geometry : null;
@@ -4609,7 +4511,7 @@ class kt {
4609
4511
  return null;
4610
4512
  }
4611
4513
  if (!(i instanceof je) && i.type.kind !== "resolvedImage" && this._isConstant(i)) {
4612
- const s = new Rn();
4514
+ const s = new _n();
4613
4515
  try {
4614
4516
  i = new je(i.type, i.evaluate(s));
4615
4517
  } catch (l) {
@@ -4747,7 +4649,7 @@ class ur {
4747
4649
  if (e.length !== 3)
4748
4650
  return t.error(`Expected 2 arguments, but found ${e.length - 1} instead.`);
4749
4651
  const n = t.parse(e[1], 1, A), a = t.parse(e[2], 2, A);
4750
- return !n || !a ? null : ir(n.type, [C, M, g, gt, A]) ? new ur(n, a) : t.error(`Expected first argument to be of type boolean, string, number or null, but found ${N(n.type)} instead`);
4652
+ return !n || !a ? null : ir(n.type, [C, I, g, gt, A]) ? new ur(n, a) : t.error(`Expected first argument to be of type boolean, string, number or null, but found ${N(n.type)} instead`);
4751
4653
  }
4752
4654
  evaluate(e) {
4753
4655
  const t = this.needle.evaluate(e), n = this.haystack.evaluate(e);
@@ -4776,7 +4678,7 @@ class ut {
4776
4678
  const n = t.parse(e[1], 1, A), a = t.parse(e[2], 2, A);
4777
4679
  if (!n || !a)
4778
4680
  return null;
4779
- if (!ir(n.type, [C, M, g, gt, A]))
4681
+ if (!ir(n.type, [C, I, g, gt, A]))
4780
4682
  return t.error(`Expected first argument to be of type boolean, string, number or null, but found ${N(n.type)} instead`);
4781
4683
  if (e.length === 4) {
4782
4684
  const o = t.parse(e[3], 3, g);
@@ -4914,7 +4816,7 @@ class ct {
4914
4816
  const n = t.parse(e[1], 1, A), a = t.parse(e[2], 2, g);
4915
4817
  if (!n || !a)
4916
4818
  return null;
4917
- if (!ir(n.type, [W(A), M, A]))
4819
+ if (!ir(n.type, [W(A), I, A]))
4918
4820
  return t.error(`Expected first argument to be of type array or string, but found ${N(n.type)} instead`);
4919
4821
  if (e.length === 4) {
4920
4822
  const o = t.parse(e[3], 3, g);
@@ -4938,7 +4840,7 @@ class ct {
4938
4840
  return !1;
4939
4841
  }
4940
4842
  }
4941
- function $n(r, e) {
4843
+ function Pn(r, e) {
4942
4844
  const t = r.length - 1;
4943
4845
  let n = 0, a = t, o = 0, i, s;
4944
4846
  for (; n <= a; )
@@ -4992,7 +4894,7 @@ class At {
4992
4894
  const o = t.length;
4993
4895
  if (a >= t[o - 1])
4994
4896
  return n[o - 1].evaluate(e);
4995
- const i = $n(t, a);
4897
+ const i = Pn(t, a);
4996
4898
  return n[i].evaluate(e);
4997
4899
  }
4998
4900
  eachChild(e) {
@@ -5004,13 +4906,13 @@ class At {
5004
4906
  return this.outputs.every((e) => e.outputDefined());
5005
4907
  }
5006
4908
  }
5007
- function Mi(r) {
4909
+ function Li(r) {
5008
4910
  return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
5009
4911
  }
5010
- var qt, Vr;
5011
- function Ii() {
5012
- if (Vr) return qt;
5013
- Vr = 1, qt = r;
4912
+ var qt, Ur;
4913
+ function Ci() {
4914
+ if (Ur) return qt;
4915
+ Ur = 1, qt = r;
5014
4916
  function r(e, t, n, a) {
5015
4917
  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;
5016
4918
  }
@@ -5044,7 +4946,7 @@ function Ii() {
5044
4946
  }
5045
4947
  }, qt;
5046
4948
  }
5047
- var Ei = Ii(), zi = /* @__PURE__ */ Mi(Ei);
4949
+ var Ai = Ci(), Ti = /* @__PURE__ */ Li(Ai);
5048
4950
  class se {
5049
4951
  constructor(e, t, n, a, o) {
5050
4952
  this.type = e, this.operator = t, this.interpolation = n, this.input = a, this.labels = [], this.outputs = [];
@@ -5054,12 +4956,12 @@ class se {
5054
4956
  static interpolationFactor(e, t, n, a) {
5055
4957
  let o = 0;
5056
4958
  if (e.name === "exponential")
5057
- o = Ut(t, e.base, n, a);
4959
+ o = Bt(t, e.base, n, a);
5058
4960
  else if (e.name === "linear")
5059
- o = Ut(t, 1, n, a);
4961
+ o = Bt(t, 1, n, a);
5060
4962
  else if (e.name === "cubic-bezier") {
5061
4963
  const i = e.controlPoints;
5062
- o = new zi(i[0], i[1], i[2], i[3]).solve(Ut(t, 1, n, a));
4964
+ o = new Ti(i[0], i[1], i[2], i[3]).solve(Bt(t, 1, n, a));
5063
4965
  }
5064
4966
  return o;
5065
4967
  }
@@ -5119,7 +5021,7 @@ class se {
5119
5021
  const o = t.length;
5120
5022
  if (a >= t[o - 1])
5121
5023
  return n[o - 1].evaluate(e);
5122
- const i = $n(t, a), s = t[i], l = t[i + 1], u = se.interpolationFactor(this.interpolation, a, s, l), c = n[i].evaluate(e), p = n[i + 1].evaluate(e);
5024
+ const i = Pn(t, a), s = t[i], l = t[i + 1], u = se.interpolationFactor(this.interpolation, a, s, l), c = n[i].evaluate(e), p = n[i + 1].evaluate(e);
5123
5025
  switch (this.operator) {
5124
5026
  case "interpolate":
5125
5027
  switch (this.type.kind) {
@@ -5151,7 +5053,7 @@ class se {
5151
5053
  return this.outputs.every((e) => e.outputDefined());
5152
5054
  }
5153
5055
  }
5154
- function Ut(r, e, t, n) {
5056
+ function Bt(r, e, t, n) {
5155
5057
  const a = n - t, o = r - t;
5156
5058
  return a === 0 ? 0 : e === 1 ? o / a : (Math.pow(e, o) - 1) / (Math.pow(e, a) - 1);
5157
5059
  }
@@ -5191,48 +5093,48 @@ class Ke {
5191
5093
  return this.args.every((e) => e.outputDefined());
5192
5094
  }
5193
5095
  }
5194
- function Gr(r, e) {
5096
+ function Vr(r, e) {
5195
5097
  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";
5196
5098
  }
5197
- function _i(r, e, t) {
5099
+ function Ii(r, e, t) {
5198
5100
  return e === t;
5199
5101
  }
5200
- function Pi(r, e, t) {
5102
+ function Ei(r, e, t) {
5201
5103
  return e !== t;
5202
5104
  }
5203
- function Ri(r, e, t) {
5105
+ function Mi(r, e, t) {
5204
5106
  return e < t;
5205
5107
  }
5206
- function $i(r, e, t) {
5108
+ function zi(r, e, t) {
5207
5109
  return e > t;
5208
5110
  }
5209
- function ji(r, e, t) {
5111
+ function _i(r, e, t) {
5210
5112
  return e <= t;
5211
5113
  }
5212
- function Ni(r, e, t) {
5114
+ function Pi(r, e, t) {
5213
5115
  return e >= t;
5214
5116
  }
5215
- function jn(r, e, t, n) {
5117
+ function Rn(r, e, t, n) {
5216
5118
  return n.compare(e, t) === 0;
5217
5119
  }
5218
- function Fi(r, e, t, n) {
5219
- return !jn(r, e, t, n);
5120
+ function Ri(r, e, t, n) {
5121
+ return !Rn(r, e, t, n);
5220
5122
  }
5221
- function Oi(r, e, t, n) {
5123
+ function $i(r, e, t, n) {
5222
5124
  return n.compare(e, t) < 0;
5223
5125
  }
5224
- function Di(r, e, t, n) {
5126
+ function ji(r, e, t, n) {
5225
5127
  return n.compare(e, t) > 0;
5226
5128
  }
5227
- function qi(r, e, t, n) {
5129
+ function Ni(r, e, t, n) {
5228
5130
  return n.compare(e, t) <= 0;
5229
5131
  }
5230
- function Ui(r, e, t, n) {
5132
+ function Fi(r, e, t, n) {
5231
5133
  return n.compare(e, t) >= 0;
5232
5134
  }
5233
5135
  function Fe(r, e, t) {
5234
5136
  const n = r !== "==" && r !== "!=";
5235
- return class Nn {
5137
+ return class $n {
5236
5138
  constructor(o, i, s) {
5237
5139
  this.type = C, this.lhs = o, this.rhs = i, this.collator = s, this.hasUntypedArgument = o.type.kind === "value" || i.type.kind === "value";
5238
5140
  }
@@ -5243,12 +5145,12 @@ function Fe(r, e, t) {
5243
5145
  let l = i.parse(o[1], 1, A);
5244
5146
  if (!l)
5245
5147
  return null;
5246
- if (!Gr(s, l.type))
5148
+ if (!Vr(s, l.type))
5247
5149
  return i.concat(1).error(`"${s}" comparisons are not supported for type '${N(l.type)}'.`);
5248
5150
  let u = i.parse(o[2], 2, A);
5249
5151
  if (!u)
5250
5152
  return null;
5251
- if (!Gr(s, u.type))
5153
+ if (!Vr(s, u.type))
5252
5154
  return i.concat(2).error(`"${s}" comparisons are not supported for type '${N(u.type)}'.`);
5253
5155
  if (l.type.kind !== u.type.kind && l.type.kind !== "value" && u.type.kind !== "value")
5254
5156
  return i.error(`Cannot compare types '${N(l.type)}' and '${N(u.type)}'.`);
@@ -5260,7 +5162,7 @@ function Fe(r, e, t) {
5260
5162
  if (c = i.parse(o[3], 3, bt), !c)
5261
5163
  return null;
5262
5164
  }
5263
- return new Nn(l, u, c);
5165
+ return new $n(l, u, c);
5264
5166
  }
5265
5167
  evaluate(o) {
5266
5168
  const i = this.lhs.evaluate(o), s = this.rhs.evaluate(o);
@@ -5284,7 +5186,7 @@ function Fe(r, e, t) {
5284
5186
  }
5285
5187
  };
5286
5188
  }
5287
- const Bi = Fe("==", _i, jn), Vi = Fe("!=", Pi, Fi), Gi = Fe("<", Ri, Oi), Hi = Fe(">", $i, Di), Ki = Fe("<=", ji, qi), Wi = Fe(">=", Ni, Ui);
5189
+ const Oi = Fe("==", Ii, Rn), Di = Fe("!=", Ei, Ri), qi = Fe("<", Mi, $i), Bi = Fe(">", zi, ji), Ui = Fe("<=", _i, Ni), Vi = Fe(">=", Pi, Fi);
5288
5190
  class Tt {
5289
5191
  constructor(e, t, n) {
5290
5192
  this.type = bt, this.locale = n, this.caseSensitive = e, this.diacriticSensitive = t;
@@ -5302,7 +5204,7 @@ class Tt {
5302
5204
  if (!o)
5303
5205
  return null;
5304
5206
  let i = null;
5305
- return n.locale && (i = t.parse(n.locale, 1, M), !i) ? null : new Tt(a, o, i);
5207
+ return n.locale && (i = t.parse(n.locale, 1, I), !i) ? null : new Tt(a, o, i);
5306
5208
  }
5307
5209
  evaluate(e) {
5308
5210
  return new sr(this.caseSensitive.evaluate(e), this.diacriticSensitive.evaluate(e), this.locale ? this.locale.evaluate(e) : null);
@@ -5316,7 +5218,7 @@ class Tt {
5316
5218
  }
5317
5219
  class fr {
5318
5220
  constructor(e, t, n, a, o) {
5319
- this.type = M, this.number = e, this.locale = t, this.currency = n, this.minFractionDigits = a, this.maxFractionDigits = o;
5221
+ this.type = I, this.number = e, this.locale = t, this.currency = n, this.minFractionDigits = a, this.maxFractionDigits = o;
5320
5222
  }
5321
5223
  static parse(e, t) {
5322
5224
  if (e.length !== 3)
@@ -5328,10 +5230,10 @@ class fr {
5328
5230
  if (typeof a != "object" || Array.isArray(a))
5329
5231
  return t.error("NumberFormat options argument must be an object.");
5330
5232
  let o = null;
5331
- if (a.locale && (o = t.parse(a.locale, 1, M), !o))
5233
+ if (a.locale && (o = t.parse(a.locale, 1, I), !o))
5332
5234
  return null;
5333
5235
  let i = null;
5334
- if (a.currency && (i = t.parse(a.currency, 1, M), !i))
5236
+ if (a.currency && (i = t.parse(a.currency, 1, I), !i))
5335
5237
  return null;
5336
5238
  let s = null;
5337
5239
  if (a["min-fraction-digits"] && (s = t.parse(a["min-fraction-digits"], 1, g), !s))
@@ -5374,7 +5276,7 @@ class dr {
5374
5276
  if (s["font-scale"] && (l = t.parse(s["font-scale"], 1, g), !l))
5375
5277
  return null;
5376
5278
  let u = null;
5377
- if (s["text-font"] && (u = t.parse(s["text-font"], 1, W(M)), !u))
5279
+ if (s["text-font"] && (u = t.parse(s["text-font"], 1, W(I)), !u))
5378
5280
  return null;
5379
5281
  let c = null;
5380
5282
  if (s["text-color"] && (c = t.parse(s["text-color"], 1, ie), !c))
@@ -5396,7 +5298,7 @@ class dr {
5396
5298
  evaluate(e) {
5397
5299
  const t = (n) => {
5398
5300
  const a = n.content.evaluate(e);
5399
- return q(a) === Xe ? new Zt("", a, null, null, null) : new Zt(Ue(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
+ return q(a) === Xe ? new Zt("", a, null, null, null) : new Zt(Be(a), null, n.scale ? n.scale.evaluate(e) : null, n.font ? n.font.evaluate(e).join(",") : null, n.textColor ? n.textColor.evaluate(e) : null);
5400
5302
  };
5401
5303
  return new fe(this.sections.map(t));
5402
5304
  }
@@ -5415,7 +5317,7 @@ class yr {
5415
5317
  static parse(e, t) {
5416
5318
  if (e.length !== 2)
5417
5319
  return t.error("Expected two arguments.");
5418
- const n = t.parse(e[1], 1, M);
5320
+ const n = t.parse(e[1], 1, I);
5419
5321
  return n ? new yr(n) : t.error("No image name provided.");
5420
5322
  }
5421
5323
  evaluate(e) {
@@ -5455,24 +5357,24 @@ class mr {
5455
5357
  }
5456
5358
  }
5457
5359
  const le = 8192;
5458
- function Zi(r, e) {
5459
- const t = Ji(r[0]), n = Xi(r[1]), a = Math.pow(2, e.z);
5360
+ function Gi(r, e) {
5361
+ const t = Hi(r[0]), n = Wi(r[1]), a = Math.pow(2, e.z);
5460
5362
  return [Math.round(t * a * le), Math.round(n * a * le)];
5461
5363
  }
5462
5364
  function hr(r, e) {
5463
5365
  const t = Math.pow(2, e.z), n = (r[0] / le + e.x) / t, a = (r[1] / le + e.y) / t;
5464
- return [Yi(n), Qi(a)];
5366
+ return [Ki(n), Zi(a)];
5465
5367
  }
5466
- function Ji(r) {
5368
+ function Hi(r) {
5467
5369
  return (180 + r) / 360;
5468
5370
  }
5469
- function Yi(r) {
5371
+ function Ki(r) {
5470
5372
  return r * 360 - 180;
5471
5373
  }
5472
- function Xi(r) {
5374
+ function Wi(r) {
5473
5375
  return (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + r * Math.PI / 360))) / 360;
5474
5376
  }
5475
- function Qi(r) {
5377
+ function Zi(r) {
5476
5378
  return 360 / Math.PI * Math.atan(Math.exp((180 - r * 360) * Math.PI / 180)) - 90;
5477
5379
  }
5478
5380
  function Qe(r, e) {
@@ -5481,21 +5383,21 @@ function Qe(r, e) {
5481
5383
  function We(r, e) {
5482
5384
  return !(r[0] <= e[0] || r[2] >= e[2] || r[1] <= e[1] || r[3] >= e[3]);
5483
5385
  }
5484
- function es(r, e, t) {
5386
+ function Ji(r, e, t) {
5485
5387
  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];
5486
5388
  }
5487
- function ts(r, e, t) {
5389
+ function Yi(r, e, t) {
5488
5390
  const n = r[0] - e[0], a = r[1] - e[1], o = r[0] - t[0], i = r[1] - t[1];
5489
5391
  return n * i - o * a === 0 && n * o <= 0 && a * i <= 0;
5490
5392
  }
5491
- function Mt(r, e, t, n) {
5393
+ function It(r, e, t, n) {
5492
5394
  const a = [e[0] - r[0], e[1] - r[1]], o = [n[0] - t[0], n[1] - t[1]];
5493
- return os(o, a) === 0 ? !1 : !!(Hr(r, e, t, n) && Hr(t, n, r, e));
5395
+ return ts(o, a) === 0 ? !1 : !!(Gr(r, e, t, n) && Gr(t, n, r, e));
5494
5396
  }
5495
- function rs(r, e, t) {
5397
+ function Xi(r, e, t) {
5496
5398
  for (const n of t)
5497
5399
  for (let a = 0; a < n.length - 1; ++a)
5498
- if (Mt(r, e, n[a], n[a + 1]))
5400
+ if (It(r, e, n[a], n[a + 1]))
5499
5401
  return !0;
5500
5402
  return !1;
5501
5403
  }
@@ -5503,37 +5405,37 @@ function Oe(r, e, t = !1) {
5503
5405
  let n = !1;
5504
5406
  for (const a of e)
5505
5407
  for (let o = 0; o < a.length - 1; o++) {
5506
- if (ts(r, a[o], a[o + 1]))
5408
+ if (Yi(r, a[o], a[o + 1]))
5507
5409
  return t;
5508
- es(r, a[o], a[o + 1]) && (n = !n);
5410
+ Ji(r, a[o], a[o + 1]) && (n = !n);
5509
5411
  }
5510
5412
  return n;
5511
5413
  }
5512
- function ns(r, e) {
5414
+ function Qi(r, e) {
5513
5415
  for (const t of e)
5514
5416
  if (Oe(r, t))
5515
5417
  return !0;
5516
5418
  return !1;
5517
5419
  }
5518
- function Fn(r, e) {
5420
+ function jn(r, e) {
5519
5421
  for (const t of r)
5520
5422
  if (!Oe(t, e))
5521
5423
  return !1;
5522
5424
  for (let t = 0; t < r.length - 1; ++t)
5523
- if (rs(r[t], r[t + 1], e))
5425
+ if (Xi(r[t], r[t + 1], e))
5524
5426
  return !1;
5525
5427
  return !0;
5526
5428
  }
5527
- function as(r, e) {
5429
+ function es(r, e) {
5528
5430
  for (const t of e)
5529
- if (Fn(r, t))
5431
+ if (jn(r, t))
5530
5432
  return !0;
5531
5433
  return !1;
5532
5434
  }
5533
- function os(r, e) {
5435
+ function ts(r, e) {
5534
5436
  return r[0] * e[1] - r[1] * e[0];
5535
5437
  }
5536
- function Hr(r, e, t, n) {
5438
+ function Gr(r, e, t, n) {
5537
5439
  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;
5538
5440
  return c > 0 && p < 0 || c < 0 && p > 0;
5539
5441
  }
@@ -5542,14 +5444,14 @@ function gr(r, e, t) {
5542
5444
  for (let a = 0; a < r.length; a++) {
5543
5445
  const o = [];
5544
5446
  for (let i = 0; i < r[a].length; i++) {
5545
- const s = Zi(r[a][i], t);
5447
+ const s = Gi(r[a][i], t);
5546
5448
  Qe(e, s), o.push(s);
5547
5449
  }
5548
5450
  n.push(o);
5549
5451
  }
5550
5452
  return n;
5551
5453
  }
5552
- function On(r, e, t) {
5454
+ function Nn(r, e, t) {
5553
5455
  const n = [];
5554
5456
  for (let a = 0; a < r.length; a++) {
5555
5457
  const o = gr(r[a], e, t);
@@ -5557,7 +5459,7 @@ function On(r, e, t) {
5557
5459
  }
5558
5460
  return n;
5559
5461
  }
5560
- function Dn(r, e, t, n) {
5462
+ function Fn(r, e, t, n) {
5561
5463
  if (r[0] < t[0] || r[0] > t[2]) {
5562
5464
  const a = n * 0.5;
5563
5465
  let o = r[0] - t[0] > a ? -n : t[0] - r[0] > a ? n : 0;
@@ -5565,19 +5467,19 @@ function Dn(r, e, t, n) {
5565
5467
  }
5566
5468
  Qe(e, r);
5567
5469
  }
5568
- function is(r) {
5470
+ function rs(r) {
5569
5471
  r[0] = r[1] = 1 / 0, r[2] = r[3] = -1 / 0;
5570
5472
  }
5571
- function Kr(r, e, t, n) {
5473
+ function Hr(r, e, t, n) {
5572
5474
  const a = Math.pow(2, n.z) * le, o = [n.x * le, n.y * le], i = [];
5573
5475
  for (const s of r)
5574
5476
  for (const l of s) {
5575
5477
  const u = [l.x + o[0], l.y + o[1]];
5576
- Dn(u, e, t, a), i.push(u);
5478
+ Fn(u, e, t, a), i.push(u);
5577
5479
  }
5578
5480
  return i;
5579
5481
  }
5580
- function Wr(r, e, t, n) {
5482
+ function Kr(r, e, t, n) {
5581
5483
  const a = Math.pow(2, n.z) * le, o = [n.x * le, n.y * le], i = [];
5582
5484
  for (const s of r) {
5583
5485
  const l = [];
@@ -5588,17 +5490,17 @@ function Wr(r, e, t, n) {
5588
5490
  i.push(l);
5589
5491
  }
5590
5492
  if (e[2] - e[0] <= a / 2) {
5591
- is(e);
5493
+ rs(e);
5592
5494
  for (const s of i)
5593
5495
  for (const l of s)
5594
- Dn(l, e, t, a);
5496
+ Fn(l, e, t, a);
5595
5497
  }
5596
5498
  return i;
5597
5499
  }
5598
- function ss(r, e) {
5500
+ function ns(r, e) {
5599
5501
  const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0], n = [1 / 0, 1 / 0, -1 / 0, -1 / 0], a = r.canonicalID();
5600
5502
  if (e.type === "Polygon") {
5601
- const o = gr(e.coordinates, n, a), i = Kr(r.geometry(), t, n, a);
5503
+ const o = gr(e.coordinates, n, a), i = Hr(r.geometry(), t, n, a);
5602
5504
  if (!We(t, n))
5603
5505
  return !1;
5604
5506
  for (const s of i)
@@ -5606,31 +5508,31 @@ function ss(r, e) {
5606
5508
  return !1;
5607
5509
  }
5608
5510
  if (e.type === "MultiPolygon") {
5609
- const o = On(e.coordinates, n, a), i = Kr(r.geometry(), t, n, a);
5511
+ const o = Nn(e.coordinates, n, a), i = Hr(r.geometry(), t, n, a);
5610
5512
  if (!We(t, n))
5611
5513
  return !1;
5612
5514
  for (const s of i)
5613
- if (!ns(s, o))
5515
+ if (!Qi(s, o))
5614
5516
  return !1;
5615
5517
  }
5616
5518
  return !0;
5617
5519
  }
5618
- function ls(r, e) {
5520
+ function as(r, e) {
5619
5521
  const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0], n = [1 / 0, 1 / 0, -1 / 0, -1 / 0], a = r.canonicalID();
5620
5522
  if (e.type === "Polygon") {
5621
- const o = gr(e.coordinates, n, a), i = Wr(r.geometry(), t, n, a);
5523
+ const o = gr(e.coordinates, n, a), i = Kr(r.geometry(), t, n, a);
5622
5524
  if (!We(t, n))
5623
5525
  return !1;
5624
5526
  for (const s of i)
5625
- if (!Fn(s, o))
5527
+ if (!jn(s, o))
5626
5528
  return !1;
5627
5529
  }
5628
5530
  if (e.type === "MultiPolygon") {
5629
- const o = On(e.coordinates, n, a), i = Wr(r.geometry(), t, n, a);
5531
+ const o = Nn(e.coordinates, n, a), i = Kr(r.geometry(), t, n, a);
5630
5532
  if (!We(t, n))
5631
5533
  return !1;
5632
5534
  for (const s of i)
5633
- if (!as(s, o))
5535
+ if (!es(s, o))
5634
5536
  return !1;
5635
5537
  }
5636
5538
  return !0;
@@ -5668,10 +5570,10 @@ class Ce {
5668
5570
  }
5669
5571
  evaluate(e) {
5670
5572
  if (e.geometry() != null && e.canonicalID() != null) {
5671
- if (e.geometryDollarType() === "Point")
5672
- return ss(e, this.geometries);
5673
- if (e.geometryDollarType() === "LineString")
5674
- return ls(e, this.geometries);
5573
+ if (e.geometryType() === "Point")
5574
+ return ns(e, this.geometries);
5575
+ if (e.geometryType() === "LineString")
5576
+ return as(e, this.geometries);
5675
5577
  }
5676
5578
  return !1;
5677
5579
  }
@@ -5681,7 +5583,7 @@ class Ce {
5681
5583
  return !0;
5682
5584
  }
5683
5585
  }
5684
- class qn {
5586
+ class On {
5685
5587
  constructor(e = [], t = (n, a) => n < a ? -1 : n > a ? 1 : 0) {
5686
5588
  if (this.data = e, this.length = this.data.length, this.compare = t, this.length > 0)
5687
5589
  for (let n = (this.length >> 1) - 1; n >= 0; n--) this._down(n);
@@ -5717,11 +5619,28 @@ class qn {
5717
5619
  t[e] = o;
5718
5620
  }
5719
5621
  }
5720
- const us = 6378.137, Zr = 1 / 298.257223563, Jr = Zr * (2 - Zr), Yr = Math.PI / 180;
5622
+ function os(r, e) {
5623
+ if (r.length <= 1)
5624
+ return [r];
5625
+ const n = [];
5626
+ let a, o;
5627
+ for (const i of r) {
5628
+ const s = is(i);
5629
+ 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));
5630
+ }
5631
+ return a && n.push(a), n;
5632
+ }
5633
+ function is(r) {
5634
+ let e = 0;
5635
+ for (let t = 0, n = r.length, a = n - 1, o, i; t < n; a = t++)
5636
+ o = r[t], i = r[a], e += (i.x - o.x) * (o.y + i.y);
5637
+ return e;
5638
+ }
5639
+ const ss = 6378.137, Wr = 1 / 298.257223563, Zr = Wr * (2 - Wr), Jr = Math.PI / 180;
5721
5640
  class vr {
5722
5641
  constructor(e) {
5723
- const t = Yr * us * 1e3, n = Math.cos(e * Yr), a = 1 / (1 - Jr * (1 - n * n)), o = Math.sqrt(a);
5724
- this.kx = t * o * n, this.ky = t * o * a * (1 - Jr);
5642
+ const t = Jr * ss * 1e3, n = Math.cos(e * Jr), a = 1 / (1 - Zr * (1 - n * n)), o = Math.sqrt(a);
5643
+ this.kx = t * o * n, this.ky = t * o * a * (1 - Zr);
5725
5644
  }
5726
5645
  /**
5727
5646
  * Given two points of the form [longitude, latitude], returns the distance.
@@ -5772,7 +5691,7 @@ class vr {
5772
5691
  }
5773
5692
  }
5774
5693
  const Jt = 100, Yt = 50;
5775
- function Un(r, e) {
5694
+ function Dn(r, e) {
5776
5695
  return e[0] - r[0];
5777
5696
  }
5778
5697
  function pt(r) {
@@ -5817,11 +5736,11 @@ function er(r) {
5817
5736
  Qe(e, n);
5818
5737
  return e;
5819
5738
  }
5820
- function Xr(r) {
5739
+ function Yr(r) {
5821
5740
  return r[0] !== -1 / 0 && r[1] !== -1 / 0 && r[2] !== 1 / 0 && r[3] !== 1 / 0;
5822
5741
  }
5823
5742
  function br(r, e, t) {
5824
- if (!Xr(r) || !Xr(e))
5743
+ if (!Yr(r) || !Yr(e))
5825
5744
  return NaN;
5826
5745
  let n = 0, a = 0;
5827
5746
  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]);
@@ -5834,7 +5753,7 @@ function wr(r, e, t, n, a) {
5834
5753
  const o = Math.min(ke(r, [t, n], a), ke(e, [t, n], a)), i = Math.min(ke(t, [r, e], a), ke(n, [r, e], a));
5835
5754
  return Math.min(o, i);
5836
5755
  }
5837
- function cs(r, e, t, n, a) {
5756
+ function ls(r, e, t, n, a) {
5838
5757
  if (!(de(e, r.length) && de(n, t.length)))
5839
5758
  return 1 / 0;
5840
5759
  let i = 1 / 0;
@@ -5842,14 +5761,14 @@ function cs(r, e, t, n, a) {
5842
5761
  const l = r[s], u = r[s + 1];
5843
5762
  for (let c = n[0]; c < n[1]; ++c) {
5844
5763
  const p = t[c], m = t[c + 1];
5845
- if (Mt(l, u, p, m))
5764
+ if (It(l, u, p, m))
5846
5765
  return 0;
5847
5766
  i = Math.min(i, wr(l, u, p, m, a));
5848
5767
  }
5849
5768
  }
5850
5769
  return i;
5851
5770
  }
5852
- function ps(r, e, t, n, a) {
5771
+ function us(r, e, t, n, a) {
5853
5772
  if (!(de(e, r.length) && de(n, t.length)))
5854
5773
  return NaN;
5855
5774
  let i = 1 / 0;
@@ -5859,7 +5778,7 @@ function ps(r, e, t, n, a) {
5859
5778
  return i;
5860
5779
  return i;
5861
5780
  }
5862
- function fs(r, e, t) {
5781
+ function cs(r, e, t) {
5863
5782
  if (Oe(r, e, !0))
5864
5783
  return 0;
5865
5784
  let n = 1 / 0;
@@ -5873,7 +5792,7 @@ function fs(r, e, t) {
5873
5792
  }
5874
5793
  return n;
5875
5794
  }
5876
- function ds(r, e, t, n) {
5795
+ function ps(r, e, t, n) {
5877
5796
  if (!de(e, r.length))
5878
5797
  return NaN;
5879
5798
  for (let o = e[0]; o <= e[1]; ++o)
@@ -5885,28 +5804,28 @@ function ds(r, e, t, n) {
5885
5804
  for (const l of t)
5886
5805
  for (let u = 0, c = l.length, p = c - 1; u < c; p = u++) {
5887
5806
  const m = l[p], f = l[u];
5888
- if (Mt(i, s, m, f))
5807
+ if (It(i, s, m, f))
5889
5808
  return 0;
5890
5809
  a = Math.min(a, wr(i, s, m, f, n));
5891
5810
  }
5892
5811
  }
5893
5812
  return a;
5894
5813
  }
5895
- function Qr(r, e) {
5814
+ function Xr(r, e) {
5896
5815
  for (const t of r)
5897
5816
  for (const n of t)
5898
5817
  if (Oe(n, e, !0))
5899
5818
  return !0;
5900
5819
  return !1;
5901
5820
  }
5902
- function ys(r, e, t, n = 1 / 0) {
5821
+ function fs(r, e, t, n = 1 / 0) {
5903
5822
  const a = er(r), o = er(e);
5904
5823
  if (n !== 1 / 0 && br(a, o, t) >= n)
5905
5824
  return n;
5906
5825
  if (We(a, o)) {
5907
- if (Qr(r, e))
5826
+ if (Xr(r, e))
5908
5827
  return 0;
5909
- } else if (Qr(e, r))
5828
+ } else if (Xr(e, r))
5910
5829
  return 0;
5911
5830
  let i = 1 / 0;
5912
5831
  for (const s of r)
@@ -5915,14 +5834,14 @@ function ys(r, e, t, n = 1 / 0) {
5915
5834
  for (const f of e)
5916
5835
  for (let d = 0, y = f.length, v = y - 1; d < y; v = d++) {
5917
5836
  const w = f[v], b = f[d];
5918
- if (Mt(p, m, w, b))
5837
+ if (It(p, m, w, b))
5919
5838
  return 0;
5920
5839
  i = Math.min(i, wr(p, m, w, b, t));
5921
5840
  }
5922
5841
  }
5923
5842
  return i;
5924
5843
  }
5925
- function en(r, e, t, n, a, o) {
5844
+ function Qr(r, e, t, n, a, o) {
5926
5845
  if (!o)
5927
5846
  return;
5928
5847
  const i = br(Qt(n, o), a, t);
@@ -5938,7 +5857,7 @@ function ft(r, e, t, n, a = 1 / 0) {
5938
5857
  let o = Math.min(n.distance(r[0], t[0][0]), a);
5939
5858
  if (o === 0)
5940
5859
  return o;
5941
- const i = new qn([[0, [0, r.length - 1], [0, 0]]], Un), s = er(t);
5860
+ const i = new On([[0, [0, r.length - 1], [0, 0]]], Dn), s = er(t);
5942
5861
  for (; i.length > 0; ) {
5943
5862
  const l = i.pop();
5944
5863
  if (l[0] >= o)
@@ -5948,19 +5867,19 @@ function ft(r, e, t, n, a = 1 / 0) {
5948
5867
  if (!de(u, r.length))
5949
5868
  return NaN;
5950
5869
  if (e) {
5951
- const p = ds(r, u, t, n);
5870
+ const p = ps(r, u, t, n);
5952
5871
  if (isNaN(p) || p === 0)
5953
5872
  return p;
5954
5873
  o = Math.min(o, p);
5955
5874
  } else
5956
5875
  for (let p = u[0]; p <= u[1]; ++p) {
5957
- const m = fs(r[p], t, n);
5876
+ const m = cs(r[p], t, n);
5958
5877
  if (o = Math.min(o, m), o === 0)
5959
5878
  return 0;
5960
5879
  }
5961
5880
  } else {
5962
5881
  const p = Xt(u, e);
5963
- en(i, o, n, r, s, p[0]), en(i, o, n, r, s, p[1]);
5882
+ Qr(i, o, n, r, s, p[0]), Qr(i, o, n, r, s, p[1]);
5964
5883
  }
5965
5884
  }
5966
5885
  return o;
@@ -5969,7 +5888,7 @@ function dt(r, e, t, n, a, o = 1 / 0) {
5969
5888
  let i = Math.min(o, a.distance(r[0], t[0]));
5970
5889
  if (i === 0)
5971
5890
  return i;
5972
- const s = new qn([[0, [0, r.length - 1], [0, t.length - 1]]], Un);
5891
+ const s = new On([[0, [0, r.length - 1], [0, t.length - 1]]], Dn);
5973
5892
  for (; s.length > 0; ) {
5974
5893
  const l = s.pop();
5975
5894
  if (l[0] >= i)
@@ -5980,7 +5899,7 @@ function dt(r, e, t, n, a, o = 1 / 0) {
5980
5899
  return NaN;
5981
5900
  let f;
5982
5901
  if (e && n)
5983
- f = cs(r, u, t, c, a), i = Math.min(i, f);
5902
+ f = ls(r, u, t, c, a), i = Math.min(i, f);
5984
5903
  else if (e && !n) {
5985
5904
  const d = r.slice(u[0], u[1] + 1);
5986
5905
  for (let y = c[0]; y <= c[1]; ++y)
@@ -5992,7 +5911,7 @@ function dt(r, e, t, n, a, o = 1 / 0) {
5992
5911
  if (f = ke(r[y], d, a), i = Math.min(i, f), i === 0)
5993
5912
  return i;
5994
5913
  } else
5995
- f = ps(r, u, t, c, a), i = Math.min(i, f);
5914
+ f = us(r, u, t, c, a), i = Math.min(i, f);
5996
5915
  } else {
5997
5916
  const f = Xt(u, e), d = Xt(c, n);
5998
5917
  at(s, i, a, r, t, f[0], d[0]), at(s, i, a, r, t, f[0], d[1]), at(s, i, a, r, t, f[1], d[0]), at(s, i, a, r, t, f[1], d[1]);
@@ -6000,7 +5919,7 @@ function dt(r, e, t, n, a, o = 1 / 0) {
6000
5919
  }
6001
5920
  return i;
6002
5921
  }
6003
- function ms(r, e) {
5922
+ function ds(r, e) {
6004
5923
  const t = r.geometry(), n = t.flat().map((i) => hr([i.x, i.y], r.canonical));
6005
5924
  if (t.length === 0)
6006
5925
  return NaN;
@@ -6023,7 +5942,7 @@ function ms(r, e) {
6023
5942
  }
6024
5943
  return o;
6025
5944
  }
6026
- function hs(r, e) {
5945
+ function ys(r, e) {
6027
5946
  const t = r.geometry(), n = t.flat().map((i) => hr([i.x, i.y], r.canonical));
6028
5947
  if (t.length === 0)
6029
5948
  return NaN;
@@ -6046,11 +5965,11 @@ function hs(r, e) {
6046
5965
  }
6047
5966
  return o;
6048
5967
  }
6049
- function gs(r, e) {
5968
+ function ms(r, e) {
6050
5969
  const t = r.geometry();
6051
5970
  if (t.length === 0 || t[0].length === 0)
6052
5971
  return NaN;
6053
- const n = Ci(t).map((i) => i.map((s) => s.map((l) => hr([l.x, l.y], r.canonical)))), a = new vr(n[0][0][0][1]);
5972
+ const n = os(t).map((i) => i.map((s) => s.map((l) => hr([l.x, l.y], r.canonical)))), a = new vr(n[0][0][0][1]);
6054
5973
  let o = 1 / 0;
6055
5974
  for (const i of e)
6056
5975
  for (const s of n) {
@@ -6062,7 +5981,7 @@ function gs(r, e) {
6062
5981
  o = Math.min(o, ft(i.coordinates, !0, s, a, o));
6063
5982
  break;
6064
5983
  case "Polygon":
6065
- o = Math.min(o, ys(s, i.coordinates, a, o));
5984
+ o = Math.min(o, fs(s, i.coordinates, a, o));
6066
5985
  break;
6067
5986
  }
6068
5987
  if (o === 0)
@@ -6070,7 +5989,7 @@ function gs(r, e) {
6070
5989
  }
6071
5990
  return o;
6072
5991
  }
6073
- function Bt(r) {
5992
+ function Ut(r) {
6074
5993
  return r.type === "MultiPolygon" ? r.coordinates.map((e) => ({
6075
5994
  type: "Polygon",
6076
5995
  coordinates: e
@@ -6092,22 +6011,22 @@ class Ae {
6092
6011
  if (He(e[1])) {
6093
6012
  const n = e[1];
6094
6013
  if (n.type === "FeatureCollection")
6095
- return new Ae(n, n.features.map((a) => Bt(a.geometry)).flat());
6014
+ return new Ae(n, n.features.map((a) => Ut(a.geometry)).flat());
6096
6015
  if (n.type === "Feature")
6097
- return new Ae(n, Bt(n.geometry));
6016
+ return new Ae(n, Ut(n.geometry));
6098
6017
  if ("type" in n && "coordinates" in n)
6099
- return new Ae(n, Bt(n));
6018
+ return new Ae(n, Ut(n));
6100
6019
  }
6101
6020
  return t.error("'distance' expression requires valid geojson object that contains polygon geometry type.");
6102
6021
  }
6103
6022
  evaluate(e) {
6104
6023
  if (e.geometry() != null && e.canonicalID() != null) {
6105
6024
  if (e.geometryType() === "Point")
6106
- return ms(e, this.geometries);
6025
+ return ds(e, this.geometries);
6107
6026
  if (e.geometryType() === "LineString")
6108
- return hs(e, this.geometries);
6027
+ return ys(e, this.geometries);
6109
6028
  if (e.geometryType() === "Polygon")
6110
- return gs(e, this.geometries);
6029
+ return ms(e, this.geometries);
6111
6030
  }
6112
6031
  return NaN;
6113
6032
  }
@@ -6119,12 +6038,12 @@ class Ae {
6119
6038
  }
6120
6039
  const Sr = {
6121
6040
  // special forms
6122
- "==": Bi,
6123
- "!=": Vi,
6124
- ">": Hi,
6125
- "<": Gi,
6126
- ">=": Wi,
6127
- "<=": Ki,
6041
+ "==": Oi,
6042
+ "!=": Di,
6043
+ ">": Bi,
6044
+ "<": qi,
6045
+ ">=": Vi,
6046
+ "<=": Ui,
6128
6047
  array: te,
6129
6048
  at: lr,
6130
6049
  boolean: te,
@@ -6204,7 +6123,7 @@ class re {
6204
6123
  if (s.length === 1)
6205
6124
  t.errors.push(...l.errors);
6206
6125
  else {
6207
- const c = (s.length ? s : i).map(([m]) => bs(m)).join(" | "), p = [];
6126
+ const c = (s.length ? s : i).map(([m]) => gs(m)).join(" | "), p = [];
6208
6127
  for (let m = 1; m < e.length; m++) {
6209
6128
  const f = t.parse(e[m], 1 + p.length);
6210
6129
  if (!f)
@@ -6221,21 +6140,21 @@ class re {
6221
6140
  e[n] = re;
6222
6141
  }
6223
6142
  }
6224
- function tn(r, [e, t, n, a]) {
6143
+ function en(r, [e, t, n, a]) {
6225
6144
  e = e.evaluate(r), t = t.evaluate(r), n = n.evaluate(r);
6226
- const o = a ? a.evaluate(r) : 1, i = _n(e, t, n, o);
6145
+ const o = a ? a.evaluate(r) : 1, i = zn(e, t, n, o);
6227
6146
  if (i)
6228
6147
  throw new D(i);
6229
6148
  return new $(e / 255, t / 255, n / 255, o, !1);
6230
6149
  }
6231
- function rn(r, e) {
6150
+ function tn(r, e) {
6232
6151
  return r in e;
6233
6152
  }
6234
6153
  function Vt(r, e) {
6235
6154
  const t = e[r];
6236
6155
  return typeof t > "u" ? null : t;
6237
6156
  }
6238
- function vs(r, e, t, n) {
6157
+ function hs(r, e, t, n) {
6239
6158
  for (; t <= n; ) {
6240
6159
  const a = t + n >> 1;
6241
6160
  if (e[a] === r)
@@ -6249,14 +6168,14 @@ function xe(r) {
6249
6168
  }
6250
6169
  re.register(Sr, {
6251
6170
  error: [
6252
- yi,
6253
- [M],
6171
+ fi,
6172
+ [I],
6254
6173
  (r, [e]) => {
6255
6174
  throw new D(e.evaluate(r));
6256
6175
  }
6257
6176
  ],
6258
6177
  typeof: [
6259
- M,
6178
+ I,
6260
6179
  [A],
6261
6180
  (r, [e]) => N(q(e.evaluate(r)))
6262
6181
  ],
@@ -6271,23 +6190,23 @@ re.register(Sr, {
6271
6190
  rgb: [
6272
6191
  ie,
6273
6192
  [g, g, g],
6274
- tn
6193
+ en
6275
6194
  ],
6276
6195
  rgba: [
6277
6196
  ie,
6278
6197
  [g, g, g, g],
6279
- tn
6198
+ en
6280
6199
  ],
6281
6200
  has: {
6282
6201
  type: C,
6283
6202
  overloads: [
6284
6203
  [
6285
- [M],
6286
- (r, [e]) => rn(e.evaluate(r), r.properties())
6204
+ [I],
6205
+ (r, [e]) => tn(e.evaluate(r), r.properties())
6287
6206
  ],
6288
6207
  [
6289
- [M, Re],
6290
- (r, [e, t]) => rn(e.evaluate(r), t.evaluate(r))
6208
+ [I, Re],
6209
+ (r, [e, t]) => tn(e.evaluate(r), t.evaluate(r))
6291
6210
  ]
6292
6211
  ]
6293
6212
  },
@@ -6295,18 +6214,18 @@ re.register(Sr, {
6295
6214
  type: A,
6296
6215
  overloads: [
6297
6216
  [
6298
- [M],
6217
+ [I],
6299
6218
  (r, [e]) => Vt(e.evaluate(r), r.properties())
6300
6219
  ],
6301
6220
  [
6302
- [M, Re],
6221
+ [I, Re],
6303
6222
  (r, [e, t]) => Vt(e.evaluate(r), t.evaluate(r))
6304
6223
  ]
6305
6224
  ]
6306
6225
  },
6307
6226
  "feature-state": [
6308
6227
  A,
6309
- [M],
6228
+ [I],
6310
6229
  (r, [e]) => Vt(e.evaluate(r), r.featureState || {})
6311
6230
  ],
6312
6231
  properties: [
@@ -6315,7 +6234,7 @@ re.register(Sr, {
6315
6234
  (r) => r.properties()
6316
6235
  ],
6317
6236
  "geometry-type": [
6318
- M,
6237
+ I,
6319
6238
  [],
6320
6239
  (r) => r.geometryType()
6321
6240
  ],
@@ -6492,7 +6411,7 @@ re.register(Sr, {
6492
6411
  ],
6493
6412
  "filter-==": [
6494
6413
  C,
6495
- [M, A],
6414
+ [I, A],
6496
6415
  (r, [e, t]) => r.properties()[e.value] === t.value
6497
6416
  ],
6498
6417
  "filter-id-==": [
@@ -6502,12 +6421,12 @@ re.register(Sr, {
6502
6421
  ],
6503
6422
  "filter-type-==": [
6504
6423
  C,
6505
- [M],
6506
- (r, [e]) => r.geometryDollarType() === e.value
6424
+ [I],
6425
+ (r, [e]) => r.geometryType() === e.value
6507
6426
  ],
6508
6427
  "filter-<": [
6509
6428
  C,
6510
- [M, A],
6429
+ [I, A],
6511
6430
  (r, [e, t]) => {
6512
6431
  const n = r.properties()[e.value], a = t.value;
6513
6432
  return typeof n == typeof a && n < a;
@@ -6523,7 +6442,7 @@ re.register(Sr, {
6523
6442
  ],
6524
6443
  "filter->": [
6525
6444
  C,
6526
- [M, A],
6445
+ [I, A],
6527
6446
  (r, [e, t]) => {
6528
6447
  const n = r.properties()[e.value], a = t.value;
6529
6448
  return typeof n == typeof a && n > a;
@@ -6539,7 +6458,7 @@ re.register(Sr, {
6539
6458
  ],
6540
6459
  "filter-<=": [
6541
6460
  C,
6542
- [M, A],
6461
+ [I, A],
6543
6462
  (r, [e, t]) => {
6544
6463
  const n = r.properties()[e.value], a = t.value;
6545
6464
  return typeof n == typeof a && n <= a;
@@ -6555,7 +6474,7 @@ re.register(Sr, {
6555
6474
  ],
6556
6475
  "filter->=": [
6557
6476
  C,
6558
- [M, A],
6477
+ [I, A],
6559
6478
  (r, [e, t]) => {
6560
6479
  const n = r.properties()[e.value], a = t.value;
6561
6480
  return typeof n == typeof a && n >= a;
@@ -6581,8 +6500,8 @@ re.register(Sr, {
6581
6500
  ],
6582
6501
  "filter-type-in": [
6583
6502
  C,
6584
- [W(M)],
6585
- (r, [e]) => e.value.indexOf(r.geometryDollarType()) >= 0
6503
+ [W(I)],
6504
+ (r, [e]) => e.value.indexOf(r.geometryType()) >= 0
6586
6505
  ],
6587
6506
  "filter-id-in": [
6588
6507
  C,
@@ -6591,15 +6510,15 @@ re.register(Sr, {
6591
6510
  ],
6592
6511
  "filter-in-small": [
6593
6512
  C,
6594
- [M, W(A)],
6513
+ [I, W(A)],
6595
6514
  // assumes v is an array literal
6596
6515
  (r, [e, t]) => t.value.indexOf(r.properties()[e.value]) >= 0
6597
6516
  ],
6598
6517
  "filter-in-large": [
6599
6518
  C,
6600
- [M, W(A)],
6519
+ [I, W(A)],
6601
6520
  // assumes v is a array literal with values sorted in ascending order and of a single type
6602
- (r, [e, t]) => vs(r.properties()[e.value], t.value, 0, t.value.length - 1)
6521
+ (r, [e, t]) => hs(r.properties()[e.value], t.value, 0, t.value.length - 1)
6603
6522
  ],
6604
6523
  all: {
6605
6524
  type: C,
@@ -6644,7 +6563,7 @@ re.register(Sr, {
6644
6563
  ],
6645
6564
  "is-supported-script": [
6646
6565
  C,
6647
- [M],
6566
+ [I],
6648
6567
  // At parse time this will always return true, so we need to exclude this expression with isGlobalPropertyConstant
6649
6568
  (r, [e]) => {
6650
6569
  const t = r.globals && r.globals.isSupportedScript;
@@ -6652,27 +6571,27 @@ re.register(Sr, {
6652
6571
  }
6653
6572
  ],
6654
6573
  upcase: [
6655
- M,
6656
- [M],
6574
+ I,
6575
+ [I],
6657
6576
  (r, [e]) => e.evaluate(r).toUpperCase()
6658
6577
  ],
6659
6578
  downcase: [
6660
- M,
6661
- [M],
6579
+ I,
6580
+ [I],
6662
6581
  (r, [e]) => e.evaluate(r).toLowerCase()
6663
6582
  ],
6664
6583
  concat: [
6665
- M,
6584
+ I,
6666
6585
  xe(A),
6667
- (r, e) => e.map((t) => Ue(t.evaluate(r))).join("")
6586
+ (r, e) => e.map((t) => Be(t.evaluate(r))).join("")
6668
6587
  ],
6669
6588
  "resolved-locale": [
6670
- M,
6589
+ I,
6671
6590
  [bt],
6672
6591
  (r, [e]) => e.evaluate(r).resolvedLocale()
6673
6592
  ]
6674
6593
  });
6675
- function bs(r) {
6594
+ function gs(r) {
6676
6595
  return Array.isArray(r) ? `(${r.map(N).join(", ")})` : `(${N(r.type)}...)`;
6677
6596
  }
6678
6597
  function yt(r) {
@@ -6690,9 +6609,9 @@ function yt(r) {
6690
6609
  let t = !0;
6691
6610
  return r.eachChild((n) => {
6692
6611
  e ? t = t && yt(n) : t = t && n instanceof je;
6693
- }), t ? It(r) && Et(r, ["zoom", "heatmap-density", "line-progress", "accumulated", "is-supported-script"]) : !1;
6612
+ }), t ? Et(r) && Mt(r, ["zoom", "heatmap-density", "line-progress", "accumulated", "is-supported-script"]) : !1;
6694
6613
  }
6695
- function It(r) {
6614
+ function Et(r) {
6696
6615
  if (r instanceof re) {
6697
6616
  if (r.name === "get" && r.args.length === 1)
6698
6617
  return !1;
@@ -6709,7 +6628,7 @@ function It(r) {
6709
6628
  return !1;
6710
6629
  let e = !0;
6711
6630
  return r.eachChild((t) => {
6712
- e && !It(t) && (e = !1);
6631
+ e && !Et(t) && (e = !1);
6713
6632
  }), e;
6714
6633
  }
6715
6634
  function Ze(r) {
@@ -6720,12 +6639,12 @@ function Ze(r) {
6720
6639
  e && !Ze(t) && (e = !1);
6721
6640
  }), e;
6722
6641
  }
6723
- function Et(r, e) {
6642
+ function Mt(r, e) {
6724
6643
  if (r instanceof re && e.indexOf(r.name) >= 0)
6725
6644
  return !1;
6726
6645
  let t = !0;
6727
6646
  return r.eachChild((n) => {
6728
- t && !Et(n, e) && (t = !1);
6647
+ t && !Mt(n, e) && (t = !1);
6729
6648
  }), t;
6730
6649
  }
6731
6650
  function tr(r) {
@@ -6737,10 +6656,10 @@ function Pe(r) {
6737
6656
  function mt(r) {
6738
6657
  return r["property-type"] === "data-driven" || r["property-type"] === "cross-faded-data-driven";
6739
6658
  }
6740
- function Bn(r) {
6659
+ function qn(r) {
6741
6660
  return !!r.expression && r.expression.parameters.indexOf("zoom") > -1;
6742
6661
  }
6743
- function Vn(r) {
6662
+ function Bn(r) {
6744
6663
  return !!r.expression && r.expression.interpolated;
6745
6664
  }
6746
6665
  function z(r) {
@@ -6749,9 +6668,9 @@ function z(r) {
6749
6668
  function xr(r) {
6750
6669
  return typeof r == "object" && r !== null && !Array.isArray(r);
6751
6670
  }
6752
- class ws {
6671
+ class vs {
6753
6672
  constructor(e, t) {
6754
- this.expression = e, this._warningHistory = {}, this._evaluator = new Rn(), this._defaultValue = t ? ks(t) : null, this._enumValues = t && t.type === "enum" ? t.values : null;
6673
+ this.expression = e, this._warningHistory = {}, this._evaluator = new _n(), this._defaultValue = t ? Ss(t) : null, this._enumValues = t && t.type === "enum" ? t.values : null;
6755
6674
  }
6756
6675
  evaluateWithoutErrorHandling(e, t, n, a, o, i) {
6757
6676
  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);
@@ -6770,14 +6689,14 @@ class ws {
6770
6689
  }
6771
6690
  }
6772
6691
  }
6773
- function Gn(r) {
6692
+ function Un(r) {
6774
6693
  return Array.isArray(r) && r.length > 0 && typeof r[0] == "string" && r[0] in Sr;
6775
6694
  }
6776
- function Hn(r, e) {
6777
- const t = new kt(Sr, yt, [], e ? xs(e) : void 0), n = t.parse(r, void 0, void 0, void 0, e && e.type === "string" ? { typeAnnotation: "coerce" } : void 0);
6778
- return n ? tr(new ws(n, e)) : Pe(t.errors);
6695
+ function Vn(r, e) {
6696
+ const t = new kt(Sr, yt, [], e ? ws(e) : void 0), n = t.parse(r, void 0, void 0, void 0, e && e.type === "string" ? { typeAnnotation: "coerce" } : void 0);
6697
+ return n ? tr(new vs(n, e)) : Pe(t.errors);
6779
6698
  }
6780
- class nn {
6699
+ class rn {
6781
6700
  constructor(e, t) {
6782
6701
  this.kind = e, this._styleExpression = t, this.isStateDependent = e !== "constant" && !Ze(t.expression);
6783
6702
  }
@@ -6788,7 +6707,7 @@ class nn {
6788
6707
  return this._styleExpression.evaluate(e, t, n, a, o, i);
6789
6708
  }
6790
6709
  }
6791
- class an {
6710
+ class nn {
6792
6711
  constructor(e, t, n, a) {
6793
6712
  this.kind = e, this.zoomStops = n, this._styleExpression = t, this.isStateDependent = e !== "camera" && !Ze(t.expression), this.interpolationType = a;
6794
6713
  }
@@ -6802,27 +6721,27 @@ class an {
6802
6721
  return this.interpolationType ? se.interpolationFactor(this.interpolationType, e, t, n) : 0;
6803
6722
  }
6804
6723
  }
6805
- function Ss(r, e) {
6806
- const t = Hn(r, e);
6724
+ function bs(r, e) {
6725
+ const t = Vn(r, e);
6807
6726
  if (t.result === "error")
6808
6727
  return t;
6809
- const n = t.value.expression, a = It(n);
6728
+ const n = t.value.expression, a = Et(n);
6810
6729
  if (!a && !mt(e))
6811
6730
  return Pe([new oe("", "data expressions not supported")]);
6812
- const o = Et(n, ["zoom"]);
6813
- if (!o && !Bn(e))
6731
+ const o = Mt(n, ["zoom"]);
6732
+ if (!o && !qn(e))
6814
6733
  return Pe([new oe("", "zoom expressions not supported")]);
6815
6734
  const i = it(n);
6816
6735
  if (!i && !o)
6817
6736
  return Pe([new oe("", '"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);
6818
6737
  if (i instanceof oe)
6819
6738
  return Pe([i]);
6820
- if (i instanceof se && !Vn(e))
6739
+ if (i instanceof se && !Bn(e))
6821
6740
  return Pe([new oe("", '"interpolate" expressions cannot be used with this property')]);
6822
6741
  if (!i)
6823
- return tr(a ? new nn("constant", t.value) : new nn("source", t.value));
6742
+ return tr(a ? new rn("constant", t.value) : new rn("source", t.value));
6824
6743
  const s = i instanceof se ? i.interpolation : void 0;
6825
- return tr(a ? new an("camera", t.value, i.labels, s) : new an("composite", t.value, i.labels, s));
6744
+ return tr(a ? new nn("camera", t.value, i.labels, s) : new nn("composite", t.value, i.labels, s));
6826
6745
  }
6827
6746
  function it(r) {
6828
6747
  let e = null;
@@ -6838,12 +6757,12 @@ function it(r) {
6838
6757
  n instanceof oe ? e = n : !e && n ? e = new oe("", '"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.') : e && n && e !== n && (e = new oe("", 'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'));
6839
6758
  }), e;
6840
6759
  }
6841
- function xs(r) {
6760
+ function ws(r) {
6842
6761
  const e = {
6843
6762
  color: ie,
6844
- string: M,
6763
+ string: I,
6845
6764
  number: g,
6846
- enum: M,
6765
+ enum: I,
6847
6766
  boolean: C,
6848
6767
  formatted: wt,
6849
6768
  padding: St,
@@ -6853,10 +6772,10 @@ function xs(r) {
6853
6772
  };
6854
6773
  return r.type === "array" ? W(e[r.value] || A, r.length) : e[r.type];
6855
6774
  }
6856
- function ks(r) {
6775
+ function Ss(r) {
6857
6776
  return r.type === "color" && xr(r.default) ? new $(0, 0, 0, 0) : r.type === "color" ? $.parse(r.default) || null : r.type === "padding" ? J.parse(r.default) || null : r.type === "variableAnchorOffsetCollection" ? ne.parse(r.default) || null : r.type === "projectionDefinition" ? ee.parse(r.default) || null : r.default === void 0 ? null : r.default;
6858
6777
  }
6859
- function Kn(r) {
6778
+ function Gn(r) {
6860
6779
  if (r === !0 || r === !1)
6861
6780
  return !0;
6862
6781
  if (!Array.isArray(r) || r.length === 0)
@@ -6880,27 +6799,27 @@ function Kn(r) {
6880
6799
  case "any":
6881
6800
  case "all":
6882
6801
  for (const e of r.slice(1))
6883
- if (!Kn(e) && typeof e != "boolean")
6802
+ if (!Gn(e) && typeof e != "boolean")
6884
6803
  return !1;
6885
6804
  return !0;
6886
6805
  default:
6887
6806
  return !0;
6888
6807
  }
6889
6808
  }
6890
- function Wn(r) {
6809
+ function Hn(r) {
6891
6810
  const e = r.key, t = r.value;
6892
6811
  return t ? [new h(e, t, "constants have been deprecated as of v8")] : [];
6893
6812
  }
6894
6813
  function O(r) {
6895
6814
  return r instanceof Number || r instanceof String || r instanceof Boolean ? r.valueOf() : r;
6896
6815
  }
6897
- function Ie(r) {
6816
+ function Ee(r) {
6898
6817
  if (Array.isArray(r))
6899
- return r.map(Ie);
6818
+ return r.map(Ee);
6900
6819
  if (r instanceof Object && !(r instanceof Number || r instanceof String || r instanceof Boolean)) {
6901
6820
  const e = {};
6902
6821
  for (const t in r)
6903
- e[t] = Ie(r[t]);
6822
+ e[t] = Ee(r[t]);
6904
6823
  return e;
6905
6824
  }
6906
6825
  return O(r);
@@ -6973,7 +6892,7 @@ function Lr(r) {
6973
6892
  let a = z(t);
6974
6893
  return a === "number" && t !== t && (a = "NaN"), a !== "number" ? [new h(e, t, `number expected, ${a} found`)] : "minimum" in n && t < n.minimum ? [new h(e, t, `${t} is less than the minimum value ${n.minimum}`)] : "maximum" in n && t > n.maximum ? [new h(e, t, `${t} is greater than the maximum value ${n.maximum}`)] : [];
6975
6894
  }
6976
- function Zn(r) {
6895
+ function Kn(r) {
6977
6896
  const e = r.valueSpec, t = O(r.value.type);
6978
6897
  let n, a = {}, o, i;
6979
6898
  const s = t !== "categorical" && r.value.property === void 0, l = !s, u = z(r.value.stops) === "array" && z(r.value.stops[0]) === "array" && z(r.value.stops[0][0]) === "object", c = Y({
@@ -6988,7 +6907,7 @@ function Zn(r) {
6988
6907
  default: d
6989
6908
  }
6990
6909
  });
6991
- return t === "identity" && s && c.push(new h(r.key, r.value, 'missing required property "property"')), t !== "identity" && !r.value.stops && c.push(new h(r.key, r.value, 'missing required property "stops"')), t === "exponential" && r.valueSpec.expression && !Vn(r.valueSpec) && c.push(new h(r.key, r.value, "exponential functions not supported")), r.styleSpec.$version >= 8 && (l && !mt(r.valueSpec) ? c.push(new h(r.key, r.value, "property functions not supported")) : s && !Bn(r.valueSpec) && c.push(new h(r.key, r.value, "zoom functions not supported"))), (t === "categorical" || u) && r.value.property === void 0 && c.push(new h(r.key, r.value, '"property" property is required')), c;
6910
+ return t === "identity" && s && c.push(new h(r.key, r.value, 'missing required property "property"')), t !== "identity" && !r.value.stops && c.push(new h(r.key, r.value, 'missing required property "stops"')), t === "exponential" && r.valueSpec.expression && !Bn(r.valueSpec) && c.push(new h(r.key, r.value, "exponential functions not supported")), r.styleSpec.$version >= 8 && (l && !mt(r.valueSpec) ? c.push(new h(r.key, r.value, "property functions not supported")) : s && !qn(r.valueSpec) && c.push(new h(r.key, r.value, "zoom functions not supported"))), (t === "categorical" || u) && r.value.property === void 0 && c.push(new h(r.key, r.value, '"property" property is required')), c;
6992
6911
  function p(y) {
6993
6912
  if (t === "identity")
6994
6913
  return [new h(y.key, y.value, 'identity function may not have a "stops" property')];
@@ -7038,7 +6957,7 @@ function Zn(r) {
7038
6957
  style: y.style,
7039
6958
  styleSpec: y.styleSpec
7040
6959
  }, w));
7041
- return Gn(Ie(w[1])) ? v.concat([new h(`${b}[1]`, w[1], "expressions are not allowed in function stops.")]) : v.concat(y.validateSpec({
6960
+ return Un(Ee(w[1])) ? v.concat([new h(`${b}[1]`, w[1], "expressions are not allowed in function stops.")]) : v.concat(y.validateSpec({
7042
6961
  key: `${b}[1]`,
7043
6962
  value: w[1],
7044
6963
  valueSpec: e,
@@ -7073,7 +6992,7 @@ function Zn(r) {
7073
6992
  }
7074
6993
  }
7075
6994
  function Ne(r) {
7076
- const e = (r.expressionContext === "property" ? Ss : Hn)(Ie(r.value), r.valueSpec);
6995
+ const e = (r.expressionContext === "property" ? bs : Vn)(Ee(r.value), r.valueSpec);
7077
6996
  if (e.result === "error")
7078
6997
  return e.value.map((n) => new h(`${r.key}${n.key}`, r.value, n.message));
7079
6998
  const t = e.value.expression || e.value._styleExpression.expression;
@@ -7084,18 +7003,18 @@ function Ne(r) {
7084
7003
  if (r.expressionContext === "filter" && !Ze(t))
7085
7004
  return [new h(r.key, r.value, '"feature-state" data expressions are not supported with filters.')];
7086
7005
  if (r.expressionContext && r.expressionContext.indexOf("cluster") === 0) {
7087
- if (!Et(t, ["zoom", "feature-state"]))
7006
+ if (!Mt(t, ["zoom", "feature-state"]))
7088
7007
  return [new h(r.key, r.value, '"zoom" and "feature-state" expressions are not supported with cluster properties.')];
7089
- if (r.expressionContext === "cluster-initial" && !It(t))
7008
+ if (r.expressionContext === "cluster-initial" && !Et(t))
7090
7009
  return [new h(r.key, r.value, "Feature data expressions are not supported with initial expression part of cluster properties.")];
7091
7010
  }
7092
7011
  return [];
7093
7012
  }
7094
- function Ls(r) {
7013
+ function xs(r) {
7095
7014
  const e = r.value, t = r.key, n = z(e);
7096
7015
  return n !== "boolean" ? [new h(t, e, `boolean expected, ${n} found`)] : [];
7097
7016
  }
7098
- function Cs(r) {
7017
+ function ks(r) {
7099
7018
  const e = r.key, t = r.value, n = z(t);
7100
7019
  return n !== "string" ? [new h(e, t, `color expected, ${n} found`)] : $.parse(String(t)) ? [] : [new h(e, t, `color expected, "${t}" found`)];
7101
7020
  }
@@ -7104,12 +7023,12 @@ function Je(r) {
7104
7023
  return Array.isArray(n.values) ? n.values.indexOf(O(t)) === -1 && a.push(new h(e, t, `expected one of [${n.values.join(", ")}], ${JSON.stringify(t)} found`)) : Object.keys(n.values).indexOf(O(t)) === -1 && a.push(new h(e, t, `expected one of [${Object.keys(n.values).join(", ")}], ${JSON.stringify(t)} found`)), a;
7105
7024
  }
7106
7025
  function Cr(r) {
7107
- return Kn(Ie(r.value)) ? Ne(lt({}, r, {
7026
+ return Gn(Ee(r.value)) ? Ne(lt({}, r, {
7108
7027
  expressionContext: "filter",
7109
7028
  valueSpec: { value: "boolean" }
7110
- })) : Jn(r);
7029
+ })) : Wn(r);
7111
7030
  }
7112
- function Jn(r) {
7031
+ function Wn(r) {
7113
7032
  const e = r.value, t = r.key;
7114
7033
  if (z(e) !== "array")
7115
7034
  return [new h(t, e, `array expected, ${z(e)} found`)];
@@ -7129,9 +7048,11 @@ function Jn(r) {
7129
7048
  case ">":
7130
7049
  case ">=":
7131
7050
  e.length >= 2 && O(e[1]) === "$type" && o.push(new h(t, e, `"$type" cannot be use with operator "${e[0]}"`));
7051
+ /* falls through */
7132
7052
  case "==":
7133
7053
  case "!=":
7134
7054
  e.length !== 3 && o.push(new h(t, e, `filter array for operator "${e[0]}" must have 3 elements`));
7055
+ /* falls through */
7135
7056
  case "in":
7136
7057
  case "!in":
7137
7058
  e.length >= 2 && (a = z(e[1]), a !== "string" && o.push(new h(`${t}[1]`, e[1], `string expected, ${a} found`)));
@@ -7148,7 +7069,7 @@ function Jn(r) {
7148
7069
  case "all":
7149
7070
  case "none":
7150
7071
  for (let i = 1; i < e.length; i++)
7151
- o = o.concat(Jn({
7072
+ o = o.concat(Wn({
7152
7073
  key: `${t}[${i}]`,
7153
7074
  value: e[i],
7154
7075
  style: r.style,
@@ -7162,7 +7083,7 @@ function Jn(r) {
7162
7083
  }
7163
7084
  return o;
7164
7085
  }
7165
- function Yn(r, e) {
7086
+ function Zn(r, e) {
7166
7087
  const t = r.key, n = r.validateSpec, a = r.style, o = r.styleSpec, i = r.value, s = r.objectKey, l = o[`${e}_${r.layerType}`];
7167
7088
  if (!l)
7168
7089
  return [];
@@ -7183,7 +7104,7 @@ function Yn(r, e) {
7183
7104
  return [new h(t, i, `"${s}" does not support interpolation syntax
7184
7105
  Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(p[1])} }\`.`)];
7185
7106
  const m = [];
7186
- return r.layerType === "symbol" && (s === "text-field" && a && !a.glyphs && m.push(new h(t, i, 'use of "text-field" requires a style "glyphs" property')), s === "text-font" && xr(Ie(i)) && O(i.type) === "identity" && m.push(new h(t, i, '"text-font" does not support identity functions'))), m.concat(n({
7107
+ return r.layerType === "symbol" && (s === "text-field" && a && !a.glyphs && m.push(new h(t, i, 'use of "text-field" requires a style "glyphs" property')), s === "text-font" && xr(Ee(i)) && O(i.type) === "identity" && m.push(new h(t, i, '"text-font" does not support identity functions'))), m.concat(n({
7187
7108
  key: r.key,
7188
7109
  value: i,
7189
7110
  valueSpec: c,
@@ -7194,13 +7115,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
7194
7115
  propertyKey: s
7195
7116
  }));
7196
7117
  }
7197
- function Xn(r) {
7198
- return Yn(r, "paint");
7118
+ function Jn(r) {
7119
+ return Zn(r, "paint");
7199
7120
  }
7200
- function Qn(r) {
7201
- return Yn(r, "layout");
7121
+ function Yn(r) {
7122
+ return Zn(r, "layout");
7202
7123
  }
7203
- function ea(r) {
7124
+ function Xn(r) {
7204
7125
  let e = [];
7205
7126
  const t = r.value, n = r.key, a = r.style, o = r.styleSpec;
7206
7127
  !t.type && !t.ref && e.push(new h(n, t, 'either "type" or "ref" is required'));
@@ -7264,7 +7185,7 @@ function ea(r) {
7264
7185
  validateSpec: l.validateSpec,
7265
7186
  objectElementValidators: {
7266
7187
  "*"(u) {
7267
- return Qn(lt({ layerType: i }, u));
7188
+ return Yn(lt({ layerType: i }, u));
7268
7189
  }
7269
7190
  }
7270
7191
  });
@@ -7279,7 +7200,7 @@ function ea(r) {
7279
7200
  validateSpec: l.validateSpec,
7280
7201
  objectElementValidators: {
7281
7202
  "*"(u) {
7282
- return Xn(lt({ layerType: i }, u));
7203
+ return Jn(lt({ layerType: i }, u));
7283
7204
  }
7284
7205
  }
7285
7206
  });
@@ -7287,11 +7208,11 @@ function ea(r) {
7287
7208
  }
7288
7209
  })), e;
7289
7210
  }
7290
- function Ee(r) {
7211
+ function Me(r) {
7291
7212
  const e = r.value, t = r.key, n = z(e);
7292
7213
  return n !== "string" ? [new h(t, e, `string expected, ${n} found`)] : [];
7293
7214
  }
7294
- function As(r) {
7215
+ function Ls(r) {
7295
7216
  var e;
7296
7217
  const t = (e = r.sourceName) !== null && e !== void 0 ? e : "", n = r.value, a = r.styleSpec, o = a.source_raster_dem, i = r.style;
7297
7218
  let s = [];
@@ -7312,10 +7233,10 @@ function As(r) {
7312
7233
  })) : s.push(new h(f, n[f], `unknown property "${f}"`));
7313
7234
  return s;
7314
7235
  }
7315
- const on = {
7316
- promoteId: Ts
7236
+ const an = {
7237
+ promoteId: Cs
7317
7238
  };
7318
- function ta(r) {
7239
+ function Qn(r) {
7319
7240
  const e = r.value, t = r.key, n = r.styleSpec, a = r.style, o = r.validateSpec;
7320
7241
  if (!e.type)
7321
7242
  return [new h(t, e, '"type" is required')];
@@ -7330,11 +7251,11 @@ function ta(r) {
7330
7251
  valueSpec: n[`source_${i.replace("-", "_")}`],
7331
7252
  style: r.style,
7332
7253
  styleSpec: n,
7333
- objectElementValidators: on,
7254
+ objectElementValidators: an,
7334
7255
  validateSpec: o
7335
7256
  }), s;
7336
7257
  case "raster-dem":
7337
- return s = As({
7258
+ return s = Ls({
7338
7259
  sourceName: t,
7339
7260
  value: e,
7340
7261
  style: r.style,
@@ -7349,7 +7270,7 @@ function ta(r) {
7349
7270
  style: a,
7350
7271
  styleSpec: n,
7351
7272
  validateSpec: o,
7352
- objectElementValidators: on
7273
+ objectElementValidators: an
7353
7274
  }), e.cluster)
7354
7275
  for (const l in e.clusterProperties) {
7355
7276
  const [u, c] = e.clusterProperties[l], p = typeof u == "string" ? [u, ["accumulated"], ["get", l]] : u;
@@ -7397,17 +7318,17 @@ function ta(r) {
7397
7318
  });
7398
7319
  }
7399
7320
  }
7400
- function Ts({ key: r, value: e }) {
7321
+ function Cs({ key: r, value: e }) {
7401
7322
  if (z(e) === "string")
7402
- return Ee({ key: r, value: e });
7323
+ return Me({ key: r, value: e });
7403
7324
  {
7404
7325
  const t = [];
7405
7326
  for (const n in e)
7406
- t.push(...Ee({ key: `${r}.${n}`, value: e[n] }));
7327
+ t.push(...Me({ key: `${r}.${n}`, value: e[n] }));
7407
7328
  return t;
7408
7329
  }
7409
7330
  }
7410
- function ra(r) {
7331
+ function ea(r) {
7411
7332
  const e = r.value, t = r.styleSpec, n = t.light, a = r.style;
7412
7333
  let o = [];
7413
7334
  const i = z(e);
@@ -7435,7 +7356,7 @@ function ra(r) {
7435
7356
  }
7436
7357
  return o;
7437
7358
  }
7438
- function na(r) {
7359
+ function ta(r) {
7439
7360
  const e = r.value, t = r.styleSpec, n = t.sky, a = r.style, o = z(e);
7440
7361
  if (e === void 0)
7441
7362
  return [];
@@ -7452,7 +7373,7 @@ function na(r) {
7452
7373
  })) : i = i.concat([new h(s, e[s], `unknown property "${s}"`)]);
7453
7374
  return i;
7454
7375
  }
7455
- function aa(r) {
7376
+ function ra(r) {
7456
7377
  const e = r.value, t = r.styleSpec, n = t.terrain, a = r.style;
7457
7378
  let o = [];
7458
7379
  const i = z(e);
@@ -7471,13 +7392,13 @@ function aa(r) {
7471
7392
  })) : o = o.concat([new h(s, e[s], `unknown property "${s}"`)]);
7472
7393
  return o;
7473
7394
  }
7474
- function Ms(r) {
7475
- return Ee(r).length === 0 ? [] : Ne(r);
7395
+ function As(r) {
7396
+ return Me(r).length === 0 ? [] : Ne(r);
7476
7397
  }
7477
- function Is(r) {
7478
- return Ee(r).length === 0 ? [] : Ne(r);
7398
+ function Ts(r) {
7399
+ return Me(r).length === 0 ? [] : Ne(r);
7479
7400
  }
7480
- function Es(r) {
7401
+ function Is(r) {
7481
7402
  const e = r.key, t = r.value;
7482
7403
  if (z(t) === "array") {
7483
7404
  if (t.length < 1 || t.length > 4)
@@ -7501,7 +7422,7 @@ function Es(r) {
7501
7422
  valueSpec: {}
7502
7423
  });
7503
7424
  }
7504
- function zs(r) {
7425
+ function Es(r) {
7505
7426
  const e = r.key, t = r.value, n = z(t), a = r.styleSpec;
7506
7427
  if (n !== "array" || t.length < 1 || t.length % 2 !== 0)
7507
7428
  return [new h(e, t, "variableAnchorOffsetCollection requires a non-empty array of even length")];
@@ -7524,7 +7445,7 @@ function zs(r) {
7524
7445
  }));
7525
7446
  return o;
7526
7447
  }
7527
- function oa(r) {
7448
+ function na(r) {
7528
7449
  let e = [];
7529
7450
  const t = r.value, n = r.key;
7530
7451
  if (Array.isArray(t)) {
@@ -7550,12 +7471,12 @@ function oa(r) {
7550
7471
  }
7551
7472
  return e;
7552
7473
  } else
7553
- return Ee({
7474
+ return Me({
7554
7475
  key: n,
7555
7476
  value: t
7556
7477
  });
7557
7478
  }
7558
- function _s(r) {
7479
+ function Ms(r) {
7559
7480
  const e = r.value, t = r.styleSpec, n = t.projection, a = r.style, o = z(e);
7560
7481
  if (e === void 0)
7561
7482
  return [];
@@ -7572,106 +7493,106 @@ function _s(r) {
7572
7493
  })) : i = i.concat([new h(s, e[s], `unknown property "${s}"`)]);
7573
7494
  return i;
7574
7495
  }
7575
- function Ps(r) {
7496
+ function zs(r) {
7576
7497
  const e = r.key;
7577
7498
  let t = r.value;
7578
7499
  t = t instanceof String ? t.valueOf() : t;
7579
7500
  const n = z(t);
7580
- return n === "array" && !$s(t) && !Rs(t) ? [new h(e, t, `projection expected, invalid array ${JSON.stringify(t)} found`)] : ["array", "string"].includes(n) ? [] : [new h(e, t, `projection expected, invalid type "${n}" found`)];
7501
+ return n === "array" && !Ps(t) && !_s(t) ? [new h(e, t, `projection expected, invalid array ${JSON.stringify(t)} found`)] : ["array", "string"].includes(n) ? [] : [new h(e, t, `projection expected, invalid type "${n}" found`)];
7581
7502
  }
7582
- function Rs(r) {
7503
+ function _s(r) {
7583
7504
  return !!["interpolate", "step", "literal"].includes(r[0]);
7584
7505
  }
7585
- function $s(r) {
7506
+ function Ps(r) {
7586
7507
  return Array.isArray(r) && r.length === 3 && typeof r[0] == "string" && typeof r[1] == "string" && typeof r[2] == "number";
7587
7508
  }
7588
- const sn = {
7509
+ const on = {
7589
7510
  "*"() {
7590
7511
  return [];
7591
7512
  },
7592
7513
  array: kr,
7593
- boolean: Ls,
7514
+ boolean: xs,
7594
7515
  number: Lr,
7595
- color: Cs,
7596
- constants: Wn,
7516
+ color: ks,
7517
+ constants: Hn,
7597
7518
  enum: Je,
7598
7519
  filter: Cr,
7599
- function: Zn,
7600
- layer: ea,
7520
+ function: Kn,
7521
+ layer: Xn,
7601
7522
  object: Y,
7602
- source: ta,
7603
- light: ra,
7604
- sky: na,
7605
- terrain: aa,
7606
- projection: _s,
7607
- projectionDefinition: Ps,
7608
- string: Ee,
7609
- formatted: Ms,
7610
- resolvedImage: Is,
7611
- padding: Es,
7612
- variableAnchorOffsetCollection: zs,
7613
- sprite: oa
7523
+ source: Qn,
7524
+ light: ea,
7525
+ sky: ta,
7526
+ terrain: ra,
7527
+ projection: Ms,
7528
+ projectionDefinition: zs,
7529
+ string: Me,
7530
+ formatted: As,
7531
+ resolvedImage: Ts,
7532
+ padding: Is,
7533
+ variableAnchorOffsetCollection: Es,
7534
+ sprite: na
7614
7535
  };
7615
- function Be(r) {
7536
+ function Ue(r) {
7616
7537
  const e = r.value, t = r.valueSpec, n = r.styleSpec;
7617
- return r.validateSpec = Be, t.expression && xr(O(e)) ? Zn(r) : t.expression && Gn(Ie(e)) ? Ne(r) : t.type && sn[t.type] ? sn[t.type](r) : Y(lt({}, r, {
7538
+ return r.validateSpec = Ue, t.expression && xr(O(e)) ? Kn(r) : t.expression && Un(Ee(e)) ? Ne(r) : t.type && on[t.type] ? on[t.type](r) : Y(lt({}, r, {
7618
7539
  valueSpec: t.type ? n[t.type] : t
7619
7540
  }));
7620
7541
  }
7621
- function ia(r) {
7622
- const e = r.value, t = r.key, n = Ee(r);
7542
+ function aa(r) {
7543
+ const e = r.value, t = r.key, n = Me(r);
7623
7544
  return n.length || (e.indexOf("{fontstack}") === -1 && n.push(new h(t, e, '"glyphs" url must include a "{fontstack}" token')), e.indexOf("{range}") === -1 && n.push(new h(t, e, '"glyphs" url must include a "{range}" token'))), n;
7624
7545
  }
7625
- function X(r, e = di) {
7546
+ function X(r, e = pi) {
7626
7547
  let t = [];
7627
- return t = t.concat(Be({
7548
+ return t = t.concat(Ue({
7628
7549
  key: "",
7629
7550
  value: r,
7630
7551
  valueSpec: e.$root,
7631
7552
  styleSpec: e,
7632
7553
  style: r,
7633
- validateSpec: Be,
7554
+ validateSpec: Ue,
7634
7555
  objectElementValidators: {
7635
- glyphs: ia,
7556
+ glyphs: aa,
7636
7557
  "*"() {
7637
7558
  return [];
7638
7559
  }
7639
7560
  }
7640
- })), r.constants && (t = t.concat(Wn({
7561
+ })), r.constants && (t = t.concat(Hn({
7641
7562
  key: "constants",
7642
7563
  value: r.constants,
7643
7564
  style: r,
7644
7565
  styleSpec: e,
7645
- validateSpec: Be
7646
- }))), sa(t);
7647
- }
7648
- X.source = ce(ue(ta));
7649
- X.sprite = ce(ue(oa));
7650
- X.glyphs = ce(ue(ia));
7651
- X.light = ce(ue(ra));
7652
- X.sky = ce(ue(na));
7653
- X.terrain = ce(ue(aa));
7654
- X.layer = ce(ue(ea));
7566
+ validateSpec: Ue
7567
+ }))), oa(t);
7568
+ }
7569
+ X.source = ce(ue(Qn));
7570
+ X.sprite = ce(ue(na));
7571
+ X.glyphs = ce(ue(aa));
7572
+ X.light = ce(ue(ea));
7573
+ X.sky = ce(ue(ta));
7574
+ X.terrain = ce(ue(ra));
7575
+ X.layer = ce(ue(Xn));
7655
7576
  X.filter = ce(ue(Cr));
7656
- X.paintProperty = ce(ue(Xn));
7657
- X.layoutProperty = ce(ue(Qn));
7577
+ X.paintProperty = ce(ue(Jn));
7578
+ X.layoutProperty = ce(ue(Yn));
7658
7579
  function ue(r) {
7659
7580
  return function(e) {
7660
7581
  return r({
7661
7582
  ...e,
7662
- validateSpec: Be
7583
+ validateSpec: Ue
7663
7584
  });
7664
7585
  };
7665
7586
  }
7666
- function sa(r) {
7587
+ function oa(r) {
7667
7588
  return [].concat(r).sort((e, t) => e.line - t.line);
7668
7589
  }
7669
7590
  function ce(r) {
7670
7591
  return function(...e) {
7671
- return sa(r.apply(this, e));
7592
+ return oa(r.apply(this, e));
7672
7593
  };
7673
7594
  }
7674
- function ln(r) {
7595
+ function sn(r) {
7675
7596
  if (!r)
7676
7597
  return {
7677
7598
  style: qe[$t[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),
@@ -7680,7 +7601,7 @@ function ln(r) {
7680
7601
  isFallback: !0
7681
7602
  };
7682
7603
  if (typeof r == "string") {
7683
- const t = Ns(r);
7604
+ const t = $s(r);
7684
7605
  return t.isValidStyle ? {
7685
7606
  style: t.styleObject,
7686
7607
  requiresUrlMonitoring: !1,
@@ -7690,9 +7611,9 @@ function ln(r) {
7690
7611
  requiresUrlMonitoring: !1,
7691
7612
  // default styles don't require URL monitoring
7692
7613
  isFallback: !0
7693
- } : r.startsWith("http") ? { style: r, requiresUrlMonitoring: !0, isFallback: !1 } : r.toLowerCase().includes(".json") ? { style: js(r), requiresUrlMonitoring: !0, isFallback: !1 } : { style: _a(r), requiresUrlMonitoring: !0, isFallback: !1 };
7614
+ } : r.startsWith("http") ? { style: r, requiresUrlMonitoring: !0, isFallback: !1 } : r.toLowerCase().includes(".json") ? { style: Rs(r), requiresUrlMonitoring: !0, isFallback: !1 } : { style: Ma(r), requiresUrlMonitoring: !0, isFallback: !1 };
7694
7615
  }
7695
- return r instanceof Pa ? { style: r.getExpandedStyleURL(), requiresUrlMonitoring: !1, isFallback: !1 } : r instanceof Ra ? {
7616
+ return r instanceof za ? { style: r.getExpandedStyleURL(), requiresUrlMonitoring: !1, isFallback: !1 } : r instanceof _a ? {
7696
7617
  style: r.getDefaultVariant().getExpandedStyleURL(),
7697
7618
  requiresUrlMonitoring: !1,
7698
7619
  isFallback: !1
@@ -7707,14 +7628,14 @@ function ln(r) {
7707
7628
  isFallback: !0
7708
7629
  };
7709
7630
  }
7710
- function js(r) {
7631
+ function Rs(r) {
7711
7632
  try {
7712
7633
  return new URL(r).href;
7713
7634
  } catch {
7714
7635
  }
7715
7636
  return new URL(r, location.origin).href;
7716
7637
  }
7717
- function Ns(r) {
7638
+ function $s(r) {
7718
7639
  try {
7719
7640
  const e = JSON.parse(r), t = X(e);
7720
7641
  return {
@@ -7730,12 +7651,12 @@ function Ns(r) {
7730
7651
  };
7731
7652
  }
7732
7653
  }
7733
- class Fs {
7654
+ class js {
7734
7655
  constructor() {
7735
7656
  L(this, "_map");
7736
7657
  L(this, "_container");
7737
7658
  L(this, "_terrainButton");
7738
- uo(["_toggleTerrain", "_updateTerrainIcon"], this);
7659
+ so(["_toggleTerrain", "_updateTerrainIcon"], this);
7739
7660
  }
7740
7661
  onAdd(e) {
7741
7662
  return this._map = e, this._container = pe("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._terrainButton = pe("button", "maplibregl-ctrl-terrain", this._container), pe("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;
@@ -7750,7 +7671,7 @@ class Fs {
7750
7671
  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"));
7751
7672
  }
7752
7673
  }
7753
- class Os extends xo {
7674
+ class Ns extends wo {
7754
7675
  constructor(t = {}) {
7755
7676
  super({
7756
7677
  showCompass: t.showCompass ?? !0,
@@ -7779,11 +7700,11 @@ class Os extends xo {
7779
7700
  return a.clickFunction = n, a;
7780
7701
  }
7781
7702
  }
7782
- const un = S.Marker, cn = S.LngLat, Ds = S.LngLatBounds;
7783
- class qs extends ko {
7703
+ const ln = S.Marker, un = S.LngLat, Fs = S.LngLatBounds;
7704
+ class Os extends So {
7784
7705
  constructor() {
7785
7706
  super(...arguments);
7786
- L(this, "lastUpdatedCenter", new cn(0, 0));
7707
+ L(this, "lastUpdatedCenter", new un(0, 0));
7787
7708
  /**
7788
7709
  * Update the camera location to center on the current position
7789
7710
  *
@@ -7792,12 +7713,12 @@ class qs extends ko {
7792
7713
  */
7793
7714
  L(this, "_updateCamera", (t) => {
7794
7715
  var c, p;
7795
- const n = new cn(t.coords.longitude, t.coords.latitude), a = t.coords.accuracy, i = {
7716
+ const n = new un(t.coords.longitude, t.coords.latitude), a = t.coords.accuracy, i = {
7796
7717
  bearing: this._map.getBearing(),
7797
7718
  ...this.options.fitBoundsOptions,
7798
7719
  linear: !0
7799
7720
  }, s = this._map.getZoom();
7800
- s > (((p = (c = this.options) == null ? void 0 : c.fitBoundsOptions) == null ? void 0 : p.maxZoom) ?? 30) && (i.zoom = s), this._map.fitBounds(Ds.fromLngLat(n, a), i, {
7721
+ s > (((p = (c = this.options) == null ? void 0 : c.fitBoundsOptions) == null ? void 0 : p.maxZoom) ?? 30) && (i.zoom = s), this._map.fitBounds(Fs.fromLngLat(n, a), i, {
7801
7722
  geolocateSource: !0
7802
7723
  // tag this camera change so it won't cause the control to change to background state
7803
7724
  });
@@ -7818,7 +7739,7 @@ class qs extends ko {
7818
7739
  const n = this._map._getUIString("GeolocateControl.FindMyLocation");
7819
7740
  this._geolocateButton.disabled = !1, this._geolocateButton.title = n, this._geolocateButton.setAttribute("aria-label", n);
7820
7741
  }
7821
- this.options.trackUserLocation && (this._geolocateButton.setAttribute("aria-pressed", "false"), this._watchState = "OFF"), this.options.showUserLocation && (this._dotElement = pe("div", "maplibregl-user-location-dot"), this._userLocationDotMarker = new un({ element: this._dotElement }), this._circleElement = pe("div", "maplibregl-user-location-accuracy-circle"), this._accuracyCircleMarker = new un({
7742
+ this.options.trackUserLocation && (this._geolocateButton.setAttribute("aria-pressed", "false"), this._watchState = "OFF"), this.options.showUserLocation && (this._dotElement = pe("div", "maplibregl-user-location-dot"), this._userLocationDotMarker = new ln({ element: this._dotElement }), this._circleElement = pe("div", "maplibregl-user-location-accuracy-circle"), this._accuracyCircleMarker = new ln({
7822
7743
  element: this._circleElement,
7823
7744
  pitchAlignment: "map"
7824
7745
  }), 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) => {
@@ -7863,10 +7784,10 @@ class qs extends ko {
7863
7784
  }
7864
7785
  }
7865
7786
  }
7866
- var H, Q, me, he, K, Ye, U, la, Z, ua;
7787
+ var H, Q, me, he, K, Ye, B, ia, Z, sa;
7867
7788
  class Gt {
7868
7789
  constructor(e, t) {
7869
- ye(this, U);
7790
+ ye(this, B);
7870
7791
  ye(this, H);
7871
7792
  L(this, "map");
7872
7793
  ye(this, Q);
@@ -7897,51 +7818,51 @@ class Gt {
7897
7818
  height: "300px",
7898
7819
  ...e.containerStyle ?? {}
7899
7820
  }
7900
- }), e.lockZoom !== void 0 && (I(this, H).minZoom = e.lockZoom, I(this, H).maxZoom = e.lockZoom);
7821
+ }), e.lockZoom !== void 0 && (E(this, H).minZoom = e.lockZoom, E(this, H).maxZoom = e.lockZoom);
7901
7822
  }
7902
7823
  setStyle(e, t) {
7903
- I(this, K) || this.map.setStyle(e, t), G(this, U, Z).call(this);
7824
+ E(this, K) || this.map.setStyle(e, t), G(this, B, Z).call(this);
7904
7825
  }
7905
7826
  addLayer(e, t) {
7906
- return I(this, K) || this.map.addLayer(e, t), G(this, U, Z).call(this), this.map;
7827
+ return E(this, K) || this.map.addLayer(e, t), G(this, B, Z).call(this), this.map;
7907
7828
  }
7908
7829
  moveLayer(e, t) {
7909
- return I(this, K) || this.map.moveLayer(e, t), G(this, U, Z).call(this), this.map;
7830
+ return E(this, K) || this.map.moveLayer(e, t), G(this, B, Z).call(this), this.map;
7910
7831
  }
7911
7832
  removeLayer(e) {
7912
- return I(this, K) || this.map.removeLayer(e), G(this, U, Z).call(this), this;
7833
+ return E(this, K) || this.map.removeLayer(e), G(this, B, Z).call(this), this;
7913
7834
  }
7914
7835
  setLayerZoomRange(e, t, n) {
7915
- return I(this, K) || this.map.setLayerZoomRange(e, t, n), G(this, U, Z).call(this), this;
7836
+ return E(this, K) || this.map.setLayerZoomRange(e, t, n), G(this, B, Z).call(this), this;
7916
7837
  }
7917
7838
  setFilter(e, t, n) {
7918
- return I(this, K) || this.map.setFilter(e, t, n), G(this, U, Z).call(this), this;
7839
+ return E(this, K) || this.map.setFilter(e, t, n), G(this, B, Z).call(this), this;
7919
7840
  }
7920
7841
  setPaintProperty(e, t, n, a) {
7921
- return I(this, K) || this.map.setPaintProperty(e, t, n, a), G(this, U, Z).call(this), this;
7842
+ return E(this, K) || this.map.setPaintProperty(e, t, n, a), G(this, B, Z).call(this), this;
7922
7843
  }
7923
7844
  setLayoutProperty(e, t, n, a) {
7924
- return I(this, K) || this.map.setLayoutProperty(e, t, n, a), G(this, U, Z).call(this), this;
7845
+ return E(this, K) || this.map.setLayoutProperty(e, t, n, a), G(this, B, Z).call(this), this;
7925
7846
  }
7926
7847
  setGlyphs(e, t) {
7927
- return I(this, K) || this.map.setGlyphs(e, t), G(this, U, Z).call(this), this;
7848
+ return E(this, K) || this.map.setGlyphs(e, t), G(this, B, Z).call(this), this;
7928
7849
  }
7929
7850
  onAdd(e) {
7930
7851
  Se(this, Q, e), Se(this, me, pe("div", "maplibregl-ctrl maplibregl-ctrl-group"));
7931
- for (const [t, n] of Object.entries(I(this, H).containerStyle))
7932
- I(this, me).style.setProperty(t, n);
7933
- return I(this, H).container = I(this, me), I(this, H).zoom = e.getZoom() + I(this, H).zoomAdjust, this.map = new Gs(I(this, H)), this.map.once("style.load", () => {
7852
+ for (const [t, n] of Object.entries(E(this, H).containerStyle))
7853
+ E(this, me).style.setProperty(t, n);
7854
+ return E(this, H).container = E(this, me), E(this, H).zoom = e.getZoom() + E(this, H).zoomAdjust, this.map = new Us(E(this, H)), this.map.once("style.load", () => {
7934
7855
  this.map.resize();
7935
7856
  }), this.map.once("load", () => {
7936
- G(this, U, la).call(this, I(this, H).parentRect), Se(this, Ye, G(this, U, ua).call(this));
7937
- }), I(this, me);
7857
+ G(this, B, ia).call(this, E(this, H).parentRect), Se(this, Ye, G(this, B, sa).call(this));
7858
+ }), E(this, me);
7938
7859
  }
7939
7860
  onRemove() {
7940
7861
  var e;
7941
- (e = I(this, Ye)) == null || e.call(this), ar(I(this, me));
7862
+ (e = E(this, Ye)) == null || e.call(this), ar(E(this, me));
7942
7863
  }
7943
7864
  }
7944
- H = new WeakMap(), Q = new WeakMap(), me = new WeakMap(), he = new WeakMap(), K = new WeakMap(), Ye = new WeakMap(), U = new WeakSet(), la = function(e) {
7865
+ H = new WeakMap(), Q = new WeakMap(), me = new WeakMap(), he = new WeakMap(), K = new WeakMap(), Ye = new WeakMap(), B = new WeakSet(), ia = function(e) {
7945
7866
  e === void 0 || e.linePaint === void 0 && e.fillPaint === void 0 || (Se(this, he, {
7946
7867
  type: "Feature",
7947
7868
  properties: {
@@ -7953,7 +7874,7 @@ H = new WeakMap(), Q = new WeakMap(), me = new WeakMap(), he = new WeakMap(), K
7953
7874
  }
7954
7875
  }), this.map.addSource("parentRect", {
7955
7876
  type: "geojson",
7956
- data: I(this, he)
7877
+ data: E(this, he)
7957
7878
  }), (e.lineLayout !== void 0 || e.linePaint !== void 0) && this.map.addLayer({
7958
7879
  id: "parentRectOutline",
7959
7880
  type: "line",
@@ -7977,37 +7898,37 @@ H = new WeakMap(), Q = new WeakMap(), me = new WeakMap(), he = new WeakMap(), K
7977
7898
  "fill-opacity": 0.135,
7978
7899
  ...e.fillPaint
7979
7900
  }
7980
- }), G(this, U, Z).call(this));
7901
+ }), G(this, B, Z).call(this));
7981
7902
  }, Z = function() {
7982
- if (I(this, he) === void 0) return;
7983
- const { devicePixelRatio: e } = window, t = I(this, Q).getCanvas(), n = t.width / e, a = t.height / e, o = I(this, Q).unproject.bind(I(this, Q)), i = o([0, 0]), s = o([n, 0]), l = o([0, a]), u = o([n, a]);
7984
- I(this, he).geometry.coordinates = [
7903
+ if (E(this, he) === void 0) return;
7904
+ const { devicePixelRatio: e } = window, t = E(this, Q).getCanvas(), n = t.width / e, a = t.height / e, o = E(this, Q).unproject.bind(E(this, Q)), i = o([0, 0]), s = o([n, 0]), l = o([0, a]), u = o([n, a]);
7905
+ E(this, he).geometry.coordinates = [
7985
7906
  [l.toArray(), u.toArray(), s.toArray(), i.toArray(), l.toArray()]
7986
- ], this.map.getSource("parentRect").setData(I(this, he));
7987
- }, ua = function() {
7988
- const { pitchAdjust: e } = I(this, H), t = () => {
7907
+ ], this.map.getSource("parentRect").setData(E(this, he));
7908
+ }, sa = function() {
7909
+ const { pitchAdjust: e } = E(this, H), t = () => {
7989
7910
  i("parent");
7990
7911
  }, n = () => {
7991
7912
  i("minimap");
7992
7913
  }, a = () => {
7993
- I(this, Q).on("move", t), this.map.on("move", n);
7914
+ E(this, Q).on("move", t), this.map.on("move", n);
7994
7915
  }, o = () => {
7995
- I(this, Q).off("move", t), this.map.off("move", n);
7916
+ E(this, Q).off("move", t), this.map.off("move", n);
7996
7917
  }, i = (s) => {
7997
7918
  o();
7998
- const l = s === "parent" ? I(this, Q) : this.map, u = s === "parent" ? this.map : I(this, Q), c = l.getCenter(), p = l.getZoom() + I(this, H).zoomAdjust * (s === "parent" ? 1 : -1), m = l.getBearing(), f = l.getPitch();
7919
+ const l = s === "parent" ? E(this, Q) : this.map, u = s === "parent" ? this.map : E(this, Q), c = l.getCenter(), p = l.getZoom() + E(this, H).zoomAdjust * (s === "parent" ? 1 : -1), m = l.getBearing(), f = l.getPitch();
7999
7920
  u.jumpTo({
8000
7921
  center: c,
8001
7922
  zoom: p,
8002
7923
  bearing: m,
8003
7924
  pitch: e ? f : 0
8004
- }), G(this, U, Z).call(this), a();
7925
+ }), G(this, B, Z).call(this), a();
8005
7926
  };
8006
7927
  return a(), () => {
8007
7928
  o();
8008
7929
  };
8009
7930
  };
8010
- class Us {
7931
+ class Ds {
8011
7932
  constructor() {
8012
7933
  L(this, "map");
8013
7934
  L(this, "container");
@@ -8026,7 +7947,7 @@ class Us {
8026
7947
  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");
8027
7948
  }
8028
7949
  }
8029
- class Bs {
7950
+ class qs {
8030
7951
  /**
8031
7952
  *
8032
7953
  * @param map : a Map instance
@@ -8059,17 +7980,17 @@ class Bs {
8059
7980
  }
8060
7981
  preparePayload() {
8061
7982
  const e = new URL(V.telemetryURL);
8062
- return e.searchParams.append("sdk", Sn.version), e.searchParams.append("key", F.apiKey), e.searchParams.append("mtsid", nr), e.searchParams.append("session", F.session ? "1" : "0"), e.searchParams.append("caching", F.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;
7983
+ return e.searchParams.append("sdk", wn.version), e.searchParams.append("key", F.apiKey), e.searchParams.append("mtsid", nr), e.searchParams.append("session", F.session ? "1" : "0"), e.searchParams.append("caching", F.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;
8063
7984
  }
8064
7985
  }
8065
- const Vs = {
7986
+ const Bs = {
8066
7987
  POINT: "POINT",
8067
7988
  COUNTRY: "COUNTRY"
8068
7989
  };
8069
- class Gs extends S.Map {
7990
+ class Us extends S.Map {
8070
7991
  constructor(t) {
8071
- fo(t.container), t.apiKey && (F.apiKey = t.apiKey);
8072
- const { style: n, requiresUrlMonitoring: a, isFallback: o } = ln(t.style);
7992
+ co(t.container), t.apiKey && (F.apiKey = t.apiKey);
7993
+ const { style: n, requiresUrlMonitoring: a, isFallback: o } = sn(t.style);
8073
7994
  o && console.warn(
8074
7995
  "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."
8075
7996
  ), F.apiKey || console.warn("MapTiler Cloud API key is not set. Visit https://maptiler.com and try Cloud for free!");
@@ -8126,19 +8047,19 @@ class Gs extends S.Map {
8126
8047
  return u();
8127
8048
  }), F.caching && !Wt && console.warn(
8128
8049
  "The cache API is only available in secure contexts. More info at https://developer.mozilla.org/en-US/docs/Web/API/Cache"
8129
- ), F.caching && Wt && so(), typeof t.language > "u")
8050
+ ), F.caching && Wt && oo(), typeof t.language > "u")
8130
8051
  this.primaryLanguage = F.primaryLanguage;
8131
8052
  else {
8132
- const d = zr(t.language, E);
8053
+ const d = zr(t.language, M);
8133
8054
  this.primaryLanguage = d ?? F.primaryLanguage;
8134
8055
  }
8135
- this.forceLanguageUpdate = !(this.primaryLanguage === E.STYLE || this.primaryLanguage === E.STYLE_LOCK), this.languageAlwaysBeenStyle = this.primaryLanguage === E.STYLE, this.terrainExaggeration = t.terrainExaggeration ?? this.terrainExaggeration, this.curentProjection = t.projection, this.on("styledata", () => {
8056
+ this.forceLanguageUpdate = !(this.primaryLanguage === M.STYLE || this.primaryLanguage === M.STYLE_LOCK), this.languageAlwaysBeenStyle = this.primaryLanguage === M.STYLE, this.terrainExaggeration = t.terrainExaggeration ?? this.terrainExaggeration, this.curentProjection = t.projection, this.on("styledata", () => {
8136
8057
  this.curentProjection === "mercator" ? this.setProjection({ type: "mercator" }) : this.curentProjection === "globe" && this.setProjection({ type: "globe" });
8137
8058
  }), this.once("styledata", async () => {
8138
8059
  if (!t.geolocate || t.center || t.hash && i)
8139
8060
  return;
8140
8061
  try {
8141
- if (t.geolocate === Vs.COUNTRY) {
8062
+ if (t.geolocate === Bs.COUNTRY) {
8142
8063
  await this.fitToIpBounds();
8143
8064
  return;
8144
8065
  }
@@ -8198,20 +8119,20 @@ class Gs extends S.Map {
8198
8119
  this.addControl(new Or({ logoURL: y }), t.logoPosition);
8199
8120
  } else t.maptilerLogo && this.addControl(new Or(), t.logoPosition);
8200
8121
  if (t.scaleControl) {
8201
- const y = t.scaleControl === !0 || t.scaleControl === void 0 ? "bottom-right" : t.scaleControl, v = new Co({ unit: F.unit });
8122
+ const y = t.scaleControl === !0 || t.scaleControl === void 0 ? "bottom-right" : t.scaleControl, v = new ko({ unit: F.unit });
8202
8123
  this.addControl(v, y), F.on("unit", (w) => {
8203
8124
  v.setUnit(w);
8204
8125
  });
8205
8126
  }
8206
8127
  if (t.navigationControl !== !1) {
8207
8128
  const y = t.navigationControl === !0 || t.navigationControl === void 0 ? "top-right" : t.navigationControl;
8208
- this.addControl(new Os(), y);
8129
+ this.addControl(new Ns(), y);
8209
8130
  }
8210
8131
  if (t.geolocateControl !== !1) {
8211
8132
  const y = t.geolocateControl === !0 || t.geolocateControl === void 0 ? "top-right" : t.geolocateControl;
8212
8133
  this.addControl(
8213
8134
  // new maplibregl.GeolocateControl({
8214
- new qs({
8135
+ new Os({
8215
8136
  positionOptions: {
8216
8137
  enableHighAccuracy: !0,
8217
8138
  maximumAge: 0,
@@ -8229,15 +8150,15 @@ class Gs extends S.Map {
8229
8150
  }
8230
8151
  if (t.terrainControl) {
8231
8152
  const y = t.terrainControl === !0 || t.terrainControl === void 0 ? "top-right" : t.terrainControl;
8232
- this.addControl(new Fs(), y);
8153
+ this.addControl(new js(), y);
8233
8154
  }
8234
8155
  if (t.projectionControl) {
8235
8156
  const y = t.projectionControl === !0 || t.projectionControl === void 0 ? "top-right" : t.projectionControl;
8236
- this.addControl(new Us(), y);
8157
+ this.addControl(new Ds(), y);
8237
8158
  }
8238
8159
  if (t.fullscreenControl) {
8239
8160
  const y = t.fullscreenControl === !0 || t.fullscreenControl === void 0 ? "top-right" : t.fullscreenControl;
8240
- this.addControl(new Ao({}), y);
8161
+ this.addControl(new Lo({}), y);
8241
8162
  }
8242
8163
  this.isReady = !0, this.fire("ready", { target: this });
8243
8164
  });
@@ -8260,15 +8181,15 @@ class Gs extends S.Map {
8260
8181
  scrollZoom: De,
8261
8182
  minZoom: et,
8262
8183
  maxZoom: tt,
8263
- boxZoom: wa,
8264
- locale: Sa,
8265
- fadeDuration: xa,
8266
- crossSourceCollisions: ka,
8267
- clickTolerance: La,
8268
- bounds: Ca,
8269
- fitBoundsOptions: Aa,
8270
- pixelRatio: Ta,
8271
- validateStyle: Ma
8184
+ boxZoom: va,
8185
+ locale: ba,
8186
+ fadeDuration: wa,
8187
+ crossSourceCollisions: Sa,
8188
+ clickTolerance: xa,
8189
+ bounds: ka,
8190
+ fitBoundsOptions: La,
8191
+ pixelRatio: Ca,
8192
+ validateStyle: Aa
8272
8193
  } = t;
8273
8194
  this.minimap = new Gt(d, {
8274
8195
  zoom: y,
@@ -8284,15 +8205,15 @@ class Gs extends S.Map {
8284
8205
  scrollZoom: De,
8285
8206
  minZoom: et,
8286
8207
  maxZoom: tt,
8287
- boxZoom: wa,
8288
- locale: Sa,
8289
- fadeDuration: xa,
8290
- crossSourceCollisions: ka,
8291
- clickTolerance: La,
8292
- bounds: Ca,
8293
- fitBoundsOptions: Aa,
8294
- pixelRatio: Ta,
8295
- validateStyle: Ma
8208
+ boxZoom: va,
8209
+ locale: ba,
8210
+ fadeDuration: wa,
8211
+ crossSourceCollisions: Sa,
8212
+ clickTolerance: xa,
8213
+ bounds: ka,
8214
+ fitBoundsOptions: La,
8215
+ pixelRatio: Ca,
8216
+ validateStyle: Aa
8296
8217
  }), this.addControl(this.minimap, d.position ?? "bottom-left");
8297
8218
  } else d === !0 ? (this.minimap = new Gt({}, t), this.addControl(this.minimap, "bottom-left")) : d !== void 0 && d !== !1 && (this.minimap = new Gt({}, t), this.addControl(this.minimap, d));
8298
8219
  });
@@ -8305,9 +8226,9 @@ class Gs extends S.Map {
8305
8226
  };
8306
8227
  this.on("terrain", f), t.terrain && this.enableTerrain(t.terrainExaggeration ?? this.terrainExaggeration), this.once("load", () => {
8307
8228
  this.getCanvas().addEventListener("webglcontextlost", (d) => {
8308
- console.warn(d), yo(t.container), this.fire("webglContextLost", { error: d });
8229
+ console.warn(d), po(t.container), this.fire("webglContextLost", { error: d });
8309
8230
  });
8310
- }), this.telemetry = new Bs(this);
8231
+ }), this.telemetry = new qs(this);
8311
8232
  }
8312
8233
  /**
8313
8234
  * Set the duration (millisec) of the terrain animation for growing or flattening.
@@ -8381,7 +8302,7 @@ class Gs extends S.Map {
8381
8302
  this.originalLabelStyle.clear(), (o = this.minimap) == null || o.setStyle(t), this.forceLanguageUpdate = !0, this.once("idle", () => {
8382
8303
  this.forceLanguageUpdate = !1;
8383
8304
  });
8384
- const a = ln(t);
8305
+ const a = sn(t);
8385
8306
  if (a.requiresUrlMonitoring && this.monitorStyleUrl(a.style), a.isFallback) {
8386
8307
  if (this.getStyle())
8387
8308
  return console.warn(
@@ -8532,7 +8453,7 @@ class Gs extends S.Map {
8532
8453
  return (a = this.minimap) == null || a.setGlyphs(t, n), super.setGlyphs(t, n);
8533
8454
  }
8534
8455
  getStyleLanguage() {
8535
- 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" ? $a(this.style.stylesheet.metadata["maptiler:language"]) : null;
8456
+ 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" ? Pa(this.style.stylesheet.metadata["maptiler:language"]) : null;
8536
8457
  }
8537
8458
  /**
8538
8459
  * Define the primary language of the map. Note that not all the languages shorthands provided are available.
@@ -8547,14 +8468,14 @@ class Gs extends S.Map {
8547
8468
  * Define the primary language of the map. Note that not all the languages shorthands provided are available.
8548
8469
  */
8549
8470
  setPrimaryLanguage(t) {
8550
- const n = this.getStyleLanguage(), a = zr(t, E);
8471
+ const n = this.getStyleLanguage(), a = zr(t, M);
8551
8472
  if (!a) {
8552
8473
  console.warn(`The language "${a}" is not supported.`);
8553
8474
  return;
8554
8475
  }
8555
- if (!(a.flag === E.STYLE.flag && n && (n.flag === E.AUTO.flag || n.flag === E.VISITOR.flag)) && (a.flag !== E.STYLE.flag && (this.languageAlwaysBeenStyle = !1), this.languageAlwaysBeenStyle || this.primaryLanguage === a && !this.forceLanguageUpdate))
8476
+ if (!(a.flag === M.STYLE.flag && n && (n.flag === M.AUTO.flag || n.flag === M.VISITOR.flag)) && (a.flag !== M.STYLE.flag && (this.languageAlwaysBeenStyle = !1), this.languageAlwaysBeenStyle || this.primaryLanguage === a && !this.forceLanguageUpdate))
8556
8477
  return;
8557
- if (this.primaryLanguage.flag === E.STYLE_LOCK.flag) {
8478
+ if (this.primaryLanguage.flag === M.STYLE_LOCK.flag) {
8558
8479
  console.warn(
8559
8480
  "The language cannot be changed because this map has been instantiated with the STYLE_LOCK language flag."
8560
8481
  );
@@ -8562,54 +8483,54 @@ class Gs extends S.Map {
8562
8483
  }
8563
8484
  this.primaryLanguage = a;
8564
8485
  let o = a;
8565
- if (a.flag === E.STYLE.flag) {
8486
+ if (a.flag === M.STYLE.flag) {
8566
8487
  if (!n) {
8567
8488
  console.warn("The style has no default languages or has an invalid one.");
8568
8489
  return;
8569
8490
  }
8570
8491
  o = n;
8571
8492
  }
8572
- let i = E.LOCAL.flag, s = ["get", i];
8573
- o.flag === E.VISITOR.flag ? (i = Pr().flag, s = [
8493
+ let i = M.LOCAL.flag, s = ["get", i];
8494
+ o.flag === M.VISITOR.flag ? (i = Pr().flag, s = [
8574
8495
  "case",
8575
- ["all", ["has", i], ["has", E.LOCAL.flag]],
8496
+ ["all", ["has", i], ["has", M.LOCAL.flag]],
8576
8497
  [
8577
8498
  "case",
8578
- ["==", ["get", i], ["get", E.LOCAL.flag]],
8579
- ["get", E.LOCAL.flag],
8499
+ ["==", ["get", i], ["get", M.LOCAL.flag]],
8500
+ ["get", M.LOCAL.flag],
8580
8501
  [
8581
8502
  "format",
8582
8503
  ["get", i],
8583
8504
  { "font-scale": 0.8 },
8584
8505
  `
8585
8506
  `,
8586
- ["get", E.LOCAL.flag],
8507
+ ["get", M.LOCAL.flag],
8587
8508
  { "font-scale": 1.1 }
8588
8509
  ]
8589
8510
  ],
8590
- ["get", E.LOCAL.flag]
8591
- ]) : o.flag === E.VISITOR_ENGLISH.flag ? (i = E.ENGLISH.flag, s = [
8511
+ ["get", M.LOCAL.flag]
8512
+ ]) : o.flag === M.VISITOR_ENGLISH.flag ? (i = M.ENGLISH.flag, s = [
8592
8513
  "case",
8593
- ["all", ["has", i], ["has", E.LOCAL.flag]],
8514
+ ["all", ["has", i], ["has", M.LOCAL.flag]],
8594
8515
  [
8595
8516
  "case",
8596
- ["==", ["get", i], ["get", E.LOCAL.flag]],
8597
- ["get", E.LOCAL.flag],
8517
+ ["==", ["get", i], ["get", M.LOCAL.flag]],
8518
+ ["get", M.LOCAL.flag],
8598
8519
  [
8599
8520
  "format",
8600
8521
  ["get", i],
8601
8522
  { "font-scale": 0.8 },
8602
8523
  `
8603
8524
  `,
8604
- ["get", E.LOCAL.flag],
8525
+ ["get", M.LOCAL.flag],
8605
8526
  { "font-scale": 1.1 }
8606
8527
  ]
8607
8528
  ],
8608
- ["get", E.LOCAL.flag]
8609
- ]) : o.flag === E.AUTO.flag ? (i = Pr().flag, s = ["coalesce", ["get", i], ["get", E.LOCAL.flag]]) : o === E.LOCAL ? (i = E.LOCAL.flag, s = ["get", i]) : (i = o.flag, s = ["coalesce", ["get", i], ["get", E.LOCAL.flag]]);
8529
+ ["get", M.LOCAL.flag]
8530
+ ]) : o.flag === M.AUTO.flag ? (i = Pr().flag, s = ["coalesce", ["get", i], ["get", M.LOCAL.flag]]) : o === M.LOCAL ? (i = M.LOCAL.flag, s = ["get", i]) : (i = o.flag, s = ["coalesce", ["get", i], ["get", M.LOCAL.flag]]);
8610
8531
  const { layers: l } = this.getStyle(), u = this.originalLabelStyle.size === 0;
8611
8532
  if (u) {
8612
- const c = So(l, this);
8533
+ const c = bo(l, this);
8613
8534
  this.isStyleLocalized = Object.keys(c.localized).length > 0;
8614
8535
  }
8615
8536
  for (const c of l) {
@@ -8623,16 +8544,16 @@ class Gs extends S.Map {
8623
8544
  continue;
8624
8545
  let v;
8625
8546
  if (u ? (v = this.getLayoutProperty(d, "text-field"), this.originalLabelStyle.set(d, v)) : v = this.originalLabelStyle.get(d), typeof v == "string") {
8626
- const { contains: w, exactMatch: b } = ho(v, this.isStyleLocalized);
8547
+ const { contains: w, exactMatch: b } = yo(v, this.isStyleLocalized);
8627
8548
  if (!w) continue;
8628
8549
  if (b)
8629
8550
  this.setLayoutProperty(d, "text-field", s);
8630
8551
  else {
8631
- const T = go(v, s, this.isStyleLocalized);
8552
+ const T = mo(v, s, this.isStyleLocalized);
8632
8553
  this.setLayoutProperty(d, "text-field", T);
8633
8554
  }
8634
8555
  } else {
8635
- const w = mo(v, s, this.isStyleLocalized);
8556
+ const w = fo(v, s, this.isStyleLocalized);
8636
8557
  this.setLayoutProperty(d, "text-field", w);
8637
8558
  }
8638
8559
  }
@@ -8757,7 +8678,7 @@ class Gs extends S.Map {
8757
8678
  }
8758
8679
  getCameraHash() {
8759
8680
  const t = new Float32Array(5), n = this.getCenter();
8760
- return t[0] = n.lng, t[1] = n.lat, t[2] = this.getZoom(), t[3] = this.getPitch(), t[4] = this.getBearing(), Fa.fromUint8Array(new Uint8Array(t.buffer));
8681
+ return t[0] = n.lng, t[1] = n.lat, t[2] = this.getZoom(), t[3] = this.getPitch(), t[4] = this.getBearing(), ja.fromUint8Array(new Uint8Array(t.buffer));
8761
8682
  }
8762
8683
  /**
8763
8684
  * Get the SDK config object.
@@ -8827,7 +8748,7 @@ function Ar(r) {
8827
8748
  }
8828
8749
  throw new Error("No XML parser found");
8829
8750
  }
8830
- function ca(r, e) {
8751
+ function la(r, e) {
8831
8752
  if (!r.hasChildNodes())
8832
8753
  return !1;
8833
8754
  for (const t of Array.from(r.childNodes)) {
@@ -8837,71 +8758,71 @@ function ca(r, e) {
8837
8758
  }
8838
8759
  return !1;
8839
8760
  }
8840
- function pn(r) {
8761
+ function cn(r) {
8841
8762
  if (typeof XMLSerializer < "u")
8842
8763
  return new XMLSerializer().serializeToString(r);
8843
8764
  throw new Error("No XML serializer found");
8844
8765
  }
8845
- function pa(r) {
8766
+ function ua(r) {
8846
8767
  const e = typeof r == "string" ? Ar(r) : r;
8847
- if (!ca(e, "gpx"))
8768
+ if (!la(e, "gpx"))
8848
8769
  throw new Error("The XML document is not valid GPX");
8849
- const t = B(e, "trk"), n = B(e, "rte"), a = B(e, "wpt"), o = {
8770
+ const t = U(e, "trk"), n = U(e, "rte"), a = U(e, "wpt"), o = {
8850
8771
  type: "FeatureCollection",
8851
8772
  features: []
8852
8773
  };
8853
8774
  for (const i of Array.from(t)) {
8854
- const s = Zs(i);
8775
+ const s = Ks(i);
8855
8776
  s && o.features.push(s);
8856
8777
  }
8857
8778
  for (const i of Array.from(n)) {
8858
- const s = Js(i);
8779
+ const s = Ws(i);
8859
8780
  s && o.features.push(s);
8860
8781
  }
8861
8782
  for (const i of Array.from(a))
8862
- o.features.push(Ys(i));
8783
+ o.features.push(Zs(i));
8863
8784
  return o;
8864
8785
  }
8865
- function fa(r, e) {
8786
+ function ca(r, e) {
8866
8787
  let t = r;
8867
- if (typeof t == "string" && (t = Ar(t)), !ca(t, "kml"))
8788
+ if (typeof t == "string" && (t = Ar(t)), !la(t, "kml"))
8868
8789
  throw new Error("The XML document is not valid KML");
8869
8790
  const n = {
8870
8791
  type: "FeatureCollection",
8871
8792
  features: []
8872
- }, a = {}, o = {}, i = {}, s = B(t, "Placemark"), l = B(t, "Style"), u = B(t, "StyleMap");
8793
+ }, a = {}, o = {}, i = {}, s = U(t, "Placemark"), l = U(t, "Style"), u = U(t, "StyleMap");
8873
8794
  for (const c of Array.from(l)) {
8874
- const p = dn(e !== void 0 ? e(c) : pn(c)).toString(16);
8795
+ const p = fn(e !== void 0 ? e(c) : cn(c)).toString(16);
8875
8796
  a[`#${Te(c, "id")}`] = p, o[p] = c;
8876
8797
  }
8877
8798
  for (const c of Array.from(u)) {
8878
- a[`#${Te(c, "id")}`] = dn(
8879
- e !== void 0 ? e(c) : pn(c)
8799
+ a[`#${Te(c, "id")}`] = fn(
8800
+ e !== void 0 ? e(c) : cn(c)
8880
8801
  ).toString(16);
8881
- const p = B(c, "Pair"), m = {};
8802
+ const p = U(c, "Pair"), m = {};
8882
8803
  for (const f of Array.from(p))
8883
8804
  m[_(k(f, "key")) ?? ""] = _(k(f, "styleUrl"));
8884
8805
  i[`#${Te(c, "id")}`] = m;
8885
8806
  }
8886
8807
  for (const c of Array.from(s))
8887
- n.features = n.features.concat(Ws(c, a, o, i));
8808
+ n.features = n.features.concat(Hs(c, a, o, i));
8888
8809
  return n;
8889
8810
  }
8890
- function fn(r) {
8811
+ function pn(r) {
8891
8812
  if (r === null) return ["#000000", 1];
8892
8813
  let e = "", t = 1, n = r;
8893
8814
  return n.substring(0, 1) === "#" && (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];
8894
8815
  }
8895
- function Hs(r) {
8896
- return ma(r.split(" "));
8816
+ function Vs(r) {
8817
+ return da(r.split(" "));
8897
8818
  }
8898
- function Ks(r) {
8899
- let e = B(r, "coord");
8819
+ function Gs(r) {
8820
+ let e = U(r, "coord");
8900
8821
  const t = [], n = [];
8901
- e.length === 0 && (e = B(r, "gx:coord"));
8822
+ e.length === 0 && (e = U(r, "gx:coord"));
8902
8823
  for (const o of Array.from(e))
8903
- t.push(Hs(_(o) ?? ""));
8904
- const a = B(r, "when");
8824
+ t.push(Vs(_(o) ?? ""));
8825
+ const a = U(r, "when");
8905
8826
  for (const o of Array.from(a)) n.push(_(o));
8906
8827
  return {
8907
8828
  coords: t,
@@ -8919,28 +8840,28 @@ function st(r) {
8919
8840
  if (k(r, "gx:MultiTrack") !== null)
8920
8841
  return st(k(r, "gx:MultiTrack"));
8921
8842
  for (a = 0; a < e.length; a++)
8922
- if (n = B(r, e[a]), n) {
8843
+ if (n = U(r, e[a]), n) {
8923
8844
  for (o = 0; o < n.length; o++)
8924
8845
  if (t = n[o], e[a] === "Point")
8925
8846
  s.push({
8926
8847
  type: "Point",
8927
- coordinates: ha(_(k(t, "coordinates")) ?? "")
8848
+ coordinates: ya(_(k(t, "coordinates")) ?? "")
8928
8849
  });
8929
8850
  else if (e[a] === "LineString")
8930
8851
  s.push({
8931
8852
  type: "LineString",
8932
- coordinates: mn(_(k(t, "coordinates")) ?? "")
8853
+ coordinates: yn(_(k(t, "coordinates")) ?? "")
8933
8854
  });
8934
8855
  else if (e[a] === "Polygon") {
8935
- const u = B(t, "LinearRing"), c = [];
8856
+ const u = U(t, "LinearRing"), c = [];
8936
8857
  for (i = 0; i < u.length; i++)
8937
- c.push(mn(_(k(u[i], "coordinates")) ?? ""));
8858
+ c.push(yn(_(k(u[i], "coordinates")) ?? ""));
8938
8859
  s.push({
8939
8860
  type: "Polygon",
8940
8861
  coordinates: c
8941
8862
  });
8942
8863
  } else if (e[a] === "Track" || e[a] === "gx:Track") {
8943
- const u = Ks(t);
8864
+ const u = Gs(t);
8944
8865
  s.push({
8945
8866
  type: "LineString",
8946
8867
  coordinates: u.coords
@@ -8949,7 +8870,7 @@ function st(r) {
8949
8870
  }
8950
8871
  return { geoms: s, coordTimes: l };
8951
8872
  }
8952
- function Ws(r, e, t, n) {
8873
+ function Hs(r, e, t, n) {
8953
8874
  const a = st(r), o = {}, i = _(k(r, "name")), s = _(k(r, "address")), l = _(k(r, "description")), u = k(r, "TimeSpan"), c = k(r, "TimeStamp"), p = k(r, "ExtendedData"), m = k(r, "visibility");
8954
8875
  let f, d = _(k(r, "styleUrl")), y = k(r, "LineStyle"), v = k(r, "PolyStyle");
8955
8876
  if (!a.geoms.length) return [];
@@ -8973,15 +8894,15 @@ function Ws(r, e, t, n) {
8973
8894
  b && T && (o.timespan = { begin: b, end: T });
8974
8895
  }
8975
8896
  if (c !== null && (o.timestamp = _(k(c, "when")) ?? (/* @__PURE__ */ new Date()).toISOString()), y !== null) {
8976
- const b = fn(_(k(y, "color"))), T = b[0], j = b[1], R = Number.parseFloat(_(k(y, "width")) ?? "");
8897
+ const b = pn(_(k(y, "color"))), T = b[0], j = b[1], R = Number.parseFloat(_(k(y, "width")) ?? "");
8977
8898
  T && (o.stroke = T), Number.isNaN(j) || (o["stroke-opacity"] = j), Number.isNaN(R) || (o["stroke-width"] = R);
8978
8899
  }
8979
8900
  if (v) {
8980
- const b = fn(_(k(v, "color"))), T = b[0], j = b[1], R = _(k(v, "fill")), ae = _(k(v, "outline"));
8901
+ const b = pn(_(k(v, "color"))), T = b[0], j = b[1], R = _(k(v, "fill")), ae = _(k(v, "outline"));
8981
8902
  T && (o.fill = T), Number.isNaN(j) || (o["fill-opacity"] = j), R && (o["fill-opacity"] = R === "1" ? o["fill-opacity"] || 1 : 0), ae && (o["stroke-opacity"] = ae === "1" ? o["stroke-opacity"] || 1 : 0);
8982
8903
  }
8983
8904
  if (p) {
8984
- const b = B(p, "Data"), T = B(p, "SimpleData");
8905
+ const b = U(p, "Data"), T = U(p, "SimpleData");
8985
8906
  for (f = 0; f < b.length; f++)
8986
8907
  o[b[f].getAttribute("name") ?? ""] = _(k(b[f], "value")) ?? "";
8987
8908
  for (f = 0; f < T.length; f++)
@@ -8998,13 +8919,13 @@ function Ws(r, e, t, n) {
8998
8919
  };
8999
8920
  return Te(r, "id") && (w.id = Te(r, "id") ?? void 0), [w];
9000
8921
  }
9001
- function da(r, e) {
9002
- const t = B(r, e), n = [], a = [];
8922
+ function pa(r, e) {
8923
+ const t = U(r, e), n = [], a = [];
9003
8924
  let o = [];
9004
8925
  const i = t.length;
9005
8926
  if (!(i < 2)) {
9006
8927
  for (let s = 0; s < i; s++) {
9007
- const l = ga(t[s]);
8928
+ const l = ma(t[s]);
9008
8929
  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));
9009
8930
  }
9010
8931
  return {
@@ -9014,11 +8935,11 @@ function da(r, e) {
9014
8935
  };
9015
8936
  }
9016
8937
  }
9017
- function Zs(r) {
9018
- const e = B(r, "trkseg"), t = [], n = [], a = [];
8938
+ function Ks(r) {
8939
+ const e = U(r, "trkseg"), t = [], n = [], a = [];
9019
8940
  let o;
9020
8941
  for (let s = 0; s < e.length; s++)
9021
- if (o = da(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)) {
8942
+ if (o = pa(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)) {
9022
8943
  if (!a.length)
9023
8944
  for (let l = 0; l < s; l++)
9024
8945
  a.push(new Array(t[l].length).fill(null));
@@ -9027,7 +8948,7 @@ function Zs(r) {
9027
8948
  if (t.length === 0) return;
9028
8949
  const i = {
9029
8950
  ...Tr(r),
9030
- ...ya(k(r, "extensions"))
8951
+ ...fa(k(r, "extensions"))
9031
8952
  };
9032
8953
  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 ? {
9033
8954
  type: "Feature",
@@ -9045,13 +8966,13 @@ function Zs(r) {
9045
8966
  }
9046
8967
  };
9047
8968
  }
9048
- function Js(r) {
9049
- const e = da(r, "rtept");
8969
+ function Ws(r) {
8970
+ const e = pa(r, "rtept");
9050
8971
  return e === void 0 ? void 0 : {
9051
8972
  type: "Feature",
9052
8973
  properties: {
9053
8974
  ...Tr(r),
9054
- ...ya(k(r, "extensions"))
8975
+ ...fa(k(r, "extensions"))
9055
8976
  },
9056
8977
  geometry: {
9057
8978
  type: "LineString",
@@ -9059,17 +8980,17 @@ function Js(r) {
9059
8980
  }
9060
8981
  };
9061
8982
  }
9062
- function Ys(r) {
8983
+ function Zs(r) {
9063
8984
  return {
9064
8985
  type: "Feature",
9065
8986
  properties: { ...Tr(r), ...rr(r, ["sym"]) },
9066
8987
  geometry: {
9067
8988
  type: "Point",
9068
- coordinates: ga(r).coordinates
8989
+ coordinates: ma(r).coordinates
9069
8990
  }
9070
8991
  };
9071
8992
  }
9072
- function ya(r) {
8993
+ function fa(r) {
9073
8994
  const e = {};
9074
8995
  if (r) {
9075
8996
  const t = k(r, "line");
@@ -9088,7 +9009,7 @@ function Tr(r) {
9088
9009
  "type",
9089
9010
  "time",
9090
9011
  "keywords"
9091
- ]), t = B(r, "link");
9012
+ ]), t = U(r, "link");
9092
9013
  if (t.length !== 0) {
9093
9014
  e.links = [];
9094
9015
  for (const n of Array.from(t)) {
@@ -9101,34 +9022,34 @@ function Tr(r) {
9101
9022
  }
9102
9023
  return e;
9103
9024
  }
9104
- function dn(r) {
9025
+ function fn(r) {
9105
9026
  let e = 0;
9106
9027
  if (!r || !r.length) return e;
9107
9028
  for (let t = 0; t < r.length; t++)
9108
9029
  e = (e << 5) - e + r.charCodeAt(t) | 0;
9109
9030
  return e;
9110
9031
  }
9111
- function B(r, e) {
9032
+ function U(r, e) {
9112
9033
  return r.getElementsByTagName(e);
9113
9034
  }
9114
9035
  function Te(r, e) {
9115
9036
  return r.getAttribute(e);
9116
9037
  }
9117
- function yn(r, e) {
9038
+ function dn(r, e) {
9118
9039
  return Number.parseFloat(Te(r, e) ?? "0");
9119
9040
  }
9120
9041
  function k(r, e) {
9121
- const t = B(r, e);
9042
+ const t = U(r, e);
9122
9043
  return t.length ? t[0] : null;
9123
9044
  }
9124
- function Xs(r) {
9045
+ function Js(r) {
9125
9046
  return r.normalize && r.normalize(), r;
9126
9047
  }
9127
- function ma(r) {
9048
+ function da(r) {
9128
9049
  return r.map(Number.parseFloat).map((e) => Number.isNaN(e) ? null : e);
9129
9050
  }
9130
9051
  function _(r) {
9131
- return r && Xs(r), r && r.textContent;
9052
+ return r && Js(r), r && r.textContent;
9132
9053
  }
9133
9054
  function rr(r, e) {
9134
9055
  const t = {};
@@ -9137,16 +9058,16 @@ function rr(r, e) {
9137
9058
  n = k(r, e[a]), n && (t[e[a]] = _(n) ?? "");
9138
9059
  return t;
9139
9060
  }
9140
- function ha(r) {
9141
- return ma(r.replace(/\s*/g, "").split(","));
9061
+ function ya(r) {
9062
+ return da(r.replace(/\s*/g, "").split(","));
9142
9063
  }
9143
- function mn(r) {
9064
+ function yn(r) {
9144
9065
  const e = r.replace(/^\s*|\s*$/g, "").split(/\s+/), t = [];
9145
- for (const n of e) t.push(ha(n));
9066
+ for (const n of e) t.push(ya(n));
9146
9067
  return t;
9147
9068
  }
9148
- function ga(r) {
9149
- const e = [yn(r, "lon"), yn(r, "lat")], t = k(r, "ele"), n = k(r, "gpxtpx:hr") || k(r, "hr"), a = k(r, "time");
9069
+ function ma(r) {
9070
+ const e = [dn(r, "lon"), dn(r, "lat")], t = k(r, "ele"), n = k(r, "gpxtpx:hr") || k(r, "hr"), a = k(r, "time");
9150
9071
  let o;
9151
9072
  return t && (o = Number.parseFloat(_(t) ?? "0"), Number.isNaN(o) || e.push(o)), {
9152
9073
  coordinates: e,
@@ -9154,7 +9075,7 @@ function ga(r) {
9154
9075
  heartRate: n !== null ? Number.parseFloat(_(n) ?? "0") : null
9155
9076
  };
9156
9077
  }
9157
- function Qs(r) {
9078
+ function Ys(r) {
9158
9079
  let e = r;
9159
9080
  try {
9160
9081
  typeof e == "string" && (e = Ar(e));
@@ -9162,11 +9083,11 @@ function Qs(r) {
9162
9083
  return null;
9163
9084
  }
9164
9085
  try {
9165
- return pa(e);
9086
+ return ua(e);
9166
9087
  } catch {
9167
9088
  }
9168
9089
  try {
9169
- return fa(e);
9090
+ return ca(e);
9170
9091
  } catch {
9171
9092
  }
9172
9093
  return null;
@@ -9175,7 +9096,7 @@ function ot(r) {
9175
9096
  const e = r.toString(16);
9176
9097
  return e.length === 1 ? `0${e}` : e;
9177
9098
  }
9178
- function el(r) {
9099
+ function Xs(r) {
9179
9100
  return `#${ot(r[0])}${ot(r[1])}${ot(r[2])}${r.length === 4 ? ot(r[3]) : ""}`;
9180
9101
  }
9181
9102
  class x extends Array {
@@ -9271,7 +9192,7 @@ class x extends Array {
9271
9192
  smooth: !0,
9272
9193
  withAlpha: !1
9273
9194
  }) {
9274
- return el(this.getColor(t, n));
9195
+ return Xs(this.getColor(t, n));
9275
9196
  }
9276
9197
  /**
9277
9198
  * Get the color of the color ramp at a relative position in [0, 1]
@@ -9358,7 +9279,7 @@ class x extends Array {
9358
9279
  return this[0].color.length === 4 && this[0].color[3] === 0;
9359
9280
  }
9360
9281
  }
9361
- const va = {
9282
+ const ha = {
9362
9283
  /**
9363
9284
  * A fully transparent [0, 0, 0, 0] colorramp to hide data.
9364
9285
  * Defined in interval [0, 1], without unit.
@@ -10114,8 +10035,8 @@ const va = {
10114
10035
  ]
10115
10036
  })
10116
10037
  };
10117
- async function tl(r, e = {}) {
10118
- const t = e.download ?? !1, n = await rl(r);
10038
+ async function Qs(r, e = {}) {
10039
+ const t = e.download ?? !1, n = await el(r);
10119
10040
  if (t) {
10120
10041
  const a = e.filename ?? "maptiler_screenshot.png", o = document.createElement("a");
10121
10042
  o.style.display = "none", document.body.appendChild(o), o.href = URL.createObjectURL(n), o.download = a, o.click(), setTimeout(() => {
@@ -10124,7 +10045,7 @@ async function tl(r, e = {}) {
10124
10045
  }
10125
10046
  return n;
10126
10047
  }
10127
- function rl(r) {
10048
+ function el(r) {
10128
10049
  return new Promise((e, t) => {
10129
10050
  r.redraw(), r.once("idle", () => {
10130
10051
  r.getCanvas().toBlob((n) => {
@@ -10135,7 +10056,7 @@ function rl(r) {
10135
10056
  });
10136
10057
  });
10137
10058
  }
10138
- const hn = [
10059
+ const mn = [
10139
10060
  // https://colorhunt.co/palette/1d5b79468b97ef6262f3aa60
10140
10061
  ["#1D5B79", "#468B97", "#EF6262", "#F3AA60"],
10141
10062
  // https://colorhunt.co/palette/614bc333bbc585e6c5c8ffe0
@@ -10155,16 +10076,16 @@ const hn = [
10155
10076
  // https://colorhunt.co/palette/10a19d540375ff7000ffbf00
10156
10077
  ["#10A19D", "#540375", "#FF7000", "#FFBF00"]
10157
10078
  ];
10158
- function Mr() {
10159
- return hn[~~(Math.random() * hn.length)][~~(Math.random() * 4)];
10079
+ function Ir() {
10080
+ return mn[~~(Math.random() * mn.length)][~~(Math.random() * 4)];
10160
10081
  }
10161
10082
  function zt() {
10162
- return `maptiler_source_${kn()}`;
10083
+ return `maptiler_source_${xn()}`;
10163
10084
  }
10164
10085
  function _t() {
10165
- return `maptiler_layer_${kn()}`;
10086
+ return `maptiler_layer_${xn()}`;
10166
10087
  }
10167
- function gn(r, e) {
10088
+ function hn(r, e) {
10168
10089
  if (e <= r[0].zoom)
10169
10090
  return r[0].value;
10170
10091
  if (e >= r[r.length - 1].zoom)
@@ -10176,13 +10097,13 @@ function gn(r, e) {
10176
10097
  }
10177
10098
  return 0;
10178
10099
  }
10179
- function Me(r) {
10100
+ function Ie(r) {
10180
10101
  return ["interpolate", ["linear"], ["zoom"], ...r.flatMap((e) => [e.zoom, e.value])];
10181
10102
  }
10182
10103
  function P(r) {
10183
10104
  return ["interpolate", ["linear"], ["zoom"], ...r.flatMap((e) => [e.zoom, e.value])];
10184
10105
  }
10185
- function nl(r, e) {
10106
+ function tl(r, e) {
10186
10107
  if (typeof e == "number" && typeof r == "number")
10187
10108
  return 2 * e + r;
10188
10109
  if (typeof e == "number" && Array.isArray(r))
@@ -10197,15 +10118,15 @@ function nl(r, e) {
10197
10118
  "interpolate",
10198
10119
  ["linear"],
10199
10120
  ["zoom"],
10200
- ...t.flatMap((n) => [n, 2 * gn(e, n) + gn(r, n)])
10121
+ ...t.flatMap((n) => [n, 2 * hn(e, n) + hn(r, n)])
10201
10122
  ];
10202
10123
  }
10203
10124
  return 0;
10204
10125
  }
10205
- function al(r, e) {
10126
+ function rl(r, e) {
10206
10127
  return ["interpolate", ["linear"], ["get", e], ...r.flatMap((t) => [t.propertyValue, t.value])];
10207
10128
  }
10208
- function ba(r) {
10129
+ function ga(r) {
10209
10130
  const e = r.trimStart(), t = `${e}${" ".repeat(r.length - e.length)}`, n = Array.from(t);
10210
10131
  if (!n.every((s) => s === " " || s === "_"))
10211
10132
  throw new Error("A dash pattern must be composed only of whitespace and underscore characters.");
@@ -10218,10 +10139,10 @@ function ba(r) {
10218
10139
  }
10219
10140
  return i;
10220
10141
  }
10221
- function vn(r, e) {
10142
+ function gn(r, e) {
10222
10143
  return ["interpolate", ["linear"], ["get", e], ...r.flatMap((t) => [t.value, t.color])];
10223
10144
  }
10224
- function bn(r, e, t = !0) {
10145
+ function vn(r, e, t = !0) {
10225
10146
  return t ? [
10226
10147
  "interpolate",
10227
10148
  ["linear"],
@@ -10238,7 +10159,7 @@ function bn(r, e, t = !0) {
10238
10159
  ["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.value, n.pointRadius])]
10239
10160
  ] : ["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.value, n.pointRadius])];
10240
10161
  }
10241
- function ol(r, e, t = !0) {
10162
+ function nl(r, e, t = !0) {
10242
10163
  return t ? [
10243
10164
  "interpolate",
10244
10165
  ["linear"],
@@ -10255,7 +10176,7 @@ function ol(r, e, t = !0) {
10255
10176
  ["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.propertyValue, n.value])]
10256
10177
  ] : ["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.propertyValue, n.value])];
10257
10178
  }
10258
- function wn(r, e) {
10179
+ function bn(r, e) {
10259
10180
  return r.every((t) => t.color[3] === r[0].color[3]) ? r[0].color[3] ? r[0].color[3] / 255 : 1 : [
10260
10181
  "interpolate",
10261
10182
  ["linear"],
@@ -10266,7 +10187,7 @@ function wn(r, e) {
10266
10187
  })
10267
10188
  ];
10268
10189
  }
10269
- function il(r, e = 10) {
10190
+ function al(r, e = 10) {
10270
10191
  return [
10271
10192
  "interpolate",
10272
10193
  ["linear"],
@@ -10277,7 +10198,7 @@ function il(r, e = 10) {
10277
10198
  }).flat()
10278
10199
  ];
10279
10200
  }
10280
- async function sl(r, e, t = {}) {
10201
+ async function ol(r, e, t = {}) {
10281
10202
  var a, o;
10282
10203
  if (!e.sourceId && !e.data)
10283
10204
  throw new Error("Creating a polyline layer requires an existing .sourceId or a valid .data property");
@@ -10287,23 +10208,23 @@ async function sl(r, e, t = {}) {
10287
10208
  n = `https://api.maptiler.com/data/${e.data}/features.json?key=${F.apiKey}`;
10288
10209
  else if (((a = n.split(".").pop()) == null ? void 0 : a.toLowerCase().trim()) === "gpx") {
10289
10210
  const s = await (await fetch(n, t)).text();
10290
- n = pa(s);
10211
+ n = ua(s);
10291
10212
  } else if (((o = n.split(".").pop()) == null ? void 0 : o.toLowerCase().trim()) === "kml") {
10292
10213
  const s = await (await fetch(n, t)).text();
10293
- n = fa(s);
10214
+ n = ca(s);
10294
10215
  } else {
10295
- const i = co(n) ?? Qs(n);
10216
+ const i = lo(n) ?? Ys(n);
10296
10217
  i && (n = i);
10297
10218
  }
10298
10219
  if (!n)
10299
10220
  throw new Error("Polyline data was provided as string but is incompatible with valid formats.");
10300
10221
  }
10301
- return ll(r, {
10222
+ return il(r, {
10302
10223
  ...e,
10303
10224
  data: n
10304
10225
  });
10305
10226
  }
10306
- function ll(r, e) {
10227
+ function il(r, e) {
10307
10228
  if (e.layerId && r.getLayer(e.layerId))
10308
10229
  throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
10309
10230
  const t = e.sourceId ?? zt(), n = e.layerId ?? _t(), a = {
@@ -10315,10 +10236,10 @@ function ll(r, e) {
10315
10236
  type: "geojson",
10316
10237
  data: e.data
10317
10238
  });
10318
- const o = e.lineWidth ?? 3, i = e.lineColor ?? Mr(), s = e.lineOpacity ?? 1, l = e.lineBlur ?? 0, u = e.lineGapWidth ?? 0;
10239
+ const o = e.lineWidth ?? 3, i = e.lineColor ?? Ir(), s = e.lineOpacity ?? 1, l = e.lineBlur ?? 0, u = e.lineGapWidth ?? 0;
10319
10240
  let c = e.lineDashArray ?? null;
10320
10241
  const p = e.outlineWidth ?? 1, m = e.outlineColor ?? "#FFFFFF", f = e.outlineOpacity ?? 1, d = e.outlineBlur ?? 0;
10321
- if (typeof c == "string" && (c = ba(c)), e.outline === !0) {
10242
+ if (typeof c == "string" && (c = ga(c)), e.outline === !0) {
10322
10243
  const y = `${n}_outline`;
10323
10244
  a.polylineOutlineLayerId = y, r.addLayer(
10324
10245
  {
@@ -10333,8 +10254,8 @@ function ll(r, e) {
10333
10254
  maxzoom: e.maxzoom ?? 23,
10334
10255
  paint: {
10335
10256
  "line-opacity": typeof f == "number" ? f : P(f),
10336
- "line-color": typeof m == "string" ? m : Me(m),
10337
- "line-width": nl(o, p),
10257
+ "line-color": typeof m == "string" ? m : Ie(m),
10258
+ "line-width": tl(o, p),
10338
10259
  "line-blur": typeof d == "number" ? d : P(d)
10339
10260
  }
10340
10261
  },
@@ -10354,7 +10275,7 @@ function ll(r, e) {
10354
10275
  maxzoom: e.maxzoom ?? 23,
10355
10276
  paint: {
10356
10277
  "line-opacity": typeof s == "number" ? s : P(s),
10357
- "line-color": typeof i == "string" ? i : Me(i),
10278
+ "line-color": typeof i == "string" ? i : Ie(i),
10358
10279
  "line-width": typeof o == "number" ? o : P(o),
10359
10280
  "line-blur": typeof l == "number" ? l : P(l),
10360
10281
  "line-gap-width": typeof u == "number" ? u : P(u),
@@ -10369,7 +10290,7 @@ function ll(r, e) {
10369
10290
  e.beforeId
10370
10291
  ), a;
10371
10292
  }
10372
- function ul(r, e) {
10293
+ function sl(r, e) {
10373
10294
  if (e.layerId && r.getLayer(e.layerId))
10374
10295
  throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
10375
10296
  const t = e.sourceId ?? zt(), n = e.layerId ?? _t(), a = {
@@ -10385,8 +10306,8 @@ function ul(r, e) {
10385
10306
  });
10386
10307
  }
10387
10308
  let o = e.outlineDashArray ?? null;
10388
- const i = e.outlineWidth ?? 1, s = e.outlineColor ?? "#FFFFFF", l = e.outlineOpacity ?? 1, u = e.outlineBlur ?? 0, c = e.fillColor ?? Mr(), p = e.fillOpacity ?? 1, m = e.outlinePosition ?? "center", f = e.pattern ?? null;
10389
- typeof o == "string" && (o = ba(o));
10309
+ const i = e.outlineWidth ?? 1, s = e.outlineColor ?? "#FFFFFF", l = e.outlineOpacity ?? 1, u = e.outlineBlur ?? 0, c = e.fillColor ?? Ir(), p = e.fillOpacity ?? 1, m = e.outlinePosition ?? "center", f = e.pattern ?? null;
10310
+ typeof o == "string" && (o = ga(o));
10390
10311
  const d = (y = null) => {
10391
10312
  if (r.addLayer(
10392
10313
  {
@@ -10396,7 +10317,7 @@ function ul(r, e) {
10396
10317
  minzoom: e.minzoom ?? 0,
10397
10318
  maxzoom: e.maxzoom ?? 23,
10398
10319
  paint: {
10399
- "fill-color": typeof c == "string" ? c : Me(c),
10320
+ "fill-color": typeof c == "string" ? c : Ie(c),
10400
10321
  "fill-opacity": typeof p == "number" ? p : P(p),
10401
10322
  // Adding a pattern if provided
10402
10323
  ...y && { "fill-pattern": y }
@@ -10428,7 +10349,7 @@ function ul(r, e) {
10428
10349
  maxzoom: e.maxzoom ?? 23,
10429
10350
  paint: {
10430
10351
  "line-opacity": typeof l == "number" ? l : P(l),
10431
- "line-color": typeof s == "string" ? s : Me(s),
10352
+ "line-color": typeof s == "string" ? s : Ie(s),
10432
10353
  "line-width": typeof i == "number" ? i : P(i),
10433
10354
  "line-blur": typeof u == "number" ? u : P(u),
10434
10355
  "line-offset": v,
@@ -10450,13 +10371,13 @@ function ul(r, e) {
10450
10371
  r.addImage(f, y.data), d(f);
10451
10372
  }).catch((y) => (console.error("Could not load the pattern image.", y.message), d())) : d(), a;
10452
10373
  }
10453
- function cl(r, e) {
10374
+ function ll(r, e) {
10454
10375
  if (e.layerId && r.getLayer(e.layerId))
10455
10376
  throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
10456
- const t = e.minPointRadius ?? 10, n = e.maxPointRadius ?? 50, a = e.cluster ?? !1, o = 20, i = Array.isArray(e.pointColor) ? e.pointColor : va.TURBO.scale(10, e.cluster ? 1e4 : 1e3).resample("ease-out-square"), s = i.getBounds(), l = e.sourceId ?? zt(), u = e.layerId ?? _t(), c = e.showLabel ?? a, p = e.alignOnViewport ?? !0, m = e.outline ?? !1, f = e.outlineOpacity ?? 1, d = e.outlineWidth ?? 1, y = e.outlineColor ?? "#FFFFFF";
10377
+ const t = e.minPointRadius ?? 10, n = e.maxPointRadius ?? 50, a = e.cluster ?? !1, o = 20, i = Array.isArray(e.pointColor) ? e.pointColor : ha.TURBO.scale(10, e.cluster ? 1e4 : 1e3).resample("ease-out-square"), s = i.getBounds(), l = e.sourceId ?? zt(), u = e.layerId ?? _t(), c = e.showLabel ?? a, p = e.alignOnViewport ?? !0, m = e.outline ?? !1, f = e.outlineOpacity ?? 1, d = e.outlineWidth ?? 1, y = e.outlineColor ?? "#FFFFFF";
10457
10378
  let v;
10458
10379
  const w = e.zoomCompensation ?? !0, b = e.minzoom ?? 0, T = e.maxzoom ?? 23;
10459
- typeof e.pointOpacity == "number" ? v = e.pointOpacity : Array.isArray(e.pointOpacity) ? v = P(e.pointOpacity) : e.cluster ? v = wn(i, "point_count") : e.property ? v = wn(i, e.property) : v = P([
10380
+ typeof e.pointOpacity == "number" ? v = e.pointOpacity : Array.isArray(e.pointOpacity) ? v = P(e.pointOpacity) : e.cluster ? v = bn(i, "point_count") : e.property ? v = bn(i, e.property) : v = P([
10460
10381
  { zoom: b, value: 0 },
10461
10382
  { zoom: b + 0.25, value: 1 },
10462
10383
  { zoom: T - 0.25, value: 1 },
@@ -10494,8 +10415,8 @@ function cl(r, e) {
10494
10415
  filter: ["has", "point_count"],
10495
10416
  paint: {
10496
10417
  // 'circle-color': options.pointColor ?? colorDrivenByProperty(clusterStyle, "point_count"),
10497
- "circle-color": typeof e.pointColor == "string" ? e.pointColor : vn(R, "point_count"),
10498
- "circle-radius": typeof e.pointRadius == "number" ? e.pointRadius : Array.isArray(e.pointRadius) ? P(e.pointRadius) : bn(R, "point_count", !1),
10418
+ "circle-color": typeof e.pointColor == "string" ? e.pointColor : gn(R, "point_count"),
10419
+ "circle-radius": typeof e.pointRadius == "number" ? e.pointRadius : Array.isArray(e.pointRadius) ? P(e.pointRadius) : vn(R, "point_count", !1),
10499
10420
  "circle-pitch-alignment": p ? "viewport" : "map",
10500
10421
  "circle-pitch-scale": "map",
10501
10422
  // scale with camera distance regardless of viewport/biewport alignement
@@ -10503,7 +10424,7 @@ function cl(r, e) {
10503
10424
  ...m && {
10504
10425
  "circle-stroke-opacity": typeof f == "number" ? f : P(f),
10505
10426
  "circle-stroke-width": typeof d == "number" ? d : P(d),
10506
- "circle-stroke-color": typeof y == "string" ? y : Me(y)
10427
+ "circle-stroke-color": typeof y == "string" ? y : Ie(y)
10507
10428
  }
10508
10429
  },
10509
10430
  minzoom: b,
@@ -10527,7 +10448,7 @@ function cl(r, e) {
10527
10448
  ...m && {
10528
10449
  "circle-stroke-opacity": typeof f == "number" ? f : P(f),
10529
10450
  "circle-stroke-width": typeof d == "number" ? d : P(d),
10530
- "circle-stroke-color": typeof y == "string" ? y : Me(y)
10451
+ "circle-stroke-color": typeof y == "string" ? y : Ie(y)
10531
10452
  }
10532
10453
  },
10533
10454
  minzoom: b,
@@ -10536,7 +10457,7 @@ function cl(r, e) {
10536
10457
  e.beforeId
10537
10458
  );
10538
10459
  } else {
10539
- let R = typeof e.pointColor == "string" ? e.pointColor : Array.isArray(e.pointColor) ? e.pointColor.getColorHex(e.pointColor.getBounds().min) : Mr(), ae = typeof e.pointRadius == "number" ? w ? P([
10460
+ let R = typeof e.pointColor == "string" ? e.pointColor : Array.isArray(e.pointColor) ? e.pointColor.getColorHex(e.pointColor.getBounds().min) : Ir(), ae = typeof e.pointRadius == "number" ? w ? P([
10540
10461
  { zoom: 0, value: e.pointRadius * 0.025 },
10541
10462
  { zoom: 2, value: e.pointRadius * 0.05 },
10542
10463
  { zoom: 4, value: e.pointRadius * 0.1 },
@@ -10558,7 +10479,7 @@ function cl(r, e) {
10558
10479
  color: typeof e.pointColor == "string" ? e.pointColor : i.getColorHex(tt)
10559
10480
  };
10560
10481
  });
10561
- R = vn(we, e.property), ae = bn(we, e.property, w);
10482
+ R = gn(we, e.property), ae = vn(we, e.property, w);
10562
10483
  }
10563
10484
  r.addLayer(
10564
10485
  {
@@ -10579,7 +10500,7 @@ function cl(r, e) {
10579
10500
  ...m && {
10580
10501
  "circle-stroke-opacity": typeof f == "number" ? f : P(f),
10581
10502
  "circle-stroke-width": typeof d == "number" ? d : P(d),
10582
- "circle-stroke-color": typeof y == "string" ? y : Me(y)
10503
+ "circle-stroke-color": typeof y == "string" ? y : Ie(y)
10583
10504
  }
10584
10505
  },
10585
10506
  minzoom: b,
@@ -10617,7 +10538,7 @@ function cl(r, e) {
10617
10538
  }
10618
10539
  return j;
10619
10540
  }
10620
- function pl(r, e) {
10541
+ function ul(r, e) {
10621
10542
  if (e.layerId && r.getLayer(e.layerId))
10622
10543
  throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
10623
10544
  const t = e.sourceId ?? zt(), n = e.layerId ?? _t(), a = e.minzoom ?? 0, o = e.maxzoom ?? 23, i = e.zoomCompensation ?? !0, s = e.opacity ?? [
@@ -10626,7 +10547,7 @@ function pl(r, e) {
10626
10547
  { zoom: o - 0.25, value: 1 },
10627
10548
  { zoom: o, value: 0 }
10628
10549
  ];
10629
- let l = Array.isArray(e.colorRamp) ? e.colorRamp : va.TURBO.transparentStart();
10550
+ let l = Array.isArray(e.colorRamp) ? e.colorRamp : ha.TURBO.transparentStart();
10630
10551
  const u = l.getBounds();
10631
10552
  (u.min !== 0 || u.max !== 1) && (l = l.scale(0, 1)), l.hasTransparentStart() || (l = l.transparentStart());
10632
10553
  const c = e.intensity ?? [
@@ -10637,7 +10558,7 @@ function pl(r, e) {
10637
10558
  let f = 1;
10638
10559
  p ? typeof m == "number" ? (f = m, typeof e.weight == "number" && console.warn(
10639
10560
  "The option `.property` is ignored when `.propertyValueWeights` is not of type `PropertyValueWeights`"
10640
- )) : Array.isArray(m) ? f = al(m, p) : console.warn(
10561
+ )) : Array.isArray(m) ? f = rl(m, p) : console.warn(
10641
10562
  "The option `.property` is ignored when `.propertyValueWeights` is not of type `PropertyValueWeights`"
10642
10563
  ) : typeof m == "number" ? f = m : Array.isArray(m) && console.warn("The options `.propertyValueWeights` can only be used when `.property` is provided.");
10643
10564
  const d = [
@@ -10648,7 +10569,7 @@ function pl(r, e) {
10648
10569
  { zoom: 16, value: 50 }
10649
10570
  ], y = e.radius ?? (i ? d : 10);
10650
10571
  let v = 1;
10651
- typeof y == "number" ? v = y : Array.isArray(y) && "zoom" in y[0] ? v = P(y) : p && Array.isArray(y) && "propertyValue" in y[0] ? v = ol(y, p, i) : !p && Array.isArray(y) && "propertyValue" in y[0] ? (v = P(d), console.warn("The option `.radius` can only be property-driven if the option `.property` is provided.")) : v = P(d);
10572
+ typeof y == "number" ? v = y : Array.isArray(y) && "zoom" in y[0] ? v = P(y) : p && Array.isArray(y) && "propertyValue" in y[0] ? v = nl(y, p, i) : !p && Array.isArray(y) && "propertyValue" in y[0] ? (v = P(d), console.warn("The option `.radius` can only be property-driven if the option `.property` is provided.")) : v = P(d);
10652
10573
  const w = {
10653
10574
  heatmapLayerId: n,
10654
10575
  heatmapSourceId: t
@@ -10670,7 +10591,7 @@ function pl(r, e) {
10670
10591
  paint: {
10671
10592
  "heatmap-weight": f,
10672
10593
  "heatmap-intensity": typeof c == "number" ? c : P(c),
10673
- "heatmap-color": il(l),
10594
+ "heatmap-color": al(l),
10674
10595
  "heatmap-radius": v,
10675
10596
  "heatmap-opacity": typeof s == "number" ? s : P(s)
10676
10597
  }
@@ -10678,176 +10599,176 @@ function pl(r, e) {
10678
10599
  e.beforeId
10679
10600
  ), w;
10680
10601
  }
10681
- const Ol = {
10682
- addPolyline: sl,
10683
- addPolygon: ul,
10684
- addPoint: cl,
10685
- addHeatmap: pl,
10686
- takeScreenshot: tl
10602
+ const Nl = {
10603
+ addPolyline: ol,
10604
+ addPolygon: sl,
10605
+ addPoint: ll,
10606
+ addHeatmap: ul,
10607
+ takeScreenshot: Qs
10687
10608
  };
10688
- lo();
10689
- function Dl() {
10690
- return Sn.version;
10691
- }
10692
- const ql = S.Map, Ul = S.Marker, Bl = S.Popup, Vl = S.Style, Gl = S.CanvasSource, Hl = S.GeoJSONSource, Kl = S.ImageSource, Wl = S.RasterTileSource, Zl = S.RasterDEMTileSource, Jl = S.VectorTileSource, Yl = S.VideoSource, Xl = S.NavigationControl, Ql = S.GeolocateControl, eu = S.AttributionControl, tu = S.LogoControl, ru = S.ScaleControl, nu = S.FullscreenControl, au = S.TerrainControl, ou = S.BoxZoomHandler, iu = S.ScrollZoomHandler, su = S.CooperativeGesturesHandler, lu = S.KeyboardHandler, uu = S.TwoFingersTouchPitchHandler, cu = S.MapWheelEvent, pu = S.MapTouchEvent, fu = S.MapMouseEvent, du = S.config, yu = S.getVersion, {
10693
- setRTLTextPlugin: mu,
10694
- getRTLTextPluginStatus: hu,
10695
- LngLat: gu,
10696
- LngLatBounds: vu,
10697
- MercatorCoordinate: bu,
10698
- Evented: wu,
10699
- AJAXError: Su,
10700
- prewarm: xu,
10701
- clearPrewarmedResources: ku,
10702
- Hash: Lu,
10703
- Point: Cu,
10704
- EdgeInsets: Au,
10705
- DragRotateHandler: Tu,
10706
- DragPanHandler: Mu,
10707
- TwoFingersTouchZoomRotateHandler: Iu,
10708
- DoubleClickZoomHandler: Eu,
10709
- TwoFingersTouchZoomHandler: zu,
10710
- TwoFingersTouchRotateHandler: _u,
10711
- getWorkerCount: Pu,
10712
- setWorkerCount: Ru,
10713
- getMaxParallelImageRequests: $u,
10714
- setMaxParallelImageRequests: ju,
10715
- getWorkerUrl: Nu,
10716
- setWorkerUrl: Fu,
10717
- addSourceType: Ou,
10718
- importScriptInWorkers: Du,
10719
- addProtocol: qu,
10720
- removeProtocol: Uu
10609
+ io();
10610
+ function Fl() {
10611
+ return wn.version;
10612
+ }
10613
+ const Ol = S.Map, Dl = S.Marker, ql = S.Popup, Bl = S.Style, Ul = S.CanvasSource, Vl = S.GeoJSONSource, Gl = S.ImageSource, Hl = S.RasterTileSource, Kl = S.RasterDEMTileSource, Wl = S.VectorTileSource, Zl = S.VideoSource, Jl = S.NavigationControl, Yl = S.GeolocateControl, Xl = S.AttributionControl, Ql = S.LogoControl, eu = S.ScaleControl, tu = S.FullscreenControl, ru = S.TerrainControl, nu = S.BoxZoomHandler, au = S.ScrollZoomHandler, ou = S.CooperativeGesturesHandler, iu = S.KeyboardHandler, su = S.TwoFingersTouchPitchHandler, lu = S.MapWheelEvent, uu = S.MapTouchEvent, cu = S.MapMouseEvent, pu = S.config, fu = S.getVersion, {
10614
+ setRTLTextPlugin: du,
10615
+ getRTLTextPluginStatus: yu,
10616
+ LngLat: mu,
10617
+ LngLatBounds: hu,
10618
+ MercatorCoordinate: gu,
10619
+ Evented: vu,
10620
+ AJAXError: bu,
10621
+ prewarm: wu,
10622
+ clearPrewarmedResources: Su,
10623
+ Hash: xu,
10624
+ Point: ku,
10625
+ EdgeInsets: Lu,
10626
+ DragRotateHandler: Cu,
10627
+ DragPanHandler: Au,
10628
+ TwoFingersTouchZoomRotateHandler: Tu,
10629
+ DoubleClickZoomHandler: Iu,
10630
+ TwoFingersTouchZoomHandler: Eu,
10631
+ TwoFingersTouchRotateHandler: Mu,
10632
+ getWorkerCount: zu,
10633
+ setWorkerCount: _u,
10634
+ getMaxParallelImageRequests: Pu,
10635
+ setMaxParallelImageRequests: Ru,
10636
+ getWorkerUrl: $u,
10637
+ setWorkerUrl: ju,
10638
+ addSourceType: Nu,
10639
+ importScriptInWorkers: Fu,
10640
+ addProtocol: Ou,
10641
+ removeProtocol: Du
10721
10642
  } = S;
10722
10643
  export {
10723
- Su as AJAXError,
10724
- Il as AttributionControl,
10725
- eu as AttributionControlMLGL,
10726
- zl as BoxZoomHandler,
10727
- ou as BoxZoomHandlerMLGL,
10728
- xl as CanvasSource,
10729
- Gl as CanvasSourceMLGL,
10644
+ bu as AJAXError,
10645
+ Tl as AttributionControl,
10646
+ Xl as AttributionControlMLGL,
10647
+ El as BoxZoomHandler,
10648
+ nu as BoxZoomHandlerMLGL,
10649
+ wl as CanvasSource,
10650
+ Ul as CanvasSourceMLGL,
10730
10651
  x as ColorRamp,
10731
- va as ColorRampCollection,
10732
- Pl as CooperativeGesturesHandler,
10733
- su as CooperativeGesturesHandlerMLGL,
10734
- Eu as DoubleClickZoomHandler,
10735
- Mu as DragPanHandler,
10736
- Tu as DragRotateHandler,
10737
- Au as EdgeInsets,
10738
- wu as Evented,
10739
- Ao as FullscreenControl,
10740
- nu as FullscreenControlMLGL,
10741
- kl as GeoJSONSource,
10742
- Hl as GeoJSONSourceMLGL,
10743
- ko as GeolocateControl,
10744
- Ql as GeolocateControlMLGL,
10745
- Vs as GeolocationType,
10746
- Lu as Hash,
10747
- Ll as ImageSource,
10748
- Kl as ImageSourceMLGL,
10749
- Rl as KeyboardHandler,
10750
- lu as KeyboardHandlerMLGL,
10751
- E as Language,
10752
- gu as LngLat,
10753
- vu as LngLatBounds,
10754
- Lo as LogoControl,
10755
- tu as LogoControlMLGL,
10756
- Gs as Map,
10757
- ql as MapMLGL,
10758
- Fl as MapMouseEvent,
10759
- fu as MapMouseEventMLGL,
10760
- Gu as MapStyle,
10761
- Hu as MapStyleVariant,
10762
- Nl as MapTouchEvent,
10763
- pu as MapTouchEventMLGL,
10764
- jl as MapWheelEvent,
10765
- cu as MapWheelEventMLGL,
10766
- qs as MaptilerGeolocateControl,
10652
+ ha as ColorRampCollection,
10653
+ zl as CooperativeGesturesHandler,
10654
+ ou as CooperativeGesturesHandlerMLGL,
10655
+ Iu as DoubleClickZoomHandler,
10656
+ Au as DragPanHandler,
10657
+ Cu as DragRotateHandler,
10658
+ Lu as EdgeInsets,
10659
+ vu as Evented,
10660
+ Lo as FullscreenControl,
10661
+ tu as FullscreenControlMLGL,
10662
+ Sl as GeoJSONSource,
10663
+ Vl as GeoJSONSourceMLGL,
10664
+ So as GeolocateControl,
10665
+ Yl as GeolocateControlMLGL,
10666
+ Bs as GeolocationType,
10667
+ xu as Hash,
10668
+ xl as ImageSource,
10669
+ Gl as ImageSourceMLGL,
10670
+ _l as KeyboardHandler,
10671
+ iu as KeyboardHandlerMLGL,
10672
+ M as Language,
10673
+ mu as LngLat,
10674
+ hu as LngLatBounds,
10675
+ xo as LogoControl,
10676
+ Ql as LogoControlMLGL,
10677
+ Us as Map,
10678
+ Ol as MapMLGL,
10679
+ jl as MapMouseEvent,
10680
+ cu as MapMouseEventMLGL,
10681
+ Uu as MapStyle,
10682
+ Vu as MapStyleVariant,
10683
+ $l as MapTouchEvent,
10684
+ uu as MapTouchEventMLGL,
10685
+ Rl as MapWheelEvent,
10686
+ lu as MapWheelEventMLGL,
10687
+ Os as MaptilerGeolocateControl,
10767
10688
  Or as MaptilerLogoControl,
10768
- Os as MaptilerNavigationControl,
10769
- Us as MaptilerProjectionControl,
10770
- Fs as MaptilerTerrainControl,
10771
- vl as Marker,
10772
- Ul as MarkerMLGL,
10773
- bu as MercatorCoordinate,
10774
- Xl as NavigationControMLGL,
10775
- xo as NavigationControl,
10776
- Cu as Point,
10777
- wl as Popup,
10778
- Bl as PopupMLGL,
10779
- Al as RasterDEMTileSource,
10780
- Zl as RasterDEMTileSourceMLGL,
10781
- Cl as RasterTileSource,
10782
- Wl as RasterTileSourceMLGL,
10783
- Ku as ReferenceMapStyle,
10784
- Co as ScaleControl,
10785
- ru as ScaleControlMLGL,
10786
- _l as ScrollZoomHandler,
10787
- iu as ScrollZoomHandlerMLGL,
10788
- to as SdkConfig,
10789
- Wu as ServiceError,
10790
- Sl as Style,
10791
- Vl as StyleMLGL,
10792
- au as TerrainControMLGL,
10793
- El as TerrainControl,
10794
- $l as TwoFingersTouchPitchHandler,
10795
- uu as TwoFingersTouchPitchHandlerMLGL,
10796
- _u as TwoFingersTouchRotateHandler,
10797
- zu as TwoFingersTouchZoomHandler,
10798
- Iu as TwoFingersTouchZoomRotateHandler,
10799
- Tl as VectorTileSource,
10800
- Jl as VectorTileSourceMLGL,
10801
- Ml as VideoSource,
10802
- Yl as VideoSourceMLGL,
10803
- qu as addProtocol,
10804
- Ou as addSourceType,
10805
- Zu as areSameLanguages,
10806
- Ju as bufferToPixelDataBrowser,
10807
- Yu as circumferenceAtLatitude,
10808
- ku as clearPrewarmedResources,
10689
+ Ns as MaptilerNavigationControl,
10690
+ Ds as MaptilerProjectionControl,
10691
+ js as MaptilerTerrainControl,
10692
+ hl as Marker,
10693
+ Dl as MarkerMLGL,
10694
+ gu as MercatorCoordinate,
10695
+ Jl as NavigationControMLGL,
10696
+ wo as NavigationControl,
10697
+ ku as Point,
10698
+ vl as Popup,
10699
+ ql as PopupMLGL,
10700
+ Ll as RasterDEMTileSource,
10701
+ Kl as RasterDEMTileSourceMLGL,
10702
+ kl as RasterTileSource,
10703
+ Hl as RasterTileSourceMLGL,
10704
+ Gu as ReferenceMapStyle,
10705
+ ko as ScaleControl,
10706
+ eu as ScaleControlMLGL,
10707
+ Ml as ScrollZoomHandler,
10708
+ au as ScrollZoomHandlerMLGL,
10709
+ Qa as SdkConfig,
10710
+ Hu as ServiceError,
10711
+ bl as Style,
10712
+ Bl as StyleMLGL,
10713
+ ru as TerrainControMLGL,
10714
+ Il as TerrainControl,
10715
+ Pl as TwoFingersTouchPitchHandler,
10716
+ su as TwoFingersTouchPitchHandlerMLGL,
10717
+ Mu as TwoFingersTouchRotateHandler,
10718
+ Eu as TwoFingersTouchZoomHandler,
10719
+ Tu as TwoFingersTouchZoomRotateHandler,
10720
+ Cl as VectorTileSource,
10721
+ Wl as VectorTileSourceMLGL,
10722
+ Al as VideoSource,
10723
+ Zl as VideoSourceMLGL,
10724
+ Ou as addProtocol,
10725
+ Nu as addSourceType,
10726
+ Ku as areSameLanguages,
10727
+ Wu as bufferToPixelDataBrowser,
10728
+ Zu as circumferenceAtLatitude,
10729
+ Su as clearPrewarmedResources,
10809
10730
  F as config,
10810
- du as configMLGL,
10811
- Xu as coordinates,
10812
- Qu as data,
10813
- ec as elevation,
10814
- tc as expandMapStyle,
10815
- rc as geocoding,
10816
- nc as geolocation,
10817
- ac as getAutoLanguage,
10731
+ pu as configMLGL,
10732
+ Ju as coordinates,
10733
+ Yu as data,
10734
+ Xu as elevation,
10735
+ Qu as expandMapStyle,
10736
+ ec as geocoding,
10737
+ tc as geolocation,
10738
+ rc as getAutoLanguage,
10818
10739
  Pr as getBrowserLanguage,
10819
- oc as getBufferToPixelDataParser,
10820
- ic as getLanguageInfoFromCode,
10821
- sc as getLanguageInfoFromFlag,
10822
- lc as getLanguageInfoFromKey,
10823
- yu as getMapLibreVersion,
10824
- $u as getMaxParallelImageRequests,
10825
- hu as getRTLTextPluginStatus,
10826
- uc as getTileCache,
10827
- Dl as getVersion,
10828
- po as getWebGLSupportError,
10829
- Pu as getWorkerCount,
10830
- Nu as getWorkerUrl,
10831
- pa as gpx,
10832
- Qs as gpxOrKml,
10833
- ca as hasChildNodeWithName,
10834
- Ol as helpers,
10835
- Du as importScriptInWorkers,
10836
- cc as isLanguageInfo,
10837
- fa as kml,
10838
- pc as mapStylePresetList,
10839
- fc as math,
10840
- dc as misc,
10841
- xu as prewarm,
10842
- Uu as removeProtocol,
10843
- ju as setMaxParallelImageRequests,
10844
- mu as setRTLTextPlugin,
10845
- Ru as setWorkerCount,
10846
- Fu as setWorkerUrl,
10847
- yc as staticMaps,
10740
+ nc as getBufferToPixelDataParser,
10741
+ ac as getLanguageInfoFromCode,
10742
+ oc as getLanguageInfoFromFlag,
10743
+ ic as getLanguageInfoFromKey,
10744
+ fu as getMapLibreVersion,
10745
+ Pu as getMaxParallelImageRequests,
10746
+ yu as getRTLTextPluginStatus,
10747
+ sc as getTileCache,
10748
+ Fl as getVersion,
10749
+ uo as getWebGLSupportError,
10750
+ zu as getWorkerCount,
10751
+ $u as getWorkerUrl,
10752
+ ua as gpx,
10753
+ Ys as gpxOrKml,
10754
+ la as hasChildNodeWithName,
10755
+ Nl as helpers,
10756
+ Fu as importScriptInWorkers,
10757
+ lc as isLanguageInfo,
10758
+ ca as kml,
10759
+ uc as mapStylePresetList,
10760
+ cc as math,
10761
+ pc as misc,
10762
+ wu as prewarm,
10763
+ Du as removeProtocol,
10764
+ Ru as setMaxParallelImageRequests,
10765
+ du as setRTLTextPlugin,
10766
+ _u as setWorkerCount,
10767
+ ju as setWorkerUrl,
10768
+ fc as staticMaps,
10848
10769
  Ar as str2xml,
10849
- mc as styleToStyle,
10850
- hc as toLanguageInfo,
10851
- pn as xml2str
10770
+ dc as styleToStyle,
10771
+ yc as toLanguageInfo,
10772
+ cn as xml2str
10852
10773
  };
10853
10774
  //# sourceMappingURL=maptiler-sdk.mjs.map