@opengis/bi 1.0.19 → 1.0.21
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/README.md +8 -1
- package/dist/bi.js +1 -1
- package/dist/bi.umd.cjs +93 -77
- package/dist/{import-file-BJjgK8Hl.js → import-file-C8BY90-b.js} +18436 -18368
- package/dist/{map-component-mixin-BDeshFZi.js → map-component-mixin-CFtShPun.js} +711 -728
- package/dist/{vs-calendar-D98bcwCO.js → vs-calendar-B9vXdsaG.js} +1 -1
- package/dist/{vs-funnel-bar-Ps4AevXk.js → vs-funnel-bar-Cj0O8tIf.js} +1 -1
- package/dist/{vs-heatmap-DQ4l7XOD.js → vs-heatmap-C9oFph_f.js} +1 -1
- package/dist/{vs-map-C36n66Hj.js → vs-map-WOn0RAU7.js} +2 -2
- package/dist/{vs-map-cluster-Bcjcul0f.js → vs-map-cluster-RJa6sNfI.js} +2 -2
- package/dist/{vs-number-XzxJiWRu.js → vs-number-BG0szZL-.js} +1 -1
- package/dist/{vs-text-DWhTWJlt.js → vs-text-Kwl3-0yy.js} +4 -4
- package/package.json +3 -3
- package/server/routes/dashboard/controllers/dashboard.js +11 -0
- package/server/routes/data/controllers/data.js +14 -0
- package/server/routes/edit/controllers/widget.edit.js +17 -15
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { openBlock as Nt, createElementBlock as jt, createStaticVNode as Gp, resolveComponent as Uo, createElementVNode as ct, createVNode as $o, toDisplayString as Ln, createCommentVNode as jo, Fragment as
|
|
2
|
-
import { _ as en, j as Wp, V as Kp } from "./import-file-
|
|
1
|
+
import { openBlock as Nt, createElementBlock as jt, createStaticVNode as Gp, resolveComponent as Uo, createElementVNode as ct, createVNode as $o, toDisplayString as Ln, createCommentVNode as jo, Fragment as oh, renderList as lh, normalizeStyle as Hu, normalizeClass as ch, withDirectives as Hp, vShow as Xp } from "vue";
|
|
2
|
+
import { _ as en, j as Wp, V as Kp } from "./import-file-C8BY90-b.js";
|
|
3
3
|
function Jp(te) {
|
|
4
4
|
return [
|
|
5
5
|
{
|
|
@@ -36,7 +36,7 @@ function Qp(te) {
|
|
|
36
36
|
}
|
|
37
37
|
];
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function Xu(te) {
|
|
40
40
|
if (!te) return null;
|
|
41
41
|
const de = te.type || "point";
|
|
42
42
|
return de === "polygon" ? Jp(te) : de === "line" ? Yp(te) : Qp(te);
|
|
@@ -55,30 +55,30 @@ const ef = {
|
|
|
55
55
|
},
|
|
56
56
|
methods: {
|
|
57
57
|
moveLayer(te, de = this.map) {
|
|
58
|
-
de.getStyle().layers.forEach((
|
|
59
|
-
|
|
58
|
+
de.getStyle().layers.forEach((me) => {
|
|
59
|
+
me.id.match(te) && de.moveLayer(me.id);
|
|
60
60
|
});
|
|
61
61
|
},
|
|
62
|
-
async setVisible(te, de = !0,
|
|
62
|
+
async setVisible(te, de = !0, me = this.map) {
|
|
63
63
|
if (!te) return;
|
|
64
|
-
const
|
|
65
|
-
if (!(
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
const Le = (te == null ? void 0 : te.id) || te, Ge = this.layerList.find((C) => C.id === te) || te;
|
|
65
|
+
if (!(Ge != null && Ge.id)) throw new Error("MixinError: Layer has no id");
|
|
66
|
+
const Ke = me.getStyle().layers.filter((C) => C.id.match(Le));
|
|
67
|
+
Ke.forEach((C) => {
|
|
68
|
+
me.setLayoutProperty(
|
|
69
69
|
C.id,
|
|
70
70
|
"visibility",
|
|
71
71
|
de ? "visible" : "none"
|
|
72
72
|
);
|
|
73
|
-
}),
|
|
73
|
+
}), !Ke.length && de && await this.addLayer(Ge);
|
|
74
74
|
},
|
|
75
75
|
async addLayer(te, de = this == null ? void 0 : this.map) {
|
|
76
|
-
var
|
|
77
|
-
const
|
|
78
|
-
!this.map.getStyle() || this.map.getStyle().layers.find((C) => C.id ===
|
|
76
|
+
var Ge, Ke;
|
|
77
|
+
const me = this.layerList.find((C) => C.id === te) || te;
|
|
78
|
+
!this.map.getStyle() || this.map.getStyle().layers.find((C) => C.id === me.id) || (this.layerList.find((C) => C.id === me.id) || this.layerList.push(me), (me.service === "vtile" || me.service === "vector" || (Ge = me.url) != null && Ge.includes(".vmt")) && this.addVtileLayer(me, de), me.service === "geojson" && this.addGeoJsonLayer(me, de), ((Ke = me.url) != null && Ke.includes(".png") || ["tms", "raster"].includes(me.service)) && await this.addRasterLayer(me, de));
|
|
79
79
|
},
|
|
80
80
|
async addRasterLayer(te, de = this == null ? void 0 : this.map) {
|
|
81
|
-
var
|
|
81
|
+
var me, Le;
|
|
82
82
|
de.getSource(te.id) || (await de.addSource(te.id, {
|
|
83
83
|
type: "raster",
|
|
84
84
|
tiles: [te == null ? void 0 : te.url],
|
|
@@ -92,20 +92,20 @@ const ef = {
|
|
|
92
92
|
minzoom: 0,
|
|
93
93
|
maxzoom: (te == null ? void 0 : te.maxzoom) || 22
|
|
94
94
|
},
|
|
95
|
-
te.basemap ? (
|
|
95
|
+
te.basemap ? (Le = (me = this.map.getStyle().layers) == null ? void 0 : me[0]) == null ? void 0 : Le.id : null
|
|
96
96
|
));
|
|
97
97
|
},
|
|
98
98
|
async addVtileLayer(te, de = this == null ? void 0 : this.map) {
|
|
99
|
-
var
|
|
100
|
-
const
|
|
99
|
+
var Ke;
|
|
100
|
+
const me = ["props", "pointZoom"].filter((C) => te[C]).map((C) => `&${C}=${te[C]}`), Le = {
|
|
101
101
|
type: "vector",
|
|
102
102
|
tiles: [
|
|
103
|
-
`${(
|
|
103
|
+
`${(Ke = te == null ? void 0 : te.url) != null && Ke.startsWith("http") ? "" : window.location.origin}${te == null ? void 0 : te.url}${me}`
|
|
104
104
|
],
|
|
105
105
|
minzoom: te.minzoom || 3,
|
|
106
106
|
maxzoom: te.maxzoom || 24
|
|
107
107
|
};
|
|
108
|
-
de.addSource(te.id,
|
|
108
|
+
de.addSource(te.id, Le), (Xu(te.style) || te.layers || []).forEach((C, p) => {
|
|
109
109
|
const ht = {
|
|
110
110
|
...C,
|
|
111
111
|
id: `${te.id}-${p}`,
|
|
@@ -118,51 +118,51 @@ const ef = {
|
|
|
118
118
|
});
|
|
119
119
|
},
|
|
120
120
|
async addGeoJsonLayer(te, de = this.map) {
|
|
121
|
-
var
|
|
122
|
-
const
|
|
123
|
-
de.addSource(te.id, { type: "geojson", data:
|
|
121
|
+
var Ge;
|
|
122
|
+
const me = te.data || ((Ge = te == null ? void 0 : te.url) != null && Ge.startsWith("http") ? "" : window.location.origin) + te.url;
|
|
123
|
+
de.addSource(te.id, { type: "geojson", data: me }), (Xu(te.style) || te.layers || []).forEach((Ke) => {
|
|
124
124
|
const C = {
|
|
125
|
-
|
|
125
|
+
...Ke,
|
|
126
126
|
source: te.id,
|
|
127
|
-
id:
|
|
128
|
-
maxzoom:
|
|
129
|
-
minzoom:
|
|
130
|
-
type:
|
|
127
|
+
id: Ke.id || te.id,
|
|
128
|
+
maxzoom: +Ke.maxzoom || 24,
|
|
129
|
+
minzoom: +Ke.minzoom || 0,
|
|
130
|
+
type: Ke.type || "circle"
|
|
131
131
|
};
|
|
132
132
|
de.addLayer(C);
|
|
133
133
|
});
|
|
134
134
|
},
|
|
135
135
|
setLayerData(te, de) {
|
|
136
|
-
this.layerList = this.layerList.map((
|
|
136
|
+
this.layerList = this.layerList.map((me) => me.id === te ? { ...me, ...de } : me);
|
|
137
137
|
},
|
|
138
138
|
async removeLayer(te, de = this.map) {
|
|
139
|
-
de.getSource(te) && (await de.getStyle().layers.forEach(async (
|
|
140
|
-
|
|
139
|
+
de.getSource(te) && (await de.getStyle().layers.forEach(async (me) => {
|
|
140
|
+
me.source === te && await de.removeLayer(me.id);
|
|
141
141
|
}), await de.removeSource(te));
|
|
142
142
|
},
|
|
143
143
|
async setFilter(te, de) {
|
|
144
|
-
const
|
|
145
|
-
if (
|
|
146
|
-
await
|
|
147
|
-
`${window.location.origin}${
|
|
144
|
+
const me = this.layerList.find((Ge) => Ge.id === te), Le = await this.map.getSource(te);
|
|
145
|
+
if (me.service === "vtile") {
|
|
146
|
+
await Le.setTiles([
|
|
147
|
+
`${window.location.origin}${me.url}${me.url.includes("?") ? "&" : "?"}filter=${de}${me.props ? `&props=${me.props}` : ""}`
|
|
148
148
|
]);
|
|
149
149
|
return;
|
|
150
150
|
}
|
|
151
|
-
|
|
151
|
+
me.service;
|
|
152
152
|
},
|
|
153
153
|
async changeBaseLayer(te) {
|
|
154
|
-
const de = te != null && te.id ? te : this.layerList.find((
|
|
155
|
-
if (
|
|
156
|
-
if (this.activeLayer && this.map.setLayoutProperty(this.activeLayer, "visibility", "none"), this.activeLayer =
|
|
157
|
-
this.map.setLayoutProperty(
|
|
154
|
+
const de = te != null && te.id ? te : this.layerList.find((Le) => Le.id === te), { id: me } = de;
|
|
155
|
+
if (me && me !== this.activeLayer) {
|
|
156
|
+
if (this.activeLayer && this.map.setLayoutProperty(this.activeLayer, "visibility", "none"), this.activeLayer = me, this.map.getLayer(me)) {
|
|
157
|
+
this.map.setLayoutProperty(me, "visibility", "visible");
|
|
158
158
|
return;
|
|
159
159
|
}
|
|
160
160
|
await this.addRasterLayer(de);
|
|
161
161
|
}
|
|
162
162
|
},
|
|
163
163
|
async refreshLayer(te, de = this.map) {
|
|
164
|
-
await de.getStyle().layers.forEach((
|
|
165
|
-
|
|
164
|
+
await de.getStyle().layers.forEach((me) => {
|
|
165
|
+
me.source === te && de.removeLayer(me.id);
|
|
166
166
|
}), await de.removeSource(te), this.setVisible(te);
|
|
167
167
|
}
|
|
168
168
|
}
|
|
@@ -177,17 +177,17 @@ var Ku = { exports: {} };
|
|
|
177
177
|
* @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.7.1/LICENSE.txt
|
|
178
178
|
*/
|
|
179
179
|
(function(te, de) {
|
|
180
|
-
(function(
|
|
181
|
-
te.exports =
|
|
180
|
+
(function(me, Le) {
|
|
181
|
+
te.exports = Le();
|
|
182
182
|
})(tf, function() {
|
|
183
|
-
var
|
|
184
|
-
function
|
|
185
|
-
if (
|
|
186
|
-
var Bt = "var sharedModule = {}; (" +
|
|
187
|
-
return
|
|
183
|
+
var me = {}, Le = {};
|
|
184
|
+
function Ge(C, p, ht) {
|
|
185
|
+
if (Le[C] = ht, C === "index") {
|
|
186
|
+
var Bt = "var sharedModule = {}; (" + Le.shared + ")(sharedModule); (" + Le.worker + ")(sharedModule);", _t = {};
|
|
187
|
+
return Le.shared(_t), Le.index(me, _t), typeof window < "u" && me.setWorkerUrl(window.URL.createObjectURL(new Blob([Bt], { type: "text/javascript" }))), me;
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
-
|
|
190
|
+
Ge("shared", ["exports"], function(C) {
|
|
191
191
|
function p(i, t, r, n) {
|
|
192
192
|
return new (r || (r = Promise))(function(l, u) {
|
|
193
193
|
function d(x) {
|
|
@@ -614,7 +614,7 @@ var Ku = { exports: {} };
|
|
|
614
614
|
return !!this.bindings[t] || !!this.parent && this.parent.has(t);
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
|
-
const Or = { kind: "null" }, xe = { kind: "number" },
|
|
617
|
+
const Or = { kind: "null" }, xe = { kind: "number" }, Xe = { kind: "string" }, Ne = { kind: "boolean" }, gi = { kind: "color" }, Wi = { kind: "object" }, qe = { kind: "value" }, mr = { kind: "collator" }, kr = { kind: "formatted" }, Vr = { kind: "padding" }, gr = { kind: "resolvedImage" }, N = { kind: "variableAnchorOffsetCollection" };
|
|
618
618
|
function M(i, t) {
|
|
619
619
|
return { kind: "array", itemType: i, N: t };
|
|
620
620
|
}
|
|
@@ -625,7 +625,7 @@ var Ku = { exports: {} };
|
|
|
625
625
|
}
|
|
626
626
|
return i.kind;
|
|
627
627
|
}
|
|
628
|
-
const L = [Or, xe,
|
|
628
|
+
const L = [Or, xe, Xe, Ne, gi, kr, Wi, M(qe), Vr, gr, N];
|
|
629
629
|
function O(i, t) {
|
|
630
630
|
if (t.kind === "error") return null;
|
|
631
631
|
if (i.kind === "array") {
|
|
@@ -647,8 +647,8 @@ var Ku = { exports: {} };
|
|
|
647
647
|
function Y(i, t) {
|
|
648
648
|
return i.kind === "array" && t.kind === "array" ? i.itemType.kind === t.itemType.kind && typeof i.N == "number" : i.kind === t.kind;
|
|
649
649
|
}
|
|
650
|
-
const q = 0.96422, ne = 0.82521, ce = 4 / 29, ie = 6 / 29,
|
|
651
|
-
function
|
|
650
|
+
const q = 0.96422, ne = 0.82521, ce = 4 / 29, ie = 6 / 29, ge = 3 * ie * ie, Be = ie * ie * ie, Fe = Math.PI / 180, it = 180 / Math.PI;
|
|
651
|
+
function Ze(i) {
|
|
652
652
|
return (i %= 360) < 0 && (i += 360), i;
|
|
653
653
|
}
|
|
654
654
|
function rt([i, t, r, n]) {
|
|
@@ -662,17 +662,17 @@ var Ku = { exports: {} };
|
|
|
662
662
|
return i <= 0.04045 ? i / 12.92 : Math.pow((i + 0.055) / 1.055, 2.4);
|
|
663
663
|
}
|
|
664
664
|
function Ft(i) {
|
|
665
|
-
return i >
|
|
665
|
+
return i > Be ? Math.pow(i, 1 / 3) : i / ge + ce;
|
|
666
666
|
}
|
|
667
667
|
function At([i, t, r, n]) {
|
|
668
668
|
let l = (i + 16) / 116, u = isNaN(t) ? l : l + t / 500, d = isNaN(r) ? l : l - r / 200;
|
|
669
|
-
return l = 1 * ut(l), u = q * ut(u), d = ne * ut(d), [
|
|
669
|
+
return l = 1 * ut(l), u = q * ut(u), d = ne * ut(d), [We(3.1338561 * u - 1.6168667 * l - 0.4906146 * d), We(-0.9787684 * u + 1.9161415 * l + 0.033454 * d), We(0.0719453 * u - 0.2289914 * l + 1.4052427 * d), n];
|
|
670
670
|
}
|
|
671
|
-
function
|
|
671
|
+
function We(i) {
|
|
672
672
|
return (i = i <= 304e-5 ? 12.92 * i : 1.055 * Math.pow(i, 1 / 2.4) - 0.055) < 0 ? 0 : i > 1 ? 1 : i;
|
|
673
673
|
}
|
|
674
674
|
function ut(i) {
|
|
675
|
-
return i > ie ? i * i * i :
|
|
675
|
+
return i > ie ? i * i * i : ge * (i - ce);
|
|
676
676
|
}
|
|
677
677
|
function Pt(i) {
|
|
678
678
|
return parseInt(i.padEnd(2, i), 16) / 255;
|
|
@@ -730,7 +730,7 @@ var Ku = { exports: {} };
|
|
|
730
730
|
const Ie = (ue + j / 30) % 12, Oe = Q * Math.min(G, 1 - G);
|
|
731
731
|
return G - Oe * Math.max(-1, Math.min(Ie - 3, 9 - Ie, 1));
|
|
732
732
|
}
|
|
733
|
-
return j =
|
|
733
|
+
return j = Ze(j), Q /= 100, G /= 100, [se(0), se(8), se(4), J];
|
|
734
734
|
}(F);
|
|
735
735
|
}
|
|
736
736
|
}
|
|
@@ -744,7 +744,7 @@ var Ku = { exports: {} };
|
|
|
744
744
|
get hcl() {
|
|
745
745
|
return this.overwriteGetter("hcl", function(t) {
|
|
746
746
|
const [r, n, l, u] = rt(t), d = Math.sqrt(n * n + l * l);
|
|
747
|
-
return [Math.round(1e4 * d) ?
|
|
747
|
+
return [Math.round(1e4 * d) ? Ze(Math.atan2(l, n) * it) : NaN, d, r, u];
|
|
748
748
|
}(this.rgb));
|
|
749
749
|
}
|
|
750
750
|
get lab() {
|
|
@@ -865,7 +865,7 @@ var Ku = { exports: {} };
|
|
|
865
865
|
}
|
|
866
866
|
function Ot(i) {
|
|
867
867
|
if (i === null) return Or;
|
|
868
|
-
if (typeof i == "string") return
|
|
868
|
+
if (typeof i == "string") return Xe;
|
|
869
869
|
if (typeof i == "boolean") return Ne;
|
|
870
870
|
if (typeof i == "number") return xe;
|
|
871
871
|
if (i instanceof dt) return gi;
|
|
@@ -881,12 +881,12 @@ var Ku = { exports: {} };
|
|
|
881
881
|
const l = Ot(n);
|
|
882
882
|
if (r) {
|
|
883
883
|
if (r === l) continue;
|
|
884
|
-
r =
|
|
884
|
+
r = qe;
|
|
885
885
|
break;
|
|
886
886
|
}
|
|
887
887
|
r = l;
|
|
888
888
|
}
|
|
889
|
-
return M(r ||
|
|
889
|
+
return M(r || qe, t);
|
|
890
890
|
}
|
|
891
891
|
return Wi;
|
|
892
892
|
}
|
|
@@ -923,7 +923,7 @@ var Ku = { exports: {} };
|
|
|
923
923
|
return this.message;
|
|
924
924
|
}
|
|
925
925
|
}
|
|
926
|
-
const On = { string:
|
|
926
|
+
const On = { string: Xe, number: xe, boolean: Ne, object: Wi };
|
|
927
927
|
class Ji {
|
|
928
928
|
constructor(t, r) {
|
|
929
929
|
this.type = t, this.args = r;
|
|
@@ -938,7 +938,7 @@ var Ku = { exports: {} };
|
|
|
938
938
|
const x = t[1];
|
|
939
939
|
if (typeof x != "string" || !(x in On) || x === "object") return r.error('The item type argument of "array" must be one of string, number, boolean', 1);
|
|
940
940
|
f = On[x], l++;
|
|
941
|
-
} else f =
|
|
941
|
+
} else f = qe;
|
|
942
942
|
if (t.length > 3) {
|
|
943
943
|
if (t[2] !== null && (typeof t[2] != "number" || t[2] < 0 || t[2] !== Math.floor(t[2]))) return r.error('The length argument to "array" must be a positive integer literal', 2);
|
|
944
944
|
g = t[2], l++;
|
|
@@ -950,7 +950,7 @@ var Ku = { exports: {} };
|
|
|
950
950
|
}
|
|
951
951
|
const d = [];
|
|
952
952
|
for (; l < t.length; l++) {
|
|
953
|
-
const f = r.parse(t[l], l,
|
|
953
|
+
const f = r.parse(t[l], l, qe);
|
|
954
954
|
if (!f) return null;
|
|
955
955
|
d.push(f);
|
|
956
956
|
}
|
|
@@ -971,7 +971,7 @@ var Ku = { exports: {} };
|
|
|
971
971
|
return this.args.every((t) => t.outputDefined());
|
|
972
972
|
}
|
|
973
973
|
}
|
|
974
|
-
const La = { "to-boolean": Ne, "to-color": gi, "to-number": xe, "to-string":
|
|
974
|
+
const La = { "to-boolean": Ne, "to-color": gi, "to-number": xe, "to-string": Xe };
|
|
975
975
|
class Yi {
|
|
976
976
|
constructor(t, r) {
|
|
977
977
|
this.type = t, this.args = r;
|
|
@@ -983,7 +983,7 @@ var Ku = { exports: {} };
|
|
|
983
983
|
if ((n === "to-boolean" || n === "to-string") && t.length !== 2) return r.error("Expected one argument.");
|
|
984
984
|
const l = La[n], u = [];
|
|
985
985
|
for (let d = 1; d < t.length; d++) {
|
|
986
|
-
const f = r.parse(t[d], d,
|
|
986
|
+
const f = r.parse(t[d], d, qe);
|
|
987
987
|
if (!f) return null;
|
|
988
988
|
u.push(f);
|
|
989
989
|
}
|
|
@@ -1179,7 +1179,7 @@ var Ku = { exports: {} };
|
|
|
1179
1179
|
}
|
|
1180
1180
|
static parse(t, r) {
|
|
1181
1181
|
if (t.length !== 3) return r.error(`Expected 2 arguments, but found ${t.length - 1} instead.`);
|
|
1182
|
-
const n = r.parse(t[1], 1, xe), l = r.parse(t[2], 2, M(r.expectedType ||
|
|
1182
|
+
const n = r.parse(t[1], 1, xe), l = r.parse(t[2], 2, M(r.expectedType || qe));
|
|
1183
1183
|
return n && l ? new Ra(l.type.itemType, n, l) : null;
|
|
1184
1184
|
}
|
|
1185
1185
|
evaluate(t) {
|
|
@@ -1202,8 +1202,8 @@ var Ku = { exports: {} };
|
|
|
1202
1202
|
}
|
|
1203
1203
|
static parse(t, r) {
|
|
1204
1204
|
if (t.length !== 3) return r.error(`Expected 2 arguments, but found ${t.length - 1} instead.`);
|
|
1205
|
-
const n = r.parse(t[1], 1,
|
|
1206
|
-
return n && l ? H(n.type, [Ne,
|
|
1205
|
+
const n = r.parse(t[1], 1, qe), l = r.parse(t[2], 2, qe);
|
|
1206
|
+
return n && l ? H(n.type, [Ne, Xe, xe, Or, qe]) ? new Ba(n, l) : r.error(`Expected first argument to be of type boolean, string, number or null, but found ${P(n.type)} instead`) : null;
|
|
1207
1207
|
}
|
|
1208
1208
|
evaluate(t) {
|
|
1209
1209
|
const r = this.needle.evaluate(t), n = this.haystack.evaluate(t);
|
|
@@ -1225,9 +1225,9 @@ var Ku = { exports: {} };
|
|
|
1225
1225
|
}
|
|
1226
1226
|
static parse(t, r) {
|
|
1227
1227
|
if (t.length <= 2 || t.length >= 5) return r.error(`Expected 3 or 4 arguments, but found ${t.length - 1} instead.`);
|
|
1228
|
-
const n = r.parse(t[1], 1,
|
|
1228
|
+
const n = r.parse(t[1], 1, qe), l = r.parse(t[2], 2, qe);
|
|
1229
1229
|
if (!n || !l) return null;
|
|
1230
|
-
if (!H(n.type, [Ne,
|
|
1230
|
+
if (!H(n.type, [Ne, Xe, xe, Or, qe])) return r.error(`Expected first argument to be of type boolean, string, number or null, but found ${P(n.type)} instead`);
|
|
1231
1231
|
if (t.length === 4) {
|
|
1232
1232
|
const u = r.parse(t[3], 3, xe);
|
|
1233
1233
|
return u ? new ws(n, l, u) : null;
|
|
@@ -1282,7 +1282,7 @@ var Ku = { exports: {} };
|
|
|
1282
1282
|
if (!k) return null;
|
|
1283
1283
|
l = l || k.type, d.push(k);
|
|
1284
1284
|
}
|
|
1285
|
-
const f = r.parse(t[1], 1,
|
|
1285
|
+
const f = r.parse(t[1], 1, qe);
|
|
1286
1286
|
if (!f) return null;
|
|
1287
1287
|
const g = r.parse(t[t.length - 1], t.length - 1, l);
|
|
1288
1288
|
return g ? f.type.kind !== "value" && r.concat(1).checkSubtype(n, f.type) ? null : new Fa(n, l, f, u, d, g) : null;
|
|
@@ -1338,9 +1338,9 @@ var Ku = { exports: {} };
|
|
|
1338
1338
|
}
|
|
1339
1339
|
static parse(t, r) {
|
|
1340
1340
|
if (t.length <= 2 || t.length >= 5) return r.error(`Expected 3 or 4 arguments, but found ${t.length - 1} instead.`);
|
|
1341
|
-
const n = r.parse(t[1], 1,
|
|
1341
|
+
const n = r.parse(t[1], 1, qe), l = r.parse(t[2], 2, xe);
|
|
1342
1342
|
if (!n || !l) return null;
|
|
1343
|
-
if (!H(n.type, [M(
|
|
1343
|
+
if (!H(n.type, [M(qe), Xe, qe])) return r.error(`Expected first argument to be of type array or string, but found ${P(n.type)} instead`);
|
|
1344
1344
|
if (t.length === 4) {
|
|
1345
1345
|
const u = r.parse(t[3], 3, xe);
|
|
1346
1346
|
return u ? new cn(n.type, n, l, u) : null;
|
|
@@ -1463,7 +1463,7 @@ var Ku = { exports: {} };
|
|
|
1463
1463
|
g > l && Q > 180 ? Q -= 360 : g < l && l - g > 180 && (Q += 360), I = l + r * Q;
|
|
1464
1464
|
}
|
|
1465
1465
|
const [z, E, F, j] = function([Q, G, J, se]) {
|
|
1466
|
-
return Q = isNaN(Q) ? 0 : Q *
|
|
1466
|
+
return Q = isNaN(Q) ? 0 : Q * Fe, At([J, Math.cos(Q) * G, Math.sin(Q) * G, se]);
|
|
1467
1467
|
}([I, k ?? es(u, x, r), es(d, v, r), es(f, w, r)]);
|
|
1468
1468
|
return new dt(z, E, F, j, !1);
|
|
1469
1469
|
}
|
|
@@ -1579,7 +1579,7 @@ var Ku = { exports: {} };
|
|
|
1579
1579
|
}
|
|
1580
1580
|
if (!n) throw new Error("No output type");
|
|
1581
1581
|
const d = l && u.some((f) => O(l, f.type));
|
|
1582
|
-
return new $n(d ?
|
|
1582
|
+
return new $n(d ? qe : n, u);
|
|
1583
1583
|
}
|
|
1584
1584
|
evaluate(t) {
|
|
1585
1585
|
let r, n = null, l = 0;
|
|
@@ -1608,10 +1608,10 @@ var Ku = { exports: {} };
|
|
|
1608
1608
|
static parse(u, d) {
|
|
1609
1609
|
if (u.length !== 3 && u.length !== 4) return d.error("Expected two or three arguments.");
|
|
1610
1610
|
const f = u[0];
|
|
1611
|
-
let g = d.parse(u[1], 1,
|
|
1611
|
+
let g = d.parse(u[1], 1, qe);
|
|
1612
1612
|
if (!g) return null;
|
|
1613
1613
|
if (!qn(f, g.type)) return d.concat(1).error(`"${f}" comparisons are not supported for type '${P(g.type)}'.`);
|
|
1614
|
-
let x = d.parse(u[2], 2,
|
|
1614
|
+
let x = d.parse(u[2], 2, qe);
|
|
1615
1615
|
if (!x) return null;
|
|
1616
1616
|
if (!qn(f, x.type)) return d.concat(2).error(`"${f}" comparisons are not supported for type '${P(x.type)}'.`);
|
|
1617
1617
|
if (g.type.kind !== x.type.kind && g.type.kind !== "value" && x.type.kind !== "value") return d.error(`Cannot compare types '${P(g.type)}' and '${P(x.type)}'.`);
|
|
@@ -1679,7 +1679,7 @@ var Ku = { exports: {} };
|
|
|
1679
1679
|
const u = r.parse(n["diacritic-sensitive"] !== void 0 && n["diacritic-sensitive"], 1, Ne);
|
|
1680
1680
|
if (!u) return null;
|
|
1681
1681
|
let d = null;
|
|
1682
|
-
return n.locale && (d = r.parse(n.locale, 1,
|
|
1682
|
+
return n.locale && (d = r.parse(n.locale, 1, Xe), !d) ? null : new un(l, u, d);
|
|
1683
1683
|
}
|
|
1684
1684
|
evaluate(t) {
|
|
1685
1685
|
return new Ea(this.caseSensitive.evaluate(t), this.diacriticSensitive.evaluate(t), this.locale ? this.locale.evaluate(t) : null);
|
|
@@ -1693,7 +1693,7 @@ var Ku = { exports: {} };
|
|
|
1693
1693
|
}
|
|
1694
1694
|
class Oa {
|
|
1695
1695
|
constructor(t, r, n, l, u) {
|
|
1696
|
-
this.type =
|
|
1696
|
+
this.type = Xe, this.number = t, this.locale = r, this.currency = n, this.minFractionDigits = l, this.maxFractionDigits = u;
|
|
1697
1697
|
}
|
|
1698
1698
|
static parse(t, r) {
|
|
1699
1699
|
if (t.length !== 3) return r.error("Expected two arguments.");
|
|
@@ -1702,9 +1702,9 @@ var Ku = { exports: {} };
|
|
|
1702
1702
|
const l = t[2];
|
|
1703
1703
|
if (typeof l != "object" || Array.isArray(l)) return r.error("NumberFormat options argument must be an object.");
|
|
1704
1704
|
let u = null;
|
|
1705
|
-
if (l.locale && (u = r.parse(l.locale, 1,
|
|
1705
|
+
if (l.locale && (u = r.parse(l.locale, 1, Xe), !u)) return null;
|
|
1706
1706
|
let d = null;
|
|
1707
|
-
if (l.currency && (d = r.parse(l.currency, 1,
|
|
1707
|
+
if (l.currency && (d = r.parse(l.currency, 1, Xe), !d)) return null;
|
|
1708
1708
|
let f = null;
|
|
1709
1709
|
if (l["min-fraction-digits"] && (f = r.parse(l["min-fraction-digits"], 1, xe), !f)) return null;
|
|
1710
1710
|
let g = null;
|
|
@@ -1737,13 +1737,13 @@ var Ku = { exports: {} };
|
|
|
1737
1737
|
let g = null;
|
|
1738
1738
|
if (f["font-scale"] && (g = r.parse(f["font-scale"], 1, xe), !g)) return null;
|
|
1739
1739
|
let x = null;
|
|
1740
|
-
if (f["text-font"] && (x = r.parse(f["text-font"], 1, M(
|
|
1740
|
+
if (f["text-font"] && (x = r.parse(f["text-font"], 1, M(Xe)), !x)) return null;
|
|
1741
1741
|
let v = null;
|
|
1742
1742
|
if (f["text-color"] && (v = r.parse(f["text-color"], 1, gi), !v)) return null;
|
|
1743
1743
|
const w = l[l.length - 1];
|
|
1744
1744
|
w.scale = g, w.font = x, w.textColor = v;
|
|
1745
1745
|
} else {
|
|
1746
|
-
const g = r.parse(t[d], 1,
|
|
1746
|
+
const g = r.parse(t[d], 1, qe);
|
|
1747
1747
|
if (!g) return null;
|
|
1748
1748
|
const x = g.type.kind;
|
|
1749
1749
|
if (x !== "string" && x !== "value" && x !== "null" && x !== "resolvedImage") return r.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");
|
|
@@ -1771,7 +1771,7 @@ var Ku = { exports: {} };
|
|
|
1771
1771
|
}
|
|
1772
1772
|
static parse(t, r) {
|
|
1773
1773
|
if (t.length !== 2) return r.error("Expected two arguments.");
|
|
1774
|
-
const n = r.parse(t[1], 1,
|
|
1774
|
+
const n = r.parse(t[1], 1, Xe);
|
|
1775
1775
|
return n ? new Va(n) : r.error("No image name provided.");
|
|
1776
1776
|
}
|
|
1777
1777
|
evaluate(t) {
|
|
@@ -2558,12 +2558,12 @@ var Ku = { exports: {} };
|
|
|
2558
2558
|
}
|
|
2559
2559
|
return Cs(r, i.default, t.default);
|
|
2560
2560
|
}
|
|
2561
|
-
Vi.register(Ps, { error: [{ kind: "error" }, [
|
|
2561
|
+
Vi.register(Ps, { error: [{ kind: "error" }, [Xe], (i, [t]) => {
|
|
2562
2562
|
throw new Lt(t.evaluate(i));
|
|
2563
|
-
}], typeof: [
|
|
2563
|
+
}], typeof: [Xe, [qe], (i, [t]) => P(Ot(t.evaluate(i)))], "to-rgba": [M(xe, 4), [gi], (i, [t]) => {
|
|
2564
2564
|
const [r, n, l, u] = t.evaluate(i).rgb;
|
|
2565
2565
|
return [255 * r, 255 * n, 255 * l, u];
|
|
2566
|
-
}], rgb: [gi, [xe, xe, xe], Ka], rgba: [gi, [xe, xe, xe, xe], Ka], has: { type: Ne, overloads: [[[
|
|
2566
|
+
}], rgb: [gi, [xe, xe, xe], Ka], rgba: [gi, [xe, xe, xe, xe], Ka], has: { type: Ne, overloads: [[[Xe], (i, [t]) => Ja(t.evaluate(i), i.properties())], [[Xe, Wi], (i, [t, r]) => Ja(t.evaluate(i), r.evaluate(i))]] }, get: { type: qe, overloads: [[[Xe], (i, [t]) => Ya(t.evaluate(i), i.properties())], [[Xe, Wi], (i, [t, r]) => Ya(t.evaluate(i), r.evaluate(i))]] }, "feature-state": [qe, [Xe], (i, [t]) => Ya(t.evaluate(i), i.featureState || {})], properties: [Wi, [], (i) => i.properties()], "geometry-type": [Xe, [], (i) => i.geometryType()], id: [qe, [], (i) => i.id()], zoom: [xe, [], (i) => i.globals.zoom], "heatmap-density": [xe, [], (i) => i.globals.heatmapDensity || 0], "line-progress": [xe, [], (i) => i.globals.lineProgress || 0], accumulated: [qe, [], (i) => i.globals.accumulated === void 0 ? null : i.globals.accumulated], "+": [xe, as(xe), (i, t) => {
|
|
2567
2567
|
let r = 0;
|
|
2568
2568
|
for (const n of t) r += n.evaluate(i);
|
|
2569
2569
|
return r;
|
|
@@ -2574,31 +2574,31 @@ var Ku = { exports: {} };
|
|
|
2574
2574
|
}], "-": { type: xe, overloads: [[[xe, xe], (i, [t, r]) => t.evaluate(i) - r.evaluate(i)], [[xe], (i, [t]) => -t.evaluate(i)]] }, "/": [xe, [xe, xe], (i, [t, r]) => t.evaluate(i) / r.evaluate(i)], "%": [xe, [xe, xe], (i, [t, r]) => t.evaluate(i) % r.evaluate(i)], ln2: [xe, [], () => Math.LN2], pi: [xe, [], () => Math.PI], e: [xe, [], () => Math.E], "^": [xe, [xe, xe], (i, [t, r]) => Math.pow(t.evaluate(i), r.evaluate(i))], sqrt: [xe, [xe], (i, [t]) => Math.sqrt(t.evaluate(i))], log10: [xe, [xe], (i, [t]) => Math.log(t.evaluate(i)) / Math.LN10], ln: [xe, [xe], (i, [t]) => Math.log(t.evaluate(i))], log2: [xe, [xe], (i, [t]) => Math.log(t.evaluate(i)) / Math.LN2], sin: [xe, [xe], (i, [t]) => Math.sin(t.evaluate(i))], cos: [xe, [xe], (i, [t]) => Math.cos(t.evaluate(i))], tan: [xe, [xe], (i, [t]) => Math.tan(t.evaluate(i))], asin: [xe, [xe], (i, [t]) => Math.asin(t.evaluate(i))], acos: [xe, [xe], (i, [t]) => Math.acos(t.evaluate(i))], atan: [xe, [xe], (i, [t]) => Math.atan(t.evaluate(i))], min: [xe, as(xe), (i, t) => Math.min(...t.map((r) => r.evaluate(i)))], max: [xe, as(xe), (i, t) => Math.max(...t.map((r) => r.evaluate(i)))], abs: [xe, [xe], (i, [t]) => Math.abs(t.evaluate(i))], round: [xe, [xe], (i, [t]) => {
|
|
2575
2575
|
const r = t.evaluate(i);
|
|
2576
2576
|
return r < 0 ? -Math.round(-r) : Math.round(r);
|
|
2577
|
-
}], floor: [xe, [xe], (i, [t]) => Math.floor(t.evaluate(i))], ceil: [xe, [xe], (i, [t]) => Math.ceil(t.evaluate(i))], "filter-==": [Ne, [
|
|
2577
|
+
}], floor: [xe, [xe], (i, [t]) => Math.floor(t.evaluate(i))], ceil: [xe, [xe], (i, [t]) => Math.ceil(t.evaluate(i))], "filter-==": [Ne, [Xe, qe], (i, [t, r]) => i.properties()[t.value] === r.value], "filter-id-==": [Ne, [qe], (i, [t]) => i.id() === t.value], "filter-type-==": [Ne, [Xe], (i, [t]) => i.geometryType() === t.value], "filter-<": [Ne, [Xe, qe], (i, [t, r]) => {
|
|
2578
2578
|
const n = i.properties()[t.value], l = r.value;
|
|
2579
2579
|
return typeof n == typeof l && n < l;
|
|
2580
|
-
}], "filter-id-<": [Ne, [
|
|
2580
|
+
}], "filter-id-<": [Ne, [qe], (i, [t]) => {
|
|
2581
2581
|
const r = i.id(), n = t.value;
|
|
2582
2582
|
return typeof r == typeof n && r < n;
|
|
2583
|
-
}], "filter->": [Ne, [
|
|
2583
|
+
}], "filter->": [Ne, [Xe, qe], (i, [t, r]) => {
|
|
2584
2584
|
const n = i.properties()[t.value], l = r.value;
|
|
2585
2585
|
return typeof n == typeof l && n > l;
|
|
2586
|
-
}], "filter-id->": [Ne, [
|
|
2586
|
+
}], "filter-id->": [Ne, [qe], (i, [t]) => {
|
|
2587
2587
|
const r = i.id(), n = t.value;
|
|
2588
2588
|
return typeof r == typeof n && r > n;
|
|
2589
|
-
}], "filter-<=": [Ne, [
|
|
2589
|
+
}], "filter-<=": [Ne, [Xe, qe], (i, [t, r]) => {
|
|
2590
2590
|
const n = i.properties()[t.value], l = r.value;
|
|
2591
2591
|
return typeof n == typeof l && n <= l;
|
|
2592
|
-
}], "filter-id-<=": [Ne, [
|
|
2592
|
+
}], "filter-id-<=": [Ne, [qe], (i, [t]) => {
|
|
2593
2593
|
const r = i.id(), n = t.value;
|
|
2594
2594
|
return typeof r == typeof n && r <= n;
|
|
2595
|
-
}], "filter->=": [Ne, [
|
|
2595
|
+
}], "filter->=": [Ne, [Xe, qe], (i, [t, r]) => {
|
|
2596
2596
|
const n = i.properties()[t.value], l = r.value;
|
|
2597
2597
|
return typeof n == typeof l && n >= l;
|
|
2598
|
-
}], "filter-id->=": [Ne, [
|
|
2598
|
+
}], "filter-id->=": [Ne, [qe], (i, [t]) => {
|
|
2599
2599
|
const r = i.id(), n = t.value;
|
|
2600
2600
|
return typeof r == typeof n && r >= n;
|
|
2601
|
-
}], "filter-has": [Ne, [
|
|
2601
|
+
}], "filter-has": [Ne, [qe], (i, [t]) => t.value in i.properties()], "filter-has-id": [Ne, [], (i) => i.id() !== null && i.id() !== void 0], "filter-type-in": [Ne, [M(Xe)], (i, [t]) => t.value.indexOf(i.geometryType()) >= 0], "filter-id-in": [Ne, [M(qe)], (i, [t]) => t.value.indexOf(i.id()) >= 0], "filter-in-small": [Ne, [Xe, M(qe)], (i, [t, r]) => r.value.indexOf(i.properties()[t.value]) >= 0], "filter-in-large": [Ne, [Xe, M(qe)], (i, [t, r]) => function(n, l, u, d) {
|
|
2602
2602
|
for (; u <= d; ) {
|
|
2603
2603
|
const f = u + d >> 1;
|
|
2604
2604
|
if (l[f] === n) return !0;
|
|
@@ -2611,10 +2611,10 @@ var Ku = { exports: {} };
|
|
|
2611
2611
|
}]] }, any: { type: Ne, overloads: [[[Ne, Ne], (i, [t, r]) => t.evaluate(i) || r.evaluate(i)], [as(Ne), (i, t) => {
|
|
2612
2612
|
for (const r of t) if (r.evaluate(i)) return !0;
|
|
2613
2613
|
return !1;
|
|
2614
|
-
}]] }, "!": [Ne, [Ne], (i, [t]) => !t.evaluate(i)], "is-supported-script": [Ne, [
|
|
2614
|
+
}]] }, "!": [Ne, [Ne], (i, [t]) => !t.evaluate(i)], "is-supported-script": [Ne, [Xe], (i, [t]) => {
|
|
2615
2615
|
const r = i.globals && i.globals.isSupportedScript;
|
|
2616
2616
|
return !r || r(t.evaluate(i));
|
|
2617
|
-
}], upcase: [
|
|
2617
|
+
}], upcase: [Xe, [Xe], (i, [t]) => t.evaluate(i).toUpperCase()], downcase: [Xe, [Xe], (i, [t]) => t.evaluate(i).toLowerCase()], concat: [Xe, as(qe), (i, t) => t.map((r) => ln(r.evaluate(i))).join("")], "resolved-locale": [Xe, [mr], (i, [t]) => t.evaluate(i).resolvedLocale()] });
|
|
2618
2618
|
class ea {
|
|
2619
2619
|
constructor(t, r) {
|
|
2620
2620
|
var n;
|
|
@@ -2640,8 +2640,8 @@ var Ku = { exports: {} };
|
|
|
2640
2640
|
}
|
|
2641
2641
|
function zs(i, t) {
|
|
2642
2642
|
const r = new Qr(Ps, mn, [], t ? function(l) {
|
|
2643
|
-
const u = { color: gi, string:
|
|
2644
|
-
return l.type === "array" ? M(u[l.value] ||
|
|
2643
|
+
const u = { color: gi, string: Xe, number: xe, enum: Xe, boolean: Ne, formatted: kr, padding: Vr, resolvedImage: gr, variableAnchorOffsetCollection: N };
|
|
2644
|
+
return l.type === "array" ? M(u[l.value] || qe, l.length) : u[l.type];
|
|
2645
2645
|
}(t) : void 0), n = r.parse(i, void 0, void 0, void 0, t && t.type === "string" ? { typeAnnotation: "coerce" } : void 0);
|
|
2646
2646
|
return n ? Jn(new ea(n, t)) : ks(r.errors);
|
|
2647
2647
|
}
|
|
@@ -4004,8 +4004,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4004
4004
|
return this.resize(Me + 1), this.emplace(Me, t, r, n, l, u, d, f, g, x, v, w, I, k, z, E, F, j, Q, G, J, se, ue, Ie, Oe, Se, be, De, Ae);
|
|
4005
4005
|
}
|
|
4006
4006
|
emplace(t, r, n, l, u, d, f, g, x, v, w, I, k, z, E, F, j, Q, G, J, se, ue, Ie, Oe, Se, be, De, Ae, Me) {
|
|
4007
|
-
const oe = 32 * t,
|
|
4008
|
-
return this.int16[oe + 0] = r, this.int16[oe + 1] = n, this.int16[oe + 2] = l, this.int16[oe + 3] = u, this.int16[oe + 4] = d, this.int16[oe + 5] = f, this.int16[oe + 6] = g, this.int16[oe + 7] = x, this.uint16[oe + 8] = v, this.uint16[oe + 9] = w, this.uint16[oe + 10] = I, this.uint16[oe + 11] = k, this.uint16[oe + 12] = z, this.uint16[oe + 13] = E, this.uint16[oe + 14] = F, this.uint16[oe + 15] = j, this.uint16[oe + 16] = Q, this.uint16[oe + 17] = G, this.uint16[oe + 18] = J, this.uint16[oe + 19] = se, this.uint16[oe + 20] = ue, this.uint16[oe + 21] = Ie, this.uint16[oe + 22] = Oe, this.uint32[
|
|
4007
|
+
const oe = 32 * t, Re = 16 * t;
|
|
4008
|
+
return this.int16[oe + 0] = r, this.int16[oe + 1] = n, this.int16[oe + 2] = l, this.int16[oe + 3] = u, this.int16[oe + 4] = d, this.int16[oe + 5] = f, this.int16[oe + 6] = g, this.int16[oe + 7] = x, this.uint16[oe + 8] = v, this.uint16[oe + 9] = w, this.uint16[oe + 10] = I, this.uint16[oe + 11] = k, this.uint16[oe + 12] = z, this.uint16[oe + 13] = E, this.uint16[oe + 14] = F, this.uint16[oe + 15] = j, this.uint16[oe + 16] = Q, this.uint16[oe + 17] = G, this.uint16[oe + 18] = J, this.uint16[oe + 19] = se, this.uint16[oe + 20] = ue, this.uint16[oe + 21] = Ie, this.uint16[oe + 22] = Oe, this.uint32[Re + 12] = Se, this.float32[Re + 13] = be, this.float32[Re + 14] = De, this.uint16[oe + 30] = Ae, this.uint16[oe + 31] = Me, t;
|
|
4009
4009
|
}
|
|
4010
4010
|
}
|
|
4011
4011
|
pe.prototype.bytesPerElement = 64, ke("StructArrayLayout8i15ui1ul2f2ui64", pe);
|
|
@@ -4036,7 +4036,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4036
4036
|
}
|
|
4037
4037
|
}
|
|
4038
4038
|
Pe.prototype.bytesPerElement = 12, ke("StructArrayLayout1ui2f12", Pe);
|
|
4039
|
-
class
|
|
4039
|
+
class ye extends c {
|
|
4040
4040
|
_refreshViews() {
|
|
4041
4041
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
|
|
4042
4042
|
}
|
|
@@ -4049,8 +4049,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4049
4049
|
return this.uint32[2 * t + 0] = r, this.uint16[u + 2] = n, this.uint16[u + 3] = l, t;
|
|
4050
4050
|
}
|
|
4051
4051
|
}
|
|
4052
|
-
|
|
4053
|
-
class
|
|
4052
|
+
ye.prototype.bytesPerElement = 8, ke("StructArrayLayout1ul2ui8", ye);
|
|
4053
|
+
class _e extends c {
|
|
4054
4054
|
_refreshViews() {
|
|
4055
4055
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
|
|
4056
4056
|
}
|
|
@@ -4063,7 +4063,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4063
4063
|
return this.uint16[l + 0] = r, this.uint16[l + 1] = n, t;
|
|
4064
4064
|
}
|
|
4065
4065
|
}
|
|
4066
|
-
|
|
4066
|
+
_e.prototype.bytesPerElement = 4, ke("StructArrayLayout2ui4", _e);
|
|
4067
4067
|
class ze extends c {
|
|
4068
4068
|
_refreshViews() {
|
|
4069
4069
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
|
|
@@ -4077,7 +4077,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4077
4077
|
}
|
|
4078
4078
|
}
|
|
4079
4079
|
ze.prototype.bytesPerElement = 2, ke("StructArrayLayout1ui2", ze);
|
|
4080
|
-
class
|
|
4080
|
+
class $e extends c {
|
|
4081
4081
|
_refreshViews() {
|
|
4082
4082
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
|
|
4083
4083
|
}
|
|
@@ -4090,7 +4090,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4090
4090
|
return this.float32[d + 0] = r, this.float32[d + 1] = n, this.float32[d + 2] = l, this.float32[d + 3] = u, t;
|
|
4091
4091
|
}
|
|
4092
4092
|
}
|
|
4093
|
-
|
|
4093
|
+
$e.prototype.bytesPerElement = 16, ke("StructArrayLayout4f16", $e);
|
|
4094
4094
|
class ve extends o {
|
|
4095
4095
|
get anchorPointX() {
|
|
4096
4096
|
return this._structArray.int16[this._pos2 + 0];
|
|
@@ -4199,7 +4199,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4199
4199
|
}
|
|
4200
4200
|
}
|
|
4201
4201
|
ke("PlacedSymbolArray", wt);
|
|
4202
|
-
class
|
|
4202
|
+
class He extends o {
|
|
4203
4203
|
get anchorX() {
|
|
4204
4204
|
return this._structArray.int16[this._pos2 + 0];
|
|
4205
4205
|
}
|
|
@@ -4288,10 +4288,10 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4288
4288
|
return this._structArray.uint16[this._pos2 + 31];
|
|
4289
4289
|
}
|
|
4290
4290
|
}
|
|
4291
|
-
|
|
4291
|
+
He.prototype.size = 64;
|
|
4292
4292
|
class Qe extends pe {
|
|
4293
4293
|
get(t) {
|
|
4294
|
-
return new
|
|
4294
|
+
return new He(this, t);
|
|
4295
4295
|
}
|
|
4296
4296
|
}
|
|
4297
4297
|
ke("SymbolInstanceArray", Qe);
|
|
@@ -4343,7 +4343,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4343
4343
|
}
|
|
4344
4344
|
}
|
|
4345
4345
|
xi.prototype.size = 8;
|
|
4346
|
-
class hi extends
|
|
4346
|
+
class hi extends ye {
|
|
4347
4347
|
get(t) {
|
|
4348
4348
|
return new xi(this, t);
|
|
4349
4349
|
}
|
|
@@ -4375,7 +4375,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4375
4375
|
}
|
|
4376
4376
|
class ir extends ee {
|
|
4377
4377
|
}
|
|
4378
|
-
class Kt extends
|
|
4378
|
+
class Kt extends _e {
|
|
4379
4379
|
}
|
|
4380
4380
|
const ii = m([{ name: "a_pos", components: 2, type: "Int16" }], 4), { members: Ei } = ii;
|
|
4381
4381
|
class tt {
|
|
@@ -4498,7 +4498,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4498
4498
|
this.current !== t && (this.current = t, this.gl.uniform1f(this.location, t));
|
|
4499
4499
|
}
|
|
4500
4500
|
}
|
|
4501
|
-
class
|
|
4501
|
+
class hh extends Mn {
|
|
4502
4502
|
constructor(t, r) {
|
|
4503
4503
|
super(t, r), this.current = [0, 0, 0, 0];
|
|
4504
4504
|
}
|
|
@@ -4506,7 +4506,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4506
4506
|
t[0] === this.current[0] && t[1] === this.current[1] && t[2] === this.current[2] && t[3] === this.current[3] || (this.current = t, this.gl.uniform4f(this.location, t[0], t[1], t[2], t[3]));
|
|
4507
4507
|
}
|
|
4508
4508
|
}
|
|
4509
|
-
class
|
|
4509
|
+
class uh extends Mn {
|
|
4510
4510
|
constructor(t, r) {
|
|
4511
4511
|
super(t, r), this.current = dt.transparent;
|
|
4512
4512
|
}
|
|
@@ -4526,7 +4526,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4526
4526
|
t.set(n.constantOr(this.value));
|
|
4527
4527
|
}
|
|
4528
4528
|
getBinding(t, r, n) {
|
|
4529
|
-
return this.type === "color" ? new
|
|
4529
|
+
return this.type === "color" ? new uh(t, r) : new Pl(t, r);
|
|
4530
4530
|
}
|
|
4531
4531
|
}
|
|
4532
4532
|
class va {
|
|
@@ -4541,7 +4541,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4541
4541
|
u && t.set(u);
|
|
4542
4542
|
}
|
|
4543
4543
|
getBinding(t, r, n) {
|
|
4544
|
-
return n.substr(0, 9) === "u_pattern" ? new
|
|
4544
|
+
return n.substr(0, 9) === "u_pattern" ? new hh(t, r) : new Pl(t, r);
|
|
4545
4545
|
}
|
|
4546
4546
|
}
|
|
4547
4547
|
class us {
|
|
@@ -4630,7 +4630,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4630
4630
|
this.zoomOutPaintVertexBuffer && this.zoomOutPaintVertexBuffer.destroy(), this.zoomInPaintVertexBuffer && this.zoomInPaintVertexBuffer.destroy();
|
|
4631
4631
|
}
|
|
4632
4632
|
}
|
|
4633
|
-
class
|
|
4633
|
+
class dh {
|
|
4634
4634
|
constructor(t, r, n) {
|
|
4635
4635
|
this.binders = {}, this._buffers = [];
|
|
4636
4636
|
const l = [];
|
|
@@ -4641,10 +4641,10 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4641
4641
|
const f = td(u, t.type), g = d.value, x = d.property.specification.type, v = d.property.useIntegerZoom, w = d.property.specification["property-type"], I = w === "cross-faded" || w === "cross-faded-data-driven";
|
|
4642
4642
|
if (g.kind === "constant") this.binders[u] = I ? new va(g.value, f) : new So(g.value, f, x), l.push(`/u_${u}`);
|
|
4643
4643
|
else if (g.kind === "source" || I) {
|
|
4644
|
-
const k =
|
|
4644
|
+
const k = ph(u, x, "source");
|
|
4645
4645
|
this.binders[u] = I ? new Hs(g, x, v, r, k, t.id) : new us(g, f, x, k), l.push(`/a_${u}`);
|
|
4646
4646
|
} else {
|
|
4647
|
-
const k =
|
|
4647
|
+
const k = ph(u, x, "composite");
|
|
4648
4648
|
this.binders[u] = new zr(g, f, x, v, r, k), l.push(`/z_${u}`);
|
|
4649
4649
|
}
|
|
4650
4650
|
}
|
|
@@ -4754,7 +4754,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4754
4754
|
class kn {
|
|
4755
4755
|
constructor(t, r, n = () => !0) {
|
|
4756
4756
|
this.programConfigurations = {};
|
|
4757
|
-
for (const l of t) this.programConfigurations[l.id] = new
|
|
4757
|
+
for (const l of t) this.programConfigurations[l.id] = new dh(l, r, n);
|
|
4758
4758
|
this.needsUpload = !1, this._featureMap = new Pn(), this._bufferOffset = 0;
|
|
4759
4759
|
}
|
|
4760
4760
|
populatePaintArrays(t, r, n, l, u, d) {
|
|
@@ -4780,21 +4780,21 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4780
4780
|
function td(i, t) {
|
|
4781
4781
|
return { "text-opacity": ["opacity"], "icon-opacity": ["opacity"], "text-color": ["fill_color"], "icon-color": ["fill_color"], "text-halo-color": ["halo_color"], "icon-halo-color": ["halo_color"], "text-halo-blur": ["halo_blur"], "icon-halo-blur": ["halo_blur"], "text-halo-width": ["halo_width"], "icon-halo-width": ["halo_width"], "line-gap-width": ["gapwidth"], "line-pattern": ["pattern_to", "pattern_from", "pixel_ratio_to", "pixel_ratio_from"], "fill-pattern": ["pattern_to", "pattern_from", "pixel_ratio_to", "pixel_ratio_from"], "fill-extrusion-pattern": ["pattern_to", "pattern_from", "pixel_ratio_to", "pixel_ratio_from"] }[i] || [i.replace(`${t}-`, "").replace(/-/g, "_")];
|
|
4782
4782
|
}
|
|
4783
|
-
function
|
|
4784
|
-
const n = { color: { source: D, composite:
|
|
4783
|
+
function ph(i, t, r) {
|
|
4784
|
+
const n = { color: { source: D, composite: $e }, number: { source: we, composite: D } }, l = function(u) {
|
|
4785
4785
|
return { "line-pattern": { source: Ui, composite: Ui }, "fill-pattern": { source: Ui, composite: Ui }, "fill-extrusion-pattern": { source: Ui, composite: Ui } }[u];
|
|
4786
4786
|
}(i);
|
|
4787
4787
|
return l && l[r] || n[t][r];
|
|
4788
4788
|
}
|
|
4789
|
-
ke("ConstantBinder", So), ke("CrossFadedConstantBinder", va), ke("SourceExpressionBinder", us), ke("CrossFadedCompositeBinder", Hs), ke("CompositeExpressionBinder", zr), ke("ProgramConfiguration",
|
|
4790
|
-
const Vt = 8192, vc = Math.pow(2, 14) - 1,
|
|
4789
|
+
ke("ConstantBinder", So), ke("CrossFadedConstantBinder", va), ke("SourceExpressionBinder", us), ke("CrossFadedCompositeBinder", Hs), ke("CompositeExpressionBinder", zr), ke("ProgramConfiguration", dh, { omit: ["_buffers"] }), ke("ProgramConfigurationSet", kn);
|
|
4790
|
+
const Vt = 8192, vc = Math.pow(2, 14) - 1, fh = -vc - 1;
|
|
4791
4791
|
function An(i) {
|
|
4792
4792
|
const t = Vt / i.extent, r = i.loadGeometry();
|
|
4793
4793
|
for (let n = 0; n < r.length; n++) {
|
|
4794
4794
|
const l = r[n];
|
|
4795
4795
|
for (let u = 0; u < l.length; u++) {
|
|
4796
4796
|
const d = l[u], f = Math.round(d.x * t), g = Math.round(d.y * t);
|
|
4797
|
-
d.x = $t(f,
|
|
4797
|
+
d.x = $t(f, fh, vc), d.y = $t(g, fh, vc), (f < d.x || f > d.x + 1 || g < d.y || g > d.y + 1) && Yt("Geometry exceeds allowed extent, reduce your vector tile buffer size");
|
|
4798
4798
|
}
|
|
4799
4799
|
}
|
|
4800
4800
|
return r;
|
|
@@ -4850,7 +4850,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4850
4850
|
this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, t, n, {}, l);
|
|
4851
4851
|
}
|
|
4852
4852
|
}
|
|
4853
|
-
function
|
|
4853
|
+
function mh(i, t) {
|
|
4854
4854
|
for (let r = 0; r < i.length; r++) if (ba(t, i[r])) return !0;
|
|
4855
4855
|
for (let r = 0; r < t.length; r++) if (ba(i, t[r])) return !0;
|
|
4856
4856
|
return !!wc(i, t);
|
|
@@ -4858,13 +4858,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4858
4858
|
function id(i, t, r) {
|
|
4859
4859
|
return !!ba(i, t) || !!Sc(t, i, r);
|
|
4860
4860
|
}
|
|
4861
|
-
function
|
|
4862
|
-
if (i.length === 1) return
|
|
4861
|
+
function gh(i, t) {
|
|
4862
|
+
if (i.length === 1) return yh(t, i[0]);
|
|
4863
4863
|
for (let r = 0; r < t.length; r++) {
|
|
4864
4864
|
const n = t[r];
|
|
4865
4865
|
for (let l = 0; l < n.length; l++) if (ba(i, n[l])) return !0;
|
|
4866
4866
|
}
|
|
4867
|
-
for (let r = 0; r < i.length; r++) if (
|
|
4867
|
+
for (let r = 0; r < i.length; r++) if (yh(t, i[r])) return !0;
|
|
4868
4868
|
for (let r = 0; r < t.length; r++) if (wc(i, t[r])) return !0;
|
|
4869
4869
|
return !1;
|
|
4870
4870
|
}
|
|
@@ -4890,16 +4890,16 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4890
4890
|
function Sc(i, t, r) {
|
|
4891
4891
|
const n = r * r;
|
|
4892
4892
|
if (t.length === 1) return i.distSqr(t[0]) < n;
|
|
4893
|
-
for (let l = 1; l < t.length; l++) if (
|
|
4893
|
+
for (let l = 1; l < t.length; l++) if (_h(i, t[l - 1], t[l]) < n) return !0;
|
|
4894
4894
|
return !1;
|
|
4895
4895
|
}
|
|
4896
|
-
function
|
|
4896
|
+
function _h(i, t, r) {
|
|
4897
4897
|
const n = t.distSqr(r);
|
|
4898
4898
|
if (n === 0) return i.distSqr(t);
|
|
4899
4899
|
const l = ((i.x - t.x) * (r.x - t.x) + (i.y - t.y) * (r.y - t.y)) / n;
|
|
4900
4900
|
return i.distSqr(l < 0 ? t : l > 1 ? r : r.sub(t)._mult(l)._add(t));
|
|
4901
4901
|
}
|
|
4902
|
-
function
|
|
4902
|
+
function yh(i, t) {
|
|
4903
4903
|
let r, n, l, u = !1;
|
|
4904
4904
|
for (let d = 0; d < i.length; d++) {
|
|
4905
4905
|
r = i[d];
|
|
@@ -4936,17 +4936,17 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4936
4936
|
for (let f = 0; f < i.length; f++) d.push(i[f].sub(u));
|
|
4937
4937
|
return d;
|
|
4938
4938
|
}
|
|
4939
|
-
let
|
|
4939
|
+
let xh, vh;
|
|
4940
4940
|
ke("CircleBucket", bc, { omit: ["layers"] });
|
|
4941
4941
|
var ad = { get paint() {
|
|
4942
|
-
return
|
|
4942
|
+
return vh = vh || new h({ "circle-radius": new Ve(re.paint_circle["circle-radius"]), "circle-color": new Ve(re.paint_circle["circle-color"]), "circle-blur": new Ve(re.paint_circle["circle-blur"]), "circle-opacity": new Ve(re.paint_circle["circle-opacity"]), "circle-translate": new Ce(re.paint_circle["circle-translate"]), "circle-translate-anchor": new Ce(re.paint_circle["circle-translate-anchor"]), "circle-pitch-scale": new Ce(re.paint_circle["circle-pitch-scale"]), "circle-pitch-alignment": new Ce(re.paint_circle["circle-pitch-alignment"]), "circle-stroke-width": new Ve(re.paint_circle["circle-stroke-width"]), "circle-stroke-color": new Ve(re.paint_circle["circle-stroke-color"]), "circle-stroke-opacity": new Ve(re.paint_circle["circle-stroke-opacity"]) });
|
|
4943
4943
|
}, get layout() {
|
|
4944
|
-
return
|
|
4944
|
+
return xh = xh || new h({ "circle-sort-key": new Ve(re.layout_circle["circle-sort-key"]) });
|
|
4945
4945
|
} }, vi = 1e-6, wa = typeof Float32Array < "u" ? Float32Array : Array;
|
|
4946
4946
|
function Tc(i) {
|
|
4947
4947
|
return i[0] = 1, i[1] = 0, i[2] = 0, i[3] = 0, i[4] = 0, i[5] = 1, i[6] = 0, i[7] = 0, i[8] = 0, i[9] = 0, i[10] = 1, i[11] = 0, i[12] = 0, i[13] = 0, i[14] = 0, i[15] = 1, i;
|
|
4948
4948
|
}
|
|
4949
|
-
function
|
|
4949
|
+
function bh(i, t, r) {
|
|
4950
4950
|
var n = t[0], l = t[1], u = t[2], d = t[3], f = t[4], g = t[5], x = t[6], v = t[7], w = t[8], I = t[9], k = t[10], z = t[11], E = t[12], F = t[13], j = t[14], Q = t[15], G = r[0], J = r[1], se = r[2], ue = r[3];
|
|
4951
4951
|
return i[0] = G * n + J * f + se * w + ue * E, i[1] = G * l + J * g + se * I + ue * F, i[2] = G * u + J * x + se * k + ue * j, i[3] = G * d + J * v + se * z + ue * Q, i[4] = (G = r[4]) * n + (J = r[5]) * f + (se = r[6]) * w + (ue = r[7]) * E, i[5] = G * l + J * g + se * I + ue * F, i[6] = G * u + J * x + se * k + ue * j, i[7] = G * d + J * v + se * z + ue * Q, i[8] = (G = r[8]) * n + (J = r[9]) * f + (se = r[10]) * w + (ue = r[11]) * E, i[9] = G * l + J * g + se * I + ue * F, i[10] = G * u + J * x + se * k + ue * j, i[11] = G * d + J * v + se * z + ue * Q, i[12] = (G = r[12]) * n + (J = r[13]) * f + (se = r[14]) * w + (ue = r[15]) * E, i[13] = G * l + J * g + se * I + ue * F, i[14] = G * u + J * x + se * k + ue * j, i[15] = G * d + J * v + se * z + ue * Q, i;
|
|
4952
4952
|
}
|
|
@@ -4954,7 +4954,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4954
4954
|
for (var i = 0, t = arguments.length; t--; ) i += arguments[t] * arguments[t];
|
|
4955
4955
|
return Math.sqrt(i);
|
|
4956
4956
|
});
|
|
4957
|
-
var Io, od =
|
|
4957
|
+
var Io, od = bh;
|
|
4958
4958
|
function Cl(i, t, r) {
|
|
4959
4959
|
var n = t[0], l = t[1], u = t[2], d = t[3];
|
|
4960
4960
|
return i[0] = r[0] * n + r[4] * l + r[8] * u + r[12] * d, i[1] = r[1] * n + r[5] * l + r[9] * u + r[13] * d, i[2] = r[2] * n + r[6] * l + r[10] * u + r[14] * d, i[3] = r[3] * n + r[7] * l + r[11] * u + r[15] * d, i;
|
|
@@ -4973,10 +4973,10 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4973
4973
|
}
|
|
4974
4974
|
queryIntersectsFeature(t, r, n, l, u, d, f, g) {
|
|
4975
4975
|
const x = Al(t, this.paint.get("circle-translate"), this.paint.get("circle-translate-anchor"), d.angle, f), v = this.paint.get("circle-radius").evaluate(r, n) + this.paint.get("circle-stroke-width").evaluate(r, n), w = this.paint.get("circle-pitch-alignment") === "map", I = w ? x : function(z, E) {
|
|
4976
|
-
return z.map((F) =>
|
|
4976
|
+
return z.map((F) => wh(F, E));
|
|
4977
4977
|
}(x, g), k = w ? v * f : v;
|
|
4978
4978
|
for (const z of l) for (const E of z) {
|
|
4979
|
-
const F = w ? E :
|
|
4979
|
+
const F = w ? E : wh(E, g);
|
|
4980
4980
|
let j = k;
|
|
4981
4981
|
const Q = Cl([], [E.x, E.y, 0, 1], g);
|
|
4982
4982
|
if (this.paint.get("circle-pitch-scale") === "viewport" && this.paint.get("circle-pitch-alignment") === "map" ? j *= Q[3] / d.cameraToCenterDistance : this.paint.get("circle-pitch-scale") === "map" && this.paint.get("circle-pitch-alignment") === "viewport" && (j *= d.cameraToCenterDistance / Q[3]), id(I, F, j)) return !0;
|
|
@@ -4984,16 +4984,16 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4984
4984
|
return !1;
|
|
4985
4985
|
}
|
|
4986
4986
|
}
|
|
4987
|
-
function
|
|
4987
|
+
function wh(i, t) {
|
|
4988
4988
|
const r = Cl([], [i.x, i.y, 0, 1], t);
|
|
4989
4989
|
return new he(r[0] / r[3], r[1] / r[3]);
|
|
4990
4990
|
}
|
|
4991
|
-
class
|
|
4991
|
+
class Sh extends bc {
|
|
4992
4992
|
}
|
|
4993
|
-
let
|
|
4994
|
-
ke("HeatmapBucket",
|
|
4993
|
+
let Th;
|
|
4994
|
+
ke("HeatmapBucket", Sh, { omit: ["layers"] });
|
|
4995
4995
|
var cd = { get paint() {
|
|
4996
|
-
return
|
|
4996
|
+
return Th = Th || new h({ "heatmap-radius": new Ve(re.paint_heatmap["heatmap-radius"]), "heatmap-weight": new Ve(re.paint_heatmap["heatmap-weight"]), "heatmap-intensity": new Ce(re.paint_heatmap["heatmap-intensity"]), "heatmap-color": new bo(re.paint_heatmap["heatmap-color"]), "heatmap-opacity": new Ce(re.paint_heatmap["heatmap-opacity"]) });
|
|
4997
4997
|
} };
|
|
4998
4998
|
function Ic(i, { width: t, height: r }, n, l) {
|
|
4999
4999
|
if (l) {
|
|
@@ -5002,7 +5002,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5002
5002
|
} else l = new Uint8Array(t * r * n);
|
|
5003
5003
|
return i.width = t, i.height = r, i.data = l, i;
|
|
5004
5004
|
}
|
|
5005
|
-
function
|
|
5005
|
+
function Ih(i, { width: t, height: r }, n) {
|
|
5006
5006
|
if (t === i.width && r === i.height) return;
|
|
5007
5007
|
const l = Ic({}, { width: t, height: r }, n);
|
|
5008
5008
|
Pc(i, l, { x: 0, y: 0 }, { x: 0, y: 0 }, { width: Math.min(i.width, t), height: Math.min(i.height, r) }, n), i.width = t, i.height = r, i.data = l.data;
|
|
@@ -5024,7 +5024,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5024
5024
|
Ic(this, t, 1, r);
|
|
5025
5025
|
}
|
|
5026
5026
|
resize(t) {
|
|
5027
|
-
|
|
5027
|
+
Ih(this, t, 1);
|
|
5028
5028
|
}
|
|
5029
5029
|
clone() {
|
|
5030
5030
|
return new Po({ width: this.width, height: this.height }, new Uint8Array(this.data));
|
|
@@ -5038,7 +5038,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5038
5038
|
Ic(this, t, 4, r);
|
|
5039
5039
|
}
|
|
5040
5040
|
resize(t) {
|
|
5041
|
-
|
|
5041
|
+
Ih(this, t, 4);
|
|
5042
5042
|
}
|
|
5043
5043
|
replace(t, r) {
|
|
5044
5044
|
r ? this.data.set(t) : this.data = t instanceof Uint8ClampedArray ? new Uint8Array(t.buffer) : t;
|
|
@@ -5050,7 +5050,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5050
5050
|
Pc(t, r, n, l, u, 4);
|
|
5051
5051
|
}
|
|
5052
5052
|
}
|
|
5053
|
-
function
|
|
5053
|
+
function Ph(i) {
|
|
5054
5054
|
const t = {}, r = i.resolution || 256, n = i.clips ? i.clips.length : 1, l = i.image || new rr({ width: r, height: n });
|
|
5055
5055
|
if (Math.log(r) / Math.LN2 % 1 != 0) throw new Error(`width is not a power of 2 - ${r}`);
|
|
5056
5056
|
const u = (d, f, g) => {
|
|
@@ -5069,7 +5069,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5069
5069
|
const Mc = "big-fb";
|
|
5070
5070
|
class hd extends s {
|
|
5071
5071
|
createBucket(t) {
|
|
5072
|
-
return new
|
|
5072
|
+
return new Sh(t);
|
|
5073
5073
|
}
|
|
5074
5074
|
constructor(t) {
|
|
5075
5075
|
super(t, cd), this.heatmapFbos = /* @__PURE__ */ new Map(), this._updateColorRamp();
|
|
@@ -5078,7 +5078,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5078
5078
|
t === "heatmap-color" && this._updateColorRamp();
|
|
5079
5079
|
}
|
|
5080
5080
|
_updateColorRamp() {
|
|
5081
|
-
this.colorRamp =
|
|
5081
|
+
this.colorRamp = Ph({ expression: this._transitionablePaint._values["heatmap-color"].value.expression, evaluationKey: "heatmapDensity", image: this.colorRamp }), this.colorRampTexture = null;
|
|
5082
5082
|
}
|
|
5083
5083
|
resize() {
|
|
5084
5084
|
this.heatmapFbos.has(Mc) && this.heatmapFbos.delete(Mc);
|
|
@@ -5093,9 +5093,9 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5093
5093
|
return this.paint.get("heatmap-opacity") !== 0 && this.visibility !== "none";
|
|
5094
5094
|
}
|
|
5095
5095
|
}
|
|
5096
|
-
let
|
|
5096
|
+
let Mh;
|
|
5097
5097
|
var ud = { get paint() {
|
|
5098
|
-
return
|
|
5098
|
+
return Mh = Mh || new h({ "hillshade-illumination-direction": new Ce(re.paint_hillshade["hillshade-illumination-direction"]), "hillshade-illumination-anchor": new Ce(re.paint_hillshade["hillshade-illumination-anchor"]), "hillshade-exaggeration": new Ce(re.paint_hillshade["hillshade-exaggeration"]), "hillshade-shadow-color": new Ce(re.paint_hillshade["hillshade-shadow-color"]), "hillshade-highlight-color": new Ce(re.paint_hillshade["hillshade-highlight-color"]), "hillshade-accent-color": new Ce(re.paint_hillshade["hillshade-accent-color"]) });
|
|
5099
5099
|
} };
|
|
5100
5100
|
class dd extends s {
|
|
5101
5101
|
constructor(t) {
|
|
@@ -5106,16 +5106,16 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5106
5106
|
}
|
|
5107
5107
|
}
|
|
5108
5108
|
const pd = m([{ name: "a_pos", components: 2, type: "Int16" }], 4), { members: fd } = pd;
|
|
5109
|
-
function
|
|
5109
|
+
function kh(i, t, r = 2) {
|
|
5110
5110
|
const n = t && t.length, l = n ? t[0] * r : i.length;
|
|
5111
|
-
let u =
|
|
5111
|
+
let u = Ah(i, 0, l, r, !0);
|
|
5112
5112
|
const d = [];
|
|
5113
5113
|
if (!u || u.next === u.prev) return d;
|
|
5114
5114
|
let f, g, x;
|
|
5115
5115
|
if (n && (u = function(v, w, I, k) {
|
|
5116
5116
|
const z = [];
|
|
5117
5117
|
for (let E = 0, F = w.length; E < F; E++) {
|
|
5118
|
-
const j =
|
|
5118
|
+
const j = Ah(v, w[E] * k, E < F - 1 ? w[E + 1] * k : v.length, k, !1);
|
|
5119
5119
|
j === j.next && (j.steiner = !0), z.push(wd(j));
|
|
5120
5120
|
}
|
|
5121
5121
|
z.sort(xd);
|
|
@@ -5132,14 +5132,14 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5132
5132
|
}
|
|
5133
5133
|
return Mo(u, d, r, f, g, x, 0), d;
|
|
5134
5134
|
}
|
|
5135
|
-
function
|
|
5135
|
+
function Ah(i, t, r, n, l) {
|
|
5136
5136
|
let u;
|
|
5137
5137
|
if (l === function(d, f, g, x) {
|
|
5138
5138
|
let v = 0;
|
|
5139
5139
|
for (let w = f, I = g - x; w < g; w += x) v += (d[I] - d[w]) * (d[w + 1] + d[I + 1]), I = w;
|
|
5140
5140
|
return v;
|
|
5141
|
-
}(i, t, r, n) > 0) for (let d = t; d < r; d += n) u =
|
|
5142
|
-
else for (let d = r - n; d >= t; d -= n) u =
|
|
5141
|
+
}(i, t, r, n) > 0) for (let d = t; d < r; d += n) u = Eh(d / n | 0, i[d], i[d + 1], u);
|
|
5142
|
+
else for (let d = r - n; d >= t; d -= n) u = Eh(d / n | 0, i[d], i[d + 1], u);
|
|
5143
5143
|
return u && zl(u, u.next) && (Ao(u), u = u.next), u;
|
|
5144
5144
|
}
|
|
5145
5145
|
function zn(i, t) {
|
|
@@ -5224,7 +5224,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5224
5224
|
let r = i;
|
|
5225
5225
|
do {
|
|
5226
5226
|
const n = r.prev, l = r.next.next;
|
|
5227
|
-
!zl(n, l) &&
|
|
5227
|
+
!zl(n, l) && Ch(n, r, r.next, l) && ko(n, l) && ko(l, n) && (t.push(n.i, r.i, l.i), Ao(r), Ao(r.next), r = i = l), r = r.next;
|
|
5228
5228
|
} while (r !== i);
|
|
5229
5229
|
return zn(r);
|
|
5230
5230
|
}
|
|
@@ -5234,7 +5234,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5234
5234
|
let f = d.next.next;
|
|
5235
5235
|
for (; f !== d.prev; ) {
|
|
5236
5236
|
if (d.i !== f.i && Sd(d, f)) {
|
|
5237
|
-
let g =
|
|
5237
|
+
let g = zh(d, f);
|
|
5238
5238
|
return d = zn(d, d.next), g = zn(g, g.next), Mo(d, t, r, n, l, u, 0), void Mo(g, t, r, n, l, u, 0);
|
|
5239
5239
|
}
|
|
5240
5240
|
f = f.next;
|
|
@@ -5271,7 +5271,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5271
5271
|
return x;
|
|
5272
5272
|
}(i, t);
|
|
5273
5273
|
if (!r) return t;
|
|
5274
|
-
const n =
|
|
5274
|
+
const n = zh(r, i);
|
|
5275
5275
|
return zn(n, n.next), zn(r, r.next);
|
|
5276
5276
|
}
|
|
5277
5277
|
function bd(i, t) {
|
|
@@ -5294,7 +5294,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5294
5294
|
return i.next.i !== t.i && i.prev.i !== t.i && !function(r, n) {
|
|
5295
5295
|
let l = r;
|
|
5296
5296
|
do {
|
|
5297
|
-
if (l.i !== r.i && l.next.i !== r.i && l.i !== n.i && l.next.i !== n.i &&
|
|
5297
|
+
if (l.i !== r.i && l.next.i !== r.i && l.i !== n.i && l.next.i !== n.i && Ch(l, l.next, r, n)) return !0;
|
|
5298
5298
|
l = l.next;
|
|
5299
5299
|
} while (l !== r);
|
|
5300
5300
|
return !1;
|
|
@@ -5313,7 +5313,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5313
5313
|
function zl(i, t) {
|
|
5314
5314
|
return i.x === t.x && i.y === t.y;
|
|
5315
5315
|
}
|
|
5316
|
-
function
|
|
5316
|
+
function Ch(i, t, r, n) {
|
|
5317
5317
|
const l = Dl(Rt(i, t, r)), u = Dl(Rt(i, t, n)), d = Dl(Rt(r, n, i)), f = Dl(Rt(r, n, t));
|
|
5318
5318
|
return l !== u && d !== f || !(l !== 0 || !El(i, r, t)) || !(u !== 0 || !El(i, n, t)) || !(d !== 0 || !El(r, i, n)) || !(f !== 0 || !El(r, t, n));
|
|
5319
5319
|
}
|
|
@@ -5326,11 +5326,11 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5326
5326
|
function ko(i, t) {
|
|
5327
5327
|
return Rt(i.prev, i, i.next) < 0 ? Rt(i, t, i.next) >= 0 && Rt(i, i.prev, t) >= 0 : Rt(i, t, i.prev) < 0 || Rt(i, i.next, t) < 0;
|
|
5328
5328
|
}
|
|
5329
|
-
function
|
|
5329
|
+
function zh(i, t) {
|
|
5330
5330
|
const r = Ac(i.i, i.x, i.y), n = Ac(t.i, t.x, t.y), l = i.next, u = t.prev;
|
|
5331
5331
|
return i.next = t, t.prev = i, r.next = l, l.prev = r, n.next = r, r.prev = n, u.next = n, n.prev = u, n;
|
|
5332
5332
|
}
|
|
5333
|
-
function
|
|
5333
|
+
function Eh(i, t, r, n) {
|
|
5334
5334
|
const l = Ac(i, t, r);
|
|
5335
5335
|
return n ? (l.next = n.next, l.prev = n, n.next.prev = l, n.next = l) : (l.prev = l, l.next = l), l;
|
|
5336
5336
|
}
|
|
@@ -5416,19 +5416,19 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5416
5416
|
for (let F = 1; F < k.length; F++) this.layoutVertexArray.emplaceBack(k[F].x, k[F].y), this.indexArray2.emplaceBack(E + F - 1, E + F), v.push(k[F].x), v.push(k[F].y);
|
|
5417
5417
|
z.vertexLength += k.length, z.primitiveLength += k.length;
|
|
5418
5418
|
}
|
|
5419
|
-
const I =
|
|
5419
|
+
const I = kh(v, w);
|
|
5420
5420
|
for (let k = 0; k < I.length; k += 3) this.indexArray.emplaceBack(x + I[k], x + I[k + 1], x + I[k + 2]);
|
|
5421
5421
|
g.vertexLength += f, g.primitiveLength += I.length / 3;
|
|
5422
5422
|
}
|
|
5423
5423
|
this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, t, n, u, l);
|
|
5424
5424
|
}
|
|
5425
5425
|
}
|
|
5426
|
-
let
|
|
5426
|
+
let Dh, Lh;
|
|
5427
5427
|
ke("FillBucket", Ec, { omit: ["layers", "patternFeatures"] });
|
|
5428
5428
|
var Td = { get paint() {
|
|
5429
|
-
return
|
|
5429
|
+
return Lh = Lh || new h({ "fill-antialias": new Ce(re.paint_fill["fill-antialias"]), "fill-opacity": new Ve(re.paint_fill["fill-opacity"]), "fill-color": new Ve(re.paint_fill["fill-color"]), "fill-outline-color": new Ve(re.paint_fill["fill-outline-color"]), "fill-translate": new Ce(re.paint_fill["fill-translate"]), "fill-translate-anchor": new Ce(re.paint_fill["fill-translate-anchor"]), "fill-pattern": new pa(re.paint_fill["fill-pattern"]) });
|
|
5430
5430
|
}, get layout() {
|
|
5431
|
-
return
|
|
5431
|
+
return Dh = Dh || new h({ "fill-sort-key": new Ve(re.layout_fill["fill-sort-key"]) });
|
|
5432
5432
|
} };
|
|
5433
5433
|
class Id extends s {
|
|
5434
5434
|
constructor(t) {
|
|
@@ -5446,14 +5446,14 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5446
5446
|
return kl(this.paint.get("fill-translate"));
|
|
5447
5447
|
}
|
|
5448
5448
|
queryIntersectsFeature(t, r, n, l, u, d, f) {
|
|
5449
|
-
return
|
|
5449
|
+
return gh(Al(t, this.paint.get("fill-translate"), this.paint.get("fill-translate-anchor"), d.angle, f), l);
|
|
5450
5450
|
}
|
|
5451
5451
|
isTileClipped() {
|
|
5452
5452
|
return !0;
|
|
5453
5453
|
}
|
|
5454
5454
|
}
|
|
5455
5455
|
const Pd = m([{ name: "a_pos", components: 2, type: "Int16" }, { name: "a_normal_ed", components: 4, type: "Int16" }], 4), Md = m([{ name: "a_centroid", components: 2, type: "Int16" }], 4), { members: kd } = Pd;
|
|
5456
|
-
var Xs = {}, Ad = Bt,
|
|
5456
|
+
var Xs = {}, Ad = Bt, Rh = Ta;
|
|
5457
5457
|
function Ta(i, t, r, n, l) {
|
|
5458
5458
|
this.properties = {}, this.extent = r, this.type = 0, this._pbf = i, this._geometry = -1, this._keys = n, this._values = l, i.readFields(Cd, this, t);
|
|
5459
5459
|
}
|
|
@@ -5528,8 +5528,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5528
5528
|
var I = { type: "Feature", geometry: { type: x, coordinates: g }, properties: this.properties };
|
|
5529
5529
|
return "id" in this && (I.id = this.id), I;
|
|
5530
5530
|
};
|
|
5531
|
-
var Ed =
|
|
5532
|
-
function
|
|
5531
|
+
var Ed = Rh, Bh = Fh;
|
|
5532
|
+
function Fh(i, t) {
|
|
5533
5533
|
this.version = 1, this.name = null, this.extent = 4096, this.length = 0, this._pbf = i, this._keys = [], this._values = [], this._features = [], i.readFields(Dd, this, t), this.length = this._features.length;
|
|
5534
5534
|
}
|
|
5535
5535
|
function Dd(i, t, r) {
|
|
@@ -5541,13 +5541,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5541
5541
|
return l;
|
|
5542
5542
|
}(r));
|
|
5543
5543
|
}
|
|
5544
|
-
|
|
5544
|
+
Fh.prototype.feature = function(i) {
|
|
5545
5545
|
if (i < 0 || i >= this._features.length) throw new Error("feature index out of bounds");
|
|
5546
5546
|
this._pbf.pos = this._features[i];
|
|
5547
5547
|
var t = this._pbf.readVarint() + this._pbf.pos;
|
|
5548
5548
|
return new Ed(this._pbf, t, this.extent, this._keys, this._values);
|
|
5549
5549
|
};
|
|
5550
|
-
var Ld =
|
|
5550
|
+
var Ld = Bh;
|
|
5551
5551
|
function Rd(i, t, r) {
|
|
5552
5552
|
if (i === 3) {
|
|
5553
5553
|
var n = new Ld(r, r.readVarint() + r.pos);
|
|
@@ -5556,7 +5556,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5556
5556
|
}
|
|
5557
5557
|
Xs.VectorTile = function(i, t) {
|
|
5558
5558
|
this.layers = i.readFields(Rd, {}, t);
|
|
5559
|
-
}, Xs.VectorTileFeature =
|
|
5559
|
+
}, Xs.VectorTileFeature = Rh, Xs.VectorTileLayer = Bh;
|
|
5560
5560
|
const Bd = Xs.VectorTileFeature.types, Dc = Math.pow(2, 13);
|
|
5561
5561
|
function Co(i, t, r, n, l, u, d, f) {
|
|
5562
5562
|
i.emplaceBack(t, r, 2 * Math.floor(n * Dc) + d, l * Dc * 2, u * Dc * 2, Math.round(f));
|
|
@@ -5627,7 +5627,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5627
5627
|
Co(this.layoutVertexArray, F.x, F.y, 0, 0, 1, 1, 0), f.x += F.x, f.y += F.y, f.vertexCount += 1, v.push(F.x), v.push(F.y);
|
|
5628
5628
|
}
|
|
5629
5629
|
}
|
|
5630
|
-
const k =
|
|
5630
|
+
const k = kh(v, w);
|
|
5631
5631
|
for (let z = 0; z < k.length; z += 3) this.indexArray.emplaceBack(I + k[z], I + k[z + 2], I + k[z + 1]);
|
|
5632
5632
|
x.primitiveLength += k.length / 3, x.vertexLength += g;
|
|
5633
5633
|
for (let z = 0; z < f.vertexCount; z++) {
|
|
@@ -5644,10 +5644,10 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5644
5644
|
function Od(i) {
|
|
5645
5645
|
return i.every((t) => t.x < 0) || i.every((t) => t.x > Vt) || i.every((t) => t.y < 0) || i.every((t) => t.y > Vt);
|
|
5646
5646
|
}
|
|
5647
|
-
let
|
|
5647
|
+
let Oh;
|
|
5648
5648
|
ke("FillExtrusionBucket", Lc, { omit: ["layers", "features"] });
|
|
5649
5649
|
var Vd = { get paint() {
|
|
5650
|
-
return
|
|
5650
|
+
return Oh = Oh || new h({ "fill-extrusion-opacity": new Ce(re["paint_fill-extrusion"]["fill-extrusion-opacity"]), "fill-extrusion-color": new Ve(re["paint_fill-extrusion"]["fill-extrusion-color"]), "fill-extrusion-translate": new Ce(re["paint_fill-extrusion"]["fill-extrusion-translate"]), "fill-extrusion-translate-anchor": new Ce(re["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]), "fill-extrusion-pattern": new pa(re["paint_fill-extrusion"]["fill-extrusion-pattern"]), "fill-extrusion-height": new Ve(re["paint_fill-extrusion"]["fill-extrusion-height"]), "fill-extrusion-base": new Ve(re["paint_fill-extrusion"]["fill-extrusion-base"]), "fill-extrusion-vertical-gradient": new Ce(re["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"]) });
|
|
5651
5651
|
} };
|
|
5652
5652
|
class Nd extends s {
|
|
5653
5653
|
constructor(t) {
|
|
@@ -5674,8 +5674,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5674
5674
|
const Q = [], G = [], J = j[8] * E, se = j[9] * E, ue = j[10] * E, Ie = j[11] * E, Oe = j[8] * F, Se = j[9] * F, be = j[10] * F, De = j[11] * F;
|
|
5675
5675
|
for (const Ae of z) {
|
|
5676
5676
|
const Me = [], oe = [];
|
|
5677
|
-
for (const
|
|
5678
|
-
const Ee =
|
|
5677
|
+
for (const Re of Ae) {
|
|
5678
|
+
const Ee = Re.x, Ue = Re.y, yt = j[0] * Ee + j[4] * Ue + j[12], gt = j[1] * Ee + j[5] * Ue + j[13], Zt = j[2] * Ee + j[6] * Ue + j[14], br = j[3] * Ee + j[7] * Ue + j[15], si = Zt + ue, Gt = br + Ie, bi = yt + Oe, wi = gt + Se, Si = Zt + be, Dt = br + De, Ht = new he((yt + J) / Gt, (gt + se) / Gt);
|
|
5679
5679
|
Ht.z = si / Gt, Me.push(Ht);
|
|
5680
5680
|
const di = new he(bi / Dt, wi / Dt);
|
|
5681
5681
|
di.z = Si / Dt, oe.push(di);
|
|
@@ -5686,12 +5686,12 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5686
5686
|
}(l, w, v, g);
|
|
5687
5687
|
return function(z, E, F) {
|
|
5688
5688
|
let j = 1 / 0;
|
|
5689
|
-
|
|
5689
|
+
gh(F, E) && (j = Vh(F, E[0]));
|
|
5690
5690
|
for (let Q = 0; Q < E.length; Q++) {
|
|
5691
5691
|
const G = E[Q], J = z[Q];
|
|
5692
5692
|
for (let se = 0; se < G.length - 1; se++) {
|
|
5693
5693
|
const ue = G[se], Ie = [ue, G[se + 1], J[se + 1], J[se], ue];
|
|
5694
|
-
|
|
5694
|
+
mh(F, Ie) && (j = Math.min(j, Vh(F, Ie)));
|
|
5695
5695
|
}
|
|
5696
5696
|
}
|
|
5697
5697
|
return j !== 1 / 0 && j;
|
|
@@ -5701,7 +5701,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5701
5701
|
function zo(i, t) {
|
|
5702
5702
|
return i.x * t.x + i.y * t.y;
|
|
5703
5703
|
}
|
|
5704
|
-
function
|
|
5704
|
+
function Vh(i, t) {
|
|
5705
5705
|
if (i.length === 1) {
|
|
5706
5706
|
let r = 0;
|
|
5707
5707
|
const n = t[r++];
|
|
@@ -5719,7 +5719,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5719
5719
|
return r;
|
|
5720
5720
|
}
|
|
5721
5721
|
}
|
|
5722
|
-
const jd = m([{ name: "a_pos_normal", components: 2, type: "Int16" }, { name: "a_data", components: 4, type: "Uint8" }], 4), { members: Ud } = jd, $d = m([{ name: "a_uv_x", components: 1, type: "Float32" }, { name: "a_split_index", components: 1, type: "Float32" }]), { members: qd } = $d, Zd = Xs.VectorTileFeature.types, Gd = Math.cos(Math.PI / 180 * 37.5),
|
|
5722
|
+
const jd = m([{ name: "a_pos_normal", components: 2, type: "Int16" }, { name: "a_data", components: 4, type: "Uint8" }], 4), { members: Ud } = jd, $d = m([{ name: "a_uv_x", components: 1, type: "Float32" }, { name: "a_split_index", components: 1, type: "Float32" }]), { members: qd } = $d, Zd = Xs.VectorTileFeature.types, Gd = Math.cos(Math.PI / 180 * 37.5), Nh = Math.pow(2, 14) / 0.5;
|
|
5723
5723
|
class Rc {
|
|
5724
5724
|
constructor(t) {
|
|
5725
5725
|
this.zoom = t.zoom, this.overscaling = t.overscaling, this.layers = t.layers, this.layerIds = this.layers.map((r) => r.id), this.index = t.index, this.hasPattern = !1, this.patternFeatures = [], this.lineClipsArray = [], this.gradients = {}, this.layers.forEach((r) => {
|
|
@@ -5815,8 +5815,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5815
5815
|
const De = -Math.sqrt(se * se - 1), Ae = Oe ? De : 0, Me = Oe ? 0 : De;
|
|
5816
5816
|
if (k && this.addCurrentVertex(I, E, Ae, Me, w), be === "fakeround") {
|
|
5817
5817
|
const oe = Math.round(180 * ue / Math.PI / 20);
|
|
5818
|
-
for (let
|
|
5819
|
-
let Ee =
|
|
5818
|
+
for (let Re = 1; Re < oe; Re++) {
|
|
5819
|
+
let Ee = Re / oe;
|
|
5820
5820
|
if (Ee !== 0.5) {
|
|
5821
5821
|
const yt = Ee - 0.5;
|
|
5822
5822
|
Ee += Ee * yt * (Ee - 1) * ((1.0904 + G * (G * (3.55645 - 1.43519 * G) - 3.2452)) * yt * yt + (0.848013 + G * (0.215638 * G - 1.06021)));
|
|
@@ -5842,10 +5842,10 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5842
5842
|
}
|
|
5843
5843
|
addCurrentVertex(t, r, n, l, u, d = !1) {
|
|
5844
5844
|
const f = r.y * l - r.x, g = -r.y - r.x * l;
|
|
5845
|
-
this.addHalfVertex(t, r.x + r.y * n, r.y - r.x * n, d, !1, n, u), this.addHalfVertex(t, f, g, d, !0, -l, u), this.distance >
|
|
5845
|
+
this.addHalfVertex(t, r.x + r.y * n, r.y - r.x * n, d, !1, n, u), this.addHalfVertex(t, f, g, d, !0, -l, u), this.distance > Nh / 2 && this.totalDistance === 0 && (this.distance = 0, this.updateScaledDistance(), this.addCurrentVertex(t, r, n, l, u, d));
|
|
5846
5846
|
}
|
|
5847
5847
|
addHalfVertex({ x: t, y: r }, n, l, u, d, f, g) {
|
|
5848
|
-
const x = 0.5 * (this.lineClips ? this.scaledDistance * (
|
|
5848
|
+
const x = 0.5 * (this.lineClips ? this.scaledDistance * (Nh - 1) : this.scaledDistance);
|
|
5849
5849
|
this.layoutVertexArray.emplaceBack((t << 1) + (u ? 1 : 0), (r << 1) + (d ? 1 : 0), Math.round(63 * n) + 128, Math.round(63 * l) + 128, 1 + (f === 0 ? 0 : f < 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);
|
|
5850
5850
|
const v = g.vertexLength++;
|
|
5851
5851
|
this.e1 >= 0 && this.e2 >= 0 && (this.indexArray.emplaceBack(this.e1, this.e2, v), g.primitiveLength++), d ? this.e2 = v : this.e1 = v;
|
|
@@ -5857,12 +5857,12 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5857
5857
|
this.distance += t.dist(r), this.updateScaledDistance();
|
|
5858
5858
|
}
|
|
5859
5859
|
}
|
|
5860
|
-
let
|
|
5860
|
+
let jh, Uh;
|
|
5861
5861
|
ke("LineBucket", Rc, { omit: ["layers", "patternFeatures"] });
|
|
5862
|
-
var
|
|
5863
|
-
return
|
|
5862
|
+
var $h = { get paint() {
|
|
5863
|
+
return Uh = Uh || new h({ "line-opacity": new Ve(re.paint_line["line-opacity"]), "line-color": new Ve(re.paint_line["line-color"]), "line-translate": new Ce(re.paint_line["line-translate"]), "line-translate-anchor": new Ce(re.paint_line["line-translate-anchor"]), "line-width": new Ve(re.paint_line["line-width"]), "line-gap-width": new Ve(re.paint_line["line-gap-width"]), "line-offset": new Ve(re.paint_line["line-offset"]), "line-blur": new Ve(re.paint_line["line-blur"]), "line-dasharray": new fa(re.paint_line["line-dasharray"]), "line-pattern": new pa(re.paint_line["line-pattern"]), "line-gradient": new bo(re.paint_line["line-gradient"]) });
|
|
5864
5864
|
}, get layout() {
|
|
5865
|
-
return
|
|
5865
|
+
return jh = jh || new h({ "line-cap": new Ce(re.layout_line["line-cap"]), "line-join": new Ve(re.layout_line["line-join"]), "line-miter-limit": new Ce(re.layout_line["line-miter-limit"]), "line-round-limit": new Ce(re.layout_line["line-round-limit"]), "line-sort-key": new Ve(re.layout_line["line-sort-key"]) });
|
|
5866
5866
|
} };
|
|
5867
5867
|
class Hd extends Ve {
|
|
5868
5868
|
possiblyEvaluate(t, r) {
|
|
@@ -5875,7 +5875,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5875
5875
|
let Ll;
|
|
5876
5876
|
class Xd extends s {
|
|
5877
5877
|
constructor(t) {
|
|
5878
|
-
super(t,
|
|
5878
|
+
super(t, $h), this.gradientVersion = 0, Ll || (Ll = new Hd($h.paint.properties["line-width"].specification), Ll.useIntegerZoom = !0);
|
|
5879
5879
|
}
|
|
5880
5880
|
_handleSpecialPaintPropertyUpdate(t) {
|
|
5881
5881
|
if (t === "line-gradient") {
|
|
@@ -5895,11 +5895,11 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5895
5895
|
return new Rc(t);
|
|
5896
5896
|
}
|
|
5897
5897
|
queryRadius(t) {
|
|
5898
|
-
const r = t, n =
|
|
5898
|
+
const r = t, n = qh(To("line-width", this, r), To("line-gap-width", this, r)), l = To("line-offset", this, r);
|
|
5899
5899
|
return n / 2 + Math.abs(l) + kl(this.paint.get("line-translate"));
|
|
5900
5900
|
}
|
|
5901
5901
|
queryIntersectsFeature(t, r, n, l, u, d, f) {
|
|
5902
|
-
const g = Al(t, this.paint.get("line-translate"), this.paint.get("line-translate-anchor"), d.angle, f), x = f / 2 *
|
|
5902
|
+
const g = Al(t, this.paint.get("line-translate"), this.paint.get("line-translate-anchor"), d.angle, f), x = f / 2 * qh(this.paint.get("line-width").evaluate(r, n), this.paint.get("line-gap-width").evaluate(r, n)), v = this.paint.get("line-offset").evaluate(r, n);
|
|
5903
5903
|
return v && (l = function(w, I) {
|
|
5904
5904
|
const k = [];
|
|
5905
5905
|
for (let z = 0; z < w.length; z++) {
|
|
@@ -5926,14 +5926,14 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5926
5926
|
return !0;
|
|
5927
5927
|
}
|
|
5928
5928
|
}
|
|
5929
|
-
function
|
|
5929
|
+
function qh(i, t) {
|
|
5930
5930
|
return t > 0 ? t + 2 * i : i;
|
|
5931
5931
|
}
|
|
5932
5932
|
const Wd = m([{ name: "a_pos_offset", components: 4, type: "Int16" }, { name: "a_data", components: 4, type: "Uint16" }, { name: "a_pixeloffset", components: 4, type: "Int16" }], 4), Kd = m([{ name: "a_projected_pos", components: 3, type: "Float32" }], 4);
|
|
5933
5933
|
m([{ name: "a_fade_opacity", components: 1, type: "Uint32" }], 4);
|
|
5934
5934
|
const Jd = m([{ name: "a_placed", components: 2, type: "Uint8" }, { name: "a_shift", components: 2, type: "Float32" }, { name: "a_box_real", components: 2, type: "Int16" }]);
|
|
5935
5935
|
m([{ 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" }]);
|
|
5936
|
-
const
|
|
5936
|
+
const Zh = m([{ name: "a_pos", components: 2, type: "Int16" }, { name: "a_anchor_pos", components: 2, type: "Int16" }, { name: "a_extrude", components: 2, type: "Int16" }], 4), Yd = m([{ name: "a_pos", components: 2, type: "Float32" }, { name: "a_radius", components: 1, type: "Float32" }, { name: "a_flags", components: 2, type: "Int16" }], 4);
|
|
5937
5937
|
function Qd(i, t, r) {
|
|
5938
5938
|
return i.sections.forEach((n) => {
|
|
5939
5939
|
n.text = function(l, u, d) {
|
|
@@ -5944,7 +5944,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5944
5944
|
}
|
|
5945
5945
|
m([{ name: "triangle", components: 3, type: "Uint16" }]), m([{ 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" }]), m([{ 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" }]), m([{ type: "Float32", name: "offsetX" }]), m([{ type: "Int16", name: "x" }, { type: "Int16", name: "y" }, { type: "Int16", name: "tileUnitDistanceFromAnchor" }]), m([{ type: "Uint16", name: "textAnchor" }, { type: "Float32", components: 2, name: "textOffset" }]);
|
|
5946
5946
|
const Eo = { "!": "︕", "#": "#", $: "$", "%": "%", "&": "&", "(": "︵", ")": "︶", "*": "*", "+": "+", ",": "︐", "-": "︲", ".": "・", "/": "/", ":": "︓", ";": "︔", "<": "︿", "=": "=", ">": "﹀", "?": "︖", "@": "@", "[": "﹇", "\\": "\", "]": "﹈", "^": "^", _: "︳", "`": "`", "{": "︷", "|": "―", "}": "︸", "~": "~", "¢": "¢", "£": "£", "¥": "¥", "¦": "¦", "¬": "¬", "¯": " ̄", "–": "︲", "—": "︱", "‘": "﹃", "’": "﹄", "“": "﹁", "”": "﹂", "…": "︙", "‧": "・", "₩": "₩", "、": "︑", "。": "︒", "〈": "︿", "〉": "﹀", "《": "︽", "》": "︾", "「": "﹁", "」": "﹂", "『": "﹃", "』": "﹄", "【": "︻", "】": "︼", "〔": "︹", "〕": "︺", "〖": "︗", "〗": "︘", "!": "︕", "(": "︵", ")": "︶", ",": "︐", "-": "︲", ".": "・", ":": "︓", ";": "︔", "<": "︿", ">": "﹀", "?": "︖", "[": "﹇", "]": "﹈", "_": "︳", "{": "︷", "|": "―", "}": "︸", "⦅": "︵", "⦆": "︶", "。": "︒", "「": "﹁", "」": "﹂" };
|
|
5947
|
-
var Ut = 24,
|
|
5947
|
+
var Ut = 24, Gh = mt, Hh = function(i, t, r, n, l) {
|
|
5948
5948
|
var u, d, f = 8 * l - n - 1, g = (1 << f) - 1, x = g >> 1, v = -7, w = l - 1, I = -1, k = i[t + w];
|
|
5949
5949
|
for (w += I, u = k & (1 << -v) - 1, k >>= -v, v += f; v > 0; u = 256 * u + i[t + w], w += I, v -= 8) ;
|
|
5950
5950
|
for (d = u & (1 << -v) - 1, u >>= -v, v += n; v > 0; d = 256 * d + i[t + w], w += I, v -= 8) ;
|
|
@@ -5954,7 +5954,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5954
5954
|
d += Math.pow(2, n), u -= x;
|
|
5955
5955
|
}
|
|
5956
5956
|
return (k ? -1 : 1) * d * Math.pow(2, u - n);
|
|
5957
|
-
},
|
|
5957
|
+
}, Xh = function(i, t, r, n, l, u) {
|
|
5958
5958
|
var d, f, g, x = 8 * u - l - 1, v = (1 << x) - 1, w = v >> 1, I = l === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, k = 0, z = 1, E = t < 0 || t === 0 && 1 / t < 0 ? 1 : 0;
|
|
5959
5959
|
for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (f = isNaN(t) ? 1 : 0, d = v) : (d = Math.floor(Math.log(t) / Math.LN2), t * (g = Math.pow(2, -d)) < 1 && (d--, g *= 2), (t += d + w >= 1 ? I / g : I * Math.pow(2, 1 - w)) * g >= 2 && (d++, g /= 2), d + w >= v ? (f = 0, d = v) : d + w >= 1 ? (f = (t * g - 1) * Math.pow(2, l), d += w) : (f = t * Math.pow(2, w - 1) * Math.pow(2, l), d = 0)); l >= 8; i[r + k] = 255 & f, k += z, f /= 256, l -= 8) ;
|
|
5960
5960
|
for (d = d << l | f, x += l; x > 0; i[r + k] = 255 & d, k += z, d /= 256, x -= 8) ;
|
|
@@ -5964,14 +5964,14 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5964
5964
|
this.buf = ArrayBuffer.isView && ArrayBuffer.isView(i) ? i : new Uint8Array(i || 0), this.pos = 0, this.type = 0, this.length = this.buf.length;
|
|
5965
5965
|
}
|
|
5966
5966
|
mt.Varint = 0, mt.Fixed64 = 1, mt.Bytes = 2, mt.Fixed32 = 5;
|
|
5967
|
-
var Bc = 4294967296,
|
|
5967
|
+
var Bc = 4294967296, Wh = 1 / Bc, Kh = typeof TextDecoder > "u" ? null : new TextDecoder("utf-8");
|
|
5968
5968
|
function ds(i) {
|
|
5969
5969
|
return i.type === mt.Bytes ? i.readVarint() + i.pos : i.pos + 1;
|
|
5970
5970
|
}
|
|
5971
5971
|
function Ia(i, t, r) {
|
|
5972
5972
|
return r ? 4294967296 * t + (i >>> 0) : 4294967296 * (t >>> 0) + (i >>> 0);
|
|
5973
5973
|
}
|
|
5974
|
-
function
|
|
5974
|
+
function Jh(i, t, r) {
|
|
5975
5975
|
var n = t <= 16383 ? 1 : t <= 2097151 ? 2 : t <= 268435455 ? 3 : Math.floor(Math.log(t) / (7 * Math.LN2));
|
|
5976
5976
|
r.realloc(n);
|
|
5977
5977
|
for (var l = r.pos - 1; l >= i; l--) r.buf[l + n] = r.buf[l];
|
|
@@ -6009,7 +6009,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6009
6009
|
function Pa(i, t, r) {
|
|
6010
6010
|
i[r] = t, i[r + 1] = t >>> 8, i[r + 2] = t >>> 16, i[r + 3] = t >>> 24;
|
|
6011
6011
|
}
|
|
6012
|
-
function
|
|
6012
|
+
function Yh(i, t) {
|
|
6013
6013
|
return (i[t] | i[t + 1] << 8 | i[t + 2] << 16) + (i[t + 3] << 24);
|
|
6014
6014
|
}
|
|
6015
6015
|
mt.prototype = { destroy: function() {
|
|
@@ -6026,19 +6026,19 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6026
6026
|
var i = Rl(this.buf, this.pos);
|
|
6027
6027
|
return this.pos += 4, i;
|
|
6028
6028
|
}, readSFixed32: function() {
|
|
6029
|
-
var i =
|
|
6029
|
+
var i = Yh(this.buf, this.pos);
|
|
6030
6030
|
return this.pos += 4, i;
|
|
6031
6031
|
}, readFixed64: function() {
|
|
6032
6032
|
var i = Rl(this.buf, this.pos) + Rl(this.buf, this.pos + 4) * Bc;
|
|
6033
6033
|
return this.pos += 8, i;
|
|
6034
6034
|
}, readSFixed64: function() {
|
|
6035
|
-
var i = Rl(this.buf, this.pos) +
|
|
6035
|
+
var i = Rl(this.buf, this.pos) + Yh(this.buf, this.pos + 4) * Bc;
|
|
6036
6036
|
return this.pos += 8, i;
|
|
6037
6037
|
}, readFloat: function() {
|
|
6038
|
-
var i =
|
|
6038
|
+
var i = Hh(this.buf, this.pos, !0, 23, 4);
|
|
6039
6039
|
return this.pos += 4, i;
|
|
6040
6040
|
}, readDouble: function() {
|
|
6041
|
-
var i =
|
|
6041
|
+
var i = Hh(this.buf, this.pos, !0, 52, 8);
|
|
6042
6042
|
return this.pos += 8, i;
|
|
6043
6043
|
}, readVarint: function(i) {
|
|
6044
6044
|
var t, r, n = this.buf;
|
|
@@ -6056,8 +6056,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6056
6056
|
return !!this.readVarint();
|
|
6057
6057
|
}, readString: function() {
|
|
6058
6058
|
var i = this.readVarint() + this.pos, t = this.pos;
|
|
6059
|
-
return this.pos = i, i - t >= 12 &&
|
|
6060
|
-
return
|
|
6059
|
+
return this.pos = i, i - t >= 12 && Kh ? function(r, n, l) {
|
|
6060
|
+
return Kh.decode(r.subarray(n, l));
|
|
6061
6061
|
}(this.buf, t, i) : function(r, n, l) {
|
|
6062
6062
|
for (var u = "", d = n; d < l; ) {
|
|
6063
6063
|
var f, g, x, v = r[d], w = null, I = v > 239 ? 4 : v > 223 ? 3 : v > 191 ? 2 : 1;
|
|
@@ -6138,9 +6138,9 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6138
6138
|
}, writeSFixed32: function(i) {
|
|
6139
6139
|
this.realloc(4), Pa(this.buf, i, this.pos), this.pos += 4;
|
|
6140
6140
|
}, writeFixed64: function(i) {
|
|
6141
|
-
this.realloc(8), Pa(this.buf, -1 & i, this.pos), Pa(this.buf, Math.floor(i *
|
|
6141
|
+
this.realloc(8), Pa(this.buf, -1 & i, this.pos), Pa(this.buf, Math.floor(i * Wh), this.pos + 4), this.pos += 8;
|
|
6142
6142
|
}, writeSFixed64: function(i) {
|
|
6143
|
-
this.realloc(8), Pa(this.buf, -1 & i, this.pos), Pa(this.buf, Math.floor(i *
|
|
6143
|
+
this.realloc(8), Pa(this.buf, -1 & i, this.pos), Pa(this.buf, Math.floor(i * Wh), this.pos + 4), this.pos += 8;
|
|
6144
6144
|
}, writeVarint: function(i) {
|
|
6145
6145
|
(i = +i || 0) > 268435455 || i < 0 ? function(t, r) {
|
|
6146
6146
|
var n, l;
|
|
@@ -6177,11 +6177,11 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6177
6177
|
return u;
|
|
6178
6178
|
}(this.buf, i, this.pos);
|
|
6179
6179
|
var r = this.pos - t;
|
|
6180
|
-
r >= 128 &&
|
|
6180
|
+
r >= 128 && Jh(t, r, this), this.pos = t - 1, this.writeVarint(r), this.pos += r;
|
|
6181
6181
|
}, writeFloat: function(i) {
|
|
6182
|
-
this.realloc(4),
|
|
6182
|
+
this.realloc(4), Xh(this.buf, i, this.pos, !0, 23, 4), this.pos += 4;
|
|
6183
6183
|
}, writeDouble: function(i) {
|
|
6184
|
-
this.realloc(8),
|
|
6184
|
+
this.realloc(8), Xh(this.buf, i, this.pos, !0, 52, 8), this.pos += 8;
|
|
6185
6185
|
}, writeBytes: function(i) {
|
|
6186
6186
|
var t = i.length;
|
|
6187
6187
|
this.writeVarint(t), this.realloc(t);
|
|
@@ -6191,7 +6191,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6191
6191
|
var r = this.pos;
|
|
6192
6192
|
i(t, this);
|
|
6193
6193
|
var n = this.pos - r;
|
|
6194
|
-
n >= 128 &&
|
|
6194
|
+
n >= 128 && Jh(r, n, this), this.pos = r - 1, this.writeVarint(n), this.pos += n;
|
|
6195
6195
|
}, writeMessage: function(i, t, r) {
|
|
6196
6196
|
this.writeTag(i, mt.Bytes), this.writeRawMessage(t, r);
|
|
6197
6197
|
}, writePackedVarint: function(i, t) {
|
|
@@ -6235,7 +6235,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6235
6235
|
}, writeBooleanField: function(i, t) {
|
|
6236
6236
|
this.writeVarintField(i, !!t);
|
|
6237
6237
|
} };
|
|
6238
|
-
var Fc = ht(
|
|
6238
|
+
var Fc = ht(Gh);
|
|
6239
6239
|
const Oc = 3;
|
|
6240
6240
|
function cp(i, t, r) {
|
|
6241
6241
|
i === 1 && r.readMessage(hp, t);
|
|
@@ -6249,8 +6249,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6249
6249
|
function up(i, t, r) {
|
|
6250
6250
|
i === 1 ? t.id = r.readVarint() : i === 2 ? t.bitmap = r.readBytes() : i === 3 ? t.width = r.readVarint() : i === 4 ? t.height = r.readVarint() : i === 5 ? t.left = r.readSVarint() : i === 6 ? t.top = r.readSVarint() : i === 7 && (t.advance = r.readVarint());
|
|
6251
6251
|
}
|
|
6252
|
-
const
|
|
6253
|
-
function
|
|
6252
|
+
const Qh = Oc;
|
|
6253
|
+
function eu(i) {
|
|
6254
6254
|
let t = 0, r = 0;
|
|
6255
6255
|
for (const d of i) t += d.w * d.h, r = Math.max(r, d.w);
|
|
6256
6256
|
i.sort((d, f) => f.h - d.h);
|
|
@@ -6286,13 +6286,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6286
6286
|
return [(this.paddedRect.w - 2 * Di) / this.pixelRatio, (this.paddedRect.h - 2 * Di) / this.pixelRatio];
|
|
6287
6287
|
}
|
|
6288
6288
|
}
|
|
6289
|
-
class
|
|
6289
|
+
class tu {
|
|
6290
6290
|
constructor(t, r) {
|
|
6291
6291
|
const n = {}, l = {};
|
|
6292
6292
|
this.haveRenderCallbacks = [];
|
|
6293
6293
|
const u = [];
|
|
6294
6294
|
this.addImages(t, n, u), this.addImages(r, l, u);
|
|
6295
|
-
const { w: d, h: f } =
|
|
6295
|
+
const { w: d, h: f } = eu(u), g = new rr({ width: d || 1, height: f || 1 });
|
|
6296
6296
|
for (const x in t) {
|
|
6297
6297
|
const v = t[x], w = n[x].paddedRect;
|
|
6298
6298
|
rr.copy(v.data, g, { x: 0, y: 0 }, { x: w.x + Di, y: w.y + Di }, v.data);
|
|
@@ -6321,7 +6321,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6321
6321
|
}
|
|
6322
6322
|
}
|
|
6323
6323
|
var Ws;
|
|
6324
|
-
ke("ImagePosition", Vc), ke("ImageAtlas",
|
|
6324
|
+
ke("ImagePosition", Vc), ke("ImageAtlas", tu), C.ah = void 0, (Ws = C.ah || (C.ah = {}))[Ws.none = 0] = "none", Ws[Ws.horizontal = 1] = "horizontal", Ws[Ws.vertical = 2] = "vertical", Ws[Ws.horizontalOnly = 3] = "horizontalOnly";
|
|
6325
6325
|
const Do = -17;
|
|
6326
6326
|
class Lo {
|
|
6327
6327
|
constructor() {
|
|
@@ -6430,7 +6430,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6430
6430
|
return Se < Oe.length && Ie.push(se.substring(Se, Oe.length)), Ie;
|
|
6431
6431
|
}(E, Nc(E, x, u, t, n, k));
|
|
6432
6432
|
const G = [], J = { positionedLines: G, text: E.toString(), top: v[1], bottom: v[1], left: v[0], right: v[0], writingMode: w, iconsInText: !1, verticalizable: !1 };
|
|
6433
|
-
return function(se, ue, Ie, Oe, Se, be, De, Ae, Me, oe,
|
|
6433
|
+
return function(se, ue, Ie, Oe, Se, be, De, Ae, Me, oe, Re, Ee) {
|
|
6434
6434
|
let Ue = 0, yt = Do, gt = 0, Zt = 0;
|
|
6435
6435
|
const br = Ae === "right" ? 1 : Ae === "left" ? 0 : 0.5;
|
|
6436
6436
|
let si = 0;
|
|
@@ -6447,13 +6447,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6447
6447
|
for (let Li = 0; Li < Dt.length(); Li++) {
|
|
6448
6448
|
const nt = Dt.getSection(Li), vt = Dt.getSectionIndex(Li), It = Dt.getCharCode(Li);
|
|
6449
6449
|
let Zi = 0, Ct = null, za = null, Zr = null, Gr = Ut;
|
|
6450
|
-
const wr = !(Me === C.ah.horizontal || !
|
|
6450
|
+
const wr = !(Me === C.ah.horizontal || !Re && !xo(It) || Re && (Fl[It] || (Gt = It, new RegExp("\\p{sc=Arab}", "u").test(String.fromCodePoint(Gt)))));
|
|
6451
6451
|
if (nt.imageName) {
|
|
6452
6452
|
const ar = Oe[nt.imageName];
|
|
6453
6453
|
if (!ar) continue;
|
|
6454
6454
|
Zr = nt.imageName, se.iconsInText = se.iconsInText || !0, za = ar.paddedRect;
|
|
6455
6455
|
const Jt = ar.displaySize;
|
|
6456
|
-
nt.scale = nt.scale * Ut / Ee, Ct = { width: Jt[0], height: Jt[1], left: Di, top: -
|
|
6456
|
+
nt.scale = nt.scale * Ut / Ee, Ct = { width: Jt[0], height: Jt[1], left: Di, top: -Qh, advance: wr ? Jt[1] : Jt[0] }, Zi = di + (Ut - Jt[1] * nt.scale), Gr = Ct.advance;
|
|
6457
6457
|
const ps = wr ? Jt[0] * nt.scale - Ut * Ht : Jt[1] * nt.scale - Ut * Ht;
|
|
6458
6458
|
ps > 0 && ps > ai && (ai = ps);
|
|
6459
6459
|
} else {
|
|
@@ -6486,7 +6486,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6486
6486
|
}(G) && J;
|
|
6487
6487
|
}
|
|
6488
6488
|
const Fl = { 9: !0, 10: !0, 11: !0, 12: !0, 13: !0, 32: !0 }, dp = { 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 }, pp = { 40: !0 };
|
|
6489
|
-
function
|
|
6489
|
+
function iu(i, t, r, n, l, u) {
|
|
6490
6490
|
if (t.imageName) {
|
|
6491
6491
|
const d = n[t.imageName];
|
|
6492
6492
|
return d ? d.displaySize[0] * t.scale * Ut / u + l : 0;
|
|
@@ -6496,7 +6496,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6496
6496
|
return f ? f.metrics.advance * t.scale + l : 0;
|
|
6497
6497
|
}
|
|
6498
6498
|
}
|
|
6499
|
-
function
|
|
6499
|
+
function ru(i, t, r, n) {
|
|
6500
6500
|
const l = Math.pow(i - t, 2);
|
|
6501
6501
|
return n ? i < t ? l / 2 : 2 * l : l + Math.abs(r) * r;
|
|
6502
6502
|
}
|
|
@@ -6504,16 +6504,16 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6504
6504
|
let n = 0;
|
|
6505
6505
|
return i === 10 && (n -= 1e4), r && (n += 150), i !== 40 && i !== 65288 || (n += 50), t !== 41 && t !== 65289 || (n += 50), n;
|
|
6506
6506
|
}
|
|
6507
|
-
function
|
|
6508
|
-
let d = null, f =
|
|
6507
|
+
function su(i, t, r, n, l, u) {
|
|
6508
|
+
let d = null, f = ru(t, r, l, u);
|
|
6509
6509
|
for (const g of n) {
|
|
6510
|
-
const x =
|
|
6510
|
+
const x = ru(t - g.x, r, l, u) + g.badness;
|
|
6511
6511
|
x <= f && (d = g, f = x);
|
|
6512
6512
|
}
|
|
6513
6513
|
return { index: i, x: t, priorBreak: d, badness: f };
|
|
6514
6514
|
}
|
|
6515
|
-
function
|
|
6516
|
-
return i ?
|
|
6515
|
+
function nu(i) {
|
|
6516
|
+
return i ? nu(i.priorBreak).concat(i.index) : [];
|
|
6517
6517
|
}
|
|
6518
6518
|
function Nc(i, t, r, n, l, u) {
|
|
6519
6519
|
if (!i) return [];
|
|
@@ -6521,20 +6521,20 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6521
6521
|
let j = 0;
|
|
6522
6522
|
for (let Q = 0; Q < w.length(); Q++) {
|
|
6523
6523
|
const G = w.getSection(Q);
|
|
6524
|
-
j +=
|
|
6524
|
+
j += iu(w.getCharCode(Q), G, z, E, I, F);
|
|
6525
6525
|
}
|
|
6526
6526
|
return j / Math.max(1, Math.ceil(j / k));
|
|
6527
6527
|
}(i, t, r, n, l, u), g = i.text.indexOf("") >= 0;
|
|
6528
6528
|
let x = 0;
|
|
6529
6529
|
for (let w = 0; w < i.length(); w++) {
|
|
6530
6530
|
const I = i.getSection(w), k = i.getCharCode(w);
|
|
6531
|
-
if (Fl[k] || (x +=
|
|
6531
|
+
if (Fl[k] || (x += iu(k, I, n, l, t, u)), w < i.length() - 1) {
|
|
6532
6532
|
const z = !((v = k) < 11904) && (!!et["CJK Compatibility Forms"](v) || !!et["CJK Compatibility"](v) || !!et["CJK Strokes"](v) || !!et["CJK Symbols and Punctuation"](v) || !!et["Enclosed CJK Letters and Months"](v) || !!et["Halfwidth and Fullwidth Forms"](v) || !!et["Ideographic Description Characters"](v) || !!et["Vertical Forms"](v) || vl.test(String.fromCodePoint(v)));
|
|
6533
|
-
(dp[k] || z || I.imageName || w !== i.length() - 2 && pp[i.getCharCode(w + 1)]) && d.push(
|
|
6533
|
+
(dp[k] || z || I.imageName || w !== i.length() - 2 && pp[i.getCharCode(w + 1)]) && d.push(su(w + 1, x, f, d, fp(k, i.getCharCode(w + 1), z && g), !1));
|
|
6534
6534
|
}
|
|
6535
6535
|
}
|
|
6536
6536
|
var v;
|
|
6537
|
-
return
|
|
6537
|
+
return nu(su(i.length(), x, f, d, 0, !0));
|
|
6538
6538
|
}
|
|
6539
6539
|
function jc(i) {
|
|
6540
6540
|
let t = 0.5, r = 0.5;
|
|
@@ -6571,7 +6571,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6571
6571
|
const { horizontalAlign: n, verticalAlign: l } = jc(r), u = t[0] - i.displaySize[0] * n, d = t[1] - i.displaySize[1] * l;
|
|
6572
6572
|
return { image: i, top: d, bottom: d + i.displaySize[1], left: u, right: u + i.displaySize[0] };
|
|
6573
6573
|
}
|
|
6574
|
-
function
|
|
6574
|
+
function au(i) {
|
|
6575
6575
|
var t, r;
|
|
6576
6576
|
let n = i.left, l = i.top, u = i.right - n, d = i.bottom - l;
|
|
6577
6577
|
const f = (t = i.image.textFitWidth) !== null && t !== void 0 ? t : "stretchOrShrink", g = (r = i.image.textFitHeight) !== null && r !== void 0 ? r : "stretchOrShrink", x = (i.image.content[2] - i.image.content[0]) / (i.image.content[3] - i.image.content[1]);
|
|
@@ -6586,7 +6586,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6586
6586
|
}
|
|
6587
6587
|
return { x1: n, y1: l, x2: n + u, y2: l + d };
|
|
6588
6588
|
}
|
|
6589
|
-
function
|
|
6589
|
+
function ou(i, t, r, n, l, u) {
|
|
6590
6590
|
const d = i.image;
|
|
6591
6591
|
let f;
|
|
6592
6592
|
if (d.content) {
|
|
@@ -6600,7 +6600,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6600
6600
|
return r === "height" || r === "both" ? (v = l[1] + z - n[0], I = l[1] + E + n[2]) : (v = l[1] + (z + E - d.displaySize[1]) / 2, I = v + d.displaySize[1]), { image: d, top: v, right: w, bottom: I, left: k, collisionPadding: f };
|
|
6601
6601
|
}
|
|
6602
6602
|
const Ro = 255, qr = 128, Ks = Ro * qr;
|
|
6603
|
-
function
|
|
6603
|
+
function lu(i, t) {
|
|
6604
6604
|
const { expression: r } = t;
|
|
6605
6605
|
if (r.kind === "constant") return { kind: "constant", layoutSize: r.evaluate(new bt(i + 1)) };
|
|
6606
6606
|
if (r.kind === "source") return { kind: "source" };
|
|
@@ -6664,7 +6664,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6664
6664
|
constructor(t) {
|
|
6665
6665
|
this.collisionBoxArray = t.collisionBoxArray, this.zoom = t.zoom, this.overscaling = t.overscaling, this.layers = t.layers, this.layerIds = this.layers.map((d) => d.id), this.index = t.index, this.pixelRatio = t.pixelRatio, this.sourceLayerIndex = t.sourceLayerIndex, this.hasPattern = !1, this.hasRTLText = !1, this.sortKeyRanges = [], this.collisionCircleArray = [], this.placementInvProjMatrix = Tc([]), this.placementViewportMatrix = Tc([]);
|
|
6666
6666
|
const r = this.layers[0]._unevaluatedLayout._values;
|
|
6667
|
-
this.textSizeData =
|
|
6667
|
+
this.textSizeData = lu(this.zoom, r["text-size"]), this.iconSizeData = lu(this.zoom, r["icon-size"]);
|
|
6668
6668
|
const n = this.layers[0].layout, l = n.get("symbol-sort-key"), u = n.get("symbol-z-order");
|
|
6669
6669
|
this.canOverlap = Uc(n, "text-overlap", "text-allow-overlap") !== "never" || Uc(n, "icon-overlap", "icon-allow-overlap") !== "never" || n.get("text-ignore-placement") || n.get("icon-ignore-placement"), this.sortFeaturesByKey = u !== "viewport-y" && !l.isConstant(), this.sortFeaturesByY = (u === "viewport-y" || u === "auto" && !this.sortFeaturesByKey) && this.canOverlap, n.get("symbol-placement") === "point" && (this.writingModes = n.get("text-writing-mode").map((d) => C.ah[d])), this.stateDependentLayerIds = this.layers.filter((d) => d.isStateDependent()).map((d) => d.id), this.sourceID = t.sourceID;
|
|
6670
6670
|
}
|
|
@@ -6731,8 +6731,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6731
6731
|
}
|
|
6732
6732
|
const Me = Oe(Ae, De), oe = Oe(Ae, De, !0);
|
|
6733
6733
|
if (Me in Q && oe in j && Q[Me] !== j[oe]) {
|
|
6734
|
-
const
|
|
6735
|
-
delete j[Me], delete Q[oe], Q[Oe(Ae, G[Ee].geometry, !0)] = Ee, G[
|
|
6734
|
+
const Re = Ie(Me, oe, De), Ee = ue(Me, oe, G[Re].geometry);
|
|
6735
|
+
delete j[Me], delete Q[oe], Q[Oe(Ae, G[Ee].geometry, !0)] = Ee, G[Re].geometry = null;
|
|
6736
6736
|
} else Me in Q ? ue(Me, oe, De) : oe in j ? Ie(Me, oe, De) : (se(Se), j[Me] = J - 1, Q[oe] = J - 1);
|
|
6737
6737
|
}
|
|
6738
6738
|
return G.filter((Se) => Se.geometry);
|
|
@@ -6773,8 +6773,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6773
6773
|
addSymbols(t, r, n, l, u, d, f, g, x, v, w, I) {
|
|
6774
6774
|
const k = t.indexArray, z = t.layoutVertexArray, E = t.segments.prepareSegment(4 * r.length, z, k, this.canOverlap ? d.sortKey : void 0), F = this.glyphOffsetArray.length, j = E.vertexLength, Q = this.allowVerticalPlacement && f === C.ah.vertical ? Math.PI / 2 : 0, G = d.text && d.text.sections;
|
|
6775
6775
|
for (let J = 0; J < r.length; J++) {
|
|
6776
|
-
const { tl: se, tr: ue, bl: Ie, br: Oe, tex: Se, pixelOffsetTL: be, pixelOffsetBR: De, minFontScaleX: Ae, minFontScaleY: Me, glyphOffset: oe, isSDF:
|
|
6777
|
-
Ol(z, g.x, g.y, se.x, yt + se.y, Se.x, Se.y, n,
|
|
6776
|
+
const { tl: se, tr: ue, bl: Ie, br: Oe, tex: Se, pixelOffsetTL: be, pixelOffsetBR: De, minFontScaleX: Ae, minFontScaleY: Me, glyphOffset: oe, isSDF: Re, sectionIndex: Ee } = r[J], Ue = E.vertexLength, yt = oe[1];
|
|
6777
|
+
Ol(z, g.x, g.y, se.x, yt + se.y, Se.x, Se.y, n, Re, be.x, be.y, Ae, Me), Ol(z, g.x, g.y, ue.x, yt + ue.y, Se.x + Se.w, Se.y, n, Re, De.x, be.y, Ae, Me), Ol(z, g.x, g.y, Ie.x, yt + Ie.y, Se.x, Se.y + Se.h, n, Re, be.x, De.y, Ae, Me), Ol(z, g.x, g.y, Oe.x, yt + Oe.y, Se.x + Se.w, Se.y + Se.h, n, Re, De.x, De.y, Ae, Me), $c(t.dynamicLayoutVertexArray, g, Q), k.emplaceBack(Ue, Ue + 1, Ue + 2), k.emplaceBack(Ue + 1, Ue + 2, Ue + 3), E.vertexLength += 4, E.primitiveLength += 2, this.glyphOffsetArray.emplaceBack(oe[0]), J !== r.length - 1 && Ee === r[J + 1].sectionIndex || t.programConfigurations.populatePaintArrays(z.length, d, d.index, {}, I, G && G[Ee]);
|
|
6778
6778
|
}
|
|
6779
6779
|
t.placedSymbolArray.emplaceBack(g.x, g.y, F, this.glyphOffsetArray.length - F, j, x, v, g.segment, n ? n[0] : 0, n ? n[1] : 0, l[0], l[1], f, 0, !1, 0, w);
|
|
6780
6780
|
}
|
|
@@ -6794,7 +6794,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6794
6794
|
}
|
|
6795
6795
|
}
|
|
6796
6796
|
generateCollisionDebugBuffers() {
|
|
6797
|
-
this.hasDebugData() && this.destroyDebugData(), this.textCollisionBox = new Zc(qi,
|
|
6797
|
+
this.hasDebugData() && this.destroyDebugData(), this.textCollisionBox = new Zc(qi, Zh.members, Kt), this.iconCollisionBox = new Zc(qi, Zh.members, Kt);
|
|
6798
6798
|
for (let t = 0; t < this.symbolInstances.length; t++) {
|
|
6799
6799
|
const r = this.symbolInstances.get(t);
|
|
6800
6800
|
this.addDebugCollisionBoxes(r.textBoxStartIndex, r.textBoxEndIndex, r, !0), this.addDebugCollisionBoxes(r.verticalTextBoxStartIndex, r.verticalTextBoxEndIndex, r, !0), this.addDebugCollisionBoxes(r.iconBoxStartIndex, r.iconBoxEndIndex, r, !1), this.addDebugCollisionBoxes(r.verticalIconBoxStartIndex, r.verticalIconBoxEndIndex, r, !1);
|
|
@@ -6877,14 +6877,14 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6877
6877
|
}
|
|
6878
6878
|
}
|
|
6879
6879
|
}
|
|
6880
|
-
let
|
|
6880
|
+
let cu, hu;
|
|
6881
6881
|
ke("SymbolBucket", ka, { omit: ["layers", "collisionBoxArray", "features", "compareText"] }), ka.MAX_GLYPHS = 65535, ka.addDynamicAttributes = $c;
|
|
6882
6882
|
var Gc = { get paint() {
|
|
6883
|
-
return
|
|
6883
|
+
return hu = hu || new h({ "icon-opacity": new Ve(re.paint_symbol["icon-opacity"]), "icon-color": new Ve(re.paint_symbol["icon-color"]), "icon-halo-color": new Ve(re.paint_symbol["icon-halo-color"]), "icon-halo-width": new Ve(re.paint_symbol["icon-halo-width"]), "icon-halo-blur": new Ve(re.paint_symbol["icon-halo-blur"]), "icon-translate": new Ce(re.paint_symbol["icon-translate"]), "icon-translate-anchor": new Ce(re.paint_symbol["icon-translate-anchor"]), "text-opacity": new Ve(re.paint_symbol["text-opacity"]), "text-color": new Ve(re.paint_symbol["text-color"], { runtimeType: gi, getOverride: (i) => i.textColor, hasOverride: (i) => !!i.textColor }), "text-halo-color": new Ve(re.paint_symbol["text-halo-color"]), "text-halo-width": new Ve(re.paint_symbol["text-halo-width"]), "text-halo-blur": new Ve(re.paint_symbol["text-halo-blur"]), "text-translate": new Ce(re.paint_symbol["text-translate"]), "text-translate-anchor": new Ce(re.paint_symbol["text-translate-anchor"]) });
|
|
6884
6884
|
}, get layout() {
|
|
6885
|
-
return
|
|
6885
|
+
return cu = cu || new h({ "symbol-placement": new Ce(re.layout_symbol["symbol-placement"]), "symbol-spacing": new Ce(re.layout_symbol["symbol-spacing"]), "symbol-avoid-edges": new Ce(re.layout_symbol["symbol-avoid-edges"]), "symbol-sort-key": new Ve(re.layout_symbol["symbol-sort-key"]), "symbol-z-order": new Ce(re.layout_symbol["symbol-z-order"]), "icon-allow-overlap": new Ce(re.layout_symbol["icon-allow-overlap"]), "icon-overlap": new Ce(re.layout_symbol["icon-overlap"]), "icon-ignore-placement": new Ce(re.layout_symbol["icon-ignore-placement"]), "icon-optional": new Ce(re.layout_symbol["icon-optional"]), "icon-rotation-alignment": new Ce(re.layout_symbol["icon-rotation-alignment"]), "icon-size": new Ve(re.layout_symbol["icon-size"]), "icon-text-fit": new Ce(re.layout_symbol["icon-text-fit"]), "icon-text-fit-padding": new Ce(re.layout_symbol["icon-text-fit-padding"]), "icon-image": new Ve(re.layout_symbol["icon-image"]), "icon-rotate": new Ve(re.layout_symbol["icon-rotate"]), "icon-padding": new Ve(re.layout_symbol["icon-padding"]), "icon-keep-upright": new Ce(re.layout_symbol["icon-keep-upright"]), "icon-offset": new Ve(re.layout_symbol["icon-offset"]), "icon-anchor": new Ve(re.layout_symbol["icon-anchor"]), "icon-pitch-alignment": new Ce(re.layout_symbol["icon-pitch-alignment"]), "text-pitch-alignment": new Ce(re.layout_symbol["text-pitch-alignment"]), "text-rotation-alignment": new Ce(re.layout_symbol["text-rotation-alignment"]), "text-field": new Ve(re.layout_symbol["text-field"]), "text-font": new Ve(re.layout_symbol["text-font"]), "text-size": new Ve(re.layout_symbol["text-size"]), "text-max-width": new Ve(re.layout_symbol["text-max-width"]), "text-line-height": new Ce(re.layout_symbol["text-line-height"]), "text-letter-spacing": new Ve(re.layout_symbol["text-letter-spacing"]), "text-justify": new Ve(re.layout_symbol["text-justify"]), "text-radial-offset": new Ve(re.layout_symbol["text-radial-offset"]), "text-variable-anchor": new Ce(re.layout_symbol["text-variable-anchor"]), "text-variable-anchor-offset": new Ve(re.layout_symbol["text-variable-anchor-offset"]), "text-anchor": new Ve(re.layout_symbol["text-anchor"]), "text-max-angle": new Ce(re.layout_symbol["text-max-angle"]), "text-writing-mode": new Ce(re.layout_symbol["text-writing-mode"]), "text-rotate": new Ve(re.layout_symbol["text-rotate"]), "text-padding": new Ce(re.layout_symbol["text-padding"]), "text-keep-upright": new Ce(re.layout_symbol["text-keep-upright"]), "text-transform": new Ve(re.layout_symbol["text-transform"]), "text-offset": new Ve(re.layout_symbol["text-offset"]), "text-allow-overlap": new Ce(re.layout_symbol["text-allow-overlap"]), "text-overlap": new Ce(re.layout_symbol["text-overlap"]), "text-ignore-placement": new Ce(re.layout_symbol["text-ignore-placement"]), "text-optional": new Ce(re.layout_symbol["text-optional"]) });
|
|
6886
6886
|
} };
|
|
6887
|
-
class
|
|
6887
|
+
class uu {
|
|
6888
6888
|
constructor(t) {
|
|
6889
6889
|
if (t.property.overrides === void 0) throw new Error("overrides must be provided to instantiate FormatSectionOverride class");
|
|
6890
6890
|
this.type = t.property.overrides ? t.property.overrides.runtimeType : Or, this.defaultValue = t;
|
|
@@ -6906,7 +6906,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6906
6906
|
return null;
|
|
6907
6907
|
}
|
|
6908
6908
|
}
|
|
6909
|
-
ke("FormatSectionOverride",
|
|
6909
|
+
ke("FormatSectionOverride", uu, { omit: ["defaultValue"] });
|
|
6910
6910
|
class Vl extends s {
|
|
6911
6911
|
constructor(t) {
|
|
6912
6912
|
super(t, Gc);
|
|
@@ -6940,7 +6940,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6940
6940
|
_setPaintOverrides() {
|
|
6941
6941
|
for (const t of Gc.paint.overridableProperties) {
|
|
6942
6942
|
if (!Vl.hasPaintOverride(this.layout, t)) continue;
|
|
6943
|
-
const r = this.paint.get(t), n = new
|
|
6943
|
+
const r = this.paint.get(t), n = new uu(r), l = new ea(n, r.property.specification);
|
|
6944
6944
|
let u = null;
|
|
6945
6945
|
u = r.value.kind === "constant" || r.value.kind === "source" ? new Es("source", l) : new Ds("composite", l, r.value.zoomStops), this.paint._values[t] = new xr(r.property, u, r.parameters);
|
|
6946
6946
|
}
|
|
@@ -6964,18 +6964,18 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6964
6964
|
return u;
|
|
6965
6965
|
}
|
|
6966
6966
|
}
|
|
6967
|
-
let
|
|
6967
|
+
let du;
|
|
6968
6968
|
var vp = { get paint() {
|
|
6969
|
-
return
|
|
6969
|
+
return du = du || new h({ "background-color": new Ce(re.paint_background["background-color"]), "background-pattern": new fa(re.paint_background["background-pattern"]), "background-opacity": new Ce(re.paint_background["background-opacity"]) });
|
|
6970
6970
|
} };
|
|
6971
6971
|
class bp extends s {
|
|
6972
6972
|
constructor(t) {
|
|
6973
6973
|
super(t, vp);
|
|
6974
6974
|
}
|
|
6975
6975
|
}
|
|
6976
|
-
let
|
|
6976
|
+
let pu;
|
|
6977
6977
|
var wp = { get paint() {
|
|
6978
|
-
return
|
|
6978
|
+
return pu = pu || new h({ "raster-opacity": new Ce(re.paint_raster["raster-opacity"]), "raster-hue-rotate": new Ce(re.paint_raster["raster-hue-rotate"]), "raster-brightness-min": new Ce(re.paint_raster["raster-brightness-min"]), "raster-brightness-max": new Ce(re.paint_raster["raster-brightness-max"]), "raster-saturation": new Ce(re.paint_raster["raster-saturation"]), "raster-contrast": new Ce(re.paint_raster["raster-contrast"]), "raster-resampling": new Ce(re.paint_raster["raster-resampling"]), "raster-fade-duration": new Ce(re.paint_raster["raster-fade-duration"]) });
|
|
6979
6979
|
} };
|
|
6980
6980
|
class Sp extends s {
|
|
6981
6981
|
constructor(t) {
|
|
@@ -7049,18 +7049,18 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7049
7049
|
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>]");
|
|
7050
7050
|
}
|
|
7051
7051
|
}
|
|
7052
|
-
const
|
|
7053
|
-
function
|
|
7054
|
-
return
|
|
7052
|
+
const fu = 2 * Math.PI * Hc;
|
|
7053
|
+
function mu(i) {
|
|
7054
|
+
return fu * Math.cos(i * Math.PI / 180);
|
|
7055
7055
|
}
|
|
7056
|
-
function
|
|
7056
|
+
function gu(i) {
|
|
7057
7057
|
return (180 + i) / 360;
|
|
7058
7058
|
}
|
|
7059
|
-
function
|
|
7059
|
+
function _u(i) {
|
|
7060
7060
|
return (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + i * Math.PI / 360))) / 360;
|
|
7061
7061
|
}
|
|
7062
|
-
function
|
|
7063
|
-
return i /
|
|
7062
|
+
function yu(i, t) {
|
|
7063
|
+
return i / mu(t);
|
|
7064
7064
|
}
|
|
7065
7065
|
function Xc(i) {
|
|
7066
7066
|
return 360 / Math.PI * Math.atan(Math.exp((180 - 360 * i) * Math.PI / 180)) - 90;
|
|
@@ -7071,20 +7071,20 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7071
7071
|
}
|
|
7072
7072
|
static fromLngLat(t, r = 0) {
|
|
7073
7073
|
const n = Js.convert(t);
|
|
7074
|
-
return new Bo(
|
|
7074
|
+
return new Bo(gu(n.lng), _u(n.lat), yu(r, n.lat));
|
|
7075
7075
|
}
|
|
7076
7076
|
toLngLat() {
|
|
7077
7077
|
return new Js(360 * this.x - 180, Xc(this.y));
|
|
7078
7078
|
}
|
|
7079
7079
|
toAltitude() {
|
|
7080
|
-
return this.z *
|
|
7080
|
+
return this.z * mu(Xc(this.y));
|
|
7081
7081
|
}
|
|
7082
7082
|
meterInMercatorCoordinateUnits() {
|
|
7083
|
-
return 1 /
|
|
7083
|
+
return 1 / fu * (t = Xc(this.y), 1 / Math.cos(t * Math.PI / 180));
|
|
7084
7084
|
var t;
|
|
7085
7085
|
}
|
|
7086
7086
|
}
|
|
7087
|
-
function
|
|
7087
|
+
function xu(i, t, r) {
|
|
7088
7088
|
var n = 2 * Math.PI * 6378137 / 256 / Math.pow(2, r);
|
|
7089
7089
|
return [i * n - 2 * Math.PI * 6378137 / 2, t * n - 2 * Math.PI * 6378137 / 2];
|
|
7090
7090
|
}
|
|
@@ -7099,7 +7099,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7099
7099
|
return this.z === t.z && this.x === t.x && this.y === t.y;
|
|
7100
7100
|
}
|
|
7101
7101
|
url(t, r, n) {
|
|
7102
|
-
const l = (d = this.y, f = this.z, g =
|
|
7102
|
+
const l = (d = this.y, f = this.z, g = xu(256 * (u = this.x), 256 * (d = Math.pow(2, f) - d - 1), f), x = xu(256 * (u + 1), 256 * (d + 1), f), g[0] + "," + g[1] + "," + x[0] + "," + x[1]);
|
|
7103
7103
|
var u, d, f, g, x;
|
|
7104
7104
|
const v = function(w, I, k) {
|
|
7105
7105
|
let z, E = "";
|
|
@@ -7120,7 +7120,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7120
7120
|
return `${this.z}/${this.x}/${this.y}`;
|
|
7121
7121
|
}
|
|
7122
7122
|
}
|
|
7123
|
-
class
|
|
7123
|
+
class vu {
|
|
7124
7124
|
constructor(t, r) {
|
|
7125
7125
|
this.wrap = t, this.canonical = r, this.key = Fo(t, r.z, r.z, r.x, r.y);
|
|
7126
7126
|
}
|
|
@@ -7169,7 +7169,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7169
7169
|
return Math.pow(2, this.overscaledZ - this.canonical.z);
|
|
7170
7170
|
}
|
|
7171
7171
|
toUnwrapped() {
|
|
7172
|
-
return new
|
|
7172
|
+
return new vu(this.wrap, this.canonical);
|
|
7173
7173
|
}
|
|
7174
7174
|
toString() {
|
|
7175
7175
|
return `${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`;
|
|
@@ -7184,7 +7184,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7184
7184
|
return (u * u * i + u * l + n).toString(36) + r.toString(36) + t.toString(36);
|
|
7185
7185
|
}
|
|
7186
7186
|
ke("CanonicalTileID", Wc), ke("OverscaledTileID", sr, { omit: ["posMatrix"] });
|
|
7187
|
-
class
|
|
7187
|
+
class bu {
|
|
7188
7188
|
constructor(t, r, n, l = 1, u = 1, d = 1, f = 0) {
|
|
7189
7189
|
if (this.uid = t, r.height !== r.width) throw new RangeError("DEM tiles must be square");
|
|
7190
7190
|
if (n && !["mapbox", "terrarium", "custom"].includes(n)) return void Yt(`"${n}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);
|
|
@@ -7245,8 +7245,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7245
7245
|
for (let v = d; v < f; v++) for (let w = l; w < u; w++) this.data[this._idx(w, v)] = t.data[this._idx(w + g, v + x)];
|
|
7246
7246
|
}
|
|
7247
7247
|
}
|
|
7248
|
-
ke("DEMData",
|
|
7249
|
-
class
|
|
7248
|
+
ke("DEMData", bu);
|
|
7249
|
+
class wu {
|
|
7250
7250
|
constructor(t) {
|
|
7251
7251
|
this._stringToNumber = {}, this._numberToString = [];
|
|
7252
7252
|
for (let r = 0; r < t.length; r++) {
|
|
@@ -7262,7 +7262,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7262
7262
|
return this._numberToString[t];
|
|
7263
7263
|
}
|
|
7264
7264
|
}
|
|
7265
|
-
class
|
|
7265
|
+
class Su {
|
|
7266
7266
|
constructor(t, r, n, l, u) {
|
|
7267
7267
|
this.type = "Feature", this._vectorTileFeature = t, t._z = r, t._x = n, t._y = l, this.properties = t.properties, this.id = u;
|
|
7268
7268
|
}
|
|
@@ -7278,7 +7278,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7278
7278
|
return t;
|
|
7279
7279
|
}
|
|
7280
7280
|
}
|
|
7281
|
-
class
|
|
7281
|
+
class Tu {
|
|
7282
7282
|
constructor(t, r) {
|
|
7283
7283
|
this.tileID = t, this.x = t.canonical.x, this.y = t.canonical.y, this.z = t.canonical.z, this.grid = new Fs(Vt, 16, 0), this.grid3D = new Fs(Vt, 16, 0), this.featureIndexArray = new hi(), this.promoteId = r;
|
|
7284
7284
|
}
|
|
@@ -7296,11 +7296,11 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7296
7296
|
}
|
|
7297
7297
|
}
|
|
7298
7298
|
loadVTLayers() {
|
|
7299
|
-
return this.vtLayers || (this.vtLayers = new Xs.VectorTile(new Fc(this.rawTileData)).layers, this.sourceLayerCoder = new
|
|
7299
|
+
return this.vtLayers || (this.vtLayers = new Xs.VectorTile(new Fc(this.rawTileData)).layers, this.sourceLayerCoder = new wu(this.vtLayers ? Object.keys(this.vtLayers).sort() : ["_geojsonTileLayer"])), this.vtLayers;
|
|
7300
7300
|
}
|
|
7301
7301
|
query(t, r, n, l) {
|
|
7302
7302
|
this.loadVTLayers();
|
|
7303
|
-
const u = t.params || {}, d = Vt / t.tileSize / t.scale, f = to(u.filter), g = t.queryGeometry, x = t.queryPadding * d, v =
|
|
7303
|
+
const u = t.params || {}, d = Vt / t.tileSize / t.scale, f = to(u.filter), g = t.queryGeometry, x = t.queryPadding * d, v = Pu(g), w = this.grid.query(v.minX - x, v.minY - x, v.maxX + x, v.maxY + x), I = Pu(t.cameraQueryGeometry), k = this.grid3D.query(I.minX - x, I.minY - x, I.maxX + x, I.maxY + x, (F, j, Q, G) => function(J, se, ue, Ie, Oe) {
|
|
7304
7304
|
for (const be of J) if (se <= be.x && ue <= be.y && Ie >= be.x && Oe >= be.y) return !0;
|
|
7305
7305
|
const Se = [new he(se, ue), new he(se, Oe), new he(Ie, Oe), new he(Ie, ue)];
|
|
7306
7306
|
if (J.length > 2) {
|
|
@@ -7343,10 +7343,10 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7343
7343
|
let G = {};
|
|
7344
7344
|
E && v && (G = v.getState(Q.sourceLayer || "_geojsonTileLayer", E));
|
|
7345
7345
|
const J = Bi({}, x[j]);
|
|
7346
|
-
J.paint =
|
|
7346
|
+
J.paint = Iu(J.paint, Q.paint, z, G, f), J.layout = Iu(J.layout, Q.layout, z, G, f);
|
|
7347
7347
|
const se = !w || w(z, Q, G);
|
|
7348
7348
|
if (!se) continue;
|
|
7349
|
-
const ue = new
|
|
7349
|
+
const ue = new Su(z, this.z, this.x, this.y, E);
|
|
7350
7350
|
ue.layer = J;
|
|
7351
7351
|
let Ie = t[j];
|
|
7352
7352
|
Ie === void 0 && (Ie = t[j] = []), Ie.push({ featureIndex: l, feature: ue, intersectionZ: se });
|
|
@@ -7368,13 +7368,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7368
7368
|
return this.promoteId && (n = t.properties[typeof this.promoteId == "string" ? this.promoteId : this.promoteId[r]], typeof n == "boolean" && (n = Number(n))), n;
|
|
7369
7369
|
}
|
|
7370
7370
|
}
|
|
7371
|
-
function
|
|
7371
|
+
function Iu(i, t, r, n, l) {
|
|
7372
7372
|
return hr(i, (u, d) => {
|
|
7373
7373
|
const f = t instanceof In ? t.get(d) : null;
|
|
7374
7374
|
return f && f.evaluate ? f.evaluate(r, n, l) : f;
|
|
7375
7375
|
});
|
|
7376
7376
|
}
|
|
7377
|
-
function
|
|
7377
|
+
function Pu(i) {
|
|
7378
7378
|
let t = 1 / 0, r = 1 / 0, n = -1 / 0, l = -1 / 0;
|
|
7379
7379
|
for (const u of i) t = Math.min(t, u.x), r = Math.min(r, u.y), n = Math.max(n, u.x), l = Math.max(l, u.y);
|
|
7380
7380
|
return { minX: t, minY: r, maxX: n, maxY: l };
|
|
@@ -7382,7 +7382,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7382
7382
|
function Pp(i, t) {
|
|
7383
7383
|
return t - i;
|
|
7384
7384
|
}
|
|
7385
|
-
function
|
|
7385
|
+
function Mu(i, t, r, n, l) {
|
|
7386
7386
|
const u = [];
|
|
7387
7387
|
for (let d = 0; d < i.length; d++) {
|
|
7388
7388
|
const f = i[d];
|
|
@@ -7394,7 +7394,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7394
7394
|
}
|
|
7395
7395
|
return u;
|
|
7396
7396
|
}
|
|
7397
|
-
ke("FeatureIndex",
|
|
7397
|
+
ke("FeatureIndex", Tu, { omit: ["rawTileData", "sourceLayerCoder"] });
|
|
7398
7398
|
class Ys extends he {
|
|
7399
7399
|
constructor(t, r, n, l) {
|
|
7400
7400
|
super(t, r), this.angle = n, l !== void 0 && (this.segment = l);
|
|
@@ -7403,7 +7403,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7403
7403
|
return new Ys(this.x, this.y, this.angle, this.segment);
|
|
7404
7404
|
}
|
|
7405
7405
|
}
|
|
7406
|
-
function
|
|
7406
|
+
function ku(i, t, r, n, l) {
|
|
7407
7407
|
if (t.segment === void 0 || r === 0) return !0;
|
|
7408
7408
|
let u = t, d = t.segment + 1, f = 0;
|
|
7409
7409
|
for (; f > -r / 2; ) {
|
|
@@ -7423,36 +7423,36 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7423
7423
|
}
|
|
7424
7424
|
return !0;
|
|
7425
7425
|
}
|
|
7426
|
-
function
|
|
7426
|
+
function Au(i) {
|
|
7427
7427
|
let t = 0;
|
|
7428
7428
|
for (let r = 0; r < i.length - 1; r++) t += i[r].dist(i[r + 1]);
|
|
7429
7429
|
return t;
|
|
7430
7430
|
}
|
|
7431
|
-
function
|
|
7431
|
+
function Cu(i, t, r) {
|
|
7432
7432
|
return i ? 0.6 * t * r : 0;
|
|
7433
7433
|
}
|
|
7434
|
-
function
|
|
7434
|
+
function zu(i, t) {
|
|
7435
7435
|
return Math.max(i ? i.right - i.left : 0, t ? t.right - t.left : 0);
|
|
7436
7436
|
}
|
|
7437
7437
|
function Mp(i, t, r, n, l, u) {
|
|
7438
|
-
const d =
|
|
7438
|
+
const d = Cu(r, l, u), f = zu(r, n) * u;
|
|
7439
7439
|
let g = 0;
|
|
7440
|
-
const x =
|
|
7440
|
+
const x = Au(i) / 2;
|
|
7441
7441
|
for (let v = 0; v < i.length - 1; v++) {
|
|
7442
7442
|
const w = i[v], I = i[v + 1], k = w.dist(I);
|
|
7443
7443
|
if (g + k > x) {
|
|
7444
7444
|
const z = (x - g) / k, E = _i.number(w.x, I.x, z), F = _i.number(w.y, I.y, z), j = new Ys(E, F, I.angleTo(w), v);
|
|
7445
|
-
return j._round(), !d ||
|
|
7445
|
+
return j._round(), !d || ku(i, j, f, d, t) ? j : void 0;
|
|
7446
7446
|
}
|
|
7447
7447
|
g += k;
|
|
7448
7448
|
}
|
|
7449
7449
|
}
|
|
7450
7450
|
function kp(i, t, r, n, l, u, d, f, g) {
|
|
7451
|
-
const x =
|
|
7452
|
-
return t - w < t / 4 && (t = w + t / 4),
|
|
7451
|
+
const x = Cu(n, u, d), v = zu(n, l), w = v * d, I = i[0].x === 0 || i[0].x === g || i[0].y === 0 || i[0].y === g;
|
|
7452
|
+
return t - w < t / 4 && (t = w + t / 4), Eu(i, I ? t / 2 * f % t : (v / 2 + 2 * u) * d * f % t, t, x, r, w, I, !1, g);
|
|
7453
7453
|
}
|
|
7454
|
-
function
|
|
7455
|
-
const x = u / 2, v =
|
|
7454
|
+
function Eu(i, t, r, n, l, u, d, f, g) {
|
|
7455
|
+
const x = u / 2, v = Au(i);
|
|
7456
7456
|
let w = 0, I = t - r, k = [];
|
|
7457
7457
|
for (let z = 0; z < i.length - 1; z++) {
|
|
7458
7458
|
const E = i[z], F = i[z + 1], j = E.dist(F), Q = F.angleTo(E);
|
|
@@ -7461,38 +7461,38 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7461
7461
|
const G = (I - w) / j, J = _i.number(E.x, F.x, G), se = _i.number(E.y, F.y, G);
|
|
7462
7462
|
if (J >= 0 && J < g && se >= 0 && se < g && I - x >= 0 && I + x <= v) {
|
|
7463
7463
|
const ue = new Ys(J, se, Q, z);
|
|
7464
|
-
ue._round(), n && !
|
|
7464
|
+
ue._round(), n && !ku(i, ue, u, n, l) || k.push(ue);
|
|
7465
7465
|
}
|
|
7466
7466
|
}
|
|
7467
7467
|
w += j;
|
|
7468
7468
|
}
|
|
7469
|
-
return f || k.length || d || (k =
|
|
7469
|
+
return f || k.length || d || (k = Eu(i, w / 2, r, n, l, u, d, !0, g)), k;
|
|
7470
7470
|
}
|
|
7471
7471
|
ke("Anchor", Ys);
|
|
7472
7472
|
const Aa = Di;
|
|
7473
|
-
function
|
|
7473
|
+
function Du(i, t, r, n) {
|
|
7474
7474
|
const l = [], u = i.image, d = u.pixelRatio, f = u.paddedRect.w - 2 * Aa, g = u.paddedRect.h - 2 * Aa;
|
|
7475
7475
|
let x = { x1: i.left, y1: i.top, x2: i.right, y2: i.bottom };
|
|
7476
|
-
const v = u.stretchX || [[0, f]], w = u.stretchY || [[0, g]], I = (oe,
|
|
7476
|
+
const v = u.stretchX || [[0, f]], w = u.stretchY || [[0, g]], I = (oe, Re) => oe + Re[1] - Re[0], k = v.reduce(I, 0), z = w.reduce(I, 0), E = f - k, F = g - z;
|
|
7477
7477
|
let j = 0, Q = k, G = 0, J = z, se = 0, ue = E, Ie = 0, Oe = F;
|
|
7478
7478
|
if (u.content && n) {
|
|
7479
|
-
const oe = u.content,
|
|
7480
|
-
(u.textFitWidth || u.textFitHeight) && (x =
|
|
7479
|
+
const oe = u.content, Re = oe[2] - oe[0], Ee = oe[3] - oe[1];
|
|
7480
|
+
(u.textFitWidth || u.textFitHeight) && (x = au(i)), j = Nl(v, 0, oe[0]), G = Nl(w, 0, oe[1]), Q = Nl(v, oe[0], oe[2]), J = Nl(w, oe[1], oe[3]), se = oe[0] - j, Ie = oe[1] - G, ue = Re - Q, Oe = Ee - J;
|
|
7481
7481
|
}
|
|
7482
|
-
const Se = x.x1, be = x.y1, De = x.x2 - Se, Ae = x.y2 - be, Me = (oe,
|
|
7483
|
-
const yt = jl(oe.stretch - j, Q, De, Se), gt = Ul(oe.fixed - se, ue, oe.stretch, k), Zt = jl(
|
|
7482
|
+
const Se = x.x1, be = x.y1, De = x.x2 - Se, Ae = x.y2 - be, Me = (oe, Re, Ee, Ue) => {
|
|
7483
|
+
const yt = jl(oe.stretch - j, Q, De, Se), gt = Ul(oe.fixed - se, ue, oe.stretch, k), Zt = jl(Re.stretch - G, J, Ae, be), br = Ul(Re.fixed - Ie, Oe, Re.stretch, z), si = jl(Ee.stretch - j, Q, De, Se), Gt = Ul(Ee.fixed - se, ue, Ee.stretch, k), bi = jl(Ue.stretch - G, J, Ae, be), wi = Ul(Ue.fixed - Ie, Oe, Ue.stretch, z), Si = new he(yt, Zt), Dt = new he(si, Zt), Ht = new he(si, bi), di = new he(yt, bi), ni = new he(gt / d, br / d), Ti = new he(Gt / d, wi / d), ai = t * Math.PI / 180;
|
|
7484
7484
|
if (ai) {
|
|
7485
7485
|
const nt = Math.sin(ai), vt = Math.cos(ai), It = [vt, -nt, nt, vt];
|
|
7486
7486
|
Si._matMult(It), Dt._matMult(It), di._matMult(It), Ht._matMult(It);
|
|
7487
7487
|
}
|
|
7488
|
-
const nr = oe.stretch + oe.fixed, Li =
|
|
7488
|
+
const nr = oe.stretch + oe.fixed, Li = Re.stretch + Re.fixed;
|
|
7489
7489
|
return { tl: Si, tr: Dt, bl: di, br: Ht, tex: { x: u.paddedRect.x + Aa + nr, y: u.paddedRect.y + Aa + Li, w: Ee.stretch + Ee.fixed - nr, h: Ue.stretch + Ue.fixed - Li }, writingMode: void 0, glyphOffset: [0, 0], sectionIndex: 0, pixelOffsetTL: ni, pixelOffsetBR: Ti, minFontScaleX: ue / d / De, minFontScaleY: Oe / d / Ae, isSDF: r };
|
|
7490
7490
|
};
|
|
7491
7491
|
if (n && (u.stretchX || u.stretchY)) {
|
|
7492
|
-
const oe =
|
|
7492
|
+
const oe = Lu(v, E, k), Re = Lu(w, F, z);
|
|
7493
7493
|
for (let Ee = 0; Ee < oe.length - 1; Ee++) {
|
|
7494
7494
|
const Ue = oe[Ee], yt = oe[Ee + 1];
|
|
7495
|
-
for (let gt = 0; gt <
|
|
7495
|
+
for (let gt = 0; gt < Re.length - 1; gt++) l.push(Me(Ue, Re[gt], yt, Re[gt + 1]));
|
|
7496
7496
|
}
|
|
7497
7497
|
} else l.push(Me({ fixed: 0, stretch: -1 }, { fixed: 0, stretch: -1 }, { fixed: 0, stretch: f + 1 }, { fixed: 0, stretch: g + 1 }));
|
|
7498
7498
|
return l;
|
|
@@ -7502,7 +7502,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7502
7502
|
for (const l of i) n += Math.max(t, Math.min(r, l[1])) - Math.max(t, Math.min(r, l[0]));
|
|
7503
7503
|
return n;
|
|
7504
7504
|
}
|
|
7505
|
-
function
|
|
7505
|
+
function Lu(i, t, r) {
|
|
7506
7506
|
const n = [{ fixed: -Aa, stretch: 0 }];
|
|
7507
7507
|
for (const [l, u] of i) {
|
|
7508
7508
|
const d = n[n.length - 1];
|
|
@@ -7526,7 +7526,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7526
7526
|
let E = k - I;
|
|
7527
7527
|
E > 0 && (E = Math.max(10, E), this.circleDiameter = E);
|
|
7528
7528
|
} else {
|
|
7529
|
-
const I = !((w = d.image) === null || w === void 0) && w.content && (d.image.textFitWidth || d.image.textFitHeight) ?
|
|
7529
|
+
const I = !((w = d.image) === null || w === void 0) && w.content && (d.image.textFitWidth || d.image.textFitHeight) ? au(d) : { x1: d.left, y1: d.top, x2: d.right, y2: d.bottom };
|
|
7530
7530
|
I.y1 = I.y1 * f - g[0], I.y2 = I.y2 * f + g[2], I.x1 = I.x1 * f - g[3], I.x2 = I.x2 * f + g[1];
|
|
7531
7531
|
const k = d.collisionPadding;
|
|
7532
7532
|
if (k && (I.x1 -= k[0] * f, I.y1 -= k[1] * f, I.x2 += k[2] * f, I.y2 += k[3] * f), v) {
|
|
@@ -7610,7 +7610,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7610
7610
|
const x = u[g];
|
|
7611
7611
|
for (let v = 0, w = x.length, I = w - 1; v < w; I = v++) {
|
|
7612
7612
|
const k = x[v], z = x[I];
|
|
7613
|
-
k.y > l.y != z.y > l.y && l.x < (z.x - k.x) * (l.y - k.y) / (z.y - k.y) + k.x && (d = !d), f = Math.min(f,
|
|
7613
|
+
k.y > l.y != z.y > l.y && l.x < (z.x - k.x) * (l.y - k.y) / (z.y - k.y) + k.x && (d = !d), f = Math.min(f, _h(l, k, z));
|
|
7614
7614
|
}
|
|
7615
7615
|
}
|
|
7616
7616
|
return (d ? 1 : -1) * Math.sqrt(f);
|
|
@@ -7619,7 +7619,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7619
7619
|
var ri;
|
|
7620
7620
|
C.aq = void 0, (ri = C.aq || (C.aq = {}))[ri.center = 1] = "center", ri[ri.left = 2] = "left", ri[ri.right = 3] = "right", ri[ri.top = 4] = "top", ri[ri.bottom = 5] = "bottom", ri[ri["top-left"] = 6] = "top-left", ri[ri["top-right"] = 7] = "top-right", ri[ri["bottom-left"] = 8] = "bottom-left", ri[ri["bottom-right"] = 9] = "bottom-right";
|
|
7621
7621
|
const Qs = 7, Kc = Number.POSITIVE_INFINITY;
|
|
7622
|
-
function
|
|
7622
|
+
function Ru(i, t) {
|
|
7623
7623
|
return t[1] !== Kc ? function(r, n, l) {
|
|
7624
7624
|
let u = 0, d = 0;
|
|
7625
7625
|
switch (n = Math.abs(n), l = Math.abs(l), r) {
|
|
@@ -7682,7 +7682,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7682
7682
|
return [l, u];
|
|
7683
7683
|
}(i, t[0]);
|
|
7684
7684
|
}
|
|
7685
|
-
function
|
|
7685
|
+
function Bu(i, t, r) {
|
|
7686
7686
|
var n;
|
|
7687
7687
|
const l = i.layout, u = (n = l.get("text-variable-anchor-offset")) === null || n === void 0 ? void 0 : n.evaluate(t, {}, r);
|
|
7688
7688
|
if (u) {
|
|
@@ -7698,7 +7698,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7698
7698
|
let f;
|
|
7699
7699
|
f = i._unevaluatedLayout.getValue("text-radial-offset") !== void 0 ? [l.get("text-radial-offset").evaluate(t, {}, r) * Ut, Kc] : l.get("text-offset").evaluate(t, {}, r).map((x) => x * Ut);
|
|
7700
7700
|
const g = [];
|
|
7701
|
-
for (const x of d) g.push(x,
|
|
7701
|
+
for (const x of d) g.push(x, Ru(x, f));
|
|
7702
7702
|
return new Oi(g);
|
|
7703
7703
|
}
|
|
7704
7704
|
return null;
|
|
@@ -7719,48 +7719,48 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7719
7719
|
function Ep(i, t, r, n, l, u, d, f, g, x, v) {
|
|
7720
7720
|
let w = u.textMaxSize.evaluate(t, {});
|
|
7721
7721
|
w === void 0 && (w = d);
|
|
7722
|
-
const I = i.layers[0].layout, k = I.get("icon-offset").evaluate(t, {}, v), z =
|
|
7723
|
-
const yt = oe.get("icon-padding").evaluate(
|
|
7722
|
+
const I = i.layers[0].layout, k = I.get("icon-offset").evaluate(t, {}, v), z = Ou(r.horizontal), E = d / 24, F = i.tilePixelRatio * E, j = i.tilePixelRatio * w / 24, Q = i.tilePixelRatio * f, G = i.tilePixelRatio * I.get("symbol-spacing"), J = I.get("text-padding") * i.tilePixelRatio, se = function(oe, Re, Ee, Ue = 1) {
|
|
7723
|
+
const yt = oe.get("icon-padding").evaluate(Re, {}, Ee), gt = yt && yt.values;
|
|
7724
7724
|
return [gt[0] * Ue, gt[1] * Ue, gt[2] * Ue, gt[3] * Ue];
|
|
7725
7725
|
}(I, t, v, i.tilePixelRatio), ue = I.get("text-max-angle") / 180 * Math.PI, Ie = I.get("text-rotation-alignment") !== "viewport" && I.get("symbol-placement") !== "point", Oe = I.get("icon-rotation-alignment") === "map" && I.get("symbol-placement") !== "point", Se = I.get("symbol-placement"), be = G / 2, De = I.get("icon-text-fit");
|
|
7726
7726
|
let Ae;
|
|
7727
|
-
n && De !== "none" && (i.allowVerticalPlacement && r.vertical && (Ae =
|
|
7728
|
-
const Me = (oe,
|
|
7729
|
-
|
|
7727
|
+
n && De !== "none" && (i.allowVerticalPlacement && r.vertical && (Ae = ou(n, r.vertical, De, I.get("icon-text-fit-padding"), k, E)), z && (n = ou(n, z, De, I.get("icon-text-fit-padding"), k, E)));
|
|
7728
|
+
const Me = (oe, Re) => {
|
|
7729
|
+
Re.x < 0 || Re.x >= Vt || Re.y < 0 || Re.y >= Vt || function(Ee, Ue, yt, gt, Zt, br, si, Gt, bi, wi, Si, Dt, Ht, di, ni, Ti, ai, nr, Li, nt, vt, It, Zi, Ct, za) {
|
|
7730
7730
|
const Zr = Ee.addToLineVertexArray(Ue, yt);
|
|
7731
|
-
let Gr, wr, ar, Jt, ps = 0, No = 0,
|
|
7731
|
+
let Gr, wr, ar, Jt, ps = 0, No = 0, Uu = 0, $u = 0, nh = -1, ah = -1;
|
|
7732
7732
|
const fs = {};
|
|
7733
|
-
let
|
|
7733
|
+
let qu = _a("");
|
|
7734
7734
|
if (Ee.allowVerticalPlacement && gt.vertical) {
|
|
7735
7735
|
const pi = Gt.layout.get("text-rotate").evaluate(vt, {}, Ct) + 90;
|
|
7736
7736
|
ar = new $l(bi, Ue, wi, Si, Dt, gt.vertical, Ht, di, ni, pi), si && (Jt = new $l(bi, Ue, wi, Si, Dt, si, ai, nr, ni, pi));
|
|
7737
7737
|
}
|
|
7738
7738
|
if (Zt) {
|
|
7739
|
-
const pi = Gt.layout.get("icon-rotate").evaluate(vt, {}), or = Gt.layout.get("icon-text-fit") !== "none", En =
|
|
7739
|
+
const pi = Gt.layout.get("icon-rotate").evaluate(vt, {}), or = Gt.layout.get("icon-text-fit") !== "none", En = Du(Zt, pi, Zi, or), Dr = si ? Du(si, pi, Zi, or) : void 0;
|
|
7740
7740
|
wr = new $l(bi, Ue, wi, Si, Dt, Zt, ai, nr, !1, pi), ps = 4 * En.length;
|
|
7741
7741
|
const Dn = Ee.iconSizeData;
|
|
7742
7742
|
let Hr = null;
|
|
7743
7743
|
Dn.kind === "source" ? (Hr = [qr * Gt.layout.get("icon-size").evaluate(vt, {})], Hr[0] > Ks && Yt(`${Ee.layerIds[0]}: Value for "icon-size" is >= ${Ro}. Reduce your "icon-size".`)) : Dn.kind === "composite" && (Hr = [qr * It.compositeIconSizes[0].evaluate(vt, {}, Ct), qr * It.compositeIconSizes[1].evaluate(vt, {}, Ct)], (Hr[0] > Ks || Hr[1] > Ks) && Yt(`${Ee.layerIds[0]}: Value for "icon-size" is >= ${Ro}. Reduce your "icon-size".`)), Ee.addSymbols(Ee.icon, En, Hr, nt, Li, vt, C.ah.none, Ue, Zr.lineStartIndex, Zr.lineLength, -1, Ct), nh = Ee.icon.placedSymbolArray.length - 1, Dr && (No = 4 * Dr.length, Ee.addSymbols(Ee.icon, Dr, Hr, nt, Li, vt, C.ah.vertical, Ue, Zr.lineStartIndex, Zr.lineLength, -1, Ct), ah = Ee.icon.placedSymbolArray.length - 1);
|
|
7744
7744
|
}
|
|
7745
|
-
const
|
|
7746
|
-
for (const pi of
|
|
7745
|
+
const Zu = Object.keys(gt.horizontal);
|
|
7746
|
+
for (const pi of Zu) {
|
|
7747
7747
|
const or = gt.horizontal[pi];
|
|
7748
7748
|
if (!Gr) {
|
|
7749
|
-
|
|
7749
|
+
qu = _a(or.text);
|
|
7750
7750
|
const Dr = Gt.layout.get("text-rotate").evaluate(vt, {}, Ct);
|
|
7751
7751
|
Gr = new $l(bi, Ue, wi, Si, Dt, or, Ht, di, ni, Dr);
|
|
7752
7752
|
}
|
|
7753
7753
|
const En = or.positionedLines.length === 1;
|
|
7754
|
-
if (
|
|
7754
|
+
if (Uu += Fu(Ee, Ue, or, br, Gt, ni, vt, Ti, Zr, gt.vertical ? C.ah.horizontal : C.ah.horizontalOnly, En ? Zu : [pi], fs, nh, It, Ct), En) break;
|
|
7755
7755
|
}
|
|
7756
|
-
gt.vertical && (
|
|
7756
|
+
gt.vertical && ($u += Fu(Ee, Ue, gt.vertical, br, Gt, ni, vt, Ti, Zr, C.ah.vertical, ["vertical"], fs, ah, It, Ct));
|
|
7757
7757
|
const Rp = Gr ? Gr.boxStartIndex : Ee.collisionBoxArray.length, Bp = Gr ? Gr.boxEndIndex : Ee.collisionBoxArray.length, Fp = ar ? ar.boxStartIndex : Ee.collisionBoxArray.length, Op = ar ? ar.boxEndIndex : Ee.collisionBoxArray.length, Vp = wr ? wr.boxStartIndex : Ee.collisionBoxArray.length, Np = wr ? wr.boxEndIndex : Ee.collisionBoxArray.length, jp = Jt ? Jt.boxStartIndex : Ee.collisionBoxArray.length, Up = Jt ? Jt.boxEndIndex : Ee.collisionBoxArray.length;
|
|
7758
7758
|
let Er = -1;
|
|
7759
7759
|
const Zl = (pi, or) => pi && pi.circleDiameter ? Math.max(pi.circleDiameter, or) : or;
|
|
7760
7760
|
Er = Zl(Gr, Er), Er = Zl(ar, Er), Er = Zl(wr, Er), Er = Zl(Jt, Er);
|
|
7761
|
-
const
|
|
7762
|
-
|
|
7763
|
-
const $p =
|
|
7761
|
+
const Gu = Er > -1 ? 1 : 0;
|
|
7762
|
+
Gu && (Er *= za / Ut), Ee.glyphOffsetArray.length >= ka.MAX_GLYPHS && Yt("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"), vt.sortKey !== void 0 && Ee.addToSortKeyRanges(Ee.symbolInstances.length, vt.sortKey);
|
|
7763
|
+
const $p = Bu(Gt, vt, Ct), [qp, Zp] = function(pi, or) {
|
|
7764
7764
|
const En = pi.length, Dr = or == null ? void 0 : or.values;
|
|
7765
7765
|
if ((Dr == null ? void 0 : Dr.length) > 0) for (let Dn = 0; Dn < Dr.length; Dn += 2) {
|
|
7766
7766
|
const Hr = Dr[Dn + 1];
|
|
@@ -7768,41 +7768,41 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7768
7768
|
}
|
|
7769
7769
|
return [En, pi.length];
|
|
7770
7770
|
}(Ee.textAnchorOffsets, $p);
|
|
7771
|
-
Ee.symbolInstances.emplaceBack(Ue.x, Ue.y, fs.right >= 0 ? fs.right : -1, fs.center >= 0 ? fs.center : -1, fs.left >= 0 ? fs.left : -1, fs.vertical || -1, nh, ah,
|
|
7772
|
-
}(i,
|
|
7771
|
+
Ee.symbolInstances.emplaceBack(Ue.x, Ue.y, fs.right >= 0 ? fs.right : -1, fs.center >= 0 ? fs.center : -1, fs.left >= 0 ? fs.left : -1, fs.vertical || -1, nh, ah, qu, Rp, Bp, Fp, Op, Vp, Np, jp, Up, wi, Uu, $u, ps, No, Gu, 0, Ht, Er, qp, Zp);
|
|
7772
|
+
}(i, Re, oe, r, n, l, Ae, i.layers[0], i.collisionBoxArray, t.index, t.sourceLayerIndex, i.index, F, [J, J, J, J], Ie, g, Q, se, Oe, k, t, u, x, v, d);
|
|
7773
7773
|
};
|
|
7774
|
-
if (Se === "line") for (const oe of
|
|
7775
|
-
const
|
|
7776
|
-
for (const Ee of
|
|
7774
|
+
if (Se === "line") for (const oe of Mu(t.geometry, 0, 0, Vt, Vt)) {
|
|
7775
|
+
const Re = kp(oe, G, ue, r.vertical || z, n, 24, j, i.overscaling, Vt);
|
|
7776
|
+
for (const Ee of Re) z && Dp(i, z.text, be, Ee) || Me(oe, Ee);
|
|
7777
7777
|
}
|
|
7778
7778
|
else if (Se === "line-center") {
|
|
7779
7779
|
for (const oe of t.geometry) if (oe.length > 1) {
|
|
7780
|
-
const
|
|
7781
|
-
|
|
7780
|
+
const Re = Mp(oe, ue, r.vertical || z, n, 24, j);
|
|
7781
|
+
Re && Me(oe, Re);
|
|
7782
7782
|
}
|
|
7783
7783
|
} else if (t.type === "Polygon") for (const oe of Hn(t.geometry, 0)) {
|
|
7784
|
-
const
|
|
7785
|
-
Me(oe[0], new Ys(
|
|
7784
|
+
const Re = Cp(oe, 16);
|
|
7785
|
+
Me(oe[0], new Ys(Re.x, Re.y, 0));
|
|
7786
7786
|
}
|
|
7787
7787
|
else if (t.type === "LineString") for (const oe of t.geometry) Me(oe, new Ys(oe[0].x, oe[0].y, 0));
|
|
7788
|
-
else if (t.type === "Point") for (const oe of t.geometry) for (const
|
|
7788
|
+
else if (t.type === "Point") for (const oe of t.geometry) for (const Re of oe) Me([Re], new Ys(Re.x, Re.y, 0));
|
|
7789
7789
|
}
|
|
7790
|
-
function
|
|
7790
|
+
function Fu(i, t, r, n, l, u, d, f, g, x, v, w, I, k, z) {
|
|
7791
7791
|
const E = function(Q, G, J, se, ue, Ie, Oe, Se) {
|
|
7792
7792
|
const be = se.layout.get("text-rotate").evaluate(Ie, {}) * Math.PI / 180, De = [];
|
|
7793
7793
|
for (const Ae of G.positionedLines) for (const Me of Ae.positionedGlyphs) {
|
|
7794
7794
|
if (!Me.rect) continue;
|
|
7795
7795
|
const oe = Me.rect || {};
|
|
7796
|
-
let
|
|
7796
|
+
let Re = Qh + 1, Ee = !0, Ue = 1, yt = 0;
|
|
7797
7797
|
const gt = (ue || Se) && Me.vertical, Zt = Me.metrics.advance * Me.scale / 2;
|
|
7798
7798
|
if (Se && G.verticalizable && (yt = Ae.lineOffset / 2 - (Me.imageName ? -(Ut - Me.metrics.width * Me.scale) / 2 : (Me.scale - 1) * Ut)), Me.imageName) {
|
|
7799
7799
|
const nt = Oe[Me.imageName];
|
|
7800
|
-
Ee = nt.sdf, Ue = nt.pixelRatio,
|
|
7800
|
+
Ee = nt.sdf, Ue = nt.pixelRatio, Re = Di / Ue;
|
|
7801
7801
|
}
|
|
7802
7802
|
const br = ue ? [Me.x + Zt, Me.y] : [0, 0];
|
|
7803
7803
|
let si = ue ? [0, 0] : [Me.x + Zt + J[0], Me.y + J[1] - yt], Gt = [0, 0];
|
|
7804
7804
|
gt && (Gt = si, si = [0, 0]);
|
|
7805
|
-
const bi = Me.metrics.isDoubleResolution ? 2 : 1, wi = (Me.metrics.left -
|
|
7805
|
+
const bi = Me.metrics.isDoubleResolution ? 2 : 1, wi = (Me.metrics.left - Re) * Me.scale - Zt + si[0], Si = (-Me.metrics.top - Re) * Me.scale + si[1], Dt = wi + oe.w / bi * Me.scale / Ue, Ht = Si + oe.h / bi * Me.scale / Ue, di = new he(wi, Si), ni = new he(Dt, Si), Ti = new he(wi, Ht), ai = new he(Dt, Ht);
|
|
7806
7806
|
if (gt) {
|
|
7807
7807
|
const nt = new he(-Zt, Zt - Do), vt = -Math.PI / 2, It = Ut / 2 - Zt, Zi = new he(5 - Do - It, -(Me.imageName ? It : 0)), Ct = new he(...Gt);
|
|
7808
7808
|
di._rotateAround(vt, nt)._add(Zi)._add(Ct), ni._rotateAround(vt, nt)._add(Zi)._add(Ct), Ti._rotateAround(vt, nt)._add(Zi)._add(Ct), ai._rotateAround(vt, nt)._add(Zi)._add(Ct);
|
|
@@ -7821,7 +7821,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7821
7821
|
for (const Q of v) w[Q] = i.text.placedSymbolArray.length - 1;
|
|
7822
7822
|
return 4 * E.length;
|
|
7823
7823
|
}
|
|
7824
|
-
function
|
|
7824
|
+
function Ou(i) {
|
|
7825
7825
|
for (const t in i) return i[t];
|
|
7826
7826
|
return null;
|
|
7827
7827
|
}
|
|
@@ -7833,7 +7833,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7833
7833
|
} else l[t] = [];
|
|
7834
7834
|
return l[t].push(n), !1;
|
|
7835
7835
|
}
|
|
7836
|
-
const
|
|
7836
|
+
const Vu = [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array];
|
|
7837
7837
|
class Yc {
|
|
7838
7838
|
static from(t) {
|
|
7839
7839
|
if (!(t instanceof ArrayBuffer)) throw new Error("Data must be an instance of ArrayBuffer.");
|
|
@@ -7841,7 +7841,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7841
7841
|
if (r !== 219) throw new Error("Data does not appear to be in a KDBush format.");
|
|
7842
7842
|
const l = n >> 4;
|
|
7843
7843
|
if (l !== 1) throw new Error(`Got v${l} data when expected v1.`);
|
|
7844
|
-
const u =
|
|
7844
|
+
const u = Vu[15 & n];
|
|
7845
7845
|
if (!u) throw new Error("Unrecognized array type.");
|
|
7846
7846
|
const [d] = new Uint16Array(t, 2, 1), [f] = new Uint32Array(t, 4, 1);
|
|
7847
7847
|
return new Yc(f, d, u, t);
|
|
@@ -7849,7 +7849,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7849
7849
|
constructor(t, r = 64, n = Float64Array, l) {
|
|
7850
7850
|
if (isNaN(t) || t < 0) throw new Error(`Unpexpected numItems value: ${t}.`);
|
|
7851
7851
|
this.numItems = +t, this.nodeSize = Math.min(Math.max(+r, 2), 65535), this.ArrayType = n, this.IndexArrayType = t < 65536 ? Uint16Array : Uint32Array;
|
|
7852
|
-
const u =
|
|
7852
|
+
const u = Vu.indexOf(this.ArrayType), d = 2 * t * this.ArrayType.BYTES_PER_ELEMENT, f = t * this.IndexArrayType.BYTES_PER_ELEMENT, g = (8 - f % 8) % 8;
|
|
7853
7853
|
if (u < 0) throw new Error(`Unexpected typed array class: ${n}.`);
|
|
7854
7854
|
l && l instanceof ArrayBuffer ? (this.data = l, this.ids = new this.IndexArrayType(this.data, 8, t), this.coords = new this.ArrayType(this.data, 8 + f + g, 2 * t), this._pos = 2 * t, this._finished = !0) : (this.data = new ArrayBuffer(8 + d + f + g), this.ids = new this.IndexArrayType(this.data, 8, t), this.coords = new this.ArrayType(this.data, 8 + f + g, 2 * t), this._pos = 0, this._finished = !1, new Uint8Array(this.data, 0, 2).set([219, 16 + u]), new Uint16Array(this.data, 2, 1)[0] = r, new Uint32Array(this.data, 4, 1)[0] = t);
|
|
7855
7855
|
}
|
|
@@ -7885,11 +7885,11 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7885
7885
|
for (; f.length; ) {
|
|
7886
7886
|
const v = f.pop() || 0, w = f.pop() || 0, I = f.pop() || 0;
|
|
7887
7887
|
if (w - I <= d) {
|
|
7888
|
-
for (let F = I; F <= w; F++)
|
|
7888
|
+
for (let F = I; F <= w; F++) ju(u[2 * F], u[2 * F + 1], t, r) <= x && g.push(l[F]);
|
|
7889
7889
|
continue;
|
|
7890
7890
|
}
|
|
7891
7891
|
const k = I + w >> 1, z = u[2 * k], E = u[2 * k + 1];
|
|
7892
|
-
|
|
7892
|
+
ju(z, E, t, r) <= x && g.push(l[k]), (v === 0 ? t - n <= z : r - n <= E) && (f.push(I), f.push(k - 1), f.push(1 - v)), (v === 0 ? t + n >= z : r + n >= E) && (f.push(k + 1), f.push(w), f.push(1 - v));
|
|
7893
7893
|
}
|
|
7894
7894
|
return g;
|
|
7895
7895
|
}
|
|
@@ -7897,13 +7897,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7897
7897
|
function Qc(i, t, r, n, l, u) {
|
|
7898
7898
|
if (l - n <= r) return;
|
|
7899
7899
|
const d = n + l >> 1;
|
|
7900
|
-
|
|
7900
|
+
Nu(i, t, d, n, l, u), Qc(i, t, r, n, d - 1, 1 - u), Qc(i, t, r, d + 1, l, 1 - u);
|
|
7901
7901
|
}
|
|
7902
|
-
function
|
|
7902
|
+
function Nu(i, t, r, n, l, u) {
|
|
7903
7903
|
for (; l > n; ) {
|
|
7904
7904
|
if (l - n > 600) {
|
|
7905
7905
|
const x = l - n + 1, v = r - n + 1, w = Math.log(x), I = 0.5 * Math.exp(2 * w / 3), k = 0.5 * Math.sqrt(w * I * (x - I) / x) * (v - x / 2 < 0 ? -1 : 1);
|
|
7906
|
-
|
|
7906
|
+
Nu(i, t, r, Math.max(n, Math.floor(r - v * I / x + k)), Math.min(l, Math.floor(r + (x - v) * I / x + k)), u);
|
|
7907
7907
|
}
|
|
7908
7908
|
const d = t[2 * r + u];
|
|
7909
7909
|
let f = n, g = l;
|
|
@@ -7921,7 +7921,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7921
7921
|
const n = i[t];
|
|
7922
7922
|
i[t] = i[r], i[r] = n;
|
|
7923
7923
|
}
|
|
7924
|
-
function
|
|
7924
|
+
function ju(i, t, r, n) {
|
|
7925
7925
|
const l = i - r, u = t - n;
|
|
7926
7926
|
return l * l + u * u;
|
|
7927
7927
|
}
|
|
@@ -8023,16 +8023,16 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8023
8023
|
}, C.K = function(i, t, r) {
|
|
8024
8024
|
var n = r[0], l = r[1], u = r[2];
|
|
8025
8025
|
return i[0] = t[0] * n, i[1] = t[1] * n, i[2] = t[2] * n, i[3] = t[3] * n, i[4] = t[4] * l, i[5] = t[5] * l, i[6] = t[6] * l, i[7] = t[7] * l, i[8] = t[8] * u, i[9] = t[9] * u, i[10] = t[10] * u, i[11] = t[11] * u, i[12] = t[12], i[13] = t[13], i[14] = t[14], i[15] = t[15], i;
|
|
8026
|
-
}, C.L =
|
|
8026
|
+
}, C.L = bh, C.M = function(i, t) {
|
|
8027
8027
|
const r = {};
|
|
8028
8028
|
for (let n = 0; n < t.length; n++) {
|
|
8029
8029
|
const l = t[n];
|
|
8030
8030
|
l in i && (r[l] = i[l]);
|
|
8031
8031
|
}
|
|
8032
8032
|
return r;
|
|
8033
|
-
}, C.N = Js, C.O =
|
|
8034
|
-
var r = i[0], n = i[1], l = i[2], u = i[3], d = i[4], f = i[5], g = i[6], x = i[7], v = i[8], w = i[9], I = i[10], k = i[11], z = i[12], E = i[13], F = i[14], j = i[15], Q = t[0], G = t[1], J = t[2], se = t[3], ue = t[4], Ie = t[5], Oe = t[6], Se = t[7], be = t[8], De = t[9], Ae = t[10], Me = t[11], oe = t[12],
|
|
8035
|
-
return Math.abs(r - Q) <= vi * Math.max(1, Math.abs(r), Math.abs(Q)) && Math.abs(n - G) <= vi * Math.max(1, Math.abs(n), Math.abs(G)) && Math.abs(l - J) <= vi * Math.max(1, Math.abs(l), Math.abs(J)) && Math.abs(u - se) <= vi * Math.max(1, Math.abs(u), Math.abs(se)) && Math.abs(d - ue) <= vi * Math.max(1, Math.abs(d), Math.abs(ue)) && Math.abs(f - Ie) <= vi * Math.max(1, Math.abs(f), Math.abs(Ie)) && Math.abs(g - Oe) <= vi * Math.max(1, Math.abs(g), Math.abs(Oe)) && Math.abs(x - Se) <= vi * Math.max(1, Math.abs(x), Math.abs(Se)) && Math.abs(v - be) <= vi * Math.max(1, Math.abs(v), Math.abs(be)) && Math.abs(w - De) <= vi * Math.max(1, Math.abs(w), Math.abs(De)) && Math.abs(I - Ae) <= vi * Math.max(1, Math.abs(I), Math.abs(Ae)) && Math.abs(k - Me) <= vi * Math.max(1, Math.abs(k), Math.abs(Me)) && Math.abs(z - oe) <= vi * Math.max(1, Math.abs(z), Math.abs(oe)) && Math.abs(E -
|
|
8033
|
+
}, C.N = Js, C.O = gu, C.P = he, C.Q = _u, C.R = rr, C.S = sr, C.T = da, C.U = Xt, C.V = Sr, C.W = Xr, C.X = Vt, C.Y = m, C.Z = Bo, C._ = p, C.a = Lr, C.a$ = function(i, t) {
|
|
8034
|
+
var r = i[0], n = i[1], l = i[2], u = i[3], d = i[4], f = i[5], g = i[6], x = i[7], v = i[8], w = i[9], I = i[10], k = i[11], z = i[12], E = i[13], F = i[14], j = i[15], Q = t[0], G = t[1], J = t[2], se = t[3], ue = t[4], Ie = t[5], Oe = t[6], Se = t[7], be = t[8], De = t[9], Ae = t[10], Me = t[11], oe = t[12], Re = t[13], Ee = t[14], Ue = t[15];
|
|
8035
|
+
return Math.abs(r - Q) <= vi * Math.max(1, Math.abs(r), Math.abs(Q)) && Math.abs(n - G) <= vi * Math.max(1, Math.abs(n), Math.abs(G)) && Math.abs(l - J) <= vi * Math.max(1, Math.abs(l), Math.abs(J)) && Math.abs(u - se) <= vi * Math.max(1, Math.abs(u), Math.abs(se)) && Math.abs(d - ue) <= vi * Math.max(1, Math.abs(d), Math.abs(ue)) && Math.abs(f - Ie) <= vi * Math.max(1, Math.abs(f), Math.abs(Ie)) && Math.abs(g - Oe) <= vi * Math.max(1, Math.abs(g), Math.abs(Oe)) && Math.abs(x - Se) <= vi * Math.max(1, Math.abs(x), Math.abs(Se)) && Math.abs(v - be) <= vi * Math.max(1, Math.abs(v), Math.abs(be)) && Math.abs(w - De) <= vi * Math.max(1, Math.abs(w), Math.abs(De)) && Math.abs(I - Ae) <= vi * Math.max(1, Math.abs(I), Math.abs(Ae)) && Math.abs(k - Me) <= vi * Math.max(1, Math.abs(k), Math.abs(Me)) && Math.abs(z - oe) <= vi * Math.max(1, Math.abs(z), Math.abs(oe)) && Math.abs(E - Re) <= vi * Math.max(1, Math.abs(E), Math.abs(Re)) && Math.abs(F - Ee) <= vi * Math.max(1, Math.abs(F), Math.abs(Ee)) && Math.abs(j - Ue) <= vi * Math.max(1, Math.abs(j), Math.abs(Ue));
|
|
8036
8036
|
}, C.a0 = tt, C.a1 = Wc, C.a2 = fe, C.a3 = (i) => {
|
|
8037
8037
|
const t = window.document.createElement("video");
|
|
8038
8038
|
return t.muted = !0, new Promise((r) => {
|
|
@@ -8046,7 +8046,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8046
8046
|
});
|
|
8047
8047
|
}, C.a4 = function() {
|
|
8048
8048
|
return Rn++;
|
|
8049
|
-
}, C.a5 = Te, C.a6 = ka, C.a7 = to, C.a8 = Cn, C.a9 =
|
|
8049
|
+
}, C.a5 = Te, C.a6 = ka, C.a7 = to, C.a8 = Cn, C.a9 = Su, C.aA = function(i) {
|
|
8050
8050
|
if (i.type === "custom") return new Tp(i);
|
|
8051
8051
|
switch (i.type) {
|
|
8052
8052
|
case "background":
|
|
@@ -8131,7 +8131,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8131
8131
|
break;
|
|
8132
8132
|
}
|
|
8133
8133
|
}
|
|
8134
|
-
}, C.aK =
|
|
8134
|
+
}, C.aK = hh, C.aL = uh, C.aM = dt, C.aN = class extends Mn {
|
|
8135
8135
|
constructor(i, t) {
|
|
8136
8136
|
super(i, t), this.current = [0, 0, 0];
|
|
8137
8137
|
}
|
|
@@ -8152,7 +8152,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8152
8152
|
}, C.aS = Yd, C.aT = class extends ee {
|
|
8153
8153
|
}, C.aU = Mc, C.aV = function(i) {
|
|
8154
8154
|
return i <= 1 ? 1 : Math.pow(2, Math.ceil(Math.log(i) / Math.LN2));
|
|
8155
|
-
}, C.aW =
|
|
8155
|
+
}, C.aW = Ph, C.aX = ti, C.aY = ir, C.aZ = class extends ze {
|
|
8156
8156
|
}, C.a_ = function(i, t) {
|
|
8157
8157
|
return i[0] === t[0] && i[1] === t[1] && i[2] === t[2] && i[3] === t[3] && i[4] === t[4] && i[5] === t[5] && i[6] === t[6] && i[7] === t[7] && i[8] === t[8] && i[9] === t[9] && i[10] === t[10] && i[11] === t[11] && i[12] === t[12] && i[13] === t[13] && i[14] === t[14] && i[15] === t[15];
|
|
8158
8158
|
}, C.aa = function(i) {
|
|
@@ -8190,7 +8190,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8190
8190
|
if (g === 0) return null;
|
|
8191
8191
|
const x = (f * (i.y - r.y) - d * (i.x - r.x)) / g;
|
|
8192
8192
|
return new he(i.x + x * u, i.y + x * l);
|
|
8193
|
-
}, C.al =
|
|
8193
|
+
}, C.al = Mu, C.am = mh, C.an = Tc, C.ao = function(i) {
|
|
8194
8194
|
let t = 1 / 0, r = 1 / 0, n = -1 / 0, l = -1 / 0;
|
|
8195
8195
|
for (const u of i) t = Math.min(t, u.x), r = Math.min(r, u.y), n = Math.max(n, u.x), l = Math.max(l, u.y);
|
|
8196
8196
|
return [t, r, n, l];
|
|
@@ -8219,13 +8219,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8219
8219
|
return i[0] = t[0] * r[0], i[1] = t[1] * r[1], i[2] = t[2] * r[2], i[3] = t[3] * r[3], i;
|
|
8220
8220
|
}, C.b2 = function(i, t) {
|
|
8221
8221
|
return i[0] * t[0] + i[1] * t[1] + i[2] * t[2] + i[3] * t[3];
|
|
8222
|
-
}, C.b3 = cr, C.b4 =
|
|
8222
|
+
}, C.b3 = cr, C.b4 = vu, C.b5 = yu, C.b6 = function(i, t, r, n, l) {
|
|
8223
8223
|
var u, d = 1 / Math.tan(t / 2);
|
|
8224
8224
|
return i[0] = d / r, i[1] = 0, i[2] = 0, i[3] = 0, i[4] = 0, i[5] = d, i[6] = 0, i[7] = 0, i[8] = 0, i[9] = 0, i[11] = -1, i[12] = 0, i[13] = 0, i[15] = 0, l != null && l !== 1 / 0 ? (i[10] = (l + n) * (u = 1 / (n - l)), i[14] = 2 * l * n * u) : (i[10] = -1, i[14] = -2 * n), i;
|
|
8225
8225
|
}, C.b7 = function(i, t, r) {
|
|
8226
8226
|
var n = Math.sin(r), l = Math.cos(r), u = t[4], d = t[5], f = t[6], g = t[7], x = t[8], v = t[9], w = t[10], I = t[11];
|
|
8227
8227
|
return t !== i && (i[0] = t[0], i[1] = t[1], i[2] = t[2], i[3] = t[3], i[12] = t[12], i[13] = t[13], i[14] = t[14], i[15] = t[15]), i[4] = u * l + x * n, i[5] = d * l + v * n, i[6] = f * l + w * n, i[7] = g * l + I * n, i[8] = x * l - u * n, i[9] = v * l - d * n, i[10] = w * l - f * n, i[11] = I * l - g * n, i;
|
|
8228
|
-
}, C.b8 = Mt, C.b9 = Gi, C.bA =
|
|
8228
|
+
}, C.b8 = Mt, C.b9 = Gi, C.bA = Gh, C.bB = function(i) {
|
|
8229
8229
|
return i.message === Hi;
|
|
8230
8230
|
}, C.bC = zs, C.bD = zi, C.ba = function(i) {
|
|
8231
8231
|
return i * Math.PI / 180;
|
|
@@ -8250,7 +8250,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8250
8250
|
const n = [];
|
|
8251
8251
|
for (const l in r) n.push(r[l]);
|
|
8252
8252
|
return n;
|
|
8253
|
-
}, C.bl = ke, C.bm =
|
|
8253
|
+
}, C.bl = ke, C.bm = wu, C.bn = Tu, C.bo = tu, C.bp = function(i) {
|
|
8254
8254
|
i.bucket.createArrays(), i.bucket.tilePixelRatio = Vt / (512 * i.bucket.overscaling), i.bucket.compareText = {}, i.bucket.iconsNeedLinear = !1;
|
|
8255
8255
|
const t = i.bucket.layers[0], r = t.layout, n = t._unevaluatedLayout._values, l = { layoutIconSize: n["icon-size"].possiblyEvaluate(new bt(i.bucket.zoom + 1), i.canonical), layoutTextSize: n["text-size"].possiblyEvaluate(new bt(i.bucket.zoom + 1), i.canonical), textMaxSize: n["text-size"].possiblyEvaluate(new bt(18)) };
|
|
8256
8256
|
if (i.bucket.textSizeData.kind === "composite") {
|
|
@@ -8266,10 +8266,10 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8266
8266
|
const v = r.get("text-font").evaluate(x, {}, i.canonical).join(","), w = g.evaluate(x, {}, i.canonical), I = l.layoutTextSize.evaluate(x, {}, i.canonical), k = l.layoutIconSize.evaluate(x, {}, i.canonical), z = { horizontal: {}, vertical: void 0 }, E = x.text;
|
|
8267
8267
|
let F, j = [0, 0];
|
|
8268
8268
|
if (E) {
|
|
8269
|
-
const J = E.toString(), se = r.get("text-letter-spacing").evaluate(x, {}, i.canonical) * Ut, ue = pc(J) ? se : 0, Ie = r.get("text-anchor").evaluate(x, {}, i.canonical), Oe =
|
|
8269
|
+
const J = E.toString(), se = r.get("text-letter-spacing").evaluate(x, {}, i.canonical) * Ut, ue = pc(J) ? se : 0, Ie = r.get("text-anchor").evaluate(x, {}, i.canonical), Oe = Bu(t, x, i.canonical);
|
|
8270
8270
|
if (!Oe) {
|
|
8271
8271
|
const Ae = r.get("text-radial-offset").evaluate(x, {}, i.canonical);
|
|
8272
|
-
j = Ae ?
|
|
8272
|
+
j = Ae ? Ru(Ie, [Ae * Ut, Kc]) : r.get("text-offset").evaluate(x, {}, i.canonical).map((Me) => Me * Ut);
|
|
8273
8273
|
}
|
|
8274
8274
|
let Se = d ? "center" : r.get("text-justify").evaluate(x, {}, i.canonical);
|
|
8275
8275
|
const be = r.get("symbol-placement") === "point" ? r.get("text-max-width").evaluate(x, {}, i.canonical) * Ut : 1 / 0, De = () => {
|
|
@@ -8282,8 +8282,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8282
8282
|
let Me = !1;
|
|
8283
8283
|
for (const oe of Ae) if (!z.horizontal[oe]) if (Me) z.horizontal[oe] = z.horizontal[0];
|
|
8284
8284
|
else {
|
|
8285
|
-
const
|
|
8286
|
-
|
|
8285
|
+
const Re = Bl(E, i.glyphMap, i.glyphPositions, i.imagePositions, v, be, u, "center", oe, ue, j, C.ah.horizontal, !1, I, w);
|
|
8286
|
+
Re && (z.horizontal[oe] = Re, Me = Re.positionedLines.length === 1);
|
|
8287
8287
|
}
|
|
8288
8288
|
De();
|
|
8289
8289
|
} else {
|
|
@@ -8297,7 +8297,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8297
8297
|
const J = i.imageMap[x.icon.name];
|
|
8298
8298
|
J && (F = gp(i.imagePositions[x.icon.name], r.get("icon-offset").evaluate(x, {}, i.canonical), r.get("icon-anchor").evaluate(x, {}, i.canonical)), Q = !!J.sdf, i.bucket.sdfIcons === void 0 ? i.bucket.sdfIcons = Q : i.bucket.sdfIcons !== Q && Yt("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"), (J.pixelRatio !== i.bucket.pixelRatio || r.get("icon-rotate").constantOr(1) !== 0) && (i.bucket.iconsNeedLinear = !0));
|
|
8299
8299
|
}
|
|
8300
|
-
const G =
|
|
8300
|
+
const G = Ou(z.horizontal) || z.vertical;
|
|
8301
8301
|
i.bucket.iconsInText = !!G && G.iconsInText, (G || F) && Ep(i.bucket, x, z, F, i.imageMap, l, I, k, j, Q, i.canonical);
|
|
8302
8302
|
}
|
|
8303
8303
|
i.showCollisionBoxes && i.bucket.generateCollisionDebugBuffers();
|
|
@@ -8323,7 +8323,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8323
8323
|
return mi.clearRect(0, 0, v, w), I.data;
|
|
8324
8324
|
}(i, t, r, n, l);
|
|
8325
8325
|
});
|
|
8326
|
-
}, C.bx =
|
|
8326
|
+
}, C.bx = bu, C.by = ht, C.bz = Bt, C.c = gs, C.d = (i) => p(void 0, void 0, void 0, function* () {
|
|
8327
8327
|
if (i.byteLength === 0) return createImageBitmap(new ImageData(1, 1));
|
|
8328
8328
|
const t = new Blob([new Uint8Array(i)], { type: "image/png" });
|
|
8329
8329
|
try {
|
|
@@ -8342,10 +8342,10 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8342
8342
|
n.src = i.byteLength ? URL.createObjectURL(l) : Fn;
|
|
8343
8343
|
}), C.g = dr, C.h = (i, t) => Wr(Bi(i, { type: "json" }), t), C.i = Tr, C.j = Br, C.k = Rr, C.l = (i, t) => Wr(Bi(i, { type: "arrayBuffer" }), t), C.m = Wr, C.n = function(i) {
|
|
8344
8344
|
return new Fc(i).readFields(cp, []);
|
|
8345
|
-
}, C.o = Po, C.p =
|
|
8345
|
+
}, C.o = Po, C.p = eu, C.q = h, C.r = uc, C.s = Kr, C.t = fo, C.u = cs, C.v = re, C.w = Yt, C.x = function([i, t, r]) {
|
|
8346
8346
|
return t += 90, t *= Math.PI / 180, r *= Math.PI / 180, { x: i * Math.cos(t) * Math.sin(r), y: i * Math.sin(t) * Math.sin(r), z: i * Math.cos(r) };
|
|
8347
8347
|
}, C.y = _i, C.z = bt;
|
|
8348
|
-
}),
|
|
8348
|
+
}), Ge("worker", ["./shared"], function(C) {
|
|
8349
8349
|
class p {
|
|
8350
8350
|
constructor(M) {
|
|
8351
8351
|
this.keyCache = {}, M && this.replace(M);
|
|
@@ -8382,8 +8382,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8382
8382
|
for (const ce in q) {
|
|
8383
8383
|
const ie = q[+ce];
|
|
8384
8384
|
if (!ie || ie.bitmap.width === 0 || ie.bitmap.height === 0) continue;
|
|
8385
|
-
const
|
|
8386
|
-
L.push(
|
|
8385
|
+
const ge = { x: 0, y: 0, w: ie.bitmap.width + 2, h: ie.bitmap.height + 2 };
|
|
8386
|
+
L.push(ge), ne[ce] = { rect: ge, metrics: ie.metrics };
|
|
8387
8387
|
}
|
|
8388
8388
|
}
|
|
8389
8389
|
const { w: O, h: H } = C.p(L), W = new C.o({ width: O || 1, height: H || 1 });
|
|
@@ -8410,45 +8410,45 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8410
8410
|
const H = new C.bm(Object.keys(M.layers).sort()), W = new C.bn(this.tileID, this.promoteId);
|
|
8411
8411
|
W.bucketLayerIDs = [];
|
|
8412
8412
|
const Y = {}, q = { featureIndex: W, iconDependencies: {}, patternDependencies: {}, glyphDependencies: {}, availableImages: L }, ne = P.familiesBySource[this.source];
|
|
8413
|
-
for (const
|
|
8414
|
-
const ut = M.layers[
|
|
8413
|
+
for (const We in ne) {
|
|
8414
|
+
const ut = M.layers[We];
|
|
8415
8415
|
if (!ut) continue;
|
|
8416
|
-
ut.version === 1 && C.w(`Vector tile source "${this.source}" layer "${
|
|
8417
|
-
const Pt = H.encode(
|
|
8416
|
+
ut.version === 1 && C.w(`Vector tile source "${this.source}" layer "${We}" does not use vector tile spec v2 and therefore may have some rendering errors.`);
|
|
8417
|
+
const Pt = H.encode(We), qt = [];
|
|
8418
8418
|
for (let Wt = 0; Wt < ut.length; Wt++) {
|
|
8419
|
-
const ci = ut.feature(Wt), vs = W.getId(ci,
|
|
8419
|
+
const ci = ut.feature(Wt), vs = W.getId(ci, We);
|
|
8420
8420
|
qt.push({ feature: ci, id: vs, index: Wt, sourceLayerIndex: Pt });
|
|
8421
8421
|
}
|
|
8422
|
-
for (const Wt of ne[
|
|
8422
|
+
for (const Wt of ne[We]) {
|
|
8423
8423
|
const ci = Wt[0];
|
|
8424
8424
|
ci.source !== this.source && C.w(`layer.source = ${ci.source} does not equal this.source = ${this.source}`), ci.minzoom && this.zoom < Math.floor(ci.minzoom) || ci.maxzoom && this.zoom >= ci.maxzoom || ci.visibility !== "none" && (_t(Wt, this.zoom, L), (Y[ci.id] = ci.createBucket({ index: W.bucketLayerIDs.length, layers: Wt, zoom: this.zoom, pixelRatio: this.pixelRatio, overscaling: this.overscaling, collisionBoxArray: this.collisionBoxArray, sourceLayerIndex: Pt, sourceID: this.source })).populate(qt, q, this.tileID.canonical), W.bucketLayerIDs.push(Wt.map((vs) => vs.id)));
|
|
8425
8425
|
}
|
|
8426
8426
|
}
|
|
8427
|
-
const ce = C.aF(q.glyphDependencies, (
|
|
8428
|
-
this.inFlightDependencies.forEach((
|
|
8427
|
+
const ce = C.aF(q.glyphDependencies, (We) => Object.keys(We).map(Number));
|
|
8428
|
+
this.inFlightDependencies.forEach((We) => We == null ? void 0 : We.abort()), this.inFlightDependencies = [];
|
|
8429
8429
|
let ie = Promise.resolve({});
|
|
8430
8430
|
if (Object.keys(ce).length) {
|
|
8431
|
-
const
|
|
8432
|
-
this.inFlightDependencies.push(
|
|
8431
|
+
const We = new AbortController();
|
|
8432
|
+
this.inFlightDependencies.push(We), ie = O.sendAsync({ type: "GG", data: { stacks: ce, source: this.source, tileID: this.tileID, type: "glyphs" } }, We);
|
|
8433
8433
|
}
|
|
8434
|
-
const
|
|
8435
|
-
let
|
|
8436
|
-
if (
|
|
8437
|
-
const
|
|
8438
|
-
this.inFlightDependencies.push(
|
|
8434
|
+
const ge = Object.keys(q.iconDependencies);
|
|
8435
|
+
let Be = Promise.resolve({});
|
|
8436
|
+
if (ge.length) {
|
|
8437
|
+
const We = new AbortController();
|
|
8438
|
+
this.inFlightDependencies.push(We), Be = O.sendAsync({ type: "GI", data: { icons: ge, source: this.source, tileID: this.tileID, type: "icons" } }, We);
|
|
8439
8439
|
}
|
|
8440
|
-
const
|
|
8440
|
+
const Fe = Object.keys(q.patternDependencies);
|
|
8441
8441
|
let it = Promise.resolve({});
|
|
8442
|
-
if (
|
|
8443
|
-
const
|
|
8444
|
-
this.inFlightDependencies.push(
|
|
8442
|
+
if (Fe.length) {
|
|
8443
|
+
const We = new AbortController();
|
|
8444
|
+
this.inFlightDependencies.push(We), it = O.sendAsync({ type: "GI", data: { icons: Fe, source: this.source, tileID: this.tileID, type: "patterns" } }, We);
|
|
8445
8445
|
}
|
|
8446
|
-
const [
|
|
8447
|
-
for (const
|
|
8448
|
-
const ut = Y[
|
|
8449
|
-
ut instanceof C.a6 ? (_t(ut.layers, this.zoom, L), C.bp({ bucket: ut, glyphMap:
|
|
8446
|
+
const [Ze, rt, Ye] = yield Promise.all([ie, Be, it]), Ft = new ht(Ze), At = new C.bo(rt, Ye);
|
|
8447
|
+
for (const We in Y) {
|
|
8448
|
+
const ut = Y[We];
|
|
8449
|
+
ut instanceof C.a6 ? (_t(ut.layers, this.zoom, L), C.bp({ bucket: ut, glyphMap: Ze, glyphPositions: Ft.positions, imageMap: rt, imagePositions: At.iconPositions, showCollisionBoxes: this.showCollisionBoxes, canonical: this.tileID.canonical })) : ut.hasPattern && (ut instanceof C.bq || ut instanceof C.br || ut instanceof C.bs) && (_t(ut.layers, this.zoom, L), ut.addFeatures(q, this.tileID.canonical, At.patternPositions));
|
|
8450
8450
|
}
|
|
8451
|
-
return this.status = "done", { buckets: Object.values(Y).filter((
|
|
8451
|
+
return this.status = "done", { buckets: Object.values(Y).filter((We) => !We.isEmpty()), featureIndex: W, collisionBoxArray: this.collisionBoxArray, glyphAtlasImage: Ft.image, imageAtlas: At, glyphMap: this.returnDependencies ? Ze : null, iconMap: this.returnDependencies ? rt : null, glyphPositions: this.returnDependencies ? Ft.positions : null };
|
|
8452
8452
|
});
|
|
8453
8453
|
}
|
|
8454
8454
|
}
|
|
@@ -8537,8 +8537,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8537
8537
|
}
|
|
8538
8538
|
loadTile(M) {
|
|
8539
8539
|
return C._(this, void 0, void 0, function* () {
|
|
8540
|
-
const { uid: P, encoding: L, rawImageData: O, redFactor: H, greenFactor: W, blueFactor: Y, baseShift: q } = M, ne = O.width + 2, ce = O.height + 2, ie = C.b(O) ? new C.R({ width: ne, height: ce }, yield C.bw(O, -1, -1, ne, ce)) : O,
|
|
8541
|
-
return this.loaded = this.loaded || {}, this.loaded[P] =
|
|
8540
|
+
const { uid: P, encoding: L, rawImageData: O, redFactor: H, greenFactor: W, blueFactor: Y, baseShift: q } = M, ne = O.width + 2, ce = O.height + 2, ie = C.b(O) ? new C.R({ width: ne, height: ce }, yield C.bw(O, -1, -1, ne, ce)) : O, ge = new C.bx(P, ie, L, H, W, Y, q);
|
|
8541
|
+
return this.loaded = this.loaded || {}, this.loaded[P] = ge, ge;
|
|
8542
8542
|
});
|
|
8543
8543
|
}
|
|
8544
8544
|
removeTile(M) {
|
|
@@ -8623,8 +8623,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8623
8623
|
ne === void 0 && (L.push(Y), H[Y] = ne = L.length - 1), M.writeVarint(ne);
|
|
8624
8624
|
var ce = typeof q;
|
|
8625
8625
|
ce !== "string" && ce !== "boolean" && ce !== "number" && (q = JSON.stringify(q));
|
|
8626
|
-
var ie = ce + ":" + q,
|
|
8627
|
-
|
|
8626
|
+
var ie = ce + ":" + q, ge = W[ie];
|
|
8627
|
+
ge === void 0 && (O.push(q), W[ie] = ge = O.length - 1), M.writeVarint(ge);
|
|
8628
8628
|
}
|
|
8629
8629
|
}
|
|
8630
8630
|
}
|
|
@@ -8640,8 +8640,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8640
8640
|
L === 1 && (ne = q.length), M.writeVarint(Yt(1, ne));
|
|
8641
8641
|
for (var ce = L === 3 ? q.length - 1 : q.length, ie = 0; ie < ce; ie++) {
|
|
8642
8642
|
ie === 1 && L !== 1 && M.writeVarint(Yt(2, ce - 1));
|
|
8643
|
-
var
|
|
8644
|
-
M.writeVarint(oi(
|
|
8643
|
+
var ge = q[ie].x - O, Be = q[ie].y - H;
|
|
8644
|
+
M.writeVarint(oi(ge)), M.writeVarint(oi(Be)), O += ge, H += Be;
|
|
8645
8645
|
}
|
|
8646
8646
|
L === 3 && M.writeVarint(Yt(7, 1));
|
|
8647
8647
|
}
|
|
@@ -8673,8 +8673,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8673
8673
|
for (let q = 0; q < M.length; q++) {
|
|
8674
8674
|
const ne = M[q];
|
|
8675
8675
|
if (!ne.geometry) continue;
|
|
8676
|
-
const [ce, ie] = ne.geometry.coordinates,
|
|
8677
|
-
W.push(
|
|
8676
|
+
const [ce, ie] = ne.geometry.coordinates, ge = Xr(Pi(ce)), Be = Xr(Xi(ie));
|
|
8677
|
+
W.push(ge, Be, 1 / 0, q, -1, 1), this.options.reduce && W.push(0);
|
|
8678
8678
|
}
|
|
8679
8679
|
let Y = this.trees[O + 1] = this._createTree(W);
|
|
8680
8680
|
P && console.timeEnd(H);
|
|
@@ -8691,13 +8691,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8691
8691
|
const W = Math.max(-90, Math.min(90, M[3]));
|
|
8692
8692
|
if (M[2] - M[0] >= 360) L = -180, H = 180;
|
|
8693
8693
|
else if (L > H) {
|
|
8694
|
-
const ie = this.getClusters([L, O, 180, W], P),
|
|
8695
|
-
return ie.concat(
|
|
8694
|
+
const ie = this.getClusters([L, O, 180, W], P), ge = this.getClusters([-180, O, H, W], P);
|
|
8695
|
+
return ie.concat(ge);
|
|
8696
8696
|
}
|
|
8697
8697
|
const Y = this.trees[this._limitZoom(P)], q = Y.range(Pi(L), Xi(W), Pi(H), Xi(O)), ne = Y.data, ce = [];
|
|
8698
8698
|
for (const ie of q) {
|
|
8699
|
-
const
|
|
8700
|
-
ce.push(ne[
|
|
8699
|
+
const ge = this.stride * ie;
|
|
8700
|
+
ce.push(ne[ge + Hi] > 1 ? dr(ne, ge, this.clusterProps) : this.points[ne[ge + mi]]);
|
|
8701
8701
|
}
|
|
8702
8702
|
return ce;
|
|
8703
8703
|
}
|
|
@@ -8747,17 +8747,17 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8747
8747
|
_addTileFeatures(M, P, L, O, H, W) {
|
|
8748
8748
|
for (const Y of M) {
|
|
8749
8749
|
const q = Y * this.stride, ne = P[q + Hi] > 1;
|
|
8750
|
-
let ce, ie,
|
|
8751
|
-
if (ne) ce = _s(P, q, this.clusterProps), ie = P[q],
|
|
8750
|
+
let ce, ie, ge;
|
|
8751
|
+
if (ne) ce = _s(P, q, this.clusterProps), ie = P[q], ge = P[q + 1];
|
|
8752
8752
|
else {
|
|
8753
8753
|
const it = this.points[P[q + mi]];
|
|
8754
8754
|
ce = it.properties;
|
|
8755
|
-
const [
|
|
8756
|
-
ie = Pi(
|
|
8755
|
+
const [Ze, rt] = it.geometry.coordinates;
|
|
8756
|
+
ie = Pi(Ze), ge = Xi(rt);
|
|
8757
8757
|
}
|
|
8758
|
-
const
|
|
8759
|
-
let
|
|
8760
|
-
|
|
8758
|
+
const Be = { type: 1, geometry: [[Math.round(this.options.extent * (ie * H - L)), Math.round(this.options.extent * (ge * H - O))]], tags: ce };
|
|
8759
|
+
let Fe;
|
|
8760
|
+
Fe = ne || this.options.generateId ? P[q + mi] : this.points[P[q + mi]].id, Fe !== void 0 && (Be.id = Fe), W.features.push(Be);
|
|
8761
8761
|
}
|
|
8762
8762
|
}
|
|
8763
8763
|
_limitZoom(M) {
|
|
@@ -8768,26 +8768,26 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8768
8768
|
for (let ie = 0; ie < q.length; ie += ce) {
|
|
8769
8769
|
if (q[ie + 2] <= P) continue;
|
|
8770
8770
|
q[ie + 2] = P;
|
|
8771
|
-
const
|
|
8772
|
-
let
|
|
8773
|
-
for (const rt of
|
|
8771
|
+
const ge = q[ie], Be = q[ie + 1], Fe = M.within(q[ie], q[ie + 1], Y), it = q[ie + Hi];
|
|
8772
|
+
let Ze = it;
|
|
8773
|
+
for (const rt of Fe) {
|
|
8774
8774
|
const Ye = rt * ce;
|
|
8775
|
-
q[Ye + 2] > P && (
|
|
8775
|
+
q[Ye + 2] > P && (Ze += q[Ye + Hi]);
|
|
8776
8776
|
}
|
|
8777
|
-
if (
|
|
8778
|
-
let rt, Ye =
|
|
8779
|
-
const
|
|
8780
|
-
for (const ut of
|
|
8777
|
+
if (Ze > it && Ze >= W) {
|
|
8778
|
+
let rt, Ye = ge * it, Ft = Be * it, At = -1;
|
|
8779
|
+
const We = ((ie / ce | 0) << 5) + (P + 1) + this.points.length;
|
|
8780
|
+
for (const ut of Fe) {
|
|
8781
8781
|
const Pt = ut * ce;
|
|
8782
8782
|
if (q[Pt + 2] <= P) continue;
|
|
8783
8783
|
q[Pt + 2] = P;
|
|
8784
8784
|
const qt = q[Pt + Hi];
|
|
8785
|
-
Ye += q[Pt] * qt, Ft += q[Pt + 1] * qt, q[Pt + 4] =
|
|
8785
|
+
Ye += q[Pt] * qt, Ft += q[Pt + 1] * qt, q[Pt + 4] = We, H && (rt || (rt = this._map(q, ie, !0), At = this.clusterProps.length, this.clusterProps.push(rt)), H(rt, this._map(q, Pt)));
|
|
8786
8786
|
}
|
|
8787
|
-
q[ie + 4] =
|
|
8787
|
+
q[ie + 4] = We, ne.push(Ye / Ze, Ft / Ze, 1 / 0, We, -1, Ze), H && ne.push(At);
|
|
8788
8788
|
} else {
|
|
8789
8789
|
for (let rt = 0; rt < ce; rt++) ne.push(q[ie + rt]);
|
|
8790
|
-
if (
|
|
8790
|
+
if (Ze > 1) for (const rt of Fe) {
|
|
8791
8791
|
const Ye = rt * ce;
|
|
8792
8792
|
if (!(q[Ye + 2] <= P)) {
|
|
8793
8793
|
q[Ye + 2] = P;
|
|
@@ -8837,12 +8837,12 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8837
8837
|
const H = M + (P - M >> 1);
|
|
8838
8838
|
let W, Y = P - M;
|
|
8839
8839
|
const q = N[M], ne = N[M + 1], ce = N[P], ie = N[P + 1];
|
|
8840
|
-
for (let
|
|
8841
|
-
const
|
|
8842
|
-
if (
|
|
8843
|
-
else if (
|
|
8844
|
-
const
|
|
8845
|
-
|
|
8840
|
+
for (let ge = M + 3; ge < P; ge += 3) {
|
|
8841
|
+
const Be = rn(N[ge], N[ge + 1], q, ne, ce, ie);
|
|
8842
|
+
if (Be > O) W = ge, O = Be;
|
|
8843
|
+
else if (Be === O) {
|
|
8844
|
+
const Fe = Math.abs(ge - H);
|
|
8845
|
+
Fe < Y && (W = ge, Y = Fe);
|
|
8846
8846
|
}
|
|
8847
8847
|
}
|
|
8848
8848
|
O > L && (W - M > 3 && Kr(N, M, W, L), N[W + 2] = O, P - W > 3 && Kr(N, W, P, L));
|
|
@@ -8929,27 +8929,27 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8929
8929
|
for (const ne of N) {
|
|
8930
8930
|
const ce = ne.geometry;
|
|
8931
8931
|
let ie = ne.type;
|
|
8932
|
-
const
|
|
8933
|
-
if (
|
|
8932
|
+
const ge = O === 0 ? ne.minX : ne.minY, Be = O === 0 ? ne.maxX : ne.maxY;
|
|
8933
|
+
if (ge >= P && Be < L) {
|
|
8934
8934
|
q.push(ne);
|
|
8935
8935
|
continue;
|
|
8936
8936
|
}
|
|
8937
|
-
if (
|
|
8938
|
-
let
|
|
8939
|
-
if (ie === "Point" || ie === "MultiPoint") nn(ce,
|
|
8940
|
-
else if (ie === "LineString") Fr(ce,
|
|
8941
|
-
else if (ie === "MultiLineString") xs(ce,
|
|
8942
|
-
else if (ie === "Polygon") xs(ce,
|
|
8937
|
+
if (Be < P || ge >= L) continue;
|
|
8938
|
+
let Fe = [];
|
|
8939
|
+
if (ie === "Point" || ie === "MultiPoint") nn(ce, Fe, P, L, O);
|
|
8940
|
+
else if (ie === "LineString") Fr(ce, Fe, P, L, O, !1, Y.lineMetrics);
|
|
8941
|
+
else if (ie === "MultiLineString") xs(ce, Fe, P, L, O, !1);
|
|
8942
|
+
else if (ie === "Polygon") xs(ce, Fe, P, L, O, !0);
|
|
8943
8943
|
else if (ie === "MultiPolygon") for (const it of ce) {
|
|
8944
|
-
const
|
|
8945
|
-
xs(it,
|
|
8944
|
+
const Ze = [];
|
|
8945
|
+
xs(it, Ze, P, L, O, !0), Ze.length && Fe.push(Ze);
|
|
8946
8946
|
}
|
|
8947
|
-
if (
|
|
8947
|
+
if (Fe.length) {
|
|
8948
8948
|
if (Y.lineMetrics && ie === "LineString") {
|
|
8949
|
-
for (const it of
|
|
8949
|
+
for (const it of Fe) q.push(Pr(ne.id, ie, it, ne.tags));
|
|
8950
8950
|
continue;
|
|
8951
8951
|
}
|
|
8952
|
-
ie !== "LineString" && ie !== "MultiLineString" || (
|
|
8952
|
+
ie !== "LineString" && ie !== "MultiLineString" || (Fe.length === 1 ? (ie = "LineString", Fe = Fe[0]) : ie = "MultiLineString"), ie !== "Point" && ie !== "MultiPoint" || (ie = Fe.length === 3 ? "Point" : "MultiPoint"), q.push(Pr(ne.id, ie, Fe, ne.tags));
|
|
8953
8953
|
}
|
|
8954
8954
|
}
|
|
8955
8955
|
return q.length ? q : null;
|
|
@@ -8964,14 +8964,14 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8964
8964
|
let Y = Mr(N);
|
|
8965
8965
|
const q = O === 0 ? an : on;
|
|
8966
8966
|
let ne, ce, ie = N.start;
|
|
8967
|
-
for (let
|
|
8968
|
-
const rt = N[
|
|
8967
|
+
for (let Ze = 0; Ze < N.length - 3; Ze += 3) {
|
|
8968
|
+
const rt = N[Ze], Ye = N[Ze + 1], Ft = N[Ze + 2], At = N[Ze + 3], We = N[Ze + 4], ut = O === 0 ? rt : Ye, Pt = O === 0 ? At : We;
|
|
8969
8969
|
let qt = !1;
|
|
8970
|
-
W && (ne = Math.sqrt(Math.pow(rt - At, 2) + Math.pow(Ye -
|
|
8970
|
+
W && (ne = Math.sqrt(Math.pow(rt - At, 2) + Math.pow(Ye - We, 2))), ut < P ? Pt > P && (ce = q(Y, rt, Ye, At, We, P), W && (Y.start = ie + ne * ce)) : ut > L ? Pt < L && (ce = q(Y, rt, Ye, At, We, L), W && (Y.start = ie + ne * ce)) : Fi(Y, rt, Ye, Ft), Pt < P && ut >= P && (ce = q(Y, rt, Ye, At, We, P), qt = !0), Pt > L && ut <= L && (ce = q(Y, rt, Ye, At, We, L), qt = !0), !H && qt && (W && (Y.end = ie + ne * ce), M.push(Y), Y = Mr(N)), W && (ie += ne);
|
|
8971
8971
|
}
|
|
8972
|
-
let
|
|
8973
|
-
const
|
|
8974
|
-
it >= P && it <= L && Fi(Y,
|
|
8972
|
+
let ge = N.length - 3;
|
|
8973
|
+
const Be = N[ge], Fe = N[ge + 1], it = O === 0 ? Be : Fe;
|
|
8974
|
+
it >= P && it <= L && Fi(Y, Be, Fe, N[ge + 2]), ge = Y.length - 3, H && ge >= 3 && (Y[ge] !== Y[0] || Y[ge + 1] !== Y[1]) && Fi(Y, Y[0], Y[1], Y[2]), Y.length && M.push(Y);
|
|
8975
8975
|
}
|
|
8976
8976
|
function Mr(N) {
|
|
8977
8977
|
const M = [];
|
|
@@ -9043,11 +9043,11 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
9043
9043
|
function xe(N, M, P, L) {
|
|
9044
9044
|
const O = M.geometry, H = M.type, W = [];
|
|
9045
9045
|
if (N.minX = Math.min(N.minX, M.minX), N.minY = Math.min(N.minY, M.minY), N.maxX = Math.max(N.maxX, M.maxX), N.maxY = Math.max(N.maxY, M.maxY), H === "Point" || H === "MultiPoint") for (let Y = 0; Y < O.length; Y += 3) W.push(O[Y], O[Y + 1]), N.numPoints++, N.numSimplified++;
|
|
9046
|
-
else if (H === "LineString")
|
|
9047
|
-
else if (H === "MultiLineString" || H === "Polygon") for (let Y = 0; Y < O.length; Y++)
|
|
9046
|
+
else if (H === "LineString") Xe(W, O, N, P, !1, !1);
|
|
9047
|
+
else if (H === "MultiLineString" || H === "Polygon") for (let Y = 0; Y < O.length; Y++) Xe(W, O[Y], N, P, H === "Polygon", Y === 0);
|
|
9048
9048
|
else if (H === "MultiPolygon") for (let Y = 0; Y < O.length; Y++) {
|
|
9049
9049
|
const q = O[Y];
|
|
9050
|
-
for (let ne = 0; ne < q.length; ne++)
|
|
9050
|
+
for (let ne = 0; ne < q.length; ne++) Xe(W, q[ne], N, P, !0, ne === 0);
|
|
9051
9051
|
}
|
|
9052
9052
|
if (W.length) {
|
|
9053
9053
|
let Y = M.tags || null;
|
|
@@ -9060,17 +9060,17 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
9060
9060
|
M.id !== null && (q.id = M.id), N.features.push(q);
|
|
9061
9061
|
}
|
|
9062
9062
|
}
|
|
9063
|
-
function
|
|
9063
|
+
function Xe(N, M, P, L, O, H) {
|
|
9064
9064
|
const W = L * L;
|
|
9065
9065
|
if (L > 0 && M.size < (O ? W : L)) return void (P.numPoints += M.length / 3);
|
|
9066
9066
|
const Y = [];
|
|
9067
9067
|
for (let q = 0; q < M.length; q += 3) (L === 0 || M[q + 2] > W) && (P.numSimplified++, Y.push(M[q], M[q + 1])), P.numPoints++;
|
|
9068
9068
|
O && function(q, ne) {
|
|
9069
9069
|
let ce = 0;
|
|
9070
|
-
for (let ie = 0,
|
|
9071
|
-
if (ce > 0 === ne) for (let ie = 0,
|
|
9072
|
-
const
|
|
9073
|
-
q[ie] = q[
|
|
9070
|
+
for (let ie = 0, ge = q.length, Be = ge - 2; ie < ge; Be = ie, ie += 2) ce += (q[ie] - q[Be]) * (q[ie + 1] + q[Be + 1]);
|
|
9071
|
+
if (ce > 0 === ne) for (let ie = 0, ge = q.length; ie < ge / 2; ie += 2) {
|
|
9072
|
+
const Be = q[ie], Fe = q[ie + 1];
|
|
9073
|
+
q[ie] = q[ge - 2 - ie], q[ie + 1] = q[ge - 1 - ie], q[ge - 2 - ie] = Be, q[ge - 1 - ie] = Fe;
|
|
9074
9074
|
}
|
|
9075
9075
|
}(Y, H), N.push(Y);
|
|
9076
9076
|
}
|
|
@@ -9100,15 +9100,15 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
9100
9100
|
const q = [M, P, L, O], ne = this.options, ce = ne.debug;
|
|
9101
9101
|
for (; q.length; ) {
|
|
9102
9102
|
O = q.pop(), L = q.pop(), P = q.pop(), M = q.pop();
|
|
9103
|
-
const ie = 1 << P,
|
|
9104
|
-
let
|
|
9105
|
-
if (!
|
|
9106
|
-
ce > 1 && (console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)", P, L, O,
|
|
9103
|
+
const ie = 1 << P, ge = Wi(P, L, O);
|
|
9104
|
+
let Be = this.tiles[ge];
|
|
9105
|
+
if (!Be && (ce > 1 && console.time("creation"), Be = this.tiles[ge] = Or(M, P, L, O, ne), this.tileCoords.push({ z: P, x: L, y: O }), ce)) {
|
|
9106
|
+
ce > 1 && (console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)", P, L, O, Be.numFeatures, Be.numPoints, Be.numSimplified), console.timeEnd("creation"));
|
|
9107
9107
|
const qt = `z${P}`;
|
|
9108
9108
|
this.stats[qt] = (this.stats[qt] || 0) + 1, this.total++;
|
|
9109
9109
|
}
|
|
9110
|
-
if (
|
|
9111
|
-
if (P === ne.indexMaxZoom ||
|
|
9110
|
+
if (Be.source = M, H == null) {
|
|
9111
|
+
if (P === ne.indexMaxZoom || Be.numPoints <= ne.indexMaxPoints) continue;
|
|
9112
9112
|
} else {
|
|
9113
9113
|
if (P === ne.maxZoom || P === H) continue;
|
|
9114
9114
|
if (H != null) {
|
|
@@ -9116,11 +9116,11 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
9116
9116
|
if (L !== W >> qt || O !== Y >> qt) continue;
|
|
9117
9117
|
}
|
|
9118
9118
|
}
|
|
9119
|
-
if (
|
|
9119
|
+
if (Be.source = null, M.length === 0) continue;
|
|
9120
9120
|
ce > 1 && console.time("clipping");
|
|
9121
|
-
const
|
|
9122
|
-
let Ye = null, Ft = null, At = null,
|
|
9123
|
-
M = null, ut && (Ye = kt(ut, ie, O -
|
|
9121
|
+
const Fe = 0.5 * ne.buffer / ne.extent, it = 0.5 - Fe, Ze = 0.5 + Fe, rt = 1 + Fe;
|
|
9122
|
+
let Ye = null, Ft = null, At = null, We = null, ut = kt(M, ie, L - Fe, L + Ze, 0, Be.minX, Be.maxX, ne), Pt = kt(M, ie, L + it, L + rt, 0, Be.minX, Be.maxX, ne);
|
|
9123
|
+
M = null, ut && (Ye = kt(ut, ie, O - Fe, O + Ze, 1, Be.minY, Be.maxY, ne), Ft = kt(ut, ie, O + it, O + rt, 1, Be.minY, Be.maxY, ne), ut = null), Pt && (At = kt(Pt, ie, O - Fe, O + Ze, 1, Be.minY, Be.maxY, ne), We = kt(Pt, ie, O + it, O + rt, 1, Be.minY, Be.maxY, ne), Pt = null), ce > 1 && console.timeEnd("clipping"), q.push(Ye || [], P + 1, 2 * L, 2 * O), q.push(Ft || [], P + 1, 2 * L, 2 * O + 1), q.push(At || [], P + 1, 2 * L + 1, 2 * O), q.push(We || [], P + 1, 2 * L + 1, 2 * O + 1);
|
|
9124
9124
|
}
|
|
9125
9125
|
}
|
|
9126
9126
|
getTile(M, P, L) {
|
|
@@ -9130,24 +9130,24 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
9130
9130
|
const Y = 1 << M, q = Wi(M, P = P + Y & Y - 1, L);
|
|
9131
9131
|
if (this.tiles[q]) return li(this.tiles[q], H);
|
|
9132
9132
|
W > 1 && console.log("drilling down to z%d-%d-%d", M, P, L);
|
|
9133
|
-
let ne, ce = M, ie = P,
|
|
9134
|
-
for (; !ne && ce > 0; ) ce--, ie >>= 1,
|
|
9135
|
-
return ne && ne.source ? (W > 1 && (console.log("found parent tile z%d-%d-%d", ce, ie,
|
|
9133
|
+
let ne, ce = M, ie = P, ge = L;
|
|
9134
|
+
for (; !ne && ce > 0; ) ce--, ie >>= 1, ge >>= 1, ne = this.tiles[Wi(ce, ie, ge)];
|
|
9135
|
+
return ne && ne.source ? (W > 1 && (console.log("found parent tile z%d-%d-%d", ce, ie, ge), console.time("drilling down")), this.splitTile(ne.source, ce, ie, ge, M, P, L), W > 1 && console.timeEnd("drilling down"), this.tiles[q] ? li(this.tiles[q], H) : null) : null;
|
|
9136
9136
|
}
|
|
9137
9137
|
}
|
|
9138
9138
|
function Wi(N, M, P) {
|
|
9139
9139
|
return 32 * ((1 << N) * P + M) + N;
|
|
9140
9140
|
}
|
|
9141
|
-
function
|
|
9141
|
+
function qe(N, M) {
|
|
9142
9142
|
return M ? N.properties[M] : N.id;
|
|
9143
9143
|
}
|
|
9144
9144
|
function mr(N, M) {
|
|
9145
9145
|
if (N == null) return !0;
|
|
9146
|
-
if (N.type === "Feature") return
|
|
9146
|
+
if (N.type === "Feature") return qe(N, M) != null;
|
|
9147
9147
|
if (N.type === "FeatureCollection") {
|
|
9148
9148
|
const P = /* @__PURE__ */ new Set();
|
|
9149
9149
|
for (const L of N.features) {
|
|
9150
|
-
const O =
|
|
9150
|
+
const O = qe(L, M);
|
|
9151
9151
|
if (O == null || P.has(O)) return !1;
|
|
9152
9152
|
P.add(O);
|
|
9153
9153
|
}
|
|
@@ -9157,8 +9157,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
9157
9157
|
}
|
|
9158
9158
|
function kr(N, M) {
|
|
9159
9159
|
const P = /* @__PURE__ */ new Map();
|
|
9160
|
-
if (N != null) if (N.type === "Feature") P.set(
|
|
9161
|
-
else for (const L of N.features) P.set(
|
|
9160
|
+
if (N != null) if (N.type === "Feature") P.set(qe(N, M), N);
|
|
9161
|
+
else for (const L of N.features) P.set(qe(L, M), L);
|
|
9162
9162
|
return P;
|
|
9163
9163
|
}
|
|
9164
9164
|
class Vr extends he {
|
|
@@ -9215,19 +9215,19 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
9215
9215
|
try {
|
|
9216
9216
|
this._pendingData = this.loadAndProcessGeoJSON(M, this._pendingRequest), this._geoJSONIndex = M.cluster ? new Lr(function({ superclusterOptions: W, clusterProperties: Y }) {
|
|
9217
9217
|
if (!Y || !W) return W;
|
|
9218
|
-
const q = {}, ne = {}, ce = { accumulated: null, zoom: 0 }, ie = { properties: null },
|
|
9219
|
-
for (const
|
|
9220
|
-
const [
|
|
9221
|
-
q[
|
|
9218
|
+
const q = {}, ne = {}, ce = { accumulated: null, zoom: 0 }, ie = { properties: null }, ge = Object.keys(Y);
|
|
9219
|
+
for (const Be of ge) {
|
|
9220
|
+
const [Fe, it] = Y[Be], Ze = C.bC(it), rt = C.bC(typeof Fe == "string" ? [Fe, ["accumulated"], ["get", Be]] : Fe);
|
|
9221
|
+
q[Be] = Ze.value, ne[Be] = rt.value;
|
|
9222
9222
|
}
|
|
9223
|
-
return W.map = (
|
|
9224
|
-
ie.properties = Re;
|
|
9225
|
-
const Be = {};
|
|
9226
|
-
for (const it of me) Be[it] = q[it].evaluate(ce, ie);
|
|
9227
|
-
return Be;
|
|
9228
|
-
}, W.reduce = (Re, Be) => {
|
|
9223
|
+
return W.map = (Be) => {
|
|
9229
9224
|
ie.properties = Be;
|
|
9230
|
-
|
|
9225
|
+
const Fe = {};
|
|
9226
|
+
for (const it of ge) Fe[it] = q[it].evaluate(ce, ie);
|
|
9227
|
+
return Fe;
|
|
9228
|
+
}, W.reduce = (Be, Fe) => {
|
|
9229
|
+
ie.properties = Fe;
|
|
9230
|
+
for (const it of ge) ce.accumulated = Be[it], Be[it] = ne[it].evaluate(ce, ie);
|
|
9231
9231
|
}, W;
|
|
9232
9232
|
}(M)).load((yield this._pendingData).features) : (O = yield this._pendingData, new gi(O, M.geojsonVtOptions)), this.loaded = {};
|
|
9233
9233
|
const H = {};
|
|
@@ -9283,16 +9283,16 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
9283
9283
|
var Y, q, ne, ce;
|
|
9284
9284
|
if (H.removeAll && O.clear(), H.remove) for (const ie of H.remove) O.delete(ie);
|
|
9285
9285
|
if (H.add) for (const ie of H.add) {
|
|
9286
|
-
const
|
|
9287
|
-
|
|
9286
|
+
const ge = qe(ie, W);
|
|
9287
|
+
ge != null && O.set(ge, ie);
|
|
9288
9288
|
}
|
|
9289
9289
|
if (H.update) for (const ie of H.update) {
|
|
9290
|
-
let
|
|
9291
|
-
if (
|
|
9292
|
-
const
|
|
9293
|
-
if ((ie.newGeometry || ie.removeAllProperties ||
|
|
9294
|
-
else if (((ne = ie.removeProperties) === null || ne === void 0 ? void 0 : ne.length) > 0) for (const
|
|
9295
|
-
if (((ce = ie.addOrUpdateProperties) === null || ce === void 0 ? void 0 : ce.length) > 0) for (const { key:
|
|
9290
|
+
let ge = O.get(ie.id);
|
|
9291
|
+
if (ge == null) continue;
|
|
9292
|
+
const Be = !ie.removeAllProperties && (((Y = ie.removeProperties) === null || Y === void 0 ? void 0 : Y.length) > 0 || ((q = ie.addOrUpdateProperties) === null || q === void 0 ? void 0 : q.length) > 0);
|
|
9293
|
+
if ((ie.newGeometry || ie.removeAllProperties || Be) && (ge = Object.assign({}, ge), O.set(ie.id, ge), Be && (ge.properties = Object.assign({}, ge.properties))), ie.newGeometry && (ge.geometry = ie.newGeometry), ie.removeAllProperties) ge.properties = {};
|
|
9294
|
+
else if (((ne = ie.removeProperties) === null || ne === void 0 ? void 0 : ne.length) > 0) for (const Fe of ie.removeProperties) Object.prototype.hasOwnProperty.call(ge.properties, Fe) && delete ge.properties[Fe];
|
|
9295
|
+
if (((ce = ie.addOrUpdateProperties) === null || ce === void 0 ? void 0 : ce.length) > 0) for (const { key: Fe, value: it } of ie.addOrUpdateProperties) ge.properties[Fe] = it;
|
|
9296
9296
|
}
|
|
9297
9297
|
}(this._dataUpdateable, M.dataDiff, L), { type: "FeatureCollection", features: Array.from(this._dataUpdateable.values()) };
|
|
9298
9298
|
});
|
|
@@ -9394,7 +9394,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
9394
9394
|
}
|
|
9395
9395
|
}
|
|
9396
9396
|
return C.i(self) && (self.worker = new gr(self)), gr;
|
|
9397
|
-
}),
|
|
9397
|
+
}), Ge("index", ["exports", "./shared"], function(C, p) {
|
|
9398
9398
|
var ht = "4.7.1";
|
|
9399
9399
|
let Bt, _t;
|
|
9400
9400
|
const he = { now: typeof performance < "u" && performance && performance.now ? performance.now.bind(performance) : Date.now.bind(Date), frameAsync: (h) => new Promise((e, s) => {
|
|
@@ -10908,7 +10908,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
10908
10908
|
for (const a of s) this.remove(a.value.tileID, a);
|
|
10909
10909
|
}
|
|
10910
10910
|
}
|
|
10911
|
-
class
|
|
10911
|
+
class Xe {
|
|
10912
10912
|
constructor() {
|
|
10913
10913
|
this.state = {}, this.stateChanges = {}, this.deletedStates = {};
|
|
10914
10914
|
}
|
|
@@ -10975,7 +10975,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
10975
10975
|
const y = new (on(c.type))(o, c, m, _);
|
|
10976
10976
|
if (y.id !== o) throw new Error(`Expected Source id to be ${o} instead of ${y.id}`);
|
|
10977
10977
|
return y;
|
|
10978
|
-
})(e, s, a, this), this._tiles = {}, this._cache = new xe(0, (o) => this._unloadTile(o)), this._timers = {}, this._cacheTimers = {}, this._maxTileCacheSize = null, this._maxTileCacheZoomLevels = null, this._loadedParentTiles = {}, this._coveredTiles = {}, this._state = new
|
|
10978
|
+
})(e, s, a, this), this._tiles = {}, this._cache = new xe(0, (o) => this._unloadTile(o)), this._timers = {}, this._cacheTimers = {}, this._maxTileCacheSize = null, this._maxTileCacheZoomLevels = null, this._loadedParentTiles = {}, this._coveredTiles = {}, this._state = new Xe(), this._didEmitContent = !1, this._updated = !1;
|
|
10979
10979
|
}
|
|
10980
10980
|
onAdd(e) {
|
|
10981
10981
|
this.map = e, this._maxTileCacheSize = e ? e._maxTileCacheSize : null, this._maxTileCacheZoomLevels = e ? e._maxTileCacheZoomLevels : null, this._source && this._source.onAdd && this._source.onAdd(e);
|
|
@@ -11334,7 +11334,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11334
11334
|
return h === "raster" || h === "image" || h === "video";
|
|
11335
11335
|
}
|
|
11336
11336
|
Ne.maxOverzooming = 10, Ne.maxUnderzooming = 3;
|
|
11337
|
-
class
|
|
11337
|
+
class qe {
|
|
11338
11338
|
constructor(e, s) {
|
|
11339
11339
|
this.reset(e, s);
|
|
11340
11340
|
}
|
|
@@ -11503,24 +11503,24 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11503
11503
|
for (let le = 0; le < X.length; le++) {
|
|
11504
11504
|
const pe = X.get(le);
|
|
11505
11505
|
if (pe.hidden || pe.writingMode === p.ah.vertical && !ee) {
|
|
11506
|
-
|
|
11506
|
+
Fe(pe.numGlyphs, Z);
|
|
11507
11507
|
continue;
|
|
11508
11508
|
}
|
|
11509
11509
|
ee = !1;
|
|
11510
11510
|
const we = N(pe.anchorX, pe.anchorY, e, R);
|
|
11511
11511
|
if (!P(we.point, $)) {
|
|
11512
|
-
|
|
11512
|
+
Fe(pe.numGlyphs, Z);
|
|
11513
11513
|
continue;
|
|
11514
11514
|
}
|
|
11515
|
-
const Pe = M(s.transform.cameraToCenterDistance, we.signedDistanceFromCamera),
|
|
11516
|
-
ee =
|
|
11515
|
+
const Pe = M(s.transform.cameraToCenterDistance, we.signedDistanceFromCamera), ye = p.ai(V, U, pe), _e = m ? ye / Pe : ye * Pe, ze = { getElevation: R, labelPlaneMatrix: o, lineVertexArray: B, pitchWithMap: m, projectionCache: { projections: {}, offsets: {}, cachedAnchorPoint: void 0, anyProjectionOccluded: !1 }, projection: b, tileAnchorPoint: new p.P(pe.anchorX, pe.anchorY), unwrappedTileID: S, width: T, height: A, translation: D }, $e = W(ze, pe, _e, !1, _, e, c, h.glyphOffsetArray, Z, K, y);
|
|
11516
|
+
ee = $e.useVertical, ($e.notEnoughRoom || ee || $e.needsFlipping && W(ze, pe, _e, !0, _, e, c, h.glyphOffsetArray, Z, K, y).notEnoughRoom) && Fe(pe.numGlyphs, Z);
|
|
11517
11517
|
}
|
|
11518
11518
|
a ? h.text.dynamicLayoutVertexBuffer.updateData(Z) : h.icon.dynamicLayoutVertexBuffer.updateData(Z);
|
|
11519
11519
|
}
|
|
11520
11520
|
function O(h, e, s, a, o, c, m, _) {
|
|
11521
|
-
const y = c.glyphStartIndex + c.numGlyphs, b = c.lineStartIndex, S = c.lineStartIndex + c.lineLength, T = e.getoffsetX(c.glyphStartIndex), A = e.getoffsetX(y - 1), D =
|
|
11521
|
+
const y = c.glyphStartIndex + c.numGlyphs, b = c.lineStartIndex, S = c.lineStartIndex + c.lineLength, T = e.getoffsetX(c.glyphStartIndex), A = e.getoffsetX(y - 1), D = ge(h * T, s, a, o, c.segment, b, S, _, m);
|
|
11522
11522
|
if (!D) return null;
|
|
11523
|
-
const R =
|
|
11523
|
+
const R = ge(h * A, s, a, o, c.segment, b, S, _, m);
|
|
11524
11524
|
return R ? _.projectionCache.anyProjectionOccluded ? null : { first: D, last: R } : null;
|
|
11525
11525
|
}
|
|
11526
11526
|
function H(h, e, s, a) {
|
|
@@ -11538,16 +11538,16 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11538
11538
|
if (K) return K;
|
|
11539
11539
|
}
|
|
11540
11540
|
R = [Z.first];
|
|
11541
|
-
for (let K = e.glyphStartIndex + 1; K < V - 1; K++) R.push(
|
|
11541
|
+
for (let K = e.glyphStartIndex + 1; K < V - 1; K++) R.push(ge(T * _.getoffsetX(K), A, D, a, e.segment, U, $, h, S));
|
|
11542
11542
|
R.push(Z.last);
|
|
11543
11543
|
} else {
|
|
11544
11544
|
if (o && !a) {
|
|
11545
|
-
const U = N(h.tileAnchorPoint.x, h.tileAnchorPoint.y, c, h.getElevation).point, $ = e.lineStartIndex + e.segment + 1, Z = new p.P(h.lineVertexArray.getx($), h.lineVertexArray.gety($)), B = N(Z.x, Z.y, c, h.getElevation), X = B.signedDistanceFromCamera > 0 ? B.point : function(ee, le, pe, we, Pe,
|
|
11546
|
-
return Y(ee, le, pe, 1, Pe,
|
|
11545
|
+
const U = N(h.tileAnchorPoint.x, h.tileAnchorPoint.y, c, h.getElevation).point, $ = e.lineStartIndex + e.segment + 1, Z = new p.P(h.lineVertexArray.getx($), h.lineVertexArray.gety($)), B = N(Z.x, Z.y, c, h.getElevation), X = B.signedDistanceFromCamera > 0 ? B.point : function(ee, le, pe, we, Pe, ye) {
|
|
11546
|
+
return Y(ee, le, pe, 1, Pe, ye);
|
|
11547
11547
|
}(h.tileAnchorPoint, Z, U, 0, c, h), K = H(e.writingMode, U, X, b);
|
|
11548
11548
|
if (K) return K;
|
|
11549
11549
|
}
|
|
11550
|
-
const V =
|
|
11550
|
+
const V = ge(T * _.getoffsetX(e.glyphStartIndex), A, D, a, e.segment, e.lineStartIndex, e.lineStartIndex + e.lineLength, h, S);
|
|
11551
11551
|
if (!V || h.projectionCache.anyProjectionOccluded) return { notEnoughRoom: !0 };
|
|
11552
11552
|
R = [V];
|
|
11553
11553
|
}
|
|
@@ -11583,7 +11583,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11583
11583
|
const S = q(h + y.direction, _, y), T = ce(S.sub(s), m, y.direction), A = s.add(T), D = S.add(T);
|
|
11584
11584
|
return _.projectionCache.offsets[h] = p.ak(c, b, A, D) || b, _.projectionCache.offsets[h];
|
|
11585
11585
|
}
|
|
11586
|
-
function
|
|
11586
|
+
function ge(h, e, s, a, o, c, m, _, y) {
|
|
11587
11587
|
const b = a ? h - e : h + e;
|
|
11588
11588
|
let S = b > 0 ? 1 : -1, T = 0;
|
|
11589
11589
|
a && (S *= -1, T = Math.PI), S < 0 && (T += Math.PI);
|
|
@@ -11599,29 +11599,29 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11599
11599
|
if (U = q(D, _, we), s === 0) K.push($), ee = U.sub($);
|
|
11600
11600
|
else {
|
|
11601
11601
|
let Pe;
|
|
11602
|
-
const
|
|
11603
|
-
Pe =
|
|
11602
|
+
const ye = U.sub($);
|
|
11603
|
+
Pe = ye.mag() === 0 ? ce(q(D + S, _, we).sub(U), s, S) : ce(ye, s, S), V || (V = $.add(Pe)), R = ie(D, Pe, U, c, m, V, s, _, we), K.push(V), ee = R.sub(V);
|
|
11604
11604
|
}
|
|
11605
11605
|
B = ee.mag();
|
|
11606
11606
|
}
|
|
11607
11607
|
const le = ee._mult((X - Z) / B)._add(V || $), pe = T + Math.atan2(U.y - $.y, U.x - $.x);
|
|
11608
11608
|
return K.push(le), { point: le, angle: y ? pe : 0, path: K };
|
|
11609
11609
|
}
|
|
11610
|
-
const
|
|
11611
|
-
function
|
|
11610
|
+
const Be = new Float32Array([-1 / 0, -1 / 0, 0, -1 / 0, -1 / 0, 0, -1 / 0, -1 / 0, 0, -1 / 0, -1 / 0, 0]);
|
|
11611
|
+
function Fe(h, e) {
|
|
11612
11612
|
for (let s = 0; s < h; s++) {
|
|
11613
11613
|
const a = e.length;
|
|
11614
|
-
e.resize(a + 4), e.float32.set(
|
|
11614
|
+
e.resize(a + 4), e.float32.set(Be, 3 * a);
|
|
11615
11615
|
}
|
|
11616
11616
|
}
|
|
11617
11617
|
function it(h, e, s) {
|
|
11618
11618
|
const a = e[0], o = e[1];
|
|
11619
11619
|
return h[0] = s[0] * a + s[4] * o + s[12], h[1] = s[1] * a + s[5] * o + s[13], h[3] = s[3] * a + s[7] * o + s[15], h;
|
|
11620
11620
|
}
|
|
11621
|
-
const
|
|
11621
|
+
const Ze = 100;
|
|
11622
11622
|
class rt {
|
|
11623
11623
|
constructor(e, s, a = new kr(e.width + 200, e.height + 200, 25), o = new kr(e.width + 200, e.height + 200, 25)) {
|
|
11624
|
-
this.transform = e, this.mapProjection = s, this.grid = a, this.ignoredGrid = o, this.pitchFactor = Math.cos(e._pitch) * e.cameraToCenterDistance, this.screenRightBoundary = e.width +
|
|
11624
|
+
this.transform = e, this.mapProjection = s, this.grid = a, this.ignoredGrid = o, this.pitchFactor = Math.cos(e._pitch) * e.cameraToCenterDistance, this.screenRightBoundary = e.width + Ze, this.screenBottomBoundary = e.height + Ze, this.gridRightBoundary = e.width + 200, this.gridBottomBoundary = e.height + 200, this.perspectiveRatioCutoff = 0.6;
|
|
11625
11625
|
}
|
|
11626
11626
|
placeCollisionBox(e, s, a, o, c, m, _, y, b, S, T) {
|
|
11627
11627
|
const A = e.anchorPointX + y[0], D = e.anchorPointY + y[1], R = this.projectAndGetPerspectiveRatio(o, A, D, c, S), V = a * R.perspectiveRatio;
|
|
@@ -11638,27 +11638,27 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11638
11638
|
const $ = [], Z = new p.P(s.anchorX, s.anchorY), B = this.getPerspectiveRatio(m, Z.x, Z.y, _, U), X = (T ? c / B : c * B) / p.ap, K = { getElevation: U, labelPlaneMatrix: y, lineVertexArray: a, pitchWithMap: T, projectionCache: { projections: {}, offsets: {}, cachedAnchorPoint: void 0, anyProjectionOccluded: !1 }, projection: this.mapProjection, tileAnchorPoint: Z, unwrappedTileID: _, width: this.transform.width, height: this.transform.height, translation: V }, ee = O(X, o, s.lineOffsetX * X, s.lineOffsetY * X, !1, s, !1, K);
|
|
11639
11639
|
let le = !1, pe = !1, we = !0;
|
|
11640
11640
|
if (ee) {
|
|
11641
|
-
const Pe = 0.5 * D * B + R,
|
|
11641
|
+
const Pe = 0.5 * D * B + R, ye = new p.P(-100, -100), _e = new p.P(this.screenRightBoundary, this.screenBottomBoundary), ze = new qe(), $e = ee.first, ve = ee.last;
|
|
11642
11642
|
let Te = [];
|
|
11643
|
-
for (let
|
|
11644
|
-
for (let
|
|
11643
|
+
for (let He = $e.path.length - 1; He >= 1; He--) Te.push($e.path[He]);
|
|
11644
|
+
for (let He = 1; He < ve.path.length; He++) Te.push(ve.path[He]);
|
|
11645
11645
|
const je = 2.5 * Pe;
|
|
11646
11646
|
if (b) {
|
|
11647
|
-
const
|
|
11648
|
-
Te =
|
|
11647
|
+
const He = this.projectPathToScreenSpace(Te, K, b);
|
|
11648
|
+
Te = He.some((Qe) => Qe.signedDistanceFromCamera <= 0) ? [] : He.map((Qe) => Qe.point);
|
|
11649
11649
|
}
|
|
11650
11650
|
let wt = [];
|
|
11651
11651
|
if (Te.length > 0) {
|
|
11652
|
-
const
|
|
11653
|
-
for (let St = 1; St < Te.length; St++)
|
|
11654
|
-
wt =
|
|
11652
|
+
const He = Te[0].clone(), Qe = Te[0].clone();
|
|
11653
|
+
for (let St = 1; St < Te.length; St++) He.x = Math.min(He.x, Te[St].x), He.y = Math.min(He.y, Te[St].y), Qe.x = Math.max(Qe.x, Te[St].x), Qe.y = Math.max(Qe.y, Te[St].y);
|
|
11654
|
+
wt = He.x >= ye.x && Qe.x <= _e.x && He.y >= ye.y && Qe.y <= _e.y ? [Te] : Qe.x < ye.x || He.x > _e.x || Qe.y < ye.y || He.y > _e.y ? [] : p.al([Te], ye.x, ye.y, _e.x, _e.y);
|
|
11655
11655
|
}
|
|
11656
|
-
for (const
|
|
11657
|
-
ze.reset(
|
|
11656
|
+
for (const He of wt) {
|
|
11657
|
+
ze.reset(He, 0.25 * Pe);
|
|
11658
11658
|
let Qe = 0;
|
|
11659
11659
|
Qe = ze.length <= 0.5 * Pe ? 1 : Math.ceil(ze.paddedLength / je) + 1;
|
|
11660
11660
|
for (let St = 0; St < Qe; St++) {
|
|
11661
|
-
const ei = St / Math.max(Qe - 1, 1), tr = ze.lerp(ei), Tt = tr.x +
|
|
11661
|
+
const ei = St / Math.max(Qe - 1, 1), tr = ze.lerp(ei), Tt = tr.x + Ze, xi = tr.y + Ze;
|
|
11662
11662
|
$.push(Tt, xi, Pe, 0);
|
|
11663
11663
|
const hi = Tt - Pe, ti = xi - Pe, ui = Tt + Pe, vr = xi + Pe;
|
|
11664
11664
|
if (we = we && this.isOffscreen(hi, ti, ui, vr), pe = pe || this.isInsideGrid(hi, ti, ui, vr), e !== "always" && this.grid.hitTestCircle(Tt, xi, Pe, e, A) && (le = !0, !S)) return { circles: [], offscreen: !1, collisionDetected: le };
|
|
@@ -11675,7 +11675,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11675
11675
|
const s = [];
|
|
11676
11676
|
let a = 1 / 0, o = 1 / 0, c = -1 / 0, m = -1 / 0;
|
|
11677
11677
|
for (const S of e) {
|
|
11678
|
-
const T = new p.P(S.x +
|
|
11678
|
+
const T = new p.P(S.x + Ze, S.y + Ze);
|
|
11679
11679
|
a = Math.min(a, T.x), o = Math.min(o, T.y), c = Math.max(c, T.x), m = Math.max(m, T.y), s.push(T);
|
|
11680
11680
|
}
|
|
11681
11681
|
const _ = this.grid.query(a, o, c, m).concat(this.ignoredGrid.query(a, o, c, m)), y = {}, b = {};
|
|
@@ -11698,14 +11698,14 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11698
11698
|
let m;
|
|
11699
11699
|
c ? (m = [s, a, c(s, a), 1], p.af(m, m, e)) : (m = [s, a, 0, 1], it(m, m, e));
|
|
11700
11700
|
const _ = m[3];
|
|
11701
|
-
return { point: new p.P((m[0] / _ + 1) / 2 * this.transform.width +
|
|
11701
|
+
return { point: new p.P((m[0] / _ + 1) / 2 * this.transform.width + Ze, (-m[1] / _ + 1) / 2 * this.transform.height + Ze), perspectiveRatio: 0.5 + this.transform.cameraToCenterDistance / _ * 0.5, isOccluded: !1, signedDistanceFromCamera: _ };
|
|
11702
11702
|
}
|
|
11703
11703
|
getPerspectiveRatio(e, s, a, o, c) {
|
|
11704
11704
|
const m = this.mapProjection.useSpecialProjectionForSymbols ? this.mapProjection.projectTileCoordinates(s, a, o, c) : N(s, a, e, c);
|
|
11705
11705
|
return 0.5 + this.transform.cameraToCenterDistance / m.signedDistanceFromCamera * 0.5;
|
|
11706
11706
|
}
|
|
11707
11707
|
isOffscreen(e, s, a, o) {
|
|
11708
|
-
return a <
|
|
11708
|
+
return a < Ze || e >= this.screenRightBoundary || o < Ze || s > this.screenBottomBoundary;
|
|
11709
11709
|
}
|
|
11710
11710
|
isInsideGrid(e, s, a, o) {
|
|
11711
11711
|
return a >= 0 && e < this.gridRightBoundary && o >= 0 && s < this.gridBottomBoundary;
|
|
@@ -11718,11 +11718,11 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11718
11718
|
let T = new p.P(1, 0), A = new p.P(0, 1);
|
|
11719
11719
|
const D = new p.P(e.anchorPointX + _[0], e.anchorPointY + _[1]);
|
|
11720
11720
|
if (m && !c) {
|
|
11721
|
-
const we = this.projectAndGetPerspectiveRatio(a, D.x + 1, D.y, o, b).point.sub(y.point).unit(), Pe = Math.atan(we.y / we.x) + (we.x < 0 ? Math.PI : 0),
|
|
11722
|
-
T = new p.P(
|
|
11721
|
+
const we = this.projectAndGetPerspectiveRatio(a, D.x + 1, D.y, o, b).point.sub(y.point).unit(), Pe = Math.atan(we.y / we.x) + (we.x < 0 ? Math.PI : 0), ye = Math.sin(Pe), _e = Math.cos(Pe);
|
|
11722
|
+
T = new p.P(_e, ye), A = new p.P(-ye, _e);
|
|
11723
11723
|
} else if (!m && c) {
|
|
11724
|
-
const we = -this.transform.angle, Pe = Math.sin(we),
|
|
11725
|
-
T = new p.P(
|
|
11724
|
+
const we = -this.transform.angle, Pe = Math.sin(we), ye = Math.cos(we);
|
|
11725
|
+
T = new p.P(ye, Pe), A = new p.P(-Pe, ye);
|
|
11726
11726
|
}
|
|
11727
11727
|
let R = y.point, V = s;
|
|
11728
11728
|
if (c) {
|
|
@@ -11761,7 +11761,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11761
11761
|
return this.text.isHidden() && this.icon.isHidden();
|
|
11762
11762
|
}
|
|
11763
11763
|
}
|
|
11764
|
-
class
|
|
11764
|
+
class We {
|
|
11765
11765
|
constructor(e, s, a) {
|
|
11766
11766
|
this.text = e, this.icon = s, this.skipFade = a;
|
|
11767
11767
|
}
|
|
@@ -11827,12 +11827,12 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11827
11827
|
}
|
|
11828
11828
|
}
|
|
11829
11829
|
placeLayerBucketPart(e, s, a) {
|
|
11830
|
-
const { bucket: o, layout: c, translationText: m, translationIcon: _, posMatrix: y, unwrappedTileID: b, textLabelPlaneMatrix: S, labelToScreenMatrix: T, textPixelRatio: A, holdingForFade: D, collisionBoxArray: R, partiallyEvaluatedTextSize: V, collisionGroup: U } = e.parameters, $ = c.get("text-optional"), Z = c.get("icon-optional"), B = p.ar(c, "text-overlap", "text-allow-overlap"), X = B === "always", K = p.ar(c, "icon-overlap", "icon-allow-overlap"), ee = K === "always", le = c.get("text-rotation-alignment") === "map", pe = c.get("text-pitch-alignment") === "map", we = c.get("icon-text-fit") !== "none", Pe = c.get("symbol-z-order") === "viewport-y",
|
|
11830
|
+
const { bucket: o, layout: c, translationText: m, translationIcon: _, posMatrix: y, unwrappedTileID: b, textLabelPlaneMatrix: S, labelToScreenMatrix: T, textPixelRatio: A, holdingForFade: D, collisionBoxArray: R, partiallyEvaluatedTextSize: V, collisionGroup: U } = e.parameters, $ = c.get("text-optional"), Z = c.get("icon-optional"), B = p.ar(c, "text-overlap", "text-allow-overlap"), X = B === "always", K = p.ar(c, "icon-overlap", "icon-allow-overlap"), ee = K === "always", le = c.get("text-rotation-alignment") === "map", pe = c.get("text-pitch-alignment") === "map", we = c.get("icon-text-fit") !== "none", Pe = c.get("symbol-z-order") === "viewport-y", ye = X && (ee || !o.hasIconData() || Z), _e = ee && (X || !o.hasTextData() || $);
|
|
11831
11831
|
!o.collisionArrays && R && o.deserializeCollisionBoxes(R);
|
|
11832
|
-
const ze = this._getTerrainElevationFunc(this.retainedQueryData[o.bucketInstanceId].tileID),
|
|
11833
|
-
var wt,
|
|
11832
|
+
const ze = this._getTerrainElevationFunc(this.retainedQueryData[o.bucketInstanceId].tileID), $e = (ve, Te, je) => {
|
|
11833
|
+
var wt, He;
|
|
11834
11834
|
if (s[ve.crossTileID]) return;
|
|
11835
|
-
if (D) return void (this.placements[ve.crossTileID] = new
|
|
11835
|
+
if (D) return void (this.placements[ve.crossTileID] = new We(!1, !1, !1));
|
|
11836
11836
|
let Qe = !1, St = !1, ei = !0, tr = null, Tt = { box: null, placeable: !1, offscreen: null }, xi = { box: null, placeable: !1, offscreen: null }, hi = null, ti = null, ui = null, vr = 0, Us = 0, ma = 0;
|
|
11837
11837
|
Te.textFeatureIndex ? vr = Te.textFeatureIndex : ve.useRuntimeCollisionCircles && (vr = ve.featureIndex), Te.verticalTextFeatureIndex && (Us = Te.verticalTextFeatureIndex);
|
|
11838
11838
|
const $s = Te.textBox;
|
|
@@ -11859,7 +11859,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11859
11859
|
return o.allowVerticalPlacement && ve.numVerticalGlyphVertices > 0 && ii ? Kt(ii, p.ah.vertical) : { box: null, offscreen: null };
|
|
11860
11860
|
}), $i(Tt && Tt.placeable);
|
|
11861
11861
|
} else {
|
|
11862
|
-
let Kt = p.aq[(
|
|
11862
|
+
let Kt = p.aq[(He = (wt = this.prevPlacement) === null || wt === void 0 ? void 0 : wt.variableOffsets[ve.crossTileID]) === null || He === void 0 ? void 0 : He.anchor];
|
|
11863
11863
|
const ii = (tt, hs, qs) => {
|
|
11864
11864
|
const Zs = tt.x2 - tt.x1, Sl = tt.y2 - tt.y1, yc = ve.textBoxScale, Tl = we && K === "never" ? hs : null;
|
|
11865
11865
|
let $r = null, Il = B === "never" ? 1 : 2, _a = "never";
|
|
@@ -11899,16 +11899,16 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11899
11899
|
const wo = St && ui.placeable;
|
|
11900
11900
|
if (Qe && hi.placeable && this.collisionIndex.insertCollisionBox(hi.box, B, c.get("text-ignore-placement"), o.bucketInstanceId, xi && xi.placeable && Us ? Us : vr, U.ID), wo && this.collisionIndex.insertCollisionBox(ui.box, K, c.get("icon-ignore-placement"), o.bucketInstanceId, ma, U.ID), ti && Qe && this.collisionIndex.insertCollisionCircles(ti.circles, B, c.get("text-ignore-placement"), o.bucketInstanceId, vr, U.ID), a && this.storeCollisionData(o.bucketInstanceId, je, Te, hi, ui, ti), ve.crossTileID === 0) throw new Error("symbolInstance.crossTileID can't be 0");
|
|
11901
11901
|
if (o.bucketInstanceId === 0) throw new Error("bucket.bucketInstanceId can't be 0");
|
|
11902
|
-
this.placements[ve.crossTileID] = new
|
|
11902
|
+
this.placements[ve.crossTileID] = new We(Qe || ye, St || _e, ei || o.justReloaded), s[ve.crossTileID] = !0;
|
|
11903
11903
|
};
|
|
11904
11904
|
if (Pe) {
|
|
11905
11905
|
if (e.symbolInstanceStart !== 0) throw new Error("bucket.bucketInstanceId should be 0");
|
|
11906
11906
|
const ve = o.getSortedSymbolIndexes(this.transform.angle);
|
|
11907
11907
|
for (let Te = ve.length - 1; Te >= 0; --Te) {
|
|
11908
11908
|
const je = ve[Te];
|
|
11909
|
-
|
|
11909
|
+
$e(o.symbolInstances.get(je), o.collisionArrays[je], je);
|
|
11910
11910
|
}
|
|
11911
|
-
} else for (let ve = e.symbolInstanceStart; ve < e.symbolInstanceEnd; ve++)
|
|
11911
|
+
} else for (let ve = e.symbolInstanceStart; ve < e.symbolInstanceEnd; ve++) $e(o.symbolInstances.get(ve), o.collisionArrays[ve], ve);
|
|
11912
11912
|
if (a && o.bucketInstanceId in this.collisionCircleArrays) {
|
|
11913
11913
|
const ve = this.collisionCircleArrays[o.bucketInstanceId];
|
|
11914
11914
|
p.as(ve.invProjMatrix, y), ve.viewportMatrix = this.collisionIndex.getViewportMatrix();
|
|
@@ -11980,41 +11980,41 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11980
11980
|
a[K] ? ee = _ : ee || (ee = R, this.opacities[K] = ee), a[K] = !0;
|
|
11981
11981
|
const le = Z.numIconVertices > 0, pe = this.placedOrientations[Z.crossTileID], we = pe === p.ah.vertical, Pe = pe === p.ah.horizontal || pe === p.ah.horizontalOnly;
|
|
11982
11982
|
if (B > 0 || X > 0) {
|
|
11983
|
-
const
|
|
11984
|
-
V(e.text, B, we ? bs :
|
|
11983
|
+
const _e = Ai(ee.text);
|
|
11984
|
+
V(e.text, B, we ? bs : _e), V(e.text, X, Pe ? bs : _e);
|
|
11985
11985
|
const ze = ee.text.isHidden();
|
|
11986
11986
|
[Z.rightJustifiedTextSymbolIndex, Z.centerJustifiedTextSymbolIndex, Z.leftJustifiedTextSymbolIndex].forEach((Te) => {
|
|
11987
11987
|
Te >= 0 && (e.text.placedSymbolArray.get(Te).hidden = ze || we ? 1 : 0);
|
|
11988
11988
|
}), Z.verticalPlacedTextSymbolIndex >= 0 && (e.text.placedSymbolArray.get(Z.verticalPlacedTextSymbolIndex).hidden = ze || Pe ? 1 : 0);
|
|
11989
|
-
const
|
|
11990
|
-
|
|
11989
|
+
const $e = this.variableOffsets[Z.crossTileID];
|
|
11990
|
+
$e && this.markUsedJustification(e, $e.anchor, Z, pe);
|
|
11991
11991
|
const ve = this.placedOrientations[Z.crossTileID];
|
|
11992
11992
|
ve && (this.markUsedJustification(e, "left", Z, ve), this.markUsedOrientation(e, ve, Z));
|
|
11993
11993
|
}
|
|
11994
11994
|
if (le) {
|
|
11995
|
-
const
|
|
11996
|
-
Z.placedIconSymbolIndex >= 0 && (V(e.icon, Z.numIconVertices, ze ?
|
|
11995
|
+
const _e = Ai(ee.icon), ze = !(D && Z.verticalPlacedIconSymbolIndex && we);
|
|
11996
|
+
Z.placedIconSymbolIndex >= 0 && (V(e.icon, Z.numIconVertices, ze ? _e : bs), e.icon.placedSymbolArray.get(Z.placedIconSymbolIndex).hidden = ee.icon.isHidden()), Z.verticalPlacedIconSymbolIndex >= 0 && (V(e.icon, Z.numVerticalIconVertices, ze ? bs : _e), e.icon.placedSymbolArray.get(Z.verticalPlacedIconSymbolIndex).hidden = ee.icon.isHidden());
|
|
11997
11997
|
}
|
|
11998
|
-
const
|
|
11998
|
+
const ye = U && U.has($) ? U.get($) : { text: null, icon: null };
|
|
11999
11999
|
if (e.hasIconCollisionBoxData() || e.hasTextCollisionBoxData()) {
|
|
12000
|
-
const
|
|
12001
|
-
if (
|
|
12000
|
+
const _e = e.collisionArrays[$];
|
|
12001
|
+
if (_e) {
|
|
12002
12002
|
let ze = new p.P(0, 0);
|
|
12003
|
-
if (
|
|
12004
|
-
let
|
|
12003
|
+
if (_e.textBox || _e.verticalTextBox) {
|
|
12004
|
+
let $e = !0;
|
|
12005
12005
|
if (S) {
|
|
12006
12006
|
const ve = this.variableOffsets[K];
|
|
12007
|
-
ve ? (ze = Wt(ve.anchor, ve.width, ve.height, ve.textOffset, ve.textBoxScale), T && ze._rotate(A ? this.transform.angle : -this.transform.angle)) :
|
|
12007
|
+
ve ? (ze = Wt(ve.anchor, ve.width, ve.height, ve.textOffset, ve.textBoxScale), T && ze._rotate(A ? this.transform.angle : -this.transform.angle)) : $e = !1;
|
|
12008
12008
|
}
|
|
12009
|
-
if (
|
|
12009
|
+
if (_e.textBox || _e.verticalTextBox) {
|
|
12010
12010
|
let ve;
|
|
12011
|
-
|
|
12011
|
+
_e.textBox && (ve = we), _e.verticalTextBox && (ve = Pe), vs(e.textCollisionBox.collisionVertexArray, ee.text.placed, !$e || ve, ye.text, ze.x, ze.y);
|
|
12012
12012
|
}
|
|
12013
12013
|
}
|
|
12014
|
-
if (
|
|
12015
|
-
const
|
|
12014
|
+
if (_e.iconBox || _e.verticalIconBox) {
|
|
12015
|
+
const $e = !!(!Pe && _e.verticalIconBox);
|
|
12016
12016
|
let ve;
|
|
12017
|
-
|
|
12017
|
+
_e.iconBox && (ve = $e), _e.verticalIconBox && (ve = !$e), vs(e.iconCollisionBox.collisionVertexArray, ee.icon.placed, ve, ye.icon, D ? ze.x : 0, D ? ze.y : 0);
|
|
12018
12018
|
}
|
|
12019
12019
|
}
|
|
12020
12020
|
}
|
|
@@ -12045,7 +12045,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12045
12045
|
}
|
|
12046
12046
|
function vs(h, e, s, a, o, c) {
|
|
12047
12047
|
a && a.length !== 0 || (a = [0, 0, 0, 0]);
|
|
12048
|
-
const m = a[0] -
|
|
12048
|
+
const m = a[0] - Ze, _ = a[1] - Ze, y = a[2] - Ze, b = a[3] - Ze;
|
|
12049
12049
|
h.emplaceBack(e ? 1 : 0, s ? 1 : 0, o || 0, c || 0, m, _), h.emplaceBack(e ? 1 : 0, s ? 1 : 0, o || 0, c || 0, y, _), h.emplaceBack(e ? 1 : 0, s ? 1 : 0, o || 0, c || 0, y, b), h.emplaceBack(e ? 1 : 0, s ? 1 : 0, o || 0, c || 0, m, b);
|
|
12050
12050
|
}
|
|
12051
12051
|
const dt = Math.pow(2, 25), Ea = Math.pow(2, 24), Da = Math.pow(2, 17), Mi = Math.pow(2, 16), ki = Math.pow(2, 9), Gl = Math.pow(2, 8), Oi = Math.pow(2, 1);
|
|
@@ -12317,8 +12317,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12317
12317
|
V[U] = {};
|
|
12318
12318
|
const $ = he.getImageCanvasContext((yield R[U]).data), Z = (yield D[U]).data;
|
|
12319
12319
|
for (const B in Z) {
|
|
12320
|
-
const { width: X, height: K, x: ee, y: le, sdf: pe, pixelRatio: we, stretchX: Pe, stretchY:
|
|
12321
|
-
V[U][B] = { data: null, pixelRatio: we, sdf: pe, stretchX: Pe, stretchY:
|
|
12320
|
+
const { width: X, height: K, x: ee, y: le, sdf: pe, pixelRatio: we, stretchX: Pe, stretchY: ye, content: _e, textFitWidth: ze, textFitHeight: $e } = Z[B];
|
|
12321
|
+
V[U][B] = { data: null, pixelRatio: we, sdf: pe, stretchX: Pe, stretchY: ye, content: _e, textFitWidth: ze, textFitHeight: $e, spriteData: { width: X, height: K, x: ee, y: le, context: $ } };
|
|
12322
12322
|
}
|
|
12323
12323
|
}
|
|
12324
12324
|
return V;
|
|
@@ -14172,21 +14172,21 @@ uniform ${S} ${T} u_${A};
|
|
|
14172
14172
|
const K = new p.P(B.anchorX, B.anchorY), ee = { getElevation: D, width: o.width, height: o.height, labelPlaneMatrix: c, lineVertexArray: null, pitchWithMap: s, projection: S, projectionCache: null, tileAnchorPoint: K, translation: T, unwrappedTileID: A }, le = s ? N(K.x, K.y, m, D) : ne(K.x, K.y, ee), pe = M(o.cameraToCenterDistance, le.signedDistanceFromCamera);
|
|
14173
14173
|
let we = p.ai(h.textSizeData, y, B) * pe / p.ap;
|
|
14174
14174
|
s && (we *= h.tilePixelRatio / _);
|
|
14175
|
-
const { width: Pe, height:
|
|
14176
|
-
for (let
|
|
14175
|
+
const { width: Pe, height: ye, anchor: _e, textOffset: ze, textBoxScale: $e } = X, ve = Wa(_e, Pe, ye, ze, $e, we), Te = S.getPitchedTextCorrection(o, K.add(new p.P(T[0], T[1])), A), je = ns(le.point, ee, e, ve, o.angle, Te), wt = h.allowVerticalPlacement && B.placedOrientation === p.ah.vertical ? Math.PI / 2 : 0;
|
|
14176
|
+
for (let He = 0; He < B.numGlyphs; He++) p.aj(V, je, wt);
|
|
14177
14177
|
b && B.associatedIconIndex >= 0 && ($[B.associatedIconIndex] = { shiftedAnchor: je, angle: wt });
|
|
14178
|
-
} else
|
|
14178
|
+
} else Fe(B.numGlyphs, V);
|
|
14179
14179
|
}
|
|
14180
14180
|
if (b) {
|
|
14181
14181
|
U.clear();
|
|
14182
14182
|
const Z = h.icon.placedSymbolArray;
|
|
14183
14183
|
for (let B = 0; B < Z.length; B++) {
|
|
14184
14184
|
const X = Z.get(B);
|
|
14185
|
-
if (X.hidden)
|
|
14185
|
+
if (X.hidden) Fe(X.numGlyphs, U);
|
|
14186
14186
|
else {
|
|
14187
14187
|
const K = $[B];
|
|
14188
14188
|
if (K) for (let ee = 0; ee < X.numGlyphs; ee++) p.aj(U, K.shiftedAnchor, K.angle);
|
|
14189
|
-
else
|
|
14189
|
+
else Fe(X.numGlyphs, U);
|
|
14190
14190
|
}
|
|
14191
14191
|
}
|
|
14192
14192
|
h.icon.dynamicLayoutVertexBuffer.updateData(U);
|
|
@@ -14200,41 +14200,41 @@ uniform ${S} ${T} u_${A};
|
|
|
14200
14200
|
const A = h.context, D = A.gl, R = h.transform, V = Yr(), U = _ === "map", $ = y === "map", Z = _ !== "viewport" && s.layout.get("symbol-placement") !== "point", B = U && !$ && !Z, X = !$ && Z, K = !s.layout.get("symbol-sort-key").isConstant();
|
|
14201
14201
|
let ee = !1;
|
|
14202
14202
|
const le = h.depthModeForSublayer(0, Je.ReadOnly), pe = s._unevaluatedLayout.hasValue("text-variable-anchor") || s._unevaluatedLayout.hasValue("text-variable-anchor-offset"), we = [], Pe = V.getCircleRadiusCorrection(R);
|
|
14203
|
-
for (const
|
|
14204
|
-
const
|
|
14203
|
+
for (const ye of a) {
|
|
14204
|
+
const _e = e.getTile(ye), ze = _e.getBucket(s);
|
|
14205
14205
|
if (!ze) continue;
|
|
14206
|
-
const
|
|
14207
|
-
if (
|
|
14208
|
-
const ve =
|
|
14206
|
+
const $e = o ? ze.text : ze.icon;
|
|
14207
|
+
if (!$e || !$e.segments.get().length || !$e.hasVisibleVertices) continue;
|
|
14208
|
+
const ve = $e.programConfigurations.get(s.id), Te = o || ze.sdfIcons, je = o ? ze.textSizeData : ze.iconSizeData, wt = $ || R.pitch !== 0, He = h.useProgram(Vi(Te, o, ze), ve), Qe = p.ag(je, R.zoom), St = h.style.map.terrain && h.style.map.terrain.getTerrainData(ye);
|
|
14209
14209
|
let ei, tr, Tt, xi, hi = [0, 0], ti = null;
|
|
14210
|
-
if (o) tr =
|
|
14210
|
+
if (o) tr = _e.glyphAtlasTexture, Tt = D.LINEAR, ei = _e.glyphAtlasTexture.size, ze.iconsInText && (hi = _e.imageAtlasTexture.size, ti = _e.imageAtlasTexture, xi = wt || h.options.rotating || h.options.zooming || je.kind === "composite" || je.kind === "camera" ? D.LINEAR : D.NEAREST);
|
|
14211
14211
|
else {
|
|
14212
14212
|
const tt = s.layout.get("icon-size").constantOr(0) !== 1 || ze.iconsNeedLinear;
|
|
14213
|
-
tr =
|
|
14213
|
+
tr = _e.imageAtlasTexture, Tt = Te || h.options.rotating || h.options.zooming || tt || wt ? D.LINEAR : D.NEAREST, ei = _e.imageAtlasTexture.size;
|
|
14214
14214
|
}
|
|
14215
|
-
const ui = Ye(
|
|
14215
|
+
const ui = Ye(_e, 1, h.transform.zoom), vr = X ? ye.posMatrix : fn, Us = Vr(vr, $, U, h.transform, ui), ma = gr(vr, $, U, h.transform, ui), $s = gr(ye.posMatrix, $, U, h.transform, ui), Ui = V.translatePosition(h.transform, _e, c, m), ga = pe && ze.hasTextData(), wo = s.layout.get("icon-text-fit") !== "none" && ga && ze.hasIconData();
|
|
14216
14216
|
if (Z) {
|
|
14217
|
-
const tt = h.style.map.terrain ? (qs, Zs) => h.style.map.terrain.getElevation(
|
|
14218
|
-
L(ze,
|
|
14217
|
+
const tt = h.style.map.terrain ? (qs, Zs) => h.style.map.terrain.getElevation(ye, qs, Zs) : null, hs = s.layout.get("text-rotation-alignment") === "map";
|
|
14218
|
+
L(ze, ye.posMatrix, h, o, Us, $s, $, b, hs, V, ye.toUnwrapped(), R.width, R.height, Ui, tt);
|
|
14219
14219
|
}
|
|
14220
|
-
const $i =
|
|
14220
|
+
const $i = ye.posMatrix, qi = o && pe || wo, Ur = Z || qi ? fn : Us, ir = ma, Kt = Te && s.paint.get(o ? "text-halo-width" : "icon-halo-width").constantOr(1) !== 0;
|
|
14221
14221
|
let ii;
|
|
14222
14222
|
ii = Te ? ze.iconsInText ? Oa(je.kind, Qe, B, $, Z, qi, h, $i, Ur, ir, Ui, ei, hi, Pe) : un(je.kind, Qe, B, $, Z, qi, h, $i, Ur, ir, Ui, o, ei, !0, Pe) : Wo(je.kind, Qe, B, $, Z, qi, h, $i, Ur, ir, Ui, o, ei, Pe);
|
|
14223
|
-
const Ei = { program:
|
|
14223
|
+
const Ei = { program: He, buffers: $e, uniformValues: ii, atlasTexture: tr, atlasTextureIcon: ti, atlasInterpolation: Tt, atlasInterpolationIcon: xi, isSDF: Te, hasHalo: Kt };
|
|
14224
14224
|
if (K && ze.canOverlap) {
|
|
14225
14225
|
ee = !0;
|
|
14226
|
-
const tt =
|
|
14226
|
+
const tt = $e.segments.get();
|
|
14227
14227
|
for (const hs of tt) we.push({ segments: new p.a0([hs]), sortKey: hs.sortKey, state: Ei, terrainData: St });
|
|
14228
|
-
} else we.push({ segments:
|
|
14228
|
+
} else we.push({ segments: $e.segments, sortKey: 0, state: Ei, terrainData: St });
|
|
14229
14229
|
}
|
|
14230
|
-
ee && we.sort((
|
|
14231
|
-
for (const
|
|
14232
|
-
const
|
|
14233
|
-
if (A.activeTexture.set(D.TEXTURE0),
|
|
14234
|
-
const ze =
|
|
14235
|
-
|
|
14230
|
+
ee && we.sort((ye, _e) => ye.sortKey - _e.sortKey);
|
|
14231
|
+
for (const ye of we) {
|
|
14232
|
+
const _e = ye.state;
|
|
14233
|
+
if (A.activeTexture.set(D.TEXTURE0), _e.atlasTexture.bind(_e.atlasInterpolation, D.CLAMP_TO_EDGE), _e.atlasTextureIcon && (A.activeTexture.set(D.TEXTURE1), _e.atlasTextureIcon && _e.atlasTextureIcon.bind(_e.atlasInterpolationIcon, D.CLAMP_TO_EDGE)), _e.isSDF) {
|
|
14234
|
+
const ze = _e.uniformValues;
|
|
14235
|
+
_e.hasHalo && (ze.u_is_halo = 1, Ja(_e.buffers, ye.segments, s, h, _e.program, le, S, T, ze, ye.terrainData)), ze.u_is_halo = 0;
|
|
14236
14236
|
}
|
|
14237
|
-
Ja(
|
|
14237
|
+
Ja(_e.buffers, ye.segments, s, h, _e.program, le, S, T, _e.uniformValues, ye.terrainData);
|
|
14238
14238
|
}
|
|
14239
14239
|
}
|
|
14240
14240
|
function Ja(h, e, s, a, o, c, m, _, y, b) {
|
|
@@ -14554,12 +14554,12 @@ uniform ${S} ${T} u_${A};
|
|
|
14554
14554
|
(_._unevaluatedLayout.hasValue("text-variable-anchor") || _._unevaluatedLayout.hasValue("text-variable-anchor-offset")) && function(A, D, R, V, U, $, Z, B, X) {
|
|
14555
14555
|
const K = D.transform, ee = Yr(), le = U === "map", pe = $ === "map";
|
|
14556
14556
|
for (const we of A) {
|
|
14557
|
-
const Pe = V.getTile(we),
|
|
14558
|
-
if (!
|
|
14559
|
-
const
|
|
14560
|
-
if (
|
|
14561
|
-
const Te = Math.pow(2, K.zoom - Pe.tileID.overscaledZ), je = D.style.map.terrain ? (
|
|
14562
|
-
Ps(
|
|
14557
|
+
const Pe = V.getTile(we), ye = Pe.getBucket(R);
|
|
14558
|
+
if (!ye || !ye.text || !ye.text.segments.get().length) continue;
|
|
14559
|
+
const _e = p.ag(ye.textSizeData, K.zoom), ze = Ye(Pe, 1, D.transform.zoom), $e = Vr(we.posMatrix, pe, le, D.transform, ze), ve = R.layout.get("icon-text-fit") !== "none" && ye.hasIconData();
|
|
14560
|
+
if (_e) {
|
|
14561
|
+
const Te = Math.pow(2, K.zoom - Pe.tileID.overscaledZ), je = D.style.map.terrain ? (He, Qe) => D.style.map.terrain.getElevation(we, He, Qe) : null, wt = ee.translatePosition(K, Pe, Z, B);
|
|
14562
|
+
Ps(ye, le, pe, X, K, $e, we.posMatrix, Te, _e, ve, ee, wt, we.toUnwrapped(), je);
|
|
14563
14563
|
}
|
|
14564
14564
|
}
|
|
14565
14565
|
}(y, c, _, m, _.layout.get("text-rotation-alignment"), _.layout.get("text-pitch-alignment"), _.paint.get("text-translate"), _.paint.get("text-translate-anchor"), b), _.paint.get("icon-opacity").constantOr(1) !== 0 && Ka(c, m, _, y, !1, _.paint.get("icon-translate"), _.paint.get("icon-translate-anchor"), _.layout.get("icon-rotation-alignment"), _.layout.get("icon-pitch-alignment"), _.layout.get("icon-keep-upright"), S, T), _.paint.get("text-opacity").constantOr(1) !== 0 && Ka(c, m, _, y, !0, _.paint.get("text-translate"), _.paint.get("text-translate-anchor"), _.layout.get("text-rotation-alignment"), _.layout.get("text-pitch-alignment"), _.layout.get("text-keep-upright"), S, T), m.map.showCollisionBoxes && (pn(c, m, _, y, !0), pn(c, m, _, y, !1));
|
|
@@ -14574,11 +14574,11 @@ uniform ${S} ${T} u_${A};
|
|
|
14574
14574
|
for (let B = 0; B < y.length; B++) {
|
|
14575
14575
|
const X = y[B], K = m.getTile(X), ee = K.getBucket(_);
|
|
14576
14576
|
if (!ee) continue;
|
|
14577
|
-
const le = ee.programConfigurations.get(_.id), pe = c.useProgram("circle", le), we = ee.layoutVertexBuffer, Pe = ee.indexBuffer,
|
|
14577
|
+
const le = ee.programConfigurations.get(_.id), pe = c.useProgram("circle", le), we = ee.layoutVertexBuffer, Pe = ee.indexBuffer, ye = c.style.map.terrain && c.style.map.terrain.getTerrainData(X), _e = { programConfiguration: le, program: pe, layoutVertexBuffer: we, indexBuffer: Pe, uniformValues: Wl(c, X, K, _), terrainData: ye };
|
|
14578
14578
|
if (A) {
|
|
14579
14579
|
const ze = ee.segments.get();
|
|
14580
|
-
for (const
|
|
14581
|
-
} else Z.push({ segments: ee.segments, sortKey: 0, state:
|
|
14580
|
+
for (const $e of ze) Z.push({ segments: new p.a0([$e]), sortKey: $e.sortKey, state: _e });
|
|
14581
|
+
} else Z.push({ segments: ee.segments, sortKey: 0, state: _e });
|
|
14582
14582
|
}
|
|
14583
14583
|
A && Z.sort((B, X) => B.sortKey - X.sortKey);
|
|
14584
14584
|
for (const B of Z) {
|
|
@@ -14634,28 +14634,28 @@ uniform ${S} ${T} u_${A};
|
|
|
14634
14634
|
if (V && !le.patternsLoaded()) continue;
|
|
14635
14635
|
const pe = le.getBucket(_);
|
|
14636
14636
|
if (!pe) continue;
|
|
14637
|
-
const we = pe.programConfigurations.get(_.id), Pe = c.context.program.get(),
|
|
14638
|
-
if (
|
|
14639
|
-
const je = le.imageAtlas, wt = je.patternPositions[
|
|
14640
|
-
wt &&
|
|
14637
|
+
const we = pe.programConfigurations.get(_.id), Pe = c.context.program.get(), ye = c.useProgram(Z, we), _e = K || ye.program !== Pe, ze = c.style.map.terrain && c.style.map.terrain.getTerrainData(ee), $e = R.constantOr(null);
|
|
14638
|
+
if ($e && le.imageAtlas) {
|
|
14639
|
+
const je = le.imageAtlas, wt = je.patternPositions[$e.to.toString()], He = je.patternPositions[$e.from.toString()];
|
|
14640
|
+
wt && He && we.setConstantPatternPositions(wt, He);
|
|
14641
14641
|
}
|
|
14642
14642
|
const ve = ze ? ee : null, Te = V ? Ts(c, le, _, $, ve) : D ? Kl(c, le, _, D, $, ve) : U ? Go(c, le, _, pe.lineClipsArray.length, ve) : qn(c, le, _, ve);
|
|
14643
14643
|
if (V) B.activeTexture.set(X.TEXTURE0), le.imageAtlasTexture.bind(X.LINEAR, X.CLAMP_TO_EDGE), we.updatePaintBuffers($);
|
|
14644
|
-
else if (D && (
|
|
14644
|
+
else if (D && (_e || c.lineAtlas.dirty)) B.activeTexture.set(X.TEXTURE0), c.lineAtlas.bind(B);
|
|
14645
14645
|
else if (U) {
|
|
14646
14646
|
const je = pe.gradients[_.id];
|
|
14647
14647
|
let wt = je.texture;
|
|
14648
14648
|
if (_.gradientVersion !== je.version) {
|
|
14649
|
-
let
|
|
14649
|
+
let He = 256;
|
|
14650
14650
|
if (_.stepInterpolant) {
|
|
14651
14651
|
const Qe = m.getSource().maxzoom, St = ee.canonical.z === Qe ? Math.ceil(1 << c.transform.maxZoom - ee.canonical.z) : 1;
|
|
14652
|
-
|
|
14652
|
+
He = p.ac(p.aV(pe.maxLineLength / p.X * 1024 * St), 256, B.maxTextureSize);
|
|
14653
14653
|
}
|
|
14654
|
-
je.gradient = p.aW({ expression: _.gradientExpression(), evaluationKey: "lineProgress", resolution:
|
|
14654
|
+
je.gradient = p.aW({ expression: _.gradientExpression(), evaluationKey: "lineProgress", resolution: He, image: je.gradient || void 0, clips: pe.lineClipsArray }), je.texture ? je.texture.update(je.gradient) : je.texture = new pt(B, je.gradient, X.RGBA), je.version = _.gradientVersion, wt = je.texture;
|
|
14655
14655
|
}
|
|
14656
14656
|
B.activeTexture.set(X.TEXTURE0), wt.bind(_.stepInterpolant ? X.NEAREST : X.LINEAR, X.CLAMP_TO_EDGE);
|
|
14657
14657
|
}
|
|
14658
|
-
|
|
14658
|
+
ye.draw(B, X.TRIANGLES, T, c.stencilModeForClipping(ee), A, ft.disabled, Te, ze, _.id, pe.layoutVertexBuffer, pe.indexBuffer, pe.segments, _.paint, c.transform.zoom, we, pe.layoutVertexBuffer2), K = !1;
|
|
14659
14659
|
}
|
|
14660
14660
|
})(e, s, a, o);
|
|
14661
14661
|
break;
|
|
@@ -14709,8 +14709,8 @@ uniform ${S} ${T} u_${A};
|
|
|
14709
14709
|
let pe, we;
|
|
14710
14710
|
const Pe = _.paint.get("raster-resampling") === "nearest" ? S.NEAREST : S.LINEAR;
|
|
14711
14711
|
b.activeTexture.set(S.TEXTURE0), X.texture.bind(Pe, S.CLAMP_TO_EDGE, S.LINEAR_MIPMAP_NEAREST), b.activeTexture.set(S.TEXTURE1), K ? (K.texture.bind(Pe, S.CLAMP_TO_EDGE, S.LINEAR_MIPMAP_NEAREST), pe = Math.pow(2, K.tileID.overscaledZ - X.tileID.overscaledZ), we = [X.tileID.canonical.x * pe % 1, X.tileID.canonical.y * pe % 1]) : X.texture.bind(Pe, S.CLAMP_TO_EDGE, S.LINEAR_MIPMAP_NEAREST), X.texture.useMipmap && b.extTextureFilterAnisotropic && c.transform.pitch > 20 && S.texParameterf(S.TEXTURE_2D, b.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT, b.extTextureFilterAnisotropicMax);
|
|
14712
|
-
const
|
|
14713
|
-
T instanceof Mr ? A.draw(b, S.TRIANGLES, B, xt.disabled, D, ft.disabled,
|
|
14712
|
+
const ye = c.style.map.terrain && c.style.map.terrain.getTerrainData(Z), _e = ye ? Z : null, ze = _e ? _e.posMatrix : c.transform.calculatePosMatrix(Z.toUnwrapped(), $), $e = Jl(ze, we || [0, 0], pe || 1, le, _);
|
|
14713
|
+
T instanceof Mr ? A.draw(b, S.TRIANGLES, B, xt.disabled, D, ft.disabled, $e, ye, _.id, T.boundsBuffer, c.quadTriangleIndexBuffer, T.boundsSegments) : A.draw(b, S.TRIANGLES, B, R[Z.overscaledZ], D, ft.disabled, $e, ye, _.id, c.rasterBoundsBuffer, c.quadTriangleIndexBuffer, c.rasterBoundsSegments);
|
|
14714
14714
|
}
|
|
14715
14715
|
})(e, s, a, o);
|
|
14716
14716
|
break;
|
|
@@ -15015,22 +15015,22 @@ uniform ${S} ${T} u_${A};
|
|
|
15015
15015
|
const B = V.pop(), X = B.x, K = B.y;
|
|
15016
15016
|
let ee = B.fullyVisible;
|
|
15017
15017
|
if (!ee) {
|
|
15018
|
-
const
|
|
15019
|
-
if (
|
|
15020
|
-
ee =
|
|
15018
|
+
const ye = B.aabb.intersects(T);
|
|
15019
|
+
if (ye === 0) continue;
|
|
15020
|
+
ee = ye === 2;
|
|
15021
15021
|
}
|
|
15022
15022
|
const le = e.terrain ? b : S, pe = B.aabb.distanceX(le), we = B.aabb.distanceY(le), Pe = Math.max(Math.abs(pe), Math.abs(we));
|
|
15023
15023
|
if (B.zoom === $ || Pe > D + (1 << $ - B.zoom) - 2 && B.zoom >= A) {
|
|
15024
|
-
const
|
|
15025
|
-
U.push({ tileID: new p.S(B.zoom === $ ? Z : B.zoom, B.wrap, B.zoom, X, K), distanceSq: Rn([S[0] - 0.5 - X, S[1] - 0.5 - K]), tileDistanceToCamera: Math.sqrt(
|
|
15026
|
-
} else for (let
|
|
15027
|
-
const
|
|
15028
|
-
let ve = B.aabb.quadrant(
|
|
15024
|
+
const ye = $ - B.zoom, _e = b[0] - 0.5 - (X << ye), ze = b[1] - 0.5 - (K << ye);
|
|
15025
|
+
U.push({ tileID: new p.S(B.zoom === $ ? Z : B.zoom, B.wrap, B.zoom, X, K), distanceSq: Rn([S[0] - 0.5 - X, S[1] - 0.5 - K]), tileDistanceToCamera: Math.sqrt(_e * _e + ze * ze) });
|
|
15026
|
+
} else for (let ye = 0; ye < 4; ye++) {
|
|
15027
|
+
const _e = (X << 1) + ye % 2, ze = (K << 1) + (ye >> 1), $e = B.zoom + 1;
|
|
15028
|
+
let ve = B.aabb.quadrant(ye);
|
|
15029
15029
|
if (e.terrain) {
|
|
15030
|
-
const Te = new p.S(
|
|
15031
|
-
ve = new Es([ve.min[0], ve.min[1], wt], [ve.max[0], ve.max[1],
|
|
15030
|
+
const Te = new p.S($e, B.wrap, $e, _e, ze), je = e.terrain.getMinMaxElevation(Te), wt = (s = je.minElevation) !== null && s !== void 0 ? s : this.elevation, He = (a = je.maxElevation) !== null && a !== void 0 ? a : this.elevation;
|
|
15031
|
+
ve = new Es([ve.min[0], ve.min[1], wt], [ve.max[0], ve.max[1], He]);
|
|
15032
15032
|
}
|
|
15033
|
-
V.push({ aabb: ve, zoom:
|
|
15033
|
+
V.push({ aabb: ve, zoom: $e, x: _e, y: ze, wrap: B.wrap, fullyVisible: ee });
|
|
15034
15034
|
}
|
|
15035
15035
|
}
|
|
15036
15036
|
return U.sort((B, X) => B.distanceSq - X.distanceSq).map((B) => B.tileID);
|
|
@@ -16411,8 +16411,8 @@ uniform ${S} ${T} u_${A};
|
|
|
16411
16411
|
_cameraForBoxAndBearing(e, s, a, o) {
|
|
16412
16412
|
const c = { top: 0, bottom: 0, right: 0, left: 0 };
|
|
16413
16413
|
if (typeof (o = p.e({ padding: c, offset: [0, 0], maxZoom: this.transform.maxZoom }, o)).padding == "number") {
|
|
16414
|
-
const
|
|
16415
|
-
o.padding = { top:
|
|
16414
|
+
const ye = o.padding;
|
|
16415
|
+
o.padding = { top: ye, bottom: ye, right: ye, left: ye };
|
|
16416
16416
|
}
|
|
16417
16417
|
o.padding = p.e(c, o.padding);
|
|
16418
16418
|
const m = this.transform, _ = m.padding, y = new re(e, s), b = m.project(y.getNorthWest()), S = m.project(y.getNorthEast()), T = m.project(y.getSouthEast()), A = m.project(y.getSouthWest()), D = p.ba(-a), R = b.rotate(D), V = S.rotate(D), U = T.rotate(D), $ = A.rotate(D), Z = new p.P(Math.max(R.x, V.x, $.x, U.x), Math.max(R.y, V.y, $.y, U.y)), B = new p.P(Math.min(R.x, V.x, $.x, U.x), Math.min(R.y, V.y, $.y, U.y)), X = Z.sub(B), K = (m.width - (_.left + _.right + o.padding.left + o.padding.right)) / X.x, ee = (m.height - (_.top + _.bottom + o.padding.top + o.padding.bottom)) / X.y;
|
|
@@ -16456,8 +16456,8 @@ uniform ${S} ${T} u_${A};
|
|
|
16456
16456
|
return this._zooming = this._zooming || U !== c, this._rotating = this._rotating || m !== b, this._pitching = this._pitching || S !== _, this._padding = !o.isPaddingEqual(T), this._easeId = e.easeId, this._prepareEase(s, e.noMoveStart, ee), this.terrain && this._prepareElevation(V), this._ease((le) => {
|
|
16457
16457
|
if (this._zooming && (o.zoom = p.y.number(c, U, le)), this._rotating && (o.bearing = p.y.number(m, b, le)), this._pitching && (o.pitch = p.y.number(_, S, le)), this._padding && (o.interpolatePadding(y, T, le), D = o.centerPoint.add(A)), this.terrain && !e.freezeElevation && this._updateElevation(le), X) o.setLocationAtPoint(X, K);
|
|
16458
16458
|
else {
|
|
16459
|
-
const pe = o.zoomScale(o.zoom - c), we = U > c ? Math.min(2, B) : Math.max(0.5, B), Pe = Math.pow(we, 1 - le),
|
|
16460
|
-
o.setLocationAtPoint(o.renderWorldCopies ?
|
|
16459
|
+
const pe = o.zoomScale(o.zoom - c), we = U > c ? Math.min(2, B) : Math.max(0.5, B), Pe = Math.pow(we, 1 - le), ye = o.unproject($.add(Z.mult(le * Pe)).mult(pe));
|
|
16460
|
+
o.setLocationAtPoint(o.renderWorldCopies ? ye.wrap() : ye, D);
|
|
16461
16461
|
}
|
|
16462
16462
|
this._applyUpdatedTransform(o), this._fireMoveEvents(s);
|
|
16463
16463
|
}, (le) => {
|
|
@@ -16538,26 +16538,26 @@ uniform ${S} ${T} u_${A};
|
|
|
16538
16538
|
function Pe(Te) {
|
|
16539
16539
|
return (Math.exp(Te) - Math.exp(-Te)) / 2;
|
|
16540
16540
|
}
|
|
16541
|
-
function
|
|
16541
|
+
function ye(Te) {
|
|
16542
16542
|
return (Math.exp(Te) + Math.exp(-Te)) / 2;
|
|
16543
16543
|
}
|
|
16544
|
-
const
|
|
16544
|
+
const _e = we(!1);
|
|
16545
16545
|
let ze = function(Te) {
|
|
16546
|
-
return _e
|
|
16547
|
-
},
|
|
16548
|
-
return K * ((_e
|
|
16546
|
+
return ye(_e) / ye(_e + X * Te);
|
|
16547
|
+
}, $e = function(Te) {
|
|
16548
|
+
return K * ((ye(_e) * (Pe(je = _e + X * Te) / ye(je)) - Pe(_e)) / pe) / le;
|
|
16549
16549
|
var je;
|
|
16550
|
-
}, ve = (we(!0) -
|
|
16550
|
+
}, ve = (we(!0) - _e) / X;
|
|
16551
16551
|
if (Math.abs(le) < 1e-6 || !isFinite(ve)) {
|
|
16552
16552
|
if (Math.abs(K - ee) < 1e-6) return this.easeTo(e, s);
|
|
16553
16553
|
const Te = ee < K ? -1 : 1;
|
|
16554
|
-
ve = Math.abs(Math.log(ee / K)) / X,
|
|
16554
|
+
ve = Math.abs(Math.log(ee / K)) / X, $e = () => 0, ze = (je) => Math.exp(Te * X * je);
|
|
16555
16555
|
}
|
|
16556
16556
|
return e.duration = "duration" in e ? +e.duration : 1e3 * ve / ("screenSpeed" in e ? +e.screenSpeed / X : +e.speed), e.maxDuration && e.duration > e.maxDuration && (e.duration = 0), this._zooming = !0, this._rotating = m !== b, this._pitching = S !== _, this._padding = !o.isPaddingEqual(T), this._prepareEase(s, !1), this.terrain && this._prepareElevation(V), this._ease((Te) => {
|
|
16557
16557
|
const je = Te * ve, wt = 1 / ze(je);
|
|
16558
16558
|
o.zoom = Te === 1 ? U : c + o.scaleZoom(wt), this._rotating && (o.bearing = p.y.number(m, b, Te)), this._pitching && (o.pitch = p.y.number(_, S, Te)), this._padding && (o.interpolatePadding(y, T, Te), D = o.centerPoint.add(A)), this.terrain && !e.freezeElevation && this._updateElevation(Te);
|
|
16559
|
-
const
|
|
16560
|
-
o.setLocationAtPoint(o.renderWorldCopies ?
|
|
16559
|
+
const He = Te === 1 ? V : o.unproject(Z.add(B.mult($e(je))).mult(wt));
|
|
16560
|
+
o.setLocationAtPoint(o.renderWorldCopies ? He.wrap() : He, D), this._applyUpdatedTransform(o), this._fireMoveEvents(s);
|
|
16561
16561
|
}, () => {
|
|
16562
16562
|
this.terrain && e.freezeElevation && this._finalizeElevation(), this._afterEase(s);
|
|
16563
16563
|
}, e), this;
|
|
@@ -18151,12 +18151,12 @@ uniform ${S} ${T} u_${A};
|
|
|
18151
18151
|
p.a.WORKER_URL = h;
|
|
18152
18152
|
};
|
|
18153
18153
|
});
|
|
18154
|
-
var
|
|
18155
|
-
return
|
|
18154
|
+
var Ke = me;
|
|
18155
|
+
return Ke;
|
|
18156
18156
|
});
|
|
18157
18157
|
})(Ku);
|
|
18158
18158
|
var sf = Ku.exports;
|
|
18159
|
-
const
|
|
18159
|
+
const Wu = /* @__PURE__ */ rf(sf), nf = {}, af = {
|
|
18160
18160
|
xmlns: "http://www.w3.org/2000/svg",
|
|
18161
18161
|
width: "24",
|
|
18162
18162
|
height: "24",
|
|
@@ -18207,8 +18207,8 @@ const Yu = /* @__PURE__ */ en(nf, [["render", of]]), lf = {
|
|
|
18207
18207
|
return [...this.sizes].sort((te, de) => te - de);
|
|
18208
18208
|
},
|
|
18209
18209
|
maxWidht() {
|
|
18210
|
-
var
|
|
18211
|
-
const te = ((
|
|
18210
|
+
var me;
|
|
18211
|
+
const te = ((me = this.sizes) == null ? void 0 : me.length) - 1;
|
|
18212
18212
|
return this.calcSize(te);
|
|
18213
18213
|
}
|
|
18214
18214
|
},
|
|
@@ -18239,63 +18239,63 @@ const Yu = /* @__PURE__ */ en(nf, [["render", of]]), lf = {
|
|
|
18239
18239
|
key: 0,
|
|
18240
18240
|
class: "text-xs font-semibold leading-[1.2] text-[#1F2937] mb-[8px]"
|
|
18241
18241
|
}, vf = { class: "flex flex-col gap-[6px]" }, bf = { class: "flex flex-row items-center justify-start" }, wf = { class: "text-xs text-[#1F2937] font-normal leading-[1.2]" };
|
|
18242
|
-
function Sf(te, de,
|
|
18242
|
+
function Sf(te, de, me, Le, Ge, Ke) {
|
|
18243
18243
|
var ht, Bt;
|
|
18244
18244
|
const C = Uo("legendIcon"), p = Uo("closeIcon");
|
|
18245
18245
|
return Nt(), jt("div", hf, [
|
|
18246
18246
|
ct("div", {
|
|
18247
18247
|
class: "absolute flex justify-between items-center p-2 fixed z-100 bg-white shadow-lg bottom-[60px] right-0 rounded-lg",
|
|
18248
|
-
onClick: de[0] || (de[0] = (_t) =>
|
|
18248
|
+
onClick: de[0] || (de[0] = (_t) => Ge.isOpenLegend = !Ge.isOpenLegend)
|
|
18249
18249
|
}, [
|
|
18250
18250
|
$o(C)
|
|
18251
18251
|
]),
|
|
18252
|
-
|
|
18252
|
+
Ge.isOpenLegend ? (Nt(), jt("div", uf, [
|
|
18253
18253
|
ct("div", df, [
|
|
18254
18254
|
de[2] || (de[2] = ct("h3", { class: "text-[16px] font-normal text-black leading-[1.2]" }, " Легенда ", -1)),
|
|
18255
18255
|
ct("button", {
|
|
18256
18256
|
type: "button",
|
|
18257
18257
|
class: "inline-flex items-center text-sm font-medium text-gray-500 rounded-lg gap-x-2 focus:outline-none disabled:opacity-50 disabled:pointer-events-none dark:text-neutral-400 dark:hover:text-blue-500 dark:focus:text-blue-500",
|
|
18258
|
-
onClick: de[1] || (de[1] = (_t) =>
|
|
18258
|
+
onClick: de[1] || (de[1] = (_t) => Ge.isOpenLegend = !1)
|
|
18259
18259
|
}, [
|
|
18260
18260
|
$o(p, { class: "w-[20px]" })
|
|
18261
18261
|
])
|
|
18262
18262
|
]),
|
|
18263
18263
|
ct("div", pf, [
|
|
18264
|
-
(ht =
|
|
18265
|
-
|
|
18264
|
+
(ht = me.colors) != null && ht.length ? (Nt(), jt("div", ff, [
|
|
18265
|
+
me.colorTitle ? (Nt(), jt("h4", mf, Ln(me.colorTitle), 1)) : jo("", !0),
|
|
18266
18266
|
ct("div", gf, [
|
|
18267
|
-
(Nt(!0), jt(
|
|
18267
|
+
(Nt(!0), jt(oh, null, lh(me.colors, (_t, he) => (Nt(), jt("div", {
|
|
18268
18268
|
key: he,
|
|
18269
18269
|
class: "flex items-center flex gap-[10px]"
|
|
18270
18270
|
}, [
|
|
18271
18271
|
ct("div", {
|
|
18272
18272
|
class: "w-[12px] h-[12px] rounded-full",
|
|
18273
|
-
style:
|
|
18274
|
-
backgroundColor: _t.color ? _t.color :
|
|
18273
|
+
style: Hu({
|
|
18274
|
+
backgroundColor: _t.color ? _t.color : Ge.palette[he]
|
|
18275
18275
|
})
|
|
18276
18276
|
}, null, 4),
|
|
18277
18277
|
ct("p", _f, Ln(_t.val), 1)
|
|
18278
18278
|
]))), 128))
|
|
18279
18279
|
])
|
|
18280
18280
|
])) : jo("", !0),
|
|
18281
|
-
(Bt =
|
|
18281
|
+
(Bt = me.sizes) != null && Bt.length ? (Nt(), jt("div", yf, [
|
|
18282
18282
|
te.sizeTitle ? (Nt(), jt("h4", xf, Ln(te.sizeTitle), 1)) : jo("", !0),
|
|
18283
18283
|
ct("div", vf, [
|
|
18284
|
-
(Nt(!0), jt(
|
|
18284
|
+
(Nt(!0), jt(oh, null, lh(Ke.sortedSizes, (_t, he) => {
|
|
18285
18285
|
var ae, Ii, fi;
|
|
18286
18286
|
return Nt(), jt("div", null, [
|
|
18287
18287
|
ct("div", bf, [
|
|
18288
18288
|
ct("div", {
|
|
18289
|
-
class:
|
|
18289
|
+
class: ch([Ke.maxWidht ? `w-[${Ke.maxWidht}]` : "", "mr-[10px]"])
|
|
18290
18290
|
}, [
|
|
18291
18291
|
ct("div", {
|
|
18292
|
-
class:
|
|
18293
|
-
style:
|
|
18294
|
-
backgroundColor:
|
|
18292
|
+
class: ch(Ke.sizeClass(he)),
|
|
18293
|
+
style: Hu({
|
|
18294
|
+
backgroundColor: Ge.palette[me.color][he]
|
|
18295
18295
|
})
|
|
18296
18296
|
}, null, 6)
|
|
18297
18297
|
], 2),
|
|
18298
|
-
ct("p", wf, Ln(he === ((ae =
|
|
18298
|
+
ct("p", wf, Ln(he === ((ae = Ke.sortedSizes) == null ? void 0 : ae.length) - 1 ? ">" + _t : he == ((Ii = Ke.sortedSizes) == null ? void 0 : Ii.length) - 1 ? ">" + Ke.sortedSizes[((fi = Ke.sortedSizes) == null ? void 0 : fi.length) - 1] : _t + "-" + Ke.sortedSizes[he + 1]), 1)
|
|
18299
18299
|
])
|
|
18300
18300
|
]);
|
|
18301
18301
|
}), 256))
|
|
@@ -18306,9 +18306,9 @@ function Sf(te, de, ye, Fe, Ze, $e) {
|
|
|
18306
18306
|
]);
|
|
18307
18307
|
}
|
|
18308
18308
|
const Tf = /* @__PURE__ */ en(cf, [["render", Sf], ["__scopeId", "data-v-16c83b8b"]]);
|
|
18309
|
-
function Qu(te, de,
|
|
18309
|
+
function Qu(te, de, me) {
|
|
18310
18310
|
if (te !== null)
|
|
18311
|
-
for (var
|
|
18311
|
+
for (var Le, Ge, Ke, C, p, ht, Bt, _t = 0, he = 0, ae, Ii = te.type, fi = Ii === "FeatureCollection", Ri = Ii === "Feature", lr = fi ? te.features.length : 1, Xt = 0; Xt < lr; Xt++) {
|
|
18312
18312
|
Bt = fi ? te.features[Xt].geometry : Ri ? te.geometry : te, ae = Bt ? Bt.type === "GeometryCollection" : !1, p = ae ? Bt.geometries.length : 1;
|
|
18313
18313
|
for (var Sr = 0; Sr < p; Sr++) {
|
|
18314
18314
|
var Mt = 0, Gi = 0;
|
|
@@ -18331,9 +18331,9 @@ function Qu(te, de, ye) {
|
|
|
18331
18331
|
break;
|
|
18332
18332
|
case "LineString":
|
|
18333
18333
|
case "MultiPoint":
|
|
18334
|
-
for (
|
|
18334
|
+
for (Le = 0; Le < ht.length; Le++) {
|
|
18335
18335
|
if (de(
|
|
18336
|
-
ht[
|
|
18336
|
+
ht[Le],
|
|
18337
18337
|
he,
|
|
18338
18338
|
Xt,
|
|
18339
18339
|
Mt,
|
|
@@ -18346,10 +18346,10 @@ function Qu(te, de, ye) {
|
|
|
18346
18346
|
break;
|
|
18347
18347
|
case "Polygon":
|
|
18348
18348
|
case "MultiLineString":
|
|
18349
|
-
for (
|
|
18350
|
-
for (
|
|
18349
|
+
for (Le = 0; Le < ht.length; Le++) {
|
|
18350
|
+
for (Ge = 0; Ge < ht[Le].length - _t; Ge++) {
|
|
18351
18351
|
if (de(
|
|
18352
|
-
ht[
|
|
18352
|
+
ht[Le][Ge],
|
|
18353
18353
|
he,
|
|
18354
18354
|
Xt,
|
|
18355
18355
|
Mt,
|
|
@@ -18363,11 +18363,11 @@ function Qu(te, de, ye) {
|
|
|
18363
18363
|
$t === "Polygon" && Mt++;
|
|
18364
18364
|
break;
|
|
18365
18365
|
case "MultiPolygon":
|
|
18366
|
-
for (
|
|
18367
|
-
for (Gi = 0,
|
|
18368
|
-
for (
|
|
18366
|
+
for (Le = 0; Le < ht.length; Le++) {
|
|
18367
|
+
for (Gi = 0, Ge = 0; Ge < ht[Le].length; Ge++) {
|
|
18368
|
+
for (Ke = 0; Ke < ht[Le][Ge].length - _t; Ke++) {
|
|
18369
18369
|
if (de(
|
|
18370
|
-
ht[
|
|
18370
|
+
ht[Le][Ge][Ke],
|
|
18371
18371
|
he,
|
|
18372
18372
|
Xt,
|
|
18373
18373
|
Mt,
|
|
@@ -18382,8 +18382,8 @@ function Qu(te, de, ye) {
|
|
|
18382
18382
|
}
|
|
18383
18383
|
break;
|
|
18384
18384
|
case "GeometryCollection":
|
|
18385
|
-
for (
|
|
18386
|
-
if (Qu(C.geometries[
|
|
18385
|
+
for (Le = 0; Le < C.geometries.length; Le++)
|
|
18386
|
+
if (Qu(C.geometries[Le], de) === !1)
|
|
18387
18387
|
return !1;
|
|
18388
18388
|
break;
|
|
18389
18389
|
default:
|
|
@@ -18396,10 +18396,10 @@ function Qu(te, de, ye) {
|
|
|
18396
18396
|
function If(te, de = {}) {
|
|
18397
18397
|
if (te.bbox != null && de.recompute !== !0)
|
|
18398
18398
|
return te.bbox;
|
|
18399
|
-
const
|
|
18400
|
-
return Qu(te, (
|
|
18401
|
-
|
|
18402
|
-
}),
|
|
18399
|
+
const me = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
|
|
18400
|
+
return Qu(te, (Le) => {
|
|
18401
|
+
me[0] > Le[0] && (me[0] = Le[0]), me[1] > Le[1] && (me[1] = Le[1]), me[2] < Le[0] && (me[2] = Le[0]), me[3] < Le[1] && (me[3] = Le[1]);
|
|
18402
|
+
}), me;
|
|
18403
18403
|
}
|
|
18404
18404
|
const Pf = {
|
|
18405
18405
|
props: ["map", "coordinates"],
|
|
@@ -18411,22 +18411,22 @@ const Pf = {
|
|
|
18411
18411
|
computed: {
|
|
18412
18412
|
getCoordinates() {
|
|
18413
18413
|
var de;
|
|
18414
|
-
return !(this != null && this.coordinates) || ((de = this.coordinates) == null ? void 0 : de.length) !== 2 ? "" : (this == null ? void 0 : this.coordinates).slice().reverse().map((
|
|
18414
|
+
return !(this != null && this.coordinates) || ((de = this.coordinates) == null ? void 0 : de.length) !== 2 ? "" : (this == null ? void 0 : this.coordinates).slice().reverse().map((me) => Number(me).toFixed(5)).join(", ");
|
|
18415
18415
|
}
|
|
18416
18416
|
}
|
|
18417
18417
|
}, Mf = { class: "map__settings" }, kf = {
|
|
18418
18418
|
ref: "attribution",
|
|
18419
18419
|
class: "map__settings-attribution map__settings-item mt-[3px]"
|
|
18420
18420
|
};
|
|
18421
|
-
function Af(te, de,
|
|
18421
|
+
function Af(te, de, me, Le, Ge, Ke) {
|
|
18422
18422
|
return Nt(), jt("div", Mf, [
|
|
18423
18423
|
ct("div", kf, [
|
|
18424
18424
|
Hp(ct("div", {
|
|
18425
18425
|
ref: "mouse",
|
|
18426
18426
|
class: "map__settings-item",
|
|
18427
18427
|
style: { "min-width": "115px" }
|
|
18428
|
-
}, Ln(
|
|
18429
|
-
[Xp,
|
|
18428
|
+
}, Ln(Ke.getCoordinates), 513), [
|
|
18429
|
+
[Xp, Ke.getCoordinates]
|
|
18430
18430
|
])
|
|
18431
18431
|
], 512)
|
|
18432
18432
|
]);
|
|
@@ -18483,11 +18483,11 @@ const Cf = /* @__PURE__ */ en(Pf, [["render", Af]]), zf = {
|
|
|
18483
18483
|
}
|
|
18484
18484
|
}
|
|
18485
18485
|
}, Ef = { class: "vs-map-slot-layers" }, Df = ["onClick"], Lf = ["src"];
|
|
18486
|
-
function Rf(te, de,
|
|
18486
|
+
function Rf(te, de, me, Le, Ge, Ke) {
|
|
18487
18487
|
return Nt(), jt("div", Ef, [
|
|
18488
|
-
(Nt(!0), jt(
|
|
18488
|
+
(Nt(!0), jt(oh, null, lh(Ge.baseLayers, (C) => (Nt(), jt("div", {
|
|
18489
18489
|
key: C.id,
|
|
18490
|
-
class:
|
|
18490
|
+
class: ch(["vs-map-slot-layers__layer", { focused: Ke.isLayerInFocus(C) }]),
|
|
18491
18491
|
onClick: (p) => te.changeBaseLayer(C.id)
|
|
18492
18492
|
}, [
|
|
18493
18493
|
ct("img", {
|
|
@@ -18534,11 +18534,11 @@ const Nf = /* @__PURE__ */ en(Ff, [["render", Vf]]), jf = {
|
|
|
18534
18534
|
}
|
|
18535
18535
|
}
|
|
18536
18536
|
}, Uf = { class: "absolute flex justify-between items-center p-2 fixed z-100 bg-white shadow-lg rounded-lg" };
|
|
18537
|
-
function $f(te, de,
|
|
18537
|
+
function $f(te, de, me, Le, Ge, Ke) {
|
|
18538
18538
|
const C = Uo("homeIcon");
|
|
18539
18539
|
return Nt(), jt("div", Uf, [
|
|
18540
18540
|
ct("button", {
|
|
18541
|
-
onClick: de[0] || (de[0] = (...p) =>
|
|
18541
|
+
onClick: de[0] || (de[0] = (...p) => Ke.setBounds && Ke.setBounds(...p))
|
|
18542
18542
|
}, [
|
|
18543
18543
|
$o(C, { class: "text-[16px] font-black" })
|
|
18544
18544
|
])
|
|
@@ -18591,18 +18591,18 @@ const Xf = /* @__PURE__ */ en(Zf, [["render", Hf]]), Wf = {
|
|
|
18591
18591
|
},
|
|
18592
18592
|
computed: {
|
|
18593
18593
|
maxValue() {
|
|
18594
|
-
var te, de,
|
|
18595
|
-
return ((te = this.sizes) == null ? void 0 : te[0]) > ((
|
|
18594
|
+
var te, de, me, Le, Ge, Ke;
|
|
18595
|
+
return ((te = this.sizes) == null ? void 0 : te[0]) > ((me = this.sizes) == null ? void 0 : me[((de = this.sizes) == null ? void 0 : de.length) - 1]) ? (Le = this.sizes) == null ? void 0 : Le[0] : (Ke = this.sizes) == null ? void 0 : Ke[((Ge = this.sizes) == null ? void 0 : Ge.length) - 1];
|
|
18596
18596
|
}
|
|
18597
18597
|
}
|
|
18598
18598
|
}, Kf = { class: "vs-map-portal__list rounded-lg z-10" }, Jf = {
|
|
18599
18599
|
key: 1,
|
|
18600
18600
|
class: "vs-map-portal__legend-body custom-scrollbar"
|
|
18601
18601
|
}, Yf = { class: "vs-map-portal__legend-title flex items-center justify-between" }, Qf = { class: "vs-map-portal__legend-body__content px-2" }, em = { class: "flex gap-2" };
|
|
18602
|
-
function tm(te, de,
|
|
18602
|
+
function tm(te, de, me, Le, Ge, Ke) {
|
|
18603
18603
|
const C = Uo("menuIcon"), p = Uo("VsListbar");
|
|
18604
18604
|
return Nt(), jt("div", Kf, [
|
|
18605
|
-
|
|
18605
|
+
Ge.isOpenLegend ? (Nt(), jt("div", Jf, [
|
|
18606
18606
|
ct("div", Yf, [
|
|
18607
18607
|
de[3] || (de[3] = ct("div", { class: "p-2" }, "Інфо", -1)),
|
|
18608
18608
|
(Nt(), jt("svg", {
|
|
@@ -18616,7 +18616,7 @@ function tm(te, de, ye, Fe, Ze, $e) {
|
|
|
18616
18616
|
"stroke-linecap": "round",
|
|
18617
18617
|
"stroke-linejoin": "round",
|
|
18618
18618
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-x cursor-pointer",
|
|
18619
|
-
onClick: de[1] || (de[1] = (ht) =>
|
|
18619
|
+
onClick: de[1] || (de[1] = (ht) => Ge.isOpenLegend = !1)
|
|
18620
18620
|
}, de[2] || (de[2] = [
|
|
18621
18621
|
ct("path", {
|
|
18622
18622
|
stroke: "none",
|
|
@@ -18629,15 +18629,15 @@ function tm(te, de, ye, Fe, Ze, $e) {
|
|
|
18629
18629
|
]),
|
|
18630
18630
|
ct("div", Qf, [
|
|
18631
18631
|
ct("div", em, [
|
|
18632
|
-
ct("span", null, " Total : " + Ln(
|
|
18633
|
-
ct("span", null, " Count : " + Ln(
|
|
18632
|
+
ct("span", null, " Total : " + Ln(me.total), 1),
|
|
18633
|
+
ct("span", null, " Count : " + Ln(me.count), 1)
|
|
18634
18634
|
]),
|
|
18635
|
-
$o(p, { source:
|
|
18635
|
+
$o(p, { source: me.source }, null, 8, ["source"])
|
|
18636
18636
|
])
|
|
18637
18637
|
])) : (Nt(), jt("div", {
|
|
18638
18638
|
key: 0,
|
|
18639
18639
|
class: "absolute flex justify-between items-center p-2 left-1 top-1 fixed z-100 bg-white shadow-lg rounded-lg",
|
|
18640
|
-
onClick: de[0] || (de[0] = (ht) =>
|
|
18640
|
+
onClick: de[0] || (de[0] = (ht) => Ge.isOpenLegend = !0)
|
|
18641
18641
|
}, [
|
|
18642
18642
|
$o(C)
|
|
18643
18643
|
]))
|
|
@@ -18672,7 +18672,7 @@ const im = /* @__PURE__ */ en(Wf, [["render", tm]]), nm = {
|
|
|
18672
18672
|
sources: {},
|
|
18673
18673
|
layers: []
|
|
18674
18674
|
};
|
|
18675
|
-
this.map = await new
|
|
18675
|
+
this.map = await new Wu.Map({
|
|
18676
18676
|
container: this.mapId,
|
|
18677
18677
|
style: te,
|
|
18678
18678
|
center: [31, 48.5],
|
|
@@ -18681,7 +18681,7 @@ const im = /* @__PURE__ */ en(Wf, [["render", tm]]), nm = {
|
|
|
18681
18681
|
maxZoom: 20,
|
|
18682
18682
|
attributionControl: !1
|
|
18683
18683
|
}), this.map.addControl(
|
|
18684
|
-
new
|
|
18684
|
+
new Wu.NavigationControl({
|
|
18685
18685
|
visualizePitch: !0
|
|
18686
18686
|
})
|
|
18687
18687
|
), this.map.on("load", () => {
|
|
@@ -18694,41 +18694,24 @@ const im = /* @__PURE__ */ en(Wf, [["render", tm]]), nm = {
|
|
|
18694
18694
|
});
|
|
18695
18695
|
},
|
|
18696
18696
|
moveMouseHadler(te) {
|
|
18697
|
-
var de
|
|
18697
|
+
var de;
|
|
18698
18698
|
try {
|
|
18699
|
-
|
|
18700
|
-
|
|
18701
|
-
|
|
18702
|
-
this.map.getCanvas().style.cursor = "", (ye = this.popup) == null || ye.remove();
|
|
18699
|
+
const me = this.map.queryRenderedFeatures(te.point), Le = ((de = me[0]) == null ? void 0 : de.properties) || {};
|
|
18700
|
+
if (!me.length) {
|
|
18701
|
+
this.map.getCanvas().style.cursor = "", this.popupElement && this.popupElement.remove();
|
|
18703
18702
|
return;
|
|
18704
18703
|
}
|
|
18705
|
-
this.
|
|
18706
|
-
|
|
18707
|
-
|
|
18708
|
-
|
|
18709
|
-
|
|
18710
|
-
|
|
18711
|
-
|
|
18712
|
-
|
|
18713
|
-
|
|
18714
|
-
|
|
18715
|
-
|
|
18716
|
-
class=" flex p-2 justify-between font-semibold !text-sm !bg-white border-b rounded-lg !border-gray-200 text-gray-800 rounded-t-lg">
|
|
18717
|
-
Info
|
|
18718
|
-
</div>
|
|
18719
|
-
|
|
18720
|
-
<div style="font-weight: 100; display:grid; grid-template-columns:85% 15%; " class="px-2 text-[12px] ">
|
|
18721
|
-
<div style="display:flex; gap:4px; align-items: center; " class="mr-5">
|
|
18722
|
-
|
|
18723
|
-
<div class='ml-2'> ${($e == null ? void 0 : $e.x) || ($e == null ? void 0 : $e.name) || ""}</div>
|
|
18724
|
-
</div>
|
|
18725
|
-
<div class="mr-[10px] w-full flex justify-end"> ${($e == null ? void 0 : $e.metric) || 0} </div>
|
|
18726
|
-
</div>
|
|
18727
|
-
|
|
18728
|
-
</div>`
|
|
18729
|
-
).setMaxWidth("0").addTo(this.map);
|
|
18730
|
-
} catch (Ze) {
|
|
18731
|
-
console.error(Ze);
|
|
18704
|
+
this.map.getCanvas().style.cursor = "pointer", this.popupElement && this.popupElement.remove(), this.popupElement = document.createElement("div"), this.popupElement.className = "absolute z-10 bg-white border border-gray-300 rounded-lg shadow-lg p-2 min-w-[180px] text-gray-800", this.popupElement.innerHTML = `
|
|
18705
|
+
<div class="font-semibold text-sm border-b pb-1 mb-2">Info</div>
|
|
18706
|
+
<div class="flex justify-between items-center text-[12px]">
|
|
18707
|
+
<div>${(Le == null ? void 0 : Le.x) || (Le == null ? void 0 : Le.name) || ""}</div>
|
|
18708
|
+
<div>${(Le == null ? void 0 : Le.metric) || 0}</div>
|
|
18709
|
+
</div>
|
|
18710
|
+
`;
|
|
18711
|
+
const Ge = this.map.project(te.lngLat);
|
|
18712
|
+
this.popupElement.style.left = `${Ge.x - 90}px`, this.popupElement.style.top = `${Ge.y - 80}px`, this.map.getContainer().appendChild(this.popupElement);
|
|
18713
|
+
} catch (me) {
|
|
18714
|
+
console.error(me);
|
|
18732
18715
|
}
|
|
18733
18716
|
}
|
|
18734
18717
|
}
|