@nika-js/onlymap 0.11.2 → 0.11.3

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 (38) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +2 -2
  3. package/dist/attribution.d.ts +27 -0
  4. package/dist/{basemap-BlMlSRTo.js → basemap-C6Ehu6fw.js} +923 -878
  5. package/dist/basemap.d.ts +11 -0
  6. package/dist/cartograph/elements/om-cartograph.d.ts +22 -0
  7. package/dist/cartograph/elements/om-frame.d.ts +8 -0
  8. package/dist/cartograph.js +1139 -1058
  9. package/dist/cartograph.standalone.js +1595 -1514
  10. package/dist/elements/om-map.d.ts +6 -0
  11. package/dist/{geoparquet-Bqhh_idk.js → geoparquet-3V4KrvQN.js} +1 -1
  12. package/dist/{globe-view-DQ0GLKSn.js → globe-view-D4Tlyff-.js} +1 -1
  13. package/dist/{hillshade-CxMG6ocE.js → hillshade-BC8QiJRP.js} +1 -1
  14. package/dist/{index-m-7enOKi.js → index-BPCIxI1b.js} +1 -1
  15. package/dist/{index-9W2ZrRyF.js → index-BUE-VzWx.js} +1 -1
  16. package/dist/{index-DklXFu6D.js → index-BqFwoWp9.js} +1 -1
  17. package/dist/{index-DO3-mfIk.js → index-C1f14saD.js} +3 -3
  18. package/dist/{index-DBYIrdvb.js → index-DgutJ5y2.js} +3 -3
  19. package/dist/{index-CdAb2VR8.js → index-DpUl6z5-.js} +1 -1
  20. package/dist/{index-aoMhS8VK.js → index-iwTA46AA.js} +1 -1
  21. package/dist/{index-CF7q_mKH.js → index-p5XXAoNa.js} +2 -2
  22. package/dist/{index-CE3n5pQz.js → index-pu3BNjzA.js} +51 -20
  23. package/dist/{lerc-vNjPdkTs.js → lerc-DWtJKNQk.js} +1 -1
  24. package/dist/onlymap.standalone.js +306 -231
  25. package/dist/onlymapjs.js +1 -1
  26. package/dist/{post-process-effect-eVlcdR0m.js → post-process-effect-mQdMaWQE.js} +1 -1
  27. package/dist/{raster-8iVEbDdp.js → raster-DtUDOXfy.js} +3 -3
  28. package/dist/{raster-pipeline-OqdVks6Y.js → raster-pipeline-hQh5cG3e.js} +1 -1
  29. package/dist/runtime-core.d.ts +22 -0
  30. package/dist/{text-on-path-C34MMnKY.js → text-on-path-CcfoZqXD.js} +1 -1
  31. package/dist/version.d.ts +1 -1
  32. package/dist/{zarr-Dla-EY4o.js → zarr-Qo4A_t7d.js} +2 -2
  33. package/docs/cartograph.md +27 -3
  34. package/llms.txt +2 -2
  35. package/onlymapjs.html-data.json +4 -0
  36. package/package.json +1 -1
  37. package/skills/onlymapjs/SKILL.md +1 -1
  38. package/skills/onlymapjs/references/syntax.md +4 -3
@@ -1,21 +1,46 @@
1
- import { aJ as Y_, N as Bu, H as Pd, k as K_, aK as J_, aL as Q_, D as Xf, Z as ey } from "./index-CE3n5pQz.js";
2
- import { a as ty } from "./globe-view-DQ0GLKSn.js";
1
+ import { aJ as Y_, N as Bu, H as Pd, k as K_, aK as J_, aL as Q_, D as Xf, Z as ey } from "./index-pu3BNjzA.js";
2
+ import { a as ty } from "./globe-view-D4Tlyff-.js";
3
+ const iy = {
4
+ copy: "©",
5
+ reg: "®",
6
+ amp: "&",
7
+ lt: "<",
8
+ gt: ">",
9
+ quot: '"',
10
+ apos: "'",
11
+ nbsp: " "
12
+ };
13
+ function ry(Ie) {
14
+ return Ie.replace(/<[^>]*>/g, " ").replace(/&(#x[0-9a-f]+|#\d+|[a-z]+);/gi, (Q, ge) => {
15
+ if (ge.startsWith("#")) {
16
+ const Ee = ge[1].toLowerCase() === "x" ? parseInt(ge.slice(2), 16) : parseInt(ge.slice(1), 10);
17
+ return Number.isInteger(Ee) && Ee > 0 && Ee <= 1114111 ? String.fromCodePoint(Ee) : Q;
18
+ }
19
+ return iy[ge.toLowerCase()] ?? Q;
20
+ }).replace(/\s+/g, " ").trim();
21
+ }
22
+ function ny(Ie) {
23
+ const Q = [...new Set(Ie.filter((ge) => typeof ge == "string").map(ry))].filter(
24
+ (ge) => ge.length > 0
25
+ );
26
+ return Q.filter((ge) => !Q.some((Ee) => Ee !== ge && Ee.includes(ge)));
27
+ }
3
28
  var Ou = { exports: {} };
4
29
  /**
5
30
  * MapLibre GL JS
6
31
  * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v5.24.0/LICENSE.txt
7
32
  */
8
- var iy = Ou.exports, Yf;
9
- function ry() {
10
- return Yf || (Yf = 1, (function(Me, te) {
11
- (function(we, De) {
12
- Me.exports = De();
13
- })(iy, (function() {
14
- var we = {}, De = {};
33
+ var sy = Ou.exports, Yf;
34
+ function oy() {
35
+ return Yf || (Yf = 1, (function(Ie, Q) {
36
+ (function(ge, Ee) {
37
+ Ie.exports = Ee();
38
+ })(sy, (function() {
39
+ var ge = {}, Ee = {};
15
40
  function ze(R, h, fe) {
16
- if (De[R] = fe, R === "index") {
17
- var mt = "var sharedModule = {}; (" + De.shared + ")(sharedModule); (" + De.worker + ")(sharedModule);", Kt = {};
18
- return De.shared(Kt), De.index(we, Kt), typeof window < "u" && we.setWorkerUrl(window.URL.createObjectURL(new Blob([mt], { type: "text/javascript" }))), we;
41
+ if (Ee[R] = fe, R === "index") {
42
+ var mt = "var sharedModule = {}; (" + Ee.shared + ")(sharedModule); (" + Ee.worker + ")(sharedModule);", Kt = {};
43
+ return Ee.shared(Kt), Ee.index(ge, Kt), typeof window < "u" && ge.setWorkerUrl(window.URL.createObjectURL(new Blob([mt], { type: "text/javascript" }))), ge;
19
44
  }
20
45
  }
21
46
  ze("shared", ["exports"], (function(R) {
@@ -203,11 +228,11 @@ function ry() {
203
228
  function K(r, e, i) {
204
229
  return r[0] = e[0] * i, r[1] = e[1] * i, r[2] = e[2] * i, r;
205
230
  }
206
- function ee(r, e, i) {
231
+ function te(r, e, i) {
207
232
  var s = e[0], o = e[1], l = e[2], u = i[0], p = i[1], g = i[2];
208
233
  return r[0] = o * g - l * p, r[1] = l * u - s * g, r[2] = s * p - o * u, r;
209
234
  }
210
- var ye, Ae = ys;
235
+ var ve, De = ys;
211
236
  function Ke(r, e, i) {
212
237
  var s = e[0], o = e[1], l = e[2], u = e[3];
213
238
  return r[0] = i[0] * s + i[4] * o + i[8] * l + i[12] * u, r[1] = i[1] * s + i[5] * o + i[9] * l + i[13] * u, r[2] = i[2] * s + i[6] * o + i[10] * l + i[14] * u, r[3] = i[3] * s + i[7] * o + i[11] * l + i[15] * u, r;
@@ -252,7 +277,7 @@ function ry() {
252
277
  var i = new jt(2);
253
278
  return i[0] = r, i[1] = e, i;
254
279
  }
255
- _s(), ye = new jt(4), jt != Float32Array && (ye[0] = 0, ye[1] = 0, ye[2] = 0, ye[3] = 0), _s(), Qe(1, 0, 0), Qe(0, 1, 0), Be(), Be(), Jr(), Ue();
280
+ _s(), ve = new jt(4), jt != Float32Array && (ve[0] = 0, ve[1] = 0, ve[2] = 0, ve[3] = 0), _s(), Qe(1, 0, 0), Qe(0, 1, 0), Be(), Be(), Jr(), Ue();
256
281
  const Fe = 8192;
257
282
  function St(r, e, i) {
258
283
  return e * (Fe / (r.tileSize * Math.pow(2, i - r.tileID.overscaledZ)));
@@ -550,7 +575,7 @@ function ry() {
550
575
  function uc(r, e) {
551
576
  return r[e.id] = e, r;
552
577
  }
553
- class ve {
578
+ class xe {
554
579
  constructor(e, i, s, o) {
555
580
  this.message = (e ? `${e}: ` : "") + s, o && (this.identifier = o), i != null && i.__line__ && (this.line = i.__line__);
556
581
  }
@@ -2968,7 +2993,7 @@ function ry() {
2968
2993
  }
2969
2994
  function Gc(r) {
2970
2995
  const e = r.value;
2971
- return e ? [new ve(r.key, e, "constants have been deprecated as of v8")] : [];
2996
+ return e ? [new xe(r.key, e, "constants have been deprecated as of v8")] : [];
2972
2997
  }
2973
2998
  function Dt(r) {
2974
2999
  return r instanceof Number || r instanceof String || r instanceof Boolean ? r.valueOf() : r;
@@ -2986,7 +3011,7 @@ function ry() {
2986
3011
  const e = r.key, i = r.value, s = r.valueSpec || {}, o = r.objectElementValidators || {}, l = r.style, u = r.styleSpec, p = r.validateSpec;
2987
3012
  let g = [];
2988
3013
  const m = We(i);
2989
- if (m !== "object") return [new ve(e, i, `object expected, ${m} found`)];
3014
+ if (m !== "object") return [new xe(e, i, `object expected, ${m} found`)];
2990
3015
  for (const v in i) {
2991
3016
  const _ = v.split(".")[0], T = Cs(s, _) || s["*"];
2992
3017
  let b;
@@ -2997,20 +3022,20 @@ function ry() {
2997
3022
  } else if (o["*"]) b = o["*"];
2998
3023
  else {
2999
3024
  if (!s["*"]) {
3000
- g.push(new ve(e, i[v], `unknown property "${v}"`));
3025
+ g.push(new xe(e, i[v], `unknown property "${v}"`));
3001
3026
  continue;
3002
3027
  }
3003
3028
  b = p;
3004
3029
  }
3005
3030
  g = g.concat(b({ key: (e && `${e}.`) + v, value: i[v], valueSpec: T, style: l, styleSpec: u, object: i, objectKey: v, validateSpec: p }, i));
3006
3031
  }
3007
- for (const v in s) o[v] || s[v].required && s[v].default === void 0 && i[v] === void 0 && g.push(new ve(e, i, `missing required property "${v}"`));
3032
+ for (const v in s) o[v] || s[v].required && s[v].default === void 0 && i[v] === void 0 && g.push(new xe(e, i, `missing required property "${v}"`));
3008
3033
  return g;
3009
3034
  }
3010
3035
  function qo(r) {
3011
3036
  const e = r.value, i = r.valueSpec, s = r.style, o = r.styleSpec, l = r.key, u = r.arrayElementValidator || r.validateSpec;
3012
- if (We(e) !== "array") return [new ve(l, e, `array expected, ${We(e)} found`)];
3013
- if (i.length && e.length !== i.length) return [new ve(l, e, `array length ${i.length} expected, length ${e.length} found`)];
3037
+ if (We(e) !== "array") return [new xe(l, e, `array expected, ${We(e)} found`)];
3038
+ if (i.length && e.length !== i.length) return [new xe(l, e, `array length ${i.length} expected, length ${e.length} found`)];
3014
3039
  let p = { type: i.value, values: i.values };
3015
3040
  o.$version < 7 && (p.function = i.function), We(i.value) === "object" && (p = i.value);
3016
3041
  let g = [];
@@ -3020,90 +3045,90 @@ function ry() {
3020
3045
  function ns(r) {
3021
3046
  const e = r.key, i = r.value, s = r.valueSpec;
3022
3047
  let o = We(i);
3023
- return o === "number" && i != i && (o = "NaN"), o !== "number" ? [new ve(e, i, `number expected, ${o} found`)] : "minimum" in s && i < s.minimum ? [new ve(e, i, `${i} is less than the minimum value ${s.minimum}`)] : "maximum" in s && i > s.maximum ? [new ve(e, i, `${i} is greater than the maximum value ${s.maximum}`)] : [];
3048
+ return o === "number" && i != i && (o = "NaN"), o !== "number" ? [new xe(e, i, `number expected, ${o} found`)] : "minimum" in s && i < s.minimum ? [new xe(e, i, `${i} is less than the minimum value ${s.minimum}`)] : "maximum" in s && i > s.maximum ? [new xe(e, i, `${i} is greater than the maximum value ${s.maximum}`)] : [];
3024
3049
  }
3025
3050
  function Wo(r) {
3026
3051
  const e = r.valueSpec, i = Dt(r.value.type);
3027
3052
  let s, o, l, u = {};
3028
3053
  const p = i !== "categorical" && r.value.property === void 0, g = !p, m = We(r.value.stops) === "array" && We(r.value.stops[0]) === "array" && We(r.value.stops[0][0]) === "object", v = Ei({ key: r.key, value: r.value, valueSpec: r.styleSpec.function, validateSpec: r.validateSpec, style: r.style, styleSpec: r.styleSpec, objectElementValidators: { stops: function(b) {
3029
- if (i === "identity") return [new ve(b.key, b.value, 'identity function may not have a "stops" property')];
3054
+ if (i === "identity") return [new xe(b.key, b.value, 'identity function may not have a "stops" property')];
3030
3055
  let I = [];
3031
3056
  const M = b.value;
3032
- return I = I.concat(qo({ key: b.key, value: M, valueSpec: b.valueSpec, validateSpec: b.validateSpec, style: b.style, styleSpec: b.styleSpec, arrayElementValidator: _ })), We(M) === "array" && M.length === 0 && I.push(new ve(b.key, M, "array must have at least one stop")), I;
3057
+ return I = I.concat(qo({ key: b.key, value: M, valueSpec: b.valueSpec, validateSpec: b.validateSpec, style: b.style, styleSpec: b.styleSpec, arrayElementValidator: _ })), We(M) === "array" && M.length === 0 && I.push(new xe(b.key, M, "array must have at least one stop")), I;
3033
3058
  }, default: function(b) {
3034
3059
  return b.validateSpec({ key: b.key, value: b.value, valueSpec: e, validateSpec: b.validateSpec, style: b.style, styleSpec: b.styleSpec });
3035
3060
  } } });
3036
- return i === "identity" && p && v.push(new ve(r.key, r.value, 'missing required property "property"')), i === "identity" || r.value.stops || v.push(new ve(r.key, r.value, 'missing required property "stops"')), i === "exponential" && r.valueSpec.expression && !dl(r.valueSpec) && v.push(new ve(r.key, r.value, "exponential functions not supported")), r.styleSpec.$version >= 8 && (g && !ts(r.valueSpec) ? v.push(new ve(r.key, r.value, "property functions not supported")) : p && !Oc(r.valueSpec) && v.push(new ve(r.key, r.value, "zoom functions not supported"))), i !== "categorical" && !m || r.value.property !== void 0 || v.push(new ve(r.key, r.value, '"property" property is required')), v;
3061
+ return i === "identity" && p && v.push(new xe(r.key, r.value, 'missing required property "property"')), i === "identity" || r.value.stops || v.push(new xe(r.key, r.value, 'missing required property "stops"')), i === "exponential" && r.valueSpec.expression && !dl(r.valueSpec) && v.push(new xe(r.key, r.value, "exponential functions not supported")), r.styleSpec.$version >= 8 && (g && !ts(r.valueSpec) ? v.push(new xe(r.key, r.value, "property functions not supported")) : p && !Oc(r.valueSpec) && v.push(new xe(r.key, r.value, "zoom functions not supported"))), i !== "categorical" && !m || r.value.property !== void 0 || v.push(new xe(r.key, r.value, '"property" property is required')), v;
3037
3062
  function _(b) {
3038
3063
  let I = [];
3039
3064
  const M = b.value, A = b.key;
3040
- if (We(M) !== "array") return [new ve(A, M, `array expected, ${We(M)} found`)];
3041
- if (M.length !== 2) return [new ve(A, M, `array length 2 expected, length ${M.length} found`)];
3065
+ if (We(M) !== "array") return [new xe(A, M, `array expected, ${We(M)} found`)];
3066
+ if (M.length !== 2) return [new xe(A, M, `array length 2 expected, length ${M.length} found`)];
3042
3067
  if (m) {
3043
- if (We(M[0]) !== "object") return [new ve(A, M, `object expected, ${We(M[0])} found`)];
3044
- if (M[0].zoom === void 0) return [new ve(A, M, "object stop key must have zoom")];
3045
- if (M[0].value === void 0) return [new ve(A, M, "object stop key must have value")];
3046
- if (l && l > Dt(M[0].zoom)) return [new ve(A, M[0].zoom, "stop zoom values must appear in ascending order")];
3068
+ if (We(M[0]) !== "object") return [new xe(A, M, `object expected, ${We(M[0])} found`)];
3069
+ if (M[0].zoom === void 0) return [new xe(A, M, "object stop key must have zoom")];
3070
+ if (M[0].value === void 0) return [new xe(A, M, "object stop key must have value")];
3071
+ if (l && l > Dt(M[0].zoom)) return [new xe(A, M[0].zoom, "stop zoom values must appear in ascending order")];
3047
3072
  Dt(M[0].zoom) !== l && (l = Dt(M[0].zoom), o = void 0, u = {}), I = I.concat(Ei({ key: `${A}[0]`, value: M[0], valueSpec: { zoom: {} }, validateSpec: b.validateSpec, style: b.style, styleSpec: b.styleSpec, objectElementValidators: { zoom: ns, value: T } }));
3048
3073
  } else I = I.concat(T({ key: `${A}[0]`, value: M[0], validateSpec: b.validateSpec, style: b.style, styleSpec: b.styleSpec }, M));
3049
- return No(wn(M[1])) ? I.concat([new ve(`${A}[1]`, M[1], "expressions are not allowed in function stops.")]) : I.concat(b.validateSpec({ key: `${A}[1]`, value: M[1], valueSpec: e, validateSpec: b.validateSpec, style: b.style, styleSpec: b.styleSpec }));
3074
+ return No(wn(M[1])) ? I.concat([new xe(`${A}[1]`, M[1], "expressions are not allowed in function stops.")]) : I.concat(b.validateSpec({ key: `${A}[1]`, value: M[1], valueSpec: e, validateSpec: b.validateSpec, style: b.style, styleSpec: b.styleSpec }));
3050
3075
  }
3051
3076
  function T(b, I) {
3052
3077
  const M = We(b.value), A = Dt(b.value), D = b.value !== null ? b.value : I;
3053
3078
  if (s) {
3054
- if (M !== s) return [new ve(b.key, D, `${M} stop domain type must match previous stop domain type ${s}`)];
3079
+ if (M !== s) return [new xe(b.key, D, `${M} stop domain type must match previous stop domain type ${s}`)];
3055
3080
  } else s = M;
3056
- if (M !== "number" && M !== "string" && M !== "boolean") return [new ve(b.key, D, "stop domain value must be a number, string, or boolean")];
3081
+ if (M !== "number" && M !== "string" && M !== "boolean") return [new xe(b.key, D, "stop domain value must be a number, string, or boolean")];
3057
3082
  if (M !== "number" && i !== "categorical") {
3058
3083
  let L = `number expected, ${M} found`;
3059
- return ts(e) && i === void 0 && (L += '\nIf you intended to use a categorical function, specify `"type": "categorical"`.'), [new ve(b.key, D, L)];
3084
+ return ts(e) && i === void 0 && (L += '\nIf you intended to use a categorical function, specify `"type": "categorical"`.'), [new xe(b.key, D, L)];
3060
3085
  }
3061
- return i !== "categorical" || M !== "number" || isFinite(A) && Math.floor(A) === A ? i !== "categorical" && M === "number" && o !== void 0 && A < o ? [new ve(b.key, D, "stop domain values must appear in ascending order")] : (o = A, i === "categorical" && A in u ? [new ve(b.key, D, "stop domain values must be unique")] : (u[A] = !0, [])) : [new ve(b.key, D, `integer expected, found ${A}`)];
3086
+ return i !== "categorical" || M !== "number" || isFinite(A) && Math.floor(A) === A ? i !== "categorical" && M === "number" && o !== void 0 && A < o ? [new xe(b.key, D, "stop domain values must appear in ascending order")] : (o = A, i === "categorical" && A in u ? [new xe(b.key, D, "stop domain values must be unique")] : (u[A] = !0, [])) : [new xe(b.key, D, `integer expected, found ${A}`)];
3062
3087
  }
3063
3088
  }
3064
3089
  function Nr(r) {
3065
3090
  const e = (r.expressionContext === "property" ? Nc : Vs)(wn(r.value), r.valueSpec);
3066
- if (e.result === "error") return e.value.map(((s) => new ve(`${r.key}${s.key}`, r.value, s.message)));
3091
+ if (e.result === "error") return e.value.map(((s) => new xe(`${r.key}${s.key}`, r.value, s.message)));
3067
3092
  const i = e.value.expression || e.value._styleExpression.expression;
3068
- if (r.expressionContext === "property" && r.propertyKey === "text-font" && !i.outputDefined()) return [new ve(r.key, r.value, `Invalid data expression for "${r.propertyKey}". Output values must be contained as literals within the expression.`)];
3069
- if (r.expressionContext === "property" && r.propertyType === "layout" && !Fs(i)) return [new ve(r.key, r.value, '"feature-state" data expressions are not supported with layout properties.')];
3070
- if (r.expressionContext === "filter" && !Fs(i)) return [new ve(r.key, r.value, '"feature-state" data expressions are not supported with filters.')];
3093
+ if (r.expressionContext === "property" && r.propertyKey === "text-font" && !i.outputDefined()) return [new xe(r.key, r.value, `Invalid data expression for "${r.propertyKey}". Output values must be contained as literals within the expression.`)];
3094
+ if (r.expressionContext === "property" && r.propertyType === "layout" && !Fs(i)) return [new xe(r.key, r.value, '"feature-state" data expressions are not supported with layout properties.')];
3095
+ if (r.expressionContext === "filter" && !Fs(i)) return [new xe(r.key, r.value, '"feature-state" data expressions are not supported with filters.')];
3071
3096
  if (r.expressionContext && r.expressionContext.indexOf("cluster") === 0) {
3072
- if (!Vo(i, ["zoom", "feature-state"])) return [new ve(r.key, r.value, '"zoom" and "feature-state" expressions are not supported with cluster properties.')];
3073
- if (r.expressionContext === "cluster-initial" && !Oo(i)) return [new ve(r.key, r.value, "Feature data expressions are not supported with initial expression part of cluster properties.")];
3097
+ if (!Vo(i, ["zoom", "feature-state"])) return [new xe(r.key, r.value, '"zoom" and "feature-state" expressions are not supported with cluster properties.')];
3098
+ if (r.expressionContext === "cluster-initial" && !Oo(i)) return [new xe(r.key, r.value, "Feature data expressions are not supported with initial expression part of cluster properties.")];
3074
3099
  }
3075
3100
  return [];
3076
3101
  }
3077
3102
  function Gs(r) {
3078
3103
  const e = r.key, i = r.value, s = We(i);
3079
- return s !== "string" ? [new ve(e, i, `color expected, ${s} found`)] : Ze.parse(String(i)) ? [] : [new ve(e, i, `color expected, "${i}" found`)];
3104
+ return s !== "string" ? [new xe(e, i, `color expected, ${s} found`)] : Ze.parse(String(i)) ? [] : [new xe(e, i, `color expected, "${i}" found`)];
3080
3105
  }
3081
3106
  function Tn(r) {
3082
3107
  const e = r.key, i = r.value, s = r.valueSpec, o = [];
3083
- return Array.isArray(s.values) ? s.values.indexOf(Dt(i)) === -1 && o.push(new ve(e, i, `expected one of [${s.values.join(", ")}], ${JSON.stringify(i)} found`)) : Object.keys(s.values).indexOf(Dt(i)) === -1 && o.push(new ve(e, i, `expected one of [${Object.keys(s.values).join(", ")}], ${JSON.stringify(i)} found`)), o;
3108
+ return Array.isArray(s.values) ? s.values.indexOf(Dt(i)) === -1 && o.push(new xe(e, i, `expected one of [${s.values.join(", ")}], ${JSON.stringify(i)} found`)) : Object.keys(s.values).indexOf(Dt(i)) === -1 && o.push(new xe(e, i, `expected one of [${Object.keys(s.values).join(", ")}], ${JSON.stringify(i)} found`)), o;
3084
3109
  }
3085
3110
  function ss(r) {
3086
3111
  return pl(wn(r.value)) ? Nr(an({}, r, { expressionContext: "filter", valueSpec: { value: "boolean" } })) : $c(r);
3087
3112
  }
3088
3113
  function $c(r) {
3089
3114
  const e = r.value, i = r.key;
3090
- if (We(e) !== "array") return [new ve(i, e, `array expected, ${We(e)} found`)];
3115
+ if (We(e) !== "array") return [new xe(i, e, `array expected, ${We(e)} found`)];
3091
3116
  const s = r.styleSpec;
3092
3117
  let o, l = [];
3093
- if (e.length < 1) return [new ve(i, e, "filter array must have at least 1 element")];
3118
+ if (e.length < 1) return [new xe(i, e, "filter array must have at least 1 element")];
3094
3119
  switch (l = l.concat(Tn({ key: `${i}[0]`, value: e[0], valueSpec: s.filter_operator, style: r.style, styleSpec: r.styleSpec })), Dt(e[0])) {
3095
3120
  case "<":
3096
3121
  case "<=":
3097
3122
  case ">":
3098
3123
  case ">=":
3099
- e.length >= 2 && Dt(e[1]) === "$type" && l.push(new ve(i, e, `"$type" cannot be use with operator "${e[0]}"`));
3124
+ e.length >= 2 && Dt(e[1]) === "$type" && l.push(new xe(i, e, `"$type" cannot be use with operator "${e[0]}"`));
3100
3125
  case "==":
3101
3126
  case "!=":
3102
- e.length !== 3 && l.push(new ve(i, e, `filter array for operator "${e[0]}" must have 3 elements`));
3127
+ e.length !== 3 && l.push(new xe(i, e, `filter array for operator "${e[0]}" must have 3 elements`));
3103
3128
  case "in":
3104
3129
  case "!in":
3105
- e.length >= 2 && (o = We(e[1]), o !== "string" && l.push(new ve(`${i}[1]`, e[1], `string expected, ${o} found`)));
3106
- for (let u = 2; u < e.length; u++) o = We(e[u]), Dt(e[1]) === "$type" ? l = l.concat(Tn({ key: `${i}[${u}]`, value: e[u], valueSpec: s.geometry_type, style: r.style, styleSpec: r.styleSpec })) : o !== "string" && o !== "number" && o !== "boolean" && l.push(new ve(`${i}[${u}]`, e[u], `string, number, or boolean expected, ${o} found`));
3130
+ e.length >= 2 && (o = We(e[1]), o !== "string" && l.push(new xe(`${i}[1]`, e[1], `string expected, ${o} found`)));
3131
+ for (let u = 2; u < e.length; u++) o = We(e[u]), Dt(e[1]) === "$type" ? l = l.concat(Tn({ key: `${i}[${u}]`, value: e[u], valueSpec: s.geometry_type, style: r.style, styleSpec: r.styleSpec })) : o !== "string" && o !== "number" && o !== "boolean" && l.push(new xe(`${i}[${u}]`, e[u], `string, number, or boolean expected, ${o} found`));
3107
3132
  break;
3108
3133
  case "any":
3109
3134
  case "all":
@@ -3112,7 +3137,7 @@ function ry() {
3112
3137
  break;
3113
3138
  case "has":
3114
3139
  case "!has":
3115
- o = We(e[1]), e.length !== 2 ? l.push(new ve(i, e, `filter array for "${e[0]}" operator must have 2 elements`)) : o !== "string" && l.push(new ve(`${i}[1]`, e[1], `string expected, ${o} found`));
3140
+ o = We(e[1]), e.length !== 2 ? l.push(new xe(i, e, `filter array for "${e[0]}" operator must have 2 elements`)) : o !== "string" && l.push(new xe(`${i}[1]`, e[1], `string expected, ${o} found`));
3116
3141
  }
3117
3142
  return l;
3118
3143
  }
@@ -3122,12 +3147,12 @@ function ry() {
3122
3147
  const m = p.match(/^(.*)-transition$/);
3123
3148
  if (e === "paint" && m && g[m[1]] && g[m[1]].transition) return s({ key: i, value: u, valueSpec: l.transition, style: o, styleSpec: l });
3124
3149
  const v = r.valueSpec || g[p];
3125
- if (!v) return [new ve(i, u, `unknown property "${p}"`)];
3150
+ if (!v) return [new xe(i, u, `unknown property "${p}"`)];
3126
3151
  let _;
3127
- if (We(u) === "string" && ts(v) && !v.tokens && (_ = /^{([^}]+)}$/.exec(u))) return [new ve(i, u, `"${p}" does not support interpolation syntax
3152
+ if (We(u) === "string" && ts(v) && !v.tokens && (_ = /^{([^}]+)}$/.exec(u))) return [new xe(i, u, `"${p}" does not support interpolation syntax
3128
3153
  Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(_[1])} }\`.`)];
3129
3154
  const T = [];
3130
- return r.layerType === "symbol" && p === "text-font" && jo(wn(u)) && Dt(u.type) === "identity" && T.push(new ve(i, u, '"text-font" does not support identity functions')), T.concat(s({ key: r.key, value: u, valueSpec: v, style: o, styleSpec: l, expressionContext: "property", propertyType: e, propertyKey: p }));
3155
+ return r.layerType === "symbol" && p === "text-font" && jo(wn(u)) && Dt(u.type) === "identity" && T.push(new xe(i, u, '"text-font" does not support identity functions')), T.concat(s({ key: r.key, value: u, valueSpec: v, style: o, styleSpec: l, expressionContext: "property", propertyType: e, propertyKey: p }));
3131
3156
  }
3132
3157
  function qc(r) {
3133
3158
  return Zc(r, "paint");
@@ -3139,33 +3164,33 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
3139
3164
  var e, i;
3140
3165
  let s = [];
3141
3166
  const o = r.value, l = r.key, u = r.style, p = r.styleSpec;
3142
- if (We(o) !== "object") return [new ve(l, o, `object expected, ${We(o)} found`)];
3143
- o.type || o.ref || s.push(new ve(l, o, 'either "type" or "ref" is required'));
3167
+ if (We(o) !== "object") return [new xe(l, o, `object expected, ${We(o)} found`)];
3168
+ o.type || o.ref || s.push(new xe(l, o, 'either "type" or "ref" is required'));
3144
3169
  let g = Dt(o.type);
3145
3170
  const m = Dt(o.ref);
3146
3171
  if (o.id) {
3147
3172
  const v = Dt(o.id);
3148
3173
  for (let _ = 0; _ < r.arrayIndex; _++) {
3149
3174
  const T = u.layers[_];
3150
- Dt(T.id) === v && s.push(new ve(l, o.id, `duplicate layer id "${o.id}", previously used at line ${T.id.__line__}`));
3175
+ Dt(T.id) === v && s.push(new xe(l, o.id, `duplicate layer id "${o.id}", previously used at line ${T.id.__line__}`));
3151
3176
  }
3152
3177
  }
3153
3178
  if ("ref" in o) {
3154
3179
  let v;
3155
3180
  ["type", "source", "source-layer", "filter", "layout"].forEach(((_) => {
3156
- _ in o && s.push(new ve(l, o[_], `"${_}" is prohibited for ref layers`));
3181
+ _ in o && s.push(new xe(l, o[_], `"${_}" is prohibited for ref layers`));
3157
3182
  })), u.layers.forEach(((_) => {
3158
3183
  Dt(_.id) === m && (v = _);
3159
- })), v ? v.ref ? s.push(new ve(l, o.ref, "ref cannot reference another ref layer")) : g = Dt(v.type) : s.push(new ve(l, o.ref, `ref layer "${m}" not found`));
3184
+ })), v ? v.ref ? s.push(new xe(l, o.ref, "ref cannot reference another ref layer")) : g = Dt(v.type) : s.push(new xe(l, o.ref, `ref layer "${m}" not found`));
3160
3185
  } else if (g !== "background") if (o.source) {
3161
3186
  const v = u.sources && u.sources[o.source], _ = v && Dt(v.type);
3162
- v ? _ === "vector" && g === "raster" ? s.push(new ve(l, o.source, `layer "${o.id}" requires a raster source`)) : _ !== "raster-dem" && g === "hillshade" || _ !== "raster-dem" && g === "color-relief" ? s.push(new ve(l, o.source, `layer "${o.id}" requires a raster-dem source`)) : _ === "raster" && g !== "raster" ? s.push(new ve(l, o.source, `layer "${o.id}" requires a vector source`)) : _ !== "vector" || o["source-layer"] ? _ === "raster-dem" && g !== "hillshade" && g !== "color-relief" ? s.push(new ve(l, o.source, "raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")) : g !== "line" || !o.paint || !o.paint["line-gradient"] || _ === "geojson" && v.lineMetrics || s.push(new ve(l, o, `layer "${o.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)) : s.push(new ve(l, o, `layer "${o.id}" must specify a "source-layer"`)) : s.push(new ve(l, o.source, `source "${o.source}" not found`));
3163
- } else s.push(new ve(l, o, 'missing required property "source"'));
3164
- return g === "raster" && (!((e = o.paint) === null || e === void 0) && e.resampling) && (!((i = o.paint) === null || i === void 0) && i["raster-resampling"]) && s.push(new ve(l, o.paint, `layer "${o.id}" redundantly specifies "resampling" and "raster-resampling" paint properties, but only one is allowed. It is advised to use "resampling".`)), s = s.concat(Ei({ key: l, value: o, valueSpec: p.layer, style: r.style, styleSpec: r.styleSpec, validateSpec: r.validateSpec, objectElementValidators: { "*": () => [], type: () => r.validateSpec({ key: `${l}.type`, value: o.type, valueSpec: p.layer.type, style: r.style, styleSpec: r.styleSpec, validateSpec: r.validateSpec, object: o, objectKey: "type" }), filter: ss, layout: (v) => Ei({ layer: o, key: v.key, value: v.value, style: v.style, styleSpec: v.styleSpec, validateSpec: v.validateSpec, objectElementValidators: { "*": (_) => Wc(an({ layerType: g }, _)) } }), paint: (v) => Ei({ layer: o, key: v.key, value: v.value, style: v.style, styleSpec: v.styleSpec, validateSpec: v.validateSpec, objectElementValidators: { "*": (_) => qc(an({ layerType: g }, _)) } }) } })), s;
3187
+ v ? _ === "vector" && g === "raster" ? s.push(new xe(l, o.source, `layer "${o.id}" requires a raster source`)) : _ !== "raster-dem" && g === "hillshade" || _ !== "raster-dem" && g === "color-relief" ? s.push(new xe(l, o.source, `layer "${o.id}" requires a raster-dem source`)) : _ === "raster" && g !== "raster" ? s.push(new xe(l, o.source, `layer "${o.id}" requires a vector source`)) : _ !== "vector" || o["source-layer"] ? _ === "raster-dem" && g !== "hillshade" && g !== "color-relief" ? s.push(new xe(l, o.source, "raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")) : g !== "line" || !o.paint || !o.paint["line-gradient"] || _ === "geojson" && v.lineMetrics || s.push(new xe(l, o, `layer "${o.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)) : s.push(new xe(l, o, `layer "${o.id}" must specify a "source-layer"`)) : s.push(new xe(l, o.source, `source "${o.source}" not found`));
3188
+ } else s.push(new xe(l, o, 'missing required property "source"'));
3189
+ return g === "raster" && (!((e = o.paint) === null || e === void 0) && e.resampling) && (!((i = o.paint) === null || i === void 0) && i["raster-resampling"]) && s.push(new xe(l, o.paint, `layer "${o.id}" redundantly specifies "resampling" and "raster-resampling" paint properties, but only one is allowed. It is advised to use "resampling".`)), s = s.concat(Ei({ key: l, value: o, valueSpec: p.layer, style: r.style, styleSpec: r.styleSpec, validateSpec: r.validateSpec, objectElementValidators: { "*": () => [], type: () => r.validateSpec({ key: `${l}.type`, value: o.type, valueSpec: p.layer.type, style: r.style, styleSpec: r.styleSpec, validateSpec: r.validateSpec, object: o, objectKey: "type" }), filter: ss, layout: (v) => Ei({ layer: o, key: v.key, value: v.value, style: v.style, styleSpec: v.styleSpec, validateSpec: v.validateSpec, objectElementValidators: { "*": (_) => Wc(an({ layerType: g }, _)) } }), paint: (v) => Ei({ layer: o, key: v.key, value: v.value, style: v.style, styleSpec: v.styleSpec, validateSpec: v.validateSpec, objectElementValidators: { "*": (_) => qc(an({ layerType: g }, _)) } }) } })), s;
3165
3190
  }
3166
3191
  function Ur(r) {
3167
3192
  const e = r.value, i = r.key, s = We(e);
3168
- return s !== "string" ? [new ve(i, e, `string expected, ${s} found`)] : [];
3193
+ return s !== "string" ? [new xe(i, e, `string expected, ${s} found`)] : [];
3169
3194
  }
3170
3195
  const _l = { promoteId: function({ key: r, value: e }) {
3171
3196
  if (We(e) === "string") return Ur({ key: r, value: e });
@@ -3177,7 +3202,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
3177
3202
  } };
3178
3203
  function yl(r) {
3179
3204
  const e = r.value, i = r.key, s = r.styleSpec, o = r.style, l = r.validateSpec;
3180
- if (!e.type) return [new ve(i, e, '"type" is required')];
3205
+ if (!e.type) return [new xe(i, e, '"type" is required')];
3181
3206
  const u = Dt(e.type);
3182
3207
  let p;
3183
3208
  switch (u) {
@@ -3191,9 +3216,9 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
3191
3216
  let M = [];
3192
3217
  const A = We(_);
3193
3218
  if (_ === void 0) return M;
3194
- if (A !== "object") return M.push(new ve("source_raster_dem", _, `object expected, ${A} found`)), M;
3219
+ if (A !== "object") return M.push(new xe("source_raster_dem", _, `object expected, ${A} found`)), M;
3195
3220
  const D = Dt(_.encoding) === "custom", L = ["redFactor", "greenFactor", "blueFactor", "baseShift"], k = g.value.encoding ? `"${g.value.encoding}"` : "Default";
3196
- for (const F in _) !D && L.includes(F) ? M.push(new ve(F, _[F], `In "${v}": "${F}" is only valid when "encoding" is set to "custom". ${k} encoding found`)) : b[F] ? M = M.concat(g.validateSpec({ key: F, value: _[F], valueSpec: b[F], validateSpec: g.validateSpec, style: I, styleSpec: T })) : M.push(new ve(F, _[F], `unknown property "${F}"`));
3221
+ for (const F in _) !D && L.includes(F) ? M.push(new xe(F, _[F], `In "${v}": "${F}" is only valid when "encoding" is set to "custom". ${k} encoding found`)) : b[F] ? M = M.concat(g.validateSpec({ key: F, value: _[F], valueSpec: b[F], validateSpec: g.validateSpec, style: I, styleSpec: T })) : M.push(new xe(F, _[F], `unknown property "${F}"`));
3197
3222
  return M;
3198
3223
  })({ sourceName: i, value: e, style: r.style, styleSpec: s, validateSpec: l }), p;
3199
3224
  case "geojson":
@@ -3207,7 +3232,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
3207
3232
  case "image":
3208
3233
  return Ei({ key: i, value: e, valueSpec: s.source_image, style: o, validateSpec: l, styleSpec: s });
3209
3234
  case "canvas":
3210
- return [new ve(i, null, "Please use runtime APIs to add canvas sources, rather than including them in stylesheets.", "source.canvas")];
3235
+ return [new xe(i, null, "Please use runtime APIs to add canvas sources, rather than including them in stylesheets.", "source.canvas")];
3211
3236
  default:
3212
3237
  return Tn({ key: `${i}.type`, value: e.type, valueSpec: { values: ["vector", "raster", "raster-dem", "geojson", "video", "image"] } });
3213
3238
  }
@@ -3217,19 +3242,19 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
3217
3242
  let l = [];
3218
3243
  const u = We(e);
3219
3244
  if (e === void 0) return l;
3220
- if (u !== "object") return l = l.concat([new ve("light", e, `object expected, ${u} found`)]), l;
3245
+ if (u !== "object") return l = l.concat([new xe("light", e, `object expected, ${u} found`)]), l;
3221
3246
  for (const p in e) {
3222
3247
  const g = p.match(/^(.*)-transition$/);
3223
- l = l.concat(g && s[g[1]] && s[g[1]].transition ? r.validateSpec({ key: p, value: e[p], valueSpec: i.transition, validateSpec: r.validateSpec, style: o, styleSpec: i }) : s[p] ? r.validateSpec({ key: p, value: e[p], valueSpec: s[p], validateSpec: r.validateSpec, style: o, styleSpec: i }) : [new ve(p, e[p], `unknown property "${p}"`)]);
3248
+ l = l.concat(g && s[g[1]] && s[g[1]].transition ? r.validateSpec({ key: p, value: e[p], valueSpec: i.transition, validateSpec: r.validateSpec, style: o, styleSpec: i }) : s[p] ? r.validateSpec({ key: p, value: e[p], valueSpec: s[p], validateSpec: r.validateSpec, style: o, styleSpec: i }) : [new xe(p, e[p], `unknown property "${p}"`)]);
3224
3249
  }
3225
3250
  return l;
3226
3251
  }
3227
3252
  function Xc(r) {
3228
3253
  const e = r.value, i = r.styleSpec, s = i.sky, o = r.style, l = We(e);
3229
3254
  if (e === void 0) return [];
3230
- if (l !== "object") return [new ve("sky", e, `object expected, ${l} found`)];
3255
+ if (l !== "object") return [new xe("sky", e, `object expected, ${l} found`)];
3231
3256
  let u = [];
3232
- for (const p in e) u = u.concat(s[p] ? r.validateSpec({ key: p, value: e[p], valueSpec: s[p], style: o, styleSpec: i }) : [new ve(p, e[p], `unknown property "${p}"`)]);
3257
+ for (const p in e) u = u.concat(s[p] ? r.validateSpec({ key: p, value: e[p], valueSpec: s[p], style: o, styleSpec: i }) : [new xe(p, e[p], `unknown property "${p}"`)]);
3233
3258
  return u;
3234
3259
  }
3235
3260
  function vl(r) {
@@ -3237,8 +3262,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
3237
3262
  let l = [];
3238
3263
  const u = We(e);
3239
3264
  if (e === void 0) return l;
3240
- if (u !== "object") return l = l.concat([new ve("terrain", e, `object expected, ${u} found`)]), l;
3241
- for (const p in e) l = l.concat(s[p] ? r.validateSpec({ key: p, value: e[p], valueSpec: s[p], validateSpec: r.validateSpec, style: o, styleSpec: i }) : [new ve(p, e[p], `unknown property "${p}"`)]);
3265
+ if (u !== "object") return l = l.concat([new xe("terrain", e, `object expected, ${u} found`)]), l;
3266
+ for (const p in e) l = l.concat(s[p] ? r.validateSpec({ key: p, value: e[p], valueSpec: s[p], validateSpec: r.validateSpec, style: o, styleSpec: i }) : [new xe(p, e[p], `unknown property "${p}"`)]);
3242
3267
  return l;
3243
3268
  }
3244
3269
  function xl(r) {
@@ -3246,7 +3271,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
3246
3271
  const i = r.value, s = r.key;
3247
3272
  if (Array.isArray(i)) {
3248
3273
  const o = [], l = [];
3249
- for (const u in i) i[u].id && o.includes(i[u].id) && e.push(new ve(s, i, `all the sprites' ids must be unique, but ${i[u].id} is duplicated`)), o.push(i[u].id), i[u].url && l.includes(i[u].url) && e.push(new ve(s, i, `all the sprites' URLs must be unique, but ${i[u].url} is duplicated`)), l.push(i[u].url), e = e.concat(Ei({ key: `${s}[${u}]`, value: i[u], valueSpec: { id: { type: "string", required: !0 }, url: { type: "string", required: !0 } }, validateSpec: r.validateSpec }));
3274
+ for (const u in i) i[u].id && o.includes(i[u].id) && e.push(new xe(s, i, `all the sprites' ids must be unique, but ${i[u].id} is duplicated`)), o.push(i[u].id), i[u].url && l.includes(i[u].url) && e.push(new xe(s, i, `all the sprites' URLs must be unique, but ${i[u].url} is duplicated`)), l.push(i[u].url), e = e.concat(Ei({ key: `${s}[${u}]`, value: i[u], valueSpec: { id: { type: "string", required: !0 }, url: { type: "string", required: !0 } }, validateSpec: r.validateSpec }));
3250
3275
  return e;
3251
3276
  }
3252
3277
  return Ur({ key: s, value: i });
@@ -3255,17 +3280,17 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
3255
3280
  return !!r && r.constructor === Object;
3256
3281
  }
3257
3282
  function Zs(r) {
3258
- return Yc(r.value) ? [] : [new ve(r.key, r.value, `object expected, ${We(r.value)} found`)];
3283
+ return Yc(r.value) ? [] : [new xe(r.key, r.value, `object expected, ${We(r.value)} found`)];
3259
3284
  }
3260
3285
  const bl = { "*": () => [], array: qo, boolean: function(r) {
3261
3286
  const e = r.value, i = r.key, s = We(e);
3262
- return s !== "boolean" ? [new ve(i, e, `boolean expected, ${s} found`)] : [];
3287
+ return s !== "boolean" ? [new xe(i, e, `boolean expected, ${s} found`)] : [];
3263
3288
  }, number: ns, color: Gs, constants: Gc, enum: Tn, filter: ss, function: Wo, layer: Hc, object: Ei, source: yl, light: $s, sky: Xc, terrain: vl, projection: function(r) {
3264
3289
  const e = r.value, i = r.styleSpec, s = i.projection, o = r.style, l = We(e);
3265
3290
  if (e === void 0) return [];
3266
- if (l !== "object") return [new ve("projection", e, `object expected, ${l} found`)];
3291
+ if (l !== "object") return [new xe("projection", e, `object expected, ${l} found`)];
3267
3292
  let u = [];
3268
- for (const p in e) u = u.concat(s[p] ? r.validateSpec({ key: p, value: e[p], valueSpec: s[p], style: o, styleSpec: i }) : [new ve(p, e[p], `unknown property "${p}"`)]);
3293
+ for (const p in e) u = u.concat(s[p] ? r.validateSpec({ key: p, value: e[p], valueSpec: s[p], style: o, styleSpec: i }) : [new xe(p, e[p], `unknown property "${p}"`)]);
3269
3294
  return u;
3270
3295
  }, projectionDefinition: function(r) {
3271
3296
  const e = r.key;
@@ -3276,7 +3301,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
3276
3301
  return Array.isArray(o) && o.length === 3 && typeof o[0] == "string" && typeof o[1] == "string" && typeof o[2] == "number";
3277
3302
  })(i) || (function(o) {
3278
3303
  return !!["interpolate", "step", "literal"].includes(o[0]);
3279
- })(i) ? ["array", "string"].includes(s) ? [] : [new ve(e, i, `projection expected, invalid type "${s}" found`)] : [new ve(e, i, `projection expected, invalid array ${JSON.stringify(i)} found`)];
3304
+ })(i) ? ["array", "string"].includes(s) ? [] : [new xe(e, i, `projection expected, invalid type "${s}" found`)] : [new xe(e, i, `projection expected, invalid array ${JSON.stringify(i)} found`)];
3280
3305
  }, string: Ur, formatted: function(r) {
3281
3306
  return Ur(r).length === 0 ? [] : Nr(r);
3282
3307
  }, resolvedImage: function(r) {
@@ -3284,7 +3309,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
3284
3309
  }, padding: function(r) {
3285
3310
  const e = r.key, i = r.value;
3286
3311
  if (We(i) === "array") {
3287
- if (i.length < 1 || i.length > 4) return [new ve(e, i, `padding requires 1 to 4 values; ${i.length} values found`)];
3312
+ if (i.length < 1 || i.length > 4) return [new xe(e, i, `padding requires 1 to 4 values; ${i.length} values found`)];
3288
3313
  const s = { type: "number" };
3289
3314
  let o = [];
3290
3315
  for (let l = 0; l < i.length; l++) o = o.concat(r.validateSpec({ key: `${e}[${l}]`, value: i[l], validateSpec: r.validateSpec, valueSpec: s }));
@@ -3295,7 +3320,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
3295
3320
  const e = r.key, i = r.value;
3296
3321
  if (We(i) === "array") {
3297
3322
  const s = { type: "number" };
3298
- if (i.length < 1) return [new ve(e, i, "array length at least 1 expected, length 0 found")];
3323
+ if (i.length < 1) return [new xe(e, i, "array length at least 1 expected, length 0 found")];
3299
3324
  let o = [];
3300
3325
  for (let l = 0; l < i.length; l++) o = o.concat(r.validateSpec({ key: `${e}[${l}]`, value: i[l], validateSpec: r.validateSpec, valueSpec: s }));
3301
3326
  return o;
@@ -3304,7 +3329,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
3304
3329
  }, colorArray: function(r) {
3305
3330
  const e = r.key, i = r.value;
3306
3331
  if (We(i) === "array") {
3307
- if (i.length < 1) return [new ve(e, i, "array length at least 1 expected, length 0 found")];
3332
+ if (i.length < 1) return [new xe(e, i, "array length at least 1 expected, length 0 found")];
3308
3333
  let s = [];
3309
3334
  for (let o = 0; o < i.length; o++) s = s.concat(Gs({ key: `${e}[${o}]`, value: i[o] }));
3310
3335
  return s;
@@ -3312,13 +3337,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
3312
3337
  return Gs({ key: e, value: i });
3313
3338
  }, variableAnchorOffsetCollection: function(r) {
3314
3339
  const e = r.key, i = r.value, s = We(i), o = r.styleSpec;
3315
- if (s !== "array" || i.length < 1 || i.length % 2 != 0) return [new ve(e, i, "variableAnchorOffsetCollection requires a non-empty array of even length")];
3340
+ if (s !== "array" || i.length < 1 || i.length % 2 != 0) return [new xe(e, i, "variableAnchorOffsetCollection requires a non-empty array of even length")];
3316
3341
  let l = [];
3317
3342
  for (let u = 0; u < i.length; u += 2) l = l.concat(Tn({ key: `${e}[${u}]`, value: i[u], valueSpec: o.layout_symbol["text-anchor"] })), l = l.concat(qo({ key: `${e}[${u + 1}]`, value: i[u + 1], valueSpec: { length: 2, value: "number" }, validateSpec: r.validateSpec, style: r.style, styleSpec: o }));
3318
3343
  return l;
3319
3344
  }, sprite: xl, state: Zs, fontFaces: function(r) {
3320
3345
  const e = r.key, i = r.value, s = r.validateSpec, o = r.styleSpec, l = r.style;
3321
- if (!Yc(i)) return [new ve(e, i, `object expected, ${We(i)} found`)];
3346
+ if (!Yc(i)) return [new xe(e, i, `object expected, ${We(i)} found`)];
3322
3347
  const u = [];
3323
3348
  for (const p in i) {
3324
3349
  const g = i[p], m = We(g);
@@ -3326,7 +3351,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
3326
3351
  else if (m === "array") {
3327
3352
  const v = { url: { type: "string", required: !0 }, "unicode-range": { type: "array", value: "string" } };
3328
3353
  for (const [_, T] of g.entries()) u.push(...Ei({ key: `${e}.${p}[${_}]`, value: T, valueSpec: v, styleSpec: o, style: l, validateSpec: s }));
3329
- } else u.push(new ve(`${e}.${p}`, g, `string or array expected, ${m} found`));
3354
+ } else u.push(new xe(`${e}.${p}`, g, `string or array expected, ${m} found`));
3330
3355
  }
3331
3356
  return u;
3332
3357
  } };
@@ -3336,7 +3361,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
3336
3361
  }
3337
3362
  function os(r) {
3338
3363
  const e = r.value, i = r.key, s = Ur(r);
3339
- return s.length || (e.indexOf("{fontstack}") === -1 && s.push(new ve(i, e, '"glyphs" url must include a "{fontstack}" token')), e.indexOf("{range}") === -1 && s.push(new ve(i, e, '"glyphs" url must include a "{range}" token'))), s;
3364
+ return s.length || (e.indexOf("{fontstack}") === -1 && s.push(new xe(i, e, '"glyphs" url must include a "{fontstack}" token')), e.indexOf("{range}") === -1 && s.push(new xe(i, e, '"glyphs" url must include a "{range}" token'))), s;
3340
3365
  }
3341
3366
  function Wi(r, e = ue) {
3342
3367
  let i = [];
@@ -3466,12 +3491,12 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
3466
3491
  }
3467
3492
  }
3468
3493
  const dr = {};
3469
- function Ie(r, e, i = {}) {
3494
+ function Me(r, e, i = {}) {
3470
3495
  if (dr[r]) throw new Error(`${r} is already registered.`);
3471
3496
  Object.defineProperty(e, "_classRegistryKey", { value: r, writeable: !1 }), dr[r] = { klass: e, omit: i.omit || [], shallow: i.shallow || [] };
3472
3497
  }
3473
- Ie("Object", Object), Ie("Set", Set), Ie("TransferableGridIndex", br), Ie("Color", Ze), Ie("Error", Error), Ie("AJAXError", Fn), Ie("ResolvedImage", Ri), Ie("StylePropertyFunction", $o), Ie("StyleExpression", Os, { omit: ["_evaluator"] }), Ie("ZoomDependentExpression", Go), Ie("ZoomConstantExpression", Uo), Ie("CompoundExpression", qi, { omit: ["_evaluate"] });
3474
- for (const r in Qn) Qn[r]._classRegistryKey || Ie(`Expression_${r}`, Qn[r]);
3498
+ Me("Object", Object), Me("Set", Set), Me("TransferableGridIndex", br), Me("Color", Ze), Me("Error", Error), Me("AJAXError", Fn), Me("ResolvedImage", Ri), Me("StylePropertyFunction", $o), Me("StyleExpression", Os, { omit: ["_evaluator"] }), Me("ZoomDependentExpression", Go), Me("ZoomConstantExpression", Uo), Me("CompoundExpression", qi, { omit: ["_evaluate"] });
3499
+ for (const r in Qn) Qn[r]._classRegistryKey || Me(`Expression_${r}`, Qn[r]);
3475
3500
  function eu(r) {
3476
3501
  var e;
3477
3502
  return r && typeof ArrayBuffer < "u" && (r instanceof ArrayBuffer || ((e = r.constructor) === null || e === void 0 ? void 0 : e.name) === "ArrayBuffer");
@@ -3800,7 +3825,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
3800
3825
  return this._values[e];
3801
3826
  }
3802
3827
  }
3803
- class Ce {
3828
+ class Ae {
3804
3829
  constructor(e) {
3805
3830
  this.specification = e;
3806
3831
  }
@@ -3903,7 +3928,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
3903
3928
  }
3904
3929
  }
3905
3930
  }
3906
- Ie("DataDrivenProperty", Re), Ie("DataConstantProperty", Ce), Ie("CrossFadedDataDrivenProperty", Gr), Ie("CrossFadedProperty", lu), Ie("ColorRampProperty", as);
3931
+ Me("DataDrivenProperty", Re), Me("DataConstantProperty", Ae), Me("CrossFadedDataDrivenProperty", Gr), Me("CrossFadedProperty", lu), Me("ColorRampProperty", as);
3907
3932
  const cu = " is a PAINT property not a LAYOUT property. Use get/setPaintProperty instead?", Ko = " is a LAYOUT property not a PAINT property. Use get/setLayoutProperty instead?";
3908
3933
  class Hi extends go {
3909
3934
  constructor(e, i, s) {
@@ -4030,7 +4055,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
4030
4055
  }
4031
4056
  let Dl;
4032
4057
  var hh = { get paint() {
4033
- return Dl = Dl || new _i({ "raster-opacity": new Ce(ue.paint_raster["raster-opacity"]), "raster-hue-rotate": new Ce(ue.paint_raster["raster-hue-rotate"]), "raster-brightness-min": new Ce(ue.paint_raster["raster-brightness-min"]), "raster-brightness-max": new Ce(ue.paint_raster["raster-brightness-max"]), "raster-saturation": new Ce(ue.paint_raster["raster-saturation"]), "raster-contrast": new Ce(ue.paint_raster["raster-contrast"]), resampling: new Ce(ue.paint_raster.resampling), "raster-resampling": new Ce(ue.paint_raster["raster-resampling"]), "raster-fade-duration": new Ce(ue.paint_raster["raster-fade-duration"]) });
4058
+ return Dl = Dl || new _i({ "raster-opacity": new Ae(ue.paint_raster["raster-opacity"]), "raster-hue-rotate": new Ae(ue.paint_raster["raster-hue-rotate"]), "raster-brightness-min": new Ae(ue.paint_raster["raster-brightness-min"]), "raster-brightness-max": new Ae(ue.paint_raster["raster-brightness-max"]), "raster-saturation": new Ae(ue.paint_raster["raster-saturation"]), "raster-contrast": new Ae(ue.paint_raster["raster-contrast"]), resampling: new Ae(ue.paint_raster.resampling), "raster-resampling": new Ae(ue.paint_raster["raster-resampling"]), "raster-fade-duration": new Ae(ue.paint_raster["raster-fade-duration"]) });
4034
4059
  } };
4035
4060
  class dh extends Hi {
4036
4061
  constructor(e, i) {
@@ -4100,7 +4125,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
4100
4125
  return this.int16[o + 0] = i, this.int16[o + 1] = s, e;
4101
4126
  }
4102
4127
  }
4103
- eo.prototype.bytesPerElement = 4, Ie("StructArrayLayout2i4", eo);
4128
+ eo.prototype.bytesPerElement = 4, Me("StructArrayLayout2i4", eo);
4104
4129
  class Jo extends xt {
4105
4130
  _refreshViews() {
4106
4131
  this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
@@ -4114,7 +4139,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
4114
4139
  return this.int16[l + 0] = i, this.int16[l + 1] = s, this.int16[l + 2] = o, e;
4115
4140
  }
4116
4141
  }
4117
- Jo.prototype.bytesPerElement = 6, Ie("StructArrayLayout3i6", Jo);
4142
+ Jo.prototype.bytesPerElement = 6, Me("StructArrayLayout3i6", Jo);
4118
4143
  class Qo extends xt {
4119
4144
  _refreshViews() {
4120
4145
  this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
@@ -4128,7 +4153,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
4128
4153
  return this.int16[u + 0] = i, this.int16[u + 1] = s, this.int16[u + 2] = o, this.int16[u + 3] = l, e;
4129
4154
  }
4130
4155
  }
4131
- Qo.prototype.bytesPerElement = 8, Ie("StructArrayLayout4i8", Qo);
4156
+ Qo.prototype.bytesPerElement = 8, Me("StructArrayLayout4i8", Qo);
4132
4157
  class ea extends xt {
4133
4158
  _refreshViews() {
4134
4159
  this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
@@ -4142,7 +4167,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
4142
4167
  return this.int16[g + 0] = i, this.int16[g + 1] = s, this.int16[g + 2] = o, this.int16[g + 3] = l, this.int16[g + 4] = u, this.int16[g + 5] = p, e;
4143
4168
  }
4144
4169
  }
4145
- ea.prototype.bytesPerElement = 12, Ie("StructArrayLayout2i4i12", ea);
4170
+ ea.prototype.bytesPerElement = 12, Me("StructArrayLayout2i4i12", ea);
4146
4171
  class zl extends xt {
4147
4172
  _refreshViews() {
4148
4173
  this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
@@ -4156,7 +4181,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
4156
4181
  return this.int16[g + 0] = i, this.int16[g + 1] = s, this.uint8[m + 4] = o, this.uint8[m + 5] = l, this.uint8[m + 6] = u, this.uint8[m + 7] = p, e;
4157
4182
  }
4158
4183
  }
4159
- zl.prototype.bytesPerElement = 8, Ie("StructArrayLayout2i4ub8", zl);
4184
+ zl.prototype.bytesPerElement = 8, Me("StructArrayLayout2i4ub8", zl);
4160
4185
  class to extends xt {
4161
4186
  _refreshViews() {
4162
4187
  this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
@@ -4170,7 +4195,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
4170
4195
  return this.float32[o + 0] = i, this.float32[o + 1] = s, e;
4171
4196
  }
4172
4197
  }
4173
- to.prototype.bytesPerElement = 8, Ie("StructArrayLayout2f8", to);
4198
+ to.prototype.bytesPerElement = 8, Me("StructArrayLayout2f8", to);
4174
4199
  class Sr extends xt {
4175
4200
  _refreshViews() {
4176
4201
  this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
@@ -4184,7 +4209,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
4184
4209
  return this.uint16[T + 0] = i, this.uint16[T + 1] = s, this.uint16[T + 2] = o, this.uint16[T + 3] = l, this.uint16[T + 4] = u, this.uint16[T + 5] = p, this.uint16[T + 6] = g, this.uint16[T + 7] = m, this.uint16[T + 8] = v, this.uint16[T + 9] = _, e;
4185
4210
  }
4186
4211
  }
4187
- Sr.prototype.bytesPerElement = 20, Ie("StructArrayLayout10ui20", Sr);
4212
+ Sr.prototype.bytesPerElement = 20, Me("StructArrayLayout10ui20", Sr);
4188
4213
  class ta extends xt {
4189
4214
  _refreshViews() {
4190
4215
  this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
@@ -4198,7 +4223,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
4198
4223
  return this.uint16[v + 0] = i, this.uint16[v + 1] = s, this.uint16[v + 2] = o, this.uint16[v + 3] = l, this.uint16[v + 4] = u, this.uint16[v + 5] = p, this.uint16[v + 6] = g, this.uint16[v + 7] = m, e;
4199
4224
  }
4200
4225
  }
4201
- ta.prototype.bytesPerElement = 16, Ie("StructArrayLayout8ui16", ta);
4226
+ ta.prototype.bytesPerElement = 16, Me("StructArrayLayout8ui16", ta);
4202
4227
  class io extends xt {
4203
4228
  _refreshViews() {
4204
4229
  this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
@@ -4212,7 +4237,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
4212
4237
  return this.int16[I + 0] = i, this.int16[I + 1] = s, this.int16[I + 2] = o, this.int16[I + 3] = l, this.uint16[I + 4] = u, this.uint16[I + 5] = p, this.uint16[I + 6] = g, this.uint16[I + 7] = m, this.int16[I + 8] = v, this.int16[I + 9] = _, this.int16[I + 10] = T, this.int16[I + 11] = b, e;
4213
4238
  }
4214
4239
  }
4215
- io.prototype.bytesPerElement = 24, Ie("StructArrayLayout4i4ui4i24", io);
4240
+ io.prototype.bytesPerElement = 24, Me("StructArrayLayout4i4ui4i24", io);
4216
4241
  class ia extends xt {
4217
4242
  _refreshViews() {
4218
4243
  this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
@@ -4226,7 +4251,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
4226
4251
  return this.float32[l + 0] = i, this.float32[l + 1] = s, this.float32[l + 2] = o, e;
4227
4252
  }
4228
4253
  }
4229
- ia.prototype.bytesPerElement = 12, Ie("StructArrayLayout3f12", ia);
4254
+ ia.prototype.bytesPerElement = 12, Me("StructArrayLayout3f12", ia);
4230
4255
  class ro extends xt {
4231
4256
  _refreshViews() {
4232
4257
  this.uint8 = new Uint8Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer);
@@ -4239,7 +4264,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
4239
4264
  return this.uint32[1 * e + 0] = i, e;
4240
4265
  }
4241
4266
  }
4242
- ro.prototype.bytesPerElement = 4, Ie("StructArrayLayout1ul4", ro);
4267
+ ro.prototype.bytesPerElement = 4, Me("StructArrayLayout1ul4", ro);
4243
4268
  class kl extends xt {
4244
4269
  _refreshViews() {
4245
4270
  this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
@@ -4253,7 +4278,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
4253
4278
  return this.int16[_ + 0] = i, this.int16[_ + 1] = s, this.int16[_ + 2] = o, this.int16[_ + 3] = l, this.int16[_ + 4] = u, this.int16[_ + 5] = p, this.uint32[T + 3] = g, this.uint16[_ + 8] = m, this.uint16[_ + 9] = v, e;
4254
4279
  }
4255
4280
  }
4256
- kl.prototype.bytesPerElement = 20, Ie("StructArrayLayout6i1ul2ui20", kl);
4281
+ kl.prototype.bytesPerElement = 20, Me("StructArrayLayout6i1ul2ui20", kl);
4257
4282
  class ls extends xt {
4258
4283
  _refreshViews() {
4259
4284
  this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
@@ -4267,7 +4292,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
4267
4292
  return this.int16[g + 0] = i, this.int16[g + 1] = s, this.int16[g + 2] = o, this.int16[g + 3] = l, this.int16[g + 4] = u, this.int16[g + 5] = p, e;
4268
4293
  }
4269
4294
  }
4270
- ls.prototype.bytesPerElement = 12, Ie("StructArrayLayout2i2i2i12", ls);
4295
+ ls.prototype.bytesPerElement = 12, Me("StructArrayLayout2i2i2i12", ls);
4271
4296
  class Pn extends xt {
4272
4297
  _refreshViews() {
4273
4298
  this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
@@ -4281,7 +4306,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
4281
4306
  return this.float32[p + 0] = i, this.float32[p + 1] = s, this.float32[p + 2] = o, this.int16[g + 6] = l, this.int16[g + 7] = u, e;
4282
4307
  }
4283
4308
  }
4284
- Pn.prototype.bytesPerElement = 16, Ie("StructArrayLayout2f1f2i16", Pn);
4309
+ Pn.prototype.bytesPerElement = 16, Me("StructArrayLayout2f1f2i16", Pn);
4285
4310
  class Rl extends xt {
4286
4311
  _refreshViews() {
4287
4312
  this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
@@ -4295,7 +4320,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
4295
4320
  return this.uint8[g + 0] = i, this.uint8[g + 1] = s, this.float32[m + 1] = o, this.float32[m + 2] = l, this.int16[v + 6] = u, this.int16[v + 7] = p, e;
4296
4321
  }
4297
4322
  }
4298
- Rl.prototype.bytesPerElement = 16, Ie("StructArrayLayout2ub2f2i16", Rl);
4323
+ Rl.prototype.bytesPerElement = 16, Me("StructArrayLayout2ub2f2i16", Rl);
4299
4324
  class no extends xt {
4300
4325
  _refreshViews() {
4301
4326
  this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
@@ -4309,7 +4334,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
4309
4334
  return this.uint16[l + 0] = i, this.uint16[l + 1] = s, this.uint16[l + 2] = o, e;
4310
4335
  }
4311
4336
  }
4312
- no.prototype.bytesPerElement = 6, Ie("StructArrayLayout3ui6", no);
4337
+ no.prototype.bytesPerElement = 6, Me("StructArrayLayout3ui6", no);
4313
4338
  class In extends xt {
4314
4339
  _refreshViews() {
4315
4340
  this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
@@ -4323,7 +4348,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
4323
4348
  return this.int16[k + 0] = i, this.int16[k + 1] = s, this.uint16[k + 2] = o, this.uint16[k + 3] = l, this.uint32[F + 2] = u, this.uint32[F + 3] = p, this.uint32[F + 4] = g, this.uint16[k + 10] = m, this.uint16[k + 11] = v, this.uint16[k + 12] = _, this.float32[F + 7] = T, this.float32[F + 8] = b, this.uint8[O + 36] = I, this.uint8[O + 37] = M, this.uint8[O + 38] = A, this.uint32[F + 10] = D, this.int16[k + 22] = L, e;
4324
4349
  }
4325
4350
  }
4326
- In.prototype.bytesPerElement = 48, Ie("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48", In);
4351
+ In.prototype.bytesPerElement = 48, Me("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48", In);
4327
4352
  class Ll extends xt {
4328
4353
  _refreshViews() {
4329
4354
  this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
@@ -4333,11 +4358,11 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
4333
4358
  return this.resize(se + 1), this.emplace(se, e, i, s, o, l, u, p, g, m, v, _, T, b, I, M, A, D, L, k, F, O, j, Y, J, ne, ie, le, ce);
4334
4359
  }
4335
4360
  emplace(e, i, s, o, l, u, p, g, m, v, _, T, b, I, M, A, D, L, k, F, O, j, Y, J, ne, ie, le, ce, se) {
4336
- const re = 32 * e, ge = 16 * e;
4337
- return this.int16[re + 0] = i, this.int16[re + 1] = s, this.int16[re + 2] = o, this.int16[re + 3] = l, this.int16[re + 4] = u, this.int16[re + 5] = p, this.int16[re + 6] = g, this.int16[re + 7] = m, this.uint16[re + 8] = v, this.uint16[re + 9] = _, this.uint16[re + 10] = T, this.uint16[re + 11] = b, this.uint16[re + 12] = I, this.uint16[re + 13] = M, this.uint16[re + 14] = A, this.uint16[re + 15] = D, this.uint16[re + 16] = L, this.uint16[re + 17] = k, this.uint16[re + 18] = F, this.uint16[re + 19] = O, this.uint16[re + 20] = j, this.uint16[re + 21] = Y, this.uint16[re + 22] = J, this.uint32[ge + 12] = ne, this.float32[ge + 13] = ie, this.float32[ge + 14] = le, this.uint16[re + 30] = ce, this.uint16[re + 31] = se, e;
4361
+ const re = 32 * e, _e = 16 * e;
4362
+ return this.int16[re + 0] = i, this.int16[re + 1] = s, this.int16[re + 2] = o, this.int16[re + 3] = l, this.int16[re + 4] = u, this.int16[re + 5] = p, this.int16[re + 6] = g, this.int16[re + 7] = m, this.uint16[re + 8] = v, this.uint16[re + 9] = _, this.uint16[re + 10] = T, this.uint16[re + 11] = b, this.uint16[re + 12] = I, this.uint16[re + 13] = M, this.uint16[re + 14] = A, this.uint16[re + 15] = D, this.uint16[re + 16] = L, this.uint16[re + 17] = k, this.uint16[re + 18] = F, this.uint16[re + 19] = O, this.uint16[re + 20] = j, this.uint16[re + 21] = Y, this.uint16[re + 22] = J, this.uint32[_e + 12] = ne, this.float32[_e + 13] = ie, this.float32[_e + 14] = le, this.uint16[re + 30] = ce, this.uint16[re + 31] = se, e;
4338
4363
  }
4339
4364
  }
4340
- Ll.prototype.bytesPerElement = 64, Ie("StructArrayLayout8i15ui1ul2f2ui64", Ll);
4365
+ Ll.prototype.bytesPerElement = 64, Me("StructArrayLayout8i15ui1ul2f2ui64", Ll);
4341
4366
  class ra extends xt {
4342
4367
  _refreshViews() {
4343
4368
  this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
@@ -4350,7 +4375,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
4350
4375
  return this.float32[1 * e + 0] = i, e;
4351
4376
  }
4352
4377
  }
4353
- ra.prototype.bytesPerElement = 4, Ie("StructArrayLayout1f4", ra);
4378
+ ra.prototype.bytesPerElement = 4, Me("StructArrayLayout1f4", ra);
4354
4379
  class na extends xt {
4355
4380
  _refreshViews() {
4356
4381
  this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
@@ -4364,7 +4389,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
4364
4389
  return this.uint16[6 * e + 0] = i, this.float32[l + 1] = s, this.float32[l + 2] = o, e;
4365
4390
  }
4366
4391
  }
4367
- na.prototype.bytesPerElement = 12, Ie("StructArrayLayout1ui2f12", na);
4392
+ na.prototype.bytesPerElement = 12, Me("StructArrayLayout1ui2f12", na);
4368
4393
  class Fl extends xt {
4369
4394
  _refreshViews() {
4370
4395
  this.uint8 = new Uint8Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
@@ -4378,7 +4403,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
4378
4403
  return this.uint32[2 * e + 0] = i, this.uint16[l + 2] = s, this.uint16[l + 3] = o, e;
4379
4404
  }
4380
4405
  }
4381
- Fl.prototype.bytesPerElement = 8, Ie("StructArrayLayout1ul2ui8", Fl);
4406
+ Fl.prototype.bytesPerElement = 8, Me("StructArrayLayout1ul2ui8", Fl);
4382
4407
  class d extends xt {
4383
4408
  _refreshViews() {
4384
4409
  this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
@@ -4392,7 +4417,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
4392
4417
  return this.uint16[o + 0] = i, this.uint16[o + 1] = s, e;
4393
4418
  }
4394
4419
  }
4395
- d.prototype.bytesPerElement = 4, Ie("StructArrayLayout2ui4", d);
4420
+ d.prototype.bytesPerElement = 4, Me("StructArrayLayout2ui4", d);
4396
4421
  class t extends xt {
4397
4422
  _refreshViews() {
4398
4423
  this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
@@ -4405,7 +4430,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
4405
4430
  return this.uint16[1 * e + 0] = i, e;
4406
4431
  }
4407
4432
  }
4408
- t.prototype.bytesPerElement = 2, Ie("StructArrayLayout1ui2", t);
4433
+ t.prototype.bytesPerElement = 2, Me("StructArrayLayout1ui2", t);
4409
4434
  class n extends xt {
4410
4435
  _refreshViews() {
4411
4436
  this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
@@ -4419,7 +4444,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
4419
4444
  return this.float32[u + 0] = i, this.float32[u + 1] = s, this.float32[u + 2] = o, this.float32[u + 3] = l, e;
4420
4445
  }
4421
4446
  }
4422
- n.prototype.bytesPerElement = 16, Ie("StructArrayLayout4f16", n);
4447
+ n.prototype.bytesPerElement = 16, Me("StructArrayLayout4f16", n);
4423
4448
  class a extends Qs {
4424
4449
  get anchorPointX() {
4425
4450
  return this._structArray.int16[this._pos2 + 0];
@@ -4458,7 +4483,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
4458
4483
  return new a(this, e);
4459
4484
  }
4460
4485
  }
4461
- Ie("CollisionBoxArray", c);
4486
+ Me("CollisionBoxArray", c);
4462
4487
  class f extends Qs {
4463
4488
  get anchorX() {
4464
4489
  return this._structArray.int16[this._pos2 + 0];
@@ -4527,7 +4552,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
4527
4552
  return new f(this, e);
4528
4553
  }
4529
4554
  }
4530
- Ie("PlacedSymbolArray", y);
4555
+ Me("PlacedSymbolArray", y);
4531
4556
  class x extends Qs {
4532
4557
  get anchorX() {
4533
4558
  return this._structArray.int16[this._pos2 + 0];
@@ -4623,13 +4648,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
4623
4648
  return new x(this, e);
4624
4649
  }
4625
4650
  }
4626
- Ie("SymbolInstanceArray", w);
4651
+ Me("SymbolInstanceArray", w);
4627
4652
  class S extends ra {
4628
4653
  getoffsetX(e) {
4629
4654
  return this.float32[1 * e + 0];
4630
4655
  }
4631
4656
  }
4632
- Ie("GlyphOffsetArray", S);
4657
+ Me("GlyphOffsetArray", S);
4633
4658
  class P extends Jo {
4634
4659
  getx(e) {
4635
4660
  return this.int16[3 * e + 0];
@@ -4641,7 +4666,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
4641
4666
  return this.int16[3 * e + 2];
4642
4667
  }
4643
4668
  }
4644
- Ie("SymbolLineVertexArray", P);
4669
+ Me("SymbolLineVertexArray", P);
4645
4670
  class E extends Qs {
4646
4671
  get textAnchor() {
4647
4672
  return this._structArray.uint16[this._pos2 + 0];
@@ -4659,7 +4684,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
4659
4684
  return new E(this, e);
4660
4685
  }
4661
4686
  }
4662
- Ie("TextAnchorOffsetArray", C);
4687
+ Me("TextAnchorOffsetArray", C);
4663
4688
  class z extends Qs {
4664
4689
  get featureIndex() {
4665
4690
  return this._structArray.uint32[this._pos4 + 0];
@@ -4677,7 +4702,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
4677
4702
  return new z(this, e);
4678
4703
  }
4679
4704
  }
4680
- Ie("FeatureIndexArray", B);
4705
+ Me("FeatureIndexArray", B);
4681
4706
  class V extends eo {
4682
4707
  }
4683
4708
  class G extends eo {
@@ -4696,7 +4721,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
4696
4721
  }
4697
4722
  class q extends io {
4698
4723
  }
4699
- class Q extends ia {
4724
+ class ee extends ia {
4700
4725
  }
4701
4726
  class oe extends ro {
4702
4727
  }
@@ -4706,9 +4731,9 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
4706
4731
  }
4707
4732
  class de extends no {
4708
4733
  }
4709
- class Ee extends d {
4734
+ class Ce extends d {
4710
4735
  }
4711
- const be = ft([{ name: "a_pos", components: 2, type: "Int16" }], 4), { members: he } = be;
4736
+ const we = ft([{ name: "a_pos", components: 2, type: "Int16" }], 4), { members: he } = we;
4712
4737
  class Pe {
4713
4738
  constructor(e = []) {
4714
4739
  this._forceNewSegmentOnNextPrepare = !1, this.segments = e;
@@ -4740,7 +4765,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
4740
4765
  function ke(r, e) {
4741
4766
  return 256 * (r = fi(Math.floor(r), 0, 255)) + fi(Math.floor(e), 0, 255);
4742
4767
  }
4743
- Pe.MAX_VERTEX_ARRAY_LENGTH = Math.pow(2, 16) - 1, Ie("SegmentVector", Pe);
4768
+ Pe.MAX_VERTEX_ARRAY_LENGTH = Math.pow(2, 16) - 1, Me("SegmentVector", Pe);
4744
4769
  const st = ft([{ name: "a_pattern_from", components: 4, type: "Uint16" }, { name: "a_pattern_to", components: 4, type: "Uint16" }, { name: "a_pixel_ratio_from", components: 1, type: "Uint16" }, { name: "a_pixel_ratio_to", components: 1, type: "Uint16" }]), zt = ft([{ name: "a_dasharray_from", components: 4, type: "Uint16" }, { name: "a_dasharray_to", components: 4, type: "Uint16" }]);
4745
4770
  var ct, Rt, Ft, oi = { exports: {} }, Mt = { exports: {} }, yi = { exports: {} }, ii = (function() {
4746
4771
  if (Ft) return oi.exports;
@@ -4824,7 +4849,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
4824
4849
  const s = r[e];
4825
4850
  r[e] = r[i], r[i] = s;
4826
4851
  }
4827
- Ie("FeaturePositionMap", ai);
4852
+ Me("FeaturePositionMap", ai);
4828
4853
  class li {
4829
4854
  constructor(e, i) {
4830
4855
  this.gl = e.gl, this.location = i;
@@ -5175,7 +5200,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
5175
5200
  })(r);
5176
5201
  return o?.[i] || s[e][i];
5177
5202
  }
5178
- Ie("ConstantBinder", Oi), Ie("CrossFadedConstantBinder", Xi), Ie("SourceExpressionBinder", bt), Ie("CrossFadedPatternBinder", wt), Ie("CrossFadedDasharrayBinder", Mn), Ie("CompositeExpressionBinder", gt), Ie("ProgramConfiguration", oa, { omit: ["_buffers"] }), Ie("ProgramConfigurationSet", Ir);
5203
+ Me("ConstantBinder", Oi), Me("CrossFadedConstantBinder", Xi), Me("SourceExpressionBinder", bt), Me("CrossFadedPatternBinder", wt), Me("CrossFadedDasharrayBinder", Mn), Me("CompositeExpressionBinder", gt), Me("ProgramConfiguration", oa, { omit: ["_buffers"] }), Me("ProgramConfigurationSet", Ir);
5179
5204
  const Ol = Math.pow(2, 14) - 1, Hr = -Ol - 1;
5180
5205
  function Xr(r) {
5181
5206
  const e = Fe / r.extent, i = r.loadGeometry();
@@ -5378,9 +5403,9 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
5378
5403
  return new fe((0.5 * o.x + 0.5) * e.width, (0.5 * -o.y + 0.5) * e.height);
5379
5404
  }
5380
5405
  let Ad, Dd;
5381
- Ie("CircleBucket", aa, { omit: ["layers"] });
5406
+ Me("CircleBucket", aa, { omit: ["layers"] });
5382
5407
  var um = { get paint() {
5383
- return Dd = Dd || new _i({ "circle-radius": new Re(ue.paint_circle["circle-radius"]), "circle-color": new Re(ue.paint_circle["circle-color"]), "circle-blur": new Re(ue.paint_circle["circle-blur"]), "circle-opacity": new Re(ue.paint_circle["circle-opacity"]), "circle-translate": new Ce(ue.paint_circle["circle-translate"]), "circle-translate-anchor": new Ce(ue.paint_circle["circle-translate-anchor"]), "circle-pitch-scale": new Ce(ue.paint_circle["circle-pitch-scale"]), "circle-pitch-alignment": new Ce(ue.paint_circle["circle-pitch-alignment"]), "circle-stroke-width": new Re(ue.paint_circle["circle-stroke-width"]), "circle-stroke-color": new Re(ue.paint_circle["circle-stroke-color"]), "circle-stroke-opacity": new Re(ue.paint_circle["circle-stroke-opacity"]) });
5408
+ return Dd = Dd || new _i({ "circle-radius": new Re(ue.paint_circle["circle-radius"]), "circle-color": new Re(ue.paint_circle["circle-color"]), "circle-blur": new Re(ue.paint_circle["circle-blur"]), "circle-opacity": new Re(ue.paint_circle["circle-opacity"]), "circle-translate": new Ae(ue.paint_circle["circle-translate"]), "circle-translate-anchor": new Ae(ue.paint_circle["circle-translate-anchor"]), "circle-pitch-scale": new Ae(ue.paint_circle["circle-pitch-scale"]), "circle-pitch-alignment": new Ae(ue.paint_circle["circle-pitch-alignment"]), "circle-stroke-width": new Re(ue.paint_circle["circle-stroke-width"]), "circle-stroke-color": new Re(ue.paint_circle["circle-stroke-color"]), "circle-stroke-opacity": new Re(ue.paint_circle["circle-stroke-opacity"]) });
5384
5409
  }, get layout() {
5385
5410
  return Ad = Ad || new _i({ "circle-sort-key": new Re(ue.layout_circle["circle-sort-key"]) });
5386
5411
  } };
@@ -5406,9 +5431,9 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
5406
5431
  class zd extends aa {
5407
5432
  }
5408
5433
  let kd;
5409
- Ie("HeatmapBucket", zd, { omit: ["layers"] });
5434
+ Me("HeatmapBucket", zd, { omit: ["layers"] });
5410
5435
  var dm = { get paint() {
5411
- return kd = kd || new _i({ "heatmap-radius": new Re(ue.paint_heatmap["heatmap-radius"]), "heatmap-weight": new Re(ue.paint_heatmap["heatmap-weight"]), "heatmap-intensity": new Ce(ue.paint_heatmap["heatmap-intensity"]), "heatmap-color": new as(ue.paint_heatmap["heatmap-color"]), "heatmap-opacity": new Ce(ue.paint_heatmap["heatmap-opacity"]) });
5436
+ return kd = kd || new _i({ "heatmap-radius": new Re(ue.paint_heatmap["heatmap-radius"]), "heatmap-weight": new Re(ue.paint_heatmap["heatmap-weight"]), "heatmap-intensity": new Ae(ue.paint_heatmap["heatmap-intensity"]), "heatmap-color": new as(ue.paint_heatmap["heatmap-color"]), "heatmap-opacity": new Ae(ue.paint_heatmap["heatmap-opacity"]) });
5412
5437
  } };
5413
5438
  function _h(r, { width: e, height: i }, s, o) {
5414
5439
  if (o) {
@@ -5492,7 +5517,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
5492
5517
  else for (let u = 0, p = 0; u < i; u++, p += 4) l(0, p, u / (i - 1));
5493
5518
  return o;
5494
5519
  }
5495
- Ie("AlphaImage", Nl), Ie("RGBAImage", Vi);
5520
+ Me("AlphaImage", Nl), Me("RGBAImage", Vi);
5496
5521
  const vh = "big-fb";
5497
5522
  class pm extends Hi {
5498
5523
  createBucket(e) {
@@ -5522,7 +5547,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
5522
5547
  }
5523
5548
  let Bd;
5524
5549
  var fm = { get paint() {
5525
- return Bd = Bd || new _i({ "hillshade-illumination-direction": new Ce(ue.paint_hillshade["hillshade-illumination-direction"]), "hillshade-illumination-altitude": new Ce(ue.paint_hillshade["hillshade-illumination-altitude"]), "hillshade-illumination-anchor": new Ce(ue.paint_hillshade["hillshade-illumination-anchor"]), "hillshade-exaggeration": new Ce(ue.paint_hillshade["hillshade-exaggeration"]), "hillshade-shadow-color": new Ce(ue.paint_hillshade["hillshade-shadow-color"]), "hillshade-highlight-color": new Ce(ue.paint_hillshade["hillshade-highlight-color"]), "hillshade-accent-color": new Ce(ue.paint_hillshade["hillshade-accent-color"]), "hillshade-method": new Ce(ue.paint_hillshade["hillshade-method"]), resampling: new Ce(ue.paint_hillshade.resampling) });
5550
+ return Bd = Bd || new _i({ "hillshade-illumination-direction": new Ae(ue.paint_hillshade["hillshade-illumination-direction"]), "hillshade-illumination-altitude": new Ae(ue.paint_hillshade["hillshade-illumination-altitude"]), "hillshade-illumination-anchor": new Ae(ue.paint_hillshade["hillshade-illumination-anchor"]), "hillshade-exaggeration": new Ae(ue.paint_hillshade["hillshade-exaggeration"]), "hillshade-shadow-color": new Ae(ue.paint_hillshade["hillshade-shadow-color"]), "hillshade-highlight-color": new Ae(ue.paint_hillshade["hillshade-highlight-color"]), "hillshade-accent-color": new Ae(ue.paint_hillshade["hillshade-accent-color"]), "hillshade-method": new Ae(ue.paint_hillshade["hillshade-method"]), resampling: new Ae(ue.paint_hillshade.resampling) });
5526
5551
  } };
5527
5552
  class mm extends Hi {
5528
5553
  constructor(e, i) {
@@ -5541,7 +5566,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
5541
5566
  }
5542
5567
  let Od;
5543
5568
  var gm = { get paint() {
5544
- return Od = Od || new _i({ "color-relief-opacity": new Ce(ue["paint_color-relief"]["color-relief-opacity"]), "color-relief-color": new as(ue["paint_color-relief"]["color-relief-color"]), resampling: new Ce(ue["paint_color-relief"].resampling) });
5569
+ return Od = Od || new _i({ "color-relief-opacity": new Ae(ue["paint_color-relief"]["color-relief-opacity"]), "color-relief-color": new as(ue["paint_color-relief"]["color-relief-color"]), resampling: new Ae(ue["paint_color-relief"].resampling) });
5545
5570
  } };
5546
5571
  function Vd(r) {
5547
5572
  return "data" in r;
@@ -5656,7 +5681,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
5656
5681
  const i = e[0], s = e[1], o = e[2], l = e[3], u = Math.min(i, s, o), p = Math.round((r + l) / u);
5657
5682
  return { r: Math.floor(p * u / i) % 256, g: Math.floor(p * u / s) % 256, b: Math.floor(p * u / o) % 256 };
5658
5683
  }
5659
- Ie("DEMData", jd);
5684
+ Me("DEMData", jd);
5660
5685
  class _m extends Hi {
5661
5686
  constructor(e, i) {
5662
5687
  super(e, gm, i);
@@ -5941,7 +5966,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
5941
5966
  this.fill = e.fill, this.line = e.line, this.tile = e.tile, this.stencil = e.stencil, this.circle = e.circle;
5942
5967
  }
5943
5968
  }
5944
- yu.noSubdivision = new yu({ fill: new da(0, 0), line: new da(0, 0), tile: new da(0, 0), stencil: new da(0, 0), circle: 1 }), Ie("SubdivisionGranularityExpression", da), Ie("SubdivisionGranularitySetting", yu);
5969
+ yu.noSubdivision = new yu({ fill: new da(0, 0), line: new da(0, 0), tile: new da(0, 0), stencil: new da(0, 0), circle: 1 }), Me("SubdivisionGranularityExpression", da), Me("SubdivisionGranularitySetting", yu);
5945
5970
  const pa = -32768, ql = 32767;
5946
5971
  class Cm {
5947
5972
  constructor(e, i) {
@@ -6130,16 +6155,16 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
6130
6155
  const k = M - b, F = A - I, O = Math.abs(k), j = Math.abs(F);
6131
6156
  let Y = b, J = I;
6132
6157
  for (; ; ) {
6133
- const ie = k > 0 ? (Math.floor(Y / u) + 1) * u : (Math.ceil(Y / u) - 1) * u, le = F > 0 ? (Math.floor(J / u) + 1) * u : (Math.ceil(J / u) - 1) * u, ce = Math.abs(Y - ie), se = Math.abs(J - le), re = Math.abs(Y - M), ge = Math.abs(J - A), Te = D ? ce / O : Number.POSITIVE_INFINITY, xe = L ? se / j : Number.POSITIVE_INFINITY;
6134
- if ((re <= ce || !D) && (ge <= se || !L)) break;
6135
- if (Te < xe && D || !L) {
6158
+ const ie = k > 0 ? (Math.floor(Y / u) + 1) * u : (Math.ceil(Y / u) - 1) * u, le = F > 0 ? (Math.floor(J / u) + 1) * u : (Math.ceil(J / u) - 1) * u, ce = Math.abs(Y - ie), se = Math.abs(J - le), re = Math.abs(Y - M), _e = Math.abs(J - A), Te = D ? ce / O : Number.POSITIVE_INFINITY, be = L ? se / j : Number.POSITIVE_INFINITY;
6159
+ if ((re <= ce || !D) && (_e <= se || !L)) break;
6160
+ if (Te < be && D || !L) {
6136
6161
  Y = ie, J += F * Te;
6137
- const _e = new fe(Y, Math.round(J));
6138
- p[p.length - 1].x === _e.x && p[p.length - 1].y === _e.y || p.push(_e);
6162
+ const ye = new fe(Y, Math.round(J));
6163
+ p[p.length - 1].x === ye.x && p[p.length - 1].y === ye.y || p.push(ye);
6139
6164
  } else {
6140
- Y += k * xe, J = le;
6141
- const _e = new fe(Math.round(Y), J);
6142
- p[p.length - 1].x === _e.x && p[p.length - 1].y === _e.y || p.push(_e);
6165
+ Y += k * be, J = le;
6166
+ const ye = new fe(Math.round(Y), J);
6167
+ p[p.length - 1].x === ye.x && p[p.length - 1].y === ye.y || p.push(ye);
6143
6168
  }
6144
6169
  }
6145
6170
  const ne = new fe(M, A);
@@ -6196,8 +6221,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
6196
6221
  const Y = M[j - 2], J = M[j - 1], ne = M[j];
6197
6222
  let ie = D[Y] < k, le = D[J] < k, ce = D[ne] < k;
6198
6223
  F.vertexLength + ((ie ? 1 : 0) + (le ? 1 : 0) + (ce ? 1 : 0)) > Pe.MAX_VERTEX_ARRAY_LENGTH && (F = _.createNewSegment(T, b), k = L.count, ie = !0, le = !0, ce = !0, O = 0);
6199
- const se = Wl(D, I, A, L, Y, ie, F), re = Wl(D, I, A, L, J, le, F), ge = Wl(D, I, A, L, ne, ce, F);
6200
- b.emplaceBack(O + se - k, O + re - k, O + ge - k), F.primitiveLength++;
6224
+ const se = Wl(D, I, A, L, Y, ie, F), re = Wl(D, I, A, L, J, le, F), _e = Wl(D, I, A, L, ne, ce, F);
6225
+ b.emplaceBack(O + se - k, O + re - k, O + _e - k), F.primitiveLength++;
6201
6226
  }
6202
6227
  })(e, i, s, o, l, r), v && (function(_, T, b, I, M, A) {
6203
6228
  const D = [];
@@ -6222,7 +6247,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
6222
6247
  }
6223
6248
  class Sh {
6224
6249
  constructor(e) {
6225
- 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 de(), this.indexArray2 = new Ee(), this.programConfigurations = new Ir(e.layers, e.zoom), this.segments = new Pe(), this.segments2 = new Pe(), this.stateDependentLayerIds = this.layers.filter(((i) => i.isStateDependent())).map(((i) => i.id));
6250
+ 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 de(), this.indexArray2 = new Ce(), this.programConfigurations = new Ir(e.layers, e.zoom), this.segments = new Pe(), this.segments2 = new Pe(), this.stateDependentLayerIds = this.layers.filter(((i) => i.isStateDependent())).map(((i) => i.id));
6226
6251
  }
6227
6252
  populate(e, i, s) {
6228
6253
  this.hasDependencies = mu("fill", this.layers, i);
@@ -6272,9 +6297,9 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
6272
6297
  }
6273
6298
  }
6274
6299
  let Xd, Yd;
6275
- Ie("FillBucket", Sh, { omit: ["layers", "patternFeatures"] });
6300
+ Me("FillBucket", Sh, { omit: ["layers", "patternFeatures"] });
6276
6301
  var Dm = { get paint() {
6277
- return Yd = Yd || new _i({ "fill-antialias": new Ce(ue.paint_fill["fill-antialias"]), "fill-opacity": new Re(ue.paint_fill["fill-opacity"]), "fill-color": new Re(ue.paint_fill["fill-color"]), "fill-outline-color": new Re(ue.paint_fill["fill-outline-color"]), "fill-translate": new Ce(ue.paint_fill["fill-translate"]), "fill-translate-anchor": new Ce(ue.paint_fill["fill-translate-anchor"]), "fill-pattern": new Gr(ue.paint_fill["fill-pattern"]) });
6302
+ return Yd = Yd || new _i({ "fill-antialias": new Ae(ue.paint_fill["fill-antialias"]), "fill-opacity": new Re(ue.paint_fill["fill-opacity"]), "fill-color": new Re(ue.paint_fill["fill-color"]), "fill-outline-color": new Re(ue.paint_fill["fill-outline-color"]), "fill-translate": new Ae(ue.paint_fill["fill-translate"]), "fill-translate-anchor": new Ae(ue.paint_fill["fill-translate-anchor"]), "fill-pattern": new Gr(ue.paint_fill["fill-pattern"]) });
6278
6303
  }, get layout() {
6279
6304
  return Xd = Xd || new _i({ "fill-sort-key": new Re(ue.layout_fill["fill-sort-key"]) });
6280
6305
  } };
@@ -6515,9 +6540,9 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
6515
6540
  return r.every(((e) => e.x < 0)) || r.every(((e) => e.x > Fe)) || r.every(((e) => e.y < 0)) || r.every(((e) => e.y > Fe));
6516
6541
  }
6517
6542
  let ep;
6518
- Ie("FillExtrusionBucket", Ih, { omit: ["layers", "features"] });
6543
+ Me("FillExtrusionBucket", Ih, { omit: ["layers", "features"] });
6519
6544
  var Gm = { get paint() {
6520
- return ep = ep || new _i({ "fill-extrusion-opacity": new Ce(ue["paint_fill-extrusion"]["fill-extrusion-opacity"]), "fill-extrusion-color": new Re(ue["paint_fill-extrusion"]["fill-extrusion-color"]), "fill-extrusion-translate": new Ce(ue["paint_fill-extrusion"]["fill-extrusion-translate"]), "fill-extrusion-translate-anchor": new Ce(ue["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]), "fill-extrusion-pattern": new Gr(ue["paint_fill-extrusion"]["fill-extrusion-pattern"]), "fill-extrusion-height": new Re(ue["paint_fill-extrusion"]["fill-extrusion-height"]), "fill-extrusion-base": new Re(ue["paint_fill-extrusion"]["fill-extrusion-base"]), "fill-extrusion-vertical-gradient": new Ce(ue["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"]) });
6545
+ return ep = ep || new _i({ "fill-extrusion-opacity": new Ae(ue["paint_fill-extrusion"]["fill-extrusion-opacity"]), "fill-extrusion-color": new Re(ue["paint_fill-extrusion"]["fill-extrusion-color"]), "fill-extrusion-translate": new Ae(ue["paint_fill-extrusion"]["fill-extrusion-translate"]), "fill-extrusion-translate-anchor": new Ae(ue["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]), "fill-extrusion-pattern": new Gr(ue["paint_fill-extrusion"]["fill-extrusion-pattern"]), "fill-extrusion-height": new Re(ue["paint_fill-extrusion"]["fill-extrusion-height"]), "fill-extrusion-base": new Re(ue["paint_fill-extrusion"]["fill-extrusion-base"]), "fill-extrusion-vertical-gradient": new Ae(ue["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"]) });
6521
6546
  } };
6522
6547
  class $m extends Hi {
6523
6548
  constructor(e, i) {
@@ -6545,7 +6570,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
6545
6570
  for (const le of b) {
6546
6571
  const ce = [], se = [];
6547
6572
  for (const re of le) {
6548
- const ge = re.x, Te = re.y, xe = A[0] * ge + A[4] * Te + A[12], _e = A[1] * ge + A[5] * Te + A[13], Le = A[2] * ge + A[6] * Te + A[14], tt = A[3] * ge + A[7] * Te + A[15], rt = Le + O, lt = tt + j, hi = xe + Y, Et = _e + J, Ut = Le + ne, Ht = tt + ie, yt = new fe((xe + k) / lt, (_e + F) / lt);
6573
+ const _e = re.x, Te = re.y, be = A[0] * _e + A[4] * Te + A[12], ye = A[1] * _e + A[5] * Te + A[13], Le = A[2] * _e + A[6] * Te + A[14], tt = A[3] * _e + A[7] * Te + A[15], rt = Le + O, lt = tt + j, hi = be + Y, Et = ye + J, Ut = Le + ne, Ht = tt + ie, yt = new fe((be + k) / lt, (ye + F) / lt);
6549
6574
  yt.z = rt / lt, ce.push(yt);
6550
6575
  const ni = new fe(hi / Ht, Et / Ht);
6551
6576
  ni.z = Ut / Ht, se.push(ni);
@@ -7471,20 +7496,20 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
7471
7496
  }
7472
7497
  this.addCurrentVertex(I, F, 0, 0, b), this.addCurrentVertex(I, F.mult(-1), 0, 0, b);
7473
7498
  } else if (ce === "bevel" || ce === "fakeround") {
7474
- const se = -Math.sqrt(Y * Y - 1), re = ie ? se : 0, ge = ie ? 0 : se;
7475
- if (M && this.addCurrentVertex(I, D, re, ge, b), ce === "fakeround") {
7499
+ const se = -Math.sqrt(Y * Y - 1), re = ie ? se : 0, _e = ie ? 0 : se;
7500
+ if (M && this.addCurrentVertex(I, D, re, _e, b), ce === "fakeround") {
7476
7501
  const Te = Math.round(180 * J / Math.PI / 20);
7477
- for (let xe = 1; xe < Te; xe++) {
7478
- let _e = xe / Te;
7479
- if (_e !== 0.5) {
7480
- const tt = _e - 0.5;
7481
- _e += _e * tt * (_e - 1) * ((1.0904 + O * (O * (3.55645 - 1.43519 * O) - 3.2452)) * tt * tt + (0.848013 + O * (0.215638 * O - 1.06021)));
7502
+ for (let be = 1; be < Te; be++) {
7503
+ let ye = be / Te;
7504
+ if (ye !== 0.5) {
7505
+ const tt = ye - 0.5;
7506
+ ye += ye * tt * (ye - 1) * ((1.0904 + O * (O * (3.55645 - 1.43519 * O) - 3.2452)) * tt * tt + (0.848013 + O * (0.215638 * O - 1.06021)));
7482
7507
  }
7483
- const Le = L.sub(D)._mult(_e)._add(D)._unit()._mult(ie ? -1 : 1);
7508
+ const Le = L.sub(D)._mult(ye)._add(D)._unit()._mult(ie ? -1 : 1);
7484
7509
  this.addHalfVertex(I, Le.x, Le.y, !1, ie, 0, b);
7485
7510
  }
7486
7511
  }
7487
- A && this.addCurrentVertex(I, L, -re, -ge, b);
7512
+ A && this.addCurrentVertex(I, L, -re, -_e, b);
7488
7513
  } else if (ce === "butt") this.addCurrentVertex(I, F, 0, 0, b);
7489
7514
  else if (ce === "square") {
7490
7515
  const se = M ? 1 : -1;
@@ -7532,9 +7557,9 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
7532
7557
  }
7533
7558
  }
7534
7559
  let gp, _p;
7535
- Ie("LineBucket", Uh, { omit: ["layers", "patternFeatures"] });
7560
+ Me("LineBucket", Uh, { omit: ["layers", "patternFeatures"] });
7536
7561
  var yp = { get paint() {
7537
- return _p = _p || new _i({ "line-opacity": new Re(ue.paint_line["line-opacity"]), "line-color": new Re(ue.paint_line["line-color"]), "line-translate": new Ce(ue.paint_line["line-translate"]), "line-translate-anchor": new Ce(ue.paint_line["line-translate-anchor"]), "line-width": new Re(ue.paint_line["line-width"]), "line-gap-width": new Re(ue.paint_line["line-gap-width"]), "line-offset": new Re(ue.paint_line["line-offset"]), "line-blur": new Re(ue.paint_line["line-blur"]), "line-dasharray": new Gr(ue.paint_line["line-dasharray"]), "line-pattern": new Gr(ue.paint_line["line-pattern"]), "line-gradient": new as(ue.paint_line["line-gradient"]) });
7562
+ return _p = _p || new _i({ "line-opacity": new Re(ue.paint_line["line-opacity"]), "line-color": new Re(ue.paint_line["line-color"]), "line-translate": new Ae(ue.paint_line["line-translate"]), "line-translate-anchor": new Ae(ue.paint_line["line-translate-anchor"]), "line-width": new Re(ue.paint_line["line-width"]), "line-gap-width": new Re(ue.paint_line["line-gap-width"]), "line-offset": new Re(ue.paint_line["line-offset"]), "line-blur": new Re(ue.paint_line["line-blur"]), "line-dasharray": new Gr(ue.paint_line["line-dasharray"]), "line-pattern": new Gr(ue.paint_line["line-pattern"]), "line-gradient": new as(ue.paint_line["line-gradient"]) });
7538
7563
  }, get layout() {
7539
7564
  return gp = gp || new _i({ "line-cap": new Re(ue.layout_line["line-cap"]), "line-join": new Re(ue.layout_line["line-join"]), "line-miter-limit": new Re(ue.layout_line["line-miter-limit"]), "line-round-limit": new Re(ue.layout_line["line-round-limit"]), "line-sort-key": new Re(ue.layout_line["line-sort-key"]) });
7540
7565
  } };
@@ -8186,9 +8211,9 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
8186
8211
  return ne < j.length() && J.push(j.substring(ne, j.length())), J;
8187
8212
  })(M, D);
8188
8213
  const F = [], O = { positionedLines: F, text: M.toString(), top: v[1], bottom: v[1], left: v[0], right: v[0], writingMode: _, iconsInText: !1, verticalizable: !1 };
8189
- return (function(j, Y, J, ne, ie, le, ce, se, re, ge, Te, xe) {
8190
- let _e = 0, Le = 0, tt = 0, rt = 0;
8191
- const lt = se === "right" ? 1 : se === "left" ? 0 : 0.5, hi = qt / xe;
8214
+ return (function(j, Y, J, ne, ie, le, ce, se, re, _e, Te, be) {
8215
+ let ye = 0, Le = 0, tt = 0, rt = 0;
8216
+ const lt = se === "right" ? 1 : se === "left" ? 0 : 0.5, hi = qt / be;
8192
8217
  let Et = 0;
8193
8218
  for (const yt of ie) {
8194
8219
  yt.trim();
@@ -8203,7 +8228,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
8203
8228
  const di = Og(ne, yt, hi);
8204
8229
  let Ni = 0;
8205
8230
  for (const Xt of yt.text) {
8206
- const Tt = yt.getSection(Ni), Ot = Xt.codePointAt(0), Ct = Vg(re, Te, Ot), Yt = { glyph: Ot, imageName: null, x: _e, y: Le + -17, vertical: Ct, scale: 1, fontStack: "", sectionIndex: yt.getSectionIndex(Ni), metrics: null, rect: null };
8231
+ const Tt = yt.getSection(Ni), Ot = Xt.codePointAt(0), Ct = Vg(re, Te, Ot), Yt = { glyph: Ot, imageName: null, x: ye, y: Le + -17, vertical: Ct, scale: 1, fontStack: "", sectionIndex: yt.getSectionIndex(Ni), metrics: null, rect: null };
8207
8232
  let Dn;
8208
8233
  if ("fontStack" in Tt) {
8209
8234
  if (Dn = jg(Tt, Ot, Ct, di, Y, J), !Dn) continue;
@@ -8213,9 +8238,9 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
8213
8238
  ji = Math.max(ji, Dn.imageOffset), Yt.imageName = Tt.imageName;
8214
8239
  }
8215
8240
  const { rect: Cr, metrics: nc, baselineOffset: gs } = Dn;
8216
- Yt.y += gs, Yt.scale = Tt.scale, Yt.metrics = nc, Yt.rect = Cr, wi.push(Yt), Ct ? (j.verticalizable = !0, _e += ("imageName" in Tt ? nc.advance : qt) * Tt.scale + ge) : _e += nc.advance * Tt.scale + ge, Ni++;
8241
+ Yt.y += gs, Yt.scale = Tt.scale, Yt.metrics = nc, Yt.rect = Cr, wi.push(Yt), Ct ? (j.verticalizable = !0, ye += ("imageName" in Tt ? nc.advance : qt) * Tt.scale + _e) : ye += nc.advance * Tt.scale + _e, Ni++;
8217
8242
  }
8218
- wi.length !== 0 && (tt = Math.max(_e - ge, tt), Ug(wi, 0, wi.length - 1, lt)), _e = 0, bi.lineOffset = Math.max(ji, (ni - 1) * qt);
8243
+ wi.length !== 0 && (tt = Math.max(ye - _e, tt), Ug(wi, 0, wi.length - 1, lt)), ye = 0, bi.lineOffset = Math.max(ji, (ni - 1) * qt);
8219
8244
  const mr = le * ni + ji;
8220
8245
  Le += mr, rt = Math.max(mr, rt), ++Et;
8221
8246
  }
@@ -8339,7 +8364,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
8339
8364
  const I = e.top * l, M = e.bottom * l;
8340
8365
  return i === "height" || i === "both" ? (v = o[1] + I - s[0], T = o[1] + M + s[2]) : (v = o[1] + (I + M - u.displaySize[1]) / 2, T = v + u.displaySize[1]), { image: u, top: v, right: _, bottom: T, left: b, collisionPadding: p };
8341
8366
  }
8342
- Ie("ImagePosition", $h), Ie("ImageAtlas", Cp), R.ax = void 0, (cs = R.ax || (R.ax = {}))[cs.none = 0] = "none", cs[cs.horizontal = 1] = "horizontal", cs[cs.vertical = 2] = "vertical", cs[cs.horizontalOnly = 3] = "horizontalOnly";
8367
+ Me("ImagePosition", $h), Me("ImageAtlas", Cp), R.ax = void 0, (cs = R.ax || (R.ax = {}))[cs.none = 0] = "none", cs[cs.horizontal = 1] = "horizontal", cs[cs.vertical = 2] = "vertical", cs[cs.horizontalOnly = 3] = "horizontalOnly";
8343
8368
  const Cn = 128, us = 32640;
8344
8369
  function kp(r, e) {
8345
8370
  const { expression: i } = e;
@@ -8376,7 +8401,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
8376
8401
  }
8377
8402
  class Hh {
8378
8403
  constructor(e) {
8379
- this.layoutVertexArray = new q(), this.indexArray = new de(), this.programConfigurations = e, this.segments = new Pe(), this.dynamicLayoutVertexArray = new Q(), this.opacityVertexArray = new oe(), this.hasVisibleVertices = !1, this.placedSymbolArray = new y();
8404
+ this.layoutVertexArray = new q(), this.indexArray = new de(), this.programConfigurations = e, this.segments = new Pe(), this.dynamicLayoutVertexArray = new ee(), this.opacityVertexArray = new oe(), this.hasVisibleVertices = !1, this.placedSymbolArray = new y();
8380
8405
  }
8381
8406
  isEmpty() {
8382
8407
  return this.layoutVertexArray.length === 0 && this.indexArray.length === 0 && this.dynamicLayoutVertexArray.length === 0 && this.opacityVertexArray.length === 0;
@@ -8388,7 +8413,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
8388
8413
  this.layoutVertexBuffer && (this.layoutVertexBuffer.destroy(), this.indexBuffer.destroy(), this.programConfigurations.destroy(), this.segments.destroy(), this.dynamicLayoutVertexBuffer.destroy(), this.opacityVertexBuffer.destroy());
8389
8414
  }
8390
8415
  }
8391
- Ie("SymbolBuffers", Hh);
8416
+ Me("SymbolBuffers", Hh);
8392
8417
  class Xh {
8393
8418
  constructor(e, i, s) {
8394
8419
  this.layoutVertexArray = new e(), this.layoutAttributes = i, this.indexArray = new s(), this.segments = new Pe(), this.collisionVertexArray = new me();
@@ -8400,7 +8425,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
8400
8425
  this.layoutVertexBuffer && (this.layoutVertexBuffer.destroy(), this.indexBuffer.destroy(), this.segments.destroy(), this.collisionVertexBuffer.destroy());
8401
8426
  }
8402
8427
  }
8403
- Ie("CollisionBuffers", Xh);
8428
+ Me("CollisionBuffers", Xh);
8404
8429
  class va {
8405
8430
  constructor(e) {
8406
8431
  this.collisionBoxArray = e.collisionBoxArray, this.zoom = e.zoom, this.overscaling = e.overscaling, this.layers = e.layers, this.layerIds = this.layers.map(((u) => u.id)), this.index = e.index, this.pixelRatio = e.pixelRatio, this.sourceLayerIndex = e.sourceLayerIndex, this.hasDependencies = !1, this.hasRTLText = !1, this.sortKeyRanges = [], this.collisionCircleArray = [];
@@ -8471,11 +8496,11 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
8471
8496
  j(ie);
8472
8497
  continue;
8473
8498
  }
8474
- const re = ne(se, ce), ge = ne(se, ce, !0);
8475
- if (re in k && ge in L && k[re] !== L[ge]) {
8476
- const Te = J(re, ge, ce), xe = Y(re, ge, F[Te].geometry);
8477
- delete L[re], delete k[ge], k[ne(se, F[xe].geometry, !0)] = xe, F[Te].geometry = null;
8478
- } else re in k ? Y(re, ge, ce) : ge in L ? J(re, ge, ce) : (j(ie), L[re] = O - 1, k[ge] = O - 1);
8499
+ const re = ne(se, ce), _e = ne(se, ce, !0);
8500
+ if (re in k && _e in L && k[re] !== L[_e]) {
8501
+ const Te = J(re, _e, ce), be = Y(re, _e, F[Te].geometry);
8502
+ delete L[re], delete k[_e], k[ne(se, F[be].geometry, !0)] = be, F[Te].geometry = null;
8503
+ } else re in k ? Y(re, _e, ce) : _e in L ? J(re, _e, ce) : (j(ie), L[re] = O - 1, k[_e] = O - 1);
8479
8504
  }
8480
8505
  return F.filter(((ie) => ie.geometry));
8481
8506
  })(this.features)), this.sortFeaturesByKey && this.features.sort(((D, L) => D.sortKey - L.sortKey));
@@ -8515,8 +8540,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
8515
8540
  addSymbols(e, i, s, o, l, u, p, g, m, v, _, T) {
8516
8541
  const b = e.indexArray, I = e.layoutVertexArray, M = e.segments.prepareSegment(4 * i.length, I, b, this.canOverlap ? u.sortKey : void 0), A = this.glyphOffsetArray.length, D = M.vertexLength, L = this.allowVerticalPlacement && p === R.ax.vertical ? Math.PI / 2 : 0, k = u.text && u.text.sections;
8517
8542
  for (let F = 0; F < i.length; F++) {
8518
- const { tl: O, tr: j, bl: Y, br: J, tex: ne, pixelOffsetTL: ie, pixelOffsetBR: le, minFontScaleX: ce, minFontScaleY: se, glyphOffset: re, isSDF: ge, sectionIndex: Te } = i[F], xe = M.vertexLength, _e = re[1];
8519
- Mu(I, g.x, g.y, O.x, _e + O.y, ne.x, ne.y, s, ge, ie.x, ie.y, ce, se), Mu(I, g.x, g.y, j.x, _e + j.y, ne.x + ne.w, ne.y, s, ge, le.x, ie.y, ce, se), Mu(I, g.x, g.y, Y.x, _e + Y.y, ne.x, ne.y + ne.h, s, ge, ie.x, le.y, ce, se), Mu(I, g.x, g.y, J.x, _e + J.y, ne.x + ne.w, ne.y + ne.h, s, ge, le.x, le.y, ce, se), Wh(e.dynamicLayoutVertexArray, g, L), b.emplaceBack(xe, xe + 2, xe + 1), b.emplaceBack(xe + 1, xe + 2, xe + 3), M.vertexLength += 4, M.primitiveLength += 2, this.glyphOffsetArray.emplaceBack(re[0]), F !== i.length - 1 && Te === i[F + 1].sectionIndex || e.programConfigurations.populatePaintArrays(I.length, u, u.index, { imagePositions: {}, canonical: T, formattedSection: k?.[Te] });
8543
+ const { tl: O, tr: j, bl: Y, br: J, tex: ne, pixelOffsetTL: ie, pixelOffsetBR: le, minFontScaleX: ce, minFontScaleY: se, glyphOffset: re, isSDF: _e, sectionIndex: Te } = i[F], be = M.vertexLength, ye = re[1];
8544
+ Mu(I, g.x, g.y, O.x, ye + O.y, ne.x, ne.y, s, _e, ie.x, ie.y, ce, se), Mu(I, g.x, g.y, j.x, ye + j.y, ne.x + ne.w, ne.y, s, _e, le.x, ie.y, ce, se), Mu(I, g.x, g.y, Y.x, ye + Y.y, ne.x, ne.y + ne.h, s, _e, ie.x, le.y, ce, se), Mu(I, g.x, g.y, J.x, ye + J.y, ne.x + ne.w, ne.y + ne.h, s, _e, le.x, le.y, ce, se), Wh(e.dynamicLayoutVertexArray, g, L), b.emplaceBack(be, be + 2, be + 1), b.emplaceBack(be + 1, be + 2, be + 3), M.vertexLength += 4, M.primitiveLength += 2, this.glyphOffsetArray.emplaceBack(re[0]), F !== i.length - 1 && Te === i[F + 1].sectionIndex || e.programConfigurations.populatePaintArrays(I.length, u, u.index, { imagePositions: {}, canonical: T, formattedSection: k?.[Te] });
8520
8545
  }
8521
8546
  e.placedSymbolArray.emplaceBack(g.x, g.y, A, this.glyphOffsetArray.length - A, D, m, v, g.segment, s ? s[0] : 0, s ? s[1] : 0, o[0], o[1], p, 0, !1, 0, _);
8522
8547
  }
@@ -8536,7 +8561,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
8536
8561
  }
8537
8562
  }
8538
8563
  generateCollisionDebugBuffers() {
8539
- this.hasDebugData() && this.destroyDebugData(), this.textCollisionBox = new Xh(ae, xp.members, Ee), this.iconCollisionBox = new Xh(ae, xp.members, Ee);
8564
+ this.hasDebugData() && this.destroyDebugData(), this.textCollisionBox = new Xh(ae, xp.members, Ce), this.iconCollisionBox = new Xh(ae, xp.members, Ce);
8540
8565
  for (let e = 0; e < this.symbolInstances.length; e++) {
8541
8566
  const i = this.symbolInstances.get(e);
8542
8567
  this.addDebugCollisionBoxes(i.textBoxStartIndex, i.textBoxEndIndex, i, !0), this.addDebugCollisionBoxes(i.verticalTextBoxStartIndex, i.verticalTextBoxEndIndex, i, !0), this.addDebugCollisionBoxes(i.iconBoxStartIndex, i.iconBoxEndIndex, i, !1), this.addDebugCollisionBoxes(i.verticalIconBoxStartIndex, i.verticalIconBoxEndIndex, i, !1);
@@ -8624,11 +8649,11 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
8624
8649
  }
8625
8650
  }
8626
8651
  let Rp, Lp;
8627
- Ie("SymbolBucket", va, { omit: ["layers", "collisionBoxArray", "features", "compareText"] }), va.MAX_GLYPHS = 65535, va.addDynamicAttributes = Wh;
8652
+ Me("SymbolBucket", va, { omit: ["layers", "collisionBoxArray", "features", "compareText"] }), va.MAX_GLYPHS = 65535, va.addDynamicAttributes = Wh;
8628
8653
  var Yh = { get paint() {
8629
- return Lp = Lp || new _i({ "icon-opacity": new Re(ue.paint_symbol["icon-opacity"]), "icon-color": new Re(ue.paint_symbol["icon-color"]), "icon-halo-color": new Re(ue.paint_symbol["icon-halo-color"]), "icon-halo-width": new Re(ue.paint_symbol["icon-halo-width"]), "icon-halo-blur": new Re(ue.paint_symbol["icon-halo-blur"]), "icon-translate": new Ce(ue.paint_symbol["icon-translate"]), "icon-translate-anchor": new Ce(ue.paint_symbol["icon-translate-anchor"]), "text-opacity": new Re(ue.paint_symbol["text-opacity"]), "text-color": new Re(ue.paint_symbol["text-color"], { runtimeType: ki, getOverride: (r) => r.textColor, hasOverride: (r) => !!r.textColor }), "text-halo-color": new Re(ue.paint_symbol["text-halo-color"]), "text-halo-width": new Re(ue.paint_symbol["text-halo-width"]), "text-halo-blur": new Re(ue.paint_symbol["text-halo-blur"]), "text-translate": new Ce(ue.paint_symbol["text-translate"]), "text-translate-anchor": new Ce(ue.paint_symbol["text-translate-anchor"]) });
8654
+ return Lp = Lp || new _i({ "icon-opacity": new Re(ue.paint_symbol["icon-opacity"]), "icon-color": new Re(ue.paint_symbol["icon-color"]), "icon-halo-color": new Re(ue.paint_symbol["icon-halo-color"]), "icon-halo-width": new Re(ue.paint_symbol["icon-halo-width"]), "icon-halo-blur": new Re(ue.paint_symbol["icon-halo-blur"]), "icon-translate": new Ae(ue.paint_symbol["icon-translate"]), "icon-translate-anchor": new Ae(ue.paint_symbol["icon-translate-anchor"]), "text-opacity": new Re(ue.paint_symbol["text-opacity"]), "text-color": new Re(ue.paint_symbol["text-color"], { runtimeType: ki, getOverride: (r) => r.textColor, hasOverride: (r) => !!r.textColor }), "text-halo-color": new Re(ue.paint_symbol["text-halo-color"]), "text-halo-width": new Re(ue.paint_symbol["text-halo-width"]), "text-halo-blur": new Re(ue.paint_symbol["text-halo-blur"]), "text-translate": new Ae(ue.paint_symbol["text-translate"]), "text-translate-anchor": new Ae(ue.paint_symbol["text-translate-anchor"]) });
8630
8655
  }, get layout() {
8631
- return Rp = Rp || new _i({ "symbol-placement": new Ce(ue.layout_symbol["symbol-placement"]), "symbol-spacing": new Ce(ue.layout_symbol["symbol-spacing"]), "symbol-avoid-edges": new Ce(ue.layout_symbol["symbol-avoid-edges"]), "symbol-sort-key": new Re(ue.layout_symbol["symbol-sort-key"]), "symbol-z-order": new Ce(ue.layout_symbol["symbol-z-order"]), "icon-allow-overlap": new Ce(ue.layout_symbol["icon-allow-overlap"]), "icon-overlap": new Ce(ue.layout_symbol["icon-overlap"]), "icon-ignore-placement": new Ce(ue.layout_symbol["icon-ignore-placement"]), "icon-optional": new Ce(ue.layout_symbol["icon-optional"]), "icon-rotation-alignment": new Ce(ue.layout_symbol["icon-rotation-alignment"]), "icon-size": new Re(ue.layout_symbol["icon-size"]), "icon-text-fit": new Ce(ue.layout_symbol["icon-text-fit"]), "icon-text-fit-padding": new Ce(ue.layout_symbol["icon-text-fit-padding"]), "icon-image": new Re(ue.layout_symbol["icon-image"]), "icon-rotate": new Re(ue.layout_symbol["icon-rotate"]), "icon-padding": new Re(ue.layout_symbol["icon-padding"]), "icon-keep-upright": new Ce(ue.layout_symbol["icon-keep-upright"]), "icon-offset": new Re(ue.layout_symbol["icon-offset"]), "icon-anchor": new Re(ue.layout_symbol["icon-anchor"]), "icon-pitch-alignment": new Ce(ue.layout_symbol["icon-pitch-alignment"]), "text-pitch-alignment": new Ce(ue.layout_symbol["text-pitch-alignment"]), "text-rotation-alignment": new Ce(ue.layout_symbol["text-rotation-alignment"]), "text-field": new Re(ue.layout_symbol["text-field"]), "text-font": new Re(ue.layout_symbol["text-font"]), "text-size": new Re(ue.layout_symbol["text-size"]), "text-max-width": new Re(ue.layout_symbol["text-max-width"]), "text-line-height": new Ce(ue.layout_symbol["text-line-height"]), "text-letter-spacing": new Re(ue.layout_symbol["text-letter-spacing"]), "text-justify": new Re(ue.layout_symbol["text-justify"]), "text-radial-offset": new Re(ue.layout_symbol["text-radial-offset"]), "text-variable-anchor": new Ce(ue.layout_symbol["text-variable-anchor"]), "text-variable-anchor-offset": new Re(ue.layout_symbol["text-variable-anchor-offset"]), "text-anchor": new Re(ue.layout_symbol["text-anchor"]), "text-max-angle": new Ce(ue.layout_symbol["text-max-angle"]), "text-writing-mode": new Ce(ue.layout_symbol["text-writing-mode"]), "text-rotate": new Re(ue.layout_symbol["text-rotate"]), "text-padding": new Ce(ue.layout_symbol["text-padding"]), "text-keep-upright": new Ce(ue.layout_symbol["text-keep-upright"]), "text-transform": new Re(ue.layout_symbol["text-transform"]), "text-offset": new Re(ue.layout_symbol["text-offset"]), "text-allow-overlap": new Ce(ue.layout_symbol["text-allow-overlap"]), "text-overlap": new Ce(ue.layout_symbol["text-overlap"]), "text-ignore-placement": new Ce(ue.layout_symbol["text-ignore-placement"]), "text-optional": new Ce(ue.layout_symbol["text-optional"]) });
8656
+ return Rp = Rp || new _i({ "symbol-placement": new Ae(ue.layout_symbol["symbol-placement"]), "symbol-spacing": new Ae(ue.layout_symbol["symbol-spacing"]), "symbol-avoid-edges": new Ae(ue.layout_symbol["symbol-avoid-edges"]), "symbol-sort-key": new Re(ue.layout_symbol["symbol-sort-key"]), "symbol-z-order": new Ae(ue.layout_symbol["symbol-z-order"]), "icon-allow-overlap": new Ae(ue.layout_symbol["icon-allow-overlap"]), "icon-overlap": new Ae(ue.layout_symbol["icon-overlap"]), "icon-ignore-placement": new Ae(ue.layout_symbol["icon-ignore-placement"]), "icon-optional": new Ae(ue.layout_symbol["icon-optional"]), "icon-rotation-alignment": new Ae(ue.layout_symbol["icon-rotation-alignment"]), "icon-size": new Re(ue.layout_symbol["icon-size"]), "icon-text-fit": new Ae(ue.layout_symbol["icon-text-fit"]), "icon-text-fit-padding": new Ae(ue.layout_symbol["icon-text-fit-padding"]), "icon-image": new Re(ue.layout_symbol["icon-image"]), "icon-rotate": new Re(ue.layout_symbol["icon-rotate"]), "icon-padding": new Re(ue.layout_symbol["icon-padding"]), "icon-keep-upright": new Ae(ue.layout_symbol["icon-keep-upright"]), "icon-offset": new Re(ue.layout_symbol["icon-offset"]), "icon-anchor": new Re(ue.layout_symbol["icon-anchor"]), "icon-pitch-alignment": new Ae(ue.layout_symbol["icon-pitch-alignment"]), "text-pitch-alignment": new Ae(ue.layout_symbol["text-pitch-alignment"]), "text-rotation-alignment": new Ae(ue.layout_symbol["text-rotation-alignment"]), "text-field": new Re(ue.layout_symbol["text-field"]), "text-font": new Re(ue.layout_symbol["text-font"]), "text-size": new Re(ue.layout_symbol["text-size"]), "text-max-width": new Re(ue.layout_symbol["text-max-width"]), "text-line-height": new Ae(ue.layout_symbol["text-line-height"]), "text-letter-spacing": new Re(ue.layout_symbol["text-letter-spacing"]), "text-justify": new Re(ue.layout_symbol["text-justify"]), "text-radial-offset": new Re(ue.layout_symbol["text-radial-offset"]), "text-variable-anchor": new Ae(ue.layout_symbol["text-variable-anchor"]), "text-variable-anchor-offset": new Re(ue.layout_symbol["text-variable-anchor-offset"]), "text-anchor": new Re(ue.layout_symbol["text-anchor"]), "text-max-angle": new Ae(ue.layout_symbol["text-max-angle"]), "text-writing-mode": new Ae(ue.layout_symbol["text-writing-mode"]), "text-rotate": new Re(ue.layout_symbol["text-rotate"]), "text-padding": new Ae(ue.layout_symbol["text-padding"]), "text-keep-upright": new Ae(ue.layout_symbol["text-keep-upright"]), "text-transform": new Re(ue.layout_symbol["text-transform"]), "text-offset": new Re(ue.layout_symbol["text-offset"]), "text-allow-overlap": new Ae(ue.layout_symbol["text-allow-overlap"]), "text-overlap": new Ae(ue.layout_symbol["text-overlap"]), "text-ignore-placement": new Ae(ue.layout_symbol["text-ignore-placement"]), "text-optional": new Ae(ue.layout_symbol["text-optional"]) });
8632
8657
  } };
8633
8658
  class Fp {
8634
8659
  constructor(e) {
@@ -8652,7 +8677,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
8652
8677
  return null;
8653
8678
  }
8654
8679
  }
8655
- Ie("FormatSectionOverride", Fp, { omit: ["defaultValue"] });
8680
+ Me("FormatSectionOverride", Fp, { omit: ["defaultValue"] });
8656
8681
  class Eu extends Hi {
8657
8682
  constructor(e, i) {
8658
8683
  super(e, Yh, i);
@@ -8713,7 +8738,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
8713
8738
  }
8714
8739
  let Bp;
8715
8740
  var qg = { get paint() {
8716
- return Bp = Bp || new _i({ "background-color": new Ce(ue.paint_background["background-color"]), "background-pattern": new lu(ue.paint_background["background-pattern"]), "background-opacity": new Ce(ue.paint_background["background-opacity"]) });
8741
+ return Bp = Bp || new _i({ "background-color": new Ae(ue.paint_background["background-color"]), "background-pattern": new lu(ue.paint_background["background-pattern"]), "background-opacity": new Ae(ue.paint_background["background-opacity"]) });
8717
8742
  } };
8718
8743
  class Wg extends Hi {
8719
8744
  constructor(e, i) {
@@ -8940,7 +8965,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
8940
8965
  const l = 1 << i;
8941
8966
  return (l * l * r + l * o + s).toString(36) + i.toString(36) + e.toString(36);
8942
8967
  }
8943
- Ie("CanonicalTileID", Jh), Ie("OverscaledTileID", Yi, { omit: ["terrainRttPosMatrix32f"] });
8968
+ Me("CanonicalTileID", Jh), Me("OverscaledTileID", Yi, { omit: ["terrainRttPosMatrix32f"] });
8944
8969
  class ao {
8945
8970
  constructor() {
8946
8971
  this.minX = 1 / 0, this.maxX = -1 / 0, this.minY = 1 / 0, this.maxY = -1 / 0;
@@ -9360,19 +9385,19 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
9360
9385
  for (let se = 0; se < Y; se = se + 1 | 0) {
9361
9386
  const re = t_(J, ne, ce, se);
9362
9387
  ce = re.bytePosIn;
9363
- const ge = re.bitWidth, Te = re.exceptionCount, xe = j + se * An | 0;
9364
- switch (ge) {
9388
+ const _e = re.bitWidth, Te = re.exceptionCount, be = j + se * An | 0;
9389
+ switch (_e) {
9365
9390
  case 0:
9366
- O.fill(0, xe, xe + An);
9391
+ O.fill(0, be, be + An);
9367
9392
  break;
9368
9393
  case 32:
9369
- for (let _e = 0; _e < An; _e = _e + 1 | 0) O[xe + _e | 0] = 0 | D[le + _e | 0];
9394
+ for (let ye = 0; ye < An; ye = ye + 1 | 0) O[be + ye | 0] = 0 | D[le + ye | 0];
9370
9395
  le = le + An | 0;
9371
9396
  break;
9372
9397
  default:
9373
- le = e_(D, le, O, xe, ge);
9398
+ le = e_(D, le, O, be, _e);
9374
9399
  }
9375
- Te > 0 && (ce = i_(O, xe, ge, Te, J, ne, ce, ie, se));
9400
+ Te > 0 && (ce = i_(O, be, _e, Te, J, ne, ce, ie, se));
9376
9401
  }
9377
9402
  if (le !== F) throw new Error(`FastPFOR decode: packed region mismatch (pageStart=${L}, packedStart=${k}, consumedPackedEnd=${le}, expectedPackedEnd=${F}, packedWords=${F - k}, encoded.length=${D.length})`);
9378
9403
  })(r, u, g, m, e, 0 | s, o / An | 0, I, M, l), A;
@@ -9830,28 +9855,28 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
9830
9855
  if (F = F + 1 | 0, 255 & J) throw new Error(`FastPFOR decode: invalid alignedLength=${J} (expected multiple of 256)`);
9831
9856
  if (O + J > j.length) throw new Error(`FastPFOR decode: output buffer too small (outPos=${O}, alignedLength=${J}, out.length=${j.length})`);
9832
9857
  F = (function(ne, ie, le, ce, se, re) {
9833
- const ge = ce + sd(se, An);
9834
- let Te = ce, xe = le;
9835
- for (; Te !== ge; ) {
9836
- const _e = Math.min(od, ge - Te);
9837
- xe = r_(ne, ie, xe, Te, _e, re), Te = Te + _e | 0;
9858
+ const _e = ce + sd(se, An);
9859
+ let Te = ce, be = le;
9860
+ for (; Te !== _e; ) {
9861
+ const ye = Math.min(od, _e - Te);
9862
+ be = r_(ne, ie, be, Te, ye, re), Te = Te + ye | 0;
9838
9863
  }
9839
- return xe;
9864
+ return be;
9840
9865
  })(D, j, F, O, J, Y), O = O + J | 0;
9841
9866
  }
9842
9867
  return (function(J, ne, ie, le, ce, se) {
9843
9868
  if (se === 0) return ne;
9844
- let re = 0, ge = ne;
9845
- const Te = ne + ie, xe = ce;
9846
- let _e = ce;
9869
+ let re = 0, _e = ne;
9870
+ const Te = ne + ie, be = ce;
9871
+ let ye = ce;
9847
9872
  const Le = ce + se;
9848
9873
  let tt = 0, rt = 0;
9849
- for (; ge < Te && _e < Le; ) {
9850
- const lt = J[ge] >>> re & 255;
9851
- if (re += 8, ge += re >>> 5, re &= 31, tt |= (127 & lt) << rt, 128 & lt) le[_e++] = 0 | tt, tt = 0, rt = 0;
9852
- else if (rt += 7, rt > 28) throw new Error(`FastPFOR VByte: unterminated value (expected MSB=1 terminator within 5 bytes; shift=${rt}, partial=${tt}, decoded=${_e - xe}/${se}, inPos=${ge}, inEnd=${Te})`);
9874
+ for (; _e < Te && ye < Le; ) {
9875
+ const lt = J[_e] >>> re & 255;
9876
+ if (re += 8, _e += re >>> 5, re &= 31, tt |= (127 & lt) << rt, 128 & lt) le[ye++] = 0 | tt, tt = 0, rt = 0;
9877
+ else if (rt += 7, rt > 28) throw new Error(`FastPFOR VByte: unterminated value (expected MSB=1 terminator within 5 bytes; shift=${rt}, partial=${tt}, decoded=${ye - be}/${se}, inPos=${_e}, inEnd=${Te})`);
9853
9878
  }
9854
- if (_e !== Le) throw new Error(`FastPFOR VByte: truncated stream (decoded=${_e - xe}, expected=${se}, consumedWords=${ge - ne}/${ie}, vbyteStart=${ne}, vbyteEnd=${Te})`);
9879
+ if (ye !== Le) throw new Error(`FastPFOR VByte: truncated stream (decoded=${ye - be}, expected=${se}, consumedWords=${_e - ne}/${ie}, vbyteStart=${ne}, vbyteEnd=${Te})`);
9855
9880
  })(D, F, D.length - F | 0, j, O, L - O | 0), j;
9856
9881
  })(M.subarray(0, I), m, T.decoderWorkspace);
9857
9882
  return _.add(v), A;
@@ -10349,9 +10374,9 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
10349
10374
  for (let le = 0; le < L.length; le++) {
10350
10375
  const ce = L[le], se = k[le + 1] - k[le];
10351
10376
  if (ce !== 0 && ce !== 3) for (let re = 0; re < se; re++) {
10352
- const ge = F[J] - F[J - 1];
10377
+ const _e = F[J] - F[J - 1];
10353
10378
  J++;
10354
- for (let Te = 0; Te < ge; Te++) Y = j[ne++] = Y + O[ie++];
10379
+ for (let Te = 0; Te < _e; Te++) Y = j[ne++] = Y + O[ie++];
10355
10380
  }
10356
10381
  else for (let re = 0; re < se; re++) j[ne++] = ++Y, J++;
10357
10382
  }
@@ -10563,20 +10588,20 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
10563
10588
  }
10564
10589
  }
10565
10590
  }
10566
- return (function(le, ce, se, re, ge, Te, xe) {
10567
- return ce ? new vf(le, se, re, ge, Te, ce, xe) : null;
10568
- })(I, Y, F, k, O, j, J) ?? (function(le, ce, se, re, ge) {
10569
- return ce ? ge ? new Ea(le, se, re, ce, ge) : new Ea(le, se, re, ce) : null;
10570
- })(I, O, F, k, J) ?? (function(le, ce, se, re, ge) {
10591
+ return (function(le, ce, se, re, _e, Te, be) {
10592
+ return ce ? new vf(le, se, re, _e, Te, ce, be) : null;
10593
+ })(I, Y, F, k, O, j, J) ?? (function(le, ce, se, re, _e) {
10594
+ return ce ? _e ? new Ea(le, se, re, ce, _e) : new Ea(le, se, re, ce) : null;
10595
+ })(I, O, F, k, J) ?? (function(le, ce, se, re, _e) {
10571
10596
  if (!ce || !se) return null;
10572
- if (re) return ge ? new Ea(le, re, ce, se, ge) : new Ea(le, re, ce, se);
10573
- if (ge && ge.size() !== ce.length - 1) {
10574
- const Te = new Uint32Array(ge.size());
10575
- let xe = 0;
10576
- for (let _e = 0; _e < ge.size(); _e++) Te[_e] = ge.get(_e) ? xe++ : 0;
10577
- return new Ea(le, Te, ce, se, ge);
10597
+ if (re) return _e ? new Ea(le, re, ce, se, _e) : new Ea(le, re, ce, se);
10598
+ if (_e && _e.size() !== ce.length - 1) {
10599
+ const Te = new Uint32Array(_e.size());
10600
+ let be = 0;
10601
+ for (let ye = 0; ye < _e.size(); ye++) Te[ye] = _e.get(ye) ? be++ : 0;
10602
+ return new Ea(le, Te, ce, se, _e);
10578
10603
  }
10579
- return ge ? new yf(le, ce, se, ge) : new yf(le, ce, se);
10604
+ return _e ? new yf(le, ce, se, _e) : new yf(le, ce, se);
10580
10605
  })(I, ne, ie, F, J);
10581
10606
  })(_.name, p, g, _.nullable ? u - 1 : u, T);
10582
10607
  case 0:
@@ -10592,51 +10617,51 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
10592
10617
  const k = Ai(I, M), F = Du(k, D, I, M, "int64"), O = L.physicalType === 5;
10593
10618
  if (F === _t.FLAT) {
10594
10619
  const Y = ic(D) ? D : void 0, J = O ? (function(ne, ie, le, ce) {
10595
- return (function(se, re, ge) {
10620
+ return (function(se, re, _e) {
10596
10621
  let Te;
10597
10622
  switch (re.logicalLevelTechnique1) {
10598
10623
  case He.DELTA:
10599
10624
  if (re.logicalLevelTechnique2 === He.RLE) {
10600
- const xe = re;
10601
- if (!ge) return (function(_e, Le, tt) {
10625
+ const be = re;
10626
+ if (!_e) return (function(ye, Le, tt) {
10602
10627
  const rt = new BigInt64Array(tt);
10603
10628
  let lt = 0, hi = 0n;
10604
10629
  for (let Et = 0; Et < Le; Et++) {
10605
- const Ut = Number(_e[Et]), Ht = Ci(_e[Et + Le]);
10630
+ const Ut = Number(ye[Et]), Ht = Ci(ye[Et + Le]);
10606
10631
  for (let yt = 0; yt < Ut; yt++) hi += Ht, rt[lt++] = hi;
10607
10632
  }
10608
10633
  return rt;
10609
- })(se, xe.runs, xe.numRleValues);
10610
- Te = ef(se = ld(se, xe.runs, xe.numRleValues));
10634
+ })(se, be.runs, be.numRleValues);
10635
+ Te = ef(se = ld(se, be.runs, be.numRleValues));
10611
10636
  } else Te = ef(se);
10612
10637
  break;
10613
10638
  case He.RLE:
10614
- Te = (function(xe, _e, Le) {
10639
+ Te = (function(be, ye, Le) {
10615
10640
  if (Le === void 0) {
10616
10641
  Le = 0;
10617
- for (let lt = 0; lt < _e; lt++) Le += Number(xe[lt]);
10642
+ for (let lt = 0; lt < ye; lt++) Le += Number(be[lt]);
10618
10643
  }
10619
10644
  const tt = new BigInt64Array(Le);
10620
10645
  let rt = 0;
10621
- for (let lt = 0; lt < _e; lt++) {
10622
- const hi = Number(xe[lt]);
10623
- let Et = xe[lt + _e];
10646
+ for (let lt = 0; lt < ye; lt++) {
10647
+ const hi = Number(be[lt]);
10648
+ let Et = be[lt + ye];
10624
10649
  Et = Ci(Et), tt.fill(Et, rt, rt + hi), rt += hi;
10625
10650
  }
10626
10651
  return tt;
10627
10652
  })(se, re.runs, re.numRleValues);
10628
10653
  break;
10629
10654
  case He.NONE:
10630
- Te = (function(xe) {
10631
- const _e = new BigInt64Array(xe.length);
10632
- for (let Le = 0; Le < xe.length; Le++) _e[Le] = Ci(xe[Le]);
10633
- return _e;
10655
+ Te = (function(be) {
10656
+ const ye = new BigInt64Array(be.length);
10657
+ for (let Le = 0; Le < be.length; Le++) ye[Le] = Ci(be[Le]);
10658
+ return ye;
10634
10659
  })(se);
10635
10660
  break;
10636
10661
  default:
10637
10662
  throw new Error(`The specified Logical level technique is not supported: ${re.logicalLevelTechnique1}`);
10638
10663
  }
10639
- return ge ? Sa(Te, ge, 0n) : Te;
10664
+ return _e ? Sa(Te, _e, 0n) : Te;
10640
10665
  })(wa(ne, ie, le.numValues), le, ce);
10641
10666
  })(I, M, k, Y) : sf(I, M, k, Y);
10642
10667
  return new af(A.name, J, D);
@@ -11218,7 +11243,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
11218
11243
  function D_(r, e, i) {
11219
11244
  return new fe(r.x + (i - r.y) / (e.y - r.y) * (e.x - r.x), i);
11220
11245
  }
11221
- Ie("FeatureIndex", If, { omit: ["rawTileData", "sourceLayerCoder"] });
11246
+ Me("FeatureIndex", If, { omit: ["rawTileData", "sourceLayerCoder"] });
11222
11247
  class ms extends fe {
11223
11248
  constructor(e, i, s, o) {
11224
11249
  super(e, i), this.angle = s, o !== void 0 && (this.segment = o);
@@ -11295,26 +11320,26 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
11295
11320
  function Ff(r, e, i, s) {
11296
11321
  const o = [], l = r.image, u = l.pixelRatio, p = l.paddedRect.w - 2, g = l.paddedRect.h - 2;
11297
11322
  let m = { x1: r.left, y1: r.top, x2: r.right, y2: r.bottom };
11298
- const v = l.stretchX || [[0, p]], _ = l.stretchY || [[0, g]], T = (re, ge) => re + ge[1] - ge[0], b = v.reduce(T, 0), I = _.reduce(T, 0), M = p - b, A = g - I;
11323
+ const v = l.stretchX || [[0, p]], _ = l.stretchY || [[0, g]], T = (re, _e) => re + _e[1] - _e[0], b = v.reduce(T, 0), I = _.reduce(T, 0), M = p - b, A = g - I;
11299
11324
  let D = 0, L = b, k = 0, F = I, O = 0, j = M, Y = 0, J = A;
11300
11325
  if (l.content && s) {
11301
- const re = l.content, ge = re[2] - re[0], Te = re[3] - re[1];
11302
- (l.textFitWidth || l.textFitHeight) && (m = Dp(r)), D = zu(v, 0, re[0]), k = zu(_, 0, re[1]), L = zu(v, re[0], re[2]), F = zu(_, re[1], re[3]), O = re[0] - D, Y = re[1] - k, j = ge - L, J = Te - F;
11326
+ const re = l.content, _e = re[2] - re[0], Te = re[3] - re[1];
11327
+ (l.textFitWidth || l.textFitHeight) && (m = Dp(r)), D = zu(v, 0, re[0]), k = zu(_, 0, re[1]), L = zu(v, re[0], re[2]), F = zu(_, re[1], re[3]), O = re[0] - D, Y = re[1] - k, j = _e - L, J = Te - F;
11303
11328
  }
11304
- const ne = m.x1, ie = m.y1, le = m.x2 - ne, ce = m.y2 - ie, se = (re, ge, Te, xe) => {
11305
- const _e = ku(re.stretch - D, L, le, ne), Le = Ru(re.fixed - O, j, re.stretch, b), tt = ku(ge.stretch - k, F, ce, ie), rt = Ru(ge.fixed - Y, J, ge.stretch, I), lt = ku(Te.stretch - D, L, le, ne), hi = Ru(Te.fixed - O, j, Te.stretch, b), Et = ku(xe.stretch - k, F, ce, ie), Ut = Ru(xe.fixed - Y, J, xe.stretch, I), Ht = new fe(_e, tt), yt = new fe(lt, tt), ni = new fe(lt, Et), bi = new fe(_e, Et), wi = new fe(Le / u, rt / u), ji = new fe(hi / u, Ut / u), di = e * Math.PI / 180;
11329
+ const ne = m.x1, ie = m.y1, le = m.x2 - ne, ce = m.y2 - ie, se = (re, _e, Te, be) => {
11330
+ const ye = ku(re.stretch - D, L, le, ne), Le = Ru(re.fixed - O, j, re.stretch, b), tt = ku(_e.stretch - k, F, ce, ie), rt = Ru(_e.fixed - Y, J, _e.stretch, I), lt = ku(Te.stretch - D, L, le, ne), hi = Ru(Te.fixed - O, j, Te.stretch, b), Et = ku(be.stretch - k, F, ce, ie), Ut = Ru(be.fixed - Y, J, be.stretch, I), Ht = new fe(ye, tt), yt = new fe(lt, tt), ni = new fe(lt, Et), bi = new fe(ye, Et), wi = new fe(Le / u, rt / u), ji = new fe(hi / u, Ut / u), di = e * Math.PI / 180;
11306
11331
  if (di) {
11307
11332
  const Xt = Math.sin(di), Tt = Math.cos(di), Ot = [Tt, -Xt, Xt, Tt];
11308
11333
  Ht._matMult(Ot), yt._matMult(Ot), bi._matMult(Ot), ni._matMult(Ot);
11309
11334
  }
11310
- const Ni = re.stretch + re.fixed, mr = ge.stretch + ge.fixed;
11311
- return { tl: Ht, tr: yt, bl: bi, br: ni, tex: { x: l.paddedRect.x + 1 + Ni, y: l.paddedRect.y + 1 + mr, w: Te.stretch + Te.fixed - Ni, h: xe.stretch + xe.fixed - mr }, writingMode: void 0, glyphOffset: [0, 0], sectionIndex: 0, pixelOffsetTL: wi, pixelOffsetBR: ji, minFontScaleX: j / u / le, minFontScaleY: J / u / ce, isSDF: i };
11335
+ const Ni = re.stretch + re.fixed, mr = _e.stretch + _e.fixed;
11336
+ return { tl: Ht, tr: yt, bl: bi, br: ni, tex: { x: l.paddedRect.x + 1 + Ni, y: l.paddedRect.y + 1 + mr, w: Te.stretch + Te.fixed - Ni, h: be.stretch + be.fixed - mr }, writingMode: void 0, glyphOffset: [0, 0], sectionIndex: 0, pixelOffsetTL: wi, pixelOffsetBR: ji, minFontScaleX: j / u / le, minFontScaleY: J / u / ce, isSDF: i };
11312
11337
  };
11313
11338
  if (s && (l.stretchX || l.stretchY)) {
11314
- const re = Bf(v, M, b), ge = Bf(_, A, I);
11339
+ const re = Bf(v, M, b), _e = Bf(_, A, I);
11315
11340
  for (let Te = 0; Te < re.length - 1; Te++) {
11316
- const xe = re[Te], _e = re[Te + 1];
11317
- for (let Le = 0; Le < ge.length - 1; Le++) o.push(se(xe, ge[Le], _e, ge[Le + 1]));
11341
+ const be = re[Te], ye = re[Te + 1];
11342
+ for (let Le = 0; Le < _e.length - 1; Le++) o.push(se(be, _e[Le], ye, _e[Le + 1]));
11318
11343
  }
11319
11344
  } else o.push(se({ fixed: 0, stretch: -1 }, { fixed: 0, stretch: -1 }, { fixed: 0, stretch: p + 1 }, { fixed: 0, stretch: g + 1 }));
11320
11345
  return o;
@@ -11338,7 +11363,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
11338
11363
  function Ru(r, e, i, s) {
11339
11364
  return r - e * i / s;
11340
11365
  }
11341
- Ie("Anchor", ms);
11366
+ Me("Anchor", ms);
11342
11367
  class Lu {
11343
11368
  constructor(e, i, s, o, l, u, p, g, m, v) {
11344
11369
  var _;
@@ -11536,28 +11561,28 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
11536
11561
  function B_(r, e, i, s, o, l, u, p, g, m, v, _) {
11537
11562
  let T = l.textMaxSize.evaluate(e, {});
11538
11563
  T === void 0 && (T = u);
11539
- const b = r.layers[0].layout, I = b.get("icon-offset").evaluate(e, {}, v), M = Nf(i.horizontal), A = u / 24, D = r.tilePixelRatio * A, L = r.tilePixelRatio * T / 24, k = r.tilePixelRatio * p, F = r.tilePixelRatio * b.get("symbol-spacing"), O = b.get("text-padding") * r.tilePixelRatio, j = (function(Te, xe, _e, Le = 1) {
11540
- const tt = Te.get("icon-padding").evaluate(xe, {}, _e), rt = tt?.values;
11564
+ const b = r.layers[0].layout, I = b.get("icon-offset").evaluate(e, {}, v), M = Nf(i.horizontal), A = u / 24, D = r.tilePixelRatio * A, L = r.tilePixelRatio * T / 24, k = r.tilePixelRatio * p, F = r.tilePixelRatio * b.get("symbol-spacing"), O = b.get("text-padding") * r.tilePixelRatio, j = (function(Te, be, ye, Le = 1) {
11565
+ const tt = Te.get("icon-padding").evaluate(be, {}, ye), rt = tt?.values;
11541
11566
  return [rt[0] * Le, rt[1] * Le, rt[2] * Le, rt[3] * Le];
11542
11567
  })(b, e, v, r.tilePixelRatio), Y = b.get("text-max-angle") / 180 * Math.PI, J = b.get("text-rotation-alignment") !== "viewport" && b.get("symbol-placement") !== "point", ne = b.get("icon-rotation-alignment") === "map" && b.get("symbol-placement") !== "point", ie = b.get("symbol-placement"), le = F / 2, ce = b.get("icon-text-fit");
11543
11568
  let se;
11544
11569
  s && ce !== "none" && (r.allowVerticalPlacement && i.vertical && (se = zp(s, i.vertical, ce, b.get("icon-text-fit-padding"), I, A)), M && (s = zp(s, M, ce, b.get("icon-text-fit-padding"), I, A)));
11545
- const re = v ? _.line.getGranularityForZoomLevel(v.z) : 1, ge = (Te, xe) => {
11546
- xe.x < 0 || xe.x >= Fe || xe.y < 0 || xe.y >= Fe || (function(_e, Le, tt, rt, lt, hi, Et, Ut, Ht, yt, ni, bi, wi, ji, di, Ni, mr, Xt, Tt, Ot, Ct, Yt, Dn, Cr, nc) {
11547
- const gs = _e.addToLineVertexArray(Le, tt);
11570
+ const re = v ? _.line.getGranularityForZoomLevel(v.z) : 1, _e = (Te, be) => {
11571
+ be.x < 0 || be.x >= Fe || be.y < 0 || be.y >= Fe || (function(ye, Le, tt, rt, lt, hi, Et, Ut, Ht, yt, ni, bi, wi, ji, di, Ni, mr, Xt, Tt, Ot, Ct, Yt, Dn, Cr, nc) {
11572
+ const gs = ye.addToLineVertexArray(Le, tt);
11548
11573
  let co, Aa, Da, za, Uf = 0, Gf = 0, $f = 0, Zf = 0, xd = -1, bd = -1;
11549
11574
  const zn = {};
11550
11575
  let qf = Zt("");
11551
- if (_e.allowVerticalPlacement && rt.vertical) {
11576
+ if (ye.allowVerticalPlacement && rt.vertical) {
11552
11577
  const Ti = Ut.layout.get("text-rotate").evaluate(Ct, {}, Cr) + 90;
11553
11578
  Da = new Lu(Ht, Le, yt, ni, bi, rt.vertical, wi, ji, di, Ti), Et && (za = new Lu(Ht, Le, yt, ni, bi, Et, mr, Xt, di, Ti));
11554
11579
  }
11555
11580
  if (lt) {
11556
11581
  const Ti = Ut.layout.get("icon-rotate").evaluate(Ct, {}), ar = Ut.layout.get("icon-text-fit") !== "none", uo = Ff(lt, Ti, Dn, ar), Dr = Et ? Ff(Et, Ti, Dn, ar) : void 0;
11557
11582
  Aa = new Lu(Ht, Le, yt, ni, bi, lt, mr, Xt, !1, Ti), Uf = 4 * uo.length;
11558
- const ho = _e.iconSizeData;
11583
+ const ho = ye.iconSizeData;
11559
11584
  let Kr = null;
11560
- ho.kind === "source" ? (Kr = [Cn * Ut.layout.get("icon-size").evaluate(Ct, {})], Kr[0] > us && Jt(`${_e.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)) : ho.kind === "composite" && (Kr = [Cn * Yt.compositeIconSizes[0].evaluate(Ct, {}, Cr), Cn * Yt.compositeIconSizes[1].evaluate(Ct, {}, Cr)], (Kr[0] > us || Kr[1] > us) && Jt(`${_e.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)), _e.addSymbols(_e.icon, uo, Kr, Ot, Tt, Ct, R.ax.none, Le, gs.lineStartIndex, gs.lineLength, -1, Cr), xd = _e.icon.placedSymbolArray.length - 1, Dr && (Gf = 4 * Dr.length, _e.addSymbols(_e.icon, Dr, Kr, Ot, Tt, Ct, R.ax.vertical, Le, gs.lineStartIndex, gs.lineLength, -1, Cr), bd = _e.icon.placedSymbolArray.length - 1);
11585
+ ho.kind === "source" ? (Kr = [Cn * Ut.layout.get("icon-size").evaluate(Ct, {})], Kr[0] > us && Jt(`${ye.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)) : ho.kind === "composite" && (Kr = [Cn * Yt.compositeIconSizes[0].evaluate(Ct, {}, Cr), Cn * Yt.compositeIconSizes[1].evaluate(Ct, {}, Cr)], (Kr[0] > us || Kr[1] > us) && Jt(`${ye.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)), ye.addSymbols(ye.icon, uo, Kr, Ot, Tt, Ct, R.ax.none, Le, gs.lineStartIndex, gs.lineLength, -1, Cr), xd = ye.icon.placedSymbolArray.length - 1, Dr && (Gf = 4 * Dr.length, ye.addSymbols(ye.icon, Dr, Kr, Ot, Tt, Ct, R.ax.vertical, Le, gs.lineStartIndex, gs.lineLength, -1, Cr), bd = ye.icon.placedSymbolArray.length - 1);
11561
11586
  }
11562
11587
  const Wf = Object.keys(rt.horizontal);
11563
11588
  for (const Ti of Wf) {
@@ -11568,15 +11593,15 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
11568
11593
  co = new Lu(Ht, Le, yt, ni, bi, ar, wi, ji, di, Dr);
11569
11594
  }
11570
11595
  const uo = ar.positionedLines.length === 1;
11571
- if ($f += jf(_e, Le, ar, hi, Ut, di, Ct, Ni, gs, rt.vertical ? R.ax.horizontal : R.ax.horizontalOnly, uo ? Wf : [Ti], zn, xd, Yt, Cr), uo) break;
11596
+ if ($f += jf(ye, Le, ar, hi, Ut, di, Ct, Ni, gs, rt.vertical ? R.ax.horizontal : R.ax.horizontalOnly, uo ? Wf : [Ti], zn, xd, Yt, Cr), uo) break;
11572
11597
  }
11573
- rt.vertical && (Zf += jf(_e, Le, rt.vertical, hi, Ut, di, Ct, Ni, gs, R.ax.vertical, ["vertical"], zn, bd, Yt, Cr));
11574
- const V_ = co ? co.boxStartIndex : _e.collisionBoxArray.length, j_ = co ? co.boxEndIndex : _e.collisionBoxArray.length, N_ = Da ? Da.boxStartIndex : _e.collisionBoxArray.length, U_ = Da ? Da.boxEndIndex : _e.collisionBoxArray.length, G_ = Aa ? Aa.boxStartIndex : _e.collisionBoxArray.length, $_ = Aa ? Aa.boxEndIndex : _e.collisionBoxArray.length, Z_ = za ? za.boxStartIndex : _e.collisionBoxArray.length, q_ = za ? za.boxEndIndex : _e.collisionBoxArray.length;
11598
+ rt.vertical && (Zf += jf(ye, Le, rt.vertical, hi, Ut, di, Ct, Ni, gs, R.ax.vertical, ["vertical"], zn, bd, Yt, Cr));
11599
+ const V_ = co ? co.boxStartIndex : ye.collisionBoxArray.length, j_ = co ? co.boxEndIndex : ye.collisionBoxArray.length, N_ = Da ? Da.boxStartIndex : ye.collisionBoxArray.length, U_ = Da ? Da.boxEndIndex : ye.collisionBoxArray.length, G_ = Aa ? Aa.boxStartIndex : ye.collisionBoxArray.length, $_ = Aa ? Aa.boxEndIndex : ye.collisionBoxArray.length, Z_ = za ? za.boxStartIndex : ye.collisionBoxArray.length, q_ = za ? za.boxEndIndex : ye.collisionBoxArray.length;
11575
11600
  let Ar = -1;
11576
11601
  const Fu = (Ti, ar) => Ti?.circleDiameter ? Math.max(Ti.circleDiameter, ar) : ar;
11577
11602
  Ar = Fu(co, Ar), Ar = Fu(Da, Ar), Ar = Fu(Aa, Ar), Ar = Fu(za, Ar);
11578
11603
  const Hf = Ar > -1 ? 1 : 0;
11579
- Hf && (Ar *= nc / qt), _e.glyphOffsetArray.length >= va.MAX_GLYPHS && Jt("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"), Ct.sortKey !== void 0 && _e.addToSortKeyRanges(_e.symbolInstances.length, Ct.sortKey);
11604
+ Hf && (Ar *= nc / qt), ye.glyphOffsetArray.length >= va.MAX_GLYPHS && Jt("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"), Ct.sortKey !== void 0 && ye.addToSortKeyRanges(ye.symbolInstances.length, Ct.sortKey);
11580
11605
  const W_ = Vf(Ut, Ct, Cr), [H_, X_] = (function(Ti, ar) {
11581
11606
  const uo = Ti.length, Dr = ar?.values;
11582
11607
  if (Dr?.length > 0) for (let ho = 0; ho < Dr.length; ho += 2) {
@@ -11584,28 +11609,28 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
11584
11609
  Ti.emplaceBack(R.aM[Dr[ho]], Kr[0], Kr[1]);
11585
11610
  }
11586
11611
  return [uo, Ti.length];
11587
- })(_e.textAnchorOffsets, W_);
11588
- _e.symbolInstances.emplaceBack(Le.x, Le.y, zn.right >= 0 ? zn.right : -1, zn.center >= 0 ? zn.center : -1, zn.left >= 0 ? zn.left : -1, zn.vertical || -1, xd, bd, qf, V_, j_, N_, U_, G_, $_, Z_, q_, yt, $f, Zf, Uf, Gf, Hf, 0, wi, Ar, H_, X_);
11589
- })(r, xe, Te, i, s, o, se, r.layers[0], r.collisionBoxArray, e.index, e.sourceLayerIndex, r.index, D, [O, O, O, O], J, g, k, j, ne, I, e, l, m, v, u);
11612
+ })(ye.textAnchorOffsets, W_);
11613
+ ye.symbolInstances.emplaceBack(Le.x, Le.y, zn.right >= 0 ? zn.right : -1, zn.center >= 0 ? zn.center : -1, zn.left >= 0 ? zn.left : -1, zn.vertical || -1, xd, bd, qf, V_, j_, N_, U_, G_, $_, Z_, q_, yt, $f, Zf, Uf, Gf, Hf, 0, wi, Ar, H_, X_);
11614
+ })(r, be, Te, i, s, o, se, r.layers[0], r.collisionBoxArray, e.index, e.sourceLayerIndex, r.index, D, [O, O, O, O], J, g, k, j, ne, I, e, l, m, v, u);
11590
11615
  };
11591
11616
  if (ie === "line") for (const Te of Ef(e.geometry, 0, 0, Fe, Fe)) {
11592
- const xe = oo(Te, re), _e = k_(xe, F, Y, i.vertical || M, s, 24, L, r.overscaling, Fe);
11593
- for (const Le of _e) M && O_(r, M.text, le, Le) || ge(xe, Le);
11617
+ const be = oo(Te, re), ye = k_(be, F, Y, i.vertical || M, s, 24, L, r.overscaling, Fe);
11618
+ for (const Le of ye) M && O_(r, M.text, le, Le) || _e(be, Le);
11594
11619
  }
11595
11620
  else if (ie === "line-center") {
11596
11621
  for (const Te of e.geometry) if (Te.length > 1) {
11597
- const xe = oo(Te, re), _e = z_(xe, Y, i.vertical || M, s, 24, L);
11598
- _e && ge(xe, _e);
11622
+ const be = oo(Te, re), ye = z_(be, Y, i.vertical || M, s, 24, L);
11623
+ ye && _e(be, ye);
11599
11624
  }
11600
11625
  } else if (e.type === "Polygon") for (const Te of zo(e.geometry, 0)) {
11601
- const xe = L_(Te, 16);
11602
- ge(oo(Te[0], re, !0), new ms(xe.x, xe.y, 0));
11626
+ const be = L_(Te, 16);
11627
+ _e(oo(Te[0], re, !0), new ms(be.x, be.y, 0));
11603
11628
  }
11604
11629
  else if (e.type === "LineString") for (const Te of e.geometry) {
11605
- const xe = oo(Te, re);
11606
- ge(xe, new ms(xe[0].x, xe[0].y, 0));
11630
+ const be = oo(Te, re);
11631
+ _e(be, new ms(be[0].x, be[0].y, 0));
11607
11632
  }
11608
- else if (e.type === "Point") for (const Te of e.geometry) for (const xe of Te) ge([xe], new ms(xe.x, xe.y, 0));
11633
+ else if (e.type === "Point") for (const Te of e.geometry) for (const be of Te) _e([be], new ms(be.x, be.y, 0));
11609
11634
  }
11610
11635
  function jf(r, e, i, s, o, l, u, p, g, m, v, _, T, b, I) {
11611
11636
  const M = (function(L, k, F, O, j, Y, J, ne) {
@@ -11613,16 +11638,16 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
11613
11638
  for (const ce of k.positionedLines) for (const se of ce.positionedGlyphs) {
11614
11639
  if (!se.rect) continue;
11615
11640
  const re = se.rect || {};
11616
- let ge = 4, Te = !0, xe = 1, _e = 0;
11641
+ let _e = 4, Te = !0, be = 1, ye = 0;
11617
11642
  const Le = (j || ne) && se.vertical, tt = se.metrics.advance * se.scale / 2;
11618
- if (ne && k.verticalizable && (_e = ce.lineOffset / 2 - (se.imageName ? -(qt - se.metrics.width * se.scale) / 2 : (se.scale - 1) * qt)), se.imageName) {
11643
+ if (ne && k.verticalizable && (ye = ce.lineOffset / 2 - (se.imageName ? -(qt - se.metrics.width * se.scale) / 2 : (se.scale - 1) * qt)), se.imageName) {
11619
11644
  const Xt = J[se.imageName];
11620
- Te = Xt.sdf, xe = Xt.pixelRatio, ge = 1 / xe;
11645
+ Te = Xt.sdf, be = Xt.pixelRatio, _e = 1 / be;
11621
11646
  }
11622
11647
  const rt = j ? [se.x + tt, se.y] : [0, 0];
11623
- let lt = j ? [0, 0] : [se.x + tt + F[0], se.y + F[1] - _e], hi = [0, 0];
11648
+ let lt = j ? [0, 0] : [se.x + tt + F[0], se.y + F[1] - ye], hi = [0, 0];
11624
11649
  Le && (hi = lt, lt = [0, 0]);
11625
- const Et = se.metrics.isDoubleResolution ? 2 : 1, Ut = (se.metrics.left - ge) * se.scale - tt + lt[0], Ht = (-se.metrics.top - ge) * se.scale + lt[1], yt = Ut + re.w / Et * se.scale / xe, ni = Ht + re.h / Et * se.scale / xe, bi = new fe(Ut, Ht), wi = new fe(yt, Ht), ji = new fe(Ut, ni), di = new fe(yt, ni);
11650
+ const Et = se.metrics.isDoubleResolution ? 2 : 1, Ut = (se.metrics.left - _e) * se.scale - tt + lt[0], Ht = (-se.metrics.top - _e) * se.scale + lt[1], yt = Ut + re.w / Et * se.scale / be, ni = Ht + re.h / Et * se.scale / be, bi = new fe(Ut, Ht), wi = new fe(yt, Ht), ji = new fe(Ut, ni), di = new fe(yt, ni);
11626
11651
  if (Le) {
11627
11652
  const Xt = new fe(-tt, tt - -17), Tt = -Math.PI / 2, Ot = 12 - tt, Ct = new fe(22 - Ot, -(se.imageName ? Ot : 0)), Yt = new fe(...hi);
11628
11653
  bi._rotateAround(Tt, Xt)._add(Ct)._add(Yt), wi._rotateAround(Tt, Xt)._add(Ct)._add(Yt), ji._rotateAround(Tt, Xt)._add(Ct)._add(Yt), di._rotateAround(Tt, Xt)._add(Ct)._add(Yt);
@@ -11653,7 +11678,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
11653
11678
  } else o[e] = [];
11654
11679
  return o[e].push(s), !1;
11655
11680
  }
11656
- R.$ = ac, R.A = jt, R.B = Yo, R.C = Qc, R.D = Ce, R.E = go, R.F = hr, R.G = function([r, e, i]) {
11681
+ R.$ = ac, R.A = jt, R.B = Yo, R.C = Qc, R.D = Ae, R.E = go, R.F = hr, R.G = function([r, e, i]) {
11657
11682
  return e += 90, e *= Math.PI / 180, i *= Math.PI / 180, { x: r * Math.cos(e) * Math.sin(i), y: r * Math.sin(e) * Math.sin(i), z: r * Math.cos(i) };
11658
11683
  }, R.H = Li, R.I = $h, R.J = pt, R.K = Hs, R.L = function(r) {
11659
11684
  if (Si == null) {
@@ -11784,7 +11809,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
11784
11809
  er(s) || (e.crossOrigin = "Anonymous"), o.src = s, e.appendChild(o);
11785
11810
  }
11786
11811
  }));
11787
- }, R.ac = ve, R.ad = function() {
11812
+ }, R.ac = xe, R.ad = function() {
11788
11813
  return xs++;
11789
11814
  }, R.ae = c, R.af = va, R.ag = rc, R.ah = js, R.ai = Yr, R.aj = Hp, R.ak = function(r) {
11790
11815
  const e = {};
@@ -11887,14 +11912,14 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
11887
11912
  }, R.b1 = function(r, e) {
11888
11913
  var i = e[0], s = e[1], o = e[2], l = i * i + s * s + o * o;
11889
11914
  return l > 0 && (l = 1 / Math.sqrt(l)), r[0] = e[0] * l, r[1] = e[1] * l, r[2] = e[2] * l, r;
11890
- }, R.b2 = ee, R.b3 = function(r, e) {
11915
+ }, R.b2 = te, R.b3 = function(r, e) {
11891
11916
  return r[0] * e[0] + r[1] * e[1] + r[2] * e[2];
11892
11917
  }, R.b4 = function(r, e, i) {
11893
11918
  return r[0] = e[0] * i[0], r[1] = e[1] * i[1], r[2] = e[2] * i[2], r[3] = e[3] * i[3], r;
11894
11919
  }, R.b5 = ys, R.b6 = function(r, e, i) {
11895
11920
  const s = e[0] * i[0] + e[1] * i[1] + e[2] * i[2];
11896
11921
  return s === 0 ? null : (-(r[0] * i[0] + r[1] * i[1] + r[2] * i[2]) - i[3]) / s;
11897
- }, R.b7 = Ae, R.b8 = function(r, e, i) {
11922
+ }, R.b7 = De, R.b8 = function(r, e, i) {
11898
11923
  return r[0] = e[0] * i, r[1] = e[1] * i, r[2] = e[2] * i, r[3] = e[3] * i, r;
11899
11924
  }, R.b9 = function(r, e) {
11900
11925
  return r[0] * e[0] + r[1] * e[1] + r[2] * e[2] + r[3];
@@ -11905,7 +11930,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
11905
11930
  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);
11906
11931
  var o, l, u, p, g, m, v;
11907
11932
  if (s === 0) return null;
11908
- const _ = ee([], [e[0], e[1], e[2]], [i[0], i[1], i[2]]), T = ee([], [i[0], i[1], i[2]], [r[0], r[1], r[2]]), b = ee([], [r[0], r[1], r[2]], [e[0], e[1], e[2]]), I = K([], _, -r[3]);
11933
+ 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]);
11909
11934
  return W(I, I, K([], T, -e[3])), W(I, I, K([], b, -i[3])), K(I, I, 1 / s), I;
11910
11935
  }, R.bD = Kh, R.bE = function() {
11911
11936
  return new Float64Array(4);
@@ -12159,7 +12184,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
12159
12184
  const s = [];
12160
12185
  for (const o in i) s.push(i[o]);
12161
12186
  return s;
12162
- }, R.cK = Ie, R.cL = Wp, R.cM = If, R.cN = Cp, R.cO = function(r) {
12187
+ }, R.cK = Me, R.cL = Wp, R.cM = If, R.cN = Cp, R.cO = function(r) {
12163
12188
  var e, i;
12164
12189
  r.bucket.createArrays(), r.bucket.tilePixelRatio = Fe / (512 * r.bucket.overscaling), r.bucket.compareText = {}, r.bucket.iconsNeedLinear = !1;
12165
12190
  const s = r.bucket.layers[0], o = s.layout, l = s._unevaluatedLayout._values, u = { layoutIconSize: l["icon-size"].possiblyEvaluate(new pt(r.bucket.zoom + 1), r.canonical), layoutTextSize: l["text-size"].possiblyEvaluate(new pt(r.bucket.zoom + 1), r.canonical), textMaxSize: l["text-size"].possiblyEvaluate(new pt(18)) };
@@ -12179,7 +12204,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
12179
12204
  const j = D.toString(), Y = o.get("text-letter-spacing").evaluate(_, {}, r.canonical) * qt, J = Ho(j) ? Y : 0, ne = o.get("text-anchor").evaluate(_, {}, r.canonical), ie = Vf(s, _, r.canonical);
12180
12205
  if (!ie) {
12181
12206
  const re = o.get("text-radial-offset").evaluate(_, {}, r.canonical);
12182
- k = re ? Of(ne, [re * qt, yd]) : o.get("text-offset").evaluate(_, {}, r.canonical).map(((ge) => ge * qt));
12207
+ k = re ? Of(ne, [re * qt, yd]) : o.get("text-offset").evaluate(_, {}, r.canonical).map(((_e) => _e * qt));
12183
12208
  }
12184
12209
  let le = g ? "center" : o.get("text-justify").evaluate(_, {}, r.canonical);
12185
12210
  const ce = o.get("symbol-placement") === "point" ? o.get("text-max-width").evaluate(_, {}, r.canonical) * qt : 1 / 0, se = () => {
@@ -12189,11 +12214,11 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
12189
12214
  const re = /* @__PURE__ */ new Set();
12190
12215
  if (le === "auto") for (let Te = 0; Te < ie.values.length; Te += 2) re.add(vd(ie.values[Te]));
12191
12216
  else re.add(le);
12192
- let ge = !1;
12193
- for (const Te of re) if (!A.horizontal[Te]) if (ge) A.horizontal[Te] = A.horizontal[0];
12217
+ let _e = !1;
12218
+ for (const Te of re) if (!A.horizontal[Te]) if (_e) A.horizontal[Te] = A.horizontal[0];
12194
12219
  else {
12195
- const xe = Iu(D, r.glyphMap, r.glyphPositions, r.imagePositions, T, ce, p, "center", Te, J, k, R.ax.horizontal, !1, I, b);
12196
- xe && (A.horizontal[Te] = xe, ge = xe.positionedLines.length === 1);
12220
+ const be = Iu(D, r.glyphMap, r.glyphPositions, r.imagePositions, T, ce, p, "center", Te, J, k, R.ax.horizontal, !1, I, b);
12221
+ be && (A.horizontal[Te] = be, _e = be.positionedLines.length === 1);
12197
12222
  }
12198
12223
  se();
12199
12224
  } else {
@@ -12270,8 +12295,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
12270
12295
  }, R.cj = function(r, e) {
12271
12296
  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];
12272
12297
  }, R.ck = function(r, e) {
12273
- 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], J = e[6], ne = e[7], ie = e[8], le = e[9], ce = e[10], se = e[11], re = e[12], ge = e[13], Te = e[14], xe = e[15];
12274
- return Math.abs(i - L) <= pe * Math.max(1, Math.abs(i), Math.abs(L)) && Math.abs(s - k) <= pe * Math.max(1, Math.abs(s), Math.abs(k)) && Math.abs(o - F) <= pe * Math.max(1, Math.abs(o), Math.abs(F)) && Math.abs(l - O) <= pe * Math.max(1, Math.abs(l), Math.abs(O)) && Math.abs(u - j) <= pe * Math.max(1, Math.abs(u), Math.abs(j)) && Math.abs(p - Y) <= pe * Math.max(1, Math.abs(p), Math.abs(Y)) && Math.abs(g - J) <= pe * Math.max(1, Math.abs(g), Math.abs(J)) && Math.abs(m - ne) <= pe * Math.max(1, Math.abs(m), Math.abs(ne)) && Math.abs(v - ie) <= pe * Math.max(1, Math.abs(v), Math.abs(ie)) && Math.abs(_ - le) <= pe * Math.max(1, Math.abs(_), Math.abs(le)) && Math.abs(T - ce) <= pe * Math.max(1, Math.abs(T), Math.abs(ce)) && Math.abs(b - se) <= pe * Math.max(1, Math.abs(b), Math.abs(se)) && Math.abs(I - re) <= pe * Math.max(1, Math.abs(I), Math.abs(re)) && Math.abs(M - ge) <= pe * Math.max(1, Math.abs(M), Math.abs(ge)) && Math.abs(A - Te) <= pe * Math.max(1, Math.abs(A), Math.abs(Te)) && Math.abs(D - xe) <= pe * Math.max(1, Math.abs(D), Math.abs(xe));
12298
+ 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], J = e[6], ne = e[7], ie = e[8], le = e[9], ce = e[10], se = e[11], re = e[12], _e = e[13], Te = e[14], be = e[15];
12299
+ return Math.abs(i - L) <= pe * Math.max(1, Math.abs(i), Math.abs(L)) && Math.abs(s - k) <= pe * Math.max(1, Math.abs(s), Math.abs(k)) && Math.abs(o - F) <= pe * Math.max(1, Math.abs(o), Math.abs(F)) && Math.abs(l - O) <= pe * Math.max(1, Math.abs(l), Math.abs(O)) && Math.abs(u - j) <= pe * Math.max(1, Math.abs(u), Math.abs(j)) && Math.abs(p - Y) <= pe * Math.max(1, Math.abs(p), Math.abs(Y)) && Math.abs(g - J) <= pe * Math.max(1, Math.abs(g), Math.abs(J)) && Math.abs(m - ne) <= pe * Math.max(1, Math.abs(m), Math.abs(ne)) && Math.abs(v - ie) <= pe * Math.max(1, Math.abs(v), Math.abs(ie)) && Math.abs(_ - le) <= pe * Math.max(1, Math.abs(_), Math.abs(le)) && Math.abs(T - ce) <= pe * Math.max(1, Math.abs(T), Math.abs(ce)) && Math.abs(b - se) <= pe * Math.max(1, Math.abs(b), Math.abs(se)) && Math.abs(I - re) <= pe * Math.max(1, Math.abs(I), Math.abs(re)) && Math.abs(M - _e) <= pe * Math.max(1, Math.abs(M), Math.abs(_e)) && Math.abs(A - Te) <= pe * Math.max(1, Math.abs(A), Math.abs(Te)) && Math.abs(D - be) <= pe * Math.max(1, Math.abs(D), Math.abs(be));
12275
12300
  }, R.cl = function(r, e) {
12276
12301
  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;
12277
12302
  }, 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) {
@@ -12387,17 +12412,17 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
12387
12412
  replace(W, K) {
12388
12413
  this._layerConfigs = {}, this._layers = {}, this.update(W, [], K);
12389
12414
  }
12390
- update(W, K, ee) {
12391
- for (const Ae of W) {
12392
- this._layerConfigs[Ae.id] = Ae;
12393
- const Ke = this._layers[Ae.id] = R.bT(Ae, ee);
12394
- Ke._featureFilter = R.ah(Ke.filter, ee), this.keyCache[Ae.id] && delete this.keyCache[Ae.id];
12415
+ update(W, K, te) {
12416
+ for (const De of W) {
12417
+ this._layerConfigs[De.id] = De;
12418
+ const Ke = this._layers[De.id] = R.bT(De, te);
12419
+ Ke._featureFilter = R.ah(Ke.filter, te), this.keyCache[De.id] && delete this.keyCache[De.id];
12395
12420
  }
12396
- for (const Ae of K) delete this.keyCache[Ae], delete this._layerConfigs[Ae], delete this._layers[Ae];
12421
+ for (const De of K) delete this.keyCache[De], delete this._layerConfigs[De], delete this._layers[De];
12397
12422
  this.familiesBySource = {};
12398
- const ye = R.cJ(Object.values(this._layerConfigs), this.keyCache);
12399
- for (const Ae of ye) {
12400
- const Ke = Ae.map(((St) => this._layers[St.id])), Be = Ke[0];
12423
+ const ve = R.cJ(Object.values(this._layerConfigs), this.keyCache);
12424
+ for (const De of ve) {
12425
+ const Ke = De.map(((St) => this._layers[St.id])), Be = Ke[0];
12401
12426
  if (Be.isHidden()) continue;
12402
12427
  const Ye = Be.source || "";
12403
12428
  let Ue = this.familiesBySource[Ye];
@@ -12410,17 +12435,17 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
12410
12435
  }
12411
12436
  class fe {
12412
12437
  constructor(W) {
12413
- const K = {}, ee = [];
12438
+ const K = {}, te = [];
12414
12439
  for (const Be in W) {
12415
12440
  const Ye = W[Be], Ue = K[Be] = {};
12416
12441
  for (const it in Ye) {
12417
12442
  const Fe = Ye[+it];
12418
12443
  if (!Fe || Fe.bitmap.width === 0 || Fe.bitmap.height === 0) continue;
12419
12444
  const St = { x: 0, y: 0, w: Fe.bitmap.width + 2, h: Fe.bitmap.height + 2 };
12420
- ee.push(St), Ue[it] = { rect: St, metrics: Fe.metrics };
12445
+ te.push(St), Ue[it] = { rect: St, metrics: Fe.metrics };
12421
12446
  }
12422
12447
  }
12423
- const { w: ye, h: Ae } = R.p(ee), Ke = new R.t({ width: ye || 1, height: Ae || 1 });
12448
+ const { w: ve, h: De } = R.p(te), Ke = new R.t({ width: ve || 1, height: De || 1 });
12424
12449
  for (const Be in W) {
12425
12450
  const Ye = W[Be];
12426
12451
  for (const Ue in Ye) {
@@ -12438,12 +12463,12 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
12438
12463
  constructor(W) {
12439
12464
  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 = [];
12440
12465
  }
12441
- parse(W, K, ee, ye, Ae) {
12466
+ parse(W, K, te, ve, De) {
12442
12467
  return R._(this, void 0, void 0, (function* () {
12443
12468
  this.status = "parsing", this.data = W, this.collisionBoxArray = new R.ae();
12444
12469
  const Ke = new R.cL(Object.keys(W.layers).sort()), Be = new R.cM(this.tileID, this.promoteId);
12445
12470
  Be.bucketLayerIDs = [];
12446
- const Ye = {}, Ue = { featureIndex: Be, iconDependencies: {}, patternDependencies: {}, glyphDependencies: {}, dashDependencies: {}, availableImages: ee, subdivisionGranularity: Ae }, it = K.familiesBySource[this.source];
12471
+ const Ye = {}, Ue = { featureIndex: Be, iconDependencies: {}, patternDependencies: {}, glyphDependencies: {}, dashDependencies: {}, availableImages: te, subdivisionGranularity: De }, it = K.familiesBySource[this.source];
12447
12472
  for (const Oe in it) {
12448
12473
  const Gt = W.layers[Oe];
12449
12474
  if (!Gt) continue;
@@ -12455,7 +12480,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
12455
12480
  }
12456
12481
  for (const Qt of it[Oe]) {
12457
12482
  const Si = Qt[0];
12458
- Si.source !== this.source && R.w(`layer.source = ${Si.source} does not equal this.source = ${this.source}`), Si.isHidden(this.zoom, !0) || (Kt(Qt, this.zoom, ee), (Ye[Si.id] = Si.createBucket({ index: Be.bucketLayerIDs.length, layers: Qt, zoom: this.zoom, pixelRatio: this.pixelRatio, overscaling: this.overscaling, collisionBoxArray: this.collisionBoxArray, sourceLayerIndex: Jt, sourceID: this.source })).populate(zi, Ue, this.tileID.canonical), Be.bucketLayerIDs.push(Qt.map(((tn) => tn.id))));
12483
+ Si.source !== this.source && R.w(`layer.source = ${Si.source} does not equal this.source = ${this.source}`), Si.isHidden(this.zoom, !0) || (Kt(Qt, this.zoom, te), (Ye[Si.id] = Si.createBucket({ index: Be.bucketLayerIDs.length, layers: Qt, zoom: this.zoom, pixelRatio: this.pixelRatio, overscaling: this.overscaling, collisionBoxArray: this.collisionBoxArray, sourceLayerIndex: Jt, sourceID: this.source })).populate(zi, Ue, this.tileID.canonical), Be.bucketLayerIDs.push(Qt.map(((tn) => tn.id))));
12459
12484
  }
12460
12485
  }
12461
12486
  const Fe = R.bY(Ue.glyphDependencies, ((Oe) => Object.keys(Oe).map(Number)));
@@ -12464,38 +12489,38 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
12464
12489
  let St = Promise.resolve({});
12465
12490
  if (Object.keys(Fe).length) {
12466
12491
  const Oe = new AbortController();
12467
- this.inFlightDependencies.push(Oe), St = ye.sendAsync({ type: "GG", data: { stacks: Fe, source: this.source, tileID: this.tileID, type: "glyphs" } }, Oe);
12492
+ this.inFlightDependencies.push(Oe), St = ve.sendAsync({ type: "GG", data: { stacks: Fe, source: this.source, tileID: this.tileID, type: "glyphs" } }, Oe);
12468
12493
  }
12469
12494
  const Pt = Object.keys(Ue.iconDependencies);
12470
12495
  let Qi = Promise.resolve({});
12471
12496
  if (Pt.length) {
12472
12497
  const Oe = new AbortController();
12473
- this.inFlightDependencies.push(Oe), Qi = ye.sendAsync({ type: "GI", data: { icons: Pt, source: this.source, tileID: this.tileID, type: "icons" } }, Oe);
12498
+ this.inFlightDependencies.push(Oe), Qi = ve.sendAsync({ type: "GI", data: { icons: Pt, source: this.source, tileID: this.tileID, type: "icons" } }, Oe);
12474
12499
  }
12475
12500
  const Gi = Object.keys(Ue.patternDependencies);
12476
12501
  let zr = Promise.resolve({});
12477
12502
  if (Gi.length) {
12478
12503
  const Oe = new AbortController();
12479
- this.inFlightDependencies.push(Oe), zr = ye.sendAsync({ type: "GI", data: { icons: Gi, source: this.source, tileID: this.tileID, type: "patterns" } }, Oe);
12504
+ this.inFlightDependencies.push(Oe), zr = ve.sendAsync({ type: "GI", data: { icons: Gi, source: this.source, tileID: this.tileID, type: "patterns" } }, Oe);
12480
12505
  }
12481
12506
  const Qr = Ue.dashDependencies;
12482
12507
  let vs = Promise.resolve({});
12483
12508
  if (Object.keys(Qr).length) {
12484
12509
  const Oe = new AbortController();
12485
- this.inFlightDependencies.push(Oe), vs = ye.sendAsync({ type: "GDA", data: { dashes: Qr } }, Oe);
12510
+ this.inFlightDependencies.push(Oe), vs = ve.sendAsync({ type: "GDA", data: { dashes: Qr } }, Oe);
12486
12511
  }
12487
12512
  const [fi, Rn, $i, xs] = yield Promise.all([St, Qi, zr, vs]), kr = new fe(fi), en = new R.cN(Rn, $i);
12488
12513
  for (const Oe in Ye) {
12489
12514
  const Gt = Ye[Oe];
12490
- Gt instanceof R.af ? (Kt(Gt.layers, this.zoom, ee), R.cO({ bucket: Gt, glyphMap: fi, glyphPositions: kr.positions, imageMap: Rn, imagePositions: en.iconPositions, showCollisionBoxes: this.showCollisionBoxes, canonical: this.tileID.canonical, subdivisionGranularity: Ue.subdivisionGranularity })) : Gt.hasDependencies && (Gt instanceof R.cP || Gt instanceof R.cQ || Gt instanceof R.cR) && (Kt(Gt.layers, this.zoom, ee), Gt.addFeatures(Ue, this.tileID.canonical, en.patternPositions, xs));
12515
+ Gt instanceof R.af ? (Kt(Gt.layers, this.zoom, te), R.cO({ bucket: Gt, glyphMap: fi, glyphPositions: kr.positions, imageMap: Rn, imagePositions: en.iconPositions, showCollisionBoxes: this.showCollisionBoxes, canonical: this.tileID.canonical, subdivisionGranularity: Ue.subdivisionGranularity })) : Gt.hasDependencies && (Gt instanceof R.cP || Gt instanceof R.cQ || Gt instanceof R.cR) && (Kt(Gt.layers, this.zoom, te), Gt.addFeatures(Ue, this.tileID.canonical, en.patternPositions, xs));
12491
12516
  }
12492
12517
  return this.status = "done", { buckets: Object.values(Ye).filter(((Oe) => !Oe.isEmpty())), featureIndex: Be, collisionBoxArray: this.collisionBoxArray, glyphAtlasImage: kr.image, imageAtlas: en, dashPositions: xs, glyphMap: this.returnDependencies ? fi : null, iconMap: this.returnDependencies ? Rn : null, glyphPositions: this.returnDependencies ? kr.positions : null };
12493
12518
  }));
12494
12519
  }
12495
12520
  }
12496
12521
  function Kt(Qe, W, K) {
12497
- const ee = new R.J(W);
12498
- for (const ye of Qe) ye.recalculate(ee, K);
12522
+ const te = new R.J(W);
12523
+ for (const ve of Qe) ve.recalculate(te, K);
12499
12524
  }
12500
12525
  class Ui {
12501
12526
  constructor() {
@@ -12546,16 +12571,16 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
12546
12571
  }
12547
12572
  }
12548
12573
  class Vt {
12549
- constructor(W, K, ee, ye, Ae) {
12550
- this.type = W, this.properties = ee || {}, this.extent = Ae, this.pointsArray = K, this.id = ye;
12574
+ constructor(W, K, te, ve, De) {
12575
+ this.type = W, this.properties = te || {}, this.extent = De, this.pointsArray = K, this.id = ve;
12551
12576
  }
12552
12577
  loadGeometry() {
12553
12578
  return this.pointsArray.map(((W) => W.map(((K) => new R.P(K.x, K.y)))));
12554
12579
  }
12555
12580
  }
12556
12581
  class Di {
12557
- constructor(W, K, ee) {
12558
- this.version = 2, this._myFeatures = W, this.name = K, this.length = W.length, this.extent = ee;
12582
+ constructor(W, K, te) {
12583
+ this.version = 2, this._myFeatures = W, this.name = K, this.length = W.length, this.extent = te;
12559
12584
  }
12560
12585
  feature(W) {
12561
12586
  return this._myFeatures[W];
@@ -12574,75 +12599,75 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
12574
12599
  return W.byteOffset === 0 && W.byteLength === W.buffer.byteLength || (W = new Uint8Array(W)), { vectorTile: Qe, rawData: W.buffer };
12575
12600
  }
12576
12601
  function pi(Qe, W, K) {
12577
- const { extent: ee } = Qe, ye = Math.pow(2, K.z - W.z), Ae = (K.x - W.x * ye) * ee, Ke = (K.y - W.y * ye) * ee, Be = [];
12602
+ const { extent: te } = Qe, ve = Math.pow(2, K.z - W.z), De = (K.x - W.x * ve) * te, Ke = (K.y - W.y * ve) * te, Be = [];
12578
12603
  for (let Ye = 0; Ye < Qe.length; Ye++) {
12579
12604
  const Ue = Qe.feature(Ye);
12580
12605
  let it = Ue.loadGeometry();
12581
- for (const St of it) for (const Pt of St) Pt.x = Pt.x * ye - Ae, Pt.y = Pt.y * ye - Ke;
12606
+ for (const St of it) for (const Pt of St) Pt.x = Pt.x * ve - De, Pt.y = Pt.y * ve - Ke;
12582
12607
  const Fe = 128;
12583
- it = R.cT(it, Ue.type, -Fe, -Fe, ee + Fe, ee + Fe), it.length !== 0 && Be.push(new Vt(Ue.type, it, Ue.properties, Ue.id, ee));
12608
+ it = R.cT(it, Ue.type, -Fe, -Fe, te + Fe, te + Fe), it.length !== 0 && Be.push(new Vt(Ue.type, it, Ue.properties, Ue.id, te));
12584
12609
  }
12585
- return new Di(Be, Qe.name, ee);
12610
+ return new Di(Be, Qe.name, te);
12586
12611
  }
12587
12612
  class pe {
12588
- constructor(W, K, ee) {
12589
- this.actor = W, this.layerIndex = K, this.availableImages = ee, this.tileState = new Ui(), this.overzoomedTileResultCache = new R.cU(1e3);
12613
+ constructor(W, K, te) {
12614
+ this.actor = W, this.layerIndex = K, this.availableImages = te, this.tileState = new Ui(), this.overzoomedTileResultCache = new R.cU(1e3);
12590
12615
  }
12591
12616
  loadVectorTile(W, K) {
12592
12617
  try {
12593
12618
  return { vectorTile: W.encoding !== "mlt" ? new R.cV(new R.cW(K)) : new R.cX(K), rawData: K };
12594
- } catch (ee) {
12595
- const ye = new Uint8Array(K);
12596
- let Ae = `Unable to parse the tile at ${W.request.url}, `;
12597
- throw Ae += ye[0] === 31 && ye[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(ee).message}`, new Error(Ae);
12619
+ } catch (te) {
12620
+ const ve = new Uint8Array(K);
12621
+ let De = `Unable to parse the tile at ${W.request.url}, `;
12622
+ throw De += 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(De);
12598
12623
  }
12599
12624
  }
12600
12625
  loadTile(W) {
12601
12626
  return R._(this, void 0, void 0, (function* () {
12602
- const { uid: K, overzoomParameters: ee } = W;
12603
- ee && (W.request = ee.overzoomRequest);
12604
- const ye = this._startRequestTiming(W), Ae = new mt(W);
12605
- this.tileState.startLoading(K, Ae);
12627
+ const { uid: K, overzoomParameters: te } = W;
12628
+ te && (W.request = te.overzoomRequest);
12629
+ const ve = this._startRequestTiming(W), De = new mt(W);
12630
+ this.tileState.startLoading(K, De);
12606
12631
  const Ke = new AbortController();
12607
- Ae.abort = Ke;
12632
+ De.abort = Ke;
12608
12633
  try {
12609
12634
  const Be = yield R.o(W.request, Ke);
12610
- if (W.etag && W.etag === Be.etag) return this.tileState.finishLoading(K), this._getEtagUnmodifiedResult(Be, ye);
12635
+ if (W.etag && W.etag === Be.etag) return this.tileState.finishLoading(K), this._getEtagUnmodifiedResult(Be, ve);
12611
12636
  const Ye = this.loadVectorTile(W, Be.data);
12612
12637
  if (this.tileState.finishLoading(K), !Ye) return null;
12613
12638
  let { vectorTile: Ue, rawData: it } = Ye;
12614
- ee && ({ vectorTile: Ue, rawData: it } = this._getOverzoomTile(W, Ue));
12615
- const Fe = this._getExpiryData(Be), St = this._finishRequestTiming(ye);
12616
- Ae.vectorTile = Ue, this.tileState.markLoaded(K, Ae);
12639
+ te && ({ vectorTile: Ue, rawData: it } = this._getOverzoomTile(W, Ue));
12640
+ const Fe = this._getExpiryData(Be), St = this._finishRequestTiming(ve);
12641
+ De.vectorTile = Ue, this.tileState.markLoaded(K, De);
12617
12642
  const Pt = { rawData: it, cacheControl: Fe, resourceTiming: St };
12618
12643
  this.tileState.setParsing(K, Pt);
12619
12644
  try {
12620
- return yield this._parseWorkerTile(Ae, W, Pt);
12645
+ return yield this._parseWorkerTile(De, W, Pt);
12621
12646
  } finally {
12622
12647
  this.tileState.clearParsing(K);
12623
12648
  }
12624
12649
  } catch (Be) {
12625
- throw this.tileState.finishLoading(K), Ae.status = "done", this.tileState.markLoaded(K, Ae), Be;
12650
+ throw this.tileState.finishLoading(K), De.status = "done", this.tileState.markLoaded(K, De), Be;
12626
12651
  }
12627
12652
  }));
12628
12653
  }
12629
12654
  _getEtagUnmodifiedResult(W, K) {
12630
- const ee = this._getExpiryData(W), ye = this._finishRequestTiming(K);
12631
- return R.e({ etagUnmodified: !0 }, ee, ye);
12655
+ const te = this._getExpiryData(W), ve = this._finishRequestTiming(K);
12656
+ return R.e({ etagUnmodified: !0 }, te, ve);
12632
12657
  }
12633
- _parseWorkerTile(W, K, ee) {
12658
+ _parseWorkerTile(W, K, te) {
12634
12659
  return R._(this, void 0, void 0, (function* () {
12635
- let ye = yield W.parse(W.vectorTile, this.layerIndex, this.availableImages, this.actor, K.subdivisionGranularity);
12636
- if (ee) {
12637
- const { rawData: Ae, cacheControl: Ke, resourceTiming: Be } = ee;
12638
- ye = R.e({ rawTileData: Ae.slice(0), encoding: K.encoding }, ye, Ke, Be);
12660
+ let ve = yield W.parse(W.vectorTile, this.layerIndex, this.availableImages, this.actor, K.subdivisionGranularity);
12661
+ if (te) {
12662
+ const { rawData: De, cacheControl: Ke, resourceTiming: Be } = te;
12663
+ ve = R.e({ rawTileData: De.slice(0), encoding: K.encoding }, ve, Ke, Be);
12639
12664
  }
12640
- return ye;
12665
+ return ve;
12641
12666
  }));
12642
12667
  }
12643
- _getExpiryData({ expires: W, cacheControl: K, etag: ee }) {
12644
- const ye = {};
12645
- return W && (ye.expires = W), K && (ye.cacheControl = K), ee && (ye.etag = ee), ye;
12668
+ _getExpiryData({ expires: W, cacheControl: K, etag: te }) {
12669
+ const ve = {};
12670
+ return W && (ve.expires = W), K && (ve.cacheControl = K), te && (ve.etag = te), ve;
12646
12671
  }
12647
12672
  _startRequestTiming(W) {
12648
12673
  var K;
@@ -12653,14 +12678,14 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
12653
12678
  return K ? { resourceTiming: JSON.parse(JSON.stringify(K)) } : {};
12654
12679
  }
12655
12680
  _getOverzoomTile(W, K) {
12656
- var ee;
12657
- const { tileID: ye, source: Ae, overzoomParameters: Ke } = W, { maxZoomTileID: Be } = Ke, Ye = `${Be.key}_${ye.key}_${(ee = W.request) === null || ee === void 0 ? void 0 : ee.url}`, Ue = this.overzoomedTileResultCache.get(Ye);
12681
+ var te;
12682
+ const { tileID: ve, source: De, overzoomParameters: Ke } = W, { maxZoomTileID: Be } = Ke, Ye = `${Be.key}_${ve.key}_${(te = W.request) === null || te === void 0 ? void 0 : te.url}`, Ue = this.overzoomedTileResultCache.get(Ye);
12658
12683
  if (Ue) return Ue;
12659
- const it = new Xe(), Fe = this.layerIndex.familiesBySource[Ae];
12684
+ const it = new Xe(), Fe = this.layerIndex.familiesBySource[De];
12660
12685
  for (const Pt in Fe) {
12661
12686
  const Qi = K.layers[Pt];
12662
12687
  if (!Qi) continue;
12663
- const Gi = pi(Qi, Be, ye.canonical);
12688
+ const Gi = pi(Qi, Be, ve.canonical);
12664
12689
  Gi.length > 0 && it.addLayer(Gi);
12665
12690
  }
12666
12691
  const St = lr(it);
@@ -12668,13 +12693,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
12668
12693
  }
12669
12694
  reloadTile(W) {
12670
12695
  return R._(this, void 0, void 0, (function* () {
12671
- const K = W.uid, ee = this.tileState.getLoaded(K);
12672
- if (!ee) throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");
12673
- if (ee.showCollisionBoxes = W.showCollisionBoxes, ee.status === "parsing") {
12674
- const ye = this.tileState.consumeParsing(K);
12675
- return yield this._parseWorkerTile(ee, W, ye);
12696
+ const K = W.uid, te = this.tileState.getLoaded(K);
12697
+ if (!te) throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");
12698
+ if (te.showCollisionBoxes = W.showCollisionBoxes, te.status === "parsing") {
12699
+ const ve = this.tileState.consumeParsing(K);
12700
+ return yield this._parseWorkerTile(te, W, ve);
12676
12701
  }
12677
- if (ee.status === "done" && ee.vectorTile) return yield this._parseWorkerTile(ee, W);
12702
+ if (te.status === "done" && te.vectorTile) return yield this._parseWorkerTile(te, W);
12678
12703
  }));
12679
12704
  }
12680
12705
  abortTile(W) {
@@ -12694,64 +12719,64 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
12694
12719
  }
12695
12720
  loadTile(W) {
12696
12721
  return R._(this, void 0, void 0, (function* () {
12697
- const { uid: K, encoding: ee, rawImageData: ye, redFactor: Ae, greenFactor: Ke, blueFactor: Be, baseShift: Ye } = W, Ue = ye.width + 2, it = ye.height + 2, Fe = R.b(ye) ? new R.R({ width: Ue, height: it }, yield R.cY(ye, -1, -1, Ue, it)) : ye, St = new R.cZ(K, Fe, ee, Ae, Ke, Be, Ye);
12722
+ const { uid: K, encoding: te, rawImageData: ve, redFactor: De, greenFactor: Ke, blueFactor: Be, baseShift: Ye } = W, Ue = ve.width + 2, it = ve.height + 2, Fe = R.b(ve) ? new R.R({ width: Ue, height: it }, yield R.cY(ve, -1, -1, Ue, it)) : ve, St = new R.cZ(K, Fe, te, De, Ke, Be, Ye);
12698
12723
  return this.loaded || (this.loaded = {}), this.loaded[K] = St, St;
12699
12724
  }));
12700
12725
  }
12701
12726
  removeTile(W) {
12702
- const K = this.loaded, ee = W.uid;
12703
- K?.[ee] && delete K[ee];
12727
+ const K = this.loaded, te = W.uid;
12728
+ K?.[te] && delete K[te];
12704
12729
  }
12705
12730
  }
12706
12731
  class Jr {
12707
- constructor(W, K, ee, ye = kn) {
12708
- this.actor = W, this.layerIndex = K, this.availableImages = ee, this.tileState = new Ui(), this._createGeoJSONIndex = ye;
12732
+ constructor(W, K, te, ve = kn) {
12733
+ this.actor = W, this.layerIndex = K, this.availableImages = te, this.tileState = new Ui(), this._createGeoJSONIndex = ve;
12709
12734
  }
12710
12735
  loadVectorTile(W) {
12711
12736
  if (!this._geoJSONIndex) throw new Error("Unable to parse the data into a cluster or geojson");
12712
- const { z: K, x: ee, y: ye } = W.tileID.canonical, Ae = this._geoJSONIndex.getTile(K, ee, ye);
12713
- return Ae ? lr(new R.c_(Ae.features, { version: 2, extent: R.a6 })) : null;
12737
+ const { z: K, x: te, y: ve } = W.tileID.canonical, De = this._geoJSONIndex.getTile(K, te, ve);
12738
+ return De ? lr(new R.c_(De.features, { version: 2, extent: R.a6 })) : null;
12714
12739
  }
12715
12740
  loadTile(W) {
12716
12741
  return R._(this, void 0, void 0, (function* () {
12717
- const { uid: K } = W, ee = new mt(W);
12718
- ee.abort = new AbortController();
12742
+ const { uid: K } = W, te = new mt(W);
12743
+ te.abort = new AbortController();
12719
12744
  try {
12720
- const ye = this.loadVectorTile(W);
12721
- if (!ye) return null;
12722
- const { vectorTile: Ae, rawData: Ke } = ye;
12723
- ee.vectorTile = Ae, this.tileState.markLoaded(K, ee);
12745
+ const ve = this.loadVectorTile(W);
12746
+ if (!ve) return null;
12747
+ const { vectorTile: De, rawData: Ke } = ve;
12748
+ te.vectorTile = De, this.tileState.markLoaded(K, te);
12724
12749
  const Be = { rawData: Ke };
12725
12750
  this.tileState.setParsing(K, Be);
12726
12751
  try {
12727
- return yield this._parseWorkerTile(ee, W, Be);
12752
+ return yield this._parseWorkerTile(te, W, Be);
12728
12753
  } finally {
12729
12754
  this.tileState.clearParsing(K);
12730
12755
  }
12731
- } catch (ye) {
12732
- throw ee.status = "done", this.tileState.markLoaded(K, ee), ye;
12756
+ } catch (ve) {
12757
+ throw te.status = "done", this.tileState.markLoaded(K, te), ve;
12733
12758
  }
12734
12759
  }));
12735
12760
  }
12736
12761
  _reloadLoadedTile(W) {
12737
12762
  return R._(this, void 0, void 0, (function* () {
12738
- const K = W.uid, ee = this.tileState.getLoaded(K);
12739
- if (!ee) throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");
12740
- if (ee.showCollisionBoxes = W.showCollisionBoxes, ee.status === "parsing") {
12741
- const ye = this.tileState.consumeParsing(K);
12742
- return yield this._parseWorkerTile(ee, W, ye);
12763
+ const K = W.uid, te = this.tileState.getLoaded(K);
12764
+ if (!te) throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");
12765
+ if (te.showCollisionBoxes = W.showCollisionBoxes, te.status === "parsing") {
12766
+ const ve = this.tileState.consumeParsing(K);
12767
+ return yield this._parseWorkerTile(te, W, ve);
12743
12768
  }
12744
- if (ee.status === "done" && ee.vectorTile) return yield this._parseWorkerTile(ee, W);
12769
+ if (te.status === "done" && te.vectorTile) return yield this._parseWorkerTile(te, W);
12745
12770
  }));
12746
12771
  }
12747
- _parseWorkerTile(W, K, ee) {
12772
+ _parseWorkerTile(W, K, te) {
12748
12773
  return R._(this, void 0, void 0, (function* () {
12749
- let ye = yield W.parse(W.vectorTile, this.layerIndex, this.availableImages, this.actor, K.subdivisionGranularity);
12750
- if (ee) {
12751
- const { rawData: Ae } = ee;
12752
- ye = R.e({ rawTileData: Ae.slice(0), encoding: "mvt" }, ye);
12774
+ let ve = yield W.parse(W.vectorTile, this.layerIndex, this.availableImages, this.actor, K.subdivisionGranularity);
12775
+ if (te) {
12776
+ const { rawData: De } = te;
12777
+ ve = R.e({ rawTileData: De.slice(0), encoding: "mvt" }, ve);
12753
12778
  }
12754
- return ye;
12779
+ return ve;
12755
12780
  }));
12756
12781
  }
12757
12782
  abortTile(W) {
@@ -12768,14 +12793,14 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
12768
12793
  return R._(this, void 0, void 0, (function* () {
12769
12794
  var K;
12770
12795
  (K = this._pendingRequest) === null || K === void 0 || K.abort();
12771
- const ee = this._startRequestTiming(W);
12796
+ const te = this._startRequestTiming(W);
12772
12797
  this._pendingRequest = new AbortController();
12773
12798
  try {
12774
12799
  yield this.loadAndProcessGeoJSON(W, this._pendingRequest), delete this._pendingRequest, this.tileState.clearLoaded();
12775
- const ye = {};
12776
- return W.request && (ye.data = W.data), this._finishRequestTiming(ee, W, ye), ye;
12777
- } catch (ye) {
12778
- if (delete this._pendingRequest, !R.$(ye)) throw ye;
12800
+ const ve = {};
12801
+ return W.request && (ve.data = W.data), this._finishRequestTiming(te, W, ve), ve;
12802
+ } catch (ve) {
12803
+ if (delete this._pendingRequest, !R.$(ve)) throw ve;
12779
12804
  return { abandoned: !0 };
12780
12805
  }
12781
12806
  }));
@@ -12784,31 +12809,31 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
12784
12809
  var K;
12785
12810
  if (!((K = W.request) === null || K === void 0) && K.collectResourceTiming) return new gr(W.request.url);
12786
12811
  }
12787
- _finishRequestTiming(W, K, ee) {
12788
- const ye = W?.finish();
12789
- ye && (ee.resourceTiming = { [K.source]: JSON.parse(JSON.stringify(ye)) });
12812
+ _finishRequestTiming(W, K, te) {
12813
+ const ve = W?.finish();
12814
+ ve && (te.resourceTiming = { [K.source]: JSON.parse(JSON.stringify(ve)) });
12790
12815
  }
12791
12816
  reloadTile(W) {
12792
12817
  return this.tileState.getLoaded(W.uid) ? this._reloadLoadedTile(W) : this.loadTile(W);
12793
12818
  }
12794
12819
  loadAndProcessGeoJSON(W, K) {
12795
12820
  return R._(this, void 0, void 0, (function* () {
12796
- var ee;
12821
+ var te;
12797
12822
  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));
12798
- if (W.dataDiff) return (ee = this._geoJSONIndex) !== null && ee !== void 0 || (this._geoJSONIndex = this._createGeoJSONIndex({ type: "FeatureCollection", features: [] }, W)), void this._geoJSONIndex.updateData(W.dataDiff, this._getFilterPredicate(W.filter));
12823
+ 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));
12799
12824
  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.`);
12800
12825
  }));
12801
12826
  }
12802
12827
  _filterGeoJSON(W, K) {
12803
12828
  if (W.type !== "FeatureCollection") return W;
12804
- const ee = this._getFilterPredicate(K);
12805
- return ee ? { type: "FeatureCollection", features: W.features.filter(((ye) => ee(ye))) } : W;
12829
+ const te = this._getFilterPredicate(K);
12830
+ return te ? { type: "FeatureCollection", features: W.features.filter(((ve) => te(ve))) } : W;
12806
12831
  }
12807
12832
  _getFilterPredicate(W) {
12808
12833
  if (typeof W != "boolean" && !W?.length) return;
12809
12834
  const K = R.c$(W, { type: "boolean", "property-type": "data-driven", overridable: !1, transition: !1 });
12810
- if (K.result === "error") throw new Error(K.value.map(((ee) => `${ee.key}: ${ee.message}`)).join(", "));
12811
- return (ee) => K.value.evaluate({ zoom: 0 }, ee);
12835
+ if (K.result === "error") throw new Error(K.value.map(((te) => `${te.key}: ${te.message}`)).join(", "));
12836
+ return (te) => K.value.evaluate({ zoom: 0 }, te);
12812
12837
  }
12813
12838
  removeSource(W) {
12814
12839
  return R._(this, void 0, void 0, (function* () {
@@ -12832,54 +12857,54 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
12832
12857
  }
12833
12858
  function _s({ geojsonVtOptions: Qe, clusterProperties: W }) {
12834
12859
  if (!W || !Qe.clusterOptions) return Qe.clusterOptions;
12835
- const K = {}, ee = {}, ye = { accumulated: null, zoom: 0 }, Ae = { properties: null }, Ke = Object.keys(W);
12860
+ const K = {}, te = {}, ve = { accumulated: null, zoom: 0 }, De = { properties: null }, Ke = Object.keys(W);
12836
12861
  for (const Be of Ke) {
12837
12862
  const [Ye, Ue] = W[Be], it = R.c$(Ue), Fe = R.c$(typeof Ye == "string" ? [Ye, ["accumulated"], ["get", Be]] : Ye);
12838
- K[Be] = it.value, ee[Be] = Fe.value;
12863
+ K[Be] = it.value, te[Be] = Fe.value;
12839
12864
  }
12840
12865
  return Qe.clusterOptions.map = (Be) => {
12841
- Ae.properties = Be;
12866
+ De.properties = Be;
12842
12867
  const Ye = {};
12843
- for (const Ue of Ke) Ye[Ue] = K[Ue].evaluate(ye, Ae);
12868
+ for (const Ue of Ke) Ye[Ue] = K[Ue].evaluate(ve, De);
12844
12869
  return Ye;
12845
12870
  }, Qe.clusterOptions.reduce = (Be, Ye) => {
12846
- Ae.properties = Ye;
12847
- for (const Ue of Ke) ye.accumulated = Be[Ue], Be[Ue] = ee[Ue].evaluate(ye, Ae);
12871
+ De.properties = Ye;
12872
+ for (const Ue of Ke) ve.accumulated = Be[Ue], Be[Ue] = te[Ue].evaluate(ve, De);
12848
12873
  }, Qe.clusterOptions;
12849
12874
  }
12850
12875
  class ys {
12851
12876
  constructor(W) {
12852
- 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, ee) => {
12877
+ 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) => {
12853
12878
  if (this.externalWorkerSourceTypes[K]) throw new Error(`Worker source with name "${K}" already registered.`);
12854
- this.externalWorkerSourceTypes[K] = ee;
12879
+ this.externalWorkerSourceTypes[K] = te;
12855
12880
  }, this.self.addProtocol = R.cH, this.self.removeProtocol = R.cI, this.self.registerRTLTextPlugin = (K) => {
12856
12881
  R.d1.setMethods(K);
12857
- }, this.self.makeRequest = R.m, this.actor.registerMessageHandler("LDT", ((K, ee) => this._getDEMWorkerSource(K, ee.source).loadTile(ee))), this.actor.registerMessageHandler("RDT", ((K, ee) => R._(this, void 0, void 0, (function* () {
12858
- this._getDEMWorkerSource(K, ee.source).removeTile(ee);
12859
- })))), this.actor.registerMessageHandler("GCEZ", ((K, ee) => R._(this, void 0, void 0, (function* () {
12860
- return this._getWorkerSource(K, ee.type, ee.source).getClusterExpansionZoom(ee);
12861
- })))), this.actor.registerMessageHandler("GCC", ((K, ee) => R._(this, void 0, void 0, (function* () {
12862
- return this._getWorkerSource(K, ee.type, ee.source).getClusterChildren(ee);
12863
- })))), this.actor.registerMessageHandler("GCL", ((K, ee) => R._(this, void 0, void 0, (function* () {
12864
- return this._getWorkerSource(K, ee.type, ee.source).getClusterLeaves(ee);
12865
- })))), this.actor.registerMessageHandler("LD", ((K, ee) => this._getWorkerSource(K, ee.type, ee.source).loadData(ee))), this.actor.registerMessageHandler("LT", ((K, ee) => this._getWorkerSource(K, ee.type, ee.source).loadTile(ee))), this.actor.registerMessageHandler("RT", ((K, ee) => this._getWorkerSource(K, ee.type, ee.source).reloadTile(ee))), this.actor.registerMessageHandler("AT", ((K, ee) => this._getWorkerSource(K, ee.type, ee.source).abortTile(ee))), this.actor.registerMessageHandler("RMT", ((K, ee) => this._getWorkerSource(K, ee.type, ee.source).removeTile(ee))), this.actor.registerMessageHandler("RS", ((K, ee) => R._(this, void 0, void 0, (function* () {
12866
- var ye, Ae;
12867
- if (!(!((Ae = (ye = this.workerSources[K]) === null || ye === void 0 ? void 0 : ye[ee.type]) === null || Ae === void 0) && Ae[ee.source])) return;
12868
- const Ke = this.workerSources[K][ee.type][ee.source];
12869
- delete this.workerSources[K][ee.type][ee.source], Ke.removeSource !== void 0 && Ke.removeSource(ee);
12882
+ }, 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* () {
12883
+ this._getDEMWorkerSource(K, te.source).removeTile(te);
12884
+ })))), this.actor.registerMessageHandler("GCEZ", ((K, te) => R._(this, void 0, void 0, (function* () {
12885
+ return this._getWorkerSource(K, te.type, te.source).getClusterExpansionZoom(te);
12886
+ })))), this.actor.registerMessageHandler("GCC", ((K, te) => R._(this, void 0, void 0, (function* () {
12887
+ return this._getWorkerSource(K, te.type, te.source).getClusterChildren(te);
12888
+ })))), this.actor.registerMessageHandler("GCL", ((K, te) => R._(this, void 0, void 0, (function* () {
12889
+ return this._getWorkerSource(K, te.type, te.source).getClusterLeaves(te);
12890
+ })))), 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* () {
12891
+ var ve, De;
12892
+ if (!(!((De = (ve = this.workerSources[K]) === null || ve === void 0 ? void 0 : ve[te.type]) === null || De === void 0) && De[te.source])) return;
12893
+ const Ke = this.workerSources[K][te.type][te.source];
12894
+ delete this.workerSources[K][te.type][te.source], Ke.removeSource !== void 0 && Ke.removeSource(te);
12870
12895
  })))), this.actor.registerMessageHandler("RM", ((K) => R._(this, void 0, void 0, (function* () {
12871
12896
  delete this.layerIndexes[K], delete this.availableImages[K], delete this.workerSources[K], delete this.demWorkerSources[K], this.globalStates.delete(K);
12872
- })))), this.actor.registerMessageHandler("SR", ((K, ee) => R._(this, void 0, void 0, (function* () {
12873
- this.referrer = ee;
12874
- })))), this.actor.registerMessageHandler("SRPS", ((K, ee) => this._syncRTLPluginState(K, ee))), this.actor.registerMessageHandler("IS", ((K, ee) => R._(this, void 0, void 0, (function* () {
12875
- this.self.importScripts(ee);
12876
- })))), this.actor.registerMessageHandler("SI", ((K, ee) => this._setImages(K, ee))), this.actor.registerMessageHandler("UL", ((K, ee) => R._(this, void 0, void 0, (function* () {
12877
- this._getLayerIndex(K).update(ee.layers, ee.removedIds, this._getGlobalState(K));
12878
- })))), this.actor.registerMessageHandler("UGS", ((K, ee) => R._(this, void 0, void 0, (function* () {
12879
- const ye = this._getGlobalState(K);
12880
- for (const Ae in ee) ye[Ae] = ee[Ae];
12881
- })))), this.actor.registerMessageHandler("SL", ((K, ee) => R._(this, void 0, void 0, (function* () {
12882
- this._getLayerIndex(K).replace(ee, this._getGlobalState(K));
12897
+ })))), this.actor.registerMessageHandler("SR", ((K, te) => R._(this, void 0, void 0, (function* () {
12898
+ this.referrer = te;
12899
+ })))), this.actor.registerMessageHandler("SRPS", ((K, te) => this._syncRTLPluginState(K, te))), this.actor.registerMessageHandler("IS", ((K, te) => R._(this, void 0, void 0, (function* () {
12900
+ this.self.importScripts(te);
12901
+ })))), this.actor.registerMessageHandler("SI", ((K, te) => this._setImages(K, te))), this.actor.registerMessageHandler("UL", ((K, te) => R._(this, void 0, void 0, (function* () {
12902
+ this._getLayerIndex(K).update(te.layers, te.removedIds, this._getGlobalState(K));
12903
+ })))), this.actor.registerMessageHandler("UGS", ((K, te) => R._(this, void 0, void 0, (function* () {
12904
+ const ve = this._getGlobalState(K);
12905
+ for (const De in te) ve[De] = te[De];
12906
+ })))), this.actor.registerMessageHandler("SL", ((K, te) => R._(this, void 0, void 0, (function* () {
12907
+ this._getLayerIndex(K).replace(te, this._getGlobalState(K));
12883
12908
  }))));
12884
12909
  }
12885
12910
  _getGlobalState(W) {
@@ -12889,9 +12914,9 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
12889
12914
  _setImages(W, K) {
12890
12915
  return R._(this, void 0, void 0, (function* () {
12891
12916
  this.availableImages[W] = K;
12892
- for (const ee in this.workerSources[W]) {
12893
- const ye = this.workerSources[W][ee];
12894
- for (const Ae in ye) ye[Ae].availableImages = K;
12917
+ for (const te in this.workerSources[W]) {
12918
+ const ve = this.workerSources[W][te];
12919
+ for (const De in ve) ve[De].availableImages = K;
12895
12920
  }
12896
12921
  }));
12897
12922
  }
@@ -12908,26 +12933,26 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
12908
12933
  let K = this.layerIndexes[W];
12909
12934
  return K || (K = this.layerIndexes[W] = new h()), K;
12910
12935
  }
12911
- _getWorkerSource(W, K, ee) {
12912
- var ye, Ae;
12913
- if ((ye = this.workerSources)[W] || (ye[W] = {}), (Ae = this.workerSources[W])[K] || (Ae[K] = {}), !this.workerSources[W][K][ee]) {
12936
+ _getWorkerSource(W, K, te) {
12937
+ var ve, De;
12938
+ if ((ve = this.workerSources)[W] || (ve[W] = {}), (De = this.workerSources[W])[K] || (De[K] = {}), !this.workerSources[W][K][te]) {
12914
12939
  const Ke = { sendAsync: (Be, Ye) => (Be.targetMapId = W, this.actor.sendAsync(Be, Ye)) };
12915
12940
  switch (K) {
12916
12941
  case "vector":
12917
- this.workerSources[W][K][ee] = new pe(Ke, this._getLayerIndex(W), this._getAvailableImages(W));
12942
+ this.workerSources[W][K][te] = new pe(Ke, this._getLayerIndex(W), this._getAvailableImages(W));
12918
12943
  break;
12919
12944
  case "geojson":
12920
- this.workerSources[W][K][ee] = new Jr(Ke, this._getLayerIndex(W), this._getAvailableImages(W));
12945
+ this.workerSources[W][K][te] = new Jr(Ke, this._getLayerIndex(W), this._getAvailableImages(W));
12921
12946
  break;
12922
12947
  default:
12923
- this.workerSources[W][K][ee] = new this.externalWorkerSourceTypes[K](Ke, this._getLayerIndex(W), this._getAvailableImages(W));
12948
+ this.workerSources[W][K][te] = new this.externalWorkerSourceTypes[K](Ke, this._getLayerIndex(W), this._getAvailableImages(W));
12924
12949
  }
12925
12950
  }
12926
- return this.workerSources[W][K][ee];
12951
+ return this.workerSources[W][K][te];
12927
12952
  }
12928
12953
  _getDEMWorkerSource(W, K) {
12929
- var ee, ye;
12930
- return (ee = this.demWorkerSources)[W] || (ee[W] = {}), (ye = this.demWorkerSources[W])[K] || (ye[K] = new jt()), this.demWorkerSources[W][K];
12954
+ var te, ve;
12955
+ return (te = this.demWorkerSources)[W] || (te[W] = {}), (ve = this.demWorkerSources[W])[K] || (ve[K] = new jt()), this.demWorkerSources[W][K];
12931
12956
  }
12932
12957
  }
12933
12958
  return R.i(self) && (self.worker = new ys(self)), ys;
@@ -13255,10 +13280,10 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
13255
13280
  W[d] = t * Math.abs(t);
13256
13281
  }
13257
13282
  function K(d, t, n, a, c, f, y, x, w) {
13258
- for (let S = t; S < t + a; S++) ee(d, n * f + S, f, c, y, x, w);
13259
- for (let S = n; S < n + c; S++) ee(d, S * f + t, 1, a, y, x, w);
13283
+ for (let S = t; S < t + a; S++) te(d, n * f + S, f, c, y, x, w);
13284
+ for (let S = n; S < n + c; S++) te(d, S * f + t, 1, a, y, x, w);
13260
13285
  }
13261
- function ee(d, t, n, a, c, f, y) {
13286
+ function te(d, t, n, a, c, f, y) {
13262
13287
  f[0] = 0, y[0] = -Qe, y[1] = Qe, c[0] = d[t];
13263
13288
  for (let x = 1, w = 0, S = 0; x < a; x++) {
13264
13289
  c[x] = d[t + x * n];
@@ -13276,8 +13301,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
13276
13301
  }
13277
13302
  }
13278
13303
  W[255] = -Qe;
13279
- const ye = h.v.layout_symbol["text-font"].default.join(",");
13280
- class Ae {
13304
+ const ve = h.v.layout_symbol["text-font"].default.join(",");
13305
+ class De {
13281
13306
  constructor(t, n, a) {
13282
13307
  this.requestManager = t, this.localIdeographFontFamily = n, this.entries = {}, this.lang = a;
13283
13308
  }
@@ -13307,7 +13332,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
13307
13332
  var a;
13308
13333
  const c = this.entries[t], f = Math.floor(n / 256);
13309
13334
  if (c.ranges[f]) return { stack: t, id: n, glyph: null };
13310
- (a = c.requests)[f] || (a[f] = Ae.loadGlyphRange(t, f, this.url, this.requestManager));
13335
+ (a = c.requests)[f] || (a[f] = De.loadGlyphRange(t, f, this.url, this.requestManager));
13311
13336
  try {
13312
13337
  const y = yield c.requests[f];
13313
13338
  for (const x in y) c.glyphs[+x] = y[+x];
@@ -13326,7 +13351,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
13326
13351
  return !!this.localIdeographFontFamily && h.r(t);
13327
13352
  }
13328
13353
  _drawGlyph(t, n, a) {
13329
- const c = n === ye && this.localIdeographFontFamily !== "" && this._charUsesLocalIdeographFontFamily(a), f = c ? "ideographTinySDF" : "tinySDF";
13354
+ const c = n === ve && this.localIdeographFontFamily !== "" && this._charUsesLocalIdeographFontFamily(a), f = c ? "ideographTinySDF" : "tinySDF";
13330
13355
  t[f] || (t[f] = this._createTinySDF(c ? this.localIdeographFontFamily : n));
13331
13356
  const y = t[f].draw(String.fromCodePoint(a)), x = /^\p{gc=Cf}+$/u.test(String.fromCodePoint(a));
13332
13357
  return { id: a, bitmap: new h.t({ width: y.width || 60, height: y.height || 60 }, y.data), metrics: { width: x ? 0 : y.glyphWidth / 2 || 24, height: y.glyphHeight / 2 || 24, left: y.glyphLeft / 2 + 0.5 || 0, top: y.glyphTop / 2 - 27.5 || -8, advance: x ? 0 : y.glyphAdvance / 2 || 24, isDoubleResolution: !0 } };
@@ -13335,7 +13360,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
13335
13360
  const n = t ? t.split(",") : [];
13336
13361
  n.push("sans-serif");
13337
13362
  const a = n.map(((c) => /[-\w]+/.test(c) ? c : `'${CSS.escape(c)}'`)).join(",");
13338
- return new Ae.TinySDF({ fontSize: 48, buffer: 6, radius: 16, cutoff: 0.25, fontFamily: a, fontWeight: this._fontWeight(n[0]), fontStyle: this._fontStyle(n[0]), lang: this.lang });
13363
+ return new De.TinySDF({ fontSize: 48, buffer: 6, radius: 16, cutoff: 0.25, fontFamily: a, fontWeight: this._fontWeight(n[0]), fontStyle: this._fontStyle(n[0]), lang: this.lang });
13339
13364
  }
13340
13365
  _fontStyle(t) {
13341
13366
  return /italic/i.test(t) ? "italic" : /oblique/i.test(t) ? "oblique" : "normal";
@@ -13354,7 +13379,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
13354
13379
  this.entries = {};
13355
13380
  }
13356
13381
  }
13357
- Ae.loadGlyphRange = function(d, t, n, a) {
13382
+ De.loadGlyphRange = function(d, t, n, a) {
13358
13383
  return h._(this, void 0, void 0, (function* () {
13359
13384
  const c = 256 * t, f = c + 255, y = yield a.transformRequest(n.replace("{fontstack}", d).replace("{range}", `${c}-${f}`), "Glyphs"), x = yield h.o(y, new AbortController());
13360
13385
  if (!x?.data) throw new Error(`Could not load glyph range. range: ${t}, ${c}-${f}`);
@@ -13362,7 +13387,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
13362
13387
  for (const S of h.q(x.data)) w[S.id] = S;
13363
13388
  return w;
13364
13389
  }));
13365
- }, Ae.TinySDF = class {
13390
+ }, De.TinySDF = class {
13366
13391
  constructor({ fontSize: d = 24, buffer: t = 3, radius: n = 8, cutoff: a = 0.25, fontFamily: c = "sans-serif", fontWeight: f = "normal", fontStyle: y = "normal", lang: x = null } = {}) {
13367
13392
  this.buffer = t, this.radius = n, this.cutoff = a, this.lang = x;
13368
13393
  const w = this.size = d + 4 * t, S = this._createCanvas(w), P = this.ctx = S.getContext("2d", { willReadFrequently: !0 });
@@ -13382,19 +13407,19 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
13382
13407
  $.fill(Qe, 0, C), N.fill(0, 0, C);
13383
13408
  let Z = 3;
13384
13409
  for (let q = 0; q < S; q++) {
13385
- let Q = (q + G) * P + G;
13386
- for (let oe = 0; oe < w; oe++, Z += 4, Q++) {
13410
+ let ee = (q + G) * P + G;
13411
+ for (let oe = 0; oe < w; oe++, Z += 4, ee++) {
13387
13412
  const ae = X.data[Z];
13388
13413
  if (ae === 0) continue;
13389
13414
  const me = W[ae];
13390
- $[Q] = Math.max(0, me), N[Q] = Math.max(0, -me);
13415
+ $[ee] = Math.max(0, me), N[ee] = Math.max(0, -me);
13391
13416
  }
13392
13417
  }
13393
13418
  K($, 0, 0, P, E, P, this.f, this.v, this.z), K(N, G, G, w, S, P, this.f, this.v, this.z);
13394
13419
  const U = 255 / this.radius, H = 255 * (1 - this.cutoff);
13395
13420
  for (let q = 0; q < C; q++) {
13396
- const Q = Math.sqrt($[q]) - Math.sqrt(N[q]);
13397
- z[q] = Math.round(H - U * Q);
13421
+ const ee = Math.sqrt($[q]) - Math.sqrt(N[q]);
13422
+ z[q] = Math.round(H - U * ee);
13398
13423
  }
13399
13424
  return B;
13400
13425
  }
@@ -14738,22 +14763,22 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
14738
14763
  if (d.renderWorldCopies && y.allowWorldCopies()) for (let U = 1; U <= 3; U++) X.push($(-U)), X.push($(U));
14739
14764
  for (X.push($(0)); X.length > 0; ) {
14740
14765
  const U = X.pop(), H = U.x, q = U.y;
14741
- let Q = U.fullyVisible;
14766
+ let ee = U.fullyVisible;
14742
14767
  const oe = { x: H, y: q, z: U.zoom }, ae = y.getTileBoundingVolume(oe, U.wrap, d.elevation, t);
14743
- if (!Q) {
14744
- const be = ue(n, ae, a);
14745
- if (be === 0) continue;
14746
- Q = be === 2;
14768
+ if (!ee) {
14769
+ const we = ue(n, ae, a);
14770
+ if (we === 0) continue;
14771
+ ee = we === 2;
14747
14772
  }
14748
14773
  const me = y.distanceToTile2d(c.x, c.y, oe, ae);
14749
14774
  let de = w;
14750
14775
  x && (de = (t.calculateTileZoom || ot)(d.zoom + h.ar(d.tileSize / t.tileSize), me, G, N, d.fov)), de = (t.roundZoom ? Math.round : Math.floor)(de), de = Math.max(0, de);
14751
- const Ee = Math.min(de, P);
14752
- if (U.wrap = y.getWrap(f, oe, U.wrap), U.zoom >= Ee) {
14776
+ const Ce = Math.min(de, P);
14777
+ if (U.wrap = y.getWrap(f, oe, U.wrap), U.zoom >= Ce) {
14753
14778
  if (U.zoom < S) continue;
14754
- const be = E - U.zoom, he = z[0] - 0.5 - (H << be), Pe = z[1] - 0.5 - (q << be), ke = t.reparseOverscaled ? Math.max(U.zoom, de) : U.zoom;
14779
+ const we = E - U.zoom, he = z[0] - 0.5 - (H << we), Pe = z[1] - 0.5 - (q << we), ke = t.reparseOverscaled ? Math.max(U.zoom, de) : U.zoom;
14755
14780
  Z.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 + Pe * Pe) });
14756
- } else for (let be = 0; be < 4; be++) X.push({ zoom: U.zoom + 1, x: (H << 1) + be % 2, y: (q << 1) + (be >> 1), wrap: U.wrap, fullyVisible: Q });
14781
+ } 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 });
14757
14782
  }
14758
14783
  return Z.sort(((U, H) => U.distanceSq - H.distanceSq)).map(((U) => U.tileID));
14759
14784
  }
@@ -14795,7 +14820,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
14795
14820
  const c = d.tileID;
14796
14821
  return !!d.selfFading || !d.hasData() && !!t.has(c) && (d.setSelfFadeLogic(n + a), !0);
14797
14822
  }
14798
- function ve(d, t) {
14823
+ function xe(d, t) {
14799
14824
  var n;
14800
14825
  d.needsHillshadePrepare = !0, d.needsTerrainPrepare = !0;
14801
14826
  let a = t.tileID.canonical.x - d.tileID.canonical.x;
@@ -14955,7 +14980,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
14955
14980
  for (const E of P) {
14956
14981
  if (!(!((x = f.neighboringTiles) === null || x === void 0) && x[E])) continue;
14957
14982
  const C = y.getTileById(E);
14958
- f.neighboringTiles[E].backfilled || ve(f, C), !((S = (w = C.neighboringTiles) === null || w === void 0 ? void 0 : w[f.tileID.key]) === null || S === void 0) && S.backfilled || ve(C, f);
14983
+ f.neighboringTiles[E].backfilled || xe(f, C), !((S = (w = C.neighboringTiles) === null || w === void 0 ? void 0 : w[f.tileID.key]) === null || S === void 0) && S.backfilled || xe(C, f);
14959
14984
  }
14960
14985
  })(t, this._inViewTiles), this._state.initializeTileState(t, this.map ? this.map.painter : null), t.aborted || this._source.fire(new h.n("data", { dataType: "source", tile: t, coord: t.tileID })));
14961
14986
  }
@@ -15367,13 +15392,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
15367
15392
  continue;
15368
15393
  }
15369
15394
  Z = !1;
15370
- const q = new h.P(H.anchorX, H.anchorY), Q = { getElevation: C, pitchedLabelPlaneMatrix: a, lineVertexArray: N, pitchWithMap: f, projectionCache: { projections: {}, offsets: {}, cachedAnchorPoint: void 0, anyProjectionOccluded: !1 }, transform: t.transform, tileAnchorPoint: q, unwrappedTileID: w, width: S, height: P, translation: E }, oe = Nn(H.anchorX, H.anchorY, Q);
15395
+ const q = new h.P(H.anchorX, H.anchorY), ee = { getElevation: C, pitchedLabelPlaneMatrix: a, lineVertexArray: N, pitchWithMap: f, projectionCache: { projections: {}, offsets: {}, cachedAnchorPoint: void 0, anyProjectionOccluded: !1 }, transform: t.transform, tileAnchorPoint: q, unwrappedTileID: w, width: S, height: P, translation: E }, oe = Nn(H.anchorX, H.anchorY, ee);
15371
15396
  if (!Ss(oe.point, V)) {
15372
15397
  cn(H.numGlyphs, G);
15373
15398
  continue;
15374
15399
  }
15375
- const ae = Ts(t.transform.cameraToCenterDistance, oe.signedDistanceFromCamera), me = h.ay(z, B, H), de = f ? me * t.transform.getPitchedTextCorrection(H.anchorX, H.anchorY, w) / ae : me * ae, Ee = jn({ projectionContext: Q, pitchedLabelPlaneMatrixInverse: c, symbol: H, fontSize: de, flip: !1, keepUpright: y, glyphOffsetArray: d.glyphOffsetArray, dynamicLayoutVertexArray: G, aspectRatio: X, rotateToLine: x });
15376
- Z = Ee.useVertical, (Ee.notEnoughRoom || Z || Ee.needsFlipping && jn({ projectionContext: Q, pitchedLabelPlaneMatrixInverse: c, symbol: H, fontSize: de, flip: !0, keepUpright: y, glyphOffsetArray: d.glyphOffsetArray, dynamicLayoutVertexArray: G, aspectRatio: X, rotateToLine: x }).notEnoughRoom) && cn(H.numGlyphs, G);
15400
+ const ae = Ts(t.transform.cameraToCenterDistance, oe.signedDistanceFromCamera), me = h.ay(z, B, H), de = f ? me * t.transform.getPitchedTextCorrection(H.anchorX, H.anchorY, w) / ae : me * ae, Ce = jn({ projectionContext: ee, pitchedLabelPlaneMatrixInverse: c, symbol: H, fontSize: de, flip: !1, keepUpright: y, glyphOffsetArray: d.glyphOffsetArray, dynamicLayoutVertexArray: G, aspectRatio: X, rotateToLine: x });
15401
+ Z = Ce.useVertical, (Ce.notEnoughRoom || Z || Ce.needsFlipping && jn({ projectionContext: ee, pitchedLabelPlaneMatrixInverse: c, symbol: H, fontSize: de, flip: !0, keepUpright: y, glyphOffsetArray: d.glyphOffsetArray, dynamicLayoutVertexArray: G, aspectRatio: X, rotateToLine: x }).notEnoughRoom) && cn(H.numGlyphs, G);
15377
15402
  }
15378
15403
  n ? d.text.dynamicLayoutVertexBuffer.updateData(G) : d.icon.dynamicLayoutVertexBuffer.updateData(G);
15379
15404
  }
@@ -15474,8 +15499,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
15474
15499
  }
15475
15500
  X = H.mag();
15476
15501
  }
15477
- const q = H._mult((Z - $) / X)._add(V || N), Q = E + Math.atan2(G.y - N.y, G.x - N.x);
15478
- return U.push(q), { point: q, angle: w ? Q : 0, path: U };
15502
+ const q = H._mult((Z - $) / X)._add(V || N), ee = E + Math.atan2(G.y - N.y, G.x - N.x);
15503
+ return U.push(q), { point: q, angle: w ? ee : 0, path: U };
15479
15504
  }
15480
15505
  const hc = new Float32Array([-1 / 0, -1 / 0, 0, -1 / 0, -1 / 0, 0, -1 / 0, -1 / 0, 0, -1 / 0, -1 / 0, 0]);
15481
15506
  function cn(d, t) {
@@ -15509,30 +15534,30 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
15509
15534
  const V = [], G = new h.P(n.anchorX, n.anchorY), N = this.getPerspectiveRatio(G.x, G.y, y, B), $ = (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 }, Z = Vn($, c, n.lineOffsetX * $, n.lineOffsetY * $, !1, n, !1, X);
15510
15535
  let U = !1, H = !1, q = !0;
15511
15536
  if (Z) {
15512
- const Q = 0.5 * E * N + C, oe = new h.P(-100, -100), ae = new h.P(this.screenRightBoundary, this.screenBottomBoundary), me = new Ua(), de = Z.first, Ee = Z.last;
15513
- let be = [];
15514
- for (let ke = de.path.length - 1; ke >= 1; ke--) be.push(de.path[ke]);
15515
- for (let ke = 1; ke < Ee.path.length; ke++) be.push(Ee.path[ke]);
15516
- const he = 2.5 * Q;
15537
+ const ee = 0.5 * E * N + C, oe = new h.P(-100, -100), ae = new h.P(this.screenRightBoundary, this.screenBottomBoundary), me = new Ua(), de = Z.first, Ce = Z.last;
15538
+ let we = [];
15539
+ for (let ke = de.path.length - 1; ke >= 1; ke--) we.push(de.path[ke]);
15540
+ for (let ke = 1; ke < Ce.path.length; ke++) we.push(Ce.path[ke]);
15541
+ const he = 2.5 * ee;
15517
15542
  if (S) {
15518
- const ke = this.projectPathToScreenSpace(be, X);
15519
- be = ke.some(((st) => st.signedDistanceFromCamera <= 0)) ? [] : ke.map(((st) => st.point));
15543
+ const ke = this.projectPathToScreenSpace(we, X);
15544
+ we = ke.some(((st) => st.signedDistanceFromCamera <= 0)) ? [] : ke.map(((st) => st.point));
15520
15545
  }
15521
15546
  let Pe = [];
15522
- if (be.length > 0) {
15523
- const ke = be[0].clone(), st = be[0].clone();
15524
- for (let zt = 1; zt < be.length; zt++) ke.x = Math.min(ke.x, be[zt].x), ke.y = Math.min(ke.y, be[zt].y), st.x = Math.max(st.x, be[zt].x), st.y = Math.max(st.y, be[zt].y);
15525
- Pe = ke.x >= oe.x && st.x <= ae.x && ke.y >= oe.y && st.y <= ae.y ? [be] : st.x < oe.x || ke.x > ae.x || st.y < oe.y || ke.y > ae.y ? [] : h.aG([be], oe.x, oe.y, ae.x, ae.y);
15547
+ if (we.length > 0) {
15548
+ const ke = we[0].clone(), st = we[0].clone();
15549
+ for (let zt = 1; zt < we.length; zt++) ke.x = Math.min(ke.x, we[zt].x), ke.y = Math.min(ke.y, we[zt].y), st.x = Math.max(st.x, we[zt].x), st.y = Math.max(st.y, we[zt].y);
15550
+ Pe = ke.x >= oe.x && st.x <= ae.x && ke.y >= oe.y && st.y <= ae.y ? [we] : st.x < oe.x || ke.x > ae.x || st.y < oe.y || ke.y > ae.y ? [] : h.aG([we], oe.x, oe.y, ae.x, ae.y);
15526
15551
  }
15527
15552
  for (const ke of Pe) {
15528
- me.reset(ke, 0.25 * Q);
15553
+ me.reset(ke, 0.25 * ee);
15529
15554
  let st = 0;
15530
- st = me.length <= 0.5 * Q ? 1 : Math.ceil(me.paddedLength / he) + 1;
15555
+ st = me.length <= 0.5 * ee ? 1 : Math.ceil(me.paddedLength / he) + 1;
15531
15556
  for (let zt = 0; zt < st; zt++) {
15532
15557
  const ct = zt / Math.max(st - 1, 1), Rt = me.lerp(ct), Ft = Rt.x + It, oi = Rt.y + It;
15533
- V.push(Ft, oi, Q, 0);
15534
- const Mt = Ft - Q, yi = oi - Q, ii = Ft + Q, Zt = oi + Q;
15535
- if (q && (q = this.isOffscreen(Mt, yi, ii, Zt)), H || (H = this.isInsideGrid(Mt, yi, ii, Zt)), t !== "always" && this.grid.hitTestCircle(Ft, oi, Q, t, P) && (U = !0, !w)) return { circles: [], offscreen: !1, collisionDetected: U };
15558
+ V.push(Ft, oi, ee, 0);
15559
+ const Mt = Ft - ee, yi = oi - ee, ii = Ft + ee, Zt = oi + ee;
15560
+ if (q && (q = this.isOffscreen(Mt, yi, ii, Zt)), H || (H = this.isInsideGrid(Mt, yi, ii, Zt)), t !== "always" && this.grid.hitTestCircle(Ft, oi, ee, t, P) && (U = !0, !w)) return { circles: [], offscreen: !1, collisionDetected: U };
15536
15561
  }
15537
15562
  }
15538
15563
  }
@@ -15608,23 +15633,23 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
15608
15633
  let C = 1, z = 0, B = 0, V = 1;
15609
15634
  const G = t.anchorPointX + x[0], N = t.anchorPointY + x[1];
15610
15635
  if (y && !f) {
15611
- const be = this.projectAndGetPerspectiveRatio(G + 1, N, c, S, E), he = be.x - w.x, Pe = Math.atan((be.y - w.y) / he) + (he < 0 ? Math.PI : 0), ke = Math.sin(Pe), st = Math.cos(Pe);
15636
+ const we = this.projectAndGetPerspectiveRatio(G + 1, N, c, S, E), he = we.x - w.x, Pe = Math.atan((we.y - w.y) / he) + (he < 0 ? Math.PI : 0), ke = Math.sin(Pe), st = Math.cos(Pe);
15612
15637
  C = st, z = ke, B = -ke, V = st;
15613
15638
  } else if (!y && f) {
15614
- const be = yr(this.transform);
15615
- C = be.vecEast[0], z = be.vecEast[1], B = be.vecSouth[0], V = be.vecSouth[1];
15639
+ const we = yr(this.transform);
15640
+ C = we.vecEast[0], z = we.vecEast[1], B = we.vecSouth[0], V = we.vecSouth[1];
15616
15641
  }
15617
15642
  let $ = w.x, X = w.y, Z = n;
15618
15643
  f && ($ = G, X = N, Z = Math.pow(2, -(this.transform.zoom - a.overscaledZ)), Z *= this.transform.getPitchedTextCorrection(G, N, c), P || (Z *= h.al(0.5 + w.signedDistanceFromCamera / this.transform.cameraToCenterDistance * 0.5, 0, 4))), P && ($ += C * P.x * Z + B * P.y * Z, X += z * P.x * Z + V * P.y * Z);
15619
- const U = t.x1 * Z, H = t.x2 * Z, q = (U + H) / 2, Q = t.y1 * Z, oe = t.y2 * Z, ae = (Q + oe) / 2, me = [{ offsetX: U, offsetY: Q }, { offsetX: q, offsetY: Q }, { offsetX: H, offsetY: Q }, { offsetX: H, offsetY: ae }, { offsetX: H, offsetY: oe }, { offsetX: q, offsetY: oe }, { offsetX: U, offsetY: oe }, { offsetX: U, offsetY: ae }];
15644
+ const U = t.x1 * Z, H = t.x2 * Z, q = (U + H) / 2, ee = t.y1 * Z, oe = t.y2 * Z, ae = (ee + oe) / 2, me = [{ 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 }];
15620
15645
  let de = [];
15621
- for (const { offsetX: be, offsetY: he } of me) de.push(new h.P($ + C * be + B * he, X + z * be + V * he));
15622
- let Ee = !1;
15646
+ for (const { offsetX: we, offsetY: he } of me) de.push(new h.P($ + C * we + B * he, X + z * we + V * he));
15647
+ let Ce = !1;
15623
15648
  if (f) {
15624
- const be = de.map(((he) => this.projectAndGetPerspectiveRatio(he.x, he.y, c, S, E)));
15625
- Ee = be.some(((he) => !he.isOccluded)), de = be.map(((he) => new h.P(he.x, he.y)));
15626
- } else Ee = !0;
15627
- return { box: h.aI(de), allPointsOccluded: !Ee };
15649
+ const we = de.map(((he) => this.projectAndGetPerspectiveRatio(he.x, he.y, c, S, E)));
15650
+ Ce = we.some(((he) => !he.isOccluded)), de = we.map(((he) => new h.P(he.x, he.y)));
15651
+ } else Ce = !0;
15652
+ return { box: h.aI(de), allPointsOccluded: !Ce };
15628
15653
  }
15629
15654
  }
15630
15655
  class pc {
@@ -15692,17 +15717,17 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
15692
15717
  }
15693
15718
  attemptAnchorPlacement(t, n, a, c, f, y, x, w, S, P, E, C, z, B, V, G, N, $, X, Z) {
15694
15719
  var U, H, q;
15695
- const Q = h.aM[t.textAnchor], oe = [t.textOffset0, t.textOffset1], ae = wo(Q, a, c, oe, f), me = this.collisionIndex.placeCollisionBox(n, C, w, S, P, x, y, G, E.predicate, X, ae, Z);
15720
+ const ee = h.aM[t.textAnchor], oe = [t.textOffset0, t.textOffset1], ae = wo(ee, a, c, oe, f), me = this.collisionIndex.placeCollisionBox(n, C, w, S, P, x, y, G, E.predicate, X, ae, Z);
15696
15721
  if ((!$ || this.collisionIndex.placeCollisionBox($, C, w, S, P, x, y, N, E.predicate, X, ae, Z).placeable) && me.placeable) {
15697
15722
  let de;
15698
15723
  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) && (de = this.prevPlacement.variableOffsets[z.crossTileID].anchor), z.crossTileID === 0) throw new Error("symbolInstance.crossTileID can't be 0");
15699
- return this.variableOffsets[z.crossTileID] = { textOffset: oe, width: a, height: c, anchor: Q, textBoxScale: f, prevAnchor: de }, this.markUsedJustification(B, Q, z, V), B.allowVerticalPlacement && (this.markUsedOrientation(B, V, z), this.placedOrientations[z.crossTileID] = V), { shift: ae, placedGlyphBoxes: me };
15724
+ return this.variableOffsets[z.crossTileID] = { textOffset: oe, width: a, height: c, anchor: ee, textBoxScale: f, prevAnchor: de }, this.markUsedJustification(B, ee, z, V), B.allowVerticalPlacement && (this.markUsedOrientation(B, V, z), this.placedOrientations[z.crossTileID] = V), { shift: ae, placedGlyphBoxes: me };
15700
15725
  }
15701
15726
  }
15702
15727
  placeLayerBucketPart(t, n, a) {
15703
- 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"), $ = N === "always", X = h.aN(f, "icon-overlap", "icon-allow-overlap"), Z = X === "always", U = f.get("text-rotation-alignment") === "map", H = f.get("text-pitch-alignment") === "map", q = f.get("icon-text-fit") !== "none", Q = f.get("symbol-z-order") === "viewport-y", oe = $ && (Z || !c.hasIconData() || G), ae = Z && ($ || !c.hasTextData() || V);
15728
+ 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"), $ = N === "always", X = h.aN(f, "icon-overlap", "icon-allow-overlap"), Z = 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);
15704
15729
  !c.collisionArrays && C && c.deserializeCollisionBoxes(C);
15705
- const me = this.retainedQueryData[c.bucketInstanceId].tileID, de = this._getTerrainElevationFunc(me), Ee = this.transform.getFastPathSimpleProjectionMatrix(me), be = (he, Pe, ke) => {
15730
+ const me = this.retainedQueryData[c.bucketInstanceId].tileID, de = this._getTerrainElevationFunc(me), Ce = this.transform.getFastPathSimpleProjectionMatrix(me), we = (he, Pe, ke) => {
15706
15731
  var st, zt;
15707
15732
  if (n[he.crossTileID]) return;
15708
15733
  if (E) return void (this.placements[he.crossTileID] = new fc(!1, !1, !1));
@@ -15724,7 +15749,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
15724
15749
  }, Oi = he.textAnchorOffsetStartIndex, Xi = he.textAnchorOffsetEndIndex;
15725
15750
  if (Xi === Oi) {
15726
15751
  const bt = (gt, Bt) => {
15727
- const wt = this.collisionIndex.placeCollisionBox(gt, N, P, me, w, H, U, y, B.predicate, de, void 0, Ee);
15752
+ const wt = this.collisionIndex.placeCollisionBox(gt, N, P, me, w, H, U, y, B.predicate, de, void 0, Ce);
15728
15753
  return wt?.placeable && (this.markUsedOrientation(c, Bt, he), this.placedOrientations[he.crossTileID] = Bt), wt;
15729
15754
  };
15730
15755
  fr((() => bt(li, h.ax.horizontal)), (() => {
@@ -15746,7 +15771,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
15746
15771
  }
15747
15772
  bt ? bt = null : Yr = N;
15748
15773
  }
15749
- return a && !Hr && (Hr = { box: this.collisionIndex.placeCollisionBox(li, "always", P, me, w, H, U, y, B.predicate, de, void 0, Ee).box, offscreen: !1, placeable: !1, occluded: !1 }), Hr;
15774
+ return a && !Hr && (Hr = { box: this.collisionIndex.placeCollisionBox(li, "always", P, me, w, H, U, y, B.predicate, de, void 0, Ce).box, offscreen: !1, placeable: !1, occluded: !1 }), Hr;
15750
15775
  };
15751
15776
  fr((() => gt(li, Pe.iconBox, h.ax.horizontal)), (() => {
15752
15777
  const wt = Pe.verticalTextBox;
@@ -15764,7 +15789,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
15764
15789
  Zt = this.collisionIndex.placeCollisionCircles(N, pr, c.lineVertexArray, c.glyphOffsetArray, fr, w, S, a, H, B.predicate, he.collisionCircleDiameter, Oi, y, de), Zt.circles.length && Zt.collisionDetected && !a && h.w("Collisions detected, but collision boxes are not shown"), ct = $ || Zt.circles.length > 0 && !Zt.collisionDetected, Ft && (Ft = Zt.offscreen);
15765
15790
  }
15766
15791
  if (Pe.iconFeatureIndex && (qr = Pe.iconFeatureIndex), Pe.iconBox) {
15767
- const pr = (fr) => this.collisionIndex.placeCollisionBox(fr, X, P, me, w, H, U, x, B.predicate, de, q && oi ? oi : void 0, Ee);
15792
+ const pr = (fr) => this.collisionIndex.placeCollisionBox(fr, X, P, me, w, H, U, x, B.predicate, de, q && oi ? oi : void 0, Ce);
15768
15793
  yi && yi.placeable && Pe.verticalIconBox ? (ai = pr(Pe.verticalIconBox), Rt = ai.placeable) : (ai = pr(Pe.iconBox), Rt = ai.placeable), Ft && (Ft = ai.offscreen);
15769
15794
  }
15770
15795
  const Pr = V || he.numHorizontalGlyphVertices === 0 && he.numVerticalGlyphVertices === 0, Wr = G || he.numIconVertices === 0;
@@ -15774,14 +15799,14 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
15774
15799
  if (c.bucketInstanceId === 0) throw new Error("bucket.bucketInstanceId can't be 0");
15775
15800
  this.placements[he.crossTileID] = new fc((ct || oe) && !ii?.occluded, (Rt || ae) && !ai?.occluded, Ft || c.justReloaded), n[he.crossTileID] = !0;
15776
15801
  };
15777
- if (Q) {
15802
+ if (ee) {
15778
15803
  if (t.symbolInstanceStart !== 0) throw new Error("bucket.bucketInstanceId should be 0");
15779
15804
  const he = c.getSortedSymbolIndexes(-this.transform.bearingInRadians);
15780
15805
  for (let Pe = he.length - 1; Pe >= 0; --Pe) {
15781
15806
  const ke = he[Pe];
15782
- be(c.symbolInstances.get(ke), c.collisionArrays[ke], ke);
15807
+ we(c.symbolInstances.get(ke), c.collisionArrays[ke], ke);
15783
15808
  }
15784
- } else for (let he = t.symbolInstanceStart; he < t.symbolInstanceEnd; he++) be(c.symbolInstances.get(he), c.collisionArrays[he], he);
15809
+ } else for (let he = t.symbolInstanceStart; he < t.symbolInstanceEnd; he++) we(c.symbolInstances.get(he), c.collisionArrays[he], he);
15785
15810
  c.justReloaded = !1;
15786
15811
  }
15787
15812
  storeCollisionData(t, n, a, c, f, y) {
@@ -15847,42 +15872,42 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
15847
15872
  const $ = t.symbolInstances.get(N), { numHorizontalGlyphVertices: X, numVerticalGlyphVertices: Z, crossTileID: U } = $;
15848
15873
  let H = this.opacities[U];
15849
15874
  a[U] ? H = x : H || (H = B, this.opacities[U] = H), a[U] = !0;
15850
- const q = $.numIconVertices > 0, Q = this.placedOrientations[$.crossTileID], oe = Q === h.ax.vertical, ae = Q === h.ax.horizontal || Q === h.ax.horizontalOnly;
15875
+ const q = $.numIconVertices > 0, ee = this.placedOrientations[$.crossTileID], oe = ee === h.ax.vertical, ae = ee === h.ax.horizontal || ee === h.ax.horizontalOnly;
15851
15876
  if (X > 0 || Z > 0) {
15852
15877
  const de = Wa(H.text);
15853
15878
  V(t.text, X, oe ? As : de), V(t.text, Z, ae ? As : de);
15854
- const Ee = H.text.isHidden(), be = [$.rightJustifiedTextSymbolIndex, $.centerJustifiedTextSymbolIndex, $.leftJustifiedTextSymbolIndex];
15855
- for (const ke of be) ke >= 0 && (t.text.placedSymbolArray.get(ke).hidden = Ee || oe ? 1 : 0);
15856
- $.verticalPlacedTextSymbolIndex >= 0 && (t.text.placedSymbolArray.get($.verticalPlacedTextSymbolIndex).hidden = Ee || ae ? 1 : 0);
15879
+ const Ce = H.text.isHidden(), we = [$.rightJustifiedTextSymbolIndex, $.centerJustifiedTextSymbolIndex, $.leftJustifiedTextSymbolIndex];
15880
+ for (const ke of we) ke >= 0 && (t.text.placedSymbolArray.get(ke).hidden = Ce || oe ? 1 : 0);
15881
+ $.verticalPlacedTextSymbolIndex >= 0 && (t.text.placedSymbolArray.get($.verticalPlacedTextSymbolIndex).hidden = Ce || ae ? 1 : 0);
15857
15882
  const he = this.variableOffsets[$.crossTileID];
15858
- he && this.markUsedJustification(t, he.anchor, $, Q);
15883
+ he && this.markUsedJustification(t, he.anchor, $, ee);
15859
15884
  const Pe = this.placedOrientations[$.crossTileID];
15860
15885
  Pe && (this.markUsedJustification(t, "left", $, Pe), this.markUsedOrientation(t, Pe, $));
15861
15886
  }
15862
15887
  if (q) {
15863
- const de = Wa(H.icon), Ee = !(z && $.verticalPlacedIconSymbolIndex && oe);
15864
- $.placedIconSymbolIndex >= 0 && (V(t.icon, $.numIconVertices, Ee ? de : As), t.icon.placedSymbolArray.get($.placedIconSymbolIndex).hidden = H.icon.isHidden()), $.verticalPlacedIconSymbolIndex >= 0 && (V(t.icon, $.numVerticalIconVertices, Ee ? As : de), t.icon.placedSymbolArray.get($.verticalPlacedIconSymbolIndex).hidden = H.icon.isHidden());
15888
+ const de = Wa(H.icon), Ce = !(z && $.verticalPlacedIconSymbolIndex && oe);
15889
+ $.placedIconSymbolIndex >= 0 && (V(t.icon, $.numIconVertices, Ce ? de : As), t.icon.placedSymbolArray.get($.placedIconSymbolIndex).hidden = H.icon.isHidden()), $.verticalPlacedIconSymbolIndex >= 0 && (V(t.icon, $.numVerticalIconVertices, Ce ? As : de), t.icon.placedSymbolArray.get($.verticalPlacedIconSymbolIndex).hidden = H.icon.isHidden());
15865
15890
  }
15866
15891
  const me = G?.has(N) ? G.get(N) : { text: null, icon: null };
15867
15892
  if (t.hasIconCollisionBoxData() || t.hasTextCollisionBoxData()) {
15868
15893
  const de = t.collisionArrays[N];
15869
15894
  if (de) {
15870
- let Ee = new h.P(0, 0);
15895
+ let Ce = new h.P(0, 0);
15871
15896
  if (de.textBox || de.verticalTextBox) {
15872
- let be = !0;
15897
+ let we = !0;
15873
15898
  if (P) {
15874
15899
  const he = this.variableOffsets[U];
15875
- he ? (Ee = wo(he.anchor, he.width, he.height, he.textOffset, he.textBoxScale), E && Ee._rotate(C ? -this.transform.bearingInRadians : this.transform.bearingInRadians)) : be = !1;
15900
+ he ? (Ce = wo(he.anchor, he.width, he.height, he.textOffset, he.textBoxScale), E && Ce._rotate(C ? -this.transform.bearingInRadians : this.transform.bearingInRadians)) : we = !1;
15876
15901
  }
15877
15902
  if (de.textBox || de.verticalTextBox) {
15878
15903
  let he;
15879
- de.textBox && (he = oe), de.verticalTextBox && (he = ae), $a(t.textCollisionBox.collisionVertexArray, H.text.placed, !be || he, me.text, Ee.x, Ee.y);
15904
+ de.textBox && (he = oe), de.verticalTextBox && (he = ae), $a(t.textCollisionBox.collisionVertexArray, H.text.placed, !we || he, me.text, Ce.x, Ce.y);
15880
15905
  }
15881
15906
  }
15882
15907
  if (de.iconBox || de.verticalIconBox) {
15883
- const be = !!(!ae && de.verticalIconBox);
15908
+ const we = !!(!ae && de.verticalIconBox);
15884
15909
  let he;
15885
- de.iconBox && (he = be), de.verticalIconBox && (he = !be), $a(t.iconCollisionBox.collisionVertexArray, H.icon.placed, he, me.icon, z ? Ee.x : 0, z ? Ee.y : 0);
15910
+ de.iconBox && (he = we), de.verticalIconBox && (he = !we), $a(t.iconCollisionBox.collisionVertexArray, H.icon.placed, he, me.icon, z ? Ce.x : 0, z ? Ce.y : 0);
15886
15911
  }
15887
15912
  }
15888
15913
  }
@@ -17319,21 +17344,21 @@ uniform ${P} ${E} u_${C};
17319
17344
  let $ = 0;
17320
17345
  const X = [], Z = [];
17321
17346
  for (let q = 0; q < 4; q++) {
17322
- const Q = h.b0([], C[q + N], C[q + G]), oe = h.b5(Q);
17323
- h.aZ(Q, Q, 1 / oe), X.push(oe), Z.push(Q);
17347
+ const ee = h.b0([], C[q + N], C[q + G]), oe = h.b5(ee);
17348
+ h.aZ(ee, ee, 1 / oe), X.push(oe), Z.push(ee);
17324
17349
  }
17325
17350
  for (let q = 0; q < 4; q++) {
17326
- const Q = h.b6(C[q + G], Z[q], B);
17327
- $ = Q !== null && Q >= 0 ? Math.max($, Q) : Math.max($, X[q]);
17328
- }
17329
- const U = (function(q, Q) {
17330
- const oe = h.b0([], q[Q[0]], q[Q[1]]), ae = h.b0([], q[Q[2]], q[Q[1]]), me = [0, 0, 0, 0];
17331
- return h.b1(me, h.b2([], oe, ae)), me[3] = -h.b3(me, q[Q[0]]), me;
17332
- })(C, z), H = (function(q, Q) {
17333
- const oe = h.b7(q), ae = h.b8([], q, 1 / oe), me = h.b0([], Q, h.aZ([], ae, h.b3(Q, ae))), de = h.b7(me);
17351
+ const ee = h.b6(C[q + G], Z[q], B);
17352
+ $ = ee !== null && ee >= 0 ? Math.max($, ee) : Math.max($, X[q]);
17353
+ }
17354
+ const U = (function(q, ee) {
17355
+ const oe = h.b0([], q[ee[0]], q[ee[1]]), ae = h.b0([], q[ee[2]], q[ee[1]]), me = [0, 0, 0, 0];
17356
+ return h.b1(me, h.b2([], oe, ae)), me[3] = -h.b3(me, q[ee[0]]), me;
17357
+ })(C, z), H = (function(q, ee) {
17358
+ const oe = h.b7(q), ae = h.b8([], q, 1 / oe), me = h.b0([], ee, h.aZ([], ae, h.b3(ee, ae))), de = h.b7(me);
17334
17359
  if (de > 0) {
17335
- const Ee = Math.sqrt(1 - ae[3] * ae[3]), be = h.aZ([], ae, -ae[3]), he = h.a_([], be, h.aZ([], me, Ee / de));
17336
- return h.b9(Q, he);
17360
+ const Ce = Math.sqrt(1 - ae[3] * ae[3]), we = h.aZ([], ae, -ae[3]), he = h.a_([], we, h.aZ([], me, Ce / de));
17361
+ return h.b9(ee, he);
17337
17362
  }
17338
17363
  return null;
17339
17364
  })(B, U);
@@ -17342,8 +17367,8 @@ uniform ${P} ${E} u_${C};
17342
17367
  $ = Math.min($, q);
17343
17368
  }
17344
17369
  for (let q = 0; q < 4; q++) {
17345
- const Q = Math.min($, X[q]);
17346
- C[q + N] = [C[q + G][0] + Z[q][0] * Q, C[q + G][1] + Z[q][1] * Q, C[q + G][2] + Z[q][2] * Q, 1];
17370
+ const ee = Math.min($, X[q]);
17371
+ C[q + N] = [C[q + G][0] + Z[q][0] * ee, C[q + G][1] + Z[q][1] * ee, C[q + G][2] + Z[q][2] * ee, 1];
17347
17372
  }
17348
17373
  })(w, y[0], c, f);
17349
17374
  const S = y.map(((C) => {
@@ -18271,8 +18296,8 @@ uniform ${P} ${E} u_${C};
18271
18296
  h.b1(G, G);
18272
18297
  const N = h.b2([], S[0], S[3]);
18273
18298
  h.b1(N, N), P.push(h.aZ([], z, w)), t.y >= (1 << t.z) / 2 && P.push(h.aZ([], kt(h.a6 / 2, 0, t.x, t.y, t.z), w)), t.y < (1 << t.z) / 2 && P.push(h.aZ([], kt(h.a6 / 2, h.a6, t.x, t.y, t.z), w));
18274
- const $ = Eo(z, P), X = Eo(V, P), Z = [-z[0], -z[1], -z[2], $.max], U = [z[0], z[1], z[2], -$.min], H = [-V[0], -V[1], -V[2], X.max], q = [V[0], V[1], V[2], -X.min], Q = [...G, 0], oe = [...N, 0], ae = [];
18275
- return t.y === 0 ? ae.push(h.bC(oe, Q, Z), h.bC(oe, Q, U)) : ae.push(h.bC(H, Q, Z), h.bC(H, Q, U), h.bC(H, oe, Z), h.bC(H, oe, U)), t.y === (1 << t.z) - 1 ? ae.push(h.bC(oe, Q, Z), h.bC(oe, Q, U)) : ae.push(h.bC(q, Q, Z), h.bC(q, Q, U), h.bC(q, oe, Z), h.bC(q, oe, U)), new Xn(ae, [Z, U, H, q, Q, oe], E, C);
18299
+ const $ = Eo(z, P), X = Eo(V, P), Z = [-z[0], -z[1], -z[2], $.max], U = [z[0], z[1], z[2], -$.min], H = [-V[0], -V[1], -V[2], X.max], q = [V[0], V[1], V[2], -X.min], ee = [...G, 0], oe = [...N, 0], ae = [];
18300
+ return t.y === 0 ? ae.push(h.bC(oe, ee, Z), h.bC(oe, ee, U)) : ae.push(h.bC(H, ee, Z), h.bC(H, ee, U), h.bC(H, oe, Z), h.bC(H, oe, U)), t.y === (1 << t.z) - 1 ? ae.push(h.bC(oe, ee, Z), h.bC(oe, ee, U)) : ae.push(h.bC(q, ee, Z), h.bC(q, ee, U), h.bC(q, oe, Z), h.bC(q, oe, U)), new Xn(ae, [Z, U, H, q, ee, oe], E, C);
18276
18301
  }
18277
18302
  }
18278
18303
  }
@@ -18635,8 +18660,8 @@ uniform ${P} ${E} u_${C};
18635
18660
  if (!X) return;
18636
18661
  Z = C, U = G;
18637
18662
  }
18638
- const H = Z / Math.PI * 180, q = U / Math.PI * 180, Q = this.center.lat;
18639
- this.setCenter(new h.W(H, h.al(q, -90, 90))), this.setZoom(this.zoom + Nt(Q, this.center.lat));
18663
+ const H = Z / Math.PI * 180, q = U / Math.PI * 180, ee = this.center.lat;
18664
+ this.setCenter(new h.W(H, h.al(q, -90, 90))), this.setZoom(this.zoom + Nt(ee, this.center.lat));
18640
18665
  }
18641
18666
  locationToScreenPoint(t, n) {
18642
18667
  const a = $t(t);
@@ -19068,7 +19093,7 @@ uniform ${P} ${E} u_${C};
19068
19093
  h.a_(z, E, [P[0] * C, P[1] * C, P[2] * C]);
19069
19094
  const B = h.b5(z) - 1, V = Math.exp(0.5 * -Math.max(B - 0.3, 0)), G = Li(n.worldSize, n.center.lat) / Math.min(n.width, n.height), N = h.bw(G, 0.9, 0.5, 1, 0.25), $ = (1 - h.ao(-y)) * Math.min(V, N), X = n.center.lat, Z = n.zoom, U = new h.W(n.center.lng + w * $, h.al(n.center.lat + S * $, -h.am, h.am));
19070
19095
  n.setLocationAtPoint(c, a);
19071
- const H = n.center, q = h.bw(Math.abs(x), 45, 85, 0, 1), Q = h.bw(G, 0.75, 0.35, 0, 1), oe = Math.pow(Math.max(q, Q), 0.25), ae = h.bJ(H.lng, U.lng), me = h.bJ(H.lat, U.lat);
19096
+ const H = n.center, q = h.bw(Math.abs(x), 45, 85, 0, 1), ee = h.bw(G, 0.75, 0.35, 0, 1), oe = Math.pow(Math.max(q, ee), 0.25), ae = h.bJ(H.lng, U.lng), me = h.bJ(H.lat, U.lat);
19072
19097
  n.setCenter(new h.W(H.lng + ae * oe, H.lat + me * oe).wrap()), n.setZoom(Z + Nt(X, n.center.lat));
19073
19098
  }
19074
19099
  handleMapControlsPan(t, n, a) {
@@ -19104,7 +19129,7 @@ uniform ${P} ${E} u_${C};
19104
19129
  return P = G !== a, { easeFunc: (H) => {
19105
19130
  if (h.bn(y, x) || yc({ startEulerAngles: y, endEulerAngles: x, tr: t, k: H, useSlerp: y.roll != x.roll }), S && t.interpolatePadding(f, n.padding, H), n.around) h.w("Easing around a point is not supported under globe projection."), t.setLocationAtPoint(n.around, n.aroundPoint);
19106
19131
  else {
19107
- const q = $ > N ? Math.min(2, U) : Math.max(0.5, U), Q = Math.pow(q, 1 - H), oe = wc(c, X, Z, H * Q);
19132
+ const q = $ > N ? Math.min(2, U) : Math.max(0.5, U), ee = Math.pow(q, 1 - H), oe = wc(c, X, Z, H * ee);
19108
19133
  t.setCenter(oe.wrap());
19109
19134
  }
19110
19135
  if (P) {
@@ -19121,7 +19146,7 @@ uniform ${P} ${E} u_${C};
19121
19146
  const C = P.center;
19122
19147
  jr(t, C);
19123
19148
  const z = (function(Z, U, H) {
19124
- const q = $t(U), Q = $t(H), oe = h.b3(q, Q), ae = Math.acos(oe), me = bc(Z);
19149
+ const q = $t(U), ee = $t(H), oe = h.b3(q, ee), ae = Math.acos(oe), me = bc(Z);
19125
19150
  return ae / (2 * Math.PI) * me;
19126
19151
  })(t, c, C), B = f + Nt(c.lat, 0), V = S + Nt(C.lat, 0), G = h.ao(V - B);
19127
19152
  let N;
@@ -19131,9 +19156,9 @@ uniform ${P} ${E} u_${C};
19131
19156
  }
19132
19157
  const $ = h.bJ(c.lng, C.lng), X = h.bJ(c.lat, C.lat);
19133
19158
  return { easeFunc: (Z, U, H, q) => {
19134
- const Q = wc(c, $, X, H);
19159
+ const ee = wc(c, $, X, H);
19135
19160
  x && t.interpolatePadding(y, n.padding, Z);
19136
- const oe = Z === 1 ? C : Q;
19161
+ const oe = Z === 1 ? C : ee;
19137
19162
  t.setCenter(oe.wrap());
19138
19163
  const ae = B + h.ar(U);
19139
19164
  t.setZoom(Z === 1 ? S : ae + Nt(0, oe.lat));
@@ -19190,7 +19215,7 @@ uniform ${P} ${E} u_${C};
19190
19215
  }
19191
19216
  }, this.map = t, this.dispatcher = new vs(Qr(), t._getMapId()), this.dispatcher.registerMessageHandler("GG", ((y, x) => this.getGlyphs(y, x))), this.dispatcher.registerMessageHandler("GI", ((y, x) => this.getImages(y, x))), this.dispatcher.registerMessageHandler("GDA", ((y, x) => this.getDashes(y, x))), this.imageManager = new ys(), this.imageManager.setEventedParent(this);
19192
19217
  const f = ((a = t._container) === null || a === void 0 ? void 0 : a.lang) || typeof document < "u" && ((c = document.documentElement) === null || c === void 0 ? void 0 : c.lang) || void 0;
19193
- this.glyphManager = new Ae(t._requestManager, n.localIdeographFontFamily, f), this.lineAtlas = new Fe(256, 512), this.crossTileSymbolIndex = new Ii(), this._setInitialValues(), this._resetUpdates(), this.dispatcher.broadcast("SR", h.bO()), Fr().on(bs, this._rtlPluginLoaded), this.on("data", ((y) => {
19218
+ this.glyphManager = new De(t._requestManager, n.localIdeographFontFamily, f), this.lineAtlas = new Fe(256, 512), this.crossTileSymbolIndex = new Ii(), this._setInitialValues(), this._resetUpdates(), this.dispatcher.broadcast("SR", h.bO()), Fr().on(bs, this._rtlPluginLoaded), this.on("data", ((y) => {
19194
19219
  if (y.dataType !== "source" || y.sourceDataType !== "metadata") return;
19195
19220
  const x = this.tileManagers[y.sourceId];
19196
19221
  if (!x) return;
@@ -19299,8 +19324,8 @@ uniform ${P} ${E} u_${C};
19299
19324
  G[N] = {};
19300
19325
  const $ = Vt.getImageCanvasContext((yield V[N]).data), X = (yield B[N]).data;
19301
19326
  for (const Z in X) {
19302
- const { width: U, height: H, x: q, y: Q, sdf: oe, pixelRatio: ae, stretchX: me, stretchY: de, content: Ee, textFitWidth: be, textFitHeight: he } = X[Z];
19303
- G[N][Z] = { data: null, pixelRatio: ae, sdf: oe, stretchX: me, stretchY: de, content: Ee, textFitWidth: be, textFitHeight: he, spriteData: { width: U, height: H, x: q, y: Q, context: $ } };
19327
+ const { width: U, height: H, x: q, y: ee, sdf: oe, pixelRatio: ae, stretchX: me, stretchY: de, content: Ce, textFitWidth: we, textFitHeight: he } = X[Z];
19328
+ G[N][Z] = { data: null, pixelRatio: ae, sdf: oe, stretchX: me, stretchY: de, content: Ce, textFitWidth: we, textFitHeight: he, spriteData: { width: U, height: H, x: q, y: ee, context: $ } };
19304
19329
  }
19305
19330
  }
19306
19331
  return G;
@@ -19713,13 +19738,13 @@ uniform ${P} ${E} u_${C};
19713
19738
  for (const U in Z) {
19714
19739
  G[U] || (G[U] = []);
19715
19740
  const H = Z[U];
19716
- H.sort(((q, Q) => {
19741
+ H.sort(((q, ee) => {
19717
19742
  const oe = X.featureSortOrder;
19718
19743
  if (oe) {
19719
19744
  const ae = oe.indexOf(q.featureIndex);
19720
- return oe.indexOf(Q.featureIndex) - ae;
19745
+ return oe.indexOf(ee.featureIndex) - ae;
19721
19746
  }
19722
- return Q.featureIndex - q.featureIndex;
19747
+ return ee.featureIndex - q.featureIndex;
19723
19748
  }));
19724
19749
  for (const q of H) G[U].push(q);
19725
19750
  }
@@ -19971,15 +19996,15 @@ uniform ${P} ${E} u_${C};
19971
19996
  if (P.isContextLost()) return void (this.failedToCreate = !0);
19972
19997
  if (P.shaderSource(q, U), P.compileShader(q), !P.getShaderParameter(q, P.COMPILE_STATUS)) throw new Error(`Could not compile fragment shader: ${P.getShaderInfoLog(q)}`);
19973
19998
  P.attachShader(this.program, q);
19974
- const Q = P.createShader(P.VERTEX_SHADER);
19999
+ const ee = P.createShader(P.VERTEX_SHADER);
19975
20000
  if (P.isContextLost()) return void (this.failedToCreate = !0);
19976
- if (P.shaderSource(Q, H), P.compileShader(Q), !P.getShaderParameter(Q, P.COMPILE_STATUS)) throw new Error(`Could not compile vertex shader: ${P.getShaderInfoLog(Q)}`);
19977
- P.attachShader(this.program, Q), this.attributes = {};
20001
+ if (P.shaderSource(ee, H), P.compileShader(ee), !P.getShaderParameter(ee, P.COMPILE_STATUS)) throw new Error(`Could not compile vertex shader: ${P.getShaderInfoLog(ee)}`);
20002
+ P.attachShader(this.program, ee), this.attributes = {};
19978
20003
  const oe = {};
19979
20004
  this.numAttributes = z.length;
19980
20005
  for (let ae = 0; ae < this.numAttributes; ae++) z[ae] && (P.bindAttribLocation(this.program, ae, z[ae]), this.attributes[z[ae]] = ae);
19981
20006
  if (P.linkProgram(this.program), !P.getProgramParameter(this.program, P.LINK_STATUS)) throw new Error(`Program failed to link: ${P.getProgramInfoLog(this.program)}`);
19982
- P.deleteShader(Q), P.deleteShader(q);
20007
+ P.deleteShader(ee), P.deleteShader(q);
19983
20008
  for (const ae of X) if (ae && !oe[ae]) {
19984
20009
  const me = P.getUniformLocation(this.program, ae);
19985
20010
  me && (oe[ae] = me);
@@ -20585,8 +20610,8 @@ uniform ${P} ${E} u_${C};
20585
20610
  V.resize(4 * C), V._trim();
20586
20611
  let G = 0;
20587
20612
  for (const X of E) for (let Z = 0; Z < X.circleArray.length / 4; Z++) {
20588
- const U = 4 * Z, H = X.circleArray[U + 0], q = X.circleArray[U + 1], Q = X.circleArray[U + 2], oe = X.circleArray[U + 3];
20589
- V.emplace(G++, H, q, Q, oe, 0), V.emplace(G++, H, q, Q, oe, 1), V.emplace(G++, H, q, Q, oe, 2), V.emplace(G++, H, q, Q, oe, 3);
20613
+ const U = 4 * Z, H = X.circleArray[U + 0], q = X.circleArray[U + 1], ee = X.circleArray[U + 2], oe = X.circleArray[U + 3];
20614
+ V.emplace(G++, H, q, ee, oe, 0), V.emplace(G++, H, q, ee, oe, 1), V.emplace(G++, H, q, ee, oe, 2), V.emplace(G++, H, q, ee, oe, 3);
20590
20615
  }
20591
20616
  (!bn || bn.length < 2 * C) && (bn = (function(X) {
20592
20617
  const Z = 2 * X, U = new h.cc();
@@ -20632,7 +20657,7 @@ uniform ${P} ${E} u_${C};
20632
20657
  const X = new h.P(N.anchorX, N.anchorY), Z = { 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, Z) : at(X.x, X.y, Z), H = Ts(c.cameraToCenterDistance, U.signedDistanceFromCamera);
20633
20658
  let q = h.ay(d.textSizeData, x, N) * H / h.aJ;
20634
20659
  n && (q *= d.tilePixelRatio / y);
20635
- const { width: Q, height: oe, anchor: ae, textOffset: me, textBoxScale: de } = $, Ee = pl(ae, Q, oe, me, de, q), be = c.getPitchedTextCorrection(X.x + S[0], X.y + S[1], P), he = rh(U.point, Z, t, Ee, -c.bearingInRadians, be), Pe = d.allowVerticalPlacement && N.placedOrientation === h.ax.vertical ? Math.PI / 2 : 0;
20660
+ const { width: ee, height: oe, anchor: ae, textOffset: me, textBoxScale: de } = $, Ce = pl(ae, ee, oe, me, de, q), we = c.getPitchedTextCorrection(X.x + S[0], X.y + S[1], P), he = rh(U.point, Z, t, Ce, -c.bearingInRadians, we), Pe = d.allowVerticalPlacement && N.placedOrientation === h.ax.vertical ? Math.PI / 2 : 0;
20636
20661
  for (let ke = 0; ke < N.numGlyphs; ke++) h.aD(z, he, Pe);
20637
20662
  w && N.associatedIconIndex >= 0 && (V[N.associatedIconIndex] = { shiftedAnchor: he, angle: Pe });
20638
20663
  } else cn(N.numGlyphs, z);
@@ -20660,25 +20685,25 @@ uniform ${P} ${E} u_${C};
20660
20685
  var z, B;
20661
20686
  const V = d.context, G = V.gl, N = d.transform, $ = x === "map", X = w === "map", Z = x !== "viewport" && n.layout.get("symbol-placement") !== "point", U = $ && !X && !Z, H = !n.layout.get("symbol-sort-key").isConstant();
20662
20687
  let q = !1;
20663
- const Q = d.getDepthModeForSublayer(0, $e.ReadOnly), oe = n._unevaluatedLayout.hasValue("text-variable-anchor") || n._unevaluatedLayout.hasValue("text-variable-anchor-offset"), ae = [], me = N.getCircleRadiusCorrection();
20664
- for (const be of a) {
20665
- const he = t.getTile(be), Pe = he.getBucket(n);
20688
+ const ee = d.getDepthModeForSublayer(0, $e.ReadOnly), oe = n._unevaluatedLayout.hasValue("text-variable-anchor") || n._unevaluatedLayout.hasValue("text-variable-anchor-offset"), ae = [], me = N.getCircleRadiusCorrection();
20689
+ for (const we of a) {
20690
+ const he = t.getTile(we), Pe = he.getBucket(n);
20666
20691
  if (!Pe) continue;
20667
20692
  const ke = c ? Pe.text : Pe.icon;
20668
20693
  if (!ke?.segments.get().length || !ke.hasVisibleVertices) continue;
20669
- const st = ke.programConfigurations.get(n.id), zt = c || Pe.sdfIcons, ct = c ? Pe.textSizeData : Pe.iconSizeData, Rt = X || N.pitch !== 0, Ft = d.useProgram(nh(zt, c, Pe), st), oi = h.aw(ct, N.zoom), Mt = (z = d.style.map.terrain) === null || z === void 0 ? void 0 : z.getTerrainData(be);
20694
+ const st = ke.programConfigurations.get(n.id), zt = c || Pe.sdfIcons, ct = c ? Pe.textSizeData : Pe.iconSizeData, Rt = X || N.pitch !== 0, Ft = d.useProgram(nh(zt, c, Pe), st), oi = h.aw(ct, N.zoom), Mt = (z = d.style.map.terrain) === null || z === void 0 ? void 0 : z.getTerrainData(we);
20670
20695
  let yi, ii, Zt, ai, $r = [0, 0], Zr = null;
20671
20696
  if (c) ii = he.glyphAtlasTexture, Zt = G.LINEAR, yi = he.glyphAtlasTexture.size, Pe.iconsInText && ($r = he.imageAtlasTexture.size, Zr = he.imageAtlasTexture, ai = Rt || d.options.rotating || d.options.zooming || ct.kind === "composite" || ct.kind === "camera" ? G.LINEAR : G.NEAREST);
20672
20697
  else {
20673
20698
  const wt = n.layout.get("icon-size").constantOr(0) !== 1 || Pe.iconsNeedLinear;
20674
20699
  ii = he.imageAtlasTexture, Zt = zt || d.options.rotating || d.options.zooming || wt || Rt ? G.LINEAR : G.NEAREST, yi = he.imageAtlasTexture.size;
20675
20700
  }
20676
- const qr = h.aK(he, 1, d.transform.zoom), li = ki($, d.transform, qr), Pr = yo(X, $, d.transform, qr), Wr = h.aL(N, he, f, y), sa = N.getProjectionData({ overscaledTileID: be, applyGlobeMatrix: !C, applyTerrainMatrix: !0 }), pr = oe && Pe.hasTextData(), fr = n.layout.get("icon-text-fit") !== "none" && pr && Pe.hasIconData();
20701
+ const qr = h.aK(he, 1, d.transform.zoom), li = ki($, d.transform, qr), Pr = yo(X, $, d.transform, qr), Wr = h.aL(N, he, f, y), sa = N.getProjectionData({ overscaledTileID: we, applyGlobeMatrix: !C, applyTerrainMatrix: !0 }), pr = oe && Pe.hasTextData(), fr = n.layout.get("icon-text-fit") !== "none" && pr && Pe.hasIconData();
20677
20702
  if (Z) {
20678
20703
  const wt = h.O();
20679
20704
  Ne(wt, li);
20680
- const Mn = d.style.map.terrain ? (Ir, Bl) => d.style.map.terrain.getElevation(be, Ir, Bl) : null, oa = n.layout.get("text-rotation-alignment") === "map";
20681
- vo(Pe, d, c, li, wt, X, S, oa, be.toUnwrapped(), N.width, N.height, Wr, Mn);
20705
+ const Mn = d.style.map.terrain ? (Ir, Bl) => d.style.map.terrain.getElevation(we, Ir, Bl) : null, oa = n.layout.get("text-rotation-alignment") === "map";
20706
+ vo(Pe, d, c, li, wt, X, S, oa, we.toUnwrapped(), N.width, N.height, Wr, Mn);
20682
20707
  }
20683
20708
  const Oi = c && oe || fr, Xi = Z || Oi ? rs : X ? li : d.transform.clipSpaceToPixelsMatrix, bt = zt && n.paint.get(c ? "text-halo-width" : "icon-halo-width").constantOr(1) !== 0;
20684
20709
  let gt;
@@ -20690,17 +20715,17 @@ uniform ${P} ${E} u_${C};
20690
20715
  for (const Mn of wt) ae.push({ segments: new h.aV([Mn]), sortKey: Mn.sortKey, state: Bt, terrainData: Mt });
20691
20716
  } else ae.push({ segments: ke.segments, sortKey: 0, state: Bt, terrainData: Mt });
20692
20717
  }
20693
- q && ae.sort(((be, he) => be.sortKey - he.sortKey));
20694
- const de = (B = n.paint.get(c ? "text-halo-width" : "icon-halo-width").constantOr(null)) !== null && B !== void 0 ? B : 1 / 0, Ee = n.layout.get("text-letter-spacing").constantOr(0) * h.aJ < 0 || de > 1;
20695
- for (const be of ae) {
20696
- const he = be.state;
20718
+ q && ae.sort(((we, he) => we.sortKey - he.sortKey));
20719
+ const de = (B = n.paint.get(c ? "text-halo-width" : "icon-halo-width").constantOr(null)) !== null && B !== void 0 ? B : 1 / 0, Ce = n.layout.get("text-letter-spacing").constantOr(0) * h.aJ < 0 || de > 1;
20720
+ for (const we of ae) {
20721
+ const he = we.state;
20697
20722
  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));
20698
20723
  const Pe = he.isSDF && he.hasHalo;
20699
20724
  if (Pe) {
20700
20725
  const ke = he.uniformValues;
20701
- ke.u_is_halo = 1, Ee && (ke.u_is_plain = 0, Ns(he.buffers, be.segments, n, d, he.program, Q, P, E, ke, he.projectionData, be.terrainData), ke.u_is_halo = 0, ke.u_is_plain = 1);
20726
+ ke.u_is_halo = 1, Ce && (ke.u_is_plain = 0, Ns(he.buffers, we.segments, n, d, he.program, ee, P, E, ke, he.projectionData, we.terrainData), ke.u_is_halo = 0, ke.u_is_plain = 1);
20702
20727
  }
20703
- Ns(he.buffers, be.segments, n, d, he.program, Q, P, E, he.uniformValues, he.projectionData, be.terrainData), Pe && !Ee && (he.uniformValues.u_is_halo = 0);
20728
+ Ns(he.buffers, we.segments, n, d, he.program, ee, P, E, he.uniformValues, he.projectionData, we.terrainData), Pe && !Ce && (he.uniformValues.u_is_halo = 0);
20704
20729
  }
20705
20730
  }
20706
20731
  function Ns(d, t, n, a, c, f, y, x, w, S, P) {
@@ -20779,20 +20804,20 @@ uniform ${P} ${E} u_${C};
20779
20804
  y ? (V = C && !n.getPaintProperty("fill-outline-color") ? "fillOutlinePattern" : "fillOutline", B = S.LINES) : (V = C ? "fillPattern" : "fill", B = S.TRIANGLES);
20780
20805
  const H = E.constantOr(null);
20781
20806
  for (const q of a) {
20782
- const Q = t.getTile(q);
20783
- if (C && !Q.patternsLoaded()) continue;
20784
- const oe = Q.getBucket(n);
20807
+ const ee = t.getTile(q);
20808
+ if (C && !ee.patternsLoaded()) continue;
20809
+ const oe = ee.getBucket(n);
20785
20810
  if (!oe) continue;
20786
20811
  const ae = oe.programConfigurations.get(n.id), me = d.useProgram(V, ae), de = (w = d.style.map.terrain) === null || w === void 0 ? void 0 : w.getTerrainData(q);
20787
- C && (d.context.activeTexture.set(S.TEXTURE0), Q.imageAtlasTexture.bind(S.LINEAR, S.CLAMP_TO_EDGE), ae.updatePaintBuffers(z)), Ei(ae, P, H, Q, n);
20788
- const Ee = X.getProjectionData({ overscaledTileID: q, applyGlobeMatrix: !x, applyTerrainMatrix: !0 }), be = h.aL(X, Q, Z, U);
20812
+ C && (d.context.activeTexture.set(S.TEXTURE0), ee.imageAtlasTexture.bind(S.LINEAR, S.CLAMP_TO_EDGE), ae.updatePaintBuffers(z)), Ei(ae, P, H, ee, n);
20813
+ const Ce = X.getProjectionData({ overscaledTileID: q, applyGlobeMatrix: !x, applyTerrainMatrix: !0 }), we = h.aL(X, ee, Z, U);
20789
20814
  if (y) {
20790
20815
  N = oe.indexBuffer2, $ = oe.segments2;
20791
20816
  const Pe = [S.drawingBufferWidth, S.drawingBufferHeight];
20792
- G = V === "fillOutlinePattern" && C ? Ic(d, z, Q, Pe, be) : Pc(Pe, be);
20793
- } else N = oe.indexBuffer, $ = oe.segments, G = C ? Do(d, z, Q, be) : { u_fill_translate: be };
20817
+ G = V === "fillOutlinePattern" && C ? Ic(d, z, ee, Pe, we) : Pc(Pe, we);
20818
+ } else N = oe.indexBuffer, $ = oe.segments, G = C ? Do(d, z, ee, we) : { u_fill_translate: we };
20794
20819
  const he = d.stencilModeForClipping(q);
20795
- me.draw(d.context, B, c, he, f, Je.backCCW, G, de, Ee, n.id, oe.layoutVertexBuffer, N, $, n.paint, d.transform.zoom, ae);
20820
+ me.draw(d.context, B, c, he, f, Je.backCCW, G, de, Ce, n.id, oe.layoutVertexBuffer, N, $, n.paint, d.transform.zoom, ae);
20796
20821
  }
20797
20822
  }
20798
20823
  function ns(d, t, n, a, c, f, y, x) {
@@ -20803,10 +20828,10 @@ uniform ${P} ${E} u_${C};
20803
20828
  if (!Z) continue;
20804
20829
  const U = (w = d.style.map.terrain) === null || w === void 0 ? void 0 : w.getTerrainData($), H = Z.programConfigurations.get(n.id), q = d.useProgram(z ? "fillExtrusionPattern" : "fillExtrusion", H);
20805
20830
  z && (d.context.activeTexture.set(P.TEXTURE0), X.imageAtlasTexture.bind(P.LINEAR, P.CLAMP_TO_EDGE), H.updatePaintBuffers(B));
20806
- const Q = N.getProjectionData({ overscaledTileID: $, applyGlobeMatrix: !x, applyTerrainMatrix: !0 });
20831
+ const ee = N.getProjectionData({ overscaledTileID: $, applyGlobeMatrix: !x, applyTerrainMatrix: !0 });
20807
20832
  Ei(H, E, G, X, n);
20808
20833
  const oe = h.aL(N, X, n.paint.get("fill-extrusion-translate"), n.paint.get("fill-extrusion-translate-anchor")), ae = n.paint.get("fill-extrusion-vertical-gradient"), me = z ? Sc(d, ae, V, oe, $, B, X) : Tc(d, ae, V, oe);
20809
- q.draw(S, S.gl.TRIANGLES, c, f, y, Je.backCCW, me, U, Q, n.id, Z.layoutVertexBuffer, Z.indexBuffer, Z.segments, n.paint, d.transform.zoom, H, d.style.map.terrain && Z.centroidVertexBuffer);
20834
+ q.draw(S, S.gl.TRIANGLES, c, f, y, Je.backCCW, me, U, ee, n.id, Z.layoutVertexBuffer, Z.indexBuffer, Z.segments, n.paint, d.transform.zoom, H, d.style.map.terrain && Z.centroidVertexBuffer);
20810
20835
  }
20811
20836
  }
20812
20837
  function Wo(d, t, n, a, c, f, y, x, w) {
@@ -20830,8 +20855,8 @@ uniform ${P} ${E} u_${C};
20830
20855
  const Z = t.getTile(X), U = Z.dem;
20831
20856
  if (N) {
20832
20857
  Nr || (Nr = z.getParameter(z.MAX_TEXTURE_SIZE));
20833
- const me = Nr, { elevationTexture: de, colorTexture: Ee } = n.getColorRampTextures(E, me, U.getUnpackVector());
20834
- E.activeTexture.set(z.TEXTURE1), de.bind(z.NEAREST, z.CLAMP_TO_EDGE), E.activeTexture.set(z.TEXTURE4), Ee.bind(z.LINEAR, z.CLAMP_TO_EDGE), N = !1, $ = de.size[0];
20858
+ const me = Nr, { elevationTexture: de, colorTexture: Ce } = n.getColorRampTextures(E, me, U.getUnpackVector());
20859
+ E.activeTexture.set(z.TEXTURE1), de.bind(z.NEAREST, z.CLAMP_TO_EDGE), E.activeTexture.set(z.TEXTURE4), Ce.bind(z.LINEAR, z.CLAMP_TO_EDGE), N = !1, $ = de.size[0];
20835
20860
  }
20836
20861
  if (!U?.data) continue;
20837
20862
  const H = U.stride, q = U.getPixels();
@@ -20839,8 +20864,8 @@ uniform ${P} ${E} u_${C};
20839
20864
  const me = Z.demTexture;
20840
20865
  me.update(q, { premultiply: !1 }), me.bind(G, z.CLAMP_TO_EDGE);
20841
20866
  } else Z.demTexture = new h.T(E, q, z.RGBA, { premultiply: !1 }), Z.demTexture.bind(G, z.CLAMP_TO_EDGE);
20842
- const Q = P.getMeshFromTileID(E, X.canonical, x, !0, "raster"), oe = (S = d.style.map.terrain) === null || S === void 0 ? void 0 : S.getTerrainData(X), ae = C.getProjectionData({ overscaledTileID: X, aligned: V, applyGlobeMatrix: !w, applyTerrainMatrix: !0 });
20843
- B.draw(E, z.TRIANGLES, f, c[X.overscaledZ], y, Je.backCCW, Xu(n, Z.dem, $), oe, ae, n.id, Q.vertexBuffer, Q.indexBuffer, Q.segments);
20867
+ const ee = P.getMeshFromTileID(E, X.canonical, x, !0, "raster"), oe = (S = d.style.map.terrain) === null || S === void 0 ? void 0 : S.getTerrainData(X), ae = C.getProjectionData({ overscaledTileID: X, aligned: V, applyGlobeMatrix: !w, applyTerrainMatrix: !0 });
20868
+ B.draw(E, z.TRIANGLES, f, c[X.overscaledZ], y, Je.backCCW, Xu(n, Z.dem, $), oe, ae, n.id, ee.vertexBuffer, ee.indexBuffer, ee.segments);
20844
20869
  }
20845
20870
  }
20846
20871
  const Tn = [new h.P(0, 0), new h.P(h.a6, 0), new h.P(h.a6, h.a6), new h.P(0, h.a6)];
@@ -20848,12 +20873,12 @@ uniform ${P} ${E} u_${C};
20848
20873
  var P;
20849
20874
  const E = a[a.length - 1].overscaledZ, C = d.context, z = C.gl, B = d.useProgram("raster"), V = d.transform, G = d.style.projection, N = d.colorModeForRenderPass(), $ = !d.options.moving, X = n.paint.get("raster-opacity"), Z = n.paint.get("resampling") === "nearest" || n.paint.get("raster-resampling") === "nearest" ? z.NEAREST : z.LINEAR, U = n.paint.get("raster-fade-duration"), H = !!d.style.map.terrain;
20850
20875
  for (const q of a) {
20851
- const Q = d.getDepthModeForSublayer(q.overscaledZ - E, X === 1 ? $e.ReadWrite : $e.ReadOnly, z.LESS), oe = t.getTile(q);
20876
+ const ee = d.getDepthModeForSublayer(q.overscaledZ - E, X === 1 ? $e.ReadWrite : $e.ReadOnly, z.LESS), oe = t.getTile(q);
20852
20877
  C.activeTexture.set(z.TEXTURE0), oe.texture.bind(Z, z.CLAMP_TO_EDGE, z.LINEAR_MIPMAP_NEAREST), C.activeTexture.set(z.TEXTURE1);
20853
- const { parentTile: ae, parentScaleBy: me, parentTopLeft: de, fadeValues: Ee } = $c(oe, t, U, H);
20854
- oe.fadeOpacity = Ee.tileOpacity, ae ? (ae.fadeOpacity = Ee.parentTileOpacity, ae.texture.bind(Z, z.CLAMP_TO_EDGE, z.LINEAR_MIPMAP_NEAREST)) : oe.texture.bind(Z, 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);
20855
- const be = (P = d.style.map.terrain) === null || P === void 0 ? void 0 : P.getTerrainData(q), he = V.getProjectionData({ overscaledTileID: q, aligned: $, applyGlobeMatrix: !S, applyTerrainMatrix: !0 }), Pe = sl(de, me, Ee.fadeMix, n, x), ke = G.getMeshFromTileID(C, q.canonical, f, y, "raster");
20856
- B.draw(C, z.TRIANGLES, Q, c ? c[q.overscaledZ] : et.disabled, N, w ? Je.frontCCW : Je.backCCW, Pe, be, he, n.id, ke.vertexBuffer, ke.indexBuffer, ke.segments);
20878
+ const { parentTile: ae, parentScaleBy: me, parentTopLeft: de, fadeValues: Ce } = $c(oe, t, U, H);
20879
+ oe.fadeOpacity = Ce.tileOpacity, ae ? (ae.fadeOpacity = Ce.parentTileOpacity, ae.texture.bind(Z, z.CLAMP_TO_EDGE, z.LINEAR_MIPMAP_NEAREST)) : oe.texture.bind(Z, 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);
20880
+ const we = (P = d.style.map.terrain) === null || P === void 0 ? void 0 : P.getTerrainData(q), he = V.getProjectionData({ overscaledTileID: q, aligned: $, applyGlobeMatrix: !S, applyTerrainMatrix: !0 }), Pe = sl(de, me, Ce.fadeMix, n, x), ke = G.getMeshFromTileID(C, q.canonical, f, y, "raster");
20881
+ B.draw(C, z.TRIANGLES, ee, c ? c[q.overscaledZ] : et.disabled, N, w ? Je.frontCCW : Je.backCCW, Pe, we, he, n.id, ke.vertexBuffer, ke.indexBuffer, ke.segments);
20857
20882
  }
20858
20883
  }
20859
20884
  function $c(d, t, n, a) {
@@ -20928,12 +20953,12 @@ uniform ${P} ${E} u_${C};
20928
20953
  var $;
20929
20954
  const X = P.transform, Z = P.style.map.terrain, U = z === "map", H = B === "map";
20930
20955
  for (const q of S) {
20931
- const Q = C.getTile(q), oe = Q.getBucket(E);
20956
+ const ee = C.getTile(q), oe = ee.getBucket(E);
20932
20957
  if (!(!(($ = oe?.text) === null || $ === void 0) && $.segments.get().length)) continue;
20933
- const ae = h.aw(oe.textSizeData, X.zoom), me = h.aK(Q, 1, P.transform.zoom), de = ki(U, P.transform, me), Ee = E.layout.get("icon-text-fit") !== "none" && oe.hasIconData();
20958
+ const ae = h.aw(oe.textSizeData, X.zoom), me = h.aK(ee, 1, P.transform.zoom), de = ki(U, P.transform, me), Ce = E.layout.get("icon-text-fit") !== "none" && oe.hasIconData();
20934
20959
  if (ae) {
20935
- const be = Math.pow(2, X.zoom - Q.tileID.overscaledZ), he = Z ? (Pe, ke) => Z.getElevation(q, Pe, ke) : null;
20936
- js(oe, U, H, N, X, de, be, ae, Ee, h.aL(X, Q, V, G), q.toUnwrapped(), he);
20960
+ const we = Math.pow(2, X.zoom - ee.tileID.overscaledZ), he = Z ? (Pe, ke) => Z.getElevation(q, Pe, ke) : null;
20961
+ js(oe, U, H, N, X, de, we, ae, Ce, h.aL(X, ee, V, G), q.toUnwrapped(), he);
20937
20962
  }
20938
20963
  }
20939
20964
  })(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 && fl(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 && fl(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));
@@ -20946,16 +20971,16 @@ uniform ${P} ${E} u_${C};
20946
20971
  for (const X of a) {
20947
20972
  const Z = t.getTile(X), U = Z.getBucket(n);
20948
20973
  if (!U) continue;
20949
- const H = n.paint.get("circle-translate"), q = n.paint.get("circle-translate-anchor"), Q = h.aL(z, Z, H, q), oe = U.programConfigurations.get(n.id), ae = d.useProgram("circle", oe), me = U.layoutVertexBuffer, de = U.indexBuffer, Ee = (f = d.style.map.terrain) === null || f === void 0 ? void 0 : f.getTerrainData(X), be = { programConfiguration: oe, program: ae, layoutVertexBuffer: me, indexBuffer: de, uniformValues: Mc(d, Z, n, Q, $), terrainData: Ee, projectionData: z.getProjectionData({ overscaledTileID: X, applyGlobeMatrix: !y, applyTerrainMatrix: !0 }) };
20974
+ const H = n.paint.get("circle-translate"), q = n.paint.get("circle-translate-anchor"), ee = h.aL(z, Z, H, q), oe = U.programConfigurations.get(n.id), ae = d.useProgram("circle", oe), me = U.layoutVertexBuffer, de = U.indexBuffer, Ce = (f = d.style.map.terrain) === null || f === void 0 ? void 0 : f.getTerrainData(X), we = { programConfiguration: oe, program: ae, layoutVertexBuffer: me, indexBuffer: de, uniformValues: Mc(d, Z, n, ee, $), terrainData: Ce, projectionData: z.getProjectionData({ overscaledTileID: X, applyGlobeMatrix: !y, applyTerrainMatrix: !0 }) };
20950
20975
  if (P) {
20951
20976
  const he = U.segments.get();
20952
- for (const Pe of he) N.push({ segments: new h.aV([Pe]), sortKey: Pe.sortKey, state: be });
20953
- } else N.push({ segments: U.segments, sortKey: 0, state: be });
20977
+ for (const Pe of he) N.push({ segments: new h.aV([Pe]), sortKey: Pe.sortKey, state: we });
20978
+ } else N.push({ segments: U.segments, sortKey: 0, state: we });
20954
20979
  }
20955
20980
  P && N.sort(((X, Z) => X.sortKey - Z.sortKey));
20956
20981
  for (const X of N) {
20957
- const { programConfiguration: Z, program: U, layoutVertexBuffer: H, indexBuffer: q, uniformValues: Q, terrainData: oe, projectionData: ae } = X.state;
20958
- U.draw(E, C.TRIANGLES, B, V, G, Je.backCCW, Q, oe, ae, n.id, H, q, X.segments, n.paint, d.transform.zoom, Z);
20982
+ const { programConfiguration: Z, program: U, layoutVertexBuffer: H, indexBuffer: q, uniformValues: ee, terrainData: oe, projectionData: ae } = X.state;
20983
+ U.draw(E, C.TRIANGLES, B, V, G, Je.backCCW, ee, oe, ae, n.id, H, q, X.segments, n.paint, d.transform.zoom, Z);
20959
20984
  }
20960
20985
  }, heatmap: function(d, t, n, a, c) {
20961
20986
  if (n.paint.get("heatmap-opacity") === 0) return;
@@ -21001,11 +21026,11 @@ uniform ${P} ${E} u_${C};
21001
21026
  for (const H of a) {
21002
21027
  const q = t.getTile(H);
21003
21028
  if (B && !q.patternsLoaded()) continue;
21004
- const Q = q.getBucket(n);
21005
- if (!Q) continue;
21006
- const oe = Q.programConfigurations.get(n.id), ae = d.context.program.get(), me = d.useProgram(N, oe), de = U || me.program !== ae, Ee = (f = d.style.map.terrain) === null || f === void 0 ? void 0 : f.getTerrainData(H), be = z.constantOr(null), he = E?.constantOr(null);
21007
- if (be && q.imageAtlas) {
21008
- const ct = q.imageAtlas, Rt = ct.patternPositions[be.to.toString()], Ft = ct.patternPositions[be.from.toString()];
21029
+ const ee = q.getBucket(n);
21030
+ if (!ee) continue;
21031
+ const oe = ee.programConfigurations.get(n.id), ae = d.context.program.get(), me = d.useProgram(N, oe), de = U || me.program !== ae, Ce = (f = d.style.map.terrain) === null || f === void 0 ? void 0 : f.getTerrainData(H), we = z.constantOr(null), he = E?.constantOr(null);
21032
+ if (we && q.imageAtlas) {
21033
+ const ct = q.imageAtlas, Rt = ct.patternPositions[we.to.toString()], Ft = ct.patternPositions[we.from.toString()];
21009
21034
  Rt && Ft && oe.setConstantPatternPositions(Rt, Ft);
21010
21035
  } else if (he) {
21011
21036
  const ct = n.layout.get("line-cap").constantOr(null) === "round", Rt = d.lineAtlas.getDash(he.to, ct), Ft = d.lineAtlas.getDash(he.from, ct);
@@ -21013,9 +21038,9 @@ uniform ${P} ${E} u_${C};
21013
21038
  }
21014
21039
  const Pe = Z.getProjectionData({ overscaledTileID: H, applyGlobeMatrix: !y, applyTerrainMatrix: !0 }), ke = Z.getPixelScale();
21015
21040
  let st;
21016
- B ? (st = Ac(d, q, n, ke, G), sh($, X, q, oe, G)) : C && V ? (st = Dc(d, q, n, ke, G, Q.lineClipsArray.length), wn(d, t, $, X, n, Q, H, oe, G)) : C ? (st = nl(d, q, n, ke, G), Gc(d, $, X, oe, de, G)) : V ? (st = Cc(d, q, n, ke, Q.lineClipsArray.length), Dt(d, t, $, X, n, Q, H)) : st = Rs(d, q, n, ke);
21041
+ B ? (st = Ac(d, q, n, ke, G), sh($, X, q, oe, G)) : C && V ? (st = Dc(d, q, n, ke, G, ee.lineClipsArray.length), wn(d, t, $, X, n, ee, H, oe, G)) : C ? (st = nl(d, q, n, ke, G), Gc(d, $, X, oe, de, G)) : V ? (st = Cc(d, q, n, ke, ee.lineClipsArray.length), Dt(d, t, $, X, n, ee, H)) : st = Rs(d, q, n, ke);
21017
21042
  const zt = d.stencilModeForClipping(H);
21018
- me.draw($, X.TRIANGLES, S, zt, P, Je.disabled, st, Ee, Pe, n.id, Q.layoutVertexBuffer, Q.indexBuffer, Q.segments, n.paint, d.transform.zoom, oe, Q.layoutVertexBuffer2), U = !1;
21043
+ me.draw($, X.TRIANGLES, S, zt, P, Je.disabled, st, Ce, Pe, n.id, ee.layoutVertexBuffer, ee.indexBuffer, ee.segments, n.paint, d.transform.zoom, oe, ee.layoutVertexBuffer2), U = !1;
21019
21044
  }
21020
21045
  }, fill: function(d, t, n, a, c) {
21021
21046
  const f = n.paint.get("fill-color"), y = n.paint.get("fill-opacity");
@@ -21049,8 +21074,8 @@ uniform ${P} ${E} u_${C};
21049
21074
  for (const Z of C) {
21050
21075
  const U = E.getTile(Z), H = U.dem;
21051
21076
  if (!H?.data || !U.needsHillshadePrepare) continue;
21052
- const q = H.dim, Q = H.stride, oe = H.getPixels();
21053
- if (N.activeTexture.set($.TEXTURE1), N.pixelStoreUnpackPremultiplyAlpha.set(!1), U.demTexture || (U.demTexture = P.getTileTexture(Q)), U.demTexture) {
21077
+ const q = H.dim, ee = H.stride, oe = H.getPixels();
21078
+ if (N.activeTexture.set($.TEXTURE1), N.pixelStoreUnpackPremultiplyAlpha.set(!1), U.demTexture || (U.demTexture = P.getTileTexture(ee)), U.demTexture) {
21054
21079
  const me = U.demTexture;
21055
21080
  me.update(oe, { premultiply: !1 }), me.bind($.NEAREST, $.CLAMP_TO_EDGE);
21056
21081
  } else U.demTexture = new h.T(N, oe, $.RGBA, { premultiply: !1 }), U.demTexture.bind($.NEAREST, $.CLAMP_TO_EDGE);
@@ -21103,8 +21128,8 @@ uniform ${P} ${E} u_${C};
21103
21128
  B && (S.activeTexture.set(P.TEXTURE0), d.imageManager.bind(d.context));
21104
21129
  const U = n.getCrossfadeParameters();
21105
21130
  for (const H of Z) {
21106
- const q = C.getProjectionData({ overscaledTileID: H, applyGlobeMatrix: !w, applyTerrainMatrix: !0 }), Q = B ? cl(x, d, B, { tileID: H, tileSize: z }, U) : yn(x, y), oe = (f = d.style.map.terrain) === null || f === void 0 ? void 0 : f.getTerrainData(H), ae = E.getMeshFromTileID(S, H.canonical, !1, !0, "raster");
21107
- X.draw(S, P.TRIANGLES, N, G, $, Je.backCCW, Q, oe, q, n.id, ae.vertexBuffer, ae.indexBuffer, ae.segments);
21131
+ const q = C.getProjectionData({ overscaledTileID: H, applyGlobeMatrix: !w, applyTerrainMatrix: !0 }), ee = B ? cl(x, d, B, { tileID: H, tileSize: z }, U) : yn(x, y), oe = (f = d.style.map.terrain) === null || f === void 0 ? void 0 : f.getTerrainData(H), ae = E.getMeshFromTileID(S, H.canonical, !1, !0, "raster");
21132
+ X.draw(S, P.TRIANGLES, N, G, $, Je.backCCW, ee, oe, q, n.id, ae.vertexBuffer, ae.indexBuffer, ae.segments);
21108
21133
  }
21109
21134
  }, sky: function(d, t) {
21110
21135
  const n = d.context, a = n.gl, c = ((P, E, C) => {
@@ -21691,7 +21716,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
21691
21716
  return this._map.fire(new h.n(t, { originalEvent: n }));
21692
21717
  }
21693
21718
  }
21694
- function Ie(d, t) {
21719
+ function Me(d, t) {
21695
21720
  if (d.length !== t.length) throw new Error(`The number of touches and points are not equal - touches ${d.length}, points ${t.length}`);
21696
21721
  const n = {};
21697
21722
  for (let a = 0; a < d.length; a++) n[d[a].identifier] = t[a];
@@ -21709,11 +21734,11 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
21709
21734
  const f = new h.P(0, 0);
21710
21735
  for (const y of c) f._add(y);
21711
21736
  return f.div(c.length);
21712
- })(n), this.touches = Ie(a, n)));
21737
+ })(n), this.touches = Me(a, n)));
21713
21738
  }
21714
21739
  touchmove(t, n, a) {
21715
21740
  if (this.aborted || !this.centroid) return;
21716
- const c = Ie(a, n);
21741
+ const c = Me(a, n);
21717
21742
  for (const f in this.touches) {
21718
21743
  const y = c[f];
21719
21744
  (!y || y.dist(this.touches[f]) > 30) && (this.aborted = !0);
@@ -21934,7 +21959,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
21934
21959
  }
21935
21960
  _calculateTransform(t, n, a) {
21936
21961
  a.length > 0 && (this._active = !0);
21937
- const c = Ie(a, n), f = new h.P(0, 0), y = new h.P(0, 0);
21962
+ const c = Me(a, n), f = new h.P(0, 0), y = new h.P(0, 0);
21938
21963
  let x = 0;
21939
21964
  for (const S in c) {
21940
21965
  const P = c[S], E = this._touches[S];
@@ -22348,7 +22373,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
22348
22373
  return this._mouseRotate.isActive() || this._mousePitch.isActive() || this._mouseRoll.isActive();
22349
22374
  }
22350
22375
  }
22351
- class Ce {
22376
+ class Ae {
22352
22377
  constructor(t, n, a, c) {
22353
22378
  this._el = t, this._touchZoom = n, this._touchRotate = a, this._tapDragZoom = c, this._rotationDisabled = !1, this._enabled = !0;
22354
22379
  }
@@ -22483,33 +22508,33 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
22483
22508
  this._add("tapDragZoom", w);
22484
22509
  const S = n.touchPitch = new Tr(n);
22485
22510
  this._add("touchPitch", S), t.interactive && t.touchPitch && n.touchPitch.enable(t.touchPitch);
22486
- const P = () => n.project(n.getCenter()), E = (function({ enable: Z, clickTolerance: U, aroundCenter: H = !0, minPixelCenterThreshold: q = 100, rotateDegreesPerPixelMoved: Q = 0.8 }, oe) {
22511
+ const P = () => n.project(n.getCenter()), E = (function({ enable: Z, clickTolerance: U, aroundCenter: H = !0, minPixelCenterThreshold: q = 100, rotateDegreesPerPixelMoved: ee = 0.8 }, oe) {
22487
22512
  const ae = new Sn({ checkCorrectEvent: (me) => me.button === 0 && me.ctrlKey || me.button === 2 && !me.ctrlKey });
22488
22513
  return new wr({ clickTolerance: U, move: (me, de) => {
22489
- const Ee = oe();
22490
- if (H && Math.abs(Ee.y - me.y) > q) return { bearingDelta: h.cx(new h.P(me.x, de.y), de, Ee) };
22491
- let be = (de.x - me.x) * Q;
22492
- return H && de.y < Ee.y && (be = -be), { bearingDelta: be };
22514
+ const Ce = oe();
22515
+ if (H && Math.abs(Ce.y - me.y) > q) return { bearingDelta: h.cx(new h.P(me.x, de.y), de, Ce) };
22516
+ let we = (de.x - me.x) * ee;
22517
+ return H && de.y < Ce.y && (we = -we), { bearingDelta: we };
22493
22518
  }, moveStateManager: ae, enable: Z, assignEvents: Ho });
22494
22519
  })(t, P), C = (function({ enable: Z, clickTolerance: U, pitchDegreesPerPixelMoved: H = -0.5 }) {
22495
- const q = new Sn({ checkCorrectEvent: (Q) => Q.button === 0 && Q.ctrlKey || Q.button === 2 });
22496
- return new wr({ clickTolerance: U, move: (Q, oe) => ({ pitchDelta: (oe.y - Q.y) * H }), moveStateManager: q, enable: Z, assignEvents: Ho });
22520
+ const q = new Sn({ checkCorrectEvent: (ee) => ee.button === 0 && ee.ctrlKey || ee.button === 2 });
22521
+ return new wr({ clickTolerance: U, move: (ee, oe) => ({ pitchDelta: (oe.y - ee.y) * H }), moveStateManager: q, enable: Z, assignEvents: Ho });
22497
22522
  })(t), z = (function({ enable: Z, clickTolerance: U, rollDegreesPerPixelMoved: H = 0.3 }, q) {
22498
- const Q = new Sn({ checkCorrectEvent: (oe) => oe.button === 2 && oe.ctrlKey });
22523
+ const ee = new Sn({ checkCorrectEvent: (oe) => oe.button === 2 && oe.ctrlKey });
22499
22524
  return new wr({ clickTolerance: U, move: (oe, ae) => {
22500
22525
  const me = q();
22501
22526
  let de = (ae.x - oe.x) * H;
22502
22527
  return ae.y < me.y && (de = -de), { rollDelta: de };
22503
- }, moveStateManager: Q, enable: Z, assignEvents: Ho });
22528
+ }, moveStateManager: ee, enable: Z, assignEvents: Ho });
22504
22529
  })(t, P);
22505
22530
  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();
22506
22531
  const B = (function({ enable: Z, clickTolerance: U }) {
22507
22532
  const H = new Sn({ checkCorrectEvent: (q) => q.button === 0 && !q.ctrlKey });
22508
- return new wr({ clickTolerance: U, move: (q, Q) => ({ around: Q, panDelta: Q.sub(q) }), activateOnStart: !0, moveStateManager: H, enable: Z, assignEvents: Ho });
22533
+ return new wr({ clickTolerance: U, move: (q, ee) => ({ around: ee, panDelta: ee.sub(q) }), activateOnStart: !0, moveStateManager: H, enable: Z, assignEvents: Ho });
22509
22534
  })(t), V = new ru(t, n);
22510
22535
  n.dragPan = new or(a, B, V), this._add("mousePan", B), this._add("touchPan", V, ["touchZoom", "touchRotate"]), t.interactive && t.dragPan && n.dragPan.enable(t.dragPan);
22511
22536
  const G = new su(), N = new nu();
22512
- n.touchZoomRotate = new Ce(a, N, G, w), this._add("touchRotate", G, ["touchPan", "touchZoom"]), this._add("touchZoom", N, ["touchPan", "touchRotate"]), t.interactive && t.touchZoomRotate && n.touchZoomRotate.enable(t.touchZoomRotate), this._add("blockableMapEvent", new Qc(n));
22537
+ n.touchZoomRotate = new Ae(a, N, G, w), this._add("touchRotate", G, ["touchPan", "touchZoom"]), this._add("touchZoom", N, ["touchPan", "touchRotate"]), t.interactive && t.touchZoomRotate && n.touchZoomRotate.enable(t.touchZoomRotate), this._add("blockableMapEvent", new Qc(n));
22513
22538
  const $ = n.scrollZoom = new Cl(n, (() => this._triggerRenderFrame()));
22514
22539
  this._add("scrollZoom", $, ["mousePan"]), t.interactive && t.scrollZoom && n.scrollZoom.enable(t.scrollZoom);
22515
22540
  const X = n.keyboard = new ou(n);
@@ -22836,8 +22861,8 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
22836
22861
  typeof V.scaleOfMinZoom == "number" && (G = Math.sqrt(N / V.scaleOfMinZoom / X * 2));
22837
22862
  const Z = G * G;
22838
22863
  function U(de) {
22839
- const Ee = ($ * $ - N * N + (de ? -1 : 1) * Z * Z * X * X) / (2 * (de ? $ : N) * Z * X);
22840
- return Math.log(Math.sqrt(Ee * Ee + 1) - Ee);
22864
+ const Ce = ($ * $ - N * N + (de ? -1 : 1) * Z * Z * X * X) / (2 * (de ? $ : N) * Z * X);
22865
+ return Math.log(Math.sqrt(Ce * Ce + 1) - Ce);
22841
22866
  }
22842
22867
  function H(de) {
22843
22868
  return (Math.exp(de) - Math.exp(-de)) / 2;
@@ -22845,21 +22870,21 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
22845
22870
  function q(de) {
22846
22871
  return (Math.exp(de) + Math.exp(-de)) / 2;
22847
22872
  }
22848
- const Q = U(!1);
22873
+ const ee = U(!1);
22849
22874
  let oe = function(de) {
22850
- return q(Q) / q(Q + G * de);
22875
+ return q(ee) / q(ee + G * de);
22851
22876
  }, ae = function(de) {
22852
- return N * ((q(Q) * (H(Ee = Q + G * de) / q(Ee)) - H(Q)) / Z) / X;
22853
- var Ee;
22854
- }, me = (U(!0) - Q) / G;
22877
+ return N * ((q(ee) * (H(Ce = ee + G * de) / q(Ce)) - H(ee)) / Z) / X;
22878
+ var Ce;
22879
+ }, me = (U(!0) - ee) / G;
22855
22880
  if (Math.abs(X) < 2e-6 || !isFinite(me)) {
22856
22881
  if (Math.abs(N - $) < 1e-6) return this.easeTo(t, n);
22857
22882
  const de = $ < N ? -1 : 1;
22858
- me = Math.abs(Math.log($ / N)) / G, ae = () => 0, oe = (Ee) => Math.exp(de * G * Ee);
22883
+ me = Math.abs(Math.log($ / N)) / G, ae = () => 0, oe = (Ce) => Math.exp(de * G * Ce);
22859
22884
  }
22860
22885
  return t.duration = "duration" in t ? +t.duration : 1e3 * me / ("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(((de) => {
22861
- const Ee = de * me, be = 1 / oe(Ee), he = ae(Ee);
22862
- this._rotating && a.setBearing(h.H.number(c, w, de)), this._pitching && a.setPitch(h.H.number(f, S, de)), this._rolling && a.setRoll(h.H.number(y, P, de)), this._padding && (a.interpolatePadding(x, E, de), z = a.centerPoint.add(C)), V.easeFunc(de, be, he, z), this.terrain && !t.freezeElevation && this._updateElevation(de), this._applyUpdatedTransform(a), this._fireMoveEvents(n);
22886
+ const Ce = de * me, we = 1 / oe(Ce), he = ae(Ce);
22887
+ this._rotating && a.setBearing(h.H.number(c, w, de)), this._pitching && a.setPitch(h.H.number(f, S, de)), this._rolling && a.setRoll(h.H.number(y, P, de)), this._padding && (a.interpolatePadding(x, E, de), z = a.centerPoint.add(C)), V.easeFunc(de, we, he, z), this.terrain && !t.freezeElevation && this._updateElevation(de), this._applyUpdatedTransform(a), this._fireMoveEvents(n);
22863
22888
  }), (() => {
22864
22889
  this.terrain && t.freezeElevation && this._finalizeElevation(), this._afterEase(n);
22865
22890
  }), t), this;
@@ -23161,14 +23186,14 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
23161
23186
  const a = ((n = this.painter.style.projection) === null || n === void 0 ? void 0 : n.transitionState) > 0, c = a && t.canonical.y === 0, f = a && t.canonical.y === (1 << t.canonical.z) - 1, y = `m_${c ? "n" : ""}_${f ? "s" : ""}`;
23162
23187
  if (this._meshCache[y]) return this._meshCache[y];
23163
23188
  const x = this.painter.context, w = new h.cF(), S = new h.aW(), P = this.meshSize, E = h.a6 / P, C = P * P;
23164
- for (let q = 0; q <= P; q++) for (let Q = 0; Q <= P; Q++) w.emplaceBack(Q * E, q * E, 0);
23165
- for (let q = 0; q < C; q += P + 1) for (let Q = 0; Q < P; Q++) S.emplaceBack(Q + q, P + Q + q + 1, P + Q + q + 2), S.emplaceBack(Q + q, P + Q + q + 2, Q + q + 1);
23189
+ for (let q = 0; q <= P; q++) for (let ee = 0; ee <= P; ee++) w.emplaceBack(ee * E, q * E, 0);
23190
+ for (let q = 0; q < C; q += P + 1) for (let ee = 0; ee < P; ee++) S.emplaceBack(ee + q, P + ee + q + 1, P + ee + q + 2), S.emplaceBack(ee + q, P + ee + q + 2, ee + q + 1);
23166
23191
  const z = w.length, B = z + (P + 1), V = (P + 1) * P, G = c ? h.bq : 0, N = c ? 0 : 1, $ = f ? h.br : h.a6, X = f ? 0 : 1;
23167
23192
  for (let q = 0; q <= P; q++) w.emplaceBack(q * E, G, N);
23168
23193
  for (let q = 0; q <= P; q++) w.emplaceBack(q * E, $, X);
23169
23194
  for (let q = 0; q < P; q++) S.emplaceBack(V + q, B + q, B + q + 1), S.emplaceBack(V + q, B + q + 1, V + q + 1), S.emplaceBack(0 + q, z + q + 1, z + q), S.emplaceBack(0 + q, 0 + q + 1, z + q + 1);
23170
23195
  const Z = w.length, U = Z + 2 * (P + 1);
23171
- for (const q of [0, 1]) for (let Q = 0; Q <= P; Q++) for (const oe of [0, 1]) w.emplaceBack(q * h.a6, Q * E, oe);
23196
+ for (const q of [0, 1]) for (let ee = 0; ee <= P; ee++) for (const oe of [0, 1]) w.emplaceBack(q * h.a6, ee * E, oe);
23172
23197
  for (let q = 0; q < 2 * P; q += 2) S.emplaceBack(Z + q, Z + q + 1, Z + q + 3), S.emplaceBack(Z + q, Z + q + 3, Z + q + 2), S.emplaceBack(U + q, U + q + 3, U + q + 1), S.emplaceBack(U + q, U + q + 2, U + q + 3);
23173
23198
  const H = new ht(x.createVertexBuffer(w, dh.members), x.createIndexBuffer(S), h.aV.simpleSegment(0, 0, w.length, S.length));
23174
23199
  return this._meshCache[y] = H, H;
@@ -24586,7 +24611,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
24586
24611
  onRemove() {
24587
24612
  this._container.remove(), this._map.off("terrain", this._updateTerrainIcon), this._map = void 0;
24588
24613
  }
24589
- }, R.TwoFingersTouchPitchHandler = Tr, R.TwoFingersTouchRotateHandler = su, R.TwoFingersTouchZoomHandler = nu, R.TwoFingersTouchZoomRotateHandler = Ce, R.VectorTileSource = Jt, R.VideoSource = rn, R.addSourceType = (d, t) => h._(void 0, void 0, void 0, (function* () {
24614
+ }, R.TwoFingersTouchPitchHandler = Tr, R.TwoFingersTouchRotateHandler = su, R.TwoFingersTouchZoomHandler = nu, R.TwoFingersTouchZoomRotateHandler = Ae, R.VectorTileSource = Jt, R.VideoSource = rn, R.addSourceType = (d, t) => h._(void 0, void 0, void 0, (function* () {
24590
24615
  if (fo(d)) throw new Error(`A source type called "${d}" already exists.`);
24591
24616
  ((n, a) => {
24592
24617
  Ba[n] = a;
@@ -24624,95 +24649,95 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
24624
24649
  h.c.WORKER_URL = d;
24625
24650
  };
24626
24651
  }));
24627
- var je = we;
24652
+ var je = ge;
24628
24653
  return je;
24629
24654
  }));
24630
24655
  })(Ou)), Ou.exports;
24631
24656
  }
24632
- var ny = ry();
24633
- const Kf = /* @__PURE__ */ Y_(ny);
24634
- class sy {
24657
+ var ay = oy();
24658
+ const Kf = /* @__PURE__ */ Y_(ay);
24659
+ class ly {
24635
24660
  /* eslint-disable no-this-before-super */
24636
- constructor(te) {
24637
- Bu(te.id, "id is required"), this.id = te.id, this.type = "custom", this.renderingMode = te.renderingMode || "3d", this.slot = te.slot, this.beforeId = te.beforeId, this.map = null;
24661
+ constructor(Q) {
24662
+ Bu(Q.id, "id is required"), this.id = Q.id, this.type = "custom", this.renderingMode = Q.renderingMode || "3d", this.slot = Q.slot, this.beforeId = Q.beforeId, this.map = null;
24638
24663
  }
24639
24664
  /* Mapbox custom layer methods */
24640
- onAdd(te, we) {
24641
- this.map = te;
24665
+ onAdd(Q, ge) {
24666
+ this.map = Q;
24642
24667
  }
24643
- render(te, we) {
24644
- this.map && uy(this.map.__deck, this.map, this, we);
24668
+ render(Q, ge) {
24669
+ this.map && py(this.map.__deck, this.map, this, ge);
24645
24670
  }
24646
24671
  }
24647
24672
  const wd = "__UNDEFINED__";
24648
- function sc(Me) {
24649
- return Me.props.beforeId ? `deck-layer-group-before:${Me.props.beforeId}` : Me.props.slot ? `deck-layer-group-slot:${Me.props.slot}` : "deck-layer-group-last";
24673
+ function sc(Ie) {
24674
+ return Ie.props.beforeId ? `deck-layer-group-before:${Ie.props.beforeId}` : Ie.props.slot ? `deck-layer-group-slot:${Ie.props.slot}` : "deck-layer-group-last";
24650
24675
  }
24651
- function oy(Me, te, we) {
24652
- if (!Me || !Me.style || !Me.style._loaded)
24676
+ function cy(Ie, Q, ge) {
24677
+ if (!Ie || !Ie.style || !Ie.style._loaded)
24653
24678
  return;
24654
- const De = Pd(we, Boolean);
24655
- if (te !== we) {
24656
- const R = Pd(te, Boolean), h = new Set(R.map((mt) => sc(mt))), fe = new Set(De.map((mt) => sc(mt)));
24679
+ const Ee = Pd(ge, Boolean);
24680
+ if (Q !== ge) {
24681
+ const R = Pd(Q, Boolean), h = new Set(R.map((mt) => sc(mt))), fe = new Set(Ee.map((mt) => sc(mt)));
24657
24682
  for (const mt of h)
24658
- fe.has(mt) || Me.getLayer(mt) && Me.removeLayer(mt);
24683
+ fe.has(mt) || Ie.getLayer(mt) && Ie.removeLayer(mt);
24659
24684
  }
24660
24685
  const ze = {};
24661
- for (const R of De) {
24662
- const h = sc(R), fe = Me.getLayer(h);
24686
+ for (const R of Ee) {
24687
+ const h = sc(R), fe = Ie.getLayer(h);
24663
24688
  if (fe) {
24664
24689
  const mt = fe.implementation || fe;
24665
24690
  ze[h] = mt;
24666
24691
  } else {
24667
- const mt = new sy({
24692
+ const mt = new ly({
24668
24693
  id: h,
24669
24694
  slot: R.props.slot,
24670
24695
  beforeId: R.props.beforeId
24671
24696
  });
24672
- ze[h] = mt, Me.addLayer(mt, R.props.beforeId);
24697
+ ze[h] = mt, Ie.addLayer(mt, R.props.beforeId);
24673
24698
  }
24674
24699
  }
24675
- const je = Me.style._order;
24700
+ const je = Ie.style._order;
24676
24701
  for (const [R, h] of Object.entries(ze)) {
24677
24702
  const fe = h.beforeId || wd, mt = fe === wd ? je.length : je.indexOf(fe);
24678
24703
  if (je.indexOf(R) !== mt - 1) {
24679
24704
  const Ui = fe === wd ? void 0 : fe;
24680
- Me.moveLayer(R, Ui);
24705
+ Ie.moveLayer(R, Ui);
24681
24706
  }
24682
24707
  }
24683
24708
  }
24684
- const ka = "mapbox", Td = 512, ay = Math.PI / 180;
24685
- function ly({ map: Me, deck: te }) {
24686
- if (Me.__deck)
24687
- return Me.__deck;
24688
- const we = te.props._customRender, De = te.props.onLoad, ze = {
24689
- ...te.props,
24709
+ const ka = "mapbox", Td = 512, uy = Math.PI / 180;
24710
+ function hy({ map: Ie, deck: Q }) {
24711
+ if (Ie.__deck)
24712
+ return Ie.__deck;
24713
+ const ge = Q.props._customRender, Ee = Q.props.onLoad, ze = {
24714
+ ...Q.props,
24690
24715
  _customRender: () => {
24691
- Me.triggerRepaint(), we?.("");
24716
+ Ie.triggerRepaint(), ge?.("");
24692
24717
  }
24693
24718
  };
24694
- return ze.views || (ze.views = Vu(Me)), Object.assign(ze, {
24719
+ return ze.views || (ze.views = Vu(Ie)), Object.assign(ze, {
24695
24720
  width: null,
24696
24721
  height: null,
24697
24722
  touchAction: "unset",
24698
- viewState: oc(Me)
24699
- }), te.isInitialized ? Jf(te, Me) : ze.onLoad = () => {
24700
- De?.(), Jf(te, Me);
24701
- }, te.setProps(ze), Me.__deck = te, Me.on("render", () => {
24702
- te.isInitialized && dy(te, Me);
24703
- }), te;
24723
+ viewState: oc(Ie)
24724
+ }), Q.isInitialized ? Jf(Q, Ie) : ze.onLoad = () => {
24725
+ Ee?.(), Jf(Q, Ie);
24726
+ }, Q.setProps(ze), Ie.__deck = Q, Ie.on("render", () => {
24727
+ Q.isInitialized && my(Q, Ie);
24728
+ }), Q;
24704
24729
  }
24705
- function Jf(Me, te) {
24706
- const we = () => {
24707
- Me.isInitialized ? py(Me, te) : te.off("move", we);
24730
+ function Jf(Ie, Q) {
24731
+ const ge = () => {
24732
+ Ie.isInitialized ? gy(Ie, Q) : Q.off("move", ge);
24708
24733
  };
24709
- te.on("move", we);
24734
+ Q.on("move", ge);
24710
24735
  }
24711
- function cy(Me) {
24712
- Me.__deck?.finalize(), Me.__deck = null;
24736
+ function dy(Ie) {
24737
+ Ie.__deck?.finalize(), Ie.__deck = null;
24713
24738
  }
24714
- function Sd(Me, te) {
24715
- return te ? {
24739
+ function Sd(Ie, Q) {
24740
+ return Q ? {
24716
24741
  depthWriteEnabled: !0,
24717
24742
  depthCompare: "less-equal",
24718
24743
  depthBias: 0,
@@ -24725,139 +24750,139 @@ function Sd(Me, te) {
24725
24750
  blendAlphaOperation: "add"
24726
24751
  } : {};
24727
24752
  }
24728
- function uy(Me, te, we, De) {
24729
- if (!Me.isInitialized)
24753
+ function py(Ie, Q, ge, Ee) {
24754
+ if (!Ie.isInitialized)
24730
24755
  return;
24731
- let { currentViewport: ze } = Me.userData, je = !1;
24732
- ze || (ze = tm(Me, te, De), Me.userData.currentViewport = ze, je = !0), ze && Me._drawLayers("mapbox-repaint", {
24756
+ let { currentViewport: ze } = Ie.userData, je = !1;
24757
+ ze || (ze = tm(Ie, Q, Ee), Ie.userData.currentViewport = ze, je = !0), ze && Ie._drawLayers("mapbox-repaint", {
24733
24758
  viewports: [ze],
24734
24759
  layerFilter: (R) => {
24735
- if (Me.props.layerFilter && !Me.props.layerFilter(R))
24760
+ if (Ie.props.layerFilter && !Ie.props.layerFilter(R))
24736
24761
  return !1;
24737
24762
  const h = R.layer;
24738
- return h.props.beforeId === we.beforeId && h.props.slot === we.slot;
24763
+ return h.props.beforeId === ge.beforeId && h.props.slot === ge.slot;
24739
24764
  },
24740
24765
  clearStack: je,
24741
24766
  clearCanvas: !1
24742
24767
  });
24743
24768
  }
24744
- function em(Me) {
24745
- const te = Me.getProjection?.(), we = (
24769
+ function em(Ie) {
24770
+ const Q = Ie.getProjection?.(), ge = (
24746
24771
  // maplibre projection spec
24747
- te?.type || // mapbox projection spec
24748
- te?.name
24772
+ Q?.type || // mapbox projection spec
24773
+ Q?.name
24749
24774
  );
24750
- if (we === "globe")
24775
+ if (ge === "globe")
24751
24776
  return "globe";
24752
- if (we && we !== "mercator")
24777
+ if (ge && ge !== "mercator")
24753
24778
  throw new Error("Unsupported projection");
24754
24779
  return "mercator";
24755
24780
  }
24756
- function Vu(Me) {
24757
- return em(Me) === "globe" ? new ty({ id: ka }) : new K_({ id: ka });
24781
+ function Vu(Ie) {
24782
+ return em(Ie) === "globe" ? new ty({ id: ka }) : new K_({ id: ka });
24758
24783
  }
24759
- function oc(Me) {
24760
- const { lng: te, lat: we } = Me.getCenter(), De = {
24784
+ function oc(Ie) {
24785
+ const { lng: Q, lat: ge } = Ie.getCenter(), Ee = {
24761
24786
  // Longitude returned by getCenter can be outside of [-180, 180] when zooming near the anti meridian
24762
24787
  // https://github.com/visgl/deck.gl/issues/6894
24763
- longitude: (te + 540) % 360 - 180,
24764
- latitude: we,
24765
- zoom: Me.getZoom(),
24766
- bearing: Me.getBearing(),
24767
- pitch: Me.getPitch(),
24768
- padding: Me.getPadding(),
24769
- repeat: Me.getRenderWorldCopies()
24788
+ longitude: (Q + 540) % 360 - 180,
24789
+ latitude: ge,
24790
+ zoom: Ie.getZoom(),
24791
+ bearing: Ie.getBearing(),
24792
+ pitch: Ie.getPitch(),
24793
+ padding: Ie.getPadding(),
24794
+ repeat: Ie.getRenderWorldCopies()
24770
24795
  };
24771
- return Me.getTerrain?.() && hy(Me, De), De;
24796
+ return Ie.getTerrain?.() && fy(Ie, Ee), Ee;
24772
24797
  }
24773
- function hy(Me, te) {
24774
- if (Me.getFreeCameraOptions) {
24775
- const { position: we } = Me.getFreeCameraOptions();
24776
- if (!we || we.z === void 0)
24798
+ function fy(Ie, Q) {
24799
+ if (Ie.getFreeCameraOptions) {
24800
+ const { position: ge } = Ie.getFreeCameraOptions();
24801
+ if (!ge || ge.z === void 0)
24777
24802
  return;
24778
- const De = Me.transform.height, { longitude: ze, latitude: je, pitch: R } = te, h = we.x * Td, fe = (1 - we.y) * Td, mt = we.z * Td, Kt = J_([ze, je]), Ui = h - Kt[0], gr = fe - Kt[1], Vt = Math.sqrt(Ui * Ui + gr * gr), Di = R * ay, Xe = 1.5 * De, lr = Di < 1e-3 ? (
24803
+ const Ee = Ie.transform.height, { longitude: ze, latitude: je, pitch: R } = Q, h = ge.x * Td, fe = (1 - ge.y) * Td, mt = ge.z * Td, Kt = J_([ze, je]), Ui = h - Kt[0], gr = fe - Kt[1], Vt = Math.sqrt(Ui * Ui + gr * gr), Di = R * uy, Xe = 1.5 * Ee, lr = Di < 1e-3 ? (
24779
24804
  // Pitch angle too small to deduce the look at point, assume elevation is 0
24780
24805
  Xe * Math.cos(Di) / mt
24781
24806
  ) : Xe * Math.sin(Di) / Vt;
24782
- te.zoom = Math.log2(lr);
24807
+ Q.zoom = Math.log2(lr);
24783
24808
  const pi = Xe * Math.cos(Di) / lr, pe = mt - pi;
24784
- te.position = [0, 0, pe / Q_(je)];
24785
- } else typeof Me.transform.elevation == "number" && (te.position = [0, 0, Me.transform.elevation]);
24809
+ Q.position = [0, 0, pe / Q_(je)];
24810
+ } else typeof Ie.transform.elevation == "number" && (Q.position = [0, 0, Ie.transform.elevation]);
24786
24811
  }
24787
- function tm(Me, te, we) {
24788
- const De = oc(te), ze = Me.getView(ka) || Vu(te);
24789
- we && (ze.props.nearZMultiplier = 0.2);
24790
- const je = we?.nearZ ?? te.transform._nearZ, R = we?.farZ ?? te.transform._farZ;
24791
- return Number.isFinite(je) && (De.nearZ = je / te.transform.height, De.farZ = R / te.transform.height), ze.makeViewport({
24792
- width: Me.width,
24793
- height: Me.height,
24794
- viewState: De
24812
+ function tm(Ie, Q, ge) {
24813
+ const Ee = oc(Q), ze = Ie.getView(ka) || Vu(Q);
24814
+ ge && (ze.props.nearZMultiplier = 0.2);
24815
+ const je = ge?.nearZ ?? Q.transform._nearZ, R = ge?.farZ ?? Q.transform._farZ;
24816
+ return Number.isFinite(je) && (Ee.nearZ = je / Q.transform.height, Ee.farZ = R / Q.transform.height), ze.makeViewport({
24817
+ width: Ie.width,
24818
+ height: Ie.height,
24819
+ viewState: Ee
24795
24820
  });
24796
24821
  }
24797
- function dy(Me, te) {
24798
- const De = Pd(Me.props.layers, Boolean).some((h) => h && !te.getLayer(sc(h)));
24799
- let ze = Me.getViewports();
24822
+ function my(Ie, Q) {
24823
+ const Ee = Pd(Ie.props.layers, Boolean).some((h) => h && !Q.getLayer(sc(h)));
24824
+ let ze = Ie.getViewports();
24800
24825
  const je = ze.findIndex((h) => h.id === ka), R = ze.length > 1 || je < 0;
24801
- if (De || R) {
24826
+ if (Ee || R) {
24802
24827
  if (je >= 0) {
24803
24828
  ze = ze.slice();
24804
- const h = tm(Me, te);
24829
+ const h = tm(Ie, Q);
24805
24830
  h ? ze[je] = h : ze.splice(je, 1);
24806
24831
  }
24807
- Me._drawLayers("mapbox-repaint", {
24832
+ Ie._drawLayers("mapbox-repaint", {
24808
24833
  viewports: ze,
24809
- layerFilter: (h) => (!Me.props.layerFilter || Me.props.layerFilter(h)) && (h.viewport.id !== ka || !te.getLayer(sc(h.layer))),
24834
+ layerFilter: (h) => (!Ie.props.layerFilter || Ie.props.layerFilter(h)) && (h.viewport.id !== ka || !Q.getLayer(sc(h.layer))),
24810
24835
  clearCanvas: !1
24811
24836
  });
24812
24837
  } else {
24813
- const h = Me.device, fe = h?.gl;
24814
- Me.props.onBeforeRender?.({ device: h, gl: fe }), Me.props.onAfterRender?.({ device: h, gl: fe });
24838
+ const h = Ie.device, fe = h?.gl;
24839
+ Ie.props.onBeforeRender?.({ device: h, gl: fe }), Ie.props.onAfterRender?.({ device: h, gl: fe });
24815
24840
  }
24816
- Me.userData.currentViewport = null;
24841
+ Ie.userData.currentViewport = null;
24817
24842
  }
24818
- function py(Me, te) {
24819
- Me.setProps({
24820
- viewState: oc(te)
24821
- }), Me.needsRedraw({ clearRedrawFlags: !0 });
24843
+ function gy(Ie, Q) {
24844
+ Ie.setProps({
24845
+ viewState: oc(Q)
24846
+ }), Ie.needsRedraw({ clearRedrawFlags: !0 });
24822
24847
  }
24823
- class fy {
24824
- constructor(te) {
24848
+ class _y {
24849
+ constructor(Q) {
24825
24850
  this._handleStyleChange = () => {
24826
24851
  if (this._resolveLayers(this._map, this._deck, this._props.layers, this._props.layers), !this._map)
24827
24852
  return;
24828
24853
  em(this._map) && this._deck?.setProps({ views: this._getViews(this._map) });
24829
24854
  }, this._updateContainerSize = () => {
24830
24855
  if (this._map && this._container) {
24831
- const { clientWidth: De, clientHeight: ze } = this._map.getContainer();
24856
+ const { clientWidth: Ee, clientHeight: ze } = this._map.getContainer();
24832
24857
  Object.assign(this._container.style, {
24833
- width: `${De}px`,
24858
+ width: `${Ee}px`,
24834
24859
  height: `${ze}px`
24835
24860
  });
24836
24861
  }
24837
24862
  }, this._updateViewState = () => {
24838
- const De = this._deck, ze = this._map;
24839
- De && ze && (De.setProps({
24863
+ const Ee = this._deck, ze = this._map;
24864
+ Ee && ze && (Ee.setProps({
24840
24865
  views: this._getViews(ze),
24841
24866
  viewState: oc(ze)
24842
- }), De.isInitialized && De.redraw());
24843
- }, this._handleMouseEvent = (De) => {
24867
+ }), Ee.isInitialized && Ee.redraw());
24868
+ }, this._handleMouseEvent = (Ee) => {
24844
24869
  const ze = this._deck;
24845
24870
  if (!ze || !ze.isInitialized)
24846
24871
  return;
24847
24872
  const je = {
24848
- type: De.type,
24849
- offsetCenter: De.point,
24850
- srcEvent: De
24873
+ type: Ee.type,
24874
+ offsetCenter: Ee.point,
24875
+ srcEvent: Ee
24851
24876
  }, R = this._lastMouseDownPoint;
24852
- switch (!De.point && R && (je.deltaX = De.originalEvent.clientX - R.clientX, je.deltaY = De.originalEvent.clientY - R.clientY, je.offsetCenter = {
24877
+ switch (!Ee.point && R && (je.deltaX = Ee.originalEvent.clientX - R.clientX, je.deltaY = Ee.originalEvent.clientY - R.clientY, je.offsetCenter = {
24853
24878
  x: R.x + je.deltaX,
24854
24879
  y: R.y + je.deltaY
24855
24880
  }), je.type) {
24856
24881
  case "mousedown":
24857
24882
  ze._onPointerDown(je), this._lastMouseDownPoint = {
24858
- ...De.point,
24859
- clientX: De.originalEvent.clientX,
24860
- clientY: De.originalEvent.clientY
24883
+ ...Ee.point,
24884
+ clientX: Ee.originalEvent.clientX,
24885
+ clientY: Ee.originalEvent.clientY
24861
24886
  };
24862
24887
  break;
24863
24888
  case "dragstart":
@@ -24885,17 +24910,17 @@ class fy {
24885
24910
  return;
24886
24911
  }
24887
24912
  };
24888
- const { interleaved: we = !1 } = te;
24889
- this._interleaved = we, this._props = this.filterProps(te);
24913
+ const { interleaved: ge = !1 } = Q;
24914
+ this._interleaved = ge, this._props = this.filterProps(Q);
24890
24915
  }
24891
24916
  /** Filter out props to pass to Deck **/
24892
- filterProps(te) {
24893
- const { interleaved: we = !1, useDevicePixels: De, ...ze } = te;
24894
- return !we && De !== void 0 && (ze.useDevicePixels = De), ze;
24917
+ filterProps(Q) {
24918
+ const { interleaved: ge = !1, useDevicePixels: Ee, ...ze } = Q;
24919
+ return !ge && Ee !== void 0 && (ze.useDevicePixels = Ee), ze;
24895
24920
  }
24896
24921
  /** Update (partial) props of the underlying Deck instance. */
24897
- setProps(te) {
24898
- this._interleaved && te.layers && this._resolveLayers(this._map, this._deck, this._props.layers, te.layers), Object.assign(this._props, this.filterProps(te)), this._deck && this._map && this._deck.setProps({
24922
+ setProps(Q) {
24923
+ this._interleaved && Q.layers && this._resolveLayers(this._map, this._deck, this._props.layers, Q.layers), Object.assign(this._props, this.filterProps(Q)), this._deck && this._map && this._deck.setProps({
24899
24924
  ...this._props,
24900
24925
  views: this._getViews(this._map),
24901
24926
  parameters: {
@@ -24907,65 +24932,65 @@ class fy {
24907
24932
  // The local Map type is for internal typecheck only. It does not necesarily satisefy mapbox/maplibre types at runtime.
24908
24933
  // Do not restrict the argument type here to avoid type conflict.
24909
24934
  /** Called when the control is added to a map */
24910
- onAdd(te) {
24911
- return this._map = te, this._interleaved ? this._onAddInterleaved(te) : this._onAddOverlaid(te);
24935
+ onAdd(Q) {
24936
+ return this._map = Q, this._interleaved ? this._onAddInterleaved(Q) : this._onAddOverlaid(Q);
24912
24937
  }
24913
- _onAddOverlaid(te) {
24914
- const we = document.createElement("div");
24915
- return Object.assign(we.style, {
24938
+ _onAddOverlaid(Q) {
24939
+ const ge = document.createElement("div");
24940
+ return Object.assign(ge.style, {
24916
24941
  position: "absolute",
24917
24942
  left: 0,
24918
24943
  top: 0,
24919
24944
  textAlign: "initial",
24920
24945
  pointerEvents: "none"
24921
- }), this._container = we, this._deck = new Xf({
24946
+ }), this._container = ge, this._deck = new Xf({
24922
24947
  ...this._props,
24923
- parent: we,
24924
- parameters: { ...Sd(te, !1), ...this._props.parameters },
24925
- views: this._getViews(te),
24926
- viewState: oc(te)
24927
- }), te.on("resize", this._updateContainerSize), te.on("render", this._updateViewState), te.on("mousedown", this._handleMouseEvent), te.on("dragstart", this._handleMouseEvent), te.on("drag", this._handleMouseEvent), te.on("dragend", this._handleMouseEvent), te.on("mousemove", this._handleMouseEvent), te.on("mouseout", this._handleMouseEvent), te.on("click", this._handleMouseEvent), te.on("dblclick", this._handleMouseEvent), this._updateContainerSize(), we;
24948
+ parent: ge,
24949
+ parameters: { ...Sd(Q, !1), ...this._props.parameters },
24950
+ views: this._getViews(Q),
24951
+ viewState: oc(Q)
24952
+ }), Q.on("resize", this._updateContainerSize), Q.on("render", this._updateViewState), Q.on("mousedown", this._handleMouseEvent), Q.on("dragstart", this._handleMouseEvent), Q.on("drag", this._handleMouseEvent), Q.on("dragend", this._handleMouseEvent), Q.on("mousemove", this._handleMouseEvent), Q.on("mouseout", this._handleMouseEvent), Q.on("click", this._handleMouseEvent), Q.on("dblclick", this._handleMouseEvent), this._updateContainerSize(), ge;
24928
24953
  }
24929
- _onAddInterleaved(te) {
24930
- const we = te.painter.context.gl;
24931
- return we instanceof WebGLRenderingContext && ey.warn("Incompatible basemap library. See: https://deck.gl/docs/api-reference/mapbox/overview#compatibility")(), this._deck = ly({
24932
- map: te,
24954
+ _onAddInterleaved(Q) {
24955
+ const ge = Q.painter.context.gl;
24956
+ return ge instanceof WebGLRenderingContext && ey.warn("Incompatible basemap library. See: https://deck.gl/docs/api-reference/mapbox/overview#compatibility")(), this._deck = hy({
24957
+ map: Q,
24933
24958
  deck: new Xf({
24934
24959
  ...this._props,
24935
- views: this._getViews(te),
24936
- gl: we,
24937
- parameters: { ...Sd(te, !0), ...this._props.parameters }
24960
+ views: this._getViews(Q),
24961
+ gl: ge,
24962
+ parameters: { ...Sd(Q, !0), ...this._props.parameters }
24938
24963
  })
24939
- }), te.on("styledata", this._handleStyleChange), this._resolveLayers(te, this._deck, [], this._props.layers), document.createElement("div");
24964
+ }), Q.on("styledata", this._handleStyleChange), this._resolveLayers(Q, this._deck, [], this._props.layers), document.createElement("div");
24940
24965
  }
24941
- _resolveLayers(te, we, De, ze) {
24942
- oy(te, De, ze);
24966
+ _resolveLayers(Q, ge, Ee, ze) {
24967
+ cy(Q, Ee, ze);
24943
24968
  }
24944
24969
  /** Called when the control is removed from a map */
24945
24970
  onRemove() {
24946
- const te = this._map;
24947
- te && (this._interleaved ? this._onRemoveInterleaved(te) : this._onRemoveOverlaid(te)), this._deck = void 0, this._map = void 0, this._container = void 0;
24971
+ const Q = this._map;
24972
+ Q && (this._interleaved ? this._onRemoveInterleaved(Q) : this._onRemoveOverlaid(Q)), this._deck = void 0, this._map = void 0, this._container = void 0;
24948
24973
  }
24949
- _onRemoveOverlaid(te) {
24950
- te.off("resize", this._updateContainerSize), te.off("render", this._updateViewState), te.off("mousedown", this._handleMouseEvent), te.off("dragstart", this._handleMouseEvent), te.off("drag", this._handleMouseEvent), te.off("dragend", this._handleMouseEvent), te.off("mousemove", this._handleMouseEvent), te.off("mouseout", this._handleMouseEvent), te.off("click", this._handleMouseEvent), te.off("dblclick", this._handleMouseEvent), this._deck?.finalize();
24974
+ _onRemoveOverlaid(Q) {
24975
+ Q.off("resize", this._updateContainerSize), Q.off("render", this._updateViewState), Q.off("mousedown", this._handleMouseEvent), Q.off("dragstart", this._handleMouseEvent), Q.off("drag", this._handleMouseEvent), Q.off("dragend", this._handleMouseEvent), Q.off("mousemove", this._handleMouseEvent), Q.off("mouseout", this._handleMouseEvent), Q.off("click", this._handleMouseEvent), Q.off("dblclick", this._handleMouseEvent), this._deck?.finalize();
24951
24976
  }
24952
- _onRemoveInterleaved(te) {
24953
- te.off("styledata", this._handleStyleChange), this._resolveLayers(te, this._deck, this._props.layers, []), cy(te);
24977
+ _onRemoveInterleaved(Q) {
24978
+ Q.off("styledata", this._handleStyleChange), this._resolveLayers(Q, this._deck, this._props.layers, []), dy(Q);
24954
24979
  }
24955
24980
  getDefaultPosition() {
24956
24981
  return "top-left";
24957
24982
  }
24958
24983
  /** Forwards the Deck.pickObject method */
24959
- pickObject(te) {
24960
- return Bu(this._deck), this._deck.pickObject(te);
24984
+ pickObject(Q) {
24985
+ return Bu(this._deck), this._deck.pickObject(Q);
24961
24986
  }
24962
24987
  /** Forwards the Deck.pickMultipleObjects method */
24963
- pickMultipleObjects(te) {
24964
- return Bu(this._deck), this._deck.pickMultipleObjects(te);
24988
+ pickMultipleObjects(Q) {
24989
+ return Bu(this._deck), this._deck.pickMultipleObjects(Q);
24965
24990
  }
24966
24991
  /** Forwards the Deck.pickObjects method */
24967
- pickObjects(te) {
24968
- return Bu(this._deck), this._deck.pickObjects(te);
24992
+ pickObjects(Q) {
24993
+ return Bu(this._deck), this._deck.pickObjects(Q);
24969
24994
  }
24970
24995
  /** Remove from map and releases all resources */
24971
24996
  finalize() {
@@ -24975,14 +25000,14 @@ class fy {
24975
25000
  getCanvas() {
24976
25001
  return this._map ? this._interleaved ? this._map.getCanvas() : this._deck.getCanvas() : null;
24977
25002
  }
24978
- _getViews(te) {
25003
+ _getViews(Q) {
24979
25004
  if (!this._props.views)
24980
- return Vu(te);
24981
- const we = Array.isArray(this._props.views) ? this._props.views : [this._props.views];
24982
- return we.some((ze) => ze.id === ka) ? this._props.views : [Vu(te), ...we];
25005
+ return Vu(Q);
25006
+ const ge = Array.isArray(this._props.views) ? this._props.views : [this._props.views];
25007
+ return ge.some((ze) => ze.id === ka) ? this._props.views : [Vu(Q), ...ge];
24983
25008
  }
24984
25009
  }
24985
- class _y {
25010
+ class xy {
24986
25011
  map;
24987
25012
  overlay;
24988
25013
  /** Our own compact attribution control (spec: "attribution becomes correct, not optional") — undefined when the author opted out. */
@@ -25007,10 +25032,10 @@ class _y {
25007
25032
  */
25008
25033
  initialized = !1;
25009
25034
  loadCallbacks = [];
25010
- constructor(te, we, De, ze, je = !0, R, h = !1) {
25035
+ constructor(Q, ge, Ee, ze, je = !0, R, h = !1) {
25011
25036
  this.showAttribution = je, this.attributionHost = R, this.map = new Kf.Map({
25012
- container: te,
25013
- style: we.style,
25037
+ container: Q,
25038
+ style: ge.style,
25014
25039
  // Determinism switch (issue #37 follow-up). NOT load-bearing for frame
25015
25040
  // identity — the idle LATCH below is (isolated 2026-08-26: the warm-
25016
25041
  // page byte-identity probe passes with the latch alone, because
@@ -25024,16 +25049,16 @@ class _y {
25024
25049
  // fade math goes NaN and every basemap label paints once, then
25025
25050
  // vanishes permanently on the first camera move or placement update.
25026
25051
  ...h ? { fadeDuration: 0 } : null,
25027
- center: [De.longitude, De.latitude],
25028
- zoom: De.zoom,
25029
- pitch: De.pitch ?? 0,
25030
- bearing: De.bearing ?? 0,
25052
+ center: [Ee.longitude, Ee.latitude],
25053
+ zoom: Ee.zoom,
25054
+ pitch: Ee.pitch ?? 0,
25055
+ bearing: Ee.bearing ?? 0,
25031
25056
  // MapLibre's default control is replaced by our own below so preset-
25032
25057
  // level attribution overrides survive style swaps deterministically.
25033
25058
  attributionControl: !1
25034
- }), this.mountAttribution(we.attribution), this.map.once("load", () => this.markInitialized()), this.map.on("error", (fe) => {
25059
+ }), this.mountAttribution(ge.attribution), this.map.once("load", () => this.markInitialized()), this.map.on("error", (fe) => {
25035
25060
  this.initialized || (console.error("[onlymapjs] basemap error before load — settling readiness:", fe?.error ?? fe), this.markInitialized());
25036
- }), this.overlay = new fy({
25061
+ }), this.overlay = new _y({
25037
25062
  interleaved: !1,
25038
25063
  ...ze,
25039
25064
  onAfterRender: (fe) => {
@@ -25059,8 +25084,8 @@ class _y {
25059
25084
  this.map.on("idle", () => {
25060
25085
  this.idleLatch = !0;
25061
25086
  });
25062
- for (const te of ["movestart", "dataloading", "sourcedataloading", "styledataloading"])
25063
- this.map.on(te, () => {
25087
+ for (const Q of ["movestart", "dataloading", "sourcedataloading", "styledataloading"])
25088
+ this.map.on(Q, () => {
25064
25089
  this.idleLatch = !1;
25065
25090
  });
25066
25091
  }
@@ -25093,9 +25118,9 @@ class _y {
25093
25118
  pendingCaptureRejects = /* @__PURE__ */ new Set();
25094
25119
  drainDeckCaptures() {
25095
25120
  if (this.deckCaptures.length === 0) return;
25096
- const te = this.deckCaptures;
25121
+ const Q = this.deckCaptures;
25097
25122
  this.deckCaptures = [];
25098
- for (const we of te) we();
25123
+ for (const ge of Q) ge();
25099
25124
  }
25100
25125
  /**
25101
25126
  * Scene snapshot (spec: "Snapshot API") — one composite canvas of the
@@ -25108,21 +25133,21 @@ class _y {
25108
25133
  * public Deck API, and the access is optional-chained).
25109
25134
  */
25110
25135
  captureComposite() {
25111
- return new Promise((te, we) => {
25112
- this.pendingCaptureRejects.add(we);
25113
- let De, ze;
25136
+ return new Promise((Q, ge) => {
25137
+ this.pendingCaptureRejects.add(ge);
25138
+ let Ee, ze;
25114
25139
  const je = (h) => {
25115
25140
  const fe = document.createElement("canvas");
25116
25141
  return fe.width = h.width, fe.height = h.height, fe.getContext("2d").drawImage(h, 0, 0), fe;
25117
25142
  }, R = () => {
25118
- if (!De || ze === void 0) return;
25143
+ if (!Ee || ze === void 0) return;
25119
25144
  const h = document.createElement("canvas");
25120
- h.width = De.width, h.height = De.height;
25145
+ h.width = Ee.width, h.height = Ee.height;
25121
25146
  const fe = h.getContext("2d");
25122
- fe.drawImage(De, 0, 0), ze && fe.drawImage(ze, 0, 0, h.width, h.height), this.pendingCaptureRejects.delete(we), te(h);
25147
+ fe.drawImage(Ee, 0, 0), ze && fe.drawImage(ze, 0, 0, h.width, h.height), this.pendingCaptureRejects.delete(ge), Q(h);
25123
25148
  };
25124
25149
  this.map.once("render", () => {
25125
- De = je(this.map.getCanvas()), R();
25150
+ Ee = je(this.map.getCanvas()), R();
25126
25151
  }), this.deckCaptures.push(() => {
25127
25152
  const h = this.overlay.getCanvas();
25128
25153
  ze = h ? je(h) : null, R();
@@ -25132,12 +25157,12 @@ class _y {
25132
25157
  markInitialized() {
25133
25158
  if (this.initialized) return;
25134
25159
  this.initialized = !0;
25135
- const te = this.loadCallbacks;
25160
+ const Q = this.loadCallbacks;
25136
25161
  this.loadCallbacks = [];
25137
- for (const we of te) we();
25162
+ for (const ge of Q) ge();
25138
25163
  }
25139
- onLoad(te) {
25140
- this.initialized ? te() : this.loadCallbacks.push(te);
25164
+ onLoad(Q) {
25165
+ this.initialized ? Q() : this.loadCallbacks.push(Q);
25141
25166
  }
25142
25167
  /** 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). */
25143
25168
  /**
@@ -25146,9 +25171,9 @@ class _y {
25146
25171
  * event) to gesture-driven move events; our own easeTo/jumpTo/fitBounds
25147
25172
  * fire without one. The ecosystem's standard user-vs-programmatic signal.
25148
25173
  */
25149
- onMove(te) {
25150
- this.map.on("move", (we) => {
25151
- this.moveSuppressed || te(we.originalEvent ? "user" : "programmatic");
25174
+ onMove(Q) {
25175
+ this.map.on("move", (ge) => {
25176
+ this.moveSuppressed || Q(ge.originalEvent ? "user" : "programmatic");
25152
25177
  });
25153
25178
  }
25154
25179
  /** Set while a capture-resolution override resizes the canvases — see onMove. */
@@ -25165,18 +25190,18 @@ class _y {
25165
25190
  * tiles and glyphs to redraw and `map.once("render")` alone would capture
25166
25191
  * the first, unconverged frame.
25167
25192
  */
25168
- setCapturePixelRatio(te) {
25193
+ setCapturePixelRatio(Q) {
25169
25194
  this.moveSuppressed = !0;
25170
25195
  try {
25171
- this.overlay.setProps({ useDevicePixels: te ?? !0 });
25172
- const we = this.map;
25173
- typeof we.setPixelRatio == "function" && we.setPixelRatio(te ?? (typeof devicePixelRatio == "number" ? devicePixelRatio : 1)), this.markBusy();
25196
+ this.overlay.setProps({ useDevicePixels: Q ?? !0 });
25197
+ const ge = this.map;
25198
+ typeof ge.setPixelRatio == "function" && ge.setPixelRatio(Q ?? (typeof devicePixelRatio == "number" ? devicePixelRatio : 1)), this.markBusy();
25174
25199
  } finally {
25175
25200
  this.moveSuppressed = !1;
25176
25201
  }
25177
25202
  }
25178
- setLayers(te) {
25179
- this.overlay.setProps({ layers: te });
25203
+ setLayers(Q) {
25204
+ this.overlay.setProps({ layers: Q });
25180
25205
  }
25181
25206
  /**
25182
25207
  * Scene lighting (spec: "Scene Lighting") — MapboxOverlay accepts full
@@ -25184,12 +25209,12 @@ class _y {
25184
25209
  * basemap frame dirty, so nudge a repaint; the overlay redraws with the
25185
25210
  * map's render pass.
25186
25211
  */
25187
- setEffects(te) {
25188
- this.overlay.setProps({ effects: te }), this.map.triggerRepaint();
25212
+ setEffects(Q) {
25213
+ this.overlay.setProps({ effects: Q }), this.map.triggerRepaint();
25189
25214
  }
25190
25215
  /** 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. */
25191
- setPickingRadius(te) {
25192
- this.overlay.setProps({ pickingRadius: te });
25216
+ setPickingRadius(Q) {
25217
+ this.overlay.setProps({ pickingRadius: Q });
25193
25218
  }
25194
25219
  /**
25195
25220
  * Live basemap switch (spec: "Basemap presets & switching"). Deck layers
@@ -25198,8 +25223,28 @@ class _y {
25198
25223
  * MapLibre diffs same-source styles and falls back to a full style reload
25199
25224
  * internally when the diff fails (the cross-provider case).
25200
25225
  */
25201
- setStyle(te) {
25202
- this.markBusy(), this.map.setStyle(te.style), te.attribution !== this.attributionText && this.mountAttribution(te.attribution);
25226
+ setStyle(Q) {
25227
+ this.markBusy(), this.map.setStyle(Q.style), Q.attribution !== this.attributionText && this.mountAttribution(Q.attribution);
25228
+ }
25229
+ /**
25230
+ * This basemap's attribution as plain text: every source's declared
25231
+ * attribution plus the preset's own line, de-duplicated.
25232
+ *
25233
+ * Every source the style DECLARES, not only the ones currently drawn — the
25234
+ * superset MapLibre's control narrows to. On a printed sheet an extra credit
25235
+ * costs nothing; a missing one is a licence breach.
25236
+ */
25237
+ attributions() {
25238
+ let Q = {};
25239
+ try {
25240
+ Q = this.map.getStyle?.()?.sources ?? {};
25241
+ } catch {
25242
+ }
25243
+ return ny([this.attributionText, ...Object.values(Q).map((ge) => ge?.attribution)]);
25244
+ }
25245
+ /** Called whenever a (new) style has loaded — the moment its sources' attributions are known. */
25246
+ onAttributionsChange(Q) {
25247
+ this.map.on("style.load", Q);
25203
25248
  }
25204
25249
  /**
25205
25250
  * (Re)mounts the compact attribution control. Source-declared attributions
@@ -25207,10 +25252,10 @@ class _y {
25207
25252
  * every style change; only the PRESET-level `attribution` override needs a
25208
25253
  * remount, since `customAttribution` is fixed at construction.
25209
25254
  */
25210
- mountAttribution(te) {
25211
- if (this.showAttribution && (this.attributionText = te, this.attribution && (this.map.removeControl(this.attribution), this.attributionElement?.remove(), this.attributionElement = void 0), this.attribution = new Kf.AttributionControl({ compact: !0, ...te ? { customAttribution: te } : {} }), this.map.addControl(this.attribution), this.attributionHost)) {
25212
- const we = this.map.getContainer().querySelector(".maplibregl-ctrl-attrib");
25213
- we && (we.setAttribute("data-om-mandated-chrome-item", "attribution"), we.style.margin = "0", this.attributionHost.appendChild(we), this.attributionElement = we);
25255
+ mountAttribution(Q) {
25256
+ if (this.attributionText = Q, !!this.showAttribution && (this.attribution && (this.map.removeControl(this.attribution), this.attributionElement?.remove(), this.attributionElement = void 0), this.attribution = new Kf.AttributionControl({ compact: !0, ...Q ? { customAttribution: Q } : {} }), this.map.addControl(this.attribution), this.attributionHost)) {
25257
+ const ge = this.map.getContainer().querySelector(".maplibregl-ctrl-attrib");
25258
+ ge && (ge.setAttribute("data-om-mandated-chrome-item", "attribution"), ge.style.margin = "0", this.attributionHost.appendChild(ge), this.attributionElement = ge);
25214
25259
  }
25215
25260
  }
25216
25261
  /**
@@ -25220,8 +25265,8 @@ class _y {
25220
25265
  * while a draw tool is active; drag-pan while a clip-box face handle is
25221
25266
  * grabbed, or it fights the map's own camera drag for every mousemove).
25222
25267
  */
25223
- setInteractive(te) {
25224
- te.doubleClickZoom === !1 ? this.map.doubleClickZoom.disable() : te.doubleClickZoom === !0 && this.map.doubleClickZoom.enable(), te.dragPan === !1 ? this.map.dragPan.disable() : te.dragPan === !0 && this.map.dragPan.enable();
25268
+ setInteractive(Q) {
25269
+ Q.doubleClickZoom === !1 ? this.map.doubleClickZoom.disable() : Q.doubleClickZoom === !0 && this.map.doubleClickZoom.enable(), Q.dragPan === !1 ? this.map.dragPan.disable() : Q.dragPan === !0 && this.map.dragPan.enable();
25225
25270
  }
25226
25271
  /**
25227
25272
  * Cap how far the user can tilt. Null restores MapLibre's own maximum.
@@ -25230,38 +25275,38 @@ class _y {
25230
25275
  * the gesture has produced it means the view visibly overshoots and springs
25231
25276
  * back, while a controller maximum simply refuses to go further.
25232
25277
  */
25233
- setMaxPitch(te) {
25234
- this.map.setMaxPitch(te ?? 85);
25278
+ setMaxPitch(Q) {
25279
+ this.map.setMaxPitch(Q ?? 85);
25235
25280
  }
25236
25281
  /** Floor how far the user can zoom out. Null restores MapLibre's own minimum. */
25237
- setMinZoom(te) {
25238
- this.map.setMinZoom(te ?? 0);
25282
+ setMinZoom(Q) {
25283
+ this.map.setMinZoom(Q ?? 0);
25239
25284
  }
25240
25285
  isLoaded() {
25241
25286
  return this.initialized;
25242
25287
  }
25243
25288
  getViewport() {
25244
- const te = this.map;
25289
+ const Q = this.map;
25245
25290
  return {
25246
- project: (we) => {
25247
- const De = te.project([we[0], we[1]]);
25248
- return [De.x, De.y];
25291
+ project: (ge) => {
25292
+ const Ee = Q.project([ge[0], ge[1]]);
25293
+ return [Ee.x, Ee.y];
25249
25294
  },
25250
25295
  getBounds: () => {
25251
- const we = te.getBounds();
25252
- return [we.getWest(), we.getSouth(), we.getEast(), we.getNorth()];
25296
+ const ge = Q.getBounds();
25297
+ return [ge.getWest(), ge.getSouth(), ge.getEast(), ge.getNorth()];
25253
25298
  },
25254
- width: te.getContainer().clientWidth,
25255
- height: te.getContainer().clientHeight
25299
+ width: Q.getContainer().clientWidth,
25300
+ height: Q.getContainer().clientHeight
25256
25301
  };
25257
25302
  }
25258
25303
  getViewState() {
25259
- const te = this.map.getCenter();
25260
- return { longitude: te.lng, latitude: te.lat, zoom: this.map.getZoom(), pitch: this.map.getPitch(), bearing: this.map.getBearing() };
25304
+ const Q = this.map.getCenter();
25305
+ return { longitude: Q.lng, latitude: Q.lat, zoom: this.map.getZoom(), pitch: this.map.getPitch(), bearing: this.map.getBearing() };
25261
25306
  }
25262
25307
  /** Instant recenter/rezoom — the basemap's own camera jump, no deck viewState involved. */
25263
- jumpTo(te, we) {
25264
- this.markBusy(), this.map.jumpTo(we !== void 0 ? { center: te, zoom: we } : { center: te });
25308
+ jumpTo(Q, ge) {
25309
+ this.markBusy(), this.map.jumpTo(ge !== void 0 ? { center: Q, zoom: ge } : { center: Q });
25265
25310
  }
25266
25311
  /**
25267
25312
  * Animated camera (spec: "Map Stories / Animation primitives") — MapLibre's
@@ -25269,24 +25314,24 @@ class _y {
25269
25314
  * the direct `easeTo` interpolation. duration 0 degrades to an instant
25270
25315
  * move, so this is also the one method that reaches pitch/bearing.
25271
25316
  */
25272
- easeTo(te, we, De = !1) {
25317
+ easeTo(Q, ge, Ee = !1) {
25273
25318
  this.markBusy();
25274
- const ze = { duration: we };
25275
- for (const [je, R] of Object.entries(te)) R !== void 0 && (ze[je] = R);
25276
- De && we > 0 ? this.map.flyTo(ze) : this.map.easeTo(ze);
25319
+ const ze = { duration: ge };
25320
+ for (const [je, R] of Object.entries(Q)) R !== void 0 && (ze[je] = R);
25321
+ Ee && ge > 0 ? this.map.flyTo(ze) : this.map.easeTo(ze);
25277
25322
  }
25278
- fitBounds(te, we, De = 0) {
25279
- this.markBusy(), this.map.fitBounds(te, { padding: we, duration: De });
25323
+ fitBounds(Q, ge, Ee = 0) {
25324
+ this.markBusy(), this.map.fitBounds(Q, { padding: ge, duration: Ee });
25280
25325
  }
25281
25326
  destroy() {
25282
25327
  if (this.pendingCaptureRejects.size > 0) {
25283
- const te = new Error("[onlymapjs] snapshot() canceled — the renderer was torn down before the capture frame rendered.");
25284
- for (const we of this.pendingCaptureRejects) we(te);
25328
+ const Q = new Error("[onlymapjs] snapshot() canceled — the renderer was torn down before the capture frame rendered.");
25329
+ for (const ge of this.pendingCaptureRejects) ge(Q);
25285
25330
  this.pendingCaptureRejects.clear();
25286
25331
  }
25287
25332
  this.deckCaptures = [], this.attributionElement?.remove(), this.attributionElement = void 0, this.overlay.finalize(), this.map.remove();
25288
25333
  }
25289
25334
  }
25290
25335
  export {
25291
- _y as MapLibreBasemapAdapter
25336
+ xy as MapLibreBasemapAdapter
25292
25337
  };