@maptiler/sdk 3.4.1-rc1 → 3.4.1-rc2

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.
@@ -6,8 +6,8 @@ var Eo = (r, e, t) => e in r ? Ao(r, e, { enumerable: !0, configurable: !0, writ
6
6
  var S = (r, e, t) => Eo(r, typeof e != "symbol" ? e + "" : e, t), tr = (r, e, t) => e.has(r) || dn("Cannot " + t);
7
7
  var P = (r, e, t) => (tr(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) => (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);
8
8
  import k from "maplibre-gl";
9
- import { Language as To, getLanguageInfoFromCode as hn, config as rr, MapStyle as Qe, mapStylePresetList as nr, expandMapStyle as _o, MapStyleVariant as Mo, ReferenceMapStyle as Io, toLanguageInfo as yn, getLanguageInfoFromFlag as Po, geolocation as mn } from "@maptiler/client";
10
- import { MapStyle as Tp, MapStyleVariant as _p, ReferenceMapStyle as Mp, ServiceError as Ip, areSameLanguages as Pp, bufferToPixelDataBrowser as Rp, circumferenceAtLatitude as zp, coordinates as Fp, data as $p, elevation as Op, expandMapStyle as jp, geocoding as Np, geolocation as Dp, getAutoLanguage as Up, getBufferToPixelDataParser as Bp, getLanguageInfoFromCode as qp, getLanguageInfoFromFlag as Gp, getLanguageInfoFromKey as Vp, getTileCache as Hp, isLanguageInfo as Kp, mapStylePresetList as Xp, math as Wp, misc as Zp, staticMaps as Yp, styleToStyle as Jp, toLanguageInfo as Qp } from "@maptiler/client";
9
+ import { Language as To, getLanguageInfoFromCode as hn, config as rr, MapStyle as Qe, mapStylePresetList as nr, expandMapStyle as _o, MapStyleVariant as Io, ReferenceMapStyle as Mo, toLanguageInfo as yn, getLanguageInfoFromFlag as Po, geolocation as mn } from "@maptiler/client";
10
+ import { MapStyle as Tp, MapStyleVariant as _p, ReferenceMapStyle as Ip, ServiceError as Mp, areSameLanguages as Pp, bufferToPixelDataBrowser as Rp, circumferenceAtLatitude as zp, coordinates as Fp, data as $p, elevation as Op, expandMapStyle as jp, geocoding as Np, geolocation as Dp, getAutoLanguage as Up, getBufferToPixelDataParser as Bp, getLanguageInfoFromCode as qp, getLanguageInfoFromFlag as Gp, getLanguageInfoFromKey as Vp, getTileCache as Hp, isLanguageInfo as Kp, mapStylePresetList as Xp, math as Wp, misc as Zp, staticMaps as Yp, styleToStyle as Jp, toLanguageInfo as Qp } from "@maptiler/client";
11
11
  import Ro from "events";
12
12
  import { v4 as zo } from "uuid";
13
13
  import { Base64 as Fo } from "js-base64";
@@ -1977,11 +1977,11 @@ var ii = 8, si = {
1977
1977
  "color"
1978
1978
  ],
1979
1979
  length: 2
1980
- }, Mi = {
1980
+ }, Ii = {
1981
1981
  type: "array",
1982
1982
  value: "*",
1983
1983
  minimum: 1
1984
- }, Ii = {
1984
+ }, Mi = {
1985
1985
  anchor: {
1986
1986
  type: "enum",
1987
1987
  default: "viewport",
@@ -3378,8 +3378,8 @@ var ii = 8, si = {
3378
3378
  }
3379
3379
  },
3380
3380
  function_stop: _i,
3381
- expression: Mi,
3382
- light: Ii,
3381
+ expression: Ii,
3382
+ light: Mi,
3383
3383
  sky: Pi,
3384
3384
  terrain: Ri,
3385
3385
  projection: zi,
@@ -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" }, b = { kind: "number" }, M = { kind: "string" }, _ = { kind: "boolean" }, de = { kind: "color" }, Nt = { kind: "projectionDefinition" }, Re = { kind: "object" }, T = { kind: "value" }, Ki = { 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 jt = { kind: "null" }, b = { kind: "number" }, I = { kind: "string" }, _ = { kind: "boolean" }, de = { kind: "color" }, Nt = { kind: "projectionDefinition" }, Re = { kind: "object" }, T = { kind: "value" }, Ki = { kind: "error" }, Dt = { kind: "collator" }, Ut = { kind: "formatted" }, Bt = { kind: "padding" }, nt = { kind: "colorArray" }, qt = { kind: "numberArray" }, ft = { kind: "resolvedImage" }, Gt = { kind: "variableAnchorOffsetCollection" };
3612
3612
  function Z(r, e) {
3613
3613
  return {
3614
3614
  kind: "array",
@@ -3626,7 +3626,7 @@ function j(r) {
3626
3626
  const Xi = [
3627
3627
  jt,
3628
3628
  b,
3629
- M,
3629
+ I,
3630
3630
  _,
3631
3631
  de,
3632
3632
  Nt,
@@ -4350,7 +4350,7 @@ function B(r) {
4350
4350
  if (r === null)
4351
4351
  return jt;
4352
4352
  if (typeof r == "string")
4353
- return M;
4353
+ return I;
4354
4354
  if (typeof r == "boolean")
4355
4355
  return _;
4356
4356
  if (typeof r == "number")
@@ -4419,7 +4419,7 @@ class He {
4419
4419
  }
4420
4420
  }
4421
4421
  const wt = {
4422
- string: M,
4422
+ string: I,
4423
4423
  number: b,
4424
4424
  boolean: _,
4425
4425
  object: Re
@@ -4484,7 +4484,7 @@ const An = {
4484
4484
  "to-boolean": _,
4485
4485
  "to-color": de,
4486
4486
  "to-number": b,
4487
- "to-string": M
4487
+ "to-string": I
4488
4488
  };
4489
4489
  class ke {
4490
4490
  constructor(e, t) {
@@ -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, [_, M, b, 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, 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`);
4800
4800
  }
4801
4801
  evaluate(e) {
4802
4802
  const t = this.needle.evaluate(e), n = this.haystack.evaluate(e);
@@ -4825,7 +4825,7 @@ 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, [_, M, b, jt, T]))
4828
+ if (!Ur(n.type, [_, I, b, jt, 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
4831
  const o = t.parse(e[3], 3, b);
@@ -4953,7 +4953,7 @@ class Hr {
4953
4953
  return this.branches.every(([e, t]) => t.outputDefined()) && this.otherwise.outputDefined();
4954
4954
  }
4955
4955
  }
4956
- class Mt {
4956
+ class It {
4957
4957
  constructor(e, t, n, a) {
4958
4958
  this.type = e, this.input = t, this.beginIndex = n, this.endIndex = a;
4959
4959
  }
@@ -4963,13 +4963,13 @@ class Mt {
4963
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
- if (!Ur(n.type, [Z(T), M, T]))
4966
+ if (!Ur(n.type, [Z(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
4969
  const o = t.parse(e[3], 3, b);
4970
- return o ? new Mt(n.type, n, a, o) : null;
4970
+ return o ? new It(n.type, n, a, o) : null;
4971
4971
  } else
4972
- return new Mt(n.type, n, a);
4972
+ return new It(n.type, n, a);
4973
4973
  }
4974
4974
  evaluate(e) {
4975
4975
  const t = this.input.evaluate(e), n = this.beginIndex.evaluate(e);
@@ -5365,7 +5365,7 @@ class Wt {
5365
5365
  if (!o)
5366
5366
  return null;
5367
5367
  let i = null;
5368
- return n.locale && (i = t.parse(n.locale, 1, M), !i) ? null : new Wt(a, o, i);
5368
+ return n.locale && (i = t.parse(n.locale, 1, I), !i) ? null : new Wt(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);
@@ -5379,7 +5379,7 @@ class Wt {
5379
5379
  }
5380
5380
  class Kr {
5381
5381
  constructor(e, t, n, a, o) {
5382
- this.type = M, this.number = e, this.locale = t, this.currency = n, this.minFractionDigits = a, this.maxFractionDigits = o;
5382
+ this.type = I, this.number = e, this.locale = t, this.currency = n, this.minFractionDigits = a, this.maxFractionDigits = o;
5383
5383
  }
5384
5384
  static parse(e, t) {
5385
5385
  if (e.length !== 3)
@@ -5391,10 +5391,10 @@ class Kr {
5391
5391
  if (typeof a != "object" || Array.isArray(a))
5392
5392
  return t.error("NumberFormat options argument must be an object.");
5393
5393
  let o = null;
5394
- if (a.locale && (o = t.parse(a.locale, 1, M), !o))
5394
+ if (a.locale && (o = t.parse(a.locale, 1, I), !o))
5395
5395
  return null;
5396
5396
  let i = null;
5397
- if (a.currency && (i = t.parse(a.currency, 1, M), !i))
5397
+ if (a.currency && (i = t.parse(a.currency, 1, I), !i))
5398
5398
  return null;
5399
5399
  let s = null;
5400
5400
  if (a["min-fraction-digits"] && (s = t.parse(a["min-fraction-digits"], 1, b), !s))
@@ -5437,7 +5437,7 @@ class Xr {
5437
5437
  if (s["font-scale"] && (l = t.parse(s["font-scale"], 1, b), !l))
5438
5438
  return null;
5439
5439
  let u = null;
5440
- if (s["text-font"] && (u = t.parse(s["text-font"], 1, Z(M)), !u))
5440
+ if (s["text-font"] && (u = t.parse(s["text-font"], 1, Z(I)), !u))
5441
5441
  return null;
5442
5442
  let c = null;
5443
5443
  if (s["text-color"] && (c = t.parse(s["text-color"], 1, de), !c))
@@ -5446,7 +5446,7 @@ class Xr {
5446
5446
  if (s["vertical-align"]) {
5447
5447
  if (typeof s["vertical-align"] == "string" && !as.includes(s["vertical-align"]))
5448
5448
  return t.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${s["vertical-align"]}' instead.`);
5449
- if (p = t.parse(s["vertical-align"], 1, M), !p)
5449
+ if (p = t.parse(s["vertical-align"], 1, I), !p)
5450
5450
  return null;
5451
5451
  }
5452
5452
  const f = a[a.length - 1];
@@ -5485,7 +5485,7 @@ class Wr {
5485
5485
  static parse(e, t) {
5486
5486
  if (e.length !== 2)
5487
5487
  return t.error("Expected two arguments.");
5488
- const n = t.parse(e[1], 1, M);
5488
+ const n = t.parse(e[1], 1, I);
5489
5489
  return n ? new Wr(n) : t.error("No image name provided.");
5490
5490
  }
5491
5491
  evaluate(e) {
@@ -5526,20 +5526,20 @@ class Zr {
5526
5526
  }
5527
5527
  const ye = 8192;
5528
5528
  function Ts(r, e) {
5529
- const t = _s(r[0]), n = Is(r[1]), a = Math.pow(2, e.z);
5529
+ const t = _s(r[0]), n = Ms(r[1]), a = Math.pow(2, e.z);
5530
5530
  return [Math.round(t * a * ye), Math.round(n * a * ye)];
5531
5531
  }
5532
5532
  function Yr(r, e) {
5533
5533
  const t = Math.pow(2, e.z), n = (r[0] / ye + e.x) / t, a = (r[1] / ye + e.y) / t;
5534
- return [Ms(n), Ps(a)];
5534
+ return [Is(n), Ps(a)];
5535
5535
  }
5536
5536
  function _s(r) {
5537
5537
  return (180 + r) / 360;
5538
5538
  }
5539
- function Ms(r) {
5539
+ function Is(r) {
5540
5540
  return r * 360 - 180;
5541
5541
  }
5542
- function Is(r) {
5542
+ function Ms(r) {
5543
5543
  return (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + r * Math.PI / 360))) / 360;
5544
5544
  }
5545
5545
  function Ps(r) {
@@ -5638,7 +5638,7 @@ function _a(r, e, t, n) {
5638
5638
  function Ns(r) {
5639
5639
  r[0] = r[1] = 1 / 0, r[2] = r[3] = -1 / 0;
5640
5640
  }
5641
- function Mn(r, e, t, n) {
5641
+ function In(r, e, t, n) {
5642
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) {
@@ -5647,7 +5647,7 @@ function Mn(r, e, t, n) {
5647
5647
  }
5648
5648
  return i;
5649
5649
  }
5650
- function In(r, e, t, n) {
5650
+ function Mn(r, e, t, n) {
5651
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 = [];
@@ -5668,7 +5668,7 @@ function In(r, e, t, n) {
5668
5668
  function Ds(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
- const o = Jr(e.coordinates, n, a), i = Mn(r.geometry(), t, n, a);
5671
+ const o = Jr(e.coordinates, n, a), i = In(r.geometry(), t, n, a);
5672
5672
  if (!st(t, n))
5673
5673
  return !1;
5674
5674
  for (const s of i)
@@ -5676,7 +5676,7 @@ function Ds(r, e) {
5676
5676
  return !1;
5677
5677
  }
5678
5678
  if (e.type === "MultiPolygon") {
5679
- const o = Ta(e.coordinates, n, a), i = Mn(r.geometry(), t, n, a);
5679
+ const o = Ta(e.coordinates, n, a), i = In(r.geometry(), t, n, a);
5680
5680
  if (!st(t, n))
5681
5681
  return !1;
5682
5682
  for (const s of i)
@@ -5688,7 +5688,7 @@ function Ds(r, e) {
5688
5688
  function Us(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
- const o = Jr(e.coordinates, n, a), i = In(r.geometry(), t, n, a);
5691
+ const o = Jr(e.coordinates, n, a), i = Mn(r.geometry(), t, n, a);
5692
5692
  if (!st(t, n))
5693
5693
  return !1;
5694
5694
  for (const s of i)
@@ -5696,7 +5696,7 @@ function Us(r, e) {
5696
5696
  return !1;
5697
5697
  }
5698
5698
  if (e.type === "MultiPolygon") {
5699
- const o = Ta(e.coordinates, n, a), i = In(r.geometry(), t, n, a);
5699
+ const o = Ta(e.coordinates, n, a), i = Mn(r.geometry(), t, n, a);
5700
5700
  if (!st(t, n))
5701
5701
  return !1;
5702
5702
  for (const s of i)
@@ -5751,7 +5751,7 @@ class Fe {
5751
5751
  return !0;
5752
5752
  }
5753
5753
  }
5754
- class Ma {
5754
+ class Ia {
5755
5755
  constructor(e = [], t = (n, a) => n < a ? -1 : n > a ? 1 : 0) {
5756
5756
  if (this.data = e, this.length = this.data.length, this.compare = t, this.length > 0)
5757
5757
  for (let n = (this.length >> 1) - 1; n >= 0; n--) this._down(n);
@@ -5859,10 +5859,10 @@ class Qr {
5859
5859
  }
5860
5860
  }
5861
5861
  const Ar = 100, Er = 50;
5862
- function Ia(r, e) {
5862
+ function Ma(r, e) {
5863
5863
  return e[0] - r[0];
5864
5864
  }
5865
- function It(r) {
5865
+ function Mt(r) {
5866
5866
  return r[1] - r[0] + 1;
5867
5867
  }
5868
5868
  function ve(r, e) {
@@ -5871,7 +5871,7 @@ function ve(r, e) {
5871
5871
  function Tr(r, e) {
5872
5872
  if (r[0] > r[1])
5873
5873
  return [null, null];
5874
- const t = It(r);
5874
+ const t = Mt(r);
5875
5875
  if (e) {
5876
5876
  if (t === 2)
5877
5877
  return [r, null];
@@ -5897,7 +5897,7 @@ function _r(r, e) {
5897
5897
  dt(t, r[n]);
5898
5898
  return t;
5899
5899
  }
5900
- function Mr(r) {
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)
@@ -5987,7 +5987,7 @@ function $n(r, e) {
5987
5987
  return !1;
5988
5988
  }
5989
5989
  function Ws(r, e, t, n = 1 / 0) {
5990
- const a = Mr(r), o = Mr(e);
5990
+ const a = Ir(r), o = Ir(e);
5991
5991
  if (n !== 1 / 0 && en(a, o, t) >= n)
5992
5992
  return n;
5993
5993
  if (st(a, o)) {
@@ -6025,13 +6025,13 @@ function Pt(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;
6028
- const i = new Ma([[0, [0, r.length - 1], [0, 0]]], Ia), s = Mr(t);
6028
+ const i = new Ia([[0, [0, r.length - 1], [0, 0]]], Ma), s = Ir(t);
6029
6029
  for (; i.length > 0; ) {
6030
6030
  const l = i.pop();
6031
6031
  if (l[0] >= o)
6032
6032
  continue;
6033
6033
  const u = l[1], c = e ? Er : Ar;
6034
- if (It(u) <= c) {
6034
+ if (Mt(u) <= c) {
6035
6035
  if (!ve(u, r.length))
6036
6036
  return NaN;
6037
6037
  if (e) {
@@ -6056,13 +6056,13 @@ function Rt(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;
6059
- const s = new Ma([[0, [0, r.length - 1], [0, t.length - 1]]], Ia);
6059
+ const s = new Ia([[0, [0, r.length - 1], [0, t.length - 1]]], Ma);
6060
6060
  for (; s.length > 0; ) {
6061
6061
  const l = s.pop();
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 (It(u) <= p && It(c) <= f) {
6065
+ if (Mt(u) <= p && Mt(c) <= f) {
6066
6066
  if (!ve(u, r.length) && ve(c, t.length))
6067
6067
  return NaN;
6068
6068
  let d;
@@ -6253,7 +6253,7 @@ const rn = {
6253
6253
  number: se,
6254
6254
  "number-format": Kr,
6255
6255
  object: se,
6256
- slice: Mt,
6256
+ slice: It,
6257
6257
  step: Xt,
6258
6258
  string: se,
6259
6259
  "to-boolean": ke,
@@ -6353,19 +6353,19 @@ function Qs(r, e, t, n) {
6353
6353
  }
6354
6354
  return !1;
6355
6355
  }
6356
- function Me(r) {
6356
+ function Ie(r) {
6357
6357
  return { type: r };
6358
6358
  }
6359
6359
  le.register(rn, {
6360
6360
  error: [
6361
6361
  Ki,
6362
- [M],
6362
+ [I],
6363
6363
  (r, [e]) => {
6364
6364
  throw new N(e.evaluate(r));
6365
6365
  }
6366
6366
  ],
6367
6367
  typeof: [
6368
- M,
6368
+ I,
6369
6369
  [T],
6370
6370
  (r, [e]) => j(B(e.evaluate(r)))
6371
6371
  ],
@@ -6391,11 +6391,11 @@ le.register(rn, {
6391
6391
  type: _,
6392
6392
  overloads: [
6393
6393
  [
6394
- [M],
6394
+ [I],
6395
6395
  (r, [e]) => Nn(e.evaluate(r), r.properties())
6396
6396
  ],
6397
6397
  [
6398
- [M, Re],
6398
+ [I, Re],
6399
6399
  (r, [e, t]) => Nn(e.evaluate(r), t.evaluate(r))
6400
6400
  ]
6401
6401
  ]
@@ -6404,18 +6404,18 @@ le.register(rn, {
6404
6404
  type: T,
6405
6405
  overloads: [
6406
6406
  [
6407
- [M],
6407
+ [I],
6408
6408
  (r, [e]) => fr(e.evaluate(r), r.properties())
6409
6409
  ],
6410
6410
  [
6411
- [M, Re],
6411
+ [I, Re],
6412
6412
  (r, [e, t]) => fr(e.evaluate(r), t.evaluate(r))
6413
6413
  ]
6414
6414
  ]
6415
6415
  },
6416
6416
  "feature-state": [
6417
6417
  T,
6418
- [M],
6418
+ [I],
6419
6419
  (r, [e]) => fr(e.evaluate(r), r.featureState || {})
6420
6420
  ],
6421
6421
  properties: [
@@ -6424,7 +6424,7 @@ le.register(rn, {
6424
6424
  (r) => r.properties()
6425
6425
  ],
6426
6426
  "geometry-type": [
6427
- M,
6427
+ I,
6428
6428
  [],
6429
6429
  (r) => r.geometryType()
6430
6430
  ],
@@ -6460,7 +6460,7 @@ le.register(rn, {
6460
6460
  ],
6461
6461
  "+": [
6462
6462
  b,
6463
- Me(b),
6463
+ Ie(b),
6464
6464
  (r, e) => {
6465
6465
  let t = 0;
6466
6466
  for (const n of e)
@@ -6470,7 +6470,7 @@ le.register(rn, {
6470
6470
  ],
6471
6471
  "*": [
6472
6472
  b,
6473
- Me(b),
6473
+ Ie(b),
6474
6474
  (r, e) => {
6475
6475
  let t = 1;
6476
6476
  for (const n of e)
@@ -6573,12 +6573,12 @@ le.register(rn, {
6573
6573
  ],
6574
6574
  min: [
6575
6575
  b,
6576
- Me(b),
6576
+ Ie(b),
6577
6577
  (r, e) => Math.min(...e.map((t) => t.evaluate(r)))
6578
6578
  ],
6579
6579
  max: [
6580
6580
  b,
6581
- Me(b),
6581
+ Ie(b),
6582
6582
  (r, e) => Math.max(...e.map((t) => t.evaluate(r)))
6583
6583
  ],
6584
6584
  abs: [
@@ -6606,7 +6606,7 @@ le.register(rn, {
6606
6606
  ],
6607
6607
  "filter-==": [
6608
6608
  _,
6609
- [M, T],
6609
+ [I, T],
6610
6610
  (r, [e, t]) => r.properties()[e.value] === t.value
6611
6611
  ],
6612
6612
  "filter-id-==": [
@@ -6616,12 +6616,12 @@ le.register(rn, {
6616
6616
  ],
6617
6617
  "filter-type-==": [
6618
6618
  _,
6619
- [M],
6619
+ [I],
6620
6620
  (r, [e]) => r.geometryType() === e.value
6621
6621
  ],
6622
6622
  "filter-<": [
6623
6623
  _,
6624
- [M, T],
6624
+ [I, T],
6625
6625
  (r, [e, t]) => {
6626
6626
  const n = r.properties()[e.value], a = t.value;
6627
6627
  return typeof n == typeof a && n < a;
@@ -6637,7 +6637,7 @@ le.register(rn, {
6637
6637
  ],
6638
6638
  "filter->": [
6639
6639
  _,
6640
- [M, T],
6640
+ [I, T],
6641
6641
  (r, [e, t]) => {
6642
6642
  const n = r.properties()[e.value], a = t.value;
6643
6643
  return typeof n == typeof a && n > a;
@@ -6653,7 +6653,7 @@ le.register(rn, {
6653
6653
  ],
6654
6654
  "filter-<=": [
6655
6655
  _,
6656
- [M, T],
6656
+ [I, T],
6657
6657
  (r, [e, t]) => {
6658
6658
  const n = r.properties()[e.value], a = t.value;
6659
6659
  return typeof n == typeof a && n <= a;
@@ -6669,7 +6669,7 @@ le.register(rn, {
6669
6669
  ],
6670
6670
  "filter->=": [
6671
6671
  _,
6672
- [M, T],
6672
+ [I, T],
6673
6673
  (r, [e, t]) => {
6674
6674
  const n = r.properties()[e.value], a = t.value;
6675
6675
  return typeof n == typeof a && n >= a;
@@ -6695,7 +6695,7 @@ le.register(rn, {
6695
6695
  ],
6696
6696
  "filter-type-in": [
6697
6697
  _,
6698
- [Z(M)],
6698
+ [Z(I)],
6699
6699
  (r, [e]) => e.value.indexOf(r.geometryType()) >= 0
6700
6700
  ],
6701
6701
  "filter-id-in": [
@@ -6705,13 +6705,13 @@ le.register(rn, {
6705
6705
  ],
6706
6706
  "filter-in-small": [
6707
6707
  _,
6708
- [M, Z(T)],
6708
+ [I, Z(T)],
6709
6709
  // assumes v is an array literal
6710
6710
  (r, [e, t]) => t.value.indexOf(r.properties()[e.value]) >= 0
6711
6711
  ],
6712
6712
  "filter-in-large": [
6713
6713
  _,
6714
- [M, Z(T)],
6714
+ [I, Z(T)],
6715
6715
  // assumes v is a array literal with values sorted in ascending order and of a single type
6716
6716
  (r, [e, t]) => Qs(r.properties()[e.value], t.value, 0, t.value.length - 1)
6717
6717
  ],
@@ -6723,7 +6723,7 @@ le.register(rn, {
6723
6723
  (r, [e, t]) => e.evaluate(r) && t.evaluate(r)
6724
6724
  ],
6725
6725
  [
6726
- Me(_),
6726
+ Ie(_),
6727
6727
  (r, e) => {
6728
6728
  for (const t of e)
6729
6729
  if (!t.evaluate(r))
@@ -6741,7 +6741,7 @@ le.register(rn, {
6741
6741
  (r, [e, t]) => e.evaluate(r) || t.evaluate(r)
6742
6742
  ],
6743
6743
  [
6744
- Me(_),
6744
+ Ie(_),
6745
6745
  (r, e) => {
6746
6746
  for (const t of e)
6747
6747
  if (t.evaluate(r))
@@ -6758,7 +6758,7 @@ le.register(rn, {
6758
6758
  ],
6759
6759
  "is-supported-script": [
6760
6760
  _,
6761
- [M],
6761
+ [I],
6762
6762
  // At parse time this will always return true, so we need to exclude this expression with isGlobalPropertyConstant
6763
6763
  (r, [e]) => {
6764
6764
  const t = r.globals && r.globals.isSupportedScript;
@@ -6766,22 +6766,22 @@ le.register(rn, {
6766
6766
  }
6767
6767
  ],
6768
6768
  upcase: [
6769
- M,
6770
- [M],
6769
+ I,
6770
+ [I],
6771
6771
  (r, [e]) => e.evaluate(r).toUpperCase()
6772
6772
  ],
6773
6773
  downcase: [
6774
- M,
6775
- [M],
6774
+ I,
6775
+ [I],
6776
6776
  (r, [e]) => e.evaluate(r).toLowerCase()
6777
6777
  ],
6778
6778
  concat: [
6779
- M,
6780
- Me(T),
6779
+ I,
6780
+ Ie(T),
6781
6781
  (r, e) => e.map((t) => tt(t.evaluate(r))).join("")
6782
6782
  ],
6783
6783
  "resolved-locale": [
6784
- M,
6784
+ I,
6785
6785
  [Dt],
6786
6786
  (r, [e]) => e.evaluate(r).resolvedLocale()
6787
6787
  ]
@@ -6844,7 +6844,7 @@ function Jt(r, e) {
6844
6844
  t && !Jt(n, e) && (t = !1);
6845
6845
  }), t;
6846
6846
  }
6847
- function Ir(r) {
6847
+ function Mr(r) {
6848
6848
  return { result: "success", value: r };
6849
6849
  }
6850
6850
  function Be(r) {
@@ -6859,7 +6859,7 @@ function Pa(r) {
6859
6859
  function Ra(r) {
6860
6860
  return !!r.expression && r.expression.interpolated;
6861
6861
  }
6862
- function I(r) {
6862
+ function M(r) {
6863
6863
  return r instanceof Number ? "number" : r instanceof String ? "string" : r instanceof Boolean ? "boolean" : Array.isArray(r) ? "array" : r === null ? "null" : typeof r;
6864
6864
  }
6865
6865
  function nn(r) {
@@ -6891,7 +6891,7 @@ function za(r) {
6891
6891
  }
6892
6892
  function Fa(r, e) {
6893
6893
  const t = new Vt(rn, zt, [], e ? nl(e) : void 0), n = t.parse(r, void 0, void 0, void 0, e && e.type === "string" ? { typeAnnotation: "coerce" } : void 0);
6894
- return n ? Ir(new tl(n, e)) : Be(t.errors);
6894
+ return n ? Mr(new tl(n, e)) : Be(t.errors);
6895
6895
  }
6896
6896
  class Dn {
6897
6897
  constructor(e, t) {
@@ -6936,9 +6936,9 @@ function rl(r, e) {
6936
6936
  if (i instanceof he && !Ra(e))
6937
6937
  return Be([new fe("", '"interpolate" expressions cannot be used with this property')]);
6938
6938
  if (!i)
6939
- return Ir(a ? new Dn("constant", t.value) : new Dn("source", t.value));
6939
+ return Mr(a ? new Dn("constant", t.value) : new Dn("source", t.value));
6940
6940
  const s = i instanceof he ? i.interpolation : void 0;
6941
- return Ir(a ? new Un("camera", t.value, i.labels, s) : new Un("composite", t.value, i.labels, s));
6941
+ return Mr(a ? new Un("camera", t.value, i.labels, s) : new Un("composite", t.value, i.labels, s));
6942
6942
  }
6943
6943
  function Ct(r) {
6944
6944
  let e = null;
@@ -6962,9 +6962,9 @@ function an(r, e = /* @__PURE__ */ new Set()) {
6962
6962
  function nl(r) {
6963
6963
  const e = {
6964
6964
  color: de,
6965
- string: M,
6965
+ string: I,
6966
6966
  number: b,
6967
- enum: M,
6967
+ enum: I,
6968
6968
  boolean: _,
6969
6969
  formatted: Ut,
6970
6970
  padding: Bt,
@@ -7048,7 +7048,7 @@ function je(r) {
7048
7048
  function te(r) {
7049
7049
  const e = r.key, t = r.value, n = r.valueSpec || {}, a = r.objectElementValidators || {}, o = r.style, i = r.styleSpec, s = r.validateSpec;
7050
7050
  let l = [];
7051
- const u = I(t);
7051
+ const u = M(t);
7052
7052
  if (u !== "object")
7053
7053
  return [new g(e, t, `object expected, ${u} found`)];
7054
7054
  for (const c in t) {
@@ -7083,8 +7083,8 @@ function te(r) {
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
- if (I(e) !== "array")
7087
- return [new g(i, e, `array expected, ${I(e)} found`)];
7086
+ if (M(e) !== "array")
7087
+ return [new g(i, e, `array expected, ${M(e)} found`)];
7088
7088
  if (t.length && e.length !== t.length)
7089
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"])
@@ -7093,7 +7093,7 @@ function on(r) {
7093
7093
  type: t.value,
7094
7094
  values: t.values
7095
7095
  };
7096
- o.$version < 7 && (l.function = t.function), I(t.value) === "object" && (l = t.value);
7096
+ o.$version < 7 && (l.function = t.function), M(t.value) === "object" && (l = t.value);
7097
7097
  let u = [];
7098
7098
  for (let c = 0; c < e.length; c++)
7099
7099
  u = u.concat(s({
@@ -7110,13 +7110,13 @@ function on(r) {
7110
7110
  }
7111
7111
  function Qt(r) {
7112
7112
  const e = r.key, t = r.value, n = r.valueSpec;
7113
- let a = I(t);
7113
+ let a = M(t);
7114
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);
7118
7118
  let n, a = {}, o, i;
7119
- const s = t !== "categorical" && r.value.property === void 0, l = !s, u = I(r.value.stops) === "array" && I(r.value.stops[0]) === "array" && I(r.value.stops[0][0]) === "object", c = te({
7119
+ const s = t !== "categorical" && r.value.property === void 0, l = !s, u = M(r.value.stops) === "array" && M(r.value.stops[0]) === "array" && M(r.value.stops[0][0]) === "object", c = te({
7120
7120
  key: r.key,
7121
7121
  value: r.value,
7122
7122
  valueSpec: r.styleSpec.function,
@@ -7142,18 +7142,18 @@ function ja(r) {
7142
7142
  style: y.style,
7143
7143
  styleSpec: y.styleSpec,
7144
7144
  arrayElementValidator: f
7145
- })), I(w) === "array" && w.length === 0 && m.push(new g(y.key, w, "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
7149
  const w = y.value, v = y.key;
7150
- if (I(w) !== "array")
7151
- return [new g(v, w, `array expected, ${I(w)} found`)];
7150
+ if (M(w) !== "array")
7151
+ return [new g(v, w, `array expected, ${M(w)} found`)];
7152
7152
  if (w.length !== 2)
7153
7153
  return [new g(v, w, `array length 2 expected, length ${w.length} found`)];
7154
7154
  if (u) {
7155
- if (I(w[0]) !== "object")
7156
- return [new g(v, w, `object expected, ${I(w[0])} found`)];
7155
+ if (M(w[0]) !== "object")
7156
+ return [new g(v, w, `object expected, ${M(w[0])} found`)];
7157
7157
  if (w[0].zoom === void 0)
7158
7158
  return [new g(v, w, "object stop key must have zoom")];
7159
7159
  if (w[0].value === void 0)
@@ -7187,7 +7187,7 @@ function ja(r) {
7187
7187
  }));
7188
7188
  }
7189
7189
  function d(y, m) {
7190
- const w = I(y.value), v = 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
7192
  n = w;
7193
7193
  else if (w !== n)
@@ -7231,11 +7231,11 @@ function Ke(r) {
7231
7231
  return [];
7232
7232
  }
7233
7233
  function ol(r) {
7234
- const e = r.value, t = r.key, n = I(e);
7234
+ const e = r.value, t = r.key, n = M(e);
7235
7235
  return n !== "boolean" ? [new g(t, e, `boolean expected, ${n} found`)] : [];
7236
7236
  }
7237
7237
  function Pr(r) {
7238
- const e = r.key, t = r.value, n = I(t);
7238
+ const e = r.key, t = r.value, n = M(t);
7239
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
7241
  function ut(r) {
@@ -7250,8 +7250,8 @@ function sn(r) {
7250
7250
  }
7251
7251
  function Na(r) {
7252
7252
  const e = r.value, t = r.key;
7253
- if (I(e) !== "array")
7254
- return [new g(t, e, `array expected, ${I(e)} found`)];
7253
+ if (M(e) !== "array")
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)
@@ -7275,9 +7275,9 @@ function Na(r) {
7275
7275
  /* falls through */
7276
7276
  case "in":
7277
7277
  case "!in":
7278
- e.length >= 2 && (a = I(e[1]), a !== "string" && o.push(new g(`${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 = I(e[i]), U(e[1]) === "$type" ? o = o.concat(ut({
7280
+ a = M(e[i]), U(e[1]) === "$type" ? o = o.concat(ut({
7281
7281
  key: `${t}[${i}]`,
7282
7282
  value: e[i],
7283
7283
  valueSpec: n.geometry_type,
@@ -7298,7 +7298,7 @@ function Na(r) {
7298
7298
  break;
7299
7299
  case "has":
7300
7300
  case "!has":
7301
- a = I(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`));
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;
@@ -7320,7 +7320,7 @@ function Da(r, e) {
7320
7320
  if (!c)
7321
7321
  return [new g(t, i, `unknown property "${s}"`)];
7322
7322
  let p;
7323
- if (I(i) === "string" && Ft(c) && !c.tokens && (p = /^{([^}]+)}$/.exec(i)))
7323
+ if (M(i) === "string" && Ft(c) && !c.tokens && (p = /^{([^}]+)}$/.exec(i)))
7324
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 = [];
@@ -7344,8 +7344,8 @@ function Ba(r) {
7344
7344
  function qa(r) {
7345
7345
  let e = [];
7346
7346
  const t = r.value, n = r.key, a = r.style, o = r.styleSpec;
7347
- if (I(t) !== "object")
7348
- return [new g(n, t, `object expected, ${I(t)} found`)];
7347
+ if (M(t) !== "object")
7348
+ return [new g(n, t, `object expected, ${M(t)} found`)];
7349
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);
@@ -7431,14 +7431,14 @@ function qa(r) {
7431
7431
  })), e;
7432
7432
  }
7433
7433
  function Ne(r) {
7434
- const e = r.value, t = r.key, n = I(e);
7434
+ const e = r.value, t = r.key, n = M(e);
7435
7435
  return n !== "string" ? [new g(t, e, `string expected, ${n} found`)] : [];
7436
7436
  }
7437
7437
  function il(r) {
7438
7438
  var e;
7439
7439
  const t = (e = r.sourceName) !== null && e !== void 0 ? e : "", n = r.value, a = r.styleSpec, o = a.source_raster_dem, i = r.style;
7440
7440
  let s = [];
7441
- const l = I(n);
7441
+ const l = M(n);
7442
7442
  if (n === void 0)
7443
7443
  return s;
7444
7444
  if (l !== "object")
@@ -7536,7 +7536,7 @@ function Ga(r) {
7536
7536
  }
7537
7537
  }
7538
7538
  function sl({ key: r, value: e }) {
7539
- if (I(e) === "string")
7539
+ if (M(e) === "string")
7540
7540
  return Ne({ key: r, value: e });
7541
7541
  {
7542
7542
  const t = [];
@@ -7548,7 +7548,7 @@ function sl({ key: r, value: e }) {
7548
7548
  function Va(r) {
7549
7549
  const e = r.value, t = r.styleSpec, n = t.light, a = r.style;
7550
7550
  let o = [];
7551
- const i = I(e);
7551
+ const i = M(e);
7552
7552
  if (e === void 0)
7553
7553
  return o;
7554
7554
  if (i !== "object")
@@ -7574,7 +7574,7 @@ function Va(r) {
7574
7574
  return o;
7575
7575
  }
7576
7576
  function Ha(r) {
7577
- const e = r.value, t = r.styleSpec, n = t.sky, a = r.style, o = I(e);
7577
+ const e = r.value, t = r.styleSpec, n = t.sky, a = r.style, o = M(e);
7578
7578
  if (e === void 0)
7579
7579
  return [];
7580
7580
  if (o !== "object")
@@ -7593,7 +7593,7 @@ function Ha(r) {
7593
7593
  function Ka(r) {
7594
7594
  const e = r.value, t = r.styleSpec, n = t.terrain, a = r.style;
7595
7595
  let o = [];
7596
- const i = I(e);
7596
+ const i = M(e);
7597
7597
  if (e === void 0)
7598
7598
  return o;
7599
7599
  if (i !== "object")
@@ -7617,7 +7617,7 @@ function ul(r) {
7617
7617
  }
7618
7618
  function cl(r) {
7619
7619
  const e = r.key, t = r.value;
7620
- if (I(t) === "array") {
7620
+ if (M(t) === "array") {
7621
7621
  if (t.length < 1 || t.length > 4)
7622
7622
  return [new g(e, t, `padding requires 1 to 4 values; ${t.length} values found`)];
7623
7623
  const a = {
@@ -7641,7 +7641,7 @@ function cl(r) {
7641
7641
  }
7642
7642
  function pl(r) {
7643
7643
  const e = r.key, t = r.value;
7644
- if (I(t) === "array") {
7644
+ if (M(t) === "array") {
7645
7645
  const a = {
7646
7646
  type: "number"
7647
7647
  };
@@ -7665,7 +7665,7 @@ function pl(r) {
7665
7665
  }
7666
7666
  function fl(r) {
7667
7667
  const e = r.key, t = r.value;
7668
- if (I(t) === "array") {
7668
+ if (M(t) === "array") {
7669
7669
  if (t.length < 1)
7670
7670
  return [new g(e, t, "array length at least 1 expected, length 0 found")];
7671
7671
  let a = [];
@@ -7682,7 +7682,7 @@ function fl(r) {
7682
7682
  });
7683
7683
  }
7684
7684
  function dl(r) {
7685
- const e = r.key, t = r.value, n = I(t), a = r.styleSpec;
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
7687
  return [new g(e, t, "variableAnchorOffsetCollection requires a non-empty array of even length")];
7688
7688
  let o = [];
@@ -7736,7 +7736,7 @@ function Xa(r) {
7736
7736
  });
7737
7737
  }
7738
7738
  function hl(r) {
7739
- const e = r.value, t = r.styleSpec, n = t.projection, a = r.style, o = I(e);
7739
+ const e = r.value, t = r.styleSpec, n = t.projection, a = r.style, o = M(e);
7740
7740
  if (e === void 0)
7741
7741
  return [];
7742
7742
  if (o !== "object")
@@ -7756,7 +7756,7 @@ function yl(r) {
7756
7756
  const e = r.key;
7757
7757
  let t = r.value;
7758
7758
  t = t instanceof String ? t.valueOf() : t;
7759
- const n = I(t);
7759
+ const n = M(t);
7760
7760
  return n === "array" && !gl(t) && !ml(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 ml(r) {
@@ -7770,7 +7770,7 @@ function vl(r) {
7770
7770
  }
7771
7771
  function Wa(r) {
7772
7772
  return vl(r.value) ? [] : [
7773
- new g(r.key, r.value, `object expected, ${I(r.value)} found`)
7773
+ new g(r.key, r.value, `object expected, ${M(r.value)} found`)
7774
7774
  ];
7775
7775
  }
7776
7776
  const qn = {
@@ -7889,11 +7889,11 @@ function Gn(r) {
7889
7889
  isFallback: !1
7890
7890
  };
7891
7891
  }
7892
- return r instanceof Mo ? {
7892
+ return r instanceof Io ? {
7893
7893
  style: r.getExpandedStyleURL(),
7894
7894
  requiresUrlMonitoring: !1,
7895
7895
  isFallback: !1
7896
- } : r instanceof Io ? {
7896
+ } : r instanceof Mo ? {
7897
7897
  style: r.getDefaultVariant().getExpandedStyleURL(),
7898
7898
  requiresUrlMonitoring: !1,
7899
7899
  isFallback: !1
@@ -8132,7 +8132,7 @@ class dr {
8132
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
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 Iu(P(this, K)), this.map.once("style.load", () => {
8135
+ return P(this, K).container = P(this, Se), P(this, K).zoom = e.getZoom() + P(this, K).zoomAdjust, this.map = new Mu(P(this, K)), this.map.once("style.load", () => {
8136
8136
  this.map.resize();
8137
8137
  }), this.map.once("load", () => {
8138
8138
  H(this, q, Ja).call(this, P(this, K).parentRect), _e(this, pt, H(this, q, Qa).call(this));
@@ -8228,13 +8228,13 @@ class Ll {
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 Al = "@maptiler/sdk", El = "3.4.1-rc1", Tl = "The Javascript & TypeScript map SDK tailored for MapTiler Cloud", _l = "MapTiler", Ml = "dist/maptiler-sdk.mjs", Il = "dist/maptiler-sdk.d.ts", Pl = "dist/maptiler-sdk.css", Rl = "module", zl = "dist/maptiler-sdk.mjs", Fl = { ".": { 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" } }, $l = ["maptiler", "map", "sdk", "webmap", "cloud", "webGL", "maplibre"], Ol = "https://docs.maptiler.com/sdk-js/", jl = "BSD-3-Clause", Nl = { type: "git", url: "https://github.com/maptiler/maptiler-sdk-js.git" }, Dl = { 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" }, Ul = { "@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" }, Bl = { "@maplibre/maplibre-gl-style-spec": "^23.0.0", "@maptiler/client": "^2.3.2", events: "^3.3.0", "gl-matrix": "^3.4.3", "js-base64": "^3.7.7", "maplibre-gl": "^5.5.0", uuid: "^11.0.5" }, ql = {
8231
+ const Al = "@maptiler/sdk", El = "3.4.1-rc2", Tl = "The Javascript & TypeScript map SDK tailored for MapTiler Cloud", _l = "MapTiler", Il = "dist/maptiler-sdk.mjs", Ml = "dist/maptiler-sdk.d.ts", Pl = "dist/maptiler-sdk.css", Rl = "module", zl = "dist/maptiler-sdk.mjs", Fl = { ".": { 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" } }, $l = ["maptiler", "map", "sdk", "webmap", "cloud", "webGL", "maplibre"], Ol = "https://docs.maptiler.com/sdk-js/", jl = "BSD-3-Clause", Nl = { type: "git", url: "https://github.com/maptiler/maptiler-sdk-js.git" }, Dl = { 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" }, Ul = { "@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" }, Bl = { "@maplibre/maplibre-gl-style-spec": "^23.0.0", "@maptiler/client": "^2.3.2", events: "^3.3.0", "gl-matrix": "^3.4.3", "js-base64": "^3.7.7", "maplibre-gl": "^5.5.0", uuid: "^11.0.5" }, ql = {
8232
8232
  name: Al,
8233
8233
  version: El,
8234
8234
  description: Tl,
8235
8235
  author: _l,
8236
- module: Ml,
8237
- types: Il,
8236
+ module: Il,
8237
+ types: Ml,
8238
8238
  style: Pl,
8239
8239
  type: Rl,
8240
8240
  main: zl,
@@ -9070,9 +9070,13 @@ const Ge = {
9070
9070
  "milkyway-bright": {
9071
9071
  color: "hsl(233,100%,92%)",
9072
9072
  preset: "milkyway-bright"
9073
+ },
9074
+ "milkyway-colored": {
9075
+ color: "black",
9076
+ preset: "milkyway-colored"
9073
9077
  }
9074
9078
  };
9075
- var Ie = /* @__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))(Ie || {});
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 || {});
9076
9080
  let br, ra;
9077
9081
  function gu({ gl: r, faces: e, onLoadedCallback: t, forceRefresh: n }) {
9078
9082
  if (br && !n && ra === JSON.stringify(e))
@@ -9103,17 +9107,17 @@ function gu({ gl: r, faces: e, onLoadedCallback: t, forceRefresh: n }) {
9103
9107
  }), 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), br = a, a;
9104
9108
  }
9105
9109
  function vu(r, e) {
9106
- if (e === Ie.POSITIVE_X)
9110
+ if (e === Me.POSITIVE_X)
9107
9111
  return r.TEXTURE_CUBE_MAP_POSITIVE_X;
9108
- if (e === Ie.NEGATIVE_X)
9112
+ if (e === Me.NEGATIVE_X)
9109
9113
  return r.TEXTURE_CUBE_MAP_NEGATIVE_X;
9110
- if (e === Ie.POSITIVE_Y)
9114
+ if (e === Me.POSITIVE_Y)
9111
9115
  return r.TEXTURE_CUBE_MAP_POSITIVE_Y;
9112
- if (e === Ie.NEGATIVE_Y)
9116
+ if (e === Me.NEGATIVE_Y)
9113
9117
  return r.TEXTURE_CUBE_MAP_NEGATIVE_Y;
9114
- if (e === Ie.POSITIVE_Z)
9118
+ if (e === Me.POSITIVE_Z)
9115
9119
  return r.TEXTURE_CUBE_MAP_POSITIVE_Z;
9116
- if (e === Ie.NEGATIVE_Z)
9120
+ if (e === Me.NEGATIVE_Z)
9117
9121
  return r.TEXTURE_CUBE_MAP_NEGATIVE_Z;
9118
9122
  throw new Error(`[CubemapLayer][loadCubemapTexture]: Invalid key ${e}`);
9119
9123
  }
@@ -9139,10 +9143,11 @@ function Cu(r, e) {
9139
9143
  if (r.faces || r.path)
9140
9144
  return delete t.preset, t;
9141
9145
  const n = r.preset;
9142
- if (!(n in Ge))
9146
+ if (!(n === void 0) && !(n in Ge))
9143
9147
  throw new Error(`[CubemapLayer]: Invalid preset "${n}". Available presets: ${Object.keys(Ge).join(", ")}`);
9144
9148
  return {
9145
9149
  ...t,
9150
+ // this _could_ be nullish_
9146
9151
  color: t.color ?? Ge[n].color ?? "hsl(233,100%,92%)"
9147
9152
  };
9148
9153
  }
@@ -9247,6 +9252,12 @@ class wr {
9247
9252
  * @type {string}
9248
9253
  */
9249
9254
  S(this, "currentFacesDefinitionKey", "");
9255
+ /**
9256
+ * The configuration options for the cubemap layer.
9257
+ * @type {CubemapLayerConstructorOptions}
9258
+ * @private
9259
+ */
9260
+ S(this, "options");
9250
9261
  /**
9251
9262
  * Animates the cubemap image fading in.
9252
9263
  * This method gradually increases the opacity of the cubemap image to create a fade-in effect.
@@ -9262,7 +9273,7 @@ class wr {
9262
9273
  */
9263
9274
  S(this, "imageFadeInDelta", 0);
9264
9275
  const t = Cu(e, ku);
9265
- this.currentFacesDefinitionKey = JSON.stringify(t.faces ?? t.preset ?? t.path), this.bgColor = [0, 0, 0, 0], this.targetBgColor = At(t.color), this.faces = aa(t), this.useCubemapTexture = this.faces !== null;
9276
+ 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 = aa(t), this.useCubemapTexture = this.faces !== null;
9266
9277
  }
9267
9278
  /**
9268
9279
  * Updates the cubemap object with the current faces and shader configuration.
@@ -9334,7 +9345,7 @@ class wr {
9334
9345
  * @param {CustomRenderMethodInput} _options - Additional options for the render method.
9335
9346
  */
9336
9347
  prerender(e, t) {
9337
- this.updateTexture(e, this.faces);
9348
+ this.faces && this.updateTexture(e, this.faces);
9338
9349
  }
9339
9350
  /**
9340
9351
  * Lerps the background color transition of the cubemap layer.
@@ -9396,13 +9407,13 @@ class wr {
9396
9407
  throw new Error("[CubemapLayer]: Map is undefined");
9397
9408
  if (this.cubemap === void 0)
9398
9409
  throw new Error("[CubemapLayer]: Cubemap is undefined");
9399
- this.texture === void 0 && console.warn("[CubemapLayer]: Texture is undefined, no teture 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);
9410
+ 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);
9400
9411
  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();
9401
9412
  Zl(u, l, i, n, a), Xn(u, u, s.rollInRadians), Kn(u, u, -s.pitchInRadians), Xn(u, u, s.bearingInRadians);
9402
9413
  const c = s.center.lat * Math.PI / 180, p = s.center.lng * Math.PI / 180;
9403
9414
  Kn(u, u, c), Xl(u, u, -p), e.uniformMatrix4fv(this.cubemap.programInfo.uniformsLocations.projectionMatrix, !1, u);
9404
9415
  const f = rt();
9405
- if (e.uniformMatrix4fv(this.cubemap.programInfo.uniformsLocations.modelViewMatrix, !1, f), e.uniform4fv(this.cubemap.programInfo.uniformsLocations.bgColor, new Float32Array(this.bgColor)), this.texture === void 0 && console.warn("[CubemapLayer]: Texture is undefined, no texture will be rendered to cubemap"), this.useCubemapTexture && this.texture && (e.uniform1f(this.cubemap.programInfo.uniformsLocations.fadeOpacity, this.currentFadeOpacity), e.activeTexture(e.TEXTURE0), e.bindTexture(e.TEXTURE_CUBE_MAP, this.texture), e.uniform1i(this.cubemap.programInfo.uniformsLocations.cubeSampler, 0)), this.cubemap.indexBuffer === void 0)
9416
+ 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)
9406
9417
  throw new Error("Index buffer is undefined");
9407
9418
  if (this.cubemap.indexBufferLength === void 0)
9408
9419
  throw new Error("Index buffer length is undefined");
@@ -9411,8 +9422,19 @@ class wr {
9411
9422
  setBgColor(e) {
9412
9423
  this.targetBgColor = e, this.previousBgColor = this.bgColor, this.transitionDelta = 0;
9413
9424
  }
9425
+ /**
9426
+ * Returns the current configuration options for the cubemap layer.
9427
+ * @returns {CubemapLayerConstructorOptions} The current configuration options.
9428
+ */
9429
+ getConfig() {
9430
+ return this.options;
9431
+ }
9414
9432
  async setCubemapFaces(e) {
9415
- await this.animateOut(), this.faces = aa(e), this.currentFacesDefinitionKey = JSON.stringify(e.faces ?? e.preset ?? e.path);
9433
+ if (await this.animateOut(), !e.faces && !e.preset && !e.path) {
9434
+ this.faces = null, this.useCubemapTexture = !1, this.currentFacesDefinitionKey = "", this.animateIn();
9435
+ return;
9436
+ }
9437
+ this.faces = aa(e), this.currentFacesDefinitionKey = JSON.stringify(e.faces ?? e.preset ?? e.path);
9416
9438
  }
9417
9439
  /**
9418
9440
  * Sets the cubemap for the layer based on the provided definition.
@@ -9427,8 +9449,9 @@ class wr {
9427
9449
  * Finally, it calls `updateCubemap` to apply the changes and trigger a repaint of the map.
9428
9450
  */
9429
9451
  async setCubemap(e) {
9452
+ this.options = e;
9430
9453
  const t = JSON.stringify(e.faces ?? e.preset ?? e.path);
9431
- t && this.currentFacesDefinitionKey !== t && await this.setCubemapFaces(e);
9454
+ this.currentFacesDefinitionKey !== t && await this.setCubemapFaces(e);
9432
9455
  const n = At(e.color);
9433
9456
  if (e.color && this.targetBgColor.toString() !== n.toString())
9434
9457
  this.setBgColor(n);
@@ -9749,11 +9772,11 @@ function xt(r) {
9749
9772
  const { map: e, property: t } = r, n = e.getStyle();
9750
9773
  return n ? (a = n.metadata) != null && a.maptiler ? n.metadata.maptiler[t] ? n.metadata.maptiler[t] : null : (console.warn(`[extractCustomLayerStyle]: No custom layer metadata found in the style for property \`${t}\`. The property will use default values.`), null) : (console.warn("[extractCustomLayerStyle]: `Map.getStyle()` is returning undefined, are you initiating before style is ready?"), null);
9751
9774
  }
9752
- const Mu = {
9775
+ const Iu = {
9753
9776
  POINT: "POINT",
9754
9777
  COUNTRY: "COUNTRY"
9755
9778
  };
9756
- let Iu = class ro extends k.Map {
9779
+ let Mu = class ro extends k.Map {
9757
9780
  constructor(t) {
9758
9781
  Ko(t.container), t.apiKey && (D.apiKey = t.apiKey);
9759
9782
  const { style: n, requiresUrlMonitoring: a, isFallback: o } = Gn(t.style);
@@ -9828,7 +9851,7 @@ let Iu = class ro extends k.Map {
9828
9851
  if (!t.geolocate || t.center || t.hash && i)
9829
9852
  return;
9830
9853
  try {
9831
- if (t.geolocate === Mu.COUNTRY) {
9854
+ if (t.geolocate === Iu.COUNTRY) {
9832
9855
  await this.fitToIpBounds();
9833
9856
  return;
9834
9857
  }
@@ -10006,6 +10029,13 @@ let Iu = class ro extends k.Map {
10006
10029
  getSpace() {
10007
10030
  return this.space;
10008
10031
  }
10032
+ /**
10033
+ * Sets the space for the map.
10034
+ * @param {CubemapDefinition} space the `CubemapDefinition` options to set.
10035
+ * @remarks This method, at present, ** overwrites ** the current config.
10036
+ * If an option is not set it will internally revert to the default option
10037
+ * unless explicitly set when calling.
10038
+ */
10009
10039
  setSpace(t) {
10010
10040
  if (this.space) {
10011
10041
  this.space.setCubemap(t);
@@ -10017,12 +10047,42 @@ let Iu = class ro extends k.Map {
10017
10047
  });
10018
10048
  }
10019
10049
  setSpaceFromStyle({ style: t }) {
10020
- var n, a, o;
10021
- (a = (n = t.metadata) == null ? void 0 : n.maptiler) != null && a.space && ((o = this.space) == null || o.setCubemap(t.metadata.maptiler.space));
10050
+ var o, i;
10051
+ if (!((i = (o = t.metadata) == null ? void 0 : o.maptiler) != null && i.space))
10052
+ return;
10053
+ const n = t.metadata.maptiler.space, a = () => {
10054
+ if (this.space) {
10055
+ const s = this.getLayersOrder()[0];
10056
+ this.addLayer(this.space, s), this.space.setCubemap(n);
10057
+ }
10058
+ };
10059
+ if (!this.styleInProcess) {
10060
+ a();
10061
+ return;
10062
+ }
10063
+ this.once("style.load", () => {
10064
+ a();
10065
+ });
10022
10066
  }
10023
10067
  setHaloFromStyle({ style: t }) {
10024
- var n, a, o;
10025
- (a = (n = t.metadata) == null ? void 0 : n.maptiler) != null && a.halo && ((o = this.halo) == null || o.setGradient(t.metadata.maptiler.halo));
10068
+ var o;
10069
+ const n = (o = t.metadata) == null ? void 0 : o.maptiler;
10070
+ if (!(n != null && n.halo))
10071
+ return;
10072
+ const a = () => {
10073
+ var i;
10074
+ if (this.halo) {
10075
+ const s = this.getLayersOrder().indexOf(((i = this.space) == null ? void 0 : i.id) ?? "") + 1, l = this.getLayersOrder()[s];
10076
+ this.addLayer(this.halo, l), this.halo.setGradient(n.halo);
10077
+ }
10078
+ };
10079
+ if (!this.styleInProcess) {
10080
+ a();
10081
+ return;
10082
+ }
10083
+ this.once("style.load", () => {
10084
+ a();
10085
+ });
10026
10086
  }
10027
10087
  setSpaceFromCurrentStyle() {
10028
10088
  const t = xt({ map: this, property: "space" });
@@ -10180,16 +10240,16 @@ let Iu = class ro extends k.Map {
10180
10240
  this.styleInProcess = !0, super.setStyle(a.style, n);
10181
10241
  const o = this.getLayersOrder()[0];
10182
10242
  if (typeof a.style != "string" && !a.requiresUrlMonitoring) {
10183
- if (this.space) {
10184
- const s = a.style;
10185
- this.setSpaceFromStyle({ style: s });
10186
- } else
10187
- this.initSpace({ before: o });
10188
10243
  if (this.halo) {
10189
10244
  const s = a.style;
10190
10245
  this.setHaloFromStyle({ style: s });
10191
10246
  } else
10192
10247
  this.initHalo({ before: o });
10248
+ if (this.space) {
10249
+ const s = a.style;
10250
+ this.setSpaceFromStyle({ style: s });
10251
+ } else
10252
+ this.initSpace({ before: o });
10193
10253
  return this;
10194
10254
  }
10195
10255
  this.once("style.load", () => {
@@ -12479,9 +12539,9 @@ const xc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12479
12539
  }, Symbol.toStringTag, { value: "Module" }));
12480
12540
  qo();
12481
12541
  function kc() {
12482
- return "3.4.1-rc1";
12542
+ return "3.4.1-rc2";
12483
12543
  }
12484
- const Cc = k.Map, Lc = k.Marker, Ac = k.Popup, Ec = k.Style, Tc = k.CanvasSource, _c = k.GeoJSONSource, Mc = k.ImageSource, Ic = k.RasterTileSource, Pc = k.RasterDEMTileSource, Rc = k.VectorTileSource, zc = k.VideoSource, Fc = k.NavigationControl, $c = k.GeolocateControl, Oc = k.AttributionControl, jc = k.LogoControl, Nc = k.ScaleControl, Dc = k.FullscreenControl, Uc = k.TerrainControl, Bc = k.BoxZoomHandler, qc = k.ScrollZoomHandler, Gc = k.CooperativeGesturesHandler, Vc = k.KeyboardHandler, Hc = k.TwoFingersTouchPitchHandler, Kc = k.MapWheelEvent, Xc = k.MapTouchEvent, Wc = k.MapMouseEvent, Zc = k.config, Yc = k.getVersion, {
12544
+ const Cc = k.Map, Lc = k.Marker, Ac = k.Popup, Ec = k.Style, Tc = k.CanvasSource, _c = k.GeoJSONSource, Ic = k.ImageSource, Mc = k.RasterTileSource, Pc = k.RasterDEMTileSource, Rc = k.VectorTileSource, zc = k.VideoSource, Fc = k.NavigationControl, $c = k.GeolocateControl, Oc = k.AttributionControl, jc = k.LogoControl, Nc = k.ScaleControl, Dc = k.FullscreenControl, Uc = k.TerrainControl, Bc = k.BoxZoomHandler, qc = k.ScrollZoomHandler, Gc = k.CooperativeGesturesHandler, Vc = k.KeyboardHandler, Hc = k.TwoFingersTouchPitchHandler, Kc = k.MapWheelEvent, Xc = k.MapTouchEvent, Wc = k.MapMouseEvent, Zc = k.config, Yc = k.getVersion, {
12485
12545
  setRTLTextPlugin: Jc,
12486
12546
  getRTLTextPluginStatus: Qc,
12487
12547
  LngLat: ep,
@@ -12523,7 +12583,7 @@ export {
12523
12583
  mo as ColorRampCollection,
12524
12584
  mc as CooperativeGesturesHandler,
12525
12585
  Gc as CooperativeGesturesHandlerMLGL,
12526
- Ie as CubemapFaceNames,
12586
+ Me as CubemapFaceNames,
12527
12587
  mu as CubemapImagesPresets,
12528
12588
  wr as CubemapLayer,
12529
12589
  ge as DOMcreate,
@@ -12539,10 +12599,10 @@ export {
12539
12599
  _c as GeoJSONSourceMLGL,
12540
12600
  ri as GeolocateControl,
12541
12601
  $c as GeolocateControlMLGL,
12542
- Mu as GeolocationType,
12602
+ Iu as GeolocationType,
12543
12603
  sp as Hash,
12544
12604
  sc as ImageSource,
12545
- Mc as ImageSourceMLGL,
12605
+ Ic as ImageSourceMLGL,
12546
12606
  gc as KeyboardHandler,
12547
12607
  Vc as KeyboardHandlerMLGL,
12548
12608
  R as Language,
@@ -12550,7 +12610,7 @@ export {
12550
12610
  tp as LngLatBounds,
12551
12611
  ni as LogoControl,
12552
12612
  jc as LogoControlMLGL,
12553
- Iu as Map,
12613
+ Mu as Map,
12554
12614
  Cc as MapMLGL,
12555
12615
  Sc as MapMouseEvent,
12556
12616
  Wc as MapMouseEventMLGL,
@@ -12577,14 +12637,14 @@ export {
12577
12637
  uc as RasterDEMTileSource,
12578
12638
  Pc as RasterDEMTileSourceMLGL,
12579
12639
  lc as RasterTileSource,
12580
- Ic as RasterTileSourceMLGL,
12581
- Mp as ReferenceMapStyle,
12640
+ Mc as RasterTileSourceMLGL,
12641
+ Ip as ReferenceMapStyle,
12582
12642
  ai as ScaleControl,
12583
12643
  Nc as ScaleControlMLGL,
12584
12644
  yc as ScrollZoomHandler,
12585
12645
  qc as ScrollZoomHandlerMLGL,
12586
12646
  $o as SdkConfig,
12587
- Ip as ServiceError,
12647
+ Mp as ServiceError,
12588
12648
  ac as Style,
12589
12649
  Ec as StyleMLGL,
12590
12650
  Uc as TerrainControMLGL,