@maptiler/sdk 3.6.2-rc1 → 3.6.2-rc3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,10 +3,10 @@ var dn = (r) => {
3
3
  throw TypeError(r);
4
4
  };
5
5
  var To = (r, e, t) => e in r ? Eo(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
6
- var S = (r, e, t) => To(r, typeof e != "symbol" ? e + "" : e, t), tr = (r, e, t) => e.has(r) || dn("Cannot " + t);
7
- var P = (r, e, t) => (tr(r, e, "read from private field"), t ? t.call(r) : e.get(r)), we = (r, e, t) => e.has(r) ? dn("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), _e = (r, e, t, n) => (tr(r, e, "write to private field"), n ? n.call(r, t) : e.set(r, t), t), H = (r, e, t) => (tr(r, e, "access private method"), t);
6
+ var S = (r, e, t) => To(r, typeof e != "symbol" ? e + "" : e, t), rr = (r, e, t) => e.has(r) || dn("Cannot " + t);
7
+ var P = (r, e, t) => (rr(r, e, "read from private field"), t ? t.call(r) : e.get(r)), be = (r, e, t) => e.has(r) ? dn("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), _e = (r, e, t, n) => (rr(r, e, "write to private field"), n ? n.call(r, t) : e.set(r, t), t), H = (r, e, t) => (rr(r, e, "access private method"), t);
8
8
  import k from "maplibre-gl";
9
- import { Language as _o, getLanguageInfoFromCode as hn, config as rr, MapStyle as Qe, mapStylePresetList as nr, expandMapStyle as Io, MapStyleVariant as Mo, ReferenceMapStyle as Po, toLanguageInfo as yn, getLanguageInfoFromFlag as Ro, geolocation as mn } from "@maptiler/client";
9
+ import { Language as _o, getLanguageInfoFromCode as hn, config as nr, MapStyle as et, mapStylePresetList as ar, expandMapStyle as Io, MapStyleVariant as Mo, ReferenceMapStyle as Po, toLanguageInfo as yn, getLanguageInfoFromFlag as Ro, geolocation as mn } from "@maptiler/client";
10
10
  import { MapStyle as Ip, MapStyleVariant as Mp, ReferenceMapStyle as Pp, ServiceError as Rp, areSameLanguages as zp, bufferToPixelDataBrowser as Fp, circumferenceAtLatitude as $p, coordinates as Op, data as jp, elevation as Np, expandMapStyle as Dp, geocoding as Up, geolocation as Bp, getAutoLanguage as qp, getBufferToPixelDataParser as Gp, getLanguageInfoFromCode as Vp, getLanguageInfoFromFlag as Hp, getLanguageInfoFromKey as Kp, getTileCache as Xp, isLanguageInfo as Zp, mapStylePresetList as Yp, math as Wp, misc as Jp, staticMaps as Qp, styleToStyle as ef, toLanguageInfo as tf } from "@maptiler/client";
11
11
  import zo from "events";
12
12
  import { v4 as Fo } from "uuid";
@@ -149,7 +149,7 @@ class Oo extends zo {
149
149
  * Set the MapTiler Cloud API key
150
150
  */
151
151
  set apiKey(t) {
152
- this._apiKey = t, rr.apiKey = t, this.emit("apiKey", t);
152
+ this._apiKey = t, nr.apiKey = t, this.emit("apiKey", t);
153
153
  }
154
154
  /**
155
155
  * Get the MapTiler Cloud API key
@@ -161,13 +161,13 @@ class Oo extends zo {
161
161
  * Set a the custom fetch function to replace the default one
162
162
  */
163
163
  set fetch(t) {
164
- rr.fetch = t;
164
+ nr.fetch = t;
165
165
  }
166
166
  /**
167
167
  * Get the fetch fucntion
168
168
  */
169
169
  get fetch() {
170
- return rr.fetch;
170
+ return nr.fetch;
171
171
  }
172
172
  }
173
173
  const D = new Oo(), xr = "localcache_source", kr = "localcache", jo = "maptiler_sdk", No = 1e3, Do = 100, Cr = typeof caches < "u", { addProtocol: vn } = k;
@@ -180,9 +180,9 @@ function Uo(r, e) {
180
180
  }
181
181
  return r.href;
182
182
  }
183
- let ar;
183
+ let or;
184
184
  async function fa() {
185
- return ar || (ar = await caches.open(jo)), ar;
185
+ return or || (or = await caches.open(jo)), or;
186
186
  }
187
187
  let bn = 0;
188
188
  async function Bo() {
@@ -267,7 +267,7 @@ function Sn(r) {
267
267
  function da() {
268
268
  return Math.random().toString(36).substring(2);
269
269
  }
270
- function Ot(r) {
270
+ function jt(r) {
271
271
  return /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/gi.test(r);
272
272
  }
273
273
  function Ho(r) {
@@ -3572,18 +3572,18 @@ var si = 8, li = {
3572
3572
  },
3573
3573
  promoteId: Hi
3574
3574
  };
3575
- class v {
3575
+ class g {
3576
3576
  constructor(e, t, n, a) {
3577
3577
  this.message = (e ? `${e}: ` : "") + n, a && (this.identifier = a), t != null && t.__line__ && (this.line = t.__line__);
3578
3578
  }
3579
3579
  }
3580
- function Tt(r, ...e) {
3580
+ function _t(r, ...e) {
3581
3581
  for (const t of e)
3582
3582
  for (const n in t)
3583
3583
  r[n] = t[n];
3584
3584
  return r;
3585
3585
  }
3586
- class de extends Error {
3586
+ class fe extends Error {
3587
3587
  constructor(e, t) {
3588
3588
  super(t), this.message = t, this.key = e;
3589
3589
  }
@@ -3608,7 +3608,7 @@ class Dr {
3608
3608
  return this.bindings[e] ? !0 : this.parent ? this.parent.has(e) : !1;
3609
3609
  }
3610
3610
  }
3611
- const jt = { kind: "null" }, w = { kind: "number" }, I = { kind: "string" }, _ = { kind: "boolean" }, he = { kind: "color" }, Nt = { kind: "projectionDefinition" }, Re = { kind: "object" }, T = { kind: "value" }, Xi = { kind: "error" }, Dt = { kind: "collator" }, Ut = { kind: "formatted" }, Bt = { kind: "padding" }, nt = { kind: "colorArray" }, qt = { kind: "numberArray" }, ft = { kind: "resolvedImage" }, Gt = { kind: "variableAnchorOffsetCollection" };
3611
+ const Nt = { kind: "null" }, b = { kind: "number" }, I = { kind: "string" }, _ = { kind: "boolean" }, de = { kind: "color" }, Dt = { kind: "projectionDefinition" }, Re = { kind: "object" }, T = { kind: "value" }, Xi = { kind: "error" }, Ut = { kind: "collator" }, Bt = { kind: "formatted" }, qt = { kind: "padding" }, at = { kind: "colorArray" }, Gt = { kind: "numberArray" }, dt = { kind: "resolvedImage" }, Vt = { kind: "variableAnchorOffsetCollection" };
3612
3612
  function Y(r, e) {
3613
3613
  return {
3614
3614
  kind: "array",
@@ -3624,33 +3624,33 @@ function j(r) {
3624
3624
  return r.kind;
3625
3625
  }
3626
3626
  const Zi = [
3627
- jt,
3628
- w,
3627
+ Nt,
3628
+ b,
3629
3629
  I,
3630
3630
  _,
3631
- he,
3632
- Nt,
3633
- Ut,
3631
+ de,
3632
+ Dt,
3633
+ Bt,
3634
3634
  Re,
3635
3635
  Y(T),
3636
- Bt,
3637
3636
  qt,
3638
- nt,
3639
- ft,
3640
- Gt
3637
+ Gt,
3638
+ at,
3639
+ dt,
3640
+ Vt
3641
3641
  ];
3642
- function at(r, e) {
3642
+ function ot(r, e) {
3643
3643
  if (e.kind === "error")
3644
3644
  return null;
3645
3645
  if (r.kind === "array") {
3646
- if (e.kind === "array" && (e.N === 0 && e.itemType.kind === "value" || !at(r.itemType, e.itemType)) && (typeof r.N != "number" || r.N === e.N))
3646
+ if (e.kind === "array" && (e.N === 0 && e.itemType.kind === "value" || !ot(r.itemType, e.itemType)) && (typeof r.N != "number" || r.N === e.N))
3647
3647
  return null;
3648
3648
  } else {
3649
3649
  if (r.kind === e.kind)
3650
3650
  return null;
3651
3651
  if (r.kind === "value") {
3652
3652
  for (const t of Zi)
3653
- if (!at(t, e))
3653
+ if (!ot(t, e))
3654
3654
  return null;
3655
3655
  }
3656
3656
  }
@@ -3662,7 +3662,7 @@ function Ur(r, e) {
3662
3662
  function ze(r, e) {
3663
3663
  return e.some((t) => t === "null" ? r === null : t === "array" ? Array.isArray(r) : t === "object" ? r && !Array.isArray(r) && typeof r == "object" : t === typeof r);
3664
3664
  }
3665
- function Se(r, e) {
3665
+ function we(r, e) {
3666
3666
  return r.kind === "array" && e.kind === "array" ? r.itemType.kind === e.itemType.kind && typeof r.N == "number" : r.kind === e.kind;
3667
3667
  }
3668
3668
  const ha = 0.96422, ya = 1, ma = 0.82521, ga = 4 / 29, Ge = 6 / 29, va = 3 * Ge * Ge, Yi = Ge * Ge * Ge, Wi = Math.PI / 180, Ji = 180 / Math.PI;
@@ -3670,33 +3670,33 @@ function ba(r) {
3670
3670
  return r = r % 360, r < 0 && (r += 360), r;
3671
3671
  }
3672
3672
  function wa([r, e, t, n]) {
3673
- r = or(r), e = or(e), t = or(t);
3673
+ r = ir(r), e = ir(e), t = ir(t);
3674
3674
  let a, o;
3675
- const i = ir((0.2225045 * r + 0.7168786 * e + 0.0606169 * t) / ya);
3676
- r === e && e === t ? a = o = i : (a = ir((0.4360747 * r + 0.3850649 * e + 0.1430804 * t) / ha), o = ir((0.0139322 * r + 0.0971045 * e + 0.7141733 * t) / ma));
3675
+ const i = sr((0.2225045 * r + 0.7168786 * e + 0.0606169 * t) / ya);
3676
+ r === e && e === t ? a = o = i : (a = sr((0.4360747 * r + 0.3850649 * e + 0.1430804 * t) / ha), o = sr((0.0139322 * r + 0.0971045 * e + 0.7141733 * t) / ma));
3677
3677
  const s = 116 * i - 16;
3678
3678
  return [s < 0 ? 0 : s, 500 * (a - i), 200 * (i - o), n];
3679
3679
  }
3680
- function or(r) {
3680
+ function ir(r) {
3681
3681
  return r <= 0.04045 ? r / 12.92 : Math.pow((r + 0.055) / 1.055, 2.4);
3682
3682
  }
3683
- function ir(r) {
3683
+ function sr(r) {
3684
3684
  return r > Yi ? Math.pow(r, 1 / 3) : r / va + ga;
3685
3685
  }
3686
3686
  function Sa([r, e, t, n]) {
3687
3687
  let a = (r + 16) / 116, o = isNaN(e) ? a : a + e / 500, i = isNaN(t) ? a : a - t / 200;
3688
- return a = ya * lr(a), o = ha * lr(o), i = ma * lr(i), [
3689
- sr(3.1338561 * o - 1.6168667 * a - 0.4906146 * i),
3688
+ return a = ya * ur(a), o = ha * ur(o), i = ma * ur(i), [
3689
+ lr(3.1338561 * o - 1.6168667 * a - 0.4906146 * i),
3690
3690
  // D50 -> sRGB
3691
- sr(-0.9787684 * o + 1.9161415 * a + 0.033454 * i),
3692
- sr(0.0719453 * o - 0.2289914 * a + 1.4052427 * i),
3691
+ lr(-0.9787684 * o + 1.9161415 * a + 0.033454 * i),
3692
+ lr(0.0719453 * o - 0.2289914 * a + 1.4052427 * i),
3693
3693
  n
3694
3694
  ];
3695
3695
  }
3696
- function sr(r) {
3696
+ function lr(r) {
3697
3697
  return r = r <= 304e-5 ? 12.92 * r : 1.055 * Math.pow(r, 1 / 2.4) - 0.055, r < 0 ? 0 : r > 1 ? 1 : r;
3698
3698
  }
3699
- function lr(r) {
3699
+ function ur(r) {
3700
3700
  return r > Ge ? r * r * r : va * (r - ga);
3701
3701
  }
3702
3702
  function Qi(r) {
@@ -3717,13 +3717,13 @@ function ts([r, e, t, n]) {
3717
3717
  const rs = Object.hasOwn || function(e, t) {
3718
3718
  return Object.prototype.hasOwnProperty.call(e, t);
3719
3719
  };
3720
- function et(r, e) {
3720
+ function tt(r, e) {
3721
3721
  return rs(r, e) ? r[e] : void 0;
3722
3722
  }
3723
3723
  function ns(r) {
3724
3724
  if (r = r.toLowerCase().trim(), r === "transparent")
3725
3725
  return [0, 0, 0, 0];
3726
- const e = et(as, r);
3726
+ const e = tt(as, r);
3727
3727
  if (e) {
3728
3728
  const [a, o, i] = e;
3729
3729
  return [a / 255, o / 255, i / 255, 1];
@@ -3732,10 +3732,10 @@ function ns(r) {
3732
3732
  const o = r.length < 6 ? 1 : 2;
3733
3733
  let i = 1;
3734
3734
  return [
3735
- bt(r.slice(i, i += o)),
3736
- bt(r.slice(i, i += o)),
3737
- bt(r.slice(i, i += o)),
3738
- bt(r.slice(i, i + o) || "ff")
3735
+ wt(r.slice(i, i += o)),
3736
+ wt(r.slice(i, i += o)),
3737
+ wt(r.slice(i, i += o)),
3738
+ wt(r.slice(i, i + o) || "ff")
3739
3739
  ];
3740
3740
  }
3741
3741
  if (r.startsWith("rgb")) {
@@ -3764,17 +3764,17 @@ function ns(r) {
3764
3764
  // ,|/ (optional)
3765
3765
  m,
3766
3766
  // <numeric> (optional)
3767
- b
3767
+ w
3768
3768
  // % (optional)
3769
- ] = o, g = [u || " ", f || " ", y].join("");
3770
- if (g === " " || g === " /" || g === ",," || g === ",,,") {
3769
+ ] = o, v = [u || " ", f || " ", y].join("");
3770
+ if (v === " " || v === " /" || v === ",," || v === ",,,") {
3771
3771
  const x = [l, p, h].join(""), A = x === "%%%" ? 100 : x === "" ? 255 : 0;
3772
3772
  if (A) {
3773
3773
  const L = [
3774
3774
  Be(+s / A, 0, 1),
3775
3775
  Be(+c / A, 0, 1),
3776
3776
  Be(+d / A, 0, 1),
3777
- m ? Cn(+m, b) : 1
3777
+ m ? Cn(+m, w) : 1
3778
3778
  ];
3779
3779
  if (Ln(L))
3780
3780
  return L;
@@ -3817,7 +3817,7 @@ function ns(r) {
3817
3817
  }
3818
3818
  }
3819
3819
  }
3820
- function bt(r) {
3820
+ function wt(r) {
3821
3821
  return parseInt(r.padEnd(2, r), 16) / 255;
3822
3822
  }
3823
3823
  function Cn(r, e) {
@@ -3979,13 +3979,13 @@ const as = {
3979
3979
  yellow: [255, 255, 0],
3980
3980
  yellowgreen: [154, 205, 50]
3981
3981
  };
3982
- function Ae(r, e, t) {
3982
+ function Le(r, e, t) {
3983
3983
  return r + t * (e - r);
3984
3984
  }
3985
3985
  function Ve(r, e, t) {
3986
- return r.map((n, a) => Ae(n, e[a], t));
3986
+ return r.map((n, a) => Le(n, e[a], t));
3987
3987
  }
3988
- class $ {
3988
+ class F {
3989
3989
  /**
3990
3990
  * @param r Red component premultiplied by `alpha` 0..1
3991
3991
  * @param g Green component premultiplied by `alpha` 0..1
@@ -4010,13 +4010,13 @@ class $ {
4010
4010
  * @returns A `Color` instance, or `undefined` if the input is not a valid color string.
4011
4011
  */
4012
4012
  static parse(e) {
4013
- if (e instanceof $)
4013
+ if (e instanceof F)
4014
4014
  return e;
4015
4015
  if (typeof e != "string")
4016
4016
  return;
4017
4017
  const t = ns(e);
4018
4018
  if (t)
4019
- return new $(...t, !1);
4019
+ return new F(...t, !1);
4020
4020
  }
4021
4021
  /**
4022
4022
  * Used in color interpolation and by 'to-rgba' expression.
@@ -4085,7 +4085,7 @@ class $ {
4085
4085
  switch (a) {
4086
4086
  case "rgb": {
4087
4087
  const [o, i, s, l] = Ve(e.rgb, t.rgb, n);
4088
- return new $(o, i, s, l, !1);
4088
+ return new F(o, i, s, l, !1);
4089
4089
  }
4090
4090
  case "hcl": {
4091
4091
  const [o, i, s, l] = e.hcl, [u, c, p, f] = t.hcl;
@@ -4094,25 +4094,25 @@ class $ {
4094
4094
  let x = u - o;
4095
4095
  u > o && x > 180 ? x -= 360 : u < o && o - u > 180 && (x += 360), d = o + n * x;
4096
4096
  } else isNaN(o) ? isNaN(u) ? d = NaN : (d = u, (s === 1 || s === 0) && (h = c)) : (d = o, (p === 1 || p === 0) && (h = i));
4097
- const [y, m, b, g] = es([
4097
+ const [y, m, w, v] = es([
4098
4098
  d,
4099
- h ?? Ae(i, c, n),
4100
- Ae(s, p, n),
4101
- Ae(l, f, n)
4099
+ h ?? Le(i, c, n),
4100
+ Le(s, p, n),
4101
+ Le(l, f, n)
4102
4102
  ]);
4103
- return new $(y, m, b, g, !1);
4103
+ return new F(y, m, w, v, !1);
4104
4104
  }
4105
4105
  case "lab": {
4106
4106
  const [o, i, s, l] = Sa(Ve(e.lab, t.lab, n));
4107
- return new $(o, i, s, l, !1);
4107
+ return new F(o, i, s, l, !1);
4108
4108
  }
4109
4109
  }
4110
4110
  }
4111
4111
  }
4112
- $.black = new $(0, 0, 0, 1);
4113
- $.white = new $(1, 1, 1, 1);
4114
- $.transparent = new $(0, 0, 0, 0);
4115
- $.red = new $(1, 0, 0, 1);
4112
+ F.black = new F(0, 0, 0, 1);
4113
+ F.white = new F(1, 1, 1, 1);
4114
+ F.transparent = new F(0, 0, 0, 0);
4115
+ F.red = new F(1, 0, 0, 1);
4116
4116
  class Br {
4117
4117
  constructor(e, t, n) {
4118
4118
  e ? this.sensitivity = t ? "variant" : "case" : this.sensitivity = t ? "accent" : "base", this.locale = n, this.collator = new Intl.Collator(this.locale ? this.locale : [], { sensitivity: this.sensitivity, usage: "search" });
@@ -4130,18 +4130,18 @@ class Lr {
4130
4130
  this.text = e, this.image = t, this.scale = n, this.fontStack = a, this.textColor = o, this.verticalAlign = i;
4131
4131
  }
4132
4132
  }
4133
- class ge {
4133
+ class me {
4134
4134
  constructor(e) {
4135
4135
  this.sections = e;
4136
4136
  }
4137
4137
  static fromString(e) {
4138
- return new ge([new Lr(e, null, null, null, null, null)]);
4138
+ return new me([new Lr(e, null, null, null, null, null)]);
4139
4139
  }
4140
4140
  isEmpty() {
4141
4141
  return this.sections.length === 0 ? !0 : !this.sections.some((e) => e.text.length !== 0 || e.image && e.image.name.length !== 0);
4142
4142
  }
4143
4143
  static factory(e) {
4144
- return e instanceof ge ? e : ge.fromString(e);
4144
+ return e instanceof me ? e : me.fromString(e);
4145
4145
  }
4146
4146
  toString() {
4147
4147
  return this.sections.length === 0 ? "" : this.sections.map((e) => e.text).join("");
@@ -4227,7 +4227,7 @@ class X {
4227
4227
  if (e instanceof X)
4228
4228
  return e;
4229
4229
  if (typeof e == "string") {
4230
- const n = $.parse(e);
4230
+ const n = F.parse(e);
4231
4231
  return n ? new X([n]) : void 0;
4232
4232
  }
4233
4233
  if (!Array.isArray(e))
@@ -4236,7 +4236,7 @@ class X {
4236
4236
  for (const n of e) {
4237
4237
  if (typeof n != "string")
4238
4238
  return;
4239
- const a = $.parse(n);
4239
+ const a = F.parse(n);
4240
4240
  if (!a)
4241
4241
  return;
4242
4242
  t.push(a);
@@ -4251,7 +4251,7 @@ class X {
4251
4251
  if (e.values.length != t.values.length)
4252
4252
  throw new Error(`colorArray: Arrays have mismatched length (${e.values.length} vs. ${t.values.length}), cannot interpolate.`);
4253
4253
  for (let i = 0; i < e.values.length; i++)
4254
- o.push($.interpolate(e.values[i], t.values[i], n, a));
4254
+ o.push(F.interpolate(e.values[i], t.values[i], n, a));
4255
4255
  return new X(o);
4256
4256
  }
4257
4257
  }
@@ -4293,12 +4293,12 @@ class ue {
4293
4293
  throw new N(`Cannot interpolate values containing mismatched anchors. from[${s}]: ${a[s]}, to[${s}]: ${o[s]}`);
4294
4294
  i.push(a[s]);
4295
4295
  const [l, u] = a[s + 1], [c, p] = o[s + 1];
4296
- i.push([Ae(l, c, n), Ae(u, p, n)]);
4296
+ i.push([Le(l, c, n), Le(u, p, n)]);
4297
4297
  }
4298
4298
  return new ue(i);
4299
4299
  }
4300
4300
  }
4301
- class Te {
4301
+ class Ee {
4302
4302
  constructor(e) {
4303
4303
  this.name = e.name, this.available = e.available;
4304
4304
  }
@@ -4306,7 +4306,7 @@ class Te {
4306
4306
  return this.name;
4307
4307
  }
4308
4308
  static fromString(e) {
4309
- return e ? new Te({ name: e, available: !1 }) : null;
4309
+ return e ? new Ee({ name: e, available: !1 }) : null;
4310
4310
  }
4311
4311
  }
4312
4312
  class ie {
@@ -4330,17 +4330,17 @@ class ie {
4330
4330
  function xa(r, e, t, n) {
4331
4331
  return typeof r == "number" && r >= 0 && r <= 255 && typeof e == "number" && e >= 0 && e <= 255 && typeof t == "number" && t >= 0 && t <= 255 ? typeof n > "u" || typeof n == "number" && n >= 0 && n <= 1 ? null : `Invalid rgba value [${[r, e, t, n].join(", ")}]: 'a' must be between 0 and 1.` : `Invalid rgba value [${(typeof n == "number" ? [r, e, t, n] : [r, e, t]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`;
4332
4332
  }
4333
- function ot(r) {
4334
- if (r === null || typeof r == "string" || typeof r == "boolean" || typeof r == "number" || r instanceof ie || r instanceof $ || r instanceof Br || r instanceof ge || r instanceof Q || r instanceof ee || r instanceof X || r instanceof ue || r instanceof Te)
4333
+ function it(r) {
4334
+ if (r === null || typeof r == "string" || typeof r == "boolean" || typeof r == "number" || r instanceof ie || r instanceof F || r instanceof Br || r instanceof me || r instanceof Q || r instanceof ee || r instanceof X || r instanceof ue || r instanceof Ee)
4335
4335
  return !0;
4336
4336
  if (Array.isArray(r)) {
4337
4337
  for (const e of r)
4338
- if (!ot(e))
4338
+ if (!it(e))
4339
4339
  return !1;
4340
4340
  return !0;
4341
4341
  } else if (typeof r == "object") {
4342
4342
  for (const e in r)
4343
- if (!ot(r[e]))
4343
+ if (!it(r[e]))
4344
4344
  return !1;
4345
4345
  return !0;
4346
4346
  } else
@@ -4348,31 +4348,31 @@ function ot(r) {
4348
4348
  }
4349
4349
  function B(r) {
4350
4350
  if (r === null)
4351
- return jt;
4351
+ return Nt;
4352
4352
  if (typeof r == "string")
4353
4353
  return I;
4354
4354
  if (typeof r == "boolean")
4355
4355
  return _;
4356
4356
  if (typeof r == "number")
4357
- return w;
4358
- if (r instanceof $)
4359
- return he;
4357
+ return b;
4358
+ if (r instanceof F)
4359
+ return de;
4360
4360
  if (r instanceof ie)
4361
- return Nt;
4362
- if (r instanceof Br)
4363
4361
  return Dt;
4364
- if (r instanceof ge)
4362
+ if (r instanceof Br)
4365
4363
  return Ut;
4366
- if (r instanceof Q)
4364
+ if (r instanceof me)
4367
4365
  return Bt;
4368
- if (r instanceof ee)
4366
+ if (r instanceof Q)
4369
4367
  return qt;
4368
+ if (r instanceof ee)
4369
+ return Gt;
4370
4370
  if (r instanceof X)
4371
- return nt;
4371
+ return at;
4372
4372
  if (r instanceof ue)
4373
- return Gt;
4374
- if (r instanceof Te)
4375
- return ft;
4373
+ return Vt;
4374
+ if (r instanceof Ee)
4375
+ return dt;
4376
4376
  if (Array.isArray(r)) {
4377
4377
  const e = r.length;
4378
4378
  let t;
@@ -4391,9 +4391,9 @@ function B(r) {
4391
4391
  } else
4392
4392
  return Re;
4393
4393
  }
4394
- function tt(r) {
4394
+ function rt(r) {
4395
4395
  const e = typeof r;
4396
- return r === null ? "" : e === "string" || e === "number" || e === "boolean" ? String(r) : r instanceof $ || r instanceof ie || r instanceof ge || r instanceof Q || r instanceof ee || r instanceof X || r instanceof ue || r instanceof Te ? r.toString() : JSON.stringify(r);
4396
+ return r === null ? "" : e === "string" || e === "number" || e === "boolean" ? String(r) : r instanceof F || r instanceof ie || r instanceof me || r instanceof Q || r instanceof ee || r instanceof X || r instanceof ue || r instanceof Ee ? r.toString() : JSON.stringify(r);
4397
4397
  }
4398
4398
  class He {
4399
4399
  constructor(e, t) {
@@ -4402,7 +4402,7 @@ class He {
4402
4402
  static parse(e, t) {
4403
4403
  if (e.length !== 2)
4404
4404
  return t.error(`'literal' expression requires exactly one argument, but found ${e.length - 1} instead.`);
4405
- if (!ot(e[1]))
4405
+ if (!it(e[1]))
4406
4406
  return t.error("invalid value");
4407
4407
  const n = e[1];
4408
4408
  let a = B(n);
@@ -4418,9 +4418,9 @@ class He {
4418
4418
  return !0;
4419
4419
  }
4420
4420
  }
4421
- const wt = {
4421
+ const St = {
4422
4422
  string: I,
4423
- number: w,
4423
+ number: b,
4424
4424
  boolean: _,
4425
4425
  object: Re
4426
4426
  };
@@ -4437,9 +4437,9 @@ class se {
4437
4437
  let s;
4438
4438
  if (e.length > 2) {
4439
4439
  const u = e[1];
4440
- if (typeof u != "string" || !(u in wt) || u === "object")
4440
+ if (typeof u != "string" || !(u in St) || u === "object")
4441
4441
  return t.error('The item type argument of "array" must be one of string, number, boolean', 1);
4442
- s = wt[u], n++;
4442
+ s = St[u], n++;
4443
4443
  } else
4444
4444
  s = T;
4445
4445
  let l;
@@ -4450,9 +4450,9 @@ class se {
4450
4450
  }
4451
4451
  a = Y(s, l);
4452
4452
  } else {
4453
- if (!wt[o])
4453
+ if (!St[o])
4454
4454
  throw new Error(`Types doesn't contain name = ${o}`);
4455
- a = wt[o];
4455
+ a = St[o];
4456
4456
  }
4457
4457
  const i = [];
4458
4458
  for (; n < e.length; n++) {
@@ -4466,7 +4466,7 @@ class se {
4466
4466
  evaluate(e) {
4467
4467
  for (let t = 0; t < this.args.length; t++) {
4468
4468
  const n = this.args[t].evaluate(e);
4469
- if (at(this.type, B(n))) {
4469
+ if (ot(this.type, B(n))) {
4470
4470
  if (t === this.args.length - 1)
4471
4471
  throw new N(`Expected value to be of type ${j(this.type)}, but found ${j(B(n))} instead.`);
4472
4472
  } else return n;
@@ -4482,11 +4482,11 @@ class se {
4482
4482
  }
4483
4483
  const An = {
4484
4484
  "to-boolean": _,
4485
- "to-color": he,
4486
- "to-number": w,
4485
+ "to-color": de,
4486
+ "to-number": b,
4487
4487
  "to-string": I
4488
4488
  };
4489
- class Ce {
4489
+ class ke {
4490
4490
  constructor(e, t) {
4491
4491
  this.type = e, this.args = t;
4492
4492
  }
@@ -4505,7 +4505,7 @@ class Ce {
4505
4505
  return null;
4506
4506
  o.push(s);
4507
4507
  }
4508
- return new Ce(a, o);
4508
+ return new ke(a, o);
4509
4509
  }
4510
4510
  evaluate(e) {
4511
4511
  switch (this.type.kind) {
@@ -4514,14 +4514,14 @@ class Ce {
4514
4514
  case "color": {
4515
4515
  let t, n;
4516
4516
  for (const a of this.args) {
4517
- if (t = a.evaluate(e), n = null, t instanceof $)
4517
+ if (t = a.evaluate(e), n = null, t instanceof F)
4518
4518
  return t;
4519
4519
  if (typeof t == "string") {
4520
4520
  const o = e.parseColor(t);
4521
4521
  if (o)
4522
4522
  return o;
4523
4523
  } else if (Array.isArray(t) && (t.length < 3 || t.length > 4 ? n = `Invalid rgba value ${JSON.stringify(t)}: expected an array containing either three or four numeric values.` : n = xa(t[0], t[1], t[2], t[3]), !n))
4524
- return new $(t[0] / 255, t[1] / 255, t[2] / 255, t[3]);
4524
+ return new F(t[0] / 255, t[1] / 255, t[2] / 255, t[3]);
4525
4525
  }
4526
4526
  throw new N(n || `Could not parse color from value '${typeof t == "string" ? t : JSON.stringify(t)}'`);
4527
4527
  }
@@ -4577,13 +4577,13 @@ class Ce {
4577
4577
  throw new N(`Could not convert ${JSON.stringify(t)} to number.`);
4578
4578
  }
4579
4579
  case "formatted":
4580
- return ge.fromString(tt(this.args[0].evaluate(e)));
4580
+ return me.fromString(rt(this.args[0].evaluate(e)));
4581
4581
  case "resolvedImage":
4582
- return Te.fromString(tt(this.args[0].evaluate(e)));
4582
+ return Ee.fromString(rt(this.args[0].evaluate(e)));
4583
4583
  case "projectionDefinition":
4584
4584
  return this.args[0].evaluate(e);
4585
4585
  default:
4586
- return tt(this.args[0].evaluate(e));
4586
+ return rt(this.args[0].evaluate(e));
4587
4587
  }
4588
4588
  }
4589
4589
  eachChild(e) {
@@ -4615,10 +4615,10 @@ class ka {
4615
4615
  }
4616
4616
  parseColor(e) {
4617
4617
  let t = this._parseColorCache.get(e);
4618
- return t || (t = $.parse(e), this._parseColorCache.set(e, t)), t;
4618
+ return t || (t = F.parse(e), this._parseColorCache.set(e, t)), t;
4619
4619
  }
4620
4620
  }
4621
- class Vt {
4621
+ class Ht {
4622
4622
  constructor(e, t, n = [], a, o = new Dr(), i = []) {
4623
4623
  this.registry = e, this.path = n, this.key = n.map((s) => `[${s}]`).join(""), this.scope = o, this.errors = i, this.expectedType = a, this._isConstant = t;
4624
4624
  }
@@ -4635,7 +4635,7 @@ class Vt {
4635
4635
  _parse(e, t) {
4636
4636
  (e === null || typeof e == "string" || typeof e == "boolean" || typeof e == "number") && (e = ["literal", e]);
4637
4637
  function n(a, o, i) {
4638
- return i === "assert" ? new se(o, [a]) : i === "coerce" ? new Ce(o, [a]) : a;
4638
+ return i === "assert" ? new se(o, [a]) : i === "coerce" ? new ke(o, [a]) : a;
4639
4639
  }
4640
4640
  if (Array.isArray(e)) {
4641
4641
  if (e.length === 0)
@@ -4680,7 +4680,7 @@ class Vt {
4680
4680
  */
4681
4681
  concat(e, t, n) {
4682
4682
  const a = typeof e == "number" ? this.path.concat(e) : this.path, o = n ? this.scope.concat(n) : this.scope;
4683
- return new Vt(this.registry, this._isConstant, a, t || null, o, this.errors);
4683
+ return new Ht(this.registry, this._isConstant, a, t || null, o, this.errors);
4684
4684
  }
4685
4685
  /**
4686
4686
  * Push a parsing (or type checking) error into the `this.errors`
@@ -4691,7 +4691,7 @@ class Vt {
4691
4691
  */
4692
4692
  error(e, ...t) {
4693
4693
  const n = `${this.key}${t.map((a) => `[${a}]`).join("")}`;
4694
- this.errors.push(new de(n, e));
4694
+ this.errors.push(new fe(n, e));
4695
4695
  }
4696
4696
  /**
4697
4697
  * Returns null if `t` is a subtype of `expected`; otherwise returns an
@@ -4701,11 +4701,11 @@ class Vt {
4701
4701
  * @returns null if `t` is a subtype of `expected`; otherwise returns an error message
4702
4702
  */
4703
4703
  checkSubtype(e, t) {
4704
- const n = at(e, t);
4704
+ const n = ot(e, t);
4705
4705
  return n && this.error(n), n;
4706
4706
  }
4707
4707
  }
4708
- class Ht {
4708
+ class Kt {
4709
4709
  constructor(e, t) {
4710
4710
  this.type = t.type, this.bindings = [].concat(e), this.result = t;
4711
4711
  }
@@ -4733,13 +4733,13 @@ class Ht {
4733
4733
  n.push([i, s]);
4734
4734
  }
4735
4735
  const a = t.parse(e[e.length - 1], e.length - 1, t.expectedType, n);
4736
- return a ? new Ht(n, a) : null;
4736
+ return a ? new Kt(n, a) : null;
4737
4737
  }
4738
4738
  outputDefined() {
4739
4739
  return this.result.outputDefined();
4740
4740
  }
4741
4741
  }
4742
- class Kt {
4742
+ class Xt {
4743
4743
  constructor(e, t) {
4744
4744
  this.type = t.type, this.name = e, this.boundExpression = t;
4745
4745
  }
@@ -4747,7 +4747,7 @@ class Kt {
4747
4747
  if (e.length !== 2 || typeof e[1] != "string")
4748
4748
  return t.error("'var' expression requires exactly one string literal argument.");
4749
4749
  const n = e[1];
4750
- return t.scope.has(n) ? new Kt(n, t.scope.get(n)) : t.error(`Unknown variable "${n}". Make sure "${n}" has been bound in an enclosing "let" expression before using it.`, 1);
4750
+ return t.scope.has(n) ? new Xt(n, t.scope.get(n)) : t.error(`Unknown variable "${n}". Make sure "${n}" has been bound in an enclosing "let" expression before using it.`, 1);
4751
4751
  }
4752
4752
  evaluate(e) {
4753
4753
  return this.boundExpression.evaluate(e);
@@ -4765,7 +4765,7 @@ class qr {
4765
4765
  static parse(e, t) {
4766
4766
  if (e.length !== 3)
4767
4767
  return t.error(`Expected 2 arguments, but found ${e.length - 1} instead.`);
4768
- const n = t.parse(e[1], 1, w), a = t.parse(e[2], 2, Y(t.expectedType || T));
4768
+ const n = t.parse(e[1], 1, b), a = t.parse(e[2], 2, Y(t.expectedType || T));
4769
4769
  if (!n || !a)
4770
4770
  return null;
4771
4771
  const o = a.type;
@@ -4796,7 +4796,7 @@ class Gr {
4796
4796
  if (e.length !== 3)
4797
4797
  return t.error(`Expected 2 arguments, but found ${e.length - 1} instead.`);
4798
4798
  const n = t.parse(e[1], 1, T), a = t.parse(e[2], 2, T);
4799
- return !n || !a ? null : Ur(n.type, [_, I, w, jt, T]) ? new Gr(n, a) : t.error(`Expected first argument to be of type boolean, string, number or null, but found ${j(n.type)} instead`);
4799
+ return !n || !a ? null : Ur(n.type, [_, I, b, Nt, T]) ? new Gr(n, a) : t.error(`Expected first argument to be of type boolean, string, number or null, but found ${j(n.type)} instead`);
4800
4800
  }
4801
4801
  evaluate(e) {
4802
4802
  const t = this.needle.evaluate(e), n = this.haystack.evaluate(e);
@@ -4815,9 +4815,9 @@ class Gr {
4815
4815
  return !0;
4816
4816
  }
4817
4817
  }
4818
- class _t {
4818
+ class It {
4819
4819
  constructor(e, t, n) {
4820
- this.type = w, this.needle = e, this.haystack = t, this.fromIndex = n;
4820
+ this.type = b, this.needle = e, this.haystack = t, this.fromIndex = n;
4821
4821
  }
4822
4822
  static parse(e, t) {
4823
4823
  if (e.length <= 2 || e.length >= 5)
@@ -4825,13 +4825,13 @@ class _t {
4825
4825
  const n = t.parse(e[1], 1, T), a = t.parse(e[2], 2, T);
4826
4826
  if (!n || !a)
4827
4827
  return null;
4828
- if (!Ur(n.type, [_, I, w, jt, T]))
4828
+ if (!Ur(n.type, [_, I, b, Nt, T]))
4829
4829
  return t.error(`Expected first argument to be of type boolean, string, number or null, but found ${j(n.type)} instead`);
4830
4830
  if (e.length === 4) {
4831
- const o = t.parse(e[3], 3, w);
4832
- return o ? new _t(n, a, o) : null;
4831
+ const o = t.parse(e[3], 3, b);
4832
+ return o ? new It(n, a, o) : null;
4833
4833
  } else
4834
- return new _t(n, a);
4834
+ return new It(n, a);
4835
4835
  }
4836
4836
  evaluate(e) {
4837
4837
  const t = this.needle.evaluate(e), n = this.haystack.evaluate(e);
@@ -4953,23 +4953,23 @@ class Hr {
4953
4953
  return this.branches.every(([e, t]) => t.outputDefined()) && this.otherwise.outputDefined();
4954
4954
  }
4955
4955
  }
4956
- class It {
4956
+ class Mt {
4957
4957
  constructor(e, t, n, a) {
4958
4958
  this.type = e, this.input = t, this.beginIndex = n, this.endIndex = a;
4959
4959
  }
4960
4960
  static parse(e, t) {
4961
4961
  if (e.length <= 2 || e.length >= 5)
4962
4962
  return t.error(`Expected 3 or 4 arguments, but found ${e.length - 1} instead.`);
4963
- const n = t.parse(e[1], 1, T), a = t.parse(e[2], 2, w);
4963
+ const n = t.parse(e[1], 1, T), a = t.parse(e[2], 2, b);
4964
4964
  if (!n || !a)
4965
4965
  return null;
4966
4966
  if (!Ur(n.type, [Y(T), I, T]))
4967
4967
  return t.error(`Expected first argument to be of type array or string, but found ${j(n.type)} instead`);
4968
4968
  if (e.length === 4) {
4969
- const o = t.parse(e[3], 3, w);
4970
- return o ? new It(n.type, n, a, o) : null;
4969
+ const o = t.parse(e[3], 3, b);
4970
+ return o ? new Mt(n.type, n, a, o) : null;
4971
4971
  } else
4972
- return new It(n.type, n, a);
4972
+ return new Mt(n.type, n, a);
4973
4973
  }
4974
4974
  evaluate(e) {
4975
4975
  const t = this.input.evaluate(e), n = this.beginIndex.evaluate(e);
@@ -5001,7 +5001,7 @@ function Ca(r, e) {
5001
5001
  throw new N("Input is not a number.");
5002
5002
  return 0;
5003
5003
  }
5004
- class Xt {
5004
+ class Zt {
5005
5005
  constructor(e, t, n) {
5006
5006
  this.type = e, this.input = t, this.labels = [], this.outputs = [];
5007
5007
  for (const [a, o] of n)
@@ -5012,7 +5012,7 @@ class Xt {
5012
5012
  return t.error(`Expected at least 4 arguments, but found only ${e.length - 1}.`);
5013
5013
  if ((e.length - 1) % 2 !== 0)
5014
5014
  return t.error("Expected an even number of arguments.");
5015
- const n = t.parse(e[1], 1, w);
5015
+ const n = t.parse(e[1], 1, b);
5016
5016
  if (!n)
5017
5017
  return null;
5018
5018
  const a = [];
@@ -5029,7 +5029,7 @@ class Xt {
5029
5029
  return null;
5030
5030
  o = o || p.type, a.push([s, p]);
5031
5031
  }
5032
- return new Xt(o, n, a);
5032
+ return new Zt(o, n, a);
5033
5033
  }
5034
5034
  evaluate(e) {
5035
5035
  const t = this.labels, n = this.outputs;
@@ -5056,10 +5056,10 @@ class Xt {
5056
5056
  function ls(r) {
5057
5057
  return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
5058
5058
  }
5059
- var ur, En;
5059
+ var cr, En;
5060
5060
  function us() {
5061
- if (En) return ur;
5062
- En = 1, ur = r;
5061
+ if (En) return cr;
5062
+ En = 1, cr = r;
5063
5063
  function r(e, t, n, a) {
5064
5064
  this.cx = 3 * e, this.bx = 3 * (n - e) - this.cx, this.ax = 1 - this.cx - this.bx, this.cy = 3 * t, this.by = 3 * (a - t) - this.cy, this.ay = 1 - this.cy - this.by, this.p1x = e, this.p1y = t, this.p2x = n, this.p2y = a;
5065
5065
  }
@@ -5091,10 +5091,10 @@ function us() {
5091
5091
  solve: function(e, t) {
5092
5092
  return this.sampleCurveY(this.solveCurveX(e, t));
5093
5093
  }
5094
- }, ur;
5094
+ }, cr;
5095
5095
  }
5096
5096
  var cs = us(), ps = /* @__PURE__ */ ls(cs);
5097
- class ye {
5097
+ class he {
5098
5098
  constructor(e, t, n, a, o) {
5099
5099
  this.type = e, this.operator = t, this.interpolation = n, this.input = a, this.labels = [], this.outputs = [];
5100
5100
  for (const [i, s] of o)
@@ -5103,12 +5103,12 @@ class ye {
5103
5103
  static interpolationFactor(e, t, n, a) {
5104
5104
  let o = 0;
5105
5105
  if (e.name === "exponential")
5106
- o = cr(t, e.base, n, a);
5106
+ o = pr(t, e.base, n, a);
5107
5107
  else if (e.name === "linear")
5108
- o = cr(t, 1, n, a);
5108
+ o = pr(t, 1, n, a);
5109
5109
  else if (e.name === "cubic-bezier") {
5110
5110
  const i = e.controlPoints;
5111
- o = new ps(i[0], i[1], i[2], i[3]).solve(cr(t, 1, n, a));
5111
+ o = new ps(i[0], i[1], i[2], i[3]).solve(pr(t, 1, n, a));
5112
5112
  }
5113
5113
  return o;
5114
5114
  }
@@ -5140,11 +5140,11 @@ class ye {
5140
5140
  return t.error(`Expected at least 4 arguments, but found only ${e.length - 1}.`);
5141
5141
  if ((e.length - 1) % 2 !== 0)
5142
5142
  return t.error("Expected an even number of arguments.");
5143
- if (o = t.parse(o, 2, w), !o)
5143
+ if (o = t.parse(o, 2, b), !o)
5144
5144
  return null;
5145
5145
  const s = [];
5146
5146
  let l = null;
5147
- (n === "interpolate-hcl" || n === "interpolate-lab") && t.expectedType != nt ? l = he : t.expectedType && t.expectedType.kind !== "value" && (l = t.expectedType);
5147
+ (n === "interpolate-hcl" || n === "interpolate-lab") && t.expectedType != at ? l = de : t.expectedType && t.expectedType.kind !== "value" && (l = t.expectedType);
5148
5148
  for (let u = 0; u < i.length; u += 2) {
5149
5149
  const c = i[u], p = i[u + 1], f = u + 3, d = u + 4;
5150
5150
  if (typeof c != "number")
@@ -5156,7 +5156,7 @@ class ye {
5156
5156
  return null;
5157
5157
  l = l || h.type, s.push([c, h]);
5158
5158
  }
5159
- return !Se(l, w) && !Se(l, Nt) && !Se(l, he) && !Se(l, Bt) && !Se(l, qt) && !Se(l, nt) && !Se(l, Gt) && !Se(l, Y(w)) ? t.error(`Type ${j(l)} is not interpolatable.`) : new ye(l, n, a, o, s);
5159
+ return !we(l, b) && !we(l, Dt) && !we(l, de) && !we(l, qt) && !we(l, Gt) && !we(l, at) && !we(l, Vt) && !we(l, Y(b)) ? t.error(`Type ${j(l)} is not interpolatable.`) : new he(l, n, a, o, s);
5160
5160
  }
5161
5161
  evaluate(e) {
5162
5162
  const t = this.labels, n = this.outputs;
@@ -5168,14 +5168,14 @@ class ye {
5168
5168
  const o = t.length;
5169
5169
  if (a >= t[o - 1])
5170
5170
  return n[o - 1].evaluate(e);
5171
- const i = Ca(t, a), s = t[i], l = t[i + 1], u = ye.interpolationFactor(this.interpolation, a, s, l), c = n[i].evaluate(e), p = n[i + 1].evaluate(e);
5171
+ const i = Ca(t, a), s = t[i], l = t[i + 1], u = he.interpolationFactor(this.interpolation, a, s, l), c = n[i].evaluate(e), p = n[i + 1].evaluate(e);
5172
5172
  switch (this.operator) {
5173
5173
  case "interpolate":
5174
5174
  switch (this.type.kind) {
5175
5175
  case "number":
5176
- return Ae(c, p, u);
5176
+ return Le(c, p, u);
5177
5177
  case "color":
5178
- return $.interpolate(c, p, u);
5178
+ return F.interpolate(c, p, u);
5179
5179
  case "padding":
5180
5180
  return Q.interpolate(c, p, u);
5181
5181
  case "colorArray":
@@ -5192,14 +5192,14 @@ class ye {
5192
5192
  case "interpolate-hcl":
5193
5193
  switch (this.type.kind) {
5194
5194
  case "color":
5195
- return $.interpolate(c, p, u, "hcl");
5195
+ return F.interpolate(c, p, u, "hcl");
5196
5196
  case "colorArray":
5197
5197
  return X.interpolate(c, p, u, "hcl");
5198
5198
  }
5199
5199
  case "interpolate-lab":
5200
5200
  switch (this.type.kind) {
5201
5201
  case "color":
5202
- return $.interpolate(c, p, u, "lab");
5202
+ return F.interpolate(c, p, u, "lab");
5203
5203
  case "colorArray":
5204
5204
  return X.interpolate(c, p, u, "lab");
5205
5205
  }
@@ -5214,12 +5214,12 @@ class ye {
5214
5214
  return this.outputs.every((e) => e.outputDefined());
5215
5215
  }
5216
5216
  }
5217
- function cr(r, e, t, n) {
5217
+ function pr(r, e, t, n) {
5218
5218
  const a = n - t, o = r - t;
5219
5219
  return a === 0 ? 0 : e === 1 ? o / a : (Math.pow(e, o) - 1) / (Math.pow(e, a) - 1);
5220
5220
  }
5221
- $.interpolate, Q.interpolate, ee.interpolate, X.interpolate, ue.interpolate;
5222
- class it {
5221
+ F.interpolate, Q.interpolate, ee.interpolate, X.interpolate, ue.interpolate;
5222
+ class st {
5223
5223
  constructor(e, t) {
5224
5224
  this.type = e, this.args = t;
5225
5225
  }
@@ -5238,12 +5238,12 @@ class it {
5238
5238
  }
5239
5239
  if (!n)
5240
5240
  throw new Error("No output type");
5241
- return a && o.some((s) => at(a, s.type)) ? new it(T, o) : new it(n, o);
5241
+ return a && o.some((s) => ot(a, s.type)) ? new st(T, o) : new st(n, o);
5242
5242
  }
5243
5243
  evaluate(e) {
5244
5244
  let t = null, n = 0, a;
5245
5245
  for (const o of this.args)
5246
- if (n++, t = o.evaluate(e), t && t instanceof Te && !t.available && (a || (a = t.name), t = null, n === this.args.length && (t = a)), t !== null)
5246
+ if (n++, t = o.evaluate(e), t && t instanceof Ee && !t.available && (a || (a = t.name), t = null, n === this.args.length && (t = a)), t !== null)
5247
5247
  break;
5248
5248
  return t;
5249
5249
  }
@@ -5320,7 +5320,7 @@ function Xe(r, e, t) {
5320
5320
  if (o.length === 4) {
5321
5321
  if (l.type.kind !== "string" && u.type.kind !== "string" && l.type.kind !== "value" && u.type.kind !== "value")
5322
5322
  return i.error("Cannot use collator to compare non-string types.");
5323
- if (c = i.parse(o[3], 3, Dt), !c)
5323
+ if (c = i.parse(o[3], 3, Ut), !c)
5324
5324
  return null;
5325
5325
  }
5326
5326
  return new Aa(l, u, c);
@@ -5348,9 +5348,9 @@ function Xe(r, e, t) {
5348
5348
  };
5349
5349
  }
5350
5350
  const ks = Xe("==", fs, La), Cs = Xe("!=", ds, vs), Ls = Xe("<", hs, bs), As = Xe(">", ys, ws), Es = Xe("<=", ms, Ss), Ts = Xe(">=", gs, xs);
5351
- class Zt {
5351
+ class Yt {
5352
5352
  constructor(e, t, n) {
5353
- this.type = Dt, this.locale = n, this.caseSensitive = e, this.diacriticSensitive = t;
5353
+ this.type = Ut, this.locale = n, this.caseSensitive = e, this.diacriticSensitive = t;
5354
5354
  }
5355
5355
  static parse(e, t) {
5356
5356
  if (e.length !== 2)
@@ -5365,7 +5365,7 @@ class Zt {
5365
5365
  if (!o)
5366
5366
  return null;
5367
5367
  let i = null;
5368
- return n.locale && (i = t.parse(n.locale, 1, I), !i) ? null : new Zt(a, o, i);
5368
+ return n.locale && (i = t.parse(n.locale, 1, I), !i) ? null : new Yt(a, o, i);
5369
5369
  }
5370
5370
  evaluate(e) {
5371
5371
  return new Br(this.caseSensitive.evaluate(e), this.diacriticSensitive.evaluate(e), this.locale ? this.locale.evaluate(e) : null);
@@ -5384,7 +5384,7 @@ class Kr {
5384
5384
  static parse(e, t) {
5385
5385
  if (e.length !== 3)
5386
5386
  return t.error("Expected two arguments.");
5387
- const n = t.parse(e[1], 1, w);
5387
+ const n = t.parse(e[1], 1, b);
5388
5388
  if (!n)
5389
5389
  return null;
5390
5390
  const a = e[2];
@@ -5397,10 +5397,10 @@ class Kr {
5397
5397
  if (a.currency && (i = t.parse(a.currency, 1, I), !i))
5398
5398
  return null;
5399
5399
  let s = null;
5400
- if (a["min-fraction-digits"] && (s = t.parse(a["min-fraction-digits"], 1, w), !s))
5400
+ if (a["min-fraction-digits"] && (s = t.parse(a["min-fraction-digits"], 1, b), !s))
5401
5401
  return null;
5402
5402
  let l = null;
5403
- return a["max-fraction-digits"] && (l = t.parse(a["max-fraction-digits"], 1, w), !l) ? null : new Kr(n, o, i, s, l);
5403
+ return a["max-fraction-digits"] && (l = t.parse(a["max-fraction-digits"], 1, b), !l) ? null : new Kr(n, o, i, s, l);
5404
5404
  }
5405
5405
  evaluate(e) {
5406
5406
  return new Intl.NumberFormat(this.locale ? this.locale.evaluate(e) : [], {
@@ -5419,7 +5419,7 @@ class Kr {
5419
5419
  }
5420
5420
  class Xr {
5421
5421
  constructor(e) {
5422
- this.type = Ut, this.sections = e;
5422
+ this.type = Bt, this.sections = e;
5423
5423
  }
5424
5424
  static parse(e, t) {
5425
5425
  if (e.length < 2)
@@ -5434,13 +5434,13 @@ class Xr {
5434
5434
  if (o && typeof s == "object" && !Array.isArray(s)) {
5435
5435
  o = !1;
5436
5436
  let l = null;
5437
- if (s["font-scale"] && (l = t.parse(s["font-scale"], 1, w), !l))
5437
+ if (s["font-scale"] && (l = t.parse(s["font-scale"], 1, b), !l))
5438
5438
  return null;
5439
5439
  let u = null;
5440
5440
  if (s["text-font"] && (u = t.parse(s["text-font"], 1, Y(I)), !u))
5441
5441
  return null;
5442
5442
  let c = null;
5443
- if (s["text-color"] && (c = t.parse(s["text-color"], 1, he), !c))
5443
+ if (s["text-color"] && (c = t.parse(s["text-color"], 1, de), !c))
5444
5444
  return null;
5445
5445
  let p = null;
5446
5446
  if (s["vertical-align"]) {
@@ -5466,9 +5466,9 @@ class Xr {
5466
5466
  evaluate(e) {
5467
5467
  const t = (n) => {
5468
5468
  const a = n.content.evaluate(e);
5469
- return B(a) === ft ? new Lr("", a, null, null, null, n.verticalAlign ? n.verticalAlign.evaluate(e) : null) : new Lr(tt(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);
5469
+ return B(a) === dt ? new Lr("", a, null, null, null, n.verticalAlign ? n.verticalAlign.evaluate(e) : null) : new Lr(rt(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);
5470
5470
  };
5471
- return new ge(this.sections.map(t));
5471
+ return new me(this.sections.map(t));
5472
5472
  }
5473
5473
  eachChild(e) {
5474
5474
  for (const t of this.sections)
@@ -5480,7 +5480,7 @@ class Xr {
5480
5480
  }
5481
5481
  class Zr {
5482
5482
  constructor(e) {
5483
- this.type = ft, this.input = e;
5483
+ this.type = dt, this.input = e;
5484
5484
  }
5485
5485
  static parse(e, t) {
5486
5486
  if (e.length !== 2)
@@ -5489,7 +5489,7 @@ class Zr {
5489
5489
  return n ? new Zr(n) : t.error("No image name provided.");
5490
5490
  }
5491
5491
  evaluate(e) {
5492
- const t = this.input.evaluate(e), n = Te.fromString(t);
5492
+ const t = this.input.evaluate(e), n = Ee.fromString(t);
5493
5493
  return n && e.availableImages && (n.available = e.availableImages.indexOf(t) > -1), n;
5494
5494
  }
5495
5495
  eachChild(e) {
@@ -5501,7 +5501,7 @@ class Zr {
5501
5501
  }
5502
5502
  class Yr {
5503
5503
  constructor(e) {
5504
- this.type = w, this.input = e;
5504
+ this.type = b, this.input = e;
5505
5505
  }
5506
5506
  static parse(e, t) {
5507
5507
  if (e.length !== 2)
@@ -5524,13 +5524,13 @@ class Yr {
5524
5524
  return !1;
5525
5525
  }
5526
5526
  }
5527
- const me = 8192;
5527
+ const ye = 8192;
5528
5528
  function _s(r, e) {
5529
5529
  const t = Is(r[0]), n = Ps(r[1]), a = Math.pow(2, e.z);
5530
- return [Math.round(t * a * me), Math.round(n * a * me)];
5530
+ return [Math.round(t * a * ye), Math.round(n * a * ye)];
5531
5531
  }
5532
5532
  function Wr(r, e) {
5533
- const t = Math.pow(2, e.z), n = (r[0] / me + e.x) / t, a = (r[1] / me + e.y) / t;
5533
+ const t = Math.pow(2, e.z), n = (r[0] / ye + e.x) / t, a = (r[1] / ye + e.y) / t;
5534
5534
  return [Ms(n), Rs(a)];
5535
5535
  }
5536
5536
  function Is(r) {
@@ -5545,10 +5545,10 @@ function Ps(r) {
5545
5545
  function Rs(r) {
5546
5546
  return 360 / Math.PI * Math.atan(Math.exp((180 - r * 360) * Math.PI / 180)) - 90;
5547
5547
  }
5548
- function dt(r, e) {
5548
+ function ht(r, e) {
5549
5549
  r[0] = Math.min(r[0], e[0]), r[1] = Math.min(r[1], e[1]), r[2] = Math.max(r[2], e[0]), r[3] = Math.max(r[3], e[1]);
5550
5550
  }
5551
- function st(r, e) {
5551
+ function lt(r, e) {
5552
5552
  return !(r[0] <= e[0] || r[2] >= e[2] || r[1] <= e[1] || r[3] >= e[3]);
5553
5553
  }
5554
5554
  function zs(r, e, t) {
@@ -5558,14 +5558,14 @@ function Fs(r, e, t) {
5558
5558
  const n = r[0] - e[0], a = r[1] - e[1], o = r[0] - t[0], i = r[1] - t[1];
5559
5559
  return n * i - o * a === 0 && n * o <= 0 && a * i <= 0;
5560
5560
  }
5561
- function Yt(r, e, t, n) {
5561
+ function Wt(r, e, t, n) {
5562
5562
  const a = [e[0] - r[0], e[1] - r[1]], o = [n[0] - t[0], n[1] - t[1]];
5563
5563
  return Ns(o, a) === 0 ? !1 : !!(_n(r, e, t, n) && _n(t, n, r, e));
5564
5564
  }
5565
5565
  function $s(r, e, t) {
5566
5566
  for (const n of t)
5567
5567
  for (let a = 0; a < n.length - 1; ++a)
5568
- if (Yt(r, e, n[a], n[a + 1]))
5568
+ if (Wt(r, e, n[a], n[a + 1]))
5569
5569
  return !0;
5570
5570
  return !1;
5571
5571
  }
@@ -5613,7 +5613,7 @@ function Jr(r, e, t) {
5613
5613
  const o = [];
5614
5614
  for (let i = 0; i < r[a].length; i++) {
5615
5615
  const s = _s(r[a][i], t);
5616
- dt(e, s), o.push(s);
5616
+ ht(e, s), o.push(s);
5617
5617
  }
5618
5618
  n.push(o);
5619
5619
  }
@@ -5633,13 +5633,13 @@ function _a(r, e, t, n) {
5633
5633
  let o = r[0] - t[0] > a ? -n : t[0] - r[0] > a ? n : 0;
5634
5634
  o === 0 && (o = r[0] - t[2] > a ? -n : t[2] - r[0] > a ? n : 0), r[0] += o;
5635
5635
  }
5636
- dt(e, r);
5636
+ ht(e, r);
5637
5637
  }
5638
5638
  function Ds(r) {
5639
5639
  r[0] = r[1] = 1 / 0, r[2] = r[3] = -1 / 0;
5640
5640
  }
5641
5641
  function In(r, e, t, n) {
5642
- const a = Math.pow(2, n.z) * me, o = [n.x * me, n.y * me], i = [];
5642
+ const a = Math.pow(2, n.z) * ye, o = [n.x * ye, n.y * ye], i = [];
5643
5643
  for (const s of r)
5644
5644
  for (const l of s) {
5645
5645
  const u = [l.x + o[0], l.y + o[1]];
@@ -5648,12 +5648,12 @@ function In(r, e, t, n) {
5648
5648
  return i;
5649
5649
  }
5650
5650
  function Mn(r, e, t, n) {
5651
- const a = Math.pow(2, n.z) * me, o = [n.x * me, n.y * me], i = [];
5651
+ const a = Math.pow(2, n.z) * ye, o = [n.x * ye, n.y * ye], i = [];
5652
5652
  for (const s of r) {
5653
5653
  const l = [];
5654
5654
  for (const u of s) {
5655
5655
  const c = [u.x + o[0], u.y + o[1]];
5656
- dt(e, c), l.push(c);
5656
+ ht(e, c), l.push(c);
5657
5657
  }
5658
5658
  i.push(l);
5659
5659
  }
@@ -5669,7 +5669,7 @@ function Us(r, e) {
5669
5669
  const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0], n = [1 / 0, 1 / 0, -1 / 0, -1 / 0], a = r.canonicalID();
5670
5670
  if (e.type === "Polygon") {
5671
5671
  const o = Jr(e.coordinates, n, a), i = In(r.geometry(), t, n, a);
5672
- if (!st(t, n))
5672
+ if (!lt(t, n))
5673
5673
  return !1;
5674
5674
  for (const s of i)
5675
5675
  if (!Ze(s, o))
@@ -5677,7 +5677,7 @@ function Us(r, e) {
5677
5677
  }
5678
5678
  if (e.type === "MultiPolygon") {
5679
5679
  const o = Ta(e.coordinates, n, a), i = In(r.geometry(), t, n, a);
5680
- if (!st(t, n))
5680
+ if (!lt(t, n))
5681
5681
  return !1;
5682
5682
  for (const s of i)
5683
5683
  if (!Os(s, o))
@@ -5689,7 +5689,7 @@ function Bs(r, e) {
5689
5689
  const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0], n = [1 / 0, 1 / 0, -1 / 0, -1 / 0], a = r.canonicalID();
5690
5690
  if (e.type === "Polygon") {
5691
5691
  const o = Jr(e.coordinates, n, a), i = Mn(r.geometry(), t, n, a);
5692
- if (!st(t, n))
5692
+ if (!lt(t, n))
5693
5693
  return !1;
5694
5694
  for (const s of i)
5695
5695
  if (!Ea(s, o))
@@ -5697,7 +5697,7 @@ function Bs(r, e) {
5697
5697
  }
5698
5698
  if (e.type === "MultiPolygon") {
5699
5699
  const o = Ta(e.coordinates, n, a), i = Mn(r.geometry(), t, n, a);
5700
- if (!st(t, n))
5700
+ if (!lt(t, n))
5701
5701
  return !1;
5702
5702
  for (const s of i)
5703
5703
  if (!js(s, o))
@@ -5712,7 +5712,7 @@ class Fe {
5712
5712
  static parse(e, t) {
5713
5713
  if (e.length !== 2)
5714
5714
  return t.error(`'within' expression requires exactly one argument, but found ${e.length - 1} instead.`);
5715
- if (ot(e[1])) {
5715
+ if (it(e[1])) {
5716
5716
  const n = e[1];
5717
5717
  if (n.type === "FeatureCollection") {
5718
5718
  const a = [];
@@ -5862,16 +5862,16 @@ const Ar = 100, Er = 50;
5862
5862
  function Ma(r, e) {
5863
5863
  return e[0] - r[0];
5864
5864
  }
5865
- function Mt(r) {
5865
+ function Pt(r) {
5866
5866
  return r[1] - r[0] + 1;
5867
5867
  }
5868
- function be(r, e) {
5868
+ function ve(r, e) {
5869
5869
  return r[1] >= r[0] && r[1] < e;
5870
5870
  }
5871
5871
  function Tr(r, e) {
5872
5872
  if (r[0] > r[1])
5873
5873
  return [null, null];
5874
- const t = Mt(r);
5874
+ const t = Pt(r);
5875
5875
  if (e) {
5876
5876
  if (t === 2)
5877
5877
  return [r, null];
@@ -5890,18 +5890,18 @@ function Tr(r, e) {
5890
5890
  ];
5891
5891
  }
5892
5892
  function _r(r, e) {
5893
- if (!be(e, r.length))
5893
+ if (!ve(e, r.length))
5894
5894
  return [1 / 0, 1 / 0, -1 / 0, -1 / 0];
5895
5895
  const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
5896
5896
  for (let n = e[0]; n <= e[1]; ++n)
5897
- dt(t, r[n]);
5897
+ ht(t, r[n]);
5898
5898
  return t;
5899
5899
  }
5900
5900
  function Ir(r) {
5901
5901
  const e = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
5902
5902
  for (const t of r)
5903
5903
  for (const n of t)
5904
- dt(e, n);
5904
+ ht(e, n);
5905
5905
  return e;
5906
5906
  }
5907
5907
  function Fn(r) {
@@ -5922,14 +5922,14 @@ function tn(r, e, t, n, a) {
5922
5922
  return Math.min(o, i);
5923
5923
  }
5924
5924
  function Hs(r, e, t, n, a) {
5925
- if (!(be(e, r.length) && be(n, t.length)))
5925
+ if (!(ve(e, r.length) && ve(n, t.length)))
5926
5926
  return 1 / 0;
5927
5927
  let i = 1 / 0;
5928
5928
  for (let s = e[0]; s < e[1]; ++s) {
5929
5929
  const l = r[s], u = r[s + 1];
5930
5930
  for (let c = n[0]; c < n[1]; ++c) {
5931
5931
  const p = t[c], f = t[c + 1];
5932
- if (Yt(l, u, p, f))
5932
+ if (Wt(l, u, p, f))
5933
5933
  return 0;
5934
5934
  i = Math.min(i, tn(l, u, p, f, a));
5935
5935
  }
@@ -5937,7 +5937,7 @@ function Hs(r, e, t, n, a) {
5937
5937
  return i;
5938
5938
  }
5939
5939
  function Ks(r, e, t, n, a) {
5940
- if (!(be(e, r.length) && be(n, t.length)))
5940
+ if (!(ve(e, r.length) && ve(n, t.length)))
5941
5941
  return NaN;
5942
5942
  let i = 1 / 0;
5943
5943
  for (let s = e[0]; s <= e[1]; ++s)
@@ -5961,7 +5961,7 @@ function Xs(r, e, t) {
5961
5961
  return n;
5962
5962
  }
5963
5963
  function Zs(r, e, t, n) {
5964
- if (!be(e, r.length))
5964
+ if (!ve(e, r.length))
5965
5965
  return NaN;
5966
5966
  for (let o = e[0]; o <= e[1]; ++o)
5967
5967
  if (Ze(r[o], t, !0))
@@ -5972,7 +5972,7 @@ function Zs(r, e, t, n) {
5972
5972
  for (const l of t)
5973
5973
  for (let u = 0, c = l.length, p = c - 1; u < c; p = u++) {
5974
5974
  const f = l[p], d = l[u];
5975
- if (Yt(i, s, f, d))
5975
+ if (Wt(i, s, f, d))
5976
5976
  return 0;
5977
5977
  a = Math.min(a, tn(i, s, f, d, n));
5978
5978
  }
@@ -5990,7 +5990,7 @@ function Ys(r, e, t, n = 1 / 0) {
5990
5990
  const a = Ir(r), o = Ir(e);
5991
5991
  if (n !== 1 / 0 && en(a, o, t) >= n)
5992
5992
  return n;
5993
- if (st(a, o)) {
5993
+ if (lt(a, o)) {
5994
5994
  if ($n(r, e))
5995
5995
  return 0;
5996
5996
  } else if ($n(e, r))
@@ -6001,10 +6001,10 @@ function Ys(r, e, t, n = 1 / 0) {
6001
6001
  const p = s[c], f = s[l];
6002
6002
  for (const d of e)
6003
6003
  for (let h = 0, y = d.length, m = y - 1; h < y; m = h++) {
6004
- const b = d[m], g = d[h];
6005
- if (Yt(p, f, b, g))
6004
+ const w = d[m], v = d[h];
6005
+ if (Wt(p, f, w, v))
6006
6006
  return 0;
6007
- i = Math.min(i, tn(p, f, b, g, t));
6007
+ i = Math.min(i, tn(p, f, w, v, t));
6008
6008
  }
6009
6009
  }
6010
6010
  return i;
@@ -6015,13 +6015,13 @@ function On(r, e, t, n, a, o) {
6015
6015
  const i = en(_r(n, o), a, t);
6016
6016
  i < e && r.push([i, o, [0, 0]]);
6017
6017
  }
6018
- function St(r, e, t, n, a, o, i) {
6018
+ function xt(r, e, t, n, a, o, i) {
6019
6019
  if (!o || !i)
6020
6020
  return;
6021
6021
  const s = en(_r(n, o), _r(a, i), t);
6022
6022
  s < e && r.push([s, o, i]);
6023
6023
  }
6024
- function Pt(r, e, t, n, a = 1 / 0) {
6024
+ function Rt(r, e, t, n, a = 1 / 0) {
6025
6025
  let o = Math.min(n.distance(r[0], t[0][0]), a);
6026
6026
  if (o === 0)
6027
6027
  return o;
@@ -6031,8 +6031,8 @@ function Pt(r, e, t, n, a = 1 / 0) {
6031
6031
  if (l[0] >= o)
6032
6032
  continue;
6033
6033
  const u = l[1], c = e ? Er : Ar;
6034
- if (Mt(u) <= c) {
6035
- if (!be(u, r.length))
6034
+ if (Pt(u) <= c) {
6035
+ if (!ve(u, r.length))
6036
6036
  return NaN;
6037
6037
  if (e) {
6038
6038
  const p = Zs(r, u, t, n);
@@ -6052,7 +6052,7 @@ function Pt(r, e, t, n, a = 1 / 0) {
6052
6052
  }
6053
6053
  return o;
6054
6054
  }
6055
- function Rt(r, e, t, n, a, o = 1 / 0) {
6055
+ function zt(r, e, t, n, a, o = 1 / 0) {
6056
6056
  let i = Math.min(o, a.distance(r[0], t[0]));
6057
6057
  if (i === 0)
6058
6058
  return i;
@@ -6062,8 +6062,8 @@ function Rt(r, e, t, n, a, o = 1 / 0) {
6062
6062
  if (l[0] >= i)
6063
6063
  continue;
6064
6064
  const u = l[1], c = l[2], p = e ? Er : Ar, f = n ? Er : Ar;
6065
- if (Mt(u) <= p && Mt(c) <= f) {
6066
- if (!be(u, r.length) && be(c, t.length))
6065
+ if (Pt(u) <= p && Pt(c) <= f) {
6066
+ if (!ve(u, r.length) && ve(c, t.length))
6067
6067
  return NaN;
6068
6068
  let d;
6069
6069
  if (e && n)
@@ -6082,7 +6082,7 @@ function Rt(r, e, t, n, a, o = 1 / 0) {
6082
6082
  d = Ks(r, u, t, c, a), i = Math.min(i, d);
6083
6083
  } else {
6084
6084
  const d = Tr(u, e), h = Tr(c, n);
6085
- St(s, i, a, r, t, d[0], h[0]), St(s, i, a, r, t, d[0], h[1]), St(s, i, a, r, t, d[1], h[0]), St(s, i, a, r, t, d[1], h[1]);
6085
+ xt(s, i, a, r, t, d[0], h[0]), xt(s, i, a, r, t, d[0], h[1]), xt(s, i, a, r, t, d[1], h[0]), xt(s, i, a, r, t, d[1], h[1]);
6086
6086
  }
6087
6087
  }
6088
6088
  return i;
@@ -6096,13 +6096,13 @@ function Ws(r, e) {
6096
6096
  for (const i of e) {
6097
6097
  switch (i.type) {
6098
6098
  case "Point":
6099
- o = Math.min(o, Rt(n, !1, [i.coordinates], !1, a, o));
6099
+ o = Math.min(o, zt(n, !1, [i.coordinates], !1, a, o));
6100
6100
  break;
6101
6101
  case "LineString":
6102
- o = Math.min(o, Rt(n, !1, i.coordinates, !0, a, o));
6102
+ o = Math.min(o, zt(n, !1, i.coordinates, !0, a, o));
6103
6103
  break;
6104
6104
  case "Polygon":
6105
- o = Math.min(o, Pt(n, !1, i.coordinates, a, o));
6105
+ o = Math.min(o, Rt(n, !1, i.coordinates, a, o));
6106
6106
  break;
6107
6107
  }
6108
6108
  if (o === 0)
@@ -6119,13 +6119,13 @@ function Js(r, e) {
6119
6119
  for (const i of e) {
6120
6120
  switch (i.type) {
6121
6121
  case "Point":
6122
- o = Math.min(o, Rt(n, !0, [i.coordinates], !1, a, o));
6122
+ o = Math.min(o, zt(n, !0, [i.coordinates], !1, a, o));
6123
6123
  break;
6124
6124
  case "LineString":
6125
- o = Math.min(o, Rt(n, !0, i.coordinates, !0, a, o));
6125
+ o = Math.min(o, zt(n, !0, i.coordinates, !0, a, o));
6126
6126
  break;
6127
6127
  case "Polygon":
6128
- o = Math.min(o, Pt(n, !0, i.coordinates, a, o));
6128
+ o = Math.min(o, Rt(n, !0, i.coordinates, a, o));
6129
6129
  break;
6130
6130
  }
6131
6131
  if (o === 0)
@@ -6143,10 +6143,10 @@ function Qs(r, e) {
6143
6143
  for (const s of n) {
6144
6144
  switch (i.type) {
6145
6145
  case "Point":
6146
- o = Math.min(o, Pt([i.coordinates], !1, s, a, o));
6146
+ o = Math.min(o, Rt([i.coordinates], !1, s, a, o));
6147
6147
  break;
6148
6148
  case "LineString":
6149
- o = Math.min(o, Pt(i.coordinates, !0, s, a, o));
6149
+ o = Math.min(o, Rt(i.coordinates, !0, s, a, o));
6150
6150
  break;
6151
6151
  case "Polygon":
6152
6152
  o = Math.min(o, Ys(s, i.coordinates, a, o));
@@ -6157,7 +6157,7 @@ function Qs(r, e) {
6157
6157
  }
6158
6158
  return o;
6159
6159
  }
6160
- function pr(r) {
6160
+ function fr(r) {
6161
6161
  return r.type === "MultiPolygon" ? r.coordinates.map((e) => ({
6162
6162
  type: "Polygon",
6163
6163
  coordinates: e
@@ -6171,19 +6171,19 @@ function pr(r) {
6171
6171
  }
6172
6172
  class $e {
6173
6173
  constructor(e, t) {
6174
- this.type = w, this.geojson = e, this.geometries = t;
6174
+ this.type = b, this.geojson = e, this.geometries = t;
6175
6175
  }
6176
6176
  static parse(e, t) {
6177
6177
  if (e.length !== 2)
6178
6178
  return t.error(`'distance' expression requires exactly one argument, but found ${e.length - 1} instead.`);
6179
- if (ot(e[1])) {
6179
+ if (it(e[1])) {
6180
6180
  const n = e[1];
6181
6181
  if (n.type === "FeatureCollection")
6182
- return new $e(n, n.features.map((a) => pr(a.geometry)).flat());
6182
+ return new $e(n, n.features.map((a) => fr(a.geometry)).flat());
6183
6183
  if (n.type === "Feature")
6184
- return new $e(n, pr(n.geometry));
6184
+ return new $e(n, fr(n.geometry));
6185
6185
  if ("type" in n && "coordinates" in n)
6186
- return new $e(n, pr(n));
6186
+ return new $e(n, fr(n));
6187
6187
  }
6188
6188
  return t.error("'distance' expression requires valid geojson object that contains polygon geometry type.");
6189
6189
  }
@@ -6204,7 +6204,7 @@ class $e {
6204
6204
  return !0;
6205
6205
  }
6206
6206
  }
6207
- class ht {
6207
+ class yt {
6208
6208
  constructor(e) {
6209
6209
  this.type = T, this.key = e;
6210
6210
  }
@@ -6212,12 +6212,12 @@ class ht {
6212
6212
  if (e.length !== 2)
6213
6213
  return t.error(`Expected 1 argument, but found ${e.length - 1} instead.`);
6214
6214
  const n = e[1];
6215
- return n == null ? t.error("Global state property must be defined.") : typeof n != "string" ? t.error(`Global state property must be string, but found ${typeof e[1]} instead.`) : new ht(n);
6215
+ return n == null ? t.error("Global state property must be defined.") : typeof n != "string" ? t.error(`Global state property must be string, but found ${typeof e[1]} instead.`) : new yt(n);
6216
6216
  }
6217
6217
  evaluate(e) {
6218
6218
  var t;
6219
6219
  const n = (t = e.globals) === null || t === void 0 ? void 0 : t.globalState;
6220
- return !n || Object.keys(n).length === 0 ? null : et(n, this.key);
6220
+ return !n || Object.keys(n).length === 0 ? null : tt(n, this.key);
6221
6221
  }
6222
6222
  eachChild() {
6223
6223
  }
@@ -6237,33 +6237,33 @@ const rn = {
6237
6237
  at: qr,
6238
6238
  boolean: se,
6239
6239
  case: Hr,
6240
- coalesce: it,
6241
- collator: Zt,
6240
+ coalesce: st,
6241
+ collator: Yt,
6242
6242
  format: Xr,
6243
6243
  image: Zr,
6244
6244
  in: Gr,
6245
- "index-of": _t,
6246
- interpolate: ye,
6247
- "interpolate-hcl": ye,
6248
- "interpolate-lab": ye,
6245
+ "index-of": It,
6246
+ interpolate: he,
6247
+ "interpolate-hcl": he,
6248
+ "interpolate-lab": he,
6249
6249
  length: Yr,
6250
- let: Ht,
6250
+ let: Kt,
6251
6251
  literal: He,
6252
6252
  match: Vr,
6253
6253
  number: se,
6254
6254
  "number-format": Kr,
6255
6255
  object: se,
6256
- slice: It,
6257
- step: Xt,
6256
+ slice: Mt,
6257
+ step: Zt,
6258
6258
  string: se,
6259
- "to-boolean": Ce,
6260
- "to-color": Ce,
6261
- "to-number": Ce,
6262
- "to-string": Ce,
6263
- var: Kt,
6259
+ "to-boolean": ke,
6260
+ "to-color": ke,
6261
+ "to-number": ke,
6262
+ "to-string": ke,
6263
+ var: Xt,
6264
6264
  within: Fe,
6265
6265
  distance: $e,
6266
- "global-state": ht
6266
+ "global-state": yt
6267
6267
  };
6268
6268
  class le {
6269
6269
  constructor(e, t, n, a) {
@@ -6286,7 +6286,7 @@ class le {
6286
6286
  u.length === e.length - 1);
6287
6287
  let l = null;
6288
6288
  for (const [u, c] of s) {
6289
- l = new Vt(t.registry, zt, t.path, null, t.scope);
6289
+ l = new Ht(t.registry, Ft, t.path, null, t.scope);
6290
6290
  const p = [];
6291
6291
  let f = !1;
6292
6292
  for (let d = 1; d < e.length; d++) {
@@ -6335,12 +6335,12 @@ function jn(r, [e, t, n, a]) {
6335
6335
  const o = a ? a.evaluate(r) : 1, i = xa(e, t, n, o);
6336
6336
  if (i)
6337
6337
  throw new N(i);
6338
- return new $(e / 255, t / 255, n / 255, o, !1);
6338
+ return new F(e / 255, t / 255, n / 255, o, !1);
6339
6339
  }
6340
6340
  function Nn(r, e) {
6341
6341
  return r in e;
6342
6342
  }
6343
- function fr(r, e) {
6343
+ function dr(r, e) {
6344
6344
  const t = e[r];
6345
6345
  return typeof t > "u" ? null : t;
6346
6346
  }
@@ -6370,21 +6370,21 @@ le.register(rn, {
6370
6370
  (r, [e]) => j(B(e.evaluate(r)))
6371
6371
  ],
6372
6372
  "to-rgba": [
6373
- Y(w, 4),
6374
- [he],
6373
+ Y(b, 4),
6374
+ [de],
6375
6375
  (r, [e]) => {
6376
6376
  const [t, n, a, o] = e.evaluate(r).rgb;
6377
6377
  return [t * 255, n * 255, a * 255, o];
6378
6378
  }
6379
6379
  ],
6380
6380
  rgb: [
6381
- he,
6382
- [w, w, w],
6381
+ de,
6382
+ [b, b, b],
6383
6383
  jn
6384
6384
  ],
6385
6385
  rgba: [
6386
- he,
6387
- [w, w, w, w],
6386
+ de,
6387
+ [b, b, b, b],
6388
6388
  jn
6389
6389
  ],
6390
6390
  has: {
@@ -6405,18 +6405,18 @@ le.register(rn, {
6405
6405
  overloads: [
6406
6406
  [
6407
6407
  [I],
6408
- (r, [e]) => fr(e.evaluate(r), r.properties())
6408
+ (r, [e]) => dr(e.evaluate(r), r.properties())
6409
6409
  ],
6410
6410
  [
6411
6411
  [I, Re],
6412
- (r, [e, t]) => fr(e.evaluate(r), t.evaluate(r))
6412
+ (r, [e, t]) => dr(e.evaluate(r), t.evaluate(r))
6413
6413
  ]
6414
6414
  ]
6415
6415
  },
6416
6416
  "feature-state": [
6417
6417
  T,
6418
6418
  [I],
6419
- (r, [e]) => fr(e.evaluate(r), r.featureState || {})
6419
+ (r, [e]) => dr(e.evaluate(r), r.featureState || {})
6420
6420
  ],
6421
6421
  properties: [
6422
6422
  Re,
@@ -6434,22 +6434,22 @@ le.register(rn, {
6434
6434
  (r) => r.id()
6435
6435
  ],
6436
6436
  zoom: [
6437
- w,
6437
+ b,
6438
6438
  [],
6439
6439
  (r) => r.globals.zoom
6440
6440
  ],
6441
6441
  "heatmap-density": [
6442
- w,
6442
+ b,
6443
6443
  [],
6444
6444
  (r) => r.globals.heatmapDensity || 0
6445
6445
  ],
6446
6446
  elevation: [
6447
- w,
6447
+ b,
6448
6448
  [],
6449
6449
  (r) => r.globals.elevation || 0
6450
6450
  ],
6451
6451
  "line-progress": [
6452
- w,
6452
+ b,
6453
6453
  [],
6454
6454
  (r) => r.globals.lineProgress || 0
6455
6455
  ],
@@ -6459,8 +6459,8 @@ le.register(rn, {
6459
6459
  (r) => r.globals.accumulated === void 0 ? null : r.globals.accumulated
6460
6460
  ],
6461
6461
  "+": [
6462
- w,
6463
- Ie(w),
6462
+ b,
6463
+ Ie(b),
6464
6464
  (r, e) => {
6465
6465
  let t = 0;
6466
6466
  for (const n of e)
@@ -6469,8 +6469,8 @@ le.register(rn, {
6469
6469
  }
6470
6470
  ],
6471
6471
  "*": [
6472
- w,
6473
- Ie(w),
6472
+ b,
6473
+ Ie(b),
6474
6474
  (r, e) => {
6475
6475
  let t = 1;
6476
6476
  for (const n of e)
@@ -6479,129 +6479,129 @@ le.register(rn, {
6479
6479
  }
6480
6480
  ],
6481
6481
  "-": {
6482
- type: w,
6482
+ type: b,
6483
6483
  overloads: [
6484
6484
  [
6485
- [w, w],
6485
+ [b, b],
6486
6486
  (r, [e, t]) => e.evaluate(r) - t.evaluate(r)
6487
6487
  ],
6488
6488
  [
6489
- [w],
6489
+ [b],
6490
6490
  (r, [e]) => -e.evaluate(r)
6491
6491
  ]
6492
6492
  ]
6493
6493
  },
6494
6494
  "/": [
6495
- w,
6496
- [w, w],
6495
+ b,
6496
+ [b, b],
6497
6497
  (r, [e, t]) => e.evaluate(r) / t.evaluate(r)
6498
6498
  ],
6499
6499
  "%": [
6500
- w,
6501
- [w, w],
6500
+ b,
6501
+ [b, b],
6502
6502
  (r, [e, t]) => e.evaluate(r) % t.evaluate(r)
6503
6503
  ],
6504
6504
  ln2: [
6505
- w,
6505
+ b,
6506
6506
  [],
6507
6507
  () => Math.LN2
6508
6508
  ],
6509
6509
  pi: [
6510
- w,
6510
+ b,
6511
6511
  [],
6512
6512
  () => Math.PI
6513
6513
  ],
6514
6514
  e: [
6515
- w,
6515
+ b,
6516
6516
  [],
6517
6517
  () => Math.E
6518
6518
  ],
6519
6519
  "^": [
6520
- w,
6521
- [w, w],
6520
+ b,
6521
+ [b, b],
6522
6522
  (r, [e, t]) => Math.pow(e.evaluate(r), t.evaluate(r))
6523
6523
  ],
6524
6524
  sqrt: [
6525
- w,
6526
- [w],
6525
+ b,
6526
+ [b],
6527
6527
  (r, [e]) => Math.sqrt(e.evaluate(r))
6528
6528
  ],
6529
6529
  log10: [
6530
- w,
6531
- [w],
6530
+ b,
6531
+ [b],
6532
6532
  (r, [e]) => Math.log(e.evaluate(r)) / Math.LN10
6533
6533
  ],
6534
6534
  ln: [
6535
- w,
6536
- [w],
6535
+ b,
6536
+ [b],
6537
6537
  (r, [e]) => Math.log(e.evaluate(r))
6538
6538
  ],
6539
6539
  log2: [
6540
- w,
6541
- [w],
6540
+ b,
6541
+ [b],
6542
6542
  (r, [e]) => Math.log(e.evaluate(r)) / Math.LN2
6543
6543
  ],
6544
6544
  sin: [
6545
- w,
6546
- [w],
6545
+ b,
6546
+ [b],
6547
6547
  (r, [e]) => Math.sin(e.evaluate(r))
6548
6548
  ],
6549
6549
  cos: [
6550
- w,
6551
- [w],
6550
+ b,
6551
+ [b],
6552
6552
  (r, [e]) => Math.cos(e.evaluate(r))
6553
6553
  ],
6554
6554
  tan: [
6555
- w,
6556
- [w],
6555
+ b,
6556
+ [b],
6557
6557
  (r, [e]) => Math.tan(e.evaluate(r))
6558
6558
  ],
6559
6559
  asin: [
6560
- w,
6561
- [w],
6560
+ b,
6561
+ [b],
6562
6562
  (r, [e]) => Math.asin(e.evaluate(r))
6563
6563
  ],
6564
6564
  acos: [
6565
- w,
6566
- [w],
6565
+ b,
6566
+ [b],
6567
6567
  (r, [e]) => Math.acos(e.evaluate(r))
6568
6568
  ],
6569
6569
  atan: [
6570
- w,
6571
- [w],
6570
+ b,
6571
+ [b],
6572
6572
  (r, [e]) => Math.atan(e.evaluate(r))
6573
6573
  ],
6574
6574
  min: [
6575
- w,
6576
- Ie(w),
6575
+ b,
6576
+ Ie(b),
6577
6577
  (r, e) => Math.min(...e.map((t) => t.evaluate(r)))
6578
6578
  ],
6579
6579
  max: [
6580
- w,
6581
- Ie(w),
6580
+ b,
6581
+ Ie(b),
6582
6582
  (r, e) => Math.max(...e.map((t) => t.evaluate(r)))
6583
6583
  ],
6584
6584
  abs: [
6585
- w,
6586
- [w],
6585
+ b,
6586
+ [b],
6587
6587
  (r, [e]) => Math.abs(e.evaluate(r))
6588
6588
  ],
6589
6589
  round: [
6590
- w,
6591
- [w],
6590
+ b,
6591
+ [b],
6592
6592
  (r, [e]) => {
6593
6593
  const t = e.evaluate(r);
6594
6594
  return t < 0 ? -Math.round(-t) : Math.round(t);
6595
6595
  }
6596
6596
  ],
6597
6597
  floor: [
6598
- w,
6599
- [w],
6598
+ b,
6599
+ [b],
6600
6600
  (r, [e]) => Math.floor(e.evaluate(r))
6601
6601
  ],
6602
6602
  ceil: [
6603
- w,
6604
- [w],
6603
+ b,
6604
+ [b],
6605
6605
  (r, [e]) => Math.ceil(e.evaluate(r))
6606
6606
  ],
6607
6607
  "filter-==": [
@@ -6778,37 +6778,37 @@ le.register(rn, {
6778
6778
  concat: [
6779
6779
  I,
6780
6780
  Ie(T),
6781
- (r, e) => e.map((t) => tt(t.evaluate(r))).join("")
6781
+ (r, e) => e.map((t) => rt(t.evaluate(r))).join("")
6782
6782
  ],
6783
6783
  "resolved-locale": [
6784
6784
  I,
6785
- [Dt],
6785
+ [Ut],
6786
6786
  (r, [e]) => e.evaluate(r).resolvedLocale()
6787
6787
  ]
6788
6788
  });
6789
6789
  function tl(r) {
6790
6790
  return Array.isArray(r) ? `(${r.map(j).join(", ")})` : `(${j(r.type)}...)`;
6791
6791
  }
6792
- function zt(r) {
6793
- if (r instanceof Kt)
6794
- return zt(r.boundExpression);
6792
+ function Ft(r) {
6793
+ if (r instanceof Xt)
6794
+ return Ft(r.boundExpression);
6795
6795
  if (r instanceof le && r.name === "error")
6796
6796
  return !1;
6797
- if (r instanceof Zt)
6797
+ if (r instanceof Yt)
6798
6798
  return !1;
6799
6799
  if (r instanceof Fe)
6800
6800
  return !1;
6801
6801
  if (r instanceof $e)
6802
6802
  return !1;
6803
- if (r instanceof ht)
6803
+ if (r instanceof yt)
6804
6804
  return !1;
6805
- const e = r instanceof Ce || r instanceof se;
6805
+ const e = r instanceof ke || r instanceof se;
6806
6806
  let t = !0;
6807
6807
  return r.eachChild((n) => {
6808
- e ? t = t && zt(n) : t = t && n instanceof He;
6809
- }), t ? Wt(r) && Jt(r, ["zoom", "heatmap-density", "elevation", "line-progress", "accumulated", "is-supported-script"]) : !1;
6808
+ e ? t = t && Ft(n) : t = t && n instanceof He;
6809
+ }), t ? Jt(r) && Qt(r, ["zoom", "heatmap-density", "elevation", "line-progress", "accumulated", "is-supported-script"]) : !1;
6810
6810
  }
6811
- function Wt(r) {
6811
+ function Jt(r) {
6812
6812
  if (r instanceof le) {
6813
6813
  if (r.name === "get" && r.args.length === 1)
6814
6814
  return !1;
@@ -6825,23 +6825,23 @@ function Wt(r) {
6825
6825
  return !1;
6826
6826
  let e = !0;
6827
6827
  return r.eachChild((t) => {
6828
- e && !Wt(t) && (e = !1);
6828
+ e && !Jt(t) && (e = !1);
6829
6829
  }), e;
6830
6830
  }
6831
- function lt(r) {
6831
+ function ut(r) {
6832
6832
  if (r instanceof le && r.name === "feature-state")
6833
6833
  return !1;
6834
6834
  let e = !0;
6835
6835
  return r.eachChild((t) => {
6836
- e && !lt(t) && (e = !1);
6836
+ e && !ut(t) && (e = !1);
6837
6837
  }), e;
6838
6838
  }
6839
- function Jt(r, e) {
6839
+ function Qt(r, e) {
6840
6840
  if (r instanceof le && e.indexOf(r.name) >= 0)
6841
6841
  return !1;
6842
6842
  let t = !0;
6843
6843
  return r.eachChild((n) => {
6844
- t && !Jt(n, e) && (t = !1);
6844
+ t && !Qt(n, e) && (t = !1);
6845
6845
  }), t;
6846
6846
  }
6847
6847
  function Mr(r) {
@@ -6850,7 +6850,7 @@ function Mr(r) {
6850
6850
  function qe(r) {
6851
6851
  return { result: "error", value: r };
6852
6852
  }
6853
- function Ft(r) {
6853
+ function $t(r) {
6854
6854
  return r["property-type"] === "data-driven" || r["property-type"] === "cross-faded-data-driven";
6855
6855
  }
6856
6856
  function Pa(r) {
@@ -6890,12 +6890,12 @@ function za(r) {
6890
6890
  return Array.isArray(r) && r.length > 0 && typeof r[0] == "string" && r[0] in rn;
6891
6891
  }
6892
6892
  function Fa(r, e) {
6893
- const t = new Vt(rn, zt, [], e ? al(e) : void 0), n = t.parse(r, void 0, void 0, void 0, e && e.type === "string" ? { typeAnnotation: "coerce" } : void 0);
6893
+ const t = new Ht(rn, Ft, [], e ? al(e) : void 0), n = t.parse(r, void 0, void 0, void 0, e && e.type === "string" ? { typeAnnotation: "coerce" } : void 0);
6894
6894
  return n ? Mr(new rl(n, e)) : qe(t.errors);
6895
6895
  }
6896
6896
  class Dn {
6897
6897
  constructor(e, t) {
6898
- this.kind = e, this._styleExpression = t, this.isStateDependent = e !== "constant" && !lt(t.expression), this.globalStateRefs = an(t.expression);
6898
+ this.kind = e, this._styleExpression = t, this.isStateDependent = e !== "constant" && !ut(t.expression), this.globalStateRefs = an(t.expression);
6899
6899
  }
6900
6900
  evaluateWithoutErrorHandling(e, t, n, a, o, i) {
6901
6901
  return this._styleExpression.evaluateWithoutErrorHandling(e, t, n, a, o, i);
@@ -6906,7 +6906,7 @@ class Dn {
6906
6906
  }
6907
6907
  class Un {
6908
6908
  constructor(e, t, n, a) {
6909
- this.kind = e, this.zoomStops = n, this._styleExpression = t, this.isStateDependent = e !== "camera" && !lt(t.expression), this.globalStateRefs = an(t.expression), this.interpolationType = a;
6909
+ this.kind = e, this.zoomStops = n, this._styleExpression = t, this.isStateDependent = e !== "camera" && !ut(t.expression), this.globalStateRefs = an(t.expression), this.interpolationType = a;
6910
6910
  }
6911
6911
  evaluateWithoutErrorHandling(e, t, n, a, o, i) {
6912
6912
  return this._styleExpression.evaluateWithoutErrorHandling(e, t, n, a, o, i);
@@ -6915,73 +6915,73 @@ class Un {
6915
6915
  return this._styleExpression.evaluate(e, t, n, a, o, i);
6916
6916
  }
6917
6917
  interpolationFactor(e, t, n) {
6918
- return this.interpolationType ? ye.interpolationFactor(this.interpolationType, e, t, n) : 0;
6918
+ return this.interpolationType ? he.interpolationFactor(this.interpolationType, e, t, n) : 0;
6919
6919
  }
6920
6920
  }
6921
6921
  function nl(r, e) {
6922
6922
  const t = Fa(r, e);
6923
6923
  if (t.result === "error")
6924
6924
  return t;
6925
- const n = t.value.expression, a = Wt(n);
6926
- if (!a && !Ft(e))
6927
- return qe([new de("", "data expressions not supported")]);
6928
- const o = Jt(n, ["zoom"]);
6925
+ const n = t.value.expression, a = Jt(n);
6926
+ if (!a && !$t(e))
6927
+ return qe([new fe("", "data expressions not supported")]);
6928
+ const o = Qt(n, ["zoom"]);
6929
6929
  if (!o && !Pa(e))
6930
- return qe([new de("", "zoom expressions not supported")]);
6931
- const i = Ct(n);
6930
+ return qe([new fe("", "zoom expressions not supported")]);
6931
+ const i = Lt(n);
6932
6932
  if (!i && !o)
6933
- return qe([new de("", '"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);
6934
- if (i instanceof de)
6933
+ return qe([new fe("", '"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);
6934
+ if (i instanceof fe)
6935
6935
  return qe([i]);
6936
- if (i instanceof ye && !Ra(e))
6937
- return qe([new de("", '"interpolate" expressions cannot be used with this property')]);
6936
+ if (i instanceof he && !Ra(e))
6937
+ return qe([new fe("", '"interpolate" expressions cannot be used with this property')]);
6938
6938
  if (!i)
6939
6939
  return Mr(a ? new Dn("constant", t.value) : new Dn("source", t.value));
6940
- const s = i instanceof ye ? i.interpolation : void 0;
6940
+ const s = i instanceof he ? i.interpolation : void 0;
6941
6941
  return Mr(a ? new Un("camera", t.value, i.labels, s) : new Un("composite", t.value, i.labels, s));
6942
6942
  }
6943
- function Ct(r) {
6943
+ function Lt(r) {
6944
6944
  let e = null;
6945
- if (r instanceof Ht)
6946
- e = Ct(r.result);
6947
- else if (r instanceof it) {
6945
+ if (r instanceof Kt)
6946
+ e = Lt(r.result);
6947
+ else if (r instanceof st) {
6948
6948
  for (const t of r.args)
6949
- if (e = Ct(t), e)
6949
+ if (e = Lt(t), e)
6950
6950
  break;
6951
- } else (r instanceof Xt || r instanceof ye) && r.input instanceof le && r.input.name === "zoom" && (e = r);
6952
- return e instanceof de || r.eachChild((t) => {
6953
- const n = Ct(t);
6954
- n instanceof de ? e = n : !e && n ? e = new de("", '"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.') : e && n && e !== n && (e = new de("", 'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'));
6951
+ } else (r instanceof Zt || r instanceof he) && r.input instanceof le && r.input.name === "zoom" && (e = r);
6952
+ return e instanceof fe || r.eachChild((t) => {
6953
+ const n = Lt(t);
6954
+ n instanceof fe ? e = n : !e && n ? e = new fe("", '"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.') : e && n && e !== n && (e = new fe("", 'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'));
6955
6955
  }), e;
6956
6956
  }
6957
6957
  function an(r, e = /* @__PURE__ */ new Set()) {
6958
- return r instanceof ht && e.add(r.key), r.eachChild((t) => {
6958
+ return r instanceof yt && e.add(r.key), r.eachChild((t) => {
6959
6959
  an(t, e);
6960
6960
  }), e;
6961
6961
  }
6962
6962
  function al(r) {
6963
6963
  const e = {
6964
- color: he,
6964
+ color: de,
6965
6965
  string: I,
6966
- number: w,
6966
+ number: b,
6967
6967
  enum: I,
6968
6968
  boolean: _,
6969
- formatted: Ut,
6970
- padding: Bt,
6971
- numberArray: qt,
6972
- colorArray: nt,
6973
- projectionDefinition: Nt,
6974
- resolvedImage: ft,
6975
- variableAnchorOffsetCollection: Gt
6969
+ formatted: Bt,
6970
+ padding: qt,
6971
+ numberArray: Gt,
6972
+ colorArray: at,
6973
+ projectionDefinition: Dt,
6974
+ resolvedImage: dt,
6975
+ variableAnchorOffsetCollection: Vt
6976
6976
  };
6977
6977
  return r.type === "array" ? Y(e[r.value] || T, r.length) : e[r.type];
6978
6978
  }
6979
6979
  function ol(r) {
6980
6980
  if (r.type === "color" && nn(r.default))
6981
- return new $(0, 0, 0, 0);
6981
+ return new F(0, 0, 0, 0);
6982
6982
  switch (r.type) {
6983
6983
  case "color":
6984
- return $.parse(r.default) || null;
6984
+ return F.parse(r.default) || null;
6985
6985
  case "padding":
6986
6986
  return Q.parse(r.default) || null;
6987
6987
  case "numberArray":
@@ -7029,7 +7029,7 @@ function $a(r) {
7029
7029
  }
7030
7030
  function Oa(r) {
7031
7031
  const e = r.key, t = r.value;
7032
- return t ? [new v(e, t, "constants have been deprecated as of v8")] : [];
7032
+ return t ? [new g(e, t, "constants have been deprecated as of v8")] : [];
7033
7033
  }
7034
7034
  function U(r) {
7035
7035
  return r instanceof Number || r instanceof String || r instanceof Boolean ? r.valueOf() : r;
@@ -7050,20 +7050,20 @@ function te(r) {
7050
7050
  let l = [];
7051
7051
  const u = M(t);
7052
7052
  if (u !== "object")
7053
- return [new v(e, t, `object expected, ${u} found`)];
7053
+ return [new g(e, t, `object expected, ${u} found`)];
7054
7054
  for (const c in t) {
7055
- const p = c.split(".")[0], f = et(n, p) || n["*"];
7055
+ const p = c.split(".")[0], f = tt(n, p) || n["*"];
7056
7056
  let d;
7057
- if (et(a, p))
7057
+ if (tt(a, p))
7058
7058
  d = a[p];
7059
- else if (et(n, p))
7059
+ else if (tt(n, p))
7060
7060
  d = s;
7061
7061
  else if (a["*"])
7062
7062
  d = a["*"];
7063
7063
  else if (n["*"])
7064
7064
  d = s;
7065
7065
  else {
7066
- l.push(new v(e, t[c], `unknown property "${c}"`));
7066
+ l.push(new g(e, t[c], `unknown property "${c}"`));
7067
7067
  continue;
7068
7068
  }
7069
7069
  l = l.concat(d({
@@ -7078,17 +7078,17 @@ function te(r) {
7078
7078
  }, t));
7079
7079
  }
7080
7080
  for (const c in n)
7081
- a[c] || n[c].required && n[c].default === void 0 && t[c] === void 0 && l.push(new v(e, t, `missing required property "${c}"`));
7081
+ a[c] || n[c].required && n[c].default === void 0 && t[c] === void 0 && l.push(new g(e, t, `missing required property "${c}"`));
7082
7082
  return l;
7083
7083
  }
7084
7084
  function on(r) {
7085
7085
  const e = r.value, t = r.valueSpec, n = r.validateSpec, a = r.style, o = r.styleSpec, i = r.key, s = r.arrayElementValidator || n;
7086
7086
  if (M(e) !== "array")
7087
- return [new v(i, e, `array expected, ${M(e)} found`)];
7087
+ return [new g(i, e, `array expected, ${M(e)} found`)];
7088
7088
  if (t.length && e.length !== t.length)
7089
- return [new v(i, e, `array length ${t.length} expected, length ${e.length} found`)];
7089
+ return [new g(i, e, `array length ${t.length} expected, length ${e.length} found`)];
7090
7090
  if (t["min-length"] && e.length < t["min-length"])
7091
- return [new v(i, e, `array length at least ${t["min-length"]} expected, length ${e.length} found`)];
7091
+ return [new g(i, e, `array length at least ${t["min-length"]} expected, length ${e.length} found`)];
7092
7092
  let l = {
7093
7093
  type: t.value,
7094
7094
  values: t.values
@@ -7108,10 +7108,10 @@ function on(r) {
7108
7108
  }));
7109
7109
  return u;
7110
7110
  }
7111
- function Qt(r) {
7111
+ function er(r) {
7112
7112
  const e = r.key, t = r.value, n = r.valueSpec;
7113
7113
  let a = M(t);
7114
- return a === "number" && t !== t && (a = "NaN"), a !== "number" ? [new v(e, t, `number expected, ${a} found`)] : "minimum" in n && t < n.minimum ? [new v(e, t, `${t} is less than the minimum value ${n.minimum}`)] : "maximum" in n && t > n.maximum ? [new v(e, t, `${t} is greater than the maximum value ${n.maximum}`)] : [];
7114
+ return a === "number" && t !== t && (a = "NaN"), a !== "number" ? [new g(e, t, `number expected, ${a} found`)] : "minimum" in n && t < n.minimum ? [new g(e, t, `${t} is less than the minimum value ${n.minimum}`)] : "maximum" in n && t > n.maximum ? [new g(e, t, `${t} is greater than the maximum value ${n.maximum}`)] : [];
7115
7115
  }
7116
7116
  function ja(r) {
7117
7117
  const e = r.valueSpec, t = U(r.value.type);
@@ -7128,58 +7128,58 @@ function ja(r) {
7128
7128
  default: h
7129
7129
  }
7130
7130
  });
7131
- return t === "identity" && s && c.push(new v(r.key, r.value, 'missing required property "property"')), t !== "identity" && !r.value.stops && c.push(new v(r.key, r.value, 'missing required property "stops"')), t === "exponential" && r.valueSpec.expression && !Ra(r.valueSpec) && c.push(new v(r.key, r.value, "exponential functions not supported")), r.styleSpec.$version >= 8 && (l && !Ft(r.valueSpec) ? c.push(new v(r.key, r.value, "property functions not supported")) : s && !Pa(r.valueSpec) && c.push(new v(r.key, r.value, "zoom functions not supported"))), (t === "categorical" || u) && r.value.property === void 0 && c.push(new v(r.key, r.value, '"property" property is required')), c;
7131
+ return t === "identity" && s && c.push(new g(r.key, r.value, 'missing required property "property"')), t !== "identity" && !r.value.stops && c.push(new g(r.key, r.value, 'missing required property "stops"')), t === "exponential" && r.valueSpec.expression && !Ra(r.valueSpec) && c.push(new g(r.key, r.value, "exponential functions not supported")), r.styleSpec.$version >= 8 && (l && !$t(r.valueSpec) ? c.push(new g(r.key, r.value, "property functions not supported")) : s && !Pa(r.valueSpec) && c.push(new g(r.key, r.value, "zoom functions not supported"))), (t === "categorical" || u) && r.value.property === void 0 && c.push(new g(r.key, r.value, '"property" property is required')), c;
7132
7132
  function p(y) {
7133
7133
  if (t === "identity")
7134
- return [new v(y.key, y.value, 'identity function may not have a "stops" property')];
7134
+ return [new g(y.key, y.value, 'identity function may not have a "stops" property')];
7135
7135
  let m = [];
7136
- const b = y.value;
7136
+ const w = y.value;
7137
7137
  return m = m.concat(on({
7138
7138
  key: y.key,
7139
- value: b,
7139
+ value: w,
7140
7140
  valueSpec: y.valueSpec,
7141
7141
  validateSpec: y.validateSpec,
7142
7142
  style: y.style,
7143
7143
  styleSpec: y.styleSpec,
7144
7144
  arrayElementValidator: f
7145
- })), M(b) === "array" && b.length === 0 && m.push(new v(y.key, b, "array must have at least one stop")), m;
7145
+ })), M(w) === "array" && w.length === 0 && m.push(new g(y.key, w, "array must have at least one stop")), m;
7146
7146
  }
7147
7147
  function f(y) {
7148
7148
  let m = [];
7149
- const b = y.value, g = y.key;
7150
- if (M(b) !== "array")
7151
- return [new v(g, b, `array expected, ${M(b)} found`)];
7152
- if (b.length !== 2)
7153
- return [new v(g, b, `array length 2 expected, length ${b.length} found`)];
7149
+ const w = y.value, v = y.key;
7150
+ if (M(w) !== "array")
7151
+ return [new g(v, w, `array expected, ${M(w)} found`)];
7152
+ if (w.length !== 2)
7153
+ return [new g(v, w, `array length 2 expected, length ${w.length} found`)];
7154
7154
  if (u) {
7155
- if (M(b[0]) !== "object")
7156
- return [new v(g, b, `object expected, ${M(b[0])} found`)];
7157
- if (b[0].zoom === void 0)
7158
- return [new v(g, b, "object stop key must have zoom")];
7159
- if (b[0].value === void 0)
7160
- return [new v(g, b, "object stop key must have value")];
7161
- if (i && i > U(b[0].zoom))
7162
- return [new v(g, b[0].zoom, "stop zoom values must appear in ascending order")];
7163
- U(b[0].zoom) !== i && (i = U(b[0].zoom), o = void 0, a = {}), m = m.concat(te({
7164
- key: `${g}[0]`,
7165
- value: b[0],
7155
+ if (M(w[0]) !== "object")
7156
+ return [new g(v, w, `object expected, ${M(w[0])} found`)];
7157
+ if (w[0].zoom === void 0)
7158
+ return [new g(v, w, "object stop key must have zoom")];
7159
+ if (w[0].value === void 0)
7160
+ return [new g(v, w, "object stop key must have value")];
7161
+ if (i && i > U(w[0].zoom))
7162
+ return [new g(v, w[0].zoom, "stop zoom values must appear in ascending order")];
7163
+ U(w[0].zoom) !== i && (i = U(w[0].zoom), o = void 0, a = {}), m = m.concat(te({
7164
+ key: `${v}[0]`,
7165
+ value: w[0],
7166
7166
  valueSpec: { zoom: {} },
7167
7167
  validateSpec: y.validateSpec,
7168
7168
  style: y.style,
7169
7169
  styleSpec: y.styleSpec,
7170
- objectElementValidators: { zoom: Qt, value: d }
7170
+ objectElementValidators: { zoom: er, value: d }
7171
7171
  }));
7172
7172
  } else
7173
7173
  m = m.concat(d({
7174
- key: `${g}[0]`,
7175
- value: b[0],
7174
+ key: `${v}[0]`,
7175
+ value: w[0],
7176
7176
  validateSpec: y.validateSpec,
7177
7177
  style: y.style,
7178
7178
  styleSpec: y.styleSpec
7179
- }, b));
7180
- return za(Ne(b[1])) ? m.concat([new v(`${g}[1]`, b[1], "expressions are not allowed in function stops.")]) : m.concat(y.validateSpec({
7181
- key: `${g}[1]`,
7182
- value: b[1],
7179
+ }, w));
7180
+ return za(Ne(w[1])) ? m.concat([new g(`${v}[1]`, w[1], "expressions are not allowed in function stops.")]) : m.concat(y.validateSpec({
7181
+ key: `${v}[1]`,
7182
+ value: w[1],
7183
7183
  valueSpec: e,
7184
7184
  validateSpec: y.validateSpec,
7185
7185
  style: y.style,
@@ -7187,18 +7187,18 @@ function ja(r) {
7187
7187
  }));
7188
7188
  }
7189
7189
  function d(y, m) {
7190
- const b = M(y.value), g = U(y.value), x = y.value !== null ? y.value : m;
7190
+ const w = M(y.value), v = U(y.value), x = y.value !== null ? y.value : m;
7191
7191
  if (!n)
7192
- n = b;
7193
- else if (b !== n)
7194
- return [new v(y.key, x, `${b} stop domain type must match previous stop domain type ${n}`)];
7195
- if (b !== "number" && b !== "string" && b !== "boolean")
7196
- return [new v(y.key, x, "stop domain value must be a number, string, or boolean")];
7197
- if (b !== "number" && t !== "categorical") {
7198
- let A = `number expected, ${b} found`;
7199
- return Ft(e) && t === void 0 && (A += '\nIf you intended to use a categorical function, specify `"type": "categorical"`.'), [new v(y.key, x, A)];
7192
+ n = w;
7193
+ else if (w !== n)
7194
+ return [new g(y.key, x, `${w} stop domain type must match previous stop domain type ${n}`)];
7195
+ if (w !== "number" && w !== "string" && w !== "boolean")
7196
+ return [new g(y.key, x, "stop domain value must be a number, string, or boolean")];
7197
+ if (w !== "number" && t !== "categorical") {
7198
+ let A = `number expected, ${w} found`;
7199
+ return $t(e) && t === void 0 && (A += '\nIf you intended to use a categorical function, specify `"type": "categorical"`.'), [new g(y.key, x, A)];
7200
7200
  }
7201
- return t === "categorical" && b === "number" && (!isFinite(g) || Math.floor(g) !== g) ? [new v(y.key, x, `integer expected, found ${g}`)] : t !== "categorical" && b === "number" && o !== void 0 && g < o ? [new v(y.key, x, "stop domain values must appear in ascending order")] : (o = g, t === "categorical" && g in a ? [new v(y.key, x, "stop domain values must be unique")] : (a[g] = !0, []));
7201
+ return t === "categorical" && w === "number" && (!isFinite(v) || Math.floor(v) !== v) ? [new g(y.key, x, `integer expected, found ${v}`)] : t !== "categorical" && w === "number" && o !== void 0 && v < o ? [new g(y.key, x, "stop domain values must appear in ascending order")] : (o = v, t === "categorical" && v in a ? [new g(y.key, x, "stop domain values must be unique")] : (a[v] = !0, []));
7202
7202
  }
7203
7203
  function h(y) {
7204
7204
  return y.validateSpec({
@@ -7214,36 +7214,36 @@ function ja(r) {
7214
7214
  function Ke(r) {
7215
7215
  const e = (r.expressionContext === "property" ? nl : Fa)(Ne(r.value), r.valueSpec);
7216
7216
  if (e.result === "error")
7217
- return e.value.map((n) => new v(`${r.key}${n.key}`, r.value, n.message));
7217
+ return e.value.map((n) => new g(`${r.key}${n.key}`, r.value, n.message));
7218
7218
  const t = e.value.expression || e.value._styleExpression.expression;
7219
7219
  if (r.expressionContext === "property" && r.propertyKey === "text-font" && !t.outputDefined())
7220
- return [new v(r.key, r.value, `Invalid data expression for "${r.propertyKey}". Output values must be contained as literals within the expression.`)];
7221
- if (r.expressionContext === "property" && r.propertyType === "layout" && !lt(t))
7222
- return [new v(r.key, r.value, '"feature-state" data expressions are not supported with layout properties.')];
7223
- if (r.expressionContext === "filter" && !lt(t))
7224
- return [new v(r.key, r.value, '"feature-state" data expressions are not supported with filters.')];
7220
+ return [new g(r.key, r.value, `Invalid data expression for "${r.propertyKey}". Output values must be contained as literals within the expression.`)];
7221
+ if (r.expressionContext === "property" && r.propertyType === "layout" && !ut(t))
7222
+ return [new g(r.key, r.value, '"feature-state" data expressions are not supported with layout properties.')];
7223
+ if (r.expressionContext === "filter" && !ut(t))
7224
+ return [new g(r.key, r.value, '"feature-state" data expressions are not supported with filters.')];
7225
7225
  if (r.expressionContext && r.expressionContext.indexOf("cluster") === 0) {
7226
- if (!Jt(t, ["zoom", "feature-state"]))
7227
- return [new v(r.key, r.value, '"zoom" and "feature-state" expressions are not supported with cluster properties.')];
7228
- if (r.expressionContext === "cluster-initial" && !Wt(t))
7229
- return [new v(r.key, r.value, "Feature data expressions are not supported with initial expression part of cluster properties.")];
7226
+ if (!Qt(t, ["zoom", "feature-state"]))
7227
+ return [new g(r.key, r.value, '"zoom" and "feature-state" expressions are not supported with cluster properties.')];
7228
+ if (r.expressionContext === "cluster-initial" && !Jt(t))
7229
+ return [new g(r.key, r.value, "Feature data expressions are not supported with initial expression part of cluster properties.")];
7230
7230
  }
7231
7231
  return [];
7232
7232
  }
7233
7233
  function il(r) {
7234
7234
  const e = r.value, t = r.key, n = M(e);
7235
- return n !== "boolean" ? [new v(t, e, `boolean expected, ${n} found`)] : [];
7235
+ return n !== "boolean" ? [new g(t, e, `boolean expected, ${n} found`)] : [];
7236
7236
  }
7237
7237
  function Pr(r) {
7238
7238
  const e = r.key, t = r.value, n = M(t);
7239
- return n !== "string" ? [new v(e, t, `color expected, ${n} found`)] : $.parse(String(t)) ? [] : [new v(e, t, `color expected, "${t}" found`)];
7239
+ return n !== "string" ? [new g(e, t, `color expected, ${n} found`)] : F.parse(String(t)) ? [] : [new g(e, t, `color expected, "${t}" found`)];
7240
7240
  }
7241
- function ut(r) {
7241
+ function ct(r) {
7242
7242
  const e = r.key, t = r.value, n = r.valueSpec, a = [];
7243
- return Array.isArray(n.values) ? n.values.indexOf(U(t)) === -1 && a.push(new v(e, t, `expected one of [${n.values.join(", ")}], ${JSON.stringify(t)} found`)) : Object.keys(n.values).indexOf(U(t)) === -1 && a.push(new v(e, t, `expected one of [${Object.keys(n.values).join(", ")}], ${JSON.stringify(t)} found`)), a;
7243
+ return Array.isArray(n.values) ? n.values.indexOf(U(t)) === -1 && a.push(new g(e, t, `expected one of [${n.values.join(", ")}], ${JSON.stringify(t)} found`)) : Object.keys(n.values).indexOf(U(t)) === -1 && a.push(new g(e, t, `expected one of [${Object.keys(n.values).join(", ")}], ${JSON.stringify(t)} found`)), a;
7244
7244
  }
7245
7245
  function sn(r) {
7246
- return $a(Ne(r.value)) ? Ke(Tt({}, r, {
7246
+ return $a(Ne(r.value)) ? Ke(_t({}, r, {
7247
7247
  expressionContext: "filter",
7248
7248
  valueSpec: { value: "boolean" }
7249
7249
  })) : Na(r);
@@ -7251,12 +7251,12 @@ function sn(r) {
7251
7251
  function Na(r) {
7252
7252
  const e = r.value, t = r.key;
7253
7253
  if (M(e) !== "array")
7254
- return [new v(t, e, `array expected, ${M(e)} found`)];
7254
+ return [new g(t, e, `array expected, ${M(e)} found`)];
7255
7255
  const n = r.styleSpec;
7256
7256
  let a, o = [];
7257
7257
  if (e.length < 1)
7258
- return [new v(t, e, "filter array must have at least 1 element")];
7259
- switch (o = o.concat(ut({
7258
+ return [new g(t, e, "filter array must have at least 1 element")];
7259
+ switch (o = o.concat(ct({
7260
7260
  key: `${t}[0]`,
7261
7261
  value: e[0],
7262
7262
  valueSpec: n.filter_operator,
@@ -7267,23 +7267,23 @@ function Na(r) {
7267
7267
  case "<=":
7268
7268
  case ">":
7269
7269
  case ">=":
7270
- e.length >= 2 && U(e[1]) === "$type" && o.push(new v(t, e, `"$type" cannot be use with operator "${e[0]}"`));
7270
+ e.length >= 2 && U(e[1]) === "$type" && o.push(new g(t, e, `"$type" cannot be use with operator "${e[0]}"`));
7271
7271
  /* falls through */
7272
7272
  case "==":
7273
7273
  case "!=":
7274
- e.length !== 3 && o.push(new v(t, e, `filter array for operator "${e[0]}" must have 3 elements`));
7274
+ e.length !== 3 && o.push(new g(t, e, `filter array for operator "${e[0]}" must have 3 elements`));
7275
7275
  /* falls through */
7276
7276
  case "in":
7277
7277
  case "!in":
7278
- e.length >= 2 && (a = M(e[1]), a !== "string" && o.push(new v(`${t}[1]`, e[1], `string expected, ${a} found`)));
7278
+ e.length >= 2 && (a = M(e[1]), a !== "string" && o.push(new g(`${t}[1]`, e[1], `string expected, ${a} found`)));
7279
7279
  for (let i = 2; i < e.length; i++)
7280
- a = M(e[i]), U(e[1]) === "$type" ? o = o.concat(ut({
7280
+ a = M(e[i]), U(e[1]) === "$type" ? o = o.concat(ct({
7281
7281
  key: `${t}[${i}]`,
7282
7282
  value: e[i],
7283
7283
  valueSpec: n.geometry_type,
7284
7284
  style: r.style,
7285
7285
  styleSpec: r.styleSpec
7286
- })) : a !== "string" && a !== "number" && a !== "boolean" && o.push(new v(`${t}[${i}]`, e[i], `string, number, or boolean expected, ${a} found`));
7286
+ })) : a !== "string" && a !== "number" && a !== "boolean" && o.push(new g(`${t}[${i}]`, e[i], `string, number, or boolean expected, ${a} found`));
7287
7287
  break;
7288
7288
  case "any":
7289
7289
  case "all":
@@ -7298,7 +7298,7 @@ function Na(r) {
7298
7298
  break;
7299
7299
  case "has":
7300
7300
  case "!has":
7301
- a = M(e[1]), e.length !== 2 ? o.push(new v(t, e, `filter array for "${e[0]}" operator must have 2 elements`)) : a !== "string" && o.push(new v(`${t}[1]`, e[1], `string expected, ${a} found`));
7301
+ a = M(e[1]), e.length !== 2 ? o.push(new g(t, e, `filter array for "${e[0]}" operator must have 2 elements`)) : a !== "string" && o.push(new g(`${t}[1]`, e[1], `string expected, ${a} found`));
7302
7302
  break;
7303
7303
  }
7304
7304
  return o;
@@ -7318,13 +7318,13 @@ function Da(r, e) {
7318
7318
  });
7319
7319
  const c = r.valueSpec || l[s];
7320
7320
  if (!c)
7321
- return [new v(t, i, `unknown property "${s}"`)];
7321
+ return [new g(t, i, `unknown property "${s}"`)];
7322
7322
  let p;
7323
- if (M(i) === "string" && Ft(c) && !c.tokens && (p = /^{([^}]+)}$/.exec(i)))
7324
- return [new v(t, i, `"${s}" does not support interpolation syntax
7323
+ if (M(i) === "string" && $t(c) && !c.tokens && (p = /^{([^}]+)}$/.exec(i)))
7324
+ return [new g(t, i, `"${s}" does not support interpolation syntax
7325
7325
  Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(p[1])} }\`.`)];
7326
7326
  const f = [];
7327
- return r.layerType === "symbol" && (s === "text-field" && a && !a.glyphs && f.push(new v(t, i, 'use of "text-field" requires a style "glyphs" property')), s === "text-font" && nn(Ne(i)) && U(i.type) === "identity" && f.push(new v(t, i, '"text-font" does not support identity functions'))), f.concat(n({
7327
+ return r.layerType === "symbol" && (s === "text-field" && a && !a.glyphs && f.push(new g(t, i, 'use of "text-field" requires a style "glyphs" property')), s === "text-font" && nn(Ne(i)) && U(i.type) === "identity" && f.push(new g(t, i, '"text-font" does not support identity functions'))), f.concat(n({
7328
7328
  key: r.key,
7329
7329
  value: i,
7330
7330
  valueSpec: c,
@@ -7345,31 +7345,31 @@ function qa(r) {
7345
7345
  let e = [];
7346
7346
  const t = r.value, n = r.key, a = r.style, o = r.styleSpec;
7347
7347
  if (M(t) !== "object")
7348
- return [new v(n, t, `object expected, ${M(t)} found`)];
7349
- !t.type && !t.ref && e.push(new v(n, t, 'either "type" or "ref" is required'));
7348
+ return [new g(n, t, `object expected, ${M(t)} found`)];
7349
+ !t.type && !t.ref && e.push(new g(n, t, 'either "type" or "ref" is required'));
7350
7350
  let i = U(t.type);
7351
7351
  const s = U(t.ref);
7352
7352
  if (t.id) {
7353
7353
  const l = U(t.id);
7354
7354
  for (let u = 0; u < r.arrayIndex; u++) {
7355
7355
  const c = a.layers[u];
7356
- U(c.id) === l && e.push(new v(n, t.id, `duplicate layer id "${t.id}", previously used at line ${c.id.__line__}`));
7356
+ U(c.id) === l && e.push(new g(n, t.id, `duplicate layer id "${t.id}", previously used at line ${c.id.__line__}`));
7357
7357
  }
7358
7358
  }
7359
7359
  if ("ref" in t) {
7360
7360
  ["type", "source", "source-layer", "filter", "layout"].forEach((u) => {
7361
- u in t && e.push(new v(n, t[u], `"${u}" is prohibited for ref layers`));
7361
+ u in t && e.push(new g(n, t[u], `"${u}" is prohibited for ref layers`));
7362
7362
  });
7363
7363
  let l;
7364
7364
  a.layers.forEach((u) => {
7365
7365
  U(u.id) === s && (l = u);
7366
- }), l ? l.ref ? e.push(new v(n, t.ref, "ref cannot reference another ref layer")) : i = U(l.type) : e.push(new v(n, t.ref, `ref layer "${s}" not found`));
7366
+ }), l ? l.ref ? e.push(new g(n, t.ref, "ref cannot reference another ref layer")) : i = U(l.type) : e.push(new g(n, t.ref, `ref layer "${s}" not found`));
7367
7367
  } else if (i !== "background")
7368
7368
  if (!t.source)
7369
- e.push(new v(n, t, 'missing required property "source"'));
7369
+ e.push(new g(n, t, 'missing required property "source"'));
7370
7370
  else {
7371
7371
  const l = a.sources && a.sources[t.source], u = l && U(l.type);
7372
- l ? u === "vector" && i === "raster" ? e.push(new v(n, t.source, `layer "${t.id}" requires a raster source`)) : u !== "raster-dem" && i === "hillshade" ? e.push(new v(n, t.source, `layer "${t.id}" requires a raster-dem source`)) : u !== "raster-dem" && i === "color-relief" ? e.push(new v(n, t.source, `layer "${t.id}" requires a raster-dem source`)) : u === "raster" && i !== "raster" ? e.push(new v(n, t.source, `layer "${t.id}" requires a vector source`)) : u === "vector" && !t["source-layer"] ? e.push(new v(n, t, `layer "${t.id}" must specify a "source-layer"`)) : u === "raster-dem" && i !== "hillshade" && i !== "color-relief" ? e.push(new v(n, t.source, "raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")) : i === "line" && t.paint && t.paint["line-gradient"] && (u !== "geojson" || !l.lineMetrics) && e.push(new v(n, t, `layer "${t.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)) : e.push(new v(n, t.source, `source "${t.source}" not found`));
7372
+ l ? u === "vector" && i === "raster" ? e.push(new g(n, t.source, `layer "${t.id}" requires a raster source`)) : u !== "raster-dem" && i === "hillshade" ? e.push(new g(n, t.source, `layer "${t.id}" requires a raster-dem source`)) : u !== "raster-dem" && i === "color-relief" ? e.push(new g(n, t.source, `layer "${t.id}" requires a raster-dem source`)) : u === "raster" && i !== "raster" ? e.push(new g(n, t.source, `layer "${t.id}" requires a vector source`)) : u === "vector" && !t["source-layer"] ? e.push(new g(n, t, `layer "${t.id}" must specify a "source-layer"`)) : u === "raster-dem" && i !== "hillshade" && i !== "color-relief" ? e.push(new g(n, t.source, "raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")) : i === "line" && t.paint && t.paint["line-gradient"] && (u !== "geojson" || !l.lineMetrics) && e.push(new g(n, t, `layer "${t.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)) : e.push(new g(n, t.source, `source "${t.source}" not found`));
7373
7373
  }
7374
7374
  return e = e.concat(te({
7375
7375
  key: n,
@@ -7407,7 +7407,7 @@ function qa(r) {
7407
7407
  validateSpec: l.validateSpec,
7408
7408
  objectElementValidators: {
7409
7409
  "*"(u) {
7410
- return Ba(Tt({ layerType: i }, u));
7410
+ return Ba(_t({ layerType: i }, u));
7411
7411
  }
7412
7412
  }
7413
7413
  });
@@ -7422,7 +7422,7 @@ function qa(r) {
7422
7422
  validateSpec: l.validateSpec,
7423
7423
  objectElementValidators: {
7424
7424
  "*"(u) {
7425
- return Ua(Tt({ layerType: i }, u));
7425
+ return Ua(_t({ layerType: i }, u));
7426
7426
  }
7427
7427
  }
7428
7428
  });
@@ -7432,7 +7432,7 @@ function qa(r) {
7432
7432
  }
7433
7433
  function De(r) {
7434
7434
  const e = r.value, t = r.key, n = M(e);
7435
- return n !== "string" ? [new v(t, e, `string expected, ${n} found`)] : [];
7435
+ return n !== "string" ? [new g(t, e, `string expected, ${n} found`)] : [];
7436
7436
  }
7437
7437
  function sl(r) {
7438
7438
  var e;
@@ -7442,17 +7442,17 @@ function sl(r) {
7442
7442
  if (n === void 0)
7443
7443
  return s;
7444
7444
  if (l !== "object")
7445
- return s.push(new v("source_raster_dem", n, `object expected, ${l} found`)), s;
7445
+ return s.push(new g("source_raster_dem", n, `object expected, ${l} found`)), s;
7446
7446
  const c = U(n.encoding) === "custom", p = ["redFactor", "greenFactor", "blueFactor", "baseShift"], f = r.value.encoding ? `"${r.value.encoding}"` : "Default";
7447
7447
  for (const d in n)
7448
- !c && p.includes(d) ? s.push(new v(d, n[d], `In "${t}": "${d}" is only valid when "encoding" is set to "custom". ${f} encoding found`)) : o[d] ? s = s.concat(r.validateSpec({
7448
+ !c && p.includes(d) ? s.push(new g(d, n[d], `In "${t}": "${d}" is only valid when "encoding" is set to "custom". ${f} encoding found`)) : o[d] ? s = s.concat(r.validateSpec({
7449
7449
  key: d,
7450
7450
  value: n[d],
7451
7451
  valueSpec: o[d],
7452
7452
  validateSpec: r.validateSpec,
7453
7453
  style: i,
7454
7454
  styleSpec: a
7455
- })) : s.push(new v(d, n[d], `unknown property "${d}"`));
7455
+ })) : s.push(new g(d, n[d], `unknown property "${d}"`));
7456
7456
  return s;
7457
7457
  }
7458
7458
  const Bn = {
@@ -7461,7 +7461,7 @@ const Bn = {
7461
7461
  function Ga(r) {
7462
7462
  const e = r.value, t = r.key, n = r.styleSpec, a = r.style, o = r.validateSpec;
7463
7463
  if (!e.type)
7464
- return [new v(t, e, '"type" is required')];
7464
+ return [new g(t, e, '"type" is required')];
7465
7465
  const i = U(e.type);
7466
7466
  let s;
7467
7467
  switch (i) {
@@ -7526,9 +7526,9 @@ function Ga(r) {
7526
7526
  styleSpec: n
7527
7527
  });
7528
7528
  case "canvas":
7529
- return [new v(t, null, "Please use runtime APIs to add canvas sources, rather than including them in stylesheets.", "source.canvas")];
7529
+ return [new g(t, null, "Please use runtime APIs to add canvas sources, rather than including them in stylesheets.", "source.canvas")];
7530
7530
  default:
7531
- return ut({
7531
+ return ct({
7532
7532
  key: `${t}.type`,
7533
7533
  value: e.type,
7534
7534
  valueSpec: { values: ["vector", "raster", "raster-dem", "geojson", "video", "image"] }
@@ -7552,7 +7552,7 @@ function Va(r) {
7552
7552
  if (e === void 0)
7553
7553
  return o;
7554
7554
  if (i !== "object")
7555
- return o = o.concat([new v("light", e, `object expected, ${i} found`)]), o;
7555
+ return o = o.concat([new g("light", e, `object expected, ${i} found`)]), o;
7556
7556
  for (const s in e) {
7557
7557
  const l = s.match(/^(.*)-transition$/);
7558
7558
  l && n[l[1]] && n[l[1]].transition ? o = o.concat(r.validateSpec({
@@ -7569,7 +7569,7 @@ function Va(r) {
7569
7569
  validateSpec: r.validateSpec,
7570
7570
  style: a,
7571
7571
  styleSpec: t
7572
- })) : o = o.concat([new v(s, e[s], `unknown property "${s}"`)]);
7572
+ })) : o = o.concat([new g(s, e[s], `unknown property "${s}"`)]);
7573
7573
  }
7574
7574
  return o;
7575
7575
  }
@@ -7578,7 +7578,7 @@ function Ha(r) {
7578
7578
  if (e === void 0)
7579
7579
  return [];
7580
7580
  if (o !== "object")
7581
- return [new v("sky", e, `object expected, ${o} found`)];
7581
+ return [new g("sky", e, `object expected, ${o} found`)];
7582
7582
  let i = [];
7583
7583
  for (const s in e)
7584
7584
  n[s] ? i = i.concat(r.validateSpec({
@@ -7587,7 +7587,7 @@ function Ha(r) {
7587
7587
  valueSpec: n[s],
7588
7588
  style: a,
7589
7589
  styleSpec: t
7590
- })) : i = i.concat([new v(s, e[s], `unknown property "${s}"`)]);
7590
+ })) : i = i.concat([new g(s, e[s], `unknown property "${s}"`)]);
7591
7591
  return i;
7592
7592
  }
7593
7593
  function Ka(r) {
@@ -7597,7 +7597,7 @@ function Ka(r) {
7597
7597
  if (e === void 0)
7598
7598
  return o;
7599
7599
  if (i !== "object")
7600
- return o = o.concat([new v("terrain", e, `object expected, ${i} found`)]), o;
7600
+ return o = o.concat([new g("terrain", e, `object expected, ${i} found`)]), o;
7601
7601
  for (const s in e)
7602
7602
  n[s] ? o = o.concat(r.validateSpec({
7603
7603
  key: s,
@@ -7606,7 +7606,7 @@ function Ka(r) {
7606
7606
  validateSpec: r.validateSpec,
7607
7607
  style: a,
7608
7608
  styleSpec: t
7609
- })) : o = o.concat([new v(s, e[s], `unknown property "${s}"`)]);
7609
+ })) : o = o.concat([new g(s, e[s], `unknown property "${s}"`)]);
7610
7610
  return o;
7611
7611
  }
7612
7612
  function ul(r) {
@@ -7619,7 +7619,7 @@ function pl(r) {
7619
7619
  const e = r.key, t = r.value;
7620
7620
  if (M(t) === "array") {
7621
7621
  if (t.length < 1 || t.length > 4)
7622
- return [new v(e, t, `padding requires 1 to 4 values; ${t.length} values found`)];
7622
+ return [new g(e, t, `padding requires 1 to 4 values; ${t.length} values found`)];
7623
7623
  const a = {
7624
7624
  type: "number"
7625
7625
  };
@@ -7633,7 +7633,7 @@ function pl(r) {
7633
7633
  }));
7634
7634
  return o;
7635
7635
  } else
7636
- return Qt({
7636
+ return er({
7637
7637
  key: e,
7638
7638
  value: t,
7639
7639
  valueSpec: {}
@@ -7646,7 +7646,7 @@ function fl(r) {
7646
7646
  type: "number"
7647
7647
  };
7648
7648
  if (t.length < 1)
7649
- return [new v(e, t, "array length at least 1 expected, length 0 found")];
7649
+ return [new g(e, t, "array length at least 1 expected, length 0 found")];
7650
7650
  let o = [];
7651
7651
  for (let i = 0; i < t.length; i++)
7652
7652
  o = o.concat(r.validateSpec({
@@ -7657,7 +7657,7 @@ function fl(r) {
7657
7657
  }));
7658
7658
  return o;
7659
7659
  } else
7660
- return Qt({
7660
+ return er({
7661
7661
  key: e,
7662
7662
  value: t,
7663
7663
  valueSpec: {}
@@ -7667,7 +7667,7 @@ function dl(r) {
7667
7667
  const e = r.key, t = r.value;
7668
7668
  if (M(t) === "array") {
7669
7669
  if (t.length < 1)
7670
- return [new v(e, t, "array length at least 1 expected, length 0 found")];
7670
+ return [new g(e, t, "array length at least 1 expected, length 0 found")];
7671
7671
  let a = [];
7672
7672
  for (let o = 0; o < t.length; o++)
7673
7673
  a = a.concat(Pr({
@@ -7684,10 +7684,10 @@ function dl(r) {
7684
7684
  function hl(r) {
7685
7685
  const e = r.key, t = r.value, n = M(t), a = r.styleSpec;
7686
7686
  if (n !== "array" || t.length < 1 || t.length % 2 !== 0)
7687
- return [new v(e, t, "variableAnchorOffsetCollection requires a non-empty array of even length")];
7687
+ return [new g(e, t, "variableAnchorOffsetCollection requires a non-empty array of even length")];
7688
7688
  let o = [];
7689
7689
  for (let i = 0; i < t.length; i += 2)
7690
- o = o.concat(ut({
7690
+ o = o.concat(ct({
7691
7691
  key: `${e}[${i}]`,
7692
7692
  value: t[i],
7693
7693
  valueSpec: a.layout_symbol["text-anchor"]
@@ -7710,7 +7710,7 @@ function Xa(r) {
7710
7710
  if (Array.isArray(t)) {
7711
7711
  const a = [], o = [];
7712
7712
  for (const i in t) {
7713
- t[i].id && a.includes(t[i].id) && e.push(new v(n, t, `all the sprites' ids must be unique, but ${t[i].id} is duplicated`)), a.push(t[i].id), t[i].url && o.includes(t[i].url) && e.push(new v(n, t, `all the sprites' URLs must be unique, but ${t[i].url} is duplicated`)), o.push(t[i].url);
7713
+ t[i].id && a.includes(t[i].id) && e.push(new g(n, t, `all the sprites' ids must be unique, but ${t[i].id} is duplicated`)), a.push(t[i].id), t[i].url && o.includes(t[i].url) && e.push(new g(n, t, `all the sprites' URLs must be unique, but ${t[i].url} is duplicated`)), o.push(t[i].url);
7714
7714
  const s = {
7715
7715
  id: {
7716
7716
  type: "string",
@@ -7740,7 +7740,7 @@ function yl(r) {
7740
7740
  if (e === void 0)
7741
7741
  return [];
7742
7742
  if (o !== "object")
7743
- return [new v("projection", e, `object expected, ${o} found`)];
7743
+ return [new g("projection", e, `object expected, ${o} found`)];
7744
7744
  let i = [];
7745
7745
  for (const s in e)
7746
7746
  n[s] ? i = i.concat(r.validateSpec({
@@ -7749,7 +7749,7 @@ function yl(r) {
7749
7749
  valueSpec: n[s],
7750
7750
  style: a,
7751
7751
  styleSpec: t
7752
- })) : i = i.concat([new v(s, e[s], `unknown property "${s}"`)]);
7752
+ })) : i = i.concat([new g(s, e[s], `unknown property "${s}"`)]);
7753
7753
  return i;
7754
7754
  }
7755
7755
  function ml(r) {
@@ -7757,7 +7757,7 @@ function ml(r) {
7757
7757
  let t = r.value;
7758
7758
  t = t instanceof String ? t.valueOf() : t;
7759
7759
  const n = M(t);
7760
- return n === "array" && !vl(t) && !gl(t) ? [new v(e, t, `projection expected, invalid array ${JSON.stringify(t)} found`)] : ["array", "string"].includes(n) ? [] : [new v(e, t, `projection expected, invalid type "${n}" found`)];
7760
+ return n === "array" && !vl(t) && !gl(t) ? [new g(e, t, `projection expected, invalid array ${JSON.stringify(t)} found`)] : ["array", "string"].includes(n) ? [] : [new g(e, t, `projection expected, invalid type "${n}" found`)];
7761
7761
  }
7762
7762
  function gl(r) {
7763
7763
  return !!["interpolate", "step", "literal"].includes(r[0]);
@@ -7770,7 +7770,7 @@ function bl(r) {
7770
7770
  }
7771
7771
  function Za(r) {
7772
7772
  return bl(r.value) ? [] : [
7773
- new v(r.key, r.value, `object expected, ${M(r.value)} found`)
7773
+ new g(r.key, r.value, `object expected, ${M(r.value)} found`)
7774
7774
  ];
7775
7775
  }
7776
7776
  const qn = {
@@ -7779,10 +7779,10 @@ const qn = {
7779
7779
  },
7780
7780
  array: on,
7781
7781
  boolean: il,
7782
- number: Qt,
7782
+ number: er,
7783
7783
  color: Pr,
7784
7784
  constants: Oa,
7785
- enum: ut,
7785
+ enum: ct,
7786
7786
  filter: sn,
7787
7787
  function: ja,
7788
7788
  layer: qa,
@@ -7803,25 +7803,25 @@ const qn = {
7803
7803
  sprite: Xa,
7804
7804
  state: Za
7805
7805
  };
7806
- function $t(r) {
7806
+ function Ot(r) {
7807
7807
  const e = r.value, t = r.valueSpec, n = r.styleSpec;
7808
- return r.validateSpec = $t, t.expression && nn(U(e)) ? ja(r) : t.expression && za(Ne(e)) ? Ke(r) : t.type && qn[t.type] ? qn[t.type](r) : te(Tt({}, r, {
7808
+ return r.validateSpec = Ot, t.expression && nn(U(e)) ? ja(r) : t.expression && za(Ne(e)) ? Ke(r) : t.type && qn[t.type] ? qn[t.type](r) : te(_t({}, r, {
7809
7809
  valueSpec: t.type ? n[t.type] : t
7810
7810
  }));
7811
7811
  }
7812
7812
  function Ya(r) {
7813
7813
  const e = r.value, t = r.key, n = De(r);
7814
- return n.length || (e.indexOf("{fontstack}") === -1 && n.push(new v(t, e, '"glyphs" url must include a "{fontstack}" token')), e.indexOf("{range}") === -1 && n.push(new v(t, e, '"glyphs" url must include a "{range}" token'))), n;
7814
+ return n.length || (e.indexOf("{fontstack}") === -1 && n.push(new g(t, e, '"glyphs" url must include a "{fontstack}" token')), e.indexOf("{range}") === -1 && n.push(new g(t, e, '"glyphs" url must include a "{range}" token'))), n;
7815
7815
  }
7816
7816
  function W(r, e = Ki) {
7817
7817
  let t = [];
7818
- return t = t.concat($t({
7818
+ return t = t.concat(Ot({
7819
7819
  key: "",
7820
7820
  value: r,
7821
7821
  valueSpec: e.$root,
7822
7822
  styleSpec: e,
7823
7823
  style: r,
7824
- validateSpec: $t,
7824
+ validateSpec: Ot,
7825
7825
  objectElementValidators: {
7826
7826
  glyphs: Ya,
7827
7827
  "*"() {
@@ -7848,7 +7848,7 @@ function ce(r) {
7848
7848
  return function(e) {
7849
7849
  return r({
7850
7850
  ...e,
7851
- validateSpec: $t
7851
+ validateSpec: Ot
7852
7852
  });
7853
7853
  };
7854
7854
  }
@@ -7863,7 +7863,7 @@ function pe(r) {
7863
7863
  function Gn(r) {
7864
7864
  if (!r)
7865
7865
  return {
7866
- style: Qe[nr[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),
7866
+ style: et[ar[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),
7867
7867
  requiresUrlMonitoring: !1,
7868
7868
  // default styles don't require URL monitoring
7869
7869
  isFallback: !0
@@ -7875,7 +7875,7 @@ function Gn(r) {
7875
7875
  requiresUrlMonitoring: !1,
7876
7876
  isFallback: !1
7877
7877
  } : t.isValidJSON ? {
7878
- style: Qe[nr[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),
7878
+ style: et[ar[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),
7879
7879
  requiresUrlMonitoring: !1,
7880
7880
  // default styles don't require URL monitoring
7881
7881
  isFallback: !0
@@ -7902,7 +7902,7 @@ function Gn(r) {
7902
7902
  requiresUrlMonitoring: !1,
7903
7903
  isFallback: !1
7904
7904
  } : {
7905
- style: Qe[nr[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),
7905
+ style: et[ar[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),
7906
7906
  requiresUrlMonitoring: !1,
7907
7907
  // default styles don't require URL monitoring
7908
7908
  isFallback: !0
@@ -7931,7 +7931,7 @@ function Sl(r) {
7931
7931
  };
7932
7932
  }
7933
7933
  }
7934
- function ve(r, e, t) {
7934
+ function ge(r, e, t) {
7935
7935
  const n = window.document.createElement(r);
7936
7936
  return e !== void 0 && (n.className = e), t && t.appendChild(n), n;
7937
7937
  }
@@ -7946,7 +7946,7 @@ class xl {
7946
7946
  Vo(["_toggleTerrain", "_updateTerrainIcon"], this);
7947
7947
  }
7948
7948
  onAdd(e) {
7949
- return this._map = e, this._container = ve("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._terrainButton = ve("button", "maplibregl-ctrl-terrain", this._container), ve("span", "maplibregl-ctrl-icon", this._terrainButton).setAttribute("aria-hidden", "true"), this._terrainButton.type = "button", this._terrainButton.addEventListener("click", this._toggleTerrain), this._updateTerrainIcon(), this._map.on("terrain", this._updateTerrainIcon), this._container;
7949
+ return this._map = e, this._container = ge("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._terrainButton = ge("button", "maplibregl-ctrl-terrain", this._container), ge("span", "maplibregl-ctrl-icon", this._terrainButton).setAttribute("aria-hidden", "true"), this._terrainButton.type = "button", this._terrainButton.addEventListener("click", this._toggleTerrain), this._updateTerrainIcon(), this._map.on("terrain", this._updateTerrainIcon), this._container;
7950
7950
  }
7951
7951
  onRemove() {
7952
7952
  ln(this._container), this._map.off("terrain", this._updateTerrainIcon), this._map = void 0;
@@ -8023,7 +8023,7 @@ class Ll extends ni {
8023
8023
  const n = this._map._getUIString("GeolocateControl.FindMyLocation");
8024
8024
  this._geolocateButton.disabled = !1, this._geolocateButton.title = n, this._geolocateButton.setAttribute("aria-label", n);
8025
8025
  }
8026
- this.options.trackUserLocation && (this._geolocateButton.setAttribute("aria-pressed", "false"), this._watchState = "OFF"), this.options.showUserLocation && (this._dotElement = ve("div", "maplibregl-user-location-dot"), this._userLocationDotMarker = new Vn({ element: this._dotElement }), this._circleElement = ve("div", "maplibregl-user-location-accuracy-circle"), this._accuracyCircleMarker = new Vn({
8026
+ this.options.trackUserLocation && (this._geolocateButton.setAttribute("aria-pressed", "false"), this._watchState = "OFF"), this.options.showUserLocation && (this._dotElement = ge("div", "maplibregl-user-location-dot"), this._userLocationDotMarker = new Vn({ element: this._dotElement }), this._circleElement = ge("div", "maplibregl-user-location-accuracy-circle"), this._accuracyCircleMarker = new Vn({
8027
8027
  element: this._circleElement,
8028
8028
  pitchAlignment: "map"
8029
8029
  }), this.options.trackUserLocation && (this._watchState = "OFF"), this._map.on("move", this._onZoom)), this._geolocateButton.addEventListener("click", this.trigger.bind(this)), this._setup = !0, this.options.trackUserLocation && this._map.on("moveend", (n) => {
@@ -8065,17 +8065,17 @@ class Ll extends ni {
8065
8065
  }
8066
8066
  }
8067
8067
  }
8068
- var K, oe, xe, ke, Z, pt, q, Ja, J, Qa;
8069
- class dr {
8068
+ var K, oe, Se, xe, Z, ft, q, Ja, J, Qa;
8069
+ class hr {
8070
8070
  constructor(e, t) {
8071
- we(this, q);
8072
- we(this, K);
8071
+ be(this, q);
8072
+ be(this, K);
8073
8073
  S(this, "map");
8074
- we(this, oe);
8075
- we(this, xe);
8076
- we(this, ke);
8077
- we(this, Z, !1);
8078
- we(this, pt);
8074
+ be(this, oe);
8075
+ be(this, Se);
8076
+ be(this, xe);
8077
+ be(this, Z, !1);
8078
+ be(this, ft);
8079
8079
  e.style !== void 0 && _e(this, Z, !0), _e(this, K, {
8080
8080
  // set defaults
8081
8081
  zoomAdjust: -4,
@@ -8129,22 +8129,22 @@ class dr {
8129
8129
  return P(this, Z) || this.map.setGlyphs(e, t), H(this, q, J).call(this), this;
8130
8130
  }
8131
8131
  onAdd(e) {
8132
- _e(this, oe, e), _e(this, xe, ve("div", "maplibregl-ctrl maplibregl-ctrl-group"));
8132
+ _e(this, oe, e), _e(this, Se, ge("div", "maplibregl-ctrl maplibregl-ctrl-group"));
8133
8133
  for (const [t, n] of Object.entries(P(this, K).containerStyle))
8134
- P(this, xe).style.setProperty(t, n);
8135
- return P(this, K).container = P(this, xe), P(this, K).zoom = e.getZoom() + P(this, K).zoomAdjust, this.map = new Ru(P(this, K)), this.map.once("style.load", () => {
8134
+ P(this, Se).style.setProperty(t, n);
8135
+ return P(this, K).container = P(this, Se), P(this, K).zoom = e.getZoom() + P(this, K).zoomAdjust, this.map = new Ru(P(this, K)), this.map.once("style.load", () => {
8136
8136
  this.map.resize();
8137
8137
  }), this.map.once("load", () => {
8138
- H(this, q, Ja).call(this, P(this, K).parentRect), _e(this, pt, H(this, q, Qa).call(this));
8139
- }), P(this, xe);
8138
+ H(this, q, Ja).call(this, P(this, K).parentRect), _e(this, ft, H(this, q, Qa).call(this));
8139
+ }), P(this, Se);
8140
8140
  }
8141
8141
  onRemove() {
8142
8142
  var e;
8143
- (e = P(this, pt)) == null || e.call(this), ln(P(this, xe));
8143
+ (e = P(this, ft)) == null || e.call(this), ln(P(this, Se));
8144
8144
  }
8145
8145
  }
8146
- K = new WeakMap(), oe = new WeakMap(), xe = new WeakMap(), ke = new WeakMap(), Z = new WeakMap(), pt = new WeakMap(), q = new WeakSet(), Ja = function(e) {
8147
- e === void 0 || e.linePaint === void 0 && e.fillPaint === void 0 || (_e(this, ke, {
8146
+ K = new WeakMap(), oe = new WeakMap(), Se = new WeakMap(), xe = new WeakMap(), Z = new WeakMap(), ft = new WeakMap(), q = new WeakSet(), Ja = function(e) {
8147
+ e === void 0 || e.linePaint === void 0 && e.fillPaint === void 0 || (_e(this, xe, {
8148
8148
  type: "Feature",
8149
8149
  properties: {
8150
8150
  name: "parentRect"
@@ -8155,7 +8155,7 @@ K = new WeakMap(), oe = new WeakMap(), xe = new WeakMap(), ke = new WeakMap(), Z
8155
8155
  }
8156
8156
  }), this.map.addSource("parentRect", {
8157
8157
  type: "geojson",
8158
- data: P(this, ke)
8158
+ data: P(this, xe)
8159
8159
  }), (e.lineLayout !== void 0 || e.linePaint !== void 0) && this.map.addLayer({
8160
8160
  id: "parentRectOutline",
8161
8161
  type: "line",
@@ -8181,11 +8181,11 @@ K = new WeakMap(), oe = new WeakMap(), xe = new WeakMap(), ke = new WeakMap(), Z
8181
8181
  }
8182
8182
  }), H(this, q, J).call(this));
8183
8183
  }, J = function() {
8184
- if (P(this, ke) === void 0) return;
8184
+ if (P(this, xe) === void 0) return;
8185
8185
  const { devicePixelRatio: e } = window, t = P(this, oe).getCanvas(), n = t.width / e, a = t.height / e, o = P(this, oe).unproject.bind(P(this, oe)), i = o([0, 0]), s = o([n, 0]), l = o([0, a]), u = o([n, a]);
8186
- P(this, ke).geometry.coordinates = [[l.toArray(), u.toArray(), s.toArray(), i.toArray(), l.toArray()]];
8186
+ P(this, xe).geometry.coordinates = [[l.toArray(), u.toArray(), s.toArray(), i.toArray(), l.toArray()]];
8187
8187
  const c = this.map.getSource("parentRect");
8188
- c !== void 0 && c.setData(P(this, ke));
8188
+ c !== void 0 && c.setData(P(this, xe));
8189
8189
  }, Qa = function() {
8190
8190
  const { pitchAdjust: e } = P(this, K), t = () => {
8191
8191
  i("parent");
@@ -8216,7 +8216,7 @@ class Al {
8216
8216
  S(this, "projectionButton");
8217
8217
  }
8218
8218
  onAdd(e) {
8219
- return this.map = e, this.container = ve("div", "maplibregl-ctrl maplibregl-ctrl-group"), this.projectionButton = ve("button", "maplibregl-ctrl-projection", this.container), ve("span", "maplibregl-ctrl-icon", this.projectionButton).setAttribute("aria-hidden", "true"), this.projectionButton.type = "button", this.projectionButton.addEventListener("click", this.toggleProjection.bind(this)), e.on("projectiontransition", this.updateProjectionIcon.bind(this)), this.updateProjectionIcon(), this.container;
8219
+ return this.map = e, this.container = ge("div", "maplibregl-ctrl maplibregl-ctrl-group"), this.projectionButton = ge("button", "maplibregl-ctrl-projection", this.container), ge("span", "maplibregl-ctrl-icon", this.projectionButton).setAttribute("aria-hidden", "true"), this.projectionButton.type = "button", this.projectionButton.addEventListener("click", this.toggleProjection.bind(this)), e.on("projectiontransition", this.updateProjectionIcon.bind(this)), this.updateProjectionIcon(), this.container;
8220
8220
  }
8221
8221
  onRemove() {
8222
8222
  ln(this.container), this.map.off("projectiontransition", this.updateProjectionIcon), this.map = void 0;
@@ -8228,7 +8228,7 @@ class Al {
8228
8228
  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");
8229
8229
  }
8230
8230
  }
8231
- const El = "@maptiler/sdk", Tl = "3.6.2-rc1", _l = "The Javascript & TypeScript map SDK tailored for MapTiler Cloud", Il = "MapTiler", Ml = "dist/maptiler-sdk.mjs", Pl = "dist/maptiler-sdk.d.ts", Rl = "dist/maptiler-sdk.css", zl = "module", Fl = "dist/maptiler-sdk.mjs", $l = { ".": { 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" } }, Ol = ["maptiler", "map", "sdk", "webmap", "cloud", "webGL", "maplibre"], jl = "https://docs.maptiler.com/sdk-js/", Nl = "BSD-3-Clause", Dl = { type: "git", url: "https://github.com/maptiler/maptiler-sdk-js.git" }, Ul = { prepare: "husky", doc: "rm -rf docs/* && typedoc --out docs && cp -r images docs/", ncu: "npx npm-check-updates", lint: "tsc --noEmit && eslint src", "lint:fix": "tsc --noEmit && 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: "npm run build-css && vite -c vite.config-dev.ts", "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" }, Bl = { "@canvas/image-data": "^1.0.0", "@eslint/js": "^9.21.0", "@types/color-convert": "^2.0.4", "@types/color-name": "^2.0.0", "@types/stats.js": "^0.17.4", "@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", jiti: "^2.4.2", "lint-staged": "^15.4.3", prettier: "3.5.2", "stats.js": "^0.17.0", 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" }, ql = { "@maplibre/maplibre-gl-style-spec": "~23.3.0", "@maptiler/client": "~2.4.0", events: "^3.3.0", "gl-matrix": "^3.4.3", "js-base64": "^3.7.7", "maplibre-gl": "~5.6.0", uuid: "^11.0.5" }, Gl = {
8231
+ const El = "@maptiler/sdk", Tl = "3.6.2-rc3", _l = "The Javascript & TypeScript map SDK tailored for MapTiler Cloud", Il = "MapTiler", Ml = "dist/maptiler-sdk.mjs", Pl = "dist/maptiler-sdk.d.ts", Rl = "dist/maptiler-sdk.css", zl = "module", Fl = "dist/maptiler-sdk.mjs", $l = { ".": { 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" } }, Ol = ["maptiler", "map", "sdk", "webmap", "cloud", "webGL", "maplibre"], jl = "https://docs.maptiler.com/sdk-js/", Nl = "BSD-3-Clause", Dl = { type: "git", url: "https://github.com/maptiler/maptiler-sdk-js.git" }, Ul = { prepare: "husky", doc: "rm -rf docs/* && typedoc --out docs && cp -r images docs/", ncu: "npx npm-check-updates", lint: "tsc --noEmit && eslint src", "lint:fix": "tsc --noEmit && 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: "npm run build-css && vite -c vite.config-dev.ts", "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" }, Bl = { "@canvas/image-data": "^1.0.0", "@eslint/js": "^9.21.0", "@types/color-convert": "^2.0.4", "@types/color-name": "^2.0.0", "@types/stats.js": "^0.17.4", "@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", jiti: "^2.4.2", "lint-staged": "^15.4.3", prettier: "3.5.2", "stats.js": "^0.17.0", 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" }, ql = { "@maplibre/maplibre-gl-style-spec": "~23.3.0", "@maptiler/client": "~2.4.0", events: "^3.3.0", "gl-matrix": "^3.4.3", "js-base64": "^3.7.7", "maplibre-gl": "~5.6.0", uuid: "^11.0.5" }, Gl = {
8232
8232
  name: El,
8233
8233
  version: Tl,
8234
8234
  description: _l,
@@ -8285,22 +8285,22 @@ class Vl {
8285
8285
  return e.searchParams.append("sdk", Gl.version), e.searchParams.append("key", D.apiKey), e.searchParams.append("mtsid", Nr), e.searchParams.append("session", D.session ? "1" : "0"), e.searchParams.append("caching", D.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;
8286
8286
  }
8287
8287
  }
8288
- var ct = typeof Float32Array < "u" ? Float32Array : Array;
8288
+ var pt = typeof Float32Array < "u" ? Float32Array : Array;
8289
8289
  Math.hypot || (Math.hypot = function() {
8290
8290
  for (var r = 0, e = arguments.length; e--; )
8291
8291
  r += arguments[e] * arguments[e];
8292
8292
  return Math.sqrt(r);
8293
8293
  });
8294
- function rt() {
8295
- var r = new ct(16);
8296
- return ct != Float32Array && (r[1] = 0, r[2] = 0, r[3] = 0, r[4] = 0, r[6] = 0, r[7] = 0, r[8] = 0, r[9] = 0, r[11] = 0, r[12] = 0, r[13] = 0, r[14] = 0), r[0] = 1, r[5] = 1, r[10] = 1, r[15] = 1, r;
8294
+ function nt() {
8295
+ var r = new pt(16);
8296
+ return pt != Float32Array && (r[1] = 0, r[2] = 0, r[3] = 0, r[4] = 0, r[6] = 0, r[7] = 0, r[8] = 0, r[9] = 0, r[11] = 0, r[12] = 0, r[13] = 0, r[14] = 0), r[0] = 1, r[5] = 1, r[10] = 1, r[15] = 1, r;
8297
8297
  }
8298
8298
  function Hl(r, e, t, n, a, o, i, s, l, u, c, p, f, d, h, y, m) {
8299
8299
  return r[0] = e, r[1] = t, r[2] = n, r[3] = a, r[4] = o, r[5] = i, r[6] = s, r[7] = l, r[8] = u, r[9] = c, r[10] = p, r[11] = f, r[12] = d, r[13] = h, r[14] = y, r[15] = m, r;
8300
8300
  }
8301
8301
  function Kl(r, e, t) {
8302
- var n = e[0], a = e[1], o = e[2], i = e[3], s = e[4], l = e[5], u = e[6], c = e[7], p = e[8], f = e[9], d = e[10], h = e[11], y = e[12], m = e[13], b = e[14], g = e[15], x = t[0], A = t[1], L = t[2], z = t[3];
8303
- return r[0] = x * n + A * s + L * p + z * y, r[1] = x * a + A * l + L * f + z * m, r[2] = x * o + A * u + L * d + z * b, r[3] = x * i + A * c + L * h + z * g, x = t[4], A = t[5], L = t[6], z = t[7], r[4] = x * n + A * s + L * p + z * y, r[5] = x * a + A * l + L * f + z * m, r[6] = x * o + A * u + L * d + z * b, r[7] = x * i + A * c + L * h + z * g, x = t[8], A = t[9], L = t[10], z = t[11], r[8] = x * n + A * s + L * p + z * y, r[9] = x * a + A * l + L * f + z * m, r[10] = x * o + A * u + L * d + z * b, r[11] = x * i + A * c + L * h + z * g, x = t[12], A = t[13], L = t[14], z = t[15], r[12] = x * n + A * s + L * p + z * y, r[13] = x * a + A * l + L * f + z * m, r[14] = x * o + A * u + L * d + z * b, r[15] = x * i + A * c + L * h + z * g, r;
8302
+ var n = e[0], a = e[1], o = e[2], i = e[3], s = e[4], l = e[5], u = e[6], c = e[7], p = e[8], f = e[9], d = e[10], h = e[11], y = e[12], m = e[13], w = e[14], v = e[15], x = t[0], A = t[1], L = t[2], $ = t[3];
8303
+ return r[0] = x * n + A * s + L * p + $ * y, r[1] = x * a + A * l + L * f + $ * m, r[2] = x * o + A * u + L * d + $ * w, r[3] = x * i + A * c + L * h + $ * v, x = t[4], A = t[5], L = t[6], $ = t[7], r[4] = x * n + A * s + L * p + $ * y, r[5] = x * a + A * l + L * f + $ * m, r[6] = x * o + A * u + L * d + $ * w, r[7] = x * i + A * c + L * h + $ * v, x = t[8], A = t[9], L = t[10], $ = t[11], r[8] = x * n + A * s + L * p + $ * y, r[9] = x * a + A * l + L * f + $ * m, r[10] = x * o + A * u + L * d + $ * w, r[11] = x * i + A * c + L * h + $ * v, x = t[12], A = t[13], L = t[14], $ = t[15], r[12] = x * n + A * s + L * p + $ * y, r[13] = x * a + A * l + L * f + $ * m, r[14] = x * o + A * u + L * d + $ * w, r[15] = x * i + A * c + L * h + $ * v, r;
8304
8304
  }
8305
8305
  function Xl(r, e, t) {
8306
8306
  var n = t[0], a = t[1], o = t[2];
@@ -8323,15 +8323,15 @@ function Yl(r, e, t, n, a) {
8323
8323
  return r[0] = o / t, r[1] = 0, r[2] = 0, r[3] = 0, r[4] = 0, r[5] = o, r[6] = 0, r[7] = 0, r[8] = 0, r[9] = 0, r[11] = -1, r[12] = 0, r[13] = 0, r[15] = 0, a != null && a !== 1 / 0 ? (i = 1 / (n - a), r[10] = (a + n) * i, r[14] = 2 * a * n * i) : (r[10] = -1, r[14] = -2 * n), r;
8324
8324
  }
8325
8325
  var Wl = Yl;
8326
- function Lt() {
8327
- var r = new ct(3);
8328
- return ct != Float32Array && (r[0] = 0, r[1] = 0, r[2] = 0), r;
8326
+ function At() {
8327
+ var r = new pt(3);
8328
+ return pt != Float32Array && (r[0] = 0, r[1] = 0, r[2] = 0), r;
8329
8329
  }
8330
8330
  function Jl(r, e, t) {
8331
- var n = new ct(3);
8331
+ var n = new pt(3);
8332
8332
  return n[0] = r, n[1] = e, n[2] = t, n;
8333
8333
  }
8334
- function hr(r, e) {
8334
+ function yr(r, e) {
8335
8335
  var t = e[0], n = e[1], a = e[2], o = t * t + n * n + a * a;
8336
8336
  return o > 0 && (o = 1 / Math.sqrt(o)), r[0] = e[0] * o, r[1] = e[1] * o, r[2] = e[2] * o, r;
8337
8337
  }
@@ -8340,7 +8340,7 @@ function Zn(r, e, t) {
8340
8340
  return r[0] = a * l - o * s, r[1] = o * i - n * l, r[2] = n * s - a * i, r;
8341
8341
  }
8342
8342
  (function() {
8343
- var r = Lt();
8343
+ var r = At();
8344
8344
  return function(e, t, n, a, o, i) {
8345
8345
  var s, l;
8346
8346
  for (t || (t = 3), n || (n = 0), a ? l = Math.min(a * t + n, e.length) : l = e.length, s = n; s < l; s += t)
@@ -8351,9 +8351,9 @@ function Zn(r, e, t) {
8351
8351
  function Ql(r) {
8352
8352
  return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
8353
8353
  }
8354
- var yr, Yn;
8354
+ var mr, Yn;
8355
8355
  function eu() {
8356
- return Yn || (Yn = 1, yr = {
8356
+ return Yn || (Yn = 1, mr = {
8357
8357
  aliceblue: [240, 248, 255],
8358
8358
  antiquewhite: [250, 235, 215],
8359
8359
  aqua: [0, 255, 255],
@@ -8502,11 +8502,11 @@ function eu() {
8502
8502
  whitesmoke: [245, 245, 245],
8503
8503
  yellow: [255, 255, 0],
8504
8504
  yellowgreen: [154, 205, 50]
8505
- }), yr;
8505
+ }), mr;
8506
8506
  }
8507
- var mr, Wn;
8507
+ var gr, Wn;
8508
8508
  function eo() {
8509
- if (Wn) return mr;
8509
+ if (Wn) return gr;
8510
8510
  Wn = 1;
8511
8511
  const r = eu(), e = {};
8512
8512
  for (const a of Object.keys(r))
@@ -8528,7 +8528,7 @@ function eo() {
8528
8528
  apple: { channels: 3, labels: ["r16", "g16", "b16"] },
8529
8529
  gray: { channels: 1, labels: ["gray"] }
8530
8530
  };
8531
- mr = t;
8531
+ gr = t;
8532
8532
  for (const a of Object.keys(t)) {
8533
8533
  if (!("channels" in t[a]))
8534
8534
  throw new Error("missing channels property: " + a);
@@ -8805,11 +8805,11 @@ function eo() {
8805
8805
  return "000000".substring(s.length) + s;
8806
8806
  }, t.rgb.gray = function(a) {
8807
8807
  return [(a[0] + a[1] + a[2]) / 3 / 255 * 100];
8808
- }, mr;
8808
+ }, gr;
8809
8809
  }
8810
- var gr, Jn;
8810
+ var vr, Jn;
8811
8811
  function tu() {
8812
- if (Jn) return gr;
8812
+ if (Jn) return vr;
8813
8813
  Jn = 1;
8814
8814
  const r = eo();
8815
8815
  function e() {
@@ -8846,18 +8846,18 @@ function tu() {
8846
8846
  s.unshift(i[u].parent), l = n(r[i[u].parent][u], l), u = i[u].parent;
8847
8847
  return l.conversion = s, l;
8848
8848
  }
8849
- return gr = function(o) {
8849
+ return vr = function(o) {
8850
8850
  const i = t(o), s = {}, l = Object.keys(i);
8851
8851
  for (let u = l.length, c = 0; c < u; c++) {
8852
8852
  const p = l[c];
8853
8853
  i[p].parent !== null && (s[p] = a(p, i));
8854
8854
  }
8855
8855
  return s;
8856
- }, gr;
8856
+ }, vr;
8857
8857
  }
8858
- var vr, Qn;
8858
+ var br, Qn;
8859
8859
  function ru() {
8860
- if (Qn) return vr;
8860
+ if (Qn) return br;
8861
8861
  Qn = 1;
8862
8862
  const r = eo(), e = tu(), t = {}, n = Object.keys(r);
8863
8863
  function a(i) {
@@ -8888,7 +8888,7 @@ function ru() {
8888
8888
  const c = s[u];
8889
8889
  t[i][u] = o(c), t[i][u].raw = a(c);
8890
8890
  });
8891
- }), vr = t, vr;
8891
+ }), br = t, br;
8892
8892
  }
8893
8893
  var nu = ru();
8894
8894
  const au = /* @__PURE__ */ Ql(nu);
@@ -8939,7 +8939,7 @@ function to({
8939
8939
  indexBufferLength: f
8940
8940
  };
8941
8941
  }
8942
- function At(r) {
8942
+ function Et(r) {
8943
8943
  if (!r)
8944
8944
  return [1, 1, 1, 0];
8945
8945
  if (r === "transparent")
@@ -9077,10 +9077,10 @@ const Oe = {
9077
9077
  }
9078
9078
  };
9079
9079
  var Me = /* @__PURE__ */ ((r) => (r.POSITIVE_X = "pX", r.NEGATIVE_X = "nX", r.POSITIVE_Y = "pY", r.NEGATIVE_Y = "nY", r.POSITIVE_Z = "pZ", r.NEGATIVE_Z = "nZ", r))(Me || {});
9080
- let xt, ra, na;
9080
+ let kt, ra, na;
9081
9081
  function vu({ gl: r, faces: e, onReady: t, forceRefresh: n }) {
9082
- xt && !n && na === JSON.stringify(e) && t(xt, ra), na = JSON.stringify(e);
9083
- const a = xt ?? r.createTexture();
9082
+ kt && !n && na === JSON.stringify(e) && t(kt, ra), na = JSON.stringify(e);
9083
+ const a = kt ?? r.createTexture();
9084
9084
  if (r.bindTexture(r.TEXTURE_CUBE_MAP, a), !e) {
9085
9085
  console.warn("[CubemapLayer][loadCubemapTexture]: Faces are null");
9086
9086
  return;
@@ -9117,7 +9117,7 @@ function vu({ gl: r, faces: e, onReady: t, forceRefresh: n }) {
9117
9117
  }
9118
9118
  r.bindTexture(r.TEXTURE_CUBE_MAP, a), r.generateMipmap(r.TEXTURE_CUBE_MAP), r.texParameteri(r.TEXTURE_CUBE_MAP, r.TEXTURE_MIN_FILTER, r.LINEAR_MIPMAP_LINEAR), r.texParameteri(r.TEXTURE_CUBE_MAP, r.TEXTURE_MAG_FILTER, r.LINEAR);
9119
9119
  const l = s.map((u) => u.image);
9120
- t(a, l), ra = l, xt = a;
9120
+ t(a, l), ra = l, kt = a;
9121
9121
  }).catch((s) => {
9122
9122
  console.error("[CubemapLayer][loadCubemapTexture]: Error loading cubemap texture", s);
9123
9123
  });
@@ -9139,13 +9139,13 @@ function bu(r, e) {
9139
9139
  }
9140
9140
  function wu(r, e, t) {
9141
9141
  return [
9142
- Le(r[0], e[0], t),
9143
- Le(r[1], e[1], t),
9144
- Le(r[2], e[2], t),
9145
- Le(r[3], e[3], t)
9142
+ Ce(r[0], e[0], t),
9143
+ Ce(r[1], e[1], t),
9144
+ Ce(r[2], e[2], t),
9145
+ Ce(r[3], e[3], t)
9146
9146
  ];
9147
9147
  }
9148
- function Le(r, e, t) {
9148
+ function Ce(r, e, t) {
9149
9149
  return r + (e - r) * t;
9150
9150
  }
9151
9151
  const Ue = "https://api.maptiler.com/resources/space", Su = ["vertexPosition"], xu = ["projectionMatrix", "modelViewMatrix", "cubeSampler", "bgColor", "fadeOpacity"], aa = "%USE_TEXTURE_MACRO_MARKER%", ku = "#define USE_TEXTURE", Cu = Oe.stars;
@@ -9170,7 +9170,7 @@ function Lu(r, e) {
9170
9170
  color: t.color ?? Oe[n].color ?? "hsl(233,100%,92%)"
9171
9171
  };
9172
9172
  }
9173
- class br {
9173
+ class wr {
9174
9174
  /**
9175
9175
  * Creates a new instance of CubemapLayer
9176
9176
  *
@@ -9292,7 +9292,7 @@ class br {
9292
9292
  */
9293
9293
  S(this, "imageFadeInDelta", 0);
9294
9294
  const t = Lu(e, Cu);
9295
- this.options = t, this.currentFacesDefinitionKey = JSON.stringify(t.faces ?? t.preset ?? t.path), this.bgColor = [0, 0, 0, 0], this.targetBgColor = At(t.color), this.faces = oa(t), this.useCubemapTexture = this.faces !== null;
9295
+ this.options = t, this.currentFacesDefinitionKey = JSON.stringify(t.faces ?? t.preset ?? t.path), this.bgColor = [0, 0, 0, 0], this.targetBgColor = Et(t.color), this.faces = oa(t), this.useCubemapTexture = this.faces !== null;
9296
9296
  }
9297
9297
  /**
9298
9298
  * Updates the cubemap object with the current faces and shader configuration.
@@ -9388,7 +9388,7 @@ class br {
9388
9388
  return;
9389
9389
  this.imageIsAnimating = !0;
9390
9390
  const e = () => {
9391
- if (this.imageFadeInDelta = Math.min(this.imageFadeInDelta + 0.05, 1), this.currentFadeOpacity = Le(0, 1, this.imageFadeInDelta), this.map.triggerRepaint(), this.imageFadeInDelta < 1) {
9391
+ if (this.imageFadeInDelta = Math.min(this.imageFadeInDelta + 0.05, 1), this.currentFadeOpacity = Ce(0, 1, this.imageFadeInDelta), this.map.triggerRepaint(), this.imageFadeInDelta < 1) {
9392
9392
  requestAnimationFrame(e);
9393
9393
  return;
9394
9394
  }
@@ -9405,7 +9405,7 @@ class br {
9405
9405
  animateOut() {
9406
9406
  return this.imageIsAnimating ? Promise.resolve() : new Promise((e) => {
9407
9407
  const t = () => {
9408
- if (this.imageFadeInDelta = Math.min(this.imageFadeInDelta + 0.05, 1), this.currentFadeOpacity = Le(1, 0, this.imageFadeInDelta), this.map.triggerRepaint(), this.imageFadeInDelta >= 1) {
9408
+ if (this.imageFadeInDelta = Math.min(this.imageFadeInDelta + 0.05, 1), this.currentFadeOpacity = Ce(1, 0, this.imageFadeInDelta), this.map.triggerRepaint(), this.imageFadeInDelta >= 1) {
9409
9409
  this.imageIsAnimating = !1, this.imageFadeInDelta = 0, e();
9410
9410
  return;
9411
9411
  }
@@ -9430,11 +9430,11 @@ class br {
9430
9430
  if (this.cubemap === void 0)
9431
9431
  throw new Error("[CubemapLayer]: Cubemap is undefined");
9432
9432
  this.texture === void 0 && process.env.NODE_ENV === "development" && console.warn("[CubemapLayer]: Texture is undefined, no texture will be rendered to cubemap"), e.disable(e.DEPTH_TEST), e.enable(e.BLEND), e.blendFunc(e.SRC_ALPHA, e.DST_ALPHA), e.useProgram(this.cubemap.shaderProgram), e.bindBuffer(e.ARRAY_BUFFER, this.cubemap.positionBuffer), e.vertexAttribPointer(this.cubemap.programInfo.attributesLocations.vertexPosition, 3, e.FLOAT, !1, 0, 0), e.enableVertexAttribArray(this.cubemap.programInfo.attributesLocations.vertexPosition);
9433
- const n = 0.1, a = 1e4, o = e.canvas, i = o.clientWidth / o.clientHeight, s = this.map.transform, l = s.fov * (Math.PI / 180), u = rt();
9433
+ const n = 0.1, a = 1e4, o = e.canvas, i = o.clientWidth / o.clientHeight, s = this.map.transform, l = s.fov * (Math.PI / 180), u = nt();
9434
9434
  Wl(u, l, i, n, a), Xn(u, u, s.rollInRadians), Kn(u, u, -s.pitchInRadians), Xn(u, u, s.bearingInRadians);
9435
9435
  const c = s.center.lat * Math.PI / 180, p = s.center.lng * Math.PI / 180;
9436
9436
  Kn(u, u, c), Zl(u, u, -p), e.uniformMatrix4fv(this.cubemap.programInfo.uniformsLocations.projectionMatrix, !1, u);
9437
- const f = rt();
9437
+ const f = nt();
9438
9438
  if (e.uniformMatrix4fv(this.cubemap.programInfo.uniformsLocations.modelViewMatrix, !1, f), e.uniform4fv(this.cubemap.programInfo.uniformsLocations.bgColor, new Float32Array(this.bgColor)), e.uniform1f(this.cubemap.programInfo.uniformsLocations.fadeOpacity, this.currentFadeOpacity), this.useCubemapTexture && this.texture && (e.activeTexture(e.TEXTURE0), e.bindTexture(e.TEXTURE_CUBE_MAP, this.texture), e.uniform1i(this.cubemap.programInfo.uniformsLocations.cubeSampler, 0)), this.cubemap.indexBuffer === void 0)
9439
9439
  throw new Error("Index buffer is undefined");
9440
9440
  if (this.cubemap.indexBufferLength === void 0)
@@ -9474,12 +9474,12 @@ class br {
9474
9474
  this.options = e;
9475
9475
  const t = JSON.stringify(e.faces ?? e.preset ?? e.path), n = this.currentFacesDefinitionKey !== t;
9476
9476
  n && (await this.setCubemapFaces(e), this.cubeMapNeedsUpdate = !0);
9477
- const a = At(e.color);
9477
+ const a = Et(e.color);
9478
9478
  if (e.color && this.targetBgColor.toString() !== a.toString())
9479
9479
  this.setBgColor(a);
9480
9480
  else if (!e.color && e.preset && e.preset in Oe) {
9481
9481
  const o = Oe[e.preset];
9482
- this.setBgColor(At(o.color));
9482
+ this.setBgColor(Et(o.color));
9483
9483
  }
9484
9484
  this.updateCubemap({ facesNeedUpdate: n });
9485
9485
  }
@@ -9594,20 +9594,20 @@ void main() {
9594
9594
  // gl_FragColor = color;
9595
9595
  gl_FragColor = vec4(color.rgb * color.a, color.a);
9596
9596
  }
9597
- `, Je = 2, Tu = ["position"], _u = ["matrix", "rotationMatrix", "stopsNumber", "stops", "colors", "maxDistance", "scale"], Iu = [
9597
+ `, Qe = 2, Tu = ["position"], _u = ["matrix", "rotationMatrix", "stopsNumber", "stops", "colors", "maxDistance", "scale"], Iu = [
9598
9598
  -2,
9599
9599
  -2,
9600
9600
  0,
9601
- Je,
9601
+ Qe,
9602
9602
  -2,
9603
9603
  0,
9604
9604
  -2,
9605
- Je,
9605
+ Qe,
9606
9606
  0,
9607
- Je,
9608
- Je,
9607
+ Qe,
9608
+ Qe,
9609
9609
  0
9610
- ], wr = {
9610
+ ], Je = {
9611
9611
  scale: 0.9,
9612
9612
  stops: [
9613
9613
  [0, "rgba(176, 208, 240, 1)"],
@@ -9664,11 +9664,11 @@ class Sr {
9664
9664
  */
9665
9665
  S(this, "plane");
9666
9666
  if (typeof e == "boolean") {
9667
- this.gradient = wr;
9667
+ this.gradient = Je;
9668
9668
  return;
9669
9669
  }
9670
9670
  this.gradient = {
9671
- ...wr,
9671
+ ...Je,
9672
9672
  ...e
9673
9673
  };
9674
9674
  }
@@ -9715,7 +9715,7 @@ class Sr {
9715
9715
  this.animationDelta = 0;
9716
9716
  const t = () => {
9717
9717
  if (this.animationDelta < 1) {
9718
- this.scale = Le(0, this.gradient.scale, this.animationDelta), this.animationDelta += ia, this.map.triggerRepaint(), requestAnimationFrame(t);
9718
+ this.scale = Ce(0, this.gradient.scale, this.animationDelta), this.animationDelta += ia, this.map.triggerRepaint(), requestAnimationFrame(t);
9719
9719
  return;
9720
9720
  }
9721
9721
  e();
@@ -9739,7 +9739,7 @@ class Sr {
9739
9739
  return this.animationDelta = 0, new Promise((e) => {
9740
9740
  const t = () => {
9741
9741
  if (this.animationDelta < 1) {
9742
- this.scale = Le(this.gradient.scale, 0, this.animationDelta), this.animationDelta += ia, this.map.triggerRepaint(), requestAnimationFrame(t);
9742
+ this.scale = Ce(this.gradient.scale, 0, this.animationDelta), this.animationDelta += ia, this.map.triggerRepaint(), requestAnimationFrame(t);
9743
9743
  return;
9744
9744
  }
9745
9745
  e();
@@ -9762,26 +9762,26 @@ class Sr {
9762
9762
  e.disable(e.DEPTH_TEST), e.enable(e.BLEND), e.useProgram(this.plane.shaderProgram), e.bindBuffer(e.ARRAY_BUFFER, this.plane.positionBuffer);
9763
9763
  const n = this.plane.programInfo.attributesLocations.position;
9764
9764
  e.enableVertexAttribArray(n), e.vertexAttribPointer(n, 3, e.FLOAT, !1, 0, 0);
9765
- const a = rt(), o = this.scale;
9765
+ const a = nt(), o = this.scale;
9766
9766
  Xl(a, a, [o, o, o]);
9767
- const i = rt();
9767
+ const i = nt();
9768
9768
  Kl(i, t.defaultProjectionData.mainMatrix, a);
9769
9769
  const s = this.plane.programInfo.uniformsLocations.matrix;
9770
9770
  e.uniformMatrix4fv(s, !1, i);
9771
- const l = rt(), u = this.map.transform.cameraPosition, c = hr(Lt(), u), p = Jl(0, 1, 0), f = Lt();
9772
- Zn(f, p, c), hr(f, f);
9773
- const d = Lt();
9774
- Zn(d, c, f), hr(d, d), Hl(l, f[0], f[1], f[2], 0, d[0], d[1], d[2], 0, c[0], c[1], c[2], 0, 0, 0, 0, 1);
9771
+ const l = nt(), u = this.map.transform.cameraPosition, c = yr(At(), u), p = Jl(0, 1, 0), f = At();
9772
+ Zn(f, p, c), yr(f, f);
9773
+ const d = At();
9774
+ Zn(d, c, f), yr(d, d), Hl(l, f[0], f[1], f[2], 0, d[0], d[1], d[2], 0, c[0], c[1], c[2], 0, 0, 0, 0, 1);
9775
9775
  const h = this.plane.programInfo.uniformsLocations.rotationMatrix;
9776
9776
  e.uniformMatrix4fv(h, !1, l);
9777
- const y = this.gradient.stops.length, m = [], b = [];
9778
- for (let g = 0; g <= y; g++)
9779
- if (g < y) {
9780
- m[g] = this.gradient.stops[g][0];
9781
- const x = At(this.gradient.stops[g][1]);
9782
- b.push(...x);
9777
+ const y = this.gradient.stops.length, m = [], w = [];
9778
+ for (let v = 0; v <= y; v++)
9779
+ if (v < y) {
9780
+ m[v] = this.gradient.stops[v][0];
9781
+ const x = Et(this.gradient.stops[v][1]);
9782
+ w.push(...x);
9783
9783
  }
9784
- e.uniform1i(this.plane.programInfo.uniformsLocations.stopsNumber, y), e.uniform1fv(this.plane.programInfo.uniformsLocations.stops, new Float32Array(m)), e.uniform4fv(this.plane.programInfo.uniformsLocations.colors, new Float32Array(b)), e.uniform1f(this.plane.programInfo.uniformsLocations.maxDistance, Je), e.uniform1f(this.plane.programInfo.uniformsLocations.scale, o), e.drawArrays(e.TRIANGLE_STRIP, 0, 4);
9784
+ e.uniform1i(this.plane.programInfo.uniformsLocations.stopsNumber, y), e.uniform1fv(this.plane.programInfo.uniformsLocations.stops, new Float32Array(m)), e.uniform4fv(this.plane.programInfo.uniformsLocations.colors, new Float32Array(w)), e.uniform1f(this.plane.programInfo.uniformsLocations.maxDistance, Qe), e.uniform1f(this.plane.programInfo.uniformsLocations.scale, o), e.drawArrays(e.TRIANGLE_STRIP, 0, 4);
9785
9785
  }
9786
9786
  /**
9787
9787
  * Sets a new gradient for the radial gradient layer and animates the transition.
@@ -9794,13 +9794,13 @@ class Sr {
9794
9794
  */
9795
9795
  async setGradient(e) {
9796
9796
  if (await this.animateOut(), !Mu(e)) {
9797
- this.gradient.scale = wr.scale, this.gradient.stops = [
9797
+ this.gradient.scale = Je.scale, this.gradient.stops = [
9798
9798
  [0, "transparent"],
9799
9799
  [1, "transparent"]
9800
9800
  ];
9801
9801
  return;
9802
9802
  }
9803
- this.gradient = e, await this.animateIn();
9803
+ this.gradient.scale = e.scale ?? Je.scale, this.gradient.stops = e.stops ?? Je.stops, await this.animateIn();
9804
9804
  }
9805
9805
  show() {
9806
9806
  this.map.setLayoutProperty(this.id, "visibility", "visible");
@@ -9861,21 +9861,22 @@ let Ru = class no extends k.Map {
9861
9861
  S(this, "isStyleLocalized", !1);
9862
9862
  S(this, "languageIsUpdated", !1);
9863
9863
  S(this, "spaceboxLoadingState", {
9864
- styleLoadCallbackSet: !1
9864
+ styleLoadCallbackSet: !1,
9865
+ hasLoadedOnce: !1
9865
9866
  });
9866
9867
  this.options = t, this.setStyle(n), a && this.monitorStyleUrl(n);
9867
9868
  const u = () => {
9868
9869
  let h = "The distant style could not be loaded.";
9869
- this.getStyle() ? h += "Leaving the style as is." : (this.setStyle(Qe.STREETS), h += `Loading default MapTiler Cloud style "${Qe.STREETS.getDefaultVariant().getId()}" as a fallback.`), console.warn(h);
9870
+ this.getStyle() ? h += "Leaving the style as is." : (this.setStyle(et.STREETS), h += `Loading default MapTiler Cloud style "${et.STREETS.getDefaultVariant().getId()}" as a fallback.`), console.warn(h);
9870
9871
  };
9871
9872
  if (this.on("style.load", () => {
9872
9873
  this.styleInProcess = !1;
9873
9874
  }), this.on("error", (h) => {
9874
9875
  if (h.error instanceof k.AJAXError) {
9875
- const m = h.error.url, b = new URL(m);
9876
- b.search = "";
9877
- const g = b.href;
9878
- this.monitoredStyleUrls && this.monitoredStyleUrls.has(g) && (this.monitoredStyleUrls.delete(g), u());
9876
+ const m = h.error.url, w = new URL(m);
9877
+ w.search = "";
9878
+ const v = w.href;
9879
+ this.monitoredStyleUrls && this.monitoredStyleUrls.has(v) && (this.monitoredStyleUrls.delete(v), u());
9879
9880
  return;
9880
9881
  }
9881
9882
  if (this.styleInProcess) {
@@ -9942,7 +9943,7 @@ let Ru = class no extends k.Map {
9942
9943
  }), this.once("load", async () => {
9943
9944
  let h = { logo: null };
9944
9945
  try {
9945
- const y = Object.keys(this.style.sourceCaches).map((g) => this.getSource(g)).filter((g) => g && "url" in g && typeof g.url == "string" && g.url.includes("tiles.json")), m = new URL(y[0].url);
9946
+ const y = Object.keys(this.style.sourceCaches).map((v) => this.getSource(v)).filter((v) => v && "url" in v && typeof v.url == "string" && v.url.includes("tiles.json")), m = new URL(y[0].url);
9946
9947
  m.searchParams.has("key") || m.searchParams.append("key", D.apiKey), h = await (await fetch(m.href)).json();
9947
9948
  } catch {
9948
9949
  }
@@ -9953,8 +9954,8 @@ let Ru = class no extends k.Map {
9953
9954
  } else t.maptilerLogo && this.addControl(new kn(), t.logoPosition);
9954
9955
  if (t.scaleControl) {
9955
9956
  const y = t.scaleControl === !0 || t.scaleControl === void 0 ? "bottom-right" : t.scaleControl, m = new oi({ unit: D.unit });
9956
- this.addControl(m, y), D.on("unit", (b) => {
9957
- m.setUnit(b);
9957
+ this.addControl(m, y), D.on("unit", (w) => {
9958
+ m.setUnit(w);
9958
9959
  });
9959
9960
  }
9960
9961
  if (t.navigationControl !== !1) {
@@ -10004,16 +10005,16 @@ let Ru = class no extends k.Map {
10004
10005
  const {
10005
10006
  zoom: y,
10006
10007
  center: m,
10007
- style: b,
10008
- language: g,
10008
+ style: w,
10009
+ language: v,
10009
10010
  apiKey: x,
10010
10011
  maptilerLogo: A,
10011
10012
  canvasContextAttributes: L,
10012
- refreshExpiredTiles: z,
10013
- maxBounds: fe,
10013
+ refreshExpiredTiles: $,
10014
+ maxBounds: Te,
10014
10015
  scrollZoom: Ye,
10015
- minZoom: gt,
10016
- maxZoom: vt,
10016
+ minZoom: vt,
10017
+ maxZoom: bt,
10017
10018
  boxZoom: vo,
10018
10019
  locale: bo,
10019
10020
  fadeDuration: wo,
@@ -10024,20 +10025,20 @@ let Ru = class no extends k.Map {
10024
10025
  pixelRatio: Lo,
10025
10026
  validateStyle: Ao
10026
10027
  } = t;
10027
- this.minimap = new dr(h, {
10028
+ this.minimap = new hr(h, {
10028
10029
  zoom: y,
10029
10030
  center: m,
10030
- style: b,
10031
- language: g,
10031
+ style: w,
10032
+ language: v,
10032
10033
  apiKey: x,
10033
10034
  container: "null",
10034
10035
  maptilerLogo: A,
10035
10036
  canvasContextAttributes: L,
10036
- refreshExpiredTiles: z,
10037
- maxBounds: fe,
10037
+ refreshExpiredTiles: $,
10038
+ maxBounds: Te,
10038
10039
  scrollZoom: Ye,
10039
- minZoom: gt,
10040
- maxZoom: vt,
10040
+ minZoom: vt,
10041
+ maxZoom: bt,
10041
10042
  boxZoom: vo,
10042
10043
  locale: bo,
10043
10044
  fadeDuration: wo,
@@ -10048,7 +10049,7 @@ let Ru = class no extends k.Map {
10048
10049
  pixelRatio: Lo,
10049
10050
  validateStyle: Ao
10050
10051
  }), this.addControl(this.minimap, h.position ?? "bottom-left");
10051
- } else h === !0 ? (this.minimap = new dr({}, t), this.addControl(this.minimap, "bottom-left")) : h !== void 0 && h !== !1 && (this.minimap = new dr({}, t), this.addControl(this.minimap, h));
10052
+ } else h === !0 ? (this.minimap = new hr({}, t), this.addControl(this.minimap, "bottom-left")) : h !== void 0 && h !== !1 && (this.minimap = new hr({}, t), this.addControl(this.minimap, h));
10052
10053
  });
10053
10054
  const d = (h) => {
10054
10055
  h.terrain && (p = !0, f = {
@@ -10085,7 +10086,7 @@ let Ru = class no extends k.Map {
10085
10086
  this.space.setCubemap(t);
10086
10087
  return;
10087
10088
  }
10088
- this.space = new br(t), this.once("load", () => {
10089
+ this.space = new wr(t), this.once("load", () => {
10089
10090
  const n = this.getLayersOrder()[0];
10090
10091
  this.space && this.addLayer(this.space, n);
10091
10092
  });
@@ -10139,7 +10140,7 @@ let Ru = class no extends k.Map {
10139
10140
  [0, "transparent"],
10140
10141
  [1, "transparent"]
10141
10142
  ],
10142
- scale: 0
10143
+ scale: 1
10143
10144
  });
10144
10145
  return;
10145
10146
  }
@@ -10162,10 +10163,10 @@ let Ru = class no extends k.Map {
10162
10163
  if (t.space === !1) return;
10163
10164
  const o = a;
10164
10165
  if (t.space) {
10165
- this.space = new br(t.space), this.addLayer(this.space, n);
10166
+ this.space = new wr(t.space), this.addLayer(this.space, n);
10166
10167
  return;
10167
10168
  }
10168
- o && (this.space = new br(o), this.addLayer(this.space, n));
10169
+ o && (this.space = new wr(o), this.addLayer(this.space, n));
10169
10170
  }
10170
10171
  initHalo({ options: t = this.options, before: n, spec: a }) {
10171
10172
  if (this.halo && this.getLayer(this.halo.id) || t.halo === !1) return;
@@ -10281,43 +10282,49 @@ let Ru = class no extends k.Map {
10281
10282
  * - a longer form with the prefix `"maptiler://"` (eg. `"maptiler://streets-v2"`)
10282
10283
  */
10283
10284
  setStyle(t, n) {
10284
- var p, f, d, h, y, m;
10285
- this.originalLabelStyle.clear(), (p = this.minimap) == null || p.setStyle(t), this.forceLanguageUpdate = !0, this.once("idle", () => {
10285
+ var c, p, f, d, h;
10286
+ this.originalLabelStyle.clear(), (c = this.minimap) == null || c.setStyle(t), this.forceLanguageUpdate = !0, this.once("idle", () => {
10286
10287
  this.forceLanguageUpdate = !1;
10287
10288
  });
10288
10289
  const a = Gn(t);
10289
10290
  if (a.requiresUrlMonitoring && this.monitorStyleUrl(a.style), a.isFallback) {
10290
10291
  if (this.getStyle())
10291
10292
  return console.warn(
10292
- "Invalid style. A style must be a valid URL to a style.json, a JSON string representing a valid StyleSpecification or a valid StyleSpecification object. Keeping the curent style instead."
10293
+ "[Map.setStyle]: Invalid style. A style must be a valid URL to a style.json, a JSON string representing a valid StyleSpecification or a valid StyleSpecification object. Keeping the curent style instead."
10293
10294
  ), this;
10294
10295
  console.warn(
10295
- "Invalid style. A style must be a valid URL to a style.json, a JSON string representing a valid StyleSpecification or a valid StyleSpecification object. Fallback to default MapTiler style."
10296
+ "[Map.setStyle]: Invalid style. A style must be a valid URL to a style.json, a JSON string representing a valid StyleSpecification or a valid StyleSpecification object. Fallback to default MapTiler style."
10296
10297
  );
10297
10298
  }
10298
- this.styleInProcess = !0;
10299
10299
  const o = this.getStyle(), i = a.style;
10300
10300
  try {
10301
- super.setStyle(a.style, n);
10302
- } catch (b) {
10303
- this.styleInProcess = !1, console.error("[Map.setStyle]: Error while setting style:", b);
10301
+ super.setStyle(a.style, n), this.styleInProcess = !0;
10302
+ } catch (y) {
10303
+ this.styleInProcess = !1, console.error("[Map.setStyle]: Error while setting style:", y);
10304
10304
  }
10305
10305
  if (typeof a.style == "string" || a.requiresUrlMonitoring)
10306
10306
  return this;
10307
10307
  const s = () => {
10308
- var g;
10309
- ((g = a.style.projection) == null ? void 0 : g.type) !== "mercator" && (this.setSpaceFromStyle({ style: a.style }), this.setHaloFromStyle({ style: a.style }));
10310
- }, l = () => {
10311
- var x, A, L, z, fe;
10312
- const b = a.style;
10313
- if (((x = b.projection) == null ? void 0 : x.type) === "mercator") {
10314
- this.space && console.warn("Neither space nor halo is supported for mercator projection. Ignoring...");
10308
+ const y = a.style;
10309
+ if (!y.projection || y.projection.type === "mercator") {
10310
+ console.warn("[Map.setStyle]: Neither space nor halo is supported for mercator projection. Ignoring...");
10315
10311
  return;
10316
10312
  }
10317
- const g = this.getLayersOrder()[0];
10318
- this.space ? this.setSpaceFromStyle({ style: b }) : this.initSpace({ before: g, spec: (L = (A = b.metadata) == null ? void 0 : A.maptiler) == null ? void 0 : L.space }), this.halo ? this.setHaloFromStyle({ style: b }) : this.initHalo({ before: g, spec: (fe = (z = b.metadata) == null ? void 0 : z.maptiler) == null ? void 0 : fe.halo });
10313
+ this.setSpaceFromStyle({ style: a.style }), this.setHaloFromStyle({ style: a.style });
10314
+ }, l = (y) => {
10315
+ var v, x, A, L;
10316
+ const m = (y == null ? void 0 : y.target.getStyle()) ?? a.style, w = this.getLayersOrder()[0];
10317
+ this.space ? this.setSpaceFromStyle({ style: m }) : this.initSpace({ before: w, spec: (x = (v = m.metadata) == null ? void 0 : v.maptiler) == null ? void 0 : x.space }), this.halo ? this.setHaloFromStyle({ style: m }) : this.initHalo({ before: w, spec: (L = (A = m.metadata) == null ? void 0 : A.maptiler) == null ? void 0 : L.halo });
10319
10318
  };
10320
- return this.styleInProcess && !this.spaceboxLoadingState.styleLoadCallbackSet ? (this.once("style.load", l), this.spaceboxLoadingState.styleLoadCallbackSet = !0, this) : ((f = o == null ? void 0 : o.terrain) == null ? void 0 : f.source) !== ((d = i == null ? void 0 : i.terrain) == null ? void 0 : d.source) || ((h = o == null ? void 0 : o.terrain) == null ? void 0 : h.exaggeration) !== ((y = i == null ? void 0 : i.terrain) == null ? void 0 : y.exaggeration) ? (this.once("terrain", s), this) : (m = i == null ? void 0 : i.projection) != null && m.type ? (l(), this) : (this.styleInProcess = !0, this);
10319
+ if (this.styleInProcess && !this.spaceboxLoadingState.styleLoadCallbackSet)
10320
+ return this.once("style.load", l), this.once("styledata", l), this.spaceboxLoadingState.styleLoadCallbackSet = !0, this;
10321
+ if (((p = o == null ? void 0 : o.terrain) == null ? void 0 : p.source) !== ((f = i == null ? void 0 : i.terrain) == null ? void 0 : f.source) || ((d = o == null ? void 0 : o.terrain) == null ? void 0 : d.exaggeration) !== ((h = i == null ? void 0 : i.terrain) == null ? void 0 : h.exaggeration))
10322
+ return this.once("terrain", s), this;
10323
+ try {
10324
+ l();
10325
+ } catch {
10326
+ }
10327
+ return this;
10321
10328
  }
10322
10329
  /**
10323
10330
  * Adds a [MapLibre style layer](https://maplibre.org/maplibre-style-spec/layers)
@@ -10533,17 +10540,17 @@ let Ru = class no extends k.Map {
10533
10540
  continue;
10534
10541
  let m;
10535
10542
  if (u ? (m = this.getLayoutProperty(h, "text-field"), this.originalLabelStyle.set(h, m)) : m = this.originalLabelStyle.get(h), typeof m == "string") {
10536
- const { contains: b, exactMatch: g } = Yo(m, this.isStyleLocalized);
10537
- if (!b) continue;
10538
- if (g)
10543
+ const { contains: w, exactMatch: v } = Yo(m, this.isStyleLocalized);
10544
+ if (!w) continue;
10545
+ if (v)
10539
10546
  this.setLayoutProperty(h, "text-field", s);
10540
10547
  else {
10541
10548
  const x = Wo(m, s, this.isStyleLocalized);
10542
10549
  this.setLayoutProperty(h, "text-field", x);
10543
10550
  }
10544
10551
  } else {
10545
- const b = Zo(m, s, this.isStyleLocalized);
10546
- this.setLayoutProperty(h, "text-field", b);
10552
+ const w = Zo(m, s, this.isStyleLocalized);
10553
+ this.setLayoutProperty(h, "text-field", w);
10547
10554
  }
10548
10555
  }
10549
10556
  this.languageIsUpdated = !0;
@@ -10825,16 +10832,16 @@ function Fu(r) {
10825
10832
  times: n
10826
10833
  };
10827
10834
  }
10828
- function Et(r) {
10835
+ function Tt(r) {
10829
10836
  const e = ["Polygon", "LineString", "Point", "Track", "gx:Track"];
10830
10837
  let t, n, a, o, i;
10831
10838
  const s = [], l = [];
10832
10839
  if (E(r, "MultiGeometry") !== null)
10833
- return Et(E(r, "MultiGeometry"));
10840
+ return Tt(E(r, "MultiGeometry"));
10834
10841
  if (E(r, "MultiTrack") !== null)
10835
- return Et(E(r, "MultiTrack"));
10842
+ return Tt(E(r, "MultiTrack"));
10836
10843
  if (E(r, "gx:MultiTrack") !== null)
10837
- return Et(E(r, "gx:MultiTrack"));
10844
+ return Tt(E(r, "gx:MultiTrack"));
10838
10845
  for (a = 0; a < e.length; a++)
10839
10846
  if (n = G(r, e[a]), n) {
10840
10847
  for (o = 0; o < n.length; o++)
@@ -10867,15 +10874,15 @@ function Et(r) {
10867
10874
  return { geoms: s, coordTimes: l };
10868
10875
  }
10869
10876
  function $u(r, e, t, n) {
10870
- const a = Et(r), o = {}, i = O(E(r, "name")), s = O(E(r, "address")), l = O(E(r, "description")), u = E(r, "TimeSpan"), c = E(r, "TimeStamp"), p = E(r, "ExtendedData"), f = E(r, "visibility");
10877
+ const a = Tt(r), o = {}, i = O(E(r, "name")), s = O(E(r, "address")), l = O(E(r, "description")), u = E(r, "TimeSpan"), c = E(r, "TimeStamp"), p = E(r, "ExtendedData"), f = E(r, "visibility");
10871
10878
  let d, h = O(E(r, "styleUrl")), y = E(r, "LineStyle"), m = E(r, "PolyStyle");
10872
10879
  if (!a.geoms.length) return [];
10873
10880
  if (i && (o.name = i), s && (o.address = s), h) {
10874
10881
  h.startsWith("#") || (h = `#${h}`), o.styleUrl = h, e[h] && (o.styleHash = e[h]), n[h] && (o.styleMapHash = n[h], o.styleHash = e[n[h].normal ?? ""]);
10875
- const g = t[o.styleHash ?? ""];
10876
- if (g) {
10877
- y || (y = E(g, "LineStyle")), m || (m = E(g, "PolyStyle"));
10878
- const x = E(g, "IconStyle");
10882
+ const v = t[o.styleHash ?? ""];
10883
+ if (v) {
10884
+ y || (y = E(v, "LineStyle")), m || (m = E(v, "PolyStyle"));
10885
+ const x = E(v, "IconStyle");
10879
10886
  if (x) {
10880
10887
  const A = E(x, "Icon");
10881
10888
  if (A) {
@@ -10886,26 +10893,26 @@ function $u(r, e, t, n) {
10886
10893
  }
10887
10894
  }
10888
10895
  if (l && (o.description = l), u) {
10889
- const g = O(E(u, "begin")), x = O(E(u, "end"));
10890
- g && x && (o.timespan = { begin: g, end: x });
10896
+ const v = O(E(u, "begin")), x = O(E(u, "end"));
10897
+ v && x && (o.timespan = { begin: v, end: x });
10891
10898
  }
10892
10899
  if (c !== null && (o.timestamp = O(E(c, "when")) ?? (/* @__PURE__ */ new Date()).toISOString()), y !== null) {
10893
- const g = la(O(E(y, "color"))), x = g[0], A = g[1], L = Number.parseFloat(O(E(y, "width")) ?? "");
10900
+ const v = la(O(E(y, "color"))), x = v[0], A = v[1], L = Number.parseFloat(O(E(y, "width")) ?? "");
10894
10901
  x && (o.stroke = x), Number.isNaN(A) || (o["stroke-opacity"] = A), Number.isNaN(L) || (o["stroke-width"] = L);
10895
10902
  }
10896
10903
  if (m) {
10897
- const g = la(O(E(m, "color"))), x = g[0], A = g[1], L = O(E(m, "fill")), z = O(E(m, "outline"));
10898
- x && (o.fill = x), Number.isNaN(A) || (o["fill-opacity"] = A), L && (o["fill-opacity"] = L === "1" ? o["fill-opacity"] || 1 : 0), z && (o["stroke-opacity"] = z === "1" ? o["stroke-opacity"] || 1 : 0);
10904
+ const v = la(O(E(m, "color"))), x = v[0], A = v[1], L = O(E(m, "fill")), $ = O(E(m, "outline"));
10905
+ x && (o.fill = x), Number.isNaN(A) || (o["fill-opacity"] = A), L && (o["fill-opacity"] = L === "1" ? o["fill-opacity"] || 1 : 0), $ && (o["stroke-opacity"] = $ === "1" ? o["stroke-opacity"] || 1 : 0);
10899
10906
  }
10900
10907
  if (p) {
10901
- const g = G(p, "Data"), x = G(p, "SimpleData");
10902
- for (d = 0; d < g.length; d++)
10903
- o[g[d].getAttribute("name") ?? ""] = O(E(g[d], "value")) ?? "";
10908
+ const v = G(p, "Data"), x = G(p, "SimpleData");
10909
+ for (d = 0; d < v.length; d++)
10910
+ o[v[d].getAttribute("name") ?? ""] = O(E(v[d], "value")) ?? "";
10904
10911
  for (d = 0; d < x.length; d++)
10905
10912
  o[x[d].getAttribute("name") ?? ""] = O(x[d]) ?? "";
10906
10913
  }
10907
10914
  f !== null && (o.visibility = O(f) ?? ""), a.coordTimes.length !== 0 && (o.coordTimes = a.coordTimes.length === 1 ? a.coordTimes[0] : a.coordTimes);
10908
- const b = {
10915
+ const w = {
10909
10916
  type: "Feature",
10910
10917
  geometry: a.geoms.length === 1 ? a.geoms[0] : {
10911
10918
  type: "GeometryCollection",
@@ -10913,7 +10920,7 @@ function $u(r, e, t, n) {
10913
10920
  },
10914
10921
  properties: o
10915
10922
  };
10916
- return je(r, "id") && (b.id = je(r, "id") ?? void 0), [b];
10923
+ return je(r, "id") && (w.id = je(r, "id") ?? void 0), [w];
10917
10924
  }
10918
10925
  function so(r, e) {
10919
10926
  const t = G(r, e), n = [], a = [];
@@ -11124,13 +11131,13 @@ const zr = [
11124
11131
  // https://colorhunt.co/palette/10a19d540375ff7000ffbf00
11125
11132
  ["#10A19D", "#540375", "#FF7000", "#FFBF00"]
11126
11133
  ];
11127
- function er() {
11134
+ function tr() {
11128
11135
  return zr[~~(Math.random() * zr.length)][~~(Math.random() * 4)];
11129
11136
  }
11130
- function yt() {
11137
+ function mt() {
11131
11138
  return `maptiler_source_${da()}`;
11132
11139
  }
11133
- function mt() {
11140
+ function gt() {
11134
11141
  return `maptiler_layer_${da()}`;
11135
11142
  }
11136
11143
  function Fr(r, e) {
@@ -11145,10 +11152,10 @@ function Fr(r, e) {
11145
11152
  }
11146
11153
  return 0;
11147
11154
  }
11148
- function Ee(r) {
11155
+ function Ae(r) {
11149
11156
  return ["interpolate", ["linear"], ["zoom"], ...r.flatMap((e) => [e.zoom, e.value])];
11150
11157
  }
11151
- function F(r) {
11158
+ function z(r) {
11152
11159
  return ["interpolate", ["linear"], ["zoom"], ...r.flatMap((e) => [e.zoom, e.value])];
11153
11160
  }
11154
11161
  function fo(r, e) {
@@ -11239,12 +11246,12 @@ function mo(r, e = 10) {
11239
11246
  }).flat()
11240
11247
  ];
11241
11248
  }
11242
- function kt(r) {
11249
+ function Ct(r) {
11243
11250
  const e = r.toString(16);
11244
11251
  return e.length === 1 ? `0${e}` : e;
11245
11252
  }
11246
11253
  function Gu(r) {
11247
- return `#${kt(r[0])}${kt(r[1])}${kt(r[2])}${r.length === 4 ? kt(r[3]) : ""}`;
11254
+ return `#${Ct(r[0])}${Ct(r[1])}${Ct(r[2])}${r.length === 4 ? Ct(r[3]) : ""}`;
11248
11255
  }
11249
11256
  class C extends Array {
11250
11257
  constructor(t = {}) {
@@ -12186,7 +12193,7 @@ async function Vu(r, e, t = {}) {
12186
12193
  throw new Error("Creating a polyline layer requires an existing .sourceId or a valid .data property");
12187
12194
  let n = e.data;
12188
12195
  if (typeof n == "string") {
12189
- if (Ot(n))
12196
+ if (jt(n))
12190
12197
  n = `https://api.maptiler.com/data/${e.data}/features.json?key=${D.apiKey}`;
12191
12198
  else if (((a = n.split(".").pop()) == null ? void 0 : a.toLowerCase().trim()) === "gpx") {
12192
12199
  const s = await (await fetch(n, t)).text();
@@ -12209,7 +12216,7 @@ async function Vu(r, e, t = {}) {
12209
12216
  function Hu(r, e) {
12210
12217
  if (e.layerId && r.getLayer(e.layerId))
12211
12218
  throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
12212
- const t = e.sourceId ?? yt(), n = e.layerId ?? mt(), a = {
12219
+ const t = e.sourceId ?? mt(), n = e.layerId ?? gt(), a = {
12213
12220
  polylineLayerId: n,
12214
12221
  polylineOutlineLayerId: "",
12215
12222
  polylineSourceId: t
@@ -12218,7 +12225,7 @@ function Hu(r, e) {
12218
12225
  type: "geojson",
12219
12226
  data: e.data
12220
12227
  });
12221
- const o = e.lineWidth ?? 3, i = e.lineColor ?? er(), s = e.lineOpacity ?? 1, l = e.lineBlur ?? 0, u = e.lineGapWidth ?? 0;
12228
+ const o = e.lineWidth ?? 3, i = e.lineColor ?? tr(), s = e.lineOpacity ?? 1, l = e.lineBlur ?? 0, u = e.lineGapWidth ?? 0;
12222
12229
  let c = e.lineDashArray ?? null;
12223
12230
  const p = e.outlineWidth ?? 1, f = e.outlineColor ?? "#FFFFFF", d = e.outlineOpacity ?? 1, h = e.outlineBlur ?? 0;
12224
12231
  if (typeof c == "string" && (c = fn(c)), e.outline === !0) {
@@ -12235,10 +12242,10 @@ function Hu(r, e) {
12235
12242
  minzoom: e.minzoom ?? 0,
12236
12243
  maxzoom: e.maxzoom ?? 23,
12237
12244
  paint: {
12238
- "line-opacity": typeof d == "number" ? d : F(d),
12239
- "line-color": typeof f == "string" ? f : Ee(f),
12245
+ "line-opacity": typeof d == "number" ? d : z(d),
12246
+ "line-color": typeof f == "string" ? f : Ae(f),
12240
12247
  "line-width": fo(o, p),
12241
- "line-blur": typeof h == "number" ? h : F(h)
12248
+ "line-blur": typeof h == "number" ? h : z(h)
12242
12249
  }
12243
12250
  },
12244
12251
  e.beforeId
@@ -12256,11 +12263,11 @@ function Hu(r, e) {
12256
12263
  minzoom: e.minzoom ?? 0,
12257
12264
  maxzoom: e.maxzoom ?? 23,
12258
12265
  paint: {
12259
- "line-opacity": typeof s == "number" ? s : F(s),
12260
- "line-color": typeof i == "string" ? i : Ee(i),
12261
- "line-width": typeof o == "number" ? o : F(o),
12262
- "line-blur": typeof l == "number" ? l : F(l),
12263
- "line-gap-width": typeof u == "number" ? u : F(u),
12266
+ "line-opacity": typeof s == "number" ? s : z(s),
12267
+ "line-color": typeof i == "string" ? i : Ae(i),
12268
+ "line-width": typeof o == "number" ? o : z(o),
12269
+ "line-blur": typeof l == "number" ? l : z(l),
12270
+ "line-gap-width": typeof u == "number" ? u : z(u),
12264
12271
  // For some reasons passing "line-dasharray" with the value "undefined"
12265
12272
  // results in no showing the line while it should have the same behavior
12266
12273
  // of not adding the property "line-dasharray" as all.
@@ -12275,20 +12282,20 @@ function Hu(r, e) {
12275
12282
  function Ku(r, e) {
12276
12283
  if (e.layerId && r.getLayer(e.layerId))
12277
12284
  throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
12278
- const t = e.sourceId ?? yt(), n = e.layerId ?? mt(), a = {
12285
+ const t = e.sourceId ?? mt(), n = e.layerId ?? gt(), a = {
12279
12286
  polygonLayerId: n,
12280
12287
  polygonOutlineLayerId: e.outline ? `${n}_outline` : "",
12281
12288
  polygonSourceId: t
12282
12289
  };
12283
12290
  if (e.data && !r.getSource(t)) {
12284
12291
  let y = e.data;
12285
- typeof y == "string" && Ot(y) && (y = `https://api.maptiler.com/data/${y}/features.json?key=${D.apiKey}`), r.addSource(t, {
12292
+ typeof y == "string" && jt(y) && (y = `https://api.maptiler.com/data/${y}/features.json?key=${D.apiKey}`), r.addSource(t, {
12286
12293
  type: "geojson",
12287
12294
  data: y
12288
12295
  });
12289
12296
  }
12290
12297
  let o = e.outlineDashArray ?? null;
12291
- const i = e.outlineWidth ?? 1, s = e.outlineColor ?? "#FFFFFF", l = e.outlineOpacity ?? 1, u = e.outlineBlur ?? 0, c = e.fillColor ?? er(), p = e.fillOpacity ?? 1, f = e.outlinePosition ?? "center", d = e.pattern ?? null;
12298
+ const i = e.outlineWidth ?? 1, s = e.outlineColor ?? "#FFFFFF", l = e.outlineOpacity ?? 1, u = e.outlineBlur ?? 0, c = e.fillColor ?? tr(), p = e.fillOpacity ?? 1, f = e.outlinePosition ?? "center", d = e.pattern ?? null;
12292
12299
  typeof o == "string" && (o = fn(o));
12293
12300
  const h = (y = null) => {
12294
12301
  if (r.addLayer(
@@ -12299,8 +12306,8 @@ function Ku(r, e) {
12299
12306
  minzoom: e.minzoom ?? 0,
12300
12307
  maxzoom: e.maxzoom ?? 23,
12301
12308
  paint: {
12302
- "fill-color": typeof c == "string" ? c : Ee(c),
12303
- "fill-opacity": typeof p == "number" ? p : F(p),
12309
+ "fill-color": typeof c == "string" ? c : Ae(c),
12310
+ "fill-opacity": typeof p == "number" ? p : z(p),
12304
12311
  // Adding a pattern if provided
12305
12312
  ...y && { "fill-pattern": y }
12306
12313
  }
@@ -12308,15 +12315,15 @@ function Ku(r, e) {
12308
12315
  e.beforeId
12309
12316
  ), e.outline === !0) {
12310
12317
  let m;
12311
- f === "inside" ? typeof i == "number" ? m = 0.5 * i : m = F(
12312
- i.map(({ zoom: b, value: g }) => ({
12313
- zoom: b,
12314
- value: 0.5 * g
12318
+ f === "inside" ? typeof i == "number" ? m = 0.5 * i : m = z(
12319
+ i.map(({ zoom: w, value: v }) => ({
12320
+ zoom: w,
12321
+ value: 0.5 * v
12315
12322
  }))
12316
- ) : f === "outside" ? typeof i == "number" ? m = -0.5 * i : m = F(
12317
- i.map((b) => ({
12318
- zoom: b.zoom,
12319
- value: -0.5 * b.value
12323
+ ) : f === "outside" ? typeof i == "number" ? m = -0.5 * i : m = z(
12324
+ i.map((w) => ({
12325
+ zoom: w.zoom,
12326
+ value: -0.5 * w.value
12320
12327
  }))
12321
12328
  ) : m = 0, r.addLayer(
12322
12329
  {
@@ -12330,10 +12337,10 @@ function Ku(r, e) {
12330
12337
  minzoom: e.minzoom ?? 0,
12331
12338
  maxzoom: e.maxzoom ?? 23,
12332
12339
  paint: {
12333
- "line-opacity": typeof l == "number" ? l : F(l),
12334
- "line-color": typeof s == "string" ? s : Ee(s),
12335
- "line-width": typeof i == "number" ? i : F(i),
12336
- "line-blur": typeof u == "number" ? u : F(u),
12340
+ "line-opacity": typeof l == "number" ? l : z(l),
12341
+ "line-color": typeof s == "string" ? s : Ae(s),
12342
+ "line-width": typeof i == "number" ? i : z(i),
12343
+ "line-blur": typeof u == "number" ? u : z(u),
12337
12344
  "line-offset": m,
12338
12345
  // For some reasons passing "line-dasharray" with the value "undefined"
12339
12346
  // results in no showing the line while it should have the same behavior
@@ -12358,12 +12365,12 @@ function Ku(r, e) {
12358
12365
  function Xu(r, e) {
12359
12366
  if (e.layerId && r.getLayer(e.layerId))
12360
12367
  throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
12361
- const t = e.minPointRadius ?? 10, n = e.maxPointRadius ?? 50, a = e.cluster ?? !1, o = 20, i = Array.isArray(e.pointColor) ? e.pointColor : go.TURBO.scale(10, e.cluster ? 1e4 : 1e3).resample("ease-out-square"), s = i.getBounds(), l = e.sourceId ?? yt(), u = e.layerId ?? mt(), c = e.showLabel ?? a, p = e.alignOnViewport ?? !0, f = e.outline ?? !1, d = e.outlineOpacity ?? 1, h = e.outlineWidth ?? 1, y = e.outlineColor ?? "#FFFFFF";
12368
+ const t = e.minPointRadius ?? 10, n = e.maxPointRadius ?? 50, a = e.cluster ?? !1, o = 20, i = Array.isArray(e.pointColor) ? e.pointColor : go.TURBO.scale(10, e.cluster ? 1e4 : 1e3).resample("ease-out-square"), s = i.getBounds(), l = e.sourceId ?? mt(), u = e.layerId ?? gt(), c = e.showLabel ?? a, p = e.alignOnViewport ?? !0, f = e.outline ?? !1, d = e.outlineOpacity ?? 1, h = e.outlineWidth ?? 1, y = e.outlineColor ?? "#FFFFFF";
12362
12369
  let m;
12363
- const b = e.zoomCompensation ?? !0, g = e.minzoom ?? 0, x = e.maxzoom ?? 23;
12364
- typeof e.pointOpacity == "number" ? m = e.pointOpacity : Array.isArray(e.pointOpacity) ? m = F(e.pointOpacity) : e.cluster ? m = jr(i, "point_count") : e.property ? m = jr(i, e.property) : m = F([
12365
- { zoom: g, value: 0 },
12366
- { zoom: g + 0.25, value: 1 },
12370
+ const w = e.zoomCompensation ?? !0, v = e.minzoom ?? 0, x = e.maxzoom ?? 23;
12371
+ typeof e.pointOpacity == "number" ? m = e.pointOpacity : Array.isArray(e.pointOpacity) ? m = z(e.pointOpacity) : e.cluster ? m = jr(i, "point_count") : e.property ? m = jr(i, e.property) : m = z([
12372
+ { zoom: v, value: 0 },
12373
+ { zoom: v + 0.25, value: 1 },
12367
12374
  { zoom: x - 0.25, value: 1 },
12368
12375
  { zoom: x, value: 0 }
12369
12376
  ]);
@@ -12375,7 +12382,7 @@ function Xu(r, e) {
12375
12382
  };
12376
12383
  if (e.data && !r.getSource(l)) {
12377
12384
  let L = e.data;
12378
- typeof L == "string" && Ot(L) && (L = `https://api.maptiler.com/data/${L}/features.json?key=${D.apiKey}`), r.addSource(l, {
12385
+ typeof L == "string" && jt(L) && (L = `https://api.maptiler.com/data/${L}/features.json?key=${D.apiKey}`), r.addSource(l, {
12379
12386
  type: "geojson",
12380
12387
  data: L,
12381
12388
  cluster: a
@@ -12383,11 +12390,11 @@ function Xu(r, e) {
12383
12390
  }
12384
12391
  if (a) {
12385
12392
  A.clusterLayerId = `${u}_cluster`;
12386
- const L = Array.from({ length: o }, (z, fe) => {
12387
- const Ye = s.min + fe * (s.max - s.min) / (o - 1);
12393
+ const L = Array.from({ length: o }, ($, Te) => {
12394
+ const Ye = s.min + Te * (s.max - s.min) / (o - 1);
12388
12395
  return {
12389
12396
  value: Ye,
12390
- pointRadius: t + (n - t) * (fe / (o - 1)) ** 0.5,
12397
+ pointRadius: t + (n - t) * (Te / (o - 1)) ** 0.5,
12391
12398
  color: i.getColorHex(Ye)
12392
12399
  };
12393
12400
  });
@@ -12400,18 +12407,18 @@ function Xu(r, e) {
12400
12407
  paint: {
12401
12408
  // 'circle-color': options.pointColor ?? colorDrivenByProperty(clusterStyle, "point_count"),
12402
12409
  "circle-color": typeof e.pointColor == "string" ? e.pointColor : $r(L, "point_count"),
12403
- "circle-radius": typeof e.pointRadius == "number" ? e.pointRadius : Array.isArray(e.pointRadius) ? F(e.pointRadius) : Or(L, "point_count", !1),
12410
+ "circle-radius": typeof e.pointRadius == "number" ? e.pointRadius : Array.isArray(e.pointRadius) ? z(e.pointRadius) : Or(L, "point_count", !1),
12404
12411
  "circle-pitch-alignment": p ? "viewport" : "map",
12405
12412
  "circle-pitch-scale": "map",
12406
12413
  // scale with camera distance regardless of viewport/biewport alignement
12407
12414
  "circle-opacity": m,
12408
12415
  ...f && {
12409
- "circle-stroke-opacity": typeof d == "number" ? d : F(d),
12410
- "circle-stroke-width": typeof h == "number" ? h : F(h),
12411
- "circle-stroke-color": typeof y == "string" ? y : Ee(y)
12416
+ "circle-stroke-opacity": typeof d == "number" ? d : z(d),
12417
+ "circle-stroke-width": typeof h == "number" ? h : z(h),
12418
+ "circle-stroke-color": typeof y == "string" ? y : Ae(y)
12412
12419
  }
12413
12420
  },
12414
- minzoom: g,
12421
+ minzoom: v,
12415
12422
  maxzoom: x
12416
12423
  },
12417
12424
  e.beforeId
@@ -12427,27 +12434,27 @@ function Xu(r, e) {
12427
12434
  // scale with camera distance regardless of viewport/biewport alignement
12428
12435
  // 'circle-color': options.pointColor ?? clusterStyle[0].color,
12429
12436
  "circle-color": typeof e.pointColor == "string" ? e.pointColor : i.getColorHex(i.getBounds().min),
12430
- "circle-radius": typeof e.pointRadius == "number" ? e.pointRadius : Array.isArray(e.pointRadius) ? F(e.pointRadius) : L[0].pointRadius * 0.75,
12437
+ "circle-radius": typeof e.pointRadius == "number" ? e.pointRadius : Array.isArray(e.pointRadius) ? z(e.pointRadius) : L[0].pointRadius * 0.75,
12431
12438
  "circle-opacity": m,
12432
12439
  ...f && {
12433
- "circle-stroke-opacity": typeof d == "number" ? d : F(d),
12434
- "circle-stroke-width": typeof h == "number" ? h : F(h),
12435
- "circle-stroke-color": typeof y == "string" ? y : Ee(y)
12440
+ "circle-stroke-opacity": typeof d == "number" ? d : z(d),
12441
+ "circle-stroke-width": typeof h == "number" ? h : z(h),
12442
+ "circle-stroke-color": typeof y == "string" ? y : Ae(y)
12436
12443
  }
12437
12444
  },
12438
- minzoom: g,
12445
+ minzoom: v,
12439
12446
  maxzoom: x
12440
12447
  },
12441
12448
  e.beforeId
12442
12449
  );
12443
12450
  } else {
12444
- let L = typeof e.pointColor == "string" ? e.pointColor : Array.isArray(e.pointColor) ? e.pointColor.getColorHex(e.pointColor.getBounds().min) : er(), z = typeof e.pointRadius == "number" ? b ? F([
12451
+ let L = typeof e.pointColor == "string" ? e.pointColor : Array.isArray(e.pointColor) ? e.pointColor.getColorHex(e.pointColor.getBounds().min) : tr(), $ = typeof e.pointRadius == "number" ? w ? z([
12445
12452
  { zoom: 0, value: e.pointRadius * 0.025 },
12446
12453
  { zoom: 2, value: e.pointRadius * 0.05 },
12447
12454
  { zoom: 4, value: e.pointRadius * 0.1 },
12448
12455
  { zoom: 8, value: e.pointRadius * 0.25 },
12449
12456
  { zoom: 16, value: e.pointRadius * 1 }
12450
- ]) : e.pointRadius : Array.isArray(e.pointRadius) ? F(e.pointRadius) : b ? F([
12457
+ ]) : e.pointRadius : Array.isArray(e.pointRadius) ? z(e.pointRadius) : w ? z([
12451
12458
  { zoom: 0, value: t * 0.05 },
12452
12459
  { zoom: 2, value: t * 0.1 },
12453
12460
  { zoom: 4, value: t * 0.2 },
@@ -12455,15 +12462,15 @@ function Xu(r, e) {
12455
12462
  { zoom: 16, value: t * 1 }
12456
12463
  ]) : t;
12457
12464
  if (e.property && Array.isArray(e.pointColor)) {
12458
- const fe = Array.from({ length: o }, (Ye, gt) => {
12459
- const vt = s.min + gt * (s.max - s.min) / (o - 1);
12465
+ const Te = Array.from({ length: o }, (Ye, vt) => {
12466
+ const bt = s.min + vt * (s.max - s.min) / (o - 1);
12460
12467
  return {
12461
- value: vt,
12462
- pointRadius: typeof e.pointRadius == "number" ? e.pointRadius : t + (n - t) * (gt / (o - 1)) ** 0.5,
12463
- color: typeof e.pointColor == "string" ? e.pointColor : i.getColorHex(vt)
12468
+ value: bt,
12469
+ pointRadius: typeof e.pointRadius == "number" ? e.pointRadius : t + (n - t) * (vt / (o - 1)) ** 0.5,
12470
+ color: typeof e.pointColor == "string" ? e.pointColor : i.getColorHex(bt)
12464
12471
  };
12465
12472
  });
12466
- L = $r(fe, e.property), z = Or(fe, e.property, b);
12473
+ L = $r(Te, e.property), $ = Or(Te, e.property, w);
12467
12474
  }
12468
12475
  r.addLayer(
12469
12476
  {
@@ -12480,14 +12487,14 @@ function Xu(r, e) {
12480
12487
  // scale with camera distance regardless of viewport/biewport alignement
12481
12488
  "circle-color": L,
12482
12489
  "circle-opacity": m,
12483
- "circle-radius": z,
12490
+ "circle-radius": $,
12484
12491
  ...f && {
12485
- "circle-stroke-opacity": typeof d == "number" ? d : F(d),
12486
- "circle-stroke-width": typeof h == "number" ? h : F(h),
12487
- "circle-stroke-color": typeof y == "string" ? y : Ee(y)
12492
+ "circle-stroke-opacity": typeof d == "number" ? d : z(d),
12493
+ "circle-stroke-width": typeof h == "number" ? h : z(h),
12494
+ "circle-stroke-color": typeof y == "string" ? y : Ae(y)
12488
12495
  }
12489
12496
  },
12490
- minzoom: g,
12497
+ minzoom: v,
12491
12498
  maxzoom: x
12492
12499
  },
12493
12500
  e.beforeId
@@ -12495,7 +12502,7 @@ function Xu(r, e) {
12495
12502
  }
12496
12503
  if (c !== !1 && (e.cluster || e.property)) {
12497
12504
  A.labelLayerId = `${u}_label`;
12498
- const L = e.labelColor ?? "#fff", z = e.labelSize ?? 12;
12505
+ const L = e.labelColor ?? "#fff", $ = e.labelSize ?? 12;
12499
12506
  r.addLayer(
12500
12507
  {
12501
12508
  id: A.labelLayerId,
@@ -12505,7 +12512,7 @@ function Xu(r, e) {
12505
12512
  layout: {
12506
12513
  "text-field": e.cluster ? "{point_count_abbreviated}" : `{${e.property}}`,
12507
12514
  "text-font": ["Noto Sans Regular"],
12508
- "text-size": z,
12515
+ "text-size": $,
12509
12516
  "text-pitch-alignment": p ? "viewport" : "map",
12510
12517
  "symbol-sort-key": ["/", 1, ["get", e.cluster ? "point_count" : e.property]]
12511
12518
  // so that the largest value goes on top
@@ -12514,7 +12521,7 @@ function Xu(r, e) {
12514
12521
  "text-color": L,
12515
12522
  "text-opacity": m
12516
12523
  },
12517
- minzoom: g,
12524
+ minzoom: v,
12518
12525
  maxzoom: x
12519
12526
  },
12520
12527
  e.beforeId
@@ -12525,7 +12532,7 @@ function Xu(r, e) {
12525
12532
  function Zu(r, e) {
12526
12533
  if (e.layerId && r.getLayer(e.layerId))
12527
12534
  throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
12528
- const t = e.sourceId ?? yt(), n = e.layerId ?? mt(), a = e.minzoom ?? 0, o = e.maxzoom ?? 23, i = e.zoomCompensation ?? !0, s = e.opacity ?? [
12535
+ const t = e.sourceId ?? mt(), n = e.layerId ?? gt(), a = e.minzoom ?? 0, o = e.maxzoom ?? 23, i = e.zoomCompensation ?? !0, s = e.opacity ?? [
12529
12536
  { zoom: a, value: 0 },
12530
12537
  { zoom: a + 0.25, value: 1 },
12531
12538
  { zoom: o - 0.25, value: 1 },
@@ -12549,16 +12556,16 @@ function Zu(r, e) {
12549
12556
  { zoom: 16, value: 50 }
12550
12557
  ], y = e.radius ?? (i ? h : 10);
12551
12558
  let m = 1;
12552
- typeof y == "number" ? m = y : Array.isArray(y) && "zoom" in y[0] ? m = F(y) : p && Array.isArray(y) && "propertyValue" in y[0] ? m = yo(y, p, i) : !p && Array.isArray(y) && "propertyValue" in y[0] ? (m = F(h), console.warn("The option `.radius` can only be property-driven if the option `.property` is provided.")) : m = F(h);
12553
- const b = {
12559
+ typeof y == "number" ? m = y : Array.isArray(y) && "zoom" in y[0] ? m = z(y) : p && Array.isArray(y) && "propertyValue" in y[0] ? m = yo(y, p, i) : !p && Array.isArray(y) && "propertyValue" in y[0] ? (m = z(h), console.warn("The option `.radius` can only be property-driven if the option `.property` is provided.")) : m = z(h);
12560
+ const w = {
12554
12561
  heatmapLayerId: n,
12555
12562
  heatmapSourceId: t
12556
12563
  };
12557
12564
  if (e.data && !r.getSource(t)) {
12558
- let g = e.data;
12559
- typeof g == "string" && Ot(g) && (g = `https://api.maptiler.com/data/${g}/features.json?key=${D.apiKey}`), r.addSource(t, {
12565
+ let v = e.data;
12566
+ typeof v == "string" && jt(v) && (v = `https://api.maptiler.com/data/${v}/features.json?key=${D.apiKey}`), r.addSource(t, {
12560
12567
  type: "geojson",
12561
- data: g
12568
+ data: v
12562
12569
  });
12563
12570
  }
12564
12571
  return r.addLayer(
@@ -12570,14 +12577,14 @@ function Zu(r, e) {
12570
12577
  maxzoom: o,
12571
12578
  paint: {
12572
12579
  "heatmap-weight": d,
12573
- "heatmap-intensity": typeof c == "number" ? c : F(c),
12580
+ "heatmap-intensity": typeof c == "number" ? c : z(c),
12574
12581
  "heatmap-color": mo(l),
12575
12582
  "heatmap-radius": m,
12576
- "heatmap-opacity": typeof s == "number" ? s : F(s)
12583
+ "heatmap-opacity": typeof s == "number" ? s : z(s)
12577
12584
  }
12578
12585
  },
12579
12586
  e.beforeId
12580
- ), b;
12587
+ ), w;
12581
12588
  }
12582
12589
  const Cc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12583
12590
  __proto__: null,
@@ -12589,22 +12596,22 @@ const Cc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12589
12596
  colorPalettes: zr,
12590
12597
  computeRampedOutlineWidth: fo,
12591
12598
  dashArrayMaker: fn,
12592
- generateRandomLayerName: mt,
12593
- generateRandomSourceName: yt,
12594
- getRandomColor: er,
12599
+ generateRandomLayerName: gt,
12600
+ generateRandomSourceName: mt,
12601
+ getRandomColor: tr,
12595
12602
  heatmapIntensityFromColorRamp: mo,
12596
12603
  lerpZoomNumberValues: Fr,
12597
12604
  opacityDrivenByProperty: jr,
12598
- paintColorOptionsToPaintSpec: Ee,
12605
+ paintColorOptionsToPaintSpec: Ae,
12599
12606
  radiusDrivenByProperty: Or,
12600
12607
  radiusDrivenByPropertyHeatmap: yo,
12601
- rampedOptionsToLayerPaintSpec: F,
12608
+ rampedOptionsToLayerPaintSpec: z,
12602
12609
  rampedPropertyValueWeight: ho,
12603
12610
  takeScreenshot: Bu
12604
12611
  }, Symbol.toStringTag, { value: "Module" }));
12605
12612
  Go();
12606
12613
  function Lc() {
12607
- return "3.6.2-rc1";
12614
+ return "3.6.2-rc3";
12608
12615
  }
12609
12616
  const Ac = k.Map, Ec = k.Marker, Tc = k.Popup, _c = k.Style, Ic = k.CanvasSource, Mc = k.GeoJSONSource, Pc = k.ImageSource, Rc = k.RasterTileSource, zc = k.RasterDEMTileSource, Fc = k.VectorTileSource, $c = k.VideoSource, Oc = k.NavigationControl, jc = k.GeolocateControl, Nc = k.AttributionControl, Dc = k.LogoControl, Uc = k.ScaleControl, Bc = k.FullscreenControl, qc = k.TerrainControl, Gc = k.BoxZoomHandler, Vc = k.ScrollZoomHandler, Hc = k.CooperativeGesturesHandler, Kc = k.KeyboardHandler, Xc = k.TwoFingersTouchPitchHandler, Zc = k.MapWheelEvent, Yc = k.MapTouchEvent, Wc = k.MapMouseEvent, Jc = k.config, Qc = k.getVersion, {
12610
12617
  setRTLTextPlugin: ep,
@@ -12650,8 +12657,8 @@ export {
12650
12657
  Hc as CooperativeGesturesHandlerMLGL,
12651
12658
  Me as CubemapFaceNames,
12652
12659
  gu as CubemapImagesPresets,
12653
- br as CubemapLayer,
12654
- ve as DOMcreate,
12660
+ wr as CubemapLayer,
12661
+ ge as DOMcreate,
12655
12662
  ln as DOMremove,
12656
12663
  yp as DoubleClickZoomHandler,
12657
12664
  dp as DragPanHandler,