@ogis/waymark-js 3.0.0-alpha → 3.0.2
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.
- package/dist/waymark-js.js +460 -444
- package/dist/waymark-js.umd.cjs +6 -6
- package/package.json +3 -1
package/dist/waymark-js.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
function
|
|
1
|
+
function Fd(me = {}) {
|
|
2
2
|
if (!me || !me.geometry)
|
|
3
3
|
return null;
|
|
4
4
|
switch (me.geometry.type) {
|
|
5
5
|
case "Point":
|
|
6
|
+
case "MultiPoint":
|
|
6
7
|
return "marker";
|
|
7
8
|
case "LineString":
|
|
8
9
|
case "MultiLineString":
|
|
@@ -11,10 +12,10 @@ function Rd(me = {}) {
|
|
|
11
12
|
case "MultiPolygon":
|
|
12
13
|
return "shape";
|
|
13
14
|
default:
|
|
14
|
-
return
|
|
15
|
+
return null;
|
|
15
16
|
}
|
|
16
17
|
}
|
|
17
|
-
const
|
|
18
|
+
const Bd = "0123456789ABCDEFGHJKMNPQRSTVWXYZ", kc = 32, Nf = 16, Od = 10, Ld = 281474976710655;
|
|
18
19
|
var ta;
|
|
19
20
|
(function(me) {
|
|
20
21
|
me.Base32IncorrectEncoding = "B32_ENC_INVALID", me.DecodeTimeInvalidCharacter = "DEC_TIME_CHAR", me.DecodeTimeValueMalformed = "DEC_TIME_MALFORMED", me.EncodeTimeNegative = "ENC_TIME_NEG", me.EncodeTimeSizeExceeded = "ENC_TIME_SIZE_EXCEED", me.EncodeTimeValueMalformed = "ENC_TIME_MALFORMED", me.PRNGDetectFailure = "PRNG_DETECT", me.ULIDInvalid = "ULID_INVALID", me.Unexpected = "UNEXPECTED", me.UUIDInvalid = "UUID_INVALID";
|
|
@@ -26,7 +27,7 @@ class xl extends Error {
|
|
|
26
27
|
}
|
|
27
28
|
function Vf(me) {
|
|
28
29
|
const j = Math.floor(me() * kc) % kc;
|
|
29
|
-
return
|
|
30
|
+
return Bd.charAt(j);
|
|
30
31
|
}
|
|
31
32
|
function Uf(me) {
|
|
32
33
|
const j = $f(), J = j && (j.crypto || j.msCrypto) || null;
|
|
@@ -48,33 +49,35 @@ function Zf(me, j) {
|
|
|
48
49
|
J = Vf(j) + J;
|
|
49
50
|
return J;
|
|
50
51
|
}
|
|
51
|
-
function Gf(me, j =
|
|
52
|
+
function Gf(me, j = Od) {
|
|
52
53
|
if (isNaN(me))
|
|
53
54
|
throw new xl(ta.EncodeTimeValueMalformed, `Time must be a number: ${me}`);
|
|
54
|
-
if (me >
|
|
55
|
-
throw new xl(ta.EncodeTimeSizeExceeded, `Cannot encode a time larger than ${
|
|
55
|
+
if (me > Ld)
|
|
56
|
+
throw new xl(ta.EncodeTimeSizeExceeded, `Cannot encode a time larger than ${Ld}: ${me}`);
|
|
56
57
|
if (me < 0)
|
|
57
58
|
throw new xl(ta.EncodeTimeNegative, `Time must be positive: ${me}`);
|
|
58
59
|
if (Number.isInteger(me) === !1)
|
|
59
60
|
throw new xl(ta.EncodeTimeValueMalformed, `Time must be an integer: ${me}`);
|
|
60
61
|
let J, de = "";
|
|
61
|
-
for (let
|
|
62
|
-
J = me % kc, de =
|
|
62
|
+
for (let je = j; je > 0; je--)
|
|
63
|
+
J = me % kc, de = Bd.charAt(J) + de, me = (me - J) / kc;
|
|
63
64
|
return de;
|
|
64
65
|
}
|
|
65
66
|
function qf() {
|
|
66
67
|
return typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope;
|
|
67
68
|
}
|
|
68
|
-
function
|
|
69
|
+
function Yh(me, j) {
|
|
69
70
|
const J = Uf(), de = Date.now();
|
|
70
|
-
return Gf(de,
|
|
71
|
+
return Gf(de, Od) + Zf(Nf, J);
|
|
71
72
|
}
|
|
72
73
|
const Wf = {
|
|
73
74
|
// center: [0, 0],
|
|
74
75
|
// zoom: 0,
|
|
75
76
|
maxZoom: 18,
|
|
76
77
|
style: "https://tiles.openfreemap.org/styles/bright",
|
|
77
|
-
attributionControl:
|
|
78
|
+
attributionControl: {
|
|
79
|
+
compact: !0
|
|
80
|
+
}
|
|
78
81
|
}, ia = {
|
|
79
82
|
padding: { top: 50, bottom: 50, left: 50, right: 50 },
|
|
80
83
|
duration: 500
|
|
@@ -88,20 +91,20 @@ var zc = { exports: {} };
|
|
|
88
91
|
* MapLibre GL JS
|
|
89
92
|
* @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v5.7.1/LICENSE.txt
|
|
90
93
|
*/
|
|
91
|
-
var Xf = zc.exports,
|
|
94
|
+
var Xf = zc.exports, Dd;
|
|
92
95
|
function Yf() {
|
|
93
|
-
return
|
|
96
|
+
return Dd || (Dd = 1, function(me, j) {
|
|
94
97
|
(function(J, de) {
|
|
95
98
|
me.exports = de();
|
|
96
99
|
})(Xf, function() {
|
|
97
100
|
var J = {}, de = {};
|
|
98
|
-
function
|
|
101
|
+
function je(C, c, be) {
|
|
99
102
|
if (de[C] = be, C === "index") {
|
|
100
103
|
var ct = "var sharedModule = {}; (" + de.shared + ")(sharedModule); (" + de.worker + ")(sharedModule);", ut = {};
|
|
101
104
|
return de.shared(ut), de.index(J, ut), typeof window < "u" && J.setWorkerUrl(window.URL.createObjectURL(new Blob([ct], { type: "text/javascript" }))), J;
|
|
102
105
|
}
|
|
103
106
|
}
|
|
104
|
-
|
|
107
|
+
je("shared", ["exports"], function(C) {
|
|
105
108
|
function c(r, t, i, s) {
|
|
106
109
|
return new (i || (i = Promise))(function(o, d) {
|
|
107
110
|
function p(x) {
|
|
@@ -1010,7 +1013,7 @@ function Yf() {
|
|
|
1010
1013
|
}
|
|
1011
1014
|
return !1;
|
|
1012
1015
|
}
|
|
1013
|
-
function
|
|
1016
|
+
function $e(r) {
|
|
1014
1017
|
if (r === null) return Zn;
|
|
1015
1018
|
if (typeof r == "string") return et;
|
|
1016
1019
|
if (typeof r == "boolean") return Je;
|
|
@@ -1028,7 +1031,7 @@ function Yf() {
|
|
|
1028
1031
|
const t = r.length;
|
|
1029
1032
|
let i;
|
|
1030
1033
|
for (const s of r) {
|
|
1031
|
-
const o =
|
|
1034
|
+
const o = $e(s);
|
|
1032
1035
|
if (i) {
|
|
1033
1036
|
if (i === o) continue;
|
|
1034
1037
|
i = Ye;
|
|
@@ -1052,7 +1055,7 @@ function Yf() {
|
|
|
1052
1055
|
if (t.length !== 2) return i.error(`'literal' expression requires exactly one argument, but found ${t.length - 1} instead.`);
|
|
1053
1056
|
if (!yn(t[1])) return i.error("invalid value");
|
|
1054
1057
|
const s = t[1];
|
|
1055
|
-
let o =
|
|
1058
|
+
let o = $e(s);
|
|
1056
1059
|
const d = i.expectedType;
|
|
1057
1060
|
return o.kind !== "array" || o.N !== 0 || !d || d.kind !== "array" || typeof d.N == "number" && d.N !== 0 || (o = d), new Mr(o, s);
|
|
1058
1061
|
}
|
|
@@ -1101,8 +1104,8 @@ function Yf() {
|
|
|
1101
1104
|
evaluate(t) {
|
|
1102
1105
|
for (let i = 0; i < this.args.length; i++) {
|
|
1103
1106
|
const s = this.args[i].evaluate(t);
|
|
1104
|
-
if (!bs(this.type,
|
|
1105
|
-
if (i === this.args.length - 1) throw new bt(`Expected value to be of type ${vt(this.type)}, but found ${vt(
|
|
1107
|
+
if (!bs(this.type, $e(s))) return s;
|
|
1108
|
+
if (i === this.args.length - 1) throw new bt(`Expected value to be of type ${vt(this.type)}, but found ${vt($e(s))} instead.`);
|
|
1106
1109
|
}
|
|
1107
1110
|
throw new Error();
|
|
1108
1111
|
}
|
|
@@ -1368,8 +1371,8 @@ function Yf() {
|
|
|
1368
1371
|
evaluate(t) {
|
|
1369
1372
|
const i = this.needle.evaluate(t), s = this.haystack.evaluate(t);
|
|
1370
1373
|
if (!s) return !1;
|
|
1371
|
-
if (!Wr(i, ["boolean", "string", "number", "null"])) throw new bt(`Expected first argument to be of type boolean, string, number or null, but found ${vt(
|
|
1372
|
-
if (!Wr(s, ["string", "array"])) throw new bt(`Expected second argument to be of type array or string, but found ${vt(
|
|
1374
|
+
if (!Wr(i, ["boolean", "string", "number", "null"])) throw new bt(`Expected first argument to be of type boolean, string, number or null, but found ${vt($e(i))} instead.`);
|
|
1375
|
+
if (!Wr(s, ["string", "array"])) throw new bt(`Expected second argument to be of type array or string, but found ${vt($e(s))} instead.`);
|
|
1373
1376
|
return s.indexOf(i) >= 0;
|
|
1374
1377
|
}
|
|
1375
1378
|
eachChild(t) {
|
|
@@ -1396,14 +1399,14 @@ function Yf() {
|
|
|
1396
1399
|
}
|
|
1397
1400
|
evaluate(t) {
|
|
1398
1401
|
const i = this.needle.evaluate(t), s = this.haystack.evaluate(t);
|
|
1399
|
-
if (!Wr(i, ["boolean", "string", "number", "null"])) throw new bt(`Expected first argument to be of type boolean, string, number or null, but found ${vt(
|
|
1402
|
+
if (!Wr(i, ["boolean", "string", "number", "null"])) throw new bt(`Expected first argument to be of type boolean, string, number or null, but found ${vt($e(i))} instead.`);
|
|
1400
1403
|
let o;
|
|
1401
1404
|
if (this.fromIndex && (o = this.fromIndex.evaluate(t)), Wr(s, ["string"])) {
|
|
1402
1405
|
const d = s.indexOf(i, o);
|
|
1403
1406
|
return d === -1 ? -1 : [...s.slice(0, d)].length;
|
|
1404
1407
|
}
|
|
1405
1408
|
if (Wr(s, ["array"])) return s.indexOf(i, o);
|
|
1406
|
-
throw new bt(`Expected second argument to be of type array or string, but found ${vt(
|
|
1409
|
+
throw new bt(`Expected second argument to be of type array or string, but found ${vt($e(s))} instead.`);
|
|
1407
1410
|
}
|
|
1408
1411
|
eachChild(t) {
|
|
1409
1412
|
t(this.needle), t(this.haystack), this.fromIndex && t(this.fromIndex);
|
|
@@ -1433,8 +1436,8 @@ function Yf() {
|
|
|
1433
1436
|
if (typeof A == "number" && Math.abs(A) > Number.MAX_SAFE_INTEGER) return M.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);
|
|
1434
1437
|
if (typeof A == "number" && Math.floor(A) !== A) return M.error("Numeric branch labels must be integer values.");
|
|
1435
1438
|
if (s) {
|
|
1436
|
-
if (M.checkSubtype(s,
|
|
1437
|
-
} else s =
|
|
1439
|
+
if (M.checkSubtype(s, $e(A))) return null;
|
|
1440
|
+
} else s = $e(A);
|
|
1438
1441
|
if (d[String(A)] !== void 0) return M.error("Branch labels must be unique.");
|
|
1439
1442
|
d[String(A)] = p.length;
|
|
1440
1443
|
}
|
|
@@ -1449,7 +1452,7 @@ function Yf() {
|
|
|
1449
1452
|
}
|
|
1450
1453
|
evaluate(t) {
|
|
1451
1454
|
const i = this.input.evaluate(t);
|
|
1452
|
-
return (
|
|
1455
|
+
return ($e(i) === this.inputType && this.outputs[this.cases[i]] || this.otherwise).evaluate(t);
|
|
1453
1456
|
}
|
|
1454
1457
|
eachChild(t) {
|
|
1455
1458
|
t(this.input), this.outputs.forEach(t), t(this.otherwise);
|
|
@@ -1512,7 +1515,7 @@ function Yf() {
|
|
|
1512
1515
|
let o;
|
|
1513
1516
|
if (this.endIndex && (o = this.endIndex.evaluate(t)), Wr(i, ["string"])) return [...i].slice(s, o).join("");
|
|
1514
1517
|
if (Wr(i, ["array"])) return i.slice(s, o);
|
|
1515
|
-
throw new bt(`Expected first argument to be of type array or string, but found ${vt(
|
|
1518
|
+
throw new bt(`Expected first argument to be of type array or string, but found ${vt($e(i))} instead.`);
|
|
1516
1519
|
}
|
|
1517
1520
|
eachChild(t) {
|
|
1518
1521
|
t(this.input), t(this.beginIndex), this.endIndex && t(this.endIndex);
|
|
@@ -1746,7 +1749,7 @@ function Yf() {
|
|
|
1746
1749
|
}
|
|
1747
1750
|
function _i(r, t, i) {
|
|
1748
1751
|
const s = r !== "==" && r !== "!=";
|
|
1749
|
-
return class
|
|
1752
|
+
return class jd {
|
|
1750
1753
|
constructor(d, p, m) {
|
|
1751
1754
|
this.type = Je, this.lhs = d, this.rhs = p, this.collator = m, this.hasUntypedArgument = d.type.kind === "value" || p.type.kind === "value";
|
|
1752
1755
|
}
|
|
@@ -1766,16 +1769,16 @@ function Yf() {
|
|
|
1766
1769
|
if (g.type.kind !== "string" && x.type.kind !== "string" && g.type.kind !== "value" && x.type.kind !== "value") return p.error("Cannot use collator to compare non-string types.");
|
|
1767
1770
|
if (v = p.parse(d[3], 3, sa), !v) return null;
|
|
1768
1771
|
}
|
|
1769
|
-
return new
|
|
1772
|
+
return new jd(g, x, v);
|
|
1770
1773
|
}
|
|
1771
1774
|
evaluate(d) {
|
|
1772
1775
|
const p = this.lhs.evaluate(d), m = this.rhs.evaluate(d);
|
|
1773
1776
|
if (s && this.hasUntypedArgument) {
|
|
1774
|
-
const g =
|
|
1777
|
+
const g = $e(p), x = $e(m);
|
|
1775
1778
|
if (g.kind !== x.kind || g.kind !== "string" && g.kind !== "number") throw new bt(`Expected arguments for "${r}" to be (string, string) or (number, number), but found (${g.kind}, ${x.kind}) instead.`);
|
|
1776
1779
|
}
|
|
1777
1780
|
if (this.collator && !s && this.hasUntypedArgument) {
|
|
1778
|
-
const g =
|
|
1781
|
+
const g = $e(p), x = $e(m);
|
|
1779
1782
|
if (g.kind !== "string" || x.kind !== "string") return t(d, p, m);
|
|
1780
1783
|
}
|
|
1781
1784
|
return this.collator ? i(d, p, m, this.collator.evaluate(d)) : t(d, p, m);
|
|
@@ -1905,7 +1908,7 @@ function Yf() {
|
|
|
1905
1908
|
evaluate(t) {
|
|
1906
1909
|
return new vi(this.sections.map((i) => {
|
|
1907
1910
|
const s = i.content.evaluate(t);
|
|
1908
|
-
return
|
|
1911
|
+
return $e(s) === Rt ? new ca("", s, null, null, null, i.verticalAlign ? i.verticalAlign.evaluate(t) : null) : new ca(We(s), null, i.scale ? i.scale.evaluate(t) : null, i.font ? i.font.evaluate(t).join(",") : null, i.textColor ? i.textColor.evaluate(t) : null, i.verticalAlign ? i.verticalAlign.evaluate(t) : null);
|
|
1909
1912
|
}));
|
|
1910
1913
|
}
|
|
1911
1914
|
eachChild(t) {
|
|
@@ -1948,7 +1951,7 @@ function Yf() {
|
|
|
1948
1951
|
const i = this.input.evaluate(t);
|
|
1949
1952
|
if (typeof i == "string") return [...i].length;
|
|
1950
1953
|
if (Array.isArray(i)) return i.length;
|
|
1951
|
-
throw new bt(`Expected value to be of type string or array, but found ${vt(
|
|
1954
|
+
throw new bt(`Expected value to be of type string or array, but found ${vt($e(i))} instead.`);
|
|
1952
1955
|
}
|
|
1953
1956
|
eachChild(t) {
|
|
1954
1957
|
t(this.input);
|
|
@@ -2634,7 +2637,7 @@ function Yf() {
|
|
|
2634
2637
|
return r instanceof Number ? "number" : r instanceof String ? "string" : r instanceof Boolean ? "boolean" : Array.isArray(r) ? "array" : r === null ? "null" : typeof r;
|
|
2635
2638
|
}
|
|
2636
2639
|
function Fs(r) {
|
|
2637
|
-
return typeof r == "object" && r !== null && !Array.isArray(r) &&
|
|
2640
|
+
return typeof r == "object" && r !== null && !Array.isArray(r) && $e(r) === Gr;
|
|
2638
2641
|
}
|
|
2639
2642
|
function Jc(r) {
|
|
2640
2643
|
return r;
|
|
@@ -2752,7 +2755,7 @@ function Yf() {
|
|
|
2752
2755
|
}
|
|
2753
2756
|
Zi.register(Qn, { error: [{ kind: "error" }, [et], (r, [t]) => {
|
|
2754
2757
|
throw new bt(t.evaluate(r));
|
|
2755
|
-
}], typeof: [et, [Ye], (r, [t]) => vt(
|
|
2758
|
+
}], typeof: [et, [Ye], (r, [t]) => vt($e(t.evaluate(r)))], "to-rgba": [Ei(ze, 4), [ci], (r, [t]) => {
|
|
2756
2759
|
const [i, s, o, d] = t.evaluate(r).rgb;
|
|
2757
2760
|
return [255 * i, 255 * s, 255 * o, d];
|
|
2758
2761
|
}], rgb: [ci, [ze, ze, ze], jl], rgba: [ci, [ze, ze, ze, ze], jl], has: { type: Je, overloads: [[[et], (r, [t]) => Nl(t.evaluate(r), r.properties())], [[et, Gr], (r, [t, i]) => Nl(t.evaluate(r), i.evaluate(r))]] }, get: { type: Ye, overloads: [[[et], (r, [t]) => ko(t.evaluate(r), r.properties())], [[et, Gr], (r, [t, i]) => ko(t.evaluate(r), i.evaluate(r))]] }, "feature-state": [Ye, [et], (r, [t]) => ko(t.evaluate(r), r.featureState || {})], properties: [Gr, [], (r) => r.properties()], "geometry-type": [et, [], (r) => r.geometryType()], id: [Ye, [], (r) => r.id()], zoom: [ze, [], (r) => r.globals.zoom], "heatmap-density": [ze, [], (r) => r.globals.heatmapDensity || 0], elevation: [ze, [], (r) => r.globals.elevation || 0], "line-progress": [ze, [], (r) => r.globals.lineProgress || 0], accumulated: [Ye, [], (r) => r.globals.accumulated === void 0 ? null : r.globals.accumulated], "+": [ze, Sn(ze), (r, t) => {
|
|
@@ -3828,7 +3831,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
3828
3831
|
return o ? o(t, i, s) : t;
|
|
3829
3832
|
}
|
|
3830
3833
|
}
|
|
3831
|
-
class
|
|
3834
|
+
class Ve {
|
|
3832
3835
|
constructor(t, i) {
|
|
3833
3836
|
this.specification = t, this.overrides = i;
|
|
3834
3837
|
}
|
|
@@ -3849,7 +3852,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
3849
3852
|
return t.kind === "constant" ? t.value : t.evaluate(i, s, o, d, p);
|
|
3850
3853
|
}
|
|
3851
3854
|
}
|
|
3852
|
-
class Oa extends
|
|
3855
|
+
class Oa extends Ve {
|
|
3853
3856
|
possiblyEvaluate(t, i, s, o) {
|
|
3854
3857
|
if (t.value === void 0) return new Tr(this, { kind: "constant", value: void 0 }, i);
|
|
3855
3858
|
if (t.expression.kind === "constant") {
|
|
@@ -3918,7 +3921,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
3918
3921
|
}
|
|
3919
3922
|
}
|
|
3920
3923
|
}
|
|
3921
|
-
ke("DataDrivenProperty",
|
|
3924
|
+
ke("DataDrivenProperty", Ve), ke("DataConstantProperty", Fe), ke("CrossFadedDataDrivenProperty", Oa), ke("CrossFadedProperty", Jr), ke("ColorRampProperty", ja);
|
|
3922
3925
|
const uc = "-transition";
|
|
3923
3926
|
class qi extends Re {
|
|
3924
3927
|
constructor(t, i) {
|
|
@@ -4300,8 +4303,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4300
4303
|
return this.resize(Ce + 1), this.emplace(Ce, t, i, s, o, d, p, m, g, x, v, T, M, E, A, L, F, V, Q, W, X, ce, pe, xe, Ae, Pe, Ie, Be, Me);
|
|
4301
4304
|
}
|
|
4302
4305
|
emplace(t, i, s, o, d, p, m, g, x, v, T, M, E, A, L, F, V, Q, W, X, ce, pe, xe, Ae, Pe, Ie, Be, Me, Ce) {
|
|
4303
|
-
const ge = 32 * t,
|
|
4304
|
-
return this.int16[ge + 0] = i, this.int16[ge + 1] = s, this.int16[ge + 2] = o, this.int16[ge + 3] = d, this.int16[ge + 4] = p, this.int16[ge + 5] = m, this.int16[ge + 6] = g, this.int16[ge + 7] = x, this.uint16[ge + 8] = v, this.uint16[ge + 9] = T, this.uint16[ge + 10] = M, this.uint16[ge + 11] = E, this.uint16[ge + 12] = A, this.uint16[ge + 13] = L, this.uint16[ge + 14] = F, this.uint16[ge + 15] = V, this.uint16[ge + 16] = Q, this.uint16[ge + 17] = W, this.uint16[ge + 18] = X, this.uint16[ge + 19] = ce, this.uint16[ge + 20] = pe, this.uint16[ge + 21] = xe, this.uint16[ge + 22] = Ae, this.uint32[
|
|
4306
|
+
const ge = 32 * t, Ze = 16 * t;
|
|
4307
|
+
return this.int16[ge + 0] = i, this.int16[ge + 1] = s, this.int16[ge + 2] = o, this.int16[ge + 3] = d, this.int16[ge + 4] = p, this.int16[ge + 5] = m, this.int16[ge + 6] = g, this.int16[ge + 7] = x, this.uint16[ge + 8] = v, this.uint16[ge + 9] = T, this.uint16[ge + 10] = M, this.uint16[ge + 11] = E, this.uint16[ge + 12] = A, this.uint16[ge + 13] = L, this.uint16[ge + 14] = F, this.uint16[ge + 15] = V, this.uint16[ge + 16] = Q, this.uint16[ge + 17] = W, this.uint16[ge + 18] = X, this.uint16[ge + 19] = ce, this.uint16[ge + 20] = pe, this.uint16[ge + 21] = xe, this.uint16[ge + 22] = Ae, this.uint32[Ze + 12] = Pe, this.float32[Ze + 13] = Ie, this.float32[Ze + 14] = Be, this.uint16[ge + 30] = Me, this.uint16[ge + 31] = Ce, t;
|
|
4305
4308
|
}
|
|
4306
4309
|
}
|
|
4307
4310
|
l.prototype.bytesPerElement = 64, ke("StructArrayLayout8i15ui1ul2f2ui64", l);
|
|
@@ -5107,9 +5110,9 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5107
5110
|
function Ar(r, t) {
|
|
5108
5111
|
return { type: r.type, id: r.id, properties: r.properties, geometry: t ? nn(r) : [] };
|
|
5109
5112
|
}
|
|
5110
|
-
const
|
|
5113
|
+
const Qh = -32768;
|
|
5111
5114
|
function Gd(r, t, i, s, o) {
|
|
5112
|
-
r.emplaceBack(
|
|
5115
|
+
r.emplaceBack(Qh + 8 * t + s, Qh + 8 * i + o);
|
|
5113
5116
|
}
|
|
5114
5117
|
class lh {
|
|
5115
5118
|
constructor(t) {
|
|
@@ -5183,7 +5186,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5183
5186
|
this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, t, s, { imagePositions: {}, canonical: o, globalState: this.globalState });
|
|
5184
5187
|
}
|
|
5185
5188
|
}
|
|
5186
|
-
function
|
|
5189
|
+
function eu(r, t) {
|
|
5187
5190
|
for (let i = 0; i < r.length; i++) if (Ga(t, r[i])) return !0;
|
|
5188
5191
|
for (let i = 0; i < t.length; i++) if (Ga(r, t[i])) return !0;
|
|
5189
5192
|
return !!ch(r, t);
|
|
@@ -5191,13 +5194,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5191
5194
|
function qd(r, t, i) {
|
|
5192
5195
|
return !!Ga(r, t) || !!hh(t, r, i);
|
|
5193
5196
|
}
|
|
5194
|
-
function
|
|
5195
|
-
if (r.length === 1) return
|
|
5197
|
+
function tu(r, t) {
|
|
5198
|
+
if (r.length === 1) return ru(t, r[0]);
|
|
5196
5199
|
for (let i = 0; i < t.length; i++) {
|
|
5197
5200
|
const s = t[i];
|
|
5198
5201
|
for (let o = 0; o < s.length; o++) if (Ga(r, s[o])) return !0;
|
|
5199
5202
|
}
|
|
5200
|
-
for (let i = 0; i < r.length; i++) if (
|
|
5203
|
+
for (let i = 0; i < r.length; i++) if (ru(t, r[i])) return !0;
|
|
5201
5204
|
for (let i = 0; i < t.length; i++) if (ch(r, t[i])) return !0;
|
|
5202
5205
|
return !1;
|
|
5203
5206
|
}
|
|
@@ -5223,16 +5226,16 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5223
5226
|
function hh(r, t, i) {
|
|
5224
5227
|
const s = i * i;
|
|
5225
5228
|
if (t.length === 1) return r.distSqr(t[0]) < s;
|
|
5226
|
-
for (let o = 1; o < t.length; o++) if (
|
|
5229
|
+
for (let o = 1; o < t.length; o++) if (iu(r, t[o - 1], t[o]) < s) return !0;
|
|
5227
5230
|
return !1;
|
|
5228
5231
|
}
|
|
5229
|
-
function
|
|
5232
|
+
function iu(r, t, i) {
|
|
5230
5233
|
const s = t.distSqr(i);
|
|
5231
5234
|
if (s === 0) return r.distSqr(t);
|
|
5232
5235
|
const o = ((r.x - t.x) * (i.x - t.x) + (r.y - t.y) * (i.y - t.y)) / s;
|
|
5233
5236
|
return r.distSqr(o < 0 ? t : o > 1 ? i : i.sub(t)._mult(o)._add(t));
|
|
5234
5237
|
}
|
|
5235
|
-
function
|
|
5238
|
+
function ru(r, t) {
|
|
5236
5239
|
let i, s, o, d = !1;
|
|
5237
5240
|
for (let p = 0; p < r.length; p++) {
|
|
5238
5241
|
i = r[p];
|
|
@@ -5269,12 +5272,12 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5269
5272
|
for (let m = 0; m < r.length; m++) p.push(r[m].sub(d));
|
|
5270
5273
|
return p;
|
|
5271
5274
|
}
|
|
5272
|
-
let
|
|
5275
|
+
let nu, su;
|
|
5273
5276
|
ke("CircleBucket", lh, { omit: ["layers"] });
|
|
5274
5277
|
var Yd = { get paint() {
|
|
5275
|
-
return
|
|
5278
|
+
return su = su || new Ti({ "circle-radius": new Ve(ne.paint_circle["circle-radius"]), "circle-color": new Ve(ne.paint_circle["circle-color"]), "circle-blur": new Ve(ne.paint_circle["circle-blur"]), "circle-opacity": new Ve(ne.paint_circle["circle-opacity"]), "circle-translate": new Fe(ne.paint_circle["circle-translate"]), "circle-translate-anchor": new Fe(ne.paint_circle["circle-translate-anchor"]), "circle-pitch-scale": new Fe(ne.paint_circle["circle-pitch-scale"]), "circle-pitch-alignment": new Fe(ne.paint_circle["circle-pitch-alignment"]), "circle-stroke-width": new Ve(ne.paint_circle["circle-stroke-width"]), "circle-stroke-color": new Ve(ne.paint_circle["circle-stroke-color"]), "circle-stroke-opacity": new Ve(ne.paint_circle["circle-stroke-opacity"]) });
|
|
5276
5279
|
}, get layout() {
|
|
5277
|
-
return
|
|
5280
|
+
return nu = nu || new Ti({ "circle-sort-key": new Ve(ne.layout_circle["circle-sort-key"]) });
|
|
5278
5281
|
} };
|
|
5279
5282
|
class Kd extends qi {
|
|
5280
5283
|
constructor(t) {
|
|
@@ -5289,10 +5292,10 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5289
5292
|
}
|
|
5290
5293
|
queryIntersectsFeature({ queryGeometry: t, feature: i, featureState: s, geometry: o, transform: d, pixelsToTileUnits: p, unwrappedTileID: m, getElevation: g }) {
|
|
5291
5294
|
const x = mc(t, this.paint.get("circle-translate"), this.paint.get("circle-translate-anchor"), -d.bearingInRadians, p), v = this.paint.get("circle-radius").evaluate(i, s) + this.paint.get("circle-stroke-width").evaluate(i, s), T = this.paint.get("circle-pitch-alignment") === "map", M = T ? x : function(A, L, F, V) {
|
|
5292
|
-
return A.map((Q) =>
|
|
5295
|
+
return A.map((Q) => au(Q, L, F, V));
|
|
5293
5296
|
}(x, d, m, g), E = T ? v * p : v;
|
|
5294
5297
|
for (const A of o) for (const L of A) {
|
|
5295
|
-
const F = T ? L :
|
|
5298
|
+
const F = T ? L : au(L, d, m, g);
|
|
5296
5299
|
let V = E;
|
|
5297
5300
|
const Q = d.projectTileCoordinates(L.x, L.y, m, g).signedDistanceFromCamera;
|
|
5298
5301
|
if (this.paint.get("circle-pitch-scale") === "viewport" && this.paint.get("circle-pitch-alignment") === "map" ? V *= Q / d.cameraToCenterDistance : this.paint.get("circle-pitch-scale") === "map" && this.paint.get("circle-pitch-alignment") === "viewport" && (V *= d.cameraToCenterDistance / Q), qd(M, F, V)) return !0;
|
|
@@ -5300,16 +5303,16 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5300
5303
|
return !1;
|
|
5301
5304
|
}
|
|
5302
5305
|
}
|
|
5303
|
-
function
|
|
5306
|
+
function au(r, t, i, s) {
|
|
5304
5307
|
const o = t.projectTileCoordinates(r.x, r.y, i, s).point;
|
|
5305
5308
|
return new be((0.5 * o.x + 0.5) * t.width, (0.5 * -o.y + 0.5) * t.height);
|
|
5306
5309
|
}
|
|
5307
|
-
class
|
|
5310
|
+
class ou extends lh {
|
|
5308
5311
|
}
|
|
5309
|
-
let
|
|
5310
|
-
ke("HeatmapBucket",
|
|
5312
|
+
let lu;
|
|
5313
|
+
ke("HeatmapBucket", ou, { omit: ["layers"] });
|
|
5311
5314
|
var Jd = { get paint() {
|
|
5312
|
-
return
|
|
5315
|
+
return lu = lu || new Ti({ "heatmap-radius": new Ve(ne.paint_heatmap["heatmap-radius"]), "heatmap-weight": new Ve(ne.paint_heatmap["heatmap-weight"]), "heatmap-intensity": new Fe(ne.paint_heatmap["heatmap-intensity"]), "heatmap-color": new ja(ne.paint_heatmap["heatmap-color"]), "heatmap-opacity": new Fe(ne.paint_heatmap["heatmap-opacity"]) });
|
|
5313
5316
|
} };
|
|
5314
5317
|
function uh(r, { width: t, height: i }, s, o) {
|
|
5315
5318
|
if (o) {
|
|
@@ -5318,7 +5321,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5318
5321
|
} else o = new Uint8Array(t * i * s);
|
|
5319
5322
|
return r.width = t, r.height = i, r.data = o, r;
|
|
5320
5323
|
}
|
|
5321
|
-
function
|
|
5324
|
+
function cu(r, { width: t, height: i }, s) {
|
|
5322
5325
|
if (t === r.width && i === r.height) return;
|
|
5323
5326
|
const o = uh({}, { width: t, height: i }, s);
|
|
5324
5327
|
dh(r, o, { x: 0, y: 0 }, { x: 0, y: 0 }, { width: Math.min(r.width, t), height: Math.min(r.height, i) }, s), r.width = t, r.height = i, r.data = o.data;
|
|
@@ -5340,7 +5343,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5340
5343
|
uh(this, t, 1, i);
|
|
5341
5344
|
}
|
|
5342
5345
|
resize(t) {
|
|
5343
|
-
|
|
5346
|
+
cu(this, t, 1);
|
|
5344
5347
|
}
|
|
5345
5348
|
clone() {
|
|
5346
5349
|
return new nl({ width: this.width, height: this.height }, new Uint8Array(this.data));
|
|
@@ -5354,7 +5357,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5354
5357
|
uh(this, t, 4, i);
|
|
5355
5358
|
}
|
|
5356
5359
|
resize(t) {
|
|
5357
|
-
|
|
5360
|
+
cu(this, t, 4);
|
|
5358
5361
|
}
|
|
5359
5362
|
replace(t, i) {
|
|
5360
5363
|
i ? this.data.set(t) : this.data = t instanceof Uint8ClampedArray ? new Uint8Array(t.buffer) : t;
|
|
@@ -5370,7 +5373,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5370
5373
|
this.data[o + 0] = Math.round(255 * s.r / s.a), this.data[o + 1] = Math.round(255 * s.g / s.a), this.data[o + 2] = Math.round(255 * s.b / s.a), this.data[o + 3] = Math.round(255 * s.a);
|
|
5371
5374
|
}
|
|
5372
5375
|
}
|
|
5373
|
-
function
|
|
5376
|
+
function hu(r) {
|
|
5374
5377
|
const t = {}, i = r.resolution || 256, s = r.clips ? r.clips.length : 1, o = r.image || new ji({ width: i, height: s });
|
|
5375
5378
|
if (Math.log(i) / Math.LN2 % 1 != 0) throw new Error(`width is not a power of 2 - ${i}`);
|
|
5376
5379
|
const d = (p, m, g) => {
|
|
@@ -5389,7 +5392,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5389
5392
|
const ph = "big-fb";
|
|
5390
5393
|
class Qd extends qi {
|
|
5391
5394
|
createBucket(t) {
|
|
5392
|
-
return new
|
|
5395
|
+
return new ou(t);
|
|
5393
5396
|
}
|
|
5394
5397
|
constructor(t) {
|
|
5395
5398
|
super(t, Jd), this.heatmapFbos = /* @__PURE__ */ new Map(), this._updateColorRamp();
|
|
@@ -5398,7 +5401,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5398
5401
|
t === "heatmap-color" && this._updateColorRamp();
|
|
5399
5402
|
}
|
|
5400
5403
|
_updateColorRamp() {
|
|
5401
|
-
this.colorRamp =
|
|
5404
|
+
this.colorRamp = hu({ expression: this._transitionablePaint._values["heatmap-color"].value.expression, evaluationKey: "heatmapDensity", image: this.colorRamp }), this.colorRampTexture = null;
|
|
5402
5405
|
}
|
|
5403
5406
|
resize() {
|
|
5404
5407
|
this.heatmapFbos.has(ph) && this.heatmapFbos.delete(ph);
|
|
@@ -5413,9 +5416,9 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5413
5416
|
return this.paint.get("heatmap-opacity") !== 0 && this.visibility !== "none";
|
|
5414
5417
|
}
|
|
5415
5418
|
}
|
|
5416
|
-
let
|
|
5419
|
+
let uu;
|
|
5417
5420
|
var ep = { get paint() {
|
|
5418
|
-
return
|
|
5421
|
+
return uu = uu || new Ti({ "hillshade-illumination-direction": new Fe(ne.paint_hillshade["hillshade-illumination-direction"]), "hillshade-illumination-altitude": new Fe(ne.paint_hillshade["hillshade-illumination-altitude"]), "hillshade-illumination-anchor": new Fe(ne.paint_hillshade["hillshade-illumination-anchor"]), "hillshade-exaggeration": new Fe(ne.paint_hillshade["hillshade-exaggeration"]), "hillshade-shadow-color": new Fe(ne.paint_hillshade["hillshade-shadow-color"]), "hillshade-highlight-color": new Fe(ne.paint_hillshade["hillshade-highlight-color"]), "hillshade-accent-color": new Fe(ne.paint_hillshade["hillshade-accent-color"]), "hillshade-method": new Fe(ne.paint_hillshade["hillshade-method"]) });
|
|
5419
5422
|
} };
|
|
5420
5423
|
class tp extends qi {
|
|
5421
5424
|
constructor(t) {
|
|
@@ -5432,9 +5435,9 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5432
5435
|
return this.paint.get("hillshade-exaggeration") !== 0 && this.visibility !== "none";
|
|
5433
5436
|
}
|
|
5434
5437
|
}
|
|
5435
|
-
let
|
|
5438
|
+
let du;
|
|
5436
5439
|
var ip = { get paint() {
|
|
5437
|
-
return
|
|
5440
|
+
return du = du || new Ti({ "color-relief-opacity": new Fe(ne["paint_color-relief"]["color-relief-opacity"]), "color-relief-color": new ja(ne["paint_color-relief"]["color-relief-color"]) });
|
|
5438
5441
|
} };
|
|
5439
5442
|
class fh {
|
|
5440
5443
|
constructor(t, i, s, o) {
|
|
@@ -5461,7 +5464,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5461
5464
|
t.deleteTexture(this.texture), this.texture = null;
|
|
5462
5465
|
}
|
|
5463
5466
|
}
|
|
5464
|
-
class
|
|
5467
|
+
class pu {
|
|
5465
5468
|
constructor(t, i, s, o = 1, d = 1, p = 1, m = 0) {
|
|
5466
5469
|
if (this.uid = t, i.height !== i.width) throw new RangeError("DEM tiles must be square");
|
|
5467
5470
|
if (s && !["mapbox", "terrarium", "custom"].includes(s)) return void jt(`"${s}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);
|
|
@@ -5499,7 +5502,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5499
5502
|
return t * this.redFactor + i * this.greenFactor + s * this.blueFactor - this.baseShift;
|
|
5500
5503
|
}
|
|
5501
5504
|
pack(t) {
|
|
5502
|
-
return
|
|
5505
|
+
return fu(t, this.getUnpackVector());
|
|
5503
5506
|
}
|
|
5504
5507
|
getPixels() {
|
|
5505
5508
|
return new ji({ width: this.stride, height: this.stride }, new Uint8Array(this.data.buffer));
|
|
@@ -5525,11 +5528,11 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5525
5528
|
for (let v = p; v < m; v++) for (let T = o; T < d; T++) this.data[this._idx(T, v)] = t.data[this._idx(T + g, v + x)];
|
|
5526
5529
|
}
|
|
5527
5530
|
}
|
|
5528
|
-
function
|
|
5531
|
+
function fu(r, t) {
|
|
5529
5532
|
const i = t[0], s = t[1], o = t[2], d = t[3], p = Math.min(i, s, o), m = Math.round((r + d) / p);
|
|
5530
5533
|
return { r: Math.floor(m * p / i) % 256, g: Math.floor(m * p / s) % 256, b: Math.floor(m * p / o) % 256 };
|
|
5531
5534
|
}
|
|
5532
|
-
ke("DEMData",
|
|
5535
|
+
ke("DEMData", pu);
|
|
5533
5536
|
class rp extends qi {
|
|
5534
5537
|
constructor(t) {
|
|
5535
5538
|
super(t, ip);
|
|
@@ -5554,7 +5557,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5554
5557
|
if (this.colorRampTextures && !this._colorRampChanged()) return this.colorRampTextures;
|
|
5555
5558
|
const o = this._createColorRamp(i), d = new ji({ width: o.colorStops.length, height: 1 }), p = new ji({ width: o.colorStops.length, height: 1 });
|
|
5556
5559
|
for (let m = 0; m < o.elevationStops.length; m++) {
|
|
5557
|
-
const g =
|
|
5560
|
+
const g = fu(o.elevationStops[m], s);
|
|
5558
5561
|
p.setPixel(0, m, new it(g.r / 255, g.g / 255, g.b / 255, 1)), d.setPixel(0, m, o.colorStops[m]);
|
|
5559
5562
|
}
|
|
5560
5563
|
return this.colorRampTextures = { elevationTexture: new fh(t, p, t.gl.RGBA), colorTexture: new fh(t, d, t.gl.RGBA) }, this.colorRampTextures;
|
|
@@ -5586,14 +5589,14 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5586
5589
|
}
|
|
5587
5590
|
return i;
|
|
5588
5591
|
}
|
|
5589
|
-
function
|
|
5592
|
+
function mu(r, t, i, s, o) {
|
|
5590
5593
|
let d;
|
|
5591
5594
|
if (o === function(p, m, g, x) {
|
|
5592
5595
|
let v = 0;
|
|
5593
5596
|
for (let T = m, M = g - x; T < g; T += x) v += (p[M] - p[T]) * (p[T + 1] + p[M + 1]), M = T;
|
|
5594
5597
|
return v;
|
|
5595
|
-
}(r, t, i, s) > 0) for (let p = t; p < i; p += s) d =
|
|
5596
|
-
else for (let p = i - s; p >= t; p -= s) d =
|
|
5598
|
+
}(r, t, i, s) > 0) for (let p = t; p < i; p += s) d = xu(p / s | 0, r[p], r[p + 1], d);
|
|
5599
|
+
else for (let p = i - s; p >= t; p -= s) d = xu(p / s | 0, r[p], r[p + 1], d);
|
|
5597
5600
|
return d && qa(d, d.next) && (ll(d), d = d.next), d;
|
|
5598
5601
|
}
|
|
5599
5602
|
function Xs(r, t) {
|
|
@@ -5678,7 +5681,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5678
5681
|
let i = r;
|
|
5679
5682
|
do {
|
|
5680
5683
|
const s = i.prev, o = i.next.next;
|
|
5681
|
-
!qa(s, o) &&
|
|
5684
|
+
!qa(s, o) && _u(s, i, i.next, o) && ol(s, o) && ol(o, s) && (t.push(s.i, i.i, o.i), ll(i), ll(i.next), i = r = o), i = i.next;
|
|
5682
5685
|
} while (i !== r);
|
|
5683
5686
|
return Xs(i);
|
|
5684
5687
|
}
|
|
@@ -5688,7 +5691,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5688
5691
|
let m = p.next.next;
|
|
5689
5692
|
for (; m !== p.prev; ) {
|
|
5690
5693
|
if (p.i !== m.i && fp(p, m)) {
|
|
5691
|
-
let g =
|
|
5694
|
+
let g = yu(p, m);
|
|
5692
5695
|
return p = Xs(p, p.next), g = Xs(g, g.next), sl(p, t, i, s, o, d, 0), void sl(g, t, i, s, o, d, 0);
|
|
5693
5696
|
}
|
|
5694
5697
|
m = m.next;
|
|
@@ -5719,7 +5722,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5719
5722
|
let A = 1 / 0;
|
|
5720
5723
|
p = x;
|
|
5721
5724
|
do {
|
|
5722
|
-
if (m >= p.x && p.x >= M && m !== p.x &&
|
|
5725
|
+
if (m >= p.x && p.x >= M && m !== p.x && gu(g < E ? m : v, g, M, E, g < E ? v : m, g, p.x, p.y)) {
|
|
5723
5726
|
const L = Math.abs(g - p.y) / (m - p.x);
|
|
5724
5727
|
ol(p, o) && (L < A || L === A && (p.x > x.x || p.x === x.x && dp(x, p))) && (x = p, A = L);
|
|
5725
5728
|
}
|
|
@@ -5728,7 +5731,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5728
5731
|
return x;
|
|
5729
5732
|
}(r, t);
|
|
5730
5733
|
if (!i) return t;
|
|
5731
|
-
const s =
|
|
5734
|
+
const s = yu(i, r);
|
|
5732
5735
|
return Xs(s, s.next), Xs(i, i.next);
|
|
5733
5736
|
}
|
|
5734
5737
|
function dp(r, t) {
|
|
@@ -5744,17 +5747,17 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5744
5747
|
while (t !== r);
|
|
5745
5748
|
return i;
|
|
5746
5749
|
}
|
|
5747
|
-
function
|
|
5750
|
+
function gu(r, t, i, s, o, d, p, m) {
|
|
5748
5751
|
return (o - p) * (t - m) >= (r - p) * (d - m) && (r - p) * (s - m) >= (i - p) * (t - m) && (i - p) * (d - m) >= (o - p) * (s - m);
|
|
5749
5752
|
}
|
|
5750
5753
|
function al(r, t, i, s, o, d, p, m) {
|
|
5751
|
-
return !(r === p && t === m) &&
|
|
5754
|
+
return !(r === p && t === m) && gu(r, t, i, s, o, d, p, m);
|
|
5752
5755
|
}
|
|
5753
5756
|
function fp(r, t) {
|
|
5754
5757
|
return r.next.i !== t.i && r.prev.i !== t.i && !function(i, s) {
|
|
5755
5758
|
let o = i;
|
|
5756
5759
|
do {
|
|
5757
|
-
if (o.i !== i.i && o.next.i !== i.i && o.i !== s.i && o.next.i !== s.i &&
|
|
5760
|
+
if (o.i !== i.i && o.next.i !== i.i && o.i !== s.i && o.next.i !== s.i && _u(o, o.next, i, s)) return !0;
|
|
5758
5761
|
o = o.next;
|
|
5759
5762
|
} while (o !== i);
|
|
5760
5763
|
return !1;
|
|
@@ -5773,7 +5776,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5773
5776
|
function qa(r, t) {
|
|
5774
5777
|
return r.x === t.x && r.y === t.y;
|
|
5775
5778
|
}
|
|
5776
|
-
function
|
|
5779
|
+
function _u(r, t, i, s) {
|
|
5777
5780
|
const o = _c(Vt(r, t, i)), d = _c(Vt(r, t, s)), p = _c(Vt(i, s, r)), m = _c(Vt(i, s, t));
|
|
5778
5781
|
return o !== d && p !== m || !(o !== 0 || !gc(r, i, t)) || !(d !== 0 || !gc(r, s, t)) || !(p !== 0 || !gc(i, r, s)) || !(m !== 0 || !gc(i, t, s));
|
|
5779
5782
|
}
|
|
@@ -5786,11 +5789,11 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5786
5789
|
function ol(r, t) {
|
|
5787
5790
|
return Vt(r.prev, r, r.next) < 0 ? Vt(r, t, r.next) >= 0 && Vt(r, r.prev, t) >= 0 : Vt(r, t, r.prev) < 0 || Vt(r, r.next, t) < 0;
|
|
5788
5791
|
}
|
|
5789
|
-
function
|
|
5792
|
+
function yu(r, t) {
|
|
5790
5793
|
const i = yh(r.i, r.x, r.y), s = yh(t.i, t.x, t.y), o = r.next, d = t.prev;
|
|
5791
5794
|
return r.next = t, t.prev = r, i.next = o, o.prev = i, s.next = i, i.prev = s, d.next = s, s.prev = d, s;
|
|
5792
5795
|
}
|
|
5793
|
-
function
|
|
5796
|
+
function xu(r, t, i, s) {
|
|
5794
5797
|
const o = yh(r, t, i);
|
|
5795
5798
|
return s ? (o.next = s.next, o.prev = s, s.next.prev = o, s.next = o) : (o.prev = o, o.next = o), o;
|
|
5796
5799
|
}
|
|
@@ -5944,14 +5947,14 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5944
5947
|
try {
|
|
5945
5948
|
const m = function(x, v, T = 2) {
|
|
5946
5949
|
const M = v && v.length, E = M ? v[0] * T : x.length;
|
|
5947
|
-
let A =
|
|
5950
|
+
let A = mu(x, 0, E, T, !0);
|
|
5948
5951
|
const L = [];
|
|
5949
5952
|
if (!A || A.next === A.prev) return L;
|
|
5950
5953
|
let F, V, Q;
|
|
5951
5954
|
if (M && (A = function(W, X, ce, pe) {
|
|
5952
5955
|
const xe = [];
|
|
5953
5956
|
for (let Ae = 0, Pe = X.length; Ae < Pe; Ae++) {
|
|
5954
|
-
const Ie =
|
|
5957
|
+
const Ie = mu(W, X[Ae] * pe, Ae < Pe - 1 ? X[Ae + 1] * pe : W.length, pe, !1);
|
|
5955
5958
|
Ie === Ie.next && (Ie.steiner = !0), xe.push(pp(Ie));
|
|
5956
5959
|
}
|
|
5957
5960
|
xe.sort(hp);
|
|
@@ -5989,7 +5992,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5989
5992
|
return i;
|
|
5990
5993
|
}
|
|
5991
5994
|
}
|
|
5992
|
-
function
|
|
5995
|
+
function vu(r, t, i, s = !0) {
|
|
5993
5996
|
return new mp(i, t).subdividePolygonInternal(r, s);
|
|
5994
5997
|
}
|
|
5995
5998
|
function Ys(r, t, i = !1) {
|
|
@@ -6006,14 +6009,14 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6006
6009
|
const W = L - E, X = F - A, ce = Math.abs(W), pe = Math.abs(X);
|
|
6007
6010
|
let xe = E, Ae = A;
|
|
6008
6011
|
for (; ; ) {
|
|
6009
|
-
const Ie = W > 0 ? (Math.floor(xe / p) + 1) * p : (Math.ceil(xe / p) - 1) * p, Be = X > 0 ? (Math.floor(Ae / p) + 1) * p : (Math.ceil(Ae / p) - 1) * p, Me = Math.abs(xe - Ie), Ce = Math.abs(Ae - Be), ge = Math.abs(xe - L),
|
|
6010
|
-
if ((ge <= Me || !V) && (
|
|
6011
|
-
if (Ge <
|
|
6012
|
+
const Ie = W > 0 ? (Math.floor(xe / p) + 1) * p : (Math.ceil(xe / p) - 1) * p, Be = X > 0 ? (Math.floor(Ae / p) + 1) * p : (Math.ceil(Ae / p) - 1) * p, Me = Math.abs(xe - Ie), Ce = Math.abs(Ae - Be), ge = Math.abs(xe - L), Ze = Math.abs(Ae - F), Ge = V ? Me / ce : Number.POSITIVE_INFINITY, Ne = Q ? Ce / pe : Number.POSITIVE_INFINITY;
|
|
6013
|
+
if ((ge <= Me || !V) && (Ze <= Ce || !Q)) break;
|
|
6014
|
+
if (Ge < Ne && V || !Q) {
|
|
6012
6015
|
xe = Ie, Ae += X * Ge;
|
|
6013
6016
|
const De = new be(xe, Math.round(Ae));
|
|
6014
6017
|
m[m.length - 1].x === De.x && m[m.length - 1].y === De.y || m.push(De);
|
|
6015
6018
|
} else {
|
|
6016
|
-
xe += W *
|
|
6019
|
+
xe += W * Ne, Ae = Be;
|
|
6017
6020
|
const De = new be(Math.round(xe), Ae);
|
|
6018
6021
|
m[m.length - 1].x === De.x && m[m.length - 1].y === De.y || m.push(De);
|
|
6019
6022
|
}
|
|
@@ -6051,7 +6054,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6051
6054
|
if (g === x) break;
|
|
6052
6055
|
}
|
|
6053
6056
|
}
|
|
6054
|
-
function
|
|
6057
|
+
function bu(r, t, i, s, o, d, p, m, g) {
|
|
6055
6058
|
const x = o.length / 2, v = p && m && g;
|
|
6056
6059
|
if (x < Xe.MAX_VERTEX_ARRAY_LENGTH) {
|
|
6057
6060
|
const T = t.prepareSegment(x, i, s), M = T.vertexLength;
|
|
@@ -6073,8 +6076,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6073
6076
|
const xe = L[pe - 2], Ae = L[pe - 1], Pe = L[pe];
|
|
6074
6077
|
let Ie = V[xe] < W, Be = V[Ae] < W, Me = V[Pe] < W;
|
|
6075
6078
|
X.vertexLength + ((Ie ? 1 : 0) + (Be ? 1 : 0) + (Me ? 1 : 0)) > Xe.MAX_VERTEX_ARRAY_LENGTH && (X = T.createNewSegment(M, E), W = Q.count, Ie = !0, Be = !0, Me = !0, ce = 0);
|
|
6076
|
-
const Ce = hl(V, A, F, Q, xe, Ie, X), ge = hl(V, A, F, Q, Ae, Be, X),
|
|
6077
|
-
E.emplaceBack(ce + Ce - W, ce + ge - W, ce +
|
|
6079
|
+
const Ce = hl(V, A, F, Q, xe, Ie, X), ge = hl(V, A, F, Q, Ae, Be, X), Ze = hl(V, A, F, Q, Pe, Me, X);
|
|
6080
|
+
E.emplaceBack(ce + Ce - W, ce + ge - W, ce + Ze - W), X.primitiveLength++;
|
|
6078
6081
|
}
|
|
6079
6082
|
})(t, i, s, o, d, r), v && function(T, M, E, A, L, F) {
|
|
6080
6083
|
const V = [];
|
|
@@ -6143,20 +6146,20 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6143
6146
|
}
|
|
6144
6147
|
addFeature(t, i, s, o, d, p) {
|
|
6145
6148
|
for (const m of Ls(i, 500)) {
|
|
6146
|
-
const g =
|
|
6147
|
-
|
|
6149
|
+
const g = vu(m, o, p.fill.getGranularityForZoomLevel(o.z)), x = this.layoutVertexArray;
|
|
6150
|
+
bu((v, T) => {
|
|
6148
6151
|
x.emplaceBack(v, T);
|
|
6149
6152
|
}, this.segments, this.layoutVertexArray, this.indexArray, g.verticesFlattened, g.indicesTriangles, this.segments2, this.indexArray2, g.indicesLineList);
|
|
6150
6153
|
}
|
|
6151
6154
|
this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, t, s, { imagePositions: d, canonical: o, globalState: this.globalState });
|
|
6152
6155
|
}
|
|
6153
6156
|
}
|
|
6154
|
-
let
|
|
6157
|
+
let wu, Tu;
|
|
6155
6158
|
ke("FillBucket", xh, { omit: ["layers", "patternFeatures"] });
|
|
6156
6159
|
var _p = { get paint() {
|
|
6157
|
-
return
|
|
6160
|
+
return Tu = Tu || new Ti({ "fill-antialias": new Fe(ne.paint_fill["fill-antialias"]), "fill-opacity": new Ve(ne.paint_fill["fill-opacity"]), "fill-color": new Ve(ne.paint_fill["fill-color"]), "fill-outline-color": new Ve(ne.paint_fill["fill-outline-color"]), "fill-translate": new Fe(ne.paint_fill["fill-translate"]), "fill-translate-anchor": new Fe(ne.paint_fill["fill-translate-anchor"]), "fill-pattern": new Oa(ne.paint_fill["fill-pattern"]) });
|
|
6158
6161
|
}, get layout() {
|
|
6159
|
-
return
|
|
6162
|
+
return wu = wu || new Ti({ "fill-sort-key": new Ve(ne.layout_fill["fill-sort-key"]) });
|
|
6160
6163
|
} };
|
|
6161
6164
|
class yp extends qi {
|
|
6162
6165
|
constructor(t) {
|
|
@@ -6174,7 +6177,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6174
6177
|
return fc(this.paint.get("fill-translate"));
|
|
6175
6178
|
}
|
|
6176
6179
|
queryIntersectsFeature({ queryGeometry: t, geometry: i, transform: s, pixelsToTileUnits: o }) {
|
|
6177
|
-
return
|
|
6180
|
+
return tu(mc(t, this.paint.get("fill-translate"), this.paint.get("fill-translate-anchor"), -s.bearingInRadians, o), i);
|
|
6178
6181
|
}
|
|
6179
6182
|
isTileClipped() {
|
|
6180
6183
|
return !0;
|
|
@@ -6272,7 +6275,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6272
6275
|
return t;
|
|
6273
6276
|
}
|
|
6274
6277
|
Xa.types = ["Unknown", "Point", "LineString", "Polygon"];
|
|
6275
|
-
class
|
|
6278
|
+
class Pu {
|
|
6276
6279
|
constructor(t, i) {
|
|
6277
6280
|
this.version = 1, this.name = "", this.extent = 4096, this.length = 0, this._pbf = t, this._keys = [], this._values = [], this._features = [], t.readFields(Pp, this, i), this.length = this._features.length;
|
|
6278
6281
|
}
|
|
@@ -6295,14 +6298,14 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6295
6298
|
return o;
|
|
6296
6299
|
}(i));
|
|
6297
6300
|
}
|
|
6298
|
-
class
|
|
6301
|
+
class Su {
|
|
6299
6302
|
constructor(t, i) {
|
|
6300
6303
|
this.layers = t.readFields(Sp, {}, i);
|
|
6301
6304
|
}
|
|
6302
6305
|
}
|
|
6303
6306
|
function Sp(r, t, i) {
|
|
6304
6307
|
if (r === 3) {
|
|
6305
|
-
const s = new
|
|
6308
|
+
const s = new Pu(i, i.readVarint() + i.pos);
|
|
6306
6309
|
s.length && (t[s.name] = s);
|
|
6307
6310
|
}
|
|
6308
6311
|
}
|
|
@@ -6354,17 +6357,17 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6354
6357
|
this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, t, s, { imagePositions: d, canonical: o, globalState: this.globalState });
|
|
6355
6358
|
}
|
|
6356
6359
|
processPolygon(t, i, s, o, d) {
|
|
6357
|
-
if (o.length < 1 ||
|
|
6360
|
+
if (o.length < 1 || Mu(o[0])) return;
|
|
6358
6361
|
for (const T of o) T.length !== 0 && Mp(t, T);
|
|
6359
6362
|
const p = { segment: this.segments.prepareSegment(4, this.layoutVertexArray, this.indexArray) }, m = d.fill.getGranularityForZoomLevel(i.z), g = Xa.types[s.type] === "Polygon";
|
|
6360
6363
|
for (const T of o) {
|
|
6361
|
-
if (T.length === 0 ||
|
|
6364
|
+
if (T.length === 0 || Mu(T)) continue;
|
|
6362
6365
|
const M = Ys(T, m, g);
|
|
6363
6366
|
this._generateSideFaces(M, p);
|
|
6364
6367
|
}
|
|
6365
6368
|
if (!g) return;
|
|
6366
|
-
const x =
|
|
6367
|
-
|
|
6369
|
+
const x = vu(o, i, m, !1), v = this.layoutVertexArray;
|
|
6370
|
+
bu((T, M) => {
|
|
6368
6371
|
ul(v, T, M, 0, 0, 1, 1, 0);
|
|
6369
6372
|
}, this.segments, this.layoutVertexArray, this.indexArray, x.verticesFlattened, x.indicesTriangles);
|
|
6370
6373
|
}
|
|
@@ -6390,13 +6393,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6390
6393
|
function Ip(r, t) {
|
|
6391
6394
|
return r.x === t.x && (r.x < 0 || r.x > gt) || r.y === t.y && (r.y < 0 || r.y > gt);
|
|
6392
6395
|
}
|
|
6393
|
-
function
|
|
6396
|
+
function Mu(r) {
|
|
6394
6397
|
return r.every((t) => t.x < 0) || r.every((t) => t.x > gt) || r.every((t) => t.y < 0) || r.every((t) => t.y > gt);
|
|
6395
6398
|
}
|
|
6396
|
-
let
|
|
6399
|
+
let Iu;
|
|
6397
6400
|
ke("FillExtrusionBucket", bh, { omit: ["layers", "features"] });
|
|
6398
6401
|
var Cp = { get paint() {
|
|
6399
|
-
return
|
|
6402
|
+
return Iu = Iu || new Ti({ "fill-extrusion-opacity": new Fe(ne["paint_fill-extrusion"]["fill-extrusion-opacity"]), "fill-extrusion-color": new Ve(ne["paint_fill-extrusion"]["fill-extrusion-color"]), "fill-extrusion-translate": new Fe(ne["paint_fill-extrusion"]["fill-extrusion-translate"]), "fill-extrusion-translate-anchor": new Fe(ne["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]), "fill-extrusion-pattern": new Oa(ne["paint_fill-extrusion"]["fill-extrusion-pattern"]), "fill-extrusion-height": new Ve(ne["paint_fill-extrusion"]["fill-extrusion-height"]), "fill-extrusion-base": new Ve(ne["paint_fill-extrusion"]["fill-extrusion-base"]), "fill-extrusion-vertical-gradient": new Fe(ne["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"]) });
|
|
6400
6403
|
} };
|
|
6401
6404
|
class Ep extends qi {
|
|
6402
6405
|
constructor(t) {
|
|
@@ -6424,7 +6427,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6424
6427
|
for (const Be of E) {
|
|
6425
6428
|
const Me = [], Ce = [];
|
|
6426
6429
|
for (const ge of Be) {
|
|
6427
|
-
const
|
|
6430
|
+
const Ze = ge.x, Ge = ge.y, Ne = F[0] * Ze + F[4] * Ge + F[12], De = F[1] * Ze + F[5] * Ge + F[13], at = F[2] * Ze + F[6] * Ge + F[14], Lt = F[3] * Ze + F[7] * Ge + F[15], Jt = at + ce, xi = Lt + pe, lr = Ne + xe, Ni = De + Ae, ui = at + Pe, Et = Lt + Ie, si = new be((Ne + W) / xi, (De + X) / xi);
|
|
6428
6431
|
si.z = Jt / xi, Me.push(si);
|
|
6429
6432
|
const di = new be(lr / Et, Ni / Et);
|
|
6430
6433
|
di.z = ui / Et, Ce.push(di);
|
|
@@ -6435,12 +6438,12 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6435
6438
|
}(o, v, x, m);
|
|
6436
6439
|
return function(E, A, L) {
|
|
6437
6440
|
let F = 1 / 0;
|
|
6438
|
-
|
|
6441
|
+
tu(L, A) && (F = Cu(L, A[0]));
|
|
6439
6442
|
for (let V = 0; V < A.length; V++) {
|
|
6440
6443
|
const Q = A[V], W = E[V];
|
|
6441
6444
|
for (let X = 0; X < Q.length - 1; X++) {
|
|
6442
6445
|
const ce = Q[X], pe = [ce, Q[X + 1], W[X + 1], W[X], ce];
|
|
6443
|
-
|
|
6446
|
+
eu(L, pe) && (F = Math.min(F, Cu(L, pe)));
|
|
6444
6447
|
}
|
|
6445
6448
|
}
|
|
6446
6449
|
return F !== 1 / 0 && F;
|
|
@@ -6450,7 +6453,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6450
6453
|
function dl(r, t) {
|
|
6451
6454
|
return r.x * t.x + r.y * t.y;
|
|
6452
6455
|
}
|
|
6453
|
-
function
|
|
6456
|
+
function Cu(r, t) {
|
|
6454
6457
|
if (r.length === 1) {
|
|
6455
6458
|
let i = 0;
|
|
6456
6459
|
const s = t[i++];
|
|
@@ -6468,7 +6471,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6468
6471
|
return i;
|
|
6469
6472
|
}
|
|
6470
6473
|
}
|
|
6471
|
-
const Ap = Bt([{ name: "a_pos_normal", components: 2, type: "Int16" }, { name: "a_data", components: 4, type: "Uint8" }], 4), { members: zp } = Ap, kp = Bt([{ name: "a_uv_x", components: 1, type: "Float32" }, { name: "a_split_index", components: 1, type: "Float32" }]), { members: Lp } = kp, Dp = Math.cos(Math.PI / 180 * 37.5),
|
|
6474
|
+
const Ap = Bt([{ name: "a_pos_normal", components: 2, type: "Int16" }, { name: "a_data", components: 4, type: "Uint8" }], 4), { members: zp } = Ap, kp = Bt([{ name: "a_uv_x", components: 1, type: "Float32" }, { name: "a_split_index", components: 1, type: "Float32" }]), { members: Lp } = kp, Dp = Math.cos(Math.PI / 180 * 37.5), Eu = Math.pow(2, 14) / 0.5;
|
|
6472
6475
|
class wh {
|
|
6473
6476
|
constructor(t) {
|
|
6474
6477
|
this.zoom = t.zoom, this.globalState = t.globalState, this.overscaling = t.overscaling, this.layers = t.layers, this.layerIds = this.layers.map((i) => i.id), this.index = t.index, this.hasPattern = !1, this.patternFeatures = [], this.lineClipsArray = [], this.gradients = {}, this.layers.forEach((i) => {
|
|
@@ -6561,11 +6564,11 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6561
6564
|
}
|
|
6562
6565
|
this.addCurrentVertex(A, X, 0, 0, E), this.addCurrentVertex(A, X.mult(-1), 0, 0, E);
|
|
6563
6566
|
} else if (Me === "bevel" || Me === "fakeround") {
|
|
6564
|
-
const Ce = -Math.sqrt(xe * xe - 1), ge = Ie ? Ce : 0,
|
|
6565
|
-
if (L && this.addCurrentVertex(A, V, ge,
|
|
6567
|
+
const Ce = -Math.sqrt(xe * xe - 1), ge = Ie ? Ce : 0, Ze = Ie ? 0 : Ce;
|
|
6568
|
+
if (L && this.addCurrentVertex(A, V, ge, Ze, E), Me === "fakeround") {
|
|
6566
6569
|
const Ge = Math.round(180 * Ae / Math.PI / 20);
|
|
6567
|
-
for (let
|
|
6568
|
-
let De =
|
|
6570
|
+
for (let Ne = 1; Ne < Ge; Ne++) {
|
|
6571
|
+
let De = Ne / Ge;
|
|
6569
6572
|
if (De !== 0.5) {
|
|
6570
6573
|
const Lt = De - 0.5;
|
|
6571
6574
|
De += De * Lt * (De - 1) * ((1.0904 + ce * (ce * (3.55645 - 1.43519 * ce) - 3.2452)) * Lt * Lt + (0.848013 + ce * (0.215638 * ce - 1.06021)));
|
|
@@ -6574,7 +6577,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6574
6577
|
this.addHalfVertex(A, at.x, at.y, !1, Ie, 0, E);
|
|
6575
6578
|
}
|
|
6576
6579
|
}
|
|
6577
|
-
F && this.addCurrentVertex(A, Q, -ge,
|
|
6580
|
+
F && this.addCurrentVertex(A, Q, -ge, -Ze, E);
|
|
6578
6581
|
} else if (Me === "butt") this.addCurrentVertex(A, X, 0, 0, E);
|
|
6579
6582
|
else if (Me === "square") {
|
|
6580
6583
|
const Ce = L ? 1 : -1;
|
|
@@ -6591,10 +6594,10 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6591
6594
|
}
|
|
6592
6595
|
addCurrentVertex(t, i, s, o, d, p = !1) {
|
|
6593
6596
|
const m = i.y * o - i.x, g = -i.y - i.x * o;
|
|
6594
|
-
this.addHalfVertex(t, i.x + i.y * s, i.y - i.x * s, p, !1, s, d), this.addHalfVertex(t, m, g, p, !0, -o, d), this.distance >
|
|
6597
|
+
this.addHalfVertex(t, i.x + i.y * s, i.y - i.x * s, p, !1, s, d), this.addHalfVertex(t, m, g, p, !0, -o, d), this.distance > Eu / 2 && this.totalDistance === 0 && (this.distance = 0, this.updateScaledDistance(), this.addCurrentVertex(t, i, s, o, d, p));
|
|
6595
6598
|
}
|
|
6596
6599
|
addHalfVertex({ x: t, y: i }, s, o, d, p, m, g) {
|
|
6597
|
-
const x = 0.5 * (this.lineClips ? this.scaledDistance * (
|
|
6600
|
+
const x = 0.5 * (this.lineClips ? this.scaledDistance * (Eu - 1) : this.scaledDistance);
|
|
6598
6601
|
this.layoutVertexArray.emplaceBack((t << 1) + (d ? 1 : 0), (i << 1) + (p ? 1 : 0), Math.round(63 * s) + 128, Math.round(63 * o) + 128, 1 + (m === 0 ? 0 : m < 0 ? -1 : 1) | (63 & x) << 2, x >> 6), this.lineClips && this.layoutVertexArray2.emplaceBack((this.scaledDistance - this.lineClips.start) / (this.lineClips.end - this.lineClips.start), this.lineClipsArray.length);
|
|
6599
6602
|
const v = g.vertexLength++;
|
|
6600
6603
|
this.e1 >= 0 && this.e2 >= 0 && (this.indexArray.emplaceBack(this.e1, v, this.e2), g.primitiveLength++), p ? this.e2 = v : this.e1 = v;
|
|
@@ -6606,14 +6609,14 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6606
6609
|
this.distance += t.dist(i), this.updateScaledDistance();
|
|
6607
6610
|
}
|
|
6608
6611
|
}
|
|
6609
|
-
let
|
|
6612
|
+
let Au, zu;
|
|
6610
6613
|
ke("LineBucket", wh, { omit: ["layers", "patternFeatures"] });
|
|
6611
|
-
var
|
|
6612
|
-
return
|
|
6614
|
+
var ku = { get paint() {
|
|
6615
|
+
return zu = zu || new Ti({ "line-opacity": new Ve(ne.paint_line["line-opacity"]), "line-color": new Ve(ne.paint_line["line-color"]), "line-translate": new Fe(ne.paint_line["line-translate"]), "line-translate-anchor": new Fe(ne.paint_line["line-translate-anchor"]), "line-width": new Ve(ne.paint_line["line-width"]), "line-gap-width": new Ve(ne.paint_line["line-gap-width"]), "line-offset": new Ve(ne.paint_line["line-offset"]), "line-blur": new Ve(ne.paint_line["line-blur"]), "line-dasharray": new Jr(ne.paint_line["line-dasharray"]), "line-pattern": new Oa(ne.paint_line["line-pattern"]), "line-gradient": new ja(ne.paint_line["line-gradient"]) });
|
|
6613
6616
|
}, get layout() {
|
|
6614
|
-
return
|
|
6617
|
+
return Au = Au || new Ti({ "line-cap": new Fe(ne.layout_line["line-cap"]), "line-join": new Ve(ne.layout_line["line-join"]), "line-miter-limit": new Fe(ne.layout_line["line-miter-limit"]), "line-round-limit": new Fe(ne.layout_line["line-round-limit"]), "line-sort-key": new Ve(ne.layout_line["line-sort-key"]) });
|
|
6615
6618
|
} };
|
|
6616
|
-
class Rp extends
|
|
6619
|
+
class Rp extends Ve {
|
|
6617
6620
|
possiblyEvaluate(t, i) {
|
|
6618
6621
|
return i = new wt(Math.floor(i.zoom), { now: i.now, fadeDuration: i.fadeDuration, zoomHistory: i.zoomHistory, transition: i.transition }), super.possiblyEvaluate(t, i);
|
|
6619
6622
|
}
|
|
@@ -6624,7 +6627,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6624
6627
|
let xc;
|
|
6625
6628
|
class Fp extends qi {
|
|
6626
6629
|
constructor(t) {
|
|
6627
|
-
super(t,
|
|
6630
|
+
super(t, ku), this.gradientVersion = 0, xc || (xc = new Rp(ku.paint.properties["line-width"].specification), xc.useIntegerZoom = !0);
|
|
6628
6631
|
}
|
|
6629
6632
|
_handleSpecialPaintPropertyUpdate(t) {
|
|
6630
6633
|
if (t === "line-gradient") {
|
|
@@ -6644,11 +6647,11 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6644
6647
|
return new wh(t);
|
|
6645
6648
|
}
|
|
6646
6649
|
queryRadius(t) {
|
|
6647
|
-
const i = t, s =
|
|
6650
|
+
const i = t, s = Lu(rl("line-width", this, i), rl("line-gap-width", this, i)), o = rl("line-offset", this, i);
|
|
6648
6651
|
return s / 2 + Math.abs(o) + fc(this.paint.get("line-translate"));
|
|
6649
6652
|
}
|
|
6650
6653
|
queryIntersectsFeature({ queryGeometry: t, feature: i, featureState: s, geometry: o, transform: d, pixelsToTileUnits: p }) {
|
|
6651
|
-
const m = mc(t, this.paint.get("line-translate"), this.paint.get("line-translate-anchor"), -d.bearingInRadians, p), g = p / 2 *
|
|
6654
|
+
const m = mc(t, this.paint.get("line-translate"), this.paint.get("line-translate-anchor"), -d.bearingInRadians, p), g = p / 2 * Lu(this.paint.get("line-width").evaluate(i, s), this.paint.get("line-gap-width").evaluate(i, s)), x = this.paint.get("line-offset").evaluate(i, s);
|
|
6652
6655
|
return x && (o = function(v, T) {
|
|
6653
6656
|
const M = [];
|
|
6654
6657
|
for (let E = 0; E < v.length; E++) {
|
|
@@ -6675,14 +6678,14 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6675
6678
|
return !0;
|
|
6676
6679
|
}
|
|
6677
6680
|
}
|
|
6678
|
-
function
|
|
6681
|
+
function Lu(r, t) {
|
|
6679
6682
|
return t > 0 ? t + 2 * r : r;
|
|
6680
6683
|
}
|
|
6681
6684
|
const Bp = Bt([{ name: "a_pos_offset", components: 4, type: "Int16" }, { name: "a_data", components: 4, type: "Uint16" }, { name: "a_pixeloffset", components: 4, type: "Int16" }], 4), Op = Bt([{ name: "a_projected_pos", components: 3, type: "Float32" }], 4);
|
|
6682
6685
|
Bt([{ name: "a_fade_opacity", components: 1, type: "Uint32" }], 4);
|
|
6683
6686
|
const jp = Bt([{ name: "a_placed", components: 2, type: "Uint8" }, { name: "a_shift", components: 2, type: "Float32" }, { name: "a_box_real", components: 2, type: "Int16" }]);
|
|
6684
6687
|
Bt([{ type: "Int16", name: "anchorPointX" }, { type: "Int16", name: "anchorPointY" }, { type: "Int16", name: "x1" }, { type: "Int16", name: "y1" }, { type: "Int16", name: "x2" }, { type: "Int16", name: "y2" }, { type: "Uint32", name: "featureIndex" }, { type: "Uint16", name: "sourceLayerIndex" }, { type: "Uint16", name: "bucketIndex" }]);
|
|
6685
|
-
const
|
|
6688
|
+
const Du = Bt([{ name: "a_pos", components: 2, type: "Int16" }, { name: "a_anchor_pos", components: 2, type: "Int16" }, { name: "a_extrude", components: 2, type: "Int16" }], 4), Np = Bt([{ name: "a_pos", components: 2, type: "Float32" }, { name: "a_radius", components: 1, type: "Float32" }, { name: "a_flags", components: 2, type: "Int16" }], 4);
|
|
6686
6689
|
function Vp(r, t, i) {
|
|
6687
6690
|
return r.sections.forEach((s) => {
|
|
6688
6691
|
s.text = function(o, d, p) {
|
|
@@ -6694,7 +6697,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6694
6697
|
Bt([{ name: "triangle", components: 3, type: "Uint16" }]), Bt([{ type: "Int16", name: "anchorX" }, { type: "Int16", name: "anchorY" }, { type: "Uint16", name: "glyphStartIndex" }, { type: "Uint16", name: "numGlyphs" }, { type: "Uint32", name: "vertexStartIndex" }, { type: "Uint32", name: "lineStartIndex" }, { type: "Uint32", name: "lineLength" }, { type: "Uint16", name: "segment" }, { type: "Uint16", name: "lowerSize" }, { type: "Uint16", name: "upperSize" }, { type: "Float32", name: "lineOffsetX" }, { type: "Float32", name: "lineOffsetY" }, { type: "Uint8", name: "writingMode" }, { type: "Uint8", name: "placedOrientation" }, { type: "Uint8", name: "hidden" }, { type: "Uint32", name: "crossTileID" }, { type: "Int16", name: "associatedIconIndex" }]), Bt([{ type: "Int16", name: "anchorX" }, { type: "Int16", name: "anchorY" }, { type: "Int16", name: "rightJustifiedTextSymbolIndex" }, { type: "Int16", name: "centerJustifiedTextSymbolIndex" }, { type: "Int16", name: "leftJustifiedTextSymbolIndex" }, { type: "Int16", name: "verticalPlacedTextSymbolIndex" }, { type: "Int16", name: "placedIconSymbolIndex" }, { type: "Int16", name: "verticalPlacedIconSymbolIndex" }, { type: "Uint16", name: "key" }, { type: "Uint16", name: "textBoxStartIndex" }, { type: "Uint16", name: "textBoxEndIndex" }, { type: "Uint16", name: "verticalTextBoxStartIndex" }, { type: "Uint16", name: "verticalTextBoxEndIndex" }, { type: "Uint16", name: "iconBoxStartIndex" }, { type: "Uint16", name: "iconBoxEndIndex" }, { type: "Uint16", name: "verticalIconBoxStartIndex" }, { type: "Uint16", name: "verticalIconBoxEndIndex" }, { type: "Uint16", name: "featureIndex" }, { type: "Uint16", name: "numHorizontalGlyphVertices" }, { type: "Uint16", name: "numVerticalGlyphVertices" }, { type: "Uint16", name: "numIconVertices" }, { type: "Uint16", name: "numVerticalIconVertices" }, { type: "Uint16", name: "useRuntimeCollisionCircles" }, { type: "Uint32", name: "crossTileID" }, { type: "Float32", name: "textBoxScale" }, { type: "Float32", name: "collisionCircleDiameter" }, { type: "Uint16", name: "textAnchorOffsetStartIndex" }, { type: "Uint16", name: "textAnchorOffsetEndIndex" }]), Bt([{ type: "Float32", name: "offsetX" }]), Bt([{ type: "Int16", name: "x" }, { type: "Int16", name: "y" }, { type: "Int16", name: "tileUnitDistanceFromAnchor" }]), Bt([{ type: "Uint16", name: "textAnchor" }, { type: "Float32", components: 2, name: "textOffset" }]);
|
|
6695
6698
|
const pl = { "!": "︕", "#": "#", $: "$", "%": "%", "&": "&", "(": "︵", ")": "︶", "*": "*", "+": "+", ",": "︐", "-": "︲", ".": "・", "/": "/", ":": "︓", ";": "︔", "<": "︿", "=": "=", ">": "﹀", "?": "︖", "@": "@", "[": "﹇", "\\": "\", "]": "﹈", "^": "^", _: "︳", "`": "`", "{": "︷", "|": "―", "}": "︸", "~": "~", "¢": "¢", "£": "£", "¥": "¥", "¦": "¦", "¬": "¬", "¯": " ̄", "–": "︲", "—": "︱", "‘": "﹃", "’": "﹄", "“": "﹁", "”": "﹂", "…": "︙", "‧": "・", "₩": "₩", "、": "︑", "。": "︒", "〈": "︿", "〉": "﹀", "《": "︽", "》": "︾", "「": "﹁", "」": "﹂", "『": "﹃", "』": "﹄", "【": "︻", "】": "︼", "〔": "︹", "〕": "︺", "〖": "︗", "〗": "︘", "!": "︕", "(": "︵", ")": "︶", ",": "︐", "-": "︲", ".": "・", ":": "︓", ";": "︔", "<": "︿", ">": "﹀", "?": "︖", "[": "﹇", "]": "﹈", "_": "︳", "{": "︷", "|": "―", "}": "︸", "⦅": "︵", "⦆": "︶", "。": "︒", "「": "﹁", "」": "﹂" };
|
|
6696
6699
|
var ni = 24;
|
|
6697
|
-
const Th = 4294967296,
|
|
6700
|
+
const Th = 4294967296, Ru = 1 / Th, Fu = typeof TextDecoder > "u" ? null : new TextDecoder("utf-8");
|
|
6698
6701
|
class Ph {
|
|
6699
6702
|
constructor(t = new Uint8Array(16)) {
|
|
6700
6703
|
this.buf = ArrayBuffer.isView(t) ? t : new Uint8Array(t), this.dataView = new DataView(this.buf.buffer), this.pos = 0, this.type = 0, this.length = this.buf.length;
|
|
@@ -6755,7 +6758,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6755
6758
|
}
|
|
6756
6759
|
readString() {
|
|
6757
6760
|
const t = this.readVarint() + this.pos, i = this.pos;
|
|
6758
|
-
return this.pos = t, t - i >= 12 &&
|
|
6761
|
+
return this.pos = t, t - i >= 12 && Fu ? Fu.decode(this.buf.subarray(i, t)) : function(s, o, d) {
|
|
6759
6762
|
let p = "", m = o;
|
|
6760
6763
|
for (; m < d; ) {
|
|
6761
6764
|
const g = s[m];
|
|
@@ -6849,10 +6852,10 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6849
6852
|
this.realloc(4), this.dataView.setInt32(this.pos, t, !0), this.pos += 4;
|
|
6850
6853
|
}
|
|
6851
6854
|
writeFixed64(t) {
|
|
6852
|
-
this.realloc(8), this.dataView.setInt32(this.pos, -1 & t, !0), this.dataView.setInt32(this.pos + 4, Math.floor(t *
|
|
6855
|
+
this.realloc(8), this.dataView.setInt32(this.pos, -1 & t, !0), this.dataView.setInt32(this.pos + 4, Math.floor(t * Ru), !0), this.pos += 8;
|
|
6853
6856
|
}
|
|
6854
6857
|
writeSFixed64(t) {
|
|
6855
|
-
this.realloc(8), this.dataView.setInt32(this.pos, -1 & t, !0), this.dataView.setInt32(this.pos + 4, Math.floor(t *
|
|
6858
|
+
this.realloc(8), this.dataView.setInt32(this.pos, -1 & t, !0), this.dataView.setInt32(this.pos + 4, Math.floor(t * Ru), !0), this.pos += 8;
|
|
6856
6859
|
}
|
|
6857
6860
|
writeVarint(t) {
|
|
6858
6861
|
(t = +t || 0) > 268435455 || t < 0 ? function(i, s) {
|
|
@@ -6893,7 +6896,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6893
6896
|
return p;
|
|
6894
6897
|
}(this.buf, t, this.pos);
|
|
6895
6898
|
const s = this.pos - i;
|
|
6896
|
-
s >= 128 &&
|
|
6899
|
+
s >= 128 && Bu(i, s, this), this.pos = i - 1, this.writeVarint(s), this.pos += s;
|
|
6897
6900
|
}
|
|
6898
6901
|
writeFloat(t) {
|
|
6899
6902
|
this.realloc(4), this.dataView.setFloat32(this.pos, t, !0), this.pos += 4;
|
|
@@ -6911,7 +6914,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6911
6914
|
const s = this.pos;
|
|
6912
6915
|
t(i, this);
|
|
6913
6916
|
const o = this.pos - s;
|
|
6914
|
-
o >= 128 &&
|
|
6917
|
+
o >= 128 && Bu(s, o, this), this.pos = s - 1, this.writeVarint(o), this.pos += o;
|
|
6915
6918
|
}
|
|
6916
6919
|
writeMessage(t, i, s) {
|
|
6917
6920
|
this.writeTag(t, 2), this.writeRawMessage(i, s);
|
|
@@ -6980,7 +6983,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6980
6983
|
function Ya(r, t, i) {
|
|
6981
6984
|
return i ? 4294967296 * t + (r >>> 0) : 4294967296 * (t >>> 0) + (r >>> 0);
|
|
6982
6985
|
}
|
|
6983
|
-
function
|
|
6986
|
+
function Bu(r, t, i) {
|
|
6984
6987
|
const s = t <= 16383 ? 1 : t <= 2097151 ? 2 : t <= 268435455 ? 3 : Math.floor(Math.log(t) / (7 * Math.LN2));
|
|
6985
6988
|
i.realloc(s);
|
|
6986
6989
|
for (let o = i.pos - 1; o >= r; o--) i.buf[o + s] = i.buf[o];
|
|
@@ -7024,7 +7027,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7024
7027
|
function Qp(r, t, i) {
|
|
7025
7028
|
r === 1 ? t.id = i.readVarint() : r === 2 ? t.bitmap = i.readBytes() : r === 3 ? t.width = i.readVarint() : r === 4 ? t.height = i.readVarint() : r === 5 ? t.left = i.readSVarint() : r === 6 ? t.top = i.readSVarint() : r === 7 && (t.advance = i.readVarint());
|
|
7026
7029
|
}
|
|
7027
|
-
function
|
|
7030
|
+
function Ou(r) {
|
|
7028
7031
|
let t = 0, i = 0;
|
|
7029
7032
|
for (const p of r) t += p.w * p.h, i = Math.max(i, p.w);
|
|
7030
7033
|
r.sort((p, m) => m.h - p.h);
|
|
@@ -7059,13 +7062,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7059
7062
|
return [(this.paddedRect.w - 2) / this.pixelRatio, (this.paddedRect.h - 2) / this.pixelRatio];
|
|
7060
7063
|
}
|
|
7061
7064
|
}
|
|
7062
|
-
class
|
|
7065
|
+
class ju {
|
|
7063
7066
|
constructor(t, i) {
|
|
7064
7067
|
const s = {}, o = {};
|
|
7065
7068
|
this.haveRenderCallbacks = [];
|
|
7066
7069
|
const d = [];
|
|
7067
7070
|
this.addImages(t, s, d), this.addImages(i, o, d);
|
|
7068
|
-
const { w: p, h: m } =
|
|
7071
|
+
const { w: p, h: m } = Ou(d), g = new ji({ width: p || 1, height: m || 1 });
|
|
7069
7072
|
for (const x in t) {
|
|
7070
7073
|
const v = t[x], T = s[x].paddedRect;
|
|
7071
7074
|
ji.copy(v.data, g, { x: 0, y: 0 }, { x: T.x + 1, y: T.y + 1 }, v.data);
|
|
@@ -7094,7 +7097,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7094
7097
|
}
|
|
7095
7098
|
}
|
|
7096
7099
|
var ms;
|
|
7097
|
-
ke("ImagePosition", Sh), ke("ImageAtlas",
|
|
7100
|
+
ke("ImagePosition", Sh), ke("ImageAtlas", ju), C.ao = void 0, (ms = C.ao || (C.ao = {}))[ms.none = 0] = "none", ms[ms.horizontal = 1] = "horizontal", ms[ms.vertical = 2] = "vertical", ms[ms.horizontalOnly = 3] = "horizontalOnly";
|
|
7098
7101
|
class fl {
|
|
7099
7102
|
constructor() {
|
|
7100
7103
|
this.scale = 1, this.fontStack = "", this.imageName = null, this.verticalAlign = "bottom";
|
|
@@ -7215,8 +7218,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7215
7218
|
return Pe < Ae.length && xe.push(ce.substring(Pe, Ae.length)), xe;
|
|
7216
7219
|
}(L, Mh(L, x, d, t, s, E));
|
|
7217
7220
|
const W = [], X = { positionedLines: W, text: L.toString(), top: v[1], bottom: v[1], left: v[0], right: v[0], writingMode: T, iconsInText: !1, verticalizable: !1 };
|
|
7218
|
-
return function(ce, pe, xe, Ae, Pe, Ie, Be, Me, Ce, ge,
|
|
7219
|
-
let
|
|
7221
|
+
return function(ce, pe, xe, Ae, Pe, Ie, Be, Me, Ce, ge, Ze, Ge) {
|
|
7222
|
+
let Ne = 0, De = 0, at = 0, Lt = 0;
|
|
7220
7223
|
const Jt = Me === "right" ? 1 : Me === "left" ? 0 : 0.5, xi = ni / Ge;
|
|
7221
7224
|
let lr = 0;
|
|
7222
7225
|
for (const Et of Pe) {
|
|
@@ -7231,16 +7234,16 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7231
7234
|
}
|
|
7232
7235
|
const cr = nf(Ae, Et, xi);
|
|
7233
7236
|
for (let Vi = 0; Vi < Et.length(); Vi++) {
|
|
7234
|
-
const Qt = Et.getSection(Vi), oi = Et.getSectionIndex(Vi), li = Et.getCharCode(Vi), Wt = sf(Ce,
|
|
7237
|
+
const Qt = Et.getSection(Vi), oi = Et.getSectionIndex(Vi), li = Et.getCharCode(Vi), Wt = sf(Ce, Ze, li);
|
|
7235
7238
|
let St;
|
|
7236
7239
|
if (Qt.imageName) {
|
|
7237
7240
|
if (ce.iconsInText = !0, Qt.scale = Qt.scale * xi, St = of(Qt, Wt, si, cr, Ae), !St) continue;
|
|
7238
7241
|
Li = Math.max(Li, St.imageOffset);
|
|
7239
7242
|
} else if (St = af(Qt, li, Wt, cr, pe, xe), !St) continue;
|
|
7240
7243
|
const { rect: zr, metrics: to, baselineOffset: kr } = St;
|
|
7241
|
-
pi.push({ glyph: li, imageName: Qt.imageName, x:
|
|
7244
|
+
pi.push({ glyph: li, imageName: Qt.imageName, x: Ne, y: De + kr + -17, vertical: Wt, scale: Qt.scale, fontStack: Qt.fontStack, sectionIndex: oi, metrics: to, rect: zr }), Wt ? (ce.verticalizable = !0, Ne += (Qt.imageName ? to.advance : ni) * Qt.scale + ge) : Ne += to.advance * Qt.scale + ge;
|
|
7242
7245
|
}
|
|
7243
|
-
pi.length !== 0 && (at = Math.max(
|
|
7246
|
+
pi.length !== 0 && (at = Math.max(Ne - ge, at), lf(pi, 0, pi.length - 1, Jt)), Ne = 0, di.lineOffset = Math.max(Li, (si - 1) * ni);
|
|
7244
7247
|
const ai = Ie * si + Li;
|
|
7245
7248
|
De += ai, Lt = Math.max(ai, Lt), ++lr;
|
|
7246
7249
|
}
|
|
@@ -7257,7 +7260,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7257
7260
|
}(W) && X;
|
|
7258
7261
|
}
|
|
7259
7262
|
const bc = { 9: !0, 10: !0, 11: !0, 12: !0, 13: !0, 32: !0 }, ef = { 10: !0, 32: !0, 38: !0, 41: !0, 43: !0, 45: !0, 47: !0, 173: !0, 183: !0, 8203: !0, 8208: !0, 8211: !0, 8231: !0 }, tf = { 40: !0 };
|
|
7260
|
-
function
|
|
7263
|
+
function Nu(r, t, i, s, o, d) {
|
|
7261
7264
|
if (t.imageName) {
|
|
7262
7265
|
const p = s[t.imageName];
|
|
7263
7266
|
return p ? p.displaySize[0] * t.scale * ni / d + o : 0;
|
|
@@ -7267,7 +7270,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7267
7270
|
return m ? m.metrics.advance * t.scale + o : 0;
|
|
7268
7271
|
}
|
|
7269
7272
|
}
|
|
7270
|
-
function
|
|
7273
|
+
function Vu(r, t, i, s) {
|
|
7271
7274
|
const o = Math.pow(r - t, 2);
|
|
7272
7275
|
return s ? r < t ? o / 2 : 2 * o : o + Math.abs(i) * i;
|
|
7273
7276
|
}
|
|
@@ -7275,16 +7278,16 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7275
7278
|
let s = 0;
|
|
7276
7279
|
return r === 10 && (s -= 1e4), i && (s += 150), r !== 40 && r !== 65288 || (s += 50), t !== 41 && t !== 65289 || (s += 50), s;
|
|
7277
7280
|
}
|
|
7278
|
-
function
|
|
7279
|
-
let p = null, m =
|
|
7281
|
+
function Uu(r, t, i, s, o, d) {
|
|
7282
|
+
let p = null, m = Vu(t, i, o, d);
|
|
7280
7283
|
for (const g of s) {
|
|
7281
|
-
const x =
|
|
7284
|
+
const x = Vu(t - g.x, i, o, d) + g.badness;
|
|
7282
7285
|
x <= m && (p = g, m = x);
|
|
7283
7286
|
}
|
|
7284
7287
|
return { index: r, x: t, priorBreak: p, badness: m };
|
|
7285
7288
|
}
|
|
7286
|
-
function
|
|
7287
|
-
return r ?
|
|
7289
|
+
function $u(r) {
|
|
7290
|
+
return r ? $u(r.priorBreak).concat(r.index) : [];
|
|
7288
7291
|
}
|
|
7289
7292
|
function Mh(r, t, i, s, o, d) {
|
|
7290
7293
|
if (!r) return [];
|
|
@@ -7292,20 +7295,20 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7292
7295
|
let V = 0;
|
|
7293
7296
|
for (let Q = 0; Q < T.length(); Q++) {
|
|
7294
7297
|
const W = T.getSection(Q);
|
|
7295
|
-
V +=
|
|
7298
|
+
V += Nu(T.getCharCode(Q), W, A, L, M, F);
|
|
7296
7299
|
}
|
|
7297
7300
|
return V / Math.max(1, Math.ceil(V / E));
|
|
7298
7301
|
}(r, t, i, s, o, d), g = r.text.indexOf("") >= 0;
|
|
7299
7302
|
let x = 0;
|
|
7300
7303
|
for (let T = 0; T < r.length(); T++) {
|
|
7301
7304
|
const M = r.getSection(T), E = r.getCharCode(T);
|
|
7302
|
-
if (bc[E] || (x +=
|
|
7305
|
+
if (bc[E] || (x += Nu(E, M, s, o, t, d)), T < r.length() - 1) {
|
|
7303
7306
|
const A = !((v = E) < 11904) && (!!st["CJK Compatibility Forms"](v) || !!st["CJK Compatibility"](v) || !!st["CJK Strokes"](v) || !!st["CJK Symbols and Punctuation"](v) || !!st["Enclosed CJK Letters and Months"](v) || !!st["Halfwidth and Fullwidth Forms"](v) || !!st["Ideographic Description Characters"](v) || !!st["Vertical Forms"](v) || qo.test(String.fromCodePoint(v)));
|
|
7304
|
-
(ef[E] || A || M.imageName || T !== r.length() - 2 && tf[r.getCharCode(T + 1)]) && p.push(
|
|
7307
|
+
(ef[E] || A || M.imageName || T !== r.length() - 2 && tf[r.getCharCode(T + 1)]) && p.push(Uu(T + 1, x, m, p, rf(E, r.getCharCode(T + 1), A && g), !1));
|
|
7305
7308
|
}
|
|
7306
7309
|
}
|
|
7307
7310
|
var v;
|
|
7308
|
-
return Uu(
|
|
7311
|
+
return $u(Uu(r.length(), x, m, p, 0, !0));
|
|
7309
7312
|
}
|
|
7310
7313
|
function Ih(r) {
|
|
7311
7314
|
let t = 0.5, i = 0.5;
|
|
@@ -7337,7 +7340,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7337
7340
|
const s = t.getMaxScale() * ni, { maxImageWidth: o, maxImageHeight: d } = t.getMaxImageSize(r), p = Math.max(s, d * i);
|
|
7338
7341
|
return { verticalLineContentWidth: Math.max(s, o * i), horizontalLineContentHeight: p };
|
|
7339
7342
|
}
|
|
7340
|
-
function
|
|
7343
|
+
function Zu(r) {
|
|
7341
7344
|
switch (r) {
|
|
7342
7345
|
case "top":
|
|
7343
7346
|
return 0;
|
|
@@ -7361,7 +7364,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7361
7364
|
let g;
|
|
7362
7365
|
if (i) g = s.verticalLineContentWidth - r.scale * ni;
|
|
7363
7366
|
else {
|
|
7364
|
-
const x =
|
|
7367
|
+
const x = Zu(r.verticalAlign);
|
|
7365
7368
|
g = (s.horizontalLineContentHeight - r.scale * ni) * x;
|
|
7366
7369
|
}
|
|
7367
7370
|
return { rect: m.rect, metrics: m.metrics, baselineOffset: g };
|
|
@@ -7373,7 +7376,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7373
7376
|
let x;
|
|
7374
7377
|
if (t) x = s.verticalLineContentWidth - m[1] * r.scale;
|
|
7375
7378
|
else {
|
|
7376
|
-
const v =
|
|
7379
|
+
const v = Zu(r.verticalAlign);
|
|
7377
7380
|
x = (s.horizontalLineContentHeight - m[1] * r.scale) * v;
|
|
7378
7381
|
}
|
|
7379
7382
|
return { rect: p, metrics: g, baselineOffset: x, imageOffset: (t ? m[0] : m[1]) * r.scale - ni * i };
|
|
@@ -7387,7 +7390,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7387
7390
|
const { horizontalAlign: s, verticalAlign: o } = Ih(i), d = t[0] - r.displaySize[0] * s, p = t[1] - r.displaySize[1] * o;
|
|
7388
7391
|
return { image: r, top: p, bottom: p + r.displaySize[1], left: d, right: d + r.displaySize[0] };
|
|
7389
7392
|
}
|
|
7390
|
-
function
|
|
7393
|
+
function Gu(r) {
|
|
7391
7394
|
var t, i;
|
|
7392
7395
|
let s = r.left, o = r.top, d = r.right - s, p = r.bottom - o;
|
|
7393
7396
|
const m = (t = r.image.textFitWidth) !== null && t !== void 0 ? t : "stretchOrShrink", g = (i = r.image.textFitHeight) !== null && i !== void 0 ? i : "stretchOrShrink", x = (r.image.content[2] - r.image.content[0]) / (r.image.content[3] - r.image.content[1]);
|
|
@@ -7402,7 +7405,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7402
7405
|
}
|
|
7403
7406
|
return { x1: s, y1: o, x2: s + d, y2: o + p };
|
|
7404
7407
|
}
|
|
7405
|
-
function
|
|
7408
|
+
function qu(r, t, i, s, o, d) {
|
|
7406
7409
|
const p = r.image;
|
|
7407
7410
|
let m;
|
|
7408
7411
|
if (p.content) {
|
|
@@ -7416,7 +7419,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7416
7419
|
return i === "height" || i === "both" ? (v = o[1] + A - s[0], M = o[1] + L + s[2]) : (v = o[1] + (A + L - p.displaySize[1]) / 2, M = v + p.displaySize[1]), { image: p, top: v, right: T, bottom: M, left: E, collisionPadding: m };
|
|
7417
7420
|
}
|
|
7418
7421
|
const Dn = 128, gs = 32640;
|
|
7419
|
-
function
|
|
7422
|
+
function Wu(r, t) {
|
|
7420
7423
|
const { expression: i } = t;
|
|
7421
7424
|
if (i.kind === "constant") return { kind: "constant", layoutSize: i.evaluate(new wt(r + 1)) };
|
|
7422
7425
|
if (i.kind === "source") return { kind: "source" };
|
|
@@ -7480,7 +7483,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7480
7483
|
constructor(t) {
|
|
7481
7484
|
this.collisionBoxArray = t.collisionBoxArray, this.zoom = t.zoom, this.globalState = t.globalState, this.overscaling = t.overscaling, this.layers = t.layers, this.layerIds = this.layers.map((p) => p.id), this.index = t.index, this.pixelRatio = t.pixelRatio, this.sourceLayerIndex = t.sourceLayerIndex, this.hasPattern = !1, this.hasRTLText = !1, this.sortKeyRanges = [], this.collisionCircleArray = [];
|
|
7482
7485
|
const i = this.layers[0]._unevaluatedLayout._values;
|
|
7483
|
-
this.textSizeData =
|
|
7486
|
+
this.textSizeData = Wu(this.zoom, i["text-size"]), this.iconSizeData = Wu(this.zoom, i["icon-size"]);
|
|
7484
7487
|
const s = this.layers[0].layout, o = s.get("symbol-sort-key"), d = s.get("symbol-z-order");
|
|
7485
7488
|
this.canOverlap = Ch(s, "text-overlap", "text-allow-overlap") !== "never" || Ch(s, "icon-overlap", "icon-allow-overlap") !== "never" || s.get("text-ignore-placement") || s.get("icon-ignore-placement"), this.sortFeaturesByKey = d !== "viewport-y" && !o.isConstant(), this.sortFeaturesByY = (d === "viewport-y" || d === "auto" && !this.sortFeaturesByKey) && this.canOverlap, s.get("symbol-placement") === "point" && (this.writingModes = s.get("text-writing-mode").map((p) => C.ao[p])), this.stateDependentLayerIds = this.layers.filter((p) => p.isStateDependent()).map((p) => p.id), this.sourceID = t.sourceID;
|
|
7486
7489
|
}
|
|
@@ -7547,8 +7550,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7547
7550
|
}
|
|
7548
7551
|
const Ce = Ae(Me, Be), ge = Ae(Me, Be, !0);
|
|
7549
7552
|
if (Ce in Q && ge in V && Q[Ce] !== V[ge]) {
|
|
7550
|
-
const
|
|
7551
|
-
delete V[Ce], delete Q[ge], Q[Ae(Me, W[Ge].geometry, !0)] = Ge, W[
|
|
7553
|
+
const Ze = xe(Ce, ge, Be), Ge = pe(Ce, ge, W[Ze].geometry);
|
|
7554
|
+
delete V[Ce], delete Q[ge], Q[Ae(Me, W[Ge].geometry, !0)] = Ge, W[Ze].geometry = null;
|
|
7552
7555
|
} else Ce in Q ? pe(Ce, ge, Be) : ge in V ? xe(Ce, ge, Be) : (ce(Pe), V[Ce] = X - 1, Q[ge] = X - 1);
|
|
7553
7556
|
}
|
|
7554
7557
|
return W.filter((Pe) => Pe.geometry);
|
|
@@ -7589,8 +7592,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7589
7592
|
addSymbols(t, i, s, o, d, p, m, g, x, v, T, M) {
|
|
7590
7593
|
const E = t.indexArray, A = t.layoutVertexArray, L = t.segments.prepareSegment(4 * i.length, A, E, this.canOverlap ? p.sortKey : void 0), F = this.glyphOffsetArray.length, V = L.vertexLength, Q = this.allowVerticalPlacement && m === C.ao.vertical ? Math.PI / 2 : 0, W = p.text && p.text.sections;
|
|
7591
7594
|
for (let X = 0; X < i.length; X++) {
|
|
7592
|
-
const { tl: ce, tr: pe, bl: xe, br: Ae, tex: Pe, pixelOffsetTL: Ie, pixelOffsetBR: Be, minFontScaleX: Me, minFontScaleY: Ce, glyphOffset: ge, isSDF:
|
|
7593
|
-
wc(A, g.x, g.y, ce.x, De + ce.y, Pe.x, Pe.y, s,
|
|
7595
|
+
const { tl: ce, tr: pe, bl: xe, br: Ae, tex: Pe, pixelOffsetTL: Ie, pixelOffsetBR: Be, minFontScaleX: Me, minFontScaleY: Ce, glyphOffset: ge, isSDF: Ze, sectionIndex: Ge } = i[X], Ne = L.vertexLength, De = ge[1];
|
|
7596
|
+
wc(A, g.x, g.y, ce.x, De + ce.y, Pe.x, Pe.y, s, Ze, Ie.x, Ie.y, Me, Ce), wc(A, g.x, g.y, pe.x, De + pe.y, Pe.x + Pe.w, Pe.y, s, Ze, Be.x, Ie.y, Me, Ce), wc(A, g.x, g.y, xe.x, De + xe.y, Pe.x, Pe.y + Pe.h, s, Ze, Ie.x, Be.y, Me, Ce), wc(A, g.x, g.y, Ae.x, De + Ae.y, Pe.x + Pe.w, Pe.y + Pe.h, s, Ze, Be.x, Be.y, Me, Ce), Eh(t.dynamicLayoutVertexArray, g, Q), E.emplaceBack(Ne, Ne + 2, Ne + 1), E.emplaceBack(Ne + 1, Ne + 2, Ne + 3), L.vertexLength += 4, L.primitiveLength += 2, this.glyphOffsetArray.emplaceBack(ge[0]), X !== i.length - 1 && Ge === i[X + 1].sectionIndex || t.programConfigurations.populatePaintArrays(A.length, p, p.index, { imagePositions: {}, canonical: M, formattedSection: W && W[Ge], globalState: this.globalState });
|
|
7594
7597
|
}
|
|
7595
7598
|
t.placedSymbolArray.emplaceBack(g.x, g.y, F, this.glyphOffsetArray.length - F, V, x, v, g.segment, s ? s[0] : 0, s ? s[1] : 0, o[0], o[1], m, 0, !1, 0, T);
|
|
7596
7599
|
}
|
|
@@ -7610,7 +7613,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7610
7613
|
}
|
|
7611
7614
|
}
|
|
7612
7615
|
generateCollisionDebugBuffers() {
|
|
7613
|
-
this.hasDebugData() && this.destroyDebugData(), this.textCollisionBox = new zh(Ke,
|
|
7616
|
+
this.hasDebugData() && this.destroyDebugData(), this.textCollisionBox = new zh(Ke, Du.members, mt), this.iconCollisionBox = new zh(Ke, Du.members, mt);
|
|
7614
7617
|
for (let t = 0; t < this.symbolInstances.length; t++) {
|
|
7615
7618
|
const i = this.symbolInstances.get(t);
|
|
7616
7619
|
this.addDebugCollisionBoxes(i.textBoxStartIndex, i.textBoxEndIndex, i, !0), this.addDebugCollisionBoxes(i.verticalTextBoxStartIndex, i.verticalTextBoxEndIndex, i, !0), this.addDebugCollisionBoxes(i.iconBoxStartIndex, i.iconBoxEndIndex, i, !1), this.addDebugCollisionBoxes(i.verticalIconBoxStartIndex, i.verticalIconBoxEndIndex, i, !1);
|
|
@@ -7693,14 +7696,14 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7693
7696
|
}
|
|
7694
7697
|
}
|
|
7695
7698
|
}
|
|
7696
|
-
let
|
|
7699
|
+
let Hu, Xu;
|
|
7697
7700
|
ke("SymbolBucket", Ja, { omit: ["layers", "collisionBoxArray", "features", "compareText"] }), Ja.MAX_GLYPHS = 65535, Ja.addDynamicAttributes = Eh;
|
|
7698
7701
|
var kh = { get paint() {
|
|
7699
|
-
return
|
|
7702
|
+
return Xu = Xu || new Ti({ "icon-opacity": new Ve(ne.paint_symbol["icon-opacity"]), "icon-color": new Ve(ne.paint_symbol["icon-color"]), "icon-halo-color": new Ve(ne.paint_symbol["icon-halo-color"]), "icon-halo-width": new Ve(ne.paint_symbol["icon-halo-width"]), "icon-halo-blur": new Ve(ne.paint_symbol["icon-halo-blur"]), "icon-translate": new Fe(ne.paint_symbol["icon-translate"]), "icon-translate-anchor": new Fe(ne.paint_symbol["icon-translate-anchor"]), "text-opacity": new Ve(ne.paint_symbol["text-opacity"]), "text-color": new Ve(ne.paint_symbol["text-color"], { runtimeType: ci, getOverride: (r) => r.textColor, hasOverride: (r) => !!r.textColor }), "text-halo-color": new Ve(ne.paint_symbol["text-halo-color"]), "text-halo-width": new Ve(ne.paint_symbol["text-halo-width"]), "text-halo-blur": new Ve(ne.paint_symbol["text-halo-blur"]), "text-translate": new Fe(ne.paint_symbol["text-translate"]), "text-translate-anchor": new Fe(ne.paint_symbol["text-translate-anchor"]) });
|
|
7700
7703
|
}, get layout() {
|
|
7701
|
-
return
|
|
7704
|
+
return Hu = Hu || new Ti({ "symbol-placement": new Fe(ne.layout_symbol["symbol-placement"]), "symbol-spacing": new Fe(ne.layout_symbol["symbol-spacing"]), "symbol-avoid-edges": new Fe(ne.layout_symbol["symbol-avoid-edges"]), "symbol-sort-key": new Ve(ne.layout_symbol["symbol-sort-key"]), "symbol-z-order": new Fe(ne.layout_symbol["symbol-z-order"]), "icon-allow-overlap": new Fe(ne.layout_symbol["icon-allow-overlap"]), "icon-overlap": new Fe(ne.layout_symbol["icon-overlap"]), "icon-ignore-placement": new Fe(ne.layout_symbol["icon-ignore-placement"]), "icon-optional": new Fe(ne.layout_symbol["icon-optional"]), "icon-rotation-alignment": new Fe(ne.layout_symbol["icon-rotation-alignment"]), "icon-size": new Ve(ne.layout_symbol["icon-size"]), "icon-text-fit": new Fe(ne.layout_symbol["icon-text-fit"]), "icon-text-fit-padding": new Fe(ne.layout_symbol["icon-text-fit-padding"]), "icon-image": new Ve(ne.layout_symbol["icon-image"]), "icon-rotate": new Ve(ne.layout_symbol["icon-rotate"]), "icon-padding": new Ve(ne.layout_symbol["icon-padding"]), "icon-keep-upright": new Fe(ne.layout_symbol["icon-keep-upright"]), "icon-offset": new Ve(ne.layout_symbol["icon-offset"]), "icon-anchor": new Ve(ne.layout_symbol["icon-anchor"]), "icon-pitch-alignment": new Fe(ne.layout_symbol["icon-pitch-alignment"]), "text-pitch-alignment": new Fe(ne.layout_symbol["text-pitch-alignment"]), "text-rotation-alignment": new Fe(ne.layout_symbol["text-rotation-alignment"]), "text-field": new Ve(ne.layout_symbol["text-field"]), "text-font": new Ve(ne.layout_symbol["text-font"]), "text-size": new Ve(ne.layout_symbol["text-size"]), "text-max-width": new Ve(ne.layout_symbol["text-max-width"]), "text-line-height": new Fe(ne.layout_symbol["text-line-height"]), "text-letter-spacing": new Ve(ne.layout_symbol["text-letter-spacing"]), "text-justify": new Ve(ne.layout_symbol["text-justify"]), "text-radial-offset": new Ve(ne.layout_symbol["text-radial-offset"]), "text-variable-anchor": new Fe(ne.layout_symbol["text-variable-anchor"]), "text-variable-anchor-offset": new Ve(ne.layout_symbol["text-variable-anchor-offset"]), "text-anchor": new Ve(ne.layout_symbol["text-anchor"]), "text-max-angle": new Fe(ne.layout_symbol["text-max-angle"]), "text-writing-mode": new Fe(ne.layout_symbol["text-writing-mode"]), "text-rotate": new Ve(ne.layout_symbol["text-rotate"]), "text-padding": new Fe(ne.layout_symbol["text-padding"]), "text-keep-upright": new Fe(ne.layout_symbol["text-keep-upright"]), "text-transform": new Ve(ne.layout_symbol["text-transform"]), "text-offset": new Ve(ne.layout_symbol["text-offset"]), "text-allow-overlap": new Fe(ne.layout_symbol["text-allow-overlap"]), "text-overlap": new Fe(ne.layout_symbol["text-overlap"]), "text-ignore-placement": new Fe(ne.layout_symbol["text-ignore-placement"]), "text-optional": new Fe(ne.layout_symbol["text-optional"]) });
|
|
7702
7705
|
} };
|
|
7703
|
-
class
|
|
7706
|
+
class Yu {
|
|
7704
7707
|
constructor(t) {
|
|
7705
7708
|
if (t.property.overrides === void 0) throw new Error("overrides must be provided to instantiate FormatSectionOverride class");
|
|
7706
7709
|
this.type = t.property.overrides ? t.property.overrides.runtimeType : Zn, this.defaultValue = t;
|
|
@@ -7722,7 +7725,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7722
7725
|
return null;
|
|
7723
7726
|
}
|
|
7724
7727
|
}
|
|
7725
|
-
ke("FormatSectionOverride",
|
|
7728
|
+
ke("FormatSectionOverride", Yu, { omit: ["defaultValue"] });
|
|
7726
7729
|
class Tc extends qi {
|
|
7727
7730
|
constructor(t) {
|
|
7728
7731
|
super(t, kh);
|
|
@@ -7756,7 +7759,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7756
7759
|
_setPaintOverrides() {
|
|
7757
7760
|
for (const t of kh.paint.overridableProperties) {
|
|
7758
7761
|
if (!Tc.hasPaintOverride(this.layout, t)) continue;
|
|
7759
|
-
const i = this.paint.get(t), s = new
|
|
7762
|
+
const i = this.paint.get(t), s = new Yu(i), o = new Do(s, i.property.specification);
|
|
7760
7763
|
let d = null;
|
|
7761
7764
|
d = i.value.kind === "constant" || i.value.kind === "source" ? new Os("source", o) : new Ro("composite", o, i.value.zoomStops), this.paint._values[t] = new Tr(i.property, d, i.parameters);
|
|
7762
7765
|
}
|
|
@@ -7773,25 +7776,25 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7773
7776
|
if (s.value.kind === "constant" && s.value.value instanceof vi) p(s.value.value.sections);
|
|
7774
7777
|
else if (s.value.kind === "source" || s.value.kind === "composite") {
|
|
7775
7778
|
const m = (x) => {
|
|
7776
|
-
d || (x instanceof Mr &&
|
|
7779
|
+
d || (x instanceof Mr && $e(x.value) === qr ? p(x.value.sections) : x instanceof vn ? p(x.sections) : x.eachChild(m));
|
|
7777
7780
|
}, g = s.value;
|
|
7778
7781
|
g._styleExpression && m(g._styleExpression.expression);
|
|
7779
7782
|
}
|
|
7780
7783
|
return d;
|
|
7781
7784
|
}
|
|
7782
7785
|
}
|
|
7783
|
-
let
|
|
7786
|
+
let Ku;
|
|
7784
7787
|
var df = { get paint() {
|
|
7785
|
-
return
|
|
7788
|
+
return Ku = Ku || new Ti({ "background-color": new Fe(ne.paint_background["background-color"]), "background-pattern": new Jr(ne.paint_background["background-pattern"]), "background-opacity": new Fe(ne.paint_background["background-opacity"]) });
|
|
7786
7789
|
} };
|
|
7787
7790
|
class pf extends qi {
|
|
7788
7791
|
constructor(t) {
|
|
7789
7792
|
super(t, df);
|
|
7790
7793
|
}
|
|
7791
7794
|
}
|
|
7792
|
-
let
|
|
7795
|
+
let Ju;
|
|
7793
7796
|
var ff = { get paint() {
|
|
7794
|
-
return
|
|
7797
|
+
return Ju = Ju || new Ti({ "raster-opacity": new Fe(ne.paint_raster["raster-opacity"]), "raster-hue-rotate": new Fe(ne.paint_raster["raster-hue-rotate"]), "raster-brightness-min": new Fe(ne.paint_raster["raster-brightness-min"]), "raster-brightness-max": new Fe(ne.paint_raster["raster-brightness-max"]), "raster-saturation": new Fe(ne.paint_raster["raster-saturation"]), "raster-contrast": new Fe(ne.paint_raster["raster-contrast"]), "raster-resampling": new Fe(ne.paint_raster["raster-resampling"]), "raster-fade-duration": new Fe(ne.paint_raster["raster-fade-duration"]) });
|
|
7795
7798
|
} };
|
|
7796
7799
|
class mf extends qi {
|
|
7797
7800
|
constructor(t) {
|
|
@@ -7865,24 +7868,24 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7865
7868
|
throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]");
|
|
7866
7869
|
}
|
|
7867
7870
|
}
|
|
7868
|
-
const
|
|
7869
|
-
function Qu(r) {
|
|
7870
|
-
return Ju * Math.cos(r * Math.PI / 180);
|
|
7871
|
-
}
|
|
7871
|
+
const Qu = 2 * Math.PI * Lh;
|
|
7872
7872
|
function ed(r) {
|
|
7873
|
-
return
|
|
7873
|
+
return Qu * Math.cos(r * Math.PI / 180);
|
|
7874
7874
|
}
|
|
7875
7875
|
function td(r) {
|
|
7876
|
+
return (180 + r) / 360;
|
|
7877
|
+
}
|
|
7878
|
+
function id(r) {
|
|
7876
7879
|
return (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + r * Math.PI / 360))) / 360;
|
|
7877
7880
|
}
|
|
7878
|
-
function
|
|
7879
|
-
return r /
|
|
7881
|
+
function rd(r, t) {
|
|
7882
|
+
return r / ed(t);
|
|
7880
7883
|
}
|
|
7881
7884
|
function Dh(r) {
|
|
7882
7885
|
return 360 / Math.PI * Math.atan(Math.exp((180 - 360 * r) * Math.PI / 180)) - 90;
|
|
7883
7886
|
}
|
|
7884
|
-
function
|
|
7885
|
-
return r *
|
|
7887
|
+
function nd(r, t) {
|
|
7888
|
+
return r * ed(Dh(t));
|
|
7886
7889
|
}
|
|
7887
7890
|
class ml {
|
|
7888
7891
|
constructor(t, i, s = 0) {
|
|
@@ -7890,20 +7893,20 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7890
7893
|
}
|
|
7891
7894
|
static fromLngLat(t, i = 0) {
|
|
7892
7895
|
const s = _s.convert(t);
|
|
7893
|
-
return new ml(
|
|
7896
|
+
return new ml(td(s.lng), id(s.lat), rd(i, s.lat));
|
|
7894
7897
|
}
|
|
7895
7898
|
toLngLat() {
|
|
7896
7899
|
return new _s(360 * this.x - 180, Dh(this.y));
|
|
7897
7900
|
}
|
|
7898
7901
|
toAltitude() {
|
|
7899
|
-
return
|
|
7902
|
+
return nd(this.z, this.y);
|
|
7900
7903
|
}
|
|
7901
7904
|
meterInMercatorCoordinateUnits() {
|
|
7902
|
-
return 1 /
|
|
7905
|
+
return 1 / Qu * (t = Dh(this.y), 1 / Math.cos(t * Math.PI / 180));
|
|
7903
7906
|
var t;
|
|
7904
7907
|
}
|
|
7905
7908
|
}
|
|
7906
|
-
function
|
|
7909
|
+
function sd(r, t, i) {
|
|
7907
7910
|
var s = 2 * Math.PI * 6378137 / 256 / Math.pow(2, i);
|
|
7908
7911
|
return [r * s - 2 * Math.PI * 6378137 / 2, t * s - 2 * Math.PI * 6378137 / 2];
|
|
7909
7912
|
}
|
|
@@ -7918,7 +7921,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7918
7921
|
return this.z === t.z && this.x === t.x && this.y === t.y;
|
|
7919
7922
|
}
|
|
7920
7923
|
url(t, i, s) {
|
|
7921
|
-
const o = (p = this.y, m = this.z, g =
|
|
7924
|
+
const o = (p = this.y, m = this.z, g = sd(256 * (d = this.x), 256 * (p = Math.pow(2, m) - p - 1), m), x = sd(256 * (d + 1), 256 * (p + 1), m), g[0] + "," + g[1] + "," + x[0] + "," + x[1]);
|
|
7922
7925
|
var d, p, m, g, x;
|
|
7923
7926
|
const v = function(T, M, E) {
|
|
7924
7927
|
let A, L = "";
|
|
@@ -7939,7 +7942,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7939
7942
|
return `${this.z}/${this.x}/${this.y}`;
|
|
7940
7943
|
}
|
|
7941
7944
|
}
|
|
7942
|
-
class
|
|
7945
|
+
class ad {
|
|
7943
7946
|
constructor(t, i) {
|
|
7944
7947
|
this.wrap = t, this.canonical = i, this.key = Qa(t, i.z, i.z, i.x, i.y);
|
|
7945
7948
|
}
|
|
@@ -7988,7 +7991,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7988
7991
|
return Math.pow(2, this.overscaledZ - this.canonical.z);
|
|
7989
7992
|
}
|
|
7990
7993
|
toUnwrapped() {
|
|
7991
|
-
return new
|
|
7994
|
+
return new ad(this.wrap, this.canonical);
|
|
7992
7995
|
}
|
|
7993
7996
|
toString() {
|
|
7994
7997
|
return `${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`;
|
|
@@ -8047,7 +8050,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8047
8050
|
return !this.empty() && !t.empty() && t.minX <= this.maxX && t.maxX >= this.minX && t.minY <= this.maxY && t.maxY >= this.minY;
|
|
8048
8051
|
}
|
|
8049
8052
|
}
|
|
8050
|
-
class
|
|
8053
|
+
class od {
|
|
8051
8054
|
constructor(t) {
|
|
8052
8055
|
this._stringToNumber = {}, this._numberToString = [];
|
|
8053
8056
|
for (let i = 0; i < t.length; i++) {
|
|
@@ -8063,7 +8066,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8063
8066
|
return this._numberToString[t];
|
|
8064
8067
|
}
|
|
8065
8068
|
}
|
|
8066
|
-
class
|
|
8069
|
+
class ld {
|
|
8067
8070
|
constructor(t, i, s, o, d) {
|
|
8068
8071
|
this.type = "Feature", this._vectorTileFeature = t, t._z = i, t._x = s, t._y = o, this.properties = t.properties, this.id = d;
|
|
8069
8072
|
}
|
|
@@ -8079,7 +8082,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8079
8082
|
return t;
|
|
8080
8083
|
}
|
|
8081
8084
|
}
|
|
8082
|
-
class
|
|
8085
|
+
class cd {
|
|
8083
8086
|
constructor(t, i) {
|
|
8084
8087
|
this.tileID = t, this.x = t.canonical.x, this.y = t.canonical.y, this.z = t.canonical.z, this.grid = new Gs(gt, 16, 0), this.grid3D = new Gs(gt, 16, 0), this.featureIndexArray = new K(), this.promoteId = i;
|
|
8085
8088
|
}
|
|
@@ -8097,7 +8100,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8097
8100
|
}
|
|
8098
8101
|
}
|
|
8099
8102
|
loadVTLayers() {
|
|
8100
|
-
return this.vtLayers || (this.vtLayers = new
|
|
8103
|
+
return this.vtLayers || (this.vtLayers = new Su(new Ph(this.rawTileData)).layers, this.sourceLayerCoder = new od(this.vtLayers ? Object.keys(this.vtLayers).sort() : ["_geojsonTileLayer"])), this.vtLayers;
|
|
8101
8104
|
}
|
|
8102
8105
|
query(t, i, s, o) {
|
|
8103
8106
|
this.loadVTLayers();
|
|
@@ -8141,10 +8144,10 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8141
8144
|
let W = {};
|
|
8142
8145
|
L && v && (W = v.getState(Q.sourceLayer || "_geojsonTileLayer", L));
|
|
8143
8146
|
const X = $i({}, x[V]);
|
|
8144
|
-
X.paint =
|
|
8147
|
+
X.paint = hd(X.paint, Q.paint, A, W, m), X.layout = hd(X.layout, Q.layout, A, W, m);
|
|
8145
8148
|
const ce = !T || T(A, Q, W);
|
|
8146
8149
|
if (!ce) continue;
|
|
8147
|
-
const pe = new
|
|
8150
|
+
const pe = new ld(A, this.z, this.x, this.y, L);
|
|
8148
8151
|
pe.layer = X;
|
|
8149
8152
|
let xe = t[V];
|
|
8150
8153
|
xe === void 0 && (xe = t[V] = []), xe.push({ featureIndex: o, feature: pe, intersectionZ: ce });
|
|
@@ -8167,7 +8170,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8167
8170
|
return this.promoteId && (o = t.properties[typeof this.promoteId == "string" ? this.promoteId : this.promoteId[i]], typeof o == "boolean" && (o = Number(o)), o === void 0 && (!((s = t.properties) === null || s === void 0) && s.cluster) && this.promoteId && (o = Number(t.properties.cluster_id))), o;
|
|
8168
8171
|
}
|
|
8169
8172
|
}
|
|
8170
|
-
function
|
|
8173
|
+
function hd(r, t, i, s, o) {
|
|
8171
8174
|
return Nn(r, (d, p) => {
|
|
8172
8175
|
const m = t instanceof Ba ? t.get(p) : null;
|
|
8173
8176
|
return m && m.evaluate ? m.evaluate(i, s, o) : m;
|
|
@@ -8176,7 +8179,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8176
8179
|
function xf(r, t) {
|
|
8177
8180
|
return t - r;
|
|
8178
8181
|
}
|
|
8179
|
-
function
|
|
8182
|
+
function ud(r, t, i, s, o) {
|
|
8180
8183
|
const d = [];
|
|
8181
8184
|
for (let p = 0; p < r.length; p++) {
|
|
8182
8185
|
const m = r[p];
|
|
@@ -8188,7 +8191,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8188
8191
|
}
|
|
8189
8192
|
return d;
|
|
8190
8193
|
}
|
|
8191
|
-
ke("FeatureIndex",
|
|
8194
|
+
ke("FeatureIndex", cd, { omit: ["rawTileData", "sourceLayerCoder"] });
|
|
8192
8195
|
class ys extends be {
|
|
8193
8196
|
constructor(t, i, s, o) {
|
|
8194
8197
|
super(t, i), this.angle = s, o !== void 0 && (this.segment = o);
|
|
@@ -8197,7 +8200,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8197
8200
|
return new ys(this.x, this.y, this.angle, this.segment);
|
|
8198
8201
|
}
|
|
8199
8202
|
}
|
|
8200
|
-
function
|
|
8203
|
+
function dd(r, t, i, s, o) {
|
|
8201
8204
|
if (t.segment === void 0 || i === 0) return !0;
|
|
8202
8205
|
let d = t, p = t.segment + 1, m = 0;
|
|
8203
8206
|
for (; m > -i / 2; ) {
|
|
@@ -8217,36 +8220,36 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8217
8220
|
}
|
|
8218
8221
|
return !0;
|
|
8219
8222
|
}
|
|
8220
|
-
function
|
|
8223
|
+
function pd(r) {
|
|
8221
8224
|
let t = 0;
|
|
8222
8225
|
for (let i = 0; i < r.length - 1; i++) t += r[i].dist(r[i + 1]);
|
|
8223
8226
|
return t;
|
|
8224
8227
|
}
|
|
8225
|
-
function
|
|
8228
|
+
function fd(r, t, i) {
|
|
8226
8229
|
return r ? 0.6 * t * i : 0;
|
|
8227
8230
|
}
|
|
8228
|
-
function
|
|
8231
|
+
function md(r, t) {
|
|
8229
8232
|
return Math.max(r ? r.right - r.left : 0, t ? t.right - t.left : 0);
|
|
8230
8233
|
}
|
|
8231
8234
|
function vf(r, t, i, s, o, d) {
|
|
8232
|
-
const p =
|
|
8235
|
+
const p = fd(i, o, d), m = md(i, s) * d;
|
|
8233
8236
|
let g = 0;
|
|
8234
|
-
const x =
|
|
8237
|
+
const x = pd(r) / 2;
|
|
8235
8238
|
for (let v = 0; v < r.length - 1; v++) {
|
|
8236
8239
|
const T = r[v], M = r[v + 1], E = T.dist(M);
|
|
8237
8240
|
if (g + E > x) {
|
|
8238
8241
|
const A = (x - g) / E, L = br.number(T.x, M.x, A), F = br.number(T.y, M.y, A), V = new ys(L, F, M.angleTo(T), v);
|
|
8239
|
-
return V._round(), !p ||
|
|
8242
|
+
return V._round(), !p || dd(r, V, m, p, t) ? V : void 0;
|
|
8240
8243
|
}
|
|
8241
8244
|
g += E;
|
|
8242
8245
|
}
|
|
8243
8246
|
}
|
|
8244
8247
|
function bf(r, t, i, s, o, d, p, m, g) {
|
|
8245
|
-
const x =
|
|
8246
|
-
return t - T < t / 4 && (t = T + t / 4),
|
|
8248
|
+
const x = fd(s, d, p), v = md(s, o), T = v * p, M = r[0].x === 0 || r[0].x === g || r[0].y === 0 || r[0].y === g;
|
|
8249
|
+
return t - T < t / 4 && (t = T + t / 4), gd(r, M ? t / 2 * m % t : (v / 2 + 2 * d) * p * m % t, t, x, i, T, M, !1, g);
|
|
8247
8250
|
}
|
|
8248
|
-
function
|
|
8249
|
-
const x = d / 2, v =
|
|
8251
|
+
function gd(r, t, i, s, o, d, p, m, g) {
|
|
8252
|
+
const x = d / 2, v = pd(r);
|
|
8250
8253
|
let T = 0, M = t - i, E = [];
|
|
8251
8254
|
for (let A = 0; A < r.length - 1; A++) {
|
|
8252
8255
|
const L = r[A], F = r[A + 1], V = L.dist(F), Q = F.angleTo(L);
|
|
@@ -8255,36 +8258,36 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8255
8258
|
const W = (M - T) / V, X = br.number(L.x, F.x, W), ce = br.number(L.y, F.y, W);
|
|
8256
8259
|
if (X >= 0 && X < g && ce >= 0 && ce < g && M - x >= 0 && M + x <= v) {
|
|
8257
8260
|
const pe = new ys(X, ce, Q, A);
|
|
8258
|
-
pe._round(), s && !
|
|
8261
|
+
pe._round(), s && !dd(r, pe, d, s, o) || E.push(pe);
|
|
8259
8262
|
}
|
|
8260
8263
|
}
|
|
8261
8264
|
T += V;
|
|
8262
8265
|
}
|
|
8263
|
-
return m || E.length || p || (E =
|
|
8266
|
+
return m || E.length || p || (E = gd(r, T / 2, i, s, o, d, p, !0, g)), E;
|
|
8264
8267
|
}
|
|
8265
|
-
function
|
|
8268
|
+
function _d(r, t, i, s) {
|
|
8266
8269
|
const o = [], d = r.image, p = d.pixelRatio, m = d.paddedRect.w - 2, g = d.paddedRect.h - 2;
|
|
8267
8270
|
let x = { x1: r.left, y1: r.top, x2: r.right, y2: r.bottom };
|
|
8268
|
-
const v = d.stretchX || [[0, m]], T = d.stretchY || [[0, g]], M = (ge,
|
|
8271
|
+
const v = d.stretchX || [[0, m]], T = d.stretchY || [[0, g]], M = (ge, Ze) => ge + Ze[1] - Ze[0], E = v.reduce(M, 0), A = T.reduce(M, 0), L = m - E, F = g - A;
|
|
8269
8272
|
let V = 0, Q = E, W = 0, X = A, ce = 0, pe = L, xe = 0, Ae = F;
|
|
8270
8273
|
if (d.content && s) {
|
|
8271
|
-
const ge = d.content,
|
|
8272
|
-
(d.textFitWidth || d.textFitHeight) && (x =
|
|
8274
|
+
const ge = d.content, Ze = ge[2] - ge[0], Ge = ge[3] - ge[1];
|
|
8275
|
+
(d.textFitWidth || d.textFitHeight) && (x = Gu(r)), V = Pc(v, 0, ge[0]), W = Pc(T, 0, ge[1]), Q = Pc(v, ge[0], ge[2]), X = Pc(T, ge[1], ge[3]), ce = ge[0] - V, xe = ge[1] - W, pe = Ze - Q, Ae = Ge - X;
|
|
8273
8276
|
}
|
|
8274
|
-
const Pe = x.x1, Ie = x.y1, Be = x.x2 - Pe, Me = x.y2 - Ie, Ce = (ge,
|
|
8275
|
-
const De = Sc(ge.stretch - V, Q, Be, Pe), at = Mc(ge.fixed - ce, pe, ge.stretch, E), Lt = Sc(
|
|
8277
|
+
const Pe = x.x1, Ie = x.y1, Be = x.x2 - Pe, Me = x.y2 - Ie, Ce = (ge, Ze, Ge, Ne) => {
|
|
8278
|
+
const De = Sc(ge.stretch - V, Q, Be, Pe), at = Mc(ge.fixed - ce, pe, ge.stretch, E), Lt = Sc(Ze.stretch - W, X, Me, Ie), Jt = Mc(Ze.fixed - xe, Ae, Ze.stretch, A), xi = Sc(Ge.stretch - V, Q, Be, Pe), lr = Mc(Ge.fixed - ce, pe, Ge.stretch, E), Ni = Sc(Ne.stretch - W, X, Me, Ie), ui = Mc(Ne.fixed - xe, Ae, Ne.stretch, A), Et = new be(De, Lt), si = new be(xi, Lt), di = new be(xi, Ni), pi = new be(De, Ni), Li = new be(at / p, Jt / p), cr = new be(lr / p, ui / p), ai = t * Math.PI / 180;
|
|
8276
8279
|
if (ai) {
|
|
8277
8280
|
const oi = Math.sin(ai), li = Math.cos(ai), Wt = [li, -oi, oi, li];
|
|
8278
8281
|
Et._matMult(Wt), si._matMult(Wt), pi._matMult(Wt), di._matMult(Wt);
|
|
8279
8282
|
}
|
|
8280
|
-
const Vi = ge.stretch + ge.fixed, Qt =
|
|
8281
|
-
return { tl: Et, tr: si, bl: pi, br: di, tex: { x: d.paddedRect.x + 1 + Vi, y: d.paddedRect.y + 1 + Qt, w: Ge.stretch + Ge.fixed - Vi, h:
|
|
8283
|
+
const Vi = ge.stretch + ge.fixed, Qt = Ze.stretch + Ze.fixed;
|
|
8284
|
+
return { tl: Et, tr: si, bl: pi, br: di, tex: { x: d.paddedRect.x + 1 + Vi, y: d.paddedRect.y + 1 + Qt, w: Ge.stretch + Ge.fixed - Vi, h: Ne.stretch + Ne.fixed - Qt }, writingMode: void 0, glyphOffset: [0, 0], sectionIndex: 0, pixelOffsetTL: Li, pixelOffsetBR: cr, minFontScaleX: pe / p / Be, minFontScaleY: Ae / p / Me, isSDF: i };
|
|
8282
8285
|
};
|
|
8283
8286
|
if (s && (d.stretchX || d.stretchY)) {
|
|
8284
|
-
const ge =
|
|
8287
|
+
const ge = yd(v, L, E), Ze = yd(T, F, A);
|
|
8285
8288
|
for (let Ge = 0; Ge < ge.length - 1; Ge++) {
|
|
8286
|
-
const
|
|
8287
|
-
for (let at = 0; at <
|
|
8289
|
+
const Ne = ge[Ge], De = ge[Ge + 1];
|
|
8290
|
+
for (let at = 0; at < Ze.length - 1; at++) o.push(Ce(Ne, Ze[at], De, Ze[at + 1]));
|
|
8288
8291
|
}
|
|
8289
8292
|
} else o.push(Ce({ fixed: 0, stretch: -1 }, { fixed: 0, stretch: -1 }, { fixed: 0, stretch: m + 1 }, { fixed: 0, stretch: g + 1 }));
|
|
8290
8293
|
return o;
|
|
@@ -8294,7 +8297,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8294
8297
|
for (const o of r) s += Math.max(t, Math.min(i, o[1])) - Math.max(t, Math.min(i, o[0]));
|
|
8295
8298
|
return s;
|
|
8296
8299
|
}
|
|
8297
|
-
function
|
|
8300
|
+
function yd(r, t, i) {
|
|
8298
8301
|
const s = [{ fixed: -1, stretch: 0 }];
|
|
8299
8302
|
for (const [o, d] of r) {
|
|
8300
8303
|
const p = s[s.length - 1];
|
|
@@ -8319,7 +8322,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8319
8322
|
let L = E - M;
|
|
8320
8323
|
L > 0 && (L = Math.max(10, L), this.circleDiameter = L);
|
|
8321
8324
|
} else {
|
|
8322
|
-
const M = !((T = p.image) === null || T === void 0) && T.content && (p.image.textFitWidth || p.image.textFitHeight) ?
|
|
8325
|
+
const M = !((T = p.image) === null || T === void 0) && T.content && (p.image.textFitWidth || p.image.textFitHeight) ? Gu(p) : { x1: p.left, y1: p.top, x2: p.right, y2: p.bottom };
|
|
8323
8326
|
M.y1 = M.y1 * m - g[0], M.y2 = M.y2 * m + g[2], M.x1 = M.x1 * m - g[3], M.x2 = M.x2 * m + g[1];
|
|
8324
8327
|
const E = p.collisionPadding;
|
|
8325
8328
|
if (E && (M.x1 -= E[0] * m, M.y1 -= E[1] * m, M.x2 += E[2] * m, M.y2 += E[3] * m), v) {
|
|
@@ -8397,7 +8400,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8397
8400
|
const x = d[g];
|
|
8398
8401
|
for (let v = 0, T = x.length, M = T - 1; v < T; M = v++) {
|
|
8399
8402
|
const E = x[v], A = x[M];
|
|
8400
|
-
E.y > o.y != A.y > o.y && o.x < (A.x - E.x) * (o.y - E.y) / (A.y - E.y) + E.x && (p = !p), m = Math.min(m,
|
|
8403
|
+
E.y > o.y != A.y > o.y && o.x < (A.x - E.x) * (o.y - E.y) / (A.y - E.y) + E.x && (p = !p), m = Math.min(m, iu(o, E, A));
|
|
8401
8404
|
}
|
|
8402
8405
|
}
|
|
8403
8406
|
return (p ? 1 : -1) * Math.sqrt(m);
|
|
@@ -8406,7 +8409,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8406
8409
|
var yi;
|
|
8407
8410
|
C.aE = void 0, (yi = C.aE || (C.aE = {}))[yi.center = 1] = "center", yi[yi.left = 2] = "left", yi[yi.right = 3] = "right", yi[yi.top = 4] = "top", yi[yi.bottom = 5] = "bottom", yi[yi["top-left"] = 6] = "top-left", yi[yi["top-right"] = 7] = "top-right", yi[yi["bottom-left"] = 8] = "bottom-left", yi[yi["bottom-right"] = 9] = "bottom-right";
|
|
8408
8411
|
const Fh = Number.POSITIVE_INFINITY;
|
|
8409
|
-
function
|
|
8412
|
+
function xd(r, t) {
|
|
8410
8413
|
return t[1] !== Fh ? function(i, s, o) {
|
|
8411
8414
|
let d = 0, p = 0;
|
|
8412
8415
|
switch (s = Math.abs(s), o = Math.abs(o), i) {
|
|
@@ -8469,7 +8472,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8469
8472
|
return [o, d];
|
|
8470
8473
|
}(r, t[0]);
|
|
8471
8474
|
}
|
|
8472
|
-
function
|
|
8475
|
+
function vd(r, t, i) {
|
|
8473
8476
|
var s;
|
|
8474
8477
|
const o = r.layout, d = (s = o.get("text-variable-anchor-offset")) === null || s === void 0 ? void 0 : s.evaluate(t, {}, i);
|
|
8475
8478
|
if (d) {
|
|
@@ -8485,7 +8488,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8485
8488
|
let m;
|
|
8486
8489
|
m = r._unevaluatedLayout.getValue("text-radial-offset") !== void 0 ? [o.get("text-radial-offset").evaluate(t, {}, i) * ni, Fh] : o.get("text-offset").evaluate(t, {}, i).map((x) => x * ni);
|
|
8487
8490
|
const g = [];
|
|
8488
|
-
for (const x of p) g.push(x,
|
|
8491
|
+
for (const x of p) g.push(x, xd(x, m));
|
|
8489
8492
|
return new wi(g);
|
|
8490
8493
|
}
|
|
8491
8494
|
return null;
|
|
@@ -8506,48 +8509,48 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8506
8509
|
function Sf(r, t, i, s, o, d, p, m, g, x, v, T) {
|
|
8507
8510
|
let M = d.textMaxSize.evaluate(t, {});
|
|
8508
8511
|
M === void 0 && (M = p);
|
|
8509
|
-
const E = r.layers[0].layout, A = E.get("icon-offset").evaluate(t, {}, v), L =
|
|
8510
|
-
const Lt = Ge.get("icon-padding").evaluate(
|
|
8512
|
+
const E = r.layers[0].layout, A = E.get("icon-offset").evaluate(t, {}, v), L = wd(i.horizontal), F = p / 24, V = r.tilePixelRatio * F, Q = r.tilePixelRatio * M / 24, W = r.tilePixelRatio * m, X = r.tilePixelRatio * E.get("symbol-spacing"), ce = E.get("text-padding") * r.tilePixelRatio, pe = function(Ge, Ne, De, at = 1) {
|
|
8513
|
+
const Lt = Ge.get("icon-padding").evaluate(Ne, {}, De), Jt = Lt && Lt.values;
|
|
8511
8514
|
return [Jt[0] * at, Jt[1] * at, Jt[2] * at, Jt[3] * at];
|
|
8512
8515
|
}(E, t, v, r.tilePixelRatio), xe = E.get("text-max-angle") / 180 * Math.PI, Ae = E.get("text-rotation-alignment") !== "viewport" && E.get("symbol-placement") !== "point", Pe = E.get("icon-rotation-alignment") === "map" && E.get("symbol-placement") !== "point", Ie = E.get("symbol-placement"), Be = X / 2, Me = E.get("icon-text-fit");
|
|
8513
8516
|
let Ce;
|
|
8514
|
-
s && Me !== "none" && (r.allowVerticalPlacement && i.vertical && (Ce =
|
|
8515
|
-
const ge = v ? T.line.getGranularityForZoomLevel(v.z) : 1,
|
|
8516
|
-
|
|
8517
|
+
s && Me !== "none" && (r.allowVerticalPlacement && i.vertical && (Ce = qu(s, i.vertical, Me, E.get("icon-text-fit-padding"), A, F)), L && (s = qu(s, L, Me, E.get("icon-text-fit-padding"), A, F)));
|
|
8518
|
+
const ge = v ? T.line.getGranularityForZoomLevel(v.z) : 1, Ze = (Ge, Ne) => {
|
|
8519
|
+
Ne.x < 0 || Ne.x >= gt || Ne.y < 0 || Ne.y >= gt || function(De, at, Lt, Jt, xi, lr, Ni, ui, Et, si, di, pi, Li, cr, ai, Vi, Qt, oi, li, Wt, St, zr, to, kr, Cf) {
|
|
8517
8520
|
const io = De.addToLineVertexArray(at, Lt);
|
|
8518
|
-
let Js, ro, no, so,
|
|
8521
|
+
let Js, ro, no, so, Md = 0, Id = 0, Cd = 0, Ed = 0, Gh = -1, qh = -1;
|
|
8519
8522
|
const Rn = {};
|
|
8520
|
-
let
|
|
8523
|
+
let Ad = ps("");
|
|
8521
8524
|
if (De.allowVerticalPlacement && Jt.vertical) {
|
|
8522
8525
|
const Mi = ui.layout.get("text-rotate").evaluate(St, {}, kr) + 90;
|
|
8523
8526
|
no = new Ic(Et, at, si, di, pi, Jt.vertical, Li, cr, ai, Mi), Ni && (so = new Ic(Et, at, si, di, pi, Ni, Qt, oi, ai, Mi));
|
|
8524
8527
|
}
|
|
8525
8528
|
if (xi) {
|
|
8526
|
-
const Mi = ui.layout.get("icon-rotate").evaluate(St, {}), hr = ui.layout.get("icon-text-fit") !== "none", Qs =
|
|
8527
|
-
ro = new Ic(Et, at, si, di, pi, xi, Qt, oi, !1, Mi),
|
|
8529
|
+
const Mi = ui.layout.get("icon-rotate").evaluate(St, {}), hr = ui.layout.get("icon-text-fit") !== "none", Qs = _d(xi, Mi, to, hr), Dr = Ni ? _d(Ni, Mi, to, hr) : void 0;
|
|
8530
|
+
ro = new Ic(Et, at, si, di, pi, xi, Qt, oi, !1, Mi), Md = 4 * Qs.length;
|
|
8528
8531
|
const ea = De.iconSizeData;
|
|
8529
8532
|
let sn = null;
|
|
8530
|
-
ea.kind === "source" ? (sn = [Dn * ui.layout.get("icon-size").evaluate(St, {})], sn[0] > gs && jt(`${De.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)) : ea.kind === "composite" && (sn = [Dn * zr.compositeIconSizes[0].evaluate(St, {}, kr), Dn * zr.compositeIconSizes[1].evaluate(St, {}, kr)], (sn[0] > gs || sn[1] > gs) && jt(`${De.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)), De.addSymbols(De.icon, Qs, sn, Wt, li, St, C.ao.none, at, io.lineStartIndex, io.lineLength, -1, kr), Gh = De.icon.placedSymbolArray.length - 1, Dr && (
|
|
8533
|
+
ea.kind === "source" ? (sn = [Dn * ui.layout.get("icon-size").evaluate(St, {})], sn[0] > gs && jt(`${De.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)) : ea.kind === "composite" && (sn = [Dn * zr.compositeIconSizes[0].evaluate(St, {}, kr), Dn * zr.compositeIconSizes[1].evaluate(St, {}, kr)], (sn[0] > gs || sn[1] > gs) && jt(`${De.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)), De.addSymbols(De.icon, Qs, sn, Wt, li, St, C.ao.none, at, io.lineStartIndex, io.lineLength, -1, kr), Gh = De.icon.placedSymbolArray.length - 1, Dr && (Id = 4 * Dr.length, De.addSymbols(De.icon, Dr, sn, Wt, li, St, C.ao.vertical, at, io.lineStartIndex, io.lineLength, -1, kr), qh = De.icon.placedSymbolArray.length - 1);
|
|
8531
8534
|
}
|
|
8532
|
-
const
|
|
8533
|
-
for (const Mi of
|
|
8535
|
+
const zd = Object.keys(Jt.horizontal);
|
|
8536
|
+
for (const Mi of zd) {
|
|
8534
8537
|
const hr = Jt.horizontal[Mi];
|
|
8535
8538
|
if (!Js) {
|
|
8536
|
-
|
|
8539
|
+
Ad = ps(hr.text);
|
|
8537
8540
|
const Dr = ui.layout.get("text-rotate").evaluate(St, {}, kr);
|
|
8538
8541
|
Js = new Ic(Et, at, si, di, pi, hr, Li, cr, ai, Dr);
|
|
8539
8542
|
}
|
|
8540
8543
|
const Qs = hr.positionedLines.length === 1;
|
|
8541
|
-
if (
|
|
8544
|
+
if (Cd += bd(De, at, hr, lr, ui, ai, St, Vi, io, Jt.vertical ? C.ao.horizontal : C.ao.horizontalOnly, Qs ? zd : [Mi], Rn, Gh, zr, kr), Qs) break;
|
|
8542
8545
|
}
|
|
8543
|
-
Jt.vertical && (
|
|
8546
|
+
Jt.vertical && (Ed += bd(De, at, Jt.vertical, lr, ui, ai, St, Vi, io, C.ao.vertical, ["vertical"], Rn, qh, zr, kr));
|
|
8544
8547
|
const Ef = Js ? Js.boxStartIndex : De.collisionBoxArray.length, Af = Js ? Js.boxEndIndex : De.collisionBoxArray.length, zf = no ? no.boxStartIndex : De.collisionBoxArray.length, kf = no ? no.boxEndIndex : De.collisionBoxArray.length, Lf = ro ? ro.boxStartIndex : De.collisionBoxArray.length, Df = ro ? ro.boxEndIndex : De.collisionBoxArray.length, Rf = so ? so.boxStartIndex : De.collisionBoxArray.length, Ff = so ? so.boxEndIndex : De.collisionBoxArray.length;
|
|
8545
8548
|
let Lr = -1;
|
|
8546
8549
|
const Ec = (Mi, hr) => Mi && Mi.circleDiameter ? Math.max(Mi.circleDiameter, hr) : hr;
|
|
8547
8550
|
Lr = Ec(Js, Lr), Lr = Ec(no, Lr), Lr = Ec(ro, Lr), Lr = Ec(so, Lr);
|
|
8548
|
-
const
|
|
8549
|
-
|
|
8550
|
-
const Bf =
|
|
8551
|
+
const kd = Lr > -1 ? 1 : 0;
|
|
8552
|
+
kd && (Lr *= Cf / ni), De.glyphOffsetArray.length >= Ja.MAX_GLYPHS && jt("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"), St.sortKey !== void 0 && De.addToSortKeyRanges(De.symbolInstances.length, St.sortKey);
|
|
8553
|
+
const Bf = vd(ui, St, kr), [Of, jf] = function(Mi, hr) {
|
|
8551
8554
|
const Qs = Mi.length, Dr = hr == null ? void 0 : hr.values;
|
|
8552
8555
|
if ((Dr == null ? void 0 : Dr.length) > 0) for (let ea = 0; ea < Dr.length; ea += 2) {
|
|
8553
8556
|
const sn = Dr[ea + 1];
|
|
@@ -8555,44 +8558,44 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8555
8558
|
}
|
|
8556
8559
|
return [Qs, Mi.length];
|
|
8557
8560
|
}(De.textAnchorOffsets, Bf);
|
|
8558
|
-
De.symbolInstances.emplaceBack(at.x, at.y, Rn.right >= 0 ? Rn.right : -1, Rn.center >= 0 ? Rn.center : -1, Rn.left >= 0 ? Rn.left : -1, Rn.vertical || -1, Gh, qh,
|
|
8559
|
-
}(r,
|
|
8561
|
+
De.symbolInstances.emplaceBack(at.x, at.y, Rn.right >= 0 ? Rn.right : -1, Rn.center >= 0 ? Rn.center : -1, Rn.left >= 0 ? Rn.left : -1, Rn.vertical || -1, Gh, qh, Ad, Ef, Af, zf, kf, Lf, Df, Rf, Ff, si, Cd, Ed, Md, Id, kd, 0, Li, Lr, Of, jf);
|
|
8562
|
+
}(r, Ne, Ge, i, s, o, Ce, r.layers[0], r.collisionBoxArray, t.index, t.sourceLayerIndex, r.index, V, [ce, ce, ce, ce], Ae, g, W, pe, Pe, A, t, d, x, v, p);
|
|
8560
8563
|
};
|
|
8561
|
-
if (Ie === "line") for (const Ge of
|
|
8562
|
-
const
|
|
8563
|
-
for (const at of De) L && Mf(r, L.text, Be, at) ||
|
|
8564
|
+
if (Ie === "line") for (const Ge of ud(t.geometry, 0, 0, gt, gt)) {
|
|
8565
|
+
const Ne = Ys(Ge, ge), De = bf(Ne, X, xe, i.vertical || L, s, 24, Q, r.overscaling, gt);
|
|
8566
|
+
for (const at of De) L && Mf(r, L.text, Be, at) || Ze(Ne, at);
|
|
8564
8567
|
}
|
|
8565
8568
|
else if (Ie === "line-center") {
|
|
8566
8569
|
for (const Ge of t.geometry) if (Ge.length > 1) {
|
|
8567
|
-
const
|
|
8568
|
-
De &&
|
|
8570
|
+
const Ne = Ys(Ge, ge), De = vf(Ne, xe, i.vertical || L, s, 24, Q);
|
|
8571
|
+
De && Ze(Ne, De);
|
|
8569
8572
|
}
|
|
8570
8573
|
} else if (t.type === "Polygon") for (const Ge of Ls(t.geometry, 0)) {
|
|
8571
|
-
const
|
|
8572
|
-
|
|
8574
|
+
const Ne = Tf(Ge, 16);
|
|
8575
|
+
Ze(Ys(Ge[0], ge, !0), new ys(Ne.x, Ne.y, 0));
|
|
8573
8576
|
}
|
|
8574
8577
|
else if (t.type === "LineString") for (const Ge of t.geometry) {
|
|
8575
|
-
const
|
|
8576
|
-
|
|
8578
|
+
const Ne = Ys(Ge, ge);
|
|
8579
|
+
Ze(Ne, new ys(Ne[0].x, Ne[0].y, 0));
|
|
8577
8580
|
}
|
|
8578
|
-
else if (t.type === "Point") for (const Ge of t.geometry) for (const
|
|
8581
|
+
else if (t.type === "Point") for (const Ge of t.geometry) for (const Ne of Ge) Ze([Ne], new ys(Ne.x, Ne.y, 0));
|
|
8579
8582
|
}
|
|
8580
|
-
function
|
|
8583
|
+
function bd(r, t, i, s, o, d, p, m, g, x, v, T, M, E, A) {
|
|
8581
8584
|
const L = function(Q, W, X, ce, pe, xe, Ae, Pe) {
|
|
8582
8585
|
const Ie = ce.layout.get("text-rotate").evaluate(xe, {}) * Math.PI / 180, Be = [];
|
|
8583
8586
|
for (const Me of W.positionedLines) for (const Ce of Me.positionedGlyphs) {
|
|
8584
8587
|
if (!Ce.rect) continue;
|
|
8585
8588
|
const ge = Ce.rect || {};
|
|
8586
|
-
let
|
|
8589
|
+
let Ze = 4, Ge = !0, Ne = 1, De = 0;
|
|
8587
8590
|
const at = (pe || Pe) && Ce.vertical, Lt = Ce.metrics.advance * Ce.scale / 2;
|
|
8588
8591
|
if (Pe && W.verticalizable && (De = Me.lineOffset / 2 - (Ce.imageName ? -(ni - Ce.metrics.width * Ce.scale) / 2 : (Ce.scale - 1) * ni)), Ce.imageName) {
|
|
8589
8592
|
const oi = Ae[Ce.imageName];
|
|
8590
|
-
Ge = oi.sdf,
|
|
8593
|
+
Ge = oi.sdf, Ne = oi.pixelRatio, Ze = 1 / Ne;
|
|
8591
8594
|
}
|
|
8592
8595
|
const Jt = pe ? [Ce.x + Lt, Ce.y] : [0, 0];
|
|
8593
8596
|
let xi = pe ? [0, 0] : [Ce.x + Lt + X[0], Ce.y + X[1] - De], lr = [0, 0];
|
|
8594
8597
|
at && (lr = xi, xi = [0, 0]);
|
|
8595
|
-
const Ni = Ce.metrics.isDoubleResolution ? 2 : 1, ui = (Ce.metrics.left -
|
|
8598
|
+
const Ni = Ce.metrics.isDoubleResolution ? 2 : 1, ui = (Ce.metrics.left - Ze) * Ce.scale - Lt + xi[0], Et = (-Ce.metrics.top - Ze) * Ce.scale + xi[1], si = ui + ge.w / Ni * Ce.scale / Ne, di = Et + ge.h / Ni * Ce.scale / Ne, pi = new be(ui, Et), Li = new be(si, Et), cr = new be(ui, di), ai = new be(si, di);
|
|
8596
8599
|
if (at) {
|
|
8597
8600
|
const oi = new be(-Lt, Lt - -17), li = -Math.PI / 2, Wt = 12 - Lt, St = new be(22 - Wt, -(Ce.imageName ? Wt : 0)), zr = new be(...lr);
|
|
8598
8601
|
pi._rotateAround(li, oi)._add(St)._add(zr), Li._rotateAround(li, oi)._add(St)._add(zr), cr._rotateAround(li, oi)._add(St)._add(zr), ai._rotateAround(li, oi)._add(St)._add(zr);
|
|
@@ -8611,7 +8614,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8611
8614
|
for (const Q of v) T[Q] = r.text.placedSymbolArray.length - 1;
|
|
8612
8615
|
return 4 * L.length;
|
|
8613
8616
|
}
|
|
8614
|
-
function
|
|
8617
|
+
function wd(r) {
|
|
8615
8618
|
for (const t in r) return r[t];
|
|
8616
8619
|
return null;
|
|
8617
8620
|
}
|
|
@@ -8623,7 +8626,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8623
8626
|
} else o[t] = [];
|
|
8624
8627
|
return o[t].push(s), !1;
|
|
8625
8628
|
}
|
|
8626
|
-
const
|
|
8629
|
+
const Td = [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array];
|
|
8627
8630
|
class Oh {
|
|
8628
8631
|
static from(t) {
|
|
8629
8632
|
if (!(t instanceof ArrayBuffer)) throw new Error("Data must be an instance of ArrayBuffer.");
|
|
@@ -8631,7 +8634,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8631
8634
|
if (i !== 219) throw new Error("Data does not appear to be in a KDBush format.");
|
|
8632
8635
|
const o = s >> 4;
|
|
8633
8636
|
if (o !== 1) throw new Error(`Got v${o} data when expected v1.`);
|
|
8634
|
-
const d =
|
|
8637
|
+
const d = Td[15 & s];
|
|
8635
8638
|
if (!d) throw new Error("Unrecognized array type.");
|
|
8636
8639
|
const [p] = new Uint16Array(t, 2, 1), [m] = new Uint32Array(t, 4, 1);
|
|
8637
8640
|
return new Oh(m, p, d, t);
|
|
@@ -8639,7 +8642,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8639
8642
|
constructor(t, i = 64, s = Float64Array, o) {
|
|
8640
8643
|
if (isNaN(t) || t < 0) throw new Error(`Unpexpected numItems value: ${t}.`);
|
|
8641
8644
|
this.numItems = +t, this.nodeSize = Math.min(Math.max(+i, 2), 65535), this.ArrayType = s, this.IndexArrayType = t < 65536 ? Uint16Array : Uint32Array;
|
|
8642
|
-
const d =
|
|
8645
|
+
const d = Td.indexOf(this.ArrayType), p = 2 * t * this.ArrayType.BYTES_PER_ELEMENT, m = t * this.IndexArrayType.BYTES_PER_ELEMENT, g = (8 - m % 8) % 8;
|
|
8643
8646
|
if (d < 0) throw new Error(`Unexpected typed array class: ${s}.`);
|
|
8644
8647
|
o && o instanceof ArrayBuffer ? (this.data = o, this.ids = new this.IndexArrayType(this.data, 8, t), this.coords = new this.ArrayType(this.data, 8 + m + g, 2 * t), this._pos = 2 * t, this._finished = !0) : (this.data = new ArrayBuffer(8 + p + m + g), this.ids = new this.IndexArrayType(this.data, 8, t), this.coords = new this.ArrayType(this.data, 8 + m + g, 2 * t), this._pos = 0, this._finished = !1, new Uint8Array(this.data, 0, 2).set([219, 16 + d]), new Uint16Array(this.data, 2, 1)[0] = i, new Uint32Array(this.data, 4, 1)[0] = t);
|
|
8645
8648
|
}
|
|
@@ -8675,11 +8678,11 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8675
8678
|
for (; m.length; ) {
|
|
8676
8679
|
const v = m.pop() || 0, T = m.pop() || 0, M = m.pop() || 0;
|
|
8677
8680
|
if (T - M <= p) {
|
|
8678
|
-
for (let F = M; F <= T; F++)
|
|
8681
|
+
for (let F = M; F <= T; F++) Sd(d[2 * F], d[2 * F + 1], t, i) <= x && g.push(o[F]);
|
|
8679
8682
|
continue;
|
|
8680
8683
|
}
|
|
8681
8684
|
const E = M + T >> 1, A = d[2 * E], L = d[2 * E + 1];
|
|
8682
|
-
|
|
8685
|
+
Sd(A, L, t, i) <= x && g.push(o[E]), (v === 0 ? t - s <= A : i - s <= L) && (m.push(M), m.push(E - 1), m.push(1 - v)), (v === 0 ? t + s >= A : i + s >= L) && (m.push(E + 1), m.push(T), m.push(1 - v));
|
|
8683
8686
|
}
|
|
8684
8687
|
return g;
|
|
8685
8688
|
}
|
|
@@ -8687,13 +8690,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8687
8690
|
function jh(r, t, i, s, o, d) {
|
|
8688
8691
|
if (o - s <= i) return;
|
|
8689
8692
|
const p = s + o >> 1;
|
|
8690
|
-
|
|
8693
|
+
Pd(r, t, p, s, o, d), jh(r, t, i, s, p - 1, 1 - d), jh(r, t, i, p + 1, o, 1 - d);
|
|
8691
8694
|
}
|
|
8692
|
-
function
|
|
8695
|
+
function Pd(r, t, i, s, o, d) {
|
|
8693
8696
|
for (; o > s; ) {
|
|
8694
8697
|
if (o - s > 600) {
|
|
8695
8698
|
const x = o - s + 1, v = i - s + 1, T = Math.log(x), M = 0.5 * Math.exp(2 * T / 3), E = 0.5 * Math.sqrt(T * M * (x - M) / x) * (v - x / 2 < 0 ? -1 : 1);
|
|
8696
|
-
|
|
8699
|
+
Pd(r, t, i, Math.max(s, Math.floor(i - v * M / x + E)), Math.min(o, Math.floor(i + (x - v) * M / x + E)), d);
|
|
8697
8700
|
}
|
|
8698
8701
|
const p = t[2 * i + d];
|
|
8699
8702
|
let m = s, g = o;
|
|
@@ -8711,7 +8714,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8711
8714
|
const s = r[t];
|
|
8712
8715
|
r[t] = r[i], r[i] = s;
|
|
8713
8716
|
}
|
|
8714
|
-
function
|
|
8717
|
+
function Sd(r, t, i, s) {
|
|
8715
8718
|
const o = r - i, d = t - s;
|
|
8716
8719
|
return o * o + d * d;
|
|
8717
8720
|
}
|
|
@@ -8824,7 +8827,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8824
8827
|
o in r && (i[o] = r[o]);
|
|
8825
8828
|
}
|
|
8826
8829
|
return i;
|
|
8827
|
-
}, C.R = ji, C.S = _s, C.T = fh, C.U =
|
|
8830
|
+
}, C.R = ji, C.S = _s, C.T = fh, C.U = id, C.V = td, C.W = Di, C.X = Ii, C.Y = Un, C.Z = or, C._ = c, C.a = k, C.a$ = Fr, C.a0 = function(r, t) {
|
|
8828
8831
|
var i, s, o, d, p;
|
|
8829
8832
|
if (!r) return t ?? {};
|
|
8830
8833
|
if (!t) return r;
|
|
@@ -8877,7 +8880,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8877
8880
|
i = [i[0] * m - i[1] * p, i[0] * p + i[1] * m];
|
|
8878
8881
|
}
|
|
8879
8882
|
return [o ? i[0] : cn(t, i[0], r.zoom), o ? i[1] : cn(t, i[1], r.zoom)];
|
|
8880
|
-
}, C.aF = Ch, C.aG = Bh, C.aH = Ih, C.aI = Oh, C.aJ = Bt, C.aK = yc, C.aL = G, C.aM = Xe, C.aN = yt, C.aO = jn, C.aP = Vr, C.aQ =
|
|
8883
|
+
}, C.aF = Ch, C.aG = Bh, C.aH = Ih, C.aI = Oh, C.aJ = Bt, C.aK = yc, C.aL = G, C.aM = Xe, C.aN = yt, C.aO = jn, C.aP = Vr, C.aQ = nd, C.aR = dr, C.aS = xs, C.aT = function(r) {
|
|
8881
8884
|
var t = new ft(3);
|
|
8882
8885
|
return t[0] = r[0], t[1] = r[1], t[2] = r[2], t;
|
|
8883
8886
|
}, C.aU = function(r, t, i) {
|
|
@@ -8892,7 +8895,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8892
8895
|
}, C.aZ = On, C.a_ = function(r, t, i) {
|
|
8893
8896
|
const s = t[0] * i[0] + t[1] * i[1] + t[2] * i[2];
|
|
8894
8897
|
return s === 0 ? null : (-(r[0] * i[0] + r[1] * i[1] + r[2] * i[2]) - i[3]) / s;
|
|
8895
|
-
}, C.aa = Mn, C.ab = Ar, C.ac =
|
|
8898
|
+
}, C.aa = Mn, C.ab = Ar, C.ac = ld, C.ad = function(r) {
|
|
8896
8899
|
const t = {};
|
|
8897
8900
|
if (r.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g, (i, s, o, d) => {
|
|
8898
8901
|
const p = o || d;
|
|
@@ -8904,7 +8907,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8904
8907
|
return t;
|
|
8905
8908
|
}, C.ae = pn, C.af = function(r) {
|
|
8906
8909
|
return Math.pow(2, r);
|
|
8907
|
-
}, C.ag = Ui, C.ah = Ci, C.ai = 85.051129, C.aj =
|
|
8910
|
+
}, C.ag = Ui, C.ah = Ci, C.ai = 85.051129, C.aj = rd, C.ak = function(r) {
|
|
8908
8911
|
return Math.log(r) / Math.LN2;
|
|
8909
8912
|
}, C.al = function(r) {
|
|
8910
8913
|
var t = r[0], i = r[1];
|
|
@@ -8938,12 +8941,12 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8938
8941
|
if (g === 0) return null;
|
|
8939
8942
|
const x = (m * (r.y - i.y) - p * (r.x - i.x)) / g;
|
|
8940
8943
|
return new be(r.x + x * d, r.y + x * o);
|
|
8941
|
-
}, C.ay =
|
|
8944
|
+
}, C.ay = ud, C.az = eu, C.b = gr, C.b$ = class extends h {
|
|
8942
8945
|
}, C.b0 = function(r, t, i) {
|
|
8943
8946
|
return r[0] = t[0] * i, r[1] = t[1] * i, r[2] = t[2] * i, r[3] = t[3] * i, r;
|
|
8944
8947
|
}, C.b1 = function(r, t) {
|
|
8945
8948
|
return r[0] * t[0] + r[1] * t[1] + r[2] * t[2] + r[3];
|
|
8946
|
-
}, C.b2 =
|
|
8949
|
+
}, C.b2 = ad, C.b3 = Qa, C.b4 = function(r, t, i, s, o) {
|
|
8947
8950
|
var d = 1 / Math.tan(t / 2);
|
|
8948
8951
|
if (r[0] = d / i, r[1] = 0, r[2] = 0, r[3] = 0, r[4] = 0, r[5] = d, r[6] = 0, r[7] = 0, r[8] = 0, r[9] = 0, r[11] = -1, r[12] = 0, r[13] = 0, r[15] = 0, o != null && o !== 1 / 0) {
|
|
8949
8952
|
var p = 1 / (s - o);
|
|
@@ -9176,7 +9179,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
9176
9179
|
}, C.c = ee, C.c0 = Np, C.c1 = class extends n {
|
|
9177
9180
|
}, C.c2 = ph, C.c3 = function(r) {
|
|
9178
9181
|
return r <= 1 ? 1 : Math.pow(2, Math.ceil(Math.log(r) / Math.LN2));
|
|
9179
|
-
}, C.c4 =
|
|
9182
|
+
}, C.c4 = hu, C.c5 = function(r, t, i) {
|
|
9180
9183
|
var s = t[0], o = t[1], d = t[2], p = i[3] * s + i[7] * o + i[11] * d + i[15];
|
|
9181
9184
|
return r[0] = (i[0] * s + i[4] * o + i[8] * d + i[12]) / (p = p || 1), r[1] = (i[1] * s + i[5] * o + i[9] * d + i[13]) / p, r[2] = (i[2] * s + i[6] * o + i[10] * d + i[14]) / p, r;
|
|
9182
9185
|
}, C.c6 = class extends Jo {
|
|
@@ -9184,8 +9187,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
9184
9187
|
}, C.c8 = function(r, t) {
|
|
9185
9188
|
return r[0] === t[0] && r[1] === t[1] && r[2] === t[2] && r[3] === t[3] && r[4] === t[4] && r[5] === t[5] && r[6] === t[6] && r[7] === t[7] && r[8] === t[8] && r[9] === t[9] && r[10] === t[10] && r[11] === t[11] && r[12] === t[12] && r[13] === t[13] && r[14] === t[14] && r[15] === t[15];
|
|
9186
9189
|
}, C.c9 = function(r, t) {
|
|
9187
|
-
var i = r[0], s = r[1], o = r[2], d = r[3], p = r[4], m = r[5], g = r[6], x = r[7], v = r[8], T = r[9], M = r[10], E = r[11], A = r[12], L = r[13], F = r[14], V = r[15], Q = t[0], W = t[1], X = t[2], ce = t[3], pe = t[4], xe = t[5], Ae = t[6], Pe = t[7], Ie = t[8], Be = t[9], Me = t[10], Ce = t[11], ge = t[12],
|
|
9188
|
-
return Math.abs(i - Q) <= It * Math.max(1, Math.abs(i), Math.abs(Q)) && Math.abs(s - W) <= It * Math.max(1, Math.abs(s), Math.abs(W)) && Math.abs(o - X) <= It * Math.max(1, Math.abs(o), Math.abs(X)) && Math.abs(d - ce) <= It * Math.max(1, Math.abs(d), Math.abs(ce)) && Math.abs(p - pe) <= It * Math.max(1, Math.abs(p), Math.abs(pe)) && Math.abs(m - xe) <= It * Math.max(1, Math.abs(m), Math.abs(xe)) && Math.abs(g - Ae) <= It * Math.max(1, Math.abs(g), Math.abs(Ae)) && Math.abs(x - Pe) <= It * Math.max(1, Math.abs(x), Math.abs(Pe)) && Math.abs(v - Ie) <= It * Math.max(1, Math.abs(v), Math.abs(Ie)) && Math.abs(T - Be) <= It * Math.max(1, Math.abs(T), Math.abs(Be)) && Math.abs(M - Me) <= It * Math.max(1, Math.abs(M), Math.abs(Me)) && Math.abs(E - Ce) <= It * Math.max(1, Math.abs(E), Math.abs(Ce)) && Math.abs(A - ge) <= It * Math.max(1, Math.abs(A), Math.abs(ge)) && Math.abs(L -
|
|
9190
|
+
var i = r[0], s = r[1], o = r[2], d = r[3], p = r[4], m = r[5], g = r[6], x = r[7], v = r[8], T = r[9], M = r[10], E = r[11], A = r[12], L = r[13], F = r[14], V = r[15], Q = t[0], W = t[1], X = t[2], ce = t[3], pe = t[4], xe = t[5], Ae = t[6], Pe = t[7], Ie = t[8], Be = t[9], Me = t[10], Ce = t[11], ge = t[12], Ze = t[13], Ge = t[14], Ne = t[15];
|
|
9191
|
+
return Math.abs(i - Q) <= It * Math.max(1, Math.abs(i), Math.abs(Q)) && Math.abs(s - W) <= It * Math.max(1, Math.abs(s), Math.abs(W)) && Math.abs(o - X) <= It * Math.max(1, Math.abs(o), Math.abs(X)) && Math.abs(d - ce) <= It * Math.max(1, Math.abs(d), Math.abs(ce)) && Math.abs(p - pe) <= It * Math.max(1, Math.abs(p), Math.abs(pe)) && Math.abs(m - xe) <= It * Math.max(1, Math.abs(m), Math.abs(xe)) && Math.abs(g - Ae) <= It * Math.max(1, Math.abs(g), Math.abs(Ae)) && Math.abs(x - Pe) <= It * Math.max(1, Math.abs(x), Math.abs(Pe)) && Math.abs(v - Ie) <= It * Math.max(1, Math.abs(v), Math.abs(Ie)) && Math.abs(T - Be) <= It * Math.max(1, Math.abs(T), Math.abs(Be)) && Math.abs(M - Me) <= It * Math.max(1, Math.abs(M), Math.abs(Me)) && Math.abs(E - Ce) <= It * Math.max(1, Math.abs(E), Math.abs(Ce)) && Math.abs(A - ge) <= It * Math.max(1, Math.abs(A), Math.abs(ge)) && Math.abs(L - Ze) <= It * Math.max(1, Math.abs(L), Math.abs(Ze)) && Math.abs(F - Ge) <= It * Math.max(1, Math.abs(F), Math.abs(Ge)) && Math.abs(V - Ne) <= It * Math.max(1, Math.abs(V), Math.abs(Ne));
|
|
9189
9192
|
}, C.cA = function(r, t) {
|
|
9190
9193
|
k.REGISTERED_PROTOCOLS[r] = t;
|
|
9191
9194
|
}, C.cB = function(r) {
|
|
@@ -9201,7 +9204,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
9201
9204
|
const s = [];
|
|
9202
9205
|
for (const o in i) s.push(i[o]);
|
|
9203
9206
|
return s;
|
|
9204
|
-
}, C.cD = ke, C.cE =
|
|
9207
|
+
}, C.cD = ke, C.cE = od, C.cF = cd, C.cG = ju, C.cH = function(r) {
|
|
9205
9208
|
r.bucket.createArrays(), r.bucket.tilePixelRatio = gt / (512 * r.bucket.overscaling), r.bucket.compareText = {}, r.bucket.iconsNeedLinear = !1;
|
|
9206
9209
|
const t = r.bucket.layers[0], i = t.layout, s = t._unevaluatedLayout._values, o = { layoutIconSize: s["icon-size"].possiblyEvaluate(new wt(r.bucket.zoom + 1), r.canonical), layoutTextSize: s["text-size"].possiblyEvaluate(new wt(r.bucket.zoom + 1), r.canonical), textMaxSize: s["text-size"].possiblyEvaluate(new wt(18)) };
|
|
9207
9210
|
if (r.bucket.textSizeData.kind === "composite") {
|
|
@@ -9217,10 +9220,10 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
9217
9220
|
const v = i.get("text-font").evaluate(x, {}, r.canonical).join(","), T = g.evaluate(x, {}, r.canonical), M = o.layoutTextSize.evaluate(x, {}, r.canonical), E = o.layoutIconSize.evaluate(x, {}, r.canonical), A = { horizontal: {}, vertical: void 0 }, L = x.text;
|
|
9218
9221
|
let F, V = [0, 0];
|
|
9219
9222
|
if (L) {
|
|
9220
|
-
const X = L.toString(), ce = i.get("text-letter-spacing").evaluate(x, {}, r.canonical) * ni, pe = sh(X) ? ce : 0, xe = i.get("text-anchor").evaluate(x, {}, r.canonical), Ae =
|
|
9223
|
+
const X = L.toString(), ce = i.get("text-letter-spacing").evaluate(x, {}, r.canonical) * ni, pe = sh(X) ? ce : 0, xe = i.get("text-anchor").evaluate(x, {}, r.canonical), Ae = vd(t, x, r.canonical);
|
|
9221
9224
|
if (!Ae) {
|
|
9222
9225
|
const Me = i.get("text-radial-offset").evaluate(x, {}, r.canonical);
|
|
9223
|
-
V = Me ?
|
|
9226
|
+
V = Me ? xd(xe, [Me * ni, Fh]) : i.get("text-offset").evaluate(x, {}, r.canonical).map((Ce) => Ce * ni);
|
|
9224
9227
|
}
|
|
9225
9228
|
let Pe = p ? "center" : i.get("text-justify").evaluate(x, {}, r.canonical);
|
|
9226
9229
|
const Ie = i.get("symbol-placement") === "point" ? i.get("text-max-width").evaluate(x, {}, r.canonical) * ni : 1 / 0, Be = () => {
|
|
@@ -9233,8 +9236,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
9233
9236
|
let Ce = !1;
|
|
9234
9237
|
for (const ge of Me) if (!A.horizontal[ge]) if (Ce) A.horizontal[ge] = A.horizontal[0];
|
|
9235
9238
|
else {
|
|
9236
|
-
const
|
|
9237
|
-
|
|
9239
|
+
const Ze = vc(L, r.glyphMap, r.glyphPositions, r.imagePositions, v, Ie, d, "center", ge, pe, V, C.ao.horizontal, !1, M, T);
|
|
9240
|
+
Ze && (A.horizontal[ge] = Ze, Ce = Ze.positionedLines.length === 1);
|
|
9238
9241
|
}
|
|
9239
9242
|
Be();
|
|
9240
9243
|
} else {
|
|
@@ -9248,11 +9251,11 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
9248
9251
|
const X = r.imageMap[x.icon.name];
|
|
9249
9252
|
X && (F = cf(r.imagePositions[x.icon.name], i.get("icon-offset").evaluate(x, {}, r.canonical), i.get("icon-anchor").evaluate(x, {}, r.canonical)), Q = !!X.sdf, r.bucket.sdfIcons === void 0 ? r.bucket.sdfIcons = Q : r.bucket.sdfIcons !== Q && jt("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"), (X.pixelRatio !== r.bucket.pixelRatio || i.get("icon-rotate").constantOr(1) !== 0) && (r.bucket.iconsNeedLinear = !0));
|
|
9250
9253
|
}
|
|
9251
|
-
const W =
|
|
9254
|
+
const W = wd(A.horizontal) || A.vertical;
|
|
9252
9255
|
r.bucket.iconsInText = !!W && W.iconsInText, (W || F) && Sf(r.bucket, x, A, F, r.imageMap, o, M, E, V, Q, r.canonical, r.subdivisionGranularity);
|
|
9253
9256
|
}
|
|
9254
9257
|
r.showCollisionBoxes && r.bucket.generateCollisionDebugBuffers();
|
|
9255
|
-
}, C.cI = wh, C.cJ = xh, C.cK = bh, C.cL =
|
|
9258
|
+
}, C.cI = wh, C.cJ = xh, C.cK = bh, C.cL = Su, C.cM = Ph, C.cN = class {
|
|
9256
9259
|
constructor(r) {
|
|
9257
9260
|
this._marks = { start: [r.url, "start"].join("#"), end: [r.url, "end"].join("#"), measure: r.url.toString() }, performance.mark(this._marks.start);
|
|
9258
9261
|
}
|
|
@@ -9274,7 +9277,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
9274
9277
|
return jr.clearRect(0, 0, v, T), M.data;
|
|
9275
9278
|
}(r, t, i, s, o);
|
|
9276
9279
|
});
|
|
9277
|
-
}, C.cP =
|
|
9280
|
+
}, C.cP = pu, C.cQ = ct, C.cR = Pu, C.cS = Xa, C.cT = Bs, C.cU = function(r, t) {
|
|
9278
9281
|
const i = /* @__PURE__ */ new Map();
|
|
9279
9282
|
if (r != null) if (r.type === "Feature") i.set(gl(r, t), r);
|
|
9280
9283
|
else for (const s of r.features) i.set(gl(s, t), s);
|
|
@@ -9349,8 +9352,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
9349
9352
|
s.src = r.byteLength ? URL.createObjectURL(o) : _r;
|
|
9350
9353
|
}), C.i = mr, C.j = (r, t) => ie($i(r, { type: "json" }), t), C.k = _e, C.l = ve, C.m = ie, C.n = (r, t) => ie($i(r, { type: "arrayBuffer" }), t), C.o = function(r) {
|
|
9351
9354
|
return new Ph(r).readFields(Kp, []);
|
|
9352
|
-
}, C.p =
|
|
9353
|
-
}),
|
|
9355
|
+
}, C.p = Ou, C.q = nl, C.r = Ti, C.s = Nr, C.t = cc, C.u = st, C.v = ne, C.w = jt, C.x = ih, C.y = Zs, C.z = as;
|
|
9356
|
+
}), je("worker", ["./shared"], function(C) {
|
|
9354
9357
|
class c {
|
|
9355
9358
|
constructor(k) {
|
|
9356
9359
|
this.keyCache = {}, k && this.replace(k);
|
|
@@ -10316,7 +10319,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
10316
10319
|
}
|
|
10317
10320
|
}
|
|
10318
10321
|
return C.i(self) && (self.worker = new $n(self)), $n;
|
|
10319
|
-
}),
|
|
10322
|
+
}), je("index", ["exports", "./shared"], function(C, c) {
|
|
10320
10323
|
var be = "5.7.1";
|
|
10321
10324
|
function ct() {
|
|
10322
10325
|
var h = new c.A(4);
|
|
@@ -14971,12 +14974,12 @@ uniform ${w} ${S} u_${P};
|
|
|
14971
14974
|
}
|
|
14972
14975
|
Pt.Replace = [1, 0], Pt.disabled = new Pt(Pt.Replace, c.bf.transparent, [!1, !1, !1, !1]), Pt.unblended = new Pt(Pt.Replace, c.bf.transparent, [!0, !0, !0, !0]), Pt.alphaBlended = new Pt([1, 771], c.bf.transparent, [!0, !0, !0, !0]);
|
|
14973
14976
|
const yn = 2305;
|
|
14974
|
-
class
|
|
14977
|
+
class $e {
|
|
14975
14978
|
constructor(e, n, a) {
|
|
14976
14979
|
this.enable = e, this.mode = n, this.frontFace = a;
|
|
14977
14980
|
}
|
|
14978
14981
|
}
|
|
14979
|
-
|
|
14982
|
+
$e.disabled = new $e(!1, 1029, yn), $e.backCCW = new $e(!0, 1029, yn), $e.frontCCW = new $e(!0, 1028, yn);
|
|
14980
14983
|
class We {
|
|
14981
14984
|
constructor(e, n, a) {
|
|
14982
14985
|
this.func = e, this.mask = n, this.range = a;
|
|
@@ -15028,7 +15031,7 @@ uniform ${w} ${S} u_${P};
|
|
|
15028
15031
|
}
|
|
15029
15032
|
_renderErrorTexture(e, n) {
|
|
15030
15033
|
const a = this._cachedRenderContext.context, l = a.gl;
|
|
15031
|
-
if (this._bindFramebuffer(), a.viewport.set([0, 0, this._texWidth, this._texHeight]), a.clear({ color: c.bf.transparent }), this._cachedRenderContext.useProgram("projectionErrorMeasurement").draw(a, l.TRIANGLES, We.disabled, lt.disabled, Pt.unblended,
|
|
15034
|
+
if (this._bindFramebuffer(), a.viewport.set([0, 0, this._texWidth, this._texHeight]), a.clear({ color: c.bf.transparent }), this._cachedRenderContext.useProgram("projectionErrorMeasurement").draw(a, l.TRIANGLES, We.disabled, lt.disabled, Pt.unblended, $e.disabled, /* @__PURE__ */ ((u, f) => ({ u_input: u, u_output_expected: f }))(e, n), null, null, "$clipping", this._fullscreenTriangle.vertexBuffer, this._fullscreenTriangle.indexBuffer, this._fullscreenTriangle.segments), this._pbo && xr(l)) {
|
|
15032
15035
|
l.bindBuffer(l.PIXEL_PACK_BUFFER, this._pbo), l.readBuffer(l.COLOR_ATTACHMENT0), l.readPixels(0, 0, this._texWidth, this._texHeight, this._texFormat, this._texType, 0), l.bindBuffer(l.PIXEL_PACK_BUFFER, null);
|
|
15033
15036
|
const u = l.fenceSync(l.SYNC_GPU_COMMANDS_COMPLETE, 0);
|
|
15034
15037
|
l.flush(), this._readbackQueue = { frameNumberIssued: this._updateCount, sync: u };
|
|
@@ -17655,7 +17658,7 @@ uniform ${w} ${S} u_${P};
|
|
|
17655
17658
|
const U = a[N], q = e.getTile(U).getBucket(n);
|
|
17656
17659
|
if (!q) continue;
|
|
17657
17660
|
const $ = l ? q.textCollisionBox : q.iconCollisionBox, H = q.collisionCircleArray;
|
|
17658
|
-
H.length > 0 && (b.push({ circleArray: H, circleOffset: S, coord: U }), w += H.length / 4, S = w), $ && y.draw(u, _.LINES, We.disabled, lt.disabled, h.colorModeForRenderPass(),
|
|
17661
|
+
H.length > 0 && (b.push({ circleArray: H, circleOffset: S, coord: U }), w += H.length / 4, S = w), $ && y.draw(u, _.LINES, We.disabled, lt.disabled, h.colorModeForRenderPass(), $e.disabled, ya(h.transform), h.style.map.terrain && h.style.map.terrain.getTerrainData(U), f.getProjectionData({ overscaledTileID: U, applyGlobeMatrix: !0, applyTerrainMatrix: !0 }), n.id, $.layoutVertexBuffer, $.indexBuffer, $.segments, null, h.transform.zoom, null, null, $.collisionVertexBuffer);
|
|
17659
17662
|
}
|
|
17660
17663
|
if (!l || !b.length) return;
|
|
17661
17664
|
const P = h.useProgram("collisionCircle"), I = new c.b$();
|
|
@@ -17677,7 +17680,7 @@ uniform ${w} ${S} u_${P};
|
|
|
17677
17680
|
const O = u.createIndexBuffer(Kr, !0), B = u.createVertexBuffer(I, c.c0.members, !0);
|
|
17678
17681
|
for (const N of b) {
|
|
17679
17682
|
const U = $c(h.transform);
|
|
17680
|
-
P.draw(u, _.TRIANGLES, We.disabled, lt.disabled, h.colorModeForRenderPass(),
|
|
17683
|
+
P.draw(u, _.TRIANGLES, We.disabled, lt.disabled, h.colorModeForRenderPass(), $e.disabled, U, h.style.map.terrain && h.style.map.terrain.getTerrainData(N.coord), null, n.id, B, O, c.aM.simpleSegment(0, 2 * N.circleOffset, N.circleArray.length, N.circleArray.length / 2), null, h.transform.zoom, null, null, null);
|
|
17681
17684
|
}
|
|
17682
17685
|
B.destroy(), O.destroy();
|
|
17683
17686
|
}
|
|
@@ -17778,7 +17781,7 @@ uniform ${w} ${S} u_${P};
|
|
|
17778
17781
|
}
|
|
17779
17782
|
function Os(h, e, n, a, l, u, f, _, y, b, w) {
|
|
17780
17783
|
const S = a.context;
|
|
17781
|
-
l.draw(S, S.gl.TRIANGLES, u, f, _,
|
|
17784
|
+
l.draw(S, S.gl.TRIANGLES, u, f, _, $e.backCCW, y, w, b, n.id, h.layoutVertexBuffer, h.indexBuffer, e, n.paint, a.transform.zoom, h.programConfigurations.get(n.id), h.dynamicLayoutVertexBuffer, h.opacityVertexBuffer);
|
|
17782
17785
|
}
|
|
17783
17786
|
function Ro(h, e, n, a, l) {
|
|
17784
17787
|
const u = h.context, f = u.gl, _ = lt.disabled, y = new Pt([f.ONE, f.ONE], c.bf.transparent, [!0, !0, !0, !0]), b = e.getBucket(n);
|
|
@@ -17787,7 +17790,7 @@ uniform ${w} ${S} u_${P};
|
|
|
17787
17790
|
let S = n.heatmapFbos.get(w);
|
|
17788
17791
|
S || (S = js(u, e.tileSize, e.tileSize), n.heatmapFbos.set(w, S)), u.bindFramebuffer.set(S.framebuffer), u.viewport.set([0, 0, e.tileSize, e.tileSize]), u.clear({ color: c.bf.transparent });
|
|
17789
17792
|
const P = b.programConfigurations.get(n.id), I = h.useProgram("heatmap", P, !l), z = h.transform.getProjectionData({ overscaledTileID: e.tileID, applyGlobeMatrix: !0, applyTerrainMatrix: !0 }), O = h.style.map.terrain.getTerrainData(a);
|
|
17790
|
-
I.draw(u, f.TRIANGLES, We.disabled, _, y,
|
|
17793
|
+
I.draw(u, f.TRIANGLES, We.disabled, _, y, $e.disabled, Il(e, h.transform.zoom, n.paint.get("heatmap-intensity"), 1), O, z, n.id, b.layoutVertexBuffer, b.indexBuffer, b.segments, n.paint, h.transform.zoom, P);
|
|
17791
17794
|
}
|
|
17792
17795
|
function ql(h, e, n, a, l) {
|
|
17793
17796
|
const u = h.context, f = u.gl, _ = h.transform;
|
|
@@ -17796,7 +17799,7 @@ uniform ${w} ${S} u_${P};
|
|
|
17796
17799
|
if (!w) return;
|
|
17797
17800
|
u.activeTexture.set(f.TEXTURE0), f.bindTexture(f.TEXTURE_2D, w.colorAttachment.get()), u.activeTexture.set(f.TEXTURE1), y.bind(f.LINEAR, f.CLAMP_TO_EDGE);
|
|
17798
17801
|
const S = _.getProjectionData({ overscaledTileID: n, applyTerrainMatrix: l, applyGlobeMatrix: !a });
|
|
17799
|
-
h.useProgram("heatmapTexture").draw(u, f.TRIANGLES, We.disabled, lt.disabled, h.colorModeForRenderPass(),
|
|
17802
|
+
h.useProgram("heatmapTexture").draw(u, f.TRIANGLES, We.disabled, lt.disabled, h.colorModeForRenderPass(), $e.disabled, bo(h, e, 0, 1), null, S, e.id, h.rasterBoundsBuffer, h.quadTriangleIndexBuffer, h.rasterBoundsSegments, e.paint, _.zoom), w.destroy(), e.heatmapFbos.delete(b);
|
|
17800
17803
|
}
|
|
17801
17804
|
function js(h, e, n) {
|
|
17802
17805
|
var a, l;
|
|
@@ -17840,7 +17843,7 @@ uniform ${w} ${S} u_${P};
|
|
|
17840
17843
|
O = z === "fillOutlinePattern" && S ? zs(h, P, G, ye, we) : As(ye, we);
|
|
17841
17844
|
} else B = te.indexBuffer, N = te.segments, O = S ? _a(h, P, G, we) : { u_fill_translate: we };
|
|
17842
17845
|
const Se = h.stencilModeForClipping(K);
|
|
17843
|
-
ae.draw(h.context, I, l, Se, u,
|
|
17846
|
+
ae.draw(h.context, I, l, Se, u, $e.backCCW, O, oe, he, n.id, te.layoutVertexBuffer, B, N, n.paint, h.transform.zoom, ue);
|
|
17844
17847
|
}
|
|
17845
17848
|
}
|
|
17846
17849
|
function Fo(h, e, n, a, l, u, f, _) {
|
|
@@ -17853,7 +17856,7 @@ uniform ${w} ${S} u_${P};
|
|
|
17853
17856
|
const G = B.getProjectionData({ overscaledTileID: N, applyGlobeMatrix: !_, applyTerrainMatrix: !0 });
|
|
17854
17857
|
Vs(H, w, O, U, n);
|
|
17855
17858
|
const te = c.aD(B, U, n.paint.get("fill-extrusion-translate"), n.paint.get("fill-extrusion-translate-anchor")), ue = n.paint.get("fill-extrusion-vertical-gradient"), ae = P ? Vc(h, ue, z, te, N, I, U) : Ji(h, ue, z, te);
|
|
17856
|
-
K.draw(y, y.gl.TRIANGLES, l, u, f,
|
|
17859
|
+
K.draw(y, y.gl.TRIANGLES, l, u, f, $e.backCCW, ae, $, G, n.id, q.layoutVertexBuffer, q.indexBuffer, q.segments, n.paint, h.transform.zoom, H, h.style.map.terrain && q.centroidVertexBuffer);
|
|
17857
17860
|
}
|
|
17858
17861
|
}
|
|
17859
17862
|
function Mn(h, e, n, a, l, u, f, _, y) {
|
|
@@ -17865,7 +17868,7 @@ uniform ${w} ${S} u_${P};
|
|
|
17865
17868
|
const $ = w.getMeshFromTileID(S, N.canonical, _, !0, "raster"), H = (b = h.style.map.terrain) === null || b === void 0 ? void 0 : b.getTerrainData(N);
|
|
17866
17869
|
S.activeTexture.set(I.TEXTURE0), I.bindTexture(I.TEXTURE_2D, q.colorAttachment.get());
|
|
17867
17870
|
const K = P.getProjectionData({ overscaledTileID: N, aligned: B, applyGlobeMatrix: !y, applyTerrainMatrix: !0 });
|
|
17868
|
-
O.draw(S, I.TRIANGLES, u, l[N.overscaledZ], f,
|
|
17871
|
+
O.draw(S, I.TRIANGLES, u, l[N.overscaledZ], f, $e.backCCW, Zc(h, U, n), H, K, n.id, $.vertexBuffer, $.indexBuffer, $.segments);
|
|
17869
17872
|
}
|
|
17870
17873
|
}
|
|
17871
17874
|
function Bo(h, e, n, a, l, u, f, _, y) {
|
|
@@ -17885,7 +17888,7 @@ uniform ${w} ${S} u_${P};
|
|
|
17885
17888
|
ae.update(K, { premultiply: !1 }), ae.bind(I.LINEAR, I.CLAMP_TO_EDGE);
|
|
17886
17889
|
} else q.demTexture = new c.T(S, K, I.RGBA, { premultiply: !1 }), q.demTexture.bind(I.LINEAR, I.CLAMP_TO_EDGE);
|
|
17887
17890
|
const G = w.getMeshFromTileID(S, U.canonical, _, !0, "raster"), te = (b = h.style.map.terrain) === null || b === void 0 ? void 0 : b.getTerrainData(U), ue = P.getProjectionData({ overscaledTileID: U, aligned: O, applyGlobeMatrix: !y, applyTerrainMatrix: !0 });
|
|
17888
|
-
z.draw(S, I.TRIANGLES, u, l[U.overscaledZ], f,
|
|
17891
|
+
z.draw(S, I.TRIANGLES, u, l[U.overscaledZ], f, $e.backCCW, El(n, q.dem, N), te, ue, n.id, G.vertexBuffer, G.indexBuffer, G.segments);
|
|
17889
17892
|
}
|
|
17890
17893
|
}
|
|
17891
17894
|
const Ea = [new c.P(0, 0), new c.P(c.$, 0), new c.P(c.$, c.$), new c.P(0, c.$)];
|
|
@@ -17899,7 +17902,7 @@ uniform ${w} ${S} u_${P};
|
|
|
17899
17902
|
const ae = n.paint.get("raster-resampling") === "nearest" ? P.NEAREST : P.LINEAR;
|
|
17900
17903
|
S.activeTexture.set(P.TEXTURE0), $.texture.bind(ae, P.CLAMP_TO_EDGE, P.LINEAR_MIPMAP_NEAREST), S.activeTexture.set(P.TEXTURE1), H ? (H.texture.bind(ae, P.CLAMP_TO_EDGE, P.LINEAR_MIPMAP_NEAREST), te = Math.pow(2, H.tileID.overscaledZ - $.tileID.overscaledZ), ue = [$.tileID.canonical.x * te % 1, $.tileID.canonical.y * te % 1]) : $.texture.bind(ae, P.CLAMP_TO_EDGE, P.LINEAR_MIPMAP_NEAREST), $.texture.useMipmap && S.extTextureFilterAnisotropic && h.transform.pitch > 20 && P.texParameterf(P.TEXTURE_2D, S.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT, S.extTextureFilterAnisotropicMax);
|
|
17901
17904
|
const oe = h.style.map.terrain && h.style.map.terrain.getTerrainData(U), he = z.getProjectionData({ overscaledTileID: U, aligned: N, applyGlobeMatrix: !b, applyTerrainMatrix: !0 }), we = ks(ue || [0, 0], te || 1, G, n, _), Se = O.getMeshFromTileID(S, U.canonical, u, f, "raster");
|
|
17902
|
-
I.draw(S, P.TRIANGLES, q, l ? l[U.overscaledZ] : lt.disabled, B, y ?
|
|
17905
|
+
I.draw(S, P.TRIANGLES, q, l ? l[U.overscaledZ] : lt.disabled, B, y ? $e.frontCCW : $e.backCCW, we, oe, he, n.id, Se.vertexBuffer, Se.indexBuffer, Se.segments);
|
|
17903
17906
|
}
|
|
17904
17907
|
}
|
|
17905
17908
|
function Oo(h, e, n, a, l, u) {
|
|
@@ -17932,7 +17935,7 @@ uniform ${w} ${S} u_${P};
|
|
|
17932
17935
|
H.clearRect(0, 0, q.width, q.height), H.shadowColor = "white", H.shadowBlur = 2, H.lineWidth = 1.5, H.strokeStyle = "white", H.textBaseline = "top", H.font = "bold 36px Open Sans, sans-serif", H.fillText(U, 5, 5), H.strokeText(U, 5, 5), N.debugOverlayTexture.update(q), N.debugOverlayTexture.bind($.LINEAR, $.CLAMP_TO_EDGE);
|
|
17933
17936
|
}(h, `${O} ${P}kB`);
|
|
17934
17937
|
const B = h.transform.getProjectionData({ overscaledTileID: n, applyGlobeMatrix: !0, applyTerrainMatrix: !0 });
|
|
17935
|
-
u.draw(a, l.TRIANGLES, f, _, Pt.alphaBlended,
|
|
17938
|
+
u.draw(a, l.TRIANGLES, f, _, Pt.alphaBlended, $e.disabled, bn(c.bf.transparent, z), null, B, b, h.debugBuffer, h.quadTriangleIndexBuffer, h.debugSegments), u.draw(a, l.LINE_STRIP, f, _, y, $e.disabled, bn(c.bf.red), w, B, b, h.debugBuffer, h.tileBorderIndexBuffer, h.debugSegments);
|
|
17936
17939
|
}
|
|
17937
17940
|
function za(h, e, n, a) {
|
|
17938
17941
|
const { isRenderingGlobe: l } = a, u = h.context, f = u.gl, _ = h.transform, y = h.colorModeForRenderPass(), b = h.getDepthModeFor3D(), w = h.useProgram("terrain");
|
|
@@ -17941,7 +17944,7 @@ uniform ${w} ${S} u_${P};
|
|
|
17941
17944
|
const P = e.getTerrainMesh(S.tileID), I = h.renderToTexture.getTexture(S), z = e.getTerrainData(S.tileID);
|
|
17942
17945
|
u.activeTexture.set(f.TEXTURE0), f.bindTexture(f.TEXTURE_2D, I.texture);
|
|
17943
17946
|
const O = e.getMeshFrameDelta(_.zoom), B = _.calculateFogMatrix(S.tileID.toUnwrapped()), N = ma(O, B, h.style.sky, _.pitch, l), U = _.getProjectionData({ overscaledTileID: S.tileID, applyTerrainMatrix: !1, applyGlobeMatrix: !0 });
|
|
17944
|
-
w.draw(u, f.TRIANGLES, b, lt.disabled, y,
|
|
17947
|
+
w.draw(u, f.TRIANGLES, b, lt.disabled, y, $e.backCCW, N, z, U, "terrain", P.vertexBuffer, P.indexBuffer, P.segments);
|
|
17945
17948
|
}
|
|
17946
17949
|
}
|
|
17947
17950
|
function Us(h, e) {
|
|
@@ -17984,7 +17987,7 @@ uniform ${w} ${S} u_${P};
|
|
|
17984
17987
|
const a = c.L();
|
|
17985
17988
|
c.bY(a, 0, this.width, this.height, 0, 0, 1), c.N(a, a, [n.drawingBufferWidth, n.drawingBufferHeight, 0]);
|
|
17986
17989
|
const l = { mainMatrix: a, tileMercatorCoords: [0, 0, 1, 1], clippingPlane: [0, 0, 0, 0], projectionTransition: 0, fallbackMatrix: a };
|
|
17987
|
-
this.useProgram("clippingMask", null, !0).draw(e, n.TRIANGLES, We.disabled, this.stencilClearMode, Pt.disabled,
|
|
17990
|
+
this.useProgram("clippingMask", null, !0).draw(e, n.TRIANGLES, We.disabled, this.stencilClearMode, Pt.disabled, $e.disabled, null, null, l, "$clipping", this.viewportBuffer, this.quadTriangleIndexBuffer, this.viewportSegments);
|
|
17988
17991
|
}
|
|
17989
17992
|
_renderTileClippingMasks(e, n, a) {
|
|
17990
17993
|
if (this.currentStencilSource === e.source || !e.isTileClipped() || !n || !n.length) return;
|
|
@@ -17999,14 +18002,14 @@ uniform ${w} ${S} u_${P};
|
|
|
17999
18002
|
const u = this.context, f = u.gl, _ = this.style.projection, y = this.transform, b = this.useProgram("clippingMask");
|
|
18000
18003
|
for (const w of n) {
|
|
18001
18004
|
const S = e[w.key], P = this.style.map.terrain && this.style.map.terrain.getTerrainData(w), I = _.getMeshFromTileID(this.context, w.canonical, l, !0, "stencil"), z = y.getProjectionData({ overscaledTileID: w, applyGlobeMatrix: !a, applyTerrainMatrix: !0 });
|
|
18002
|
-
b.draw(u, f.TRIANGLES, We.disabled, new lt({ func: f.ALWAYS, mask: 0 }, S, 255, f.KEEP, f.KEEP, f.REPLACE), Pt.disabled, a ?
|
|
18005
|
+
b.draw(u, f.TRIANGLES, We.disabled, new lt({ func: f.ALWAYS, mask: 0 }, S, 255, f.KEEP, f.KEEP, f.REPLACE), Pt.disabled, a ? $e.disabled : $e.backCCW, null, P, z, "$clipping", I.vertexBuffer, I.indexBuffer, I.segments);
|
|
18003
18006
|
}
|
|
18004
18007
|
}
|
|
18005
18008
|
_renderTilesDepthBuffer() {
|
|
18006
18009
|
const e = this.context, n = e.gl, a = this.style.projection, l = this.transform, u = this.useProgram("depth"), f = this.getDepthModeFor3D(), _ = ne(l, { tileSize: l.tileSize });
|
|
18007
18010
|
for (const y of _) {
|
|
18008
18011
|
const b = this.style.map.terrain && this.style.map.terrain.getTerrainData(y), w = a.getMeshFromTileID(this.context, y.canonical, !0, !0, "raster"), S = l.getProjectionData({ overscaledTileID: y, applyGlobeMatrix: !0, applyTerrainMatrix: !0 });
|
|
18009
|
-
u.draw(e, n.TRIANGLES, f, lt.disabled, Pt.disabled,
|
|
18012
|
+
u.draw(e, n.TRIANGLES, f, lt.disabled, Pt.disabled, $e.backCCW, null, b, S, "$clipping", w.vertexBuffer, w.indexBuffer, w.segments);
|
|
18010
18013
|
}
|
|
18011
18014
|
}
|
|
18012
18015
|
stencilModeFor3D() {
|
|
@@ -18077,7 +18080,7 @@ uniform ${w} ${S} u_${P};
|
|
|
18077
18080
|
const ue = Math.cos(G.rollInRadians), ae = Math.sin(G.rollInRadians), oe = Y(G), he = G.getProjectionData({ overscaledTileID: null, applyGlobeMatrix: !0, applyTerrainMatrix: !0 }).projectionTransition;
|
|
18078
18081
|
return { u_sky_color: K.properties.get("sky-color"), u_horizon_color: K.properties.get("horizon-color"), u_horizon: [(G.width / 2 - oe * ae) * te, (G.height / 2 + oe * ue) * te], u_horizon_normal: [-ae, ue], u_sky_horizon_blend: K.properties.get("sky-horizon-blend") * G.height / 2 * te, u_sky_blend: he };
|
|
18079
18082
|
})(I, P.style.map.transform, P.pixelRatio), N = new We(O.LEQUAL, We.ReadWrite, [0, 1]), U = lt.disabled, q = P.colorModeForRenderPass(), $ = P.useProgram("sky"), H = Us(z, I);
|
|
18080
|
-
$.draw(z, O.TRIANGLES, N, U, q,
|
|
18083
|
+
$.draw(z, O.TRIANGLES, N, U, q, $e.disabled, B, null, void 0, "sky", H.vertexBuffer, H.indexBuffer, H.segments);
|
|
18081
18084
|
}(this, this.style.sky), this._showOverdrawInspector = n.showOverdrawInspector, this.depthRangeFor3D = [0, 1 - (e._order.length + 2) * this.numSublayers * this.depthEpsilon], !this.renderToTexture) for (this.renderPass = "opaque", this.currentLayer = u.length - 1; this.currentLayer >= 0; this.currentLayer--) {
|
|
18082
18085
|
const P = this.style._layers[u[this.currentLayer]], I = f[P.source], z = _[P.source];
|
|
18083
18086
|
this._renderTileClippingMasks(P, z, !1), this.renderLayer(this, I, P, z, w);
|
|
@@ -18100,7 +18103,7 @@ uniform ${w} ${S} u_${P};
|
|
|
18100
18103
|
const G = Kn(q.worldSize, q.center.lat), te = q.inverseProjectionMatrix, ue = new Float64Array(4);
|
|
18101
18104
|
ue[3] = 1, c.aw(ue, ue, q.modelViewProjectionMatrix), ue[0] /= ue[3], ue[1] /= ue[3], ue[2] /= ue[3], ue[3] = 1, c.aw(ue, ue, te), ue[0] /= ue[3], ue[1] /= ue[3], ue[2] /= ue[3], ue[3] = 1;
|
|
18102
18105
|
const ae = /* @__PURE__ */ ((he, we, Se, ye, Le) => ({ u_sun_pos: he, u_atmosphere_blend: we, u_globe_position: Se, u_globe_radius: ye, u_inv_proj_matrix: Le }))($, K, [ue[0], ue[1], ue[2]], G, te), oe = Us(O, I);
|
|
18103
|
-
N.draw(O, B.TRIANGLES, U, lt.disabled, Pt.alphaBlended,
|
|
18106
|
+
N.draw(O, B.TRIANGLES, U, lt.disabled, Pt.alphaBlended, $e.disabled, ae, null, null, "atmosphere", oe.vertexBuffer, oe.indexBuffer, oe.segments);
|
|
18104
18107
|
}(this, this.style.sky, this.style.light), this.options.showTileBoundaries) {
|
|
18105
18108
|
const P = function(I, z) {
|
|
18106
18109
|
let O = null;
|
|
@@ -18131,7 +18134,7 @@ uniform ${w} ${S} u_${P};
|
|
|
18131
18134
|
_.bindFramebuffer.set(f.getFramebuffer("depth").framebuffer), _.viewport.set([0, 0, u.width / devicePixelRatio, u.height / devicePixelRatio]), _.clear({ color: c.bf.transparent, depth: 1 });
|
|
18132
18135
|
for (const z of P) {
|
|
18133
18136
|
const O = f.getTerrainMesh(z.tileID), B = f.getTerrainData(z.tileID), N = b.getProjectionData({ overscaledTileID: z.tileID, applyTerrainMatrix: !1, applyGlobeMatrix: !0 }), U = { u_ele_delta: f.getMeshFrameDelta(b.zoom) };
|
|
18134
|
-
I.draw(_, y.TRIANGLES, S, lt.disabled, w,
|
|
18137
|
+
I.draw(_, y.TRIANGLES, S, lt.disabled, w, $e.backCCW, U, B, N, "terrain", O.vertexBuffer, O.indexBuffer, O.segments);
|
|
18135
18138
|
}
|
|
18136
18139
|
_.bindFramebuffer.set(null), _.viewport.set([0, 0, u.width, u.height]);
|
|
18137
18140
|
}(this, this.style.map.terrain), function(u, f) {
|
|
@@ -18141,7 +18144,7 @@ uniform ${w} ${S} u_${P};
|
|
|
18141
18144
|
const B = f.getTerrainMesh(O.tileID), N = f.getTerrainData(O.tileID);
|
|
18142
18145
|
_.activeTexture.set(y.TEXTURE0), y.bindTexture(y.TEXTURE_2D, P.texture);
|
|
18143
18146
|
const U = { u_terrain_coords_id: (255 - f.coordsIndex.length) / 255, u_texture: 0, u_ele_delta: f.getMeshFrameDelta(b.zoom) }, q = b.getProjectionData({ overscaledTileID: O.tileID, applyTerrainMatrix: !1, applyGlobeMatrix: !0 });
|
|
18144
|
-
z.draw(_, y.TRIANGLES, S, lt.disabled, w,
|
|
18147
|
+
z.draw(_, y.TRIANGLES, S, lt.disabled, w, $e.backCCW, U, N, q, "terrain", B.vertexBuffer, B.indexBuffer, B.segments), f.coordsIndex.push(O.tileID.key);
|
|
18145
18148
|
}
|
|
18146
18149
|
_.bindFramebuffer.set(null), _.viewport.set([0, 0, u.width, u.height]);
|
|
18147
18150
|
}(this, this.style.map.terrain));
|
|
@@ -18179,7 +18182,7 @@ uniform ${w} ${S} u_${P};
|
|
|
18179
18182
|
O && K.sort((te, ue) => te.sortKey - ue.sortKey);
|
|
18180
18183
|
for (const te of K) {
|
|
18181
18184
|
const { programConfiguration: ue, program: ae, layoutVertexBuffer: oe, indexBuffer: he, uniformValues: we, terrainData: Se, projectionData: ye } = te.state;
|
|
18182
|
-
ae.draw(B, N.TRIANGLES, q, $, H,
|
|
18185
|
+
ae.draw(B, N.TRIANGLES, q, $, H, $e.backCCW, we, Se, ye, y.id, oe, he, te.segments, y.paint, f.transform.zoom, ue);
|
|
18183
18186
|
}
|
|
18184
18187
|
}(e, n, a, l, u) : c.cd(a) ? function(f, _, y, b, w) {
|
|
18185
18188
|
if (y.paint.get("heatmap-opacity") === 0) return;
|
|
@@ -18204,14 +18207,14 @@ uniform ${w} ${S} u_${P};
|
|
|
18204
18207
|
const ue = O.getTile(te), ae = ue.getBucket(B);
|
|
18205
18208
|
if (!ae) continue;
|
|
18206
18209
|
const oe = ae.programConfigurations.get(B.id), he = z.useProgram("heatmap", oe), we = $.getProjectionData({ overscaledTileID: te, applyGlobeMatrix: !0, applyTerrainMatrix: !1 }), Se = $.getCircleRadiusCorrection();
|
|
18207
|
-
he.draw(U, q.TRIANGLES, We.disabled, H, K,
|
|
18210
|
+
he.draw(U, q.TRIANGLES, We.disabled, H, K, $e.backCCW, Il(ue, $.zoom, B.paint.get("heatmap-intensity"), Se), null, we, B.id, ae.layoutVertexBuffer, ae.indexBuffer, ae.segments, B.paint, $.zoom, oe);
|
|
18208
18211
|
}
|
|
18209
18212
|
U.viewport.set([0, 0, z.width, z.height]);
|
|
18210
18213
|
}(f, _, y, b) : f.renderPass === "translucent" && function(z, O) {
|
|
18211
18214
|
const B = z.context, N = B.gl;
|
|
18212
18215
|
B.setColorMode(z.colorModeForRenderPass());
|
|
18213
18216
|
const U = O.heatmapFbos.get(c.c2);
|
|
18214
|
-
U && (B.activeTexture.set(N.TEXTURE0), N.bindTexture(N.TEXTURE_2D, U.colorAttachment.get()), B.activeTexture.set(N.TEXTURE1), Ns(B, O).bind(N.LINEAR, N.CLAMP_TO_EDGE), z.useProgram("heatmapTexture").draw(B, N.TRIANGLES, We.disabled, lt.disabled, z.colorModeForRenderPass(),
|
|
18217
|
+
U && (B.activeTexture.set(N.TEXTURE0), N.bindTexture(N.TEXTURE_2D, U.colorAttachment.get()), B.activeTexture.set(N.TEXTURE1), Ns(B, O).bind(N.LINEAR, N.CLAMP_TO_EDGE), z.useProgram("heatmapTexture").draw(B, N.TRIANGLES, We.disabled, lt.disabled, z.colorModeForRenderPass(), $e.disabled, bo(z, O, 0, 1), null, null, O.id, z.viewportBuffer, z.quadTriangleIndexBuffer, z.viewportSegments, O.paint, z.transform.zoom));
|
|
18215
18218
|
}(f, y);
|
|
18216
18219
|
}(e, n, a, l, u) : c.ce(a) ? function(f, _, y, b, w) {
|
|
18217
18220
|
if (f.renderPass !== "translucent") return;
|
|
@@ -18246,7 +18249,7 @@ uniform ${w} ${S} u_${P};
|
|
|
18246
18249
|
K.activeTexture.set(G.TEXTURE0), xt.bind(y.stepInterpolant ? G.NEAREST : G.LINEAR, G.CLAMP_TO_EDGE);
|
|
18247
18250
|
}
|
|
18248
18251
|
const kt = f.stencilModeForClipping(ae);
|
|
18249
|
-
ye.draw(K, G.TRIANGLES, z, kt, O,
|
|
18252
|
+
ye.draw(K, G.TRIANGLES, z, kt, O, $e.disabled, Ct, Ke, yt, y.id, he.layoutVertexBuffer, he.indexBuffer, he.segments, y.paint, f.transform.zoom, we, he.layoutVertexBuffer2), ue = !1;
|
|
18250
18253
|
}
|
|
18251
18254
|
}(e, n, a, l, u) : c.cf(a) ? function(f, _, y, b, w) {
|
|
18252
18255
|
const S = y.paint.get("fill-color"), P = y.paint.get("fill-opacity");
|
|
@@ -18291,7 +18294,7 @@ uniform ${w} ${S} u_${P};
|
|
|
18291
18294
|
const Le = new c.T(G, { width: he, height: he, data: null }, te.RGBA);
|
|
18292
18295
|
Le.bind(te.LINEAR, te.CLAMP_TO_EDGE), ye = ae.fbo = G.createFramebuffer(he, he, !0, !1), ye.colorAttachment.set(Le.texture);
|
|
18293
18296
|
}
|
|
18294
|
-
G.bindFramebuffer.set(ye.framebuffer), G.viewport.set([0, 0, he, he]), B.useProgram("hillshadePrepare").draw(G, te.TRIANGLES, $, H, K,
|
|
18297
|
+
G.bindFramebuffer.set(ye.framebuffer), G.viewport.set([0, 0, he, he]), B.useProgram("hillshadePrepare").draw(G, te.TRIANGLES, $, H, K, $e.disabled, Cl(ae.tileID, oe), null, null, q.id, B.rasterBoundsBuffer, B.quadTriangleIndexBuffer, B.rasterBoundsSegments), ae.needsHillshadePrepare = !1;
|
|
18295
18298
|
}
|
|
18296
18299
|
})(f, _, b, y, z, lt.disabled, O), P.viewport.set([0, 0, f.width, f.height]);
|
|
18297
18300
|
else if (f.renderPass === "translucent") if (I) {
|
|
@@ -18334,7 +18337,7 @@ uniform ${w} ${S} u_${P};
|
|
|
18334
18337
|
const ae = y.getCrossfadeParameters();
|
|
18335
18338
|
for (const oe of ue) {
|
|
18336
18339
|
const he = N.getProjectionData({ overscaledTileID: oe, applyGlobeMatrix: !I, applyTerrainMatrix: !0 }), we = q ? Dl(P, f, q, { tileID: oe, tileSize: U }, ae) : Ll(P, S), Se = f.style.map.terrain && f.style.map.terrain.getTerrainData(oe), ye = B.getMeshFromTileID(z, oe.canonical, !1, !0, "raster");
|
|
18337
|
-
te.draw(z, O.TRIANGLES, K, H, G,
|
|
18340
|
+
te.draw(z, O.TRIANGLES, K, H, G, $e.backCCW, we, Se, he, y.id, ye.vertexBuffer, ye.indexBuffer, ye.segments);
|
|
18338
18341
|
}
|
|
18339
18342
|
}(e, 0, a, l, u) : c.cl(a) && function(f, _, y, b) {
|
|
18340
18343
|
const { isRenderingGlobe: w } = b, S = f.context, P = y.implementation, I = f.style.projection, z = f.transform, O = z.getProjectionDataForCustomLayer(w), B = { farZ: z.farZ, nearZ: z.nearZ, fov: z.fov * Math.PI / 180, modelViewProjectionMatrix: z.modelViewProjectionMatrix, projectionMatrix: z.projectionMatrix, shaderData: { variantName: I.shaderVariantName, vertexShaderPrelude: `const float PI = 3.141592653589793;
|
|
@@ -20025,7 +20028,7 @@ ${I.shaderPreludeCode.vertexSource}`, define: I.shaderDefine }, defaultProjectio
|
|
|
20025
20028
|
return n[e.canonical.z] && e.canonical.x >= n[e.canonical.z].minTileX && e.canonical.x <= n[e.canonical.z].maxTileX && e.canonical.y >= n[e.canonical.z].minTileY && e.canonical.y <= n[e.canonical.z].maxTileY;
|
|
20026
20029
|
}
|
|
20027
20030
|
}
|
|
20028
|
-
class
|
|
20031
|
+
class Ve {
|
|
20029
20032
|
constructor(e, n, a) {
|
|
20030
20033
|
this._meshCache = {}, this.painter = e, this.sourceCache = new Fe(n), this.options = a, this.exaggeration = typeof a.exaggeration == "number" ? a.exaggeration : 1, this.qualityFactor = 2, this.meshSize = 128, this._demMatrixCache = {}, this.coordsIndex = [], this._coordsTextureSize = 1024;
|
|
20031
20034
|
}
|
|
@@ -21008,7 +21011,7 @@ ${I.shaderPreludeCode.vertexSource}`, define: I.shaderDefine }, defaultProjectio
|
|
|
21008
21011
|
const a = this.style._layers[n];
|
|
21009
21012
|
a.type === "hillshade" && a.source === h.source && c.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality."), a.type === "color-relief" && a.source === h.source && c.w("You are using the same source for a color-relief layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.");
|
|
21010
21013
|
}
|
|
21011
|
-
this.terrain = new
|
|
21014
|
+
this.terrain = new Ve(this.painter, e, h), this.painter.renderToTexture = new ja(this.painter, this.terrain), this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center, this.transform.tileZoom)), this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center, this.transform.tileZoom)), this._terrainDataCallback = (n) => {
|
|
21012
21015
|
var a;
|
|
21013
21016
|
n.dataType === "style" ? this.terrain.sourceCache.freeRtt() : n.dataType === "source" && n.tile && (n.sourceId !== h.source || this._elevationFreeze || (this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center, this.transform.tileZoom)), this._centerClampedToGround && this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center, this.transform.tileZoom))), ((a = n.source) === null || a === void 0 ? void 0 : a.type) === "image" ? this.terrain.sourceCache.freeRtt() : this.terrain.sourceCache.freeRtt(n.tile.tileID));
|
|
21014
21017
|
}, this.style.on("data", this._terrainDataCallback);
|
|
@@ -21492,8 +21495,8 @@ ${I.shaderPreludeCode.vertexSource}`, define: I.shaderDefine }, defaultProjectio
|
|
|
21492
21495
|
c.a.WORKER_URL = h;
|
|
21493
21496
|
};
|
|
21494
21497
|
});
|
|
21495
|
-
var
|
|
21496
|
-
return
|
|
21498
|
+
var Ue = J;
|
|
21499
|
+
return Ue;
|
|
21497
21500
|
});
|
|
21498
21501
|
}(zc)), zc.exports;
|
|
21499
21502
|
}
|
|
@@ -21535,9 +21538,9 @@ function Qf(me, j = "kilometers") {
|
|
|
21535
21538
|
function Ac(me) {
|
|
21536
21539
|
return me % 360 * Math.PI / 180;
|
|
21537
21540
|
}
|
|
21538
|
-
function
|
|
21541
|
+
function Kh(me, j, J) {
|
|
21539
21542
|
if (me !== null)
|
|
21540
|
-
for (var de,
|
|
21543
|
+
for (var de, je, Ue, C, c, be, ct, ut = 0, pt = 0, Ee, se = me.type, Mt = se === "FeatureCollection", ei = se === "Feature", Di = Mt ? me.features.length : 1, Ii = 0; Ii < Di; Ii++) {
|
|
21541
21544
|
ct = Mt ? (
|
|
21542
21545
|
// @ts-expect-error: Known type conflict
|
|
21543
21546
|
me.features[Ii].geometry
|
|
@@ -21588,11 +21591,11 @@ function Yh(me, j, J) {
|
|
|
21588
21591
|
case "Polygon":
|
|
21589
21592
|
case "MultiLineString":
|
|
21590
21593
|
for (de = 0; de < be.length; de++) {
|
|
21591
|
-
for (
|
|
21594
|
+
for (je = 0; je < be[de].length - ut; je++) {
|
|
21592
21595
|
if (
|
|
21593
21596
|
// @ts-expect-error: Known type conflict
|
|
21594
21597
|
j(
|
|
21595
|
-
be[de][
|
|
21598
|
+
be[de][je],
|
|
21596
21599
|
pt,
|
|
21597
21600
|
Ii,
|
|
21598
21601
|
ft,
|
|
@@ -21608,12 +21611,12 @@ function Yh(me, j, J) {
|
|
|
21608
21611
|
break;
|
|
21609
21612
|
case "MultiPolygon":
|
|
21610
21613
|
for (de = 0; de < be.length; de++) {
|
|
21611
|
-
for (Ot = 0,
|
|
21612
|
-
for (
|
|
21614
|
+
for (Ot = 0, je = 0; je < be[de].length; je++) {
|
|
21615
|
+
for (Ue = 0; Ue < be[de][je].length - ut; Ue++) {
|
|
21613
21616
|
if (
|
|
21614
21617
|
// @ts-expect-error: Known type conflict
|
|
21615
21618
|
j(
|
|
21616
|
-
be[de][
|
|
21619
|
+
be[de][je][Ue],
|
|
21617
21620
|
pt,
|
|
21618
21621
|
Ii,
|
|
21619
21622
|
ft,
|
|
@@ -21632,7 +21635,7 @@ function Yh(me, j, J) {
|
|
|
21632
21635
|
for (de = 0; de < C.geometries.length; de++)
|
|
21633
21636
|
if (
|
|
21634
21637
|
// @ts-expect-error: Known type conflict
|
|
21635
|
-
|
|
21638
|
+
Kh(C.geometries[de], j) === !1
|
|
21636
21639
|
)
|
|
21637
21640
|
return !1;
|
|
21638
21641
|
break;
|
|
@@ -21644,7 +21647,7 @@ function Yh(me, j, J) {
|
|
|
21644
21647
|
}
|
|
21645
21648
|
}
|
|
21646
21649
|
function em(me, j) {
|
|
21647
|
-
var J, de,
|
|
21650
|
+
var J, de, je, Ue, C, c, be, ct, ut, pt, Ee = 0, se = me.type === "FeatureCollection", Mt = me.type === "Feature", ei = se ? me.features.length : 1;
|
|
21648
21651
|
for (J = 0; J < ei; J++) {
|
|
21649
21652
|
for (c = se ? (
|
|
21650
21653
|
// @ts-expect-error: Known type conflict
|
|
@@ -21670,8 +21673,8 @@ function em(me, j) {
|
|
|
21670
21673
|
) : Mt ? (
|
|
21671
21674
|
// @ts-expect-error: Known type conflict
|
|
21672
21675
|
me.id
|
|
21673
|
-
) : void 0, be = c ? c.type === "GeometryCollection" : !1, C = be ? c.geometries.length : 1,
|
|
21674
|
-
if (
|
|
21676
|
+
) : void 0, be = c ? c.type === "GeometryCollection" : !1, C = be ? c.geometries.length : 1, je = 0; je < C; je++) {
|
|
21677
|
+
if (Ue = be ? c.geometries[je] : c, Ue === null) {
|
|
21675
21678
|
if (
|
|
21676
21679
|
// @ts-expect-error: Known type conflict
|
|
21677
21680
|
j(
|
|
@@ -21686,7 +21689,7 @@ function em(me, j) {
|
|
|
21686
21689
|
return !1;
|
|
21687
21690
|
continue;
|
|
21688
21691
|
}
|
|
21689
|
-
switch (
|
|
21692
|
+
switch (Ue.type) {
|
|
21690
21693
|
case "Point":
|
|
21691
21694
|
case "LineString":
|
|
21692
21695
|
case "MultiPoint":
|
|
@@ -21696,7 +21699,7 @@ function em(me, j) {
|
|
|
21696
21699
|
if (
|
|
21697
21700
|
// @ts-expect-error: Known type conflict
|
|
21698
21701
|
j(
|
|
21699
|
-
|
|
21702
|
+
Ue,
|
|
21700
21703
|
Ee,
|
|
21701
21704
|
ct,
|
|
21702
21705
|
ut,
|
|
@@ -21707,11 +21710,11 @@ function em(me, j) {
|
|
|
21707
21710
|
break;
|
|
21708
21711
|
}
|
|
21709
21712
|
case "GeometryCollection": {
|
|
21710
|
-
for (de = 0; de <
|
|
21713
|
+
for (de = 0; de < Ue.geometries.length; de++)
|
|
21711
21714
|
if (
|
|
21712
21715
|
// @ts-expect-error: Known type conflict
|
|
21713
21716
|
j(
|
|
21714
|
-
|
|
21717
|
+
Ue.geometries[de],
|
|
21715
21718
|
Ee,
|
|
21716
21719
|
ct,
|
|
21717
21720
|
ut,
|
|
@@ -21729,7 +21732,7 @@ function em(me, j) {
|
|
|
21729
21732
|
}
|
|
21730
21733
|
}
|
|
21731
21734
|
function tm(me, j) {
|
|
21732
|
-
em(me, function(J, de,
|
|
21735
|
+
em(me, function(J, de, je, Ue, C) {
|
|
21733
21736
|
var c = J === null ? null : J.type;
|
|
21734
21737
|
switch (c) {
|
|
21735
21738
|
case null:
|
|
@@ -21739,7 +21742,7 @@ function tm(me, j) {
|
|
|
21739
21742
|
return (
|
|
21740
21743
|
// @ts-expect-error: Known type conflict
|
|
21741
21744
|
j(
|
|
21742
|
-
Wh(J,
|
|
21745
|
+
Wh(J, je, { bbox: Ue, id: C }),
|
|
21743
21746
|
de,
|
|
21744
21747
|
0
|
|
21745
21748
|
) === !1 ? !1 : void 0
|
|
@@ -21769,29 +21772,29 @@ function tm(me, j) {
|
|
|
21769
21772
|
};
|
|
21770
21773
|
if (
|
|
21771
21774
|
// @ts-expect-error: Known type conflict
|
|
21772
|
-
j(Wh(pt,
|
|
21775
|
+
j(Wh(pt, je), de, ct) === !1
|
|
21773
21776
|
)
|
|
21774
21777
|
return !1;
|
|
21775
21778
|
}
|
|
21776
21779
|
});
|
|
21777
21780
|
}
|
|
21778
21781
|
function im(me, j) {
|
|
21779
|
-
tm(me, function(J, de,
|
|
21780
|
-
var
|
|
21782
|
+
tm(me, function(J, de, je) {
|
|
21783
|
+
var Ue = 0;
|
|
21781
21784
|
if (J.geometry) {
|
|
21782
21785
|
var C = J.geometry.type;
|
|
21783
21786
|
if (!(C === "Point" || C === "MultiPoint")) {
|
|
21784
21787
|
var c, be = 0, ct = 0, ut = 0;
|
|
21785
21788
|
if (
|
|
21786
21789
|
// @ts-expect-error: Known type conflict
|
|
21787
|
-
|
|
21790
|
+
Kh(
|
|
21788
21791
|
J,
|
|
21789
21792
|
function(pt, Ee, se, Mt, ei) {
|
|
21790
21793
|
if (
|
|
21791
21794
|
// @ts-expect-error: Known type conflict
|
|
21792
21795
|
c === void 0 || de > be || Mt > ct || ei > ut
|
|
21793
21796
|
) {
|
|
21794
|
-
c = pt, be = de, ct = Mt, ut = ei,
|
|
21797
|
+
c = pt, be = de, ct = Mt, ut = ei, Ue = 0;
|
|
21795
21798
|
return;
|
|
21796
21799
|
}
|
|
21797
21800
|
var Di = Jf(
|
|
@@ -21805,13 +21808,13 @@ function im(me, j) {
|
|
|
21805
21808
|
// @ts-expect-error: Known type conflict
|
|
21806
21809
|
Di,
|
|
21807
21810
|
de,
|
|
21808
|
-
|
|
21811
|
+
je,
|
|
21809
21812
|
ei,
|
|
21810
|
-
|
|
21813
|
+
Ue
|
|
21811
21814
|
) === !1
|
|
21812
21815
|
)
|
|
21813
21816
|
return !1;
|
|
21814
|
-
|
|
21817
|
+
Ue++, c = pt;
|
|
21815
21818
|
}
|
|
21816
21819
|
) === !1
|
|
21817
21820
|
)
|
|
@@ -21821,19 +21824,19 @@ function im(me, j) {
|
|
|
21821
21824
|
});
|
|
21822
21825
|
}
|
|
21823
21826
|
function rm(me, j, J) {
|
|
21824
|
-
var de = J,
|
|
21827
|
+
var de = J, je = !1;
|
|
21825
21828
|
return im(
|
|
21826
21829
|
me,
|
|
21827
|
-
function(
|
|
21828
|
-
|
|
21830
|
+
function(Ue, C, c, be, ct) {
|
|
21831
|
+
je === !1 && J === void 0 ? de = Ue : de = j(
|
|
21829
21832
|
de,
|
|
21830
21833
|
// @ts-expect-error: Known type conflict
|
|
21831
|
-
|
|
21834
|
+
Ue,
|
|
21832
21835
|
C,
|
|
21833
21836
|
c,
|
|
21834
21837
|
be,
|
|
21835
21838
|
ct
|
|
21836
|
-
),
|
|
21839
|
+
), je = !0;
|
|
21837
21840
|
}
|
|
21838
21841
|
), de;
|
|
21839
21842
|
}
|
|
@@ -21841,17 +21844,17 @@ function nm(me, j = {}) {
|
|
|
21841
21844
|
if (me.bbox != null && j.recompute !== !0)
|
|
21842
21845
|
return me.bbox;
|
|
21843
21846
|
const J = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
|
|
21844
|
-
return
|
|
21847
|
+
return Kh(me, (de) => {
|
|
21845
21848
|
J[0] > de[0] && (J[0] = de[0]), J[1] > de[1] && (J[1] = de[1]), J[2] < de[0] && (J[2] = de[0]), J[3] < de[1] && (J[3] = de[1]);
|
|
21846
21849
|
}), J;
|
|
21847
21850
|
}
|
|
21848
|
-
var
|
|
21851
|
+
var Nd = nm;
|
|
21849
21852
|
class sm {
|
|
21850
21853
|
constructor(j = {}) {
|
|
21851
21854
|
this.type = j.type || "Feature", this.id = j.id || null, this.properties = j.properties || {}, this.geometry = j.geometry || {}, this.geometry.type = this.geometry.type || null, this.geometry.coordinates = this.geometry.coordinates || [];
|
|
21852
21855
|
}
|
|
21853
21856
|
get bbox() {
|
|
21854
|
-
return !this.geometry || !this.geometry.type || !this.geometry.coordinates.length ? null :
|
|
21857
|
+
return !this.geometry || !this.geometry.type || !this.geometry.coordinates.length ? null : Nd({
|
|
21855
21858
|
type: "Feature",
|
|
21856
21859
|
geometry: this.geometry
|
|
21857
21860
|
});
|
|
@@ -21868,7 +21871,7 @@ class sm {
|
|
|
21868
21871
|
}
|
|
21869
21872
|
class Fn extends sm {
|
|
21870
21873
|
constructor(j = {}) {
|
|
21871
|
-
super(j), this.id = this.id ||
|
|
21874
|
+
super(j), this.id = this.id || Yh(), this.featureType = Fd(this) || null, this.properties.waymark = this.properties.waymark || {}, this.active = !1, this.popup = this.createPopup(), this.popup && (this.popup = this.popup), this.mapLibreMap = null, this.source = null, this.layer = null, this.style = null, this.highlightLayer = null;
|
|
21872
21875
|
}
|
|
21873
21876
|
setActive(j = !0) {
|
|
21874
21877
|
this.active = j, this.active ? this.showHighlight() : this.hideHighlight();
|
|
@@ -21929,16 +21932,16 @@ class Fn extends sm {
|
|
|
21929
21932
|
J.textContent = this.getTitle(), j.appendChild(J);
|
|
21930
21933
|
}
|
|
21931
21934
|
if (this.getDescription()) {
|
|
21932
|
-
const J = document.createElement("
|
|
21933
|
-
J.
|
|
21935
|
+
const J = document.createElement("div");
|
|
21936
|
+
J.innerHTML = this.getDescription(), j.appendChild(J);
|
|
21934
21937
|
}
|
|
21935
21938
|
return new Bn.Popup({}).setDOMContent(j);
|
|
21936
21939
|
}
|
|
21937
|
-
openPopup() {
|
|
21940
|
+
openPopup(j) {
|
|
21938
21941
|
if (!this.mapLibreMap || !this.popup)
|
|
21939
21942
|
return;
|
|
21940
21943
|
console.log("Opening popup for overlay:", this.id);
|
|
21941
|
-
const J = this.getBounds().getCenter();
|
|
21944
|
+
const J = j || this.getBounds().getCenter();
|
|
21942
21945
|
this.popup.setLngLat([J.lng, J.lat]).addTo(this.mapLibreMap);
|
|
21943
21946
|
}
|
|
21944
21947
|
show() {
|
|
@@ -21988,15 +21991,15 @@ class Fn extends sm {
|
|
|
21988
21991
|
this.isHighlighted() ? this.hideHighlight() : this.showHighlight();
|
|
21989
21992
|
}
|
|
21990
21993
|
}
|
|
21991
|
-
const
|
|
21992
|
-
function
|
|
21994
|
+
const Jh = "#b42714";
|
|
21995
|
+
function Vd() {
|
|
21993
21996
|
const me = "0123456789ABCDEF";
|
|
21994
21997
|
let j = "#";
|
|
21995
21998
|
for (let J = 0; J < 6; J++)
|
|
21996
21999
|
j += me[Math.floor(Math.random() * 16)];
|
|
21997
22000
|
return j;
|
|
21998
22001
|
}
|
|
21999
|
-
class
|
|
22002
|
+
class Ud extends Fn {
|
|
22000
22003
|
constructor(j = {}) {
|
|
22001
22004
|
const J = {
|
|
22002
22005
|
...j,
|
|
@@ -22023,22 +22026,22 @@ class Vd extends Fn {
|
|
|
22023
22026
|
if (!this.mapLibreMap) return;
|
|
22024
22027
|
if (j.html) {
|
|
22025
22028
|
if (this.mapLibreMap.getLayer(`${this.id}-icon`) && this.mapLibreMap.removeLayer(`${this.id}-icon`), this.htmlMarker) {
|
|
22026
|
-
const
|
|
22027
|
-
|
|
22029
|
+
const Ue = this.htmlMarker.getElement();
|
|
22030
|
+
Ue.innerHTML !== j.html && (Ue.innerHTML = j.html), this.htmlMarker.setLngLat(this.geometry.coordinates);
|
|
22028
22031
|
} else {
|
|
22029
|
-
const
|
|
22030
|
-
|
|
22032
|
+
const Ue = document.createElement("div");
|
|
22033
|
+
Ue.innerHTML = j.html, Ue.addEventListener("mouseenter", () => {
|
|
22031
22034
|
this.mapLibreMap.getCanvas().style.cursor = "pointer", !this.active && this.showHighlight();
|
|
22032
|
-
}),
|
|
22035
|
+
}), Ue.addEventListener("mouseleave", () => {
|
|
22033
22036
|
this.mapLibreMap.getCanvas().style.cursor = "", !this.active && this.hideHighlight();
|
|
22034
22037
|
}), this.htmlMarker = new Bn.Marker({
|
|
22035
|
-
element:
|
|
22038
|
+
element: Ue,
|
|
22036
22039
|
anchor: "center"
|
|
22037
22040
|
}).setLngLat(this.geometry.coordinates).addTo(this.mapLibreMap);
|
|
22038
22041
|
}
|
|
22039
22042
|
return;
|
|
22040
22043
|
} else this.htmlMarker && (this.htmlMarker.remove(), this.htmlMarker = null);
|
|
22041
|
-
const J = `${this.id}-icon-img`, de = `${this.id}-icon`,
|
|
22044
|
+
const J = `${this.id}-icon-img`, de = `${this.id}-icon`, je = () => {
|
|
22042
22045
|
this.mapLibreMap && (this.mapLibreMap.getLayer(de) ? (this.mapLibreMap.setLayoutProperty(de, "icon-image", J), this.mapLibreMap.setLayoutProperty(
|
|
22043
22046
|
de,
|
|
22044
22047
|
"icon-rotate",
|
|
@@ -22057,18 +22060,18 @@ class Vd extends Fn {
|
|
|
22057
22060
|
}));
|
|
22058
22061
|
};
|
|
22059
22062
|
if (j.url)
|
|
22060
|
-
this.mapLibreMap.loadImage(j.url, (
|
|
22061
|
-
if (
|
|
22062
|
-
console.error("Error loading icon:",
|
|
22063
|
+
this.mapLibreMap.loadImage(j.url, (Ue, C) => {
|
|
22064
|
+
if (Ue) {
|
|
22065
|
+
console.error("Error loading icon:", Ue);
|
|
22063
22066
|
return;
|
|
22064
22067
|
}
|
|
22065
|
-
this.mapLibreMap && (this.mapLibreMap.hasImage(J) || this.mapLibreMap.addImage(J, C),
|
|
22068
|
+
this.mapLibreMap && (this.mapLibreMap.hasImage(J) || this.mapLibreMap.addImage(J, C), je());
|
|
22066
22069
|
});
|
|
22067
22070
|
else if (j.svg) {
|
|
22068
|
-
const
|
|
22069
|
-
|
|
22070
|
-
this.mapLibreMap && (this.mapLibreMap.hasImage(J) || this.mapLibreMap.addImage(J,
|
|
22071
|
-
},
|
|
22071
|
+
const Ue = new Image(j.width || 32, j.height || 32);
|
|
22072
|
+
Ue.onload = () => {
|
|
22073
|
+
this.mapLibreMap && (this.mapLibreMap.hasImage(J) || this.mapLibreMap.addImage(J, Ue), je());
|
|
22074
|
+
}, Ue.src = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(j.svg);
|
|
22072
22075
|
}
|
|
22073
22076
|
}
|
|
22074
22077
|
// GeoJson point
|
|
@@ -22082,7 +22085,7 @@ class Vd extends Fn {
|
|
|
22082
22085
|
paint: {
|
|
22083
22086
|
"circle-radius": 3,
|
|
22084
22087
|
"circle-color": "#ffffff",
|
|
22085
|
-
"circle-stroke-color":
|
|
22088
|
+
"circle-stroke-color": Vd(),
|
|
22086
22089
|
"circle-stroke-width": 3,
|
|
22087
22090
|
...j
|
|
22088
22091
|
}
|
|
@@ -22116,10 +22119,10 @@ class Vd extends Fn {
|
|
|
22116
22119
|
});
|
|
22117
22120
|
}
|
|
22118
22121
|
customizeHighlight(j) {
|
|
22119
|
-
j.paint["circle-stroke-color"] =
|
|
22122
|
+
j.paint["circle-stroke-color"] = Jh, j.paint["circle-stroke-width"] += 2;
|
|
22120
22123
|
}
|
|
22121
22124
|
}
|
|
22122
|
-
function
|
|
22125
|
+
function Rd(me) {
|
|
22123
22126
|
if (!me)
|
|
22124
22127
|
throw new Error("coord is required");
|
|
22125
22128
|
if (!Array.isArray(me)) {
|
|
@@ -22133,7 +22136,7 @@ function Dd(me) {
|
|
|
22133
22136
|
throw new Error("coord must be GeoJSON Point or an Array of numbers");
|
|
22134
22137
|
}
|
|
22135
22138
|
function am(me, j, J = {}) {
|
|
22136
|
-
var de =
|
|
22139
|
+
var de = Rd(me), je = Rd(j), Ue = Ac(je[1] - de[1]), C = Ac(je[0] - de[0]), c = Ac(de[1]), be = Ac(je[1]), ct = Math.pow(Math.sin(Ue / 2), 2) + Math.pow(Math.sin(C / 2), 2) * Math.cos(c) * Math.cos(be);
|
|
22137
22140
|
return Qf(
|
|
22138
22141
|
2 * Math.atan2(Math.sqrt(ct), Math.sqrt(1 - ct)),
|
|
22139
22142
|
J.units
|
|
@@ -22143,13 +22146,13 @@ function om(me, j = {}) {
|
|
|
22143
22146
|
return rm(
|
|
22144
22147
|
me,
|
|
22145
22148
|
(J, de) => {
|
|
22146
|
-
const
|
|
22147
|
-
return J + am(
|
|
22149
|
+
const je = de.geometry.coordinates;
|
|
22150
|
+
return J + am(je[0], je[1], j);
|
|
22148
22151
|
},
|
|
22149
22152
|
0
|
|
22150
22153
|
);
|
|
22151
22154
|
}
|
|
22152
|
-
class
|
|
22155
|
+
class $d extends Fn {
|
|
22153
22156
|
constructor(j = {}) {
|
|
22154
22157
|
var de;
|
|
22155
22158
|
const J = {
|
|
@@ -22173,7 +22176,7 @@ class Ud extends Fn {
|
|
|
22173
22176
|
"line-cap": "round"
|
|
22174
22177
|
},
|
|
22175
22178
|
paint: {
|
|
22176
|
-
"line-color":
|
|
22179
|
+
"line-color": Vd(),
|
|
22177
22180
|
"line-width": 3,
|
|
22178
22181
|
...j
|
|
22179
22182
|
}
|
|
@@ -22199,12 +22202,12 @@ class Ud extends Fn {
|
|
|
22199
22202
|
const j = this.getLinePositions();
|
|
22200
22203
|
if (j.length === 0)
|
|
22201
22204
|
return "";
|
|
22202
|
-
let J = 0, de = 0,
|
|
22205
|
+
let J = 0, de = 0, je = j[0][2], Ue = j[0][2];
|
|
22203
22206
|
for (let C = 1; C < j.length; C++) {
|
|
22204
22207
|
const c = j[C][2] - j[C - 1][2];
|
|
22205
|
-
c > 0 ? J += c : de -= c,
|
|
22208
|
+
c > 0 ? J += c : de -= c, je = Math.max(je, j[C][2]), Ue = Math.min(Ue, j[C][2]);
|
|
22206
22209
|
}
|
|
22207
|
-
return "Elevation Gain: " + Math.round(J * 10) / 10 + "m, Loss: " + Math.round(de * 10) / 10 + "m, Max: " + Math.round(
|
|
22210
|
+
return "Elevation Gain: " + Math.round(J * 10) / 10 + "m, Loss: " + Math.round(de * 10) / 10 + "m, Max: " + Math.round(je * 10) / 10 + "m, Min: " + Math.round(Ue * 10) / 10 + "m";
|
|
22208
22211
|
}
|
|
22209
22212
|
getBounds() {
|
|
22210
22213
|
const j = this.getLinePositions();
|
|
@@ -22231,9 +22234,9 @@ class Ud extends Fn {
|
|
|
22231
22234
|
}
|
|
22232
22235
|
zoomIn() {
|
|
22233
22236
|
if (this.mapLibreMap.getZoom() < 16) {
|
|
22234
|
-
const de = this.getLinePositions(),
|
|
22237
|
+
const de = this.getLinePositions(), je = de.length ? de[0] : [0, 0];
|
|
22235
22238
|
this.mapLibreMap.flyTo({
|
|
22236
|
-
center: [
|
|
22239
|
+
center: [je[0], je[1]],
|
|
22237
22240
|
zoom: 16,
|
|
22238
22241
|
...ia
|
|
22239
22242
|
});
|
|
@@ -22244,10 +22247,10 @@ class Ud extends Fn {
|
|
|
22244
22247
|
return j.type === "MultiLineString" ? j.coordinates.reduce((J, de) => J.concat(de), []) : j.coordinates || [];
|
|
22245
22248
|
}
|
|
22246
22249
|
customizeHighlight(j) {
|
|
22247
|
-
j.paint["line-color"] =
|
|
22250
|
+
j.paint["line-color"] = Jh, j.paint["line-width"] += 2;
|
|
22248
22251
|
}
|
|
22249
22252
|
}
|
|
22250
|
-
class
|
|
22253
|
+
class Zd extends Fn {
|
|
22251
22254
|
constructor(j = {}) {
|
|
22252
22255
|
var de;
|
|
22253
22256
|
const J = {
|
|
@@ -22342,7 +22345,7 @@ class $d extends Fn {
|
|
|
22342
22345
|
}
|
|
22343
22346
|
getPolygonPositions() {
|
|
22344
22347
|
const j = this.geometry;
|
|
22345
|
-
return j.type === "MultiPolygon" ? j.coordinates.reduce((J, de) => (de.forEach((
|
|
22348
|
+
return j.type === "MultiPolygon" ? j.coordinates.reduce((J, de) => (de.forEach((je) => J.push(...je)), J), []) : j.coordinates ? j.coordinates.reduce((J, de) => J.concat(de), []) : [];
|
|
22346
22349
|
}
|
|
22347
22350
|
flyTo() {
|
|
22348
22351
|
const j = this.getBounds();
|
|
@@ -22356,7 +22359,7 @@ class $d extends Fn {
|
|
|
22356
22359
|
return this.strokeStyle();
|
|
22357
22360
|
}
|
|
22358
22361
|
customizeHighlight(j) {
|
|
22359
|
-
j.paint["line-color"] =
|
|
22362
|
+
j.paint["line-color"] = Jh, j.paint["line-width"] += 2;
|
|
22360
22363
|
}
|
|
22361
22364
|
}
|
|
22362
22365
|
class lm {
|
|
@@ -22364,7 +22367,7 @@ class lm {
|
|
|
22364
22367
|
this.type = "FeatureCollection", this.id = j.id || null, this.properties = j.properties || {}, this.features = Array.isArray(j.features) ? j.features : [];
|
|
22365
22368
|
}
|
|
22366
22369
|
get bbox() {
|
|
22367
|
-
return this.features.length > 0 ?
|
|
22370
|
+
return this.features.length > 0 ? Nd({
|
|
22368
22371
|
type: "FeatureCollection",
|
|
22369
22372
|
features: this.features
|
|
22370
22373
|
}) : null;
|
|
@@ -22381,9 +22384,22 @@ class lm {
|
|
|
22381
22384
|
}
|
|
22382
22385
|
class oo extends lm {
|
|
22383
22386
|
constructor(j = {}) {
|
|
22384
|
-
return super(j), this.id = this.id ||
|
|
22385
|
-
|
|
22386
|
-
|
|
22387
|
+
return super(j), this.id = this.id || Yh(), this.overlays = /* @__PURE__ */ new Map(), this.features.forEach((J) => {
|
|
22388
|
+
var de;
|
|
22389
|
+
if (((de = J.geometry) == null ? void 0 : de.type) === "MultiPoint")
|
|
22390
|
+
(J.geometry.coordinates || []).forEach((je) => {
|
|
22391
|
+
const Ue = {
|
|
22392
|
+
...J,
|
|
22393
|
+
id: void 0,
|
|
22394
|
+
// let each overlay get a unique ID
|
|
22395
|
+
geometry: { type: "Point", coordinates: je }
|
|
22396
|
+
}, C = Xh(Ue);
|
|
22397
|
+
C && this.overlays.set(C.id, C);
|
|
22398
|
+
});
|
|
22399
|
+
else {
|
|
22400
|
+
const je = Xh(J);
|
|
22401
|
+
je && this.overlays.set(je.id, je);
|
|
22402
|
+
}
|
|
22387
22403
|
}), this.mapLibreMap = null, this;
|
|
22388
22404
|
}
|
|
22389
22405
|
get overlaysArray() {
|
|
@@ -22479,7 +22495,7 @@ function cm(me) {
|
|
|
22479
22495
|
});
|
|
22480
22496
|
break;
|
|
22481
22497
|
case "Feature":
|
|
22482
|
-
se =
|
|
22498
|
+
se = Xh(Ee), de.set(se.id, se);
|
|
22483
22499
|
break;
|
|
22484
22500
|
default:
|
|
22485
22501
|
throw new Error(
|
|
@@ -22532,7 +22548,7 @@ function hm(me) {
|
|
|
22532
22548
|
}
|
|
22533
22549
|
};
|
|
22534
22550
|
function J() {
|
|
22535
|
-
const { overlays: de, maps:
|
|
22551
|
+
const { overlays: de, maps: je } = me.geoJSONStore;
|
|
22536
22552
|
j.mapLibreMap.on("load", () => {
|
|
22537
22553
|
j.view.bounds = j.mapLibreMap.getBounds(), j.view.bearing = j.mapLibreMap.getBearing(), j.view.pitch = j.mapLibreMap.getPitch(), j.view.zoom = j.mapLibreMap.getZoom(), j.view.center = j.mapLibreMap.getCenter(), me.dispatchEvent("maplibre-map-ready");
|
|
22538
22554
|
}), j.mapLibreMap.on("rotateend", () => {
|
|
@@ -22541,10 +22557,10 @@ function hm(me) {
|
|
|
22541
22557
|
j.view.pitch = j.mapLibreMap.getPitch(), me.dispatchEvent("maplibre-map-view-change");
|
|
22542
22558
|
}), j.mapLibreMap.on("moveend", () => {
|
|
22543
22559
|
j.view.bounds = j.mapLibreMap.getBounds(), j.view.center = j.mapLibreMap.getCenter(), j.view.zoom = j.mapLibreMap.getZoom(), me.dispatchEvent("maplibre-map-view-change");
|
|
22544
|
-
}), j.mapLibreMap.on("click", (
|
|
22560
|
+
}), j.mapLibreMap.on("click", (Ue) => {
|
|
22545
22561
|
const C = [
|
|
22546
|
-
[
|
|
22547
|
-
[
|
|
22562
|
+
[Ue.point.x - 10, Ue.point.y - 10],
|
|
22563
|
+
[Ue.point.x + 10, Ue.point.y + 10]
|
|
22548
22564
|
], c = j.mapLibreMap.queryRenderedFeatures(C);
|
|
22549
22565
|
let be = null;
|
|
22550
22566
|
for (const ct of c) {
|
|
@@ -22553,14 +22569,14 @@ function hm(me) {
|
|
|
22553
22569
|
be = de.get(ut);
|
|
22554
22570
|
break;
|
|
22555
22571
|
}
|
|
22556
|
-
for (const pt of
|
|
22572
|
+
for (const pt of je.values())
|
|
22557
22573
|
if (pt.hasOverlay(ut)) {
|
|
22558
22574
|
be = pt.getOverlay(ut);
|
|
22559
22575
|
break;
|
|
22560
22576
|
}
|
|
22561
22577
|
if (be) break;
|
|
22562
22578
|
}
|
|
22563
|
-
be ? me.setActiveOverlay(be) : me.setActiveOverlay();
|
|
22579
|
+
be ? me.setActiveOverlay(be, { lngLat: Ue.lngLat }) : me.setActiveOverlay();
|
|
22564
22580
|
});
|
|
22565
22581
|
}
|
|
22566
22582
|
return J(), j;
|
|
@@ -22576,7 +22592,7 @@ class um extends CustomEvent {
|
|
|
22576
22592
|
class dm {
|
|
22577
22593
|
constructor(j = {}) {
|
|
22578
22594
|
const J = {
|
|
22579
|
-
id:
|
|
22595
|
+
id: Yh(),
|
|
22580
22596
|
mapOptions: {},
|
|
22581
22597
|
geoJSON: null,
|
|
22582
22598
|
onLoad: null,
|
|
@@ -22664,7 +22680,7 @@ class dm {
|
|
|
22664
22680
|
});
|
|
22665
22681
|
}
|
|
22666
22682
|
// Actions
|
|
22667
|
-
setActiveOverlay(j = null) {
|
|
22683
|
+
setActiveOverlay(j = null, { lngLat: J } = {}) {
|
|
22668
22684
|
if (!j) {
|
|
22669
22685
|
this.activeOverlay && this.activeOverlay.setActive(!1), this.activeOverlay = null, this.dispatchEvent("state-active-overlay-unset");
|
|
22670
22686
|
return;
|
|
@@ -22676,21 +22692,21 @@ class dm {
|
|
|
22676
22692
|
}
|
|
22677
22693
|
this.activeOverlay.setActive(!1), this.activeOverlay = null;
|
|
22678
22694
|
}
|
|
22679
|
-
this.activeOverlay = j, j.setActive(!0), j.flyTo(), j.openPopup(), this.dispatchEvent("state-active-overlay-set");
|
|
22695
|
+
this.activeOverlay = j, j.setActive(!0), j.flyTo(), j.openPopup(J), this.dispatchEvent("state-active-overlay-set");
|
|
22680
22696
|
}
|
|
22681
22697
|
rotateMap(j = "cw", J = 90) {
|
|
22682
22698
|
const { mapLibreMap: de } = this.mapLibreStore;
|
|
22683
22699
|
if (de.isRotating())
|
|
22684
22700
|
return;
|
|
22685
|
-
const
|
|
22686
|
-
de.rotateTo(
|
|
22701
|
+
const je = de.getBearing(), Ue = j === "cw" ? je + J : je - J;
|
|
22702
|
+
de.rotateTo(Ue, Hf);
|
|
22687
22703
|
}
|
|
22688
22704
|
pitchMap(j = "down", J = 15) {
|
|
22689
|
-
const { mapLibreMap: de } = this.mapLibreStore,
|
|
22690
|
-
let
|
|
22691
|
-
|
|
22705
|
+
const { mapLibreMap: de } = this.mapLibreStore, je = de.getPitch();
|
|
22706
|
+
let Ue = j === "down" ? je + J : je - J;
|
|
22707
|
+
Ue = Math.max(0, Math.min(60, Ue)), de.easeTo(
|
|
22692
22708
|
{
|
|
22693
|
-
pitch:
|
|
22709
|
+
pitch: Ue,
|
|
22694
22710
|
...ao
|
|
22695
22711
|
},
|
|
22696
22712
|
{ easing: (C) => C * (2 - C) }
|
|
@@ -22750,41 +22766,41 @@ function fm(me = {}) {
|
|
|
22750
22766
|
function pm(me) {
|
|
22751
22767
|
return new oo(me);
|
|
22752
22768
|
}
|
|
22753
|
-
function
|
|
22769
|
+
function Xh(me) {
|
|
22754
22770
|
if (me.type)
|
|
22755
|
-
switch (
|
|
22771
|
+
switch (Fd(me)) {
|
|
22756
22772
|
case "marker":
|
|
22757
|
-
return new Vd(me);
|
|
22758
|
-
case "line":
|
|
22759
22773
|
return new Ud(me);
|
|
22760
|
-
case "
|
|
22774
|
+
case "line":
|
|
22761
22775
|
return new $d(me);
|
|
22776
|
+
case "shape":
|
|
22777
|
+
return new Zd(me);
|
|
22762
22778
|
default:
|
|
22763
|
-
|
|
22779
|
+
return console.warn("[Waymark] Unsupported geometry type:", me.geometry.type), null;
|
|
22764
22780
|
}
|
|
22765
22781
|
}
|
|
22766
22782
|
function mm(me) {
|
|
22767
|
-
return new
|
|
22783
|
+
return new Ud(me);
|
|
22768
22784
|
}
|
|
22769
22785
|
function gm(me) {
|
|
22770
|
-
return new
|
|
22786
|
+
return new $d(me);
|
|
22771
22787
|
}
|
|
22772
22788
|
function _m(me) {
|
|
22773
|
-
return new
|
|
22789
|
+
return new Zd(me);
|
|
22774
22790
|
}
|
|
22775
22791
|
export {
|
|
22776
22792
|
um as WaymarkEvent,
|
|
22777
22793
|
dm as WaymarkInstance,
|
|
22778
|
-
|
|
22794
|
+
$d as WaymarkLine,
|
|
22779
22795
|
oo as WaymarkMap,
|
|
22780
|
-
|
|
22796
|
+
Ud as WaymarkMarker,
|
|
22781
22797
|
Fn as WaymarkOverlay,
|
|
22782
|
-
|
|
22798
|
+
Zd as WaymarkShape,
|
|
22783
22799
|
fm as createInstance,
|
|
22784
22800
|
gm as createLine,
|
|
22785
22801
|
pm as createMap,
|
|
22786
22802
|
mm as createMarker,
|
|
22787
|
-
|
|
22803
|
+
Xh as createOverlay,
|
|
22788
22804
|
_m as createShape,
|
|
22789
22805
|
Hh as waymarkEventName
|
|
22790
22806
|
};
|