@maptiler/sdk 3.1.1 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,7 @@ var L = (r, e, t) => za(r, typeof e != "symbol" ? e + "" : e, t), Rt = (r, e, t)
7
7
  var E = (r, e, t) => (Rt(r, e, "read from private field"), t ? t.call(r) : e.get(r)), ye = (r, e, t) => e.has(r) ? jr("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), xe = (r, e, t, n) => (Rt(r, e, "write to private field"), n ? n.call(r, t) : e.set(r, t), t), G = (r, e, t) => (Rt(r, e, "access private method"), t);
8
8
  import S, { addProtocol as Nr } from "maplibre-gl";
9
9
  import { Language as Pa, getLanguageInfoFromCode as Or, config as $t, MapStyle as qe, mapStylePresetList as jt, expandMapStyle as Ra, MapStyleVariant as $a, ReferenceMapStyle as ja, toLanguageInfo as Fr, getLanguageInfoFromFlag as Na, geolocation as Dr } 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";
10
+ import { MapStyle as Vu, MapStyleVariant as Gu, ReferenceMapStyle as Hu, ServiceError as Ku, areSameLanguages as Wu, bufferToPixelDataBrowser as Zu, circumferenceAtLatitude as Ju, coordinates as Yu, data as Xu, elevation as Qu, expandMapStyle as ec, geocoding as tc, geolocation as rc, getAutoLanguage as nc, getBufferToPixelDataParser as ac, getLanguageInfoFromCode as oc, getLanguageInfoFromFlag as ic, getLanguageInfoFromKey as sc, getTileCache as lc, isLanguageInfo as uc, mapStylePresetList as cc, math as pc, misc as fc, staticMaps as dc, styleToStyle as yc, toLanguageInfo as mc } from "@maptiler/client";
11
11
  import Oa from "events";
12
12
  import { v4 as Fa } from "uuid";
13
13
  import { Base64 as Da } from "js-base64";
@@ -212,10 +212,10 @@ function Ka() {
212
212
  n.searchParams.delete("mtsid"), n.searchParams.delete("key");
213
213
  const a = n.toString(), o = new URL(t);
214
214
  o.searchParams.delete("last-modified");
215
- const i = o.toString(), s = async (m) => ({
216
- data: await m.arrayBuffer(),
217
- cacheControl: m.headers.get("Cache-Control"),
218
- expires: m.headers.get("Expires")
215
+ const i = o.toString(), s = async (y) => ({
216
+ data: await y.arrayBuffer(),
217
+ cacheControl: y.headers.get("Cache-Control"),
218
+ expires: y.headers.get("Expires")
219
219
  }), l = await xn(), u = await l.match(a);
220
220
  if (u)
221
221
  return s(u);
@@ -289,7 +289,7 @@ function Xa(r) {
289
289
  const n = document.createElement("div");
290
290
  throw n.innerHTML = e, n.classList.add("webgl-warning-div"), t.appendChild(n), new Error(e);
291
291
  }
292
- function ml(r) {
292
+ function hl(r) {
293
293
  const e = "The WebGL context was lost.", t = r.getContainer(), n = document.createElement("div");
294
294
  n.innerHTML = e, n.classList.add("webgl-warning-div"), t.appendChild(n);
295
295
  }
@@ -371,52 +371,52 @@ function oo(r, e) {
371
371
  o === null ? a.unlocalized += 1 : (o in a.localized || (a.localized[o] = 0), a.localized[o] += 1);
372
372
  return a;
373
373
  }
374
- let hl = class extends S.Marker {
374
+ let gl = class extends S.Marker {
375
375
  addTo(e) {
376
376
  return super.addTo(e);
377
377
  }
378
378
  };
379
- class vl extends S.Popup {
379
+ class bl extends S.Popup {
380
380
  addTo(e) {
381
381
  return super.addTo(e);
382
382
  }
383
383
  }
384
- class bl extends S.Style {
384
+ class wl extends S.Style {
385
385
  constructor(e, t = {}) {
386
386
  super(e, t);
387
387
  }
388
388
  }
389
- class wl extends S.CanvasSource {
389
+ class Sl extends S.CanvasSource {
390
390
  onAdd(e) {
391
391
  super.onAdd(e);
392
392
  }
393
393
  }
394
- class Sl extends S.GeoJSONSource {
394
+ class xl extends S.GeoJSONSource {
395
395
  onAdd(e) {
396
396
  super.onAdd(e);
397
397
  }
398
398
  }
399
- class xl extends S.ImageSource {
399
+ class kl extends S.ImageSource {
400
400
  onAdd(e) {
401
401
  super.onAdd(e);
402
402
  }
403
403
  }
404
- class kl extends S.RasterTileSource {
404
+ class Ll extends S.RasterTileSource {
405
405
  onAdd(e) {
406
406
  super.onAdd(e);
407
407
  }
408
408
  }
409
- class Ll extends S.RasterDEMTileSource {
409
+ class Cl extends S.RasterDEMTileSource {
410
410
  onAdd(e) {
411
411
  super.onAdd(e);
412
412
  }
413
413
  }
414
- class Cl extends S.VectorTileSource {
414
+ class Al extends S.VectorTileSource {
415
415
  onAdd(e) {
416
416
  super.onAdd(e);
417
417
  }
418
418
  }
419
- class Al extends S.VideoSource {
419
+ class Tl extends S.VideoSource {
420
420
  onAdd(e) {
421
421
  super.onAdd(e);
422
422
  }
@@ -431,7 +431,7 @@ class so extends S.GeolocateControl {
431
431
  return super.onAdd(e);
432
432
  }
433
433
  }
434
- class Tl extends S.AttributionControl {
434
+ class Il extends S.AttributionControl {
435
435
  onAdd(e) {
436
436
  return super.onAdd(e);
437
437
  }
@@ -451,47 +451,47 @@ class co extends S.FullscreenControl {
451
451
  return super.onAdd(e);
452
452
  }
453
453
  }
454
- class Il extends S.TerrainControl {
454
+ class El extends S.TerrainControl {
455
455
  onAdd(e) {
456
456
  return super.onAdd(e);
457
457
  }
458
458
  }
459
- class El extends S.BoxZoomHandler {
459
+ class Ml extends S.BoxZoomHandler {
460
460
  constructor(e, t) {
461
461
  super(e, t);
462
462
  }
463
463
  }
464
- class Ml extends S.ScrollZoomHandler {
464
+ class _l extends S.ScrollZoomHandler {
465
465
  constructor(e, t) {
466
466
  super(e, t);
467
467
  }
468
468
  }
469
- class _l extends S.CooperativeGesturesHandler {
469
+ class zl extends S.CooperativeGesturesHandler {
470
470
  constructor(e, t) {
471
471
  super(e, t);
472
472
  }
473
473
  }
474
- class zl extends S.KeyboardHandler {
474
+ class Pl extends S.KeyboardHandler {
475
475
  constructor(e) {
476
476
  super(e);
477
477
  }
478
478
  }
479
- class Pl extends S.TwoFingersTouchPitchHandler {
479
+ class Rl extends S.TwoFingersTouchPitchHandler {
480
480
  constructor(e) {
481
481
  super(e);
482
482
  }
483
483
  }
484
- class Rl extends S.MapWheelEvent {
484
+ class $l extends S.MapWheelEvent {
485
485
  constructor(e, t, n) {
486
486
  super(e, t, n);
487
487
  }
488
488
  }
489
- class $l extends S.MapTouchEvent {
489
+ class jl extends S.MapTouchEvent {
490
490
  constructor(e, t, n) {
491
491
  super(e, t, n);
492
492
  }
493
493
  }
494
- class jl extends S.MapMouseEvent {
494
+ class Nl extends S.MapMouseEvent {
495
495
  constructor(e, t, n, a = {}) {
496
496
  super(e, t, n, a);
497
497
  }
@@ -3669,19 +3669,19 @@ function si(r) {
3669
3669
  // <numeric>
3670
3670
  p,
3671
3671
  // % (optional)
3672
- m,
3672
+ y,
3673
3673
  // , (optional)
3674
3674
  f,
3675
3675
  // <numeric>
3676
3676
  d,
3677
3677
  // % (optional)
3678
- y,
3678
+ m,
3679
3679
  // ,|/ (optional)
3680
3680
  v,
3681
3681
  // <numeric> (optional)
3682
3682
  w
3683
3683
  // % (optional)
3684
- ] = o, b = [u || " ", m || " ", y].join("");
3684
+ ] = o, b = [u || " ", y || " ", m].join("");
3685
3685
  if (b === " " || b === " /" || b === ",," || b === ",,,") {
3686
3686
  const T = [l, p, d].join(""), j = T === "%%%" ? 100 : T === "" ? 255 : 0;
3687
3687
  if (j) {
@@ -3717,7 +3717,7 @@ function si(r) {
3717
3717
  // ,|/ (optional)
3718
3718
  p,
3719
3719
  // <numeric> (optional)
3720
- m
3720
+ y
3721
3721
  // % (optional)
3722
3722
  ] = n, f = [i || " ", l || " ", c].join("");
3723
3723
  if (f === " " || f === " /" || f === ",," || f === ",,,") {
@@ -3725,7 +3725,7 @@ function si(r) {
3725
3725
  +o,
3726
3726
  ze(+s, 0, 100),
3727
3727
  ze(+u, 0, 100),
3728
- p ? Kr(+p, m) : 1
3728
+ p ? Kr(+p, y) : 1
3729
3729
  ];
3730
3730
  if (Wr(d))
3731
3731
  return ii(d);
@@ -4003,19 +4003,19 @@ class $ {
4003
4003
  return new $(o, i, s, l, !1);
4004
4004
  }
4005
4005
  case "hcl": {
4006
- const [o, i, s, l] = e.hcl, [u, c, p, m] = t.hcl;
4006
+ const [o, i, s, l] = e.hcl, [u, c, p, y] = t.hcl;
4007
4007
  let f, d;
4008
4008
  if (!isNaN(o) && !isNaN(u)) {
4009
4009
  let T = u - o;
4010
4010
  u > o && T > 180 ? T -= 360 : u < o && o - u > 180 && (T += 360), f = o + n * T;
4011
4011
  } else isNaN(o) ? isNaN(u) ? f = NaN : (f = u, (s === 1 || s === 0) && (d = c)) : (f = o, (p === 1 || p === 0) && (d = i));
4012
- const [y, v, w, b] = oi([
4012
+ const [m, v, w, b] = oi([
4013
4013
  f,
4014
4014
  d ?? ve(i, c, n),
4015
4015
  ve(s, p, n),
4016
- ve(l, m, n)
4016
+ ve(l, y, n)
4017
4017
  ]);
4018
- return new $(y, v, w, b, !1);
4018
+ return new $(m, v, w, b, !1);
4019
4019
  }
4020
4020
  case "lab": {
4021
4021
  const [o, i, s, l] = _n(Ge(e.lab, t.lab, n));
@@ -4039,9 +4039,10 @@ class fr {
4039
4039
  return new Intl.Collator(this.locale ? this.locale : []).resolvedOptions().locale;
4040
4040
  }
4041
4041
  }
4042
+ const ui = ["bottom", "center", "top"];
4042
4043
  class Jt {
4043
- constructor(e, t, n, a, o) {
4044
- this.text = e, this.image = t, this.scale = n, this.fontStack = a, this.textColor = o;
4044
+ constructor(e, t, n, a, o, i) {
4045
+ this.text = e, this.image = t, this.scale = n, this.fontStack = a, this.textColor = o, this.verticalAlign = i;
4045
4046
  }
4046
4047
  }
4047
4048
  class pe {
@@ -4049,7 +4050,7 @@ class pe {
4049
4050
  this.sections = e;
4050
4051
  }
4051
4052
  static fromString(e) {
4052
- return new pe([new Jt(e, null, null, null, null)]);
4053
+ return new pe([new Jt(e, null, null, null, null, null)]);
4053
4054
  }
4054
4055
  isEmpty() {
4055
4056
  return this.sections.length === 0 ? !0 : !this.sections.some((e) => e.text.length !== 0 || e.image && e.image.name.length !== 0);
@@ -4108,7 +4109,7 @@ class D {
4108
4109
  return this.message;
4109
4110
  }
4110
4111
  }
4111
- const ui = /* @__PURE__ */ new Set(["center", "left", "right", "top", "bottom", "top-left", "top-right", "bottom-left", "bottom-right"]);
4112
+ const ci = /* @__PURE__ */ new Set(["center", "left", "right", "top", "bottom", "top-left", "top-right", "bottom-left", "bottom-right"]);
4112
4113
  class ne {
4113
4114
  constructor(e) {
4114
4115
  this.values = e.slice();
@@ -4119,7 +4120,7 @@ class ne {
4119
4120
  if (!(!Array.isArray(e) || e.length < 1 || e.length % 2 !== 0)) {
4120
4121
  for (let t = 0; t < e.length; t += 2) {
4121
4122
  const n = e[t], a = e[t + 1];
4122
- if (typeof n != "string" || !ui.has(n) || !Array.isArray(a) || a.length !== 2 || typeof a[0] != "number" || typeof a[1] != "number")
4123
+ if (typeof n != "string" || !ci.has(n) || !Array.isArray(a) || a.length !== 2 || typeof a[0] != "number" || typeof a[1] != "number")
4123
4124
  return;
4124
4125
  }
4125
4126
  return new ne(e);
@@ -4414,7 +4415,7 @@ class ge {
4414
4415
  return this.args.every((e) => e.outputDefined());
4415
4416
  }
4416
4417
  }
4417
- const ci = ["Unknown", "Point", "LineString", "Polygon"];
4418
+ const pi = ["Unknown", "Point", "LineString", "Polygon"];
4418
4419
  class Pn {
4419
4420
  constructor() {
4420
4421
  this.globals = null, this.feature = null, this.featureState = null, this.formattedSection = null, this._parseColorCache = {}, this.availableImages = null, this.canonical = null;
@@ -4423,7 +4424,7 @@ class Pn {
4423
4424
  return this.feature && "id" in this.feature ? this.feature.id : null;
4424
4425
  }
4425
4426
  geometryType() {
4426
- return this.feature ? typeof this.feature.type == "number" ? ci[this.feature.type] : this.feature.type : null;
4427
+ return this.feature ? typeof this.feature.type == "number" ? pi[this.feature.type] : this.feature.type : null;
4427
4428
  }
4428
4429
  geometry() {
4429
4430
  return this.feature && "geometry" in this.feature ? this.feature.geometry : null;
@@ -4697,22 +4698,22 @@ class mr {
4697
4698
  let c = e[u];
4698
4699
  const p = e[u + 1];
4699
4700
  Array.isArray(c) || (c = [c]);
4700
- const m = t.concat(u);
4701
+ const y = t.concat(u);
4701
4702
  if (c.length === 0)
4702
- return m.error("Expected at least one branch label.");
4703
+ return y.error("Expected at least one branch label.");
4703
4704
  for (const d of c) {
4704
4705
  if (typeof d != "number" && typeof d != "string")
4705
- return m.error("Branch labels must be numbers or strings.");
4706
+ return y.error("Branch labels must be numbers or strings.");
4706
4707
  if (typeof d == "number" && Math.abs(d) > Number.MAX_SAFE_INTEGER)
4707
- return m.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);
4708
+ return y.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);
4708
4709
  if (typeof d == "number" && Math.floor(d) !== d)
4709
- return m.error("Numeric branch labels must be integer values.");
4710
+ return y.error("Numeric branch labels must be integer values.");
4710
4711
  if (!n)
4711
4712
  n = q(d);
4712
- else if (m.checkSubtype(n, q(d)))
4713
+ else if (y.checkSubtype(n, q(d)))
4713
4714
  return null;
4714
4715
  if (typeof o[String(d)] < "u")
4715
- return m.error("Branch labels must be unique.");
4716
+ return y.error("Branch labels must be unique.");
4716
4717
  o[String(d)] = i.length;
4717
4718
  }
4718
4719
  const f = t.parse(p, u, a);
@@ -4880,11 +4881,11 @@ class It {
4880
4881
  return this.outputs.every((e) => e.outputDefined());
4881
4882
  }
4882
4883
  }
4883
- function pi(r) {
4884
+ function fi(r) {
4884
4885
  return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
4885
4886
  }
4886
4887
  var Bt, Jr;
4887
- function fi() {
4888
+ function di() {
4888
4889
  if (Jr) return Bt;
4889
4890
  Jr = 1, Bt = r;
4890
4891
  function r(e, t, n, a) {
@@ -4920,7 +4921,7 @@ function fi() {
4920
4921
  }
4921
4922
  }, Bt;
4922
4923
  }
4923
- var di = fi(), yi = /* @__PURE__ */ pi(di);
4924
+ var yi = di(), mi = /* @__PURE__ */ fi(yi);
4924
4925
  class se {
4925
4926
  constructor(e, t, n, a, o) {
4926
4927
  this.type = e, this.operator = t, this.interpolation = n, this.input = a, this.labels = [], this.outputs = [];
@@ -4935,7 +4936,7 @@ class se {
4935
4936
  o = Ut(t, 1, n, a);
4936
4937
  else if (e.name === "cubic-bezier") {
4937
4938
  const i = e.controlPoints;
4938
- o = new yi(i[0], i[1], i[2], i[3]).solve(Ut(t, 1, n, a));
4939
+ o = new mi(i[0], i[1], i[2], i[3]).solve(Ut(t, 1, n, a));
4939
4940
  }
4940
4941
  return o;
4941
4942
  }
@@ -4973,11 +4974,11 @@ class se {
4973
4974
  let l = null;
4974
4975
  n === "interpolate-hcl" || n === "interpolate-lab" ? l = ie : t.expectedType && t.expectedType.kind !== "value" && (l = t.expectedType);
4975
4976
  for (let u = 0; u < i.length; u += 2) {
4976
- const c = i[u], p = i[u + 1], m = u + 3, f = u + 4;
4977
+ const c = i[u], p = i[u + 1], y = u + 3, f = u + 4;
4977
4978
  if (typeof c != "number")
4978
- return t.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.', m);
4979
+ return t.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.', y);
4979
4980
  if (s.length && s[s.length - 1][0] >= c)
4980
- return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.', m);
4981
+ return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.', y);
4981
4982
  const d = t.parse(p, f, l);
4982
4983
  if (!d)
4983
4984
  return null;
@@ -5070,40 +5071,40 @@ class Ke {
5070
5071
  function Yr(r, e) {
5071
5072
  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";
5072
5073
  }
5073
- function mi(r, e, t) {
5074
+ function hi(r, e, t) {
5074
5075
  return e === t;
5075
5076
  }
5076
- function hi(r, e, t) {
5077
+ function gi(r, e, t) {
5077
5078
  return e !== t;
5078
5079
  }
5079
- function gi(r, e, t) {
5080
+ function vi(r, e, t) {
5080
5081
  return e < t;
5081
5082
  }
5082
- function vi(r, e, t) {
5083
+ function bi(r, e, t) {
5083
5084
  return e > t;
5084
5085
  }
5085
- function bi(r, e, t) {
5086
+ function wi(r, e, t) {
5086
5087
  return e <= t;
5087
5088
  }
5088
- function wi(r, e, t) {
5089
+ function Si(r, e, t) {
5089
5090
  return e >= t;
5090
5091
  }
5091
5092
  function $n(r, e, t, n) {
5092
5093
  return n.compare(e, t) === 0;
5093
5094
  }
5094
- function Si(r, e, t, n) {
5095
+ function xi(r, e, t, n) {
5095
5096
  return !$n(r, e, t, n);
5096
5097
  }
5097
- function xi(r, e, t, n) {
5098
+ function ki(r, e, t, n) {
5098
5099
  return n.compare(e, t) < 0;
5099
5100
  }
5100
- function ki(r, e, t, n) {
5101
+ function Li(r, e, t, n) {
5101
5102
  return n.compare(e, t) > 0;
5102
5103
  }
5103
- function Li(r, e, t, n) {
5104
+ function Ci(r, e, t, n) {
5104
5105
  return n.compare(e, t) <= 0;
5105
5106
  }
5106
- function Ci(r, e, t, n) {
5107
+ function Ai(r, e, t, n) {
5107
5108
  return n.compare(e, t) >= 0;
5108
5109
  }
5109
5110
  function Oe(r, e, t) {
@@ -5160,7 +5161,7 @@ function Oe(r, e, t) {
5160
5161
  }
5161
5162
  };
5162
5163
  }
5163
- const Ai = Oe("==", mi, $n), Ti = Oe("!=", hi, Si), Ii = Oe("<", gi, xi), Ei = Oe(">", vi, ki), Mi = Oe("<=", bi, Li), _i = Oe(">=", wi, Ci);
5164
+ const Ti = Oe("==", hi, $n), Ii = Oe("!=", gi, xi), Ei = Oe("<", vi, ki), Mi = Oe(">", bi, Li), _i = Oe("<=", wi, Ci), zi = Oe(">=", Si, Ai);
5164
5165
  class Et {
5165
5166
  constructor(e, t, n) {
5166
5167
  this.type = St, this.locale = n, this.caseSensitive = e, this.diacriticSensitive = t;
@@ -5255,8 +5256,15 @@ class vr {
5255
5256
  let c = null;
5256
5257
  if (s["text-color"] && (c = t.parse(s["text-color"], 1, ie), !c))
5257
5258
  return null;
5258
- const p = a[a.length - 1];
5259
- p.scale = l, p.font = u, p.textColor = c;
5259
+ let p = null;
5260
+ if (s["vertical-align"]) {
5261
+ if (typeof s["vertical-align"] == "string" && !ui.includes(s["vertical-align"]))
5262
+ return t.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${s["vertical-align"]}' instead.`);
5263
+ if (p = t.parse(s["vertical-align"], 1, I), !p)
5264
+ return null;
5265
+ }
5266
+ const y = a[a.length - 1];
5267
+ y.scale = l, y.font = u, y.textColor = c, y.verticalAlign = p;
5260
5268
  } else {
5261
5269
  const l = t.parse(e[i], 1, A);
5262
5270
  if (!l)
@@ -5264,7 +5272,7 @@ class vr {
5264
5272
  const u = l.type.kind;
5265
5273
  if (u !== "string" && u !== "value" && u !== "null" && u !== "resolvedImage")
5266
5274
  return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");
5267
- o = !0, a.push({ content: l, scale: null, font: null, textColor: null });
5275
+ o = !0, a.push({ content: l, scale: null, font: null, textColor: null, verticalAlign: null });
5268
5276
  }
5269
5277
  }
5270
5278
  return new vr(a);
@@ -5272,13 +5280,13 @@ class vr {
5272
5280
  evaluate(e) {
5273
5281
  const t = (n) => {
5274
5282
  const a = n.content.evaluate(e);
5275
- return q(a) === Xe ? new Jt("", a, null, null, null) : new Jt(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);
5283
+ return q(a) === Xe ? new Jt("", a, null, null, null, n.verticalAlign ? n.verticalAlign.evaluate(e) : null) : new Jt(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, n.verticalAlign ? n.verticalAlign.evaluate(e) : null);
5276
5284
  };
5277
5285
  return new pe(this.sections.map(t));
5278
5286
  }
5279
5287
  eachChild(e) {
5280
5288
  for (const t of this.sections)
5281
- e(t.content), t.scale && e(t.scale), t.font && e(t.font), t.textColor && e(t.textColor);
5289
+ e(t.content), t.scale && e(t.scale), t.font && e(t.font), t.textColor && e(t.textColor), t.verticalAlign && e(t.verticalAlign);
5282
5290
  }
5283
5291
  outputDefined() {
5284
5292
  return !1;
@@ -5331,24 +5339,24 @@ class wr {
5331
5339
  }
5332
5340
  }
5333
5341
  const le = 8192;
5334
- function zi(r, e) {
5335
- const t = Pi(r[0]), n = $i(r[1]), a = Math.pow(2, e.z);
5342
+ function Pi(r, e) {
5343
+ const t = Ri(r[0]), n = ji(r[1]), a = Math.pow(2, e.z);
5336
5344
  return [Math.round(t * a * le), Math.round(n * a * le)];
5337
5345
  }
5338
5346
  function Sr(r, e) {
5339
5347
  const t = Math.pow(2, e.z), n = (r[0] / le + e.x) / t, a = (r[1] / le + e.y) / t;
5340
- return [Ri(n), ji(a)];
5348
+ return [$i(n), Ni(a)];
5341
5349
  }
5342
- function Pi(r) {
5350
+ function Ri(r) {
5343
5351
  return (180 + r) / 360;
5344
5352
  }
5345
- function Ri(r) {
5353
+ function $i(r) {
5346
5354
  return r * 360 - 180;
5347
5355
  }
5348
- function $i(r) {
5356
+ function ji(r) {
5349
5357
  return (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + r * Math.PI / 360))) / 360;
5350
5358
  }
5351
- function ji(r) {
5359
+ function Ni(r) {
5352
5360
  return 360 / Math.PI * Math.atan(Math.exp((180 - r * 360) * Math.PI / 180)) - 90;
5353
5361
  }
5354
5362
  function Qe(r, e) {
@@ -5357,18 +5365,18 @@ function Qe(r, e) {
5357
5365
  function We(r, e) {
5358
5366
  return !(r[0] <= e[0] || r[2] >= e[2] || r[1] <= e[1] || r[3] >= e[3]);
5359
5367
  }
5360
- function Ni(r, e, t) {
5368
+ function Oi(r, e, t) {
5361
5369
  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];
5362
5370
  }
5363
- function Oi(r, e, t) {
5371
+ function Fi(r, e, t) {
5364
5372
  const n = r[0] - e[0], a = r[1] - e[1], o = r[0] - t[0], i = r[1] - t[1];
5365
5373
  return n * i - o * a === 0 && n * o <= 0 && a * i <= 0;
5366
5374
  }
5367
5375
  function Mt(r, e, t, n) {
5368
5376
  const a = [e[0] - r[0], e[1] - r[1]], o = [n[0] - t[0], n[1] - t[1]];
5369
- return Bi(o, a) === 0 ? !1 : !!(Xr(r, e, t, n) && Xr(t, n, r, e));
5377
+ return Ui(o, a) === 0 ? !1 : !!(Xr(r, e, t, n) && Xr(t, n, r, e));
5370
5378
  }
5371
- function Fi(r, e, t) {
5379
+ function Di(r, e, t) {
5372
5380
  for (const n of t)
5373
5381
  for (let a = 0; a < n.length - 1; ++a)
5374
5382
  if (Mt(r, e, n[a], n[a + 1]))
@@ -5379,13 +5387,13 @@ function Fe(r, e, t = !1) {
5379
5387
  let n = !1;
5380
5388
  for (const a of e)
5381
5389
  for (let o = 0; o < a.length - 1; o++) {
5382
- if (Oi(r, a[o], a[o + 1]))
5390
+ if (Fi(r, a[o], a[o + 1]))
5383
5391
  return t;
5384
- Ni(r, a[o], a[o + 1]) && (n = !n);
5392
+ Oi(r, a[o], a[o + 1]) && (n = !n);
5385
5393
  }
5386
5394
  return n;
5387
5395
  }
5388
- function Di(r, e) {
5396
+ function qi(r, e) {
5389
5397
  for (const t of e)
5390
5398
  if (Fe(r, t))
5391
5399
  return !0;
@@ -5396,17 +5404,17 @@ function Nn(r, e) {
5396
5404
  if (!Fe(t, e))
5397
5405
  return !1;
5398
5406
  for (let t = 0; t < r.length - 1; ++t)
5399
- if (Fi(r[t], r[t + 1], e))
5407
+ if (Di(r[t], r[t + 1], e))
5400
5408
  return !1;
5401
5409
  return !0;
5402
5410
  }
5403
- function qi(r, e) {
5411
+ function Bi(r, e) {
5404
5412
  for (const t of e)
5405
5413
  if (Nn(r, t))
5406
5414
  return !0;
5407
5415
  return !1;
5408
5416
  }
5409
- function Bi(r, e) {
5417
+ function Ui(r, e) {
5410
5418
  return r[0] * e[1] - r[1] * e[0];
5411
5419
  }
5412
5420
  function Xr(r, e, t, n) {
@@ -5418,7 +5426,7 @@ function xr(r, e, t) {
5418
5426
  for (let a = 0; a < r.length; a++) {
5419
5427
  const o = [];
5420
5428
  for (let i = 0; i < r[a].length; i++) {
5421
- const s = zi(r[a][i], t);
5429
+ const s = Pi(r[a][i], t);
5422
5430
  Qe(e, s), o.push(s);
5423
5431
  }
5424
5432
  n.push(o);
@@ -5441,7 +5449,7 @@ function Fn(r, e, t, n) {
5441
5449
  }
5442
5450
  Qe(e, r);
5443
5451
  }
5444
- function Ui(r) {
5452
+ function Vi(r) {
5445
5453
  r[0] = r[1] = 1 / 0, r[2] = r[3] = -1 / 0;
5446
5454
  }
5447
5455
  function Qr(r, e, t, n) {
@@ -5464,14 +5472,14 @@ function en(r, e, t, n) {
5464
5472
  i.push(l);
5465
5473
  }
5466
5474
  if (e[2] - e[0] <= a / 2) {
5467
- Ui(e);
5475
+ Vi(e);
5468
5476
  for (const s of i)
5469
5477
  for (const l of s)
5470
5478
  Fn(l, e, t, a);
5471
5479
  }
5472
5480
  return i;
5473
5481
  }
5474
- function Vi(r, e) {
5482
+ function Gi(r, e) {
5475
5483
  const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0], n = [1 / 0, 1 / 0, -1 / 0, -1 / 0], a = r.canonicalID();
5476
5484
  if (e.type === "Polygon") {
5477
5485
  const o = xr(e.coordinates, n, a), i = Qr(r.geometry(), t, n, a);
@@ -5486,12 +5494,12 @@ function Vi(r, e) {
5486
5494
  if (!We(t, n))
5487
5495
  return !1;
5488
5496
  for (const s of i)
5489
- if (!Di(s, o))
5497
+ if (!qi(s, o))
5490
5498
  return !1;
5491
5499
  }
5492
5500
  return !0;
5493
5501
  }
5494
- function Gi(r, e) {
5502
+ function Hi(r, e) {
5495
5503
  const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0], n = [1 / 0, 1 / 0, -1 / 0, -1 / 0], a = r.canonicalID();
5496
5504
  if (e.type === "Polygon") {
5497
5505
  const o = xr(e.coordinates, n, a), i = en(r.geometry(), t, n, a);
@@ -5506,7 +5514,7 @@ function Gi(r, e) {
5506
5514
  if (!We(t, n))
5507
5515
  return !1;
5508
5516
  for (const s of i)
5509
- if (!qi(s, o))
5517
+ if (!Bi(s, o))
5510
5518
  return !1;
5511
5519
  }
5512
5520
  return !0;
@@ -5545,9 +5553,9 @@ class Ae {
5545
5553
  evaluate(e) {
5546
5554
  if (e.geometry() != null && e.canonicalID() != null) {
5547
5555
  if (e.geometryType() === "Point")
5548
- return Vi(e, this.geometries);
5549
- if (e.geometryType() === "LineString")
5550
5556
  return Gi(e, this.geometries);
5557
+ if (e.geometryType() === "LineString")
5558
+ return Hi(e, this.geometries);
5551
5559
  }
5552
5560
  return !1;
5553
5561
  }
@@ -5593,27 +5601,27 @@ class Dn {
5593
5601
  t[e] = o;
5594
5602
  }
5595
5603
  }
5596
- function Hi(r, e) {
5604
+ function Ki(r, e) {
5597
5605
  if (r.length <= 1)
5598
5606
  return [r];
5599
5607
  const n = [];
5600
5608
  let a, o;
5601
5609
  for (const i of r) {
5602
- const s = Ki(i);
5610
+ const s = Wi(i);
5603
5611
  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));
5604
5612
  }
5605
5613
  return a && n.push(a), n;
5606
5614
  }
5607
- function Ki(r) {
5615
+ function Wi(r) {
5608
5616
  let e = 0;
5609
5617
  for (let t = 0, n = r.length, a = n - 1, o, i; t < n; a = t++)
5610
5618
  o = r[t], i = r[a], e += (i.x - o.x) * (o.y + i.y);
5611
5619
  return e;
5612
5620
  }
5613
- const Wi = 6378.137, tn = 1 / 298.257223563, rn = tn * (2 - tn), nn = Math.PI / 180;
5621
+ const Zi = 6378.137, tn = 1 / 298.257223563, rn = tn * (2 - tn), nn = Math.PI / 180;
5614
5622
  class kr {
5615
5623
  constructor(e) {
5616
- const t = nn * Wi * 1e3, n = Math.cos(e * nn), a = 1 / (1 - rn * (1 - n * n)), o = Math.sqrt(a);
5624
+ const t = nn * Zi * 1e3, n = Math.cos(e * nn), a = 1 / (1 - rn * (1 - n * n)), o = Math.sqrt(a);
5617
5625
  this.kx = t * o * n, this.ky = t * o * a * (1 - rn);
5618
5626
  }
5619
5627
  /**
@@ -5645,9 +5653,9 @@ class kr {
5645
5653
  pointOnLine(e, t) {
5646
5654
  let n = 1 / 0, a, o, i, s;
5647
5655
  for (let l = 0; l < e.length - 1; l++) {
5648
- let u = e[l][0], c = e[l][1], p = this.wrap(e[l + 1][0] - u) * this.kx, m = (e[l + 1][1] - c) * this.ky, f = 0;
5649
- (p !== 0 || m !== 0) && (f = (this.wrap(t[0] - u) * this.kx * p + (t[1] - c) * this.ky * m) / (p * p + m * m), f > 1 ? (u = e[l + 1][0], c = e[l + 1][1]) : f > 0 && (u += p / this.kx * f, c += m / this.ky * f)), p = this.wrap(t[0] - u) * this.kx, m = (t[1] - c) * this.ky;
5650
- const d = p * p + m * m;
5656
+ let u = e[l][0], c = e[l][1], p = this.wrap(e[l + 1][0] - u) * this.kx, y = (e[l + 1][1] - c) * this.ky, f = 0;
5657
+ (p !== 0 || y !== 0) && (f = (this.wrap(t[0] - u) * this.kx * p + (t[1] - c) * this.ky * y) / (p * p + y * y), f > 1 ? (u = e[l + 1][0], c = e[l + 1][1]) : f > 0 && (u += p / this.kx * f, c += y / this.ky * f)), p = this.wrap(t[0] - u) * this.kx, y = (t[1] - c) * this.ky;
5658
+ const d = p * p + y * y;
5651
5659
  d < n && (n = d, a = u, o = c, i = l, s = f);
5652
5660
  }
5653
5661
  return {
@@ -5727,22 +5735,22 @@ function Cr(r, e, t, n, a) {
5727
5735
  const o = Math.min(Le(r, [t, n], a), Le(e, [t, n], a)), i = Math.min(Le(t, [r, e], a), Le(n, [r, e], a));
5728
5736
  return Math.min(o, i);
5729
5737
  }
5730
- function Zi(r, e, t, n, a) {
5738
+ function Ji(r, e, t, n, a) {
5731
5739
  if (!(de(e, r.length) && de(n, t.length)))
5732
5740
  return 1 / 0;
5733
5741
  let i = 1 / 0;
5734
5742
  for (let s = e[0]; s < e[1]; ++s) {
5735
5743
  const l = r[s], u = r[s + 1];
5736
5744
  for (let c = n[0]; c < n[1]; ++c) {
5737
- const p = t[c], m = t[c + 1];
5738
- if (Mt(l, u, p, m))
5745
+ const p = t[c], y = t[c + 1];
5746
+ if (Mt(l, u, p, y))
5739
5747
  return 0;
5740
- i = Math.min(i, Cr(l, u, p, m, a));
5748
+ i = Math.min(i, Cr(l, u, p, y, a));
5741
5749
  }
5742
5750
  }
5743
5751
  return i;
5744
5752
  }
5745
- function Ji(r, e, t, n, a) {
5753
+ function Yi(r, e, t, n, a) {
5746
5754
  if (!(de(e, r.length) && de(n, t.length)))
5747
5755
  return NaN;
5748
5756
  let i = 1 / 0;
@@ -5752,7 +5760,7 @@ function Ji(r, e, t, n, a) {
5752
5760
  return i;
5753
5761
  return i;
5754
5762
  }
5755
- function Yi(r, e, t) {
5763
+ function Xi(r, e, t) {
5756
5764
  if (Fe(r, e, !0))
5757
5765
  return 0;
5758
5766
  let n = 1 / 0;
@@ -5766,7 +5774,7 @@ function Yi(r, e, t) {
5766
5774
  }
5767
5775
  return n;
5768
5776
  }
5769
- function Xi(r, e, t, n) {
5777
+ function Qi(r, e, t, n) {
5770
5778
  if (!de(e, r.length))
5771
5779
  return NaN;
5772
5780
  for (let o = e[0]; o <= e[1]; ++o)
@@ -5777,10 +5785,10 @@ function Xi(r, e, t, n) {
5777
5785
  const i = r[o], s = r[o + 1];
5778
5786
  for (const l of t)
5779
5787
  for (let u = 0, c = l.length, p = c - 1; u < c; p = u++) {
5780
- const m = l[p], f = l[u];
5781
- if (Mt(i, s, m, f))
5788
+ const y = l[p], f = l[u];
5789
+ if (Mt(i, s, y, f))
5782
5790
  return 0;
5783
- a = Math.min(a, Cr(i, s, m, f, n));
5791
+ a = Math.min(a, Cr(i, s, y, f, n));
5784
5792
  }
5785
5793
  }
5786
5794
  return a;
@@ -5792,7 +5800,7 @@ function on(r, e) {
5792
5800
  return !0;
5793
5801
  return !1;
5794
5802
  }
5795
- function Qi(r, e, t, n = 1 / 0) {
5803
+ function es(r, e, t, n = 1 / 0) {
5796
5804
  const a = tr(r), o = tr(e);
5797
5805
  if (n !== 1 / 0 && Lr(a, o, t) >= n)
5798
5806
  return n;
@@ -5804,13 +5812,13 @@ function Qi(r, e, t, n = 1 / 0) {
5804
5812
  let i = 1 / 0;
5805
5813
  for (const s of r)
5806
5814
  for (let l = 0, u = s.length, c = u - 1; l < u; c = l++) {
5807
- const p = s[c], m = s[l];
5815
+ const p = s[c], y = s[l];
5808
5816
  for (const f of e)
5809
- for (let d = 0, y = f.length, v = y - 1; d < y; v = d++) {
5817
+ for (let d = 0, m = f.length, v = m - 1; d < m; v = d++) {
5810
5818
  const w = f[v], b = f[d];
5811
- if (Mt(p, m, w, b))
5819
+ if (Mt(p, y, w, b))
5812
5820
  return 0;
5813
- i = Math.min(i, Cr(p, m, w, b, t));
5821
+ i = Math.min(i, Cr(p, y, w, b, t));
5814
5822
  }
5815
5823
  }
5816
5824
  return i;
@@ -5841,14 +5849,14 @@ function yt(r, e, t, n, a = 1 / 0) {
5841
5849
  if (!de(u, r.length))
5842
5850
  return NaN;
5843
5851
  if (e) {
5844
- const p = Xi(r, u, t, n);
5852
+ const p = Qi(r, u, t, n);
5845
5853
  if (isNaN(p) || p === 0)
5846
5854
  return p;
5847
5855
  o = Math.min(o, p);
5848
5856
  } else
5849
5857
  for (let p = u[0]; p <= u[1]; ++p) {
5850
- const m = Yi(r[p], t, n);
5851
- if (o = Math.min(o, m), o === 0)
5858
+ const y = Xi(r[p], t, n);
5859
+ if (o = Math.min(o, y), o === 0)
5852
5860
  return 0;
5853
5861
  }
5854
5862
  } else {
@@ -5867,25 +5875,25 @@ function mt(r, e, t, n, a, o = 1 / 0) {
5867
5875
  const l = s.pop();
5868
5876
  if (l[0] >= i)
5869
5877
  continue;
5870
- const u = l[1], c = l[2], p = e ? Xt : Yt, m = n ? Xt : Yt;
5871
- if (dt(u) <= p && dt(c) <= m) {
5878
+ const u = l[1], c = l[2], p = e ? Xt : Yt, y = n ? Xt : Yt;
5879
+ if (dt(u) <= p && dt(c) <= y) {
5872
5880
  if (!de(u, r.length) && de(c, t.length))
5873
5881
  return NaN;
5874
5882
  let f;
5875
5883
  if (e && n)
5876
- f = Zi(r, u, t, c, a), i = Math.min(i, f);
5884
+ f = Ji(r, u, t, c, a), i = Math.min(i, f);
5877
5885
  else if (e && !n) {
5878
5886
  const d = r.slice(u[0], u[1] + 1);
5879
- for (let y = c[0]; y <= c[1]; ++y)
5880
- if (f = Le(t[y], d, a), i = Math.min(i, f), i === 0)
5887
+ for (let m = c[0]; m <= c[1]; ++m)
5888
+ if (f = Le(t[m], d, a), i = Math.min(i, f), i === 0)
5881
5889
  return i;
5882
5890
  } else if (!e && n) {
5883
5891
  const d = t.slice(c[0], c[1] + 1);
5884
- for (let y = u[0]; y <= u[1]; ++y)
5885
- if (f = Le(r[y], d, a), i = Math.min(i, f), i === 0)
5892
+ for (let m = u[0]; m <= u[1]; ++m)
5893
+ if (f = Le(r[m], d, a), i = Math.min(i, f), i === 0)
5886
5894
  return i;
5887
5895
  } else
5888
- f = Ji(r, u, t, c, a), i = Math.min(i, f);
5896
+ f = Yi(r, u, t, c, a), i = Math.min(i, f);
5889
5897
  } else {
5890
5898
  const f = Qt(u, e), d = Qt(c, n);
5891
5899
  it(s, i, a, r, t, f[0], d[0]), it(s, i, a, r, t, f[0], d[1]), it(s, i, a, r, t, f[1], d[0]), it(s, i, a, r, t, f[1], d[1]);
@@ -5893,7 +5901,7 @@ function mt(r, e, t, n, a, o = 1 / 0) {
5893
5901
  }
5894
5902
  return i;
5895
5903
  }
5896
- function es(r, e) {
5904
+ function ts(r, e) {
5897
5905
  const t = r.geometry(), n = t.flat().map((i) => Sr([i.x, i.y], r.canonical));
5898
5906
  if (t.length === 0)
5899
5907
  return NaN;
@@ -5916,7 +5924,7 @@ function es(r, e) {
5916
5924
  }
5917
5925
  return o;
5918
5926
  }
5919
- function ts(r, e) {
5927
+ function rs(r, e) {
5920
5928
  const t = r.geometry(), n = t.flat().map((i) => Sr([i.x, i.y], r.canonical));
5921
5929
  if (t.length === 0)
5922
5930
  return NaN;
@@ -5939,11 +5947,11 @@ function ts(r, e) {
5939
5947
  }
5940
5948
  return o;
5941
5949
  }
5942
- function rs(r, e) {
5950
+ function ns(r, e) {
5943
5951
  const t = r.geometry();
5944
5952
  if (t.length === 0 || t[0].length === 0)
5945
5953
  return NaN;
5946
- const n = Hi(t).map((i) => i.map((s) => s.map((l) => Sr([l.x, l.y], r.canonical)))), a = new kr(n[0][0][0][1]);
5954
+ const n = Ki(t).map((i) => i.map((s) => s.map((l) => Sr([l.x, l.y], r.canonical)))), a = new kr(n[0][0][0][1]);
5947
5955
  let o = 1 / 0;
5948
5956
  for (const i of e)
5949
5957
  for (const s of n) {
@@ -5955,7 +5963,7 @@ function rs(r, e) {
5955
5963
  o = Math.min(o, yt(i.coordinates, !0, s, a, o));
5956
5964
  break;
5957
5965
  case "Polygon":
5958
- o = Math.min(o, Qi(s, i.coordinates, a, o));
5966
+ o = Math.min(o, es(s, i.coordinates, a, o));
5959
5967
  break;
5960
5968
  }
5961
5969
  if (o === 0)
@@ -5996,11 +6004,11 @@ class Te {
5996
6004
  evaluate(e) {
5997
6005
  if (e.geometry() != null && e.canonicalID() != null) {
5998
6006
  if (e.geometryType() === "Point")
5999
- return es(e, this.geometries);
6000
- if (e.geometryType() === "LineString")
6001
6007
  return ts(e, this.geometries);
6002
- if (e.geometryType() === "Polygon")
6008
+ if (e.geometryType() === "LineString")
6003
6009
  return rs(e, this.geometries);
6010
+ if (e.geometryType() === "Polygon")
6011
+ return ns(e, this.geometries);
6004
6012
  }
6005
6013
  return NaN;
6006
6014
  }
@@ -6012,12 +6020,12 @@ class Te {
6012
6020
  }
6013
6021
  const Ar = {
6014
6022
  // special forms
6015
- "==": Ai,
6016
- "!=": Ti,
6017
- ">": Ei,
6018
- "<": Ii,
6019
- ">=": _i,
6020
- "<=": Mi,
6023
+ "==": Ti,
6024
+ "!=": Ii,
6025
+ ">": Mi,
6026
+ "<": Ei,
6027
+ ">=": zi,
6028
+ "<=": _i,
6021
6029
  array: te,
6022
6030
  at: dr,
6023
6031
  boolean: te,
@@ -6072,23 +6080,23 @@ class re {
6072
6080
  for (const [u, c] of s) {
6073
6081
  l = new Ct(t.registry, ht, t.path, null, t.scope);
6074
6082
  const p = [];
6075
- let m = !1;
6083
+ let y = !1;
6076
6084
  for (let f = 1; f < e.length; f++) {
6077
- const d = e[f], y = Array.isArray(u) ? u[f - 1] : u.type, v = l.parse(d, 1 + p.length, y);
6085
+ const d = e[f], m = Array.isArray(u) ? u[f - 1] : u.type, v = l.parse(d, 1 + p.length, m);
6078
6086
  if (!v) {
6079
- m = !0;
6087
+ y = !0;
6080
6088
  break;
6081
6089
  }
6082
6090
  p.push(v);
6083
6091
  }
6084
- if (!m) {
6092
+ if (!y) {
6085
6093
  if (Array.isArray(u) && u.length !== p.length) {
6086
6094
  l.error(`Expected ${u.length} arguments, but found ${p.length} instead.`);
6087
6095
  continue;
6088
6096
  }
6089
6097
  for (let f = 0; f < p.length; f++) {
6090
- const d = Array.isArray(u) ? u[f] : u.type, y = p[f];
6091
- l.concat(f + 1).checkSubtype(d, y.type);
6098
+ const d = Array.isArray(u) ? u[f] : u.type, m = p[f];
6099
+ l.concat(f + 1).checkSubtype(d, m.type);
6092
6100
  }
6093
6101
  if (l.errors.length === 0)
6094
6102
  return new re(n, o, c, p);
@@ -6097,9 +6105,9 @@ class re {
6097
6105
  if (s.length === 1)
6098
6106
  t.errors.push(...l.errors);
6099
6107
  else {
6100
- const c = (s.length ? s : i).map(([m]) => as(m)).join(" | "), p = [];
6101
- for (let m = 1; m < e.length; m++) {
6102
- const f = t.parse(e[m], 1 + p.length);
6108
+ const c = (s.length ? s : i).map(([y]) => os(y)).join(" | "), p = [];
6109
+ for (let y = 1; y < e.length; y++) {
6110
+ const f = t.parse(e[y], 1 + p.length);
6103
6111
  if (!f)
6104
6112
  return null;
6105
6113
  p.push(N(f.type));
@@ -6128,7 +6136,7 @@ function Gt(r, e) {
6128
6136
  const t = e[r];
6129
6137
  return typeof t > "u" ? null : t;
6130
6138
  }
6131
- function ns(r, e, t, n) {
6139
+ function as(r, e, t, n) {
6132
6140
  for (; t <= n; ) {
6133
6141
  const a = t + n >> 1;
6134
6142
  if (e[a] === r)
@@ -6492,7 +6500,7 @@ re.register(Ar, {
6492
6500
  C,
6493
6501
  [I, W(A)],
6494
6502
  // assumes v is a array literal with values sorted in ascending order and of a single type
6495
- (r, [e, t]) => ns(r.properties()[e.value], t.value, 0, t.value.length - 1)
6503
+ (r, [e, t]) => as(r.properties()[e.value], t.value, 0, t.value.length - 1)
6496
6504
  ],
6497
6505
  all: {
6498
6506
  type: C,
@@ -6565,7 +6573,7 @@ re.register(Ar, {
6565
6573
  (r, [e]) => e.evaluate(r).resolvedLocale()
6566
6574
  ]
6567
6575
  });
6568
- function as(r) {
6576
+ function os(r) {
6569
6577
  return Array.isArray(r) ? `(${r.map(N).join(", ")})` : `(${N(r.type)}...)`;
6570
6578
  }
6571
6579
  function ht(r) {
@@ -6642,9 +6650,9 @@ function _(r) {
6642
6650
  function Tr(r) {
6643
6651
  return typeof r == "object" && r !== null && !Array.isArray(r);
6644
6652
  }
6645
- class os {
6653
+ class is {
6646
6654
  constructor(e, t) {
6647
- this.expression = e, this._warningHistory = {}, this._evaluator = new Pn(), this._defaultValue = t ? ls(t) : null, this._enumValues = t && t.type === "enum" ? t.values : null;
6655
+ this.expression = e, this._warningHistory = {}, this._evaluator = new Pn(), this._defaultValue = t ? us(t) : null, this._enumValues = t && t.type === "enum" ? t.values : null;
6648
6656
  }
6649
6657
  evaluateWithoutErrorHandling(e, t, n, a, o, i) {
6650
6658
  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);
@@ -6667,8 +6675,8 @@ function Vn(r) {
6667
6675
  return Array.isArray(r) && r.length > 0 && typeof r[0] == "string" && r[0] in Ar;
6668
6676
  }
6669
6677
  function Gn(r, e) {
6670
- const t = new Ct(Ar, ht, [], e ? ss(e) : void 0), n = t.parse(r, void 0, void 0, void 0, e && e.type === "string" ? { typeAnnotation: "coerce" } : void 0);
6671
- return n ? rr(new os(n, e)) : Pe(t.errors);
6678
+ const t = new Ct(Ar, ht, [], e ? ls(e) : void 0), n = t.parse(r, void 0, void 0, void 0, e && e.type === "string" ? { typeAnnotation: "coerce" } : void 0);
6679
+ return n ? rr(new is(n, e)) : Pe(t.errors);
6672
6680
  }
6673
6681
  class cn {
6674
6682
  constructor(e, t) {
@@ -6695,7 +6703,7 @@ class pn {
6695
6703
  return this.interpolationType ? se.interpolationFactor(this.interpolationType, e, t, n) : 0;
6696
6704
  }
6697
6705
  }
6698
- function is(r, e) {
6706
+ function ss(r, e) {
6699
6707
  const t = Gn(r, e);
6700
6708
  if (t.result === "error")
6701
6709
  return t;
@@ -6731,7 +6739,7 @@ function lt(r) {
6731
6739
  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.'));
6732
6740
  }), e;
6733
6741
  }
6734
- function ss(r) {
6742
+ function ls(r) {
6735
6743
  const e = {
6736
6744
  color: ie,
6737
6745
  string: I,
@@ -6746,7 +6754,7 @@ function ss(r) {
6746
6754
  };
6747
6755
  return r.type === "array" ? W(e[r.value] || A, r.length) : e[r.type];
6748
6756
  }
6749
- function ls(r) {
6757
+ function us(r) {
6750
6758
  return r.type === "color" && Tr(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;
6751
6759
  }
6752
6760
  function Hn(r) {
@@ -6805,7 +6813,7 @@ function Y(r) {
6805
6813
  if (u !== "object")
6806
6814
  return [new h(e, t, `object expected, ${u} found`)];
6807
6815
  for (const c in t) {
6808
- const p = c.split(".")[0], m = n[p] || n["*"];
6816
+ const p = c.split(".")[0], y = n[p] || n["*"];
6809
6817
  let f;
6810
6818
  if (a[p])
6811
6819
  f = a[p];
@@ -6822,7 +6830,7 @@ function Y(r) {
6822
6830
  l = l.concat(f({
6823
6831
  key: (e && `${e}.`) + c,
6824
6832
  value: t[c],
6825
- valueSpec: m,
6833
+ valueSpec: y,
6826
6834
  style: o,
6827
6835
  styleSpec: i,
6828
6836
  object: t,
@@ -6882,24 +6890,24 @@ function Wn(r) {
6882
6890
  }
6883
6891
  });
6884
6892
  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 && !Un(r.valueSpec) && c.push(new h(r.key, r.value, "exponential functions not supported")), r.styleSpec.$version >= 8 && (l && !gt(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;
6885
- function p(y) {
6893
+ function p(m) {
6886
6894
  if (t === "identity")
6887
- return [new h(y.key, y.value, 'identity function may not have a "stops" property')];
6895
+ return [new h(m.key, m.value, 'identity function may not have a "stops" property')];
6888
6896
  let v = [];
6889
- const w = y.value;
6897
+ const w = m.value;
6890
6898
  return v = v.concat(Ir({
6891
- key: y.key,
6899
+ key: m.key,
6892
6900
  value: w,
6893
- valueSpec: y.valueSpec,
6894
- validateSpec: y.validateSpec,
6895
- style: y.style,
6896
- styleSpec: y.styleSpec,
6897
- arrayElementValidator: m
6898
- })), _(w) === "array" && w.length === 0 && v.push(new h(y.key, w, "array must have at least one stop")), v;
6899
- }
6900
- function m(y) {
6901
+ valueSpec: m.valueSpec,
6902
+ validateSpec: m.validateSpec,
6903
+ style: m.style,
6904
+ styleSpec: m.styleSpec,
6905
+ arrayElementValidator: y
6906
+ })), _(w) === "array" && w.length === 0 && v.push(new h(m.key, w, "array must have at least one stop")), v;
6907
+ }
6908
+ function y(m) {
6901
6909
  let v = [];
6902
- const w = y.value, b = y.key;
6910
+ const w = m.value, b = m.key;
6903
6911
  if (_(w) !== "array")
6904
6912
  return [new h(b, w, `array expected, ${_(w)} found`)];
6905
6913
  if (w.length !== 2)
@@ -6917,9 +6925,9 @@ function Wn(r) {
6917
6925
  key: `${b}[0]`,
6918
6926
  value: w[0],
6919
6927
  valueSpec: { zoom: {} },
6920
- validateSpec: y.validateSpec,
6921
- style: y.style,
6922
- styleSpec: y.styleSpec,
6928
+ validateSpec: m.validateSpec,
6929
+ style: m.style,
6930
+ styleSpec: m.styleSpec,
6923
6931
  objectElementValidators: { zoom: Er, value: f }
6924
6932
  }));
6925
6933
  } else
@@ -6927,46 +6935,46 @@ function Wn(r) {
6927
6935
  key: `${b}[0]`,
6928
6936
  value: w[0],
6929
6937
  valueSpec: {},
6930
- validateSpec: y.validateSpec,
6931
- style: y.style,
6932
- styleSpec: y.styleSpec
6938
+ validateSpec: m.validateSpec,
6939
+ style: m.style,
6940
+ styleSpec: m.styleSpec
6933
6941
  }, w));
6934
- return Vn(Ee(w[1])) ? v.concat([new h(`${b}[1]`, w[1], "expressions are not allowed in function stops.")]) : v.concat(y.validateSpec({
6942
+ return Vn(Ee(w[1])) ? v.concat([new h(`${b}[1]`, w[1], "expressions are not allowed in function stops.")]) : v.concat(m.validateSpec({
6935
6943
  key: `${b}[1]`,
6936
6944
  value: w[1],
6937
6945
  valueSpec: e,
6938
- validateSpec: y.validateSpec,
6939
- style: y.style,
6940
- styleSpec: y.styleSpec
6946
+ validateSpec: m.validateSpec,
6947
+ style: m.style,
6948
+ styleSpec: m.styleSpec
6941
6949
  }));
6942
6950
  }
6943
- function f(y, v) {
6944
- const w = _(y.value), b = F(y.value), T = y.value !== null ? y.value : v;
6951
+ function f(m, v) {
6952
+ const w = _(m.value), b = F(m.value), T = m.value !== null ? m.value : v;
6945
6953
  if (!n)
6946
6954
  n = w;
6947
6955
  else if (w !== n)
6948
- return [new h(y.key, T, `${w} stop domain type must match previous stop domain type ${n}`)];
6956
+ return [new h(m.key, T, `${w} stop domain type must match previous stop domain type ${n}`)];
6949
6957
  if (w !== "number" && w !== "string" && w !== "boolean")
6950
- return [new h(y.key, T, "stop domain value must be a number, string, or boolean")];
6958
+ return [new h(m.key, T, "stop domain value must be a number, string, or boolean")];
6951
6959
  if (w !== "number" && t !== "categorical") {
6952
6960
  let j = `number expected, ${w} found`;
6953
- return gt(e) && t === void 0 && (j += '\nIf you intended to use a categorical function, specify `"type": "categorical"`.'), [new h(y.key, T, j)];
6961
+ return gt(e) && t === void 0 && (j += '\nIf you intended to use a categorical function, specify `"type": "categorical"`.'), [new h(m.key, T, j)];
6954
6962
  }
6955
- return t === "categorical" && w === "number" && (!isFinite(b) || Math.floor(b) !== b) ? [new h(y.key, T, `integer expected, found ${b}`)] : t !== "categorical" && w === "number" && o !== void 0 && b < o ? [new h(y.key, T, "stop domain values must appear in ascending order")] : (o = b, t === "categorical" && b in a ? [new h(y.key, T, "stop domain values must be unique")] : (a[b] = !0, []));
6963
+ return t === "categorical" && w === "number" && (!isFinite(b) || Math.floor(b) !== b) ? [new h(m.key, T, `integer expected, found ${b}`)] : t !== "categorical" && w === "number" && o !== void 0 && b < o ? [new h(m.key, T, "stop domain values must appear in ascending order")] : (o = b, t === "categorical" && b in a ? [new h(m.key, T, "stop domain values must be unique")] : (a[b] = !0, []));
6956
6964
  }
6957
- function d(y) {
6958
- return y.validateSpec({
6959
- key: y.key,
6960
- value: y.value,
6965
+ function d(m) {
6966
+ return m.validateSpec({
6967
+ key: m.key,
6968
+ value: m.value,
6961
6969
  valueSpec: e,
6962
- validateSpec: y.validateSpec,
6963
- style: y.style,
6964
- styleSpec: y.styleSpec
6970
+ validateSpec: m.validateSpec,
6971
+ style: m.style,
6972
+ styleSpec: m.styleSpec
6965
6973
  });
6966
6974
  }
6967
6975
  }
6968
6976
  function Ne(r) {
6969
- const e = (r.expressionContext === "property" ? is : Gn)(Ee(r.value), r.valueSpec);
6977
+ const e = (r.expressionContext === "property" ? ss : Gn)(Ee(r.value), r.valueSpec);
6970
6978
  if (e.result === "error")
6971
6979
  return e.value.map((n) => new h(`${r.key}${n.key}`, r.value, n.message));
6972
6980
  const t = e.value.expression || e.value._styleExpression.expression;
@@ -6984,11 +6992,11 @@ function Ne(r) {
6984
6992
  }
6985
6993
  return [];
6986
6994
  }
6987
- function us(r) {
6995
+ function cs(r) {
6988
6996
  const e = r.value, t = r.key, n = _(e);
6989
6997
  return n !== "boolean" ? [new h(t, e, `boolean expected, ${n} found`)] : [];
6990
6998
  }
6991
- function cs(r) {
6999
+ function ps(r) {
6992
7000
  const e = r.key, t = r.value, n = _(t);
6993
7001
  return n !== "string" ? [new h(e, t, `color expected, ${n} found`)] : $.parse(String(t)) ? [] : [new h(e, t, `color expected, "${t}" found`)];
6994
7002
  }
@@ -7077,8 +7085,8 @@ function Jn(r, e) {
7077
7085
  if (_(i) === "string" && gt(c) && !c.tokens && (p = /^{([^}]+)}$/.exec(i)))
7078
7086
  return [new h(t, i, `"${s}" does not support interpolation syntax
7079
7087
  Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(p[1])} }\`.`)];
7080
- const m = [];
7081
- 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" && Tr(Ee(i)) && F(i.type) === "identity" && m.push(new h(t, i, '"text-font" does not support identity functions'))), m.concat(n({
7088
+ const y = [];
7089
+ return r.layerType === "symbol" && (s === "text-field" && a && !a.glyphs && y.push(new h(t, i, 'use of "text-field" requires a style "glyphs" property')), s === "text-font" && Tr(Ee(i)) && F(i.type) === "identity" && y.push(new h(t, i, '"text-font" does not support identity functions'))), y.concat(n({
7082
7090
  key: r.key,
7083
7091
  value: i,
7084
7092
  valueSpec: c,
@@ -7186,7 +7194,7 @@ function Me(r) {
7186
7194
  const e = r.value, t = r.key, n = _(e);
7187
7195
  return n !== "string" ? [new h(t, e, `string expected, ${n} found`)] : [];
7188
7196
  }
7189
- function ps(r) {
7197
+ function fs(r) {
7190
7198
  var e;
7191
7199
  const t = (e = r.sourceName) !== null && e !== void 0 ? e : "", n = r.value, a = r.styleSpec, o = a.source_raster_dem, i = r.style;
7192
7200
  let s = [];
@@ -7195,9 +7203,9 @@ function ps(r) {
7195
7203
  return s;
7196
7204
  if (l !== "object")
7197
7205
  return s.push(new h("source_raster_dem", n, `object expected, ${l} found`)), s;
7198
- const c = F(n.encoding) === "custom", p = ["redFactor", "greenFactor", "blueFactor", "baseShift"], m = r.value.encoding ? `"${r.value.encoding}"` : "Default";
7206
+ const c = F(n.encoding) === "custom", p = ["redFactor", "greenFactor", "blueFactor", "baseShift"], y = r.value.encoding ? `"${r.value.encoding}"` : "Default";
7199
7207
  for (const f in n)
7200
- !c && p.includes(f) ? s.push(new h(f, n[f], `In "${t}": "${f}" is only valid when "encoding" is set to "custom". ${m} encoding found`)) : o[f] ? s = s.concat(r.validateSpec({
7208
+ !c && p.includes(f) ? s.push(new h(f, n[f], `In "${t}": "${f}" is only valid when "encoding" is set to "custom". ${y} encoding found`)) : o[f] ? s = s.concat(r.validateSpec({
7201
7209
  key: f,
7202
7210
  value: n[f],
7203
7211
  valueSpec: o[f],
@@ -7208,7 +7216,7 @@ function ps(r) {
7208
7216
  return s;
7209
7217
  }
7210
7218
  const fn = {
7211
- promoteId: fs
7219
+ promoteId: ds
7212
7220
  };
7213
7221
  function ea(r) {
7214
7222
  const e = r.value, t = r.key, n = r.styleSpec, a = r.style, o = r.validateSpec;
@@ -7229,7 +7237,7 @@ function ea(r) {
7229
7237
  validateSpec: o
7230
7238
  }), s;
7231
7239
  case "raster-dem":
7232
- return s = ps({
7240
+ return s = fs({
7233
7241
  sourceName: t,
7234
7242
  value: e,
7235
7243
  style: r.style,
@@ -7292,7 +7300,7 @@ function ea(r) {
7292
7300
  });
7293
7301
  }
7294
7302
  }
7295
- function fs({ key: r, value: e }) {
7303
+ function ds({ key: r, value: e }) {
7296
7304
  if (_(e) === "string")
7297
7305
  return Me({ key: r, value: e });
7298
7306
  {
@@ -7366,13 +7374,13 @@ function na(r) {
7366
7374
  })) : o = o.concat([new h(s, e[s], `unknown property "${s}"`)]);
7367
7375
  return o;
7368
7376
  }
7369
- function ds(r) {
7370
- return Me(r).length === 0 ? [] : Ne(r);
7371
- }
7372
7377
  function ys(r) {
7373
7378
  return Me(r).length === 0 ? [] : Ne(r);
7374
7379
  }
7375
7380
  function ms(r) {
7381
+ return Me(r).length === 0 ? [] : Ne(r);
7382
+ }
7383
+ function hs(r) {
7376
7384
  const e = r.key, t = r.value;
7377
7385
  if (_(t) === "array") {
7378
7386
  if (t.length < 1 || t.length > 4)
@@ -7396,7 +7404,7 @@ function ms(r) {
7396
7404
  valueSpec: {}
7397
7405
  });
7398
7406
  }
7399
- function hs(r) {
7407
+ function gs(r) {
7400
7408
  const e = r.key, t = r.value, n = _(t), a = r.styleSpec;
7401
7409
  if (n !== "array" || t.length < 1 || t.length % 2 !== 0)
7402
7410
  return [new h(e, t, "variableAnchorOffsetCollection requires a non-empty array of even length")];
@@ -7450,7 +7458,7 @@ function aa(r) {
7450
7458
  value: t
7451
7459
  });
7452
7460
  }
7453
- function gs(r) {
7461
+ function vs(r) {
7454
7462
  const e = r.value, t = r.styleSpec, n = t.projection, a = r.style, o = _(e);
7455
7463
  if (e === void 0)
7456
7464
  return [];
@@ -7467,17 +7475,17 @@ function gs(r) {
7467
7475
  })) : i = i.concat([new h(s, e[s], `unknown property "${s}"`)]);
7468
7476
  return i;
7469
7477
  }
7470
- function vs(r) {
7478
+ function bs(r) {
7471
7479
  const e = r.key;
7472
7480
  let t = r.value;
7473
7481
  t = t instanceof String ? t.valueOf() : t;
7474
7482
  const n = _(t);
7475
- return n === "array" && !ws(t) && !bs(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`)];
7483
+ return n === "array" && !Ss(t) && !ws(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`)];
7476
7484
  }
7477
- function bs(r) {
7485
+ function ws(r) {
7478
7486
  return !!["interpolate", "step", "literal"].includes(r[0]);
7479
7487
  }
7480
- function ws(r) {
7488
+ function Ss(r) {
7481
7489
  return Array.isArray(r) && r.length === 3 && typeof r[0] == "string" && typeof r[1] == "string" && typeof r[2] == "number";
7482
7490
  }
7483
7491
  const dn = {
@@ -7485,9 +7493,9 @@ const dn = {
7485
7493
  return [];
7486
7494
  },
7487
7495
  array: Ir,
7488
- boolean: us,
7496
+ boolean: cs,
7489
7497
  number: Er,
7490
- color: cs,
7498
+ color: ps,
7491
7499
  constants: Kn,
7492
7500
  enum: Je,
7493
7501
  filter: Mr,
@@ -7498,13 +7506,13 @@ const dn = {
7498
7506
  light: ta,
7499
7507
  sky: ra,
7500
7508
  terrain: na,
7501
- projection: gs,
7502
- projectionDefinition: vs,
7509
+ projection: vs,
7510
+ projectionDefinition: bs,
7503
7511
  string: Me,
7504
- formatted: ds,
7505
- resolvedImage: ys,
7506
- padding: ms,
7507
- variableAnchorOffsetCollection: hs,
7512
+ formatted: ys,
7513
+ resolvedImage: ms,
7514
+ padding: hs,
7515
+ variableAnchorOffsetCollection: gs,
7508
7516
  sprite: aa
7509
7517
  };
7510
7518
  function Ue(r) {
@@ -7575,7 +7583,7 @@ function yn(r) {
7575
7583
  isFallback: !0
7576
7584
  };
7577
7585
  if (typeof r == "string") {
7578
- const t = xs(r);
7586
+ const t = ks(r);
7579
7587
  return t.isValidStyle ? {
7580
7588
  style: t.styleObject,
7581
7589
  requiresUrlMonitoring: !1,
@@ -7586,7 +7594,7 @@ function yn(r) {
7586
7594
  // default styles don't require URL monitoring
7587
7595
  isFallback: !0
7588
7596
  } : r.startsWith("http") ? { style: r, requiresUrlMonitoring: !0, isFallback: !1 } : r.toLowerCase().includes(".json") ? {
7589
- style: Ss(r),
7597
+ style: xs(r),
7590
7598
  requiresUrlMonitoring: !0,
7591
7599
  isFallback: !1
7592
7600
  } : {
@@ -7614,14 +7622,14 @@ function yn(r) {
7614
7622
  isFallback: !0
7615
7623
  };
7616
7624
  }
7617
- function Ss(r) {
7625
+ function xs(r) {
7618
7626
  try {
7619
7627
  return new URL(r).href;
7620
7628
  } catch {
7621
7629
  }
7622
7630
  return new URL(r, location.origin).href;
7623
7631
  }
7624
- function xs(r) {
7632
+ function ks(r) {
7625
7633
  try {
7626
7634
  const e = JSON.parse(r), t = X(e);
7627
7635
  return {
@@ -7644,7 +7652,7 @@ function fe(r, e, t) {
7644
7652
  function _r(r) {
7645
7653
  r.parentNode && r.parentNode.removeChild(r);
7646
7654
  }
7647
- class ks {
7655
+ class Ls {
7648
7656
  constructor() {
7649
7657
  L(this, "_map");
7650
7658
  L(this, "_container");
@@ -7664,7 +7672,7 @@ class ks {
7664
7672
  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"));
7665
7673
  }
7666
7674
  }
7667
- class Ls extends io {
7675
+ class Cs extends io {
7668
7676
  constructor(t = {}) {
7669
7677
  super({
7670
7678
  showCompass: t.showCompass ?? !0,
@@ -7690,8 +7698,8 @@ class Ls extends io {
7690
7698
  return a.clickFunction = n, a;
7691
7699
  }
7692
7700
  }
7693
- const mn = S.Marker, hn = S.LngLat, Cs = S.LngLatBounds;
7694
- class As extends so {
7701
+ const mn = S.Marker, hn = S.LngLat, As = S.LngLatBounds;
7702
+ class Ts extends so {
7695
7703
  constructor() {
7696
7704
  super(...arguments);
7697
7705
  L(this, "lastUpdatedCenter", new hn(0, 0));
@@ -7708,7 +7716,7 @@ class As extends so {
7708
7716
  ...this.options.fitBoundsOptions,
7709
7717
  linear: !0
7710
7718
  }, s = this._map.getZoom();
7711
- s > (((c = this.options.fitBoundsOptions) == null ? void 0 : c.maxZoom) ?? 30) && (i.zoom = s), this._map.fitBounds(Cs.fromLngLat(n, a), i, {
7719
+ s > (((c = this.options.fitBoundsOptions) == null ? void 0 : c.maxZoom) ?? 30) && (i.zoom = s), this._map.fitBounds(As.fromLngLat(n, a), i, {
7712
7720
  geolocateSource: !0
7713
7721
  // tag this camera change so it won't cause the control to change to background state
7714
7722
  });
@@ -7903,11 +7911,11 @@ H = new WeakMap(), Q = new WeakMap(), me = new WeakMap(), he = new WeakMap(), K
7903
7911
  E(this, Q).off("move", t), this.map.off("move", n);
7904
7912
  }, i = (s) => {
7905
7913
  o();
7906
- 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();
7914
+ 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), y = l.getBearing(), f = l.getPitch();
7907
7915
  u.jumpTo({
7908
7916
  center: c,
7909
7917
  zoom: p,
7910
- bearing: m,
7918
+ bearing: y,
7911
7919
  pitch: e ? f : 0
7912
7920
  }), G(this, B, Z).call(this), a();
7913
7921
  };
@@ -7915,7 +7923,7 @@ H = new WeakMap(), Q = new WeakMap(), me = new WeakMap(), he = new WeakMap(), K
7915
7923
  o();
7916
7924
  };
7917
7925
  };
7918
- class Ts {
7926
+ class Is {
7919
7927
  constructor() {
7920
7928
  L(this, "map");
7921
7929
  L(this, "container");
@@ -7934,26 +7942,26 @@ class Ts {
7934
7942
  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");
7935
7943
  }
7936
7944
  }
7937
- const Is = "@maptiler/sdk", Es = "3.1.1", Ms = "The Javascript & TypeScript map SDK tailored for MapTiler Cloud", _s = "MapTiler", zs = "dist/maptiler-sdk.mjs", Ps = "dist/maptiler-sdk.d.ts", Rs = "dist/maptiler-sdk.css", $s = "module", js = { ".": { 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" } }, Ns = ["maptiler", "map", "sdk", "webmap", "cloud", "webGL", "maplibre"], Os = "https://docs.maptiler.com/sdk-js/", Fs = "BSD-3-Clause", Ds = { type: "git", url: "https://github.com/maptiler/maptiler-sdk-js.git" }, qs = { prepare: "husky", doc: "rm -rf docs/* && typedoc --out docs && cp -r images docs/", ncu: "npx npm-check-updates", lint: "eslint src", "lint:fix": "eslint src --fix", "test:watch": "vitest watch -c vite.config-test.ts --dom", test: "vitest run -c vite.config-test.ts --dom", "install:clean": "rm -rf build/ dist/ node_modules/ && npm ci", dev: 'concurrently "vite -c vite.config-dev.ts" "npm run dev-umd"', "dev-umd": "npm run build-css && tsc && NODE_ENV=development vite build -w -c vite.config-umd.ts", "build-css": "mkdir -p dist build && node scripts/replace-path-with-content.js src/style/style_template.css dist/tmp_maptiler-sdk.css && cat node_modules/maplibre-gl/dist/maplibre-gl.css dist/tmp_maptiler-sdk.css > dist/maptiler-sdk.css && rm dist/tmp_maptiler-sdk.css && cp dist/maptiler-sdk.css build/maptiler-sdk.css", "build-umd": "tsc && NODE_ENV=production vite build -c vite.config-umd.ts", "build-es": "tsc && NODE_ENV=production vite build -c vite.config-es.ts", build: "npm run build-es; npm run build-umd; npm run build-css", make: "npm run install:clean && npm run build" }, Bs = { "@canvas/image-data": "^1.0.0", "@eslint/js": "^9.21.0", "@types/uuid": "^10.0.0", "@types/xmldom": "^0.1.31", "@vitest/web-worker": "^3.0.9", "@xmldom/xmldom": "^0.8.10", concurrently: "^9.1.2", eslint: "^9.21.0", "eslint-config-prettier": "^10.0.2", "eslint-plugin-prettier": "^5.2.3", "happy-dom": "^17.4.4", husky: "^8.0.0", "lint-staged": "^15.4.3", prettier: "3.5.2", typedoc: "^0.27.6", typescript: "^5.7.3", "typescript-eslint": "^8.25.0", vite: "^6.0.7", "vite-plugin-dts": "^4.5.0", vitest: "^3.0.9" }, Us = { "@maplibre/maplibre-gl-style-spec": "^23.0.0", "@maptiler/client": "^2.3.1", events: "^3.3.0", "js-base64": "^3.7.7", "maplibre-gl": "^5.0.1", uuid: "^11.0.5" }, Vs = {
7938
- name: Is,
7939
- version: Es,
7940
- description: Ms,
7941
- author: _s,
7942
- module: zs,
7943
- types: Ps,
7944
- style: Rs,
7945
- type: $s,
7946
- exports: js,
7947
- keywords: Ns,
7948
- homepage: Os,
7949
- license: Fs,
7950
- repository: Ds,
7951
- scripts: qs,
7945
+ const Es = "@maptiler/sdk", Ms = "3.2.0", _s = "The Javascript & TypeScript map SDK tailored for MapTiler Cloud", zs = "MapTiler", Ps = "dist/maptiler-sdk.mjs", Rs = "dist/maptiler-sdk.d.ts", $s = "dist/maptiler-sdk.css", js = "module", Ns = { ".": { 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" } }, Os = ["maptiler", "map", "sdk", "webmap", "cloud", "webGL", "maplibre"], Fs = "https://docs.maptiler.com/sdk-js/", Ds = "BSD-3-Clause", qs = { type: "git", url: "https://github.com/maptiler/maptiler-sdk-js.git" }, Bs = { prepare: "husky", doc: "rm -rf docs/* && typedoc --out docs && cp -r images docs/", ncu: "npx npm-check-updates", lint: "eslint src", "lint:fix": "eslint src --fix", "test:watch": "vitest watch -c vite.config-test.ts --dom", test: "vitest run -c vite.config-test.ts --dom", "install:clean": "rm -rf build/ dist/ node_modules/ && npm ci", dev: 'concurrently "vite -c vite.config-dev.ts" "npm run dev-umd"', "dev-umd": "npm run build-css && tsc && NODE_ENV=development vite build -w -c vite.config-umd.ts", "build-css": "mkdir -p dist build && node scripts/replace-path-with-content.js src/style/style_template.css dist/tmp_maptiler-sdk.css && cat node_modules/maplibre-gl/dist/maplibre-gl.css dist/tmp_maptiler-sdk.css > dist/maptiler-sdk.css && rm dist/tmp_maptiler-sdk.css && cp dist/maptiler-sdk.css build/maptiler-sdk.css", "build-umd": "tsc && NODE_ENV=production vite build -c vite.config-umd.ts", "build-es": "tsc && NODE_ENV=production vite build -c vite.config-es.ts", build: "npm run build-es; npm run build-umd; npm run build-css", make: "npm run install:clean && npm run build" }, Us = { "@canvas/image-data": "^1.0.0", "@eslint/js": "^9.21.0", "@types/uuid": "^10.0.0", "@types/xmldom": "^0.1.31", "@vitest/web-worker": "^3.0.9", "@xmldom/xmldom": "^0.8.10", concurrently: "^9.1.2", eslint: "^9.21.0", "eslint-config-prettier": "^10.0.2", "eslint-plugin-prettier": "^5.2.3", "happy-dom": "^17.4.4", husky: "^8.0.0", "lint-staged": "^15.4.3", prettier: "3.5.2", typedoc: "^0.27.6", typescript: "^5.7.3", "typescript-eslint": "^8.25.0", vite: "^6.0.7", "vite-plugin-dts": "^4.5.0", vitest: "^3.0.9" }, Vs = { "@maplibre/maplibre-gl-style-spec": "^23.0.0", "@maptiler/client": "^2.3.2", events: "^3.3.0", "js-base64": "^3.7.7", "maplibre-gl": "^5.3.1", uuid: "^11.0.5" }, Gs = {
7946
+ name: Es,
7947
+ version: Ms,
7948
+ description: _s,
7949
+ author: zs,
7950
+ module: Ps,
7951
+ types: Rs,
7952
+ style: $s,
7953
+ type: js,
7954
+ exports: Ns,
7955
+ keywords: Os,
7956
+ homepage: Fs,
7957
+ license: Ds,
7958
+ repository: qs,
7959
+ scripts: Bs,
7952
7960
  "lint-staged": { "*.ts": "npm run lint:fix" },
7953
- devDependencies: Bs,
7954
- dependencies: Us
7961
+ devDependencies: Us,
7962
+ dependencies: Vs
7955
7963
  };
7956
- class Gs {
7964
+ class Hs {
7957
7965
  /**
7958
7966
  *
7959
7967
  * @param map : a Map instance
@@ -7986,10 +7994,10 @@ class Gs {
7986
7994
  }
7987
7995
  preparePayload() {
7988
7996
  const e = new URL(V.telemetryURL);
7989
- return e.searchParams.append("sdk", Vs.version), e.searchParams.append("key", O.apiKey), e.searchParams.append("mtsid", ur), e.searchParams.append("session", O.session ? "1" : "0"), e.searchParams.append("caching", O.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;
7997
+ return e.searchParams.append("sdk", Gs.version), e.searchParams.append("key", O.apiKey), e.searchParams.append("mtsid", ur), e.searchParams.append("session", O.session ? "1" : "0"), e.searchParams.append("caching", O.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;
7990
7998
  }
7991
7999
  }
7992
- const Hs = {
8000
+ const Ks = {
7993
8001
  POINT: "POINT",
7994
8002
  COUNTRY: "COUNTRY"
7995
8003
  };
@@ -8066,7 +8074,7 @@ class zr extends S.Map {
8066
8074
  if (!t.geolocate || t.center || t.hash && i)
8067
8075
  return;
8068
8076
  try {
8069
- if (t.geolocate === Hs.COUNTRY) {
8077
+ if (t.geolocate === Ks.COUNTRY) {
8070
8078
  await this.fitToIpBounds();
8071
8079
  return;
8072
8080
  }
@@ -8114,30 +8122,30 @@ class zr extends S.Map {
8114
8122
  }), this.once("load", async () => {
8115
8123
  let d = { logo: null };
8116
8124
  try {
8117
- const y = Object.keys(this.style.sourceCaches).map((b) => this.getSource(b)).filter((b) => b && "url" in b && typeof b.url == "string" && b.url.includes("tiles.json")), v = new URL(y[0].url);
8125
+ const m = Object.keys(this.style.sourceCaches).map((b) => this.getSource(b)).filter((b) => b && "url" in b && typeof b.url == "string" && b.url.includes("tiles.json")), v = new URL(m[0].url);
8118
8126
  v.searchParams.has("key") || v.searchParams.append("key", O.apiKey), d = await (await fetch(v.href)).json();
8119
8127
  } catch {
8120
8128
  }
8121
8129
  if (t.forceNoAttributionControl !== !0)
8122
8130
  if ("logo" in d && d.logo) {
8123
- const y = d.logo;
8124
- this.addControl(new Hr({ logoURL: y }), t.logoPosition);
8131
+ const m = d.logo;
8132
+ this.addControl(new Hr({ logoURL: m }), t.logoPosition);
8125
8133
  } else t.maptilerLogo && this.addControl(new Hr(), t.logoPosition);
8126
8134
  if (t.scaleControl) {
8127
- const y = t.scaleControl === !0 || t.scaleControl === void 0 ? "bottom-right" : t.scaleControl, v = new uo({ unit: O.unit });
8128
- this.addControl(v, y), O.on("unit", (w) => {
8135
+ const m = t.scaleControl === !0 || t.scaleControl === void 0 ? "bottom-right" : t.scaleControl, v = new uo({ unit: O.unit });
8136
+ this.addControl(v, m), O.on("unit", (w) => {
8129
8137
  v.setUnit(w);
8130
8138
  });
8131
8139
  }
8132
8140
  if (t.navigationControl !== !1) {
8133
- const y = t.navigationControl === !0 || t.navigationControl === void 0 ? "top-right" : t.navigationControl;
8134
- this.addControl(new Ls(), y);
8141
+ const m = t.navigationControl === !0 || t.navigationControl === void 0 ? "top-right" : t.navigationControl;
8142
+ this.addControl(new Cs(), m);
8135
8143
  }
8136
8144
  if (t.geolocateControl !== !1) {
8137
- const y = t.geolocateControl === !0 || t.geolocateControl === void 0 ? "top-right" : t.geolocateControl;
8145
+ const m = t.geolocateControl === !0 || t.geolocateControl === void 0 ? "top-right" : t.geolocateControl;
8138
8146
  this.addControl(
8139
8147
  // new maplibregl.GeolocateControl({
8140
- new As({
8148
+ new Ts({
8141
8149
  positionOptions: {
8142
8150
  enableHighAccuracy: !0,
8143
8151
  maximumAge: 0,
@@ -8150,31 +8158,31 @@ class zr extends S.Map {
8150
8158
  showAccuracyCircle: !0,
8151
8159
  showUserLocation: !0
8152
8160
  }),
8153
- y
8161
+ m
8154
8162
  );
8155
8163
  }
8156
8164
  if (t.terrainControl) {
8157
- const y = t.terrainControl === !0 || t.terrainControl === void 0 ? "top-right" : t.terrainControl;
8158
- this.addControl(new ks(), y);
8165
+ const m = t.terrainControl === !0 || t.terrainControl === void 0 ? "top-right" : t.terrainControl;
8166
+ this.addControl(new Ls(), m);
8159
8167
  }
8160
8168
  if (t.projectionControl) {
8161
- const y = t.projectionControl === !0 || t.projectionControl === void 0 ? "top-right" : t.projectionControl;
8162
- this.addControl(new Ts(), y);
8169
+ const m = t.projectionControl === !0 || t.projectionControl === void 0 ? "top-right" : t.projectionControl;
8170
+ this.addControl(new Is(), m);
8163
8171
  }
8164
8172
  if (t.fullscreenControl) {
8165
- const y = t.fullscreenControl === !0 || t.fullscreenControl === void 0 ? "top-right" : t.fullscreenControl;
8166
- this.addControl(new co({}), y);
8173
+ const m = t.fullscreenControl === !0 || t.fullscreenControl === void 0 ? "top-right" : t.fullscreenControl;
8174
+ this.addControl(new co({}), m);
8167
8175
  }
8168
8176
  this.isReady = !0, this.fire("ready", { target: this });
8169
8177
  });
8170
- let c = !1, p = !1, m;
8178
+ let c = !1, p = !1, y;
8171
8179
  this.once("ready", () => {
8172
- c = !0, p && this.fire("loadWithTerrain", m);
8180
+ c = !0, p && this.fire("loadWithTerrain", y);
8173
8181
  }), this.once("style.load", () => {
8174
8182
  const { minimap: d } = t;
8175
8183
  if (typeof d == "object") {
8176
8184
  const {
8177
- zoom: y,
8185
+ zoom: m,
8178
8186
  center: v,
8179
8187
  style: w,
8180
8188
  language: b,
@@ -8197,7 +8205,7 @@ class zr extends S.Map {
8197
8205
  validateStyle: Ma
8198
8206
  } = t;
8199
8207
  this.minimap = new Ht(d, {
8200
- zoom: y,
8208
+ zoom: m,
8201
8209
  center: v,
8202
8210
  style: w,
8203
8211
  language: b,
@@ -8223,11 +8231,11 @@ class zr extends S.Map {
8223
8231
  } else d === !0 ? (this.minimap = new Ht({}, t), this.addControl(this.minimap, "bottom-left")) : d !== void 0 && d !== !1 && (this.minimap = new Ht({}, t), this.addControl(this.minimap, d));
8224
8232
  });
8225
8233
  const f = (d) => {
8226
- d.terrain && (p = !0, m = {
8234
+ d.terrain && (p = !0, y = {
8227
8235
  type: "loadWithTerrain",
8228
8236
  target: this,
8229
8237
  terrain: d.terrain
8230
- }, this.off("terrain", f), c && this.fire("loadWithTerrain", m));
8238
+ }, this.off("terrain", f), c && this.fire("loadWithTerrain", y));
8231
8239
  };
8232
8240
  this.on("terrain", f), t.terrain && this.enableTerrain(t.terrainExaggeration ?? this.terrainExaggeration), this.once("load", () => {
8233
8241
  this.getCanvas().addEventListener("webglcontextlost", (d) => {
@@ -8237,7 +8245,7 @@ class zr extends S.Map {
8237
8245
  }
8238
8246
  console.warn("[webglcontextlost]", "Unexpected loss of WebGL context!"), this.fire("webglContextLost", d);
8239
8247
  });
8240
- }), this.telemetry = new Gs(this);
8248
+ }), this.telemetry = new Hs(this);
8241
8249
  }
8242
8250
  /**
8243
8251
  * Recreates the map instance with the same options.
@@ -8550,11 +8558,11 @@ class zr extends S.Map {
8550
8558
  for (const c of l) {
8551
8559
  if (c.type !== "symbol")
8552
8560
  continue;
8553
- const p = c, m = this.getSource(p.source);
8554
- if (!m || !("url" in m && typeof m.url == "string") || new URL(m.url).host !== V.maptilerApiHost)
8561
+ const p = c, y = this.getSource(p.source);
8562
+ if (!y || !("url" in y && typeof y.url == "string") || new URL(y.url).host !== V.maptilerApiHost)
8555
8563
  continue;
8556
- const { id: d, layout: y } = p;
8557
- if (!y || !("text-field" in y))
8564
+ const { id: d, layout: m } = p;
8565
+ if (!m || !("text-field" in m))
8558
8566
  continue;
8559
8567
  let v;
8560
8568
  if (u ? (v = this.getLayoutProperty(d, "text-field"), this.originalLabelStyle.set(d, v)) : v = this.originalLabelStyle.get(d), typeof v == "string") {
@@ -8786,15 +8794,15 @@ function ca(r) {
8786
8794
  features: []
8787
8795
  };
8788
8796
  for (const i of Array.from(t)) {
8789
- const s = Js(i);
8797
+ const s = Ys(i);
8790
8798
  s && o.features.push(s);
8791
8799
  }
8792
8800
  for (const i of Array.from(n)) {
8793
- const s = Ys(i);
8801
+ const s = Xs(i);
8794
8802
  s && o.features.push(s);
8795
8803
  }
8796
8804
  for (const i of Array.from(a))
8797
- o.features.push(Xs(i));
8805
+ o.features.push(Qs(i));
8798
8806
  return o;
8799
8807
  }
8800
8808
  function pa(r, e) {
@@ -8811,13 +8819,13 @@ function pa(r, e) {
8811
8819
  }
8812
8820
  for (const c of Array.from(u)) {
8813
8821
  a[`#${Ie(c, "id")}`] = bn(e !== void 0 ? e(c) : gn(c)).toString(16);
8814
- const p = U(c, "Pair"), m = {};
8822
+ const p = U(c, "Pair"), y = {};
8815
8823
  for (const f of Array.from(p))
8816
- m[P(k(f, "key")) ?? ""] = P(k(f, "styleUrl"));
8817
- i[`#${Ie(c, "id")}`] = m;
8824
+ y[P(k(f, "key")) ?? ""] = P(k(f, "styleUrl"));
8825
+ i[`#${Ie(c, "id")}`] = y;
8818
8826
  }
8819
8827
  for (const c of Array.from(s))
8820
- n.features = n.features.concat(Zs(c, a, o, i));
8828
+ n.features = n.features.concat(Js(c, a, o, i));
8821
8829
  return n;
8822
8830
  }
8823
8831
  function vn(r) {
@@ -8825,15 +8833,15 @@ function vn(r) {
8825
8833
  let e = "", t = 1, n = r;
8826
8834
  return n.startsWith("#") && (n = n.substring(1)), (n.length === 6 || n.length === 3) && (e = n), n.length === 8 && (t = Number.parseInt(n.substring(0, 2), 16) / 255, e = `#${n.substring(6, 8)}${n.substring(4, 6)}${n.substring(2, 4)}`), [e ?? "#000000", t ?? 1];
8827
8835
  }
8828
- function Ks(r) {
8836
+ function Ws(r) {
8829
8837
  return ya(r.split(" "));
8830
8838
  }
8831
- function Ws(r) {
8839
+ function Zs(r) {
8832
8840
  let e = U(r, "coord");
8833
8841
  const t = [], n = [];
8834
8842
  e.length === 0 && (e = U(r, "gx:coord"));
8835
8843
  for (const o of Array.from(e))
8836
- t.push(Ks(P(o) ?? ""));
8844
+ t.push(Ws(P(o) ?? ""));
8837
8845
  const a = U(r, "when");
8838
8846
  for (const o of Array.from(a)) n.push(P(o));
8839
8847
  return {
@@ -8873,7 +8881,7 @@ function ut(r) {
8873
8881
  coordinates: c
8874
8882
  });
8875
8883
  } else if (e[a] === "Track" || e[a] === "gx:Track") {
8876
- const u = Ws(t);
8884
+ const u = Zs(t);
8877
8885
  s.push({
8878
8886
  type: "LineString",
8879
8887
  coordinates: u.coords
@@ -8882,15 +8890,15 @@ function ut(r) {
8882
8890
  }
8883
8891
  return { geoms: s, coordTimes: l };
8884
8892
  }
8885
- function Zs(r, e, t, n) {
8886
- const a = ut(r), o = {}, i = P(k(r, "name")), s = P(k(r, "address")), l = P(k(r, "description")), u = k(r, "TimeSpan"), c = k(r, "TimeStamp"), p = k(r, "ExtendedData"), m = k(r, "visibility");
8887
- let f, d = P(k(r, "styleUrl")), y = k(r, "LineStyle"), v = k(r, "PolyStyle");
8893
+ function Js(r, e, t, n) {
8894
+ const a = ut(r), o = {}, i = P(k(r, "name")), s = P(k(r, "address")), l = P(k(r, "description")), u = k(r, "TimeSpan"), c = k(r, "TimeStamp"), p = k(r, "ExtendedData"), y = k(r, "visibility");
8895
+ let f, d = P(k(r, "styleUrl")), m = k(r, "LineStyle"), v = k(r, "PolyStyle");
8888
8896
  if (!a.geoms.length) return [];
8889
8897
  if (i && (o.name = i), s && (o.address = s), d) {
8890
8898
  d.startsWith("#") || (d = `#${d}`), o.styleUrl = d, e[d] && (o.styleHash = e[d]), n[d] && (o.styleMapHash = n[d], o.styleHash = e[n[d].normal ?? ""]);
8891
8899
  const b = t[o.styleHash ?? ""];
8892
8900
  if (b) {
8893
- y || (y = k(b, "LineStyle")), v || (v = k(b, "PolyStyle"));
8901
+ m || (m = k(b, "LineStyle")), v || (v = k(b, "PolyStyle"));
8894
8902
  const T = k(b, "IconStyle");
8895
8903
  if (T) {
8896
8904
  const j = k(T, "Icon");
@@ -8905,8 +8913,8 @@ function Zs(r, e, t, n) {
8905
8913
  const b = P(k(u, "begin")), T = P(k(u, "end"));
8906
8914
  b && T && (o.timespan = { begin: b, end: T });
8907
8915
  }
8908
- if (c !== null && (o.timestamp = P(k(c, "when")) ?? (/* @__PURE__ */ new Date()).toISOString()), y !== null) {
8909
- const b = vn(P(k(y, "color"))), T = b[0], j = b[1], R = Number.parseFloat(P(k(y, "width")) ?? "");
8916
+ if (c !== null && (o.timestamp = P(k(c, "when")) ?? (/* @__PURE__ */ new Date()).toISOString()), m !== null) {
8917
+ const b = vn(P(k(m, "color"))), T = b[0], j = b[1], R = Number.parseFloat(P(k(m, "width")) ?? "");
8910
8918
  T && (o.stroke = T), Number.isNaN(j) || (o["stroke-opacity"] = j), Number.isNaN(R) || (o["stroke-width"] = R);
8911
8919
  }
8912
8920
  if (v) {
@@ -8920,7 +8928,7 @@ function Zs(r, e, t, n) {
8920
8928
  for (f = 0; f < T.length; f++)
8921
8929
  o[T[f].getAttribute("name") ?? ""] = P(T[f]) ?? "";
8922
8930
  }
8923
- m !== null && (o.visibility = P(m) ?? ""), a.coordTimes.length !== 0 && (o.coordTimes = a.coordTimes.length === 1 ? a.coordTimes[0] : a.coordTimes);
8931
+ y !== null && (o.visibility = P(y) ?? ""), a.coordTimes.length !== 0 && (o.coordTimes = a.coordTimes.length === 1 ? a.coordTimes[0] : a.coordTimes);
8924
8932
  const w = {
8925
8933
  type: "Feature",
8926
8934
  geometry: a.geoms.length === 1 ? a.geoms[0] : {
@@ -8947,7 +8955,7 @@ function fa(r, e) {
8947
8955
  };
8948
8956
  }
8949
8957
  }
8950
- function Js(r) {
8958
+ function Ys(r) {
8951
8959
  const e = U(r, "trkseg"), t = [], n = [], a = [];
8952
8960
  let o;
8953
8961
  for (let s = 0; s < e.length; s++)
@@ -8978,7 +8986,7 @@ function Js(r) {
8978
8986
  }
8979
8987
  };
8980
8988
  }
8981
- function Ys(r) {
8989
+ function Xs(r) {
8982
8990
  const e = fa(r, "rtept");
8983
8991
  return e === void 0 ? void 0 : {
8984
8992
  type: "Feature",
@@ -8992,7 +9000,7 @@ function Ys(r) {
8992
9000
  }
8993
9001
  };
8994
9002
  }
8995
- function Xs(r) {
9003
+ function Qs(r) {
8996
9004
  return {
8997
9005
  type: "Feature",
8998
9006
  properties: { ...Rr(r), ...nr(r, ["sym"]) },
@@ -9047,14 +9055,14 @@ function k(r, e) {
9047
9055
  const t = U(r, e);
9048
9056
  return t.length ? t[0] : null;
9049
9057
  }
9050
- function Qs(r) {
9058
+ function el(r) {
9051
9059
  return r.normalize && r.normalize(), r;
9052
9060
  }
9053
9061
  function ya(r) {
9054
9062
  return r.map(Number.parseFloat).map((e) => Number.isNaN(e) ? null : e);
9055
9063
  }
9056
9064
  function P(r) {
9057
- return r && Qs(r), r && r.textContent;
9065
+ return r && el(r), r && r.textContent;
9058
9066
  }
9059
9067
  function nr(r, e) {
9060
9068
  const t = {};
@@ -9080,7 +9088,7 @@ function ha(r) {
9080
9088
  heartRate: n !== null ? Number.parseFloat(P(n) ?? "0") : null
9081
9089
  };
9082
9090
  }
9083
- function el(r) {
9091
+ function tl(r) {
9084
9092
  let e = r;
9085
9093
  try {
9086
9094
  typeof e == "string" && (e = Pr(e));
@@ -9097,8 +9105,8 @@ function el(r) {
9097
9105
  }
9098
9106
  return null;
9099
9107
  }
9100
- async function tl(r, e = {}) {
9101
- const t = e.download ?? !1, n = await rl(r);
9108
+ async function rl(r, e = {}) {
9109
+ const t = e.download ?? !1, n = await nl(r);
9102
9110
  if (t) {
9103
9111
  const a = e.filename ?? "maptiler_screenshot.png", o = document.createElement("a");
9104
9112
  o.style.display = "none", document.body.appendChild(o), o.href = URL.createObjectURL(n), o.download = a, o.click(), setTimeout(() => {
@@ -9107,7 +9115,7 @@ async function tl(r, e = {}) {
9107
9115
  }
9108
9116
  return n;
9109
9117
  }
9110
- function rl(r) {
9118
+ function nl(r) {
9111
9119
  return new Promise((e, t) => {
9112
9120
  r.redraw(), r.once("idle", () => {
9113
9121
  r.getCanvas().toBlob((n) => {
@@ -9259,7 +9267,7 @@ function st(r) {
9259
9267
  const e = r.toString(16);
9260
9268
  return e.length === 1 ? `0${e}` : e;
9261
9269
  }
9262
- function nl(r) {
9270
+ function al(r) {
9263
9271
  return `#${st(r[0])}${st(r[1])}${st(r[2])}${r.length === 4 ? st(r[3]) : ""}`;
9264
9272
  }
9265
9273
  class x extends Array {
@@ -9353,7 +9361,7 @@ class x extends Array {
9353
9361
  smooth: !0,
9354
9362
  withAlpha: !1
9355
9363
  }) {
9356
- return nl(this.getColor(t, n));
9364
+ return al(this.getColor(t, n));
9357
9365
  }
9358
9366
  /**
9359
9367
  * Get the color of the color ramp at a relative position in [0, 1]
@@ -9372,11 +9380,11 @@ class x extends Array {
9372
9380
  const a = n.getContext("2d");
9373
9381
  if (!a) throw new Error("Canvs context is missing");
9374
9382
  const o = a.getImageData(0, 0, n.width, n.height), i = o.data, s = t.size, l = this[0].value, p = (this.at(-1).value - l) / s;
9375
- for (let m = 0; m < s; m += 1) {
9376
- const f = this.getColor(l + m * p, {
9383
+ for (let y = 0; y < s; y += 1) {
9384
+ const f = this.getColor(l + y * p, {
9377
9385
  smooth: t.smooth
9378
9386
  });
9379
- i[m * 4] = f[0], i[m * 4 + 1] = f[1], i[m * 4 + 2] = f[2], i[m * 4 + 3] = f.length > 3 ? f[3] : 255;
9387
+ i[y * 4] = f[0], i[y * 4 + 1] = f[1], i[y * 4 + 2] = f[2], i[y * 4 + 3] = f.length > 3 ? f[3] : 255;
9380
9388
  }
9381
9389
  return a.putImageData(o, 0, 0), n;
9382
9390
  }
@@ -9388,33 +9396,33 @@ class x extends Array {
9388
9396
  let s;
9389
9397
  if (t === "ease-in-square")
9390
9398
  s = Array.from({ length: n }, (c, p) => {
9391
- const m = p * i, f = m ** 2, d = o.getColor(f);
9392
- return { value: m, color: d };
9399
+ const y = p * i, f = y ** 2, d = o.getColor(f);
9400
+ return { value: y, color: d };
9393
9401
  });
9394
9402
  else if (t === "ease-out-square")
9395
9403
  s = Array.from({ length: n }, (c, p) => {
9396
- const m = p * i, f = 1 - (1 - m) ** 2, d = o.getColor(f);
9397
- return { value: m, color: d };
9404
+ const y = p * i, f = 1 - (1 - y) ** 2, d = o.getColor(f);
9405
+ return { value: y, color: d };
9398
9406
  });
9399
9407
  else if (t === "ease-out-sqrt")
9400
9408
  s = Array.from({ length: n }, (c, p) => {
9401
- const m = p * i, f = m ** 0.5, d = o.getColor(f);
9402
- return { value: m, color: d };
9409
+ const y = p * i, f = y ** 0.5, d = o.getColor(f);
9410
+ return { value: y, color: d };
9403
9411
  });
9404
9412
  else if (t === "ease-in-sqrt")
9405
9413
  s = Array.from({ length: n }, (c, p) => {
9406
- const m = p * i, f = 1 - (1 - m) ** 0.5, d = o.getColor(f);
9407
- return { value: m, color: d };
9414
+ const y = p * i, f = 1 - (1 - y) ** 0.5, d = o.getColor(f);
9415
+ return { value: y, color: d };
9408
9416
  });
9409
9417
  else if (t === "ease-out-exp")
9410
9418
  s = Array.from({ length: n }, (c, p) => {
9411
- const m = p * i, f = 1 - 2 ** (-10 * m), d = o.getColor(f);
9412
- return { value: m, color: d };
9419
+ const y = p * i, f = 1 - 2 ** (-10 * y), d = o.getColor(f);
9420
+ return { value: y, color: d };
9413
9421
  });
9414
9422
  else if (t === "ease-in-exp")
9415
9423
  s = Array.from({ length: n }, (c, p) => {
9416
- const m = p * i, f = 2 ** (10 * m - 10), d = o.getColor(f);
9417
- return { value: m, color: d };
9424
+ const y = p * i, f = 2 ** (10 * y - 10), d = o.getColor(f);
9425
+ return { value: y, color: d };
9418
9426
  });
9419
9427
  else
9420
9428
  throw new Error("Invalid ressampling method.");
@@ -10196,7 +10204,7 @@ const Sa = {
10196
10204
  ]
10197
10205
  })
10198
10206
  };
10199
- async function al(r, e, t = {}) {
10207
+ async function ol(r, e, t = {}) {
10200
10208
  var a, o;
10201
10209
  if (!e.sourceId && !e.data)
10202
10210
  throw new Error("Creating a polyline layer requires an existing .sourceId or a valid .data property");
@@ -10211,18 +10219,18 @@ async function al(r, e, t = {}) {
10211
10219
  const s = await (await fetch(n, t)).text();
10212
10220
  n = pa(s);
10213
10221
  } else {
10214
- const i = Ja(n) ?? el(n);
10222
+ const i = Ja(n) ?? tl(n);
10215
10223
  i && (n = i);
10216
10224
  }
10217
10225
  if (!n)
10218
10226
  throw new Error("Polyline data was provided as string but is incompatible with valid formats.");
10219
10227
  }
10220
- return ol(r, {
10228
+ return il(r, {
10221
10229
  ...e,
10222
10230
  data: n
10223
10231
  });
10224
10232
  }
10225
- function ol(r, e) {
10233
+ function il(r, e) {
10226
10234
  if (e.layerId && r.getLayer(e.layerId))
10227
10235
  throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
10228
10236
  const t = e.sourceId ?? et(), n = e.layerId ?? tt(), a = {
@@ -10236,12 +10244,12 @@ function ol(r, e) {
10236
10244
  });
10237
10245
  const o = e.lineWidth ?? 3, i = e.lineColor ?? Pt(), s = e.lineOpacity ?? 1, l = e.lineBlur ?? 0, u = e.lineGapWidth ?? 0;
10238
10246
  let c = e.lineDashArray ?? null;
10239
- const p = e.outlineWidth ?? 1, m = e.outlineColor ?? "#FFFFFF", f = e.outlineOpacity ?? 1, d = e.outlineBlur ?? 0;
10247
+ const p = e.outlineWidth ?? 1, y = e.outlineColor ?? "#FFFFFF", f = e.outlineOpacity ?? 1, d = e.outlineBlur ?? 0;
10240
10248
  if (typeof c == "string" && (c = $r(c)), e.outline === !0) {
10241
- const y = `${n}_outline`;
10242
- a.polylineOutlineLayerId = y, r.addLayer(
10249
+ const m = `${n}_outline`;
10250
+ a.polylineOutlineLayerId = m, r.addLayer(
10243
10251
  {
10244
- id: y,
10252
+ id: m,
10245
10253
  type: "line",
10246
10254
  source: t,
10247
10255
  layout: {
@@ -10252,7 +10260,7 @@ function ol(r, e) {
10252
10260
  maxzoom: e.maxzoom ?? 23,
10253
10261
  paint: {
10254
10262
  "line-opacity": typeof f == "number" ? f : z(f),
10255
- "line-color": typeof m == "string" ? m : be(m),
10263
+ "line-color": typeof y == "string" ? y : be(y),
10256
10264
  "line-width": ga(o, p),
10257
10265
  "line-blur": typeof d == "number" ? d : z(d)
10258
10266
  }
@@ -10288,7 +10296,7 @@ function ol(r, e) {
10288
10296
  e.beforeId
10289
10297
  ), a;
10290
10298
  }
10291
- function il(r, e) {
10299
+ function sl(r, e) {
10292
10300
  if (e.layerId && r.getLayer(e.layerId))
10293
10301
  throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
10294
10302
  const t = e.sourceId ?? et(), n = e.layerId ?? tt(), a = {
@@ -10297,16 +10305,16 @@ function il(r, e) {
10297
10305
  polygonSourceId: t
10298
10306
  };
10299
10307
  if (e.data && !r.getSource(t)) {
10300
- let y = e.data;
10301
- typeof y == "string" && vt(y) && (y = `https://api.maptiler.com/data/${y}/features.json?key=${O.apiKey}`), r.addSource(t, {
10308
+ let m = e.data;
10309
+ typeof m == "string" && vt(m) && (m = `https://api.maptiler.com/data/${m}/features.json?key=${O.apiKey}`), r.addSource(t, {
10302
10310
  type: "geojson",
10303
- data: y
10311
+ data: m
10304
10312
  });
10305
10313
  }
10306
10314
  let o = e.outlineDashArray ?? null;
10307
- const i = e.outlineWidth ?? 1, s = e.outlineColor ?? "#FFFFFF", l = e.outlineOpacity ?? 1, u = e.outlineBlur ?? 0, c = e.fillColor ?? Pt(), p = e.fillOpacity ?? 1, m = e.outlinePosition ?? "center", f = e.pattern ?? null;
10315
+ const i = e.outlineWidth ?? 1, s = e.outlineColor ?? "#FFFFFF", l = e.outlineOpacity ?? 1, u = e.outlineBlur ?? 0, c = e.fillColor ?? Pt(), p = e.fillOpacity ?? 1, y = e.outlinePosition ?? "center", f = e.pattern ?? null;
10308
10316
  typeof o == "string" && (o = $r(o));
10309
- const d = (y = null) => {
10317
+ const d = (m = null) => {
10310
10318
  if (r.addLayer(
10311
10319
  {
10312
10320
  id: n,
@@ -10318,18 +10326,18 @@ function il(r, e) {
10318
10326
  "fill-color": typeof c == "string" ? c : be(c),
10319
10327
  "fill-opacity": typeof p == "number" ? p : z(p),
10320
10328
  // Adding a pattern if provided
10321
- ...y && { "fill-pattern": y }
10329
+ ...m && { "fill-pattern": m }
10322
10330
  }
10323
10331
  },
10324
10332
  e.beforeId
10325
10333
  ), e.outline === !0) {
10326
10334
  let v;
10327
- m === "inside" ? typeof i == "number" ? v = 0.5 * i : v = z(
10335
+ y === "inside" ? typeof i == "number" ? v = 0.5 * i : v = z(
10328
10336
  i.map(({ zoom: w, value: b }) => ({
10329
10337
  zoom: w,
10330
10338
  value: 0.5 * b
10331
10339
  }))
10332
- ) : m === "outside" ? typeof i == "number" ? v = -0.5 * i : v = z(
10340
+ ) : y === "outside" ? typeof i == "number" ? v = -0.5 * i : v = z(
10333
10341
  i.map((w) => ({
10334
10342
  zoom: w.zoom,
10335
10343
  value: -0.5 * w.value
@@ -10365,16 +10373,16 @@ function il(r, e) {
10365
10373
  );
10366
10374
  }
10367
10375
  };
10368
- return f ? r.hasImage(f) ? d(f) : r.loadImage(f).then((y) => {
10369
- r.addImage(f, y.data), d(f);
10370
- }).catch((y) => {
10371
- console.error("Could not load the pattern image.", y.message), d();
10376
+ return f ? r.hasImage(f) ? d(f) : r.loadImage(f).then((m) => {
10377
+ r.addImage(f, m.data), d(f);
10378
+ }).catch((m) => {
10379
+ console.error("Could not load the pattern image.", m.message), d();
10372
10380
  }) : d(), a;
10373
10381
  }
10374
- function sl(r, e) {
10382
+ function ll(r, e) {
10375
10383
  if (e.layerId && r.getLayer(e.layerId))
10376
10384
  throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
10377
- const t = e.minPointRadius ?? 10, n = e.maxPointRadius ?? 50, a = e.cluster ?? !1, o = 20, i = Array.isArray(e.pointColor) ? e.pointColor : Sa.TURBO.scale(10, e.cluster ? 1e4 : 1e3).resample("ease-out-square"), s = i.getBounds(), l = e.sourceId ?? et(), u = e.layerId ?? tt(), c = e.showLabel ?? a, p = e.alignOnViewport ?? !0, m = e.outline ?? !1, f = e.outlineOpacity ?? 1, d = e.outlineWidth ?? 1, y = e.outlineColor ?? "#FFFFFF";
10385
+ const t = e.minPointRadius ?? 10, n = e.maxPointRadius ?? 50, a = e.cluster ?? !1, o = 20, i = Array.isArray(e.pointColor) ? e.pointColor : Sa.TURBO.scale(10, e.cluster ? 1e4 : 1e3).resample("ease-out-square"), s = i.getBounds(), l = e.sourceId ?? et(), u = e.layerId ?? tt(), c = e.showLabel ?? a, p = e.alignOnViewport ?? !0, y = e.outline ?? !1, f = e.outlineOpacity ?? 1, d = e.outlineWidth ?? 1, m = e.outlineColor ?? "#FFFFFF";
10378
10386
  let v;
10379
10387
  const w = e.zoomCompensation ?? !0, b = e.minzoom ?? 0, T = e.maxzoom ?? 23;
10380
10388
  typeof e.pointOpacity == "number" ? v = e.pointOpacity : Array.isArray(e.pointOpacity) ? v = z(e.pointOpacity) : e.cluster ? v = lr(i, "point_count") : e.property ? v = lr(i, e.property) : v = z([
@@ -10421,10 +10429,10 @@ function sl(r, e) {
10421
10429
  "circle-pitch-scale": "map",
10422
10430
  // scale with camera distance regardless of viewport/biewport alignement
10423
10431
  "circle-opacity": v,
10424
- ...m && {
10432
+ ...y && {
10425
10433
  "circle-stroke-opacity": typeof f == "number" ? f : z(f),
10426
10434
  "circle-stroke-width": typeof d == "number" ? d : z(d),
10427
- "circle-stroke-color": typeof y == "string" ? y : be(y)
10435
+ "circle-stroke-color": typeof m == "string" ? m : be(m)
10428
10436
  }
10429
10437
  },
10430
10438
  minzoom: b,
@@ -10445,10 +10453,10 @@ function sl(r, e) {
10445
10453
  "circle-color": typeof e.pointColor == "string" ? e.pointColor : i.getColorHex(i.getBounds().min),
10446
10454
  "circle-radius": typeof e.pointRadius == "number" ? e.pointRadius : Array.isArray(e.pointRadius) ? z(e.pointRadius) : R[0].pointRadius * 0.75,
10447
10455
  "circle-opacity": v,
10448
- ...m && {
10456
+ ...y && {
10449
10457
  "circle-stroke-opacity": typeof f == "number" ? f : z(f),
10450
10458
  "circle-stroke-width": typeof d == "number" ? d : z(d),
10451
- "circle-stroke-color": typeof y == "string" ? y : be(y)
10459
+ "circle-stroke-color": typeof m == "string" ? m : be(m)
10452
10460
  }
10453
10461
  },
10454
10462
  minzoom: b,
@@ -10497,10 +10505,10 @@ function sl(r, e) {
10497
10505
  "circle-color": R,
10498
10506
  "circle-opacity": v,
10499
10507
  "circle-radius": ae,
10500
- ...m && {
10508
+ ...y && {
10501
10509
  "circle-stroke-opacity": typeof f == "number" ? f : z(f),
10502
10510
  "circle-stroke-width": typeof d == "number" ? d : z(d),
10503
- "circle-stroke-color": typeof y == "string" ? y : be(y)
10511
+ "circle-stroke-color": typeof m == "string" ? m : be(m)
10504
10512
  }
10505
10513
  },
10506
10514
  minzoom: b,
@@ -10538,7 +10546,7 @@ function sl(r, e) {
10538
10546
  }
10539
10547
  return j;
10540
10548
  }
10541
- function ll(r, e) {
10549
+ function ul(r, e) {
10542
10550
  if (e.layerId && r.getLayer(e.layerId))
10543
10551
  throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
10544
10552
  const t = e.sourceId ?? et(), n = e.layerId ?? tt(), a = e.minzoom ?? 0, o = e.maxzoom ?? 23, i = e.zoomCompensation ?? !0, s = e.opacity ?? [
@@ -10554,18 +10562,18 @@ function ll(r, e) {
10554
10562
  { zoom: 0, value: 0.01 },
10555
10563
  { zoom: 4, value: 0.2 },
10556
10564
  { zoom: 16, value: 1 }
10557
- ], p = e.property ?? null, m = e.weight ?? 1;
10565
+ ], p = e.property ?? null, y = e.weight ?? 1;
10558
10566
  let f = 1;
10559
- p ? typeof m == "number" ? (f = m, typeof e.weight == "number" && console.warn("The option `.property` is ignored when `.propertyValueWeights` is not of type `PropertyValueWeights`")) : Array.isArray(m) ? f = va(m, p) : console.warn("The option `.property` is ignored when `.propertyValueWeights` is not of type `PropertyValueWeights`") : typeof m == "number" ? f = m : Array.isArray(m) && console.warn("The options `.propertyValueWeights` can only be used when `.property` is provided.");
10567
+ p ? typeof y == "number" ? (f = y, typeof e.weight == "number" && console.warn("The option `.property` is ignored when `.propertyValueWeights` is not of type `PropertyValueWeights`")) : Array.isArray(y) ? f = va(y, p) : console.warn("The option `.property` is ignored when `.propertyValueWeights` is not of type `PropertyValueWeights`") : typeof y == "number" ? f = y : Array.isArray(y) && console.warn("The options `.propertyValueWeights` can only be used when `.property` is provided.");
10560
10568
  const d = [
10561
10569
  { zoom: 0, value: 50 * 0.025 },
10562
10570
  { zoom: 2, value: 50 * 0.05 },
10563
10571
  { zoom: 4, value: 50 * 0.1 },
10564
10572
  { zoom: 8, value: 50 * 0.25 },
10565
10573
  { zoom: 16, value: 50 }
10566
- ], y = e.radius ?? (i ? d : 10);
10574
+ ], m = e.radius ?? (i ? d : 10);
10567
10575
  let v = 1;
10568
- typeof y == "number" ? v = y : Array.isArray(y) && "zoom" in y[0] ? v = z(y) : p && Array.isArray(y) && "propertyValue" in y[0] ? v = ba(y, p, i) : !p && Array.isArray(y) && "propertyValue" in y[0] ? (v = z(d), console.warn("The option `.radius` can only be property-driven if the option `.property` is provided.")) : v = z(d);
10576
+ typeof m == "number" ? v = m : Array.isArray(m) && "zoom" in m[0] ? v = z(m) : p && Array.isArray(m) && "propertyValue" in m[0] ? v = ba(m, p, i) : !p && Array.isArray(m) && "propertyValue" in m[0] ? (v = z(d), console.warn("The option `.radius` can only be property-driven if the option `.property` is provided.")) : v = z(d);
10569
10577
  const w = {
10570
10578
  heatmapLayerId: n,
10571
10579
  heatmapSourceId: t
@@ -10595,12 +10603,12 @@ function ll(r, e) {
10595
10603
  e.beforeId
10596
10604
  ), w;
10597
10605
  }
10598
- const Nl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10606
+ const Ol = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10599
10607
  __proto__: null,
10600
- addHeatmap: ll,
10601
- addPoint: sl,
10602
- addPolygon: il,
10603
- addPolyline: al,
10608
+ addHeatmap: ul,
10609
+ addPoint: ll,
10610
+ addPolygon: sl,
10611
+ addPolyline: ol,
10604
10612
  colorDrivenByProperty: ir,
10605
10613
  colorPalettes: ar,
10606
10614
  computeRampedOutlineWidth: ga,
@@ -10616,174 +10624,174 @@ const Nl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10616
10624
  radiusDrivenByPropertyHeatmap: ba,
10617
10625
  rampedOptionsToLayerPaintSpec: z,
10618
10626
  rampedPropertyValueWeight: va,
10619
- takeScreenshot: tl
10627
+ takeScreenshot: rl
10620
10628
  }, Symbol.toStringTag, { value: "Module" }));
10621
10629
  Wa();
10622
- function Ol() {
10623
- return "3.1.1";
10624
- }
10625
- const Fl = 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, {
10626
- setRTLTextPlugin: du,
10627
- getRTLTextPluginStatus: yu,
10628
- LngLat: mu,
10629
- LngLatBounds: hu,
10630
- MercatorCoordinate: gu,
10631
- Evented: vu,
10632
- AJAXError: bu,
10633
- prewarm: wu,
10634
- clearPrewarmedResources: Su,
10635
- Hash: xu,
10636
- Point: ku,
10637
- EdgeInsets: Lu,
10638
- DragRotateHandler: Cu,
10639
- DragPanHandler: Au,
10640
- TwoFingersTouchZoomRotateHandler: Tu,
10641
- DoubleClickZoomHandler: Iu,
10642
- TwoFingersTouchZoomHandler: Eu,
10643
- TwoFingersTouchRotateHandler: Mu,
10644
- getWorkerCount: _u,
10645
- setWorkerCount: zu,
10646
- getMaxParallelImageRequests: Pu,
10647
- setMaxParallelImageRequests: Ru,
10648
- getWorkerUrl: $u,
10649
- setWorkerUrl: ju,
10650
- addSourceType: Nu,
10651
- importScriptInWorkers: Ou,
10652
- addProtocol: Fu,
10653
- removeProtocol: Du
10630
+ function Fl() {
10631
+ return "3.2.0";
10632
+ }
10633
+ const Dl = S.Map, ql = S.Marker, Bl = S.Popup, Ul = S.Style, Vl = S.CanvasSource, Gl = S.GeoJSONSource, Hl = S.ImageSource, Kl = S.RasterTileSource, Wl = S.RasterDEMTileSource, Zl = S.VectorTileSource, Jl = S.VideoSource, Yl = S.NavigationControl, Xl = S.GeolocateControl, Ql = S.AttributionControl, eu = S.LogoControl, tu = S.ScaleControl, ru = S.FullscreenControl, nu = S.TerrainControl, au = S.BoxZoomHandler, ou = S.ScrollZoomHandler, iu = S.CooperativeGesturesHandler, su = S.KeyboardHandler, lu = S.TwoFingersTouchPitchHandler, uu = S.MapWheelEvent, cu = S.MapTouchEvent, pu = S.MapMouseEvent, fu = S.config, du = S.getVersion, {
10634
+ setRTLTextPlugin: yu,
10635
+ getRTLTextPluginStatus: mu,
10636
+ LngLat: hu,
10637
+ LngLatBounds: gu,
10638
+ MercatorCoordinate: vu,
10639
+ Evented: bu,
10640
+ AJAXError: wu,
10641
+ prewarm: Su,
10642
+ clearPrewarmedResources: xu,
10643
+ Hash: ku,
10644
+ Point: Lu,
10645
+ EdgeInsets: Cu,
10646
+ DragRotateHandler: Au,
10647
+ DragPanHandler: Tu,
10648
+ TwoFingersTouchZoomRotateHandler: Iu,
10649
+ DoubleClickZoomHandler: Eu,
10650
+ TwoFingersTouchZoomHandler: Mu,
10651
+ TwoFingersTouchRotateHandler: _u,
10652
+ getWorkerCount: zu,
10653
+ setWorkerCount: Pu,
10654
+ getMaxParallelImageRequests: Ru,
10655
+ setMaxParallelImageRequests: $u,
10656
+ getWorkerUrl: ju,
10657
+ setWorkerUrl: Nu,
10658
+ addSourceType: Ou,
10659
+ importScriptInWorkers: Fu,
10660
+ addProtocol: Du,
10661
+ removeProtocol: qu
10654
10662
  } = S;
10655
10663
  export {
10656
- bu as AJAXError,
10657
- Tl as AttributionControl,
10658
- Xl as AttributionControlMLGL,
10659
- El as BoxZoomHandler,
10660
- nu as BoxZoomHandlerMLGL,
10661
- wl as CanvasSource,
10662
- Ul as CanvasSourceMLGL,
10664
+ wu as AJAXError,
10665
+ Il as AttributionControl,
10666
+ Ql as AttributionControlMLGL,
10667
+ Ml as BoxZoomHandler,
10668
+ au as BoxZoomHandlerMLGL,
10669
+ Sl as CanvasSource,
10670
+ Vl as CanvasSourceMLGL,
10663
10671
  x as ColorRamp,
10664
10672
  Sa as ColorRampCollection,
10665
- _l as CooperativeGesturesHandler,
10666
- ou as CooperativeGesturesHandlerMLGL,
10673
+ zl as CooperativeGesturesHandler,
10674
+ iu as CooperativeGesturesHandlerMLGL,
10667
10675
  fe as DOMcreate,
10668
10676
  _r as DOMremove,
10669
- Iu as DoubleClickZoomHandler,
10670
- Au as DragPanHandler,
10671
- Cu as DragRotateHandler,
10672
- Lu as EdgeInsets,
10673
- vu as Evented,
10677
+ Eu as DoubleClickZoomHandler,
10678
+ Tu as DragPanHandler,
10679
+ Au as DragRotateHandler,
10680
+ Cu as EdgeInsets,
10681
+ bu as Evented,
10674
10682
  co as FullscreenControl,
10675
- tu as FullscreenControlMLGL,
10676
- Sl as GeoJSONSource,
10677
- Vl as GeoJSONSourceMLGL,
10683
+ ru as FullscreenControlMLGL,
10684
+ xl as GeoJSONSource,
10685
+ Gl as GeoJSONSourceMLGL,
10678
10686
  so as GeolocateControl,
10679
- Yl as GeolocateControlMLGL,
10680
- Hs as GeolocationType,
10681
- xu as Hash,
10682
- xl as ImageSource,
10683
- Gl as ImageSourceMLGL,
10684
- zl as KeyboardHandler,
10685
- iu as KeyboardHandlerMLGL,
10687
+ Xl as GeolocateControlMLGL,
10688
+ Ks as GeolocationType,
10689
+ ku as Hash,
10690
+ kl as ImageSource,
10691
+ Hl as ImageSourceMLGL,
10692
+ Pl as KeyboardHandler,
10693
+ su as KeyboardHandlerMLGL,
10686
10694
  M as Language,
10687
- mu as LngLat,
10688
- hu as LngLatBounds,
10695
+ hu as LngLat,
10696
+ gu as LngLatBounds,
10689
10697
  lo as LogoControl,
10690
- Ql as LogoControlMLGL,
10698
+ eu as LogoControlMLGL,
10691
10699
  zr as Map,
10692
- Fl as MapMLGL,
10693
- jl as MapMouseEvent,
10694
- cu as MapMouseEventMLGL,
10695
- Uu as MapStyle,
10696
- Vu as MapStyleVariant,
10697
- $l as MapTouchEvent,
10698
- uu as MapTouchEventMLGL,
10699
- Rl as MapWheelEvent,
10700
- lu as MapWheelEventMLGL,
10701
- As as MaptilerGeolocateControl,
10700
+ Dl as MapMLGL,
10701
+ Nl as MapMouseEvent,
10702
+ pu as MapMouseEventMLGL,
10703
+ Vu as MapStyle,
10704
+ Gu as MapStyleVariant,
10705
+ jl as MapTouchEvent,
10706
+ cu as MapTouchEventMLGL,
10707
+ $l as MapWheelEvent,
10708
+ uu as MapWheelEventMLGL,
10709
+ Ts as MaptilerGeolocateControl,
10702
10710
  Hr as MaptilerLogoControl,
10703
- Ls as MaptilerNavigationControl,
10704
- Ts as MaptilerProjectionControl,
10705
- ks as MaptilerTerrainControl,
10706
- hl as Marker,
10707
- Dl as MarkerMLGL,
10708
- gu as MercatorCoordinate,
10709
- Jl as NavigationControMLGL,
10711
+ Cs as MaptilerNavigationControl,
10712
+ Is as MaptilerProjectionControl,
10713
+ Ls as MaptilerTerrainControl,
10714
+ gl as Marker,
10715
+ ql as MarkerMLGL,
10716
+ vu as MercatorCoordinate,
10717
+ Yl as NavigationControMLGL,
10710
10718
  io as NavigationControl,
10711
- ku as Point,
10712
- vl as Popup,
10713
- ql as PopupMLGL,
10714
- Ll as RasterDEMTileSource,
10715
- Kl as RasterDEMTileSourceMLGL,
10716
- kl as RasterTileSource,
10717
- Hl as RasterTileSourceMLGL,
10718
- Gu as ReferenceMapStyle,
10719
+ Lu as Point,
10720
+ bl as Popup,
10721
+ Bl as PopupMLGL,
10722
+ Cl as RasterDEMTileSource,
10723
+ Wl as RasterDEMTileSourceMLGL,
10724
+ Ll as RasterTileSource,
10725
+ Kl as RasterTileSourceMLGL,
10726
+ Hu as ReferenceMapStyle,
10719
10727
  uo as ScaleControl,
10720
- eu as ScaleControlMLGL,
10721
- Ml as ScrollZoomHandler,
10722
- au as ScrollZoomHandlerMLGL,
10728
+ tu as ScaleControlMLGL,
10729
+ _l as ScrollZoomHandler,
10730
+ ou as ScrollZoomHandlerMLGL,
10723
10731
  qa as SdkConfig,
10724
- Hu as ServiceError,
10725
- bl as Style,
10726
- Bl as StyleMLGL,
10727
- ru as TerrainControMLGL,
10728
- Il as TerrainControl,
10729
- Pl as TwoFingersTouchPitchHandler,
10730
- su as TwoFingersTouchPitchHandlerMLGL,
10731
- Mu as TwoFingersTouchRotateHandler,
10732
- Eu as TwoFingersTouchZoomHandler,
10733
- Tu as TwoFingersTouchZoomRotateHandler,
10734
- Cl as VectorTileSource,
10735
- Wl as VectorTileSourceMLGL,
10736
- Al as VideoSource,
10737
- Zl as VideoSourceMLGL,
10738
- Fu as addProtocol,
10739
- Nu as addSourceType,
10740
- Ku as areSameLanguages,
10741
- Wu as bufferToPixelDataBrowser,
10742
- Zu as circumferenceAtLatitude,
10743
- Su as clearPrewarmedResources,
10732
+ Ku as ServiceError,
10733
+ wl as Style,
10734
+ Ul as StyleMLGL,
10735
+ nu as TerrainControMLGL,
10736
+ El as TerrainControl,
10737
+ Rl as TwoFingersTouchPitchHandler,
10738
+ lu as TwoFingersTouchPitchHandlerMLGL,
10739
+ _u as TwoFingersTouchRotateHandler,
10740
+ Mu as TwoFingersTouchZoomHandler,
10741
+ Iu as TwoFingersTouchZoomRotateHandler,
10742
+ Al as VectorTileSource,
10743
+ Zl as VectorTileSourceMLGL,
10744
+ Tl as VideoSource,
10745
+ Jl as VideoSourceMLGL,
10746
+ Du as addProtocol,
10747
+ Ou as addSourceType,
10748
+ Wu as areSameLanguages,
10749
+ Zu as bufferToPixelDataBrowser,
10750
+ Ju as circumferenceAtLatitude,
10751
+ xu as clearPrewarmedResources,
10744
10752
  O as config,
10745
- pu as configMLGL,
10746
- Ju as coordinates,
10747
- Yu as data,
10748
- ml as displayWebGLContextLostWarning,
10749
- Xu as elevation,
10750
- Qu as expandMapStyle,
10751
- ec as geocoding,
10752
- tc as geolocation,
10753
- rc as getAutoLanguage,
10753
+ fu as configMLGL,
10754
+ Yu as coordinates,
10755
+ Xu as data,
10756
+ hl as displayWebGLContextLostWarning,
10757
+ Qu as elevation,
10758
+ ec as expandMapStyle,
10759
+ tc as geocoding,
10760
+ rc as geolocation,
10761
+ nc as getAutoLanguage,
10754
10762
  qr as getBrowserLanguage,
10755
- nc as getBufferToPixelDataParser,
10756
- ac as getLanguageInfoFromCode,
10757
- oc as getLanguageInfoFromFlag,
10758
- ic as getLanguageInfoFromKey,
10759
- fu as getMapLibreVersion,
10760
- Pu as getMaxParallelImageRequests,
10761
- yu as getRTLTextPluginStatus,
10762
- sc as getTileCache,
10763
- Ol as getVersion,
10763
+ ac as getBufferToPixelDataParser,
10764
+ oc as getLanguageInfoFromCode,
10765
+ ic as getLanguageInfoFromFlag,
10766
+ sc as getLanguageInfoFromKey,
10767
+ du as getMapLibreVersion,
10768
+ Ru as getMaxParallelImageRequests,
10769
+ mu as getRTLTextPluginStatus,
10770
+ lc as getTileCache,
10771
+ Fl as getVersion,
10764
10772
  Ya as getWebGLSupportError,
10765
- _u as getWorkerCount,
10766
- $u as getWorkerUrl,
10773
+ zu as getWorkerCount,
10774
+ ju as getWorkerUrl,
10767
10775
  ca as gpx,
10768
- el as gpxOrKml,
10776
+ tl as gpxOrKml,
10769
10777
  ua as hasChildNodeWithName,
10770
- Nl as helpers,
10771
- Ou as importScriptInWorkers,
10772
- lc as isLanguageInfo,
10778
+ Ol as helpers,
10779
+ Fu as importScriptInWorkers,
10780
+ uc as isLanguageInfo,
10773
10781
  pa as kml,
10774
- uc as mapStylePresetList,
10775
- cc as math,
10776
- pc as misc,
10777
- wu as prewarm,
10778
- Du as removeProtocol,
10779
- Ru as setMaxParallelImageRequests,
10780
- du as setRTLTextPlugin,
10781
- zu as setWorkerCount,
10782
- ju as setWorkerUrl,
10783
- fc as staticMaps,
10782
+ cc as mapStylePresetList,
10783
+ pc as math,
10784
+ fc as misc,
10785
+ Su as prewarm,
10786
+ qu as removeProtocol,
10787
+ $u as setMaxParallelImageRequests,
10788
+ yu as setRTLTextPlugin,
10789
+ Pu as setWorkerCount,
10790
+ Nu as setWorkerUrl,
10791
+ dc as staticMaps,
10784
10792
  Pr as str2xml,
10785
- dc as styleToStyle,
10786
- yc as toLanguageInfo,
10793
+ yc as styleToStyle,
10794
+ mc as toLanguageInfo,
10787
10795
  gn as xml2str
10788
10796
  };
10789
10797
  //# sourceMappingURL=maptiler-sdk.mjs.map