@nika-js/onlymap 0.7.5 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +4 -2
  3. package/dist/{LercDecode.es-DYwn8YTS.js → LercDecode.es--DH6_OFE.js} +1 -1
  4. package/dist/{basemap-CtEc5BCi.js → basemap-2ZZ_9gFn.js} +528 -502
  5. package/dist/basemap.d.ts +15 -0
  6. package/dist/cartograph/api.d.ts +45 -0
  7. package/dist/cartograph/atlas.d.ts +50 -0
  8. package/dist/cartograph/core-loader.d.ts +35 -0
  9. package/dist/cartograph/cvd.d.ts +106 -0
  10. package/dist/cartograph/element-base.d.ts +26 -0
  11. package/dist/cartograph/elements/om-atlas.d.ts +47 -0
  12. package/dist/cartograph/elements/om-cartograph.d.ts +76 -0
  13. package/dist/cartograph/elements/om-frame.d.ts +111 -0
  14. package/dist/cartograph/elements/om-graticule.d.ts +24 -0
  15. package/dist/cartograph/elements/om-image.d.ts +12 -0
  16. package/dist/cartograph/elements/om-legend.d.ts +16 -0
  17. package/dist/cartograph/elements/om-north.d.ts +11 -0
  18. package/dist/cartograph/elements/om-scalebar.d.ts +13 -0
  19. package/dist/cartograph/elements/om-shape.d.ts +16 -0
  20. package/dist/cartograph/elements/om-text.d.ts +9 -0
  21. package/dist/cartograph/georef.d.ts +126 -0
  22. package/dist/cartograph/graticule.d.ts +70 -0
  23. package/dist/cartograph/html-data.d.ts +27 -0
  24. package/dist/cartograph/index.d.ts +1 -0
  25. package/dist/cartograph/layout.d.ts +23 -0
  26. package/dist/cartograph/legend.d.ts +75 -0
  27. package/dist/cartograph/live-frame.d.ts +69 -0
  28. package/dist/cartograph/paint.d.ts +54 -0
  29. package/dist/cartograph/refs.d.ts +33 -0
  30. package/dist/cartograph/render.d.ts +64 -0
  31. package/dist/cartograph/scalebar.d.ts +91 -0
  32. package/dist/cartograph/schema.d.ts +38 -0
  33. package/dist/cartograph/standalone.d.ts +1 -0
  34. package/dist/cartograph/textlayout.d.ts +45 -0
  35. package/dist/cartograph/tokens.d.ts +45 -0
  36. package/dist/cartograph/url-actions.d.ts +26 -0
  37. package/dist/cartograph/validate.d.ts +38 -0
  38. package/dist/cartograph/zip.d.ts +22 -0
  39. package/dist/cartograph.css +1 -0
  40. package/dist/cartograph.js +2768 -0
  41. package/dist/cartograph.standalone.js +7640 -0
  42. package/dist/crs-DsDQ4Q4i.js +71 -0
  43. package/dist/download.d.ts +6 -0
  44. package/dist/feature-access.d.ts +14 -0
  45. package/dist/field-access.d.ts +1 -10
  46. package/dist/{geoparquet-RBC0ZJNm.js → geoparquet-DDZzee5Z.js} +1 -1
  47. package/dist/{index-DkimKgOm.js → index-BGOblzWN.js} +5141 -5070
  48. package/dist/index-CcLC9jE5.js +4798 -0
  49. package/dist/{index-CiGUw6GD.js → index-CeoVzd6t.js} +1 -1
  50. package/dist/{index-CJ0pib8I.js → index-Cz1VsWzO.js} +2 -2
  51. package/dist/{index-Bwu1DFHP.js → index-DkxFFflv.js} +1 -1
  52. package/dist/{index-HrEJtZoQ.js → index-DphcuoPv.js} +1 -1
  53. package/dist/index.d.ts +1 -1
  54. package/dist/{lerc-BIQMg0FV.js → lerc-D7TfTy6l.js} +2 -2
  55. package/dist/onlymap.standalone.js +8827 -8730
  56. package/dist/onlymapjs.js +12 -11
  57. package/dist/{raster-Dsugvobw.js → raster-D_3YKFZz.js} +3 -3
  58. package/dist/{raster-pipeline-rqJJRCEo.js → raster-pipeline-D1yeoJo2.js} +1 -1
  59. package/dist/runtime-core.d.ts +30 -0
  60. package/dist/snapshot.d.ts +17 -0
  61. package/dist/units.d.ts +9 -0
  62. package/dist/version.d.ts +1 -1
  63. package/dist/{zarr-CRysSFhD.js → zarr-DH5Ntt5U.js} +2 -2
  64. package/docs/cartograph.md +396 -0
  65. package/llms.txt +2 -1
  66. package/onlymapjs.attributes.json +1 -0
  67. package/onlymapjs.html-data.json +974 -0
  68. package/package.json +13 -2
  69. package/skills/onlymapjs/SKILL.md +2 -2
  70. package/skills/onlymapjs/references/syntax.md +28 -2
@@ -1,31 +1,31 @@
1
- import { C as ny, L as sy, M as oy, m as ay, c as ka, a as Sd, z as oc, G as sm, V as ly, W as cy, b as uy, g as hy, d as Vu, f as Ed, e as dy, l as py, u as fy, D as Qf, h as my } from "./index-DkimKgOm.js";
1
+ import { C as ny, L as sy, M as oy, m as ay, c as ka, a as Sd, z as oc, G as sm, V as ly, W as cy, b as uy, g as hy, d as Vu, f as Ed, e as dy, l as py, u as fy, D as Qf, h as my } from "./index-BGOblzWN.js";
2
2
  const Cd = Math.PI / 180, gy = 180 / Math.PI;
3
- function em(Pe, J = 0) {
4
- const me = Math.min(180, Pe) * Cd;
5
- return sm * 2 * Math.sin(me / 2) * Math.pow(2, J);
3
+ function em(Pe, K = 0) {
4
+ const pe = Math.min(180, Pe) * Cd;
5
+ return sm * 2 * Math.sin(pe / 2) * Math.pow(2, K);
6
6
  }
7
- function tm(Pe, J = 0) {
8
- const me = Pe / Math.pow(2, J);
9
- return Math.asin(Math.min(1, me / sm / 2)) * 2 * gy;
7
+ function tm(Pe, K = 0) {
8
+ const pe = Pe / Math.pow(2, K);
9
+ return Math.asin(Math.min(1, pe / sm / 2)) * 2 * gy;
10
10
  }
11
11
  class _y extends oy {
12
- constructor(J) {
13
- const { startPanPos: me, ...Me } = J;
14
- Me.normalize = !1, super(Me), me !== void 0 && (this._state.startPanPos = me);
12
+ constructor(K) {
13
+ const { startPanPos: pe, ...Me } = K;
14
+ Me.normalize = !1, super(Me), pe !== void 0 && (this._state.startPanPos = pe);
15
15
  }
16
- panStart({ pos: J }) {
17
- const { latitude: me, longitude: Me, zoom: Te } = this.getViewportProps();
16
+ panStart({ pos: K }) {
17
+ const { latitude: pe, longitude: Me, zoom: Te } = this.getViewportProps();
18
18
  return this._getUpdatedState({
19
- startPanLngLat: [Me, me],
20
- startPanPos: J,
19
+ startPanLngLat: [Me, pe],
20
+ startPanPos: K,
21
21
  startZoom: Te
22
22
  });
23
23
  }
24
- pan({ pos: J, startPos: me }) {
25
- const Me = this.getState(), Te = Me.startPanLngLat || this._unproject(me);
24
+ pan({ pos: K, startPos: pe }) {
25
+ const Me = this.getState(), Te = Me.startPanLngLat || this._unproject(pe);
26
26
  if (!Te)
27
27
  return this;
28
- const Le = Me.startZoom ?? this.getViewportProps().zoom, R = Me.startPanPos || me, h = [Te[0], Te[1], Le], ct = this.makeViewport(this.getViewportProps()).panByPosition(h, J, R);
28
+ const Le = Me.startZoom ?? this.getViewportProps().zoom, R = Me.startPanPos || pe, h = [Te[0], Te[1], Le], ct = this.makeViewport(this.getViewportProps()).panByPosition(h, K, R);
29
29
  return this._getUpdatedState(ct);
30
30
  }
31
31
  panEnd() {
@@ -35,35 +35,35 @@ class _y extends oy {
35
35
  startZoom: null
36
36
  });
37
37
  }
38
- zoom({ scale: J }) {
39
- const Me = (this.getState().startZoom || this.getViewportProps().zoom) + Math.log2(J);
38
+ zoom({ scale: K }) {
39
+ const Me = (this.getState().startZoom || this.getViewportProps().zoom) + Math.log2(K);
40
40
  return this._getUpdatedState({ zoom: Me });
41
41
  }
42
- applyConstraints(J) {
43
- const { longitude: me, latitude: Me, maxBounds: Te } = J;
44
- if (J.zoom = this._constrainZoom(J.zoom, J), (me < -180 || me > 180) && (J.longitude = ay(me + 180, 360) - 180), J.latitude = ka(Me, -Sd, Sd), Te && (J.longitude = ka(J.longitude, Te[0][0], Te[1][0]), J.latitude = ka(J.latitude, Te[0][1], Te[1][1])), Te) {
45
- const Le = J.zoom - oc(Me), R = Te[1][0] - Te[0][0], h = Te[1][1] - Te[0][1];
42
+ applyConstraints(K) {
43
+ const { longitude: pe, latitude: Me, maxBounds: Te } = K;
44
+ if (K.zoom = this._constrainZoom(K.zoom, K), (pe < -180 || pe > 180) && (K.longitude = ay(pe + 180, 360) - 180), K.latitude = ka(Me, -Sd, Sd), Te && (K.longitude = ka(K.longitude, Te[0][0], Te[1][0]), K.latitude = ka(K.latitude, Te[0][1], Te[1][1])), Te) {
45
+ const Le = K.zoom - oc(Me), R = Te[1][0] - Te[0][0], h = Te[1][1] - Te[0][1];
46
46
  if (h > 0 && h < Sd * 2) {
47
- const de = Math.min(tm(J.height, Le), h) / 2;
48
- J.latitude = ka(J.latitude, Te[0][1] + de, Te[1][1] - de);
47
+ const de = Math.min(tm(K.height, Le), h) / 2;
48
+ K.latitude = ka(K.latitude, Te[0][1] + de, Te[1][1] - de);
49
49
  }
50
50
  if (R > 0 && R < 360) {
51
- const de = Math.min(tm(J.width / Math.cos(J.latitude * Cd), Le), R) / 2;
52
- J.longitude = ka(J.longitude, Te[0][0] + de, Te[1][0] - de);
51
+ const de = Math.min(tm(K.width / Math.cos(K.latitude * Cd), Le), R) / 2;
52
+ K.longitude = ka(K.longitude, Te[0][0] + de, Te[1][0] - de);
53
53
  }
54
54
  }
55
- return J.latitude !== Me && (J.zoom += oc(J.latitude) - oc(Me)), J;
55
+ return K.latitude !== Me && (K.zoom += oc(K.latitude) - oc(Me)), K;
56
56
  }
57
- _constrainZoom(J, me) {
58
- me || (me = this.getViewportProps());
59
- const { latitude: Me, maxZoom: Te, maxBounds: Le } = me;
60
- let { minZoom: R } = me;
57
+ _constrainZoom(K, pe) {
58
+ pe || (pe = this.getViewportProps());
59
+ const { latitude: Me, maxZoom: Te, maxBounds: Le } = pe;
60
+ let { minZoom: R } = pe;
61
61
  const h = oc(0), de = oc(Me) - h;
62
- if (Le !== null && me.width > 0 && me.height > 0) {
62
+ if (Le !== null && pe.width > 0 && pe.height > 0) {
63
63
  const Bt = Le[0][1], fi = Le[1][1], Qi = Math.sign(Bt) === Math.sign(fi) ? Math.min(Math.abs(Bt), Math.abs(fi)) : 0, At = em(Le[1][0] - Le[0][0]) * Math.cos(Qi * Cd), si = em(Le[1][1] - Le[0][1]);
64
- At > 0 && (R = Math.max(R, Math.log2(me.width / At) + h)), si > 0 && (R = Math.max(R, Math.log2(me.height / si) + h)), R > Te && (R = Te);
64
+ At > 0 && (R = Math.max(R, Math.log2(pe.width / At) + h)), si > 0 && (R = Math.max(R, Math.log2(pe.height / si) + h)), R > Te && (R = Te);
65
65
  }
66
- return ka(J, R + de, Te + de);
66
+ return ka(K, R + de, Te + de);
67
67
  }
68
68
  }
69
69
  class yy extends ny {
@@ -73,25 +73,25 @@ class yy extends ny {
73
73
  transitionInterpolator: new sy(["longitude", "latitude", "zoom"])
74
74
  }, this.dragMode = "pan";
75
75
  }
76
- setProps(J) {
77
- super.setProps(J), this.dragRotate = !1, this.touchRotate = !1;
76
+ setProps(K) {
77
+ super.setProps(K), this.dragRotate = !1, this.touchRotate = !1;
78
78
  }
79
79
  }
80
80
  const vy = {
81
81
  cullMode: "back"
82
82
  };
83
83
  class om extends ly {
84
- constructor(J = {}) {
84
+ constructor(K = {}) {
85
85
  super({
86
- ...J,
86
+ ...K,
87
87
  parameters: {
88
88
  ...vy,
89
- ...J.parameters
89
+ ...K.parameters
90
90
  }
91
91
  });
92
92
  }
93
- getViewportType(J) {
94
- return J.zoom > 12 ? cy : uy;
93
+ getViewportType(K) {
94
+ return K.zoom > 12 ? cy : uy;
95
95
  }
96
96
  get ControllerType() {
97
97
  return yy;
@@ -105,15 +105,15 @@ var ju = { exports: {} };
105
105
  */
106
106
  var xy = ju.exports, im;
107
107
  function by() {
108
- return im || (im = 1, (function(Pe, J) {
109
- (function(me, Me) {
108
+ return im || (im = 1, (function(Pe, K) {
109
+ (function(pe, Me) {
110
110
  Pe.exports = Me();
111
111
  })(xy, (function() {
112
- var me = {}, Me = {};
112
+ var pe = {}, Me = {};
113
113
  function Te(R, h, de) {
114
114
  if (Me[R] = de, R === "index") {
115
115
  var ct = "var sharedModule = {}; (" + Me.shared + ")(sharedModule); (" + Me.worker + ")(sharedModule);", Bt = {};
116
- return Me.shared(Bt), Me.index(me, Bt), typeof window < "u" && me.setWorkerUrl(window.URL.createObjectURL(new Blob([ct], { type: "text/javascript" }))), me;
116
+ return Me.shared(Bt), Me.index(pe, Bt), typeof window < "u" && pe.setWorkerUrl(window.URL.createObjectURL(new Blob([ct], { type: "text/javascript" }))), pe;
117
117
  }
118
118
  }
119
119
  Te("shared", ["exports"], (function(R) {
@@ -275,7 +275,7 @@ function by() {
275
275
  }
276
276
  return Xe || !1;
277
277
  }
278
- var fe = 1e-6, Nt = typeof Float32Array < "u" ? Float32Array : Array;
278
+ var me = 1e-6, Nt = typeof Float32Array < "u" ? Float32Array : Array;
279
279
  function Jr() {
280
280
  var r = new Nt(9);
281
281
  return Nt != Float32Array && (r[1] = 0, r[2] = 0, r[3] = 0, r[5] = 0, r[6] = 0, r[7] = 0), r[0] = 1, r[4] = 1, r[8] = 1, r;
@@ -298,7 +298,7 @@ function by() {
298
298
  function W(r, e, i) {
299
299
  return r[0] = e[0] + i[0], r[1] = e[1] + i[1], r[2] = e[2] + i[2], r;
300
300
  }
301
- function K(r, e, i) {
301
+ function J(r, e, i) {
302
302
  return r[0] = e[0] * i, r[1] = e[1] * i, r[2] = e[2] * i, r;
303
303
  }
304
304
  function te(r, e, i) {
@@ -4802,7 +4802,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
4802
4802
  }
4803
4803
  class ge extends Ll {
4804
4804
  }
4805
- class pe extends no {
4805
+ class fe extends no {
4806
4806
  }
4807
4807
  class Ae extends d {
4808
4808
  }
@@ -5292,7 +5292,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
5292
5292
  }
5293
5293
  class aa {
5294
5294
  constructor(e) {
5295
- this.zoom = e.zoom, this.overscaling = e.overscaling, this.layers = e.layers, this.layerIds = this.layers.map(((i) => i.id)), this.index = e.index, this.hasDependencies = !1, this.layoutVertexArray = new G(), this.indexArray = new pe(), this.segments = new Ee(), this.programConfigurations = new Ir(e.layers, e.zoom), this.stateDependentLayerIds = this.layers.filter(((i) => i.isStateDependent())).map(((i) => i.id));
5295
+ this.zoom = e.zoom, this.overscaling = e.overscaling, this.layers = e.layers, this.layerIds = this.layers.map(((i) => i.id)), this.index = e.index, this.hasDependencies = !1, this.layoutVertexArray = new G(), this.indexArray = new fe(), this.segments = new Ee(), this.programConfigurations = new Ir(e.layers, e.zoom), this.stateDependentLayerIds = this.layers.filter(((i) => i.isStateDependent())).map(((i) => i.id));
5296
5296
  }
5297
5297
  populate(e, i, s) {
5298
5298
  const o = this.layers[0], l = [];
@@ -6320,7 +6320,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
6320
6320
  }
6321
6321
  class Ih {
6322
6322
  constructor(e) {
6323
- this.zoom = e.zoom, this.overscaling = e.overscaling, this.layers = e.layers, this.layerIds = this.layers.map(((i) => i.id)), this.index = e.index, this.hasDependencies = !1, this.patternFeatures = [], this.layoutVertexArray = new N(), this.indexArray = new pe(), this.indexArray2 = new Ae(), this.programConfigurations = new Ir(e.layers, e.zoom), this.segments = new Ee(), this.segments2 = new Ee(), this.stateDependentLayerIds = this.layers.filter(((i) => i.isStateDependent())).map(((i) => i.id));
6323
+ this.zoom = e.zoom, this.overscaling = e.overscaling, this.layers = e.layers, this.layerIds = this.layers.map(((i) => i.id)), this.index = e.index, this.hasDependencies = !1, this.patternFeatures = [], this.layoutVertexArray = new N(), this.indexArray = new fe(), this.indexArray2 = new Ae(), this.programConfigurations = new Ir(e.layers, e.zoom), this.segments = new Ee(), this.segments2 = new Ee(), this.stateDependentLayerIds = this.layers.filter(((i) => i.isStateDependent())).map(((i) => i.id));
6324
6324
  }
6325
6325
  populate(e, i, s) {
6326
6326
  this.hasDependencies = _u("fill", this.layers, i);
@@ -6531,7 +6531,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
6531
6531
  }
6532
6532
  class Eh {
6533
6533
  constructor(e) {
6534
- this.zoom = e.zoom, this.overscaling = e.overscaling, this.layers = e.layers, this.layerIds = this.layers.map(((i) => i.id)), this.index = e.index, this.hasDependencies = !1, this.layoutVertexArray = new Z(), this.centroidVertexArray = new V(), this.indexArray = new pe(), this.programConfigurations = new Ir(e.layers, e.zoom), this.segments = new Ee(), this.stateDependentLayerIds = this.layers.filter(((i) => i.isStateDependent())).map(((i) => i.id));
6534
+ this.zoom = e.zoom, this.overscaling = e.overscaling, this.layers = e.layers, this.layerIds = this.layers.map(((i) => i.id)), this.index = e.index, this.hasDependencies = !1, this.layoutVertexArray = new Z(), this.centroidVertexArray = new V(), this.indexArray = new fe(), this.programConfigurations = new Ir(e.layers, e.zoom), this.segments = new Ee(), this.stateDependentLayerIds = this.layers.filter(((i) => i.isStateDependent())).map(((i) => i.id));
6535
6535
  }
6536
6536
  populate(e, i, s) {
6537
6537
  this.features = [], this.hasDependencies = _u("fill-extrusion", this.layers, i);
@@ -7485,7 +7485,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
7485
7485
  constructor(e) {
7486
7486
  this.zoom = e.zoom, this.overscaling = e.overscaling, this.layers = e.layers, this.layerIds = this.layers.map(((i) => i.id)), this.index = e.index, this.hasDependencies = !1, this.patternFeatures = [], this.lineClipsArray = [], this.gradients = {};
7487
7487
  for (const i of this.layers) this.gradients[i.id] = {};
7488
- this.layoutVertexArray = new X(), this.layoutVertexArray2 = new $(), this.indexArray = new pe(), this.programConfigurations = new Ir(e.layers, e.zoom), this.segments = new Ee(), this.maxLineLength = 0, this.stateDependentLayerIds = this.layers.filter(((i) => i.isStateDependent())).map(((i) => i.id));
7488
+ this.layoutVertexArray = new X(), this.layoutVertexArray2 = new $(), this.indexArray = new fe(), this.programConfigurations = new Ir(e.layers, e.zoom), this.segments = new Ee(), this.maxLineLength = 0, this.stateDependentLayerIds = this.layers.filter(((i) => i.isStateDependent())).map(((i) => i.id));
7489
7489
  }
7490
7490
  populate(e, i, s) {
7491
7491
  this.hasDependencies = _u("line", this.layers, i) || this.hasLineDasharray(this.layers);
@@ -8474,7 +8474,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
8474
8474
  }
8475
8475
  class Yh {
8476
8476
  constructor(e) {
8477
- this.layoutVertexArray = new q(), this.indexArray = new pe(), this.programConfigurations = e, this.segments = new Ee(), this.dynamicLayoutVertexArray = new ee(), this.opacityVertexArray = new oe(), this.hasVisibleVertices = !1, this.placedSymbolArray = new y();
8477
+ this.layoutVertexArray = new q(), this.indexArray = new fe(), this.programConfigurations = e, this.segments = new Ee(), this.dynamicLayoutVertexArray = new ee(), this.opacityVertexArray = new oe(), this.hasVisibleVertices = !1, this.placedSymbolArray = new y();
8478
8478
  }
8479
8479
  isEmpty() {
8480
8480
  return this.layoutVertexArray.length === 0 && this.indexArray.length === 0 && this.dynamicLayoutVertexArray.length === 0 && this.opacityVertexArray.length === 0;
@@ -11871,7 +11871,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
11871
11871
  i = [i[0] * p - i[1] * u, i[0] * u + i[1] * p];
11872
11872
  }
11873
11873
  return [o ? i[0] : St(e, i[0], r.zoom), o ? i[1] : St(e, i[1], r.zoom)];
11874
- }, R.aN = Hh, R.aO = bd, R.aP = Wh, R.aQ = (r) => r.type === "symbol", R.aR = bu, R.aS = mt, R.aT = xu, R.aU = V, R.aV = Ee, R.aW = pe, R.aX = rn, R.aY = Hp, R.aZ = K, R.a_ = W, R.aa = ed, R.ab = (r) => {
11874
+ }, R.aN = Hh, R.aO = bd, R.aP = Wh, R.aQ = (r) => r.type === "symbol", R.aR = bu, R.aS = mt, R.aT = xu, R.aU = V, R.aV = Ee, R.aW = fe, R.aX = rn, R.aY = Hp, R.aZ = J, R.a_ = W, R.aa = ed, R.ab = (r) => {
11875
11875
  const e = window.document.createElement("video");
11876
11876
  return e.muted = !0, new Promise(((i) => {
11877
11877
  e.onloadstart = () => {
@@ -12003,8 +12003,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
12003
12003
  const s = (o = [r[0], r[1], r[2], e[0], e[1], e[2], i[0], i[1], i[2]])[0] * ((v = o[8]) * (u = o[4]) - (p = o[5]) * (m = o[7])) + o[1] * (-v * (l = o[3]) + p * (g = o[6])) + o[2] * (m * l - u * g);
12004
12004
  var o, l, u, p, g, m, v;
12005
12005
  if (s === 0) return null;
12006
- const _ = te([], [e[0], e[1], e[2]], [i[0], i[1], i[2]]), T = te([], [i[0], i[1], i[2]], [r[0], r[1], r[2]]), b = te([], [r[0], r[1], r[2]], [e[0], e[1], e[2]]), I = K([], _, -r[3]);
12007
- return W(I, I, K([], T, -e[3])), W(I, I, K([], b, -i[3])), K(I, I, 1 / s), I;
12006
+ const _ = te([], [e[0], e[1], e[2]], [i[0], i[1], i[2]]), T = te([], [i[0], i[1], i[2]], [r[0], r[1], r[2]]), b = te([], [r[0], r[1], r[2]], [e[0], e[1], e[2]]), I = J([], _, -r[3]);
12007
+ return W(I, I, J([], T, -e[3])), W(I, I, J([], b, -i[3])), J(I, I, 1 / s), I;
12008
12008
  }, R.bD = Qh, R.bE = function() {
12009
12009
  return new Float64Array(4);
12010
12010
  }, R.bF = function(r, e, i, s) {
@@ -12156,7 +12156,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
12156
12156
  return Ye(s, r, e - 90, i), s;
12157
12157
  }, R.bl = function(r, e, i, s) {
12158
12158
  var o, l, u, p, g, m = e[0], v = e[1], _ = e[2], T = e[3], b = i[0], I = i[1], M = i[2], A = i[3];
12159
- return (l = m * b + v * I + _ * M + T * A) < 0 && (l = -l, b = -b, I = -I, M = -M, A = -A), 1 - l > fe ? (o = Math.acos(l), u = Math.sin(o), p = Math.sin((1 - s) * o) / u, g = Math.sin(s * o) / u) : (p = 1 - s, g = s), r[0] = p * m + g * b, r[1] = p * v + g * I, r[2] = p * _ + g * M, r[3] = p * T + g * A, r;
12159
+ return (l = m * b + v * I + _ * M + T * A) < 0 && (l = -l, b = -b, I = -I, M = -M, A = -A), 1 - l > me ? (o = Math.acos(l), u = Math.sin(o), p = Math.sin((1 - s) * o) / u, g = Math.sin(s * o) / u) : (p = 1 - s, g = s), r[0] = p * m + g * b, r[1] = p * v + g * I, r[2] = p * _ + g * M, r[3] = p * T + g * A, r;
12160
12160
  }, R.bm = function(r) {
12161
12161
  const e = new Float64Array(9);
12162
12162
  var i, s, o, l, u, p, g, m, v, _, T, b, I, M, A, D, L, k;
@@ -12369,7 +12369,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
12369
12369
  return r[0] === e[0] && r[1] === e[1] && r[2] === e[2] && r[3] === e[3] && r[4] === e[4] && r[5] === e[5] && r[6] === e[6] && r[7] === e[7] && r[8] === e[8] && r[9] === e[9] && r[10] === e[10] && r[11] === e[11] && r[12] === e[12] && r[13] === e[13] && r[14] === e[14] && r[15] === e[15];
12370
12370
  }, R.ck = function(r, e) {
12371
12371
  var i = r[0], s = r[1], o = r[2], l = r[3], u = r[4], p = r[5], g = r[6], m = r[7], v = r[8], _ = r[9], T = r[10], b = r[11], I = r[12], M = r[13], A = r[14], D = r[15], L = e[0], k = e[1], F = e[2], O = e[3], j = e[4], Y = e[5], Q = e[6], ne = e[7], ie = e[8], le = e[9], ce = e[10], se = e[11], re = e[12], _e = e[13], Se = e[14], be = e[15];
12372
- return Math.abs(i - L) <= fe * Math.max(1, Math.abs(i), Math.abs(L)) && Math.abs(s - k) <= fe * Math.max(1, Math.abs(s), Math.abs(k)) && Math.abs(o - F) <= fe * Math.max(1, Math.abs(o), Math.abs(F)) && Math.abs(l - O) <= fe * Math.max(1, Math.abs(l), Math.abs(O)) && Math.abs(u - j) <= fe * Math.max(1, Math.abs(u), Math.abs(j)) && Math.abs(p - Y) <= fe * Math.max(1, Math.abs(p), Math.abs(Y)) && Math.abs(g - Q) <= fe * Math.max(1, Math.abs(g), Math.abs(Q)) && Math.abs(m - ne) <= fe * Math.max(1, Math.abs(m), Math.abs(ne)) && Math.abs(v - ie) <= fe * Math.max(1, Math.abs(v), Math.abs(ie)) && Math.abs(_ - le) <= fe * Math.max(1, Math.abs(_), Math.abs(le)) && Math.abs(T - ce) <= fe * Math.max(1, Math.abs(T), Math.abs(ce)) && Math.abs(b - se) <= fe * Math.max(1, Math.abs(b), Math.abs(se)) && Math.abs(I - re) <= fe * Math.max(1, Math.abs(I), Math.abs(re)) && Math.abs(M - _e) <= fe * Math.max(1, Math.abs(M), Math.abs(_e)) && Math.abs(A - Se) <= fe * Math.max(1, Math.abs(A), Math.abs(Se)) && Math.abs(D - be) <= fe * Math.max(1, Math.abs(D), Math.abs(be));
12372
+ return Math.abs(i - L) <= me * Math.max(1, Math.abs(i), Math.abs(L)) && Math.abs(s - k) <= me * Math.max(1, Math.abs(s), Math.abs(k)) && Math.abs(o - F) <= me * Math.max(1, Math.abs(o), Math.abs(F)) && Math.abs(l - O) <= me * Math.max(1, Math.abs(l), Math.abs(O)) && Math.abs(u - j) <= me * Math.max(1, Math.abs(u), Math.abs(j)) && Math.abs(p - Y) <= me * Math.max(1, Math.abs(p), Math.abs(Y)) && Math.abs(g - Q) <= me * Math.max(1, Math.abs(g), Math.abs(Q)) && Math.abs(m - ne) <= me * Math.max(1, Math.abs(m), Math.abs(ne)) && Math.abs(v - ie) <= me * Math.max(1, Math.abs(v), Math.abs(ie)) && Math.abs(_ - le) <= me * Math.max(1, Math.abs(_), Math.abs(le)) && Math.abs(T - ce) <= me * Math.max(1, Math.abs(T), Math.abs(ce)) && Math.abs(b - se) <= me * Math.max(1, Math.abs(b), Math.abs(se)) && Math.abs(I - re) <= me * Math.max(1, Math.abs(I), Math.abs(re)) && Math.abs(M - _e) <= me * Math.max(1, Math.abs(M), Math.abs(_e)) && Math.abs(A - Se) <= me * Math.max(1, Math.abs(A), Math.abs(Se)) && Math.abs(D - be) <= me * Math.max(1, Math.abs(D), Math.abs(be));
12373
12373
  }, R.cl = function(r, e) {
12374
12374
  return r[0] = e[0], r[1] = e[1], r[2] = e[2], r[3] = e[3], r[4] = e[4], r[5] = e[5], r[6] = e[6], r[7] = e[7], r[8] = e[8], r[9] = e[9], r[10] = e[10], r[11] = e[11], r[12] = e[12], r[13] = e[13], r[14] = e[14], r[15] = e[15], r;
12375
12375
  }, R.cm = (r) => r.type === "circle", R.cn = (r) => r.type === "heatmap", R.co = (r) => r.type === "line", R.cp = (r) => r.type === "fill", R.cq = (r) => r.type === "fill-extrusion", R.cr = (r) => r.type === "hillshade", R.cs = (r) => r.type === "color-relief", R.ct = (r) => r.type === "background", R.cu = (r) => r.type === "custom", R.cv = Qr, R.cw = function(r, e, i) {
@@ -12479,19 +12479,19 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
12479
12479
  }, R.s = po, R.t = Ul, R.u = vi, R.v = Ws, R.w = Jt, R.x = ue, R.y = Al, R.z = Oi;
12480
12480
  })), Te("worker", ["./shared"], (function(R) {
12481
12481
  class h {
12482
- constructor(W, K) {
12483
- this.keyCache = {}, W && this.replace(W, K);
12482
+ constructor(W, J) {
12483
+ this.keyCache = {}, W && this.replace(W, J);
12484
12484
  }
12485
- replace(W, K) {
12486
- this._layerConfigs = {}, this._layers = {}, this.update(W, [], K);
12485
+ replace(W, J) {
12486
+ this._layerConfigs = {}, this._layers = {}, this.update(W, [], J);
12487
12487
  }
12488
- update(W, K, te) {
12488
+ update(W, J, te) {
12489
12489
  for (const ze of W) {
12490
12490
  this._layerConfigs[ze.id] = ze;
12491
12491
  const Ke = this._layers[ze.id] = R.bT(ze, te);
12492
12492
  Ke._featureFilter = R.ah(Ke.filter, te), this.keyCache[ze.id] && delete this.keyCache[ze.id];
12493
12493
  }
12494
- for (const ze of K) delete this.keyCache[ze], delete this._layerConfigs[ze], delete this._layers[ze];
12494
+ for (const ze of J) delete this.keyCache[ze], delete this._layerConfigs[ze], delete this._layers[ze];
12495
12495
  this.familiesBySource = {};
12496
12496
  const ve = R.cJ(Object.values(this._layerConfigs), this.keyCache);
12497
12497
  for (const ze of ve) {
@@ -12508,9 +12508,9 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
12508
12508
  }
12509
12509
  class de {
12510
12510
  constructor(W) {
12511
- const K = {}, te = [];
12511
+ const J = {}, te = [];
12512
12512
  for (const Oe in W) {
12513
- const Ye = W[Oe], Ue = K[Oe] = {};
12513
+ const Ye = W[Oe], Ue = J[Oe] = {};
12514
12514
  for (const it in Ye) {
12515
12515
  const Be = Ye[+it];
12516
12516
  if (!Be || Be.bitmap.width === 0 || Be.bitmap.height === 0) continue;
@@ -12524,11 +12524,11 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
12524
12524
  for (const Ue in Ye) {
12525
12525
  const it = Ye[+Ue];
12526
12526
  if (!it || it.bitmap.width === 0 || it.bitmap.height === 0) continue;
12527
- const Be = K[Oe][Ue].rect;
12527
+ const Be = J[Oe][Ue].rect;
12528
12528
  R.t.copy(it.bitmap, Ke, { x: 0, y: 0 }, { x: Be.x + 1, y: Be.y + 1 }, it.bitmap);
12529
12529
  }
12530
12530
  }
12531
- this.image = Ke, this.positions = K;
12531
+ this.image = Ke, this.positions = J;
12532
12532
  }
12533
12533
  }
12534
12534
  R.cK("GlyphAtlas", de);
@@ -12536,12 +12536,12 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
12536
12536
  constructor(W) {
12537
12537
  this.tileID = new R.a3(W.tileID.overscaledZ, W.tileID.wrap, W.tileID.canonical.z, W.tileID.canonical.x, W.tileID.canonical.y), this.uid = W.uid, this.zoom = W.zoom, this.pixelRatio = W.pixelRatio, this.tileSize = W.tileSize, this.source = W.source, this.overscaling = this.tileID.overscaleFactor(), this.showCollisionBoxes = W.showCollisionBoxes, this.collectResourceTiming = !!W.collectResourceTiming, this.returnDependencies = !!W.returnDependencies, this.promoteId = W.promoteId, this.inFlightDependencies = [];
12538
12538
  }
12539
- parse(W, K, te, ve, ze) {
12539
+ parse(W, J, te, ve, ze) {
12540
12540
  return R._(this, void 0, void 0, (function* () {
12541
12541
  this.status = "parsing", this.data = W, this.collisionBoxArray = new R.ae();
12542
12542
  const Ke = new R.cL(Object.keys(W.layers).sort()), Oe = new R.cM(this.tileID, this.promoteId);
12543
12543
  Oe.bucketLayerIDs = [];
12544
- const Ye = {}, Ue = { featureIndex: Oe, iconDependencies: {}, patternDependencies: {}, glyphDependencies: {}, dashDependencies: {}, availableImages: te, subdivisionGranularity: ze }, it = K.familiesBySource[this.source];
12544
+ const Ye = {}, Ue = { featureIndex: Oe, iconDependencies: {}, patternDependencies: {}, glyphDependencies: {}, dashDependencies: {}, availableImages: te, subdivisionGranularity: ze }, it = J.familiesBySource[this.source];
12545
12545
  for (const Ve in it) {
12546
12546
  const Zt = W.layers[Ve];
12547
12547
  if (!Zt) continue;
@@ -12591,40 +12591,40 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
12591
12591
  }));
12592
12592
  }
12593
12593
  }
12594
- function Bt(Qe, W, K) {
12594
+ function Bt(Qe, W, J) {
12595
12595
  const te = new R.J(W);
12596
- for (const ve of Qe) ve.recalculate(te, K);
12596
+ for (const ve of Qe) ve.recalculate(te, J);
12597
12597
  }
12598
12598
  class fi {
12599
12599
  constructor() {
12600
12600
  this.loading = {}, this.loaded = {}, this.parsing = {};
12601
12601
  }
12602
- startLoading(W, K) {
12603
- this.loading[W] = K;
12602
+ startLoading(W, J) {
12603
+ this.loading[W] = J;
12604
12604
  }
12605
12605
  finishLoading(W) {
12606
12606
  delete this.loading[W];
12607
12607
  }
12608
12608
  abort(W) {
12609
- const K = this.loading[W];
12610
- K?.abort && (K.abort.abort(), delete this.loading[W]);
12609
+ const J = this.loading[W];
12610
+ J?.abort && (J.abort.abort(), delete this.loading[W]);
12611
12611
  }
12612
- setParsing(W, K) {
12613
- this.parsing[W] = K;
12612
+ setParsing(W, J) {
12613
+ this.parsing[W] = J;
12614
12614
  }
12615
12615
  consumeParsing(W) {
12616
- const K = this.parsing[W];
12617
- if (K) return delete this.parsing[W], K;
12616
+ const J = this.parsing[W];
12617
+ if (J) return delete this.parsing[W], J;
12618
12618
  }
12619
12619
  clearParsing(W) {
12620
12620
  delete this.parsing[W];
12621
12621
  }
12622
- markLoaded(W, K) {
12623
- this.loaded[W] = K;
12622
+ markLoaded(W, J) {
12623
+ this.loaded[W] = J;
12624
12624
  }
12625
12625
  getLoaded(W) {
12626
- const K = this.loaded[W];
12627
- if (K) return K;
12626
+ const J = this.loaded[W];
12627
+ if (J) return J;
12628
12628
  }
12629
12629
  removeLoaded(W) {
12630
12630
  delete this.loaded[W];
@@ -12644,16 +12644,16 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
12644
12644
  }
12645
12645
  }
12646
12646
  class At {
12647
- constructor(W, K, te, ve, ze) {
12648
- this.type = W, this.properties = te || {}, this.extent = ze, this.pointsArray = K, this.id = ve;
12647
+ constructor(W, J, te, ve, ze) {
12648
+ this.type = W, this.properties = te || {}, this.extent = ze, this.pointsArray = J, this.id = ve;
12649
12649
  }
12650
12650
  loadGeometry() {
12651
- return this.pointsArray.map(((W) => W.map(((K) => new R.P(K.x, K.y)))));
12651
+ return this.pointsArray.map(((W) => W.map(((J) => new R.P(J.x, J.y)))));
12652
12652
  }
12653
12653
  }
12654
12654
  class si {
12655
- constructor(W, K, te) {
12656
- this.version = 2, this._myFeatures = W, this.name = K, this.length = W.length, this.extent = te;
12655
+ constructor(W, J, te) {
12656
+ this.version = 2, this._myFeatures = W, this.name = J, this.length = W.length, this.extent = te;
12657
12657
  }
12658
12658
  feature(W) {
12659
12659
  return this._myFeatures[W];
@@ -12671,8 +12671,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
12671
12671
  let W = R.cS(Qe);
12672
12672
  return W.byteOffset === 0 && W.byteLength === W.buffer.byteLength || (W = new Uint8Array(W)), { vectorTile: Qe, rawData: W.buffer };
12673
12673
  }
12674
- function mi(Qe, W, K) {
12675
- const { extent: te } = Qe, ve = Math.pow(2, K.z - W.z), ze = (K.x - W.x * ve) * te, Ke = (K.y - W.y * ve) * te, Oe = [];
12674
+ function mi(Qe, W, J) {
12675
+ const { extent: te } = Qe, ve = Math.pow(2, J.z - W.z), ze = (J.x - W.x * ve) * te, Ke = (J.y - W.y * ve) * te, Oe = [];
12676
12676
  for (let Ye = 0; Ye < Qe.length; Ye++) {
12677
12677
  const Ue = Qe.feature(Ye);
12678
12678
  let it = Ue.loadGeometry();
@@ -12682,81 +12682,81 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
12682
12682
  }
12683
12683
  return new si(Oe, Qe.name, te);
12684
12684
  }
12685
- class fe {
12686
- constructor(W, K, te) {
12687
- this.actor = W, this.layerIndex = K, this.availableImages = te, this.tileState = new fi(), this.overzoomedTileResultCache = new R.cU(1e3);
12685
+ class me {
12686
+ constructor(W, J, te) {
12687
+ this.actor = W, this.layerIndex = J, this.availableImages = te, this.tileState = new fi(), this.overzoomedTileResultCache = new R.cU(1e3);
12688
12688
  }
12689
- loadVectorTile(W, K) {
12689
+ loadVectorTile(W, J) {
12690
12690
  try {
12691
- return { vectorTile: W.encoding !== "mlt" ? new R.cV(new R.cW(K)) : new R.cX(K), rawData: K };
12691
+ return { vectorTile: W.encoding !== "mlt" ? new R.cV(new R.cW(J)) : new R.cX(J), rawData: J };
12692
12692
  } catch (te) {
12693
- const ve = new Uint8Array(K);
12693
+ const ve = new Uint8Array(J);
12694
12694
  let ze = `Unable to parse the tile at ${W.request.url}, `;
12695
12695
  throw ze += ve[0] === 31 && ve[1] === 139 ? "please make sure the data is not gzipped and that you have configured the relevant header in the server" : `got error: ${R.d(te).message}`, new Error(ze);
12696
12696
  }
12697
12697
  }
12698
12698
  loadTile(W) {
12699
12699
  return R._(this, void 0, void 0, (function* () {
12700
- const { uid: K, overzoomParameters: te } = W;
12700
+ const { uid: J, overzoomParameters: te } = W;
12701
12701
  te && (W.request = te.overzoomRequest);
12702
12702
  const ve = this._startRequestTiming(W), ze = new ct(W);
12703
- this.tileState.startLoading(K, ze);
12703
+ this.tileState.startLoading(J, ze);
12704
12704
  const Ke = new AbortController();
12705
12705
  ze.abort = Ke;
12706
12706
  try {
12707
12707
  const Oe = yield R.o(W.request, Ke);
12708
- if (W.etag && W.etag === Oe.etag) return this.tileState.finishLoading(K), this._getEtagUnmodifiedResult(Oe, ve);
12708
+ if (W.etag && W.etag === Oe.etag) return this.tileState.finishLoading(J), this._getEtagUnmodifiedResult(Oe, ve);
12709
12709
  const Ye = this.loadVectorTile(W, Oe.data);
12710
- if (this.tileState.finishLoading(K), !Ye) return null;
12710
+ if (this.tileState.finishLoading(J), !Ye) return null;
12711
12711
  let { vectorTile: Ue, rawData: it } = Ye;
12712
12712
  te && ({ vectorTile: Ue, rawData: it } = this._getOverzoomTile(W, Ue));
12713
12713
  const Be = this._getExpiryData(Oe), St = this._finishRequestTiming(ve);
12714
- ze.vectorTile = Ue, this.tileState.markLoaded(K, ze);
12714
+ ze.vectorTile = Ue, this.tileState.markLoaded(J, ze);
12715
12715
  const Pt = { rawData: it, cacheControl: Be, resourceTiming: St };
12716
- this.tileState.setParsing(K, Pt);
12716
+ this.tileState.setParsing(J, Pt);
12717
12717
  try {
12718
12718
  return yield this._parseWorkerTile(ze, W, Pt);
12719
12719
  } finally {
12720
- this.tileState.clearParsing(K);
12720
+ this.tileState.clearParsing(J);
12721
12721
  }
12722
12722
  } catch (Oe) {
12723
- throw this.tileState.finishLoading(K), ze.status = "done", this.tileState.markLoaded(K, ze), Oe;
12723
+ throw this.tileState.finishLoading(J), ze.status = "done", this.tileState.markLoaded(J, ze), Oe;
12724
12724
  }
12725
12725
  }));
12726
12726
  }
12727
- _getEtagUnmodifiedResult(W, K) {
12728
- const te = this._getExpiryData(W), ve = this._finishRequestTiming(K);
12727
+ _getEtagUnmodifiedResult(W, J) {
12728
+ const te = this._getExpiryData(W), ve = this._finishRequestTiming(J);
12729
12729
  return R.e({ etagUnmodified: !0 }, te, ve);
12730
12730
  }
12731
- _parseWorkerTile(W, K, te) {
12731
+ _parseWorkerTile(W, J, te) {
12732
12732
  return R._(this, void 0, void 0, (function* () {
12733
- let ve = yield W.parse(W.vectorTile, this.layerIndex, this.availableImages, this.actor, K.subdivisionGranularity);
12733
+ let ve = yield W.parse(W.vectorTile, this.layerIndex, this.availableImages, this.actor, J.subdivisionGranularity);
12734
12734
  if (te) {
12735
12735
  const { rawData: ze, cacheControl: Ke, resourceTiming: Oe } = te;
12736
- ve = R.e({ rawTileData: ze.slice(0), encoding: K.encoding }, ve, Ke, Oe);
12736
+ ve = R.e({ rawTileData: ze.slice(0), encoding: J.encoding }, ve, Ke, Oe);
12737
12737
  }
12738
12738
  return ve;
12739
12739
  }));
12740
12740
  }
12741
- _getExpiryData({ expires: W, cacheControl: K, etag: te }) {
12741
+ _getExpiryData({ expires: W, cacheControl: J, etag: te }) {
12742
12742
  const ve = {};
12743
- return W && (ve.expires = W), K && (ve.cacheControl = K), te && (ve.etag = te), ve;
12743
+ return W && (ve.expires = W), J && (ve.cacheControl = J), te && (ve.etag = te), ve;
12744
12744
  }
12745
12745
  _startRequestTiming(W) {
12746
- var K;
12747
- if (!((K = W.request) === null || K === void 0) && K.collectResourceTiming) return new Qi(W.request.url);
12746
+ var J;
12747
+ if (!((J = W.request) === null || J === void 0) && J.collectResourceTiming) return new Qi(W.request.url);
12748
12748
  }
12749
12749
  _finishRequestTiming(W) {
12750
- const K = W?.finish();
12751
- return K ? { resourceTiming: JSON.parse(JSON.stringify(K)) } : {};
12750
+ const J = W?.finish();
12751
+ return J ? { resourceTiming: JSON.parse(JSON.stringify(J)) } : {};
12752
12752
  }
12753
- _getOverzoomTile(W, K) {
12753
+ _getOverzoomTile(W, J) {
12754
12754
  var te;
12755
12755
  const { tileID: ve, source: ze, overzoomParameters: Ke } = W, { maxZoomTileID: Oe } = Ke, Ye = `${Oe.key}_${ve.key}_${(te = W.request) === null || te === void 0 ? void 0 : te.url}`, Ue = this.overzoomedTileResultCache.get(Ye);
12756
12756
  if (Ue) return Ue;
12757
12757
  const it = new Xe(), Be = this.layerIndex.familiesBySource[ze];
12758
12758
  for (const Pt in Be) {
12759
- const er = K.layers[Pt];
12759
+ const er = J.layers[Pt];
12760
12760
  if (!er) continue;
12761
12761
  const Gi = mi(er, Oe, ve.canonical);
12762
12762
  Gi.length > 0 && it.addLayer(Gi);
@@ -12766,10 +12766,10 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
12766
12766
  }
12767
12767
  reloadTile(W) {
12768
12768
  return R._(this, void 0, void 0, (function* () {
12769
- const K = W.uid, te = this.tileState.getLoaded(K);
12769
+ const J = W.uid, te = this.tileState.getLoaded(J);
12770
12770
  if (!te) throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");
12771
12771
  if (te.showCollisionBoxes = W.showCollisionBoxes, te.status === "parsing") {
12772
- const ve = this.tileState.consumeParsing(K);
12772
+ const ve = this.tileState.consumeParsing(J);
12773
12773
  return yield this._parseWorkerTile(te, W, ve);
12774
12774
  }
12775
12775
  if (te.status === "done" && te.vectorTile) return yield this._parseWorkerTile(te, W);
@@ -12792,59 +12792,59 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
12792
12792
  }
12793
12793
  loadTile(W) {
12794
12794
  return R._(this, void 0, void 0, (function* () {
12795
- const { uid: K, encoding: te, rawImageData: ve, redFactor: ze, greenFactor: Ke, blueFactor: Oe, baseShift: Ye } = W, Ue = ve.width + 2, it = ve.height + 2, Be = R.b(ve) ? new R.R({ width: Ue, height: it }, yield R.cY(ve, -1, -1, Ue, it)) : ve, St = new R.cZ(K, Be, te, ze, Ke, Oe, Ye);
12796
- return this.loaded || (this.loaded = {}), this.loaded[K] = St, St;
12795
+ const { uid: J, encoding: te, rawImageData: ve, redFactor: ze, greenFactor: Ke, blueFactor: Oe, baseShift: Ye } = W, Ue = ve.width + 2, it = ve.height + 2, Be = R.b(ve) ? new R.R({ width: Ue, height: it }, yield R.cY(ve, -1, -1, Ue, it)) : ve, St = new R.cZ(J, Be, te, ze, Ke, Oe, Ye);
12796
+ return this.loaded || (this.loaded = {}), this.loaded[J] = St, St;
12797
12797
  }));
12798
12798
  }
12799
12799
  removeTile(W) {
12800
- const K = this.loaded, te = W.uid;
12801
- K?.[te] && delete K[te];
12800
+ const J = this.loaded, te = W.uid;
12801
+ J?.[te] && delete J[te];
12802
12802
  }
12803
12803
  }
12804
12804
  class Jr {
12805
- constructor(W, K, te, ve = kn) {
12806
- this.actor = W, this.layerIndex = K, this.availableImages = te, this.tileState = new fi(), this._createGeoJSONIndex = ve;
12805
+ constructor(W, J, te, ve = kn) {
12806
+ this.actor = W, this.layerIndex = J, this.availableImages = te, this.tileState = new fi(), this._createGeoJSONIndex = ve;
12807
12807
  }
12808
12808
  loadVectorTile(W) {
12809
12809
  if (!this._geoJSONIndex) throw new Error("Unable to parse the data into a cluster or geojson");
12810
- const { z: K, x: te, y: ve } = W.tileID.canonical, ze = this._geoJSONIndex.getTile(K, te, ve);
12810
+ const { z: J, x: te, y: ve } = W.tileID.canonical, ze = this._geoJSONIndex.getTile(J, te, ve);
12811
12811
  return ze ? cr(new R.c_(ze.features, { version: 2, extent: R.a6 })) : null;
12812
12812
  }
12813
12813
  loadTile(W) {
12814
12814
  return R._(this, void 0, void 0, (function* () {
12815
- const { uid: K } = W, te = new ct(W);
12815
+ const { uid: J } = W, te = new ct(W);
12816
12816
  te.abort = new AbortController();
12817
12817
  try {
12818
12818
  const ve = this.loadVectorTile(W);
12819
12819
  if (!ve) return null;
12820
12820
  const { vectorTile: ze, rawData: Ke } = ve;
12821
- te.vectorTile = ze, this.tileState.markLoaded(K, te);
12821
+ te.vectorTile = ze, this.tileState.markLoaded(J, te);
12822
12822
  const Oe = { rawData: Ke };
12823
- this.tileState.setParsing(K, Oe);
12823
+ this.tileState.setParsing(J, Oe);
12824
12824
  try {
12825
12825
  return yield this._parseWorkerTile(te, W, Oe);
12826
12826
  } finally {
12827
- this.tileState.clearParsing(K);
12827
+ this.tileState.clearParsing(J);
12828
12828
  }
12829
12829
  } catch (ve) {
12830
- throw te.status = "done", this.tileState.markLoaded(K, te), ve;
12830
+ throw te.status = "done", this.tileState.markLoaded(J, te), ve;
12831
12831
  }
12832
12832
  }));
12833
12833
  }
12834
12834
  _reloadLoadedTile(W) {
12835
12835
  return R._(this, void 0, void 0, (function* () {
12836
- const K = W.uid, te = this.tileState.getLoaded(K);
12836
+ const J = W.uid, te = this.tileState.getLoaded(J);
12837
12837
  if (!te) throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");
12838
12838
  if (te.showCollisionBoxes = W.showCollisionBoxes, te.status === "parsing") {
12839
- const ve = this.tileState.consumeParsing(K);
12839
+ const ve = this.tileState.consumeParsing(J);
12840
12840
  return yield this._parseWorkerTile(te, W, ve);
12841
12841
  }
12842
12842
  if (te.status === "done" && te.vectorTile) return yield this._parseWorkerTile(te, W);
12843
12843
  }));
12844
12844
  }
12845
- _parseWorkerTile(W, K, te) {
12845
+ _parseWorkerTile(W, J, te) {
12846
12846
  return R._(this, void 0, void 0, (function* () {
12847
- let ve = yield W.parse(W.vectorTile, this.layerIndex, this.availableImages, this.actor, K.subdivisionGranularity);
12847
+ let ve = yield W.parse(W.vectorTile, this.layerIndex, this.availableImages, this.actor, J.subdivisionGranularity);
12848
12848
  if (te) {
12849
12849
  const { rawData: ze } = te;
12850
12850
  ve = R.e({ rawTileData: ze.slice(0), encoding: "mvt" }, ve);
@@ -12864,8 +12864,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
12864
12864
  }
12865
12865
  loadData(W) {
12866
12866
  return R._(this, void 0, void 0, (function* () {
12867
- var K;
12868
- (K = this._pendingRequest) === null || K === void 0 || K.abort();
12867
+ var J;
12868
+ (J = this._pendingRequest) === null || J === void 0 || J.abort();
12869
12869
  const te = this._startRequestTiming(W);
12870
12870
  this._pendingRequest = new AbortController();
12871
12871
  try {
@@ -12879,39 +12879,39 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
12879
12879
  }));
12880
12880
  }
12881
12881
  _startRequestTiming(W) {
12882
- var K;
12883
- if (!((K = W.request) === null || K === void 0) && K.collectResourceTiming) return new Qi(W.request.url);
12882
+ var J;
12883
+ if (!((J = W.request) === null || J === void 0) && J.collectResourceTiming) return new Qi(W.request.url);
12884
12884
  }
12885
- _finishRequestTiming(W, K, te) {
12885
+ _finishRequestTiming(W, J, te) {
12886
12886
  const ve = W?.finish();
12887
- ve && (te.resourceTiming = { [K.source]: JSON.parse(JSON.stringify(ve)) });
12887
+ ve && (te.resourceTiming = { [J.source]: JSON.parse(JSON.stringify(ve)) });
12888
12888
  }
12889
12889
  reloadTile(W) {
12890
12890
  return this.tileState.getLoaded(W.uid) ? this._reloadLoadedTile(W) : this.loadTile(W);
12891
12891
  }
12892
- loadAndProcessGeoJSON(W, K) {
12892
+ loadAndProcessGeoJSON(W, J) {
12893
12893
  return R._(this, void 0, void 0, (function* () {
12894
12894
  var te;
12895
- if (W.request && (W.data = (yield R.k(W.request, K)).data), W.data) return W.data = this._filterGeoJSON(W.data, W.filter), void (this._geoJSONIndex = this._createGeoJSONIndex(W.data, W));
12895
+ if (W.request && (W.data = (yield R.k(W.request, J)).data), W.data) return W.data = this._filterGeoJSON(W.data, W.filter), void (this._geoJSONIndex = this._createGeoJSONIndex(W.data, W));
12896
12896
  if (W.dataDiff) return (te = this._geoJSONIndex) !== null && te !== void 0 || (this._geoJSONIndex = this._createGeoJSONIndex({ type: "FeatureCollection", features: [] }, W)), void this._geoJSONIndex.updateData(W.dataDiff, this._getFilterPredicate(W.filter));
12897
12897
  if (W.updateCluster && this._geoJSONIndex.updateClusterOptions(W.geojsonVtOptions.cluster, _s(W)), this._geoJSONIndex == null) throw new Error(`Input data given to '${W.source}' is not a valid GeoJSON object.`);
12898
12898
  }));
12899
12899
  }
12900
- _filterGeoJSON(W, K) {
12900
+ _filterGeoJSON(W, J) {
12901
12901
  if (W.type !== "FeatureCollection") return W;
12902
- const te = this._getFilterPredicate(K);
12902
+ const te = this._getFilterPredicate(J);
12903
12903
  return te ? { type: "FeatureCollection", features: W.features.filter(((ve) => te(ve))) } : W;
12904
12904
  }
12905
12905
  _getFilterPredicate(W) {
12906
12906
  if (typeof W != "boolean" && !W?.length) return;
12907
- const K = R.c$(W, { type: "boolean", "property-type": "data-driven", overridable: !1, transition: !1 });
12908
- if (K.result === "error") throw new Error(K.value.map(((te) => `${te.key}: ${te.message}`)).join(", "));
12909
- return (te) => K.value.evaluate({ zoom: 0 }, te);
12907
+ const J = R.c$(W, { type: "boolean", "property-type": "data-driven", overridable: !1, transition: !1 });
12908
+ if (J.result === "error") throw new Error(J.value.map(((te) => `${te.key}: ${te.message}`)).join(", "));
12909
+ return (te) => J.value.evaluate({ zoom: 0 }, te);
12910
12910
  }
12911
12911
  removeSource(W) {
12912
12912
  return R._(this, void 0, void 0, (function* () {
12913
- var K;
12914
- (K = this._pendingRequest) === null || K === void 0 || K.abort();
12913
+ var J;
12914
+ (J = this._pendingRequest) === null || J === void 0 || J.abort();
12915
12915
  }));
12916
12916
  }
12917
12917
  getClusterExpansionZoom(W) {
@@ -12925,20 +12925,20 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
12925
12925
  }
12926
12926
  }
12927
12927
  function kn(Qe, W) {
12928
- const K = R.e(W.geojsonVtOptions || {}, { updateable: !0, clusterOptions: _s(W) });
12929
- return new R.d0(Qe, K);
12928
+ const J = R.e(W.geojsonVtOptions || {}, { updateable: !0, clusterOptions: _s(W) });
12929
+ return new R.d0(Qe, J);
12930
12930
  }
12931
12931
  function _s({ geojsonVtOptions: Qe, clusterProperties: W }) {
12932
12932
  if (!W || !Qe.clusterOptions) return Qe.clusterOptions;
12933
- const K = {}, te = {}, ve = { accumulated: null, zoom: 0 }, ze = { properties: null }, Ke = Object.keys(W);
12933
+ const J = {}, te = {}, ve = { accumulated: null, zoom: 0 }, ze = { properties: null }, Ke = Object.keys(W);
12934
12934
  for (const Oe of Ke) {
12935
12935
  const [Ye, Ue] = W[Oe], it = R.c$(Ue), Be = R.c$(typeof Ye == "string" ? [Ye, ["accumulated"], ["get", Oe]] : Ye);
12936
- K[Oe] = it.value, te[Oe] = Be.value;
12936
+ J[Oe] = it.value, te[Oe] = Be.value;
12937
12937
  }
12938
12938
  return Qe.clusterOptions.map = (Oe) => {
12939
12939
  ze.properties = Oe;
12940
12940
  const Ye = {};
12941
- for (const Ue of Ke) Ye[Ue] = K[Ue].evaluate(ve, ze);
12941
+ for (const Ue of Ke) Ye[Ue] = J[Ue].evaluate(ve, ze);
12942
12942
  return Ye;
12943
12943
  }, Qe.clusterOptions.reduce = (Oe, Ye) => {
12944
12944
  ze.properties = Ye;
@@ -12947,85 +12947,85 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
12947
12947
  }
12948
12948
  class ys {
12949
12949
  constructor(W) {
12950
- this.self = W, this.actor = new R.N(W), this.layerIndexes = {}, this.availableImages = {}, this.workerSources = {}, this.demWorkerSources = {}, this.externalWorkerSourceTypes = {}, this.globalStates = /* @__PURE__ */ new Map(), this.self.registerWorkerSource = (K, te) => {
12951
- if (this.externalWorkerSourceTypes[K]) throw new Error(`Worker source with name "${K}" already registered.`);
12952
- this.externalWorkerSourceTypes[K] = te;
12953
- }, this.self.addProtocol = R.cH, this.self.removeProtocol = R.cI, this.self.registerRTLTextPlugin = (K) => {
12954
- R.d1.setMethods(K);
12955
- }, this.self.makeRequest = R.m, this.actor.registerMessageHandler("LDT", ((K, te) => this._getDEMWorkerSource(K, te.source).loadTile(te))), this.actor.registerMessageHandler("RDT", ((K, te) => R._(this, void 0, void 0, (function* () {
12956
- this._getDEMWorkerSource(K, te.source).removeTile(te);
12957
- })))), this.actor.registerMessageHandler("GCEZ", ((K, te) => R._(this, void 0, void 0, (function* () {
12958
- return this._getWorkerSource(K, te.type, te.source).getClusterExpansionZoom(te);
12959
- })))), this.actor.registerMessageHandler("GCC", ((K, te) => R._(this, void 0, void 0, (function* () {
12960
- return this._getWorkerSource(K, te.type, te.source).getClusterChildren(te);
12961
- })))), this.actor.registerMessageHandler("GCL", ((K, te) => R._(this, void 0, void 0, (function* () {
12962
- return this._getWorkerSource(K, te.type, te.source).getClusterLeaves(te);
12963
- })))), this.actor.registerMessageHandler("LD", ((K, te) => this._getWorkerSource(K, te.type, te.source).loadData(te))), this.actor.registerMessageHandler("LT", ((K, te) => this._getWorkerSource(K, te.type, te.source).loadTile(te))), this.actor.registerMessageHandler("RT", ((K, te) => this._getWorkerSource(K, te.type, te.source).reloadTile(te))), this.actor.registerMessageHandler("AT", ((K, te) => this._getWorkerSource(K, te.type, te.source).abortTile(te))), this.actor.registerMessageHandler("RMT", ((K, te) => this._getWorkerSource(K, te.type, te.source).removeTile(te))), this.actor.registerMessageHandler("RS", ((K, te) => R._(this, void 0, void 0, (function* () {
12950
+ this.self = W, this.actor = new R.N(W), this.layerIndexes = {}, this.availableImages = {}, this.workerSources = {}, this.demWorkerSources = {}, this.externalWorkerSourceTypes = {}, this.globalStates = /* @__PURE__ */ new Map(), this.self.registerWorkerSource = (J, te) => {
12951
+ if (this.externalWorkerSourceTypes[J]) throw new Error(`Worker source with name "${J}" already registered.`);
12952
+ this.externalWorkerSourceTypes[J] = te;
12953
+ }, this.self.addProtocol = R.cH, this.self.removeProtocol = R.cI, this.self.registerRTLTextPlugin = (J) => {
12954
+ R.d1.setMethods(J);
12955
+ }, this.self.makeRequest = R.m, this.actor.registerMessageHandler("LDT", ((J, te) => this._getDEMWorkerSource(J, te.source).loadTile(te))), this.actor.registerMessageHandler("RDT", ((J, te) => R._(this, void 0, void 0, (function* () {
12956
+ this._getDEMWorkerSource(J, te.source).removeTile(te);
12957
+ })))), this.actor.registerMessageHandler("GCEZ", ((J, te) => R._(this, void 0, void 0, (function* () {
12958
+ return this._getWorkerSource(J, te.type, te.source).getClusterExpansionZoom(te);
12959
+ })))), this.actor.registerMessageHandler("GCC", ((J, te) => R._(this, void 0, void 0, (function* () {
12960
+ return this._getWorkerSource(J, te.type, te.source).getClusterChildren(te);
12961
+ })))), this.actor.registerMessageHandler("GCL", ((J, te) => R._(this, void 0, void 0, (function* () {
12962
+ return this._getWorkerSource(J, te.type, te.source).getClusterLeaves(te);
12963
+ })))), this.actor.registerMessageHandler("LD", ((J, te) => this._getWorkerSource(J, te.type, te.source).loadData(te))), this.actor.registerMessageHandler("LT", ((J, te) => this._getWorkerSource(J, te.type, te.source).loadTile(te))), this.actor.registerMessageHandler("RT", ((J, te) => this._getWorkerSource(J, te.type, te.source).reloadTile(te))), this.actor.registerMessageHandler("AT", ((J, te) => this._getWorkerSource(J, te.type, te.source).abortTile(te))), this.actor.registerMessageHandler("RMT", ((J, te) => this._getWorkerSource(J, te.type, te.source).removeTile(te))), this.actor.registerMessageHandler("RS", ((J, te) => R._(this, void 0, void 0, (function* () {
12964
12964
  var ve, ze;
12965
- if (!(!((ze = (ve = this.workerSources[K]) === null || ve === void 0 ? void 0 : ve[te.type]) === null || ze === void 0) && ze[te.source])) return;
12966
- const Ke = this.workerSources[K][te.type][te.source];
12967
- delete this.workerSources[K][te.type][te.source], Ke.removeSource !== void 0 && Ke.removeSource(te);
12968
- })))), this.actor.registerMessageHandler("RM", ((K) => R._(this, void 0, void 0, (function* () {
12969
- delete this.layerIndexes[K], delete this.availableImages[K], delete this.workerSources[K], delete this.demWorkerSources[K], this.globalStates.delete(K);
12970
- })))), this.actor.registerMessageHandler("SR", ((K, te) => R._(this, void 0, void 0, (function* () {
12965
+ if (!(!((ze = (ve = this.workerSources[J]) === null || ve === void 0 ? void 0 : ve[te.type]) === null || ze === void 0) && ze[te.source])) return;
12966
+ const Ke = this.workerSources[J][te.type][te.source];
12967
+ delete this.workerSources[J][te.type][te.source], Ke.removeSource !== void 0 && Ke.removeSource(te);
12968
+ })))), this.actor.registerMessageHandler("RM", ((J) => R._(this, void 0, void 0, (function* () {
12969
+ delete this.layerIndexes[J], delete this.availableImages[J], delete this.workerSources[J], delete this.demWorkerSources[J], this.globalStates.delete(J);
12970
+ })))), this.actor.registerMessageHandler("SR", ((J, te) => R._(this, void 0, void 0, (function* () {
12971
12971
  this.referrer = te;
12972
- })))), this.actor.registerMessageHandler("SRPS", ((K, te) => this._syncRTLPluginState(K, te))), this.actor.registerMessageHandler("IS", ((K, te) => R._(this, void 0, void 0, (function* () {
12972
+ })))), this.actor.registerMessageHandler("SRPS", ((J, te) => this._syncRTLPluginState(J, te))), this.actor.registerMessageHandler("IS", ((J, te) => R._(this, void 0, void 0, (function* () {
12973
12973
  this.self.importScripts(te);
12974
- })))), this.actor.registerMessageHandler("SI", ((K, te) => this._setImages(K, te))), this.actor.registerMessageHandler("UL", ((K, te) => R._(this, void 0, void 0, (function* () {
12975
- this._getLayerIndex(K).update(te.layers, te.removedIds, this._getGlobalState(K));
12976
- })))), this.actor.registerMessageHandler("UGS", ((K, te) => R._(this, void 0, void 0, (function* () {
12977
- const ve = this._getGlobalState(K);
12974
+ })))), this.actor.registerMessageHandler("SI", ((J, te) => this._setImages(J, te))), this.actor.registerMessageHandler("UL", ((J, te) => R._(this, void 0, void 0, (function* () {
12975
+ this._getLayerIndex(J).update(te.layers, te.removedIds, this._getGlobalState(J));
12976
+ })))), this.actor.registerMessageHandler("UGS", ((J, te) => R._(this, void 0, void 0, (function* () {
12977
+ const ve = this._getGlobalState(J);
12978
12978
  for (const ze in te) ve[ze] = te[ze];
12979
- })))), this.actor.registerMessageHandler("SL", ((K, te) => R._(this, void 0, void 0, (function* () {
12980
- this._getLayerIndex(K).replace(te, this._getGlobalState(K));
12979
+ })))), this.actor.registerMessageHandler("SL", ((J, te) => R._(this, void 0, void 0, (function* () {
12980
+ this._getLayerIndex(J).replace(te, this._getGlobalState(J));
12981
12981
  }))));
12982
12982
  }
12983
12983
  _getGlobalState(W) {
12984
- let K = this.globalStates.get(W);
12985
- return K || (K = {}, this.globalStates.set(W, K)), K;
12984
+ let J = this.globalStates.get(W);
12985
+ return J || (J = {}, this.globalStates.set(W, J)), J;
12986
12986
  }
12987
- _setImages(W, K) {
12987
+ _setImages(W, J) {
12988
12988
  return R._(this, void 0, void 0, (function* () {
12989
- this.availableImages[W] = K;
12989
+ this.availableImages[W] = J;
12990
12990
  for (const te in this.workerSources[W]) {
12991
12991
  const ve = this.workerSources[W][te];
12992
- for (const ze in ve) ve[ze].availableImages = K;
12992
+ for (const ze in ve) ve[ze].availableImages = J;
12993
12993
  }
12994
12994
  }));
12995
12995
  }
12996
- _syncRTLPluginState(W, K) {
12996
+ _syncRTLPluginState(W, J) {
12997
12997
  return R._(this, void 0, void 0, (function* () {
12998
- return yield R.d1.syncState(K, this.self.importScripts);
12998
+ return yield R.d1.syncState(J, this.self.importScripts);
12999
12999
  }));
13000
13000
  }
13001
13001
  _getAvailableImages(W) {
13002
- let K = this.availableImages[W];
13003
- return K || (K = []), K;
13002
+ let J = this.availableImages[W];
13003
+ return J || (J = []), J;
13004
13004
  }
13005
13005
  _getLayerIndex(W) {
13006
- let K = this.layerIndexes[W];
13007
- return K || (K = this.layerIndexes[W] = new h()), K;
13006
+ let J = this.layerIndexes[W];
13007
+ return J || (J = this.layerIndexes[W] = new h()), J;
13008
13008
  }
13009
- _getWorkerSource(W, K, te) {
13009
+ _getWorkerSource(W, J, te) {
13010
13010
  var ve, ze;
13011
- if ((ve = this.workerSources)[W] || (ve[W] = {}), (ze = this.workerSources[W])[K] || (ze[K] = {}), !this.workerSources[W][K][te]) {
13011
+ if ((ve = this.workerSources)[W] || (ve[W] = {}), (ze = this.workerSources[W])[J] || (ze[J] = {}), !this.workerSources[W][J][te]) {
13012
13012
  const Ke = { sendAsync: (Oe, Ye) => (Oe.targetMapId = W, this.actor.sendAsync(Oe, Ye)) };
13013
- switch (K) {
13013
+ switch (J) {
13014
13014
  case "vector":
13015
- this.workerSources[W][K][te] = new fe(Ke, this._getLayerIndex(W), this._getAvailableImages(W));
13015
+ this.workerSources[W][J][te] = new me(Ke, this._getLayerIndex(W), this._getAvailableImages(W));
13016
13016
  break;
13017
13017
  case "geojson":
13018
- this.workerSources[W][K][te] = new Jr(Ke, this._getLayerIndex(W), this._getAvailableImages(W));
13018
+ this.workerSources[W][J][te] = new Jr(Ke, this._getLayerIndex(W), this._getAvailableImages(W));
13019
13019
  break;
13020
13020
  default:
13021
- this.workerSources[W][K][te] = new this.externalWorkerSourceTypes[K](Ke, this._getLayerIndex(W), this._getAvailableImages(W));
13021
+ this.workerSources[W][J][te] = new this.externalWorkerSourceTypes[J](Ke, this._getLayerIndex(W), this._getAvailableImages(W));
13022
13022
  }
13023
13023
  }
13024
- return this.workerSources[W][K][te];
13024
+ return this.workerSources[W][J][te];
13025
13025
  }
13026
- _getDEMWorkerSource(W, K) {
13026
+ _getDEMWorkerSource(W, J) {
13027
13027
  var te, ve;
13028
- return (te = this.demWorkerSources)[W] || (te[W] = {}), (ve = this.demWorkerSources[W])[K] || (ve[K] = new Nt()), this.demWorkerSources[W][K];
13028
+ return (te = this.demWorkerSources)[W] || (te[W] = {}), (ve = this.demWorkerSources[W])[J] || (ve[J] = new Nt()), this.demWorkerSources[W][J];
13029
13029
  }
13030
13030
  }
13031
13031
  return R.i(self) && (self.worker = new ys(self)), ys;
@@ -13077,7 +13077,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
13077
13077
  return si.getCurrentTime();
13078
13078
  }
13079
13079
  var cr, mi;
13080
- class fe {
13080
+ class me {
13081
13081
  static create(t, n, a) {
13082
13082
  const c = window.document.createElement(t);
13083
13083
  return n !== void 0 && (c.className = n), a && a.appendChild(c), c;
@@ -13086,17 +13086,17 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
13086
13086
  return window.document.createElementNS(t, n);
13087
13087
  }
13088
13088
  static disableDrag() {
13089
- fe.docStyle && fe.selectProp && (fe.userSelect = fe.docStyle[fe.selectProp], fe.docStyle[fe.selectProp] = "none");
13089
+ me.docStyle && me.selectProp && (me.userSelect = me.docStyle[me.selectProp], me.docStyle[me.selectProp] = "none");
13090
13090
  }
13091
13091
  static enableDrag() {
13092
- fe.docStyle && fe.selectProp && (fe.docStyle[fe.selectProp] = fe.userSelect);
13092
+ me.docStyle && me.selectProp && (me.docStyle[me.selectProp] = me.userSelect);
13093
13093
  }
13094
13094
  static suppressClickInternal(t) {
13095
- t.preventDefault(), t.stopPropagation(), window.removeEventListener("click", fe.suppressClickInternal, !0);
13095
+ t.preventDefault(), t.stopPropagation(), window.removeEventListener("click", me.suppressClickInternal, !0);
13096
13096
  }
13097
13097
  static suppressClick() {
13098
- window.addEventListener("click", fe.suppressClickInternal, !0), window.setTimeout((() => {
13099
- window.removeEventListener("click", fe.suppressClickInternal, !0);
13098
+ window.addEventListener("click", me.suppressClickInternal, !0), window.setTimeout((() => {
13099
+ window.removeEventListener("click", me.suppressClickInternal, !0);
13100
13100
  }), 0);
13101
13101
  }
13102
13102
  static getScale(t) {
@@ -13108,18 +13108,18 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
13108
13108
  return new h.P((a.clientX - c.left) / n.x - t.clientLeft, (a.clientY - c.top) / n.y - t.clientTop);
13109
13109
  }
13110
13110
  static mousePos(t, n) {
13111
- const a = fe.getScale(t);
13112
- return fe.getPoint(t, a, n);
13111
+ const a = me.getScale(t);
13112
+ return me.getPoint(t, a, n);
13113
13113
  }
13114
13114
  static touchPos(t, n) {
13115
- const a = [], c = fe.getScale(t);
13116
- for (const f of n) a.push(fe.getPoint(t, c, f));
13115
+ const a = [], c = me.getScale(t);
13116
+ for (const f of n) a.push(me.getPoint(t, c, f));
13117
13117
  return a;
13118
13118
  }
13119
13119
  static sanitize(t) {
13120
13120
  const n = new DOMParser().parseFromString(t, "text/html").body || document.createElement("body"), a = n.querySelectorAll("script");
13121
13121
  for (const c of a) c.remove();
13122
- return fe.clean(n), n.innerHTML;
13122
+ return me.clean(n), n.innerHTML;
13123
13123
  }
13124
13124
  static isPossiblyDangerous(t, n) {
13125
13125
  const a = n.replace(/\s+/g, "").toLowerCase();
@@ -13127,13 +13127,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
13127
13127
  }
13128
13128
  static clean(t) {
13129
13129
  const n = t.children;
13130
- for (const a of n) fe.removeAttributes(a), fe.clean(a);
13130
+ for (const a of n) me.removeAttributes(a), me.clean(a);
13131
13131
  }
13132
13132
  static removeAttributes(t) {
13133
- for (const { name: n, value: a } of t.attributes) fe.isPossiblyDangerous(n, a) && t.removeAttribute(n);
13133
+ for (const { name: n, value: a } of t.attributes) me.isPossiblyDangerous(n, a) && t.removeAttribute(n);
13134
13134
  }
13135
13135
  }
13136
- fe.docStyle = typeof window < "u" && ((cr = window.document) === null || cr === void 0 ? void 0 : cr.documentElement.style), fe.selectProp = !fe.docStyle || "userSelect" in fe.docStyle ? "userSelect" : "webkitUserSelect", (function(d) {
13136
+ me.docStyle = typeof window < "u" && ((cr = window.document) === null || cr === void 0 ? void 0 : cr.documentElement.style), me.selectProp = !me.docStyle || "userSelect" in me.docStyle ? "userSelect" : "webkitUserSelect", (function(d) {
13137
13137
  let t, n, a, c;
13138
13138
  d.resetRequestQueue = () => {
13139
13139
  t = [], n = 0, a = 0, c = {};
@@ -13352,7 +13352,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
13352
13352
  const t = 0.5 - Math.pow(d / 255, 0.45454545454545453);
13353
13353
  W[d] = t * Math.abs(t);
13354
13354
  }
13355
- function K(d, t, n, a, c, f, y, x, w) {
13355
+ function J(d, t, n, a, c, f, y, x, w) {
13356
13356
  for (let S = t; S < t + a; S++) te(d, n * f + S, f, c, y, x, w);
13357
13357
  for (let S = n; S < n + c; S++) te(d, S * f + t, 1, a, y, x, w);
13358
13358
  }
@@ -13488,7 +13488,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
13488
13488
  Z[ee] = Math.max(0, ge), N[ee] = Math.max(0, -ge);
13489
13489
  }
13490
13490
  }
13491
- K(Z, 0, 0, P, E, P, this.f, this.v, this.z), K(N, G, G, w, S, P, this.f, this.v, this.z);
13491
+ J(Z, 0, 0, P, E, P, this.f, this.v, this.z), J(N, G, G, w, S, P, this.f, this.v, this.z);
13492
13492
  const U = 255 / this.radius, H = 255 * (1 - this.cutoff);
13493
13493
  for (let q = 0; q < C; q++) {
13494
13494
  const ee = Math.sqrt(Z[q]) - Math.sqrt(N[q]);
@@ -14844,12 +14844,12 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
14844
14844
  ee = we === 2;
14845
14845
  }
14846
14846
  const ge = y.distanceToTile2d(c.x, c.y, oe, ae);
14847
- let pe = w;
14848
- x && (pe = (t.calculateTileZoom || ot)(d.zoom + h.ar(d.tileSize / t.tileSize), ge, G, N, d.fov)), pe = (t.roundZoom ? Math.round : Math.floor)(pe), pe = Math.max(0, pe);
14849
- const Ae = Math.min(pe, P);
14847
+ let fe = w;
14848
+ x && (fe = (t.calculateTileZoom || ot)(d.zoom + h.ar(d.tileSize / t.tileSize), ge, G, N, d.fov)), fe = (t.roundZoom ? Math.round : Math.floor)(fe), fe = Math.max(0, fe);
14849
+ const Ae = Math.min(fe, P);
14850
14850
  if (U.wrap = y.getWrap(f, oe, U.wrap), U.zoom >= Ae) {
14851
14851
  if (U.zoom < S) continue;
14852
- const we = E - U.zoom, he = z[0] - 0.5 - (H << we), Ee = z[1] - 0.5 - (q << we), ke = t.reparseOverscaled ? Math.max(U.zoom, pe) : U.zoom;
14852
+ const we = E - U.zoom, he = z[0] - 0.5 - (H << we), Ee = z[1] - 0.5 - (q << we), ke = t.reparseOverscaled ? Math.max(U.zoom, fe) : U.zoom;
14853
14853
  $.push({ tileID: new h.a3(U.zoom === P ? ke : U.zoom, U.wrap, U.zoom, H, q), distanceSq: h.as([B[0] - 0.5 - H, B[1] - 0.5 - q]), tileDistanceToCamera: Math.sqrt(he * he + Ee * Ee) });
14854
14854
  } else for (let we = 0; we < 4; we++) X.push({ zoom: U.zoom + 1, x: (H << 1) + we % 2, y: (q << 1) + (we >> 1), wrap: U.wrap, fullyVisible: ee });
14855
14855
  }
@@ -15470,8 +15470,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
15470
15470
  cn(H.numGlyphs, G);
15471
15471
  continue;
15472
15472
  }
15473
- const ae = Ts(t.transform.cameraToCenterDistance, oe.signedDistanceFromCamera), ge = h.ay(z, B, H), pe = f ? ge * t.transform.getPitchedTextCorrection(H.anchorX, H.anchorY, w) / ae : ge * ae, Ae = jn({ projectionContext: ee, pitchedLabelPlaneMatrixInverse: c, symbol: H, fontSize: pe, flip: !1, keepUpright: y, glyphOffsetArray: d.glyphOffsetArray, dynamicLayoutVertexArray: G, aspectRatio: X, rotateToLine: x });
15474
- $ = Ae.useVertical, (Ae.notEnoughRoom || $ || Ae.needsFlipping && jn({ projectionContext: ee, pitchedLabelPlaneMatrixInverse: c, symbol: H, fontSize: pe, flip: !0, keepUpright: y, glyphOffsetArray: d.glyphOffsetArray, dynamicLayoutVertexArray: G, aspectRatio: X, rotateToLine: x }).notEnoughRoom) && cn(H.numGlyphs, G);
15473
+ const ae = Ts(t.transform.cameraToCenterDistance, oe.signedDistanceFromCamera), ge = h.ay(z, B, H), fe = f ? ge * t.transform.getPitchedTextCorrection(H.anchorX, H.anchorY, w) / ae : ge * ae, Ae = jn({ projectionContext: ee, pitchedLabelPlaneMatrixInverse: c, symbol: H, fontSize: fe, flip: !1, keepUpright: y, glyphOffsetArray: d.glyphOffsetArray, dynamicLayoutVertexArray: G, aspectRatio: X, rotateToLine: x });
15474
+ $ = Ae.useVertical, (Ae.notEnoughRoom || $ || Ae.needsFlipping && jn({ projectionContext: ee, pitchedLabelPlaneMatrixInverse: c, symbol: H, fontSize: fe, flip: !0, keepUpright: y, glyphOffsetArray: d.glyphOffsetArray, dynamicLayoutVertexArray: G, aspectRatio: X, rotateToLine: x }).notEnoughRoom) && cn(H.numGlyphs, G);
15475
15475
  }
15476
15476
  n ? d.text.dynamicLayoutVertexBuffer.updateData(G) : d.icon.dynamicLayoutVertexBuffer.updateData(G);
15477
15477
  }
@@ -15607,9 +15607,9 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
15607
15607
  const V = [], G = new h.P(n.anchorX, n.anchorY), N = this.getPerspectiveRatio(G.x, G.y, y, B), Z = (S ? f * this.transform.getPitchedTextCorrection(n.anchorX, n.anchorY, y) / N : f * N) / h.aJ, X = { getElevation: B, pitchedLabelPlaneMatrix: x, lineVertexArray: a, pitchWithMap: S, projectionCache: { projections: {}, offsets: {}, cachedAnchorPoint: void 0, anyProjectionOccluded: !1 }, transform: this.transform, tileAnchorPoint: G, unwrappedTileID: y, width: this.transform.width, height: this.transform.height, translation: z }, $ = Vn(Z, c, n.lineOffsetX * Z, n.lineOffsetY * Z, !1, n, !1, X);
15608
15608
  let U = !1, H = !1, q = !0;
15609
15609
  if ($) {
15610
- const ee = 0.5 * E * N + C, oe = new h.P(-100, -100), ae = new h.P(this.screenRightBoundary, this.screenBottomBoundary), ge = new Ga(), pe = $.first, Ae = $.last;
15610
+ const ee = 0.5 * E * N + C, oe = new h.P(-100, -100), ae = new h.P(this.screenRightBoundary, this.screenBottomBoundary), ge = new Ga(), fe = $.first, Ae = $.last;
15611
15611
  let we = [];
15612
- for (let ke = pe.path.length - 1; ke >= 1; ke--) we.push(pe.path[ke]);
15612
+ for (let ke = fe.path.length - 1; ke >= 1; ke--) we.push(fe.path[ke]);
15613
15613
  for (let ke = 1; ke < Ae.path.length; ke++) we.push(Ae.path[ke]);
15614
15614
  const he = 2.5 * ee;
15615
15615
  if (S) {
@@ -15715,14 +15715,14 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
15715
15715
  let Z = w.x, X = w.y, $ = n;
15716
15716
  f && (Z = G, X = N, $ = Math.pow(2, -(this.transform.zoom - a.overscaledZ)), $ *= this.transform.getPitchedTextCorrection(G, N, c), P || ($ *= h.al(0.5 + w.signedDistanceFromCamera / this.transform.cameraToCenterDistance * 0.5, 0, 4))), P && (Z += C * P.x * $ + B * P.y * $, X += z * P.x * $ + V * P.y * $);
15717
15717
  const U = t.x1 * $, H = t.x2 * $, q = (U + H) / 2, ee = t.y1 * $, oe = t.y2 * $, ae = (ee + oe) / 2, ge = [{ offsetX: U, offsetY: ee }, { offsetX: q, offsetY: ee }, { offsetX: H, offsetY: ee }, { offsetX: H, offsetY: ae }, { offsetX: H, offsetY: oe }, { offsetX: q, offsetY: oe }, { offsetX: U, offsetY: oe }, { offsetX: U, offsetY: ae }];
15718
- let pe = [];
15719
- for (const { offsetX: we, offsetY: he } of ge) pe.push(new h.P(Z + C * we + B * he, X + z * we + V * he));
15718
+ let fe = [];
15719
+ for (const { offsetX: we, offsetY: he } of ge) fe.push(new h.P(Z + C * we + B * he, X + z * we + V * he));
15720
15720
  let Ae = !1;
15721
15721
  if (f) {
15722
- const we = pe.map(((he) => this.projectAndGetPerspectiveRatio(he.x, he.y, c, S, E)));
15723
- Ae = we.some(((he) => !he.isOccluded)), pe = we.map(((he) => new h.P(he.x, he.y)));
15722
+ const we = fe.map(((he) => this.projectAndGetPerspectiveRatio(he.x, he.y, c, S, E)));
15723
+ Ae = we.some(((he) => !he.isOccluded)), fe = we.map(((he) => new h.P(he.x, he.y)));
15724
15724
  } else Ae = !0;
15725
- return { box: h.aI(pe), allPointsOccluded: !Ae };
15725
+ return { box: h.aI(fe), allPointsOccluded: !Ae };
15726
15726
  }
15727
15727
  }
15728
15728
  class mc {
@@ -15792,15 +15792,15 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
15792
15792
  var U, H, q;
15793
15793
  const ee = h.aM[t.textAnchor], oe = [t.textOffset0, t.textOffset1], ae = wo(ee, a, c, oe, f), ge = this.collisionIndex.placeCollisionBox(n, C, w, S, P, x, y, G, E.predicate, X, ae, $);
15794
15794
  if ((!Z || this.collisionIndex.placeCollisionBox(Z, C, w, S, P, x, y, N, E.predicate, X, ae, $).placeable) && ge.placeable) {
15795
- let pe;
15796
- if (!((U = this.prevPlacement) === null || U === void 0) && U.variableOffsets[z.crossTileID] && (!((q = (H = this.prevPlacement) === null || H === void 0 ? void 0 : H.placements[z.crossTileID]) === null || q === void 0) && q.text) && (pe = this.prevPlacement.variableOffsets[z.crossTileID].anchor), z.crossTileID === 0) throw new Error("symbolInstance.crossTileID can't be 0");
15797
- return this.variableOffsets[z.crossTileID] = { textOffset: oe, width: a, height: c, anchor: ee, textBoxScale: f, prevAnchor: pe }, this.markUsedJustification(B, ee, z, V), B.allowVerticalPlacement && (this.markUsedOrientation(B, V, z), this.placedOrientations[z.crossTileID] = V), { shift: ae, placedGlyphBoxes: ge };
15795
+ let fe;
15796
+ if (!((U = this.prevPlacement) === null || U === void 0) && U.variableOffsets[z.crossTileID] && (!((q = (H = this.prevPlacement) === null || H === void 0 ? void 0 : H.placements[z.crossTileID]) === null || q === void 0) && q.text) && (fe = this.prevPlacement.variableOffsets[z.crossTileID].anchor), z.crossTileID === 0) throw new Error("symbolInstance.crossTileID can't be 0");
15797
+ return this.variableOffsets[z.crossTileID] = { textOffset: oe, width: a, height: c, anchor: ee, textBoxScale: f, prevAnchor: fe }, this.markUsedJustification(B, ee, z, V), B.allowVerticalPlacement && (this.markUsedOrientation(B, V, z), this.placedOrientations[z.crossTileID] = V), { shift: ae, placedGlyphBoxes: ge };
15798
15798
  }
15799
15799
  }
15800
15800
  placeLayerBucketPart(t, n, a) {
15801
15801
  const { bucket: c, layout: f, translationText: y, translationIcon: x, unwrappedTileID: w, pitchedLabelPlaneMatrix: S, textPixelRatio: P, holdingForFade: E, collisionBoxArray: C, partiallyEvaluatedTextSize: z, collisionGroup: B } = t.parameters, V = f.get("text-optional"), G = f.get("icon-optional"), N = h.aN(f, "text-overlap", "text-allow-overlap"), Z = N === "always", X = h.aN(f, "icon-overlap", "icon-allow-overlap"), $ = X === "always", U = f.get("text-rotation-alignment") === "map", H = f.get("text-pitch-alignment") === "map", q = f.get("icon-text-fit") !== "none", ee = f.get("symbol-z-order") === "viewport-y", oe = Z && ($ || !c.hasIconData() || G), ae = $ && (Z || !c.hasTextData() || V);
15802
15802
  !c.collisionArrays && C && c.deserializeCollisionBoxes(C);
15803
- const ge = this.retainedQueryData[c.bucketInstanceId].tileID, pe = this._getTerrainElevationFunc(ge), Ae = this.transform.getFastPathSimpleProjectionMatrix(ge), we = (he, Ee, ke) => {
15803
+ const ge = this.retainedQueryData[c.bucketInstanceId].tileID, fe = this._getTerrainElevationFunc(ge), Ae = this.transform.getFastPathSimpleProjectionMatrix(ge), we = (he, Ee, ke) => {
15804
15804
  var st, kt;
15805
15805
  if (n[he.crossTileID]) return;
15806
15806
  if (E) return void (this.placements[he.crossTileID] = new gc(!1, !1, !1));
@@ -15822,7 +15822,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
15822
15822
  }, Vi = he.textAnchorOffsetStartIndex, Xi = he.textAnchorOffsetEndIndex;
15823
15823
  if (Xi === Vi) {
15824
15824
  const bt = (gt, Vt) => {
15825
- const wt = this.collisionIndex.placeCollisionBox(gt, N, P, ge, w, H, U, y, B.predicate, pe, void 0, Ae);
15825
+ const wt = this.collisionIndex.placeCollisionBox(gt, N, P, ge, w, H, U, y, B.predicate, fe, void 0, Ae);
15826
15826
  return wt?.placeable && (this.markUsedOrientation(c, Vt, he), this.placedOrientations[he.crossTileID] = Vt), wt;
15827
15827
  };
15828
15828
  mr((() => bt(ci, h.ax.horizontal)), (() => {
@@ -15839,12 +15839,12 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
15839
15839
  for (let Nl = Vi; Nl < Xi; Nl++) {
15840
15840
  const aa = c.textAnchorOffsets.get(Nl);
15841
15841
  if (bt && aa.textAnchor !== bt) continue;
15842
- const la = this.attemptAnchorPlacement(aa, wt, Ir, Ol, pu, U, H, P, ge, w, B, Yr, he, c, oa, y, x, Vl, pe);
15842
+ const la = this.attemptAnchorPlacement(aa, wt, Ir, Ol, pu, U, H, P, ge, w, B, Yr, he, c, oa, y, x, Vl, fe);
15843
15843
  if (la && (Hr = la.placedGlyphBoxes, Hr?.placeable)) return ut = !0, ai = la.shift, Hr;
15844
15844
  }
15845
15845
  bt ? bt = null : Yr = N;
15846
15846
  }
15847
- return a && !Hr && (Hr = { box: this.collisionIndex.placeCollisionBox(ci, "always", P, ge, w, H, U, y, B.predicate, pe, void 0, Ae).box, offscreen: !1, placeable: !1, occluded: !1 }), Hr;
15847
+ return a && !Hr && (Hr = { box: this.collisionIndex.placeCollisionBox(ci, "always", P, ge, w, H, U, y, B.predicate, fe, void 0, Ae).box, offscreen: !1, placeable: !1, occluded: !1 }), Hr;
15848
15848
  };
15849
15849
  mr((() => gt(ci, Ee.iconBox, h.ax.horizontal)), (() => {
15850
15850
  const wt = Ee.verticalTextBox;
@@ -15859,10 +15859,10 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
15859
15859
  }
15860
15860
  if (ii = Mt, ut = ii?.placeable, Ot = ii?.offscreen, he.useRuntimeCollisionCircles && he.centerJustifiedTextSymbolIndex >= 0) {
15861
15861
  const fr = c.text.placedSymbolArray.get(he.centerJustifiedTextSymbolIndex), mr = h.ay(c.textSizeData, z, fr), Vi = f.get("text-padding");
15862
- qt = this.collisionIndex.placeCollisionCircles(N, fr, c.lineVertexArray, c.glyphOffsetArray, mr, w, S, a, H, B.predicate, he.collisionCircleDiameter, Vi, y, pe), qt.circles.length && qt.collisionDetected && !a && h.w("Collisions detected, but collision boxes are not shown"), ut = Z || qt.circles.length > 0 && !qt.collisionDetected, Ot && (Ot = qt.offscreen);
15862
+ qt = this.collisionIndex.placeCollisionCircles(N, fr, c.lineVertexArray, c.glyphOffsetArray, mr, w, S, a, H, B.predicate, he.collisionCircleDiameter, Vi, y, fe), qt.circles.length && qt.collisionDetected && !a && h.w("Collisions detected, but collision boxes are not shown"), ut = Z || qt.circles.length > 0 && !qt.collisionDetected, Ot && (Ot = qt.offscreen);
15863
15863
  }
15864
15864
  if (Ee.iconFeatureIndex && (qr = Ee.iconFeatureIndex), Ee.iconBox) {
15865
- const fr = (mr) => this.collisionIndex.placeCollisionBox(mr, X, P, ge, w, H, U, x, B.predicate, pe, q && ai ? ai : void 0, Ae);
15865
+ const fr = (mr) => this.collisionIndex.placeCollisionBox(mr, X, P, ge, w, H, U, x, B.predicate, fe, q && ai ? ai : void 0, Ae);
15866
15866
  xi && xi.placeable && Ee.verticalIconBox ? (li = fr(Ee.verticalIconBox), Lt = li.placeable) : (li = fr(Ee.iconBox), Lt = li.placeable), Ot && (Ot = li.offscreen);
15867
15867
  }
15868
15868
  const Pr = V || he.numHorizontalGlyphVertices === 0 && he.numVerticalGlyphVertices === 0, Wr = G || he.numIconVertices === 0;
@@ -15947,8 +15947,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
15947
15947
  a[U] ? H = x : H || (H = B, this.opacities[U] = H), a[U] = !0;
15948
15948
  const q = Z.numIconVertices > 0, ee = this.placedOrientations[Z.crossTileID], oe = ee === h.ax.vertical, ae = ee === h.ax.horizontal || ee === h.ax.horizontalOnly;
15949
15949
  if (X > 0 || $ > 0) {
15950
- const pe = Ha(H.text);
15951
- V(t.text, X, oe ? As : pe), V(t.text, $, ae ? As : pe);
15950
+ const fe = Ha(H.text);
15951
+ V(t.text, X, oe ? As : fe), V(t.text, $, ae ? As : fe);
15952
15952
  const Ae = H.text.isHidden(), we = [Z.rightJustifiedTextSymbolIndex, Z.centerJustifiedTextSymbolIndex, Z.leftJustifiedTextSymbolIndex];
15953
15953
  for (const ke of we) ke >= 0 && (t.text.placedSymbolArray.get(ke).hidden = Ae || oe ? 1 : 0);
15954
15954
  Z.verticalPlacedTextSymbolIndex >= 0 && (t.text.placedSymbolArray.get(Z.verticalPlacedTextSymbolIndex).hidden = Ae || ae ? 1 : 0);
@@ -15958,29 +15958,29 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
15958
15958
  Ee && (this.markUsedJustification(t, "left", Z, Ee), this.markUsedOrientation(t, Ee, Z));
15959
15959
  }
15960
15960
  if (q) {
15961
- const pe = Ha(H.icon), Ae = !(z && Z.verticalPlacedIconSymbolIndex && oe);
15962
- Z.placedIconSymbolIndex >= 0 && (V(t.icon, Z.numIconVertices, Ae ? pe : As), t.icon.placedSymbolArray.get(Z.placedIconSymbolIndex).hidden = H.icon.isHidden()), Z.verticalPlacedIconSymbolIndex >= 0 && (V(t.icon, Z.numVerticalIconVertices, Ae ? As : pe), t.icon.placedSymbolArray.get(Z.verticalPlacedIconSymbolIndex).hidden = H.icon.isHidden());
15961
+ const fe = Ha(H.icon), Ae = !(z && Z.verticalPlacedIconSymbolIndex && oe);
15962
+ Z.placedIconSymbolIndex >= 0 && (V(t.icon, Z.numIconVertices, Ae ? fe : As), t.icon.placedSymbolArray.get(Z.placedIconSymbolIndex).hidden = H.icon.isHidden()), Z.verticalPlacedIconSymbolIndex >= 0 && (V(t.icon, Z.numVerticalIconVertices, Ae ? As : fe), t.icon.placedSymbolArray.get(Z.verticalPlacedIconSymbolIndex).hidden = H.icon.isHidden());
15963
15963
  }
15964
15964
  const ge = G?.has(N) ? G.get(N) : { text: null, icon: null };
15965
15965
  if (t.hasIconCollisionBoxData() || t.hasTextCollisionBoxData()) {
15966
- const pe = t.collisionArrays[N];
15967
- if (pe) {
15966
+ const fe = t.collisionArrays[N];
15967
+ if (fe) {
15968
15968
  let Ae = new h.P(0, 0);
15969
- if (pe.textBox || pe.verticalTextBox) {
15969
+ if (fe.textBox || fe.verticalTextBox) {
15970
15970
  let we = !0;
15971
15971
  if (P) {
15972
15972
  const he = this.variableOffsets[U];
15973
15973
  he ? (Ae = wo(he.anchor, he.width, he.height, he.textOffset, he.textBoxScale), E && Ae._rotate(C ? -this.transform.bearingInRadians : this.transform.bearingInRadians)) : we = !1;
15974
15974
  }
15975
- if (pe.textBox || pe.verticalTextBox) {
15975
+ if (fe.textBox || fe.verticalTextBox) {
15976
15976
  let he;
15977
- pe.textBox && (he = oe), pe.verticalTextBox && (he = ae), $a(t.textCollisionBox.collisionVertexArray, H.text.placed, !we || he, ge.text, Ae.x, Ae.y);
15977
+ fe.textBox && (he = oe), fe.verticalTextBox && (he = ae), $a(t.textCollisionBox.collisionVertexArray, H.text.placed, !we || he, ge.text, Ae.x, Ae.y);
15978
15978
  }
15979
15979
  }
15980
- if (pe.iconBox || pe.verticalIconBox) {
15981
- const we = !!(!ae && pe.verticalIconBox);
15980
+ if (fe.iconBox || fe.verticalIconBox) {
15981
+ const we = !!(!ae && fe.verticalIconBox);
15982
15982
  let he;
15983
- pe.iconBox && (he = we), pe.verticalIconBox && (he = !we), $a(t.iconCollisionBox.collisionVertexArray, H.icon.placed, he, ge.icon, z ? Ae.x : 0, z ? Ae.y : 0);
15983
+ fe.iconBox && (he = we), fe.verticalIconBox && (he = !we), $a(t.iconCollisionBox.collisionVertexArray, H.icon.placed, he, ge.icon, z ? Ae.x : 0, z ? Ae.y : 0);
15984
15984
  }
15985
15985
  }
15986
15986
  }
@@ -17428,9 +17428,9 @@ uniform ${P} ${E} u_${C};
17428
17428
  const oe = h.b0([], q[ee[0]], q[ee[1]]), ae = h.b0([], q[ee[2]], q[ee[1]]), ge = [0, 0, 0, 0];
17429
17429
  return h.b1(ge, h.b2([], oe, ae)), ge[3] = -h.b3(ge, q[ee[0]]), ge;
17430
17430
  })(C, z), H = (function(q, ee) {
17431
- const oe = h.b7(q), ae = h.b8([], q, 1 / oe), ge = h.b0([], ee, h.aZ([], ae, h.b3(ee, ae))), pe = h.b7(ge);
17432
- if (pe > 0) {
17433
- const Ae = Math.sqrt(1 - ae[3] * ae[3]), we = h.aZ([], ae, -ae[3]), he = h.a_([], we, h.aZ([], ge, Ae / pe));
17431
+ const oe = h.b7(q), ae = h.b8([], q, 1 / oe), ge = h.b0([], ee, h.aZ([], ae, h.b3(ee, ae))), fe = h.b7(ge);
17432
+ if (fe > 0) {
17433
+ const Ae = Math.sqrt(1 - ae[3] * ae[3]), we = h.aZ([], ae, -ae[3]), he = h.a_([], we, h.aZ([], ge, Ae / fe));
17434
17434
  return h.b9(ee, he);
17435
17435
  }
17436
17436
  return null;
@@ -18360,7 +18360,7 @@ uniform ${P} ${E} u_${C};
18360
18360
  if (w !== x) for (const ge of S) P.push(h.aZ([], ge, x));
18361
18361
  t.y === 0 && P.push([0, 1, 0]), t.y === (1 << t.z) - 1 && P.push([0, -1, 0]);
18362
18362
  const E = [1, 1, 1], C = [-1, -1, -1];
18363
- for (const ge of P) for (let pe = 0; pe < 3; pe++) E[pe] = Math.min(E[pe], ge[pe]), C[pe] = Math.max(C[pe], ge[pe]);
18363
+ for (const ge of P) for (let fe = 0; fe < 3; fe++) E[fe] = Math.min(E[fe], ge[fe]), C[fe] = Math.max(C[fe], ge[fe]);
18364
18364
  const z = Rt(h.a6 / 2, h.a6 / 2, t.x, t.y, t.z), B = h.b2([], [0, 1, 0], z);
18365
18365
  h.b1(B, B);
18366
18366
  const V = h.b2([], z, B);
@@ -19397,8 +19397,8 @@ uniform ${P} ${E} u_${C};
19397
19397
  G[N] = {};
19398
19398
  const Z = At.getImageCanvasContext((yield V[N]).data), X = (yield B[N]).data;
19399
19399
  for (const $ in X) {
19400
- const { width: U, height: H, x: q, y: ee, sdf: oe, pixelRatio: ae, stretchX: ge, stretchY: pe, content: Ae, textFitWidth: we, textFitHeight: he } = X[$];
19401
- G[N][$] = { data: null, pixelRatio: ae, sdf: oe, stretchX: ge, stretchY: pe, content: Ae, textFitWidth: we, textFitHeight: he, spriteData: { width: U, height: H, x: q, y: ee, context: Z } };
19400
+ const { width: U, height: H, x: q, y: ee, sdf: oe, pixelRatio: ae, stretchX: ge, stretchY: fe, content: Ae, textFitWidth: we, textFitHeight: he } = X[$];
19401
+ G[N][$] = { data: null, pixelRatio: ae, sdf: oe, stretchX: ge, stretchY: fe, content: Ae, textFitWidth: we, textFitHeight: he, spriteData: { width: U, height: H, x: q, y: ee, context: Z } };
19402
19402
  }
19403
19403
  }
19404
19404
  return G;
@@ -20730,7 +20730,7 @@ uniform ${P} ${E} u_${C};
20730
20730
  const X = new h.P(N.anchorX, N.anchorY), $ = { getElevation: E, width: c.width, height: c.height, pitchedLabelPlaneMatrix: f, pitchWithMap: n, transform: c, tileAnchorPoint: X, translation: S, unwrappedTileID: P }, U = n ? Nn(X.x, X.y, $) : at(X.x, X.y, $), H = Ts(c.cameraToCenterDistance, U.signedDistanceFromCamera);
20731
20731
  let q = h.ay(d.textSizeData, x, N) * H / h.aJ;
20732
20732
  n && (q *= d.tilePixelRatio / y);
20733
- const { width: ee, height: oe, anchor: ae, textOffset: ge, textBoxScale: pe } = Z, Ae = fl(ae, ee, oe, ge, pe, q), we = c.getPitchedTextCorrection(X.x + S[0], X.y + S[1], P), he = sh(U.point, $, t, Ae, -c.bearingInRadians, we), Ee = d.allowVerticalPlacement && N.placedOrientation === h.ax.vertical ? Math.PI / 2 : 0;
20733
+ const { width: ee, height: oe, anchor: ae, textOffset: ge, textBoxScale: fe } = Z, Ae = fl(ae, ee, oe, ge, fe, q), we = c.getPitchedTextCorrection(X.x + S[0], X.y + S[1], P), he = sh(U.point, $, t, Ae, -c.bearingInRadians, we), Ee = d.allowVerticalPlacement && N.placedOrientation === h.ax.vertical ? Math.PI / 2 : 0;
20734
20734
  for (let ke = 0; ke < N.numGlyphs; ke++) h.aD(z, he, Ee);
20735
20735
  w && N.associatedIconIndex >= 0 && (V[N.associatedIconIndex] = { shiftedAnchor: he, angle: Ee });
20736
20736
  } else cn(N.numGlyphs, z);
@@ -20789,7 +20789,7 @@ uniform ${P} ${E} u_${C};
20789
20789
  } else ae.push({ segments: ke.segments, sortKey: 0, state: Vt, terrainData: Mt });
20790
20790
  }
20791
20791
  q && ae.sort(((we, he) => we.sortKey - he.sortKey));
20792
- const pe = (B = n.paint.get(c ? "text-halo-width" : "icon-halo-width").constantOr(null)) !== null && B !== void 0 ? B : 1 / 0, Ae = n.layout.get("text-letter-spacing").constantOr(0) * h.aJ < 0 || pe > 1;
20792
+ const fe = (B = n.paint.get(c ? "text-halo-width" : "icon-halo-width").constantOr(null)) !== null && B !== void 0 ? B : 1 / 0, Ae = n.layout.get("text-letter-spacing").constantOr(0) * h.aJ < 0 || fe > 1;
20793
20793
  for (const we of ae) {
20794
20794
  const he = we.state;
20795
20795
  V.activeTexture.set(G.TEXTURE0), he.atlasTexture.bind(he.atlasInterpolation, G.CLAMP_TO_EDGE), he.atlasTextureIcon && (V.activeTexture.set(G.TEXTURE1), he.atlasTextureIcon && he.atlasTextureIcon.bind(he.atlasInterpolationIcon, G.CLAMP_TO_EDGE));
@@ -20881,7 +20881,7 @@ uniform ${P} ${E} u_${C};
20881
20881
  if (C && !ee.patternsLoaded()) continue;
20882
20882
  const oe = ee.getBucket(n);
20883
20883
  if (!oe) continue;
20884
- const ae = oe.programConfigurations.get(n.id), ge = d.useProgram(V, ae), pe = (w = d.style.map.terrain) === null || w === void 0 ? void 0 : w.getTerrainData(q);
20884
+ const ae = oe.programConfigurations.get(n.id), ge = d.useProgram(V, ae), fe = (w = d.style.map.terrain) === null || w === void 0 ? void 0 : w.getTerrainData(q);
20885
20885
  C && (d.context.activeTexture.set(S.TEXTURE0), ee.imageAtlasTexture.bind(S.LINEAR, S.CLAMP_TO_EDGE), ae.updatePaintBuffers(z)), Ai(ae, P, H, ee, n);
20886
20886
  const Ae = X.getProjectionData({ overscaledTileID: q, applyGlobeMatrix: !x, applyTerrainMatrix: !0 }), we = h.aL(X, ee, $, U);
20887
20887
  if (y) {
@@ -20890,7 +20890,7 @@ uniform ${P} ${E} u_${C};
20890
20890
  G = V === "fillOutlinePattern" && C ? Ec(d, z, ee, Ee, we) : Mc(Ee, we);
20891
20891
  } else N = oe.indexBuffer, Z = oe.segments, G = C ? Do(d, z, ee, we) : { u_fill_translate: we };
20892
20892
  const he = d.stencilModeForClipping(q);
20893
- ge.draw(d.context, B, c, he, f, Je.backCCW, G, pe, Ae, n.id, oe.layoutVertexBuffer, N, Z, n.paint, d.transform.zoom, ae);
20893
+ ge.draw(d.context, B, c, he, f, Je.backCCW, G, fe, Ae, n.id, oe.layoutVertexBuffer, N, Z, n.paint, d.transform.zoom, ae);
20894
20894
  }
20895
20895
  }
20896
20896
  function ns(d, t, n, a, c, f, y, x) {
@@ -20928,8 +20928,8 @@ uniform ${P} ${E} u_${C};
20928
20928
  const $ = t.getTile(X), U = $.dem;
20929
20929
  if (N) {
20930
20930
  Nr || (Nr = z.getParameter(z.MAX_TEXTURE_SIZE));
20931
- const ge = Nr, { elevationTexture: pe, colorTexture: Ae } = n.getColorRampTextures(E, ge, U.getUnpackVector());
20932
- E.activeTexture.set(z.TEXTURE1), pe.bind(z.NEAREST, z.CLAMP_TO_EDGE), E.activeTexture.set(z.TEXTURE4), Ae.bind(z.LINEAR, z.CLAMP_TO_EDGE), N = !1, Z = pe.size[0];
20931
+ const ge = Nr, { elevationTexture: fe, colorTexture: Ae } = n.getColorRampTextures(E, ge, U.getUnpackVector());
20932
+ E.activeTexture.set(z.TEXTURE1), fe.bind(z.NEAREST, z.CLAMP_TO_EDGE), E.activeTexture.set(z.TEXTURE4), Ae.bind(z.LINEAR, z.CLAMP_TO_EDGE), N = !1, Z = fe.size[0];
20933
20933
  }
20934
20934
  if (!U?.data) continue;
20935
20935
  const H = U.stride, q = U.getPixels();
@@ -20948,9 +20948,9 @@ uniform ${P} ${E} u_${C};
20948
20948
  for (const q of a) {
20949
20949
  const ee = d.getDepthModeForSublayer(q.overscaledZ - E, X === 1 ? Ze.ReadWrite : Ze.ReadOnly, z.LESS), oe = t.getTile(q);
20950
20950
  C.activeTexture.set(z.TEXTURE0), oe.texture.bind($, z.CLAMP_TO_EDGE, z.LINEAR_MIPMAP_NEAREST), C.activeTexture.set(z.TEXTURE1);
20951
- const { parentTile: ae, parentScaleBy: ge, parentTopLeft: pe, fadeValues: Ae } = qc(oe, t, U, H);
20951
+ const { parentTile: ae, parentScaleBy: ge, parentTopLeft: fe, fadeValues: Ae } = qc(oe, t, U, H);
20952
20952
  oe.fadeOpacity = Ae.tileOpacity, ae ? (ae.fadeOpacity = Ae.parentTileOpacity, ae.texture.bind($, z.CLAMP_TO_EDGE, z.LINEAR_MIPMAP_NEAREST)) : oe.texture.bind($, z.CLAMP_TO_EDGE, z.LINEAR_MIPMAP_NEAREST), oe.texture.useMipmap && C.extTextureFilterAnisotropic && d.transform.pitch > d.options.anisotropicFilterPitch && z.texParameterf(z.TEXTURE_2D, C.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT, C.extTextureFilterAnisotropicMax);
20953
- const we = (P = d.style.map.terrain) === null || P === void 0 ? void 0 : P.getTerrainData(q), he = V.getProjectionData({ overscaledTileID: q, aligned: Z, applyGlobeMatrix: !S, applyTerrainMatrix: !0 }), Ee = ol(pe, ge, Ae.fadeMix, n, x), ke = G.getMeshFromTileID(C, q.canonical, f, y, "raster");
20953
+ const we = (P = d.style.map.terrain) === null || P === void 0 ? void 0 : P.getTerrainData(q), he = V.getProjectionData({ overscaledTileID: q, aligned: Z, applyGlobeMatrix: !S, applyTerrainMatrix: !0 }), Ee = ol(fe, ge, Ae.fadeMix, n, x), ke = G.getMeshFromTileID(C, q.canonical, f, y, "raster");
20954
20954
  B.draw(C, z.TRIANGLES, ee, c ? c[q.overscaledZ] : et.disabled, N, w ? Je.frontCCW : Je.backCCW, Ee, we, he, n.id, ke.vertexBuffer, ke.indexBuffer, ke.segments);
20955
20955
  }
20956
20956
  }
@@ -21028,10 +21028,10 @@ uniform ${P} ${E} u_${C};
21028
21028
  for (const q of S) {
21029
21029
  const ee = C.getTile(q), oe = ee.getBucket(E);
21030
21030
  if (!(!((Z = oe?.text) === null || Z === void 0) && Z.segments.get().length)) continue;
21031
- const ae = h.aw(oe.textSizeData, X.zoom), ge = h.aK(ee, 1, P.transform.zoom), pe = Ri(U, P.transform, ge), Ae = E.layout.get("icon-text-fit") !== "none" && oe.hasIconData();
21031
+ const ae = h.aw(oe.textSizeData, X.zoom), ge = h.aK(ee, 1, P.transform.zoom), fe = Ri(U, P.transform, ge), Ae = E.layout.get("icon-text-fit") !== "none" && oe.hasIconData();
21032
21032
  if (ae) {
21033
21033
  const we = Math.pow(2, X.zoom - ee.tileID.overscaledZ), he = $ ? (Ee, ke) => $.getElevation(q, Ee, ke) : null;
21034
- js(oe, U, H, N, X, pe, we, ae, Ae, h.aL(X, ee, V, G), q.toUnwrapped(), he);
21034
+ js(oe, U, H, N, X, fe, we, ae, Ae, h.aL(X, ee, V, G), q.toUnwrapped(), he);
21035
21035
  }
21036
21036
  }
21037
21037
  })(a, d, n, t, n.layout.get("text-rotation-alignment"), n.layout.get("text-pitch-alignment"), n.paint.get("text-translate"), n.paint.get("text-translate-anchor"), c), n.paint.get("icon-opacity").constantOr(1) !== 0 && ml(d, t, n, a, !1, n.paint.get("icon-translate"), n.paint.get("icon-translate-anchor"), n.layout.get("icon-rotation-alignment"), n.layout.get("icon-pitch-alignment"), n.layout.get("icon-keep-upright"), x, w, y), n.paint.get("text-opacity").constantOr(1) !== 0 && ml(d, t, n, a, !0, n.paint.get("text-translate"), n.paint.get("text-translate-anchor"), n.layout.get("text-rotation-alignment"), n.layout.get("text-pitch-alignment"), n.layout.get("text-keep-upright"), x, w, y), t.map.showCollisionBoxes && (is(d, t, n, a, !0), is(d, t, n, a, !1));
@@ -21044,7 +21044,7 @@ uniform ${P} ${E} u_${C};
21044
21044
  for (const X of a) {
21045
21045
  const $ = t.getTile(X), U = $.getBucket(n);
21046
21046
  if (!U) continue;
21047
- const H = n.paint.get("circle-translate"), q = n.paint.get("circle-translate-anchor"), ee = h.aL(z, $, H, q), oe = U.programConfigurations.get(n.id), ae = d.useProgram("circle", oe), ge = U.layoutVertexBuffer, pe = U.indexBuffer, Ae = (f = d.style.map.terrain) === null || f === void 0 ? void 0 : f.getTerrainData(X), we = { programConfiguration: oe, program: ae, layoutVertexBuffer: ge, indexBuffer: pe, uniformValues: Cc(d, $, n, ee, Z), terrainData: Ae, projectionData: z.getProjectionData({ overscaledTileID: X, applyGlobeMatrix: !y, applyTerrainMatrix: !0 }) };
21047
+ const H = n.paint.get("circle-translate"), q = n.paint.get("circle-translate-anchor"), ee = h.aL(z, $, H, q), oe = U.programConfigurations.get(n.id), ae = d.useProgram("circle", oe), ge = U.layoutVertexBuffer, fe = U.indexBuffer, Ae = (f = d.style.map.terrain) === null || f === void 0 ? void 0 : f.getTerrainData(X), we = { programConfiguration: oe, program: ae, layoutVertexBuffer: ge, indexBuffer: fe, uniformValues: Cc(d, $, n, ee, Z), terrainData: Ae, projectionData: z.getProjectionData({ overscaledTileID: X, applyGlobeMatrix: !y, applyTerrainMatrix: !0 }) };
21048
21048
  if (P) {
21049
21049
  const he = U.segments.get();
21050
21050
  for (const Ee of he) N.push({ segments: new h.aV([Ee]), sortKey: Ee.sortKey, state: we });
@@ -21101,7 +21101,7 @@ uniform ${P} ${E} u_${C};
21101
21101
  if (B && !q.patternsLoaded()) continue;
21102
21102
  const ee = q.getBucket(n);
21103
21103
  if (!ee) continue;
21104
- const oe = ee.programConfigurations.get(n.id), ae = d.context.program.get(), ge = d.useProgram(N, oe), pe = U || ge.program !== ae, Ae = (f = d.style.map.terrain) === null || f === void 0 ? void 0 : f.getTerrainData(H), we = z.constantOr(null), he = E?.constantOr(null);
21104
+ const oe = ee.programConfigurations.get(n.id), ae = d.context.program.get(), ge = d.useProgram(N, oe), fe = U || ge.program !== ae, Ae = (f = d.style.map.terrain) === null || f === void 0 ? void 0 : f.getTerrainData(H), we = z.constantOr(null), he = E?.constantOr(null);
21105
21105
  if (we && q.imageAtlas) {
21106
21106
  const ut = q.imageAtlas, Lt = ut.patternPositions[we.to.toString()], Ot = ut.patternPositions[we.from.toString()];
21107
21107
  Lt && Ot && oe.setConstantPatternPositions(Lt, Ot);
@@ -21111,7 +21111,7 @@ uniform ${P} ${E} u_${C};
21111
21111
  }
21112
21112
  const Ee = $.getProjectionData({ overscaledTileID: H, applyGlobeMatrix: !y, applyTerrainMatrix: !0 }), ke = $.getPixelScale();
21113
21113
  let st;
21114
- B ? (st = zc(d, q, n, ke, G), ah(Z, X, q, oe, G)) : C && V ? (st = kc(d, q, n, ke, G, ee.lineClipsArray.length), wn(d, t, Z, X, n, ee, H, oe, G)) : C ? (st = sl(d, q, n, ke, G), $c(d, Z, X, oe, pe, G)) : V ? (st = Dc(d, q, n, ke, ee.lineClipsArray.length), zt(d, t, Z, X, n, ee, H)) : st = Rs(d, q, n, ke);
21114
+ B ? (st = zc(d, q, n, ke, G), ah(Z, X, q, oe, G)) : C && V ? (st = kc(d, q, n, ke, G, ee.lineClipsArray.length), wn(d, t, Z, X, n, ee, H, oe, G)) : C ? (st = sl(d, q, n, ke, G), $c(d, Z, X, oe, fe, G)) : V ? (st = Dc(d, q, n, ke, ee.lineClipsArray.length), zt(d, t, Z, X, n, ee, H)) : st = Rs(d, q, n, ke);
21115
21115
  const kt = d.stencilModeForClipping(H);
21116
21116
  ge.draw(Z, X.TRIANGLES, S, kt, P, Je.disabled, st, Ae, Ee, n.id, ee.layoutVertexBuffer, ee.indexBuffer, ee.segments, n.paint, d.transform.zoom, oe, ee.layoutVertexBuffer2), U = !1;
21117
21117
  }
@@ -21611,7 +21611,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
21611
21611
  }
21612
21612
  constructor(t, n, a, c = {}) {
21613
21613
  a = a instanceof MouseEvent ? a : new MouseEvent(t, a);
21614
- const f = fe.mousePos(n.getCanvas(), a), y = n.unproject(f);
21614
+ const f = me.mousePos(n.getCanvas(), a), y = n.unproject(f);
21615
21615
  super(t, h.e({ point: f, lngLat: y, originalEvent: a }, c)), this._defaultPrevented = !1, this.target = n;
21616
21616
  }
21617
21617
  }
@@ -21623,7 +21623,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
21623
21623
  return this._defaultPrevented;
21624
21624
  }
21625
21625
  constructor(t, n, a) {
21626
- const c = t === "touchend" ? a.changedTouches : a.touches, f = fe.touchPos(n.getCanvasContainer(), c), y = f.map(((w) => n.unproject(w))), x = f.reduce(((w, S, P, E) => w.add(S.div(E.length))), new h.P(0, 0));
21626
+ const c = t === "touchend" ? a.changedTouches : a.touches, f = me.touchPos(n.getCanvasContainer(), c), y = f.map(((w) => n.unproject(w))), x = f.reduce(((w, S, P, E) => w.add(S.div(E.length))), new h.P(0, 0));
21627
21627
  super(t, { points: f, point: x, lngLats: y, lngLat: n.unproject(x), originalEvent: a }), this._defaultPrevented = !1;
21628
21628
  }
21629
21629
  }
@@ -21762,28 +21762,28 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
21762
21762
  this.isEnabled() && (this._enabled = !1);
21763
21763
  }
21764
21764
  mousedown(t, n) {
21765
- this.isEnabled() && t.shiftKey && t.button === 0 && (fe.disableDrag(), this._startPos = this._lastPos = n, this._active = !0);
21765
+ this.isEnabled() && t.shiftKey && t.button === 0 && (me.disableDrag(), this._startPos = this._lastPos = n, this._active = !0);
21766
21766
  }
21767
21767
  mousemoveWindow(t, n) {
21768
21768
  if (!this._active) return;
21769
21769
  const a = n;
21770
21770
  if (this._lastPos.equals(a) || !this._box && a.dist(this._startPos) < this._clickTolerance) return;
21771
21771
  const c = this._startPos;
21772
- this._lastPos = a, this._box || (this._box = fe.create("div", "maplibregl-boxzoom", this._container), this._container.classList.add("maplibregl-crosshair"), this._fireEvent("boxzoomstart", t));
21772
+ this._lastPos = a, this._box || (this._box = me.create("div", "maplibregl-boxzoom", this._container), this._container.classList.add("maplibregl-crosshair"), this._fireEvent("boxzoomstart", t));
21773
21773
  const f = Math.min(c.x, a.x), y = Math.max(c.x, a.x), x = Math.min(c.y, a.y), w = Math.max(c.y, a.y);
21774
21774
  this._box.style.transform = `translate(${f}px,${x}px)`, this._box.style.width = y - f + "px", this._box.style.height = w - x + "px";
21775
21775
  }
21776
21776
  mouseupWindow(t, n) {
21777
21777
  if (!this._active || t.button !== 0) return;
21778
21778
  const a = this._startPos, c = n;
21779
- if (this.reset(), fe.suppressClick(), a.x !== c.x || a.y !== c.y) return this._map.fire(new h.n("boxzoomend", { originalEvent: t })), this._boxZoomEnd ? void this._boxZoomEnd(this._map, a, c, t) : { cameraAnimation: (f) => f.fitScreenCoordinates(a, c, this._tr.bearing, { linear: !0 }) };
21779
+ if (this.reset(), me.suppressClick(), a.x !== c.x || a.y !== c.y) return this._map.fire(new h.n("boxzoomend", { originalEvent: t })), this._boxZoomEnd ? void this._boxZoomEnd(this._map, a, c, t) : { cameraAnimation: (f) => f.fitScreenCoordinates(a, c, this._tr.bearing, { linear: !0 }) };
21780
21780
  this._fireEvent("boxzoomcancel", t);
21781
21781
  }
21782
21782
  keydown(t) {
21783
21783
  this._active && t.keyCode === 27 && (this.reset(), this._fireEvent("boxzoomcancel", t));
21784
21784
  }
21785
21785
  reset() {
21786
- this._active = !1, this._container.classList.remove("maplibregl-crosshair"), this._box && (this._box.remove(), this._box = null), fe.enableDrag(), delete this._startPos, delete this._lastPos;
21786
+ this._active = !1, this._container.classList.remove("maplibregl-crosshair"), this._box && (this._box.remove(), this._box = null), me.enableDrag(), delete this._startPos, delete this._lastPos;
21787
21787
  }
21788
21788
  _fireEvent(t, n) {
21789
21789
  return this._map.fire(new h.n(t, { originalEvent: n }));
@@ -21901,7 +21901,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
21901
21901
  return !this._moved && c.dist(a) < this._clickTolerance ? void 0 : (this._moved = !0, this._lastPoint = c, this._move(a, c));
21902
21902
  }
21903
21903
  dragEnd(t) {
21904
- this.isEnabled() && this._lastPoint && this._moveStateManager.isValidEndEvent(t) && (this._moved && fe.suppressClick(), this.reset(t));
21904
+ this.isEnabled() && this._lastPoint && this._moveStateManager.isValidEndEvent(t) && (this._moved && me.suppressClick(), this.reset(t));
21905
21905
  }
21906
21906
  enable() {
21907
21907
  this._enabled = !0;
@@ -22076,7 +22076,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
22076
22076
  touchend(t, n, a) {
22077
22077
  if (!this._firstTwoTouches) return;
22078
22078
  const [c, f] = this._firstTwoTouches, y = Xo(a, n, c), x = Xo(a, n, f);
22079
- y && x || (this._active && fe.suppressClick(), this.reset());
22079
+ y && x || (this._active && me.suppressClick(), this.reset());
22080
22080
  }
22081
22081
  touchcancel() {
22082
22082
  this.reset();
@@ -22279,7 +22279,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
22279
22279
  _start(t) {
22280
22280
  if (!this._delta) return;
22281
22281
  this._needsRerender = !1, this._active = !0, this.isZooming() || (this._zooming = !0), this._finishTimeout && (clearTimeout(this._finishTimeout), delete this._finishTimeout);
22282
- const n = fe.mousePos(this._map.getCanvas(), t), a = this._tr;
22282
+ const n = me.mousePos(this._map.getCanvas(), t), a = this._tr;
22283
22283
  this._aroundPoint = this._aroundCenter ? a.transform.locationToScreenPoint(h.W.convert(a.center)) : n, this._needsRerender || (this._needsRerender = !0, this._triggerRenderFrame());
22284
22284
  }
22285
22285
  renderFrame() {
@@ -22487,7 +22487,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
22487
22487
  _setupUI() {
22488
22488
  if (this._container) return;
22489
22489
  const t = this._map.getCanvasContainer();
22490
- t.classList.add("maplibregl-cooperative-gestures"), this._container = fe.create("div", "maplibregl-cooperative-gesture-screen", t);
22490
+ t.classList.add("maplibregl-cooperative-gestures"), this._container = me.create("div", "maplibregl-cooperative-gesture-screen", t);
22491
22491
  let n = this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");
22492
22492
  this._bypassKey === "metaKey" && (n = this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));
22493
22493
  const a = this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"), c = document.createElement("div");
@@ -22545,10 +22545,10 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
22545
22545
  if (this._blockedByActive(S, B, C)) z.reset();
22546
22546
  else if (z[f || c.type]) {
22547
22547
  if (h.cz(c, f || c.type)) {
22548
- const G = fe.mousePos(this._map.getCanvas(), c);
22548
+ const G = me.mousePos(this._map.getCanvas(), c);
22549
22549
  V = z[f || c.type](c, G);
22550
22550
  } else if (h.cA(c, f || c.type)) {
22551
- const G = this._getMapTouches(c.touches), N = fe.touchPos(this._map.getCanvas(), G);
22551
+ const G = this._getMapTouches(c.touches), N = me.touchPos(this._map.getCanvas(), G);
22552
22552
  V = z[f || c.type](c, N, G);
22553
22553
  } else h.cB(f || c.type) || (V = z[f || c.type](c));
22554
22554
  this.mergeHandlerResult(x, w, V, C, y), V?.needsRenderFrame && this._triggerRenderFrame();
@@ -22583,11 +22583,11 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
22583
22583
  this._add("touchPitch", S), t.interactive && t.touchPitch && n.touchPitch.enable(t.touchPitch);
22584
22584
  const P = () => n.project(n.getCenter()), E = (function({ enable: $, clickTolerance: U, aroundCenter: H = !0, minPixelCenterThreshold: q = 100, rotateDegreesPerPixelMoved: ee = 0.8 }, oe) {
22585
22585
  const ae = new Sn({ checkCorrectEvent: (ge) => ge.button === 0 && ge.ctrlKey || ge.button === 2 && !ge.ctrlKey });
22586
- return new wr({ clickTolerance: U, move: (ge, pe) => {
22586
+ return new wr({ clickTolerance: U, move: (ge, fe) => {
22587
22587
  const Ae = oe();
22588
- if (H && Math.abs(Ae.y - ge.y) > q) return { bearingDelta: h.cx(new h.P(ge.x, pe.y), pe, Ae) };
22589
- let we = (pe.x - ge.x) * ee;
22590
- return H && pe.y < Ae.y && (we = -we), { bearingDelta: we };
22588
+ if (H && Math.abs(Ae.y - ge.y) > q) return { bearingDelta: h.cx(new h.P(ge.x, fe.y), fe, Ae) };
22589
+ let we = (fe.x - ge.x) * ee;
22590
+ return H && fe.y < Ae.y && (we = -we), { bearingDelta: we };
22591
22591
  }, moveStateManager: ae, enable: $, assignEvents: Ho });
22592
22592
  })(t, P), C = (function({ enable: $, clickTolerance: U, pitchDegreesPerPixelMoved: H = -0.5 }) {
22593
22593
  const q = new Sn({ checkCorrectEvent: (ee) => ee.button === 0 && ee.ctrlKey || ee.button === 2 });
@@ -22596,8 +22596,8 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
22596
22596
  const ee = new Sn({ checkCorrectEvent: (oe) => oe.button === 2 && oe.ctrlKey });
22597
22597
  return new wr({ clickTolerance: U, move: (oe, ae) => {
22598
22598
  const ge = q();
22599
- let pe = (ae.x - oe.x) * H;
22600
- return ae.y < ge.y && (pe = -pe), { rollDelta: pe };
22599
+ let fe = (ae.x - oe.x) * H;
22600
+ return ae.y < ge.y && (fe = -fe), { rollDelta: fe };
22601
22601
  }, moveStateManager: ee, enable: $, assignEvents: Ho });
22602
22602
  })(t, P);
22603
22603
  n.dragRotate = new Js(t, E, C, z), this._add("mouseRotate", E, ["mousePitch"]), this._add("mousePitch", C, ["mouseRotate", "mouseRoll"]), this._add("mouseRoll", z, ["mousePitch"]), t.interactive && t.dragRotate && n.dragRotate.enable();
@@ -22922,8 +22922,8 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
22922
22922
  }
22923
22923
  flyTo(t, n) {
22924
22924
  if (!t.essential && At.prefersReducedMotion) {
22925
- const pe = h.V(t, ["center", "zoom", "bearing", "pitch", "roll", "elevation", "padding"]);
22926
- return this.jumpTo(pe, n);
22925
+ const fe = h.V(t, ["center", "zoom", "bearing", "pitch", "roll", "elevation", "padding"]);
22926
+ return this.jumpTo(fe, n);
22927
22927
  }
22928
22928
  this.stop(), "zoom" in (t = h.e({ offset: [0, 0], speed: 1.2, curve: 1.42, easing: h.cy }, t)) && this._zoomSnap && (t.zoom = h.cw(t.zoom, this._zoomSnap));
22929
22929
  const a = this._getTransformForUpdate(), c = a.bearing, f = a.pitch, y = a.roll, x = a.padding, w = "bearing" in t ? this._normalizeBearing(t.bearing, c) : c, S = "pitch" in t ? +t.pitch : f, P = "roll" in t ? this._normalizeBearing(t.roll, y) : y, E = "padding" in t ? t.padding : a.padding, C = h.P.convert(t.offset);
@@ -22933,31 +22933,31 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
22933
22933
  const N = Math.max(a.width, a.height), Z = N / V.scaleOfZoom, X = V.pixelPathLength;
22934
22934
  typeof V.scaleOfMinZoom == "number" && (G = Math.sqrt(N / V.scaleOfMinZoom / X * 2));
22935
22935
  const $ = G * G;
22936
- function U(pe) {
22937
- const Ae = (Z * Z - N * N + (pe ? -1 : 1) * $ * $ * X * X) / (2 * (pe ? Z : N) * $ * X);
22936
+ function U(fe) {
22937
+ const Ae = (Z * Z - N * N + (fe ? -1 : 1) * $ * $ * X * X) / (2 * (fe ? Z : N) * $ * X);
22938
22938
  return Math.log(Math.sqrt(Ae * Ae + 1) - Ae);
22939
22939
  }
22940
- function H(pe) {
22941
- return (Math.exp(pe) - Math.exp(-pe)) / 2;
22940
+ function H(fe) {
22941
+ return (Math.exp(fe) - Math.exp(-fe)) / 2;
22942
22942
  }
22943
- function q(pe) {
22944
- return (Math.exp(pe) + Math.exp(-pe)) / 2;
22943
+ function q(fe) {
22944
+ return (Math.exp(fe) + Math.exp(-fe)) / 2;
22945
22945
  }
22946
22946
  const ee = U(!1);
22947
- let oe = function(pe) {
22948
- return q(ee) / q(ee + G * pe);
22949
- }, ae = function(pe) {
22950
- return N * ((q(ee) * (H(Ae = ee + G * pe) / q(Ae)) - H(ee)) / $) / X;
22947
+ let oe = function(fe) {
22948
+ return q(ee) / q(ee + G * fe);
22949
+ }, ae = function(fe) {
22950
+ return N * ((q(ee) * (H(Ae = ee + G * fe) / q(Ae)) - H(ee)) / $) / X;
22951
22951
  var Ae;
22952
22952
  }, ge = (U(!0) - ee) / G;
22953
22953
  if (Math.abs(X) < 2e-6 || !isFinite(ge)) {
22954
22954
  if (Math.abs(N - Z) < 1e-6) return this.easeTo(t, n);
22955
- const pe = Z < N ? -1 : 1;
22956
- ge = Math.abs(Math.log(Z / N)) / G, ae = () => 0, oe = (Ae) => Math.exp(pe * G * Ae);
22955
+ const fe = Z < N ? -1 : 1;
22956
+ ge = Math.abs(Math.log(Z / N)) / G, ae = () => 0, oe = (Ae) => Math.exp(fe * G * Ae);
22957
22957
  }
22958
- return t.duration = "duration" in t ? +t.duration : 1e3 * ge / ("screenSpeed" in t ? +t.screenSpeed / G : +t.speed), t.maxDuration && t.duration > t.maxDuration && (t.duration = 0), this._zooming = !0, this._rotating = c !== w, this._pitching = S !== f, this._rolling = P !== y, this._padding = !a.isPaddingEqual(E), this._prepareEase(n, !1), this.terrain && this._prepareElevation(V.targetCenter), this._ease(((pe) => {
22959
- const Ae = pe * ge, we = 1 / oe(Ae), he = ae(Ae);
22960
- this._rotating && a.setBearing(h.H.number(c, w, pe)), this._pitching && a.setPitch(h.H.number(f, S, pe)), this._rolling && a.setRoll(h.H.number(y, P, pe)), this._padding && (a.interpolatePadding(x, E, pe), z = a.centerPoint.add(C)), V.easeFunc(pe, we, he, z), this.terrain && !t.freezeElevation && this._updateElevation(pe), this._applyUpdatedTransform(a), this._fireMoveEvents(n);
22958
+ return t.duration = "duration" in t ? +t.duration : 1e3 * ge / ("screenSpeed" in t ? +t.screenSpeed / G : +t.speed), t.maxDuration && t.duration > t.maxDuration && (t.duration = 0), this._zooming = !0, this._rotating = c !== w, this._pitching = S !== f, this._rolling = P !== y, this._padding = !a.isPaddingEqual(E), this._prepareEase(n, !1), this.terrain && this._prepareElevation(V.targetCenter), this._ease(((fe) => {
22959
+ const Ae = fe * ge, we = 1 / oe(Ae), he = ae(Ae);
22960
+ this._rotating && a.setBearing(h.H.number(c, w, fe)), this._pitching && a.setPitch(h.H.number(f, S, fe)), this._rolling && a.setRoll(h.H.number(y, P, fe)), this._padding && (a.interpolatePadding(x, E, fe), z = a.centerPoint.add(C)), V.easeFunc(fe, we, he, z), this.terrain && !t.freezeElevation && this._updateElevation(fe), this._applyUpdatedTransform(a), this._fireMoveEvents(n);
22961
22961
  }), (() => {
22962
22962
  this.terrain && t.freezeElevation && this._finalizeElevation(), this._afterEase(n);
22963
22963
  }), t), this;
@@ -23005,7 +23005,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
23005
23005
  return "bottom-right";
23006
23006
  }
23007
23007
  onAdd(t) {
23008
- return this._map = t, this._compact = this.options.compact, this._container = fe.create("details", "maplibregl-ctrl maplibregl-ctrl-attrib"), this._compactButton = fe.create("summary", "maplibregl-ctrl-attrib-button", this._container), this._compactButton.addEventListener("click", this._toggleAttribution), this._setElementTitle(this._compactButton, "ToggleAttribution"), this._innerContainer = fe.create("div", "maplibregl-ctrl-attrib-inner", this._container), this._updateAttributions(), this._updateCompact(), this._map.on("styledata", this._updateData), this._map.on("sourcedata", this._updateData), this._map.on("terrain", this._updateData), this._map.on("resize", this._updateCompact), this._map.on("drag", this._updateCompactMinimize), this._container;
23008
+ return this._map = t, this._compact = this.options.compact, this._container = me.create("details", "maplibregl-ctrl maplibregl-ctrl-attrib"), this._compactButton = me.create("summary", "maplibregl-ctrl-attrib-button", this._container), this._compactButton.addEventListener("click", this._toggleAttribution), this._setElementTitle(this._compactButton, "ToggleAttribution"), this._innerContainer = me.create("div", "maplibregl-ctrl-attrib-inner", this._container), this._updateAttributions(), this._updateCompact(), this._map.on("styledata", this._updateData), this._map.on("sourcedata", this._updateData), this._map.on("terrain", this._updateData), this._map.on("resize", this._updateCompact), this._map.on("drag", this._updateCompactMinimize), this._container;
23009
23009
  }
23010
23010
  onRemove() {
23011
23011
  this._container.remove(), this._map.off("styledata", this._updateData), this._map.off("sourcedata", this._updateData), this._map.off("terrain", this._updateData), this._map.off("resize", this._updateCompact), this._map.off("drag", this._updateCompactMinimize), this._map = void 0, this._compact = void 0, this._attribHTML = void 0;
@@ -23034,7 +23034,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
23034
23034
  return !0;
23035
23035
  }));
23036
23036
  const a = t.join(" | ");
23037
- a !== this._attribHTML && (this._attribHTML = a, t.length ? (this._innerContainer.innerHTML = fe.sanitize(a), this._container.classList.remove("maplibregl-attrib-empty")) : this._container.classList.add("maplibregl-attrib-empty"), this._updateCompact(), this._editLink = null);
23037
+ a !== this._attribHTML && (this._attribHTML = a, t.length ? (this._innerContainer.innerHTML = me.sanitize(a), this._container.classList.remove("maplibregl-attrib-empty")) : this._container.classList.add("maplibregl-attrib-empty"), this._updateCompact(), this._editLink = null);
23038
23038
  }
23039
23039
  }
23040
23040
  class zl {
@@ -23052,8 +23052,8 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
23052
23052
  }
23053
23053
  onAdd(t) {
23054
23054
  var n;
23055
- this._map = t, this._compact = (n = this.options) === null || n === void 0 ? void 0 : n.compact, this._container = fe.create("div", "maplibregl-ctrl");
23056
- const a = fe.create("a", "maplibregl-ctrl-logo");
23055
+ this._map = t, this._compact = (n = this.options) === null || n === void 0 ? void 0 : n.compact, this._container = me.create("div", "maplibregl-ctrl");
23056
+ const a = me.create("a", "maplibregl-ctrl-logo");
23057
23057
  return a.target = "_blank", a.rel = "noopener nofollow", a.href = "https://maplibre.org/", a.setAttribute("aria-label", this._map._getUIString("LogoControl.Title")), a.setAttribute("rel", "noopener nofollow"), this._container.appendChild(a), this._container.style.display = "block", this._map.on("resize", this._updateCompact), this._updateCompact(), this._container;
23058
23058
  }
23059
23059
  onRemove() {
@@ -23923,12 +23923,12 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
23923
23923
  _setupContainer() {
23924
23924
  const d = this._container;
23925
23925
  d.classList.add("maplibregl-map");
23926
- const t = this._canvasContainer = fe.create("div", "maplibregl-canvas-container", d);
23927
- this._interactive && t.classList.add("maplibregl-interactive"), this._canvas = fe.create("canvas", "maplibregl-canvas", t), this._canvas.addEventListener("webglcontextlost", this._contextLost, !1), this._canvas.addEventListener("webglcontextrestored", this._contextRestored, !1), this._canvas.setAttribute("tabindex", this._interactive ? "0" : "-1"), this._canvas.setAttribute("aria-label", this._getUIString("Map.Title")), this._canvas.setAttribute("role", "region");
23926
+ const t = this._canvasContainer = me.create("div", "maplibregl-canvas-container", d);
23927
+ this._interactive && t.classList.add("maplibregl-interactive"), this._canvas = me.create("canvas", "maplibregl-canvas", t), this._canvas.addEventListener("webglcontextlost", this._contextLost, !1), this._canvas.addEventListener("webglcontextrestored", this._contextRestored, !1), this._canvas.setAttribute("tabindex", this._interactive ? "0" : "-1"), this._canvas.setAttribute("aria-label", this._getUIString("Map.Title")), this._canvas.setAttribute("role", "region");
23928
23928
  const n = this._containerDimensions(), a = this._getClampedPixelRatio(n[0], n[1]);
23929
23929
  this._resizeCanvas(n[0], n[1], a);
23930
- const c = this._controlContainer = fe.create("div", "maplibregl-control-container", d), f = this._controlPositions = {};
23931
- for (const y of ["top-left", "top-right", "bottom-left", "bottom-right"]) f[y] = fe.create("div", `maplibregl-ctrl-${y} `, c);
23930
+ const c = this._controlContainer = me.create("div", "maplibregl-control-container", d), f = this._controlPositions = {};
23931
+ for (const y of ["top-left", "top-right", "bottom-left", "bottom-right"]) f[y] = me.create("div", `maplibregl-ctrl-${y} `, c);
23932
23932
  this._container.addEventListener("scroll", this._onMapScroll, !1);
23933
23933
  }
23934
23934
  _resizeCanvas(d, t, n) {
@@ -24057,15 +24057,15 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
24057
24057
  class to {
24058
24058
  constructor(t, n, a = !1) {
24059
24059
  this.mousedown = (f) => {
24060
- this.startMove(f, fe.mousePos(this.element, f)), window.addEventListener("mousemove", this.mousemove), window.addEventListener("mouseup", this.mouseup);
24060
+ this.startMove(f, me.mousePos(this.element, f)), window.addEventListener("mousemove", this.mousemove), window.addEventListener("mouseup", this.mouseup);
24061
24061
  }, this.mousemove = (f) => {
24062
- this.move(f, fe.mousePos(this.element, f));
24062
+ this.move(f, me.mousePos(this.element, f));
24063
24063
  }, this.mouseup = (f) => {
24064
24064
  this._rotatePitchHandler.dragEnd(f), this.offTemp();
24065
24065
  }, this.touchstart = (f) => {
24066
- f.targetTouches.length !== 1 ? this.reset() : (this._startPos = this._lastPos = fe.touchPos(this.element, f.targetTouches)[0], this.startMove(f, this._startPos), window.addEventListener("touchmove", this.touchmove, { passive: !1 }), window.addEventListener("touchend", this.touchend));
24066
+ f.targetTouches.length !== 1 ? this.reset() : (this._startPos = this._lastPos = me.touchPos(this.element, f.targetTouches)[0], this.startMove(f, this._startPos), window.addEventListener("touchmove", this.touchmove, { passive: !1 }), window.addEventListener("touchend", this.touchend));
24067
24067
  }, this.touchmove = (f) => {
24068
- f.targetTouches.length !== 1 ? this.reset() : (this._lastPos = fe.touchPos(this.element, f.targetTouches)[0], this.move(f, this._lastPos));
24068
+ f.targetTouches.length !== 1 ? this.reset() : (this._lastPos = me.touchPos(this.element, f.targetTouches)[0], this.move(f, this._lastPos));
24069
24069
  }, this.touchend = (f) => {
24070
24070
  f.targetTouches.length === 0 && this._startPos && this._lastPos && this._startPos.dist(this._lastPos) < this._clickTolerance && this.element.click(), delete this._startPos, delete this._lastPos, this.offTemp();
24071
24071
  }, this.reset = () => {
@@ -24079,7 +24079,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
24079
24079
  } }), this.map = t, n.addEventListener("mousedown", this.mousedown), n.addEventListener("touchstart", this.touchstart, { passive: !1 }), n.addEventListener("touchcancel", this.reset);
24080
24080
  }
24081
24081
  startMove(t, n) {
24082
- this._rotatePitchHandler.dragStart(t, n), fe.disableDrag();
24082
+ this._rotatePitchHandler.dragStart(t, n), me.disableDrag();
24083
24083
  }
24084
24084
  move(t, n) {
24085
24085
  const a = this.map, { bearingDelta: c, pitchDelta: f } = this._rotatePitchHandler.dragMove(t, n) || {};
@@ -24090,7 +24090,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
24090
24090
  t.removeEventListener("mousedown", this.mousedown), t.removeEventListener("touchstart", this.touchstart), window.removeEventListener("touchmove", this.touchmove), window.removeEventListener("touchend", this.touchend), t.removeEventListener("touchcancel", this.reset), this.offTemp();
24091
24091
  }
24092
24092
  offTemp() {
24093
- fe.enableDrag(), window.removeEventListener("mousemove", this.mousemove), window.removeEventListener("mouseup", this.mouseup), window.removeEventListener("touchmove", this.touchmove), window.removeEventListener("touchend", this.touchend);
24093
+ me.enableDrag(), window.removeEventListener("mousemove", this.mousemove), window.removeEventListener("mouseup", this.mouseup), window.removeEventListener("touchmove", this.touchmove), window.removeEventListener("touchend", this.touchend);
24094
24094
  }
24095
24095
  }
24096
24096
  let Sr;
@@ -24146,35 +24146,35 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
24146
24146
  this._element.contains(n.originalEvent.target) && (n.preventDefault(), this._positionDelta = n.point.sub(this._pos).add(this._offset), this._pointerdownPos = n.point, this._state = "pending", this._map.on("mousemove", this._onMove), this._map.on("touchmove", this._onMove), this._map.once("mouseup", this._onUp), this._map.once("touchend", this._onUp));
24147
24147
  }, this._anchor = t?.anchor || "center", this._color = t?.color || "#3FB1CE", this._scale = t?.scale || 1, this._draggable = t?.draggable || !1, this._clickTolerance = t?.clickTolerance || 0, this._subpixelPositioning = t?.subpixelPositioning || !1, this._isDragging = !1, this._state = "inactive", this._rotation = t?.rotation || 0, this._rotationAlignment = t?.rotationAlignment || "auto", this._pitchAlignment = t?.pitchAlignment && t.pitchAlignment !== "auto" ? t.pitchAlignment : this._rotationAlignment, this.setOpacity(t?.opacity, t?.opacityWhenCovered), t?.element) this._element = t.element, this._offset = h.P.convert(t?.offset || [0, 0]);
24148
24148
  else {
24149
- this._defaultMarker = !0, this._element = fe.create("div");
24150
- const n = fe.createNS("http://www.w3.org/2000/svg", "svg"), a = 41, c = 27;
24149
+ this._defaultMarker = !0, this._element = me.create("div");
24150
+ const n = me.createNS("http://www.w3.org/2000/svg", "svg"), a = 41, c = 27;
24151
24151
  n.setAttributeNS(null, "display", "block"), n.setAttributeNS(null, "height", `${a}px`), n.setAttributeNS(null, "width", `${c}px`), n.setAttributeNS(null, "viewBox", `0 0 ${c} ${a}`);
24152
- const f = fe.createNS("http://www.w3.org/2000/svg", "g");
24152
+ const f = me.createNS("http://www.w3.org/2000/svg", "g");
24153
24153
  f.setAttributeNS(null, "stroke", "none"), f.setAttributeNS(null, "stroke-width", "1"), f.setAttributeNS(null, "fill", "none"), f.setAttributeNS(null, "fill-rule", "evenodd");
24154
- const y = fe.createNS("http://www.w3.org/2000/svg", "g");
24154
+ const y = me.createNS("http://www.w3.org/2000/svg", "g");
24155
24155
  y.setAttributeNS(null, "fill-rule", "nonzero");
24156
- const x = fe.createNS("http://www.w3.org/2000/svg", "g");
24156
+ const x = me.createNS("http://www.w3.org/2000/svg", "g");
24157
24157
  x.setAttributeNS(null, "transform", "translate(3.0, 29.0)"), x.setAttributeNS(null, "fill", "#000000");
24158
24158
  const w = [{ rx: "10.5", ry: "5.25002273" }, { rx: "10.5", ry: "5.25002273" }, { rx: "9.5", ry: "4.77275007" }, { rx: "8.5", ry: "4.29549936" }, { rx: "7.5", ry: "3.81822308" }, { rx: "6.5", ry: "3.34094679" }, { rx: "5.5", ry: "2.86367051" }, { rx: "4.5", ry: "2.38636864" }];
24159
24159
  for (const N of w) {
24160
- const Z = fe.createNS("http://www.w3.org/2000/svg", "ellipse");
24160
+ const Z = me.createNS("http://www.w3.org/2000/svg", "ellipse");
24161
24161
  Z.setAttributeNS(null, "opacity", "0.04"), Z.setAttributeNS(null, "cx", "10.5"), Z.setAttributeNS(null, "cy", "5.80029008"), Z.setAttributeNS(null, "rx", N.rx), Z.setAttributeNS(null, "ry", N.ry), x.appendChild(Z);
24162
24162
  }
24163
- const S = fe.createNS("http://www.w3.org/2000/svg", "g");
24163
+ const S = me.createNS("http://www.w3.org/2000/svg", "g");
24164
24164
  S.setAttributeNS(null, "fill", this._color);
24165
- const P = fe.createNS("http://www.w3.org/2000/svg", "path");
24165
+ const P = me.createNS("http://www.w3.org/2000/svg", "path");
24166
24166
  P.setAttributeNS(null, "d", "M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"), S.appendChild(P);
24167
- const E = fe.createNS("http://www.w3.org/2000/svg", "g");
24167
+ const E = me.createNS("http://www.w3.org/2000/svg", "g");
24168
24168
  E.setAttributeNS(null, "opacity", "0.25"), E.setAttributeNS(null, "fill", "#000000");
24169
- const C = fe.createNS("http://www.w3.org/2000/svg", "path");
24169
+ const C = me.createNS("http://www.w3.org/2000/svg", "path");
24170
24170
  C.setAttributeNS(null, "d", "M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"), E.appendChild(C);
24171
- const z = fe.createNS("http://www.w3.org/2000/svg", "g");
24171
+ const z = me.createNS("http://www.w3.org/2000/svg", "g");
24172
24172
  z.setAttributeNS(null, "transform", "translate(6.0, 7.0)"), z.setAttributeNS(null, "fill", "#FFFFFF");
24173
- const B = fe.createNS("http://www.w3.org/2000/svg", "g");
24173
+ const B = me.createNS("http://www.w3.org/2000/svg", "g");
24174
24174
  B.setAttributeNS(null, "transform", "translate(8.0, 8.0)");
24175
- const V = fe.createNS("http://www.w3.org/2000/svg", "circle");
24175
+ const V = me.createNS("http://www.w3.org/2000/svg", "circle");
24176
24176
  V.setAttributeNS(null, "fill", "#000000"), V.setAttributeNS(null, "opacity", "0.25"), V.setAttributeNS(null, "cx", "5.5"), V.setAttributeNS(null, "cy", "5.5"), V.setAttributeNS(null, "r", "5.4999962");
24177
- const G = fe.createNS("http://www.w3.org/2000/svg", "circle");
24177
+ const G = me.createNS("http://www.w3.org/2000/svg", "circle");
24178
24178
  G.setAttributeNS(null, "fill", "#FFFFFF"), G.setAttributeNS(null, "cx", "5.5"), G.setAttributeNS(null, "cy", "5.5"), G.setAttributeNS(null, "r", "5.4999962"), B.appendChild(V), B.appendChild(G), y.appendChild(x), y.appendChild(S), y.appendChild(E), y.appendChild(z), y.appendChild(B), n.appendChild(y), n.setAttributeNS(null, "height", a * this._scale + "px"), n.setAttributeNS(null, "width", c * this._scale + "px"), this._element.appendChild(n), this._offset = h.P.convert(t?.offset || [0, -14]);
24179
24179
  }
24180
24180
  if (this._element.classList.add("maplibregl-marker"), this._element.addEventListener("dragstart", ((n) => {
@@ -24331,14 +24331,14 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
24331
24331
  }, this._fullscreen = !1, this._pseudo = (t = d.pseudo) !== null && t !== void 0 && t, d?.container && (d.container instanceof HTMLElement ? this._container = d.container : h.w("Full screen control 'container' must be a DOM element.")), "onfullscreenchange" in document ? this._fullscreenchange = "fullscreenchange" : "onmozfullscreenchange" in document ? this._fullscreenchange = "mozfullscreenchange" : "onwebkitfullscreenchange" in document ? this._fullscreenchange = "webkitfullscreenchange" : "onmsfullscreenchange" in document && (this._fullscreenchange = "MSFullscreenChange");
24332
24332
  }
24333
24333
  onAdd(d) {
24334
- return this._map = d, this._container || (this._container = this._map.getContainer()), this._controlContainer = fe.create("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._setupUI(), this._controlContainer;
24334
+ return this._map = d, this._container || (this._container = this._map.getContainer()), this._controlContainer = me.create("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._setupUI(), this._controlContainer;
24335
24335
  }
24336
24336
  onRemove() {
24337
24337
  this._controlContainer.remove(), this._map = null, window.document.removeEventListener(this._fullscreenchange, this._onFullscreenChange);
24338
24338
  }
24339
24339
  _setupUI() {
24340
- const d = this._fullscreenButton = fe.create("button", "maplibregl-ctrl-fullscreen", this._controlContainer);
24341
- fe.create("span", "maplibregl-ctrl-icon", d).setAttribute("aria-hidden", "true"), d.type = "button", this._updateTitle(), this._fullscreenButton.addEventListener("click", this._onClickFullscreen), window.document.addEventListener(this._fullscreenchange, this._onFullscreenChange);
24340
+ const d = this._fullscreenButton = me.create("button", "maplibregl-ctrl-fullscreen", this._controlContainer);
24341
+ me.create("span", "maplibregl-ctrl-icon", d).setAttribute("aria-hidden", "true"), d.type = "button", this._updateTitle(), this._fullscreenButton.addEventListener("click", this._onClickFullscreen), window.document.addEventListener(this._fullscreenchange, this._onFullscreenChange);
24342
24342
  }
24343
24343
  _updateTitle() {
24344
24344
  const d = this._getTitle();
@@ -24413,7 +24413,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
24413
24413
  }, this._setupUI = () => {
24414
24414
  this._map && (this._container.addEventListener("contextmenu", ((t) => {
24415
24415
  t.preventDefault();
24416
- })), this._geolocateButton = fe.create("button", "maplibregl-ctrl-geolocate", this._container), fe.create("span", "maplibregl-ctrl-icon", this._geolocateButton).setAttribute("aria-hidden", "true"), this._geolocateButton.type = "button", this._geolocateButton.disabled = !0);
24416
+ })), this._geolocateButton = me.create("button", "maplibregl-ctrl-geolocate", this._container), me.create("span", "maplibregl-ctrl-icon", this._geolocateButton).setAttribute("aria-hidden", "true"), this._geolocateButton.type = "button", this._geolocateButton.disabled = !0);
24417
24417
  }, this._finishSetupUI = (t) => {
24418
24418
  if (this._map) {
24419
24419
  if (t === !1) {
@@ -24424,12 +24424,12 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
24424
24424
  const n = this._map._getUIString("GeolocateControl.FindMyLocation");
24425
24425
  this._geolocateButton.disabled = !1, this._geolocateButton.title = n, this._geolocateButton.setAttribute("aria-label", n);
24426
24426
  }
24427
- this.options.trackUserLocation && (this._geolocateButton.setAttribute("aria-pressed", "false"), this._watchState = "OFF"), this.options.showUserLocation && (this._dotElement = fe.create("div", "maplibregl-user-location-dot"), this._userLocationDotMarker = new ro({ element: this._dotElement }), this._circleElement = fe.create("div", "maplibregl-user-location-accuracy-circle"), this._accuracyCircleMarker = new ro({ element: this._circleElement, pitchAlignment: "map" }), this.options.trackUserLocation && (this._watchState = "OFF"), this._map.on("zoom", this._onUpdate), this._map.on("move", this._onUpdate), this._map.on("rotate", this._onUpdate), this._map.on("pitch", this._onUpdate)), this._geolocateButton.addEventListener("click", (() => this.trigger())), this._setup = !0, this.options.trackUserLocation && this._map.on("movestart", this._onMoveStart);
24427
+ this.options.trackUserLocation && (this._geolocateButton.setAttribute("aria-pressed", "false"), this._watchState = "OFF"), this.options.showUserLocation && (this._dotElement = me.create("div", "maplibregl-user-location-dot"), this._userLocationDotMarker = new ro({ element: this._dotElement }), this._circleElement = me.create("div", "maplibregl-user-location-accuracy-circle"), this._accuracyCircleMarker = new ro({ element: this._circleElement, pitchAlignment: "map" }), this.options.trackUserLocation && (this._watchState = "OFF"), this._map.on("zoom", this._onUpdate), this._map.on("move", this._onUpdate), this._map.on("rotate", this._onUpdate), this._map.on("pitch", this._onUpdate)), this._geolocateButton.addEventListener("click", (() => this.trigger())), this._setup = !0, this.options.trackUserLocation && this._map.on("movestart", this._onMoveStart);
24428
24428
  }
24429
24429
  }, this.options = h.e({}, Rl, d);
24430
24430
  }
24431
24431
  onAdd(d) {
24432
- return this._map = d, this._container = fe.create("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._setupUI(), (function() {
24432
+ return this._map = d, this._container = me.create("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._setupUI(), (function() {
24433
24433
  return h._(this, arguments, void 0, (function* (t = !1) {
24434
24434
  if (Sr !== void 0 && !t) return Sr;
24435
24435
  if (window.navigator.permissions === void 0) return Sr = !!window.navigator.geolocation, Sr;
@@ -24529,7 +24529,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
24529
24529
  };
24530
24530
  }
24531
24531
  onAdd(d) {
24532
- return this._map = d, this._container = fe.create("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._globeButton = fe.create("button", "maplibregl-ctrl-globe", this._container), fe.create("span", "maplibregl-ctrl-icon", this._globeButton).setAttribute("aria-hidden", "true"), this._globeButton.type = "button", this._globeButton.addEventListener("click", this._toggleProjection), this._updateGlobeIcon(), this._map.on("styledata", this._updateGlobeIcon), this._map.on("projectiontransition", this._updateGlobeIcon), this._container;
24532
+ return this._map = d, this._container = me.create("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._globeButton = me.create("button", "maplibregl-ctrl-globe", this._container), me.create("span", "maplibregl-ctrl-icon", this._globeButton).setAttribute("aria-hidden", "true"), this._globeButton.type = "button", this._globeButton.addEventListener("click", this._toggleProjection), this._updateGlobeIcon(), this._map.on("styledata", this._updateGlobeIcon), this._map.on("projectiontransition", this._updateGlobeIcon), this._container;
24533
24533
  }
24534
24534
  onRemove() {
24535
24535
  this._container.remove(), this._map.off("styledata", this._updateGlobeIcon), this._map.off("projectiontransition", this._updateGlobeIcon), this._globeButton.removeEventListener("click", this._toggleProjection), this._map = void 0;
@@ -24544,9 +24544,9 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
24544
24544
  }, this._setButtonTitle = (t, n) => {
24545
24545
  const a = this._map._getUIString(`NavigationControl.${n}`);
24546
24546
  t.title = a, t.setAttribute("aria-label", a);
24547
- }, this.options = h.e({}, kl, d), this._container = fe.create("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._container.addEventListener("contextmenu", ((t) => t.preventDefault())), this.options.showZoom && (this._zoomInButton = this._createButton("maplibregl-ctrl-zoom-in", ((t) => this._map.zoomIn({}, { originalEvent: t }))), fe.create("span", "maplibregl-ctrl-icon", this._zoomInButton).setAttribute("aria-hidden", "true"), this._zoomOutButton = this._createButton("maplibregl-ctrl-zoom-out", ((t) => this._map.zoomOut({}, { originalEvent: t }))), fe.create("span", "maplibregl-ctrl-icon", this._zoomOutButton).setAttribute("aria-hidden", "true")), this.options.showCompass && (this._compass = this._createButton("maplibregl-ctrl-compass", ((t) => {
24547
+ }, this.options = h.e({}, kl, d), this._container = me.create("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._container.addEventListener("contextmenu", ((t) => t.preventDefault())), this.options.showZoom && (this._zoomInButton = this._createButton("maplibregl-ctrl-zoom-in", ((t) => this._map.zoomIn({}, { originalEvent: t }))), me.create("span", "maplibregl-ctrl-icon", this._zoomInButton).setAttribute("aria-hidden", "true"), this._zoomOutButton = this._createButton("maplibregl-ctrl-zoom-out", ((t) => this._map.zoomOut({}, { originalEvent: t }))), me.create("span", "maplibregl-ctrl-icon", this._zoomOutButton).setAttribute("aria-hidden", "true")), this.options.showCompass && (this._compass = this._createButton("maplibregl-ctrl-compass", ((t) => {
24548
24548
  this.options.visualizePitch ? this._map.resetNorthPitch({}, { originalEvent: t }) : this._map.resetNorth({}, { originalEvent: t });
24549
- })), this._compassIcon = fe.create("span", "maplibregl-ctrl-icon", this._compass), this._compassIcon.setAttribute("aria-hidden", "true"));
24549
+ })), this._compassIcon = me.create("span", "maplibregl-ctrl-icon", this._compass), this._compassIcon.setAttribute("aria-hidden", "true"));
24550
24550
  }
24551
24551
  onAdd(d) {
24552
24552
  return this._map = d, this.options.showZoom && (this._setButtonTitle(this._zoomInButton, "ZoomIn"), this._setButtonTitle(this._zoomOutButton, "ZoomOut"), this._map.on("zoom", this._updateZoomButtons), this._updateZoomButtons()), this.options.showCompass && (this._setButtonTitle(this._compass, "ResetBearing"), this.options.visualizePitch && this._map.on("pitch", this._rotateCompassArrow), this.options.visualizeRoll && this._map.on("roll", this._rotateCompassArrow), this._map.on("rotate", this._rotateCompassArrow), this._rotateCompassArrow(), this._handler = new to(this._map, this._compass, this.options.visualizePitch)), this._container;
@@ -24555,7 +24555,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
24555
24555
  this._container.remove(), this.options.showZoom && this._map.off("zoom", this._updateZoomButtons), this.options.showCompass && (this.options.visualizePitch && this._map.off("pitch", this._rotateCompassArrow), this.options.visualizeRoll && this._map.off("roll", this._rotateCompassArrow), this._map.off("rotate", this._rotateCompassArrow), this._handler.off(), delete this._handler), delete this._map;
24556
24556
  }
24557
24557
  _createButton(d, t) {
24558
- const n = fe.create("button", d, this._container);
24558
+ const n = me.create("button", d, this._container);
24559
24559
  return n.type = "button", n.addEventListener("click", t), n;
24560
24560
  }
24561
24561
  }, R.Popup = class extends h.E {
@@ -24565,7 +24565,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
24565
24565
  }, this.remove = () => (this._content && this._content.remove(), this._container && (this._container.remove(), delete this._container), this._map && (this._map.off("move", this._update), this._map.off("move", this._onClose), this._map.off("click", this._onClose), this._map.off("remove", this.remove), this._map.off("terrain", this._update), this._map.off("projectiontransition", this._update), this._map.off("mousemove", this._update), this._map.off("mouseup", this._update), this._map.off("drag", this._update), this._map._canvasContainer.classList.remove("maplibregl-track-pointer"), delete this._map, this.fire(new h.n("close"))), this), this._update = (t) => {
24566
24566
  if (!this._map || !this._lngLat && !this._trackPointer || !this._content) return;
24567
24567
  if (!this._container) {
24568
- if (this._container = fe.create("div", "maplibregl-popup", this._map.getContainer()), this._tip = fe.create("div", "maplibregl-popup-tip", this._container), this._container.appendChild(this._content), this.options.className) for (const x of this.options.className.split(" ")) this._container.classList.add(x);
24568
+ if (this._container = me.create("div", "maplibregl-popup", this._map.getContainer()), this._tip = me.create("div", "maplibregl-popup-tip", this._container), this._container.appendChild(this._content), this.options.className) for (const x of this.options.className.split(" ")) this._container.classList.add(x);
24569
24569
  this._closeButton && this._closeButton.setAttribute("aria-label", this._map._getUIString("Popup.Close")), this._trackPointer && this._container.classList.add("maplibregl-popup-track-pointer");
24570
24570
  }
24571
24571
  let n;
@@ -24624,7 +24624,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
24624
24624
  }
24625
24625
  setDOMContent(d) {
24626
24626
  if (this._content) for (; this._content.hasChildNodes(); ) this._content.firstChild && this._content.removeChild(this._content.firstChild);
24627
- else this._content = fe.create("div", "maplibregl-popup-content", this._container);
24627
+ else this._content = me.create("div", "maplibregl-popup-content", this._container);
24628
24628
  return this._content.appendChild(d), this._createCloseButton(), this._update(), this._focusFirstElement(), this;
24629
24629
  }
24630
24630
  addClassName(d) {
@@ -24646,7 +24646,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
24646
24646
  this.options.padding = d, this._update();
24647
24647
  }
24648
24648
  _createCloseButton() {
24649
- this.options.closeButton && (this._closeButton = fe.create("button", "maplibregl-popup-close-button", this._content), this._closeButton.type = "button", this._closeButton.innerHTML = "&#215;", this._closeButton.addEventListener("click", this._onClose));
24649
+ this.options.closeButton && (this._closeButton = me.create("button", "maplibregl-popup-close-button", this._content), this._closeButton.type = "button", this._closeButton.innerHTML = "&#215;", this._closeButton.addEventListener("click", this._onClose));
24650
24650
  }
24651
24651
  _focusFirstElement() {
24652
24652
  if (!this.options.focusAfterOpen || !this._container) return;
@@ -24665,7 +24665,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
24665
24665
  return "bottom-left";
24666
24666
  }
24667
24667
  onAdd(d) {
24668
- return this._map = d, this._container = fe.create("div", "maplibregl-ctrl maplibregl-ctrl-scale", d.getContainer()), this._map.on("move", this._onMove), this._onMove(), this._container;
24668
+ return this._map = d, this._container = me.create("div", "maplibregl-ctrl maplibregl-ctrl-scale", d.getContainer()), this._map.on("move", this._onMove), this._onMove(), this._container;
24669
24669
  }
24670
24670
  onRemove() {
24671
24671
  this._container.remove(), this._map.off("move", this._onMove), this._map = void 0;
@@ -24679,7 +24679,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
24679
24679
  }, this.options = d;
24680
24680
  }
24681
24681
  onAdd(d) {
24682
- return this._map = d, this._container = fe.create("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._terrainButton = fe.create("button", "maplibregl-ctrl-terrain", this._container), fe.create("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;
24682
+ return this._map = d, this._container = me.create("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._terrainButton = me.create("button", "maplibregl-ctrl-terrain", this._container), me.create("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;
24683
24683
  }
24684
24684
  onRemove() {
24685
24685
  this._container.remove(), this._map.off("terrain", this._updateTerrainIcon), this._map = void 0;
@@ -24722,7 +24722,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
24722
24722
  h.c.WORKER_URL = d;
24723
24723
  };
24724
24724
  }));
24725
- var Le = me;
24725
+ var Le = pe;
24726
24726
  return Le;
24727
24727
  }));
24728
24728
  })(ju)), ju.exports;
@@ -24731,27 +24731,27 @@ var wy = by();
24731
24731
  const rm = /* @__PURE__ */ hy(wy);
24732
24732
  class Ty {
24733
24733
  /* eslint-disable no-this-before-super */
24734
- constructor(J) {
24735
- Vu(J.id, "id is required"), this.id = J.id, this.type = "custom", this.renderingMode = J.renderingMode || "3d", this.slot = J.slot, this.beforeId = J.beforeId, this.map = null;
24734
+ constructor(K) {
24735
+ Vu(K.id, "id is required"), this.id = K.id, this.type = "custom", this.renderingMode = K.renderingMode || "3d", this.slot = K.slot, this.beforeId = K.beforeId, this.map = null;
24736
24736
  }
24737
24737
  /* Mapbox custom layer methods */
24738
- onAdd(J, me) {
24739
- this.map = J;
24738
+ onAdd(K, pe) {
24739
+ this.map = K;
24740
24740
  }
24741
- render(J, me) {
24742
- this.map && Ey(this.map.__deck, this.map, this, me);
24741
+ render(K, pe) {
24742
+ this.map && Ey(this.map.__deck, this.map, this, pe);
24743
24743
  }
24744
24744
  }
24745
24745
  const Pd = "__UNDEFINED__";
24746
24746
  function ac(Pe) {
24747
24747
  return Pe.props.beforeId ? `deck-layer-group-before:${Pe.props.beforeId}` : Pe.props.slot ? `deck-layer-group-slot:${Pe.props.slot}` : "deck-layer-group-last";
24748
24748
  }
24749
- function Sy(Pe, J, me) {
24749
+ function Sy(Pe, K, pe) {
24750
24750
  if (!Pe || !Pe.style || !Pe.style._loaded)
24751
24751
  return;
24752
- const Me = Ed(me, Boolean);
24753
- if (J !== me) {
24754
- const R = Ed(J, Boolean), h = new Set(R.map((ct) => ac(ct))), de = new Set(Me.map((ct) => ac(ct)));
24752
+ const Me = Ed(pe, Boolean);
24753
+ if (K !== pe) {
24754
+ const R = Ed(K, Boolean), h = new Set(R.map((ct) => ac(ct))), de = new Set(Me.map((ct) => ac(ct)));
24755
24755
  for (const ct of h)
24756
24756
  de.has(ct) || Pe.getLayer(ct) && Pe.removeLayer(ct);
24757
24757
  }
@@ -24780,13 +24780,13 @@ function Sy(Pe, J, me) {
24780
24780
  }
24781
24781
  }
24782
24782
  const Ra = "mapbox", Id = 512, Py = Math.PI / 180;
24783
- function Iy({ map: Pe, deck: J }) {
24783
+ function Iy({ map: Pe, deck: K }) {
24784
24784
  if (Pe.__deck)
24785
24785
  return Pe.__deck;
24786
- const me = J.props._customRender, Me = J.props.onLoad, Te = {
24787
- ...J.props,
24786
+ const pe = K.props._customRender, Me = K.props.onLoad, Te = {
24787
+ ...K.props,
24788
24788
  _customRender: () => {
24789
- Pe.triggerRepaint(), me?.("");
24789
+ Pe.triggerRepaint(), pe?.("");
24790
24790
  }
24791
24791
  };
24792
24792
  return Te.views || (Te.views = Nu(Pe)), Object.assign(Te, {
@@ -24794,23 +24794,23 @@ function Iy({ map: Pe, deck: J }) {
24794
24794
  height: null,
24795
24795
  touchAction: "unset",
24796
24796
  viewState: lc(Pe)
24797
- }), J.isInitialized ? nm(J, Pe) : Te.onLoad = () => {
24798
- Me?.(), nm(J, Pe);
24799
- }, J.setProps(Te), Pe.__deck = J, Pe.on("render", () => {
24800
- J.isInitialized && Ay(J, Pe);
24801
- }), J;
24797
+ }), K.isInitialized ? nm(K, Pe) : Te.onLoad = () => {
24798
+ Me?.(), nm(K, Pe);
24799
+ }, K.setProps(Te), Pe.__deck = K, Pe.on("render", () => {
24800
+ K.isInitialized && Ay(K, Pe);
24801
+ }), K;
24802
24802
  }
24803
- function nm(Pe, J) {
24804
- const me = () => {
24805
- Pe.isInitialized ? Dy(Pe, J) : J.off("move", me);
24803
+ function nm(Pe, K) {
24804
+ const pe = () => {
24805
+ Pe.isInitialized ? Dy(Pe, K) : K.off("move", pe);
24806
24806
  };
24807
- J.on("move", me);
24807
+ K.on("move", pe);
24808
24808
  }
24809
24809
  function My(Pe) {
24810
24810
  Pe.__deck?.finalize(), Pe.__deck = null;
24811
24811
  }
24812
- function Md(Pe, J) {
24813
- return J ? {
24812
+ function Md(Pe, K) {
24813
+ return K ? {
24814
24814
  depthWriteEnabled: !0,
24815
24815
  depthCompare: "less-equal",
24816
24816
  depthBias: 0,
@@ -24823,31 +24823,31 @@ function Md(Pe, J) {
24823
24823
  blendAlphaOperation: "add"
24824
24824
  } : {};
24825
24825
  }
24826
- function Ey(Pe, J, me, Me) {
24826
+ function Ey(Pe, K, pe, Me) {
24827
24827
  if (!Pe.isInitialized)
24828
24828
  return;
24829
24829
  let { currentViewport: Te } = Pe.userData, Le = !1;
24830
- Te || (Te = cm(Pe, J, Me), Pe.userData.currentViewport = Te, Le = !0), Te && Pe._drawLayers("mapbox-repaint", {
24830
+ Te || (Te = cm(Pe, K, Me), Pe.userData.currentViewport = Te, Le = !0), Te && Pe._drawLayers("mapbox-repaint", {
24831
24831
  viewports: [Te],
24832
24832
  layerFilter: (R) => {
24833
24833
  if (Pe.props.layerFilter && !Pe.props.layerFilter(R))
24834
24834
  return !1;
24835
24835
  const h = R.layer;
24836
- return h.props.beforeId === me.beforeId && h.props.slot === me.slot;
24836
+ return h.props.beforeId === pe.beforeId && h.props.slot === pe.slot;
24837
24837
  },
24838
24838
  clearStack: Le,
24839
24839
  clearCanvas: !1
24840
24840
  });
24841
24841
  }
24842
24842
  function lm(Pe) {
24843
- const J = Pe.getProjection?.(), me = (
24843
+ const K = Pe.getProjection?.(), pe = (
24844
24844
  // maplibre projection spec
24845
- J?.type || // mapbox projection spec
24846
- J?.name
24845
+ K?.type || // mapbox projection spec
24846
+ K?.name
24847
24847
  );
24848
- if (me === "globe")
24848
+ if (pe === "globe")
24849
24849
  return "globe";
24850
- if (me && me !== "mercator")
24850
+ if (pe && pe !== "mercator")
24851
24851
  throw new Error("Unsupported projection");
24852
24852
  return "mercator";
24853
24853
  }
@@ -24855,11 +24855,11 @@ function Nu(Pe) {
24855
24855
  return lm(Pe) === "globe" ? new om({ id: Ra }) : new dy({ id: Ra });
24856
24856
  }
24857
24857
  function lc(Pe) {
24858
- const { lng: J, lat: me } = Pe.getCenter(), Me = {
24858
+ const { lng: K, lat: pe } = Pe.getCenter(), Me = {
24859
24859
  // Longitude returned by getCenter can be outside of [-180, 180] when zooming near the anti meridian
24860
24860
  // https://github.com/visgl/deck.gl/issues/6894
24861
- longitude: (J + 540) % 360 - 180,
24862
- latitude: me,
24861
+ longitude: (K + 540) % 360 - 180,
24862
+ latitude: pe,
24863
24863
  zoom: Pe.getZoom(),
24864
24864
  bearing: Pe.getBearing(),
24865
24865
  pitch: Pe.getPitch(),
@@ -24868,43 +24868,43 @@ function lc(Pe) {
24868
24868
  };
24869
24869
  return Pe.getTerrain?.() && Cy(Pe, Me), Me;
24870
24870
  }
24871
- function Cy(Pe, J) {
24871
+ function Cy(Pe, K) {
24872
24872
  if (Pe.getFreeCameraOptions) {
24873
- const { position: me } = Pe.getFreeCameraOptions();
24874
- if (!me || me.z === void 0)
24873
+ const { position: pe } = Pe.getFreeCameraOptions();
24874
+ if (!pe || pe.z === void 0)
24875
24875
  return;
24876
- const Me = Pe.transform.height, { longitude: Te, latitude: Le, pitch: R } = J, h = me.x * Id, de = (1 - me.y) * Id, ct = me.z * Id, Bt = py([Te, Le]), fi = h - Bt[0], Qi = de - Bt[1], At = Math.sqrt(fi * fi + Qi * Qi), si = R * Py, Xe = 1.5 * Me, cr = si < 1e-3 ? (
24876
+ const Me = Pe.transform.height, { longitude: Te, latitude: Le, pitch: R } = K, h = pe.x * Id, de = (1 - pe.y) * Id, ct = pe.z * Id, Bt = py([Te, Le]), fi = h - Bt[0], Qi = de - Bt[1], At = Math.sqrt(fi * fi + Qi * Qi), si = R * Py, Xe = 1.5 * Me, cr = si < 1e-3 ? (
24877
24877
  // Pitch angle too small to deduce the look at point, assume elevation is 0
24878
24878
  Xe * Math.cos(si) / ct
24879
24879
  ) : Xe * Math.sin(si) / At;
24880
- J.zoom = Math.log2(cr);
24881
- const mi = Xe * Math.cos(si) / cr, fe = ct - mi;
24882
- J.position = [0, 0, fe / fy(Le)];
24883
- } else typeof Pe.transform.elevation == "number" && (J.position = [0, 0, Pe.transform.elevation]);
24880
+ K.zoom = Math.log2(cr);
24881
+ const mi = Xe * Math.cos(si) / cr, me = ct - mi;
24882
+ K.position = [0, 0, me / fy(Le)];
24883
+ } else typeof Pe.transform.elevation == "number" && (K.position = [0, 0, Pe.transform.elevation]);
24884
24884
  }
24885
- function cm(Pe, J, me) {
24886
- const Me = lc(J), Te = Pe.getView(Ra) || Nu(J);
24887
- me && (Te.props.nearZMultiplier = 0.2);
24888
- const Le = me?.nearZ ?? J.transform._nearZ, R = me?.farZ ?? J.transform._farZ;
24889
- return Number.isFinite(Le) && (Me.nearZ = Le / J.transform.height, Me.farZ = R / J.transform.height), Te.makeViewport({
24885
+ function cm(Pe, K, pe) {
24886
+ const Me = lc(K), Te = Pe.getView(Ra) || Nu(K);
24887
+ pe && (Te.props.nearZMultiplier = 0.2);
24888
+ const Le = pe?.nearZ ?? K.transform._nearZ, R = pe?.farZ ?? K.transform._farZ;
24889
+ return Number.isFinite(Le) && (Me.nearZ = Le / K.transform.height, Me.farZ = R / K.transform.height), Te.makeViewport({
24890
24890
  width: Pe.width,
24891
24891
  height: Pe.height,
24892
24892
  viewState: Me
24893
24893
  });
24894
24894
  }
24895
- function Ay(Pe, J) {
24896
- const Me = Ed(Pe.props.layers, Boolean).some((h) => h && !J.getLayer(ac(h)));
24895
+ function Ay(Pe, K) {
24896
+ const Me = Ed(Pe.props.layers, Boolean).some((h) => h && !K.getLayer(ac(h)));
24897
24897
  let Te = Pe.getViewports();
24898
24898
  const Le = Te.findIndex((h) => h.id === Ra), R = Te.length > 1 || Le < 0;
24899
24899
  if (Me || R) {
24900
24900
  if (Le >= 0) {
24901
24901
  Te = Te.slice();
24902
- const h = cm(Pe, J);
24902
+ const h = cm(Pe, K);
24903
24903
  h ? Te[Le] = h : Te.splice(Le, 1);
24904
24904
  }
24905
24905
  Pe._drawLayers("mapbox-repaint", {
24906
24906
  viewports: Te,
24907
- layerFilter: (h) => (!Pe.props.layerFilter || Pe.props.layerFilter(h)) && (h.viewport.id !== Ra || !J.getLayer(ac(h.layer))),
24907
+ layerFilter: (h) => (!Pe.props.layerFilter || Pe.props.layerFilter(h)) && (h.viewport.id !== Ra || !K.getLayer(ac(h.layer))),
24908
24908
  clearCanvas: !1
24909
24909
  });
24910
24910
  } else {
@@ -24913,13 +24913,13 @@ function Ay(Pe, J) {
24913
24913
  }
24914
24914
  Pe.userData.currentViewport = null;
24915
24915
  }
24916
- function Dy(Pe, J) {
24916
+ function Dy(Pe, K) {
24917
24917
  Pe.setProps({
24918
- viewState: lc(J)
24918
+ viewState: lc(K)
24919
24919
  }), Pe.needsRedraw({ clearRedrawFlags: !0 });
24920
24920
  }
24921
24921
  class zy {
24922
- constructor(J) {
24922
+ constructor(K) {
24923
24923
  this._handleStyleChange = () => {
24924
24924
  if (this._resolveLayers(this._map, this._deck, this._props.layers, this._props.layers), !this._map)
24925
24925
  return;
@@ -24983,17 +24983,17 @@ class zy {
24983
24983
  return;
24984
24984
  }
24985
24985
  };
24986
- const { interleaved: me = !1 } = J;
24987
- this._interleaved = me, this._props = this.filterProps(J);
24986
+ const { interleaved: pe = !1 } = K;
24987
+ this._interleaved = pe, this._props = this.filterProps(K);
24988
24988
  }
24989
24989
  /** Filter out props to pass to Deck **/
24990
- filterProps(J) {
24991
- const { interleaved: me = !1, useDevicePixels: Me, ...Te } = J;
24992
- return !me && Me !== void 0 && (Te.useDevicePixels = Me), Te;
24990
+ filterProps(K) {
24991
+ const { interleaved: pe = !1, useDevicePixels: Me, ...Te } = K;
24992
+ return !pe && Me !== void 0 && (Te.useDevicePixels = Me), Te;
24993
24993
  }
24994
24994
  /** Update (partial) props of the underlying Deck instance. */
24995
- setProps(J) {
24996
- this._interleaved && J.layers && this._resolveLayers(this._map, this._deck, this._props.layers, J.layers), Object.assign(this._props, this.filterProps(J)), this._deck && this._map && this._deck.setProps({
24995
+ setProps(K) {
24996
+ this._interleaved && K.layers && this._resolveLayers(this._map, this._deck, this._props.layers, K.layers), Object.assign(this._props, this.filterProps(K)), this._deck && this._map && this._deck.setProps({
24997
24997
  ...this._props,
24998
24998
  views: this._getViews(this._map),
24999
24999
  parameters: {
@@ -25005,65 +25005,65 @@ class zy {
25005
25005
  // The local Map type is for internal typecheck only. It does not necesarily satisefy mapbox/maplibre types at runtime.
25006
25006
  // Do not restrict the argument type here to avoid type conflict.
25007
25007
  /** Called when the control is added to a map */
25008
- onAdd(J) {
25009
- return this._map = J, this._interleaved ? this._onAddInterleaved(J) : this._onAddOverlaid(J);
25008
+ onAdd(K) {
25009
+ return this._map = K, this._interleaved ? this._onAddInterleaved(K) : this._onAddOverlaid(K);
25010
25010
  }
25011
- _onAddOverlaid(J) {
25012
- const me = document.createElement("div");
25013
- return Object.assign(me.style, {
25011
+ _onAddOverlaid(K) {
25012
+ const pe = document.createElement("div");
25013
+ return Object.assign(pe.style, {
25014
25014
  position: "absolute",
25015
25015
  left: 0,
25016
25016
  top: 0,
25017
25017
  textAlign: "initial",
25018
25018
  pointerEvents: "none"
25019
- }), this._container = me, this._deck = new Qf({
25019
+ }), this._container = pe, this._deck = new Qf({
25020
25020
  ...this._props,
25021
- parent: me,
25022
- parameters: { ...Md(J, !1), ...this._props.parameters },
25023
- views: this._getViews(J),
25024
- viewState: lc(J)
25025
- }), J.on("resize", this._updateContainerSize), J.on("render", this._updateViewState), J.on("mousedown", this._handleMouseEvent), J.on("dragstart", this._handleMouseEvent), J.on("drag", this._handleMouseEvent), J.on("dragend", this._handleMouseEvent), J.on("mousemove", this._handleMouseEvent), J.on("mouseout", this._handleMouseEvent), J.on("click", this._handleMouseEvent), J.on("dblclick", this._handleMouseEvent), this._updateContainerSize(), me;
25021
+ parent: pe,
25022
+ parameters: { ...Md(K, !1), ...this._props.parameters },
25023
+ views: this._getViews(K),
25024
+ viewState: lc(K)
25025
+ }), K.on("resize", this._updateContainerSize), K.on("render", this._updateViewState), K.on("mousedown", this._handleMouseEvent), K.on("dragstart", this._handleMouseEvent), K.on("drag", this._handleMouseEvent), K.on("dragend", this._handleMouseEvent), K.on("mousemove", this._handleMouseEvent), K.on("mouseout", this._handleMouseEvent), K.on("click", this._handleMouseEvent), K.on("dblclick", this._handleMouseEvent), this._updateContainerSize(), pe;
25026
25026
  }
25027
- _onAddInterleaved(J) {
25028
- const me = J.painter.context.gl;
25029
- return me instanceof WebGLRenderingContext && my.warn("Incompatible basemap library. See: https://deck.gl/docs/api-reference/mapbox/overview#compatibility")(), this._deck = Iy({
25030
- map: J,
25027
+ _onAddInterleaved(K) {
25028
+ const pe = K.painter.context.gl;
25029
+ return pe instanceof WebGLRenderingContext && my.warn("Incompatible basemap library. See: https://deck.gl/docs/api-reference/mapbox/overview#compatibility")(), this._deck = Iy({
25030
+ map: K,
25031
25031
  deck: new Qf({
25032
25032
  ...this._props,
25033
- views: this._getViews(J),
25034
- gl: me,
25035
- parameters: { ...Md(J, !0), ...this._props.parameters }
25033
+ views: this._getViews(K),
25034
+ gl: pe,
25035
+ parameters: { ...Md(K, !0), ...this._props.parameters }
25036
25036
  })
25037
- }), J.on("styledata", this._handleStyleChange), this._resolveLayers(J, this._deck, [], this._props.layers), document.createElement("div");
25037
+ }), K.on("styledata", this._handleStyleChange), this._resolveLayers(K, this._deck, [], this._props.layers), document.createElement("div");
25038
25038
  }
25039
- _resolveLayers(J, me, Me, Te) {
25040
- Sy(J, Me, Te);
25039
+ _resolveLayers(K, pe, Me, Te) {
25040
+ Sy(K, Me, Te);
25041
25041
  }
25042
25042
  /** Called when the control is removed from a map */
25043
25043
  onRemove() {
25044
- const J = this._map;
25045
- J && (this._interleaved ? this._onRemoveInterleaved(J) : this._onRemoveOverlaid(J)), this._deck = void 0, this._map = void 0, this._container = void 0;
25044
+ const K = this._map;
25045
+ K && (this._interleaved ? this._onRemoveInterleaved(K) : this._onRemoveOverlaid(K)), this._deck = void 0, this._map = void 0, this._container = void 0;
25046
25046
  }
25047
- _onRemoveOverlaid(J) {
25048
- J.off("resize", this._updateContainerSize), J.off("render", this._updateViewState), J.off("mousedown", this._handleMouseEvent), J.off("dragstart", this._handleMouseEvent), J.off("drag", this._handleMouseEvent), J.off("dragend", this._handleMouseEvent), J.off("mousemove", this._handleMouseEvent), J.off("mouseout", this._handleMouseEvent), J.off("click", this._handleMouseEvent), J.off("dblclick", this._handleMouseEvent), this._deck?.finalize();
25047
+ _onRemoveOverlaid(K) {
25048
+ K.off("resize", this._updateContainerSize), K.off("render", this._updateViewState), K.off("mousedown", this._handleMouseEvent), K.off("dragstart", this._handleMouseEvent), K.off("drag", this._handleMouseEvent), K.off("dragend", this._handleMouseEvent), K.off("mousemove", this._handleMouseEvent), K.off("mouseout", this._handleMouseEvent), K.off("click", this._handleMouseEvent), K.off("dblclick", this._handleMouseEvent), this._deck?.finalize();
25049
25049
  }
25050
- _onRemoveInterleaved(J) {
25051
- J.off("styledata", this._handleStyleChange), this._resolveLayers(J, this._deck, this._props.layers, []), My(J);
25050
+ _onRemoveInterleaved(K) {
25051
+ K.off("styledata", this._handleStyleChange), this._resolveLayers(K, this._deck, this._props.layers, []), My(K);
25052
25052
  }
25053
25053
  getDefaultPosition() {
25054
25054
  return "top-left";
25055
25055
  }
25056
25056
  /** Forwards the Deck.pickObject method */
25057
- pickObject(J) {
25058
- return Vu(this._deck), this._deck.pickObject(J);
25057
+ pickObject(K) {
25058
+ return Vu(this._deck), this._deck.pickObject(K);
25059
25059
  }
25060
25060
  /** Forwards the Deck.pickMultipleObjects method */
25061
- pickMultipleObjects(J) {
25062
- return Vu(this._deck), this._deck.pickMultipleObjects(J);
25061
+ pickMultipleObjects(K) {
25062
+ return Vu(this._deck), this._deck.pickMultipleObjects(K);
25063
25063
  }
25064
25064
  /** Forwards the Deck.pickObjects method */
25065
- pickObjects(J) {
25066
- return Vu(this._deck), this._deck.pickObjects(J);
25065
+ pickObjects(K) {
25066
+ return Vu(this._deck), this._deck.pickObjects(K);
25067
25067
  }
25068
25068
  /** Remove from map and releases all resources */
25069
25069
  finalize() {
@@ -25073,11 +25073,11 @@ class zy {
25073
25073
  getCanvas() {
25074
25074
  return this._map ? this._interleaved ? this._map.getCanvas() : this._deck.getCanvas() : null;
25075
25075
  }
25076
- _getViews(J) {
25076
+ _getViews(K) {
25077
25077
  if (!this._props.views)
25078
- return Nu(J);
25079
- const me = Array.isArray(this._props.views) ? this._props.views : [this._props.views];
25080
- return me.some((Te) => Te.id === Ra) ? this._props.views : [Nu(J), ...me];
25078
+ return Nu(K);
25079
+ const pe = Array.isArray(this._props.views) ? this._props.views : [this._props.views];
25080
+ return pe.some((Te) => Te.id === Ra) ? this._props.views : [Nu(K), ...pe];
25081
25081
  }
25082
25082
  }
25083
25083
  class Ry {
@@ -25105,10 +25105,10 @@ class Ry {
25105
25105
  */
25106
25106
  initialized = !1;
25107
25107
  loadCallbacks = [];
25108
- constructor(J, me, Me, Te, Le = !0, R, h = !1) {
25108
+ constructor(K, pe, Me, Te, Le = !0, R, h = !1) {
25109
25109
  this.showAttribution = Le, this.attributionHost = R, this.map = new rm.Map({
25110
- container: J,
25111
- style: me.style,
25110
+ container: K,
25111
+ style: pe.style,
25112
25112
  // Determinism switch (issue #37 follow-up). NOT load-bearing for frame
25113
25113
  // identity — the idle LATCH below is (isolated 2026-08-26: the warm-
25114
25114
  // page byte-identity probe passes with the latch alone, because
@@ -25129,7 +25129,7 @@ class Ry {
25129
25129
  // MapLibre's default control is replaced by our own below so preset-
25130
25130
  // level attribution overrides survive style swaps deterministically.
25131
25131
  attributionControl: !1
25132
- }), this.mountAttribution(me.attribution), this.map.once("load", () => this.markInitialized()), this.map.on("error", (de) => {
25132
+ }), this.mountAttribution(pe.attribution), this.map.once("load", () => this.markInitialized()), this.map.on("error", (de) => {
25133
25133
  this.initialized || (console.error("[onlymapjs] basemap error before load — settling readiness:", de?.error ?? de), this.markInitialized());
25134
25134
  }), this.overlay = new zy({
25135
25135
  interleaved: !1,
@@ -25157,8 +25157,8 @@ class Ry {
25157
25157
  this.map.on("idle", () => {
25158
25158
  this.idleLatch = !0;
25159
25159
  });
25160
- for (const J of ["movestart", "dataloading", "sourcedataloading", "styledataloading"])
25161
- this.map.on(J, () => {
25160
+ for (const K of ["movestart", "dataloading", "sourcedataloading", "styledataloading"])
25161
+ this.map.on(K, () => {
25162
25162
  this.idleLatch = !1;
25163
25163
  });
25164
25164
  }
@@ -25191,9 +25191,9 @@ class Ry {
25191
25191
  pendingCaptureRejects = /* @__PURE__ */ new Set();
25192
25192
  drainDeckCaptures() {
25193
25193
  if (this.deckCaptures.length === 0) return;
25194
- const J = this.deckCaptures;
25194
+ const K = this.deckCaptures;
25195
25195
  this.deckCaptures = [];
25196
- for (const me of J) me();
25196
+ for (const pe of K) pe();
25197
25197
  }
25198
25198
  /**
25199
25199
  * Scene snapshot (spec: "Snapshot API") — one composite canvas of the
@@ -25206,8 +25206,8 @@ class Ry {
25206
25206
  * public Deck API, and the access is optional-chained).
25207
25207
  */
25208
25208
  captureComposite() {
25209
- return new Promise((J, me) => {
25210
- this.pendingCaptureRejects.add(me);
25209
+ return new Promise((K, pe) => {
25210
+ this.pendingCaptureRejects.add(pe);
25211
25211
  let Me, Te;
25212
25212
  const Le = (h) => {
25213
25213
  const de = document.createElement("canvas");
@@ -25217,7 +25217,7 @@ class Ry {
25217
25217
  const h = document.createElement("canvas");
25218
25218
  h.width = Me.width, h.height = Me.height;
25219
25219
  const de = h.getContext("2d");
25220
- de.drawImage(Me, 0, 0), Te && de.drawImage(Te, 0, 0, h.width, h.height), this.pendingCaptureRejects.delete(me), J(h);
25220
+ de.drawImage(Me, 0, 0), Te && de.drawImage(Te, 0, 0, h.width, h.height), this.pendingCaptureRejects.delete(pe), K(h);
25221
25221
  };
25222
25222
  this.map.once("render", () => {
25223
25223
  Me = Le(this.map.getCanvas()), R();
@@ -25230,12 +25230,12 @@ class Ry {
25230
25230
  markInitialized() {
25231
25231
  if (this.initialized) return;
25232
25232
  this.initialized = !0;
25233
- const J = this.loadCallbacks;
25233
+ const K = this.loadCallbacks;
25234
25234
  this.loadCallbacks = [];
25235
- for (const me of J) me();
25235
+ for (const pe of K) pe();
25236
25236
  }
25237
- onLoad(J) {
25238
- this.initialized ? J() : this.loadCallbacks.push(J);
25237
+ onLoad(K) {
25238
+ this.initialized ? K() : this.loadCallbacks.push(K);
25239
25239
  }
25240
25240
  /** Fires continuously during pan/zoom/rotate — MapLibre's own camera-change event, standing in for deck's onViewStateChange (which doesn't apply — deck isn't driving the camera). */
25241
25241
  /**
@@ -25244,11 +25244,37 @@ class Ry {
25244
25244
  * event) to gesture-driven move events; our own easeTo/jumpTo/fitBounds
25245
25245
  * fire without one. The ecosystem's standard user-vs-programmatic signal.
25246
25246
  */
25247
- onMove(J) {
25248
- this.map.on("move", (me) => J(me.originalEvent ? "user" : "programmatic"));
25247
+ onMove(K) {
25248
+ this.map.on("move", (pe) => {
25249
+ this.moveSuppressed || K(pe.originalEvent ? "user" : "programmatic");
25250
+ });
25251
+ }
25252
+ /** Set while a capture-resolution override resizes the canvases — see onMove. */
25253
+ moveSuppressed = !1;
25254
+ /**
25255
+ * Re-rasterize both canvases at `ratio` captured pixels per CSS pixel, or
25256
+ * restore the display default with null (spec: "Snapshot API" — the
25257
+ * `snapshot({scale})` seam). MapLibre's own `setPixelRatio` drives the
25258
+ * basemap canvas; the overlay's deck takes the same number through
25259
+ * `useDevicePixels`, which luma applies to the drawing buffer immediately.
25260
+ *
25261
+ * The idle latch is cleared deliberately: the caller must re-await
25262
+ * `whenSettled()` before capturing, because a re-rasterized basemap has
25263
+ * tiles and glyphs to redraw and `map.once("render")` alone would capture
25264
+ * the first, unconverged frame.
25265
+ */
25266
+ setCapturePixelRatio(K) {
25267
+ this.moveSuppressed = !0;
25268
+ try {
25269
+ this.overlay.setProps({ useDevicePixels: K ?? !0 });
25270
+ const pe = this.map;
25271
+ typeof pe.setPixelRatio == "function" && pe.setPixelRatio(K ?? (typeof devicePixelRatio == "number" ? devicePixelRatio : 1)), this.markBusy();
25272
+ } finally {
25273
+ this.moveSuppressed = !1;
25274
+ }
25249
25275
  }
25250
- setLayers(J) {
25251
- this.overlay.setProps({ layers: J });
25276
+ setLayers(K) {
25277
+ this.overlay.setProps({ layers: K });
25252
25278
  }
25253
25279
  /**
25254
25280
  * Scene lighting (spec: "Scene Lighting") — MapboxOverlay accepts full
@@ -25256,12 +25282,12 @@ class Ry {
25256
25282
  * basemap frame dirty, so nudge a repaint; the overlay redraws with the
25257
25283
  * map's render pass.
25258
25284
  */
25259
- setEffects(J) {
25260
- this.overlay.setProps({ effects: J }), this.map.triggerRepaint();
25285
+ setEffects(K) {
25286
+ this.overlay.setProps({ effects: K }), this.map.triggerRepaint();
25261
25287
  }
25262
25288
  /** XY snapping (spec: issue #34 Part A) — deck's own pick tolerance, 0 by default; MapboxOverlay forwards the same DeckProps a standalone Deck instance takes. */
25263
- setPickingRadius(J) {
25264
- this.overlay.setProps({ pickingRadius: J });
25289
+ setPickingRadius(K) {
25290
+ this.overlay.setProps({ pickingRadius: K });
25265
25291
  }
25266
25292
  /**
25267
25293
  * Live basemap switch (spec: "Basemap presets & switching"). Deck layers
@@ -25270,8 +25296,8 @@ class Ry {
25270
25296
  * MapLibre diffs same-source styles and falls back to a full style reload
25271
25297
  * internally when the diff fails (the cross-provider case).
25272
25298
  */
25273
- setStyle(J) {
25274
- this.markBusy(), this.map.setStyle(J.style), J.attribution !== this.attributionText && this.mountAttribution(J.attribution);
25299
+ setStyle(K) {
25300
+ this.markBusy(), this.map.setStyle(K.style), K.attribution !== this.attributionText && this.mountAttribution(K.attribution);
25275
25301
  }
25276
25302
  /**
25277
25303
  * (Re)mounts the compact attribution control. Source-declared attributions
@@ -25279,10 +25305,10 @@ class Ry {
25279
25305
  * every style change; only the PRESET-level `attribution` override needs a
25280
25306
  * remount, since `customAttribution` is fixed at construction.
25281
25307
  */
25282
- mountAttribution(J) {
25283
- if (this.showAttribution && (this.attributionText = J, this.attribution && (this.map.removeControl(this.attribution), this.attributionElement?.remove(), this.attributionElement = void 0), this.attribution = new rm.AttributionControl({ compact: !0, ...J ? { customAttribution: J } : {} }), this.map.addControl(this.attribution), this.attributionHost)) {
25284
- const me = this.map.getContainer().querySelector(".maplibregl-ctrl-attrib");
25285
- me && (me.setAttribute("data-om-mandated-chrome-item", "attribution"), me.style.margin = "0", this.attributionHost.appendChild(me), this.attributionElement = me);
25308
+ mountAttribution(K) {
25309
+ if (this.showAttribution && (this.attributionText = K, this.attribution && (this.map.removeControl(this.attribution), this.attributionElement?.remove(), this.attributionElement = void 0), this.attribution = new rm.AttributionControl({ compact: !0, ...K ? { customAttribution: K } : {} }), this.map.addControl(this.attribution), this.attributionHost)) {
25310
+ const pe = this.map.getContainer().querySelector(".maplibregl-ctrl-attrib");
25311
+ pe && (pe.setAttribute("data-om-mandated-chrome-item", "attribution"), pe.style.margin = "0", this.attributionHost.appendChild(pe), this.attributionElement = pe);
25286
25312
  }
25287
25313
  }
25288
25314
  /**
@@ -25292,34 +25318,34 @@ class Ry {
25292
25318
  * while a draw tool is active; drag-pan while a clip-box face handle is
25293
25319
  * grabbed, or it fights the map's own camera drag for every mousemove).
25294
25320
  */
25295
- setInteractive(J) {
25296
- J.doubleClickZoom === !1 ? this.map.doubleClickZoom.disable() : J.doubleClickZoom === !0 && this.map.doubleClickZoom.enable(), J.dragPan === !1 ? this.map.dragPan.disable() : J.dragPan === !0 && this.map.dragPan.enable();
25321
+ setInteractive(K) {
25322
+ K.doubleClickZoom === !1 ? this.map.doubleClickZoom.disable() : K.doubleClickZoom === !0 && this.map.doubleClickZoom.enable(), K.dragPan === !1 ? this.map.dragPan.disable() : K.dragPan === !0 && this.map.dragPan.enable();
25297
25323
  }
25298
25324
  isLoaded() {
25299
25325
  return this.initialized;
25300
25326
  }
25301
25327
  getViewport() {
25302
- const J = this.map;
25328
+ const K = this.map;
25303
25329
  return {
25304
- project: (me) => {
25305
- const Me = J.project([me[0], me[1]]);
25330
+ project: (pe) => {
25331
+ const Me = K.project([pe[0], pe[1]]);
25306
25332
  return [Me.x, Me.y];
25307
25333
  },
25308
25334
  getBounds: () => {
25309
- const me = J.getBounds();
25310
- return [me.getWest(), me.getSouth(), me.getEast(), me.getNorth()];
25335
+ const pe = K.getBounds();
25336
+ return [pe.getWest(), pe.getSouth(), pe.getEast(), pe.getNorth()];
25311
25337
  },
25312
- width: J.getContainer().clientWidth,
25313
- height: J.getContainer().clientHeight
25338
+ width: K.getContainer().clientWidth,
25339
+ height: K.getContainer().clientHeight
25314
25340
  };
25315
25341
  }
25316
25342
  getViewState() {
25317
- const J = this.map.getCenter();
25318
- return { longitude: J.lng, latitude: J.lat, zoom: this.map.getZoom(), pitch: this.map.getPitch(), bearing: this.map.getBearing() };
25343
+ const K = this.map.getCenter();
25344
+ return { longitude: K.lng, latitude: K.lat, zoom: this.map.getZoom(), pitch: this.map.getPitch(), bearing: this.map.getBearing() };
25319
25345
  }
25320
25346
  /** Instant recenter/rezoom — the basemap's own camera jump, no deck viewState involved. */
25321
- jumpTo(J, me) {
25322
- this.markBusy(), this.map.jumpTo(me !== void 0 ? { center: J, zoom: me } : { center: J });
25347
+ jumpTo(K, pe) {
25348
+ this.markBusy(), this.map.jumpTo(pe !== void 0 ? { center: K, zoom: pe } : { center: K });
25323
25349
  }
25324
25350
  /**
25325
25351
  * Animated camera (spec: "Map Stories / Animation primitives") — MapLibre's
@@ -25327,19 +25353,19 @@ class Ry {
25327
25353
  * the direct `easeTo` interpolation. duration 0 degrades to an instant
25328
25354
  * move, so this is also the one method that reaches pitch/bearing.
25329
25355
  */
25330
- easeTo(J, me, Me = !1) {
25356
+ easeTo(K, pe, Me = !1) {
25331
25357
  this.markBusy();
25332
- const Te = { duration: me };
25333
- for (const [Le, R] of Object.entries(J)) R !== void 0 && (Te[Le] = R);
25334
- Me && me > 0 ? this.map.flyTo(Te) : this.map.easeTo(Te);
25358
+ const Te = { duration: pe };
25359
+ for (const [Le, R] of Object.entries(K)) R !== void 0 && (Te[Le] = R);
25360
+ Me && pe > 0 ? this.map.flyTo(Te) : this.map.easeTo(Te);
25335
25361
  }
25336
- fitBounds(J, me, Me = 0) {
25337
- this.markBusy(), this.map.fitBounds(J, { padding: me, duration: Me });
25362
+ fitBounds(K, pe, Me = 0) {
25363
+ this.markBusy(), this.map.fitBounds(K, { padding: pe, duration: Me });
25338
25364
  }
25339
25365
  destroy() {
25340
25366
  if (this.pendingCaptureRejects.size > 0) {
25341
- const J = new Error("[onlymapjs] snapshot() canceled — the renderer was torn down before the capture frame rendered.");
25342
- for (const me of this.pendingCaptureRejects) me(J);
25367
+ const K = new Error("[onlymapjs] snapshot() canceled — the renderer was torn down before the capture frame rendered.");
25368
+ for (const pe of this.pendingCaptureRejects) pe(K);
25343
25369
  this.pendingCaptureRejects.clear();
25344
25370
  }
25345
25371
  this.deckCaptures = [], this.attributionElement?.remove(), this.attributionElement = void 0, this.overlay.finalize(), this.map.remove();