@maptalks/vt 0.105.2 → 0.106.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @maptalks/vt v0.105.2
2
+ * @maptalks/vt v0.106.0
3
3
  * LICENSE : undefined
4
4
  * (c) 2016-2025 maptalks.org
5
5
  */
@@ -395,10 +395,10 @@
395
395
  height: h
396
396
  };
397
397
  }
398
- function M(e, t) {
398
+ function S(e, t) {
399
399
  return t < 1 / 0 && (e.x < 0 || e.x > t || e.y < 0 || e.y > t);
400
400
  }
401
- function S(e) {
401
+ function M(e) {
402
402
  return null == e;
403
403
  }
404
404
  function P(e, t, n) {
@@ -1065,7 +1065,7 @@
1065
1065
  };
1066
1066
  var Te = le.exports, we = {
1067
1067
  exports: {}
1068
- }, Me = {
1068
+ }, Se = {
1069
1069
  aliceblue: [ 240, 248, 255 ],
1070
1070
  antiquewhite: [ 250, 235, 215 ],
1071
1071
  aqua: [ 0, 255, 255 ],
@@ -1214,8 +1214,8 @@
1214
1214
  whitesmoke: [ 245, 245, 245 ],
1215
1215
  yellow: [ 255, 255, 0 ],
1216
1216
  yellowgreen: [ 154, 205, 50 ]
1217
- }, Se = {};
1218
- for (var Pe in Me) Me.hasOwnProperty(Pe) && (Se[Me[Pe]] = Pe);
1217
+ }, Me = {};
1218
+ for (var Pe in Se) Se.hasOwnProperty(Pe) && (Me[Se[Pe]] = Pe);
1219
1219
  var Ie = we.exports = {
1220
1220
  rgb: {
1221
1221
  channels: 3,
@@ -1306,16 +1306,16 @@
1306
1306
  var t, n = e[0] / 255, i = e[1] / 255, r = e[2] / 255;
1307
1307
  return [ 100 * ((1 - n - (t = Math.min(1 - n, 1 - i, 1 - r))) / (1 - t) || 0), 100 * ((1 - i - t) / (1 - t) || 0), 100 * ((1 - r - t) / (1 - t) || 0), 100 * t ];
1308
1308
  }, Ie.rgb.keyword = function(e) {
1309
- var t = Se[e];
1309
+ var t = Me[e];
1310
1310
  if (t) return t;
1311
1311
  var n, i, r, s = 1 / 0;
1312
- for (var o in Me) if (Me.hasOwnProperty(o)) {
1313
- var a = (i = e, r = Me[o], Math.pow(i[0] - r[0], 2) + Math.pow(i[1] - r[1], 2) + Math.pow(i[2] - r[2], 2));
1312
+ for (var o in Se) if (Se.hasOwnProperty(o)) {
1313
+ var a = (i = e, r = Se[o], Math.pow(i[0] - r[0], 2) + Math.pow(i[1] - r[1], 2) + Math.pow(i[2] - r[2], 2));
1314
1314
  a < s && (s = a, n = o);
1315
1315
  }
1316
1316
  return n;
1317
1317
  }, Ie.keyword.rgb = function(e) {
1318
- return Me[e];
1318
+ return Se[e];
1319
1319
  }, Ie.rgb.xyz = function(e) {
1320
1320
  var t = e[0] / 255, n = e[1] / 255, i = e[2] / 255;
1321
1321
  return [ 100 * (.4124 * (t = t > .04045 ? Math.pow((t + .055) / 1.055, 2.4) : t / 12.92) + .3576 * (n = n > .04045 ? Math.pow((n + .055) / 1.055, 2.4) : n / 12.92) + .1805 * (i = i > .04045 ? Math.pow((i + .055) / 1.055, 2.4) : i / 12.92)), 100 * (.2126 * t + .7152 * n + .0722 * i), 100 * (.0193 * t + .1192 * n + .9505 * i) ];
@@ -1995,7 +1995,7 @@
1995
1995
  if (!e) return "true";
1996
1996
  const t = e[0];
1997
1997
  if (e.length <= 1) return "any" === t ? "false" : "true";
1998
- const n = "==" === t ? bt(e[1], e[2], "===", !1) : "!=" === t ? bt(e[1], e[2], "!==", !1) : "<" === t || ">" === t || "<=" === t || ">=" === t ? bt(e[1], e[2], t, !0) : "any" === t ? Tt(e.slice(1), "||") : "all" === t ? Tt(e.slice(1), "&&") : "none" === t ? St(Tt(e.slice(1), "||")) : "in" === t ? wt(e[1], e.slice(2)) : "!in" === t ? St(wt(e[1], e.slice(2))) : "has" === t ? Mt(e[1]) : "!has" === t ? St(Mt(e[1])) : "contains" === t ? function(e, t, n) {
1998
+ const n = "==" === t ? bt(e[1], e[2], "===", !1) : "!=" === t ? bt(e[1], e[2], "!==", !1) : "<" === t || ">" === t || "<=" === t || ">=" === t ? bt(e[1], e[2], t, !0) : "any" === t ? Tt(e.slice(1), "||") : "all" === t ? Tt(e.slice(1), "&&") : "none" === t ? Mt(Tt(e.slice(1), "||")) : "in" === t ? wt(e[1], e.slice(2)) : "!in" === t ? Mt(wt(e[1], e.slice(2))) : "has" === t ? St(e[1]) : "!has" === t ? Mt(St(e[1])) : "contains" === t ? function(e, t, n) {
1999
1999
  const i = vt(e);
2000
2000
  return void 0 !== n ? `(${i} + '').indexOf("${t}") === ${n}` : `(${i} + '').indexOf("${t}") >= 0`;
2001
2001
  }(e[1], e[2], e[3]) : "true";
@@ -2025,10 +2025,10 @@
2025
2025
  const n = JSON.stringify(t.sort(Pt)), i = vt(e);
2026
2026
  return t.length <= 200 ? `${n}.indexOf(${i}) !== -1` : `function(v, a, i, j) {\n while (i <= j) { var m = (i + j) >> 1;\n if (a[m] === v) return true; if (a[m] > v) j = m - 1; else i = m + 1;\n }\n return false; }(${i}, ${n},0,${t.length - 1})`;
2027
2027
  }
2028
- function Mt(e) {
2028
+ function St(e) {
2029
2029
  return "$id" === e ? '"id" in f' : `${JSON.stringify(e)} in p`;
2030
2030
  }
2031
- function St(e) {
2031
+ function Mt(e) {
2032
2032
  return `!(${e})`;
2033
2033
  }
2034
2034
  function Pt(e, t) {
@@ -2078,10 +2078,10 @@
2078
2078
  t + _(e);
2079
2079
  })).join("");
2080
2080
  }
2081
- function M(e, t) {
2081
+ function S(e, t) {
2082
2082
  return e + 22 + 75 * (e < 26) - ((0 != t) << 5);
2083
2083
  }
2084
- function S(e, t, n) {
2084
+ function M(e, t, n) {
2085
2085
  var i = 0;
2086
2086
  for (e = n ? x(e / f) : e >> 1, e += x(e / t); e > y * c >> 1; i += h) e = x(e / y);
2087
2087
  return x(i + (y + 1) * e / (e + u));
@@ -2094,7 +2094,7 @@
2094
2094
  for (s = y, o = 1, a = h; r >= m && v("invalid-input"), ((u = (p = e.charCodeAt(r++)) - 48 < 10 ? p - 22 : p - 65 < 26 ? p - 65 : p - 97 < 26 ? p - 97 : h) >= h || u > x((l - y) / o)) && v("overflow"),
2095
2095
  y += u * o, !(u < (f = a <= b ? 1 : a >= b + c ? c : a - b)); a += h) o > x(l / (d = h - f)) && v("overflow"),
2096
2096
  o *= d;
2097
- b = S(y - s, t = g.length + 1, 0 == s), x(y / t) > l - _ && v("overflow"), _ += x(y / t),
2097
+ b = M(y - s, t = g.length + 1, 0 == s), x(y / t) > l - _ && v("overflow"), _ += x(y / t),
2098
2098
  y %= t, g.splice(y++, 0, _);
2099
2099
  }
2100
2100
  return w(g);
@@ -2107,8 +2107,8 @@
2107
2107
  for (a - t > x((l - n) / (m = i + 1)) && v("overflow"), n += (a - t) * m, t = a,
2108
2108
  o = 0; o < g; ++o) if ((p = e[o]) < t && ++n > l && v("overflow"), p == t) {
2109
2109
  for (u = n, f = h; !(u < (d = f <= s ? 1 : f >= s + c ? c : f - s)); f += h) b = u - d,
2110
- y = h - d, A.push(_(M(d + b % y, 0))), u = x(b / y);
2111
- A.push(_(M(u, 0))), s = S(n, m, i == r), n = 0, ++i;
2110
+ y = h - d, A.push(_(S(d + b % y, 0))), u = x(b / y);
2111
+ A.push(_(S(u, 0))), s = M(n, m, i == r), n = 0, ++i;
2112
2112
  }
2113
2113
  ++n, ++t;
2114
2114
  }
@@ -2807,8 +2807,8 @@
2807
2807
  })), e;
2808
2808
  }
2809
2809
  }
2810
- var Mn = wn;
2811
- const Sn = [ "Unknown", "Point", "LineString", "Polygon" ];
2810
+ var Sn = wn;
2811
+ const Mn = [ "Unknown", "Point", "LineString", "Polygon" ];
2812
2812
  var Pn = class {
2813
2813
  constructor() {
2814
2814
  this.globals = null, this.feature = null, this.featureState = null, this.formattedSection = null,
@@ -2819,7 +2819,7 @@
2819
2819
  return this.feature && void 0 !== this.feature.id ? this.feature.id : null;
2820
2820
  }
2821
2821
  geometryType() {
2822
- return this.feature ? "number" == typeof this.feature.type ? Sn[this.feature.type] : this.feature.type : null;
2822
+ return this.feature ? "number" == typeof this.feature.type ? Mn[this.feature.type] : this.feature.type : null;
2823
2823
  }
2824
2824
  geometry() {
2825
2825
  return this.feature && "geometry" in this.feature ? this.feature.geometry : null;
@@ -3165,7 +3165,7 @@
3165
3165
  }
3166
3166
  _parse(e, t) {
3167
3167
  function n(e, t, n) {
3168
- return "assert" === n ? new vn(t, [ e ]) : "coerce" === n ? new Mn(t, [ e ]) : e;
3168
+ return "assert" === n ? new vn(t, [ e ]) : "coerce" === n ? new Sn(t, [ e ]) : e;
3169
3169
  }
3170
3170
  if (null !== e && "string" != typeof e && "boolean" != typeof e && "number" != typeof e || (e = [ "literal", e ]),
3171
3171
  Array.isArray(e)) {
@@ -3216,7 +3216,7 @@
3216
3216
  if (e instanceof Cn && "error" === e.name) return !1;
3217
3217
  if (e instanceof kn) return !1;
3218
3218
  if (e instanceof qn) return !1;
3219
- const t = e instanceof Mn || e instanceof vn;
3219
+ const t = e instanceof Sn || e instanceof vn;
3220
3220
  let n = !0;
3221
3221
  return e.eachChild((e => {
3222
3222
  n = t ? n && ii(e) : n && e instanceof mn;
@@ -3352,11 +3352,11 @@
3352
3352
  let t = (e.l + 16) / 116, n = isNaN(e.a) ? t : t + e.a / 500, i = isNaN(e.b) ? t : t - e.b / 200;
3353
3353
  return t = 1 * vi(t), n = ui * vi(n), i = fi * vi(i), new on(bi(3.2404542 * n - 1.5371385 * t - .4985314 * i), bi(-.969266 * n + 1.8760108 * t + .041556 * i), bi(.0556434 * n - .2040259 * t + 1.0572252 * i), e.alpha);
3354
3354
  }
3355
- function Mi(e, t, n) {
3355
+ function Si(e, t, n) {
3356
3356
  const i = t - e;
3357
3357
  return e + n * (i > 180 || i < -180 ? i - 360 * Math.round(i / 360) : i);
3358
3358
  }
3359
- const Si = {
3359
+ const Mi = {
3360
3360
  forward: Ti,
3361
3361
  reverse: wi,
3362
3362
  interpolate: function(e, t, n) {
@@ -3388,7 +3388,7 @@
3388
3388
  },
3389
3389
  interpolate: function(e, t, n) {
3390
3390
  return {
3391
- h: Mi(e.h, t.h, n),
3391
+ h: Si(e.h, t.h, n),
3392
3392
  c: hi(e.c, t.c, n),
3393
3393
  l: hi(e.l, t.l, n),
3394
3394
  alpha: hi(e.alpha, t.alpha, n)
@@ -3397,7 +3397,7 @@
3397
3397
  };
3398
3398
  var Ii = Object.freeze({
3399
3399
  __proto__: null,
3400
- lab: Si,
3400
+ lab: Mi,
3401
3401
  hcl: Pi
3402
3402
  });
3403
3403
  class Ci {
@@ -3461,7 +3461,7 @@
3461
3461
  const r = t.length;
3462
3462
  if (i >= t[r - 1]) return n[r - 1].evaluate(e);
3463
3463
  const s = ri(t, i), o = t[s], a = t[s + 1], l = Ci.interpolationFactor(this.interpolation, i, o, a), h = n[s].evaluate(e), c = n[s + 1].evaluate(e);
3464
- return "interpolate" === this.operator ? ci[this.type.kind.toLowerCase()](h, c, l) : "interpolate-hcl" === this.operator ? Pi.reverse(Pi.interpolate(Pi.forward(h), Pi.forward(c), l)) : Si.reverse(Si.interpolate(Si.forward(h), Si.forward(c), l));
3464
+ return "interpolate" === this.operator ? ci[this.type.kind.toLowerCase()](h, c, l) : "interpolate-hcl" === this.operator ? Pi.reverse(Pi.interpolate(Pi.forward(h), Pi.forward(c), l)) : Mi.reverse(Mi.interpolate(Mi.forward(h), Mi.forward(c), l));
3465
3465
  }
3466
3466
  eachChild(e) {
3467
3467
  e(this.input);
@@ -3978,10 +3978,10 @@
3978
3978
  slice: Yi,
3979
3979
  step: oi,
3980
3980
  string: vn,
3981
- "to-boolean": Mn,
3982
- "to-color": Mn,
3983
- "to-number": Mn,
3984
- "to-string": Mn,
3981
+ "to-boolean": Sn,
3982
+ "to-color": Sn,
3983
+ "to-number": Sn,
3984
+ "to-string": Sn,
3985
3985
  var: ei,
3986
3986
  within: qn
3987
3987
  };
@@ -4304,7 +4304,7 @@
4304
4304
  function wr(e) {
4305
4305
  return Array.isArray(e) && e.length > 0 && "string" == typeof e[0] && e[0] in cr;
4306
4306
  }
4307
- function Mr(e, t) {
4307
+ function Sr(e, t) {
4308
4308
  const n = new ni(cr, [], t ? function(e) {
4309
4309
  const t = {
4310
4310
  color: zt,
@@ -4321,7 +4321,7 @@
4321
4321
  } : void 0);
4322
4322
  return i ? ur(new Tr(i, t)) : fr(n.errors);
4323
4323
  }
4324
- class Sr {
4324
+ class Mr {
4325
4325
  constructor(e, t) {
4326
4326
  this.kind = e, this._styleExpression = t, this.isStateDependent = "constant" !== e && !Jn(t.expression);
4327
4327
  }
@@ -4348,7 +4348,7 @@
4348
4348
  }
4349
4349
  }
4350
4350
  function Ir(e, t) {
4351
- if ("error" === (e = Mr(e, t)).result) return e;
4351
+ if ("error" === (e = Sr(e, t)).result) return e;
4352
4352
  const n = e.value.expression, i = $n(n);
4353
4353
  if (!i && !function(e) {
4354
4354
  return "data-driven" === e["property-type"];
@@ -4361,7 +4361,7 @@
4361
4361
  if (!s && !r) return fr([ new Ft("", '"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.') ]);
4362
4362
  if (s instanceof Ft) return fr([ s ]);
4363
4363
  if (s instanceof Oi && !dr(t)) return fr([ new Ft("", '"interpolate" expressions cannot be used with this property') ]);
4364
- if (!s) return ur(new Sr(i ? "constant" : "source", e.value));
4364
+ if (!s) return ur(new Mr(i ? "constant" : "source", e.value));
4365
4365
  const o = s instanceof Oi ? s.interpolation : void 0;
4366
4366
  return ur(new Pr(i ? "camera" : "composite", e.value, s.labels, o));
4367
4367
  }
@@ -4417,13 +4417,13 @@
4417
4417
  } catch (e) {
4418
4418
  console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.\nThis is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md\nand paste the contents of this message in the report.\nThank you!\nFilter Expression:\n${JSON.stringify(n, null, 2)}\n `);
4419
4419
  }
4420
- const r = Mr(i, null);
4420
+ const r = Sr(i, null);
4421
4421
  let s = null;
4422
4422
  if ("error" === r.result) throw new Error(r.value.map((e => `${e.key}: ${e.message}`)).join(", "));
4423
4423
  s = (e, t, n) => r.value.evaluate(e, t, {}, n);
4424
4424
  let o = null, a = null;
4425
4425
  if (i !== n) {
4426
- const e = Mr(n, null);
4426
+ const e = Sr(n, null);
4427
4427
  if ("error" === e.result) throw new Error(e.value.map((e => `${e.key}: ${e.message}`)).join(", "));
4428
4428
  o = (t, n, i, r, s) => e.value.evaluate(t, n, {}, i, void 0, void 0, r, s), a = !$n(e.value.expression);
4429
4429
  }
@@ -4509,7 +4509,7 @@
4509
4509
  return !0;
4510
4510
  }
4511
4511
  },
4512
- createExpression: Mr,
4512
+ createExpression: Sr,
4513
4513
  createPropertyExpression: Ir,
4514
4514
  normalizePropertyExpression: function(e, t) {
4515
4515
  if (gr(e)) return new Cr(e, t);
@@ -4526,7 +4526,7 @@
4526
4526
  };
4527
4527
  }
4528
4528
  },
4529
- ZoomConstantExpression: Sr,
4529
+ ZoomConstantExpression: Mr,
4530
4530
  ZoomDependentExpression: Pr,
4531
4531
  StylePropertyFunction: Cr
4532
4532
  }, {isExpression: zr, createExpression: Vr} = Nr, Ur = {};
@@ -5163,14 +5163,14 @@
5163
5163
  return e || "Open Sans Regular";
5164
5164
  }
5165
5165
  const ws = /\{[\w-]+(?:\|[\w-]+)*\}/g;
5166
- function Ms(e, t) {
5166
+ function Ss(e, t) {
5167
5167
  if (!et(e)) return e;
5168
5168
  function n(e) {
5169
5169
  if (!t) return As;
5170
5170
  const n = t[e];
5171
5171
  return Je(n) ? As : Array.isArray(n) ? n.join() : n;
5172
5172
  }
5173
- const [i, r] = bs, s = Ss(e);
5173
+ const [i, r] = bs, s = Ms(e);
5174
5174
  for (let t = 0, o = s.length; t < o; t++) {
5175
5175
  const o = s[t], a = `${i}${o}${r}`;
5176
5176
  if (o.indexOf("|") > 0) {
@@ -5188,7 +5188,7 @@
5188
5188
  }
5189
5189
  return e;
5190
5190
  }
5191
- function Ss(e) {
5191
+ function Ms(e) {
5192
5192
  e += As;
5193
5193
  const [t, n] = bs, i = [];
5194
5194
  let r = !1, s = As;
@@ -5213,7 +5213,7 @@
5213
5213
  resolveExpVarNames: function e(t, n) {
5214
5214
  if (2 !== n.length || "get" !== n[0]) for (let i = 0; i < n.length; i++) 2 === n[i].length && "get" === n[i][0] ? t.push(n[i][1]) : Array.isArray(n[i]) && e(t, n[i]); else t.push(n[1]);
5215
5215
  },
5216
- resolveText: Ms,
5216
+ resolveText: Ss,
5217
5217
  resolveText_bak: function(e, t) {
5218
5218
  return et(e) ? e.replace(ws, (function(e) {
5219
5219
  if (!t) return "";
@@ -5232,7 +5232,7 @@
5232
5232
  resolveVarNames: function(e) {
5233
5233
  return e.match(ws);
5234
5234
  },
5235
- templateKeys: Ss
5235
+ templateKeys: Ms
5236
5236
  });
5237
5237
  const Cs = {
5238
5238
  "Latin-1 Supplement": e => e >= 128 && e <= 255,
@@ -5621,9 +5621,9 @@
5621
5621
  }
5622
5622
  getIconAndGlyph() {
5623
5623
  if (this.iconGlyph) return this.iconGlyph;
5624
- const {markerFileFn: e, markerTypeFn: t, markerPathFn: n, markerWidthFn: i, markerHeightFn: r, markerFillFn: s, markerFillPatternFileFn: o, markerFillOpacityFn: a, markerTextFitFn: l, markerTextFitPaddingFn: h, markerLineColorFn: c, markerLineWidthFn: u, markerLineOpacityFn: f, markerLineDasharrayFn: d, markerLinePatternFileFn: p, markerPathWidthFn: g, markerPathHeightFn: m, textNameFn: y, textFaceNameFn: x} = this._fnTypes, {zoom: _} = this.options, v = {}, b = this.symbol, A = this.symbolDef, T = this.feature.properties, w = e ? e(null, T) : b.markerFile, M = t ? t(null, T) : b.markerType, S = w || M || b.markerPath, P = !Je(this.symbolDef.textName);
5624
+ const {markerFileFn: e, markerTypeFn: t, markerPathFn: n, markerWidthFn: i, markerHeightFn: r, markerFillFn: s, markerFillPatternFileFn: o, markerFillOpacityFn: a, markerTextFitFn: l, markerTextFitPaddingFn: h, markerLineColorFn: c, markerLineWidthFn: u, markerLineOpacityFn: f, markerLineDasharrayFn: d, markerLinePatternFileFn: p, markerPathWidthFn: g, markerPathHeightFn: m, textNameFn: y, textFaceNameFn: x} = this._fnTypes, {zoom: _} = this.options, v = {}, b = this.symbol, A = this.symbolDef, T = this.feature.properties, w = e ? e(null, T) : b.markerFile, S = t ? t(null, T) : b.markerType, M = w || S || b.markerPath, P = !Je(this.symbolDef.textName);
5625
5625
  let I, C;
5626
- if (S) {
5626
+ if (M) {
5627
5627
  I = function(e, t, n, i, r, s) {
5628
5628
  if (Je(t.markerWidth) && Je(t.markerHeight)) return null;
5629
5629
  const o = "__fn_markerWidth".trim(), a = "__fn_markerHeight".trim();
@@ -5638,7 +5638,7 @@
5638
5638
  const t = A.textSize;
5639
5639
  let n = A.textName;
5640
5640
  ie(n) && (n = re(n)(_, T));
5641
- const i = Ms(n, T);
5641
+ const i = Ss(n, T);
5642
5642
  if (i) {
5643
5643
  const n = "__fn_textSize".trim(), r = "__fn_textSize_0".trim();
5644
5644
  ie(t) && !A[n] && (A[r] = re(t), A[n] = (e, t) => {
@@ -5656,11 +5656,11 @@
5656
5656
  }
5657
5657
  if (P && (C = _s(b, this.symbolDef, T, _)), !C && !I) return v;
5658
5658
  if (I && (I[0] = Math.ceil(I[0]), I[1] = Math.ceil(I[1])), C && (C[0] = Math.ceil(C[0]),
5659
- C[1] = Math.ceil(C[1])), this.iconSize = I, this.textSize = C, S && I[0] >= 0 && I[1] >= 0) {
5659
+ C[1] = Math.ceil(C[1])), this.iconSize = I, this.textSize = C, M && I[0] >= 0 && I[1] >= 0) {
5660
5660
  let e;
5661
- if (M) {
5661
+ if (S) {
5662
5662
  const t = {};
5663
- if (t.markerType = M, "path" === M && (t.markerPath = n ? n(null, T) : b.markerPath,
5663
+ if (t.markerType = S, "path" === S && (t.markerPath = n ? n(null, T) : b.markerPath,
5664
5664
  t.markerPathWidth = g ? g(null, T) : b.markerPathWidth, t.markerPathHeight = m ? m(null, T) : b.markerPathHeight),
5665
5665
  i) {
5666
5666
  const e = i(null, T);
@@ -5756,7 +5756,7 @@
5756
5756
  const e = y ? y(this.options.zoom, T) : b.textName;
5757
5757
  if (e || 0 === e) {
5758
5758
  const t = Ts(x ? x(null, T) : b.textFaceName);
5759
- let n = Ms(e, T);
5759
+ let n = Ss(e, T);
5760
5760
  n && n.length && (n = qs(n), v.glyph = {
5761
5761
  font: t,
5762
5762
  text: n
@@ -6036,37 +6036,37 @@
6036
6036
  const a = o[e];
6037
6037
  if ("vertex" === t) for (let e = 0; e < a.length; e++) {
6038
6038
  const t = a[e];
6039
- for (let o = 0; o < t.length; o++) M(t[o], n) || (s.push(t[o]), i && (0 === o ? xo(t[o], t[o], t[e + 1], r) : xo(t[o], t[o - 1], t[o], r)));
6039
+ for (let o = 0; o < t.length; o++) S(t[o], n) || (s.push(t[o]), i && (0 === o ? xo(t[o], t[o], t[e + 1], r) : xo(t[o], t[o - 1], t[o], r)));
6040
6040
  } else if ("vertex-first" === t) {
6041
6041
  const e = a[0];
6042
- e && e[0] && !M(e[0], n) && (s.push(e[0]), i && xo(e[0], e[0], e[1], r));
6042
+ e && e[0] && !S(e[0], n) && (s.push(e[0]), i && xo(e[0], e[0], e[1], r));
6043
6043
  } else if ("vertex-last" === t || "vertex-firstlast" === t) {
6044
6044
  const e = a[0];
6045
- if ("vertex-firstlast" === t && e && e[0] && !M(e[0], n) && (s.push(e[0]), i && xo(e[0], e[0], e[1], r)),
6046
- e && e[e.length - 1] && !M(e[e.length - 1], n)) {
6045
+ if ("vertex-firstlast" === t && e && e[0] && !S(e[0], n) && (s.push(e[0]), i && xo(e[0], e[0], e[1], r)),
6046
+ e && e[e.length - 1] && !S(e[e.length - 1], n)) {
6047
6047
  const t = e.length - 1;
6048
6048
  s.push(e[t]), i && xo(e[t], e[t - 1], e[t], r);
6049
6049
  }
6050
6050
  } else {
6051
6051
  const e = fo(a, 16);
6052
- M(e, n) || s.push(e);
6052
+ S(e, n) || s.push(e);
6053
6053
  }
6054
6054
  }
6055
6055
  } else if (2 === e.type) for (let o = 0; o < e.geometry.length; o++) {
6056
6056
  const a = e.geometry[o];
6057
- if ("vertex" === t) for (let e = 0; e < a.length; e++) M(a[e], n) || (s.push(a[e]),
6057
+ if ("vertex" === t) for (let e = 0; e < a.length; e++) S(a[e], n) || (s.push(a[e]),
6058
6058
  i && (0 === e ? xo(a[e], a[e], a[e + 1], r) : xo(a[e], a[e - 1], a[e], r))); else if ("vertex-last" === t || "vertex-firstlast" === t) {
6059
- if ("vertex-firstlast" !== t || M(a[0], n) || (s.push(a[0]), i && xo(a[0], a[0], a[1], r)),
6060
- a && a[a.length - 1] && !M(a[a.length - 1], n)) {
6059
+ if ("vertex-firstlast" !== t || S(a[0], n) || (s.push(a[0]), i && xo(a[0], a[0], a[1], r)),
6060
+ a && a[a.length - 1] && !S(a[a.length - 1], n)) {
6061
6061
  const e = a.length - 1;
6062
6062
  s.push(a[e]), i && xo(a[e], a[e - 1], a[e], r);
6063
6063
  }
6064
- } else M(a[0], n) || (s.push(a[0]), i && xo(a[0], a[0], a[1], r));
6064
+ } else S(a[0], n) || (s.push(a[0]), i && xo(a[0], a[0], a[1], r));
6065
6065
  } else if (1 === e.type) for (let t = 0; t < e.geometry.length; t++) {
6066
6066
  const r = e.geometry[t];
6067
6067
  for (let e = 0; e < r.length; e++) {
6068
6068
  const t = r[e];
6069
- M(t, n) || (i && (t.xRotation = 0, t.yRotation = 0, t.zRotation = 0), s.push(t));
6069
+ S(t, n) || (i && (t.xRotation = 0, t.yRotation = 0, t.zRotation = 0), s.push(t));
6070
6070
  }
6071
6071
  }
6072
6072
  return s;
@@ -6119,7 +6119,7 @@
6119
6119
  const r = (vo + "").trim(), s = function(e, t, n, i) {
6120
6120
  const r = (vo + "").trim(), {mergeOnPropertyFn: s} = n;
6121
6121
  if (!t.mergeOnProperty) return [];
6122
- if (!S(o = t.mergeOnProperty) && ("string" == typeof o || null !== o.constructor && o.constructor === String)) return [ {
6122
+ if (!M(o = t.mergeOnProperty) && ("string" == typeof o || null !== o.constructor && o.constructor === String)) return [ {
6123
6123
  features: e,
6124
6124
  property: t.mergeOnProperty
6125
6125
  } ];
@@ -6130,7 +6130,7 @@
6130
6130
  const o = e[n].properties = e[n].properties || {};
6131
6131
  o.$layer = e[n].layer, o.$type = e[n].type;
6132
6132
  const c = s ? s(i, o) : t.mergeOnProperty;
6133
- S(c) ? h.push(e[n]) : (void 0 === l[c] && (l[c] = a.length, a.push({
6133
+ M(c) ? h.push(e[n]) : (void 0 === l[c] && (l[c] = a.length, a.push({
6134
6134
  features: [],
6135
6135
  property: c
6136
6136
  })), a[l[c]].features.push(e[n]));
@@ -6295,12 +6295,16 @@
6295
6295
  name: "aMarkerDy"
6296
6296
  }), o;
6297
6297
  }
6298
+ _prepareFnTypes() {
6299
+ this.iconAtlas || (this._fnTypes.markerWidthFn = this._fnTypes.markerHeightFn = this._fnTypes.markerDxFn = this._fnTypes.markerDyFn = this._fnTypes.markerPitchAlignmentFn = this._fnTypes.markerRotationAlignmentFn = this._fnTypes.markerRotationFn = this._fnTypes.markerAllowOverlapFn = this._fnTypes.markerIgnorePlacementFn = this._fnTypes.markerOpacityFn = null),
6300
+ this.glyphAtlas || (this._fnTypes.textFillFn = this._fnTypes.textSizeFn = this._fnTypes.textHaloFillFn = this._fnTypes.textHaloRadiusFn = this._fnTypes.textHaloOpacityFn = this._fnTypes.textDxFn = this._fnTypes.textDyFn = this._fnTypes.textPitchAlignmentFn = this._fnTypes.textRotationAlignmentFn = this._fnTypes.textRotationFn = this._fnTypes.textAllowOverlapFn = this._fnTypes.textIgnorePlacementFn = this._fnTypes.textOpacityFn = null);
6301
+ }
6298
6302
  createDataPack() {
6299
6303
  if (!this.iconAtlas && !this.glyphAtlas) {
6300
6304
  if (!this.options.allowEmptyPack) return null;
6301
6305
  this.empty = !0;
6302
6306
  }
6303
- this.countOutOfAngle = 0, this.lineVertex = [];
6307
+ this._prepareFnTypes(), this.countOutOfAngle = 0, this.lineVertex = [];
6304
6308
  const e = super.createDataPack.apply(this, arguments);
6305
6309
  return e ? (e.lineVertex = new Int16Array(this.lineVertex), e.buffers.push(e.lineVertex.buffer),
6306
6310
  e) : null;
@@ -6348,7 +6352,7 @@
6348
6352
  }
6349
6353
  return r;
6350
6354
  }(r.horizontal, p, this.glyphAtlas.positions[t]), x && ($ = x(null, d), ie($) ? this.dynamicAttrs.aTextFill = 1 : $ = ht([], $)),
6351
- _ && (J = _(this.options.zoom, d), S(J) && (J = 14)), v && (K = v(null, d), ie(K) ? this.dynamicAttrs.aTextHaloFill = 1 : K = ht([], K)),
6355
+ _ && (J = _(this.options.zoom, d), M(J) && (J = 14)), v && (K = v(null, d), ie(K) ? this.dynamicAttrs.aTextHaloFill = 1 : K = ht([], K)),
6352
6356
  b && (Q = b(null, d)), A && (ee = 255 * A(null, d)), T && (te = T(null, d) || 0),
6353
6357
  I && (ne = I(null, d) || 0), C && (he = +("map" === C(null, d))), k && (ue = +("map" === k(null, d))),
6354
6358
  O && (de = P(O(null, d), 0, 360) * Math.PI / 180);
@@ -6386,8 +6390,8 @@
6386
6390
  writingMode: void 0,
6387
6391
  glyphOffset: [ 0, 0 ]
6388
6392
  } ];
6389
- }(), D && (re = D(null, d)), S(re) && (re = Z[0].tex.w), L && (se = L(null, d)),
6390
- S(se) && (se = Z[0].tex.h), H && (oe = H(null, d)), N && (ae = N(null, d)), z && (le = +("map" === z(null, d))),
6393
+ }(), D && (re = D(null, d)), M(re) && (re = Z[0].tex.w), L && (se = L(null, d)),
6394
+ M(se) && (se = Z[0].tex.h), H && (oe = H(null, d)), N && (ae = N(null, d)), z && (le = +("map" === z(null, d))),
6391
6395
  V && (ce = +("map" === V(null, d))), U && (fe = P(U(null, d), 0, 360) * Math.PI / 180)),
6392
6396
  ie(J) && (this.dynamicAttrs.aTextSize = 1), (ie(Q) || ie(ee)) && (this.dynamicAttrs.aTextHalo = 1),
6393
6397
  ie(re) && (this.dynamicAttrs.aMarkerWidth = 1), ie(se) && (this.dynamicAttrs.aMarkerHeight = 1),
@@ -6421,7 +6425,7 @@
6421
6425
  }, Te = "text" === this.options.pluginType;
6422
6426
  for (let e = 0; e < l.length; e++) {
6423
6427
  const t = l[e], n = t.z || ve || 0;
6424
- if (me !== 1 / 0 && M(t, me)) continue;
6428
+ if (me !== 1 / 0 && S(t, me)) continue;
6425
6429
  const i = t.x, r = t.y;
6426
6430
  m && Ae(!1, Z, i, r, n, t), g && (Te || Ae(!0, Y, i, r, n, t, !0), Ae(!0, Y, i, r, n, t, !1));
6427
6431
  }
@@ -6429,9 +6433,10 @@
6429
6433
  _fillPos(e, t, n, i, r, s, o, a, l, h) {
6430
6434
  this.fillPosition(e, t, n, i);
6431
6435
  let c = e.aShape.currentIndex;
6432
- e.aShape[c++] = r, e.aShape[c++] = s, e.aShape.currentIndex = c, c = e.aTexCoord.currentIndex,
6433
- e.aTexCoord[c++] = o, e.aTexCoord[c++] = a, "text" !== this.options.pluginType && (e.aTexCoord[c++] = +!!l,
6434
- e.aTexCoord[c++] = +!!h), e.aTexCoord.currentIndex = c;
6436
+ e.aShape[c++] = r, e.aShape[c++] = s, e.aShape.currentIndex = c, e.aTexCoord ? (c = e.aTexCoord.currentIndex,
6437
+ e.aTexCoord[c++] = o, e.aTexCoord[c++] = a, e.aTexCoord.currentIndex = c) : (c = e.aShape.currentIndex,
6438
+ "text" !== this.options.pluginType ? (e.aShape[c++] = +!!l + (o << 1), e.aShape[c++] = +!!h + (a << 1)) : (e.aShape[c++] = o,
6439
+ e.aShape[c++] = a), e.aShape.currentIndex = c);
6435
6440
  }
6436
6441
  _fillTextData(e, t, n, i, r, s, o, a) {
6437
6442
  let l = e.aCount.currentIndex;
@@ -6447,7 +6452,7 @@
6447
6452
  }
6448
6453
  }
6449
6454
  _fillFnTypeData(e, t, n, i, r, s, o, a, l, h, c, u, f, d, p, g, m, y, x, _, v, b) {
6450
- const {textFillFn: A, textSizeFn: T, textHaloFillFn: w, textHaloRadiusFn: M, textDxFn: P, textDyFn: I, textPitchAlignmentFn: C, textRotationAlignmentFn: k, textRotationFn: O, textAllowOverlapFn: F, textIgnorePlacementFn: R, textOpacityFn: E, textHaloOpacityFn: D, markerWidthFn: L, markerHeightFn: H, markerDxFn: N, markerDyFn: z, markerPitchAlignmentFn: V, markerRotationAlignmentFn: U, markerRotationFn: B, markerAllowOverlapFn: G, markerIgnorePlacementFn: j, markerOpacityFn: W} = this._fnTypes;
6455
+ const {textFillFn: A, textSizeFn: T, textHaloFillFn: w, textHaloRadiusFn: S, textDxFn: P, textDyFn: I, textPitchAlignmentFn: C, textRotationAlignmentFn: k, textRotationFn: O, textAllowOverlapFn: F, textIgnorePlacementFn: R, textOpacityFn: E, textHaloOpacityFn: D, markerWidthFn: L, markerHeightFn: H, markerDxFn: N, markerDyFn: z, markerPitchAlignmentFn: V, markerRotationAlignmentFn: U, markerRotationFn: B, markerAllowOverlapFn: G, markerIgnorePlacementFn: j, markerOpacityFn: W} = this._fnTypes;
6451
6456
  if (A) {
6452
6457
  let n = e.aTextFill.currentIndex;
6453
6458
  e.aTextFill[n++] = t[0], e.aTextFill[n++] = t[1], e.aTextFill[n++] = t[2], e.aTextFill[n++] = t[3],
@@ -6462,10 +6467,10 @@
6462
6467
  e.aTextHaloFill[t++] = i[0], e.aTextHaloFill[t++] = i[1], e.aTextHaloFill[t++] = i[2],
6463
6468
  e.aTextHaloFill[t++] = i[3], e.aTextHaloFill.currentIndex = t;
6464
6469
  }
6465
- if (M || D) {
6470
+ if (S || D) {
6466
6471
  let t = e.aTextHalo.currentIndex;
6467
6472
  e.aTextHalo[t++] = r || 0, e.aTextHalo.currentIndex = t, t = e.aTextHalo.currentIndex,
6468
- e.aTextHalo[t++] = 255 * (S(s) ? 1 : s), e.aTextHalo.currentIndex = t;
6473
+ e.aTextHalo[t++] = 255 * (M(s) ? 1 : s), e.aTextHalo.currentIndex = t;
6469
6474
  }
6470
6475
  if (P) {
6471
6476
  let t = e.aTextDx.currentIndex;
@@ -6537,7 +6542,7 @@
6537
6542
  _getAnchors(e, t, n) {
6538
6543
  const {feature: i, symbol: r} = e, s = this._getPlacement(e, r), o = i.properties, {markerSpacingFn: a, textSpacingFn: l, textMaxAngleFn: h} = this._fnTypes, c = ((a ? a(null, o) : r.markerSpacing) || (l ? l(null, o) : r.textSpacing) || 250) * n;
6539
6544
  let u = h ? h(this.options.zoom, o) : r.textMaxAngle;
6540
- S(u) && (u = 80), u *= Math.PI / 180;
6545
+ M(u) && (u = 80), u *= Math.PI / 180;
6541
6546
  const f = this.options.EXTENT, d = this.options.altitudeToTileScale, p = this._is3DPitchText();
6542
6547
  return mo(e, this.lineVertex, u, t, n, f, s, c, p, d);
6543
6548
  }
@@ -6551,12 +6556,8 @@
6551
6556
  getPackSDFFormat(e) {
6552
6557
  if ("line" !== this._textPlacement || e.isIconText) return [ ...this.getPositionFormat(), {
6553
6558
  type: Int16Array,
6554
- width: 2,
6559
+ width: 4,
6555
6560
  name: "aShape"
6556
- }, {
6557
- type: Uint16Array,
6558
- width: "text" === this.options.pluginType ? 2 : 4,
6559
- name: "aTexCoord"
6560
6561
  }, {
6561
6562
  type: Uint8Array,
6562
6563
  width: 1,
@@ -6595,17 +6596,6 @@
6595
6596
  }), e;
6596
6597
  }
6597
6598
  }
6598
- getPackMarkerFormat() {
6599
- return [ ...this.getPositionFormat(), {
6600
- type: Int16Array,
6601
- width: 2,
6602
- name: "aShape"
6603
- }, {
6604
- type: Uint16Array,
6605
- width: 3,
6606
- name: "aTexCoord"
6607
- } ];
6608
- }
6609
6599
  }
6610
6600
  class To {
6611
6601
  constructor(e) {
@@ -6663,8 +6653,8 @@
6663
6653
  return Math.atan2(this.y - e.y, this.x - e.x);
6664
6654
  }
6665
6655
  }
6666
- var wo, Mo = "undefined" != typeof Float32Array ? Float32Array : Array;
6667
- function So(e, t, n, i) {
6656
+ var wo, So = "undefined" != typeof Float32Array ? Float32Array : Array;
6657
+ function Mo(e, t, n, i) {
6668
6658
  return e[0] = t, e[1] = n, e[2] = i, e;
6669
6659
  }
6670
6660
  function Po(e, t) {
@@ -6688,13 +6678,13 @@
6688
6678
  Math.hypot || (Math.hypot = function() {
6689
6679
  for (var e = 0, t = arguments.length; t--; ) e += arguments[t] * arguments[t];
6690
6680
  return Math.sqrt(e);
6691
- }), wo = new Mo(3), Mo != Float32Array && (wo[0] = 0, wo[1] = 0, wo[2] = 0), function() {
6692
- var e = new Mo(4);
6693
- Mo != Float32Array && (e[0] = 0, e[1] = 0, e[2] = 0, e[3] = 0);
6681
+ }), wo = new So(3), So != Float32Array && (wo[0] = 0, wo[1] = 0, wo[2] = 0), function() {
6682
+ var e = new So(4);
6683
+ So != Float32Array && (e[0] = 0, e[1] = 0, e[2] = 0, e[3] = 0);
6694
6684
  }();
6695
6685
  !function() {
6696
- var e = new Mo(2);
6697
- Mo != Float32Array && (e[0] = 0, e[1] = 0);
6686
+ var e = new So(2);
6687
+ So != Float32Array && (e[0] = 0, e[1] = 0);
6698
6688
  }();
6699
6689
  const Fo = 63, Ro = Math.cos(Math.PI / 180 * 37.5), Eo = Math.pow(2, 16) / 1, Do = new s, Lo = new s, Ho = new s;
6700
6690
  class No extends gs {
@@ -6902,22 +6892,22 @@
6902
6892
  t.z = p.z, this.updateDistance(g, t), this.addCurrentVertex(t, y, 0, 0, d), g = t;
6903
6893
  }
6904
6894
  }
6905
- const M = g && m;
6906
- d.middleVertex = M;
6907
- let S = M ? n : h ? "butt" : i;
6908
- if (M && "round" === S && (b < s ? S = "miter" : b <= 2 && (S = "fakeround")), "miter" === S && b > r && !a && (S = "bevel"),
6909
- "bevel" === S && (b > 2 && (S = "flipbevel"), b < r && (S = "miter")), g && this.updateDistance(g, p),
6910
- "miter" === S) a ? (this.addCurrentVertex(p, y, 0, 0, d), d.dir = m.sub(p)._unit(),
6895
+ const S = g && m;
6896
+ d.middleVertex = S;
6897
+ let M = S ? n : h ? "butt" : i;
6898
+ if (S && "round" === M && (b < s ? M = "miter" : b <= 2 && (M = "fakeround")), "miter" === M && b > r && !a && (M = "bevel"),
6899
+ "bevel" === M && (b > 2 && (M = "flipbevel"), b < r && (M = "miter")), g && this.updateDistance(g, p),
6900
+ "miter" === M) a ? (this.addCurrentVertex(p, y, 0, 0, d), d.dir = m.sub(p)._unit(),
6911
6901
  this.addCurrentVertex(p, x, 0, 0, d)) : (l._mult(b), this.addCurrentVertex(p, l, 0, 0, d),
6912
- o && (d.currentNormal = x, d.dir = m.sub(p)._unit(), this.addCurrentVertex(p, l, 0, 0, d))); else if ("flipbevel" === S) {
6902
+ o && (d.currentNormal = x, d.dir = m.sub(p)._unit(), this.addCurrentVertex(p, l, 0, 0, d))); else if ("flipbevel" === M) {
6913
6903
  if (b > 100) l = x.mult(-1); else {
6914
6904
  const e = b * y.add(x).mag() / y.sub(x).mag();
6915
6905
  l._perp()._mult(e * (w ? -1 : 1));
6916
6906
  }
6917
6907
  this.addCurrentVertex(p, l, 0, 0, d), this.addCurrentVertex(p, l.mult(-1), 0, 0, d);
6918
- } else if ("bevel" === S || "fakeround" === S) {
6908
+ } else if ("bevel" === M || "fakeround" === M) {
6919
6909
  const e = -Math.sqrt(b * b - 1), t = w ? e : 0, n = w ? 0 : e;
6920
- if (g && this.addCurrentVertex(p, y, t, n, d), "fakeround" === S) {
6910
+ if (g && this.addCurrentVertex(p, y, t, n, d), "fakeround" === M) {
6921
6911
  const e = Math.round(180 * A / Math.PI / 20);
6922
6912
  for (let t = 1; t < e; t++) {
6923
6913
  let n = t / e;
@@ -6930,10 +6920,10 @@
6930
6920
  }
6931
6921
  }
6932
6922
  m && (d.currentNormal = x, d.dir = m.sub(p)._unit(), this.addCurrentVertex(p, x, -t, -n, d));
6933
- } else if ("butt" === S) this.addCurrentVertex(p, l, 0, 0, d); else if ("square" === S) {
6923
+ } else if ("butt" === M) this.addCurrentVertex(p, l, 0, 0, d); else if ("square" === M) {
6934
6924
  const e = g ? 1 : -1;
6935
6925
  this.addCurrentVertex(p, l, e, e, d);
6936
- } else "round" === S && (g && (this.addCurrentVertex(p, y, 0, 0, d), this.addCurrentVertex(p, y, 1, 1, d, !0)),
6926
+ } else "round" === M && (g && (this.addCurrentVertex(p, y, 0, 0, d), this.addCurrentVertex(p, y, 1, 1, d, !0)),
6937
6927
  m && (this.addCurrentVertex(p, x, -1, -1, d, !0), this.addCurrentVertex(p, x, 0, 0, d)));
6938
6928
  if (!a && T && t < c - 1) {
6939
6929
  const e = p.dist(m);
@@ -7311,13 +7301,13 @@
7311
7301
  return e.x === t.x && e.y === t.y;
7312
7302
  }
7313
7303
  function wa(e, t, n, i) {
7314
- const r = Sa(Aa(e, t, n)), s = Sa(Aa(e, t, i)), o = Sa(Aa(n, i, e)), a = Sa(Aa(n, i, t));
7315
- return r !== s && o !== a || !(0 !== r || !Ma(e, n, t)) || !(0 !== s || !Ma(e, i, t)) || !(0 !== o || !Ma(n, e, i)) || !(0 !== a || !Ma(n, t, i));
7304
+ const r = Ma(Aa(e, t, n)), s = Ma(Aa(e, t, i)), o = Ma(Aa(n, i, e)), a = Ma(Aa(n, i, t));
7305
+ return r !== s && o !== a || !(0 !== r || !Sa(e, n, t)) || !(0 !== s || !Sa(e, i, t)) || !(0 !== o || !Sa(n, e, i)) || !(0 !== a || !Sa(n, t, i));
7316
7306
  }
7317
- function Ma(e, t, n) {
7307
+ function Sa(e, t, n) {
7318
7308
  return t.x <= Math.max(e.x, n.x) && t.x >= Math.min(e.x, n.x) && t.y <= Math.max(e.y, n.y) && t.y >= Math.min(e.y, n.y);
7319
7309
  }
7320
- function Sa(e) {
7310
+ function Ma(e) {
7321
7311
  return e > 0 ? 1 : e < 0 ? -1 : 0;
7322
7312
  }
7323
7313
  function Pa(e, t) {
@@ -7436,7 +7426,7 @@
7436
7426
  }
7437
7427
  addHalfVertex(e, t, n, i, r, s, o, a) {
7438
7428
  const {x: l, y: h, z: c} = e, u = 1 * this.scaledDistance, f = this.options.radialSegments / 2, {x: d, y: p, z: g} = o.dir, m = function(e, t, n, i, r, s, o, a) {
7439
- So(Ua, n, i, r), So(Ba, s, o, 0), Io(Ga, Ua, Ba), Po(Ba, Ba), Po(Ga, Ga), ja[t] || (ja[t] = []);
7429
+ Mo(Ua, n, i, r), Mo(Ba, s, o, 0), Io(Ga, Ua, Ba), Po(Ba, Ba), Po(Ga, Ga), ja[t] || (ja[t] = []);
7440
7430
  const l = ja[t];
7441
7431
  for (var h = 0; h < t; h++) {
7442
7432
  const e = Math.PI * h / t, n = 0, i = 1 - Math.abs(e - n) / (Math.PI / 2);
@@ -7493,7 +7483,7 @@
7493
7483
  }
7494
7484
  const Xa = [], Ya = [], Za = [], qa = [], $a = [];
7495
7485
  function Ja(e, t, n, i, r, s, o, a) {
7496
- So(Ya, n, i, r), So(Za, s, o, 0), Io(qa, Ya, Za), Po(Za, Za), Po(qa, qa), Oo(Xa, e, t);
7486
+ Mo(Ya, n, i, r), Mo(Za, s, o, 0), Io(qa, Ya, Za), Po(Za, Za), Po(qa, qa), Oo(Xa, e, t);
7497
7487
  const l = function(e) {
7498
7488
  var t = e[0], n = e[1];
7499
7489
  return Math.hypot(t, n);
@@ -8034,7 +8024,8 @@
8034
8024
  this.addCurrentVertex(e, this.distance));
8035
8025
  }
8036
8026
  addLineVertex(e, t) {
8037
- this.fillPosition(e, t.x, t.y, t.z || 0), this.maxPos = Math.max(this.maxPos, Math.abs(t.x), Math.abs(t.y));
8027
+ const n = this.needAltitudeAttribute();
8028
+ this.fillPosition(e, t.x, t.y, t.z || 0), this.maxPos = n ? Math.max(this.maxPos, Math.abs(t.x), Math.abs(t.y)) : Math.max(this.maxPos, Math.abs(t.x), Math.abs(t.y), Math.abs(t.z || 0));
8038
8029
  }
8039
8030
  addElements(e, t) {
8040
8031
  this.maxIndex = Math.max(this.maxIndex, this.offset + e, this.offset + t);
@@ -8085,7 +8076,7 @@
8085
8076
  r.aColor.currentIndex = e;
8086
8077
  }
8087
8078
  let n;
8088
- n = h ? Math.max(Math.abs(t.x), Math.abs(t.y)) : Math.max(Math.abs(t.x), Math.abs(t.y), Math.abs(t.z)),
8079
+ n = h ? Math.max(Math.abs(t.x), Math.abs(t.y)) : Math.max(Math.abs(t.x), Math.abs(t.y), Math.abs(t.z || 0)),
8089
8080
  n > this.maxPos && (this.maxPos = n);
8090
8081
  }
8091
8082
  }
@@ -8432,7 +8423,7 @@
8432
8423
  function w(e, t, n) {
8433
8424
  return Math.min(Math.max(t, e), n);
8434
8425
  }
8435
- function M(e) {
8426
+ function S(e) {
8436
8427
  var t = Math.round(e).toString(16).toUpperCase();
8437
8428
  return t.length < 2 ? "0" + t : t;
8438
8429
  }
@@ -8495,7 +8486,7 @@
8495
8486
  return null;
8496
8487
  }, T.to.hex = function() {
8497
8488
  var e = _(arguments);
8498
- return "#" + M(e[0]) + M(e[1]) + M(e[2]) + (e[3] < 1 ? M(Math.round(255 * e[3])) : "");
8489
+ return "#" + S(e[0]) + S(e[1]) + S(e[2]) + (e[3] < 1 ? S(Math.round(255 * e[3])) : "");
8499
8490
  }, T.to.rgb = function() {
8500
8491
  var e = _(arguments);
8501
8492
  return e.length < 4 || 1 === e[3] ? "rgb(" + Math.round(e[0]) + ", " + Math.round(e[1]) + ", " + Math.round(e[2]) + ")" : "rgba(" + Math.round(e[0]) + ", " + Math.round(e[1]) + ", " + Math.round(e[2]) + ", " + e[3] + ")";
@@ -8511,7 +8502,7 @@
8511
8502
  }, T.to.keyword = function(e) {
8512
8503
  return b[e.slice(0, 3)];
8513
8504
  };
8514
- var S = u.exports, P = {
8505
+ var M = u.exports, P = {
8515
8506
  exports: {}
8516
8507
  }, I = {
8517
8508
  aliceblue: [ 240, 248, 255 ],
@@ -9027,7 +9018,7 @@
9027
9018
  }(i);
9028
9019
  }));
9029
9020
  }));
9030
- var G = S, j = B, W = [].slice, X = [ "keyword", "gray", "hex" ], Y = {};
9021
+ var G = M, j = B, W = [].slice, X = [ "keyword", "gray", "hex" ], Y = {};
9031
9022
  Object.keys(j).forEach((function(e) {
9032
9023
  Y[W.call(j[e].labels).sort().join("")] = e;
9033
9024
  }));
@@ -9468,10 +9459,10 @@
9468
9459
  function we(e) {
9469
9460
  return e && "object" == typeof e && (e.stops || e.property && "identity" === e.type || e.expression && "calculate-expression" === e.type);
9470
9461
  }
9471
- function Me(e) {
9462
+ function Se(e) {
9472
9463
  return Ie(e, "exponential");
9473
9464
  }
9474
- function Se(e) {
9465
+ function Me(e) {
9475
9466
  return Ie(e, "interval");
9476
9467
  }
9477
9468
  function Pe(e, t) {
@@ -9489,7 +9480,7 @@
9489
9480
  const l = function(e) {
9490
9481
  Object.defineProperty(o, e, {
9491
9482
  get: function() {
9492
- return this["__fn_" + e] || (this["__fn_" + e] = Me(this["_" + e])), this["__fn_" + e].apply(this, t());
9483
+ return this["__fn_" + e] || (this["__fn_" + e] = Se(this["_" + e])), this["__fn_" + e].apply(this, t());
9493
9484
  },
9494
9485
  set: function(t) {
9495
9486
  this["_" + e] = t;
@@ -10248,9 +10239,9 @@
10248
10239
  return 3 === e.length && (At[3] = 255), At;
10249
10240
  }
10250
10241
  function wt(e, t = 4) {
10251
- return Mt.bind(this, e, t);
10242
+ return St.bind(this, e, t);
10252
10243
  }
10253
- function Mt(e, t, n) {
10244
+ function St(e, t, n) {
10254
10245
  if (Array.isArray(n)) return 3 === n.length && 4 === t && n.push(1), n;
10255
10246
  if (e && e[n]) return e[n];
10256
10247
  if (void 0 !== n.r && void 0 !== n.g && void 0 !== n.b && void 0 !== n.a) {
@@ -10259,7 +10250,7 @@
10259
10250
  const i = Q(n).unitArray();
10260
10251
  return 3 === i.length && 4 === t && i.push(1), e && (e[n] = i), i;
10261
10252
  }
10262
- function St(e, t, n, i) {
10253
+ function Mt(e, t, n, i) {
10263
10254
  if (e.fill) e.fill(t, n, i); else for (let r = n; r < i; r++) e[r] = t;
10264
10255
  }
10265
10256
  function Pt(e) {
@@ -12373,7 +12364,7 @@
12373
12364
  if (!e) return "true";
12374
12365
  const t = e[0];
12375
12366
  if (e.length <= 1) return "any" === t ? "false" : "true";
12376
- return `(${"==" === t ? Mn(e[1], e[2], "===", !1) : "!=" === t ? Mn(e[1], e[2], "!==", !1) : "<" === t || ">" === t || "<=" === t || ">=" === t ? Mn(e[1], e[2], t, !0) : "any" === t ? Pn(e.slice(1), "||") : "all" === t ? Pn(e.slice(1), "&&") : "none" === t ? kn(Pn(e.slice(1), "||")) : "in" === t ? In(e[1], e.slice(2)) : "!in" === t ? kn(In(e[1], e.slice(2))) : "has" === t ? Cn(e[1]) : "!has" === t ? kn(Cn(e[1])) : "contains" === t ? function(e, t, n) {
12367
+ return `(${"==" === t ? Sn(e[1], e[2], "===", !1) : "!=" === t ? Sn(e[1], e[2], "!==", !1) : "<" === t || ">" === t || "<=" === t || ">=" === t ? Sn(e[1], e[2], t, !0) : "any" === t ? Pn(e.slice(1), "||") : "all" === t ? Pn(e.slice(1), "&&") : "none" === t ? kn(Pn(e.slice(1), "||")) : "in" === t ? In(e[1], e.slice(2)) : "!in" === t ? kn(In(e[1], e.slice(2))) : "has" === t ? Cn(e[1]) : "!has" === t ? kn(Cn(e[1])) : "contains" === t ? function(e, t, n) {
12377
12368
  const i = wn(e);
12378
12369
  return void 0 !== n ? `(${i} + '').indexOf("${t}") === ${n}` : `(${i} + '').indexOf("${t}") >= 0`;
12379
12370
  }(e[1], e[2], e[3]) : "true"})`;
@@ -12381,17 +12372,17 @@
12381
12372
  function wn(e) {
12382
12373
  return "$" === e[0] ? "f." + e.substring(1) : "p[" + JSON.stringify(e) + "]";
12383
12374
  }
12384
- function Mn(e, t, n, i) {
12375
+ function Sn(e, t, n, i) {
12385
12376
  if ("object" == typeof (r = e) && r && e.op) return function(e, t, n, i) {
12386
12377
  const r = e.property, s = e.op;
12387
12378
  let o = wn(r);
12388
12379
  return "length" !== s ? (console.error(`not support ${s} op`), "false") : (o = `((${o}+='').length)`,
12389
- Sn(o, r, t, n, i));
12380
+ Mn(o, r, t, n, i));
12390
12381
  }(e, t, n, i);
12391
12382
  var r;
12392
- return Sn(wn(e), e, t, n, i);
12383
+ return Mn(wn(e), e, t, n, i);
12393
12384
  }
12394
- function Sn(e, t, n, i, r) {
12385
+ function Mn(e, t, n, i, r) {
12395
12386
  const s = "$type" === t ? An.indexOf(n) : JSON.stringify(n);
12396
12387
  return (r ? `typeof ${e}=== typeof ${s}&&` : "") + e + i + s;
12397
12388
  }
@@ -12783,7 +12774,11 @@
12783
12774
  for (let n = 0; n < e.length; n++) if (ti(t[e[n]])) return !0;
12784
12775
  return !1;
12785
12776
  }(a, t) ? (ti(t[o]) && Xn(e, t, n), l) : (void 0 === n.index && (e.deleteData(s),
12786
- Yn(e, s)), null) : ti(t[o]) ? (l = e.data[s] = new n.type(n.width * r.length), function(e, t, n, i, r) {
12777
+ Yn(e, s)), null) : ti(t[o]) && function(e, t) {
12778
+ if (e.startsWith("marker") && !t.properties.iconAtlas) return !1;
12779
+ if (e.startsWith("text") && !t.properties.glyphAtlas) return !1;
12780
+ return !0;
12781
+ }(o, e) ? (l = e.data[s] = new n.type(n.width * r.length), function(e, t, n, i, r) {
12787
12782
  const {attrName: s} = i, o = (Bn + s + "Index").trim();
12788
12783
  Xn(t, n, i);
12789
12784
  const a = t.properties[o];
@@ -12796,7 +12791,7 @@
12796
12791
  const l = function(e) {
12797
12792
  if (!e) return Jn;
12798
12793
  const t = [];
12799
- for (let n = 0; n < e.length; n++) we(e[n][1]) && !Me(e[n][1]).isZoomConstant && t.push(e[n][0]);
12794
+ for (let n = 0; n < e.length; n++) we(e[n][1]) && !Se(e[n][1]).isZoomConstant && t.push(e[n][0]);
12800
12795
  return t;
12801
12796
  }(t[r].stops), h = "identity" === t[r].type && Un.checkIfIdentityZoomDependent(r, t[r].property, s.features);
12802
12797
  if (!h && !l.length) return void (void 0 === n.index && Yn(e, i));
@@ -12831,7 +12826,7 @@
12831
12826
  Kn(o, i, l, t);
12832
12827
  continue;
12833
12828
  }
12834
- const c = Wn(o, n, l), u = l.define;
12829
+ const c = Wn(o, n, l, t), u = l.define;
12835
12830
  if (c) {
12836
12831
  const n = (Bn + h + "Index").trim();
12837
12832
  if (Kn(o, o.properties[n], l, t), t._getFeatureStateStamp && (o._featureTimestamp = t._getFeatureStateStamp()),
@@ -12908,7 +12903,7 @@
12908
12903
  e.dirty = !0;
12909
12904
  }
12910
12905
  } else if (s > 1) for (let t = i * s; t < r * s; t += s) e[t + o] !== c && (e[t + o] = c,
12911
- e.dirty = !0); else e[i] !== c && (St(e, c, i, r), e.dirty = !0);
12906
+ e.dirty = !0); else e[i] !== c && (Mt(e, c, i, r), e.dirty = !0);
12912
12907
  }
12913
12908
  function ti(e) {
12914
12909
  return Un.isFnTypeSymbol(e);
@@ -13053,7 +13048,7 @@
13053
13048
  const r = ui.set(t, n)._multi(i / e.res);
13054
13049
  return e.extent2d.contains(r);
13055
13050
  }
13056
- const {SYMBOLS_NEED_REBUILD_IN_VT: gi, StyleUtil: mi, FuncTypeUtil: yi} = h(), {loginIBLResOnCanvas: xi, logoutIBLResOnCanvas: _i, getIBLResOnCanvas: vi} = n.reshader.pbr.PBRUtils, bi = "__gl_textures", Ai = [], Ti = new r.Point(0, 0), wi = new r.Point(0, 0), Mi = new Float32Array(1), Si = [], Pi = e => 0 === e.properties.level, Ii = e => e.properties.level > 0;
13051
+ const {SYMBOLS_NEED_REBUILD_IN_VT: gi, StyleUtil: mi, FuncTypeUtil: yi} = h(), {loginIBLResOnCanvas: xi, logoutIBLResOnCanvas: _i, getIBLResOnCanvas: vi} = n.reshader.pbr.PBRUtils, bi = "__gl_textures", Ai = [], Ti = new r.Point(0, 0), wi = new r.Point(0, 0), Si = new Float32Array(1), Mi = [], Pi = e => 0 === e.properties.level, Ii = e => e.properties.level > 0;
13057
13052
  class Ci {
13058
13053
  static getBloomSymbol() {
13059
13054
  return [ "bloom" ];
@@ -13082,7 +13077,7 @@
13082
13077
  return n.getTileLevelValue && n.getTileLevelValue(e, t) || 0;
13083
13078
  }
13084
13079
  getAnalysisMeshes() {
13085
- return this.getShadowMeshes ? this.getShadowMeshes() : Si;
13080
+ return this.getShadowMeshes ? this.getShadowMeshes() : Mi;
13086
13081
  }
13087
13082
  isVisible() {
13088
13083
  const {minZoom: e, maxZoom: t} = this.sceneConfig, n = this.getMap().getZoom();
@@ -13146,7 +13141,7 @@
13146
13141
  if (n) for (const i in n) n[i] && t[i].renderUniforms && mt(e, t[i].renderUniforms);
13147
13142
  }
13148
13143
  createGeometries(e, t) {
13149
- if (!e.length) return Si;
13144
+ if (!e.length) return Mi;
13150
13145
  const n = [];
13151
13146
  for (let i = 0; i < e.length; i++) if (e[i]) if (void 0 !== e[i].ref) n[e[i].ref] ? n.push({
13152
13147
  geometry: n[e[i].ref].geometry,
@@ -13426,7 +13421,7 @@
13426
13421
  enumerable: !0
13427
13422
  }) : r[e] = a[e];
13428
13423
  }
13429
- return we(n.visible) && (this._visibleFn[e] = Me(n.visible)), i;
13424
+ return we(n.visible) && (this._visibleFn[e] = Se(n.visible)), i;
13430
13425
  }
13431
13426
  getSymbolDef(e) {
13432
13427
  return this.symbolDef[e.index];
@@ -13442,7 +13437,7 @@
13442
13437
  const e = this.getMap(), t = [], n = () => (t[0] = e.getZoom(), t);
13443
13438
  this._symbol = [], this._visibleFn = [];
13444
13439
  for (let e = 0; e < this.symbolDef.length; e++) this._symbol[e] = yi.loadSymbolFnTypes(mt({}, this.symbolDef[e]), n),
13445
- this.symbolDef[e] && we(this.symbolDef[e].visible) && (this._visibleFn[e] = Me(this.symbolDef[e].visible));
13440
+ this.symbolDef[e] && we(this.symbolDef[e].visible) && (this._visibleFn[e] = Se(this.symbolDef[e].visible));
13446
13441
  }
13447
13442
  getFnTypeConfig(e) {
13448
13443
  this._fnTypeConfigs || (this._fnTypeConfigs = []);
@@ -13617,7 +13612,7 @@
13617
13612
  return t;
13618
13613
  }(JSON.stringify(e));
13619
13614
  let a = s[o];
13620
- return a || (a = s[o] = r ? Se(e) : Me(e)), a(n.getZoom(), i);
13615
+ return a || (a = s[o] = r ? Me(e) : Se(e)), a(n.getZoom(), i);
13621
13616
  }
13622
13617
  highlight(e) {
13623
13618
  this._highlighted = e, this._highlightTimestamp = this.layer.getRenderer().getFrameTimestamp(),
@@ -13697,25 +13692,25 @@
13697
13692
  }
13698
13693
  const v = performance.now();
13699
13694
  n.terrainQueryStatus[c] = x;
13700
- const {xmin: b, ymax: A} = l, T = Ti.set(b, A), w = this.layer.getTileSize().width / n.extent, M = t.length / e.length;
13701
- let S = e.queryResult;
13702
- S || (S = e.queryResult = new Map);
13695
+ const {xmin: b, ymax: A} = l, T = Ti.set(b, A), w = this.layer.getTileSize().width / n.extent, S = t.length / e.length;
13696
+ let M = e.queryResult;
13697
+ M || (M = e.queryResult = new Map);
13703
13698
  let P = !0;
13704
13699
  for (let n = i; n <= s; n++) {
13705
- let i = t[n * M];
13700
+ let i = t[n * S];
13706
13701
  i < 0 ? i = 0 : i > a && (i = a);
13707
- let r = t[n * M + 1];
13702
+ let r = t[n * S + 1];
13708
13703
  r < 0 ? r = 0 : r > a && (r = a);
13709
13704
  const s = i + r * a;
13710
- let l, h, c = S.get(s);
13705
+ let l, h, c = M.get(s);
13711
13706
  if (c || 0 === c) e[n] !== c && (e[n] = c, e.dirty = !0); else {
13712
13707
  for (let e = 0; e < m.length; e++) if (pi(m[e], b + w * i, A - w * r, o)) {
13713
13708
  l = m[e];
13714
13709
  break;
13715
13710
  }
13716
13711
  l && (g.getRenderer().isTileCached(l.id) || e[n] === at) && (wi.set(i, r), h = this.layer.queryTilePointTerrain(wi, l, T, a, o)),
13717
- c = e[n], h && (c = null === h[0] ? at : h[0], Mi[0] = c, c = Mi[0]), e[n] !== c && (e[n] = c,
13718
- e.dirty = !0), h && h[1] ? S.set(s, c) : P = !1;
13712
+ c = e[n], h && (c = null === h[0] ? at : h[0], Si[0] = c, c = Si[0]), e[n] !== c && (e[n] = c,
13713
+ e.dirty = !0), h && h[1] ? M.set(s, c) : P = !1;
13719
13714
  }
13720
13715
  }
13721
13716
  _.altitudeQueryFrameTime = (_.altitudeQueryFrameTime || 0) + (performance.now() - v),
@@ -13925,9 +13920,9 @@
13925
13920
  if (!(t = t && t.geometry)) return;
13926
13921
  const s = t.properties.features;
13927
13922
  if (Vn(s)) return;
13928
- const o = e.polygonPatternFileWidth, a = e.polygonPatternFileHeight, l = Me(e.polygonPatternFileOrigin);
13923
+ const o = e.polygonPatternFileWidth, a = e.polygonPatternFileHeight, l = Se(e.polygonPatternFileOrigin);
13929
13924
  let h, c;
13930
- we(o) && (h = Me(o)), we(a) && (c = Me(a));
13925
+ we(o) && (h = Se(o)), we(a) && (c = Se(a));
13931
13926
  const {aPickingId: u, aPatternOrigin: f} = t.data, d = u.length, p = new Float32Array(2 * d);
13932
13927
  let g, m, y;
13933
13928
  for (let e = 0, t = u.length; e < t; e++) {
@@ -13955,8 +13950,8 @@
13955
13950
  const r = t.properties.features;
13956
13951
  if (Vn(r)) return;
13957
13952
  const s = this.getMap();
13958
- let o = we(e.uvOffsetInMeter) && Se(e.uvOffsetInMeter);
13959
- const a = Me(e.uvOffset), l = Me(e.polygonPatternFileOrigin), {aPickingId: h, aPatternOrigin: c} = t.data, u = h.length, f = new Float32Array(2 * u);
13953
+ let o = we(e.uvOffsetInMeter) && Me(e.uvOffsetInMeter);
13954
+ const a = Se(e.uvOffset), l = Se(e.polygonPatternFileOrigin), {aPickingId: h, aPatternOrigin: c} = t.data, u = h.length, f = new Float32Array(2 * u);
13960
13955
  let d, p, g;
13961
13956
  for (let e = 0, t = h.length; e < t; e++) {
13962
13957
  if (h[e] === d) {
@@ -13981,7 +13976,7 @@
13981
13976
  if (!(t = t && t.geometry)) return;
13982
13977
  const r = t.properties.features;
13983
13978
  if (Vn(r)) return;
13984
- const s = this.getMap(), o = Me(e.polygonPatternFileOrigin), a = t.data.aPickingId, l = a.length, h = new Float32Array(2 * l);
13979
+ const s = this.getMap(), o = Se(e.polygonPatternFileOrigin), a = t.data.aPickingId, l = a.length, h = new Float32Array(2 * l);
13985
13980
  let c, u, f;
13986
13981
  for (let e = 0, t = a.length; e < t; e++) {
13987
13982
  if (a[e] === c) {
@@ -13996,7 +13991,7 @@
13996
13991
  t.data.aPatternOrigin = h;
13997
13992
  }
13998
13993
  createFnTypeConfig(e, t) {
13999
- const n = Se(t.polygonFill), i = Me(t.polygonOpacity), r = Me(t.uvScale), s = Me(t.uvOffset), o = new Uint8Array(1), a = new Uint16Array(2), l = new Uint8Array(2);
13994
+ const n = Me(t.polygonFill), i = Se(t.polygonOpacity), r = Se(t.uvScale), s = Se(t.uvOffset), o = new Uint8Array(1), a = new Uint16Array(2), l = new Uint8Array(2);
14000
13995
  return [ {
14001
13996
  attrName: "aColor",
14002
13997
  symbolName: "polygonFill",
@@ -14252,7 +14247,7 @@
14252
14247
  super.paint(e);
14253
14248
  }
14254
14249
  createFnTypeConfig(e, t) {
14255
- const n = Se(t.lineColor), i = Se(t.aLinePatternAnimSpeed), r = Se(t.aLinePatternGap), s = this.createShapeFnTypeConfigs(e, t), o = new Int8Array(2);
14250
+ const n = Me(t.lineColor), i = Me(t.aLinePatternAnimSpeed), r = Me(t.aLinePatternGap), s = this.createShapeFnTypeConfigs(e, t), o = new Int8Array(2);
14256
14251
  return [ {
14257
14252
  attrName: "aColor",
14258
14253
  symbolName: "lineColor",
@@ -14290,7 +14285,7 @@
14290
14285
  } ].concat(s);
14291
14286
  }
14292
14287
  createShapeFnTypeConfigs(e, t) {
14293
- const n = Me(t.lineWidth), i = Me(t.lineOpacity), r = Me(t.lineStrokeWidth), s = Me(t.lineDx), o = Me(t.lineDy), a = new Uint16Array(1), l = new Int8Array(1);
14288
+ const n = Se(t.lineWidth), i = Se(t.lineOpacity), r = Se(t.lineStrokeWidth), s = Se(t.lineDx), o = Se(t.lineDy), a = new Uint16Array(1), l = new Int8Array(1);
14294
14289
  return [ {
14295
14290
  attrName: "aLineWidth",
14296
14291
  symbolName: "lineWidth",
@@ -15506,15 +15501,15 @@
15506
15501
  function Ar(e, t, n) {
15507
15502
  return e[0] = t[0] - n, e[1] = t[1] - n, e[2] = t[2] + n, e[3] = t[3] + n, e;
15508
15503
  }
15509
- var Tr = "#include <gl2_vert>\n#define SHADER_NAME MARKER\n#define RAD 0.0174532925\n#ifdef HAS_ALTITUDE\nattribute vec2 aPosition;\nattribute float aAltitude;\n#else\nattribute vec3 aPosition;\n#endif\nattribute vec2 aShape;\nattribute vec4 aTexCoord;\n#ifdef ENABLE_COLLISION\nattribute float aOpacity;\n#endif\n#ifdef HAS_OPACITY\nattribute vec2 aColorOpacity;\n#endif\n#ifdef HAS_TEXT_SIZE\nattribute float aTextSize;\n#else\nuniform float textSize;\n#endif\n#if defined(HAS_TEXT_DX) || defined(HAS_TEXT_DY) || defined(HAS_MARKER_DX) || defined(HAS_MARKER_DY)\nattribute vec4 aDxDy;\n#endif\n#ifndef HAS_MARKER_DX\nuniform float markerDx;\n#endif\n#ifndef HAS_MARKER_DY\nuniform float markerDy;\n#endif\n#ifndef HAS_TEXT_DX\nuniform float textDx;\n#endif\n#ifndef HAS_TEXT_DY\nuniform float textDy;\n#endif\n#ifdef HAS_MARKER_WIDTH\nattribute float aMarkerWidth;\n#else\nuniform float markerWidth;\n#endif\n#ifdef HAS_MARKER_HEIGHT\nattribute float aMarkerHeight;\n#else\nuniform float markerHeight;\n#endif\n#if defined(HAS_MARKER_PITCH_ALIGN) || defined(HAS_TEXT_PITCH_ALIGN)\nattribute vec2 aPitchAlign;\n#endif\n#ifndef HAS_MARKER_PITCH_ALIGN\nuniform float markerPitchWithMap;\n#endif\n#ifndef HAS_TEXT_PITCH_ALIGN\nuniform float textPitchWithMap;\n#endif\n#if defined(HAS_MARKER_ROTATION_ALIGN) || defined(HAS_TEXT_ROTATION_ALIGN)\nattribute vec2 aRotationAlign;\n#endif\n#ifndef HAS_MARKER_ROTATION_ALIGN\nuniform float markerRotateWithMap;\n#endif\n#ifndef HAS_TEXT_ROTATION_ALIGN\nuniform float textRotateWithMap;\n#endif\nuniform float flipY;\n#if defined(HAS_MARKER_ROTATION) || defined(HAS_TEXT_ROTATION)\nattribute vec2 aRotation;\n#endif\n#ifndef HAS_MARKER_ROTATION\nuniform float markerRotation;\n#endif\n#ifndef HAS_TEXT_ROTATION\nuniform float textRotation;\n#endif\n#ifdef HAS_PAD_OFFSET\nattribute vec2 aPadOffset;\n#endif\nuniform float cameraToCenterDistance;\nuniform mat4 positionMatrix;\nuniform mat4 projViewModelMatrix;\nuniform float textPerspectiveRatio;\nuniform float markerPerspectiveRatio;\nuniform float glyphSize;\nuniform vec2 iconSize;\nuniform vec2 canvasSize;\nuniform vec2 iconTexSize;\nuniform vec2 glyphTexSize;\nuniform float mapPitch;\nuniform float mapRotation;\nuniform float zoomScale;\nuniform float tileRatio;\nuniform float layerScale;\nuniform float isRenderingTerrain;\n#include <vt_position_vert>\nvarying float vIsText;\n#ifndef PICKING_MODE\nvarying vec2 vTexCoord;\nvarying float vOpacity;\nvarying float vGammaScale;\nvarying float vTextSize;\nvarying float vHalo;\n#ifdef HAS_TEXT_FILL\nattribute vec4 aTextFill;\nvarying vec4 vTextFill;\n#endif\n#ifdef HAS_TEXT_HALO_FILL\nattribute vec4 aTextHaloFill;\nvarying vec4 vTextHaloFill;\n#endif\n#if defined(HAS_TEXT_HALO_RADIUS) || defined(HAS_TEXT_HALO_OPACITY)\nattribute vec2 aTextHalo;\nvarying vec2 vTextHalo;\n#endif\n#include <highlight_vert>\n#else\n#include <fbo_picking_vert>\n#endif\nvoid main() {\n vec3 c = unpackVTPosition();\n#ifdef HAS_TEXT_SIZE\nfloat d = aTextSize * layerScale;\n#else\nfloat d = textSize * layerScale;\n#endif\n#ifdef HAS_TEXT_DX\nfloat e = aDxDy.z;\n#else\nfloat e = textDx;\n#endif\n#ifdef HAS_TEXT_DY\nfloat f = aDxDy.w;\n#else\nfloat f = textDy;\n#endif\n#ifdef HAS_MARKER_WIDTH\nfloat h = aMarkerWidth;\n#else\nfloat h = markerWidth;\n#endif\n#ifdef HAS_MARKER_HEIGHT\nfloat i = aMarkerHeight;\n#else\nfloat i = markerHeight;\n#endif\n#ifdef HAS_MARKER_DX\nfloat j = aDxDy.x;\n#else\nfloat j = markerDx;\n#endif\n#ifdef HAS_MARKER_DY\nfloat k = aDxDy.y;\n#else\nfloat k = markerDy;\n#endif\nfloat l = aTexCoord.z;\n float m;\n if(l > .5) {\n \n#ifdef HAS_TEXT_PITCH_ALIGN\nm = aPitchAlign.y;\n#else\nm = textPitchWithMap;\n#endif\n } else {\n \n#ifdef HAS_MARKER_PITCH_ALIGN\nm = aPitchAlign.x;\n#else\nm = markerPitchWithMap;\n#endif\n }\n float n;\n if(l > .5) {\n \n#ifdef HAS_TEXT_ROTATION_ALIGN\nn = aRotationAlign.y;\n#else\nn = textRotateWithMap;\n#endif\n } else {\n \n#ifdef HAS_MARKER_ROTATION_ALIGN\nn = aRotationAlign.x;\n#else\nn = markerRotateWithMap;\n#endif\n }\n gl_Position = projViewModelMatrix * positionMatrix * vec4(c, 1.);\n float o = gl_Position.w;\n float u;\n if(isRenderingTerrain == 1. && m == 1.) {\n u = 1.;\n } else {\n float v = (1. - cameraToCenterDistance / o) * markerPerspectiveRatio;\n u = clamp(.5 + .5 * (1. - v), .0, 4.);\n }\n float A;\n if(l > .5) {\n \n#ifdef HAS_TEXT_ROTATION\nA = -aRotation.y / 9362. - mapRotation * n;\n#else\nA = -textRotation - mapRotation * n;\n#endif\n } else {\n \n#ifdef HAS_MARKER_ROTATION\nA = -aRotation.x / 9362. - mapRotation * n;\n#else\nA = -markerRotation - mapRotation * n;\n#endif\n }\n if(m == 1.) {\n \n#ifdef REVERSE_MAP_ROTATION_ON_PITCH\nA += mapRotation;\n#else\nif(l > .5) {\n A -= mapRotation;\n } else {\n A += mapRotation;\n }\n#endif\n }\n float B = sin(A);\n float C = cos(A);\n mat2 D = mat2(C, -1. * B, B, C);\n vec2 E = (aShape / 10.0);\n if(m == 1. && flipY == .0) {\n E *= vec2(1., -1.);\n }\n vIsText = l;\n if(l > .5) {\n E = E / glyphSize * d;\n } else {\n \n#ifdef HAS_PAD_OFFSET\nfloat F = aPadOffset.x - 1.;\n float G = aPadOffset.y;\n#else\nfloat F = .0;\n float G = .0;\n#endif\nE = (E / iconSize * vec2(h, i) + vec2(F, G)) * layerScale;\n }\n E = D * E;\n float H;\n if(isRenderingTerrain == 1.) {\n H = 1.;\n } else {\n H = o / cameraToCenterDistance;\n }\n if(m == .0) {\n vec2 I = E * 2. / canvasSize;\n gl_Position.xy += I * u * o;\n } else if(l > .5) {\n float J;\n if(isRenderingTerrain == 1.) {\n J = tileRatio / zoomScale;\n } else {\n J = tileRatio / zoomScale * H * u;\n }\n vec2 I = E;\n gl_Position = projViewModelMatrix * positionMatrix * vec4(c + vec3(I, .0) * J, 1.);\n } else {\n vec2 I = E;\n gl_Position = projViewModelMatrix * positionMatrix * vec4(c + vec3(I, .0) * tileRatio / zoomScale * H * u, 1.);\n }\n if(l > .5) {\n gl_Position.xy += vec2(e, -f) * 2. / canvasSize * o;\n } else {\n gl_Position.xy += vec2(j, -k) * 2. / canvasSize * o;\n }\n#ifndef PICKING_MODE\nif(m == .0) {\n vGammaScale = mix(1., H, textPerspectiveRatio);\n } else {\n vGammaScale = H + mapPitch / 4.;\n }\n vGammaScale = clamp(vGammaScale, .0, 1.);\n if(l > .5) {\n vTexCoord = aTexCoord.xy / glyphTexSize;\n } else {\n vTexCoord = aTexCoord.xy / iconTexSize;\n }\n vHalo = aTexCoord.w;\n vTextSize = d;\n#ifdef ENABLE_COLLISION\nvOpacity = aOpacity / 255.;\n#else\nvOpacity = 1.;\n#endif\n#ifdef HAS_OPACITY\nif(l > .5) {\n vOpacity *= aColorOpacity.y / 255.;\n } else {\n vOpacity *= aColorOpacity.x / 255.;\n }\n#endif\n#ifdef HAS_TEXT_FILL\nvTextFill = aTextFill / 255.;\n#endif\n#ifdef HAS_TEXT_HALO_FILL\nvTextHaloFill = aTextHaloFill / 255.;\n#endif\n#if defined(HAS_TEXT_HALO_RADIUS) || defined(HAS_TEXT_HALO_OPACITY)\nvTextHalo = aTextHalo;\n#endif\nhighlight_setVarying();\n#else\n#ifdef ENABLE_COLLISION\nbool K = aOpacity == 255.;\n#else\nbool K = true;\n#endif\nfbo_picking_setData(gl_Position.w, K);\n#endif\n}";
15510
- const wr = [], Mr = [], Sr = [], Pr = [], Ir = [], Cr = [];
15504
+ var Tr = "#include <gl2_vert>\n#define SHADER_NAME MARKER\n#define RAD 0.0174532925\n#ifdef HAS_ALTITUDE\nattribute vec2 aPosition;\nattribute float aAltitude;\n#else\nattribute vec3 aPosition;\n#endif\nattribute vec4 aShape;\n#ifdef ENABLE_COLLISION\nattribute float aOpacity;\n#endif\n#ifdef HAS_OPACITY\nattribute vec2 aColorOpacity;\n#endif\n#ifdef HAS_TEXT_SIZE\nattribute float aTextSize;\n#else\nuniform float textSize;\n#endif\n#if defined(HAS_TEXT_DX) || defined(HAS_TEXT_DY) || defined(HAS_MARKER_DX) || defined(HAS_MARKER_DY)\nattribute vec4 aDxDy;\n#endif\n#ifndef HAS_MARKER_DX\nuniform float markerDx;\n#endif\n#ifndef HAS_MARKER_DY\nuniform float markerDy;\n#endif\n#ifndef HAS_TEXT_DX\nuniform float textDx;\n#endif\n#ifndef HAS_TEXT_DY\nuniform float textDy;\n#endif\n#ifdef HAS_MARKER_WIDTH\nattribute float aMarkerWidth;\n#else\nuniform float markerWidth;\n#endif\n#ifdef HAS_MARKER_HEIGHT\nattribute float aMarkerHeight;\n#else\nuniform float markerHeight;\n#endif\n#if defined(HAS_MARKER_PITCH_ALIGN) || defined(HAS_TEXT_PITCH_ALIGN)\nattribute vec2 aPitchAlign;\n#endif\n#ifndef HAS_MARKER_PITCH_ALIGN\nuniform float markerPitchWithMap;\n#endif\n#ifndef HAS_TEXT_PITCH_ALIGN\nuniform float textPitchWithMap;\n#endif\n#if defined(HAS_MARKER_ROTATION_ALIGN) || defined(HAS_TEXT_ROTATION_ALIGN)\nattribute vec2 aRotationAlign;\n#endif\n#ifndef HAS_MARKER_ROTATION_ALIGN\nuniform float markerRotateWithMap;\n#endif\n#ifndef HAS_TEXT_ROTATION_ALIGN\nuniform float textRotateWithMap;\n#endif\nuniform float flipY;\n#if defined(HAS_MARKER_ROTATION) || defined(HAS_TEXT_ROTATION)\nattribute vec2 aRotation;\n#endif\n#ifndef HAS_MARKER_ROTATION\nuniform float markerRotation;\n#endif\n#ifndef HAS_TEXT_ROTATION\nuniform float textRotation;\n#endif\n#ifdef HAS_PAD_OFFSET\nattribute vec2 aPadOffset;\n#endif\nuniform float cameraToCenterDistance;\nuniform mat4 positionMatrix;\nuniform mat4 projViewModelMatrix;\nuniform float textPerspectiveRatio;\nuniform float markerPerspectiveRatio;\nuniform float glyphSize;\nuniform vec2 iconSize;\nuniform vec2 canvasSize;\nuniform vec2 iconTexSize;\nuniform vec2 glyphTexSize;\nuniform float mapPitch;\nuniform float mapRotation;\nuniform float zoomScale;\nuniform float tileRatio;\nuniform float layerScale;\nuniform float isRenderingTerrain;\n#include <vt_position_vert>\nvarying float vIsText;\n#ifndef PICKING_MODE\nvarying vec2 vTexCoord;\nvarying float vOpacity;\nvarying float vGammaScale;\nvarying float vTextSize;\nvarying float vHalo;\n#ifdef HAS_TEXT_FILL\nattribute vec4 aTextFill;\nvarying vec4 vTextFill;\n#endif\n#ifdef HAS_TEXT_HALO_FILL\nattribute vec4 aTextHaloFill;\nvarying vec4 vTextHaloFill;\n#endif\n#if defined(HAS_TEXT_HALO_RADIUS) || defined(HAS_TEXT_HALO_OPACITY)\nattribute vec2 aTextHalo;\nvarying vec2 vTextHalo;\n#endif\n#include <highlight_vert>\n#else\n#include <fbo_picking_vert>\n#endif\nvoid main() {\n vec3 c = unpackVTPosition();\n#ifdef HAS_TEXT_SIZE\nfloat d = aTextSize * layerScale;\n#else\nfloat d = textSize * layerScale;\n#endif\n#ifdef HAS_TEXT_DX\nfloat e = aDxDy.z;\n#else\nfloat e = textDx;\n#endif\n#ifdef HAS_TEXT_DY\nfloat f = aDxDy.w;\n#else\nfloat f = textDy;\n#endif\n#ifdef HAS_MARKER_WIDTH\nfloat h = aMarkerWidth;\n#else\nfloat h = markerWidth;\n#endif\n#ifdef HAS_MARKER_HEIGHT\nfloat i = aMarkerHeight;\n#else\nfloat i = markerHeight;\n#endif\n#ifdef HAS_MARKER_DX\nfloat j = aDxDy.x;\n#else\nfloat j = markerDx;\n#endif\n#ifdef HAS_MARKER_DY\nfloat k = aDxDy.y;\n#else\nfloat k = markerDy;\n#endif\nfloat l = mod(aShape.z, 2.);\n float m;\n if(l > .5) {\n \n#ifdef HAS_TEXT_PITCH_ALIGN\nm = aPitchAlign.y;\n#else\nm = textPitchWithMap;\n#endif\n } else {\n \n#ifdef HAS_MARKER_PITCH_ALIGN\nm = aPitchAlign.x;\n#else\nm = markerPitchWithMap;\n#endif\n }\n float n;\n if(l > .5) {\n \n#ifdef HAS_TEXT_ROTATION_ALIGN\nn = aRotationAlign.y;\n#else\nn = textRotateWithMap;\n#endif\n } else {\n \n#ifdef HAS_MARKER_ROTATION_ALIGN\nn = aRotationAlign.x;\n#else\nn = markerRotateWithMap;\n#endif\n }\n gl_Position = projViewModelMatrix * positionMatrix * vec4(c, 1.);\n float o = gl_Position.w;\n float u;\n if(isRenderingTerrain == 1. && m == 1.) {\n u = 1.;\n } else {\n float v = (1. - cameraToCenterDistance / o) * markerPerspectiveRatio;\n u = clamp(.5 + .5 * (1. - v), .0, 4.);\n }\n float A;\n if(l > .5) {\n \n#ifdef HAS_TEXT_ROTATION\nA = -aRotation.y / 9362. - mapRotation * n;\n#else\nA = -textRotation - mapRotation * n;\n#endif\n } else {\n \n#ifdef HAS_MARKER_ROTATION\nA = -aRotation.x / 9362. - mapRotation * n;\n#else\nA = -markerRotation - mapRotation * n;\n#endif\n }\n if(m == 1.) {\n \n#ifdef REVERSE_MAP_ROTATION_ON_PITCH\nA += mapRotation;\n#else\nif(l > .5) {\n A -= mapRotation;\n } else {\n A += mapRotation;\n }\n#endif\n }\n float B = sin(A);\n float C = cos(A);\n mat2 D = mat2(C, -1. * B, B, C);\n vec2 E = (aShape.xy / 10.0);\n if(m == 1. && flipY == .0) {\n E *= vec2(1., -1.);\n }\n vIsText = l;\n if(l > .5) {\n E = E / glyphSize * d;\n } else {\n \n#ifdef HAS_PAD_OFFSET\nfloat F = aPadOffset.x - 1.;\n float G = aPadOffset.y;\n#else\nfloat F = .0;\n float G = .0;\n#endif\nE = (E / iconSize * vec2(h, i) + vec2(F, G)) * layerScale;\n }\n E = D * E;\n float H;\n if(isRenderingTerrain == 1.) {\n H = 1.;\n } else {\n H = o / cameraToCenterDistance;\n }\n if(m == .0) {\n vec2 I = E * 2. / canvasSize;\n gl_Position.xy += I * u * o;\n } else if(l > .5) {\n float J;\n if(isRenderingTerrain == 1.) {\n J = tileRatio / zoomScale;\n } else {\n J = tileRatio / zoomScale * H * u;\n }\n vec2 I = E;\n gl_Position = projViewModelMatrix * positionMatrix * vec4(c + vec3(I, .0) * J, 1.);\n } else {\n vec2 I = E;\n gl_Position = projViewModelMatrix * positionMatrix * vec4(c + vec3(I, .0) * tileRatio / zoomScale * H * u, 1.);\n }\n if(l > .5) {\n gl_Position.xy += vec2(e, -f) * 2. / canvasSize * o;\n } else {\n gl_Position.xy += vec2(j, -k) * 2. / canvasSize * o;\n }\n#ifndef PICKING_MODE\nif(m == .0) {\n vGammaScale = mix(1., H, textPerspectiveRatio);\n } else {\n vGammaScale = H + mapPitch / 4.;\n }\n vGammaScale = clamp(vGammaScale, .0, 1.);\n vec2 K = floor(aShape.zw / 2.);\n if(l > .5) {\n vTexCoord = K / glyphTexSize;\n } else {\n vTexCoord = K / iconTexSize;\n }\n vHalo = mod(aShape.w, 2.);\n vTextSize = d;\n#ifdef ENABLE_COLLISION\nvOpacity = aOpacity / 255.;\n#else\nvOpacity = 1.;\n#endif\n#ifdef HAS_OPACITY\nif(l > .5) {\n vOpacity *= aColorOpacity.y / 255.;\n } else {\n vOpacity *= aColorOpacity.x / 255.;\n }\n#endif\n#ifdef HAS_TEXT_FILL\nvTextFill = aTextFill / 255.;\n#endif\n#ifdef HAS_TEXT_HALO_FILL\nvTextHaloFill = aTextHaloFill / 255.;\n#endif\n#if defined(HAS_TEXT_HALO_RADIUS) || defined(HAS_TEXT_HALO_OPACITY)\nvTextHalo = aTextHalo;\n#endif\nhighlight_setVarying();\n#else\n#ifdef ENABLE_COLLISION\nbool L = aOpacity == 255.;\n#else\nbool L = true;\n#endif\nfbo_picking_setData(gl_Position.w, L);\n#endif\n}";
15505
+ const wr = [], Sr = [], Mr = [], Pr = [], Ir = [], Cr = [];
15511
15506
  function kr(e, t, i, r, s, o, a, l, h, c, u, f, d, p) {
15512
15507
  const {tileRatio: g, tileResolution: m} = h, y = g / (m / c.getResolution()) * (u / c.cameraToCenterDistance) * f;
15513
15508
  n.vec2.scale(i, i, y), n.vec2.scale(r, r, y), n.vec2.scale(s, s, y), n.vec2.scale(o, o, y),
15514
- n.vec3.set(wr, i[0], i[1], d ? i[2] / p : 0), n.vec3.set(Mr, r[0], r[1], d ? r[2] / p : 0),
15515
- n.vec3.set(Sr, s[0], s[1], d ? s[2] / p : 0), n.vec3.set(Pr, o[0], o[1], d ? o[2] / p : 0),
15516
- n.vec3.add(wr, wr, t), n.vec3.add(Mr, Mr, t), n.vec3.add(Sr, Sr, t), n.vec3.add(Pr, Pr, t),
15517
- oi(i, wr, a, c.width, c.height), oi(r, Mr, a, c.width, c.height), oi(s, Sr, a, c.width, c.height),
15509
+ n.vec3.set(wr, i[0], i[1], d ? i[2] / p : 0), n.vec3.set(Sr, r[0], r[1], d ? r[2] / p : 0),
15510
+ n.vec3.set(Mr, s[0], s[1], d ? s[2] / p : 0), n.vec3.set(Pr, o[0], o[1], d ? o[2] / p : 0),
15511
+ n.vec3.add(wr, wr, t), n.vec3.add(Sr, Sr, t), n.vec3.add(Mr, Mr, t), n.vec3.add(Pr, Pr, t),
15512
+ oi(i, wr, a, c.width, c.height), oi(r, Sr, a, c.width, c.height), oi(s, Mr, a, c.width, c.height),
15518
15513
  oi(o, Pr, a, c.width, c.height), n.vec2.set(Ir, Math.min(i[0], r[0], s[0], o[0]), Math.min(i[1], r[1], s[1], o[1])),
15519
15514
  n.vec2.set(Cr, Math.max(i[0], r[0], s[0], o[0]), Math.max(i[1], r[1], s[1], o[1])),
15520
15515
  n.vec4.set(e, Ir[0] + l[0], Ir[1] + l[1], Cr[0] + l[0], Cr[1] + l[1]);
@@ -15543,7 +15538,7 @@
15543
15538
  if (o.markerPerspectiveRatio) {
15544
15539
  m = yt(.5 + .5 * (1 - (1 - a / g) * o.markerPerspectiveRatio), 0, 4);
15545
15540
  }
15546
- const {aShape: y, aMarkerDx: x, aMarkerDy: _, aMarkerWidth: v, aMarkerHeight: b, aPitchAlign: A, aRotationAlign: T, aRotation: w} = l, M = x ? x[i] : h.markerDx, S = _ ? _[i] : h.markerDy, P = A ? A[2 * i] : o.markerPitchWithMap, I = T ? T[2 * i] : o.markerRotateWithMap, C = n.vec2.set(Wr, M || 0, -(S || 0));
15541
+ const {aShape: y, aMarkerDx: x, aMarkerDy: _, aMarkerWidth: v, aMarkerHeight: b, aPitchAlign: A, aRotationAlign: T, aRotation: w} = l, S = x ? x[i] : h.markerDx, M = _ ? _[i] : h.markerDy, P = A ? A[2 * i] : o.markerPitchWithMap, I = T ? T[2 * i] : o.markerRotateWithMap, C = n.vec2.set(Wr, S || 0, -(M || 0));
15547
15542
  let k = n.vec2.set(Ur, y[2 * i] / 10, y[2 * i + 1] / 10), O = n.vec2.set(Br, y[2 * i + 2] / 10, y[2 * i + 3] / 10), F = n.vec2.set(Gr, y[2 * i + 4] / 10, y[2 * i + 5] / 10), R = n.vec2.set(jr, y[2 * i + 6] / 10, y[2 * i + 7] / 10);
15548
15543
  0 === o.flipY && 1 === P && (n.vec2.multiply(k, k, Xr), n.vec2.multiply(O, O, Xr),
15549
15544
  n.vec2.multiply(F, F, Xr), n.vec2.multiply(R, R, Xr));
@@ -15575,13 +15570,13 @@
15575
15570
  y = yt(.5 + .5 * (1 - (1 - u / m) * c.textPerspectiveRatio), 0, 4);
15576
15571
  }
15577
15572
  const {aTextDx: x, aTextDy: _, aPitchAlign: v, aRotationAlign: b, aRotation: A, aType: T, aDxDy: w} = r.geometry.properties;
15578
- let M, S, P;
15579
- w ? (M = w[4 * a + 2], S = w[4 * a + 3]) : (M = x ? x[a] : d.textDx, S = _ ? _[a] : d.textDy),
15573
+ let S, M, P;
15574
+ w ? (S = w[4 * a + 2], M = w[4 * a + 3]) : (S = x ? x[a] : d.textDx, M = _ ? _[a] : d.textDy),
15580
15575
  v && (P = T ? v[2 * a + 1] : v[a]);
15581
15576
  const I = v ? P : c.textPitchWithMap;
15582
15577
  let C;
15583
15578
  b && (C = T ? b[2 * a + 1] : b[a]);
15584
- const k = b ? C : c.textRotateWithMap, O = n.vec2.set(ns, M || 0, -(S || 0));
15579
+ const k = b ? C : c.textRotateWithMap, O = n.vec2.set(ns, S || 0, -(M || 0));
15585
15580
  if (p) {
15586
15581
  const {aOffset: r, aShape: s} = f, o = r.length !== s.length;
15587
15582
  let u, d, p, g;
@@ -15758,17 +15753,25 @@
15758
15753
  }
15759
15754
  function fs(e, t, n) {
15760
15755
  const i = e.properties, r = this.getSymbol(i.symbolIndex), s = "line" === i.textPlacement && !It(r), {aPosition: o, aShape: a} = e.data, l = o.length / e.desc.positionSize;
15761
- if (i.aPickingId = e.data.aPickingId, i.aCount || (i.aCount = e.data.aCount, delete e.data.aCount),
15762
- (t || s) && (i.aAnchor = o, i.aShape = a), i.visElemts || (i.elements = e.elements,
15763
- i.visElemts = new e.elements.constructor(e.elements.length)), s) {
15756
+ if (i.vertexCount = l, i.aPickingId = e.data.aPickingId, i.aCount || (i.aCount = e.data.aCount,
15757
+ delete e.data.aCount), t || s) {
15758
+ let e = a;
15759
+ if (a.length === 4 * l) {
15760
+ e = new a.constructor(2 * l);
15761
+ for (let t = 0; t < l; t++) e[2 * t] = a[4 * t], e[2 * t + 1] = a[4 * t + 1];
15762
+ }
15763
+ i.aAnchor = o, i.aShape = e;
15764
+ }
15765
+ if (i.visElemts || (i.elements = e.elements, i.visElemts = new e.elements.constructor(e.elements.length)),
15766
+ s) {
15764
15767
  const {aVertical: t, aSegment: n, aGlyphOffset: r, aPitchRotation: s} = e.data, o = !!s;
15765
15768
  i.aGlyphOffset = r, i.aPitchRotation = s, i.aSegment = n, i.aVertical = t, delete e.data.aSegment,
15766
15769
  delete e.data.aVertical, delete e.data.aGlyphOffset, delete e.data.aPitchRotation;
15767
- const l = a.length / 2 * (o ? 3 : 2);
15770
+ const a = l * (o ? 3 : 2);
15768
15771
  e.data.aOffset = {
15769
15772
  usage: "dynamic",
15770
- data: new Int16Array(l)
15771
- }, i.aOffset = new Int16Array(l);
15773
+ data: new Int16Array(a)
15774
+ }, i.aOffset = new Int16Array(a);
15772
15775
  }
15773
15776
  if (t) {
15774
15777
  e.data.aOpacity = {
@@ -15848,7 +15851,7 @@
15848
15851
  };
15849
15852
  }
15850
15853
  function gs(e, t) {
15851
- const n = Me(t.textFill), i = Me(t.textSize), r = Me(t.textHaloFill), s = Me(t.textHaloRadius), o = Me(t.textHaloOpacity), a = Me(t.textDx), l = Me(t.textDy), h = Me(t.textOpacity), c = Se(t.textPitchAlignment), u = Se(t.textRotationAlignment), f = Me(t.textRotation), d = Se(t.textAllowOverlapFn), p = Se(t.textIgnorePlacement), g = {}, m = new Int16Array(1), y = new Uint16Array(1);
15854
+ const n = Se(t.textFill), i = Se(t.textSize), r = Se(t.textHaloFill), s = Se(t.textHaloRadius), o = Se(t.textHaloOpacity), a = Se(t.textDx), l = Se(t.textDy), h = Se(t.textOpacity), c = Me(t.textPitchAlignment), u = Me(t.textRotationAlignment), f = Se(t.textRotation), d = Me(t.textAllowOverlapFn), p = Me(t.textIgnorePlacement), g = {}, m = new Int16Array(1), y = new Uint16Array(1);
15852
15855
  return [ {
15853
15856
  attrName: "aTextFill",
15854
15857
  symbolName: "textFill",
@@ -16029,7 +16032,7 @@
16029
16032
  }(e, t, i) : null;
16030
16033
  }
16031
16034
  const As = [], Ts = [];
16032
- const ws = 6, Ms = 4, Ss = new Uint16Array(1), Ps = new Int8Array(1);
16035
+ const ws = 6, Ss = 4, Ms = new Uint16Array(1), Ps = new Int8Array(1);
16033
16036
  function Is(e, t, i, r, s, o, a, l, h) {
16034
16037
  if (t.isDisposed() || 0 === t.data.aPosition.length) return null;
16035
16038
  const c = !!t.properties.iconAtlas, u = !!t.properties.glyphAtlas;
@@ -16041,7 +16044,10 @@
16041
16044
  usage: "dynamic",
16042
16045
  data: r
16043
16046
  }, t.properties.aOpacity = new Uint8Array(i), l && t.properties.aOpacity.fill(255, 0),
16044
- t.properties.aAnchor = e, t.properties.aShape = n;
16047
+ t.properties.aAnchor = e;
16048
+ const s = n.length / 4, o = new n.constructor(2 * s);
16049
+ for (let e = 0; e < s; e++) o[2 * e] = n[4 * e], o[2 * e + 1] = n[4 * e + 1];
16050
+ t.properties.aShape = o;
16045
16051
  }
16046
16052
  t.properties.visElemts || (t.properties.elements = t.elements, t.properties.visElemts = new t.elements.constructor(t.elements.length)),
16047
16053
  u && hs.call(this, t, r, o.text, a, l, h), t.properties.memorySize = t.getMemorySize(),
@@ -16150,7 +16156,7 @@
16150
16156
  }(e);
16151
16157
  }
16152
16158
  function Rs(e, t) {
16153
- const n = Me(t.markerWidth), i = Me(t.markerHeight), r = Me(t.markerDx), s = Me(t.markerDy), o = Me(t.markerOpacity), a = Me(t.markerTextFit), l = Se(t.markerPitchAlignment), h = Se(t.textPitchAlignment), c = Se(t.markerRotationAlignment), u = Se(t.textRotationAlignment), f = Me(t.markerRotation), d = Me(t.textRotation), p = Se(t.markerAllowOverlapFn), g = Se(t.markerIgnorePlacement), m = Me(t.textOpacity), y = Me(t.textDx), x = Me(t.textDy), _ = new Int16Array(1), v = new Uint16Array(1);
16159
+ const n = Se(t.markerWidth), i = Se(t.markerHeight), r = Se(t.markerDx), s = Se(t.markerDy), o = Se(t.markerOpacity), a = Se(t.markerTextFit), l = Me(t.markerPitchAlignment), h = Me(t.textPitchAlignment), c = Me(t.markerRotationAlignment), u = Me(t.textRotationAlignment), f = Se(t.markerRotation), d = Se(t.textRotation), p = Me(t.markerAllowOverlapFn), g = Me(t.markerIgnorePlacement), m = Se(t.textOpacity), y = Se(t.textDx), x = Se(t.textDy), _ = new Int16Array(1), v = new Uint16Array(1);
16154
16160
  return [ {
16155
16161
  attrName: "aMarkerWidth",
16156
16162
  symbolName: "markerWidth",
@@ -16340,7 +16346,7 @@
16340
16346
  }(t);
16341
16347
  const s = function(e, t) {
16342
16348
  let n = e.properties.textFitFn;
16343
- we(t) && (n = e.properties.textFitFn = Se(t));
16349
+ we(t) && (n = e.properties.textFitFn = Me(t));
16344
16350
  const i = "none" !== t, r = [], s = e.properties.iconElements, o = e.data.aPickingId, a = e.properties.textElements, l = e.data.aPickingId, h = e.properties.aCount, c = e.properties.features;
16345
16351
  let u, f = a[0];
16346
16352
  u = {
@@ -16390,7 +16396,7 @@
16390
16396
  let n = 1 / 0, s = 1 / 0, l = -1 / 0, h = -1 / 0;
16391
16397
  const c = e.properties.textElements;
16392
16398
  for (let e = o; e < a; e++) {
16393
- const t = c[e], r = i[2 * t], o = i[2 * t + 1];
16399
+ const t = c[e], r = i[4 * t], o = i[4 * t + 1];
16394
16400
  r < n && (n = r), r > l && (l = r), o < s && (s = o), o > h && (h = o);
16395
16401
  }
16396
16402
  t.push(n, s, l, h);
@@ -16407,14 +16413,14 @@
16407
16413
  let s = "both" === i || "width" === i, o = "both" === i || "height" === i;
16408
16414
  if (we(n.markerTextFit)) {
16409
16415
  let e = t.properties.textFitFn;
16410
- e || (e = t.properties.textFitFn = Me(n.markerTextFit));
16416
+ e || (e = t.properties.textFitFn = Se(n.markerTextFit));
16411
16417
  const {features: i} = t.properties, a = t.properties.iconElements, {aPickingId: l} = t.data, h = [], c = [];
16412
16418
  let u = !0;
16413
16419
  for (let t = 0; t < a.length; t += ws) {
16414
16420
  const n = i[l[a[t]]], r = (n && n.feature || {}).properties || {};
16415
16421
  let s = e(null, r);
16416
16422
  if (we(s)) {
16417
- s = (r.textFitFn = r.textFitFn || Me(s))(null, r);
16423
+ s = (r.textFitFn = r.textFitFn || Se(s))(null, r);
16418
16424
  }
16419
16425
  "both" === s ? (h.push(t / ws), c.push(t / ws)) : "width" === s ? (u = !1, h.push(t / ws)) : "height" === s && (u = !1,
16420
16426
  c.push(t / ws));
@@ -16444,7 +16450,7 @@
16444
16450
  r.aMarkerHeight = new Uint16Array(c), r.aMarkerHeight.fill(e), e && (r.aMarkerHeight.dirty = !0),
16445
16451
  t.data.aMarkerHeight = new Uint16Array(c);
16446
16452
  }
16447
- const u = this.getSymbolDef(t.properties.symbolIndex), f = Me(u.textSize);
16453
+ const u = this.getSymbolDef(t.properties.symbolIndex), f = Se(u.textSize);
16448
16454
  Hs.call(this, e, t), (!we(u.textSize) || f.isZoomConstant && f.isFeatureConstant) && (r.isFitConstant = !0);
16449
16455
  }
16450
16456
  const Ls = [ 0, 0, 0, 0 ];
@@ -16455,40 +16461,40 @@
16455
16461
  if (i.isFitConstant || !i.labelShape || !i.labelShape.length) return;
16456
16462
  const r = this.getSymbolDef(t.properties.symbolIndex), s = r.textSize;
16457
16463
  let o;
16458
- we(s) && (o = n._textSizeFn ? n._textSizeFn : n._textSizeFn = Me(s));
16464
+ we(s) && (o = n._textSizeFn ? n._textSizeFn : n._textSizeFn = Se(s));
16459
16465
  const a = r.markerTextFitPadding || Ls;
16460
16466
  let l;
16461
- we(a) && (l = i._paddingFn ? i._paddingFn : i._paddingFn = Se(a));
16467
+ we(a) && (l = i._paddingFn ? i._paddingFn : i._paddingFn = Me(a));
16462
16468
  const h = e.getZoom(), {fitIcons: c, fitWidthIcons: u, fitHeightIcons: f} = i, {aMarkerWidth: d, aMarkerHeight: p, labelShape: g} = i, m = t.properties.iconElements, {features: y, aPickingId: x} = i, _ = (e, t, n, r) => {
16463
16469
  const c = g[4 * t], u = g[4 * t + 1], f = g[4 * t + 2], m = g[4 * t + 3];
16464
16470
  if (!(c || u || f || m)) return;
16465
16471
  const _ = x[e], v = y[_] && y[_].feature, b = v && v.properties || {};
16466
16472
  let A = o ? o(h, b) : s;
16467
16473
  if (we(A)) {
16468
- A = (b.textSizeFn = b.textSizeFn || Me(A))(h, b);
16474
+ A = (b.textSizeFn = b.textSizeFn || Se(A))(h, b);
16469
16475
  }
16470
16476
  A /= Lr;
16471
16477
  let T, w = l && l(h, b) || a;
16472
16478
  if (we(w)) {
16473
- w = (b.fitPaddingFn = b.fitPaddingFn || Se(w))(h, b);
16479
+ w = (b.fitPaddingFn = b.fitPaddingFn || Me(w))(h, b);
16474
16480
  }
16475
16481
  if (w = w || Ls, w[0] === w[2] && w[1] === w[3] || (T = i.aPadOffset, T || (T = i.aPadOffset = new Int8Array(2 * d.length))),
16476
16482
  d && n) {
16477
16483
  const t = Math.abs((f - c) / 10 * A) + (w[1] + w[3] || 0);
16478
- if (Ss[0] = t, d[e] !== Ss[0] && (St(d, Ss[0], e, e + Ms), d.dirty = !0), T) {
16484
+ if (Ms[0] = t, d[e] !== Ms[0] && (Mt(d, Ms[0], e, e + Ss), d.dirty = !0), T) {
16479
16485
  const t = (w[1] + w[3]) / 2 - w[3];
16480
16486
  if (Ps[0] = t, T[2 * e] !== Ps[0]) {
16481
- for (let n = e; n < e + Ms; n++) T[2 * n] = t;
16487
+ for (let n = e; n < e + Ss; n++) T[2 * n] = t;
16482
16488
  T.dirty = !0;
16483
16489
  }
16484
16490
  }
16485
16491
  }
16486
16492
  if (p && r) {
16487
16493
  const t = Math.abs((m - u) / 10 * A) + (w[0] + w[2] || 0);
16488
- if (Ss[0] = t, p[e] !== Ss[0] && (St(p, Ss[0], e, e + Ms), p.dirty = !0), T) {
16494
+ if (Ms[0] = t, p[e] !== Ms[0] && (Mt(p, Ms[0], e, e + Ss), p.dirty = !0), T) {
16489
16495
  const t = w[0] - (w[0] + w[2]) / 2;
16490
16496
  if (Ps[0] = t, T[2 * e + 1] !== Ps[0]) {
16491
- for (let n = e; n < e + Ms; n++) T[2 * n + 1] = t;
16497
+ for (let n = e; n < e + Ss; n++) T[2 * n + 1] = t;
16492
16498
  T.dirty = !0;
16493
16499
  }
16494
16500
  }
@@ -16575,14 +16581,11 @@
16575
16581
  } else t.properties.isEmpty = !0;
16576
16582
  }
16577
16583
  _prepareRequiredProps(e) {
16578
- const {aCount: t, aTexCoord: n} = e.data;
16584
+ const {aCount: t, aShape: n} = e.data;
16579
16585
  e.properties.aCount = t, delete e.data.aCount;
16580
- const i = n.length / 4, r = new Uint8Array(i);
16581
- for (let e = 0; e < i; e++) r[e] = n[4 * e + 2];
16582
- e.properties.aType = r;
16583
- const s = new Uint8Array(i);
16584
- for (let e = 0; e < i; e++) s[e] = n[4 * e + 3];
16585
- e.properties.aHalo = s, Cs.call(this, e);
16586
+ const i = n.length / 4, r = new Uint8Array(i), s = new Uint8Array(i);
16587
+ for (let e = 0; e < i; e++) r[e] = n[4 * e + 2] % 2, s[e] = n[4 * e + 3] % 2;
16588
+ e.properties.aType = r, e.properties.aHalo = s, Cs.call(this, e);
16586
16589
  }
16587
16590
  prepareCollideIndex(e) {
16588
16591
  const {collideIds: t, elements: n, aCount: i, aType: r} = e.properties;
@@ -16622,7 +16625,7 @@
16622
16625
  i < n.length && o.fill(e++, i, n.length);
16623
16626
  } else {
16624
16627
  let e = 0;
16625
- for (let t = 0; t < n.length; t += Ms) o.fill(e++, t, t + Ms);
16628
+ for (let t = 0; t < n.length; t += Ss) o.fill(e++, t, t + Ss);
16626
16629
  }
16627
16630
  e.properties.collideIds = o, e.properties.uniqueCollideIds = kt(o, !t);
16628
16631
  } else if (a) {
@@ -16630,8 +16633,8 @@
16630
16633
  if (!i) return;
16631
16634
  let r = 0, s = i[0];
16632
16635
  for (let e = 0; e < n.length; ) {
16633
- const t = e + s * Ms;
16634
- n.fill(r++, e, t), e += s * Ms, t < n.length && (s = i[t]);
16636
+ const t = e + s * Ss;
16637
+ n.fill(r++, e, t), e += s * Ss, t < n.length && (s = i[t]);
16635
16638
  }
16636
16639
  e.properties.uniqueCollideIds = kt(n, !t);
16637
16640
  }
@@ -16921,32 +16924,32 @@
16921
16924
  }
16922
16925
  const Xs = [], Ys = [], Zs = [];
16923
16926
  function qs(e, t, i, r, s, o, a, l, h, c, u, f, d) {
16924
- const {aGlyphOffset: p, aSegment: g, aTextDx: m, aTextDy: y, symbolIndex: x} = t.geometry.properties, _ = this.getSymbol(x), v = m ? m[s] : _.textDx, b = y ? y[s] : _.textDy, A = n.vec2.set(Zs, v || 0, b || 0), T = n.vec2.set(Xs, p[2 * s], p[2 * s + 1]), w = n.vec3.set(Ys, g[3 * s], g[3 * s + 1], g[3 * s + 2]), M = function(e, t, n, i, r, s, o, a, l, h, c, u, f, d, p, g, m, y) {
16927
+ const {aGlyphOffset: p, aSegment: g, aTextDx: m, aTextDy: y, symbolIndex: x} = t.geometry.properties, _ = this.getSymbol(x), v = m ? m[s] : _.textDx, b = y ? y[s] : _.textDy, A = n.vec2.set(Zs, v || 0, b || 0), T = n.vec2.set(Xs, p[2 * s], p[2 * s + 1]), w = n.vec3.set(Ys, g[3 * s], g[3 * s + 1], g[3 * s + 2]), S = function(e, t, n, i, r, s, o, a, l, h, c, u, f, d, p, g, m, y) {
16925
16928
  p || (p = i);
16926
16929
  const x = t.geometry.properties.line, _ = s[0] * u, v = f ? _ - o : _ + o;
16927
16930
  let b = v > 0 ? 1 : -1, A = 0;
16928
16931
  f && (b *= -1, A = Math.PI), b < 0 && (A += Math.PI);
16929
16932
  const T = h + c, w = Math.abs(v);
16930
- let M = b > 0 ? l : l + 1, S = ri.convert(i), P = ri.convert(i), I = ri.convert(r), C = ri.convert(r), k = 0, O = 0;
16933
+ let S = b > 0 ? l : l + 1, M = ri.convert(i), P = ri.convert(i), I = ri.convert(r), C = ri.convert(r), k = 0, O = 0;
16931
16934
  for (;k + O <= w; ) {
16932
- if (M += b, M < h || M >= T) return null;
16933
- P.x = S.x, P.y = S.y, C.x = I.x, C.y = I.y, S.x = n[3 * M], S.y = n[3 * M + 1],
16934
- I.x = x[3 * M], I.y = x[3 * M + 1], k += O, O = P.dist(S) / d;
16935
+ if (S += b, S < h || S >= T) return null;
16936
+ P.x = M.x, P.y = M.y, C.x = I.x, C.y = I.y, M.x = n[3 * S], M.y = n[3 * S + 1],
16937
+ I.x = x[3 * S], I.y = x[3 * S + 1], k += O, O = P.dist(M) / d;
16935
16938
  }
16936
16939
  const F = (w - k) / O, R = g && g.getRenderer(), E = R && R.getTerrainHelper(), D = t.properties.tile.terrainTileInfos;
16937
16940
  if (!y && E) {
16938
16941
  const {extent: n} = t.properties.tile, i = g.getTileSize().width / n, r = g.getMap();
16939
16942
  let s = I.sub(C).mult(F)._add(C);
16940
- S = di(ai, r, t, I, i, g, m, D), P = di(li, r, t, C, i, g, m, D), s = di(hi, r, t, s, i, g, m, D);
16941
- const o = A + Math.atan2(S[1] - P[1], S[0] - P[0]);
16943
+ M = di(ai, r, t, I, i, g, m, D), P = di(li, r, t, C, i, g, m, D), s = di(hi, r, t, s, i, g, m, D);
16944
+ const o = A + Math.atan2(M[1] - P[1], M[0] - P[0]);
16942
16945
  return e[0] = (s[0] - p[0]) / d, e[1] = (s[1] - p[1]) / d, e[2] = o, e;
16943
16946
  }
16944
- const L = S.sub(P), H = L.mult(F)._add(P);
16947
+ const L = M.sub(P), H = L.mult(F)._add(P);
16945
16948
  H._add(L._unit()._perp()._mult(a * b));
16946
- const N = A + Math.atan2(S.y - P.y, S.x - P.x);
16949
+ const N = A + Math.atan2(M.y - P.y, M.x - P.x);
16947
16950
  return e[0] = (H.x - i[0]) / d, e[1] = (H.y - i[1]) / d, e[2] = N, e;
16948
16951
  }(e, t, r, o, a, T, A[0], A[1], w[0], w[1], w[2], i / 24, h, l, c, u, f, d);
16949
- return M;
16952
+ return S;
16950
16953
  }
16951
16954
  const $s = [], Js = [];
16952
16955
  function Ks(e, t, i, r, s, o, a, l, h, c, u, f, d) {
@@ -16962,7 +16965,7 @@
16962
16965
  } else m = 0, y = $s[0] > Js[0] ? 1 : 0;
16963
16966
  return 2 * y + m;
16964
16967
  }
16965
- var Qs = "#define SHADER_NAME TEXT_VERT\n#define RAD 0.0174532925\n#ifdef HAS_ALTITUDE\nattribute vec2 aPosition;\nattribute float aAltitude;\n#else\nattribute vec3 aPosition;\n#endif\nattribute vec2 aShape;\nattribute vec2 aTexCoord;\n#ifdef ENABLE_COLLISION\nattribute float aOpacity;\n#endif\n#ifdef HAS_OPACITY\nattribute float aColorOpacity;\n#endif\n#ifdef HAS_TEXT_SIZE\nattribute float aTextSize;\n#else\nuniform float textSize;\n#endif\n#ifdef HAS_TEXT_DX\nattribute float aTextDx;\n#else\nuniform float textDx;\n#endif\n#ifdef HAS_TEXT_DY\nattribute float aTextDy;\n#else\nuniform float textDy;\n#endif\n#if defined(HAS_PITCH_ALIGN)\nattribute float aPitchAlign;\n#else\nuniform float textPitchWithMap;\n#endif\n#if defined(HAS_TEXT_ROTATION_ALIGN)\nattribute float aRotationAlign;\n#else\nuniform float textRotateWithMap;\n#endif\nuniform float flipY;\n#if defined(HAS_TEXT_ROTATION)\nattribute float aRotation;\n#else\nuniform float textRotation;\n#endif\nuniform float cameraToCenterDistance;\nuniform mat4 positionMatrix;\nuniform mat4 projViewModelMatrix;\nuniform float textPerspectiveRatio;\nuniform vec2 glyphTexSize;\nuniform vec2 canvasSize;\nuniform float glyphSize;\nuniform float mapPitch;\nuniform float mapRotation;\nuniform float zoomScale;\nuniform float tileRatio;\nuniform float layerScale;\nuniform float isRenderingTerrain;\n#ifndef PICKING_MODE\nvarying vec2 vTexCoord;\nvarying float vGammaScale;\nvarying float vTextSize;\nvarying float vOpacity;\n#ifdef HAS_TEXT_FILL\nattribute vec4 aTextFill;\nvarying vec4 vTextFill;\n#endif\n#ifdef HAS_TEXT_HALO_FILL\nattribute vec4 aTextHaloFill;\nvarying vec4 vTextHaloFill;\n#endif\n#if defined(HAS_TEXT_HALO_RADIUS) || defined(HAS_TEXT_HALO_OPACITY)\nattribute vec2 aTextHalo;\nvarying vec2 vTextHalo;\n#endif\n#include <highlight_vert>\n#else\n#include <fbo_picking_vert>\n#endif\n#include <vt_position_vert>\nvoid main() {\n vec3 c = unpackVTPosition();\n#ifdef HAS_TEXT_SIZE\nfloat d = aTextSize * layerScale;\n#else\nfloat d = textSize * layerScale;\n#endif\n#ifdef HAS_TEXT_DX\nfloat e = aTextDx;\n#else\nfloat e = textDx;\n#endif\n#ifdef HAS_TEXT_DY\nfloat f = aTextDy;\n#else\nfloat f = textDy;\n#endif\n#if defined(HAS_PITCH_ALIGN)\nfloat h = aPitchAlign;\n#else\nfloat h = textPitchWithMap;\n#endif\n#if defined(HAS_ROTATION_ALIGN)\nfloat i = aRotationAlign;\n#else\nfloat i = textRotateWithMap;\n#endif\ngl_Position = projViewModelMatrix * positionMatrix * vec4(c, 1.);\n float j = gl_Position.w;\n float k;\n if(isRenderingTerrain == 1. && h == 1.) {\n k = 1.;\n } else {\n float l = (1. - cameraToCenterDistance / j) * textPerspectiveRatio;\n k = clamp(.5 + .5 * (1. - l), .0, 4.);\n }\n#ifdef HAS_TEXT_ROTATION\nfloat m = -aRotation / 9362. - mapRotation * i;\n#else\nfloat m = -textRotation - mapRotation * i;\n#endif\nif(h == 1.) {\n \n#ifdef REVERSE_MAP_ROTATION_ON_PITCH\nm += mapRotation;\n#else\nm -= mapRotation;\n#endif\n }\n float n = sin(m);\n float o = cos(m);\n mat2 u = mat2(o, -1. * n, n, o);\n vec2 v = aShape.xy / 10.0;\n if(h == 1. && flipY == .0) {\n v = v * vec2(1., -1.);\n }\n vec2 A = aTexCoord;\n v = u * (v / glyphSize * d);\n float B;\n if(isRenderingTerrain == 1.) {\n B = 1.;\n } else {\n B = j / cameraToCenterDistance;\n }\n if(h == .0) {\n vec2 C = v * 2. / canvasSize;\n gl_Position.xy += C * k * j;\n } else {\n float D;\n if(isRenderingTerrain == 1.) {\n D = tileRatio / zoomScale;\n } else {\n D = tileRatio / zoomScale * B * k;\n }\n vec2 C = v;\n gl_Position = projViewModelMatrix * positionMatrix * vec4(c + vec3(C, .0) * D, 1.);\n }\n gl_Position.xy += vec2(e, -f) * 2. / canvasSize * j;\n#ifndef PICKING_MODE\nif(h == .0) {\n vGammaScale = mix(1., B, textPerspectiveRatio);\n } else {\n vGammaScale = B + mapPitch / 4.;\n }\n vTexCoord = A / glyphTexSize;\n vGammaScale = clamp(vGammaScale, .0, 1.);\n vTextSize = d;\n#ifdef ENABLE_COLLISION\nvOpacity = aOpacity / 255.;\n#else\nvOpacity = 1.;\n#endif\n#ifdef HAS_OPACITY\nvOpacity *= aColorOpacity / 255.;\n#endif\n#ifdef HAS_TEXT_FILL\nvTextFill = aTextFill / 255.;\n#endif\n#ifdef HAS_TEXT_HALO_FILL\nvTextHaloFill = aTextHaloFill / 255.;\n#endif\n#if defined(HAS_TEXT_HALO_RADIUS) || defined(HAS_TEXT_HALO_OPACITY)\nvTextHalo = aTextHalo;\n#endif\nhighlight_setVarying();\n#else\n#ifdef ENABLE_COLLISION\nbool E = aOpacity == 255.;\n#else\nbool E = true;\n#endif\nfbo_picking_setData(gl_Position.w, E);\n#endif\n}", eo = "#define SHADER_NAME TEXT_LINE\n#ifdef HAS_ALTITUDE\nattribute vec2 aPosition;\nattribute float aAltitude;\n#else\nattribute vec3 aPosition;\n#endif\nattribute vec2 aTexCoord;\n#ifdef HAS_OFFSET_Z\nattribute vec3 aOffset;\nuniform float altitudeScale;\n#else\nattribute vec2 aOffset;\n#endif\n#ifdef ENABLE_COLLISION\nattribute float aOpacity;\n#endif\n#ifdef HAS_OPACITY\nattribute float aColorOpacity;\n#endif\n#ifdef HAS_TEXT_SIZE\nattribute float aTextSize;\n#else\nuniform float textSize;\n#endif\n#ifdef HAS_TEXT_DX\nattribute float aTextDx;\n#else\nuniform float textDx;\n#endif\n#ifdef HAS_TEXT_DY\nattribute float aTextDy;\n#else\nuniform float textDy;\n#endif\n#if defined(HAS_PITCH_ALIGN)\nattribute float aPitchAlign;\n#else\nuniform float textPitchWithMap;\n#endif\nuniform float zoomScale;\nuniform float cameraToCenterDistance;\nuniform mat4 projViewModelMatrix;\nuniform float textPerspectiveRatio;\nuniform float mapPitch;\nuniform vec2 glyphTexSize;\nuniform vec2 canvasSize;\nuniform float tileRatio;\nuniform float layerScale;\nuniform float isRenderingTerrain;\nuniform float textPitchFilter;\n#ifndef PICKING_MODE\nvarying vec2 vTexCoord;\nvarying float vGammaScale;\nvarying float vTextSize;\nvarying float vOpacity;\n#ifdef HAS_TEXT_FILL\nattribute vec4 aTextFill;\nvarying vec4 vTextFill;\n#endif\n#ifdef HAS_TEXT_HALO_FILL\nattribute vec4 aTextHaloFill;\nvarying vec4 vTextHaloFill;\n#endif\n#if defined(HAS_TEXT_HALO_RADIUS) || defined(HAS_TEXT_HALO_OPACITY)\nattribute vec2 aTextHalo;\nvarying vec2 vTextHalo;\n#endif\n#include <highlight_vert>\n#else\n#include <fbo_picking_vert>\n#endif\n#include <vt_position_vert>\nvoid main() {\n vec3 c = unpackVTPosition();\n#ifdef HAS_TEXT_DX\nfloat d = aTextDx;\n#else\nfloat d = textDx;\n#endif\n#ifdef HAS_TEXT_DY\nfloat e = aTextDy;\n#else\nfloat e = textDy;\n#endif\n#ifdef HAS_TEXT_SIZE\nfloat f = aTextSize * layerScale;\n#else\nfloat f = textSize * layerScale;\n#endif\n#ifdef HAS_PITCH_ALIGN\nfloat h = aPitchAlign;\n#else\nfloat h = textPitchWithMap;\n#endif\ngl_Position = projViewModelMatrix * vec4(c, 1.);\n float i = gl_Position.w;\n float j = i / cameraToCenterDistance;\n float k;\n if(isRenderingTerrain == 1.) {\n k = 1.;\n } else {\n float l = (1. - cameraToCenterDistance / i) * textPerspectiveRatio;\n k = clamp(.5 + .5 * (1. - l), .0, 4.);\n }\n#ifdef HAS_OFFSET_Z\nvec3 m = aOffset / 10.0;\n m[2] /= altitudeScale;\n#else\nvec3 m = vec3(aOffset / 10.0, .0);\n#endif\nvec2 n = aTexCoord;\n if(h == 1.) {\n float o;\n if(isRenderingTerrain == 1.) {\n o = tileRatio;\n } else {\n o = tileRatio / zoomScale * j * k;\n }\n m.xy *= o;\n gl_Position = projViewModelMatrix * vec4(c + m, 1.);\n } else {\n gl_Position.xy += m.xy * 2. / canvasSize * k * i;\n }\n gl_Position.xy += vec2(d, -e) * 2. / canvasSize * i;\n if(textPitchFilter > .0) {\n if(textPitchFilter == 1. && h == .0 || textPitchFilter == 2. && h == 1.) {\n gl_Position = vec4(-9999., -9999., .0, 1.);\n }\n }\n#ifndef PICKING_MODE\nif(h == 1.) {\n vGammaScale = j + mapPitch / 4.;\n } else {\n vGammaScale = mix(1., j, textPerspectiveRatio);\n }\n vGammaScale = clamp(vGammaScale, .0, 1.);\n vTexCoord = n / glyphTexSize;\n vTextSize = f;\n#ifdef ENABLE_COLLISION\nvOpacity = aOpacity / 255.;\n#else\nvOpacity = 1.;\n#endif\n#ifdef HAS_OPACITY\nvOpacity *= aColorOpacity / 255.;\n#endif\n#ifdef HAS_TEXT_FILL\nvTextFill = aTextFill / 255.;\n#endif\n#ifdef HAS_TEXT_HALO_FILL\nvTextHaloFill = aTextHaloFill / 255.;\n#endif\n#if defined(HAS_TEXT_HALO_RADIUS) || defined(HAS_TEXT_HALO_OPACITY)\nvTextHalo = aTextHalo;\n#endif\nhighlight_setVarying();\n#else\n#ifdef ENABLE_COLLISION\nbool u = aOpacity == 255.;\n#else\nbool u = true;\n#endif\nfbo_picking_setData(gl_Position.w, u);\n#endif\n}", to = "#define SHADER_NAME TEXT_FRAG\nprecision mediump float;\nuniform float layerOpacity;\nvarying vec2 vTexCoord;\nvarying float vOpacity;\nuniform float alphaTest;\n#include <text_render_frag>\n#include <highlight_frag>\nvoid main() {\n gl_FragColor = renderText(vTexCoord) * vOpacity * layerOpacity;\n if(gl_FragColor.a < alphaTest) {\n discard;\n }\n gl_FragColor = highlight_blendColor(gl_FragColor);\n}";
16968
+ var Qs = "#define SHADER_NAME TEXT_VERT\n#define RAD 0.0174532925\n#ifdef HAS_ALTITUDE\nattribute vec2 aPosition;\nattribute float aAltitude;\n#else\nattribute vec3 aPosition;\n#endif\nattribute vec4 aShape;\n#ifdef ENABLE_COLLISION\nattribute float aOpacity;\n#endif\n#ifdef HAS_OPACITY\nattribute float aColorOpacity;\n#endif\n#ifdef HAS_TEXT_SIZE\nattribute float aTextSize;\n#else\nuniform float textSize;\n#endif\n#ifdef HAS_TEXT_DX\nattribute float aTextDx;\n#else\nuniform float textDx;\n#endif\n#ifdef HAS_TEXT_DY\nattribute float aTextDy;\n#else\nuniform float textDy;\n#endif\n#if defined(HAS_PITCH_ALIGN)\nattribute float aPitchAlign;\n#else\nuniform float textPitchWithMap;\n#endif\n#if defined(HAS_TEXT_ROTATION_ALIGN)\nattribute float aRotationAlign;\n#else\nuniform float textRotateWithMap;\n#endif\nuniform float flipY;\n#if defined(HAS_TEXT_ROTATION)\nattribute float aRotation;\n#else\nuniform float textRotation;\n#endif\nuniform float cameraToCenterDistance;\nuniform mat4 positionMatrix;\nuniform mat4 projViewModelMatrix;\nuniform float textPerspectiveRatio;\nuniform vec2 glyphTexSize;\nuniform vec2 canvasSize;\nuniform float glyphSize;\nuniform float mapPitch;\nuniform float mapRotation;\nuniform float zoomScale;\nuniform float tileRatio;\nuniform float layerScale;\nuniform float isRenderingTerrain;\n#ifndef PICKING_MODE\nvarying vec2 vTexCoord;\nvarying float vGammaScale;\nvarying float vTextSize;\nvarying float vOpacity;\n#ifdef HAS_TEXT_FILL\nattribute vec4 aTextFill;\nvarying vec4 vTextFill;\n#endif\n#ifdef HAS_TEXT_HALO_FILL\nattribute vec4 aTextHaloFill;\nvarying vec4 vTextHaloFill;\n#endif\n#if defined(HAS_TEXT_HALO_RADIUS) || defined(HAS_TEXT_HALO_OPACITY)\nattribute vec2 aTextHalo;\nvarying vec2 vTextHalo;\n#endif\n#include <highlight_vert>\n#else\n#include <fbo_picking_vert>\n#endif\n#include <vt_position_vert>\nvoid main() {\n vec3 c = unpackVTPosition();\n#ifdef HAS_TEXT_SIZE\nfloat d = aTextSize * layerScale;\n#else\nfloat d = textSize * layerScale;\n#endif\n#ifdef HAS_TEXT_DX\nfloat e = aTextDx;\n#else\nfloat e = textDx;\n#endif\n#ifdef HAS_TEXT_DY\nfloat f = aTextDy;\n#else\nfloat f = textDy;\n#endif\n#if defined(HAS_PITCH_ALIGN)\nfloat h = aPitchAlign;\n#else\nfloat h = textPitchWithMap;\n#endif\n#if defined(HAS_ROTATION_ALIGN)\nfloat i = aRotationAlign;\n#else\nfloat i = textRotateWithMap;\n#endif\ngl_Position = projViewModelMatrix * positionMatrix * vec4(c, 1.);\n float j = gl_Position.w;\n float k;\n if(isRenderingTerrain == 1. && h == 1.) {\n k = 1.;\n } else {\n float l = (1. - cameraToCenterDistance / j) * textPerspectiveRatio;\n k = clamp(.5 + .5 * (1. - l), .0, 4.);\n }\n#ifdef HAS_TEXT_ROTATION\nfloat m = -aRotation / 9362. - mapRotation * i;\n#else\nfloat m = -textRotation - mapRotation * i;\n#endif\nif(h == 1.) {\n \n#ifdef REVERSE_MAP_ROTATION_ON_PITCH\nm += mapRotation;\n#else\nm -= mapRotation;\n#endif\n }\n float n = sin(m);\n float o = cos(m);\n mat2 u = mat2(o, -1. * n, n, o);\n vec2 v = aShape.xy / 10.0;\n if(h == 1. && flipY == .0) {\n v = v * vec2(1., -1.);\n }\n vec2 A = aShape.zw;\n v = u * (v / glyphSize * d);\n float B;\n if(isRenderingTerrain == 1.) {\n B = 1.;\n } else {\n B = j / cameraToCenterDistance;\n }\n if(h == .0) {\n vec2 C = v * 2. / canvasSize;\n gl_Position.xy += C * k * j;\n } else {\n float D;\n if(isRenderingTerrain == 1.) {\n D = tileRatio / zoomScale;\n } else {\n D = tileRatio / zoomScale * B * k;\n }\n vec2 C = v;\n gl_Position = projViewModelMatrix * positionMatrix * vec4(c + vec3(C, .0) * D, 1.);\n }\n gl_Position.xy += vec2(e, -f) * 2. / canvasSize * j;\n#ifndef PICKING_MODE\nif(h == .0) {\n vGammaScale = mix(1., B, textPerspectiveRatio);\n } else {\n vGammaScale = B + mapPitch / 4.;\n }\n vTexCoord = A / glyphTexSize;\n vGammaScale = clamp(vGammaScale, .0, 1.);\n vTextSize = d;\n#ifdef ENABLE_COLLISION\nvOpacity = aOpacity / 255.;\n#else\nvOpacity = 1.;\n#endif\n#ifdef HAS_OPACITY\nvOpacity *= aColorOpacity / 255.;\n#endif\n#ifdef HAS_TEXT_FILL\nvTextFill = aTextFill / 255.;\n#endif\n#ifdef HAS_TEXT_HALO_FILL\nvTextHaloFill = aTextHaloFill / 255.;\n#endif\n#if defined(HAS_TEXT_HALO_RADIUS) || defined(HAS_TEXT_HALO_OPACITY)\nvTextHalo = aTextHalo;\n#endif\nhighlight_setVarying();\n#else\n#ifdef ENABLE_COLLISION\nbool E = aOpacity == 255.;\n#else\nbool E = true;\n#endif\nfbo_picking_setData(gl_Position.w, E);\n#endif\n}", eo = "#define SHADER_NAME TEXT_LINE\n#ifdef HAS_ALTITUDE\nattribute vec2 aPosition;\nattribute float aAltitude;\n#else\nattribute vec3 aPosition;\n#endif\nattribute vec2 aTexCoord;\n#ifdef HAS_OFFSET_Z\nattribute vec3 aOffset;\nuniform float altitudeScale;\n#else\nattribute vec2 aOffset;\n#endif\n#ifdef ENABLE_COLLISION\nattribute float aOpacity;\n#endif\n#ifdef HAS_OPACITY\nattribute float aColorOpacity;\n#endif\n#ifdef HAS_TEXT_SIZE\nattribute float aTextSize;\n#else\nuniform float textSize;\n#endif\n#ifdef HAS_TEXT_DX\nattribute float aTextDx;\n#else\nuniform float textDx;\n#endif\n#ifdef HAS_TEXT_DY\nattribute float aTextDy;\n#else\nuniform float textDy;\n#endif\n#if defined(HAS_PITCH_ALIGN)\nattribute float aPitchAlign;\n#else\nuniform float textPitchWithMap;\n#endif\nuniform float zoomScale;\nuniform float cameraToCenterDistance;\nuniform mat4 projViewModelMatrix;\nuniform float textPerspectiveRatio;\nuniform float mapPitch;\nuniform vec2 glyphTexSize;\nuniform vec2 canvasSize;\nuniform float tileRatio;\nuniform float layerScale;\nuniform float isRenderingTerrain;\nuniform float textPitchFilter;\n#ifndef PICKING_MODE\nvarying vec2 vTexCoord;\nvarying float vGammaScale;\nvarying float vTextSize;\nvarying float vOpacity;\n#ifdef HAS_TEXT_FILL\nattribute vec4 aTextFill;\nvarying vec4 vTextFill;\n#endif\n#ifdef HAS_TEXT_HALO_FILL\nattribute vec4 aTextHaloFill;\nvarying vec4 vTextHaloFill;\n#endif\n#if defined(HAS_TEXT_HALO_RADIUS) || defined(HAS_TEXT_HALO_OPACITY)\nattribute vec2 aTextHalo;\nvarying vec2 vTextHalo;\n#endif\n#include <highlight_vert>\n#else\n#include <fbo_picking_vert>\n#endif\n#include <vt_position_vert>\nvoid main() {\n vec3 c = unpackVTPosition();\n#ifdef HAS_TEXT_DX\nfloat d = aTextDx;\n#else\nfloat d = textDx;\n#endif\n#ifdef HAS_TEXT_DY\nfloat e = aTextDy;\n#else\nfloat e = textDy;\n#endif\n#ifdef HAS_TEXT_SIZE\nfloat f = aTextSize * layerScale;\n#else\nfloat f = textSize * layerScale;\n#endif\n#ifdef HAS_PITCH_ALIGN\nfloat h = aPitchAlign;\n#else\nfloat h = textPitchWithMap;\n#endif\ngl_Position = projViewModelMatrix * vec4(c, 1.);\n float i = gl_Position.w;\n float j = i / cameraToCenterDistance;\n float k;\n if(isRenderingTerrain == 1.) {\n k = 1.;\n } else {\n float l = (1. - cameraToCenterDistance / i) * textPerspectiveRatio;\n k = clamp(.5 + .5 * (1. - l), .0, 4.);\n }\n#ifdef HAS_OFFSET_Z\nvec3 m = aOffset / 10.0;\n m[2] /= altitudeScale;\n#else\nvec3 m = vec3(aOffset / 10.0, .0);\n#endif\nvec2 n = aTexCoord;\n if(h == 1.) {\n float o;\n if(isRenderingTerrain == 1.) {\n o = tileRatio;\n } else {\n o = tileRatio / zoomScale * j * k;\n }\n m.xy *= o;\n gl_Position = projViewModelMatrix * vec4(c + m, 1.);\n } else {\n gl_Position.xy += m.xy * 2. / canvasSize * k * i;\n }\n gl_Position.xy += vec2(d, -e) * 2. / canvasSize * i;\n if(textPitchFilter > .0) {\n if(textPitchFilter == 1. && h == .0 || textPitchFilter == 2. && h == 1.) {\n gl_Position = vec4(-9999., -9999., .0, 1.);\n }\n }\n#ifndef PICKING_MODE\nif(h == 1.) {\n vGammaScale = j + mapPitch / 4.;\n } else {\n vGammaScale = mix(1., j, textPerspectiveRatio);\n }\n vGammaScale = clamp(vGammaScale, .0, 1.);\n vTexCoord = n / glyphTexSize;\n vTextSize = f;\n#ifdef ENABLE_COLLISION\nvOpacity = aOpacity / 255.;\n#else\nvOpacity = 1.;\n#endif\n#ifdef HAS_OPACITY\nvOpacity *= aColorOpacity / 255.;\n#endif\n#ifdef HAS_TEXT_FILL\nvTextFill = aTextFill / 255.;\n#endif\n#ifdef HAS_TEXT_HALO_FILL\nvTextHaloFill = aTextHaloFill / 255.;\n#endif\n#if defined(HAS_TEXT_HALO_RADIUS) || defined(HAS_TEXT_HALO_OPACITY)\nvTextHalo = aTextHalo;\n#endif\nhighlight_setVarying();\n#else\n#ifdef ENABLE_COLLISION\nbool u = aOpacity == 255.;\n#else\nbool u = true;\n#endif\nfbo_picking_setData(gl_Position.w, u);\n#endif\n}", to = "#define SHADER_NAME TEXT_FRAG\nprecision mediump float;\nuniform float layerOpacity;\nvarying vec2 vTexCoord;\nvarying float vOpacity;\nuniform float alphaTest;\n#include <text_render_frag>\n#include <highlight_frag>\nvoid main() {\n gl_FragColor = renderText(vTexCoord) * vOpacity * layerOpacity;\n if(gl_FragColor.a < alphaTest) {\n discard;\n }\n gl_FragColor = highlight_blendColor(gl_FragColor);\n}";
16966
16969
  const {TextUtil: no, PackUtil: io, FilterUtil: ro, TEXT_MAX_ANGLE: so} = h(), oo = function(e) {
16967
16970
  const t = this.layer.getRenderer();
16968
16971
  return !this._isHalo0(e) && t.isTileNearCamera(e) && "line" !== e.geometry.properties.textPlacement;
@@ -16975,7 +16978,7 @@
16975
16978
  }, ho = function(e) {
16976
16979
  const t = this.layer.getRenderer(), n = e.properties.tile.z, i = t.getCurrentTileZoom();
16977
16980
  return !this._isHalo0(e) && !t.isForeground(e) && "line" === e.geometry.properties.textPlacement && n < i;
16978
- }, co = [ 0, 0, 3 ], uo = [], fo = [], po = [], go = [], mo = [], yo = [], xo = [], _o = [], vo = [ 1, -1 ], bo = new Int16Array(3), Ao = [], To = [], wo = [], Mo = [], So = [], Po = [], Io = [], Co = {}, ko = {}, Oo = {}, Fo = [], Ro = [], Eo = n.mat4.identity([]), Do = [];
16981
+ }, co = [ 0, 0, 3 ], uo = [], fo = [], po = [], go = [], mo = [], yo = [], xo = [], _o = [], vo = [ 1, -1 ], bo = new Int16Array(3), Ao = [], To = [], wo = [], So = [], Mo = [], Po = [], Io = [], Co = {}, ko = {}, Oo = {}, Fo = [], Ro = [], Eo = n.mat4.identity([]), Do = [];
16979
16982
  class Lo extends xr {
16980
16983
  static getBloomSymbol() {
16981
16984
  return [ "textBloom" ];
@@ -17035,7 +17038,7 @@
17035
17038
  }
17036
17039
  return i;
17037
17040
  };
17038
- } else we(t.textName) && (this._textNameFn[e] = Me(t.textName));
17041
+ } else we(t.textName) && (this._textNameFn[e] = Se(t.textName));
17039
17042
  }
17040
17043
  }
17041
17044
  shouldDeleteMeshOnUpdateSymbol(e) {
@@ -17197,29 +17200,29 @@
17197
17200
  const l = this.layer.getRenderer(), h = e.material.uniforms, c = 1 === h.textPitchWithMap, u = !c && l.getTerrainHelper && l.getTerrainHelper(), f = this.isEnableCollision(), d = this.getMap(), p = e.geometry, g = p.desc.positionSize, {aShape: m, aOffset: y, aAnchor: x, aAltitude: _, aPitchRotation: v} = p.properties;
17198
17201
  let {aProjectedAnchor: b} = p.properties;
17199
17202
  b || (b = p.properties.aProjectedAnchor = new Array(x.length / g * 3));
17200
- const A = p.properties.aTextSize, T = !a, w = t[i], M = w * g;
17201
- let S;
17202
- S = p.data.aAltitude ? n.vec3.set(go, x[M], x[M + 1], _[w]) : io.unpackPosition(go, x[M], x[M + 1], x[M + 2]);
17203
- const P = oi(mo, S, o, d.width, d.height), I = p.properties.aTerrainAltitude;
17203
+ const A = p.properties.aTextSize, T = !a, w = t[i], S = w * g;
17204
+ let M;
17205
+ M = p.data.aAltitude ? n.vec3.set(go, x[S], x[S + 1], _[w]) : io.unpackPosition(go, x[S], x[S + 1], x[S + 2]);
17206
+ const P = oi(mo, M, o, d.width, d.height), I = p.properties.aTerrainAltitude;
17204
17207
  let C;
17205
17208
  if (I) {
17206
17209
  const e = I[w];
17207
17210
  if (e === at) return b[3 * w] = ot, b[3 * w + 1] = ot, b[3 * w + 2] = ot, !1;
17208
- e ? (C = n.vec3.set(Ro, ...S), C[2] = 100 * e, C = oi(C, C, o, d.width, d.height)) : C = P;
17211
+ e ? (C = n.vec3.set(Ro, ...M), C[2] = 100 * e, C = oi(C, C, o, d.width, d.height)) : C = P;
17209
17212
  } else C = P;
17210
17213
  const k = d.getDevicePixelRatio();
17211
17214
  if (n.vec4.scale(Do, C, 1 / k), d.isOffscreen(Do)) return f || Ho(y, t, i, r), b[3 * w] = ot,
17212
17215
  b[3 * w + 1] = ot, b[3 * w + 2] = ot, !1;
17213
- T && (S = P), b[3 * w] = C[0], b[3 * w + 1] = C[1], b[3 * w + 2] = C[2];
17216
+ T && (M = P), b[3 * w] = C[0], b[3 * w + 1] = C[1], b[3 * w + 2] = C[2];
17214
17217
  const O = T ? 1 : p.properties.tileExtent / this.layer.getTileSize().width;
17215
17218
  let F = !0;
17216
- const R = t[i], E = t[r - 1], D = A ? A[R] : e.properties.textSize, L = this._updateNormal(e, D, s, R, E, S, go, O, a);
17219
+ const R = t[i], E = t[r - 1], D = A ? A[R] : e.properties.textSize, L = this._updateNormal(e, D, s, R, E, M, go, O, a);
17217
17220
  if (null === L) return Ho(y, t, i, r), !1;
17218
17221
  const H = E - R <= 3, N = Math.floor(L / 2), z = L % 2;
17219
17222
  for (let a = i; a < r; a += 6) {
17220
17223
  const l = t[a];
17221
17224
  let d;
17222
- if (d = N || a !== i || H || u ? N || a !== r - 6 || H || u ? qs.call(this, fo, e, D, s, l, S, go, O, N, C, this.layer, o, c) : Io : Po,
17225
+ if (d = N || a !== i || H || u ? N || a !== r - 6 || H || u ? qs.call(this, fo, e, D, s, l, M, go, O, N, C, this.layer, o, c) : Io : Po,
17223
17226
  !d) {
17224
17227
  F = !1, f || Ho(y, t, i, r);
17225
17228
  break;
@@ -17229,8 +17232,8 @@
17229
17232
  const g = Fr(yo, p, 0, h.textRotateWithMap, h.textPitchWithMap), x = y.length > m.length;
17230
17233
  let _;
17231
17234
  if (x) {
17232
- n.vec3.set(Mo, v[3 * l], v[3 * l + 1], 0);
17233
- const e = n.vec3.normalize(Mo, Mo), t = -v[3 * l + 2];
17235
+ n.vec3.set(So, v[3 * l], v[3 * l + 1], 0);
17236
+ const e = n.vec3.normalize(So, So), t = -v[3 * l + 2];
17234
17237
  if (t) {
17235
17238
  const i = n.quat.setAxisAngle(Ao, e, t);
17236
17239
  n.mat4.fromTranslation(To, co), n.mat4.fromQuat(wo, i), _ = n.mat4.multiply(wo, wo, To);
@@ -17316,7 +17319,7 @@
17316
17319
  }
17317
17320
  }
17318
17321
  getUniformValues(e, t) {
17319
- const i = t && t.isRenderingTerrainSkin, r = this.layer.getTileSize().width, s = i ? Eo : e.projViewMatrix, o = e.cameraToCenterDistance, a = n.vec2.set(So, e.width, e.height);
17322
+ const i = t && t.isRenderingTerrainSkin, r = this.layer.getTileSize().width, s = i ? Eo : e.projViewMatrix, o = e.cameraToCenterDistance, a = n.vec2.set(Mo, e.width, e.height);
17320
17323
  i && n.vec2.set(a, r, r);
17321
17324
  const l = Ue(e.getResolution(), e);
17322
17325
  return {
@@ -17391,7 +17394,7 @@
17391
17394
  h.properties.symbolIndex = r, h;
17392
17395
  }
17393
17396
  createFnTypeConfig(e, t) {
17394
- const n = Se(t.markerFill);
17397
+ const n = Me(t.markerFill);
17395
17398
  return [ {
17396
17399
  attrName: "aColor",
17397
17400
  symbolName: "markerFill",
@@ -17467,7 +17470,7 @@
17467
17470
  class jo extends Fi {
17468
17471
  constructor(e, t, n, i, r, s) {
17469
17472
  if (super(e, t, n, i, r, s), this.primitive = "lines", we(this.symbolDef.lineColor)) {
17470
- const e = t.getMap(), n = Se(this.symbolDef.lineColor);
17473
+ const e = t.getMap(), n = Me(this.symbolDef.lineColor);
17471
17474
  this.colorSymbol = t => n(e.getZoom(), t);
17472
17475
  }
17473
17476
  }
@@ -17739,7 +17742,7 @@
17739
17742
  return !("line-extrusion" === this.dataConfig.type && !e.altitudeProperty && !t.altitudeProperty);
17740
17743
  }
17741
17744
  createFnTypeConfig(e, t) {
17742
- const n = Se(t.polygonFill || t.lineColor), i = Me(t.polygonOpacity || t.lineOpacity), r = Me(t.lineWidth), s = new Uint8Array(1), o = new Uint16Array(1), a = t.polygonFill ? "polygonFill" : t.lineColor ? "lineColor" : "polygonFill", l = t.polygonOpacity ? "polygonOpacity" : t.lineOpacity ? "lineOpacity" : "polygonOpacity";
17745
+ const n = Me(t.polygonFill || t.lineColor), i = Se(t.polygonOpacity || t.lineOpacity), r = Se(t.lineWidth), s = new Uint8Array(1), o = new Uint16Array(1), a = t.polygonFill ? "polygonFill" : t.lineColor ? "lineColor" : "polygonFill", l = t.polygonOpacity ? "polygonOpacity" : t.lineOpacity ? "lineOpacity" : "polygonOpacity";
17743
17746
  return [ {
17744
17747
  attrName: "aColor",
17745
17748
  type: Uint8Array,
@@ -18352,7 +18355,7 @@
18352
18355
  r;
18353
18356
  }
18354
18357
  createFnTypeConfig(e, t) {
18355
- const n = Se(t.lineColor), i = Se(t.aLinePatternAnimSpeed), r = Se(t.aLinePatternGap), s = this.createShapeFnTypeConfigs(e, t), o = new Int8Array(2);
18358
+ const n = Me(t.lineColor), i = Me(t.aLinePatternAnimSpeed), r = Me(t.aLinePatternGap), s = this.createShapeFnTypeConfigs(e, t), o = new Int8Array(2);
18356
18359
  return [ {
18357
18360
  attrName: "aColor",
18358
18361
  symbolName: "lineColor",
@@ -18390,7 +18393,7 @@
18390
18393
  } ].concat(s);
18391
18394
  }
18392
18395
  createShapeFnTypeConfigs(e, t) {
18393
- const n = Me(t.lineWidth), i = Me(t.lineOpacity), r = new Uint16Array(1);
18396
+ const n = Se(t.lineWidth), i = Se(t.lineOpacity), r = new Uint16Array(1);
18394
18397
  return [ {
18395
18398
  attrName: "aLineWidth",
18396
18399
  symbolName: "lineWidth",
@@ -18427,7 +18430,7 @@
18427
18430
  delete this.shader);
18428
18431
  }
18429
18432
  }
18430
- const {PackUtil: da} = h(), pa = [], ga = [], ma = [], ya = [], xa = [], _a = [ 0, 0, 0 ], va = [ 0, 0, 0 ], ba = [ 1, 1, 1 ], Aa = [], Ta = [ 1, 1, 1, 1 ], wa = [], Ma = [ 1, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 0, 0, 1 ], Sa = e => class extends e {
18433
+ const {PackUtil: da} = h(), pa = [], ga = [], ma = [], ya = [], xa = [], _a = [], va = [ 0, 0, 0 ], ba = [ 0, 0, 0 ], Aa = [ 1, 1, 1 ], Ta = [], wa = [ 1, 1, 1, 1 ], Sa = [], Ma = [ 1, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 0, 0, 1 ], Pa = e => class extends e {
18431
18434
  constructor(e, t, i, r, s, o) {
18432
18435
  super(e, t, i, r, s, o), this._ready = !1, this.scene.sortFunction = this.sortByCommandKey;
18433
18436
  const a = r.fetchOptions || {};
@@ -18462,20 +18465,23 @@
18462
18465
  };
18463
18466
  }
18464
18467
  getFnTypeConfig() {
18465
- return Aa;
18468
+ return Ta;
18466
18469
  }
18467
- createMesh(e, t, {tileTranslationMatrix: i, tileExtent: r}, {timestamp: s}) {
18470
+ createMesh(e, t, {tileTranslationMatrix: i, tileExtent: r, tilePoint: s}, {timestamp: o}) {
18468
18471
  if (!this._ready) return null;
18469
- const o = this.getMap(), {geometry: a} = e, {positionSize: l, features: h} = a, {aPosition: c, aPickingId: u, aXYRotation: f, aZRotation: d, aAltitude: p} = a.data, g = c.length / l;
18470
- if (0 === g) return null;
18471
- const m = {
18472
- instance_vectorA: new Float32Array(4 * g),
18473
- instance_vectorB: new Float32Array(4 * g),
18474
- instance_vectorC: new Float32Array(4 * g),
18472
+ const a = this.getMap(), {geometry: l} = e, {positionSize: h, features: c} = l;
18473
+ if (!l.data.aPosition || 0 === l.data.aPosition.length) return null;
18474
+ "native-line" === this.dataConfig.type && this._arrangeAlongLine(0, l, s);
18475
+ const {aPosition: u, aPickingId: f, aXYRotation: d, aZRotation: p, aAltitude: g} = l.data;
18476
+ let m = u.length / h;
18477
+ const y = {
18478
+ instance_vectorA: new Float32Array(4 * m),
18479
+ instance_vectorB: new Float32Array(4 * m),
18480
+ instance_vectorC: new Float32Array(4 * m),
18475
18481
  aPickingId: []
18476
- }, y = this._updateInstanceData(m, i, r, a.properties.z, c, p, f, d, l, u, h);
18477
- a.data.aTerrainAltitude && (m.aTerrainAltitude = a.data.aTerrainAltitude);
18478
- const x = {}, _ = m.aPickingId, v = function(e) {
18482
+ }, x = this._updateInstanceData(y, i, r, l.properties.z, u, g, d, p, h, f, c);
18483
+ l.data.aTerrainAltitude && (y.aTerrainAltitude = l.data.aTerrainAltitude);
18484
+ const _ = {}, v = y.aPickingId, b = function(e) {
18479
18485
  const t = new Map;
18480
18486
  for (let n = 0; n < e.length; n++) {
18481
18487
  const i = e[n];
@@ -18483,54 +18489,54 @@
18483
18489
  r || (r = [], t.set(i, r)), r.push(n);
18484
18490
  }
18485
18491
  return t;
18486
- }(_);
18487
- for (const e in m) x[e] = {
18492
+ }(v);
18493
+ for (const e in y) _[e] = {
18488
18494
  buffer: this.regl.buffer({
18489
- dimension: m[e].length / g,
18490
- data: m[e]
18495
+ dimension: y[e].length / m,
18496
+ data: y[e]
18491
18497
  }),
18492
18498
  divisor: 1
18493
18499
  };
18494
- const b = this._hasFuncType(), A = this._getMeterScale(), T = n.mat4.identity([]);
18495
- n.mat4.scale(T, T, [ A, A, A ]);
18496
- const w = [], M = this.getSymbols();
18500
+ const A = this._hasFuncType(), T = this._getMeterScale(), w = n.mat4.identity([]);
18501
+ n.mat4.scale(w, w, [ T, T, T ]);
18502
+ const S = [], M = this.getSymbols();
18497
18503
  for (let e = 0; e < M.length; e++) {
18498
18504
  const t = M[e], r = this._gltfMeshInfos[e];
18499
18505
  if (!r) continue;
18500
- const l = this._gltfPack[e][0], {fixSizeOnZoom: h} = t;
18506
+ const s = this._gltfPack[e][0], {fixSizeOnZoom: h} = t;
18501
18507
  let c = n.mat4.identity([]);
18502
- b || (c = this._getSymbolTRSMatrix(c));
18508
+ A || (c = this._getSymbolTRSMatrix(c));
18503
18509
  let u = 0;
18504
18510
  r.forEach((e => {
18505
18511
  const {geometry: i, nodeMatrix: r} = e;
18506
- n.mat4.multiply(wa, Ma, r), n.mat4.multiply(wa, c, wa);
18507
- const s = n.mat4.multiply(wa, T, wa), o = i.boundingBox.copy();
18512
+ n.mat4.multiply(Sa, Ma, r), n.mat4.multiply(Sa, c, Sa);
18513
+ const s = n.mat4.multiply(Sa, w, Sa), o = i.boundingBox.copy();
18508
18514
  o.transform(s);
18509
18515
  const a = this._calAnchorTranslation(o, t);
18510
18516
  Math.abs(a) > Math.abs(u) && (u = a);
18511
18517
  }));
18512
18518
  const f = [ 0, 0, u ], d = r.map(((r, d) => {
18513
- const {geometry: p, materialInfo: b, morphWeights: A, extraInfo: w, nodeIndex: M} = r;
18514
- t.alphaTest && (b.alphaTest = t.alphaTest);
18515
- const S = new (this.getMaterialClazz(b))(b), P = {}, I = new n.reshader.InstancedMesh(x, g, p, S, {
18519
+ const {geometry: p, materialInfo: g, morphWeights: A, extraInfo: T, nodeIndex: S} = r;
18520
+ t.alphaTest && (g.alphaTest = t.alphaTest);
18521
+ const M = new (this.getMaterialClazz(g))(g), P = {}, I = new n.reshader.InstancedMesh(_, m, p, M, {
18516
18522
  transparent: !1,
18517
18523
  picking: !0
18518
18524
  });
18519
- if (l.hasSkinAnimation()) {
18520
- const t = this._updateAnimation(I, e, 0)[M];
18525
+ if (s.hasSkinAnimation()) {
18526
+ const t = this._updateAnimation(I, e, 0)[S];
18521
18527
  I.setUniform("jointTexture", t.jointTexture), I.setUniform("jointTextureSize", t.jointTextureSize),
18522
18528
  I.setUniform("numJoints", t.numJoints), I.setUniform("skinAnimation", +this._isSkinAnimating(e)),
18523
- I.properties.startTime = s, P.HAS_SKIN = 1;
18529
+ I.properties.startTime = o, P.HAS_SKIN = 1;
18524
18530
  }
18525
- A && (I.setUniform("morphWeights", A), P.HAS_MORPH = 1), I.setUniform("hasAlpha", w.alphaMode && "BLEND" === w.alphaMode.toUpperCase()),
18526
- bt(I.uniforms, "polygonFill", t, "markerFill", Ta, wt(this.colorCache)), bt(I.uniforms, "polygonOpacity", t, "markerOpacity", 1);
18531
+ A && (I.setUniform("morphWeights", A), P.HAS_MORPH = 1), I.setUniform("hasAlpha", T.alphaMode && "BLEND" === T.alphaMode.toUpperCase()),
18532
+ bt(I.uniforms, "polygonFill", t, "markerFill", wa, wt(this.colorCache)), bt(I.uniforms, "polygonOpacity", t, "markerOpacity", 1);
18527
18533
  const C = [];
18528
18534
  I.setPositionMatrix((() => {
18529
- const t = this._getMeshNodeMatrix(e, d, M);
18530
- n.mat4.multiply(C, Ma, t), n.mat4.multiply(C, c, C), n.mat4.multiply(C, T, C);
18531
- const i = n.mat4.identity(wa);
18535
+ const t = this._getMeshNodeMatrix(e, d, S);
18536
+ n.mat4.multiply(C, Ma, t), n.mat4.multiply(C, c, C), n.mat4.multiply(C, w, C);
18537
+ const i = n.mat4.identity(Sa);
18532
18538
  if (0 !== u && (n.mat4.fromTranslation(i, f), n.mat4.multiply(C, i, C)), Pt(h)) {
18533
- const e = o.getGLScale() / o.getGLScale(h);
18539
+ const e = a.getGLScale() / a.getGLScale(h);
18534
18540
  return n.vec3.set(pa, e, e, e), n.mat4.fromScaling(i, pa), n.mat4.multiply(i, i, C);
18535
18541
  }
18536
18542
  return C;
@@ -18538,26 +18544,64 @@
18538
18544
  const k = this.layer.getRenderer().getZScale(), O = [], F = [];
18539
18545
  return I.setLocalTransform((() => {
18540
18546
  const e = this.layer.options.altitude || 0;
18541
- return n.vec3.copy(F, y), F[2] += 100 * e * k, n.mat4.translate(O, i, F), O;
18547
+ return n.vec3.copy(F, x), F[2] += 100 * e * k, n.mat4.translate(O, i, F), O;
18542
18548
  })), p.generateBuffers(this.regl, {
18543
18549
  excludeElementsInVAO: !0
18544
- }), m.instance_color && (P.HAS_INSTANCE_COLOR = 1), m.aTerrainAltitude && (P.HAS_INSTANCE_TERRAIN_ALTITUDE = 1,
18550
+ }), y.instance_color && (P.HAS_INSTANCE_COLOR = 1), y.aTerrainAltitude && (P.HAS_INSTANCE_TERRAIN_ALTITUDE = 1,
18545
18551
  I.setUniform("terrainAltitudeScale", 100 * this.layer.getRenderer().getZScale())),
18546
- P.HAS_LAYER_OPACITY = 1, mt(I.properties, a.properties), I.properties.aPickingId = _,
18547
- I.properties.nodeIndex = M, I.properties.pickingIdIndiceMap = v, I.setDefines(P),
18552
+ P.HAS_LAYER_OPACITY = 1, mt(I.properties, l.properties), I.properties.aPickingId = v,
18553
+ I.properties.nodeIndex = S, I.properties.pickingIdIndiceMap = b, I.setDefines(P),
18548
18554
  I.properties.symbolIndex = {
18549
18555
  index: e
18550
18556
  }, I;
18551
18557
  }));
18552
- w.push(...d);
18558
+ S.push(...d);
18553
18559
  }
18554
- return w.insContext = {
18555
- instanceData: m,
18560
+ return S.insContext = {
18561
+ instanceData: y,
18556
18562
  tileTranslationMatrix: i,
18557
18563
  tileExtent: r,
18558
- aPosition: c,
18559
- positionSize: l
18560
- }, w;
18564
+ aPosition: u,
18565
+ positionSize: h
18566
+ }, S;
18567
+ }
18568
+ _arrangeAlongLine(e, i) {
18569
+ const {tileExtent: r, z: s} = i.properties, {data: o, positionSize: a} = i;
18570
+ let l = this._calGLTFScale(e);
18571
+ const h = this._getMeterScale();
18572
+ l = n.vec3.scale([], l, h);
18573
+ const c = {
18574
+ gapLength: this.dataConfig.gapLength || 0,
18575
+ direction: this.dataConfig.direction || 0,
18576
+ scaleVertex: !0
18577
+ }, u = this._gltfPack[0][0], {aPosition: f, aAltitude: d, aPickingId: p} = o, g = new t.Coordinate(0, 0, 0), m = new t.Coordinate(0, 0, 0), y = [], x = d ? [] : y, _ = [], v = [], b = [], A = [], T = [], w = this.layer.getTileSize().width / r * this.layer.getRenderer().getTileGLScale(s), S = this.layer.getRenderer().getZScale();
18578
+ for (let e = 0; e < f.length - a; e += a) {
18579
+ d ? n.vec3.set(A, f[e], f[e + 1], d[e / a]) : da.unpackPosition(A, f[e], f[e + 1], f[e + 2]);
18580
+ const [t, i, r] = A;
18581
+ let s = e + a;
18582
+ d ? n.vec3.set(T, f[s], f[s + 1], d[s / a]) : da.unpackPosition(T, f[s], f[s + 1], f[s + 2]);
18583
+ const [o, h, M] = T, P = p[e / a], I = g.set(t * w, i * w, r * S), C = m.set(o * w, h * w, M * S), k = I.distanceTo(C), O = u.arrangeAlongLine(I, C, k, l, 1, c);
18584
+ for (let e = 0; e < O.length; e++) {
18585
+ const n = O[e];
18586
+ g.set(t, i, r), m.set(o, h, M);
18587
+ const s = Ia(g, m, n.t);
18588
+ y.push(s.x, s.y), x.push(s.z), _.push(P), v.push(-n.rotationZ * Math.PI / 180),
18589
+ b.push(n.rotationXY * Math.PI / 180);
18590
+ }
18591
+ }
18592
+ i.data = {
18593
+ aPosition: new f.constructor(y),
18594
+ aPickingId: new p.constructor(_),
18595
+ aZRotation: v,
18596
+ aXYRotation: b
18597
+ }, d && (i.data.aAltitude = new d.constructor(x));
18598
+ }
18599
+ _calGLTFScale(e) {
18600
+ const t = this.getSymbols()[e], i = [ 1, 1, 1 ], r = t.modelHeight;
18601
+ if (r) {
18602
+ this._gltfPack[e][0].calModelHeightScale(i, r);
18603
+ }
18604
+ return n.vec3.set(xa, t.scaleX || 1, t.scaleY || 1, t.scaleZ || 1), n.vec3.multiply(i, i, xa);
18561
18605
  }
18562
18606
  _getMeshNodeMatrix(e, t, n) {
18563
18607
  const i = e, r = this._gltfMeshInfos[i][t];
@@ -18605,7 +18649,7 @@
18605
18649
  n && this.setToRedraw(!0), super.prepareRender(e);
18606
18650
  }
18607
18651
  getShadowMeshes() {
18608
- if (!this.isVisible()) return Aa;
18652
+ if (!this.isVisible()) return Ta;
18609
18653
  this.shadowCount = this.scene.getMeshes().length;
18610
18654
  return this.scene.getMeshes().filter((e => 0 === e.properties.level));
18611
18655
  }
@@ -18626,25 +18670,25 @@
18626
18670
  t[0] < y && (y = t[0]), t[0] > v && (v = t[0]), t[1] < x && (x = t[1]), t[1] > b && (b = t[1]),
18627
18671
  t[2] < _ && (_ = t[2]), t[2] > A && (A = t[2]);
18628
18672
  }
18629
- const M = (y + v) / 2, S = (x + b) / 2, P = (_ + A) / 2, I = [], C = this._hasFuncType(), k = [ 0, 0, 1 ];
18673
+ const S = (y + v) / 2, M = (x + b) / 2, P = (_ + A) / 2, I = [], C = this._hasFuncType(), k = [ 0, 0, 1 ], O = [ 0, 0, 0 ];
18630
18674
  for (let t = 0; t < d; t++) {
18631
18675
  o ? n.vec3.set(w, s[t * h], s[t * h + 1], o[t]) : da.unpackPosition(w, s[t * h], s[t * h + 1], s[t * h + 2]);
18632
- const i = w[0], r = w[1], d = n.vec3.set(T, i * p - M, -r * p - S, (w[2] + m) * g - P), y = a && a[t] || 0, x = l && l[t] || 0;
18676
+ const i = w[0], r = w[1], d = n.vec3.set(T, i * p - S, -r * p - M, (w[2] + m) * g - P), y = a && a[t] || 0, x = l && l[t] || 0;
18633
18677
  if (y || x) {
18634
18678
  n.mat4.fromRotation(I, x, k);
18635
- const e = n.vec3.set(pa, i, r, 0), t = n.vec3.normalize(e, n.vec3.cross(e, e, k));
18679
+ const e = n.vec3.set(pa, Math.cos(x), Math.sin(x), 0), t = n.vec3.rotateZ(e, e, O, 90 * Math.PI / 180);
18636
18680
  n.mat4.rotate(I, I, y, t);
18637
- const s = n.mat4.fromTranslation(wa, d);
18638
- n.mat4.multiply(I, s, I);
18681
+ const i = n.mat4.fromTranslation(Sa, d);
18682
+ n.mat4.multiply(I, i, I);
18639
18683
  } else n.mat4.fromTranslation(I, d);
18640
18684
  if (C) {
18641
- const e = this._getSymbolTRSMatrix(wa, u, c, t);
18685
+ const e = this._getSymbolTRSMatrix(Sa, u, c, t);
18642
18686
  n.mat4.multiply(I, I, e);
18643
18687
  }
18644
18688
  f("instance_vectorA", t, I, 0), f("instance_vectorB", t, I, 1), f("instance_vectorC", t, I, 2),
18645
18689
  e.aPickingId[t] = c[t];
18646
18690
  }
18647
- return n.vec3.set(T, M, S, P), T;
18691
+ return n.vec3.set(T, S, M, P), T;
18648
18692
  }
18649
18693
  _getMeterScale() {
18650
18694
  if (!this._meterScale) {
@@ -18681,11 +18725,11 @@
18681
18725
  }
18682
18726
  _initTRSFuncType() {
18683
18727
  const e = this.symbolDef[0];
18684
- we(e.modelHeight) && (this._modelHeightFn = Me(e.modelHeight)), we(e.translationX) && (this._txFn = Me(e.translationX)),
18685
- we(e.translationY) && (this._tyFn = Me(e.translationY)), we(e.translationZ) && (this._tzFn = Me(e.translationZ)),
18686
- we(e.rotationX) && (this._rxFn = Me(e.rotationX)), we(e.rotationY) && (this._ryFn = Me(e.rotationY)),
18687
- we(e.rotationZ) && (this._rzFn = Me(e.rotationZ)), we(e.scaleX) && (this._sxFn = Me(e.scaleX)),
18688
- we(e.scaleY) && (this._syFn = Me(e.scaleY)), we(e.scaleZ) && (this._szFn = Me(e.scaleZ));
18728
+ we(e.modelHeight) && (this._modelHeightFn = Se(e.modelHeight)), we(e.translationX) && (this._txFn = Se(e.translationX)),
18729
+ we(e.translationY) && (this._tyFn = Se(e.translationY)), we(e.translationZ) && (this._tzFn = Se(e.translationZ)),
18730
+ we(e.rotationX) && (this._rxFn = Se(e.rotationX)), we(e.rotationY) && (this._ryFn = Se(e.rotationY)),
18731
+ we(e.rotationZ) && (this._rzFn = Se(e.rotationZ)), we(e.scaleX) && (this._sxFn = Se(e.scaleX)),
18732
+ we(e.scaleY) && (this._syFn = Se(e.scaleY)), we(e.scaleZ) && (this._szFn = Se(e.scaleZ));
18689
18733
  }
18690
18734
  _hasFuncType() {
18691
18735
  return !!(this._modelHeightFn && !this._modelHeightFn.isFeatureConstant || this._txFn && !this._txFn.isFeatureConstant || this._tyFn && !this._tyFn.isFeatureConstant || this._tzFn && !this._tzFn.isFeatureConstant || this._rxFn && !this._rxFn.isFeatureConstant || this._ryFn && !this._ryFn.isFeatureConstant || this._rzFn && !this._rzFn.isFeatureConstant || this._sxFn && !this._sxFn.isFeatureConstant || this._syFn && !this._syFn.isFeatureConstant || this._szFn && !this._szFn.isFeatureConstant);
@@ -18747,27 +18791,34 @@
18747
18791
  delete this._nodeMatrixMap;
18748
18792
  }
18749
18793
  _getGLTFMatrix(e, t, i, r) {
18750
- const s = n.vec3.set(pa, ...t || _a), o = i || va, a = r || ba, l = n.quat.fromEuler(xa, o[0], o[1], o[2]);
18794
+ const s = n.vec3.set(pa, ...t || va), o = i || ba, a = r || Aa, l = n.quat.fromEuler(_a, o[0], o[1], o[2]);
18751
18795
  return n.mat4.fromRotationTranslationScale(e, l, s, a);
18752
18796
  }
18753
18797
  };
18754
- class Pa extends(Sa(ra)){
18798
+ function Ia(e, t, n) {
18799
+ const i = Ca(e.x, t.x, n), r = Ca(e.y, t.y, n), s = Ca(e.z || 0, t.z || 0, n);
18800
+ return new e.constructor(i, r, s);
18801
+ }
18802
+ function Ca(e, t, n) {
18803
+ return e + n * (t - e);
18804
+ }
18805
+ class ka extends(Pa(ra)){
18755
18806
  getMaterialClazz(e) {
18756
18807
  return e.diffuseFactor ? n.reshader.PhongSpecularGlossinessMaterial : n.reshader.PhongMaterial;
18757
18808
  }
18758
18809
  }
18759
- class Ia extends(Sa(la)){
18810
+ class Oa extends(Pa(la)){
18760
18811
  getMaterialClazz(e) {
18761
18812
  return e.specularGlossinessTexture || e.diffuseTexture ? n.reshader.pbr.StandardSpecularGlossinessMaterial : n.reshader.pbr.StandardMaterial;
18762
18813
  }
18763
18814
  }
18764
- const {getPBRUniforms: Ca} = n.reshader.pbr.PBRUtils, ka = {
18815
+ const {getPBRUniforms: Fa} = n.reshader.pbr.PBRUtils, Ra = {
18765
18816
  color: [ 2.0303, 2.028, 2.028 ],
18766
18817
  direction: [ 0, -.2717, -1 ]
18767
- }, Oa = .3737, Fa = {
18818
+ }, Ea = .3737, Da = {
18768
18819
  index: 0
18769
- }, Ra = [ 0, 0, 0 ], Ea = [ 2, 2 ];
18770
- class Da extends Fi {
18820
+ }, La = [ 0, 0, 0 ], Ha = [ 2, 2 ];
18821
+ class Na extends Fi {
18771
18822
  supportRenderMode(e) {
18772
18823
  return "fxaa" === e || "fxaaBeforeTaa" === e;
18773
18824
  }
@@ -18782,7 +18833,7 @@
18782
18833
  }
18783
18834
  needToRedraw() {
18784
18835
  if (super.needToRedraw()) return !0;
18785
- return this.getSymbol(Fa).animation;
18836
+ return this.getSymbol(Da).animation;
18786
18837
  }
18787
18838
  createMesh(e, t) {
18788
18839
  const {geometry: i} = e;
@@ -18791,7 +18842,7 @@
18791
18842
  castShadow: !1,
18792
18843
  picking: !0
18793
18844
  });
18794
- return r.properties.symbolIndex = Fa, r.setLocalTransform(t), r;
18845
+ return r.properties.symbolIndex = Da, r.setLocalTransform(t), r;
18795
18846
  }
18796
18847
  callShader(e, t) {
18797
18848
  super.callShader(e, t), this.transformWater();
@@ -18802,13 +18853,13 @@
18802
18853
  this._prepareMesh(e, t), super.addMesh(...arguments);
18803
18854
  }
18804
18855
  _prepareMesh(e) {
18805
- const t = this.getSymbol(Fa).ssr;
18856
+ const t = this.getSymbol(Da).ssr;
18806
18857
  for (let n = 0; n < e.length; n++) e[n].ssr = t ? 1 : 0;
18807
18858
  }
18808
18859
  paint(e) {
18809
18860
  e.states && e.states.includesChanged && (this.shader.dispose(), this._waterShader.dispose(),
18810
18861
  this._createShader(e));
18811
- const t = !!e.ssr && this.getSymbol(Fa).ssr, n = this._waterShader, i = n.shaderDefines;
18862
+ const t = !!e.ssr && this.getSymbol(Da).ssr, n = this._waterShader, i = n.shaderDefines;
18812
18863
  if (t) {
18813
18864
  const t = mt({}, i, e.ssr.defines);
18814
18865
  n.shaderDefines = t;
@@ -18904,7 +18955,7 @@
18904
18955
  return n.mat3.fromRotation(i, Math.PI * r / 180);
18905
18956
  }
18906
18957
  } ], s = {
18907
- TIME_NOISE_TEXTURE_REPEAT: Oa
18958
+ TIME_NOISE_TEXTURE_REPEAT: Ea
18908
18959
  };
18909
18960
  this.fillIncludes(s, r, e);
18910
18961
  const o = {
@@ -18987,24 +19038,24 @@
18987
19038
  };
18988
19039
  }
18989
19040
  _getWaterUniform(e, t) {
18990
- const {iblTexes: i, dfgLUT: r} = this.getIBLRes(), s = Ca(e, i, r, t && t.ssr, t && t.jitter), o = e.getLightManager();
19041
+ const {iblTexes: i, dfgLUT: r} = this.getIBLRes(), s = Fa(e, i, r, t && t.ssr, t && t.jitter), o = e.getLightManager();
18991
19042
  let a = o && o.getDirectionalLight() || {};
18992
- const l = o && o.getAmbientLight() || {}, h = this.getSymbol(Fa), c = this._waterDir = this._waterDir || [], u = this._waveParams = this._waveParams || [];
19043
+ const l = o && o.getAmbientLight() || {}, h = this.getSymbol(Da), c = this._waterDir = this._waterDir || [], u = this._waveParams = this._waveParams || [];
18993
19044
  n.vec4.set(u, .09, h.uvScale || 3, .03, -.5);
18994
19045
  mt(s, {
18995
19046
  ambientColor: l.color || [ .2, .2, .2 ],
18996
19047
  viewMatrix: e.viewMatrix,
18997
- lightDirection: a.direction || ka.direction,
18998
- lightColor: a.color || ka.color,
19048
+ lightDirection: a.direction || Ra.direction,
19049
+ lightColor: a.color || Ra.color,
18999
19050
  camPos: e.cameraPosition,
19000
19051
  timeElapsed: h.animation ? (this.layer.getRenderer().getFrameTimestamp() || 0) / (1 / (h.waterSpeed || 1) * 1e4) : 0,
19001
19052
  normalTexture: this._normalTex || this._emptyTex,
19002
19053
  heightTexture: this._pertTex || this._emptyTex,
19003
19054
  waveParams: u,
19004
- waterDir: La(c, h.waterDirection || 0),
19055
+ waterDir: za(c, h.waterDirection || 0),
19005
19056
  waterBaseColor: h.waterBaseColor || [ .1451, .2588, .4863, 1 ],
19006
19057
  contrast: h.contrast || 1,
19007
- hsv: h.hsv || Ra
19058
+ hsv: h.hsv || La
19008
19059
  });
19009
19060
  const f = this.layer.getRenderer();
19010
19061
  return s.layerOpacity = f._getLayerOpacity(), this.setIncludeUniformValues(s, t),
@@ -19027,43 +19078,43 @@
19027
19078
  transformWater() {
19028
19079
  const e = this.getMap(), t = n.GroundPainter.getGroundTransform(this._water.localTransform, e);
19029
19080
  this._water.setLocalTransform(t);
19030
- const i = e._get2DExtentAtRes(e.getGLRes()), r = i.getWidth(), s = i.getHeight(), o = e.cameraLookAt, a = o[0] - r, l = o[1] + s, h = a / Ea[0], c = l / Ea[1], u = h % 1, f = c % 1, d = h * Oa % 1, p = c * Oa % 1, g = r / Ea[0] * 2, m = s / Ea[1] * 2;
19081
+ const i = e._get2DExtentAtRes(e.getGLRes()), r = i.getWidth(), s = i.getHeight(), o = e.cameraLookAt, a = o[0] - r, l = o[1] + s, h = a / Ha[0], c = l / Ha[1], u = h % 1, f = c % 1, d = h * Ea % 1, p = c * Ea % 1, g = r / Ha[0] * 2, m = s / Ha[1] * 2;
19031
19082
  this._water.setUniform("uvOffset", [ u, f ]), this._water.setUniform("noiseUvOffset", [ d, p ]),
19032
19083
  this._water.setUniform("uvScale", [ g, -m ]);
19033
19084
  }
19034
19085
  }
19035
- function La(e, t) {
19086
+ function za(e, t) {
19036
19087
  var n;
19037
19088
  return n = t, t = Math.PI * n / 180, e[0] = Math.sin(t), e[1] = Math.cos(t), e;
19038
19089
  }
19039
- const Ha = zn("fill", Xi);
19040
- Ha.registerAt(en);
19041
- const Na = zn("line", $i);
19042
- Na.registerAt(en);
19043
- const za = zn("line-gradient", ar);
19044
- za.registerAt(en);
19045
- const Va = zn("icon", js);
19090
+ const Va = zn("fill", Xi);
19046
19091
  Va.registerAt(en);
19047
- const Ua = zn("text", Lo);
19092
+ const Ua = zn("line", $i);
19048
19093
  Ua.registerAt(en);
19049
- const Ba = zn("native-line", jo);
19094
+ const Ba = zn("line-gradient", ar);
19050
19095
  Ba.registerAt(en);
19051
- zn("native-point", Uo).registerAt(en);
19052
- const Ga = zn("phong", ra);
19096
+ const Ga = zn("icon", js);
19053
19097
  Ga.registerAt(en);
19054
- const ja = zn("wireframe", oa);
19098
+ const ja = zn("text", Lo);
19055
19099
  ja.registerAt(en);
19056
- const Wa = zn("lit", la);
19100
+ const Wa = zn("native-line", jo);
19057
19101
  Wa.registerAt(en);
19058
- const Xa = zn("tube", fa);
19102
+ zn("native-point", Uo).registerAt(en);
19103
+ const Xa = zn("phong", ra);
19059
19104
  Xa.registerAt(en);
19060
- const Ya = zn("gltf-phong", Pa);
19105
+ const Ya = zn("wireframe", oa);
19061
19106
  Ya.registerAt(en);
19062
- const Za = zn("gltf-lit", Ia);
19107
+ const Za = zn("lit", la);
19063
19108
  Za.registerAt(en);
19064
- const qa = zn("heatmap", class extends Fi {
19109
+ const qa = zn("tube", fa);
19110
+ qa.registerAt(en);
19111
+ const $a = zn("gltf-phong", ka);
19112
+ $a.registerAt(en);
19113
+ const Ja = zn("gltf-lit", Oa);
19114
+ Ja.registerAt(en);
19115
+ const Ka = zn("heatmap", class extends Fi {
19065
19116
  createFnTypeConfig(e, t) {
19066
- const n = Me(t.heatmapWeight), i = new Int16Array(1);
19117
+ const n = Se(t.heatmapWeight), i = new Int16Array(1);
19067
19118
  return [ {
19068
19119
  attrName: "aWeight",
19069
19120
  symbolName: "heatmapWeight",
@@ -19124,25 +19175,25 @@
19124
19175
  this._process = new n.HeatmapProcess(this.regl, this.sceneConfig, this.layer, i.heatmapColor, null, t);
19125
19176
  }
19126
19177
  });
19127
- qa.registerAt(en);
19128
- const $a = zn("water", Da);
19129
- $a.registerAt(en), ln.registerPainter("lit", la), ln.registerPainter("icon", js),
19178
+ Ka.registerAt(en);
19179
+ const Qa = zn("water", Na);
19180
+ Qa.registerAt(en), ln.registerPainter("lit", la), ln.registerPainter("icon", js),
19130
19181
  ln.registerPainter("fill", Xi), ln.registerPainter("line", $i), ln.registerPainter("line-gradient", ar),
19131
- ln.registerPainter("water", Da), ln.registerPainter("tube", fa);
19132
- class Ja extends en {
19182
+ ln.registerPainter("water", Na), ln.registerPainter("tube", fa);
19183
+ class el extends en {
19133
19184
  getTileUrl(e, t, n) {
19134
19185
  const i = this.getMap().getResolution(n);
19135
19186
  return super.getTileUrl(e, t, function(e) {
19136
- return 19 - Math.log(e / Ka) / Math.LN2;
19187
+ return 19 - Math.log(e / tl) / Math.LN2;
19137
19188
  }(i));
19138
19189
  }
19139
19190
  static fromJSON(e) {
19140
- return e && "MapboxVectorTileLayer" === e.type ? new Ja(e.id, e.options) : null;
19191
+ return e && "MapboxVectorTileLayer" === e.type ? new el(e.id, e.options) : null;
19141
19192
  }
19142
19193
  }
19143
- Ja.registerJSONType("MapboxVectorTileLayer");
19144
- const Ka = 12756274 * Math.PI / (256 * Math.pow(2, 20));
19145
- class Qa extends en {
19194
+ el.registerJSONType("MapboxVectorTileLayer");
19195
+ const tl = 12756274 * Math.PI / (256 * Math.pow(2, 20));
19196
+ class nl extends en {
19146
19197
  constructor(e, t) {
19147
19198
  (t = t || {}).spatialReference = null, super(e, t), this.setData(t.data);
19148
19199
  }
@@ -19185,7 +19236,7 @@
19185
19236
  getWorkerOptions() {
19186
19237
  const e = super.getWorkerOptions();
19187
19238
  let t = this.options.data;
19188
- return Re(t) || t && t.url ? (t.url && (t = JSON.parse(JSON.stringify(t))), t = tl(t, this.getURLModifier())) : t = this.features,
19239
+ return Re(t) || t && t.url ? (t.url && (t = JSON.parse(JSON.stringify(t))), t = rl(t, this.getURLModifier())) : t = this.features,
19189
19240
  e.data = t, e.tileBuffer = this.options.tileBuffer, e.extent = this.options.extent,
19190
19241
  e.hasAltitude = this.options.enableAltitude, e.simplifyTolerance = this.options.simplifyTolerance,
19191
19242
  e.projection = this.getSpatialReference().getProjection().code, e.generateOMBB = this.options.generateOMBB,
@@ -19209,7 +19260,7 @@
19209
19260
  const t = e.getWorkerConnection();
19210
19261
  if (t) {
19211
19262
  let n = this.options.data;
19212
- Re(n) || n && n.url ? (n.url && (n = JSON.parse(JSON.stringify(n))), n = tl(n, this.getURLModifier())) : n = this.features,
19263
+ Re(n) || n && n.url ? (n.url && (n = JSON.parse(JSON.stringify(n))), n = rl(n, this.getURLModifier())) : n = this.features,
19213
19264
  t.setData(n, ((t, n) => {
19214
19265
  e.clear(), this.onWorkerReady(null, n), e.setToRedraw(), setTimeout((() => {
19215
19266
  e.setToRedraw();
@@ -19245,7 +19296,7 @@
19245
19296
  return this._idMaps[e];
19246
19297
  }
19247
19298
  static fromJSON(e) {
19248
- return e && "GeoJSONVectorTileLayer" === e.type ? new Qa(e.id, e.options) : null;
19299
+ return e && "GeoJSONVectorTileLayer" === e.type ? new nl(e.id, e.options) : null;
19249
19300
  }
19250
19301
  getGeometryById(e) {
19251
19302
  return this._idMaps ? this._idMaps[e] : null;
@@ -19275,14 +19326,14 @@
19275
19326
  }));
19276
19327
  }
19277
19328
  }
19278
- function el(e) {
19329
+ function il(e) {
19279
19330
  let t = document.createElement("a");
19280
19331
  return t.href = e, e = t.href, t = null, e;
19281
19332
  }
19282
- function tl(e, t) {
19283
- return e.url ? e.url = t ? t(e.url) : el(e.url) : e = t ? t(e) : el(e), e;
19333
+ function rl(e, t) {
19334
+ return e.url ? e.url = t ? t(e.url) : il(e.url) : e = t ? t(e) : il(e), e;
19284
19335
  }
19285
- Qa.registerJSONType("GeoJSONVectorTileLayer"), Qa.mergeOptions({
19336
+ nl.registerJSONType("GeoJSONVectorTileLayer"), nl.mergeOptions({
19286
19337
  features: "id",
19287
19338
  tileBuffer: 64,
19288
19339
  extent: 8192,
@@ -19291,12 +19342,12 @@
19291
19342
  tileStackDepth: 0,
19292
19343
  generateOMBB: !0
19293
19344
  });
19294
- const {SYMBOLS_NEED_REBUILD_IN_VECTOR: nl, GlyphRequestor: il, PointPack: rl, LinePack: sl, StyledPoint: ol, VectorPack: al, StyledVector: ll} = h();
19295
- let hl = !1, cl = 1;
19296
- const ul = "_symbol_".trim(), fl = (st + "").trim();
19297
- let dl = new Float32Array(1);
19298
- const pl = [];
19299
- class gl extends r.renderer.CanvasRenderer {
19345
+ const {SYMBOLS_NEED_REBUILD_IN_VECTOR: sl, GlyphRequestor: ol, PointPack: al, LinePack: ll, StyledPoint: hl, VectorPack: cl, StyledVector: ul} = h();
19346
+ let fl = !1, dl = 1;
19347
+ const pl = "_symbol_".trim(), gl = (st + "").trim();
19348
+ let ml = new Float32Array(1);
19349
+ const yl = [];
19350
+ class xl extends r.renderer.CanvasRenderer {
19300
19351
  constructor(...e) {
19301
19352
  super(...e), this.features = {}, this._geometries = {}, this._counter = 0, this._allFeatures = {},
19302
19353
  this._featureMapping = {}, this._markerFeatures = {}, this._textFeatures = {}, this._lineFeatures = {},
@@ -19316,7 +19367,7 @@
19316
19367
  return e || (this.painter && this.painter.needToRedraw() || this._markerPainter && this._markerPainter.needToRedraw() || this._linePainter && this._linePainter.needToRedraw());
19317
19368
  }
19318
19369
  getAnalysisMeshes() {
19319
- return this.painter && this.painter.getAnalysisMeshes() || pl;
19370
+ return this.painter && this.painter.getAnalysisMeshes() || yl;
19320
19371
  }
19321
19372
  getRayCastData() {
19322
19373
  return null;
@@ -19417,12 +19468,12 @@
19417
19468
  if (!this.features[o]) continue;
19418
19469
  const a = this.features[o];
19419
19470
  if (Array.isArray(a)) for (let r = 0; r < a.length; r++) {
19420
- const s = a[r], o = s[fl];
19471
+ const s = a[r], o = s[gl];
19421
19472
  (!e || e[o] || t && (!t || t[o])) && (s.visible || (this._showHideUpdated = !0),
19422
19473
  this._addCoordsToCenter(s.geometry, i, s.coordinates), n.push(s));
19423
19474
  } else {
19424
19475
  a.visible || (this._showHideUpdated = !0);
19425
- const r = a[fl];
19476
+ const r = a[gl];
19426
19477
  if (e && !e[r] && (!t || t && !t[r])) continue;
19427
19478
  this._addCoordsToCenter(a.geometry, i, a.coordinates), n.push(a);
19428
19479
  }
@@ -19479,8 +19530,8 @@
19479
19530
  _addCoord(e, t, n, i, r, s) {
19480
19531
  const o = this.getMap().getProjection().isSphere();
19481
19532
  let a = !1;
19482
- (s[0] > 180 || s[0] < -180) && (a = !0, o && !hl && (hl = !0, console.warn(`Layer(${this.layer.getId()}) has invalid longitude value: ${s[0]}`))),
19483
- (s[1] > 90 || s[1] < -90) && (a = !0, o && !hl && (hl = !0, console.warn(`Layer(${this.layer.getId()}) has invalid latitude value: ${s[1]}`))),
19533
+ (s[0] > 180 || s[0] < -180) && (a = !0, o && !fl && (fl = !0, console.warn(`Layer(${this.layer.getId()}) has invalid longitude value: ${s[0]}`))),
19534
+ (s[1] > 90 || s[1] < -90) && (a = !0, o && !fl && (fl = !0, console.warn(`Layer(${this.layer.getId()}) has invalid latitude value: ${s[1]}`))),
19484
19535
  a || (e[0] += t, e[1] += n, e[2] += i || 0, e[3] += r);
19485
19536
  }
19486
19537
  _fillCommonProps(e) {
@@ -19489,7 +19540,7 @@
19489
19540
  n.aPickingId = e.data.aPickingId;
19490
19541
  }
19491
19542
  _isEnableWorkAround(e) {
19492
- return "win-intel-gpu-crash" === e && (this.layer.options.workarounds["win-intel-gpu-crash"] && yl(this.gl));
19543
+ return "win-intel-gpu-crash" === e && (this.layer.options.workarounds["win-intel-gpu-crash"] && vl(this.gl));
19493
19544
  }
19494
19545
  prepareRequestors() {
19495
19546
  if (this._iconRequestor) return;
@@ -19502,7 +19553,7 @@
19502
19553
  }
19503
19554
  });
19504
19555
  const t = !this._isEnableWorkAround("win-intel-gpu-crash");
19505
- this._glyphRequestor = new il((t => {
19556
+ this._glyphRequestor = new ol((t => {
19506
19557
  e.getMap().getRenderer().callInNextFrame(t);
19507
19558
  }), e.options.glyphSdfLimitPerFrame, t), this.requestor = this._fetchPattern.bind(this),
19508
19559
  this._markerRequestor = this._fetchIconGlyphs.bind(this);
@@ -19535,7 +19586,7 @@
19535
19586
  delete this._markerMeshes));
19536
19587
  const {features: r, center: s} = this._getFeaturesToRender(this._markerFeatures, this._textFeatures), o = [], a = [];
19537
19588
  for (let e = 0; e < r.length; e++) {
19538
- const t = r[e][fl];
19589
+ const t = r[e][gl];
19539
19590
  this._markerFeatures[t] && o.push(r[e]), this._textFeatures[t] && a.push(r[e]);
19540
19591
  }
19541
19592
  if (!o.length && !a.length) return void (this._markerMeshes && (this._markerPainter.deleteMesh(this._markerMeshes),
@@ -19557,7 +19608,7 @@
19557
19608
  n.mat4.translate(o, o, n.vec3.set(u, s[0], s[1], 0)), n.mat4.scale(o, o, n.vec3.set(c, 1, 1, this._zScale));
19558
19609
  const a = this._markerPainter.createMeshes(t, o);
19559
19610
  for (let e = 0; e < a.length; e++) a[e].geometry.properties.originElements = a[e].geometry.properties.elements.slice(),
19560
- a[e].properties.level = 0, a[e].material.set("flipY", 1), a[e].properties.meshKey = cl++;
19611
+ a[e].properties.level = 0, a[e].material.set("flipY", 1), a[e].properties.meshKey = dl++;
19561
19612
  this._markerMeshes = a, l && (this._showHideUpdated = !0), this._isCreatingMarkerMesh = !1,
19562
19613
  this.setToRedraw(), this.layer.fire("buildmarkermesh");
19563
19614
  }));
@@ -19593,7 +19644,7 @@
19593
19644
  markerHeightType: Uint16Array,
19594
19645
  allowEmptyPack: 1
19595
19646
  };
19596
- return [ this._markerSymbol ].map(((n, i) => new rl(0 === i ? e : t, n, r).load()));
19647
+ return [ this._markerSymbol ].map(((n, i) => new al(0 === i ? e : t, n, r).load()));
19597
19648
  }
19598
19649
  updateMesh() {}
19599
19650
  _updateMarkerMesh(e) {
@@ -19607,15 +19658,15 @@
19607
19658
  const s = [], o = [], a = [], l = this.getMap().getZoom();
19608
19659
  let h, c;
19609
19660
  h = Array.isArray(t) ? t.map((e => e ? Pe(e, (() => (s[0] = l, s))) : e)) : Pe(t, (() => (s[0] = l,
19610
- s))), c = Array.isArray(t) ? t.map((e => e ? al.genFnTypes(e) : e)) : al.genFnTypes(t);
19661
+ s))), c = Array.isArray(t) ? t.map((e => e ? cl.genFnTypes(e) : e)) : cl.genFnTypes(t);
19611
19662
  for (let e = 0; e < r.length; e++) {
19612
19663
  if (!r[e]) continue;
19613
- const i = Array.isArray(t) ? t[e] : t, s = Array.isArray(h) ? h[e] : h, o = Array.isArray(c) ? c[e] : c, a = new ol(r, i, s, o, n).getIconAndGlyph();
19614
- if (!this._markerAtlas || !rl.isAtlasLoaded(a, this._markerAtlas)) return this._markRebuild(),
19664
+ const i = Array.isArray(t) ? t[e] : t, s = Array.isArray(h) ? h[e] : h, o = Array.isArray(c) ? c[e] : c, a = new hl(r, i, s, o, n).getIconAndGlyph();
19665
+ if (!this._markerAtlas || !al.isAtlasLoaded(a, this._markerAtlas)) return this._markRebuild(),
19615
19666
  this.setToRedraw(), !1;
19616
19667
  }
19617
19668
  for (let e = 0; e < r.length; e++) {
19618
- const t = r[e][fl];
19669
+ const t = r[e][gl];
19619
19670
  this._markerFeatures[t] && o.push(r[e]), this._textFeatures[t] && a.push(r[e]);
19620
19671
  }
19621
19672
  const u = r[0].id, f = this._createPointPacks(o, a, this._markerAtlas, this._markerCenter), d = this._markerMeshes;
@@ -19637,7 +19688,7 @@
19637
19688
  })), !0;
19638
19689
  }
19639
19690
  _updateLineMesh(e) {
19640
- return this._updateMesh(e, this._lineMeshes, this._lineAtlas, this._lineCenter, this._linePainter, sl, Qi, this._groupLineFeas);
19691
+ return this._updateMesh(e, this._lineMeshes, this._lineAtlas, this._lineCenter, this._linePainter, ll, Qi, this._groupLineFeas);
19641
19692
  }
19642
19693
  _updateMesh(e, t, n, i, r, s, o, a) {
19643
19694
  if (!t) return !1;
@@ -19651,8 +19702,8 @@
19651
19702
  for (let e = 0; e < u.length; e++) {
19652
19703
  const t = u[e];
19653
19704
  if (!t) continue;
19654
- const i = Array.isArray(l) ? l[e] : l, r = al.genFnTypes(i), o = new ll(u, i, r, h), a = s === sl ? o.getLineResource() : o.getPolygonResource();
19655
- if (!al.isAtlasLoaded(a, n[e])) return this._markRebuild(), this.setToRedraw(),
19705
+ const i = Array.isArray(l) ? l[e] : l, r = cl.genFnTypes(i), o = new ul(u, i, r, h), a = s === ll ? o.getLineResource() : o.getPolygonResource();
19706
+ if (!cl.isAtlasLoaded(a, n[e])) return this._markRebuild(), this.setToRedraw(),
19656
19707
  !1;
19657
19708
  f.push(t);
19658
19709
  }
@@ -19690,7 +19741,7 @@
19690
19741
  let n = r + 1;
19691
19742
  for (;i[n] === t; ) n++;
19692
19743
  const s = n - r, o = e.geometry.desc.positionSize;
19693
- dl.length !== 3 * s && (dl = new Float32Array(s * o), dl.fill(-1 / 0, 0)), e.geometry.updateSubData(e.geometry.desc.positionAttribute, dl, r * o);
19744
+ ml.length !== 3 * s && (ml = new Float32Array(s * o), ml.fill(-1 / 0, 0)), e.geometry.updateSubData(e.geometry.desc.positionAttribute, ml, r * o);
19694
19745
  }
19695
19746
  this.layer.fire("updatemesh"), this.setToRedraw();
19696
19747
  }
@@ -19702,7 +19753,7 @@
19702
19753
  if (!t.length) return;
19703
19754
  const i = this._showHideUpdated;
19704
19755
  this._lineCenter = n;
19705
- const r = this._groupLineFeas(t), s = Fe({}, Qi), o = r.map(((t, i) => this.createMesh(this._linePainter, sl, s, t, e && e[i], n)));
19756
+ const r = this._groupLineFeas(t), s = Fe({}, Qi), o = r.map(((t, i) => this.createMesh(this._linePainter, ll, s, t, e && e[i], n)));
19706
19757
  this._isCreatingLineMesh = !0, Promise.all(o).then((e => {
19707
19758
  this._lineMeshes && this._linePainter.deleteMesh(this._lineMeshes);
19708
19759
  const t = [], n = [];
@@ -19721,10 +19772,10 @@
19721
19772
  }));
19722
19773
  }
19723
19774
  _groupLineFeas(e) {
19724
- const t = (ul + "lineDasharray").trim(), n = (ul + "linePatternFile").trim(), i = [], r = [], s = [];
19775
+ const t = (pl + "lineDasharray").trim(), n = (pl + "linePatternFile").trim(), i = [], r = [], s = [];
19725
19776
  for (let o = 0; o < e.length; o++) {
19726
19777
  const a = e[o], l = a.properties && a.properties[t];
19727
- l && Tl(l) ? s.push(a) : a.properties && a.properties[n] ? r.push(a) : i.push(a);
19778
+ l && Ml(l) ? s.push(a) : a.properties && a.properties[n] ? r.push(a) : i.push(a);
19728
19779
  }
19729
19780
  return [ i, r, s ];
19730
19781
  }
@@ -19758,23 +19809,23 @@
19758
19809
  if (!e) return;
19759
19810
  const n = Array.isArray(e) ? e[0].id : e.id;
19760
19811
  if (this._featureMapping[n] = e, Array.isArray(e)) for (let n = 0; n < e.length; n++) {
19761
- const i = e[n][fl];
19812
+ const i = e[n][gl];
19762
19813
  if (e[n][ir] = t, this._allFeatures[i] = {
19763
19814
  feature: e[n]
19764
19815
  }, this._allFeatures[i][ir] = t, !this.needCheckPointLineSymbols()) continue;
19765
19816
  const r = {
19766
19817
  feature: e[n]
19767
19818
  };
19768
- (xl(e[n]) || _l(e[n])) && (this._markerFeatures[i] = r), _l(e[n]) && (this._textFeatures[i] = r),
19769
- Al(e[n]) && (this._lineFeatures[i] = r);
19819
+ (bl(e[n]) || Al(e[n])) && (this._markerFeatures[i] = r), Al(e[n]) && (this._textFeatures[i] = r),
19820
+ Sl(e[n]) && (this._lineFeatures[i] = r);
19770
19821
  } else {
19771
19822
  e[ir] = t;
19772
19823
  const n = {
19773
19824
  feature: e
19774
- }, i = e[fl];
19825
+ }, i = e[gl];
19775
19826
  if (this._allFeatures[i] = n, !this.needCheckPointLineSymbols()) return;
19776
- (xl(e) || _l(e)) && (this._markerFeatures[i] = n), _l(e) && (this._textFeatures[i] = n),
19777
- Al(e) && (this._lineFeatures[i] = n);
19827
+ (bl(e) || Al(e)) && (this._markerFeatures[i] = n), Al(e) && (this._textFeatures[i] = n),
19828
+ Sl(e) && (this._lineFeatures[i] = n);
19778
19829
  }
19779
19830
  }
19780
19831
  needCheckPointLineSymbols() {
@@ -19783,11 +19834,11 @@
19783
19834
  _removeFeatures(e) {
19784
19835
  const t = this.features[e];
19785
19836
  if (t) if (Array.isArray(t)) for (let e = 0; e < t.length; e++) {
19786
- const n = t[e][fl], i = t[e].id;
19837
+ const n = t[e][gl], i = t[e].id;
19787
19838
  delete this._featureMapping[i], delete this._allFeatures[n], delete this._markerFeatures[n],
19788
19839
  delete this._textFeatures[n], delete this._lineFeatures[n];
19789
19840
  } else {
19790
- const e = t[fl], n = t.id;
19841
+ const e = t[gl], n = t.id;
19791
19842
  delete this._featureMapping[n], delete this._allFeatures[e], delete this._markerFeatures[e],
19792
19843
  delete this._textFeatures[e], delete this._lineFeatures[e];
19793
19844
  }
@@ -19807,7 +19858,7 @@
19807
19858
  }
19808
19859
  _getFeaKeyId(e) {
19809
19860
  const t = e[ir], n = this.features[t];
19810
- return Array.isArray(n) ? n[0][fl] : n[fl];
19861
+ return Array.isArray(n) ? n[0][gl] : n[gl];
19811
19862
  }
19812
19863
  _updateDirtyTargets() {
19813
19864
  let e = !1;
@@ -19826,14 +19877,14 @@
19826
19877
  e = e || t;
19827
19878
  }
19828
19879
  }
19829
- this._dirtyTargetsInCurrentFrame = {}, e && (ml(this), this.layer.fire("partialupdate"));
19880
+ this._dirtyTargetsInCurrentFrame = {}, e && (_l(this), this.layer.fire("partialupdate"));
19830
19881
  }
19831
19882
  _convertAndRebuild(e) {
19832
- this._convertGeo(e), this._markRebuild(), ml(this);
19883
+ this._convertGeo(e), this._markRebuild(), _l(this);
19833
19884
  }
19834
19885
  onGeometryAdd(e) {
19835
19886
  this.setToRedraw(), this.canvas && e && e.length && (this._convertGeometries(e),
19836
- this._markRebuild(), ml(this));
19887
+ this._markRebuild(), _l(this));
19837
19888
  }
19838
19889
  onGeometryRemove(e) {
19839
19890
  if (e && e.length) {
@@ -19841,7 +19892,7 @@
19841
19892
  const n = e[t][ir];
19842
19893
  void 0 !== n && (delete this._geometries[n], this._removeFeatures(n), delete this.features[n]);
19843
19894
  }
19844
- this._markRebuild(), ml(this);
19895
+ this._markRebuild(), _l(this);
19845
19896
  }
19846
19897
  }
19847
19898
  onGeometrySymbolChange(e) {
@@ -19857,26 +19908,26 @@
19857
19908
  for (const t in i) i[t] && Fe(e, i[t]);
19858
19909
  i = e;
19859
19910
  }
19860
- for (const e in i) if (Ve(i, e) && nl[e]) return void this._convertAndRebuild(t);
19911
+ for (const e in i) if (Ve(i, e) && sl[e]) return void this._convertAndRebuild(t);
19861
19912
  const r = t._getInternalSymbol(), s = this.features[n];
19862
19913
  if (this._convertGeo(t), s) if (function(e, t) {
19863
19914
  return Array.isArray(e) ? !!Array.isArray(t) && e.length === t.length : !Array.isArray(t);
19864
19915
  }(r, s)) {
19865
19916
  if (Array.isArray(r)) for (let e = 0; e < r.length; e++) {
19866
- if (!wl(r[e], s[e])) return void this._convertAndRebuild(t);
19867
- } else if (!wl(r, s)) return void this._convertAndRebuild(t);
19917
+ if (!Pl(r[e], s[e])) return void this._convertAndRebuild(t);
19918
+ } else if (!Pl(r, s)) return void this._convertAndRebuild(t);
19868
19919
  this.onGeometryPositionChange(e);
19869
19920
  } else this._convertAndRebuild(t); else this._convertAndRebuild(t);
19870
19921
  }
19871
19922
  onGeometryShapeChange(e) {
19872
19923
  const t = e.target._getParent() || e.target;
19873
19924
  void 0 !== t[ir] && (this._convertGeometries([ t ]), this._markRebuildGeometry(),
19874
- ml(this));
19925
+ _l(this));
19875
19926
  }
19876
19927
  onGeometryPositionChange(e) {
19877
19928
  const t = e.target._getParent() || e.target, n = t[ir];
19878
19929
  void 0 !== n && (this._convertGeometries([ t ]), this._dirtyTargetsInCurrentFrame[n] = t,
19879
- ml(this));
19930
+ _l(this));
19880
19931
  }
19881
19932
  onGeometryZIndexChange(e) {
19882
19933
  void 0 !== (e.target._getParent() || e.target)[ir] && this._markRebuild();
@@ -19898,7 +19949,7 @@
19898
19949
  if (e === i.visible) return;
19899
19950
  i.visible = e;
19900
19951
  }
19901
- this._markShowHide(), ml(this);
19952
+ this._markShowHide(), _l(this);
19902
19953
  }
19903
19954
  }
19904
19955
  _markShowHide() {
@@ -19908,7 +19959,7 @@
19908
19959
  const t = e.target._getParent() || e.target, n = t[ir];
19909
19960
  void 0 !== n && this.painter && (this.features[n] = sr(t, this._kidGen), this._refreshFeatures(this.features[n], n),
19910
19961
  this._markerMeshes && this._markerMeshes.length && this._markerPainter.needRebuildOnGometryPropertiesChanged() || this._lineMeshes && this._lineMeshes.length && this._linePainter.needRebuildOnGometryPropertiesChanged() || this.meshes && this.meshes.length && this.painter.needRebuildOnGometryPropertiesChanged() ? this._markRebuild() : this.painter.onFeatureChange(this.features[n], this.meshes),
19911
- ml(this));
19962
+ _l(this));
19912
19963
  }
19913
19964
  createContext() {
19914
19965
  const e = this.canvas.gl && this.canvas.gl.wrap;
@@ -20016,7 +20067,7 @@
20016
20067
  delete this._outlineAll, delete this._outlineFeatures, this.setToRedraw();
20017
20068
  }
20018
20069
  isEnableWorkAround(e) {
20019
- return "win-intel-gpu-crash" === e && (this.layer.options.workarounds["win-intel-gpu-crash"] && yl(this.gl));
20070
+ return "win-intel-gpu-crash" === e && (this.layer.options.workarounds["win-intel-gpu-crash"] && vl(this.gl));
20020
20071
  }
20021
20072
  _getCentiMeterScale(e) {
20022
20073
  return Ue(e, this.getMap());
@@ -20030,10 +20081,10 @@
20030
20081
  return this._isInGroupGLLayer() ? He(e) ? 1 : e : 1;
20031
20082
  }
20032
20083
  }
20033
- function ml(e) {
20084
+ function _l(e) {
20034
20085
  e.setToRedraw();
20035
20086
  }
20036
- function yl(e) {
20087
+ function vl(e) {
20037
20088
  const t = e.getExtension("WEBGL_debug_renderer_info");
20038
20089
  if (t && "undefined" != typeof navigator) {
20039
20090
  const n = e.getParameter(t.UNMASKED_RENDERER_WEBGL), i = "Win32" === navigator.platform || "Win64" === navigator.platform;
@@ -20041,32 +20092,32 @@
20041
20092
  }
20042
20093
  return !1;
20043
20094
  }
20044
- function xl({properties: e}) {
20045
- const t = (ul + "markerFile").trim(), n = (ul + "markerType").trim();
20095
+ function bl({properties: e}) {
20096
+ const t = (pl + "markerFile").trim(), n = (pl + "markerType").trim();
20046
20097
  return e[t] || e[n];
20047
20098
  }
20048
- function _l({properties: e}) {
20049
- return e[(ul + "textName").trim()];
20099
+ function Al({properties: e}) {
20100
+ return e[(pl + "textName").trim()];
20050
20101
  }
20051
- const vl = (ul + "lineWidth").trim(), bl = (er + "").trim();
20052
- function Al(e) {
20053
- return 2 === e.type && !e.properties[bl] || 3 === e.type && void 0 !== e.properties[vl];
20102
+ const Tl = (pl + "lineWidth").trim(), wl = (er + "").trim();
20103
+ function Sl(e) {
20104
+ return 2 === e.type && !e.properties[wl] || 3 === e.type && void 0 !== e.properties[Tl];
20054
20105
  }
20055
- function Tl(e) {
20106
+ function Ml(e) {
20056
20107
  if (!Array.isArray(e)) return 0;
20057
20108
  let t = 0;
20058
20109
  for (let n = 0; n < e.length; n++) t += e[n];
20059
20110
  return t;
20060
20111
  }
20061
- function wl(e, t) {
20062
- if (Object.keys(e).sort().join() !== Object.keys(t.properties || {}).filter((e => 0 === e.indexOf(ul))).map((e => e.substring(ul.length))).sort().join()) return !1;
20112
+ function Pl(e, t) {
20113
+ if (Object.keys(e).sort().join() !== Object.keys(t.properties || {}).filter((e => 0 === e.indexOf(pl))).map((e => e.substring(pl.length))).sort().join()) return !1;
20063
20114
  for (const n in e) if (Ve(e, n)) {
20064
- const i = (ul + n).trim();
20115
+ const i = (pl + n).trim();
20065
20116
  if (we(e[n]) !== we(t.properties[i])) return !1;
20066
20117
  }
20067
20118
  return !0;
20068
20119
  }
20069
- function Ml(e, t, n) {
20120
+ function Il(e, t, n) {
20070
20121
  if (!e || e.type !== t) return null;
20071
20122
  const i = new n(e.id, e.options), s = e.geometries, o = [];
20072
20123
  for (let e = 0; e < s.length; e++) {
@@ -20075,9 +20126,9 @@
20075
20126
  }
20076
20127
  return i.addGeometry(o), i;
20077
20128
  }
20078
- class Sl extends ln {
20129
+ class Cl extends ln {
20079
20130
  static fromJSON(e) {
20080
- return Ml(e, "PointLayer", Sl);
20131
+ return Il(e, "PointLayer", Cl);
20081
20132
  }
20082
20133
  constructor(...e) {
20083
20134
  super(...e), this.options.sceneConfig || (this.options.sceneConfig = Fe({}, Ke));
@@ -20089,7 +20140,7 @@
20089
20140
  return 0;
20090
20141
  }
20091
20142
  }
20092
- Sl.mergeOptions({
20143
+ Cl.mergeOptions({
20093
20144
  glyphSdfLimitPerFrame: 15,
20094
20145
  iconErrorUrl: null,
20095
20146
  workarounds: {
@@ -20097,8 +20148,8 @@
20097
20148
  },
20098
20149
  collision: !1,
20099
20150
  collisionFrameLimit: 1
20100
- }), Sl.registerJSONType("PointLayer"), Sl.registerRenderer("canvas", null);
20101
- Sl.registerRenderer("gl", class extends gl {
20151
+ }), Cl.registerJSONType("PointLayer"), Cl.registerRenderer("canvas", null);
20152
+ Cl.registerRenderer("gl", class extends xl {
20102
20153
  constructor(...e) {
20103
20154
  super(...e), this.GeometryTypes = [ r.Marker, r.MultiPoint ];
20104
20155
  }
@@ -20108,24 +20159,24 @@
20108
20159
  })) : e.options.maxMarkerWidth = e.options.maxMarkerHeight = 255, super.onGeometryAdd(e));
20109
20160
  }
20110
20161
  });
20111
- const {LinePack: Pl} = h();
20112
- class Il extends ln {
20162
+ const {LinePack: kl} = h();
20163
+ class Ol extends ln {
20113
20164
  static fromJSON(e) {
20114
- return Ml(e, "LineStringLayer", Il);
20165
+ return Il(e, "LineStringLayer", Ol);
20115
20166
  }
20116
20167
  }
20117
- Il.mergeOptions({
20168
+ Ol.mergeOptions({
20118
20169
  meshRenderOrder: 1
20119
- }), Il.registerJSONType("LineStringLayer");
20120
- const Cl = (er + "").trim();
20121
- Il.registerRenderer("gl", class extends gl {
20170
+ }), Ol.registerJSONType("LineStringLayer");
20171
+ const Fl = (er + "").trim();
20172
+ Ol.registerRenderer("gl", class extends xl {
20122
20173
  constructor(...e) {
20123
20174
  super(...e), this.GeometryTypes = [ r.LineString, r.MultiLineString ];
20124
20175
  }
20125
20176
  createPainter() {
20126
20177
  const e = ln.get3DPainterClass("line-gradient");
20127
20178
  this.painterSymbol = Fe({}, {
20128
- lineGradientProperty: Cl
20179
+ lineGradientProperty: Fl
20129
20180
  }, Qi), this._defineSymbolBloom(this.painterSymbol, e.getBloomSymbol());
20130
20181
  const t = Fe({}, this.layer.options.sceneConfig || {});
20131
20182
  void 0 === t.depthMask && (t.depthMask = !0);
@@ -20133,10 +20184,10 @@
20133
20184
  }
20134
20185
  buildMesh() {
20135
20186
  let {features: e, center: t} = this._getFeaturesToRender();
20136
- if (e = e.filter((e => !!e.properties[Cl])), !e.length) return;
20187
+ if (e = e.filter((e => !!e.properties[Fl])), !e.length) return;
20137
20188
  const n = this._showHideUpdated;
20138
20189
  this._meshCenter = t;
20139
- const i = Fe({}, this.painterSymbol), r = this.createMesh(this.painter, Pl, i, e, null, t);
20190
+ const i = Fe({}, this.painterSymbol), r = this.createMesh(this.painter, kl, i, e, null, t);
20140
20191
  this._isCreatingMesh = !0, r.then((e => {
20141
20192
  this.meshes && this.painter.deleteMesh(this.meshes);
20142
20193
  const t = [], i = e && e.meshes;
@@ -20147,15 +20198,15 @@
20147
20198
  this.meshes = t, n && (this._showHideUpdated = n), this._isCreatingMesh = !1, this.setToRedraw();
20148
20199
  }));
20149
20200
  }
20150
- }), Il.registerRenderer("canvas", null);
20151
- const {PolygonPack: kl} = h();
20152
- class Ol extends ln {
20201
+ }), Ol.registerRenderer("canvas", null);
20202
+ const {PolygonPack: Rl} = h();
20203
+ class El extends ln {
20153
20204
  static fromJSON(e) {
20154
- return Ml(e, "PolygonLayer", Ol);
20205
+ return Il(e, "PolygonLayer", El);
20155
20206
  }
20156
20207
  }
20157
- Ol.registerJSONType("PolygonLayer");
20158
- const Fl = {
20208
+ El.registerJSONType("PolygonLayer");
20209
+ const Dl = {
20159
20210
  polygonFill: {
20160
20211
  type: "identity",
20161
20212
  default: [ 1, 1, 1, 1 ],
@@ -20207,7 +20258,7 @@
20207
20258
  property: "_symbol_polygonPatternUV"
20208
20259
  }
20209
20260
  };
20210
- class Rl extends gl {
20261
+ class Ll extends xl {
20211
20262
  constructor() {
20212
20263
  super(...arguments), this.GeometryTypes = [ r.Polygon, r.MultiPolygon ];
20213
20264
  }
@@ -20219,7 +20270,7 @@
20219
20270
  if (!t.length) return;
20220
20271
  const i = this._showHideUpdated;
20221
20272
  this._meshCenter = n;
20222
- const r = this._groupPolygonFeatures(t), s = Fe({}, Fl), o = r.map(((t, i) => this.createMesh(this.painter, kl, s, t, e && e[i], n)));
20273
+ const r = this._groupPolygonFeatures(t), s = Fe({}, Dl), o = r.map(((t, i) => this.createMesh(this.painter, Rl, s, t, e && e[i], n)));
20223
20274
  this._isCreatingMesh = !0, Promise.all(o).then((e => {
20224
20275
  this.meshes && this.painter.deleteMesh(this.meshes), e = function(e) {
20225
20276
  const t = [];
@@ -20255,15 +20306,15 @@
20255
20306
  return [ t, n ];
20256
20307
  }
20257
20308
  createPainter() {
20258
- const e = ln.get3DPainterClass("fill"), t = this.painterSymbol = Fe({}, Fl);
20309
+ const e = ln.get3DPainterClass("fill"), t = this.painterSymbol = Fe({}, Dl);
20259
20310
  this._defineSymbolBloom(t, e.getBloomSymbol());
20260
20311
  return new e(this.regl, this.layer, t, this.layer.options.sceneConfig, 0);
20261
20312
  }
20262
20313
  updateMesh(e) {
20263
- return this._updateMesh(e, this.meshes, this.atlas, this._meshCenter, this.painter, kl, Fl, this._groupPolygonFeatures);
20314
+ return this._updateMesh(e, this.meshes, this.atlas, this._meshCenter, this.painter, Rl, Dl, this._groupPolygonFeatures);
20264
20315
  }
20265
20316
  }
20266
- function El(e, t, n, i, r, s, o) {
20317
+ function Hl(e, t, n, i, r, s, o) {
20267
20318
  const a = n && Array.isArray(n[0]);
20268
20319
  for (let s = 0, l = n.length; s < l; s++) {
20269
20320
  e[t] = (a ? n[s][0] : n[s].x) * i, e[t + 1] = (a ? n[s][1] : n[s].y) * i, o !== Float32Array && (e[t] = Math.round(e[t]),
@@ -20273,29 +20324,29 @@
20273
20324
  }
20274
20325
  return e.trySetLength && e.trySetLength(t), t;
20275
20326
  }
20276
- function Dl(e, t, n, i) {
20327
+ function Nl(e, t, n, i) {
20277
20328
  const r = e[3 * t], s = e[3 * t + 1], o = e[3 * n], a = e[3 * n + 1];
20278
20329
  return r === o && (r < 0 || r > i) || s === a && (s < 0 || s > i);
20279
20330
  }
20280
- Ol.registerRenderer("gl", Rl), Ol.registerRenderer("canvas", null);
20281
- var Ll = "undefined" != typeof Float32Array ? Float32Array : Array;
20282
- function Hl(e, t, n, i) {
20331
+ El.registerRenderer("gl", Ll), El.registerRenderer("canvas", null);
20332
+ var zl = "undefined" != typeof Float32Array ? Float32Array : Array;
20333
+ function Vl(e, t, n, i) {
20283
20334
  return e[0] = t, e[1] = n, e[2] = i, e;
20284
20335
  }
20285
- function Nl(e, t) {
20336
+ function Ul(e, t) {
20286
20337
  return e[0] = t[0], e[1] = t[1], e[2] = t[2], e[3] = t[3], e;
20287
20338
  }
20288
- function zl(e, t, n, i, r) {
20339
+ function Bl(e, t, n, i, r) {
20289
20340
  return e[0] = t, e[1] = n, e[2] = i, e[3] = r, e;
20290
20341
  }
20291
- function Vl(e, t, n) {
20342
+ function Gl(e, t, n) {
20292
20343
  return e[0] = t[0] / n[0], e[1] = t[1] / n[1], e[2] = t[2] / n[2], e[3] = t[3] / n[3],
20293
20344
  e;
20294
20345
  }
20295
- function Ul(e, t, n) {
20346
+ function jl(e, t, n) {
20296
20347
  return e[0] = t, e[1] = n, e;
20297
20348
  }
20298
- function Bl(e, t) {
20349
+ function Wl(e, t) {
20299
20350
  var n = t[0] - e[0], i = t[1] - e[1];
20300
20351
  return Math.hypot(n, i);
20301
20352
  }
@@ -20303,24 +20354,24 @@
20303
20354
  for (var e = 0, t = arguments.length; t--; ) e += arguments[t] * arguments[t];
20304
20355
  return Math.sqrt(e);
20305
20356
  }), function() {
20306
- var e, t = (e = new Ll(3), Ll != Float32Array && (e[0] = 0, e[1] = 0, e[2] = 0),
20357
+ var e, t = (e = new zl(3), zl != Float32Array && (e[0] = 0, e[1] = 0, e[2] = 0),
20307
20358
  e);
20308
20359
  }(), function() {
20309
- var e, t = (e = new Ll(4), Ll != Float32Array && (e[0] = 0, e[1] = 0, e[2] = 0,
20360
+ var e, t = (e = new zl(4), zl != Float32Array && (e[0] = 0, e[1] = 0, e[2] = 0,
20310
20361
  e[3] = 0), e);
20311
20362
  }(), function() {
20312
- var e, t = (e = new Ll(2), Ll != Float32Array && (e[0] = 0, e[1] = 0), e);
20363
+ var e, t = (e = new zl(2), zl != Float32Array && (e[0] = 0, e[1] = 0), e);
20313
20364
  }();
20314
- const Gl = Math.PI / 180, jl = 6378137 * Math.PI / 180, Wl = 85.0511287798;
20315
- function Xl(e, t, n) {
20365
+ const Xl = Math.PI / 180, Yl = 6378137 * Math.PI / 180, Zl = 85.0511287798;
20366
+ function ql(e, t, n) {
20316
20367
  return function(e, t) {
20317
- const n = Wl, i = t[0], r = Math.max(Math.min(n, t[1]), -n);
20368
+ const n = Zl, i = t[0], r = Math.max(Math.min(n, t[1]), -n);
20318
20369
  let s;
20319
- s = 0 === r ? 0 : Math.log(Math.tan((90 + r) * Gl / 2)) / Gl;
20320
- return e[0] = i * jl, e[1] = s * jl, e;
20370
+ s = 0 === r ? 0 : Math.log(Math.tan((90 + r) * Xl / 2)) / Xl;
20371
+ return e[0] = i * Yl, e[1] = s * Yl, e;
20321
20372
  }(e, t);
20322
20373
  }
20323
- function Yl(e, t, n, i, r, s, o, a, l, h, c, u, f, d, p) {
20374
+ function $l(e, t, n, i, r, s, o, a, l, h, c, u, f, d, p) {
20324
20375
  0 === e ? function(e, t, n, i, r, s, o, a, l, h) {
20325
20376
  const c = 1 / (100 * s[0]), u = 1 / (100 * s[1]), f = h && h[0] || 0, d = h && h[1] || 0, p = [ 0, 0 ];
20326
20377
  for (let r = e; r < t; r += 3) {
@@ -20332,39 +20383,39 @@
20332
20383
  let u, f, d, p;
20333
20384
  0 === e[4] ? (u = e[0], f = e[1], d = e[2], p = e[3]) : (u = e[1], f = e[2], d = e[3],
20334
20385
  p = e[0]);
20335
- const g = Bl(u, f), m = Bl(f, d), y = [], x = [], _ = [];
20386
+ const g = Wl(u, f), m = Wl(f, d), y = [], x = [], _ = [];
20336
20387
  for (let e = t; e < n; e += 3) {
20337
20388
  const t = e / 3 * 2;
20338
- Ul(y, (s.x / l + r[e] / o) * a, s.y / l * a + (c ? r[e + 1] : -r[e + 1]) / o * a),
20339
- "EPSG:4326" !== h && "EPSG:4490" !== h || Xl(y, y), Zl(x, y, u, f), Zl(_, y, p, u),
20340
- i[t] = Bl(u, x) / g, i[t + 1] = Bl(u, _) / m;
20389
+ jl(y, (s.x / l + r[e] / o) * a, s.y / l * a + (c ? r[e + 1] : -r[e + 1]) / o * a),
20390
+ "EPSG:4326" !== h && "EPSG:4490" !== h || ql(y, y), Jl(x, y, u, f), Jl(_, y, p, u),
20391
+ i[t] = Wl(u, x) / g, i[t + 1] = Wl(u, _) / m;
20341
20392
  }
20342
20393
  }(c, t, n, i, r, s, a, u, f, d, !!p);
20343
20394
  }
20344
- function Zl(e, t, n, i) {
20395
+ function Jl(e, t, n, i) {
20345
20396
  const r = n[0] - i[0], s = n[1] - i[1];
20346
20397
  let o = (t[0] - n[0]) * (n[0] - i[0]) + (t[1] - n[1]) * (n[1] - i[1]);
20347
20398
  return o /= r * r + s * s, e[0] = n[0] + o * r, e[1] = n[1] + o * s, e;
20348
20399
  }
20349
- function ql(e, t, n, i, r) {
20400
+ function Kl(e, t, n, i, r) {
20350
20401
  const s = 3 * t[n - 1], o = 3 * t[n - 1] + 1, a = e[s], l = e[o];
20351
20402
  return h = i, c = r, u = a, f = l, Math.sqrt((u - h) * (u - h) + (f - c) * (f - c));
20352
20403
  var h, c, u, f;
20353
20404
  }
20354
- function $l(e, t, n = 2) {
20405
+ function Ql(e, t, n = 2) {
20355
20406
  const i = t && t.length, r = i ? t[0] * n : e.length;
20356
- let s = Jl(e, 0, r, n, !0);
20407
+ let s = eh(e, 0, r, n, !0);
20357
20408
  const o = [];
20358
20409
  if (!s || s.next === s.prev) return o;
20359
20410
  let a, l, h;
20360
20411
  if (i && (s = function(e, t, n, i) {
20361
20412
  const r = [];
20362
20413
  for (let n = 0, s = t.length; n < s; n++) {
20363
- const o = Jl(e, t[n] * i, n < s - 1 ? t[n + 1] * i : e.length, i, !1);
20364
- o === o.next && (o.steiner = !0), r.push(lh(o));
20414
+ const o = eh(e, t[n] * i, n < s - 1 ? t[n + 1] * i : e.length, i, !1);
20415
+ o === o.next && (o.steiner = !0), r.push(uh(o));
20365
20416
  }
20366
- r.sort(rh);
20367
- for (let e = 0; e < r.length; e++) n = sh(r[e], n);
20417
+ r.sort(ah);
20418
+ for (let e = 0; e < r.length; e++) n = lh(r[e], n);
20368
20419
  return n;
20369
20420
  }(e, t, s, n)), e.length > 80 * n) {
20370
20421
  a = 1 / 0, l = 1 / 0;
@@ -20375,36 +20426,36 @@
20375
20426
  }
20376
20427
  h = Math.max(t - a, i - l), h = 0 !== h ? 32767 / h : 0;
20377
20428
  }
20378
- return Ql(s, o, n, a, l, h, 0), o;
20429
+ return nh(s, o, n, a, l, h, 0), o;
20379
20430
  }
20380
- function Jl(e, t, n, i, r) {
20431
+ function eh(e, t, n, i, r) {
20381
20432
  let s;
20382
20433
  if (r === function(e, t, n, i) {
20383
20434
  let r = 0;
20384
20435
  for (let s = t, o = n - i; s < n; s += i) r += (e[o] - e[s]) * (e[s + 1] + e[o + 1]),
20385
20436
  o = s;
20386
20437
  return r;
20387
- }(e, t, n, i) > 0) for (let r = t; r < n; r += i) s = _h(r / i | 0, e[r], e[r + 1], s); else for (let r = n - i; r >= t; r -= i) s = _h(r / i | 0, e[r], e[r + 1], s);
20388
- return s && dh(s, s.next) && (vh(s), s = s.next), s;
20438
+ }(e, t, n, i) > 0) for (let r = t; r < n; r += i) s = Ah(r / i | 0, e[r], e[r + 1], s); else for (let r = n - i; r >= t; r -= i) s = Ah(r / i | 0, e[r], e[r + 1], s);
20439
+ return s && mh(s, s.next) && (Th(s), s = s.next), s;
20389
20440
  }
20390
- function Kl(e, t) {
20441
+ function th(e, t) {
20391
20442
  if (!e) return e;
20392
20443
  t || (t = e);
20393
20444
  let n, i = e;
20394
20445
  do {
20395
- if (n = !1, i.steiner || !dh(i, i.next) && 0 !== fh(i.prev, i, i.next)) i = i.next; else {
20396
- if (vh(i), i = t = i.prev, i === i.next) break;
20446
+ if (n = !1, i.steiner || !mh(i, i.next) && 0 !== gh(i.prev, i, i.next)) i = i.next; else {
20447
+ if (Th(i), i = t = i.prev, i === i.next) break;
20397
20448
  n = !0;
20398
20449
  }
20399
20450
  } while (n || i !== t);
20400
20451
  return t;
20401
20452
  }
20402
- function Ql(e, t, n, i, r, s, o) {
20453
+ function nh(e, t, n, i, r, s, o) {
20403
20454
  if (!e) return;
20404
20455
  !o && s && function(e, t, n, i) {
20405
20456
  let r = e;
20406
20457
  do {
20407
- 0 === r.z && (r.z = ah(r.x, r.y, t, n, i)), r.prevZ = r.prev, r.nextZ = r.next,
20458
+ 0 === r.z && (r.z = ch(r.x, r.y, t, n, i)), r.prevZ = r.prev, r.nextZ = r.next,
20408
20459
  r = r.next;
20409
20460
  } while (r !== e);
20410
20461
  r.prevZ.nextZ = null, r.prevZ = null, function(e) {
@@ -20430,81 +20481,81 @@
20430
20481
  let a = e;
20431
20482
  for (;e.prev !== e.next; ) {
20432
20483
  const l = e.prev, h = e.next;
20433
- if (s ? th(e, i, r, s) : eh(e)) t.push(l.i, e.i, h.i), vh(e), e = h.next, a = h.next; else if ((e = h) === a) {
20434
- o ? 1 === o ? Ql(e = nh(Kl(e), t), t, n, i, r, s, 2) : 2 === o && ih(e, t, n, i, r, s) : Ql(Kl(e), t, n, i, r, s, 1);
20484
+ if (s ? rh(e, i, r, s) : ih(e)) t.push(l.i, e.i, h.i), Th(e), e = h.next, a = h.next; else if ((e = h) === a) {
20485
+ o ? 1 === o ? nh(e = sh(th(e), t), t, n, i, r, s, 2) : 2 === o && oh(e, t, n, i, r, s) : nh(th(e), t, n, i, r, s, 1);
20435
20486
  break;
20436
20487
  }
20437
20488
  }
20438
20489
  }
20439
- function eh(e) {
20490
+ function ih(e) {
20440
20491
  const t = e.prev, n = e, i = e.next;
20441
- if (fh(t, n, i) >= 0) return !1;
20492
+ if (gh(t, n, i) >= 0) return !1;
20442
20493
  const r = t.x, s = n.x, o = i.x, a = t.y, l = n.y, h = i.y, c = Math.min(r, s, o), u = Math.min(a, l, h), f = Math.max(r, s, o), d = Math.max(a, l, h);
20443
20494
  let p = i.next;
20444
20495
  for (;p !== t; ) {
20445
- if (p.x >= c && p.x <= f && p.y >= u && p.y <= d && ch(r, a, s, l, o, h, p.x, p.y) && fh(p.prev, p, p.next) >= 0) return !1;
20496
+ if (p.x >= c && p.x <= f && p.y >= u && p.y <= d && dh(r, a, s, l, o, h, p.x, p.y) && gh(p.prev, p, p.next) >= 0) return !1;
20446
20497
  p = p.next;
20447
20498
  }
20448
20499
  return !0;
20449
20500
  }
20450
- function th(e, t, n, i) {
20501
+ function rh(e, t, n, i) {
20451
20502
  const r = e.prev, s = e, o = e.next;
20452
- if (fh(r, s, o) >= 0) return !1;
20453
- const a = r.x, l = s.x, h = o.x, c = r.y, u = s.y, f = o.y, d = Math.min(a, l, h), p = Math.min(c, u, f), g = Math.max(a, l, h), m = Math.max(c, u, f), y = ah(d, p, t, n, i), x = ah(g, m, t, n, i);
20503
+ if (gh(r, s, o) >= 0) return !1;
20504
+ const a = r.x, l = s.x, h = o.x, c = r.y, u = s.y, f = o.y, d = Math.min(a, l, h), p = Math.min(c, u, f), g = Math.max(a, l, h), m = Math.max(c, u, f), y = ch(d, p, t, n, i), x = ch(g, m, t, n, i);
20454
20505
  let _ = e.prevZ, v = e.nextZ;
20455
20506
  for (;_ && _.z >= y && v && v.z <= x; ) {
20456
- if (_.x >= d && _.x <= g && _.y >= p && _.y <= m && _ !== r && _ !== o && ch(a, c, l, u, h, f, _.x, _.y) && fh(_.prev, _, _.next) >= 0) return !1;
20457
- if (_ = _.prevZ, v.x >= d && v.x <= g && v.y >= p && v.y <= m && v !== r && v !== o && ch(a, c, l, u, h, f, v.x, v.y) && fh(v.prev, v, v.next) >= 0) return !1;
20507
+ if (_.x >= d && _.x <= g && _.y >= p && _.y <= m && _ !== r && _ !== o && dh(a, c, l, u, h, f, _.x, _.y) && gh(_.prev, _, _.next) >= 0) return !1;
20508
+ if (_ = _.prevZ, v.x >= d && v.x <= g && v.y >= p && v.y <= m && v !== r && v !== o && dh(a, c, l, u, h, f, v.x, v.y) && gh(v.prev, v, v.next) >= 0) return !1;
20458
20509
  v = v.nextZ;
20459
20510
  }
20460
20511
  for (;_ && _.z >= y; ) {
20461
- if (_.x >= d && _.x <= g && _.y >= p && _.y <= m && _ !== r && _ !== o && ch(a, c, l, u, h, f, _.x, _.y) && fh(_.prev, _, _.next) >= 0) return !1;
20512
+ if (_.x >= d && _.x <= g && _.y >= p && _.y <= m && _ !== r && _ !== o && dh(a, c, l, u, h, f, _.x, _.y) && gh(_.prev, _, _.next) >= 0) return !1;
20462
20513
  _ = _.prevZ;
20463
20514
  }
20464
20515
  for (;v && v.z <= x; ) {
20465
- if (v.x >= d && v.x <= g && v.y >= p && v.y <= m && v !== r && v !== o && ch(a, c, l, u, h, f, v.x, v.y) && fh(v.prev, v, v.next) >= 0) return !1;
20516
+ if (v.x >= d && v.x <= g && v.y >= p && v.y <= m && v !== r && v !== o && dh(a, c, l, u, h, f, v.x, v.y) && gh(v.prev, v, v.next) >= 0) return !1;
20466
20517
  v = v.nextZ;
20467
20518
  }
20468
20519
  return !0;
20469
20520
  }
20470
- function nh(e, t) {
20521
+ function sh(e, t) {
20471
20522
  let n = e;
20472
20523
  do {
20473
20524
  const i = n.prev, r = n.next.next;
20474
- !dh(i, r) && ph(i, n, n.next, r) && yh(i, r) && yh(r, i) && (t.push(i.i, n.i, r.i),
20475
- vh(n), vh(n.next), n = e = r), n = n.next;
20525
+ !mh(i, r) && yh(i, n, n.next, r) && vh(i, r) && vh(r, i) && (t.push(i.i, n.i, r.i),
20526
+ Th(n), Th(n.next), n = e = r), n = n.next;
20476
20527
  } while (n !== e);
20477
- return Kl(n);
20528
+ return th(n);
20478
20529
  }
20479
- function ih(e, t, n, i, r, s) {
20530
+ function oh(e, t, n, i, r, s) {
20480
20531
  let o = e;
20481
20532
  do {
20482
20533
  let e = o.next.next;
20483
20534
  for (;e !== o.prev; ) {
20484
- if (o.i !== e.i && uh(o, e)) {
20485
- let a = xh(o, e);
20486
- return o = Kl(o, o.next), a = Kl(a, a.next), Ql(o, t, n, i, r, s, 0), void Ql(a, t, n, i, r, s, 0);
20535
+ if (o.i !== e.i && ph(o, e)) {
20536
+ let a = bh(o, e);
20537
+ return o = th(o, o.next), a = th(a, a.next), nh(o, t, n, i, r, s, 0), void nh(a, t, n, i, r, s, 0);
20487
20538
  }
20488
20539
  e = e.next;
20489
20540
  }
20490
20541
  o = o.next;
20491
20542
  } while (o !== e);
20492
20543
  }
20493
- function rh(e, t) {
20544
+ function ah(e, t) {
20494
20545
  let n = e.x - t.x;
20495
20546
  if (0 === n && (n = e.y - t.y, 0 === n)) {
20496
20547
  n = (e.next.y - e.y) / (e.next.x - e.x) - (t.next.y - t.y) / (t.next.x - t.x);
20497
20548
  }
20498
20549
  return n;
20499
20550
  }
20500
- function sh(e, t) {
20551
+ function lh(e, t) {
20501
20552
  const n = function(e, t) {
20502
20553
  let n = t;
20503
20554
  const i = e.x, r = e.y;
20504
20555
  let s, o = -1 / 0;
20505
- if (dh(e, n)) return n;
20556
+ if (mh(e, n)) return n;
20506
20557
  do {
20507
- if (dh(e, n.next)) return n.next;
20558
+ if (mh(e, n.next)) return n.next;
20508
20559
  if (r <= n.y && r >= n.next.y && n.next.y !== n.y) {
20509
20560
  const e = n.x + (r - n.y) * (n.next.x - n.x) / (n.next.y - n.y);
20510
20561
  if (e <= i && e > o && (o = e, s = n.x < n.next.x ? n : n.next, e === i)) return s;
@@ -20516,9 +20567,9 @@
20516
20567
  let c = 1 / 0;
20517
20568
  n = s;
20518
20569
  do {
20519
- if (i >= n.x && n.x >= l && i !== n.x && hh(r < h ? i : o, r, l, h, r < h ? o : i, r, n.x, n.y)) {
20570
+ if (i >= n.x && n.x >= l && i !== n.x && fh(r < h ? i : o, r, l, h, r < h ? o : i, r, n.x, n.y)) {
20520
20571
  const t = Math.abs(r - n.y) / (i - n.x);
20521
- yh(n, e) && (t < c || t === c && (n.x > s.x || n.x === s.x && oh(s, n))) && (s = n,
20572
+ vh(n, e) && (t < c || t === c && (n.x > s.x || n.x === s.x && hh(s, n))) && (s = n,
20522
20573
  c = t);
20523
20574
  }
20524
20575
  n = n.next;
@@ -20526,37 +20577,37 @@
20526
20577
  return s;
20527
20578
  }(e, t);
20528
20579
  if (!n) return t;
20529
- const i = xh(n, e);
20530
- return Kl(i, i.next), Kl(n, n.next);
20580
+ const i = bh(n, e);
20581
+ return th(i, i.next), th(n, n.next);
20531
20582
  }
20532
- function oh(e, t) {
20533
- return fh(e.prev, e, t.prev) < 0 && fh(t.next, e, e.next) < 0;
20583
+ function hh(e, t) {
20584
+ return gh(e.prev, e, t.prev) < 0 && gh(t.next, e, e.next) < 0;
20534
20585
  }
20535
- function ah(e, t, n, i, r) {
20586
+ function ch(e, t, n, i, r) {
20536
20587
  return (e = 1431655765 & ((e = 858993459 & ((e = 252645135 & ((e = 16711935 & ((e = (e - n) * r | 0) | e << 8)) | e << 4)) | e << 2)) | e << 1)) | (t = 1431655765 & ((t = 858993459 & ((t = 252645135 & ((t = 16711935 & ((t = (t - i) * r | 0) | t << 8)) | t << 4)) | t << 2)) | t << 1)) << 1;
20537
20588
  }
20538
- function lh(e) {
20589
+ function uh(e) {
20539
20590
  let t = e, n = e;
20540
20591
  do {
20541
20592
  (t.x < n.x || t.x === n.x && t.y < n.y) && (n = t), t = t.next;
20542
20593
  } while (t !== e);
20543
20594
  return n;
20544
20595
  }
20545
- function hh(e, t, n, i, r, s, o, a) {
20596
+ function fh(e, t, n, i, r, s, o, a) {
20546
20597
  return (r - o) * (t - a) >= (e - o) * (s - a) && (e - o) * (i - a) >= (n - o) * (t - a) && (n - o) * (s - a) >= (r - o) * (i - a);
20547
20598
  }
20548
- function ch(e, t, n, i, r, s, o, a) {
20549
- return !(e === o && t === a) && hh(e, t, n, i, r, s, o, a);
20599
+ function dh(e, t, n, i, r, s, o, a) {
20600
+ return !(e === o && t === a) && fh(e, t, n, i, r, s, o, a);
20550
20601
  }
20551
- function uh(e, t) {
20602
+ function ph(e, t) {
20552
20603
  return e.next.i !== t.i && e.prev.i !== t.i && !function(e, t) {
20553
20604
  let n = e;
20554
20605
  do {
20555
- if (n.i !== e.i && n.next.i !== e.i && n.i !== t.i && n.next.i !== t.i && ph(n, n.next, e, t)) return !0;
20606
+ if (n.i !== e.i && n.next.i !== e.i && n.i !== t.i && n.next.i !== t.i && yh(n, n.next, e, t)) return !0;
20556
20607
  n = n.next;
20557
20608
  } while (n !== e);
20558
20609
  return !1;
20559
- }(e, t) && (yh(e, t) && yh(t, e) && function(e, t) {
20610
+ }(e, t) && (vh(e, t) && vh(t, e) && function(e, t) {
20560
20611
  let n = e, i = !1;
20561
20612
  const r = (e.x + t.x) / 2, s = (e.y + t.y) / 2;
20562
20613
  do {
@@ -20564,42 +20615,42 @@
20564
20615
  n = n.next;
20565
20616
  } while (n !== e);
20566
20617
  return i;
20567
- }(e, t) && (fh(e.prev, e, t.prev) || fh(e, t.prev, t)) || dh(e, t) && fh(e.prev, e, e.next) > 0 && fh(t.prev, t, t.next) > 0);
20618
+ }(e, t) && (gh(e.prev, e, t.prev) || gh(e, t.prev, t)) || mh(e, t) && gh(e.prev, e, e.next) > 0 && gh(t.prev, t, t.next) > 0);
20568
20619
  }
20569
- function fh(e, t, n) {
20620
+ function gh(e, t, n) {
20570
20621
  return (t.y - e.y) * (n.x - t.x) - (t.x - e.x) * (n.y - t.y);
20571
20622
  }
20572
- function dh(e, t) {
20623
+ function mh(e, t) {
20573
20624
  return e.x === t.x && e.y === t.y;
20574
20625
  }
20575
- function ph(e, t, n, i) {
20576
- const r = mh(fh(e, t, n)), s = mh(fh(e, t, i)), o = mh(fh(n, i, e)), a = mh(fh(n, i, t));
20577
- return r !== s && o !== a || (!(0 !== r || !gh(e, n, t)) || (!(0 !== s || !gh(e, i, t)) || (!(0 !== o || !gh(n, e, i)) || !(0 !== a || !gh(n, t, i)))));
20626
+ function yh(e, t, n, i) {
20627
+ const r = _h(gh(e, t, n)), s = _h(gh(e, t, i)), o = _h(gh(n, i, e)), a = _h(gh(n, i, t));
20628
+ return r !== s && o !== a || (!(0 !== r || !xh(e, n, t)) || (!(0 !== s || !xh(e, i, t)) || (!(0 !== o || !xh(n, e, i)) || !(0 !== a || !xh(n, t, i)))));
20578
20629
  }
20579
- function gh(e, t, n) {
20630
+ function xh(e, t, n) {
20580
20631
  return t.x <= Math.max(e.x, n.x) && t.x >= Math.min(e.x, n.x) && t.y <= Math.max(e.y, n.y) && t.y >= Math.min(e.y, n.y);
20581
20632
  }
20582
- function mh(e) {
20633
+ function _h(e) {
20583
20634
  return e > 0 ? 1 : e < 0 ? -1 : 0;
20584
20635
  }
20585
- function yh(e, t) {
20586
- return fh(e.prev, e, e.next) < 0 ? fh(e, t, e.next) >= 0 && fh(e, e.prev, t) >= 0 : fh(e, t, e.prev) < 0 || fh(e, e.next, t) < 0;
20636
+ function vh(e, t) {
20637
+ return gh(e.prev, e, e.next) < 0 ? gh(e, t, e.next) >= 0 && gh(e, e.prev, t) >= 0 : gh(e, t, e.prev) < 0 || gh(e, e.next, t) < 0;
20587
20638
  }
20588
- function xh(e, t) {
20589
- const n = bh(e.i, e.x, e.y), i = bh(t.i, t.x, t.y), r = e.next, s = t.prev;
20639
+ function bh(e, t) {
20640
+ const n = wh(e.i, e.x, e.y), i = wh(t.i, t.x, t.y), r = e.next, s = t.prev;
20590
20641
  return e.next = t, t.prev = e, n.next = r, r.prev = n, i.next = n, n.prev = i, s.next = i,
20591
20642
  i.prev = s, i;
20592
20643
  }
20593
- function _h(e, t, n, i) {
20594
- const r = bh(e, t, n);
20644
+ function Ah(e, t, n, i) {
20645
+ const r = wh(e, t, n);
20595
20646
  return i ? (r.next = i.next, r.prev = i, i.next.prev = r, i.next = r) : (r.prev = r,
20596
20647
  r.next = r), r;
20597
20648
  }
20598
- function vh(e) {
20649
+ function Th(e) {
20599
20650
  e.next.prev = e.prev, e.prev.next = e.next, e.prevZ && (e.prevZ.nextZ = e.nextZ),
20600
20651
  e.nextZ && (e.nextZ.prevZ = e.prevZ);
20601
20652
  }
20602
- function bh(e, t, n) {
20653
+ function wh(e, t, n) {
20603
20654
  return {
20604
20655
  i: e,
20605
20656
  x: t,
@@ -20612,8 +20663,8 @@
20612
20663
  steiner: !1
20613
20664
  };
20614
20665
  }
20615
- const {PackUtil: Ah, ArrayPool: Th} = h();
20616
- function wh(e, t, n, i, r, s, o, a, l, h, c, u, f, d, p, g, m) {
20666
+ const {PackUtil: Sh, ArrayPool: Mh} = h();
20667
+ function Ph(e, t, n, i, r, s, o, a, l, h, c, u, f, d, p, g, m) {
20617
20668
  const y = t.getLength(), x = r / 3;
20618
20669
  for (let n = 2, i = y; n < i; n += 3) e[r + n - 2] = t[n - 2], e[r + n - 1] = t[n - 1],
20619
20670
  e[r + n - 0] = t[n] - o;
@@ -20624,14 +20675,14 @@
20624
20675
  e.copyWithin(r, r - 2 * y, r - y), r += y, (n = n || []).push(y / 3);
20625
20676
  const _ = n.getLength();
20626
20677
  for (let t = 0; t < _; t++) {
20627
- Mh(x + (n[t - 1] || 0), x + n[t], e, y / 3, l, i, h, c, u, f, s, d, p, g, m);
20678
+ Ih(x + (n[t - 1] || 0), x + n[t], e, y / 3, l, i, h, c, u, f, s, d, p, g, m);
20628
20679
  }
20629
20680
  return r;
20630
20681
  }
20631
- function Mh(e, t, n, i, r, s, o, a, l, h, c, u, f, d, p) {
20682
+ function Ih(e, t, n, i, r, s, o, a, l, h, c, u, f, d, p) {
20632
20683
  const g = s.getLength();
20633
20684
  let m, y;
20634
- for (let o = e, a = t; o < a - 1; o++) if (m = o, y = o + 1, r === 1 / 0 || !Dl(n, m, y, r)) if ((o - e) % 2 == 1 && (m += 2 * i,
20685
+ for (let o = e, a = t; o < a - 1; o++) if (m = o, y = o + 1, r === 1 / 0 || !Nl(n, m, y, r)) if ((o - e) % 2 == 1 && (m += 2 * i,
20635
20686
  y += 2 * i), p) {
20636
20687
  let e = s.currentIndex;
20637
20688
  s[e++] = m + i, s[e++] = y, s[e++] = m, s[e++] = y + i, s[e++] = y, s[e++] = m + i,
@@ -20650,60 +20701,60 @@
20650
20701
  f = d - p);
20651
20702
  let T = g;
20652
20703
  const w = u % 6;
20653
- 0 === e ? (5 === w && (m = ql(r, s, u, v, b)), T = w === y[0] || w === y[1] || w === y[2] ? g : g + m) : 1 === e && (w === y[0] || w === y[1] || w === y[2] ? T = 0 : 5 === w ? (m = ql(r, s, u, v, b),
20704
+ 0 === e ? (5 === w && (m = Kl(r, s, u, v, b)), T = w === y[0] || w === y[1] || w === y[2] ? g : g + m) : 1 === e && (w === y[0] || w === y[1] || w === y[2] ? T = 0 : 5 === w ? (m = Kl(r, s, u, v, b),
20654
20705
  T = m) : T = m);
20655
- const M = T / h * (1 / (100 * c)) / a;
20656
- let S;
20657
- S = 1 === t ? A === d ? 1 : 0 : "bottom" === n ? A === d ? f / 100 / l : 0 : A === d ? 0 : -f / 100 / l,
20658
- i[2 * o] = M, i[2 * o + 1] = S, 0 === w && (g += m);
20706
+ const S = T / h * (1 / (100 * c)) / a;
20707
+ let M;
20708
+ M = 1 === t ? A === d ? 1 : 0 : "bottom" === n ? A === d ? f / 100 / l : 0 : A === d ? 0 : -f / 100 / l,
20709
+ i[2 * o] = S, i[2 * o + 1] = M, 0 === w && (g += m);
20659
20710
  }
20660
20711
  }(a, l, h, c, n, s, g, u[0], u[1], f, d, p);
20661
20712
  }
20662
- function Sh(e) {
20713
+ function Ch(e) {
20663
20714
  const t = [ e[0] ];
20664
20715
  let n = e[0];
20665
20716
  for (let i = 1; i < e.length; i++) Array.isArray(e[i]) ? e[i][0] === n[0] && e[i][1] === n[1] && e[i][2] === n[2] || t.push(e[i]) : e[i].x === n.x && e[i].y === n.y && e[i].z === n.z || t.push(e[i]),
20666
20717
  n = e[i];
20667
20718
  return t;
20668
20719
  }
20669
- var Ph = "undefined" != typeof Float32Array ? Float32Array : Array;
20670
- function Ih() {
20671
- var e = new Ph(3);
20672
- return Ph != Float32Array && (e[0] = 0, e[1] = 0, e[2] = 0), e;
20720
+ var kh = "undefined" != typeof Float32Array ? Float32Array : Array;
20721
+ function Oh() {
20722
+ var e = new kh(3);
20723
+ return kh != Float32Array && (e[0] = 0, e[1] = 0, e[2] = 0), e;
20673
20724
  }
20674
- function Ch(e, t, n) {
20675
- var i = new Ph(3);
20725
+ function Fh(e, t, n) {
20726
+ var i = new kh(3);
20676
20727
  return i[0] = e, i[1] = t, i[2] = n, i;
20677
20728
  }
20678
- function kh(e, t) {
20729
+ function Rh(e, t) {
20679
20730
  return e[0] = t[0], e[1] = t[1], e[2] = t[2], e;
20680
20731
  }
20681
- function Oh(e, t, n, i) {
20732
+ function Eh(e, t, n, i) {
20682
20733
  return e[0] = t, e[1] = n, e[2] = i, e;
20683
20734
  }
20684
- function Fh(e, t, n) {
20735
+ function Dh(e, t, n) {
20685
20736
  return e[0] = t[0] + n[0], e[1] = t[1] + n[1], e[2] = t[2] + n[2], e;
20686
20737
  }
20687
- function Rh(e, t) {
20738
+ function Lh(e, t) {
20688
20739
  var n = t[0], i = t[1], r = t[2], s = n * n + i * i + r * r;
20689
20740
  return s > 0 && (s = 1 / Math.sqrt(s), e[0] = t[0] * s, e[1] = t[1] * s, e[2] = t[2] * s),
20690
20741
  e;
20691
20742
  }
20692
- function Eh(e, t) {
20743
+ function Hh(e, t) {
20693
20744
  return e[0] * t[0] + e[1] * t[1] + e[2] * t[2];
20694
20745
  }
20695
- function Dh(e, t, n) {
20746
+ function Nh(e, t, n) {
20696
20747
  var i = t[0], r = t[1], s = t[2], o = n[0], a = n[1], l = n[2];
20697
20748
  return e[0] = r * l - s * a, e[1] = s * o - i * l, e[2] = i * a - r * o, e;
20698
20749
  }
20699
- var Lh = function(e, t, n) {
20750
+ var zh = function(e, t, n) {
20700
20751
  return e[0] = t[0] - n[0], e[1] = t[1] - n[1], e[2] = t[2] - n[2], e;
20701
20752
  };
20702
- function Hh() {
20703
- var e = new Ph(4);
20704
- return Ph != Float32Array && (e[0] = 0, e[1] = 0, e[2] = 0), e[3] = 1, e;
20753
+ function Vh() {
20754
+ var e = new kh(4);
20755
+ return kh != Float32Array && (e[0] = 0, e[1] = 0, e[2] = 0), e[3] = 1, e;
20705
20756
  }
20706
- function Nh(e, t) {
20757
+ function Uh(e, t) {
20707
20758
  var n = t[0] + t[4] + t[8], i = void 0;
20708
20759
  if (n > 0) i = Math.sqrt(n + 1), e[3] = .5 * i, i = .5 / i, e[0] = (t[5] - t[7]) * i,
20709
20760
  e[1] = (t[6] - t[2]) * i, e[2] = (t[1] - t[3]) * i; else {
@@ -20717,55 +20768,55 @@
20717
20768
  return e;
20718
20769
  }
20719
20770
  !function() {
20720
- var e = Ih();
20771
+ var e = Oh();
20721
20772
  }(), function() {
20722
- var e, t = (e = new Ph(4), Ph != Float32Array && (e[0] = 0, e[1] = 0, e[2] = 0,
20773
+ var e, t = (e = new kh(4), kh != Float32Array && (e[0] = 0, e[1] = 0, e[2] = 0,
20723
20774
  e[3] = 0), e);
20724
20775
  }();
20725
- var zh, Vh = function(e, t, n) {
20776
+ var Bh, Gh = function(e, t, n) {
20726
20777
  return e[0] = t[0] * n, e[1] = t[1] * n, e[2] = t[2] * n, e[3] = t[3] * n, e;
20727
- }, Uh = function(e, t) {
20778
+ }, jh = function(e, t) {
20728
20779
  var n = t[0], i = t[1], r = t[2], s = t[3], o = n * n + i * i + r * r + s * s;
20729
20780
  return o > 0 && (o = 1 / Math.sqrt(o), e[0] = n * o, e[1] = i * o, e[2] = r * o,
20730
20781
  e[3] = s * o), e;
20731
20782
  };
20732
- Ih(), Ch(1, 0, 0), Ch(0, 1, 0), Hh(), Hh(), zh = new Ph(9), Ph != Float32Array && (zh[1] = 0,
20733
- zh[2] = 0, zh[3] = 0, zh[5] = 0, zh[6] = 0, zh[7] = 0), zh[0] = 1, zh[4] = 1, zh[8] = 1;
20783
+ Oh(), Fh(1, 0, 0), Fh(0, 1, 0), Vh(), Vh(), Bh = new kh(9), kh != Float32Array && (Bh[1] = 0,
20784
+ Bh[2] = 0, Bh[3] = 0, Bh[5] = 0, Bh[6] = 0, Bh[7] = 0), Bh[0] = 1, Bh[4] = 1, Bh[8] = 1;
20734
20785
  /*!
20735
20786
  * Contains code from google filament
20736
20787
  * https://github.com/google/filament/
20737
20788
  * License Apache-2.0
20738
20789
  */
20739
- const Bh = 8, Gh = [], jh = [], Wh = [], Xh = [];
20740
- function Yh(e, t, n) {
20741
- const i = Dh(jh, t, n), r = function(e, t, n, i, r, s, o, a, l, h) {
20790
+ const Wh = 8, Xh = [], Yh = [], Zh = [], qh = [];
20791
+ function $h(e, t, n) {
20792
+ const i = Nh(Yh, t, n), r = function(e, t, n, i, r, s, o, a, l, h) {
20742
20793
  return e[0] = t, e[1] = n, e[2] = i, e[3] = r, e[4] = s, e[5] = o, e[6] = a, e[7] = l,
20743
20794
  e[8] = h, e;
20744
- }(Gh, n[0], n[1], n[2], ...i, ...t);
20745
- e = Nh(e, r), e = function(e) {
20746
- return e[3] < 0 ? Vh(e, e, -1) : e;
20747
- }(e = Uh(e, e));
20748
- const s = 1 / ((1 << 2 * Bh - 1) - 1);
20795
+ }(Xh, n[0], n[1], n[2], ...i, ...t);
20796
+ e = Uh(e, r), e = function(e) {
20797
+ return e[3] < 0 ? Gh(e, e, -1) : e;
20798
+ }(e = jh(e, e));
20799
+ const s = 1 / ((1 << 2 * Wh - 1) - 1);
20749
20800
  if (e[3] < s) {
20750
20801
  e[3] = s;
20751
20802
  const t = Math.sqrt(1 - s * s);
20752
20803
  e[0] *= t, e[1] *= t, e[2] *= t;
20753
20804
  }
20754
- const o = n[3] > 0 ? Dh(Wh, n, t) : Dh(Wh, t, n);
20755
- return Eh(Dh(Xh, n, t), o) < 0 && Vh(e, e, -1), e;
20805
+ const o = n[3] > 0 ? Nh(Zh, n, t) : Nh(Zh, t, n);
20806
+ return Hh(Nh(qh, n, t), o) < 0 && Gh(e, e, -1), e;
20756
20807
  }
20757
- const Zh = [];
20758
- const qh = [], $h = [], Jh = [], Kh = [], Qh = [], ec = [], tc = [];
20759
- function nc(e, t, n, i, r, s) {
20760
- Oh(Kh, e[3 * t], e[3 * t + 1], e[3 * t + 2]), Oh(Qh, e[3 * n], e[3 * n + 1], e[3 * n + 2]),
20761
- Oh(ec, e[3 * i], e[3 * i + 1], e[3 * i + 2]);
20762
- const o = Lh(qh, ec, Qh), a = Lh($h, Kh, Qh), l = Dh(Jh, o, a);
20763
- Rh(tc, l), r[3 * t] = r[3 * t] || 0, r[3 * n] = r[3 * n] || 0, r[3 * i] = r[3 * i] || 0,
20808
+ const Jh = [];
20809
+ const Kh = [], Qh = [], ec = [], tc = [], nc = [], ic = [], rc = [];
20810
+ function sc(e, t, n, i, r, s) {
20811
+ Eh(tc, e[3 * t], e[3 * t + 1], e[3 * t + 2]), Eh(nc, e[3 * n], e[3 * n + 1], e[3 * n + 2]),
20812
+ Eh(ic, e[3 * i], e[3 * i + 1], e[3 * i + 2]);
20813
+ const o = zh(Kh, ic, nc), a = zh(Qh, tc, nc), l = Nh(ec, o, a);
20814
+ Lh(rc, l), r[3 * t] = r[3 * t] || 0, r[3 * n] = r[3 * n] || 0, r[3 * i] = r[3 * i] || 0,
20764
20815
  r[3 * t + 1] = r[3 * t + 1] || 0, r[3 * n + 1] = r[3 * n + 1] || 0, r[3 * i + 1] = r[3 * i + 1] || 0,
20765
20816
  r[3 * t + 2] = r[3 * t + 2] || 0, r[3 * n + 2] = r[3 * n + 2] || 0, r[3 * i + 2] = r[3 * i + 2] || 0,
20766
- r[3 * t] += tc[0], r[3 * n] += tc[0], r[3 * i] += tc[0], r[3 * t + 1] += tc[1],
20767
- r[3 * n + 1] += tc[1], r[3 * i + 1] += tc[1], r[3 * t + 2] += tc[2], r[3 * n + 2] += tc[2],
20768
- r[3 * i + 2] += tc[2], s[t] += 1, s[n] += 1, s[i] += 1;
20817
+ r[3 * t] += rc[0], r[3 * n] += rc[0], r[3 * i] += rc[0], r[3 * t + 1] += rc[1],
20818
+ r[3 * n + 1] += rc[1], r[3 * i + 1] += rc[1], r[3 * t + 2] += rc[2], r[3 * n + 2] += rc[2],
20819
+ r[3 * i + 2] += rc[2], s[t] += 1, s[n] += 1, s[i] += 1;
20769
20820
  }
20770
20821
  /*!
20771
20822
  * Contains code from THREE.JS
@@ -20773,23 +20824,23 @@
20773
20824
  * License MIT
20774
20825
  *
20775
20826
  * Generate tangents per vertex.
20776
- */ function ic(e, t, n) {
20827
+ */ function oc(e, t, n) {
20777
20828
  return e[0] = t[n], e[1] = t[n + 1], e[2] = t[n + 2], e;
20778
20829
  }
20779
- function rc(e, t, n) {
20830
+ function ac(e, t, n) {
20780
20831
  return e[0] = t[n], e[1] = t[n + 1], e;
20781
20832
  }
20782
- const {StyleUtil: sc, PackUtil: oc, ArrayPool: ac} = h(), lc = ac.getInstance();
20783
- function hc(e, t, n, i, r, s, o, a, l, h, c, u, f, d, p, g) {
20784
- void 0 === t.top && (t.top = !0), void 0 === t.side && (t.side = !0), lc.reset();
20785
- const {altitudeScale: m, altitudeProperty: y, defaultAltitude: x, heightProperty: _, minHeightProperty: v, defaultHeight: b, tangent: A, uv: T, topUVMode: w, sideUVMode: M, sideVerticalUVMode: S, top: P, side: I, textureYOrigin: C, topThickness: k} = t, O = !!g, F = function(e, t, {altitudeScale: n, altitudeProperty: i, defaultAltitude: r, heightProperty: s, minHeightProperty: o, defaultHeight: a}, {center: l, side: h, top: c, topThickness: u, uvOrigin: f, uv: d, uvSize: p, topUVMode: g, sideUVMode: m, sideVerticalUVMode: y, textureYOrigin: x, tileRatio: _, centimeterToPoint: v, verticalCentimeterToPoint: b, positionType: A, res: T, glScale: w, projectionCode: M}, S, P) {
20833
+ const {StyleUtil: lc, PackUtil: hc, ArrayPool: cc} = h(), uc = cc.getInstance();
20834
+ function fc(e, t, n, i, r, s, o, a, l, h, c, u, f, d, p, g) {
20835
+ void 0 === t.top && (t.top = !0), void 0 === t.side && (t.side = !0), uc.reset();
20836
+ const {altitudeScale: m, altitudeProperty: y, defaultAltitude: x, heightProperty: _, minHeightProperty: v, defaultHeight: b, tangent: A, uv: T, topUVMode: w, sideUVMode: S, sideVerticalUVMode: M, top: P, side: I, textureYOrigin: C, topThickness: k} = t, O = !!g, F = function(e, t, {altitudeScale: n, altitudeProperty: i, defaultAltitude: r, heightProperty: s, minHeightProperty: o, defaultHeight: a}, {center: l, side: h, top: c, topThickness: u, uvOrigin: f, uv: d, uvSize: p, topUVMode: g, sideUVMode: m, sideVerticalUVMode: y, textureYOrigin: x, tileRatio: _, centimeterToPoint: v, verticalCentimeterToPoint: b, positionType: A, res: T, glScale: w, projectionCode: S}, M, P) {
20786
20837
  let I = t / e[0].extent;
20787
20838
  t === 1 / 0 && (I = 1);
20788
20839
  const C = t === 1 / 0, k = P.get(), O = P.get(), F = P.get(), R = P.getProxy(), E = P.get(), D = P.get(), L = P.get(), H = !!d, N = !!c, z = !!h, V = H ? P.get() : null;
20789
20840
  function U(e, n, i, r, s, o) {
20790
20841
  let a = n;
20791
20842
  if (N) {
20792
- const h = $l(R, i, 3);
20843
+ const h = Ql(R, i, 3);
20793
20844
  if (0 === h.length) return n;
20794
20845
  let c = R.getLength(), d = E.currentIndex;
20795
20846
  for (let e = 0; e < c; e++) E[d++] = R[e];
@@ -20801,12 +20852,12 @@
20801
20852
  }
20802
20853
  c = h.length, d = D.currentIndex;
20803
20854
  for (let e = 0; e < c; e++) D[d++] = h[e];
20804
- D.currentIndex = d, H && Yl(g || 0, e, n, V, E, f, v, _, p[0], p[1], s, T, w, M, l),
20805
- u > 0 && !z && (n = wh(E, R, i, D, n, V, 0, u, t, H, m || 0, y || 0, x, p, _, b, r < 0 ? !o : o)),
20855
+ D.currentIndex = d, H && $l(g || 0, e, n, V, E, f, v, _, p[0], p[1], s, T, w, S, l),
20856
+ u > 0 && !z && (n = Ph(E, R, i, D, n, V, 0, u, t, H, m || 0, y || 0, x, p, _, b, r < 0 ? !o : o)),
20806
20857
  L.setLength(n / 3), L.fill(1, a / 3, n / 3);
20807
20858
  }
20808
20859
  if (z) {
20809
- N && (u = 0), a = n, n = wh(E, R, i, D, n, V, u, r, t, H, m || 0, y || 0, x, p, _, b, r < 0 ? !o : o),
20860
+ N && (u = 0), a = n, n = Ph(E, R, i, D, n, V, u, r, t, H, m || 0, y || 0, x, p, _, b, r < 0 ? !o : o),
20810
20861
  L.setLength(n / 3);
20811
20862
  const e = R.getLength() / 3;
20812
20863
  L.fill(1, a / 3, a / 3 + e), L.fill(0, a / 3 + e, a / 3 + 2 * e), L.fill(1, a / 3 + 2 * e, a / 3 + 3 * e),
@@ -20817,7 +20868,7 @@
20817
20868
  let B = -1 / 0, G = 1 / 0, j = 0;
20818
20869
  const W = [ -1, -1, t + 1, t + 1 ];
20819
20870
  let X = 0, Y = e.length;
20820
- Ee(S) && (X = S, Y = S + 1);
20871
+ Ee(M) && (X = M, Y = M + 1);
20821
20872
  let Z = 0, q = !1;
20822
20873
  const $ = P.getProxy();
20823
20874
  let J = !1;
@@ -20826,19 +20877,19 @@
20826
20877
  Ee(h) && (Math.abs(h) > Z && (Z = Math.abs(h)), h < 0 && (q = !0));
20827
20878
  const c = l.geometry, u = l.properties[lt];
20828
20879
  let f = Array.isArray(u && u[0] && u[0][0]) ? u[0] : u;
20829
- const {altitude: d, height: p} = Ah.getFeaAltitudeAndHeight(l, n, i, r, s, a, o);
20880
+ const {altitude: d, height: p} = Sh.getFeaAltitudeAndHeight(l, n, i, r, s, a, o);
20830
20881
  p < 0 ? (J = !0, G = Math.min(d, G), B = Math.max(d - p, B)) : (B = Math.max(d, B),
20831
20882
  G = Math.min(d - p, G));
20832
20883
  const g = E.getLength();
20833
20884
  let m = 0, y = j;
20834
20885
  $.setLength(0), R.setLength(0);
20835
- const x = Ah.calculateSignedArea(c[0]) < 0;
20886
+ const x = Sh.calculateSignedArea(c[0]) < 0;
20836
20887
  for (let e = 0, n = c.length; e < n; e++) {
20837
20888
  let i = c[e];
20838
- x && (i = i.reverse()), i = Sh(i);
20839
- const r = Ah.calculateSignedArea(i) < 0;
20889
+ x && (i = i.reverse()), i = Ch(i);
20890
+ const r = Sh.calculateSignedArea(i) < 0;
20840
20891
  if (!r && e > 0 && (m++, f = u && u[m], j = U(y, j, $, p * I, f, C), R.setLength(0),
20841
- $.setLength(0), y = j), t !== 1 / 0 && (i = Ah.clipPolygon(i, W)), !i.length) {
20892
+ $.setLength(0), y = j), t !== 1 / 0 && (i = Sh.clipPolygon(i, W)), !i.length) {
20842
20893
  e === n - 1 && (j = U(y, j, $, p * I, f, C));
20843
20894
  continue;
20844
20895
  }
@@ -20848,7 +20899,7 @@
20848
20899
  let e = $.currentIndex;
20849
20900
  $[e++] = R.getLength() / 3, $.currentIndex = e;
20850
20901
  }
20851
- El(R, R.getLength(), i, I, d, 0, A), e === n - 1 && (j = U(y, j, $, p * I, f, C));
20902
+ Hl(R, R.getLength(), i, I, d, 0, A), e === n - 1 && (j = U(y, j, $, p * I, f, C));
20852
20903
  }
20853
20904
  const _ = E.getLength() - g, v = (st + "").trim();
20854
20905
  for (let e = 0; e < _ / 3; e++) {
@@ -20857,19 +20908,19 @@
20857
20908
  k.currentIndex = e, Ee(h) && (e = F.currentIndex, F[e++] = h, F.currentIndex = e);
20858
20909
  }
20859
20910
  }
20860
- const K = Ah.getUnsignedArrayType(O.getLength() ? O[O.getLength() - 1] : 0), Q = {
20911
+ const K = Sh.getUnsignedArrayType(O.getLength() ? O[O.getLength() - 1] : 0), Q = {
20861
20912
  hasNegativeHeight: J,
20862
20913
  maxAltitude: B === -1 / 0 ? 0 : B,
20863
20914
  minAltitude: G === 1 / 0 ? 0 : G,
20864
20915
  vertices: E,
20865
20916
  verticeTypes: L,
20866
20917
  indices: D,
20867
- pickingIds: Th.createTypedArray(O, K),
20918
+ pickingIds: Mh.createTypedArray(O, K),
20868
20919
  featureIndexes: k
20869
20920
  };
20870
20921
  if (F.getLength()) {
20871
- const e = q ? Ah.getPosArrayType(Z) : Ah.getUnsignedArrayType(Z);
20872
- Q.featureIds = Th.createTypedArray(F, e);
20922
+ const e = q ? Sh.getPosArrayType(Z) : Sh.getUnsignedArrayType(Z);
20923
+ Q.featureIds = Mh.createTypedArray(F, e);
20873
20924
  } else Q.featureIds = [];
20874
20925
  return V && (V.setLength(E.getLength() / 3 * 2), Q.uvs = V), Q;
20875
20926
  }(e, n, {
@@ -20888,8 +20939,8 @@
20888
20939
  uvSize: [ r, r ],
20889
20940
  uvOrigin: i,
20890
20941
  topUVMode: w,
20891
- sideUVMode: M,
20892
- sideVerticalUVMode: S,
20942
+ sideUVMode: S,
20943
+ sideVerticalUVMode: M,
20893
20944
  textureYOrigin: C,
20894
20945
  tileRatio: a,
20895
20946
  centimeterToPoint: l,
@@ -20898,19 +20949,19 @@
20898
20949
  res: s,
20899
20950
  glScale: o,
20900
20951
  projectionCode: f
20901
- }, d, lc), R = [], E = F.vertices.getLength() / 3, D = oc.getIndexArrayType(E), L = ac.createTypedArray(F.indices, D);
20952
+ }, d, uc), R = [], E = F.vertices.getLength() / 3, D = hc.getIndexArrayType(E), L = cc.createTypedArray(F.indices, D);
20902
20953
  delete F.indices, R.push(L.buffer, F.pickingIds.buffer);
20903
- const H = Math.max(Math.abs(F.maxAltitude), Math.abs(F.minAltitude)), N = p || oc.getPosArrayType(Math.max(512, H));
20904
- F.vertices = ac.createTypedArray(F.vertices, N);
20905
- const z = A ? lc.getProxy() : new Float32Array(3 * E);
20954
+ const H = Math.max(Math.abs(F.maxAltitude), Math.abs(F.minAltitude)), N = p || hc.getPosArrayType(Math.max(512, H));
20955
+ F.vertices = cc.createTypedArray(F.vertices, N);
20956
+ const z = A ? uc.getProxy() : new Float32Array(3 * E);
20906
20957
  z.setLength && z.setLength(3 * E);
20907
20958
  const V = function(e, t, n) {
20908
20959
  const i = n || [];
20909
20960
  i.setLength && i.setLength(e.length);
20910
- const r = Zh;
20961
+ const r = Jh;
20911
20962
  r.length < e.length / 3 && (r.length = e.length / 3), r.fill(0, 0, e.length / 3);
20912
20963
  const s = void 0 === t.length ? t : t.length;
20913
- for (let n = 0; n < s / 3; n++) void 0 === t.length ? nc(e, 3 * n, 3 * n + 1, 3 * n + 2, i, r) : nc(e, t[3 * n], t[3 * n + 1], t[3 * n + 2], i, r);
20964
+ for (let n = 0; n < s / 3; n++) void 0 === t.length ? sc(e, 3 * n, 3 * n + 1, 3 * n + 2, i, r) : sc(e, t[3 * n], t[3 * n + 1], t[3 * n + 2], i, r);
20914
20965
  for (let e = 0; e < i.length; e += 3) {
20915
20966
  const t = r[e / 3];
20916
20967
  0 !== t ? (i[e] /= t, i[e + 1] /= t, i[e + 2] /= t) : (i[e] = 0, i[e + 1] = 0, i[e + 2] = 0);
@@ -20925,44 +20976,44 @@
20925
20976
  1 - Math.abs(t) > 1e-6 ? U = !1 : 0 !== t && (V[e] = Math.round(V[e]));
20926
20977
  }
20927
20978
  if (F.normals = V, A) {
20928
- let e = lc.get();
20979
+ let e = uc.get();
20929
20980
  e.setLength(4 * E), e = function(e, t, n, i, r) {
20930
20981
  const s = e.length / 3, o = r || new Array(4 * s), a = [], l = [];
20931
20982
  for (let e = 0; e < s; e++) a[e] = [ 0, 0, 0 ], l[e] = [ 0, 0, 0 ];
20932
20983
  const h = [ 0, 0, 0 ], c = [ 0, 0, 0 ], u = [ 0, 0, 0 ], f = [ 0, 0 ], d = [ 0, 0 ], p = [ 0, 0 ], g = [ 0, 0, 0 ], m = [ 0, 0, 0 ];
20933
20984
  function y(t, i, r) {
20934
- ic(h, e, 3 * t), ic(c, e, 3 * i), ic(u, e, 3 * r), rc(f, n, 2 * t), rc(d, n, 2 * i),
20935
- rc(p, n, 2 * r);
20936
- const s = c[0] - h[0], o = u[0] - h[0], y = c[1] - h[1], x = u[1] - h[1], _ = c[2] - h[2], v = u[2] - h[2], b = d[0] - f[0], A = p[0] - f[0], T = d[1] - f[1], w = p[1] - f[1], M = 1 / (b * w - A * T);
20937
- Oh(g, (w * s - T * o) * M, (w * y - T * x) * M, (w * _ - T * v) * M), Oh(m, (b * o - A * s) * M, (b * x - A * y) * M, (b * v - A * _) * M),
20938
- Fh(a[t], a[t], g), Fh(a[i], a[i], g), Fh(a[r], a[r], g), Fh(l[t], l[t], m), Fh(l[i], l[i], m),
20939
- Fh(l[r], l[r], m);
20985
+ oc(h, e, 3 * t), oc(c, e, 3 * i), oc(u, e, 3 * r), ac(f, n, 2 * t), ac(d, n, 2 * i),
20986
+ ac(p, n, 2 * r);
20987
+ const s = c[0] - h[0], o = u[0] - h[0], y = c[1] - h[1], x = u[1] - h[1], _ = c[2] - h[2], v = u[2] - h[2], b = d[0] - f[0], A = p[0] - f[0], T = d[1] - f[1], w = p[1] - f[1], S = 1 / (b * w - A * T);
20988
+ Eh(g, (w * s - T * o) * S, (w * y - T * x) * S, (w * _ - T * v) * S), Eh(m, (b * o - A * s) * S, (b * x - A * y) * S, (b * v - A * _) * S),
20989
+ Dh(a[t], a[t], g), Dh(a[i], a[i], g), Dh(a[r], a[r], g), Dh(l[t], l[t], m), Dh(l[i], l[i], m),
20990
+ Dh(l[r], l[r], m);
20940
20991
  }
20941
20992
  for (let e = 0, t = i.length; e < t; e += 3) y(i[e + 0], i[e + 1], i[e + 2]);
20942
20993
  const x = [], _ = [], v = [], b = [];
20943
20994
  let A, T, w;
20944
- function M(e) {
20945
- ic(v, t, 3 * e), kh(b, v), T = a[e], kh(x, T), Lh(x, x, function(e, t, n) {
20995
+ function S(e) {
20996
+ oc(v, t, 3 * e), Rh(b, v), T = a[e], Rh(x, T), zh(x, x, function(e, t, n) {
20946
20997
  return e[0] = t[0] * n, e[1] = t[1] * n, e[2] = t[2] * n, e;
20947
- }(v, v, Eh(v, T))), Rh(x, x), Dh(_, b, T), w = Eh(_, l[e]), A = w < 0 ? -1 : 1,
20998
+ }(v, v, Hh(v, T))), Lh(x, x), Nh(_, b, T), w = Hh(_, l[e]), A = w < 0 ? -1 : 1,
20948
20999
  o[4 * e] = x[0], o[4 * e + 1] = x[1], o[4 * e + 2] = x[2], o[4 * e + 3] = A;
20949
21000
  }
20950
- for (let e = 0, t = i.length; e < t; e += 3) M(i[e + 0]), M(i[e + 1]), M(i[e + 2]);
21001
+ for (let e = 0, t = i.length; e < t; e += 3) S(i[e + 0]), S(i[e + 1]), S(i[e + 2]);
20951
21002
  return o;
20952
21003
  }(F.vertices, F.normals, F.uvs, L, e), e = function(e, t) {
20953
21004
  const n = t.getLength(), i = new Float32Array(n), r = [], s = [], o = [];
20954
21005
  for (let a = 0; a < n; a += 4) {
20955
21006
  const n = a / 4 * 3;
20956
- Hl(s, e[n] || 0, e[n + 1] || 0, e[n + 2] || 0), zl(r, t[a] || 0, t[a + 1] || 0, t[a + 2] || 0, t[a + 3] || 0),
20957
- Yh(o, s, r), Nl(i.subarray(a, a + 4), o);
21007
+ Vl(s, e[n] || 0, e[n + 1] || 0, e[n + 2] || 0), Bl(r, t[a] || 0, t[a + 1] || 0, t[a + 2] || 0, t[a + 3] || 0),
21008
+ $h(o, s, r), Ul(i.subarray(a, a + 4), o);
20958
21009
  }
20959
21010
  return i;
20960
21011
  }(F.normals, e), F.tangents = e, R.push(e.buffer), delete F.normals;
20961
21012
  }
20962
- if (F.normals && (U && (F.normals = ac.createTypedArray(F.normals, Int8Array)),
21013
+ if (F.normals && (U && (F.normals = cc.createTypedArray(F.normals, Int8Array)),
20963
21014
  R.push(F.normals.buffer)), F.uvs) {
20964
21015
  const e = F.uvs;
20965
- F.uvs = ac.createTypedArray(e, Float32Array), R.push(F.uvs.buffer);
21016
+ F.uvs = cc.createTypedArray(e, Float32Array), R.push(F.uvs.buffer);
20966
21017
  }
20967
21018
  if (g) {
20968
21019
  const e = F.vertices, t = e.length;
@@ -20971,28 +21022,28 @@
20971
21022
  const G = function(e, t, n, i) {
20972
21023
  const r = {}, s = {}, o = i.getLength();
20973
21024
  if (ze(t.polygonFill)) {
20974
- let a = Se(t.polygonFill);
21025
+ let a = Me(t.polygonFill);
20975
21026
  const l = new Uint8Array(4 * o);
20976
21027
  l.fill(255);
20977
21028
  for (let t = 0; t < o; t++) {
20978
21029
  const s = e[i[t]], o = s.properties || {};
20979
21030
  o.$layer = s.layer, o.$type = s.type;
20980
21031
  let h = a(n, o);
20981
- we(h) && (r.aColor = 1, a = Se(h), h = a(n, o)), delete o.$layer, delete o.$type,
20982
- sc.normalizeColor(cc, h), l[4 * t] = cc[0], l[4 * t + 1] = cc[1], l[4 * t + 2] = cc[2],
20983
- l[4 * t + 3] = cc[3];
21032
+ we(h) && (r.aColor = 1, a = Me(h), h = a(n, o)), delete o.$layer, delete o.$type,
21033
+ lc.normalizeColor(dc, h), l[4 * t] = dc[0], l[4 * t + 1] = dc[1], l[4 * t + 2] = dc[2],
21034
+ l[4 * t + 3] = dc[3];
20984
21035
  }
20985
21036
  s.aColor = l;
20986
21037
  }
20987
21038
  if (ze(t.polygonOpacity)) {
20988
- let a = Me(t.polygonOpacity);
21039
+ let a = Se(t.polygonOpacity);
20989
21040
  const l = new Uint8Array(o);
20990
21041
  l.fill(255);
20991
21042
  for (let t = 0; t < o; t++) {
20992
21043
  const s = e[i[t]], o = s.properties || {};
20993
21044
  o.$layer = s.layer, o.$type = s.type;
20994
21045
  let h = a(n, o);
20995
- we(h) && (r.aOpacity = 1, a = Se(h), h = a(n, o)), delete o.$layer, delete o.$type,
21046
+ we(h) && (r.aOpacity = 1, a = Me(h), h = a(n, o)), delete o.$layer, delete o.$type,
20996
21047
  l[t] = 255 * h;
20997
21048
  }
20998
21049
  s.aOpacity = l;
@@ -21001,7 +21052,7 @@
21001
21052
  }(e, c, u, F.featureIndexes), j = function(e, t, n, i, r) {
21002
21053
  const s = [ [], [] ], o = ze(i.topPolygonFill), a = ze(i.bottomPolygonFill), l = [ 255, 255, 255, 255 ], h = t.getLength();
21003
21054
  if (o || a) {
21004
- let c = o && Se(i.topPolygonFill), u = a && Se(i.bottomPolygonFill), f = null, d = null, p = null, g = null;
21055
+ let c = o && Me(i.topPolygonFill), u = a && Me(i.bottomPolygonFill), f = null, d = null, p = null, g = null;
21005
21056
  for (let i = 0; i < h; i++) {
21006
21057
  if (1 === e[i] && !o || 0 === e[i] && !a) continue;
21007
21058
  const h = 1 === e[i];
@@ -21016,10 +21067,10 @@
21016
21067
  const m = n[t[i]], y = m.properties || {};
21017
21068
  y.$layer = m.layer, y.$type = m.type;
21018
21069
  let x = h ? c : u, _ = x(r, y);
21019
- we(_) && (x = Se(_), _ = x(r, y)), delete y.$layer, delete y.$type, sc.normalizeColor(cc, _),
21020
- Vl(cc, cc, l);
21021
- let v = uc(s, cc);
21022
- v < 0 && (v = s.length, s.push(Nl([], cc))), e[i] = v, h ? (f = t[i], p = v) : (d = t[i],
21070
+ we(_) && (x = Me(_), _ = x(r, y)), delete y.$layer, delete y.$type, lc.normalizeColor(dc, _),
21071
+ Gl(dc, dc, l);
21072
+ let v = pc(s, dc);
21073
+ v < 0 && (v = s.length, s.push(Ul([], dc))), e[i] = v, h ? (f = t[i], p = v) : (d = t[i],
21023
21074
  g = v);
21024
21075
  }
21025
21076
  }
@@ -21027,7 +21078,7 @@
21027
21078
  }(F.verticeTypes, F.featureIndexes, e, c, u), W = {
21028
21079
  data: {
21029
21080
  data: {
21030
- aVertexColorType: j.length <= 252 ? ac.createTypedArray(F.verticeTypes, Uint8Array) : ac.createTypedArray(F.verticeTypes, Uint16Array),
21081
+ aVertexColorType: j.length <= 252 ? cc.createTypedArray(F.verticeTypes, Uint8Array) : cc.createTypedArray(F.verticeTypes, Uint16Array),
21031
21082
  aPosition: F.vertices,
21032
21083
  aNormal: F.normals,
21033
21084
  aTexCoord0: F.uvs,
@@ -21048,41 +21099,41 @@
21048
21099
  return F.featureIds.length ? (W.data.featureIds = F.featureIds, R.push(W.data.featureIds.buffer)) : W.data.featureIds = [],
21049
21100
  G.aColor && (W.data.data.aColor = G.aColor, W.buffers.push(G.aColor.buffer)), G.aOpacity && (W.data.data.aOpacity = G.aOpacity,
21050
21101
  W.buffers.push(G.aOpacity.buffer)), W.buffers.push(W.data.data.aPosition.buffer),
21051
- W.data.pickingIdIndiceMap = oc.generatePickingIndiceIndex(W.data.data.aPickingId, W.data.indices),
21102
+ W.data.pickingIdIndiceMap = hc.generatePickingIndiceIndex(W.data.data.aPickingId, W.data.indices),
21052
21103
  W;
21053
21104
  }
21054
- const cc = [];
21055
- function uc(e, t) {
21105
+ const dc = [];
21106
+ function pc(e, t) {
21056
21107
  for (let r = 0; r < e.length; r++) if (n = t, i = e[r], n[0] === i[0] && n[1] === i[1] && n[2] === i[2] && n[3] === i[3]) return r;
21057
21108
  var n, i;
21058
21109
  return -1;
21059
21110
  }
21060
- function fc(e, t, n, i, r) {
21061
- dc(e, t, n || 0, i || e.length - 1, r || gc);
21111
+ function gc(e, t, n, i, r) {
21112
+ mc(e, t, n || 0, i || e.length - 1, r || xc);
21062
21113
  }
21063
- function dc(e, t, n, i, r) {
21114
+ function mc(e, t, n, i, r) {
21064
21115
  for (;i > n; ) {
21065
21116
  if (i - n > 600) {
21066
21117
  var s = i - n + 1, o = t - n + 1, a = Math.log(s), l = .5 * Math.exp(2 * a / 3), h = .5 * Math.sqrt(a * l * (s - l) / s) * (o - s / 2 < 0 ? -1 : 1);
21067
- dc(e, t, Math.max(n, Math.floor(t - o * l / s + h)), Math.min(i, Math.floor(t + (s - o) * l / s + h)), r);
21118
+ mc(e, t, Math.max(n, Math.floor(t - o * l / s + h)), Math.min(i, Math.floor(t + (s - o) * l / s + h)), r);
21068
21119
  }
21069
21120
  var c = e[t], u = n, f = i;
21070
- for (pc(e, n, t), r(e[i], c) > 0 && pc(e, n, i); u < f; ) {
21071
- for (pc(e, u, f), u++, f--; r(e[u], c) < 0; ) u++;
21121
+ for (yc(e, n, t), r(e[i], c) > 0 && yc(e, n, i); u < f; ) {
21122
+ for (yc(e, u, f), u++, f--; r(e[u], c) < 0; ) u++;
21072
21123
  for (;r(e[f], c) > 0; ) f--;
21073
21124
  }
21074
- 0 === r(e[n], c) ? pc(e, n, f) : pc(e, ++f, i), f <= t && (n = f + 1), t <= f && (i = f - 1);
21125
+ 0 === r(e[n], c) ? yc(e, n, f) : yc(e, ++f, i), f <= t && (n = f + 1), t <= f && (i = f - 1);
21075
21126
  }
21076
21127
  }
21077
- function pc(e, t, n) {
21128
+ function yc(e, t, n) {
21078
21129
  var i = e[t];
21079
21130
  e[t] = e[n], e[n] = i;
21080
21131
  }
21081
- function gc(e, t) {
21132
+ function xc(e, t) {
21082
21133
  return e < t ? -1 : e > t ? 1 : 0;
21083
21134
  }
21084
21135
  h();
21085
- class mc {
21136
+ class _c {
21086
21137
  constructor(e = 9) {
21087
21138
  this._maxEntries = Math.max(4, e), this._minEntries = Math.max(2, Math.ceil(.4 * this._maxEntries)),
21088
21139
  this.clear();
@@ -21093,12 +21144,12 @@
21093
21144
  search(e) {
21094
21145
  let t = this.data;
21095
21146
  const n = [];
21096
- if (!Pc(e, t)) return n;
21147
+ if (!kc(e, t)) return n;
21097
21148
  const i = this.toBBox, r = [];
21098
21149
  for (;t; ) {
21099
21150
  for (let s = 0; s < t.children.length; s++) {
21100
21151
  const o = t.children[s], a = t.leaf ? i(o) : o;
21101
- Pc(e, a) && (t.leaf ? n.push(o) : Sc(e, a) ? this._all(o, n) : r.push(o));
21152
+ kc(e, a) && (t.leaf ? n.push(o) : Cc(e, a) ? this._all(o, n) : r.push(o));
21102
21153
  }
21103
21154
  t = r.pop();
21104
21155
  }
@@ -21106,13 +21157,13 @@
21106
21157
  }
21107
21158
  collides(e) {
21108
21159
  let t = this.data;
21109
- if (!Pc(e, t)) return !1;
21160
+ if (!kc(e, t)) return !1;
21110
21161
  const n = [];
21111
21162
  for (;t; ) {
21112
21163
  for (let i = 0; i < t.children.length; i++) {
21113
21164
  const r = t.children[i], s = t.leaf ? this.toBBox(r) : r;
21114
- if (Pc(e, s)) {
21115
- if (t.leaf || Sc(e, s)) return !0;
21165
+ if (kc(e, s)) {
21166
+ if (t.leaf || Cc(e, s)) return !0;
21116
21167
  n.push(r);
21117
21168
  }
21118
21169
  }
@@ -21140,7 +21191,7 @@
21140
21191
  return e && this._insert(e, this.data.height - 1), this;
21141
21192
  }
21142
21193
  clear() {
21143
- return this.data = Ic([]), this;
21194
+ return this.data = Oc([]), this;
21144
21195
  }
21145
21196
  remove(e, t) {
21146
21197
  if (!e) return this;
@@ -21149,10 +21200,10 @@
21149
21200
  let o, a, l;
21150
21201
  for (;n || r.length; ) {
21151
21202
  if (n || (n = r.pop(), a = r[r.length - 1], o = s.pop(), l = !0), n.leaf) {
21152
- const i = yc(e, n.children, t);
21203
+ const i = vc(e, n.children, t);
21153
21204
  if (-1 !== i) return n.children.splice(i, 1), r.push(n), this._condense(r), this;
21154
21205
  }
21155
- l || n.leaf || !Sc(n, i) ? a ? (o++, n = a.children[o], l = !1) : n = null : (r.push(n),
21206
+ l || n.leaf || !Cc(n, i) ? a ? (o++, n = a.children[o], l = !1) : n = null : (r.push(n),
21156
21207
  s.push(o), o = 0, a = n, n = n.children[0]);
21157
21208
  }
21158
21209
  return this;
@@ -21180,26 +21231,26 @@
21180
21231
  _build(e, t, n, i) {
21181
21232
  const r = n - t + 1;
21182
21233
  let s, o = this._maxEntries;
21183
- if (r <= o) return s = Ic(e.slice(t, n + 1)), xc(s, this.toBBox), s;
21234
+ if (r <= o) return s = Oc(e.slice(t, n + 1)), bc(s, this.toBBox), s;
21184
21235
  i || (i = Math.ceil(Math.log(r) / Math.log(o)), o = Math.ceil(r / Math.pow(o, i - 1))),
21185
- s = Ic([]), s.leaf = !1, s.height = i;
21236
+ s = Oc([]), s.leaf = !1, s.height = i;
21186
21237
  const a = Math.ceil(r / o), l = a * Math.ceil(Math.sqrt(o));
21187
- Cc(e, t, n, l, this.compareMinX);
21238
+ Fc(e, t, n, l, this.compareMinX);
21188
21239
  for (let r = t; r <= n; r += l) {
21189
21240
  const t = Math.min(r + l - 1, n);
21190
- Cc(e, r, t, a, this.compareMinY);
21241
+ Fc(e, r, t, a, this.compareMinY);
21191
21242
  for (let n = r; n <= t; n += a) {
21192
21243
  const r = Math.min(n + a - 1, t);
21193
21244
  s.children.push(this._build(e, n, r, i - 1));
21194
21245
  }
21195
21246
  }
21196
- return xc(s, this.toBBox), s;
21247
+ return bc(s, this.toBBox), s;
21197
21248
  }
21198
21249
  _chooseSubtree(e, t, n, i) {
21199
21250
  for (;i.push(t), !t.leaf && i.length - 1 !== n; ) {
21200
21251
  let n, i = 1 / 0, o = 1 / 0;
21201
21252
  for (let a = 0; a < t.children.length; a++) {
21202
- const l = t.children[a], h = Tc(l), c = (r = e, s = l, (Math.max(s.maxX, r.maxX) - Math.min(s.minX, r.minX)) * (Math.max(s.maxY, r.maxY) - Math.min(s.minY, r.minY)) - h);
21253
+ const l = t.children[a], h = Mc(l), c = (r = e, s = l, (Math.max(s.maxX, r.maxX) - Math.min(s.minX, r.minX)) * (Math.max(s.maxY, r.maxY) - Math.min(s.minY, r.minY)) - h);
21203
21254
  c < o ? (o = c, i = h < i ? h : i, n = l) : c === o && h < i && (i = h, n = l);
21204
21255
  }
21205
21256
  t = n || t.children[0];
@@ -21209,97 +21260,97 @@
21209
21260
  }
21210
21261
  _insert(e, t, n) {
21211
21262
  const i = n ? e : this.toBBox(e), r = [], s = this._chooseSubtree(i, this.data, t, r);
21212
- for (s.children.push(e), vc(s, i); t >= 0 && r[t].children.length > this._maxEntries; ) this._split(r, t),
21263
+ for (s.children.push(e), Tc(s, i); t >= 0 && r[t].children.length > this._maxEntries; ) this._split(r, t),
21213
21264
  t--;
21214
21265
  this._adjustParentBBoxes(i, r, t);
21215
21266
  }
21216
21267
  _split(e, t) {
21217
21268
  const n = e[t], i = n.children.length, r = this._minEntries;
21218
21269
  this._chooseSplitAxis(n, r, i);
21219
- const s = this._chooseSplitIndex(n, r, i), o = Ic(n.children.splice(s, n.children.length - s));
21220
- o.height = n.height, o.leaf = n.leaf, xc(n, this.toBBox), xc(o, this.toBBox), t ? e[t - 1].children.push(o) : this._splitRoot(n, o);
21270
+ const s = this._chooseSplitIndex(n, r, i), o = Oc(n.children.splice(s, n.children.length - s));
21271
+ o.height = n.height, o.leaf = n.leaf, bc(n, this.toBBox), bc(o, this.toBBox), t ? e[t - 1].children.push(o) : this._splitRoot(n, o);
21221
21272
  }
21222
21273
  _splitRoot(e, t) {
21223
- this.data = Ic([ e, t ]), this.data.height = e.height + 1, this.data.leaf = !1,
21224
- xc(this.data, this.toBBox);
21274
+ this.data = Oc([ e, t ]), this.data.height = e.height + 1, this.data.leaf = !1,
21275
+ bc(this.data, this.toBBox);
21225
21276
  }
21226
21277
  _chooseSplitIndex(e, t, n) {
21227
21278
  let i, r = 1 / 0, s = 1 / 0;
21228
21279
  for (let o = t; o <= n - t; o++) {
21229
- const t = _c(e, 0, o, this.toBBox), a = _c(e, o, n, this.toBBox), l = Mc(t, a), h = Tc(t) + Tc(a);
21280
+ const t = Ac(e, 0, o, this.toBBox), a = Ac(e, o, n, this.toBBox), l = Ic(t, a), h = Mc(t) + Mc(a);
21230
21281
  l < r ? (r = l, i = o, s = h < s ? h : s) : l === r && h < s && (s = h, i = o);
21231
21282
  }
21232
21283
  return i || n - t;
21233
21284
  }
21234
21285
  _chooseSplitAxis(e, t, n) {
21235
- const i = e.leaf ? this.compareMinX : bc, r = e.leaf ? this.compareMinY : Ac;
21286
+ const i = e.leaf ? this.compareMinX : wc, r = e.leaf ? this.compareMinY : Sc;
21236
21287
  this._allDistMargin(e, t, n, i) < this._allDistMargin(e, t, n, r) && e.children.sort(i);
21237
21288
  }
21238
21289
  _allDistMargin(e, t, n, i) {
21239
21290
  e.children.sort(i);
21240
- const r = this.toBBox, s = _c(e, 0, t, r), o = _c(e, n - t, n, r);
21241
- let a = wc(s) + wc(o);
21291
+ const r = this.toBBox, s = Ac(e, 0, t, r), o = Ac(e, n - t, n, r);
21292
+ let a = Pc(s) + Pc(o);
21242
21293
  for (let i = t; i < n - t; i++) {
21243
21294
  const t = e.children[i];
21244
- vc(s, e.leaf ? r(t) : t), a += wc(s);
21295
+ Tc(s, e.leaf ? r(t) : t), a += Pc(s);
21245
21296
  }
21246
21297
  for (let i = n - t - 1; i >= t; i--) {
21247
21298
  const t = e.children[i];
21248
- vc(o, e.leaf ? r(t) : t), a += wc(o);
21299
+ Tc(o, e.leaf ? r(t) : t), a += Pc(o);
21249
21300
  }
21250
21301
  return a;
21251
21302
  }
21252
21303
  _adjustParentBBoxes(e, t, n) {
21253
- for (let i = n; i >= 0; i--) vc(t[i], e);
21304
+ for (let i = n; i >= 0; i--) Tc(t[i], e);
21254
21305
  }
21255
21306
  _condense(e) {
21256
21307
  for (let t, n = e.length - 1; n >= 0; n--) 0 === e[n].children.length ? n > 0 ? (t = e[n - 1].children,
21257
- t.splice(t.indexOf(e[n]), 1)) : this.clear() : xc(e[n], this.toBBox);
21308
+ t.splice(t.indexOf(e[n]), 1)) : this.clear() : bc(e[n], this.toBBox);
21258
21309
  }
21259
21310
  }
21260
- function yc(e, t, n) {
21311
+ function vc(e, t, n) {
21261
21312
  if (!n) return t.indexOf(e);
21262
21313
  for (let i = 0; i < t.length; i++) if (n(e, t[i])) return i;
21263
21314
  return -1;
21264
21315
  }
21265
- function xc(e, t) {
21266
- _c(e, 0, e.children.length, t, e);
21316
+ function bc(e, t) {
21317
+ Ac(e, 0, e.children.length, t, e);
21267
21318
  }
21268
- function _c(e, t, n, i, r) {
21269
- r || (r = Ic(null)), r.minX = 1 / 0, r.minY = 1 / 0, r.maxX = -1 / 0, r.maxY = -1 / 0;
21319
+ function Ac(e, t, n, i, r) {
21320
+ r || (r = Oc(null)), r.minX = 1 / 0, r.minY = 1 / 0, r.maxX = -1 / 0, r.maxY = -1 / 0;
21270
21321
  for (let s = t; s < n; s++) {
21271
21322
  const t = e.children[s];
21272
- vc(r, e.leaf ? i(t) : t);
21323
+ Tc(r, e.leaf ? i(t) : t);
21273
21324
  }
21274
21325
  return r;
21275
21326
  }
21276
- function vc(e, t) {
21327
+ function Tc(e, t) {
21277
21328
  return e.minX = Math.min(e.minX, t.minX), e.minY = Math.min(e.minY, t.minY), e.maxX = Math.max(e.maxX, t.maxX),
21278
21329
  e.maxY = Math.max(e.maxY, t.maxY), e;
21279
21330
  }
21280
- function bc(e, t) {
21331
+ function wc(e, t) {
21281
21332
  return e.minX - t.minX;
21282
21333
  }
21283
- function Ac(e, t) {
21334
+ function Sc(e, t) {
21284
21335
  return e.minY - t.minY;
21285
21336
  }
21286
- function Tc(e) {
21337
+ function Mc(e) {
21287
21338
  return (e.maxX - e.minX) * (e.maxY - e.minY);
21288
21339
  }
21289
- function wc(e) {
21340
+ function Pc(e) {
21290
21341
  return e.maxX - e.minX + (e.maxY - e.minY);
21291
21342
  }
21292
- function Mc(e, t) {
21343
+ function Ic(e, t) {
21293
21344
  const n = Math.max(e.minX, t.minX), i = Math.max(e.minY, t.minY), r = Math.min(e.maxX, t.maxX), s = Math.min(e.maxY, t.maxY);
21294
21345
  return Math.max(0, r - n) * Math.max(0, s - i);
21295
21346
  }
21296
- function Sc(e, t) {
21347
+ function Cc(e, t) {
21297
21348
  return e.minX <= t.minX && e.minY <= t.minY && t.maxX <= e.maxX && t.maxY <= e.maxY;
21298
21349
  }
21299
- function Pc(e, t) {
21350
+ function kc(e, t) {
21300
21351
  return t.minX <= e.maxX && t.minY <= e.maxY && t.maxX >= e.minX && t.maxY >= e.minY;
21301
21352
  }
21302
- function Ic(e) {
21353
+ function Oc(e) {
21303
21354
  return {
21304
21355
  children: e,
21305
21356
  height: 1,
@@ -21310,16 +21361,16 @@
21310
21361
  maxY: -1 / 0
21311
21362
  };
21312
21363
  }
21313
- function Cc(e, t, n, i, r) {
21364
+ function Fc(e, t, n, i, r) {
21314
21365
  const s = [ t, n ];
21315
21366
  for (;s.length; ) {
21316
21367
  if ((n = s.pop()) - (t = s.pop()) <= i) continue;
21317
21368
  const o = t + Math.ceil((n - t) / i / 2) * i;
21318
- fc(e, o, t, n, r), s.push(t, o, o, n);
21369
+ gc(e, o, t, n, r), s.push(t, o, o, n);
21319
21370
  }
21320
21371
  }
21321
- class kc {
21322
- constructor(e = [], t = Oc) {
21372
+ class Rc {
21373
+ constructor(e = [], t = Ec) {
21323
21374
  if (this.data = e, this.length = this.data.length, this.compare = t, this.length > 0) for (let e = (this.length >> 1) - 1; e >= 0; e--) this._down(e);
21324
21375
  }
21325
21376
  push(e) {
@@ -21353,12 +21404,12 @@
21353
21404
  t[e] = r;
21354
21405
  }
21355
21406
  }
21356
- function Oc(e, t) {
21407
+ function Ec(e, t) {
21357
21408
  return e < t ? -1 : e > t ? 1 : 0;
21358
21409
  }
21359
- var Fc = {
21410
+ var Dc = {
21360
21411
  exports: {}
21361
- }, Rc = function(e, t, n, i) {
21412
+ }, Lc = function(e, t, n, i) {
21362
21413
  var r = e[0], s = e[1], o = !1;
21363
21414
  void 0 === n && (n = 0), void 0 === i && (i = t.length);
21364
21415
  for (var a = (i - n) / 2, l = 0, h = a - 1; l < a; h = l++) {
@@ -21366,7 +21417,7 @@
21366
21417
  u > s != d > s && r < (f - c) * (s - u) / (d - u) + c && (o = !o);
21367
21418
  }
21368
21419
  return o;
21369
- }, Ec = function(e, t, n, i) {
21420
+ }, Hc = function(e, t, n, i) {
21370
21421
  var r = e[0], s = e[1], o = !1;
21371
21422
  void 0 === n && (n = 0), void 0 === i && (i = t.length);
21372
21423
  for (var a = i - n, l = 0, h = a - 1; l < a; h = l++) {
@@ -21375,13 +21426,13 @@
21375
21426
  }
21376
21427
  return o;
21377
21428
  };
21378
- Fc.exports = function(e, t, n, i) {
21379
- return t.length > 0 && Array.isArray(t[0]) ? Ec(e, t, n, i) : Rc(e, t, n, i);
21429
+ Dc.exports = function(e, t, n, i) {
21430
+ return t.length > 0 && Array.isArray(t[0]) ? Hc(e, t, n, i) : Lc(e, t, n, i);
21380
21431
  };
21381
- var Dc = Fc.exports.nested = Ec;
21382
- Fc.exports.flat = Rc;
21383
- const Lc = 11102230246251565e-32, Hc = 134217729, Nc = (3 + 8 * Lc) * Lc;
21384
- function zc(e, t, n, i, r) {
21432
+ var Nc = Dc.exports.nested = Hc;
21433
+ Dc.exports.flat = Lc;
21434
+ const zc = 11102230246251565e-32, Vc = 134217729, Uc = (3 + 8 * zc) * zc;
21435
+ function Bc(e, t, n, i, r) {
21385
21436
  let s, o, a, l, h = t[0], c = i[0], u = 0, f = 0;
21386
21437
  c > h == c > -h ? (s = h, h = t[++u]) : (s = c, c = i[++f]);
21387
21438
  let d = 0;
@@ -21395,57 +21446,57 @@
21395
21446
  0 !== a && (r[d++] = a);
21396
21447
  return 0 === s && 0 !== d || (r[d++] = s), d;
21397
21448
  }
21398
- function Vc(e) {
21449
+ function Gc(e) {
21399
21450
  return new Float64Array(e);
21400
21451
  }
21401
- const Uc = 33306690738754716e-32, Bc = 22204460492503146e-32, Gc = 11093356479670487e-47, jc = Vc(4), Wc = Vc(8), Xc = Vc(12), Yc = Vc(16), Zc = Vc(4);
21402
- function qc(e, t, n, i, r, s) {
21452
+ const jc = 33306690738754716e-32, Wc = 22204460492503146e-32, Xc = 11093356479670487e-47, Yc = Gc(4), Zc = Gc(8), qc = Gc(12), $c = Gc(16), Jc = Gc(4);
21453
+ function Kc(e, t, n, i, r, s) {
21403
21454
  const o = (t - s) * (n - r), a = (e - r) * (i - s), l = o - a;
21404
21455
  if (0 === o || 0 === a || o > 0 != a > 0) return l;
21405
21456
  const h = Math.abs(o + a);
21406
- return Math.abs(l) >= Uc * h ? l : -function(e, t, n, i, r, s, o) {
21457
+ return Math.abs(l) >= jc * h ? l : -function(e, t, n, i, r, s, o) {
21407
21458
  let a, l, h, c, u, f, d, p, g, m, y, x, _, v, b, A, T, w;
21408
- const M = e - r, S = n - r, P = t - s, I = i - s;
21409
- v = M * I, f = Hc * M, d = f - (f - M), p = M - d, f = Hc * I, g = f - (f - I),
21410
- m = I - g, b = p * m - (v - d * g - p * g - d * m), A = P * S, f = Hc * P, d = f - (f - P),
21411
- p = P - d, f = Hc * S, g = f - (f - S), m = S - g, T = p * m - (A - d * g - p * g - d * m),
21412
- y = b - T, u = b - y, jc[0] = b - (y + u) + (u - T), x = v + y, u = x - v, _ = v - (x - u) + (y - u),
21413
- y = _ - A, u = _ - y, jc[1] = _ - (y + u) + (u - A), w = x + y, u = w - x, jc[2] = x - (w - u) + (y - u),
21414
- jc[3] = w;
21459
+ const S = e - r, M = n - r, P = t - s, I = i - s;
21460
+ v = S * I, f = Vc * S, d = f - (f - S), p = S - d, f = Vc * I, g = f - (f - I),
21461
+ m = I - g, b = p * m - (v - d * g - p * g - d * m), A = P * M, f = Vc * P, d = f - (f - P),
21462
+ p = P - d, f = Vc * M, g = f - (f - M), m = M - g, T = p * m - (A - d * g - p * g - d * m),
21463
+ y = b - T, u = b - y, Yc[0] = b - (y + u) + (u - T), x = v + y, u = x - v, _ = v - (x - u) + (y - u),
21464
+ y = _ - A, u = _ - y, Yc[1] = _ - (y + u) + (u - A), w = x + y, u = w - x, Yc[2] = x - (w - u) + (y - u),
21465
+ Yc[3] = w;
21415
21466
  let C = function(e, t) {
21416
21467
  let n = t[0];
21417
21468
  for (let i = 1; i < e; i++) n += t[i];
21418
21469
  return n;
21419
- }(4, jc), k = Bc * o;
21470
+ }(4, Yc), k = Wc * o;
21420
21471
  if (C >= k || -C >= k) return C;
21421
- if (u = e - M, a = e - (M + u) + (u - r), u = n - S, h = n - (S + u) + (u - r),
21472
+ if (u = e - S, a = e - (S + u) + (u - r), u = n - M, h = n - (M + u) + (u - r),
21422
21473
  u = t - P, l = t - (P + u) + (u - s), u = i - I, c = i - (I + u) + (u - s), 0 === a && 0 === l && 0 === h && 0 === c) return C;
21423
- if (k = Gc * o + Nc * Math.abs(C), C += M * c + I * a - (P * h + S * l), C >= k || -C >= k) return C;
21424
- v = a * I, f = Hc * a, d = f - (f - a), p = a - d, f = Hc * I, g = f - (f - I),
21425
- m = I - g, b = p * m - (v - d * g - p * g - d * m), A = l * S, f = Hc * l, d = f - (f - l),
21426
- p = l - d, f = Hc * S, g = f - (f - S), m = S - g, T = p * m - (A - d * g - p * g - d * m),
21427
- y = b - T, u = b - y, Zc[0] = b - (y + u) + (u - T), x = v + y, u = x - v, _ = v - (x - u) + (y - u),
21428
- y = _ - A, u = _ - y, Zc[1] = _ - (y + u) + (u - A), w = x + y, u = w - x, Zc[2] = x - (w - u) + (y - u),
21429
- Zc[3] = w;
21430
- const O = zc(4, jc, 4, Zc, Wc);
21431
- v = M * c, f = Hc * M, d = f - (f - M), p = M - d, f = Hc * c, g = f - (f - c),
21432
- m = c - g, b = p * m - (v - d * g - p * g - d * m), A = P * h, f = Hc * P, d = f - (f - P),
21433
- p = P - d, f = Hc * h, g = f - (f - h), m = h - g, T = p * m - (A - d * g - p * g - d * m),
21434
- y = b - T, u = b - y, Zc[0] = b - (y + u) + (u - T), x = v + y, u = x - v, _ = v - (x - u) + (y - u),
21435
- y = _ - A, u = _ - y, Zc[1] = _ - (y + u) + (u - A), w = x + y, u = w - x, Zc[2] = x - (w - u) + (y - u),
21436
- Zc[3] = w;
21437
- const F = zc(O, Wc, 4, Zc, Xc);
21438
- v = a * c, f = Hc * a, d = f - (f - a), p = a - d, f = Hc * c, g = f - (f - c),
21439
- m = c - g, b = p * m - (v - d * g - p * g - d * m), A = l * h, f = Hc * l, d = f - (f - l),
21440
- p = l - d, f = Hc * h, g = f - (f - h), m = h - g, T = p * m - (A - d * g - p * g - d * m),
21441
- y = b - T, u = b - y, Zc[0] = b - (y + u) + (u - T), x = v + y, u = x - v, _ = v - (x - u) + (y - u),
21442
- y = _ - A, u = _ - y, Zc[1] = _ - (y + u) + (u - A), w = x + y, u = w - x, Zc[2] = x - (w - u) + (y - u),
21443
- Zc[3] = w;
21444
- const R = zc(F, Xc, 4, Zc, Yc);
21445
- return Yc[R - 1];
21474
+ if (k = Xc * o + Uc * Math.abs(C), C += S * c + I * a - (P * h + M * l), C >= k || -C >= k) return C;
21475
+ v = a * I, f = Vc * a, d = f - (f - a), p = a - d, f = Vc * I, g = f - (f - I),
21476
+ m = I - g, b = p * m - (v - d * g - p * g - d * m), A = l * M, f = Vc * l, d = f - (f - l),
21477
+ p = l - d, f = Vc * M, g = f - (f - M), m = M - g, T = p * m - (A - d * g - p * g - d * m),
21478
+ y = b - T, u = b - y, Jc[0] = b - (y + u) + (u - T), x = v + y, u = x - v, _ = v - (x - u) + (y - u),
21479
+ y = _ - A, u = _ - y, Jc[1] = _ - (y + u) + (u - A), w = x + y, u = w - x, Jc[2] = x - (w - u) + (y - u),
21480
+ Jc[3] = w;
21481
+ const O = Bc(4, Yc, 4, Jc, Zc);
21482
+ v = S * c, f = Vc * S, d = f - (f - S), p = S - d, f = Vc * c, g = f - (f - c),
21483
+ m = c - g, b = p * m - (v - d * g - p * g - d * m), A = P * h, f = Vc * P, d = f - (f - P),
21484
+ p = P - d, f = Vc * h, g = f - (f - h), m = h - g, T = p * m - (A - d * g - p * g - d * m),
21485
+ y = b - T, u = b - y, Jc[0] = b - (y + u) + (u - T), x = v + y, u = x - v, _ = v - (x - u) + (y - u),
21486
+ y = _ - A, u = _ - y, Jc[1] = _ - (y + u) + (u - A), w = x + y, u = w - x, Jc[2] = x - (w - u) + (y - u),
21487
+ Jc[3] = w;
21488
+ const F = Bc(O, Zc, 4, Jc, qc);
21489
+ v = a * c, f = Vc * a, d = f - (f - a), p = a - d, f = Vc * c, g = f - (f - c),
21490
+ m = c - g, b = p * m - (v - d * g - p * g - d * m), A = l * h, f = Vc * l, d = f - (f - l),
21491
+ p = l - d, f = Vc * h, g = f - (f - h), m = h - g, T = p * m - (A - d * g - p * g - d * m),
21492
+ y = b - T, u = b - y, Jc[0] = b - (y + u) + (u - T), x = v + y, u = x - v, _ = v - (x - u) + (y - u),
21493
+ y = _ - A, u = _ - y, Jc[1] = _ - (y + u) + (u - A), w = x + y, u = w - x, Jc[2] = x - (w - u) + (y - u),
21494
+ Jc[3] = w;
21495
+ const R = Bc(F, qc, 4, Jc, $c);
21496
+ return $c[R - 1];
21446
21497
  }(e, t, n, i, r, s, h);
21447
21498
  }
21448
- function $c(e, t, n) {
21499
+ function Qc(e, t, n) {
21449
21500
  t = Math.max(0, void 0 === t ? 2 : t), n = n || 0;
21450
21501
  var i = function(e) {
21451
21502
  for (var t = e[0], n = e[0], i = e[0], r = e[0], s = 0; s < e.length; s++) {
@@ -21453,20 +21504,20 @@
21453
21504
  o[0] < t[0] && (t = o), o[0] > i[0] && (i = o), o[1] < n[1] && (n = o), o[1] > r[1] && (r = o);
21454
21505
  }
21455
21506
  var a = [ t, n, i, r ], l = a.slice();
21456
- for (s = 0; s < e.length; s++) Dc(e[s], a) || l.push(e[s]);
21507
+ for (s = 0; s < e.length; s++) Nc(e[s], a) || l.push(e[s]);
21457
21508
  return function(e) {
21458
- e.sort(lu);
21509
+ e.sort(uu);
21459
21510
  for (var t = [], n = 0; n < e.length; n++) {
21460
- for (;t.length >= 2 && nu(t[t.length - 2], t[t.length - 1], e[n]) <= 0; ) t.pop();
21511
+ for (;t.length >= 2 && su(t[t.length - 2], t[t.length - 1], e[n]) <= 0; ) t.pop();
21461
21512
  t.push(e[n]);
21462
21513
  }
21463
21514
  for (var i = [], r = e.length - 1; r >= 0; r--) {
21464
- for (;i.length >= 2 && nu(i[i.length - 2], i[i.length - 1], e[r]) <= 0; ) i.pop();
21515
+ for (;i.length >= 2 && su(i[i.length - 2], i[i.length - 1], e[r]) <= 0; ) i.pop();
21465
21516
  i.push(e[r]);
21466
21517
  }
21467
21518
  return i.pop(), t.pop(), t.concat(i);
21468
21519
  }(l);
21469
- }(e), r = new mc(16);
21520
+ }(e), r = new _c(16);
21470
21521
  r.toBBox = function(e) {
21471
21522
  return {
21472
21523
  minX: e[0],
@@ -21481,16 +21532,16 @@
21481
21532
  }, r.load(e);
21482
21533
  for (var s, o = [], a = 0; a < i.length; a++) {
21483
21534
  var l = i[a];
21484
- r.remove(l), s = ru(l, s), o.push(s);
21535
+ r.remove(l), s = au(l, s), o.push(s);
21485
21536
  }
21486
- var h = new mc(16);
21487
- for (a = 0; a < o.length; a++) h.insert(iu(o[a]));
21537
+ var h = new _c(16);
21538
+ for (a = 0; a < o.length; a++) h.insert(ou(o[a]));
21488
21539
  for (var c = t * t, u = n * n; o.length; ) {
21489
- var f = o.shift(), d = f.p, p = f.next.p, g = su(d, p);
21540
+ var f = o.shift(), d = f.p, p = f.next.p, g = lu(d, p);
21490
21541
  if (!(g < u)) {
21491
21542
  var m = g / c;
21492
- (l = Jc(r, f.prev.p, d, p, f.next.next.p, m, h)) && Math.min(su(l, d), su(l, p)) <= m && (o.push(f),
21493
- o.push(ru(l, f)), r.remove(l), h.remove(f), h.insert(iu(f)), h.insert(iu(f.next)));
21543
+ (l = eu(r, f.prev.p, d, p, f.next.next.p, m, h)) && Math.min(lu(l, d), lu(l, p)) <= m && (o.push(f),
21544
+ o.push(au(l, f)), r.remove(l), h.remove(f), h.insert(ou(f)), h.insert(ou(f.next)));
21494
21545
  }
21495
21546
  }
21496
21547
  f = s;
@@ -21500,58 +21551,58 @@
21500
21551
  } while (f !== s);
21501
21552
  return y.push(f.p), y;
21502
21553
  }
21503
- function Jc(e, t, n, i, r, s, o) {
21504
- for (var a = new kc([], Kc), l = e.data; l; ) {
21554
+ function eu(e, t, n, i, r, s, o) {
21555
+ for (var a = new Rc([], tu), l = e.data; l; ) {
21505
21556
  for (var h = 0; h < l.children.length; h++) {
21506
- var c = l.children[h], u = l.leaf ? ou(c, n, i) : Qc(n, i, c);
21557
+ var c = l.children[h], u = l.leaf ? hu(c, n, i) : nu(n, i, c);
21507
21558
  u > s || a.push({
21508
21559
  node: c,
21509
21560
  dist: u
21510
21561
  });
21511
21562
  }
21512
21563
  for (;a.length && !a.peek().node.children; ) {
21513
- var f = a.pop(), d = f.node, p = ou(d, t, n), g = ou(d, i, r);
21514
- if (f.dist < p && f.dist < g && tu(n, d, o) && tu(i, d, o)) return d;
21564
+ var f = a.pop(), d = f.node, p = hu(d, t, n), g = hu(d, i, r);
21565
+ if (f.dist < p && f.dist < g && ru(n, d, o) && ru(i, d, o)) return d;
21515
21566
  }
21516
21567
  (l = a.pop()) && (l = l.node);
21517
21568
  }
21518
21569
  return null;
21519
21570
  }
21520
- function Kc(e, t) {
21571
+ function tu(e, t) {
21521
21572
  return e.dist - t.dist;
21522
21573
  }
21523
- function Qc(e, t, n) {
21524
- if (eu(e, n) || eu(t, n)) return 0;
21525
- var i = au(e[0], e[1], t[0], t[1], n.minX, n.minY, n.maxX, n.minY);
21574
+ function nu(e, t, n) {
21575
+ if (iu(e, n) || iu(t, n)) return 0;
21576
+ var i = cu(e[0], e[1], t[0], t[1], n.minX, n.minY, n.maxX, n.minY);
21526
21577
  if (0 === i) return 0;
21527
- var r = au(e[0], e[1], t[0], t[1], n.minX, n.minY, n.minX, n.maxY);
21578
+ var r = cu(e[0], e[1], t[0], t[1], n.minX, n.minY, n.minX, n.maxY);
21528
21579
  if (0 === r) return 0;
21529
- var s = au(e[0], e[1], t[0], t[1], n.maxX, n.minY, n.maxX, n.maxY);
21580
+ var s = cu(e[0], e[1], t[0], t[1], n.maxX, n.minY, n.maxX, n.maxY);
21530
21581
  if (0 === s) return 0;
21531
- var o = au(e[0], e[1], t[0], t[1], n.minX, n.maxY, n.maxX, n.maxY);
21582
+ var o = cu(e[0], e[1], t[0], t[1], n.minX, n.maxY, n.maxX, n.maxY);
21532
21583
  return 0 === o ? 0 : Math.min(i, r, s, o);
21533
21584
  }
21534
- function eu(e, t) {
21585
+ function iu(e, t) {
21535
21586
  return e[0] >= t.minX && e[0] <= t.maxX && e[1] >= t.minY && e[1] <= t.maxY;
21536
21587
  }
21537
- function tu(e, t, n) {
21588
+ function ru(e, t, n) {
21538
21589
  for (var i, r, s, o, a = Math.min(e[0], t[0]), l = Math.min(e[1], t[1]), h = Math.max(e[0], t[0]), c = Math.max(e[1], t[1]), u = n.search({
21539
21590
  minX: a,
21540
21591
  minY: l,
21541
21592
  maxX: h,
21542
21593
  maxY: c
21543
- }), f = 0; f < u.length; f++) if (i = u[f].p, r = u[f].next.p, s = e, i !== (o = t) && r !== s && nu(i, r, s) > 0 != nu(i, r, o) > 0 && nu(s, o, i) > 0 != nu(s, o, r) > 0) return !1;
21594
+ }), f = 0; f < u.length; f++) if (i = u[f].p, r = u[f].next.p, s = e, i !== (o = t) && r !== s && su(i, r, s) > 0 != su(i, r, o) > 0 && su(s, o, i) > 0 != su(s, o, r) > 0) return !1;
21544
21595
  return !0;
21545
21596
  }
21546
- function nu(e, t, n) {
21547
- return qc(e[0], e[1], t[0], t[1], n[0], n[1]);
21597
+ function su(e, t, n) {
21598
+ return Kc(e[0], e[1], t[0], t[1], n[0], n[1]);
21548
21599
  }
21549
- function iu(e) {
21600
+ function ou(e) {
21550
21601
  var t = e.p, n = e.next.p;
21551
21602
  return e.minX = Math.min(t[0], n[0]), e.minY = Math.min(t[1], n[1]), e.maxX = Math.max(t[0], n[0]),
21552
21603
  e.maxY = Math.max(t[1], n[1]), e;
21553
21604
  }
21554
- function ru(e, t) {
21605
+ function au(e, t) {
21555
21606
  var n = {
21556
21607
  p: e,
21557
21608
  prev: null,
@@ -21564,11 +21615,11 @@
21564
21615
  return t ? (n.next = t.next, n.prev = t, t.next.prev = n, t.next = n) : (n.prev = n,
21565
21616
  n.next = n), n;
21566
21617
  }
21567
- function su(e, t) {
21618
+ function lu(e, t) {
21568
21619
  var n = e[0] - t[0], i = e[1] - t[1];
21569
21620
  return n * n + i * i;
21570
21621
  }
21571
- function ou(e, t, n) {
21622
+ function hu(e, t, n) {
21572
21623
  var i = t[0], r = t[1], s = n[0] - i, o = n[1] - r;
21573
21624
  if (0 !== s || 0 !== o) {
21574
21625
  var a = ((e[0] - i) * s + (e[1] - r) * o) / (s * s + o * o);
@@ -21576,25 +21627,25 @@
21576
21627
  }
21577
21628
  return (s = e[0] - i) * s + (o = e[1] - r) * o;
21578
21629
  }
21579
- function au(e, t, n, i, r, s, o, a) {
21580
- var l, h, c, u, f = n - e, d = i - t, p = o - r, g = a - s, m = e - r, y = t - s, x = f * f + d * d, _ = f * p + d * g, v = p * p + g * g, b = f * m + d * y, A = p * m + g * y, T = x * v - _ * _, w = T, M = T;
21581
- 0 === T ? (h = 0, w = 1, u = A, M = v) : (u = x * A - _ * b, (h = _ * A - v * b) < 0 ? (h = 0,
21582
- u = A, M = v) : h > w && (h = w, u = A + _, M = v)), u < 0 ? (u = 0, -b < 0 ? h = 0 : -b > x ? h = w : (h = -b,
21583
- w = x)) : u > M && (u = M, -b + _ < 0 ? h = 0 : -b + _ > x ? h = w : (h = -b + _,
21630
+ function cu(e, t, n, i, r, s, o, a) {
21631
+ var l, h, c, u, f = n - e, d = i - t, p = o - r, g = a - s, m = e - r, y = t - s, x = f * f + d * d, _ = f * p + d * g, v = p * p + g * g, b = f * m + d * y, A = p * m + g * y, T = x * v - _ * _, w = T, S = T;
21632
+ 0 === T ? (h = 0, w = 1, u = A, S = v) : (u = x * A - _ * b, (h = _ * A - v * b) < 0 ? (h = 0,
21633
+ u = A, S = v) : h > w && (h = w, u = A + _, S = v)), u < 0 ? (u = 0, -b < 0 ? h = 0 : -b > x ? h = w : (h = -b,
21634
+ w = x)) : u > S && (u = S, -b + _ < 0 ? h = 0 : -b + _ > x ? h = w : (h = -b + _,
21584
21635
  w = x));
21585
- var S = (1 - (c = 0 === u ? 0 : u / M)) * r + c * o - ((1 - (l = 0 === h ? 0 : h / w)) * e + l * n), P = (1 - c) * s + c * a - ((1 - l) * t + l * i);
21586
- return S * S + P * P;
21636
+ var M = (1 - (c = 0 === u ? 0 : u / S)) * r + c * o - ((1 - (l = 0 === h ? 0 : h / w)) * e + l * n), P = (1 - c) * s + c * a - ((1 - l) * t + l * i);
21637
+ return M * M + P * P;
21587
21638
  }
21588
- function lu(e, t) {
21639
+ function uu(e, t) {
21589
21640
  return e[0] === t[0] ? e[1] - t[1] : e[0] - t[0];
21590
21641
  }
21591
- const {PackUtil: hu} = h();
21592
- class cu {
21642
+ const {PackUtil: fu} = h();
21643
+ class du {
21593
21644
  constructor(e, t) {
21594
21645
  this.x = e, this.y = t;
21595
21646
  }
21596
21647
  clone() {
21597
- return new cu(this.x, this.y);
21648
+ return new du(this.x, this.y);
21598
21649
  }
21599
21650
  normalize() {
21600
21651
  const e = this.length();
@@ -21607,7 +21658,7 @@
21607
21658
  return Math.sqrt(this.x * this.x + this.y * this.y);
21608
21659
  }
21609
21660
  diff(e) {
21610
- return new cu(this.x - e.x, this.y - e.y);
21661
+ return new du(this.x - e.x, this.y - e.y);
21611
21662
  }
21612
21663
  distance(e) {
21613
21664
  const t = this.x - e.x, n = this.y - e.y;
@@ -21620,48 +21671,48 @@
21620
21671
  return this.x === e.x && this.y === e.y;
21621
21672
  }
21622
21673
  orthogonal() {
21623
- return new cu(this.y, -this.x);
21674
+ return new du(this.y, -this.x);
21624
21675
  }
21625
21676
  }
21626
- function uu(e, t, n, i) {
21677
+ function pu(e, t, n, i) {
21627
21678
  const r = t.x * i.y - t.y * i.x, s = n.x - e.x, o = n.y - e.y, a = (s * i.y - o * i.x) / r;
21628
- return new cu(e.x + a * t.x, e.y + a * t.y);
21679
+ return new du(e.x + a * t.x, e.y + a * t.y);
21629
21680
  }
21630
- const fu = [], du = [];
21631
- function pu(e) {
21681
+ const gu = [], mu = [];
21682
+ function yu(e) {
21632
21683
  if (Ee(e[0] && e[0].x)) {
21633
21684
  const t = [];
21634
21685
  let n = 0;
21635
- for (let i = 0; i < e.length; i++) du[n] ? (du[n][0] = e[i].x, du[n][1] = e[i].y) : du[n] = [ e[i].x, e[i].y ],
21636
- t.push(du[n]), n++;
21686
+ for (let i = 0; i < e.length; i++) mu[n] ? (mu[n][0] = e[i].x, mu[n][1] = e[i].y) : mu[n] = [ e[i].x, e[i].y ],
21687
+ t.push(mu[n]), n++;
21637
21688
  e = t;
21638
21689
  }
21639
21690
  try {
21640
- const t = $c(e, 1 / 0);
21691
+ const t = Qc(e, 1 / 0);
21641
21692
  let n = [ 1 / 0, 1 / 0 ], i = [ -1 / 0, -1 / 0 ];
21642
21693
  for (let e = 0; e < t.length; e++) t[e][0] < n[0] && (n[0] = t[e][0]), t[e][0] > i[0] && (i[0] = t[e][0]),
21643
21694
  t[e][1] < n[1] && (n[1] = t[e][1]), t[e][1] > i[1] && (i[1] = t[e][1]);
21644
21695
  const r = [];
21645
21696
  let s = [], o = 0;
21646
- for (let e = 0; e < t.length; e++) e === t.length - 1 && t[e][0] === t[0][0] && t[e][1] === t[0][1] || (Xl(r, t[e]),
21647
- fu[o] ? (fu[o].x = r[0], fu[o].y = r[1]) : fu[o] = new cu(r[0], r[1]), s.push(fu[o]),
21697
+ for (let e = 0; e < t.length; e++) e === t.length - 1 && t[e][0] === t[0][0] && t[e][1] === t[0][1] || (ql(r, t[e]),
21698
+ gu[o] ? (gu[o].x = r[0], gu[o].y = r[1]) : gu[o] = new du(r[0], r[1]), s.push(gu[o]),
21648
21699
  o++);
21649
- hu.calculateSignedArea(s) < 0 && (s = s.reverse());
21700
+ fu.calculateSignedArea(s) < 0 && (s = s.reverse());
21650
21701
  const a = function(e) {
21651
21702
  let t, n = Number.MAX_VALUE;
21652
21703
  const i = function(e, i, r, s, o, a, l, h) {
21653
- var c = uu(e, i, o, a), u = uu(r, s, o, a), f = uu(l, h, e, i), d = uu(l, h, r, s), p = c.distance(u) * c.distance(f);
21704
+ var c = pu(e, i, o, a), u = pu(r, s, o, a), f = pu(l, h, e, i), d = pu(l, h, r, s), p = c.distance(u) * c.distance(f);
21654
21705
  0 !== p && p < n && (t = [ c, f, d, u ], n = p);
21655
21706
  };
21656
21707
  var r = [];
21657
21708
  for (let t = 0; t < e.length; t++) r.push(e[(t + 1) % e.length].diff(e[t])), r[t].normalize();
21658
- var s, o, a, l, h = new cu(Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY), c = new cu(Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY);
21709
+ var s, o, a, l, h = new du(Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY), c = new du(Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY);
21659
21710
  for (let t = 0; t < e.length; t++) {
21660
21711
  var u = e[t];
21661
21712
  u.x < h.x && (h.x = u.x, s = t), u.x > c.x && (c.x = u.x, o = t), u.y < h.y && (h.y = u.y,
21662
21713
  l = t), u.y > c.y && (c.y = u.y, a = t);
21663
21714
  }
21664
- var f = new cu(0, -1), d = new cu(0, 1), p = new cu(-1, 0), g = new cu(1, 0);
21715
+ var f = new du(0, -1), d = new du(0, 1), p = new du(-1, 0), g = new du(1, 0);
21665
21716
  for (let t = 0; t < e.length; t++) {
21666
21717
  var m = [ Math.acos(f.dot(r[s])), Math.acos(d.dot(r[o])), Math.acos(p.dot(r[a])), Math.acos(g.dot(r[l])) ];
21667
21718
  switch (m.indexOf(Math.min.apply(Math, m))) {
@@ -21695,10 +21746,10 @@
21695
21746
  return null;
21696
21747
  }
21697
21748
  }
21698
- const {DEFAULT_TEX_WIDTH: gu} = h();
21699
- class mu extends ln {
21749
+ const {DEFAULT_TEX_WIDTH: xu} = h();
21750
+ class _u extends ln {
21700
21751
  static fromJSON(e) {
21701
- return Ml(e, "ExtrudePolygonLayer", mu);
21752
+ return Il(e, "ExtrudePolygonLayer", _u);
21702
21753
  }
21703
21754
  getPolygonOffsetCount() {
21704
21755
  return 0;
@@ -21730,11 +21781,11 @@
21730
21781
  return n && n.updateDataConfig(e, t), this;
21731
21782
  }
21732
21783
  }
21733
- mu.registerJSONType("ExtrudePolygonLayer"), mu.mergeOptions({
21784
+ _u.registerJSONType("ExtrudePolygonLayer"), _u.mergeOptions({
21734
21785
  cullFace: !1,
21735
21786
  castShadow: !0
21736
21787
  });
21737
- const yu = {
21788
+ const vu = {
21738
21789
  polygonFill: {
21739
21790
  type: "identity",
21740
21791
  default: [ 1, 1, 1, 1 ],
@@ -21755,10 +21806,10 @@
21755
21806
  default: [ 1, 1, 1, 1 ],
21756
21807
  property: "_symbol_bottomPolygonFill"
21757
21808
  }
21758
- }, xu = {
21809
+ }, bu = {
21759
21810
  defaultAltitude: 20
21760
- }, _u = e => 1 === e.properties.top;
21761
- mu.registerRenderer("gl", class extends Rl {
21811
+ }, Au = e => 1 === e.properties.top;
21812
+ _u.registerRenderer("gl", class extends Ll {
21762
21813
  constructor(...e) {
21763
21814
  super(...e), this.GeometryTypes = [ r.Polygon, r.MultiPolygon ];
21764
21815
  }
@@ -21795,8 +21846,8 @@
21795
21846
  }
21796
21847
  createPainter() {
21797
21848
  const e = ln.get3DPainterClass("lit");
21798
- this.painterSymbol = Fe({}, yu), this.sidePainterSymbol = Fe({}, yu), this._defineSymbolBloom(this.painterSymbol, e.getBloomSymbol());
21799
- const t = this.layer, n = Fe({}, xu, t.options.dataConfig || {});
21849
+ this.painterSymbol = Fe({}, vu), this.sidePainterSymbol = Fe({}, vu), this._defineSymbolBloom(this.painterSymbol, e.getBloomSymbol());
21850
+ const t = this.layer, n = Fe({}, bu, t.options.dataConfig || {});
21800
21851
  t.options.material && (this.painterSymbol.material = t.options.material), t.options.sideMaterial ? this.sidePainterSymbol.material = t.options.sideMaterial : this.sidePainterSymbol.material = t.options.material;
21801
21852
  const i = {
21802
21853
  cullFace: t.options.cullFace
@@ -21821,9 +21872,9 @@
21821
21872
  }
21822
21873
  _renderMeshes(...e) {
21823
21874
  const t = e[0], n = t.sceneFilter;
21824
- t.sceneFilter = e => (!n || n(e)) && _u(e);
21875
+ t.sceneFilter = e => (!n || n(e)) && Au(e);
21825
21876
  const i = super._renderMeshes(...e);
21826
- t.sceneFilter = e => (!n || n(e)) && _u(e);
21877
+ t.sceneFilter = e => (!n || n(e)) && Au(e);
21827
21878
  const r = this.painter;
21828
21879
  this.painter = this.sidePainter;
21829
21880
  const s = t.sceneFilter = e => (!n || n(e)) && (e => 1 === e.properties.side)(e);
@@ -21848,12 +21899,12 @@
21848
21899
  }
21849
21900
  _createPackData(e, t, n, i) {
21850
21901
  const s = this.getMap();
21851
- t = yu;
21852
- const o = this._extrudeCenter, a = 1 / 0, l = s.getZoom(), h = new r.Point(0, 0), c = new r.Coordinate(0, 0), u = Fe({}, xu, this.layer.options.dataConfig);
21902
+ t = vu;
21903
+ const o = this._extrudeCenter, a = 1 / 0, l = s.getZoom(), h = new r.Point(0, 0), c = new r.Coordinate(0, 0), u = Fe({}, bu, this.layer.options.dataConfig);
21853
21904
  if (u.uv = !0, u.top && (u.top = n), u.side && (u.side = i), !1 === u.top && !1 === u.side) return null;
21854
21905
  if (!e.length) return null;
21855
- const f = s.getGLRes(), d = s.getProjection().code, p = n ? this.painterSymbol && this.painterSymbol.material : this.sidePainterSymbol && this.sidePainterSymbol.material, g = p && p.textureWidth || gu, m = [ Ft(s, 1, c, f) / 100, Ft(s, 1, c, f, 1) / 100 ];
21856
- return hc(e, u, a, h, g, s.getGLRes(), 1, 1, m, this._zScale, t, l, d, undefined, Float32Array, o);
21906
+ const f = s.getGLRes(), d = s.getProjection().code, p = n ? this.painterSymbol && this.painterSymbol.material : this.sidePainterSymbol && this.sidePainterSymbol.material, g = p && p.textureWidth || xu, m = [ Ft(s, 1, c, f) / 100, Ft(s, 1, c, f, 1) / 100 ];
21907
+ return fc(e, u, a, h, g, s.getGLRes(), 1, 1, m, this._zScale, t, l, d, undefined, Float32Array, o);
21857
21908
  }
21858
21909
  updateMesh(e) {
21859
21910
  const t = e[ir];
@@ -21872,11 +21923,11 @@
21872
21923
  const n = [];
21873
21924
  for (let e = 0; e < t.length; e++) {
21874
21925
  const i = t[e] && t[e][0];
21875
- n[e] = pu(i);
21926
+ n[e] = yu(i);
21876
21927
  }
21877
21928
  e.getProperties()[lt] = n;
21878
21929
  } else {
21879
- const n = pu(t[0]);
21930
+ const n = yu(t[0]);
21880
21931
  e.getProperties()[lt] = n;
21881
21932
  }
21882
21933
  }
@@ -21895,11 +21946,11 @@
21895
21946
  getShadowMeshes() {
21896
21947
  return this.painter ? this.painter.getShadowMeshes() : [];
21897
21948
  }
21898
- }), mu.registerRenderer("canvas", null);
21899
- const {PackUtil: vu, FilterUtil: bu, SYMBOLS_NEED_REBUILD_IN_VT: Au, SYMBOLS_NEED_REBUILD_IN_VECTOR: Tu} = h();
21949
+ }), _u.registerRenderer("canvas", null);
21950
+ const {PackUtil: Tu, FilterUtil: wu, SYMBOLS_NEED_REBUILD_IN_VT: Su, SYMBOLS_NEED_REBUILD_IN_VECTOR: Mu} = h();
21900
21951
  n.reshader.ShaderLib.register("vt_position_vert", "#ifdef HAS_TERRAIN_ALTITUDE\n attribute float aTerrainAltitude;\n#endif\nuniform float minAltitude;\n#ifdef HAS_ALTITUDE\n vec3 unpackVTPosition() {\n float altitude = aAltitude;\n #ifdef HAS_TERRAIN_ALTITUDE\n altitude += aTerrainAltitude * 100.0;\n #endif\n altitude += minAltitude * 100.0;\n return vec3(aPosition, altitude);\n }\n#else\n float position_modValue = 16384.0;\n float position_delta = 0.00001;\n vec3 unpackVTPosition() {\n float z = aPosition.z;\n vec2 pos = sign(aPosition.xy + position_delta) * mod(abs(aPosition.xy), position_modValue);\n vec2 highs = floor(abs(aPosition.xy) / position_modValue);\n float altitude = sign(z + position_delta) * (highs.x * 2.0 + highs.y) * pow(2.0, 15.0) + z;\n #ifdef HAS_TERRAIN_ALTITUDE\n altitude += aTerrainAltitude * 100.0;\n #endif\n altitude += minAltitude * 100.0;\n return vec3(pos, altitude);\n }\n#endif");
21901
21952
  s.mat4.create();
21902
- const wu = function(e, t) {
21953
+ const Pu = function(e, t) {
21903
21954
  const n = e.toString(), i = n.indexOf("{") + 1, r = n.substring(0, i);
21904
21955
  let s = `${r}\n (` + t.toString() + ")({});\n";
21905
21956
  return s += "\n" + n.substring(r.length), s;
@@ -21907,21 +21958,21 @@
21907
21958
  if (s.transcoders) {
21908
21959
  const e = r.Map.VERSION;
21909
21960
  if (e.indexOf("1.0.0-beta") >= 0 || e.indexOf("1.0.0-alpha") >= 0) {
21910
- const e = s.transcoders.inject(wu);
21961
+ const e = s.transcoders.inject(Pu);
21911
21962
  r.registerWorkerAdapter("@maptalks/vt", e);
21912
21963
  } else r.registerWorkerAdapter("@maptalks/vt", (function() {
21913
- return s.transcoders.inject(wu);
21964
+ return s.transcoders.inject(Pu);
21914
21965
  }));
21915
- } else r.registerWorkerAdapter("@maptalks/vt", wu);
21916
- e.ExtrudePolygonLayer = mu, e.FillPainter = Xi, e.FillPlugin = Ha, e.FilterUtil = bu,
21917
- e.GLTFPhongPlugin = Ya, e.GLTFStandardPlugin = Za, e.GeoJSONVectorTileLayer = Qa,
21918
- e.HeatmapPlugin = qa, e.IconPainter = js, e.IconPlugin = Va, e.LineGradientPlugin = za,
21919
- e.LinePainter = $i, e.LinePlugin = Na, e.LineStringLayer = Il, e.LitPlugin = Wa,
21920
- e.MapboxVectorTileLayer = Ja, e.NativeLinePainter = jo, e.NativeLinePlugin = Ba,
21921
- e.NativePointPainter = Uo, e.PackUtil = vu, e.PhongPainter = ra, e.PhongPlugin = Ga,
21922
- e.PointLayer = Sl, e.PolygonLayer = Ol, e.SYMBOLS_NEED_REBUILD_IN_VECTOR = Tu, e.SYMBOLS_NEED_REBUILD_IN_VT = Au,
21923
- e.TextPainter = Lo, e.TextPlugin = Ua, e.TubePlugin = Xa, e.Vector3DLayer = ln,
21924
- e.VectorTileLayer = en, e.VectorTileLayerRenderer = Ut, e.WaterPlugin = $a, e.WireframePainter = oa,
21925
- e.WireframePlugin = ja, "undefined" != typeof console && console.log("@maptalks/vt v0.105.2");
21966
+ } else r.registerWorkerAdapter("@maptalks/vt", Pu);
21967
+ e.ExtrudePolygonLayer = _u, e.FillPainter = Xi, e.FillPlugin = Va, e.FilterUtil = wu,
21968
+ e.GLTFPhongPlugin = $a, e.GLTFStandardPlugin = Ja, e.GeoJSONVectorTileLayer = nl,
21969
+ e.HeatmapPlugin = Ka, e.IconPainter = js, e.IconPlugin = Ga, e.LineGradientPlugin = Ba,
21970
+ e.LinePainter = $i, e.LinePlugin = Ua, e.LineStringLayer = Ol, e.LitPlugin = Za,
21971
+ e.MapboxVectorTileLayer = el, e.NativeLinePainter = jo, e.NativeLinePlugin = Wa,
21972
+ e.NativePointPainter = Uo, e.PackUtil = Tu, e.PhongPainter = ra, e.PhongPlugin = Xa,
21973
+ e.PointLayer = Cl, e.PolygonLayer = El, e.SYMBOLS_NEED_REBUILD_IN_VECTOR = Mu, e.SYMBOLS_NEED_REBUILD_IN_VT = Su,
21974
+ e.TextPainter = Lo, e.TextPlugin = ja, e.TubePlugin = qa, e.Vector3DLayer = ln,
21975
+ e.VectorTileLayer = en, e.VectorTileLayerRenderer = Ut, e.WaterPlugin = Qa, e.WireframePainter = oa,
21976
+ e.WireframePlugin = Ya, "undefined" != typeof console && console.log("@maptalks/vt v0.106.0");
21926
21977
  }));
21927
21978
  //# sourceMappingURL=maptalks.vt.js.map