@nika-js/onlymap 0.12.1 → 0.13.1
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/CHANGELOG.md +29 -0
- package/README.md +1 -1
- package/dist/{basemap-BK25o5OE.js → basemap-zG1-omic.js} +473 -443
- package/dist/basemap.d.ts +16 -3
- package/dist/build-Bbi4SleC.js +208 -0
- package/dist/cartograph.js +43 -41
- package/dist/cartograph.standalone.js +3 -1
- package/dist/client-CIH6ToMI.js +6878 -0
- package/dist/{geoparquet-CLydPm2f.js → geoparquet-CyWsYt9S.js} +1 -1
- package/dist/{globe-view-ChuX60M5.js → globe-view-Xelgj_KW.js} +6 -6
- package/dist/{hillshade-DD8WFrvf.js → hillshade-Zbg50lm6.js} +79 -67
- package/dist/hillshade.d.ts +7 -0
- package/dist/html-data.d.ts +1 -1
- package/dist/{index-CgVFHEdM.js → index-6eeSlSqN.js} +3 -3
- package/dist/{index-CMKrghNb.js → index-BL_YCKiW.js} +54 -54
- package/dist/{index-C2CKUsom.js → index-BbVnkgld.js} +38 -38
- package/dist/{index-CvrH6mbS.js → index-BtRsa5oc.js} +3 -3
- package/dist/{index-DIzzRLKr.js → index-BwtXeP_F.js} +1 -1
- package/dist/{index-Dvwr1Y3o.js → index-ClAPAqcm.js} +49 -49
- package/dist/{index-Bs69fn8a.js → index-CpFNIkOO.js} +33429 -30673
- package/dist/{index-CdAf0bLj.js → index-DnCmvLuC.js} +42 -42
- package/dist/index-JFuN4DCn.js +4449 -0
- package/dist/layer-registry.d.ts +1 -0
- package/dist/{lerc-mAijS40k.js → lerc-C3SKC6CU.js} +1 -1
- package/dist/onlymap.standalone.js +60762 -51701
- package/dist/onlymapjs.js +47 -47
- package/dist/plane-gpu/gpu-layer-types.d.ts +35 -0
- package/dist/plane-gpu/plane-basemap.d.ts +10461 -0
- package/dist/plane-gpu/plane-gpu-view.d.ts +90 -0
- package/dist/plane-gpu/projection-params.d.ts +47 -0
- package/dist/plane-layers.d.ts +2 -0
- package/dist/plane-seam.d.ts +48 -0
- package/dist/plane-tileset.d.ts +23 -2
- package/dist/plane-vector/build.d.ts +107 -0
- package/dist/plane-vector/client.d.ts +18 -0
- package/dist/plane-vector/cut-ends-extension.d.ts +30 -0
- package/dist/plane-vector/plane-mvt-layer.d.ts +10412 -0
- package/dist/plane-vector/tile-cut.d.ts +45 -0
- package/dist/plane-vector/worker.d.ts +15 -0
- package/dist/plane-warp.d.ts +12 -1
- package/dist/{post-process-effect-rwFDi8di.js → post-process-effect-C3P9VwC9.js} +11 -11
- package/dist/programmatic.d.ts +6 -0
- package/dist/projection.d.ts +51 -0
- package/dist/{raster-CXIqf83L.js → raster-BgCnz9-Z.js} +3 -3
- package/dist/{raster-pipeline-CfSg2Re7.js → raster-pipeline-CKdpKgFo.js} +1 -1
- package/dist/react/om-map.d.ts +4 -0
- package/dist/react.js +259 -252
- package/dist/runtime-core.d.ts +84 -2
- package/dist/{text-on-path-B08PekFz.js → text-on-path-BpVLX8Yt.js} +74 -66
- package/dist/version.d.ts +1 -1
- package/dist/{zarr-CUn2udOc.js → zarr-Cur_pzNa.js} +2 -2
- package/docs/cartograph.md +2 -2
- package/docs/cartography.md +59 -3
- package/docs/testing.md +2 -1
- package/llms.txt +2 -2
- package/onlymapjs.attributes.json +1 -0
- package/onlymapjs.html-data.json +15 -1
- package/package.json +3 -2
- package/skills/onlymapjs/SKILL.md +2 -2
- package/skills/onlymapjs/references/syntax.md +7 -6
- package/dist/index-BHRpKnGi.js +0 -4883
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as iy } from "./globe-view-
|
|
1
|
+
import { aQ as Y_, N as Ou, H as Id, k as K_, aR as J_, aS as Q_, D as Yf, Z as ey, aT as ty } from "./index-CpFNIkOO.js";
|
|
2
|
+
import { a as iy } from "./globe-view-Xelgj_KW.js";
|
|
3
3
|
const ry = /* @__PURE__ */ new Set(["tile.openstreetmap.org", "a.tile.openstreetmap.org", "b.tile.openstreetmap.org", "c.tile.openstreetmap.org"]);
|
|
4
|
-
function ny(
|
|
4
|
+
function ny(Me) {
|
|
5
5
|
let Q;
|
|
6
6
|
try {
|
|
7
|
-
Q = new URL(
|
|
7
|
+
Q = new URL(Me).hostname.toLowerCase();
|
|
8
8
|
} catch {
|
|
9
9
|
return;
|
|
10
10
|
}
|
|
11
11
|
if (ry.has(Q))
|
|
12
|
-
return { url:
|
|
12
|
+
return { url: Me, headers: { "X-Requested-With": "XMLHttpRequest" } };
|
|
13
13
|
}
|
|
14
14
|
var Vu = { exports: {} };
|
|
15
15
|
/**
|
|
@@ -18,15 +18,15 @@ var Vu = { exports: {} };
|
|
|
18
18
|
*/
|
|
19
19
|
var sy = Vu.exports, Kf;
|
|
20
20
|
function oy() {
|
|
21
|
-
return Kf || (Kf = 1, (function(
|
|
22
|
-
(function(
|
|
23
|
-
|
|
21
|
+
return Kf || (Kf = 1, (function(Me, Q) {
|
|
22
|
+
(function(pe, Pe) {
|
|
23
|
+
Me.exports = Pe();
|
|
24
24
|
})(sy, (function() {
|
|
25
|
-
var
|
|
25
|
+
var pe = {}, Pe = {};
|
|
26
26
|
function Ce(R, h, ge) {
|
|
27
|
-
if (
|
|
28
|
-
var rt = "var sharedModule = {}; (" +
|
|
29
|
-
return
|
|
27
|
+
if (Pe[R] = ge, R === "index") {
|
|
28
|
+
var rt = "var sharedModule = {}; (" + Pe.shared + ")(sharedModule); (" + Pe.worker + ")(sharedModule);", Kt = {};
|
|
29
|
+
return Pe.shared(Kt), Pe.index(pe, Kt), typeof window < "u" && pe.setWorkerUrl(window.URL.createObjectURL(new Blob([rt], { type: "text/javascript" }))), pe;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
Ce("shared", ["exports"], (function(R) {
|
|
@@ -188,7 +188,7 @@ function oy() {
|
|
|
188
188
|
}
|
|
189
189
|
return Xe || !1;
|
|
190
190
|
}
|
|
191
|
-
var
|
|
191
|
+
var fe = 1e-6, jt = typeof Float32Array < "u" ? Float32Array : Array;
|
|
192
192
|
function Jr() {
|
|
193
193
|
var r = new jt(9);
|
|
194
194
|
return jt != Float32Array && (r[1] = 0, r[2] = 0, r[3] = 0, r[5] = 0, r[6] = 0, r[7] = 0), r[0] = 1, r[4] = 1, r[8] = 1, r;
|
|
@@ -3477,12 +3477,12 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
3477
3477
|
}
|
|
3478
3478
|
}
|
|
3479
3479
|
const dr = {};
|
|
3480
|
-
function
|
|
3480
|
+
function Ee(r, e, i = {}) {
|
|
3481
3481
|
if (dr[r]) throw new Error(`${r} is already registered.`);
|
|
3482
3482
|
Object.defineProperty(e, "_classRegistryKey", { value: r, writeable: !1 }), dr[r] = { klass: e, omit: i.omit || [], shallow: i.shallow || [] };
|
|
3483
3483
|
}
|
|
3484
|
-
|
|
3485
|
-
for (const r in Qn) Qn[r]._classRegistryKey ||
|
|
3484
|
+
Ee("Object", Object), Ee("Set", Set), Ee("TransferableGridIndex", br), Ee("Color", Ze), Ee("Error", Error), Ee("AJAXError", Fn), Ee("ResolvedImage", Ri), Ee("StylePropertyFunction", $o), Ee("StyleExpression", Os, { omit: ["_evaluator"] }), Ee("ZoomDependentExpression", Go), Ee("ZoomConstantExpression", Uo), Ee("CompoundExpression", qi, { omit: ["_evaluate"] });
|
|
3485
|
+
for (const r in Qn) Qn[r]._classRegistryKey || Ee(`Expression_${r}`, Qn[r]);
|
|
3486
3486
|
function eu(r) {
|
|
3487
3487
|
var e;
|
|
3488
3488
|
return r && typeof ArrayBuffer < "u" && (r instanceof ArrayBuffer || ((e = r.constructor) === null || e === void 0 ? void 0 : e.name) === "ArrayBuffer");
|
|
@@ -3914,7 +3914,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
3914
3914
|
}
|
|
3915
3915
|
}
|
|
3916
3916
|
}
|
|
3917
|
-
|
|
3917
|
+
Ee("DataDrivenProperty", Re), Ee("DataConstantProperty", De), Ee("CrossFadedDataDrivenProperty", Gr), Ee("CrossFadedProperty", lu), Ee("ColorRampProperty", as);
|
|
3918
3918
|
const cu = " is a PAINT property not a LAYOUT property. Use get/setPaintProperty instead?", Ko = " is a LAYOUT property not a PAINT property. Use get/setLayoutProperty instead?";
|
|
3919
3919
|
class Hi extends go {
|
|
3920
3920
|
constructor(e, i, s) {
|
|
@@ -4111,7 +4111,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4111
4111
|
return this.int16[o + 0] = i, this.int16[o + 1] = s, e;
|
|
4112
4112
|
}
|
|
4113
4113
|
}
|
|
4114
|
-
eo.prototype.bytesPerElement = 4,
|
|
4114
|
+
eo.prototype.bytesPerElement = 4, Ee("StructArrayLayout2i4", eo);
|
|
4115
4115
|
class Jo extends xt {
|
|
4116
4116
|
_refreshViews() {
|
|
4117
4117
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
|
|
@@ -4125,7 +4125,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4125
4125
|
return this.int16[l + 0] = i, this.int16[l + 1] = s, this.int16[l + 2] = o, e;
|
|
4126
4126
|
}
|
|
4127
4127
|
}
|
|
4128
|
-
Jo.prototype.bytesPerElement = 6,
|
|
4128
|
+
Jo.prototype.bytesPerElement = 6, Ee("StructArrayLayout3i6", Jo);
|
|
4129
4129
|
class Qo extends xt {
|
|
4130
4130
|
_refreshViews() {
|
|
4131
4131
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
|
|
@@ -4139,7 +4139,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4139
4139
|
return this.int16[u + 0] = i, this.int16[u + 1] = s, this.int16[u + 2] = o, this.int16[u + 3] = l, e;
|
|
4140
4140
|
}
|
|
4141
4141
|
}
|
|
4142
|
-
Qo.prototype.bytesPerElement = 8,
|
|
4142
|
+
Qo.prototype.bytesPerElement = 8, Ee("StructArrayLayout4i8", Qo);
|
|
4143
4143
|
class ea extends xt {
|
|
4144
4144
|
_refreshViews() {
|
|
4145
4145
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
|
|
@@ -4153,7 +4153,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4153
4153
|
return this.int16[g + 0] = i, this.int16[g + 1] = s, this.int16[g + 2] = o, this.int16[g + 3] = l, this.int16[g + 4] = u, this.int16[g + 5] = p, e;
|
|
4154
4154
|
}
|
|
4155
4155
|
}
|
|
4156
|
-
ea.prototype.bytesPerElement = 12,
|
|
4156
|
+
ea.prototype.bytesPerElement = 12, Ee("StructArrayLayout2i4i12", ea);
|
|
4157
4157
|
class zl extends xt {
|
|
4158
4158
|
_refreshViews() {
|
|
4159
4159
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
|
|
@@ -4167,7 +4167,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4167
4167
|
return this.int16[g + 0] = i, this.int16[g + 1] = s, this.uint8[m + 4] = o, this.uint8[m + 5] = l, this.uint8[m + 6] = u, this.uint8[m + 7] = p, e;
|
|
4168
4168
|
}
|
|
4169
4169
|
}
|
|
4170
|
-
zl.prototype.bytesPerElement = 8,
|
|
4170
|
+
zl.prototype.bytesPerElement = 8, Ee("StructArrayLayout2i4ub8", zl);
|
|
4171
4171
|
class to extends xt {
|
|
4172
4172
|
_refreshViews() {
|
|
4173
4173
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
|
|
@@ -4181,7 +4181,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4181
4181
|
return this.float32[o + 0] = i, this.float32[o + 1] = s, e;
|
|
4182
4182
|
}
|
|
4183
4183
|
}
|
|
4184
|
-
to.prototype.bytesPerElement = 8,
|
|
4184
|
+
to.prototype.bytesPerElement = 8, Ee("StructArrayLayout2f8", to);
|
|
4185
4185
|
class Sr extends xt {
|
|
4186
4186
|
_refreshViews() {
|
|
4187
4187
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
|
|
@@ -4195,7 +4195,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4195
4195
|
return this.uint16[T + 0] = i, this.uint16[T + 1] = s, this.uint16[T + 2] = o, this.uint16[T + 3] = l, this.uint16[T + 4] = u, this.uint16[T + 5] = p, this.uint16[T + 6] = g, this.uint16[T + 7] = m, this.uint16[T + 8] = v, this.uint16[T + 9] = _, e;
|
|
4196
4196
|
}
|
|
4197
4197
|
}
|
|
4198
|
-
Sr.prototype.bytesPerElement = 20,
|
|
4198
|
+
Sr.prototype.bytesPerElement = 20, Ee("StructArrayLayout10ui20", Sr);
|
|
4199
4199
|
class ta extends xt {
|
|
4200
4200
|
_refreshViews() {
|
|
4201
4201
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
|
|
@@ -4209,7 +4209,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4209
4209
|
return this.uint16[v + 0] = i, this.uint16[v + 1] = s, this.uint16[v + 2] = o, this.uint16[v + 3] = l, this.uint16[v + 4] = u, this.uint16[v + 5] = p, this.uint16[v + 6] = g, this.uint16[v + 7] = m, e;
|
|
4210
4210
|
}
|
|
4211
4211
|
}
|
|
4212
|
-
ta.prototype.bytesPerElement = 16,
|
|
4212
|
+
ta.prototype.bytesPerElement = 16, Ee("StructArrayLayout8ui16", ta);
|
|
4213
4213
|
class io extends xt {
|
|
4214
4214
|
_refreshViews() {
|
|
4215
4215
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
|
|
@@ -4223,7 +4223,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4223
4223
|
return this.int16[I + 0] = i, this.int16[I + 1] = s, this.int16[I + 2] = o, this.int16[I + 3] = l, this.uint16[I + 4] = u, this.uint16[I + 5] = p, this.uint16[I + 6] = g, this.uint16[I + 7] = m, this.int16[I + 8] = v, this.int16[I + 9] = _, this.int16[I + 10] = T, this.int16[I + 11] = b, e;
|
|
4224
4224
|
}
|
|
4225
4225
|
}
|
|
4226
|
-
io.prototype.bytesPerElement = 24,
|
|
4226
|
+
io.prototype.bytesPerElement = 24, Ee("StructArrayLayout4i4ui4i24", io);
|
|
4227
4227
|
class ia extends xt {
|
|
4228
4228
|
_refreshViews() {
|
|
4229
4229
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
|
|
@@ -4237,7 +4237,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4237
4237
|
return this.float32[l + 0] = i, this.float32[l + 1] = s, this.float32[l + 2] = o, e;
|
|
4238
4238
|
}
|
|
4239
4239
|
}
|
|
4240
|
-
ia.prototype.bytesPerElement = 12,
|
|
4240
|
+
ia.prototype.bytesPerElement = 12, Ee("StructArrayLayout3f12", ia);
|
|
4241
4241
|
class ro extends xt {
|
|
4242
4242
|
_refreshViews() {
|
|
4243
4243
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer);
|
|
@@ -4250,7 +4250,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4250
4250
|
return this.uint32[1 * e + 0] = i, e;
|
|
4251
4251
|
}
|
|
4252
4252
|
}
|
|
4253
|
-
ro.prototype.bytesPerElement = 4,
|
|
4253
|
+
ro.prototype.bytesPerElement = 4, Ee("StructArrayLayout1ul4", ro);
|
|
4254
4254
|
class kl extends xt {
|
|
4255
4255
|
_refreshViews() {
|
|
4256
4256
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
|
|
@@ -4264,7 +4264,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4264
4264
|
return this.int16[_ + 0] = i, this.int16[_ + 1] = s, this.int16[_ + 2] = o, this.int16[_ + 3] = l, this.int16[_ + 4] = u, this.int16[_ + 5] = p, this.uint32[T + 3] = g, this.uint16[_ + 8] = m, this.uint16[_ + 9] = v, e;
|
|
4265
4265
|
}
|
|
4266
4266
|
}
|
|
4267
|
-
kl.prototype.bytesPerElement = 20,
|
|
4267
|
+
kl.prototype.bytesPerElement = 20, Ee("StructArrayLayout6i1ul2ui20", kl);
|
|
4268
4268
|
class ls extends xt {
|
|
4269
4269
|
_refreshViews() {
|
|
4270
4270
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
|
|
@@ -4278,7 +4278,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4278
4278
|
return this.int16[g + 0] = i, this.int16[g + 1] = s, this.int16[g + 2] = o, this.int16[g + 3] = l, this.int16[g + 4] = u, this.int16[g + 5] = p, e;
|
|
4279
4279
|
}
|
|
4280
4280
|
}
|
|
4281
|
-
ls.prototype.bytesPerElement = 12,
|
|
4281
|
+
ls.prototype.bytesPerElement = 12, Ee("StructArrayLayout2i2i2i12", ls);
|
|
4282
4282
|
class Pn extends xt {
|
|
4283
4283
|
_refreshViews() {
|
|
4284
4284
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
|
|
@@ -4292,7 +4292,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4292
4292
|
return this.float32[p + 0] = i, this.float32[p + 1] = s, this.float32[p + 2] = o, this.int16[g + 6] = l, this.int16[g + 7] = u, e;
|
|
4293
4293
|
}
|
|
4294
4294
|
}
|
|
4295
|
-
Pn.prototype.bytesPerElement = 16,
|
|
4295
|
+
Pn.prototype.bytesPerElement = 16, Ee("StructArrayLayout2f1f2i16", Pn);
|
|
4296
4296
|
class Rl extends xt {
|
|
4297
4297
|
_refreshViews() {
|
|
4298
4298
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
|
|
@@ -4306,7 +4306,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4306
4306
|
return this.uint8[g + 0] = i, this.uint8[g + 1] = s, this.float32[m + 1] = o, this.float32[m + 2] = l, this.int16[v + 6] = u, this.int16[v + 7] = p, e;
|
|
4307
4307
|
}
|
|
4308
4308
|
}
|
|
4309
|
-
Rl.prototype.bytesPerElement = 16,
|
|
4309
|
+
Rl.prototype.bytesPerElement = 16, Ee("StructArrayLayout2ub2f2i16", Rl);
|
|
4310
4310
|
class no extends xt {
|
|
4311
4311
|
_refreshViews() {
|
|
4312
4312
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
|
|
@@ -4320,7 +4320,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4320
4320
|
return this.uint16[l + 0] = i, this.uint16[l + 1] = s, this.uint16[l + 2] = o, e;
|
|
4321
4321
|
}
|
|
4322
4322
|
}
|
|
4323
|
-
no.prototype.bytesPerElement = 6,
|
|
4323
|
+
no.prototype.bytesPerElement = 6, Ee("StructArrayLayout3ui6", no);
|
|
4324
4324
|
class In extends xt {
|
|
4325
4325
|
_refreshViews() {
|
|
4326
4326
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
|
|
@@ -4334,7 +4334,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4334
4334
|
return this.int16[k + 0] = i, this.int16[k + 1] = s, this.uint16[k + 2] = o, this.uint16[k + 3] = l, this.uint32[F + 2] = u, this.uint32[F + 3] = p, this.uint32[F + 4] = g, this.uint16[k + 10] = m, this.uint16[k + 11] = v, this.uint16[k + 12] = _, this.float32[F + 7] = T, this.float32[F + 8] = b, this.uint8[O + 36] = I, this.uint8[O + 37] = M, this.uint8[O + 38] = A, this.uint32[F + 10] = D, this.int16[k + 22] = L, e;
|
|
4335
4335
|
}
|
|
4336
4336
|
}
|
|
4337
|
-
In.prototype.bytesPerElement = 48,
|
|
4337
|
+
In.prototype.bytesPerElement = 48, Ee("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48", In);
|
|
4338
4338
|
class Ll extends xt {
|
|
4339
4339
|
_refreshViews() {
|
|
4340
4340
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
|
|
@@ -4348,7 +4348,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4348
4348
|
return this.int16[re + 0] = i, this.int16[re + 1] = s, this.int16[re + 2] = o, this.int16[re + 3] = l, this.int16[re + 4] = u, this.int16[re + 5] = p, this.int16[re + 6] = g, this.int16[re + 7] = m, this.uint16[re + 8] = v, this.uint16[re + 9] = _, this.uint16[re + 10] = T, this.uint16[re + 11] = b, this.uint16[re + 12] = I, this.uint16[re + 13] = M, this.uint16[re + 14] = A, this.uint16[re + 15] = D, this.uint16[re + 16] = L, this.uint16[re + 17] = k, this.uint16[re + 18] = F, this.uint16[re + 19] = O, this.uint16[re + 20] = j, this.uint16[re + 21] = Y, this.uint16[re + 22] = J, this.uint32[_e + 12] = ne, this.float32[_e + 13] = ie, this.float32[_e + 14] = le, this.uint16[re + 30] = ce, this.uint16[re + 31] = se, e;
|
|
4349
4349
|
}
|
|
4350
4350
|
}
|
|
4351
|
-
Ll.prototype.bytesPerElement = 64,
|
|
4351
|
+
Ll.prototype.bytesPerElement = 64, Ee("StructArrayLayout8i15ui1ul2f2ui64", Ll);
|
|
4352
4352
|
class ra extends xt {
|
|
4353
4353
|
_refreshViews() {
|
|
4354
4354
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
|
|
@@ -4361,7 +4361,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4361
4361
|
return this.float32[1 * e + 0] = i, e;
|
|
4362
4362
|
}
|
|
4363
4363
|
}
|
|
4364
|
-
ra.prototype.bytesPerElement = 4,
|
|
4364
|
+
ra.prototype.bytesPerElement = 4, Ee("StructArrayLayout1f4", ra);
|
|
4365
4365
|
class na extends xt {
|
|
4366
4366
|
_refreshViews() {
|
|
4367
4367
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
|
|
@@ -4375,7 +4375,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4375
4375
|
return this.uint16[6 * e + 0] = i, this.float32[l + 1] = s, this.float32[l + 2] = o, e;
|
|
4376
4376
|
}
|
|
4377
4377
|
}
|
|
4378
|
-
na.prototype.bytesPerElement = 12,
|
|
4378
|
+
na.prototype.bytesPerElement = 12, Ee("StructArrayLayout1ui2f12", na);
|
|
4379
4379
|
class Fl extends xt {
|
|
4380
4380
|
_refreshViews() {
|
|
4381
4381
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
|
|
@@ -4389,7 +4389,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4389
4389
|
return this.uint32[2 * e + 0] = i, this.uint16[l + 2] = s, this.uint16[l + 3] = o, e;
|
|
4390
4390
|
}
|
|
4391
4391
|
}
|
|
4392
|
-
Fl.prototype.bytesPerElement = 8,
|
|
4392
|
+
Fl.prototype.bytesPerElement = 8, Ee("StructArrayLayout1ul2ui8", Fl);
|
|
4393
4393
|
class d extends xt {
|
|
4394
4394
|
_refreshViews() {
|
|
4395
4395
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
|
|
@@ -4403,7 +4403,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4403
4403
|
return this.uint16[o + 0] = i, this.uint16[o + 1] = s, e;
|
|
4404
4404
|
}
|
|
4405
4405
|
}
|
|
4406
|
-
d.prototype.bytesPerElement = 4,
|
|
4406
|
+
d.prototype.bytesPerElement = 4, Ee("StructArrayLayout2ui4", d);
|
|
4407
4407
|
class t extends xt {
|
|
4408
4408
|
_refreshViews() {
|
|
4409
4409
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
|
|
@@ -4416,7 +4416,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4416
4416
|
return this.uint16[1 * e + 0] = i, e;
|
|
4417
4417
|
}
|
|
4418
4418
|
}
|
|
4419
|
-
t.prototype.bytesPerElement = 2,
|
|
4419
|
+
t.prototype.bytesPerElement = 2, Ee("StructArrayLayout1ui2", t);
|
|
4420
4420
|
class n extends xt {
|
|
4421
4421
|
_refreshViews() {
|
|
4422
4422
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
|
|
@@ -4430,7 +4430,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4430
4430
|
return this.float32[u + 0] = i, this.float32[u + 1] = s, this.float32[u + 2] = o, this.float32[u + 3] = l, e;
|
|
4431
4431
|
}
|
|
4432
4432
|
}
|
|
4433
|
-
n.prototype.bytesPerElement = 16,
|
|
4433
|
+
n.prototype.bytesPerElement = 16, Ee("StructArrayLayout4f16", n);
|
|
4434
4434
|
class a extends Qs {
|
|
4435
4435
|
get anchorPointX() {
|
|
4436
4436
|
return this._structArray.int16[this._pos2 + 0];
|
|
@@ -4469,7 +4469,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4469
4469
|
return new a(this, e);
|
|
4470
4470
|
}
|
|
4471
4471
|
}
|
|
4472
|
-
|
|
4472
|
+
Ee("CollisionBoxArray", c);
|
|
4473
4473
|
class f extends Qs {
|
|
4474
4474
|
get anchorX() {
|
|
4475
4475
|
return this._structArray.int16[this._pos2 + 0];
|
|
@@ -4538,7 +4538,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4538
4538
|
return new f(this, e);
|
|
4539
4539
|
}
|
|
4540
4540
|
}
|
|
4541
|
-
|
|
4541
|
+
Ee("PlacedSymbolArray", y);
|
|
4542
4542
|
class x extends Qs {
|
|
4543
4543
|
get anchorX() {
|
|
4544
4544
|
return this._structArray.int16[this._pos2 + 0];
|
|
@@ -4634,13 +4634,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4634
4634
|
return new x(this, e);
|
|
4635
4635
|
}
|
|
4636
4636
|
}
|
|
4637
|
-
|
|
4637
|
+
Ee("SymbolInstanceArray", w);
|
|
4638
4638
|
class S extends ra {
|
|
4639
4639
|
getoffsetX(e) {
|
|
4640
4640
|
return this.float32[1 * e + 0];
|
|
4641
4641
|
}
|
|
4642
4642
|
}
|
|
4643
|
-
|
|
4643
|
+
Ee("GlyphOffsetArray", S);
|
|
4644
4644
|
class P extends Jo {
|
|
4645
4645
|
getx(e) {
|
|
4646
4646
|
return this.int16[3 * e + 0];
|
|
@@ -4652,7 +4652,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4652
4652
|
return this.int16[3 * e + 2];
|
|
4653
4653
|
}
|
|
4654
4654
|
}
|
|
4655
|
-
|
|
4655
|
+
Ee("SymbolLineVertexArray", P);
|
|
4656
4656
|
class E extends Qs {
|
|
4657
4657
|
get textAnchor() {
|
|
4658
4658
|
return this._structArray.uint16[this._pos2 + 0];
|
|
@@ -4670,7 +4670,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4670
4670
|
return new E(this, e);
|
|
4671
4671
|
}
|
|
4672
4672
|
}
|
|
4673
|
-
|
|
4673
|
+
Ee("TextAnchorOffsetArray", C);
|
|
4674
4674
|
class z extends Qs {
|
|
4675
4675
|
get featureIndex() {
|
|
4676
4676
|
return this._structArray.uint32[this._pos4 + 0];
|
|
@@ -4688,7 +4688,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4688
4688
|
return new z(this, e);
|
|
4689
4689
|
}
|
|
4690
4690
|
}
|
|
4691
|
-
|
|
4691
|
+
Ee("FeatureIndexArray", B);
|
|
4692
4692
|
class V extends eo {
|
|
4693
4693
|
}
|
|
4694
4694
|
class G extends eo {
|
|
@@ -4713,20 +4713,20 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4713
4713
|
}
|
|
4714
4714
|
class ae extends ls {
|
|
4715
4715
|
}
|
|
4716
|
-
class
|
|
4716
|
+
class me extends Rl {
|
|
4717
4717
|
}
|
|
4718
4718
|
class de extends no {
|
|
4719
4719
|
}
|
|
4720
4720
|
class Ae extends d {
|
|
4721
4721
|
}
|
|
4722
4722
|
const we = mt([{ name: "a_pos", components: 2, type: "Int16" }], 4), { members: he } = we;
|
|
4723
|
-
class
|
|
4723
|
+
class Ie {
|
|
4724
4724
|
constructor(e = []) {
|
|
4725
4725
|
this._forceNewSegmentOnNextPrepare = !1, this.segments = e;
|
|
4726
4726
|
}
|
|
4727
4727
|
prepareSegment(e, i, s, o) {
|
|
4728
4728
|
const l = this.segments[this.segments.length - 1];
|
|
4729
|
-
return e >
|
|
4729
|
+
return e > Ie.MAX_VERTEX_ARRAY_LENGTH && Jt(`Max vertices per segment is ${Ie.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${e}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${Ie.MAX_VERTEX_ARRAY_LENGTH} vertices.`), this._forceNewSegmentOnNextPrepare || !l || l.vertexLength + e > Ie.MAX_VERTEX_ARRAY_LENGTH || l.sortKey !== o ? this.createNewSegment(i, s, o) : l;
|
|
4730
4730
|
}
|
|
4731
4731
|
createNewSegment(e, i, s) {
|
|
4732
4732
|
const o = { vertexOffset: e.length, primitiveOffset: i.length, vertexLength: 0, primitiveLength: 0, vaos: {} };
|
|
@@ -4745,13 +4745,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4745
4745
|
for (const e of this.segments) for (const i in e.vaos) e.vaos[i].destroy();
|
|
4746
4746
|
}
|
|
4747
4747
|
static simpleSegment(e, i, s, o) {
|
|
4748
|
-
return new
|
|
4748
|
+
return new Ie([{ vertexOffset: e, primitiveOffset: i, vertexLength: s, primitiveLength: o, vaos: {}, sortKey: 0 }]);
|
|
4749
4749
|
}
|
|
4750
4750
|
}
|
|
4751
4751
|
function ke(r, e) {
|
|
4752
4752
|
return 256 * (r = fi(Math.floor(r), 0, 255)) + fi(Math.floor(e), 0, 255);
|
|
4753
4753
|
}
|
|
4754
|
-
|
|
4754
|
+
Ie.MAX_VERTEX_ARRAY_LENGTH = Math.pow(2, 16) - 1, Ee("SegmentVector", Ie);
|
|
4755
4755
|
const ot = mt([{ name: "a_pattern_from", components: 4, type: "Uint16" }, { name: "a_pattern_to", components: 4, type: "Uint16" }, { name: "a_pixel_ratio_from", components: 1, type: "Uint16" }, { name: "a_pixel_ratio_to", components: 1, type: "Uint16" }]), zt = mt([{ name: "a_dasharray_from", components: 4, type: "Uint16" }, { name: "a_dasharray_to", components: 4, type: "Uint16" }]);
|
|
4756
4756
|
var ut, Rt, Ft, oi = { exports: {} }, Mt = { exports: {} }, yi = { exports: {} }, ii = (function() {
|
|
4757
4757
|
if (Ft) return oi.exports;
|
|
@@ -4835,7 +4835,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4835
4835
|
const s = r[e];
|
|
4836
4836
|
r[e] = r[i], r[i] = s;
|
|
4837
4837
|
}
|
|
4838
|
-
|
|
4838
|
+
Ee("FeaturePositionMap", ai);
|
|
4839
4839
|
class li {
|
|
4840
4840
|
constructor(e, i) {
|
|
4841
4841
|
this.gl = e.gl, this.location = i;
|
|
@@ -5186,7 +5186,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5186
5186
|
})(r);
|
|
5187
5187
|
return o?.[i] || s[e][i];
|
|
5188
5188
|
}
|
|
5189
|
-
|
|
5189
|
+
Ee("ConstantBinder", Oi), Ee("CrossFadedConstantBinder", Xi), Ee("SourceExpressionBinder", bt), Ee("CrossFadedPatternBinder", wt), Ee("CrossFadedDasharrayBinder", Mn), Ee("CompositeExpressionBinder", gt), Ee("ProgramConfiguration", oa, { omit: ["_buffers"] }), Ee("ProgramConfigurationSet", Ir);
|
|
5190
5190
|
const Ol = Math.pow(2, 14) - 1, Hr = -Ol - 1;
|
|
5191
5191
|
function Xr(r) {
|
|
5192
5192
|
const e = Fe / r.extent, i = r.loadGeometry();
|
|
@@ -5205,7 +5205,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5205
5205
|
}
|
|
5206
5206
|
class aa {
|
|
5207
5207
|
constructor(e) {
|
|
5208
|
-
this.zoom = e.zoom, this.overscaling = e.overscaling, this.layers = e.layers, this.layerIds = this.layers.map(((i) => i.id)), this.index = e.index, this.hasDependencies = !1, this.layoutVertexArray = new G(), this.indexArray = new de(), this.segments = new
|
|
5208
|
+
this.zoom = e.zoom, this.overscaling = e.overscaling, this.layers = e.layers, this.layerIds = this.layers.map(((i) => i.id)), this.index = e.index, this.hasDependencies = !1, this.layoutVertexArray = new G(), this.indexArray = new de(), this.segments = new Ie(), this.programConfigurations = new Ir(e.layers, e.zoom), this.stateDependentLayerIds = this.layers.filter(((i) => i.isStateDependent())).map(((i) => i.id));
|
|
5209
5209
|
}
|
|
5210
5210
|
populate(e, i, s) {
|
|
5211
5211
|
const o = this.layers[0], l = [];
|
|
@@ -5389,7 +5389,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5389
5389
|
return new ge((0.5 * o.x + 0.5) * e.width, (0.5 * -o.y + 0.5) * e.height);
|
|
5390
5390
|
}
|
|
5391
5391
|
let Dd, zd;
|
|
5392
|
-
|
|
5392
|
+
Ee("CircleBucket", aa, { omit: ["layers"] });
|
|
5393
5393
|
var um = { get paint() {
|
|
5394
5394
|
return zd = zd || new _i({ "circle-radius": new Re(ue.paint_circle["circle-radius"]), "circle-color": new Re(ue.paint_circle["circle-color"]), "circle-blur": new Re(ue.paint_circle["circle-blur"]), "circle-opacity": new Re(ue.paint_circle["circle-opacity"]), "circle-translate": new De(ue.paint_circle["circle-translate"]), "circle-translate-anchor": new De(ue.paint_circle["circle-translate-anchor"]), "circle-pitch-scale": new De(ue.paint_circle["circle-pitch-scale"]), "circle-pitch-alignment": new De(ue.paint_circle["circle-pitch-alignment"]), "circle-stroke-width": new Re(ue.paint_circle["circle-stroke-width"]), "circle-stroke-color": new Re(ue.paint_circle["circle-stroke-color"]), "circle-stroke-opacity": new Re(ue.paint_circle["circle-stroke-opacity"]) });
|
|
5395
5395
|
}, get layout() {
|
|
@@ -5417,7 +5417,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5417
5417
|
class kd extends aa {
|
|
5418
5418
|
}
|
|
5419
5419
|
let Rd;
|
|
5420
|
-
|
|
5420
|
+
Ee("HeatmapBucket", kd, { omit: ["layers"] });
|
|
5421
5421
|
var dm = { get paint() {
|
|
5422
5422
|
return Rd = Rd || new _i({ "heatmap-radius": new Re(ue.paint_heatmap["heatmap-radius"]), "heatmap-weight": new Re(ue.paint_heatmap["heatmap-weight"]), "heatmap-intensity": new De(ue.paint_heatmap["heatmap-intensity"]), "heatmap-color": new as(ue.paint_heatmap["heatmap-color"]), "heatmap-opacity": new De(ue.paint_heatmap["heatmap-opacity"]) });
|
|
5423
5423
|
} };
|
|
@@ -5503,7 +5503,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5503
5503
|
else for (let u = 0, p = 0; u < i; u++, p += 4) l(0, p, u / (i - 1));
|
|
5504
5504
|
return o;
|
|
5505
5505
|
}
|
|
5506
|
-
|
|
5506
|
+
Ee("AlphaImage", Nl), Ee("RGBAImage", Vi);
|
|
5507
5507
|
const xh = "big-fb";
|
|
5508
5508
|
class pm extends Hi {
|
|
5509
5509
|
createBucket(e) {
|
|
@@ -5667,7 +5667,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5667
5667
|
const i = e[0], s = e[1], o = e[2], l = e[3], u = Math.min(i, s, o), p = Math.round((r + l) / u);
|
|
5668
5668
|
return { r: Math.floor(p * u / i) % 256, g: Math.floor(p * u / s) % 256, b: Math.floor(p * u / o) % 256 };
|
|
5669
5669
|
}
|
|
5670
|
-
|
|
5670
|
+
Ee("DEMData", Nd);
|
|
5671
5671
|
class _m extends Hi {
|
|
5672
5672
|
constructor(e, i) {
|
|
5673
5673
|
super(e, gm, i);
|
|
@@ -5952,7 +5952,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5952
5952
|
this.fill = e.fill, this.line = e.line, this.tile = e.tile, this.stencil = e.stencil, this.circle = e.circle;
|
|
5953
5953
|
}
|
|
5954
5954
|
}
|
|
5955
|
-
yu.noSubdivision = new yu({ fill: new da(0, 0), line: new da(0, 0), tile: new da(0, 0), stencil: new da(0, 0), circle: 1 }),
|
|
5955
|
+
yu.noSubdivision = new yu({ fill: new da(0, 0), line: new da(0, 0), tile: new da(0, 0), stencil: new da(0, 0), circle: 1 }), Ee("SubdivisionGranularityExpression", da), Ee("SubdivisionGranularitySetting", yu);
|
|
5956
5956
|
const pa = -32768, ql = 32767;
|
|
5957
5957
|
class Cm {
|
|
5958
5958
|
constructor(e, i) {
|
|
@@ -6188,7 +6188,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6188
6188
|
}
|
|
6189
6189
|
function Xd(r, e, i, s, o, l, u, p, g) {
|
|
6190
6190
|
const m = o.length / 2, v = u && p && g;
|
|
6191
|
-
if (m <
|
|
6191
|
+
if (m < Ie.MAX_VERTEX_ARRAY_LENGTH) {
|
|
6192
6192
|
const _ = e.prepareSegment(m, i, s), T = _.vertexLength;
|
|
6193
6193
|
for (let M = 0; M < l.length; M += 3) s.emplaceBack(T + l[M], T + l[M + 1], T + l[M + 2]);
|
|
6194
6194
|
let b, I;
|
|
@@ -6206,7 +6206,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6206
6206
|
for (let j = 2; j < M.length; j += 3) {
|
|
6207
6207
|
const Y = M[j - 2], J = M[j - 1], ne = M[j];
|
|
6208
6208
|
let ie = D[Y] < k, le = D[J] < k, ce = D[ne] < k;
|
|
6209
|
-
F.vertexLength + ((ie ? 1 : 0) + (le ? 1 : 0) + (ce ? 1 : 0)) >
|
|
6209
|
+
F.vertexLength + ((ie ? 1 : 0) + (le ? 1 : 0) + (ce ? 1 : 0)) > Ie.MAX_VERTEX_ARRAY_LENGTH && (F = _.createNewSegment(T, b), k = L.count, ie = !0, le = !0, ce = !0, O = 0);
|
|
6210
6210
|
const se = Wl(D, I, A, L, Y, ie, F), re = Wl(D, I, A, L, J, le, F), _e = Wl(D, I, A, L, ne, ce, F);
|
|
6211
6211
|
b.emplaceBack(O + se - k, O + re - k, O + _e - k), F.primitiveLength++;
|
|
6212
6212
|
}
|
|
@@ -6218,7 +6218,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6218
6218
|
for (const j of M) for (let Y = 1; Y < j.length; Y += 2) {
|
|
6219
6219
|
const J = j[Y - 1], ne = j[Y];
|
|
6220
6220
|
let ie = D[J] < k, le = D[ne] < k;
|
|
6221
|
-
F.vertexLength + ((ie ? 1 : 0) + (le ? 1 : 0)) >
|
|
6221
|
+
F.vertexLength + ((ie ? 1 : 0) + (le ? 1 : 0)) > Ie.MAX_VERTEX_ARRAY_LENGTH && (F = _.createNewSegment(T, b), k = L.count, ie = !0, le = !0, O = 0);
|
|
6222
6222
|
const ce = Wl(D, I, A, L, J, ie, F), se = Wl(D, I, A, L, ne, le, F);
|
|
6223
6223
|
b.emplaceBack(O + ce - k, O + se - k), F.primitiveLength++;
|
|
6224
6224
|
}
|
|
@@ -6233,7 +6233,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6233
6233
|
}
|
|
6234
6234
|
class Ph {
|
|
6235
6235
|
constructor(e) {
|
|
6236
|
-
this.zoom = e.zoom, this.overscaling = e.overscaling, this.layers = e.layers, this.layerIds = this.layers.map(((i) => i.id)), this.index = e.index, this.hasDependencies = !1, this.patternFeatures = [], this.layoutVertexArray = new N(), this.indexArray = new de(), this.indexArray2 = new Ae(), this.programConfigurations = new Ir(e.layers, e.zoom), this.segments = new
|
|
6236
|
+
this.zoom = e.zoom, this.overscaling = e.overscaling, this.layers = e.layers, this.layerIds = this.layers.map(((i) => i.id)), this.index = e.index, this.hasDependencies = !1, this.patternFeatures = [], this.layoutVertexArray = new N(), this.indexArray = new de(), this.indexArray2 = new Ae(), this.programConfigurations = new Ir(e.layers, e.zoom), this.segments = new Ie(), this.segments2 = new Ie(), this.stateDependentLayerIds = this.layers.filter(((i) => i.isStateDependent())).map(((i) => i.id));
|
|
6237
6237
|
}
|
|
6238
6238
|
populate(e, i, s) {
|
|
6239
6239
|
this.hasDependencies = mu("fill", this.layers, i);
|
|
@@ -6283,7 +6283,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6283
6283
|
}
|
|
6284
6284
|
}
|
|
6285
6285
|
let Yd, Kd;
|
|
6286
|
-
|
|
6286
|
+
Ee("FillBucket", Ph, { omit: ["layers", "patternFeatures"] });
|
|
6287
6287
|
var Dm = { get paint() {
|
|
6288
6288
|
return Kd = Kd || new _i({ "fill-antialias": new De(ue.paint_fill["fill-antialias"]), "fill-opacity": new Re(ue.paint_fill["fill-opacity"]), "fill-color": new Re(ue.paint_fill["fill-color"]), "fill-outline-color": new Re(ue.paint_fill["fill-outline-color"]), "fill-translate": new De(ue.paint_fill["fill-translate"]), "fill-translate-anchor": new De(ue.paint_fill["fill-translate-anchor"]), "fill-pattern": new Gr(ue.paint_fill["fill-pattern"]) });
|
|
6289
6289
|
}, get layout() {
|
|
@@ -6444,7 +6444,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6444
6444
|
}
|
|
6445
6445
|
class Mh {
|
|
6446
6446
|
constructor(e) {
|
|
6447
|
-
this.zoom = e.zoom, this.overscaling = e.overscaling, this.layers = e.layers, this.layerIds = this.layers.map(((i) => i.id)), this.index = e.index, this.hasDependencies = !1, this.layoutVertexArray = new $(), this.centroidVertexArray = new V(), this.indexArray = new de(), this.programConfigurations = new Ir(e.layers, e.zoom), this.segments = new
|
|
6447
|
+
this.zoom = e.zoom, this.overscaling = e.overscaling, this.layers = e.layers, this.layerIds = this.layers.map(((i) => i.id)), this.index = e.index, this.hasDependencies = !1, this.layoutVertexArray = new $(), this.centroidVertexArray = new V(), this.indexArray = new de(), this.programConfigurations = new Ir(e.layers, e.zoom), this.segments = new Ie(), this.stateDependentLayerIds = this.layers.filter(((i) => i.isStateDependent())).map(((i) => i.id));
|
|
6448
6448
|
}
|
|
6449
6449
|
populate(e, i, s) {
|
|
6450
6450
|
this.features = [], this.hasDependencies = mu("fill-extrusion", this.layers, i);
|
|
@@ -6505,7 +6505,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6505
6505
|
for (let o = 1; o < e.length; o++) {
|
|
6506
6506
|
const l = e[o], u = e[o - 1];
|
|
6507
6507
|
if (Um(l, u)) continue;
|
|
6508
|
-
i.segment.vertexLength + 4 >
|
|
6508
|
+
i.segment.vertexLength + 4 > Ie.MAX_VERTEX_ARRAY_LENGTH && (i.segment = this.segments.prepareSegment(4, this.layoutVertexArray, this.indexArray));
|
|
6509
6509
|
const p = l.sub(u)._perp()._unit(), g = u.dist(l);
|
|
6510
6510
|
s + g > 32768 && (s = 0), Xl(this.layoutVertexArray, l.x, l.y, p.x, p.y, 0, 0, s), Xl(this.layoutVertexArray, l.x, l.y, p.x, p.y, 0, 1, s), s += g, Xl(this.layoutVertexArray, u.x, u.y, p.x, p.y, 0, 0, s), Xl(this.layoutVertexArray, u.x, u.y, p.x, p.y, 0, 1, s);
|
|
6511
6511
|
const m = i.segment.vertexLength;
|
|
@@ -6526,7 +6526,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6526
6526
|
return r.every(((e) => e.x < 0)) || r.every(((e) => e.x > Fe)) || r.every(((e) => e.y < 0)) || r.every(((e) => e.y > Fe));
|
|
6527
6527
|
}
|
|
6528
6528
|
let tp;
|
|
6529
|
-
|
|
6529
|
+
Ee("FillExtrusionBucket", Mh, { omit: ["layers", "features"] });
|
|
6530
6530
|
var Gm = { get paint() {
|
|
6531
6531
|
return tp = tp || new _i({ "fill-extrusion-opacity": new De(ue["paint_fill-extrusion"]["fill-extrusion-opacity"]), "fill-extrusion-color": new Re(ue["paint_fill-extrusion"]["fill-extrusion-color"]), "fill-extrusion-translate": new De(ue["paint_fill-extrusion"]["fill-extrusion-translate"]), "fill-extrusion-translate-anchor": new De(ue["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]), "fill-extrusion-pattern": new Gr(ue["paint_fill-extrusion"]["fill-extrusion-pattern"]), "fill-extrusion-height": new Re(ue["paint_fill-extrusion"]["fill-extrusion-height"]), "fill-extrusion-base": new Re(ue["paint_fill-extrusion"]["fill-extrusion-base"]), "fill-extrusion-vertical-gradient": new De(ue["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"]) });
|
|
6532
6532
|
} };
|
|
@@ -7398,7 +7398,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7398
7398
|
constructor(e) {
|
|
7399
7399
|
this.zoom = e.zoom, this.overscaling = e.overscaling, this.layers = e.layers, this.layerIds = this.layers.map(((i) => i.id)), this.index = e.index, this.hasDependencies = !1, this.patternFeatures = [], this.lineClipsArray = [], this.gradients = {};
|
|
7400
7400
|
for (const i of this.layers) this.gradients[i.id] = {};
|
|
7401
|
-
this.layoutVertexArray = new X(), this.layoutVertexArray2 = new Z(), this.indexArray = new de(), this.programConfigurations = new Ir(e.layers, e.zoom), this.segments = new
|
|
7401
|
+
this.layoutVertexArray = new X(), this.layoutVertexArray2 = new Z(), this.indexArray = new de(), this.programConfigurations = new Ir(e.layers, e.zoom), this.segments = new Ie(), this.maxLineLength = 0, this.stateDependentLayerIds = this.layers.filter(((i) => i.isStateDependent())).map(((i) => i.id));
|
|
7402
7402
|
}
|
|
7403
7403
|
populate(e, i, s) {
|
|
7404
7404
|
this.hasDependencies = mu("line", this.layers, i) || this.hasLineDasharray(this.layers);
|
|
@@ -7543,7 +7543,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7543
7543
|
}
|
|
7544
7544
|
}
|
|
7545
7545
|
let _p, yp;
|
|
7546
|
-
|
|
7546
|
+
Ee("LineBucket", Gh, { omit: ["layers", "patternFeatures"] });
|
|
7547
7547
|
var vp = { get paint() {
|
|
7548
7548
|
return yp = yp || new _i({ "line-opacity": new Re(ue.paint_line["line-opacity"]), "line-color": new Re(ue.paint_line["line-color"]), "line-translate": new De(ue.paint_line["line-translate"]), "line-translate-anchor": new De(ue.paint_line["line-translate-anchor"]), "line-width": new Re(ue.paint_line["line-width"]), "line-gap-width": new Re(ue.paint_line["line-gap-width"]), "line-offset": new Re(ue.paint_line["line-offset"]), "line-blur": new Re(ue.paint_line["line-blur"]), "line-dasharray": new Gr(ue.paint_line["line-dasharray"]), "line-pattern": new Gr(ue.paint_line["line-pattern"]), "line-gradient": new as(ue.paint_line["line-gradient"]) });
|
|
7549
7549
|
}, get layout() {
|
|
@@ -8350,7 +8350,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8350
8350
|
const I = e.top * l, M = e.bottom * l;
|
|
8351
8351
|
return i === "height" || i === "both" ? (v = o[1] + I - s[0], T = o[1] + M + s[2]) : (v = o[1] + (I + M - u.displaySize[1]) / 2, T = v + u.displaySize[1]), { image: u, top: v, right: _, bottom: T, left: b, collisionPadding: p };
|
|
8352
8352
|
}
|
|
8353
|
-
|
|
8353
|
+
Ee("ImagePosition", Zh), Ee("ImageAtlas", Ap), R.ax = void 0, (cs = R.ax || (R.ax = {}))[cs.none = 0] = "none", cs[cs.horizontal = 1] = "horizontal", cs[cs.vertical = 2] = "vertical", cs[cs.horizontalOnly = 3] = "horizontalOnly";
|
|
8354
8354
|
const Cn = 128, us = 32640;
|
|
8355
8355
|
function Rp(r, e) {
|
|
8356
8356
|
const { expression: i } = e;
|
|
@@ -8387,7 +8387,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8387
8387
|
}
|
|
8388
8388
|
class Xh {
|
|
8389
8389
|
constructor(e) {
|
|
8390
|
-
this.layoutVertexArray = new q(), this.indexArray = new de(), this.programConfigurations = e, this.segments = new
|
|
8390
|
+
this.layoutVertexArray = new q(), this.indexArray = new de(), this.programConfigurations = e, this.segments = new Ie(), this.dynamicLayoutVertexArray = new ee(), this.opacityVertexArray = new oe(), this.hasVisibleVertices = !1, this.placedSymbolArray = new y();
|
|
8391
8391
|
}
|
|
8392
8392
|
isEmpty() {
|
|
8393
8393
|
return this.layoutVertexArray.length === 0 && this.indexArray.length === 0 && this.dynamicLayoutVertexArray.length === 0 && this.opacityVertexArray.length === 0;
|
|
@@ -8399,10 +8399,10 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8399
8399
|
this.layoutVertexBuffer && (this.layoutVertexBuffer.destroy(), this.indexBuffer.destroy(), this.programConfigurations.destroy(), this.segments.destroy(), this.dynamicLayoutVertexBuffer.destroy(), this.opacityVertexBuffer.destroy());
|
|
8400
8400
|
}
|
|
8401
8401
|
}
|
|
8402
|
-
|
|
8402
|
+
Ee("SymbolBuffers", Xh);
|
|
8403
8403
|
class Yh {
|
|
8404
8404
|
constructor(e, i, s) {
|
|
8405
|
-
this.layoutVertexArray = new e(), this.layoutAttributes = i, this.indexArray = new s(), this.segments = new
|
|
8405
|
+
this.layoutVertexArray = new e(), this.layoutAttributes = i, this.indexArray = new s(), this.segments = new Ie(), this.collisionVertexArray = new me();
|
|
8406
8406
|
}
|
|
8407
8407
|
upload(e) {
|
|
8408
8408
|
this.layoutVertexBuffer = e.createVertexBuffer(this.layoutVertexArray, this.layoutAttributes), this.indexBuffer = e.createIndexBuffer(this.indexArray), this.collisionVertexBuffer = e.createVertexBuffer(this.collisionVertexArray, vg.members, !0);
|
|
@@ -8411,7 +8411,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8411
8411
|
this.layoutVertexBuffer && (this.layoutVertexBuffer.destroy(), this.indexBuffer.destroy(), this.segments.destroy(), this.collisionVertexBuffer.destroy());
|
|
8412
8412
|
}
|
|
8413
8413
|
}
|
|
8414
|
-
|
|
8414
|
+
Ee("CollisionBuffers", Yh);
|
|
8415
8415
|
class va {
|
|
8416
8416
|
constructor(e) {
|
|
8417
8417
|
this.collisionBoxArray = e.collisionBoxArray, this.zoom = e.zoom, this.overscaling = e.overscaling, this.layers = e.layers, this.layerIds = this.layers.map(((u) => u.id)), this.index = e.index, this.pixelRatio = e.pixelRatio, this.sourceLayerIndex = e.sourceLayerIndex, this.hasDependencies = !1, this.hasRTLText = !1, this.sortKeyRanges = [], this.collisionCircleArray = [];
|
|
@@ -8635,7 +8635,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8635
8635
|
}
|
|
8636
8636
|
}
|
|
8637
8637
|
let Lp, Fp;
|
|
8638
|
-
|
|
8638
|
+
Ee("SymbolBucket", va, { omit: ["layers", "collisionBoxArray", "features", "compareText"] }), va.MAX_GLYPHS = 65535, va.addDynamicAttributes = Hh;
|
|
8639
8639
|
var Kh = { get paint() {
|
|
8640
8640
|
return Fp = Fp || new _i({ "icon-opacity": new Re(ue.paint_symbol["icon-opacity"]), "icon-color": new Re(ue.paint_symbol["icon-color"]), "icon-halo-color": new Re(ue.paint_symbol["icon-halo-color"]), "icon-halo-width": new Re(ue.paint_symbol["icon-halo-width"]), "icon-halo-blur": new Re(ue.paint_symbol["icon-halo-blur"]), "icon-translate": new De(ue.paint_symbol["icon-translate"]), "icon-translate-anchor": new De(ue.paint_symbol["icon-translate-anchor"]), "text-opacity": new Re(ue.paint_symbol["text-opacity"]), "text-color": new Re(ue.paint_symbol["text-color"], { runtimeType: ki, getOverride: (r) => r.textColor, hasOverride: (r) => !!r.textColor }), "text-halo-color": new Re(ue.paint_symbol["text-halo-color"]), "text-halo-width": new Re(ue.paint_symbol["text-halo-width"]), "text-halo-blur": new Re(ue.paint_symbol["text-halo-blur"]), "text-translate": new De(ue.paint_symbol["text-translate"]), "text-translate-anchor": new De(ue.paint_symbol["text-translate-anchor"]) });
|
|
8641
8641
|
}, get layout() {
|
|
@@ -8663,7 +8663,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8663
8663
|
return null;
|
|
8664
8664
|
}
|
|
8665
8665
|
}
|
|
8666
|
-
|
|
8666
|
+
Ee("FormatSectionOverride", Bp, { omit: ["defaultValue"] });
|
|
8667
8667
|
class Eu extends Hi {
|
|
8668
8668
|
constructor(e, i) {
|
|
8669
8669
|
super(e, Kh, i);
|
|
@@ -8951,7 +8951,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8951
8951
|
const l = 1 << i;
|
|
8952
8952
|
return (l * l * r + l * o + s).toString(36) + i.toString(36) + e.toString(36);
|
|
8953
8953
|
}
|
|
8954
|
-
|
|
8954
|
+
Ee("CanonicalTileID", Qh), Ee("OverscaledTileID", Yi, { omit: ["terrainRttPosMatrix32f"] });
|
|
8955
8955
|
class ao {
|
|
8956
8956
|
constructor() {
|
|
8957
8957
|
this.minX = 1 / 0, this.maxX = -1 / 0, this.minY = 1 / 0, this.maxY = -1 / 0;
|
|
@@ -11229,7 +11229,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11229
11229
|
function D_(r, e, i) {
|
|
11230
11230
|
return new ge(r.x + (i - r.y) / (e.y - r.y) * (e.x - r.x), i);
|
|
11231
11231
|
}
|
|
11232
|
-
|
|
11232
|
+
Ee("FeatureIndex", Mf, { omit: ["rawTileData", "sourceLayerCoder"] });
|
|
11233
11233
|
class ms extends ge {
|
|
11234
11234
|
constructor(e, i, s, o) {
|
|
11235
11235
|
super(e, i), this.angle = s, o !== void 0 && (this.segment = o);
|
|
@@ -11349,7 +11349,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11349
11349
|
function Ru(r, e, i, s) {
|
|
11350
11350
|
return r - e * i / s;
|
|
11351
11351
|
}
|
|
11352
|
-
|
|
11352
|
+
Ee("Anchor", ms);
|
|
11353
11353
|
class Lu {
|
|
11354
11354
|
constructor(e, i, s, o, l, u, p, g, m, v) {
|
|
11355
11355
|
var _;
|
|
@@ -11784,7 +11784,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11784
11784
|
i = [i[0] * p - i[1] * u, i[0] * u + i[1] * p];
|
|
11785
11785
|
}
|
|
11786
11786
|
return [o ? i[0] : St(e, i[0], r.zoom), o ? i[1] : St(e, i[1], r.zoom)];
|
|
11787
|
-
}, R.aN = Wh, R.aO = xd, R.aP = qh, R.aQ = (r) => r.type === "symbol", R.aR = vu, R.aS = mt, R.aT = yu, R.aU = V, R.aV =
|
|
11787
|
+
}, R.aN = Wh, R.aO = xd, R.aP = qh, R.aQ = (r) => r.type === "symbol", R.aR = vu, R.aS = mt, R.aT = yu, R.aU = V, R.aV = Ie, R.aW = de, R.aX = rn, R.aY = Zp, R.aZ = K, R.a_ = W, R.aa = Qh, R.ab = (r) => {
|
|
11788
11788
|
const e = window.document.createElement("video");
|
|
11789
11789
|
return e.muted = !0, new Promise(((i) => {
|
|
11790
11790
|
e.onloadstart = () => {
|
|
@@ -12069,7 +12069,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12069
12069
|
return Ye(s, r, e - 90, i), s;
|
|
12070
12070
|
}, R.bl = function(r, e, i, s) {
|
|
12071
12071
|
var o, l, u, p, g, m = e[0], v = e[1], _ = e[2], T = e[3], b = i[0], I = i[1], M = i[2], A = i[3];
|
|
12072
|
-
return (l = m * b + v * I + _ * M + T * A) < 0 && (l = -l, b = -b, I = -I, M = -M, A = -A), 1 - l >
|
|
12072
|
+
return (l = m * b + v * I + _ * M + T * A) < 0 && (l = -l, b = -b, I = -I, M = -M, A = -A), 1 - l > fe ? (o = Math.acos(l), u = Math.sin(o), p = Math.sin((1 - s) * o) / u, g = Math.sin(s * o) / u) : (p = 1 - s, g = s), r[0] = p * m + g * b, r[1] = p * v + g * I, r[2] = p * _ + g * M, r[3] = p * T + g * A, r;
|
|
12073
12073
|
}, R.bm = function(r) {
|
|
12074
12074
|
const e = new Float64Array(9);
|
|
12075
12075
|
var i, s, o, l, u, p, g, m, v, _, T, b, I, M, A, D, L, k;
|
|
@@ -12170,7 +12170,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12170
12170
|
const s = [];
|
|
12171
12171
|
for (const o in i) s.push(i[o]);
|
|
12172
12172
|
return s;
|
|
12173
|
-
}, R.cK =
|
|
12173
|
+
}, R.cK = Ee, R.cL = Hp, R.cM = Mf, R.cN = Ap, R.cO = function(r) {
|
|
12174
12174
|
var e, i;
|
|
12175
12175
|
r.bucket.createArrays(), r.bucket.tilePixelRatio = Fe / (512 * r.bucket.overscaling), r.bucket.compareText = {}, r.bucket.iconsNeedLinear = !1;
|
|
12176
12176
|
const s = r.bucket.layers[0], o = s.layout, l = s._unevaluatedLayout._values, u = { layoutIconSize: l["icon-size"].possiblyEvaluate(new ft(r.bucket.zoom + 1), r.canonical), layoutTextSize: l["text-size"].possiblyEvaluate(new ft(r.bucket.zoom + 1), r.canonical), textMaxSize: l["text-size"].possiblyEvaluate(new ft(18)) };
|
|
@@ -12282,7 +12282,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12282
12282
|
return r[0] === e[0] && r[1] === e[1] && r[2] === e[2] && r[3] === e[3] && r[4] === e[4] && r[5] === e[5] && r[6] === e[6] && r[7] === e[7] && r[8] === e[8] && r[9] === e[9] && r[10] === e[10] && r[11] === e[11] && r[12] === e[12] && r[13] === e[13] && r[14] === e[14] && r[15] === e[15];
|
|
12283
12283
|
}, R.ck = function(r, e) {
|
|
12284
12284
|
var i = r[0], s = r[1], o = r[2], l = r[3], u = r[4], p = r[5], g = r[6], m = r[7], v = r[8], _ = r[9], T = r[10], b = r[11], I = r[12], M = r[13], A = r[14], D = r[15], L = e[0], k = e[1], F = e[2], O = e[3], j = e[4], Y = e[5], J = e[6], ne = e[7], ie = e[8], le = e[9], ce = e[10], se = e[11], re = e[12], _e = e[13], Te = e[14], be = e[15];
|
|
12285
|
-
return Math.abs(i - L) <=
|
|
12285
|
+
return Math.abs(i - L) <= fe * Math.max(1, Math.abs(i), Math.abs(L)) && Math.abs(s - k) <= fe * Math.max(1, Math.abs(s), Math.abs(k)) && Math.abs(o - F) <= fe * Math.max(1, Math.abs(o), Math.abs(F)) && Math.abs(l - O) <= fe * Math.max(1, Math.abs(l), Math.abs(O)) && Math.abs(u - j) <= fe * Math.max(1, Math.abs(u), Math.abs(j)) && Math.abs(p - Y) <= fe * Math.max(1, Math.abs(p), Math.abs(Y)) && Math.abs(g - J) <= fe * Math.max(1, Math.abs(g), Math.abs(J)) && Math.abs(m - ne) <= fe * Math.max(1, Math.abs(m), Math.abs(ne)) && Math.abs(v - ie) <= fe * Math.max(1, Math.abs(v), Math.abs(ie)) && Math.abs(_ - le) <= fe * Math.max(1, Math.abs(_), Math.abs(le)) && Math.abs(T - ce) <= fe * Math.max(1, Math.abs(T), Math.abs(ce)) && Math.abs(b - se) <= fe * Math.max(1, Math.abs(b), Math.abs(se)) && Math.abs(I - re) <= fe * Math.max(1, Math.abs(I), Math.abs(re)) && Math.abs(M - _e) <= fe * Math.max(1, Math.abs(M), Math.abs(_e)) && Math.abs(A - Te) <= fe * Math.max(1, Math.abs(A), Math.abs(Te)) && Math.abs(D - be) <= fe * Math.max(1, Math.abs(D), Math.abs(be));
|
|
12286
12286
|
}, R.cl = function(r, e) {
|
|
12287
12287
|
return r[0] = e[0], r[1] = e[1], r[2] = e[2], r[3] = e[3], r[4] = e[4], r[5] = e[5], r[6] = e[6], r[7] = e[7], r[8] = e[8], r[9] = e[9], r[10] = e[10], r[11] = e[11], r[12] = e[12], r[13] = e[13], r[14] = e[14], r[15] = e[15], r;
|
|
12288
12288
|
}, R.cm = (r) => r.type === "circle", R.cn = (r) => r.type === "heatmap", R.co = (r) => r.type === "line", R.cp = (r) => r.type === "fill", R.cq = (r) => r.type === "fill-extrusion", R.cr = (r) => r.type === "hillshade", R.cs = (r) => r.type === "color-relief", R.ct = (r) => r.type === "background", R.cu = (r) => r.type === "custom", R.cv = Qr, R.cw = function(r, e, i) {
|
|
@@ -12595,7 +12595,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12595
12595
|
}
|
|
12596
12596
|
return new Di(Be, Qe.name, te);
|
|
12597
12597
|
}
|
|
12598
|
-
class
|
|
12598
|
+
class fe {
|
|
12599
12599
|
constructor(W, K, te) {
|
|
12600
12600
|
this.actor = W, this.layerIndex = K, this.availableImages = te, this.tileState = new Ui(), this.overzoomedTileResultCache = new R.cU(1e3);
|
|
12601
12601
|
}
|
|
@@ -12925,7 +12925,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12925
12925
|
const Ke = { sendAsync: (Be, Ye) => (Be.targetMapId = W, this.actor.sendAsync(Be, Ye)) };
|
|
12926
12926
|
switch (K) {
|
|
12927
12927
|
case "vector":
|
|
12928
|
-
this.workerSources[W][K][te] = new
|
|
12928
|
+
this.workerSources[W][K][te] = new fe(Ke, this._getLayerIndex(W), this._getAvailableImages(W));
|
|
12929
12929
|
break;
|
|
12930
12930
|
case "geojson":
|
|
12931
12931
|
this.workerSources[W][K][te] = new Jr(Ke, this._getLayerIndex(W), this._getAvailableImages(W));
|
|
@@ -12990,7 +12990,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12990
12990
|
return Di.getCurrentTime();
|
|
12991
12991
|
}
|
|
12992
12992
|
var lr, pi;
|
|
12993
|
-
class
|
|
12993
|
+
class fe {
|
|
12994
12994
|
static create(t, n, a) {
|
|
12995
12995
|
const c = window.document.createElement(t);
|
|
12996
12996
|
return n !== void 0 && (c.className = n), a && a.appendChild(c), c;
|
|
@@ -12999,17 +12999,17 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12999
12999
|
return window.document.createElementNS(t, n);
|
|
13000
13000
|
}
|
|
13001
13001
|
static disableDrag() {
|
|
13002
|
-
|
|
13002
|
+
fe.docStyle && fe.selectProp && (fe.userSelect = fe.docStyle[fe.selectProp], fe.docStyle[fe.selectProp] = "none");
|
|
13003
13003
|
}
|
|
13004
13004
|
static enableDrag() {
|
|
13005
|
-
|
|
13005
|
+
fe.docStyle && fe.selectProp && (fe.docStyle[fe.selectProp] = fe.userSelect);
|
|
13006
13006
|
}
|
|
13007
13007
|
static suppressClickInternal(t) {
|
|
13008
|
-
t.preventDefault(), t.stopPropagation(), window.removeEventListener("click",
|
|
13008
|
+
t.preventDefault(), t.stopPropagation(), window.removeEventListener("click", fe.suppressClickInternal, !0);
|
|
13009
13009
|
}
|
|
13010
13010
|
static suppressClick() {
|
|
13011
|
-
window.addEventListener("click",
|
|
13012
|
-
window.removeEventListener("click",
|
|
13011
|
+
window.addEventListener("click", fe.suppressClickInternal, !0), window.setTimeout((() => {
|
|
13012
|
+
window.removeEventListener("click", fe.suppressClickInternal, !0);
|
|
13013
13013
|
}), 0);
|
|
13014
13014
|
}
|
|
13015
13015
|
static getScale(t) {
|
|
@@ -13021,18 +13021,18 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
13021
13021
|
return new h.P((a.clientX - c.left) / n.x - t.clientLeft, (a.clientY - c.top) / n.y - t.clientTop);
|
|
13022
13022
|
}
|
|
13023
13023
|
static mousePos(t, n) {
|
|
13024
|
-
const a =
|
|
13025
|
-
return
|
|
13024
|
+
const a = fe.getScale(t);
|
|
13025
|
+
return fe.getPoint(t, a, n);
|
|
13026
13026
|
}
|
|
13027
13027
|
static touchPos(t, n) {
|
|
13028
|
-
const a = [], c =
|
|
13029
|
-
for (const f of n) a.push(
|
|
13028
|
+
const a = [], c = fe.getScale(t);
|
|
13029
|
+
for (const f of n) a.push(fe.getPoint(t, c, f));
|
|
13030
13030
|
return a;
|
|
13031
13031
|
}
|
|
13032
13032
|
static sanitize(t) {
|
|
13033
13033
|
const n = new DOMParser().parseFromString(t, "text/html").body || document.createElement("body"), a = n.querySelectorAll("script");
|
|
13034
13034
|
for (const c of a) c.remove();
|
|
13035
|
-
return
|
|
13035
|
+
return fe.clean(n), n.innerHTML;
|
|
13036
13036
|
}
|
|
13037
13037
|
static isPossiblyDangerous(t, n) {
|
|
13038
13038
|
const a = n.replace(/\s+/g, "").toLowerCase();
|
|
@@ -13040,13 +13040,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
13040
13040
|
}
|
|
13041
13041
|
static clean(t) {
|
|
13042
13042
|
const n = t.children;
|
|
13043
|
-
for (const a of n)
|
|
13043
|
+
for (const a of n) fe.removeAttributes(a), fe.clean(a);
|
|
13044
13044
|
}
|
|
13045
13045
|
static removeAttributes(t) {
|
|
13046
|
-
for (const { name: n, value: a } of t.attributes)
|
|
13046
|
+
for (const { name: n, value: a } of t.attributes) fe.isPossiblyDangerous(n, a) && t.removeAttribute(n);
|
|
13047
13047
|
}
|
|
13048
13048
|
}
|
|
13049
|
-
|
|
13049
|
+
fe.docStyle = typeof window < "u" && ((lr = window.document) === null || lr === void 0 ? void 0 : lr.documentElement.style), fe.selectProp = !fe.docStyle || "userSelect" in fe.docStyle ? "userSelect" : "webkitUserSelect", (function(d) {
|
|
13050
13050
|
let t, n, a, c;
|
|
13051
13051
|
d.resetRequestQueue = () => {
|
|
13052
13052
|
t = [], n = 0, a = 0, c = {};
|
|
@@ -13397,8 +13397,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
13397
13397
|
for (let oe = 0; oe < w; oe++, Z += 4, ee++) {
|
|
13398
13398
|
const ae = X.data[Z];
|
|
13399
13399
|
if (ae === 0) continue;
|
|
13400
|
-
const
|
|
13401
|
-
$[ee] = Math.max(0,
|
|
13400
|
+
const me = W[ae];
|
|
13401
|
+
$[ee] = Math.max(0, me), N[ee] = Math.max(0, -me);
|
|
13402
13402
|
}
|
|
13403
13403
|
}
|
|
13404
13404
|
K($, 0, 0, P, E, P, this.f, this.v, this.z), K(N, G, G, w, S, P, this.f, this.v, this.z);
|
|
@@ -14756,14 +14756,14 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
14756
14756
|
if (we === 0) continue;
|
|
14757
14757
|
ee = we === 2;
|
|
14758
14758
|
}
|
|
14759
|
-
const
|
|
14759
|
+
const me = y.distanceToTile2d(c.x, c.y, oe, ae);
|
|
14760
14760
|
let de = w;
|
|
14761
|
-
x && (de = (t.calculateTileZoom || at)(d.zoom + h.ar(d.tileSize / t.tileSize),
|
|
14761
|
+
x && (de = (t.calculateTileZoom || at)(d.zoom + h.ar(d.tileSize / t.tileSize), me, G, N, d.fov)), de = (t.roundZoom ? Math.round : Math.floor)(de), de = Math.max(0, de);
|
|
14762
14762
|
const Ae = Math.min(de, P);
|
|
14763
14763
|
if (U.wrap = y.getWrap(f, oe, U.wrap), U.zoom >= Ae) {
|
|
14764
14764
|
if (U.zoom < S) continue;
|
|
14765
|
-
const we = E - U.zoom, he = z[0] - 0.5 - (H << we),
|
|
14766
|
-
Z.push({ tileID: new h.a3(U.zoom === P ? ke : U.zoom, U.wrap, U.zoom, H, q), distanceSq: h.as([B[0] - 0.5 - H, B[1] - 0.5 - q]), tileDistanceToCamera: Math.sqrt(he * he +
|
|
14765
|
+
const we = E - U.zoom, he = z[0] - 0.5 - (H << we), Ie = z[1] - 0.5 - (q << we), ke = t.reparseOverscaled ? Math.max(U.zoom, de) : U.zoom;
|
|
14766
|
+
Z.push({ tileID: new h.a3(U.zoom === P ? ke : U.zoom, U.wrap, U.zoom, H, q), distanceSq: h.as([B[0] - 0.5 - H, B[1] - 0.5 - q]), tileDistanceToCamera: Math.sqrt(he * he + Ie * Ie) });
|
|
14767
14767
|
} else for (let we = 0; we < 4; we++) X.push({ zoom: U.zoom + 1, x: (H << 1) + we % 2, y: (q << 1) + (we >> 1), wrap: U.wrap, fullyVisible: ee });
|
|
14768
14768
|
}
|
|
14769
14769
|
return Z.sort(((U, H) => U.distanceSq - H.distanceSq)).map(((U) => U.tileID));
|
|
@@ -15383,7 +15383,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
15383
15383
|
cn(H.numGlyphs, G);
|
|
15384
15384
|
continue;
|
|
15385
15385
|
}
|
|
15386
|
-
const ae = Ts(t.transform.cameraToCenterDistance, oe.signedDistanceFromCamera),
|
|
15386
|
+
const ae = Ts(t.transform.cameraToCenterDistance, oe.signedDistanceFromCamera), me = h.ay(z, B, H), de = f ? me * t.transform.getPitchedTextCorrection(H.anchorX, H.anchorY, w) / ae : me * ae, Ae = jn({ projectionContext: ee, pitchedLabelPlaneMatrixInverse: c, symbol: H, fontSize: de, flip: !1, keepUpright: y, glyphOffsetArray: d.glyphOffsetArray, dynamicLayoutVertexArray: G, aspectRatio: X, rotateToLine: x });
|
|
15387
15387
|
Z = Ae.useVertical, (Ae.notEnoughRoom || Z || Ae.needsFlipping && jn({ projectionContext: ee, pitchedLabelPlaneMatrixInverse: c, symbol: H, fontSize: de, flip: !0, keepUpright: y, glyphOffsetArray: d.glyphOffsetArray, dynamicLayoutVertexArray: G, aspectRatio: X, rotateToLine: x }).notEnoughRoom) && cn(H.numGlyphs, G);
|
|
15388
15388
|
}
|
|
15389
15389
|
n ? d.text.dynamicLayoutVertexBuffer.updateData(G) : d.icon.dynamicLayoutVertexBuffer.updateData(G);
|
|
@@ -15480,8 +15480,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
15480
15480
|
if (G = ti(z, x, oe), n === 0) U.push(N), H = G.sub(N);
|
|
15481
15481
|
else {
|
|
15482
15482
|
let ae;
|
|
15483
|
-
const
|
|
15484
|
-
ae =
|
|
15483
|
+
const me = G.sub(N);
|
|
15484
|
+
ae = me.mag() === 0 ? Ms(ti(z + P, x, oe).sub(G), n, P) : Ms(me, n, P), V || (V = N.add(ae)), B = ln(z, ae, G, f, y, V, n, x, oe), U.push(V), H = B.sub(V);
|
|
15485
15485
|
}
|
|
15486
15486
|
X = H.mag();
|
|
15487
15487
|
}
|
|
@@ -15520,7 +15520,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
15520
15520
|
const V = [], G = new h.P(n.anchorX, n.anchorY), N = this.getPerspectiveRatio(G.x, G.y, y, B), $ = (S ? f * this.transform.getPitchedTextCorrection(n.anchorX, n.anchorY, y) / N : f * N) / h.aJ, X = { getElevation: B, pitchedLabelPlaneMatrix: x, lineVertexArray: a, pitchWithMap: S, projectionCache: { projections: {}, offsets: {}, cachedAnchorPoint: void 0, anyProjectionOccluded: !1 }, transform: this.transform, tileAnchorPoint: G, unwrappedTileID: y, width: this.transform.width, height: this.transform.height, translation: z }, Z = Vn($, c, n.lineOffsetX * $, n.lineOffsetY * $, !1, n, !1, X);
|
|
15521
15521
|
let U = !1, H = !1, q = !0;
|
|
15522
15522
|
if (Z) {
|
|
15523
|
-
const ee = 0.5 * E * N + C, oe = new h.P(-100, -100), ae = new h.P(this.screenRightBoundary, this.screenBottomBoundary),
|
|
15523
|
+
const ee = 0.5 * E * N + C, oe = new h.P(-100, -100), ae = new h.P(this.screenRightBoundary, this.screenBottomBoundary), me = new Ua(), de = Z.first, Ae = Z.last;
|
|
15524
15524
|
let we = [];
|
|
15525
15525
|
for (let ke = de.path.length - 1; ke >= 1; ke--) we.push(de.path[ke]);
|
|
15526
15526
|
for (let ke = 1; ke < Ae.path.length; ke++) we.push(Ae.path[ke]);
|
|
@@ -15529,18 +15529,18 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
15529
15529
|
const ke = this.projectPathToScreenSpace(we, X);
|
|
15530
15530
|
we = ke.some(((ot) => ot.signedDistanceFromCamera <= 0)) ? [] : ke.map(((ot) => ot.point));
|
|
15531
15531
|
}
|
|
15532
|
-
let
|
|
15532
|
+
let Ie = [];
|
|
15533
15533
|
if (we.length > 0) {
|
|
15534
15534
|
const ke = we[0].clone(), ot = we[0].clone();
|
|
15535
15535
|
for (let zt = 1; zt < we.length; zt++) ke.x = Math.min(ke.x, we[zt].x), ke.y = Math.min(ke.y, we[zt].y), ot.x = Math.max(ot.x, we[zt].x), ot.y = Math.max(ot.y, we[zt].y);
|
|
15536
|
-
|
|
15536
|
+
Ie = ke.x >= oe.x && ot.x <= ae.x && ke.y >= oe.y && ot.y <= ae.y ? [we] : ot.x < oe.x || ke.x > ae.x || ot.y < oe.y || ke.y > ae.y ? [] : h.aG([we], oe.x, oe.y, ae.x, ae.y);
|
|
15537
15537
|
}
|
|
15538
|
-
for (const ke of
|
|
15539
|
-
|
|
15538
|
+
for (const ke of Ie) {
|
|
15539
|
+
me.reset(ke, 0.25 * ee);
|
|
15540
15540
|
let ot = 0;
|
|
15541
|
-
ot =
|
|
15541
|
+
ot = me.length <= 0.5 * ee ? 1 : Math.ceil(me.paddedLength / he) + 1;
|
|
15542
15542
|
for (let zt = 0; zt < ot; zt++) {
|
|
15543
|
-
const ut = zt / Math.max(ot - 1, 1), Rt =
|
|
15543
|
+
const ut = zt / Math.max(ot - 1, 1), Rt = me.lerp(ut), Ft = Rt.x + It, oi = Rt.y + It;
|
|
15544
15544
|
V.push(Ft, oi, ee, 0);
|
|
15545
15545
|
const Mt = Ft - ee, yi = oi - ee, ii = Ft + ee, Zt = oi + ee;
|
|
15546
15546
|
if (q && (q = this.isOffscreen(Mt, yi, ii, Zt)), H || (H = this.isInsideGrid(Mt, yi, ii, Zt)), t !== "always" && this.grid.hitTestCircle(Ft, oi, ee, t, P) && (U = !0, !w)) return { circles: [], offscreen: !1, collisionDetected: U };
|
|
@@ -15619,7 +15619,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
15619
15619
|
let C = 1, z = 0, B = 0, V = 1;
|
|
15620
15620
|
const G = t.anchorPointX + x[0], N = t.anchorPointY + x[1];
|
|
15621
15621
|
if (y && !f) {
|
|
15622
|
-
const we = this.projectAndGetPerspectiveRatio(G + 1, N, c, S, E), he = we.x - w.x,
|
|
15622
|
+
const we = this.projectAndGetPerspectiveRatio(G + 1, N, c, S, E), he = we.x - w.x, Ie = Math.atan((we.y - w.y) / he) + (he < 0 ? Math.PI : 0), ke = Math.sin(Ie), ot = Math.cos(Ie);
|
|
15623
15623
|
C = ot, z = ke, B = -ke, V = ot;
|
|
15624
15624
|
} else if (!y && f) {
|
|
15625
15625
|
const we = yr(this.transform);
|
|
@@ -15627,9 +15627,9 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
15627
15627
|
}
|
|
15628
15628
|
let $ = w.x, X = w.y, Z = n;
|
|
15629
15629
|
f && ($ = G, X = N, Z = Math.pow(2, -(this.transform.zoom - a.overscaledZ)), Z *= this.transform.getPitchedTextCorrection(G, N, c), P || (Z *= h.al(0.5 + w.signedDistanceFromCamera / this.transform.cameraToCenterDistance * 0.5, 0, 4))), P && ($ += C * P.x * Z + B * P.y * Z, X += z * P.x * Z + V * P.y * Z);
|
|
15630
|
-
const U = t.x1 * Z, H = t.x2 * Z, q = (U + H) / 2, ee = t.y1 * Z, oe = t.y2 * Z, ae = (ee + oe) / 2,
|
|
15630
|
+
const U = t.x1 * Z, H = t.x2 * Z, q = (U + H) / 2, ee = t.y1 * Z, oe = t.y2 * Z, ae = (ee + oe) / 2, me = [{ offsetX: U, offsetY: ee }, { offsetX: q, offsetY: ee }, { offsetX: H, offsetY: ee }, { offsetX: H, offsetY: ae }, { offsetX: H, offsetY: oe }, { offsetX: q, offsetY: oe }, { offsetX: U, offsetY: oe }, { offsetX: U, offsetY: ae }];
|
|
15631
15631
|
let de = [];
|
|
15632
|
-
for (const { offsetX: we, offsetY: he } of
|
|
15632
|
+
for (const { offsetX: we, offsetY: he } of me) de.push(new h.P($ + C * we + B * he, X + z * we + V * he));
|
|
15633
15633
|
let Ae = !1;
|
|
15634
15634
|
if (f) {
|
|
15635
15635
|
const we = de.map(((he) => this.projectAndGetPerspectiveRatio(he.x, he.y, c, S, E)));
|
|
@@ -15703,23 +15703,23 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
15703
15703
|
}
|
|
15704
15704
|
attemptAnchorPlacement(t, n, a, c, f, y, x, w, S, P, E, C, z, B, V, G, N, $, X, Z) {
|
|
15705
15705
|
var U, H, q;
|
|
15706
|
-
const ee = h.aM[t.textAnchor], oe = [t.textOffset0, t.textOffset1], ae = wo(ee, a, c, oe, f),
|
|
15707
|
-
if ((!$ || this.collisionIndex.placeCollisionBox($, C, w, S, P, x, y, N, E.predicate, X, ae, Z).placeable) &&
|
|
15706
|
+
const ee = h.aM[t.textAnchor], oe = [t.textOffset0, t.textOffset1], ae = wo(ee, a, c, oe, f), me = this.collisionIndex.placeCollisionBox(n, C, w, S, P, x, y, G, E.predicate, X, ae, Z);
|
|
15707
|
+
if ((!$ || this.collisionIndex.placeCollisionBox($, C, w, S, P, x, y, N, E.predicate, X, ae, Z).placeable) && me.placeable) {
|
|
15708
15708
|
let de;
|
|
15709
15709
|
if (!((U = this.prevPlacement) === null || U === void 0) && U.variableOffsets[z.crossTileID] && (!((q = (H = this.prevPlacement) === null || H === void 0 ? void 0 : H.placements[z.crossTileID]) === null || q === void 0) && q.text) && (de = this.prevPlacement.variableOffsets[z.crossTileID].anchor), z.crossTileID === 0) throw new Error("symbolInstance.crossTileID can't be 0");
|
|
15710
|
-
return this.variableOffsets[z.crossTileID] = { textOffset: oe, width: a, height: c, anchor: ee, textBoxScale: f, prevAnchor: de }, this.markUsedJustification(B, ee, z, V), B.allowVerticalPlacement && (this.markUsedOrientation(B, V, z), this.placedOrientations[z.crossTileID] = V), { shift: ae, placedGlyphBoxes:
|
|
15710
|
+
return this.variableOffsets[z.crossTileID] = { textOffset: oe, width: a, height: c, anchor: ee, textBoxScale: f, prevAnchor: de }, this.markUsedJustification(B, ee, z, V), B.allowVerticalPlacement && (this.markUsedOrientation(B, V, z), this.placedOrientations[z.crossTileID] = V), { shift: ae, placedGlyphBoxes: me };
|
|
15711
15711
|
}
|
|
15712
15712
|
}
|
|
15713
15713
|
placeLayerBucketPart(t, n, a) {
|
|
15714
15714
|
const { bucket: c, layout: f, translationText: y, translationIcon: x, unwrappedTileID: w, pitchedLabelPlaneMatrix: S, textPixelRatio: P, holdingForFade: E, collisionBoxArray: C, partiallyEvaluatedTextSize: z, collisionGroup: B } = t.parameters, V = f.get("text-optional"), G = f.get("icon-optional"), N = h.aN(f, "text-overlap", "text-allow-overlap"), $ = N === "always", X = h.aN(f, "icon-overlap", "icon-allow-overlap"), Z = X === "always", U = f.get("text-rotation-alignment") === "map", H = f.get("text-pitch-alignment") === "map", q = f.get("icon-text-fit") !== "none", ee = f.get("symbol-z-order") === "viewport-y", oe = $ && (Z || !c.hasIconData() || G), ae = Z && ($ || !c.hasTextData() || V);
|
|
15715
15715
|
!c.collisionArrays && C && c.deserializeCollisionBoxes(C);
|
|
15716
|
-
const
|
|
15716
|
+
const me = this.retainedQueryData[c.bucketInstanceId].tileID, de = this._getTerrainElevationFunc(me), Ae = this.transform.getFastPathSimpleProjectionMatrix(me), we = (he, Ie, ke) => {
|
|
15717
15717
|
var ot, zt;
|
|
15718
15718
|
if (n[he.crossTileID]) return;
|
|
15719
15719
|
if (E) return void (this.placements[he.crossTileID] = new fc(!1, !1, !1));
|
|
15720
15720
|
let ut = !1, Rt = !1, Ft = !0, oi = null, Mt = { box: null, placeable: !1, offscreen: null, occluded: !1 }, yi = { placeable: !1 }, ii = null, Zt = null, ai = null, $r = 0, Zr = 0, qr = 0;
|
|
15721
|
-
|
|
15722
|
-
const li =
|
|
15721
|
+
Ie.textFeatureIndex ? $r = Ie.textFeatureIndex : he.useRuntimeCollisionCircles && ($r = he.featureIndex), Ie.verticalTextFeatureIndex && (Zr = Ie.verticalTextFeatureIndex);
|
|
15722
|
+
const li = Ie.textBox;
|
|
15723
15723
|
if (li) {
|
|
15724
15724
|
const pr = (bt) => {
|
|
15725
15725
|
let gt = h.ax.horizontal;
|
|
@@ -15729,17 +15729,17 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
15729
15729
|
}
|
|
15730
15730
|
return gt;
|
|
15731
15731
|
}, fr = (bt, gt) => {
|
|
15732
|
-
if (c.allowVerticalPlacement && he.numVerticalGlyphVertices > 0 &&
|
|
15732
|
+
if (c.allowVerticalPlacement && he.numVerticalGlyphVertices > 0 && Ie.verticalTextBox) {
|
|
15733
15733
|
for (const Bt of c.writingModes) if (Bt === h.ax.vertical ? (Mt = gt(), yi = Mt) : Mt = bt(), Mt?.placeable) break;
|
|
15734
15734
|
} else Mt = bt();
|
|
15735
15735
|
}, Oi = he.textAnchorOffsetStartIndex, Xi = he.textAnchorOffsetEndIndex;
|
|
15736
15736
|
if (Xi === Oi) {
|
|
15737
15737
|
const bt = (gt, Bt) => {
|
|
15738
|
-
const wt = this.collisionIndex.placeCollisionBox(gt, N, P,
|
|
15738
|
+
const wt = this.collisionIndex.placeCollisionBox(gt, N, P, me, w, H, U, y, B.predicate, de, void 0, Ae);
|
|
15739
15739
|
return wt?.placeable && (this.markUsedOrientation(c, Bt, he), this.placedOrientations[he.crossTileID] = Bt), wt;
|
|
15740
15740
|
};
|
|
15741
15741
|
fr((() => bt(li, h.ax.horizontal)), (() => {
|
|
15742
|
-
const gt =
|
|
15742
|
+
const gt = Ie.verticalTextBox;
|
|
15743
15743
|
return c.allowVerticalPlacement && he.numVerticalGlyphVertices > 0 && gt ? bt(gt, h.ax.vertical) : { box: null, offscreen: null };
|
|
15744
15744
|
})), pr(Mt?.placeable);
|
|
15745
15745
|
} else {
|
|
@@ -15752,16 +15752,16 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
15752
15752
|
for (let jl = Oi; jl < Xi; jl++) {
|
|
15753
15753
|
const aa = c.textAnchorOffsets.get(jl);
|
|
15754
15754
|
if (bt && aa.textAnchor !== bt) continue;
|
|
15755
|
-
const la = this.attemptAnchorPlacement(aa, wt, Ir, Bl, hu, U, H, P,
|
|
15755
|
+
const la = this.attemptAnchorPlacement(aa, wt, Ir, Bl, hu, U, H, P, me, w, B, Yr, he, c, oa, y, x, Ol, de);
|
|
15756
15756
|
if (la && (Hr = la.placedGlyphBoxes, Hr?.placeable)) return ut = !0, oi = la.shift, Hr;
|
|
15757
15757
|
}
|
|
15758
15758
|
bt ? bt = null : Yr = N;
|
|
15759
15759
|
}
|
|
15760
|
-
return a && !Hr && (Hr = { box: this.collisionIndex.placeCollisionBox(li, "always", P,
|
|
15760
|
+
return a && !Hr && (Hr = { box: this.collisionIndex.placeCollisionBox(li, "always", P, me, w, H, U, y, B.predicate, de, void 0, Ae).box, offscreen: !1, placeable: !1, occluded: !1 }), Hr;
|
|
15761
15761
|
};
|
|
15762
|
-
fr((() => gt(li,
|
|
15763
|
-
const wt =
|
|
15764
|
-
return c.allowVerticalPlacement && !Mt?.placeable && he.numVerticalGlyphVertices > 0 && wt ? gt(wt,
|
|
15762
|
+
fr((() => gt(li, Ie.iconBox, h.ax.horizontal)), (() => {
|
|
15763
|
+
const wt = Ie.verticalTextBox;
|
|
15764
|
+
return c.allowVerticalPlacement && !Mt?.placeable && he.numVerticalGlyphVertices > 0 && wt ? gt(wt, Ie.verticalIconBox, h.ax.vertical) : { box: null, occluded: !0, offscreen: null };
|
|
15765
15765
|
})), Mt && (ut = Mt.placeable, Ft = Mt.offscreen);
|
|
15766
15766
|
const Bt = pr(Mt?.placeable);
|
|
15767
15767
|
if (!ut && this.prevPlacement) {
|
|
@@ -15774,22 +15774,22 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
15774
15774
|
const pr = c.text.placedSymbolArray.get(he.centerJustifiedTextSymbolIndex), fr = h.ay(c.textSizeData, z, pr), Oi = f.get("text-padding");
|
|
15775
15775
|
Zt = this.collisionIndex.placeCollisionCircles(N, pr, c.lineVertexArray, c.glyphOffsetArray, fr, w, S, a, H, B.predicate, he.collisionCircleDiameter, Oi, y, de), Zt.circles.length && Zt.collisionDetected && !a && h.w("Collisions detected, but collision boxes are not shown"), ut = $ || Zt.circles.length > 0 && !Zt.collisionDetected, Ft && (Ft = Zt.offscreen);
|
|
15776
15776
|
}
|
|
15777
|
-
if (
|
|
15778
|
-
const pr = (fr) => this.collisionIndex.placeCollisionBox(fr, X, P,
|
|
15779
|
-
yi && yi.placeable &&
|
|
15777
|
+
if (Ie.iconFeatureIndex && (qr = Ie.iconFeatureIndex), Ie.iconBox) {
|
|
15778
|
+
const pr = (fr) => this.collisionIndex.placeCollisionBox(fr, X, P, me, w, H, U, x, B.predicate, de, q && oi ? oi : void 0, Ae);
|
|
15779
|
+
yi && yi.placeable && Ie.verticalIconBox ? (ai = pr(Ie.verticalIconBox), Rt = ai.placeable) : (ai = pr(Ie.iconBox), Rt = ai.placeable), Ft && (Ft = ai.offscreen);
|
|
15780
15780
|
}
|
|
15781
15781
|
const Pr = V || he.numHorizontalGlyphVertices === 0 && he.numVerticalGlyphVertices === 0, Wr = G || he.numIconVertices === 0;
|
|
15782
15782
|
Pr || Wr ? Wr ? Pr || Rt && (Rt = ut) : ut = Rt && ut : Rt = ut = Rt && ut;
|
|
15783
15783
|
const sa = Rt && ai.placeable;
|
|
15784
|
-
if (ut && ii.placeable && this.collisionIndex.insertCollisionBox(ii.box, N, f.get("text-ignore-placement"), c.bucketInstanceId, yi && yi.placeable && Zr ? Zr : $r, B.ID), sa && this.collisionIndex.insertCollisionBox(ai.box, X, f.get("icon-ignore-placement"), c.bucketInstanceId, qr, B.ID), Zt && ut && this.collisionIndex.insertCollisionCircles(Zt.circles, N, f.get("text-ignore-placement"), c.bucketInstanceId, $r, B.ID), a && this.storeCollisionData(c.bucketInstanceId, ke,
|
|
15784
|
+
if (ut && ii.placeable && this.collisionIndex.insertCollisionBox(ii.box, N, f.get("text-ignore-placement"), c.bucketInstanceId, yi && yi.placeable && Zr ? Zr : $r, B.ID), sa && this.collisionIndex.insertCollisionBox(ai.box, X, f.get("icon-ignore-placement"), c.bucketInstanceId, qr, B.ID), Zt && ut && this.collisionIndex.insertCollisionCircles(Zt.circles, N, f.get("text-ignore-placement"), c.bucketInstanceId, $r, B.ID), a && this.storeCollisionData(c.bucketInstanceId, ke, Ie, ii, ai, Zt), he.crossTileID === 0) throw new Error("symbolInstance.crossTileID can't be 0");
|
|
15785
15785
|
if (c.bucketInstanceId === 0) throw new Error("bucket.bucketInstanceId can't be 0");
|
|
15786
15786
|
this.placements[he.crossTileID] = new fc((ut || oe) && !ii?.occluded, (Rt || ae) && !ai?.occluded, Ft || c.justReloaded), n[he.crossTileID] = !0;
|
|
15787
15787
|
};
|
|
15788
15788
|
if (ee) {
|
|
15789
15789
|
if (t.symbolInstanceStart !== 0) throw new Error("bucket.bucketInstanceId should be 0");
|
|
15790
15790
|
const he = c.getSortedSymbolIndexes(-this.transform.bearingInRadians);
|
|
15791
|
-
for (let
|
|
15792
|
-
const ke = he[
|
|
15791
|
+
for (let Ie = he.length - 1; Ie >= 0; --Ie) {
|
|
15792
|
+
const ke = he[Ie];
|
|
15793
15793
|
we(c.symbolInstances.get(ke), c.collisionArrays[ke], ke);
|
|
15794
15794
|
}
|
|
15795
15795
|
} else for (let he = t.symbolInstanceStart; he < t.symbolInstanceEnd; he++) we(c.symbolInstances.get(he), c.collisionArrays[he], he);
|
|
@@ -15867,14 +15867,14 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
15867
15867
|
$.verticalPlacedTextSymbolIndex >= 0 && (t.text.placedSymbolArray.get($.verticalPlacedTextSymbolIndex).hidden = Ae || ae ? 1 : 0);
|
|
15868
15868
|
const he = this.variableOffsets[$.crossTileID];
|
|
15869
15869
|
he && this.markUsedJustification(t, he.anchor, $, ee);
|
|
15870
|
-
const
|
|
15871
|
-
|
|
15870
|
+
const Ie = this.placedOrientations[$.crossTileID];
|
|
15871
|
+
Ie && (this.markUsedJustification(t, "left", $, Ie), this.markUsedOrientation(t, Ie, $));
|
|
15872
15872
|
}
|
|
15873
15873
|
if (q) {
|
|
15874
15874
|
const de = Wa(H.icon), Ae = !(z && $.verticalPlacedIconSymbolIndex && oe);
|
|
15875
15875
|
$.placedIconSymbolIndex >= 0 && (V(t.icon, $.numIconVertices, Ae ? de : As), t.icon.placedSymbolArray.get($.placedIconSymbolIndex).hidden = H.icon.isHidden()), $.verticalPlacedIconSymbolIndex >= 0 && (V(t.icon, $.numVerticalIconVertices, Ae ? As : de), t.icon.placedSymbolArray.get($.verticalPlacedIconSymbolIndex).hidden = H.icon.isHidden());
|
|
15876
15876
|
}
|
|
15877
|
-
const
|
|
15877
|
+
const me = G?.has(N) ? G.get(N) : { text: null, icon: null };
|
|
15878
15878
|
if (t.hasIconCollisionBoxData() || t.hasTextCollisionBoxData()) {
|
|
15879
15879
|
const de = t.collisionArrays[N];
|
|
15880
15880
|
if (de) {
|
|
@@ -15887,13 +15887,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
15887
15887
|
}
|
|
15888
15888
|
if (de.textBox || de.verticalTextBox) {
|
|
15889
15889
|
let he;
|
|
15890
|
-
de.textBox && (he = oe), de.verticalTextBox && (he = ae), $a(t.textCollisionBox.collisionVertexArray, H.text.placed, !we || he,
|
|
15890
|
+
de.textBox && (he = oe), de.verticalTextBox && (he = ae), $a(t.textCollisionBox.collisionVertexArray, H.text.placed, !we || he, me.text, Ae.x, Ae.y);
|
|
15891
15891
|
}
|
|
15892
15892
|
}
|
|
15893
15893
|
if (de.iconBox || de.verticalIconBox) {
|
|
15894
15894
|
const we = !!(!ae && de.verticalIconBox);
|
|
15895
15895
|
let he;
|
|
15896
|
-
de.iconBox && (he = we), de.verticalIconBox && (he = !we), $a(t.iconCollisionBox.collisionVertexArray, H.icon.placed, he,
|
|
15896
|
+
de.iconBox && (he = we), de.verticalIconBox && (he = !we), $a(t.iconCollisionBox.collisionVertexArray, H.icon.placed, he, me.icon, z ? Ae.x : 0, z ? Ae.y : 0);
|
|
15897
15897
|
}
|
|
15898
15898
|
}
|
|
15899
15899
|
}
|
|
@@ -17338,12 +17338,12 @@ uniform ${P} ${E} u_${C};
|
|
|
17338
17338
|
$ = ee !== null && ee >= 0 ? Math.max($, ee) : Math.max($, X[q]);
|
|
17339
17339
|
}
|
|
17340
17340
|
const U = (function(q, ee) {
|
|
17341
|
-
const oe = h.b0([], q[ee[0]], q[ee[1]]), ae = h.b0([], q[ee[2]], q[ee[1]]),
|
|
17342
|
-
return h.b1(
|
|
17341
|
+
const oe = h.b0([], q[ee[0]], q[ee[1]]), ae = h.b0([], q[ee[2]], q[ee[1]]), me = [0, 0, 0, 0];
|
|
17342
|
+
return h.b1(me, h.b2([], oe, ae)), me[3] = -h.b3(me, q[ee[0]]), me;
|
|
17343
17343
|
})(C, z), H = (function(q, ee) {
|
|
17344
|
-
const oe = h.b7(q), ae = h.b8([], q, 1 / oe),
|
|
17344
|
+
const oe = h.b7(q), ae = h.b8([], q, 1 / oe), me = h.b0([], ee, h.aZ([], ae, h.b3(ee, ae))), de = h.b7(me);
|
|
17345
17345
|
if (de > 0) {
|
|
17346
|
-
const Ae = Math.sqrt(1 - ae[3] * ae[3]), we = h.aZ([], ae, -ae[3]), he = h.a_([], we, h.aZ([],
|
|
17346
|
+
const Ae = Math.sqrt(1 - ae[3] * ae[3]), we = h.aZ([], ae, -ae[3]), he = h.a_([], we, h.aZ([], me, Ae / de));
|
|
17347
17347
|
return h.b9(ee, he);
|
|
17348
17348
|
}
|
|
17349
17349
|
return null;
|
|
@@ -18269,11 +18269,11 @@ uniform ${P} ${E} u_${C};
|
|
|
18269
18269
|
if (t.z === 1) return Xn.fromAabb([t.x === 0 ? -w : 0, t.y === 0 ? 0 : -w, -w], [t.x === 0 ? 0 : w, t.y === 0 ? w : 0, w]);
|
|
18270
18270
|
{
|
|
18271
18271
|
const S = [kt(0, 0, t.x, t.y, t.z), kt(h.a6, 0, t.x, t.y, t.z), kt(h.a6, h.a6, t.x, t.y, t.z), kt(0, h.a6, t.x, t.y, t.z)], P = [];
|
|
18272
|
-
for (const
|
|
18273
|
-
if (w !== x) for (const
|
|
18272
|
+
for (const me of S) P.push(h.aZ([], me, w));
|
|
18273
|
+
if (w !== x) for (const me of S) P.push(h.aZ([], me, x));
|
|
18274
18274
|
t.y === 0 && P.push([0, 1, 0]), t.y === (1 << t.z) - 1 && P.push([0, -1, 0]);
|
|
18275
18275
|
const E = [1, 1, 1], C = [-1, -1, -1];
|
|
18276
|
-
for (const
|
|
18276
|
+
for (const me of P) for (let de = 0; de < 3; de++) E[de] = Math.min(E[de], me[de]), C[de] = Math.max(C[de], me[de]);
|
|
18277
18277
|
const z = kt(h.a6 / 2, h.a6 / 2, t.x, t.y, t.z), B = h.b2([], [0, 1, 0], z);
|
|
18278
18278
|
h.b1(B, B);
|
|
18279
18279
|
const V = h.b2([], z, B);
|
|
@@ -19079,8 +19079,8 @@ uniform ${P} ${E} u_${C};
|
|
|
19079
19079
|
h.a_(z, E, [P[0] * C, P[1] * C, P[2] * C]);
|
|
19080
19080
|
const B = h.b5(z) - 1, V = Math.exp(0.5 * -Math.max(B - 0.3, 0)), G = Li(n.worldSize, n.center.lat) / Math.min(n.width, n.height), N = h.bw(G, 0.9, 0.5, 1, 0.25), $ = (1 - h.ao(-y)) * Math.min(V, N), X = n.center.lat, Z = n.zoom, U = new h.W(n.center.lng + w * $, h.al(n.center.lat + S * $, -h.am, h.am));
|
|
19081
19081
|
n.setLocationAtPoint(c, a);
|
|
19082
|
-
const H = n.center, q = h.bw(Math.abs(x), 45, 85, 0, 1), ee = h.bw(G, 0.75, 0.35, 0, 1), oe = Math.pow(Math.max(q, ee), 0.25), ae = h.bJ(H.lng, U.lng),
|
|
19083
|
-
n.setCenter(new h.W(H.lng + ae * oe, H.lat +
|
|
19082
|
+
const H = n.center, q = h.bw(Math.abs(x), 45, 85, 0, 1), ee = h.bw(G, 0.75, 0.35, 0, 1), oe = Math.pow(Math.max(q, ee), 0.25), ae = h.bJ(H.lng, U.lng), me = h.bJ(H.lat, U.lat);
|
|
19083
|
+
n.setCenter(new h.W(H.lng + ae * oe, H.lat + me * oe).wrap()), n.setZoom(Z + Nt(X, n.center.lat));
|
|
19084
19084
|
}
|
|
19085
19085
|
handleMapControlsPan(t, n, a) {
|
|
19086
19086
|
if (!t.panDelta) return;
|
|
@@ -19132,8 +19132,8 @@ uniform ${P} ${E} u_${C};
|
|
|
19132
19132
|
const C = P.center;
|
|
19133
19133
|
jr(t, C);
|
|
19134
19134
|
const z = (function(Z, U, H) {
|
|
19135
|
-
const q = $t(U), ee = $t(H), oe = h.b3(q, ee), ae = Math.acos(oe),
|
|
19136
|
-
return ae / (2 * Math.PI) *
|
|
19135
|
+
const q = $t(U), ee = $t(H), oe = h.b3(q, ee), ae = Math.acos(oe), me = bc(Z);
|
|
19136
|
+
return ae / (2 * Math.PI) * me;
|
|
19137
19137
|
})(t, c, C), B = f + Nt(c.lat, 0), V = S + Nt(C.lat, 0), G = h.ao(V - B);
|
|
19138
19138
|
let N;
|
|
19139
19139
|
if (typeof n.minZoom == "number") {
|
|
@@ -19310,8 +19310,8 @@ uniform ${P} ${E} u_${C};
|
|
|
19310
19310
|
G[N] = {};
|
|
19311
19311
|
const $ = Vt.getImageCanvasContext((yield V[N]).data), X = (yield B[N]).data;
|
|
19312
19312
|
for (const Z in X) {
|
|
19313
|
-
const { width: U, height: H, x: q, y: ee, sdf: oe, pixelRatio: ae, stretchX:
|
|
19314
|
-
G[N][Z] = { data: null, pixelRatio: ae, sdf: oe, stretchX:
|
|
19313
|
+
const { width: U, height: H, x: q, y: ee, sdf: oe, pixelRatio: ae, stretchX: me, stretchY: de, content: Ae, textFitWidth: we, textFitHeight: he } = X[Z];
|
|
19314
|
+
G[N][Z] = { data: null, pixelRatio: ae, sdf: oe, stretchX: me, stretchY: de, content: Ae, textFitWidth: we, textFitHeight: he, spriteData: { width: U, height: H, x: q, y: ee, context: $ } };
|
|
19315
19315
|
}
|
|
19316
19316
|
}
|
|
19317
19317
|
return G;
|
|
@@ -19992,10 +19992,10 @@ uniform ${P} ${E} u_${C};
|
|
|
19992
19992
|
if (P.linkProgram(this.program), !P.getProgramParameter(this.program, P.LINK_STATUS)) throw new Error(`Program failed to link: ${P.getProgramInfoLog(this.program)}`);
|
|
19993
19993
|
P.deleteShader(ee), P.deleteShader(q);
|
|
19994
19994
|
for (const ae of X) if (ae && !oe[ae]) {
|
|
19995
|
-
const
|
|
19996
|
-
|
|
19995
|
+
const me = P.getUniformLocation(this.program, ae);
|
|
19996
|
+
me && (oe[ae] = me);
|
|
19997
19997
|
}
|
|
19998
|
-
this.fixedUniforms = c(t, oe), this.terrainUniforms = ((ae,
|
|
19998
|
+
this.fixedUniforms = c(t, oe), this.terrainUniforms = ((ae, me) => ({ u_depth: new h.b_(ae, me.u_depth), u_terrain: new h.b_(ae, me.u_terrain), u_terrain_dim: new h.bp(ae, me.u_terrain_dim), u_terrain_matrix: new h.c0(ae, me.u_terrain_matrix), u_terrain_unpack: new h.c1(ae, me.u_terrain_unpack), u_terrain_exaggeration: new h.bp(ae, me.u_terrain_exaggeration) }))(t, oe), this.projectionUniforms = ((ae, me) => ({ u_projection_matrix: new h.c0(ae, me.u_projection_matrix), u_projection_tile_mercator_coords: new h.c1(ae, me.u_projection_tile_mercator_coords), u_projection_clipping_plane: new h.c1(ae, me.u_projection_clipping_plane), u_projection_transition: new h.bp(ae, me.u_projection_transition), u_projection_fallback_matrix: new h.c0(ae, me.u_projection_fallback_matrix) }))(t, oe), this.binderUniforms = a ? a.getUniforms(t, oe) : [];
|
|
19999
19999
|
}
|
|
20000
20000
|
draw(t, n, a, c, f, y, x, w, S, P, E, C, z, B, V, G, N, $, X) {
|
|
20001
20001
|
var Z;
|
|
@@ -20643,9 +20643,9 @@ uniform ${P} ${E} u_${C};
|
|
|
20643
20643
|
const X = new h.P(N.anchorX, N.anchorY), Z = { getElevation: E, width: c.width, height: c.height, pitchedLabelPlaneMatrix: f, pitchWithMap: n, transform: c, tileAnchorPoint: X, translation: S, unwrappedTileID: P }, U = n ? Nn(X.x, X.y, Z) : lt(X.x, X.y, Z), H = Ts(c.cameraToCenterDistance, U.signedDistanceFromCamera);
|
|
20644
20644
|
let q = h.ay(d.textSizeData, x, N) * H / h.aJ;
|
|
20645
20645
|
n && (q *= d.tilePixelRatio / y);
|
|
20646
|
-
const { width: ee, height: oe, anchor: ae, textOffset:
|
|
20647
|
-
for (let ke = 0; ke < N.numGlyphs; ke++) h.aD(z, he,
|
|
20648
|
-
w && N.associatedIconIndex >= 0 && (V[N.associatedIconIndex] = { shiftedAnchor: he, angle:
|
|
20646
|
+
const { width: ee, height: oe, anchor: ae, textOffset: me, textBoxScale: de } = $, Ae = pl(ae, ee, oe, me, de, q), we = c.getPitchedTextCorrection(X.x + S[0], X.y + S[1], P), he = nh(U.point, Z, t, Ae, -c.bearingInRadians, we), Ie = d.allowVerticalPlacement && N.placedOrientation === h.ax.vertical ? Math.PI / 2 : 0;
|
|
20647
|
+
for (let ke = 0; ke < N.numGlyphs; ke++) h.aD(z, he, Ie);
|
|
20648
|
+
w && N.associatedIconIndex >= 0 && (V[N.associatedIconIndex] = { shiftedAnchor: he, angle: Ie });
|
|
20649
20649
|
} else cn(N.numGlyphs, z);
|
|
20650
20650
|
}
|
|
20651
20651
|
if (w) {
|
|
@@ -20671,31 +20671,31 @@ uniform ${P} ${E} u_${C};
|
|
|
20671
20671
|
var z, B;
|
|
20672
20672
|
const V = d.context, G = V.gl, N = d.transform, $ = x === "map", X = w === "map", Z = x !== "viewport" && n.layout.get("symbol-placement") !== "point", U = $ && !X && !Z, H = !n.layout.get("symbol-sort-key").isConstant();
|
|
20673
20673
|
let q = !1;
|
|
20674
|
-
const ee = d.getDepthModeForSublayer(0, $e.ReadOnly), oe = n._unevaluatedLayout.hasValue("text-variable-anchor") || n._unevaluatedLayout.hasValue("text-variable-anchor-offset"), ae = [],
|
|
20674
|
+
const ee = d.getDepthModeForSublayer(0, $e.ReadOnly), oe = n._unevaluatedLayout.hasValue("text-variable-anchor") || n._unevaluatedLayout.hasValue("text-variable-anchor-offset"), ae = [], me = N.getCircleRadiusCorrection();
|
|
20675
20675
|
for (const we of a) {
|
|
20676
|
-
const he = t.getTile(we),
|
|
20677
|
-
if (!
|
|
20678
|
-
const ke = c ?
|
|
20676
|
+
const he = t.getTile(we), Ie = he.getBucket(n);
|
|
20677
|
+
if (!Ie) continue;
|
|
20678
|
+
const ke = c ? Ie.text : Ie.icon;
|
|
20679
20679
|
if (!ke?.segments.get().length || !ke.hasVisibleVertices) continue;
|
|
20680
|
-
const ot = ke.programConfigurations.get(n.id), zt = c ||
|
|
20680
|
+
const ot = ke.programConfigurations.get(n.id), zt = c || Ie.sdfIcons, ut = c ? Ie.textSizeData : Ie.iconSizeData, Rt = X || N.pitch !== 0, Ft = d.useProgram(sh(zt, c, Ie), ot), oi = h.aw(ut, N.zoom), Mt = (z = d.style.map.terrain) === null || z === void 0 ? void 0 : z.getTerrainData(we);
|
|
20681
20681
|
let yi, ii, Zt, ai, $r = [0, 0], Zr = null;
|
|
20682
|
-
if (c) ii = he.glyphAtlasTexture, Zt = G.LINEAR, yi = he.glyphAtlasTexture.size,
|
|
20682
|
+
if (c) ii = he.glyphAtlasTexture, Zt = G.LINEAR, yi = he.glyphAtlasTexture.size, Ie.iconsInText && ($r = he.imageAtlasTexture.size, Zr = he.imageAtlasTexture, ai = Rt || d.options.rotating || d.options.zooming || ut.kind === "composite" || ut.kind === "camera" ? G.LINEAR : G.NEAREST);
|
|
20683
20683
|
else {
|
|
20684
|
-
const wt = n.layout.get("icon-size").constantOr(0) !== 1 ||
|
|
20684
|
+
const wt = n.layout.get("icon-size").constantOr(0) !== 1 || Ie.iconsNeedLinear;
|
|
20685
20685
|
ii = he.imageAtlasTexture, Zt = zt || d.options.rotating || d.options.zooming || wt || Rt ? G.LINEAR : G.NEAREST, yi = he.imageAtlasTexture.size;
|
|
20686
20686
|
}
|
|
20687
|
-
const qr = h.aK(he, 1, d.transform.zoom), li = ki($, d.transform, qr), Pr = yo(X, $, d.transform, qr), Wr = h.aL(N, he, f, y), sa = N.getProjectionData({ overscaledTileID: we, applyGlobeMatrix: !C, applyTerrainMatrix: !0 }), pr = oe &&
|
|
20687
|
+
const qr = h.aK(he, 1, d.transform.zoom), li = ki($, d.transform, qr), Pr = yo(X, $, d.transform, qr), Wr = h.aL(N, he, f, y), sa = N.getProjectionData({ overscaledTileID: we, applyGlobeMatrix: !C, applyTerrainMatrix: !0 }), pr = oe && Ie.hasTextData(), fr = n.layout.get("icon-text-fit") !== "none" && pr && Ie.hasIconData();
|
|
20688
20688
|
if (Z) {
|
|
20689
20689
|
const wt = h.O();
|
|
20690
20690
|
Ne(wt, li);
|
|
20691
20691
|
const Mn = d.style.map.terrain ? (Ir, Bl) => d.style.map.terrain.getElevation(we, Ir, Bl) : null, oa = n.layout.get("text-rotation-alignment") === "map";
|
|
20692
|
-
vo(
|
|
20692
|
+
vo(Ie, d, c, li, wt, X, S, oa, we.toUnwrapped(), N.width, N.height, Wr, Mn);
|
|
20693
20693
|
}
|
|
20694
20694
|
const Oi = c && oe || fr, Xi = Z || Oi ? rs : X ? li : d.transform.clipSpaceToPixelsMatrix, bt = zt && n.paint.get(c ? "text-halo-width" : "icon-halo-width").constantOr(1) !== 0;
|
|
20695
20695
|
let gt;
|
|
20696
|
-
gt = zt ?
|
|
20696
|
+
gt = zt ? Ie.iconsInText ? ll(ut.kind, oi, U, X, Z, Oi, d, Xi, Pr, Wr, yi, $r, me) : al(ut.kind, oi, U, X, Z, Oi, d, Xi, Pr, Wr, c, yi, bt, me) : ko(ut.kind, oi, U, X, Z, Oi, d, Xi, Pr, Wr, c, yi, me);
|
|
20697
20697
|
const Bt = { program: Ft, buffers: ke, uniformValues: gt, projectionData: sa, atlasTexture: ii, atlasTextureIcon: Zr, atlasInterpolation: Zt, atlasInterpolationIcon: ai, isSDF: zt, hasHalo: bt };
|
|
20698
|
-
if (H &&
|
|
20698
|
+
if (H && Ie.canOverlap) {
|
|
20699
20699
|
q = !0;
|
|
20700
20700
|
const wt = ke.segments.get();
|
|
20701
20701
|
for (const Mn of wt) ae.push({ segments: new h.aV([Mn]), sortKey: Mn.sortKey, state: Bt, terrainData: Mt });
|
|
@@ -20706,12 +20706,12 @@ uniform ${P} ${E} u_${C};
|
|
|
20706
20706
|
for (const we of ae) {
|
|
20707
20707
|
const he = we.state;
|
|
20708
20708
|
V.activeTexture.set(G.TEXTURE0), he.atlasTexture.bind(he.atlasInterpolation, G.CLAMP_TO_EDGE), he.atlasTextureIcon && (V.activeTexture.set(G.TEXTURE1), he.atlasTextureIcon && he.atlasTextureIcon.bind(he.atlasInterpolationIcon, G.CLAMP_TO_EDGE));
|
|
20709
|
-
const
|
|
20710
|
-
if (
|
|
20709
|
+
const Ie = he.isSDF && he.hasHalo;
|
|
20710
|
+
if (Ie) {
|
|
20711
20711
|
const ke = he.uniformValues;
|
|
20712
20712
|
ke.u_is_halo = 1, Ae && (ke.u_is_plain = 0, Ns(he.buffers, we.segments, n, d, he.program, ee, P, E, ke, he.projectionData, we.terrainData), ke.u_is_halo = 0, ke.u_is_plain = 1);
|
|
20713
20713
|
}
|
|
20714
|
-
Ns(he.buffers, we.segments, n, d, he.program, ee, P, E, he.uniformValues, he.projectionData, we.terrainData),
|
|
20714
|
+
Ns(he.buffers, we.segments, n, d, he.program, ee, P, E, he.uniformValues, he.projectionData, we.terrainData), Ie && !Ae && (he.uniformValues.u_is_halo = 0);
|
|
20715
20715
|
}
|
|
20716
20716
|
}
|
|
20717
20717
|
function Ns(d, t, n, a, c, f, y, x, w, S, P) {
|
|
@@ -20794,16 +20794,16 @@ uniform ${P} ${E} u_${C};
|
|
|
20794
20794
|
if (C && !ee.patternsLoaded()) continue;
|
|
20795
20795
|
const oe = ee.getBucket(n);
|
|
20796
20796
|
if (!oe) continue;
|
|
20797
|
-
const ae = oe.programConfigurations.get(n.id),
|
|
20797
|
+
const ae = oe.programConfigurations.get(n.id), me = d.useProgram(V, ae), de = (w = d.style.map.terrain) === null || w === void 0 ? void 0 : w.getTerrainData(q);
|
|
20798
20798
|
C && (d.context.activeTexture.set(S.TEXTURE0), ee.imageAtlasTexture.bind(S.LINEAR, S.CLAMP_TO_EDGE), ae.updatePaintBuffers(z)), Ei(ae, P, H, ee, n);
|
|
20799
20799
|
const Ae = X.getProjectionData({ overscaledTileID: q, applyGlobeMatrix: !x, applyTerrainMatrix: !0 }), we = h.aL(X, ee, Z, U);
|
|
20800
20800
|
if (y) {
|
|
20801
20801
|
N = oe.indexBuffer2, $ = oe.segments2;
|
|
20802
|
-
const
|
|
20803
|
-
G = V === "fillOutlinePattern" && C ? Ic(d, z, ee,
|
|
20802
|
+
const Ie = [S.drawingBufferWidth, S.drawingBufferHeight];
|
|
20803
|
+
G = V === "fillOutlinePattern" && C ? Ic(d, z, ee, Ie, we) : Pc(Ie, we);
|
|
20804
20804
|
} else N = oe.indexBuffer, $ = oe.segments, G = C ? Do(d, z, ee, we) : { u_fill_translate: we };
|
|
20805
20805
|
const he = d.stencilModeForClipping(q);
|
|
20806
|
-
|
|
20806
|
+
me.draw(d.context, B, c, he, f, Je.backCCW, G, de, Ae, n.id, oe.layoutVertexBuffer, N, $, n.paint, d.transform.zoom, ae);
|
|
20807
20807
|
}
|
|
20808
20808
|
}
|
|
20809
20809
|
function ns(d, t, n, a, c, f, y, x) {
|
|
@@ -20816,8 +20816,8 @@ uniform ${P} ${E} u_${C};
|
|
|
20816
20816
|
z && (d.context.activeTexture.set(P.TEXTURE0), X.imageAtlasTexture.bind(P.LINEAR, P.CLAMP_TO_EDGE), H.updatePaintBuffers(B));
|
|
20817
20817
|
const ee = N.getProjectionData({ overscaledTileID: $, applyGlobeMatrix: !x, applyTerrainMatrix: !0 });
|
|
20818
20818
|
Ei(H, E, G, X, n);
|
|
20819
|
-
const oe = h.aL(N, X, n.paint.get("fill-extrusion-translate"), n.paint.get("fill-extrusion-translate-anchor")), ae = n.paint.get("fill-extrusion-vertical-gradient"),
|
|
20820
|
-
q.draw(S, S.gl.TRIANGLES, c, f, y, Je.backCCW,
|
|
20819
|
+
const oe = h.aL(N, X, n.paint.get("fill-extrusion-translate"), n.paint.get("fill-extrusion-translate-anchor")), ae = n.paint.get("fill-extrusion-vertical-gradient"), me = z ? Sc(d, ae, V, oe, $, B, X) : Tc(d, ae, V, oe);
|
|
20820
|
+
q.draw(S, S.gl.TRIANGLES, c, f, y, Je.backCCW, me, U, ee, n.id, Z.layoutVertexBuffer, Z.indexBuffer, Z.segments, n.paint, d.transform.zoom, H, d.style.map.terrain && Z.centroidVertexBuffer);
|
|
20821
20821
|
}
|
|
20822
20822
|
}
|
|
20823
20823
|
function Wo(d, t, n, a, c, f, y, x, w) {
|
|
@@ -20841,14 +20841,14 @@ uniform ${P} ${E} u_${C};
|
|
|
20841
20841
|
const Z = t.getTile(X), U = Z.dem;
|
|
20842
20842
|
if (N) {
|
|
20843
20843
|
Nr || (Nr = z.getParameter(z.MAX_TEXTURE_SIZE));
|
|
20844
|
-
const
|
|
20844
|
+
const me = Nr, { elevationTexture: de, colorTexture: Ae } = n.getColorRampTextures(E, me, U.getUnpackVector());
|
|
20845
20845
|
E.activeTexture.set(z.TEXTURE1), de.bind(z.NEAREST, z.CLAMP_TO_EDGE), E.activeTexture.set(z.TEXTURE4), Ae.bind(z.LINEAR, z.CLAMP_TO_EDGE), N = !1, $ = de.size[0];
|
|
20846
20846
|
}
|
|
20847
20847
|
if (!U?.data) continue;
|
|
20848
20848
|
const H = U.stride, q = U.getPixels();
|
|
20849
20849
|
if (E.activeTexture.set(z.TEXTURE0), E.pixelStoreUnpackPremultiplyAlpha.set(!1), Z.demTexture || (Z.demTexture = d.getTileTexture(H)), Z.demTexture) {
|
|
20850
|
-
const
|
|
20851
|
-
|
|
20850
|
+
const me = Z.demTexture;
|
|
20851
|
+
me.update(q, { premultiply: !1 }), me.bind(G, z.CLAMP_TO_EDGE);
|
|
20852
20852
|
} else Z.demTexture = new h.T(E, q, z.RGBA, { premultiply: !1 }), Z.demTexture.bind(G, z.CLAMP_TO_EDGE);
|
|
20853
20853
|
const ee = P.getMeshFromTileID(E, X.canonical, x, !0, "raster"), oe = (S = d.style.map.terrain) === null || S === void 0 ? void 0 : S.getTerrainData(X), ae = C.getProjectionData({ overscaledTileID: X, aligned: V, applyGlobeMatrix: !w, applyTerrainMatrix: !0 });
|
|
20854
20854
|
B.draw(E, z.TRIANGLES, f, c[X.overscaledZ], y, Je.backCCW, Yu(n, Z.dem, $), oe, ae, n.id, ee.vertexBuffer, ee.indexBuffer, ee.segments);
|
|
@@ -20861,10 +20861,10 @@ uniform ${P} ${E} u_${C};
|
|
|
20861
20861
|
for (const q of a) {
|
|
20862
20862
|
const ee = d.getDepthModeForSublayer(q.overscaledZ - E, X === 1 ? $e.ReadWrite : $e.ReadOnly, z.LESS), oe = t.getTile(q);
|
|
20863
20863
|
C.activeTexture.set(z.TEXTURE0), oe.texture.bind(Z, z.CLAMP_TO_EDGE, z.LINEAR_MIPMAP_NEAREST), C.activeTexture.set(z.TEXTURE1);
|
|
20864
|
-
const { parentTile: ae, parentScaleBy:
|
|
20864
|
+
const { parentTile: ae, parentScaleBy: me, parentTopLeft: de, fadeValues: Ae } = $c(oe, t, U, H);
|
|
20865
20865
|
oe.fadeOpacity = Ae.tileOpacity, ae ? (ae.fadeOpacity = Ae.parentTileOpacity, ae.texture.bind(Z, z.CLAMP_TO_EDGE, z.LINEAR_MIPMAP_NEAREST)) : oe.texture.bind(Z, z.CLAMP_TO_EDGE, z.LINEAR_MIPMAP_NEAREST), oe.texture.useMipmap && C.extTextureFilterAnisotropic && d.transform.pitch > d.options.anisotropicFilterPitch && z.texParameterf(z.TEXTURE_2D, C.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT, C.extTextureFilterAnisotropicMax);
|
|
20866
|
-
const we = (P = d.style.map.terrain) === null || P === void 0 ? void 0 : P.getTerrainData(q), he = V.getProjectionData({ overscaledTileID: q, aligned: $, applyGlobeMatrix: !S, applyTerrainMatrix: !0 }),
|
|
20867
|
-
B.draw(C, z.TRIANGLES, ee, c ? c[q.overscaledZ] : et.disabled, N, w ? Je.frontCCW : Je.backCCW,
|
|
20866
|
+
const we = (P = d.style.map.terrain) === null || P === void 0 ? void 0 : P.getTerrainData(q), he = V.getProjectionData({ overscaledTileID: q, aligned: $, applyGlobeMatrix: !S, applyTerrainMatrix: !0 }), Ie = sl(de, me, Ae.fadeMix, n, x), ke = G.getMeshFromTileID(C, q.canonical, f, y, "raster");
|
|
20867
|
+
B.draw(C, z.TRIANGLES, ee, c ? c[q.overscaledZ] : et.disabled, N, w ? Je.frontCCW : Je.backCCW, Ie, we, he, n.id, ke.vertexBuffer, ke.indexBuffer, ke.segments);
|
|
20868
20868
|
}
|
|
20869
20869
|
}
|
|
20870
20870
|
function $c(d, t, n, a) {
|
|
@@ -20941,9 +20941,9 @@ uniform ${P} ${E} u_${C};
|
|
|
20941
20941
|
for (const q of S) {
|
|
20942
20942
|
const ee = C.getTile(q), oe = ee.getBucket(E);
|
|
20943
20943
|
if (!(!(($ = oe?.text) === null || $ === void 0) && $.segments.get().length)) continue;
|
|
20944
|
-
const ae = h.aw(oe.textSizeData, X.zoom),
|
|
20944
|
+
const ae = h.aw(oe.textSizeData, X.zoom), me = h.aK(ee, 1, P.transform.zoom), de = ki(U, P.transform, me), Ae = E.layout.get("icon-text-fit") !== "none" && oe.hasIconData();
|
|
20945
20945
|
if (ae) {
|
|
20946
|
-
const we = Math.pow(2, X.zoom - ee.tileID.overscaledZ), he = Z ? (
|
|
20946
|
+
const we = Math.pow(2, X.zoom - ee.tileID.overscaledZ), he = Z ? (Ie, ke) => Z.getElevation(q, Ie, ke) : null;
|
|
20947
20947
|
js(oe, U, H, N, X, de, we, ae, Ae, h.aL(X, ee, V, G), q.toUnwrapped(), he);
|
|
20948
20948
|
}
|
|
20949
20949
|
}
|
|
@@ -20957,10 +20957,10 @@ uniform ${P} ${E} u_${C};
|
|
|
20957
20957
|
for (const X of a) {
|
|
20958
20958
|
const Z = t.getTile(X), U = Z.getBucket(n);
|
|
20959
20959
|
if (!U) continue;
|
|
20960
|
-
const H = n.paint.get("circle-translate"), q = n.paint.get("circle-translate-anchor"), ee = h.aL(z, Z, H, q), oe = U.programConfigurations.get(n.id), ae = d.useProgram("circle", oe),
|
|
20960
|
+
const H = n.paint.get("circle-translate"), q = n.paint.get("circle-translate-anchor"), ee = h.aL(z, Z, H, q), oe = U.programConfigurations.get(n.id), ae = d.useProgram("circle", oe), me = U.layoutVertexBuffer, de = U.indexBuffer, Ae = (f = d.style.map.terrain) === null || f === void 0 ? void 0 : f.getTerrainData(X), we = { programConfiguration: oe, program: ae, layoutVertexBuffer: me, indexBuffer: de, uniformValues: Mc(d, Z, n, ee, $), terrainData: Ae, projectionData: z.getProjectionData({ overscaledTileID: X, applyGlobeMatrix: !y, applyTerrainMatrix: !0 }) };
|
|
20961
20961
|
if (P) {
|
|
20962
20962
|
const he = U.segments.get();
|
|
20963
|
-
for (const
|
|
20963
|
+
for (const Ie of he) N.push({ segments: new h.aV([Ie]), sortKey: Ie.sortKey, state: we });
|
|
20964
20964
|
} else N.push({ segments: U.segments, sortKey: 0, state: we });
|
|
20965
20965
|
}
|
|
20966
20966
|
P && N.sort(((X, Z) => X.sortKey - Z.sortKey));
|
|
@@ -21014,7 +21014,7 @@ uniform ${P} ${E} u_${C};
|
|
|
21014
21014
|
if (B && !q.patternsLoaded()) continue;
|
|
21015
21015
|
const ee = q.getBucket(n);
|
|
21016
21016
|
if (!ee) continue;
|
|
21017
|
-
const oe = ee.programConfigurations.get(n.id), ae = d.context.program.get(),
|
|
21017
|
+
const oe = ee.programConfigurations.get(n.id), ae = d.context.program.get(), me = d.useProgram(N, oe), de = U || me.program !== ae, Ae = (f = d.style.map.terrain) === null || f === void 0 ? void 0 : f.getTerrainData(H), we = z.constantOr(null), he = E?.constantOr(null);
|
|
21018
21018
|
if (we && q.imageAtlas) {
|
|
21019
21019
|
const ut = q.imageAtlas, Rt = ut.patternPositions[we.to.toString()], Ft = ut.patternPositions[we.from.toString()];
|
|
21020
21020
|
Rt && Ft && oe.setConstantPatternPositions(Rt, Ft);
|
|
@@ -21022,11 +21022,11 @@ uniform ${P} ${E} u_${C};
|
|
|
21022
21022
|
const ut = n.layout.get("line-cap").constantOr(null) === "round", Rt = d.lineAtlas.getDash(he.to, ut), Ft = d.lineAtlas.getDash(he.from, ut);
|
|
21023
21023
|
oe.setConstantDashPositions(Rt, Ft);
|
|
21024
21024
|
}
|
|
21025
|
-
const
|
|
21025
|
+
const Ie = Z.getProjectionData({ overscaledTileID: H, applyGlobeMatrix: !y, applyTerrainMatrix: !0 }), ke = Z.getPixelScale();
|
|
21026
21026
|
let ot;
|
|
21027
21027
|
B ? (ot = Ac(d, q, n, ke, G), oh($, X, q, oe, G)) : C && V ? (ot = Dc(d, q, n, ke, G, ee.lineClipsArray.length), wn(d, t, $, X, n, ee, H, oe, G)) : C ? (ot = nl(d, q, n, ke, G), Gc(d, $, X, oe, de, G)) : V ? (ot = Cc(d, q, n, ke, ee.lineClipsArray.length), Dt(d, t, $, X, n, ee, H)) : ot = Rs(d, q, n, ke);
|
|
21028
21028
|
const zt = d.stencilModeForClipping(H);
|
|
21029
|
-
|
|
21029
|
+
me.draw($, X.TRIANGLES, S, zt, P, Je.disabled, ot, Ae, Ie, n.id, ee.layoutVertexBuffer, ee.indexBuffer, ee.segments, n.paint, d.transform.zoom, oe, ee.layoutVertexBuffer2), U = !1;
|
|
21030
21030
|
}
|
|
21031
21031
|
}, fill: function(d, t, n, a, c) {
|
|
21032
21032
|
const f = n.paint.get("fill-color"), y = n.paint.get("fill-opacity");
|
|
@@ -21062,14 +21062,14 @@ uniform ${P} ${E} u_${C};
|
|
|
21062
21062
|
if (!H?.data || !U.needsHillshadePrepare) continue;
|
|
21063
21063
|
const q = H.dim, ee = H.stride, oe = H.getPixels();
|
|
21064
21064
|
if (N.activeTexture.set($.TEXTURE1), N.pixelStoreUnpackPremultiplyAlpha.set(!1), U.demTexture || (U.demTexture = P.getTileTexture(ee)), U.demTexture) {
|
|
21065
|
-
const
|
|
21066
|
-
|
|
21065
|
+
const me = U.demTexture;
|
|
21066
|
+
me.update(oe, { premultiply: !1 }), me.bind($.NEAREST, $.CLAMP_TO_EDGE);
|
|
21067
21067
|
} else U.demTexture = new h.T(N, oe, $.RGBA, { premultiply: !1 }), U.demTexture.bind($.NEAREST, $.CLAMP_TO_EDGE);
|
|
21068
21068
|
N.activeTexture.set($.TEXTURE0);
|
|
21069
21069
|
let ae = U.fbo;
|
|
21070
21070
|
if (!ae) {
|
|
21071
|
-
const
|
|
21072
|
-
|
|
21071
|
+
const me = new h.T(N, { width: q, height: q, data: null }, $.RGBA);
|
|
21072
|
+
me.bind(X, $.CLAMP_TO_EDGE), ae = U.fbo = N.createFramebuffer(q, q, !0, !1), ae.colorAttachment.set(me.texture);
|
|
21073
21073
|
}
|
|
21074
21074
|
N.bindFramebuffer.set(ae.framebuffer), N.viewport.set([0, 0, q, q]), P.useProgram("hillshadePrepare").draw(N, $.TRIANGLES, B, V, G, Je.disabled, zo(U.tileID, H), null, null, z.id, P.rasterBoundsBuffer, P.quadTriangleIndexBuffer, P.rasterBoundsSegments), U.needsHillshadePrepare = !1;
|
|
21075
21075
|
}
|
|
@@ -21524,7 +21524,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
21524
21524
|
}
|
|
21525
21525
|
constructor(t, n, a, c = {}) {
|
|
21526
21526
|
a = a instanceof MouseEvent ? a : new MouseEvent(t, a);
|
|
21527
|
-
const f =
|
|
21527
|
+
const f = fe.mousePos(n.getCanvas(), a), y = n.unproject(f);
|
|
21528
21528
|
super(t, h.e({ point: f, lngLat: y, originalEvent: a }, c)), this._defaultPrevented = !1, this.target = n;
|
|
21529
21529
|
}
|
|
21530
21530
|
}
|
|
@@ -21536,7 +21536,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
21536
21536
|
return this._defaultPrevented;
|
|
21537
21537
|
}
|
|
21538
21538
|
constructor(t, n, a) {
|
|
21539
|
-
const c = t === "touchend" ? a.changedTouches : a.touches, f =
|
|
21539
|
+
const c = t === "touchend" ? a.changedTouches : a.touches, f = fe.touchPos(n.getCanvasContainer(), c), y = f.map(((w) => n.unproject(w))), x = f.reduce(((w, S, P, E) => w.add(S.div(E.length))), new h.P(0, 0));
|
|
21540
21540
|
super(t, { points: f, point: x, lngLats: y, lngLat: n.unproject(x), originalEvent: a }), this._defaultPrevented = !1;
|
|
21541
21541
|
}
|
|
21542
21542
|
}
|
|
@@ -21675,34 +21675,34 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
21675
21675
|
this.isEnabled() && (this._enabled = !1);
|
|
21676
21676
|
}
|
|
21677
21677
|
mousedown(t, n) {
|
|
21678
|
-
this.isEnabled() && t.shiftKey && t.button === 0 && (
|
|
21678
|
+
this.isEnabled() && t.shiftKey && t.button === 0 && (fe.disableDrag(), this._startPos = this._lastPos = n, this._active = !0);
|
|
21679
21679
|
}
|
|
21680
21680
|
mousemoveWindow(t, n) {
|
|
21681
21681
|
if (!this._active) return;
|
|
21682
21682
|
const a = n;
|
|
21683
21683
|
if (this._lastPos.equals(a) || !this._box && a.dist(this._startPos) < this._clickTolerance) return;
|
|
21684
21684
|
const c = this._startPos;
|
|
21685
|
-
this._lastPos = a, this._box || (this._box =
|
|
21685
|
+
this._lastPos = a, this._box || (this._box = fe.create("div", "maplibregl-boxzoom", this._container), this._container.classList.add("maplibregl-crosshair"), this._fireEvent("boxzoomstart", t));
|
|
21686
21686
|
const f = Math.min(c.x, a.x), y = Math.max(c.x, a.x), x = Math.min(c.y, a.y), w = Math.max(c.y, a.y);
|
|
21687
21687
|
this._box.style.transform = `translate(${f}px,${x}px)`, this._box.style.width = y - f + "px", this._box.style.height = w - x + "px";
|
|
21688
21688
|
}
|
|
21689
21689
|
mouseupWindow(t, n) {
|
|
21690
21690
|
if (!this._active || t.button !== 0) return;
|
|
21691
21691
|
const a = this._startPos, c = n;
|
|
21692
|
-
if (this.reset(),
|
|
21692
|
+
if (this.reset(), fe.suppressClick(), a.x !== c.x || a.y !== c.y) return this._map.fire(new h.n("boxzoomend", { originalEvent: t })), this._boxZoomEnd ? void this._boxZoomEnd(this._map, a, c, t) : { cameraAnimation: (f) => f.fitScreenCoordinates(a, c, this._tr.bearing, { linear: !0 }) };
|
|
21693
21693
|
this._fireEvent("boxzoomcancel", t);
|
|
21694
21694
|
}
|
|
21695
21695
|
keydown(t) {
|
|
21696
21696
|
this._active && t.keyCode === 27 && (this.reset(), this._fireEvent("boxzoomcancel", t));
|
|
21697
21697
|
}
|
|
21698
21698
|
reset() {
|
|
21699
|
-
this._active = !1, this._container.classList.remove("maplibregl-crosshair"), this._box && (this._box.remove(), this._box = null),
|
|
21699
|
+
this._active = !1, this._container.classList.remove("maplibregl-crosshair"), this._box && (this._box.remove(), this._box = null), fe.enableDrag(), delete this._startPos, delete this._lastPos;
|
|
21700
21700
|
}
|
|
21701
21701
|
_fireEvent(t, n) {
|
|
21702
21702
|
return this._map.fire(new h.n(t, { originalEvent: n }));
|
|
21703
21703
|
}
|
|
21704
21704
|
}
|
|
21705
|
-
function
|
|
21705
|
+
function Ee(d, t) {
|
|
21706
21706
|
if (d.length !== t.length) throw new Error(`The number of touches and points are not equal - touches ${d.length}, points ${t.length}`);
|
|
21707
21707
|
const n = {};
|
|
21708
21708
|
for (let a = 0; a < d.length; a++) n[d[a].identifier] = t[a];
|
|
@@ -21720,11 +21720,11 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
21720
21720
|
const f = new h.P(0, 0);
|
|
21721
21721
|
for (const y of c) f._add(y);
|
|
21722
21722
|
return f.div(c.length);
|
|
21723
|
-
})(n), this.touches =
|
|
21723
|
+
})(n), this.touches = Ee(a, n)));
|
|
21724
21724
|
}
|
|
21725
21725
|
touchmove(t, n, a) {
|
|
21726
21726
|
if (this.aborted || !this.centroid) return;
|
|
21727
|
-
const c =
|
|
21727
|
+
const c = Ee(a, n);
|
|
21728
21728
|
for (const f in this.touches) {
|
|
21729
21729
|
const y = c[f];
|
|
21730
21730
|
(!y || y.dist(this.touches[f]) > 30) && (this.aborted = !0);
|
|
@@ -21814,7 +21814,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
21814
21814
|
return !this._moved && c.dist(a) < this._clickTolerance ? void 0 : (this._moved = !0, this._lastPoint = c, this._move(a, c));
|
|
21815
21815
|
}
|
|
21816
21816
|
dragEnd(t) {
|
|
21817
|
-
this.isEnabled() && this._lastPoint && this._moveStateManager.isValidEndEvent(t) && (this._moved &&
|
|
21817
|
+
this.isEnabled() && this._lastPoint && this._moveStateManager.isValidEndEvent(t) && (this._moved && fe.suppressClick(), this.reset(t));
|
|
21818
21818
|
}
|
|
21819
21819
|
enable() {
|
|
21820
21820
|
this._enabled = !0;
|
|
@@ -21945,7 +21945,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
21945
21945
|
}
|
|
21946
21946
|
_calculateTransform(t, n, a) {
|
|
21947
21947
|
a.length > 0 && (this._active = !0);
|
|
21948
|
-
const c =
|
|
21948
|
+
const c = Ee(a, n), f = new h.P(0, 0), y = new h.P(0, 0);
|
|
21949
21949
|
let x = 0;
|
|
21950
21950
|
for (const S in c) {
|
|
21951
21951
|
const P = c[S], E = this._touches[S];
|
|
@@ -21989,7 +21989,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
21989
21989
|
touchend(t, n, a) {
|
|
21990
21990
|
if (!this._firstTwoTouches) return;
|
|
21991
21991
|
const [c, f] = this._firstTwoTouches, y = Xo(a, n, c), x = Xo(a, n, f);
|
|
21992
|
-
y && x || (this._active &&
|
|
21992
|
+
y && x || (this._active && fe.suppressClick(), this.reset());
|
|
21993
21993
|
}
|
|
21994
21994
|
touchcancel() {
|
|
21995
21995
|
this.reset();
|
|
@@ -22192,7 +22192,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
22192
22192
|
_start(t) {
|
|
22193
22193
|
if (!this._delta) return;
|
|
22194
22194
|
this._needsRerender = !1, this._active = !0, this.isZooming() || (this._zooming = !0), this._finishTimeout && (clearTimeout(this._finishTimeout), delete this._finishTimeout);
|
|
22195
|
-
const n =
|
|
22195
|
+
const n = fe.mousePos(this._map.getCanvas(), t), a = this._tr;
|
|
22196
22196
|
this._aroundPoint = this._aroundCenter ? a.transform.locationToScreenPoint(h.W.convert(a.center)) : n, this._needsRerender || (this._needsRerender = !0, this._triggerRenderFrame());
|
|
22197
22197
|
}
|
|
22198
22198
|
renderFrame() {
|
|
@@ -22400,7 +22400,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
22400
22400
|
_setupUI() {
|
|
22401
22401
|
if (this._container) return;
|
|
22402
22402
|
const t = this._map.getCanvasContainer();
|
|
22403
|
-
t.classList.add("maplibregl-cooperative-gestures"), this._container =
|
|
22403
|
+
t.classList.add("maplibregl-cooperative-gestures"), this._container = fe.create("div", "maplibregl-cooperative-gesture-screen", t);
|
|
22404
22404
|
let n = this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");
|
|
22405
22405
|
this._bypassKey === "metaKey" && (n = this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));
|
|
22406
22406
|
const a = this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"), c = document.createElement("div");
|
|
@@ -22458,10 +22458,10 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
22458
22458
|
if (this._blockedByActive(S, B, C)) z.reset();
|
|
22459
22459
|
else if (z[f || c.type]) {
|
|
22460
22460
|
if (h.cz(c, f || c.type)) {
|
|
22461
|
-
const G =
|
|
22461
|
+
const G = fe.mousePos(this._map.getCanvas(), c);
|
|
22462
22462
|
V = z[f || c.type](c, G);
|
|
22463
22463
|
} else if (h.cA(c, f || c.type)) {
|
|
22464
|
-
const G = this._getMapTouches(c.touches), N =
|
|
22464
|
+
const G = this._getMapTouches(c.touches), N = fe.touchPos(this._map.getCanvas(), G);
|
|
22465
22465
|
V = z[f || c.type](c, N, G);
|
|
22466
22466
|
} else h.cB(f || c.type) || (V = z[f || c.type](c));
|
|
22467
22467
|
this.mergeHandlerResult(x, w, V, C, y), V?.needsRenderFrame && this._triggerRenderFrame();
|
|
@@ -22495,11 +22495,11 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
22495
22495
|
const S = n.touchPitch = new Tr(n);
|
|
22496
22496
|
this._add("touchPitch", S), t.interactive && t.touchPitch && n.touchPitch.enable(t.touchPitch);
|
|
22497
22497
|
const P = () => n.project(n.getCenter()), E = (function({ enable: Z, clickTolerance: U, aroundCenter: H = !0, minPixelCenterThreshold: q = 100, rotateDegreesPerPixelMoved: ee = 0.8 }, oe) {
|
|
22498
|
-
const ae = new Sn({ checkCorrectEvent: (
|
|
22499
|
-
return new wr({ clickTolerance: U, move: (
|
|
22498
|
+
const ae = new Sn({ checkCorrectEvent: (me) => me.button === 0 && me.ctrlKey || me.button === 2 && !me.ctrlKey });
|
|
22499
|
+
return new wr({ clickTolerance: U, move: (me, de) => {
|
|
22500
22500
|
const Ae = oe();
|
|
22501
|
-
if (H && Math.abs(Ae.y -
|
|
22502
|
-
let we = (de.x -
|
|
22501
|
+
if (H && Math.abs(Ae.y - me.y) > q) return { bearingDelta: h.cx(new h.P(me.x, de.y), de, Ae) };
|
|
22502
|
+
let we = (de.x - me.x) * ee;
|
|
22503
22503
|
return H && de.y < Ae.y && (we = -we), { bearingDelta: we };
|
|
22504
22504
|
}, moveStateManager: ae, enable: Z, assignEvents: Ho });
|
|
22505
22505
|
})(t, P), C = (function({ enable: Z, clickTolerance: U, pitchDegreesPerPixelMoved: H = -0.5 }) {
|
|
@@ -22508,9 +22508,9 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
22508
22508
|
})(t), z = (function({ enable: Z, clickTolerance: U, rollDegreesPerPixelMoved: H = 0.3 }, q) {
|
|
22509
22509
|
const ee = new Sn({ checkCorrectEvent: (oe) => oe.button === 2 && oe.ctrlKey });
|
|
22510
22510
|
return new wr({ clickTolerance: U, move: (oe, ae) => {
|
|
22511
|
-
const
|
|
22511
|
+
const me = q();
|
|
22512
22512
|
let de = (ae.x - oe.x) * H;
|
|
22513
|
-
return ae.y <
|
|
22513
|
+
return ae.y < me.y && (de = -de), { rollDelta: de };
|
|
22514
22514
|
}, moveStateManager: ee, enable: Z, assignEvents: Ho });
|
|
22515
22515
|
})(t, P);
|
|
22516
22516
|
n.dragRotate = new Js(t, E, C, z), this._add("mouseRotate", E, ["mousePitch"]), this._add("mousePitch", C, ["mouseRotate", "mouseRoll"]), this._add("mouseRoll", z, ["mousePitch"]), t.interactive && t.dragRotate && n.dragRotate.enable();
|
|
@@ -22862,14 +22862,14 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
22862
22862
|
}, ae = function(de) {
|
|
22863
22863
|
return N * ((q(ee) * (H(Ae = ee + G * de) / q(Ae)) - H(ee)) / Z) / X;
|
|
22864
22864
|
var Ae;
|
|
22865
|
-
},
|
|
22866
|
-
if (Math.abs(X) < 2e-6 || !isFinite(
|
|
22865
|
+
}, me = (U(!0) - ee) / G;
|
|
22866
|
+
if (Math.abs(X) < 2e-6 || !isFinite(me)) {
|
|
22867
22867
|
if (Math.abs(N - $) < 1e-6) return this.easeTo(t, n);
|
|
22868
22868
|
const de = $ < N ? -1 : 1;
|
|
22869
|
-
|
|
22869
|
+
me = Math.abs(Math.log($ / N)) / G, ae = () => 0, oe = (Ae) => Math.exp(de * G * Ae);
|
|
22870
22870
|
}
|
|
22871
|
-
return t.duration = "duration" in t ? +t.duration : 1e3 *
|
|
22872
|
-
const Ae = de *
|
|
22871
|
+
return t.duration = "duration" in t ? +t.duration : 1e3 * me / ("screenSpeed" in t ? +t.screenSpeed / G : +t.speed), t.maxDuration && t.duration > t.maxDuration && (t.duration = 0), this._zooming = !0, this._rotating = c !== w, this._pitching = S !== f, this._rolling = P !== y, this._padding = !a.isPaddingEqual(E), this._prepareEase(n, !1), this.terrain && this._prepareElevation(V.targetCenter), this._ease(((de) => {
|
|
22872
|
+
const Ae = de * me, we = 1 / oe(Ae), he = ae(Ae);
|
|
22873
22873
|
this._rotating && a.setBearing(h.H.number(c, w, de)), this._pitching && a.setPitch(h.H.number(f, S, de)), this._rolling && a.setRoll(h.H.number(y, P, de)), this._padding && (a.interpolatePadding(x, E, de), z = a.centerPoint.add(C)), V.easeFunc(de, we, he, z), this.terrain && !t.freezeElevation && this._updateElevation(de), this._applyUpdatedTransform(a), this._fireMoveEvents(n);
|
|
22874
22874
|
}), (() => {
|
|
22875
22875
|
this.terrain && t.freezeElevation && this._finalizeElevation(), this._afterEase(n);
|
|
@@ -22918,7 +22918,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
22918
22918
|
return "bottom-right";
|
|
22919
22919
|
}
|
|
22920
22920
|
onAdd(t) {
|
|
22921
|
-
return this._map = t, this._compact = this.options.compact, this._container =
|
|
22921
|
+
return this._map = t, this._compact = this.options.compact, this._container = fe.create("details", "maplibregl-ctrl maplibregl-ctrl-attrib"), this._compactButton = fe.create("summary", "maplibregl-ctrl-attrib-button", this._container), this._compactButton.addEventListener("click", this._toggleAttribution), this._setElementTitle(this._compactButton, "ToggleAttribution"), this._innerContainer = fe.create("div", "maplibregl-ctrl-attrib-inner", this._container), this._updateAttributions(), this._updateCompact(), this._map.on("styledata", this._updateData), this._map.on("sourcedata", this._updateData), this._map.on("terrain", this._updateData), this._map.on("resize", this._updateCompact), this._map.on("drag", this._updateCompactMinimize), this._container;
|
|
22922
22922
|
}
|
|
22923
22923
|
onRemove() {
|
|
22924
22924
|
this._container.remove(), this._map.off("styledata", this._updateData), this._map.off("sourcedata", this._updateData), this._map.off("terrain", this._updateData), this._map.off("resize", this._updateCompact), this._map.off("drag", this._updateCompactMinimize), this._map = void 0, this._compact = void 0, this._attribHTML = void 0;
|
|
@@ -22947,7 +22947,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
22947
22947
|
return !0;
|
|
22948
22948
|
}));
|
|
22949
22949
|
const a = t.join(" | ");
|
|
22950
|
-
a !== this._attribHTML && (this._attribHTML = a, t.length ? (this._innerContainer.innerHTML =
|
|
22950
|
+
a !== this._attribHTML && (this._attribHTML = a, t.length ? (this._innerContainer.innerHTML = fe.sanitize(a), this._container.classList.remove("maplibregl-attrib-empty")) : this._container.classList.add("maplibregl-attrib-empty"), this._updateCompact(), this._editLink = null);
|
|
22951
22951
|
}
|
|
22952
22952
|
}
|
|
22953
22953
|
class Dl {
|
|
@@ -22965,8 +22965,8 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
22965
22965
|
}
|
|
22966
22966
|
onAdd(t) {
|
|
22967
22967
|
var n;
|
|
22968
|
-
this._map = t, this._compact = (n = this.options) === null || n === void 0 ? void 0 : n.compact, this._container =
|
|
22969
|
-
const a =
|
|
22968
|
+
this._map = t, this._compact = (n = this.options) === null || n === void 0 ? void 0 : n.compact, this._container = fe.create("div", "maplibregl-ctrl");
|
|
22969
|
+
const a = fe.create("a", "maplibregl-ctrl-logo");
|
|
22970
22970
|
return a.target = "_blank", a.rel = "noopener nofollow", a.href = "https://maplibre.org/", a.setAttribute("aria-label", this._map._getUIString("LogoControl.Title")), a.setAttribute("rel", "noopener nofollow"), this._container.appendChild(a), this._container.style.display = "block", this._map.on("resize", this._updateCompact), this._updateCompact(), this._container;
|
|
22971
22971
|
}
|
|
22972
22972
|
onRemove() {
|
|
@@ -23836,12 +23836,12 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
23836
23836
|
_setupContainer() {
|
|
23837
23837
|
const d = this._container;
|
|
23838
23838
|
d.classList.add("maplibregl-map");
|
|
23839
|
-
const t = this._canvasContainer =
|
|
23840
|
-
this._interactive && t.classList.add("maplibregl-interactive"), this._canvas =
|
|
23839
|
+
const t = this._canvasContainer = fe.create("div", "maplibregl-canvas-container", d);
|
|
23840
|
+
this._interactive && t.classList.add("maplibregl-interactive"), this._canvas = fe.create("canvas", "maplibregl-canvas", t), this._canvas.addEventListener("webglcontextlost", this._contextLost, !1), this._canvas.addEventListener("webglcontextrestored", this._contextRestored, !1), this._canvas.setAttribute("tabindex", this._interactive ? "0" : "-1"), this._canvas.setAttribute("aria-label", this._getUIString("Map.Title")), this._canvas.setAttribute("role", "region");
|
|
23841
23841
|
const n = this._containerDimensions(), a = this._getClampedPixelRatio(n[0], n[1]);
|
|
23842
23842
|
this._resizeCanvas(n[0], n[1], a);
|
|
23843
|
-
const c = this._controlContainer =
|
|
23844
|
-
for (const y of ["top-left", "top-right", "bottom-left", "bottom-right"]) f[y] =
|
|
23843
|
+
const c = this._controlContainer = fe.create("div", "maplibregl-control-container", d), f = this._controlPositions = {};
|
|
23844
|
+
for (const y of ["top-left", "top-right", "bottom-left", "bottom-right"]) f[y] = fe.create("div", `maplibregl-ctrl-${y} `, c);
|
|
23845
23845
|
this._container.addEventListener("scroll", this._onMapScroll, !1);
|
|
23846
23846
|
}
|
|
23847
23847
|
_resizeCanvas(d, t, n) {
|
|
@@ -23970,15 +23970,15 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
23970
23970
|
class to {
|
|
23971
23971
|
constructor(t, n, a = !1) {
|
|
23972
23972
|
this.mousedown = (f) => {
|
|
23973
|
-
this.startMove(f,
|
|
23973
|
+
this.startMove(f, fe.mousePos(this.element, f)), window.addEventListener("mousemove", this.mousemove), window.addEventListener("mouseup", this.mouseup);
|
|
23974
23974
|
}, this.mousemove = (f) => {
|
|
23975
|
-
this.move(f,
|
|
23975
|
+
this.move(f, fe.mousePos(this.element, f));
|
|
23976
23976
|
}, this.mouseup = (f) => {
|
|
23977
23977
|
this._rotatePitchHandler.dragEnd(f), this.offTemp();
|
|
23978
23978
|
}, this.touchstart = (f) => {
|
|
23979
|
-
f.targetTouches.length !== 1 ? this.reset() : (this._startPos = this._lastPos =
|
|
23979
|
+
f.targetTouches.length !== 1 ? this.reset() : (this._startPos = this._lastPos = fe.touchPos(this.element, f.targetTouches)[0], this.startMove(f, this._startPos), window.addEventListener("touchmove", this.touchmove, { passive: !1 }), window.addEventListener("touchend", this.touchend));
|
|
23980
23980
|
}, this.touchmove = (f) => {
|
|
23981
|
-
f.targetTouches.length !== 1 ? this.reset() : (this._lastPos =
|
|
23981
|
+
f.targetTouches.length !== 1 ? this.reset() : (this._lastPos = fe.touchPos(this.element, f.targetTouches)[0], this.move(f, this._lastPos));
|
|
23982
23982
|
}, this.touchend = (f) => {
|
|
23983
23983
|
f.targetTouches.length === 0 && this._startPos && this._lastPos && this._startPos.dist(this._lastPos) < this._clickTolerance && this.element.click(), delete this._startPos, delete this._lastPos, this.offTemp();
|
|
23984
23984
|
}, this.reset = () => {
|
|
@@ -23992,7 +23992,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
23992
23992
|
} }), this.map = t, n.addEventListener("mousedown", this.mousedown), n.addEventListener("touchstart", this.touchstart, { passive: !1 }), n.addEventListener("touchcancel", this.reset);
|
|
23993
23993
|
}
|
|
23994
23994
|
startMove(t, n) {
|
|
23995
|
-
this._rotatePitchHandler.dragStart(t, n),
|
|
23995
|
+
this._rotatePitchHandler.dragStart(t, n), fe.disableDrag();
|
|
23996
23996
|
}
|
|
23997
23997
|
move(t, n) {
|
|
23998
23998
|
const a = this.map, { bearingDelta: c, pitchDelta: f } = this._rotatePitchHandler.dragMove(t, n) || {};
|
|
@@ -24003,7 +24003,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
24003
24003
|
t.removeEventListener("mousedown", this.mousedown), t.removeEventListener("touchstart", this.touchstart), window.removeEventListener("touchmove", this.touchmove), window.removeEventListener("touchend", this.touchend), t.removeEventListener("touchcancel", this.reset), this.offTemp();
|
|
24004
24004
|
}
|
|
24005
24005
|
offTemp() {
|
|
24006
|
-
|
|
24006
|
+
fe.enableDrag(), window.removeEventListener("mousemove", this.mousemove), window.removeEventListener("mouseup", this.mouseup), window.removeEventListener("touchmove", this.touchmove), window.removeEventListener("touchend", this.touchend);
|
|
24007
24007
|
}
|
|
24008
24008
|
}
|
|
24009
24009
|
let Sr;
|
|
@@ -24059,35 +24059,35 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
24059
24059
|
this._element.contains(n.originalEvent.target) && (n.preventDefault(), this._positionDelta = n.point.sub(this._pos).add(this._offset), this._pointerdownPos = n.point, this._state = "pending", this._map.on("mousemove", this._onMove), this._map.on("touchmove", this._onMove), this._map.once("mouseup", this._onUp), this._map.once("touchend", this._onUp));
|
|
24060
24060
|
}, this._anchor = t?.anchor || "center", this._color = t?.color || "#3FB1CE", this._scale = t?.scale || 1, this._draggable = t?.draggable || !1, this._clickTolerance = t?.clickTolerance || 0, this._subpixelPositioning = t?.subpixelPositioning || !1, this._isDragging = !1, this._state = "inactive", this._rotation = t?.rotation || 0, this._rotationAlignment = t?.rotationAlignment || "auto", this._pitchAlignment = t?.pitchAlignment && t.pitchAlignment !== "auto" ? t.pitchAlignment : this._rotationAlignment, this.setOpacity(t?.opacity, t?.opacityWhenCovered), t?.element) this._element = t.element, this._offset = h.P.convert(t?.offset || [0, 0]);
|
|
24061
24061
|
else {
|
|
24062
|
-
this._defaultMarker = !0, this._element =
|
|
24063
|
-
const n =
|
|
24062
|
+
this._defaultMarker = !0, this._element = fe.create("div");
|
|
24063
|
+
const n = fe.createNS("http://www.w3.org/2000/svg", "svg"), a = 41, c = 27;
|
|
24064
24064
|
n.setAttributeNS(null, "display", "block"), n.setAttributeNS(null, "height", `${a}px`), n.setAttributeNS(null, "width", `${c}px`), n.setAttributeNS(null, "viewBox", `0 0 ${c} ${a}`);
|
|
24065
|
-
const f =
|
|
24065
|
+
const f = fe.createNS("http://www.w3.org/2000/svg", "g");
|
|
24066
24066
|
f.setAttributeNS(null, "stroke", "none"), f.setAttributeNS(null, "stroke-width", "1"), f.setAttributeNS(null, "fill", "none"), f.setAttributeNS(null, "fill-rule", "evenodd");
|
|
24067
|
-
const y =
|
|
24067
|
+
const y = fe.createNS("http://www.w3.org/2000/svg", "g");
|
|
24068
24068
|
y.setAttributeNS(null, "fill-rule", "nonzero");
|
|
24069
|
-
const x =
|
|
24069
|
+
const x = fe.createNS("http://www.w3.org/2000/svg", "g");
|
|
24070
24070
|
x.setAttributeNS(null, "transform", "translate(3.0, 29.0)"), x.setAttributeNS(null, "fill", "#000000");
|
|
24071
24071
|
const w = [{ rx: "10.5", ry: "5.25002273" }, { rx: "10.5", ry: "5.25002273" }, { rx: "9.5", ry: "4.77275007" }, { rx: "8.5", ry: "4.29549936" }, { rx: "7.5", ry: "3.81822308" }, { rx: "6.5", ry: "3.34094679" }, { rx: "5.5", ry: "2.86367051" }, { rx: "4.5", ry: "2.38636864" }];
|
|
24072
24072
|
for (const N of w) {
|
|
24073
|
-
const $ =
|
|
24073
|
+
const $ = fe.createNS("http://www.w3.org/2000/svg", "ellipse");
|
|
24074
24074
|
$.setAttributeNS(null, "opacity", "0.04"), $.setAttributeNS(null, "cx", "10.5"), $.setAttributeNS(null, "cy", "5.80029008"), $.setAttributeNS(null, "rx", N.rx), $.setAttributeNS(null, "ry", N.ry), x.appendChild($);
|
|
24075
24075
|
}
|
|
24076
|
-
const S =
|
|
24076
|
+
const S = fe.createNS("http://www.w3.org/2000/svg", "g");
|
|
24077
24077
|
S.setAttributeNS(null, "fill", this._color);
|
|
24078
|
-
const P =
|
|
24078
|
+
const P = fe.createNS("http://www.w3.org/2000/svg", "path");
|
|
24079
24079
|
P.setAttributeNS(null, "d", "M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"), S.appendChild(P);
|
|
24080
|
-
const E =
|
|
24080
|
+
const E = fe.createNS("http://www.w3.org/2000/svg", "g");
|
|
24081
24081
|
E.setAttributeNS(null, "opacity", "0.25"), E.setAttributeNS(null, "fill", "#000000");
|
|
24082
|
-
const C =
|
|
24082
|
+
const C = fe.createNS("http://www.w3.org/2000/svg", "path");
|
|
24083
24083
|
C.setAttributeNS(null, "d", "M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"), E.appendChild(C);
|
|
24084
|
-
const z =
|
|
24084
|
+
const z = fe.createNS("http://www.w3.org/2000/svg", "g");
|
|
24085
24085
|
z.setAttributeNS(null, "transform", "translate(6.0, 7.0)"), z.setAttributeNS(null, "fill", "#FFFFFF");
|
|
24086
|
-
const B =
|
|
24086
|
+
const B = fe.createNS("http://www.w3.org/2000/svg", "g");
|
|
24087
24087
|
B.setAttributeNS(null, "transform", "translate(8.0, 8.0)");
|
|
24088
|
-
const V =
|
|
24088
|
+
const V = fe.createNS("http://www.w3.org/2000/svg", "circle");
|
|
24089
24089
|
V.setAttributeNS(null, "fill", "#000000"), V.setAttributeNS(null, "opacity", "0.25"), V.setAttributeNS(null, "cx", "5.5"), V.setAttributeNS(null, "cy", "5.5"), V.setAttributeNS(null, "r", "5.4999962");
|
|
24090
|
-
const G =
|
|
24090
|
+
const G = fe.createNS("http://www.w3.org/2000/svg", "circle");
|
|
24091
24091
|
G.setAttributeNS(null, "fill", "#FFFFFF"), G.setAttributeNS(null, "cx", "5.5"), G.setAttributeNS(null, "cy", "5.5"), G.setAttributeNS(null, "r", "5.4999962"), B.appendChild(V), B.appendChild(G), y.appendChild(x), y.appendChild(S), y.appendChild(E), y.appendChild(z), y.appendChild(B), n.appendChild(y), n.setAttributeNS(null, "height", a * this._scale + "px"), n.setAttributeNS(null, "width", c * this._scale + "px"), this._element.appendChild(n), this._offset = h.P.convert(t?.offset || [0, -14]);
|
|
24092
24092
|
}
|
|
24093
24093
|
if (this._element.classList.add("maplibregl-marker"), this._element.addEventListener("dragstart", ((n) => {
|
|
@@ -24244,14 +24244,14 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
24244
24244
|
}, this._fullscreen = !1, this._pseudo = (t = d.pseudo) !== null && t !== void 0 && t, d?.container && (d.container instanceof HTMLElement ? this._container = d.container : h.w("Full screen control 'container' must be a DOM element.")), "onfullscreenchange" in document ? this._fullscreenchange = "fullscreenchange" : "onmozfullscreenchange" in document ? this._fullscreenchange = "mozfullscreenchange" : "onwebkitfullscreenchange" in document ? this._fullscreenchange = "webkitfullscreenchange" : "onmsfullscreenchange" in document && (this._fullscreenchange = "MSFullscreenChange");
|
|
24245
24245
|
}
|
|
24246
24246
|
onAdd(d) {
|
|
24247
|
-
return this._map = d, this._container || (this._container = this._map.getContainer()), this._controlContainer =
|
|
24247
|
+
return this._map = d, this._container || (this._container = this._map.getContainer()), this._controlContainer = fe.create("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._setupUI(), this._controlContainer;
|
|
24248
24248
|
}
|
|
24249
24249
|
onRemove() {
|
|
24250
24250
|
this._controlContainer.remove(), this._map = null, window.document.removeEventListener(this._fullscreenchange, this._onFullscreenChange);
|
|
24251
24251
|
}
|
|
24252
24252
|
_setupUI() {
|
|
24253
|
-
const d = this._fullscreenButton =
|
|
24254
|
-
|
|
24253
|
+
const d = this._fullscreenButton = fe.create("button", "maplibregl-ctrl-fullscreen", this._controlContainer);
|
|
24254
|
+
fe.create("span", "maplibregl-ctrl-icon", d).setAttribute("aria-hidden", "true"), d.type = "button", this._updateTitle(), this._fullscreenButton.addEventListener("click", this._onClickFullscreen), window.document.addEventListener(this._fullscreenchange, this._onFullscreenChange);
|
|
24255
24255
|
}
|
|
24256
24256
|
_updateTitle() {
|
|
24257
24257
|
const d = this._getTitle();
|
|
@@ -24326,7 +24326,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
24326
24326
|
}, this._setupUI = () => {
|
|
24327
24327
|
this._map && (this._container.addEventListener("contextmenu", ((t) => {
|
|
24328
24328
|
t.preventDefault();
|
|
24329
|
-
})), this._geolocateButton =
|
|
24329
|
+
})), this._geolocateButton = fe.create("button", "maplibregl-ctrl-geolocate", this._container), fe.create("span", "maplibregl-ctrl-icon", this._geolocateButton).setAttribute("aria-hidden", "true"), this._geolocateButton.type = "button", this._geolocateButton.disabled = !0);
|
|
24330
24330
|
}, this._finishSetupUI = (t) => {
|
|
24331
24331
|
if (this._map) {
|
|
24332
24332
|
if (t === !1) {
|
|
@@ -24337,12 +24337,12 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
24337
24337
|
const n = this._map._getUIString("GeolocateControl.FindMyLocation");
|
|
24338
24338
|
this._geolocateButton.disabled = !1, this._geolocateButton.title = n, this._geolocateButton.setAttribute("aria-label", n);
|
|
24339
24339
|
}
|
|
24340
|
-
this.options.trackUserLocation && (this._geolocateButton.setAttribute("aria-pressed", "false"), this._watchState = "OFF"), this.options.showUserLocation && (this._dotElement =
|
|
24340
|
+
this.options.trackUserLocation && (this._geolocateButton.setAttribute("aria-pressed", "false"), this._watchState = "OFF"), this.options.showUserLocation && (this._dotElement = fe.create("div", "maplibregl-user-location-dot"), this._userLocationDotMarker = new ro({ element: this._dotElement }), this._circleElement = fe.create("div", "maplibregl-user-location-accuracy-circle"), this._accuracyCircleMarker = new ro({ element: this._circleElement, pitchAlignment: "map" }), this.options.trackUserLocation && (this._watchState = "OFF"), this._map.on("zoom", this._onUpdate), this._map.on("move", this._onUpdate), this._map.on("rotate", this._onUpdate), this._map.on("pitch", this._onUpdate)), this._geolocateButton.addEventListener("click", (() => this.trigger())), this._setup = !0, this.options.trackUserLocation && this._map.on("movestart", this._onMoveStart);
|
|
24341
24341
|
}
|
|
24342
24342
|
}, this.options = h.e({}, kl, d);
|
|
24343
24343
|
}
|
|
24344
24344
|
onAdd(d) {
|
|
24345
|
-
return this._map = d, this._container =
|
|
24345
|
+
return this._map = d, this._container = fe.create("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._setupUI(), (function() {
|
|
24346
24346
|
return h._(this, arguments, void 0, (function* (t = !1) {
|
|
24347
24347
|
if (Sr !== void 0 && !t) return Sr;
|
|
24348
24348
|
if (window.navigator.permissions === void 0) return Sr = !!window.navigator.geolocation, Sr;
|
|
@@ -24442,7 +24442,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
24442
24442
|
};
|
|
24443
24443
|
}
|
|
24444
24444
|
onAdd(d) {
|
|
24445
|
-
return this._map = d, this._container =
|
|
24445
|
+
return this._map = d, this._container = fe.create("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._globeButton = fe.create("button", "maplibregl-ctrl-globe", this._container), fe.create("span", "maplibregl-ctrl-icon", this._globeButton).setAttribute("aria-hidden", "true"), this._globeButton.type = "button", this._globeButton.addEventListener("click", this._toggleProjection), this._updateGlobeIcon(), this._map.on("styledata", this._updateGlobeIcon), this._map.on("projectiontransition", this._updateGlobeIcon), this._container;
|
|
24446
24446
|
}
|
|
24447
24447
|
onRemove() {
|
|
24448
24448
|
this._container.remove(), this._map.off("styledata", this._updateGlobeIcon), this._map.off("projectiontransition", this._updateGlobeIcon), this._globeButton.removeEventListener("click", this._toggleProjection), this._map = void 0;
|
|
@@ -24457,9 +24457,9 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
24457
24457
|
}, this._setButtonTitle = (t, n) => {
|
|
24458
24458
|
const a = this._map._getUIString(`NavigationControl.${n}`);
|
|
24459
24459
|
t.title = a, t.setAttribute("aria-label", a);
|
|
24460
|
-
}, this.options = h.e({}, zl, d), this._container =
|
|
24460
|
+
}, this.options = h.e({}, zl, d), this._container = fe.create("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._container.addEventListener("contextmenu", ((t) => t.preventDefault())), this.options.showZoom && (this._zoomInButton = this._createButton("maplibregl-ctrl-zoom-in", ((t) => this._map.zoomIn({}, { originalEvent: t }))), fe.create("span", "maplibregl-ctrl-icon", this._zoomInButton).setAttribute("aria-hidden", "true"), this._zoomOutButton = this._createButton("maplibregl-ctrl-zoom-out", ((t) => this._map.zoomOut({}, { originalEvent: t }))), fe.create("span", "maplibregl-ctrl-icon", this._zoomOutButton).setAttribute("aria-hidden", "true")), this.options.showCompass && (this._compass = this._createButton("maplibregl-ctrl-compass", ((t) => {
|
|
24461
24461
|
this.options.visualizePitch ? this._map.resetNorthPitch({}, { originalEvent: t }) : this._map.resetNorth({}, { originalEvent: t });
|
|
24462
|
-
})), this._compassIcon =
|
|
24462
|
+
})), this._compassIcon = fe.create("span", "maplibregl-ctrl-icon", this._compass), this._compassIcon.setAttribute("aria-hidden", "true"));
|
|
24463
24463
|
}
|
|
24464
24464
|
onAdd(d) {
|
|
24465
24465
|
return this._map = d, this.options.showZoom && (this._setButtonTitle(this._zoomInButton, "ZoomIn"), this._setButtonTitle(this._zoomOutButton, "ZoomOut"), this._map.on("zoom", this._updateZoomButtons), this._updateZoomButtons()), this.options.showCompass && (this._setButtonTitle(this._compass, "ResetBearing"), this.options.visualizePitch && this._map.on("pitch", this._rotateCompassArrow), this.options.visualizeRoll && this._map.on("roll", this._rotateCompassArrow), this._map.on("rotate", this._rotateCompassArrow), this._rotateCompassArrow(), this._handler = new to(this._map, this._compass, this.options.visualizePitch)), this._container;
|
|
@@ -24468,7 +24468,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
24468
24468
|
this._container.remove(), this.options.showZoom && this._map.off("zoom", this._updateZoomButtons), this.options.showCompass && (this.options.visualizePitch && this._map.off("pitch", this._rotateCompassArrow), this.options.visualizeRoll && this._map.off("roll", this._rotateCompassArrow), this._map.off("rotate", this._rotateCompassArrow), this._handler.off(), delete this._handler), delete this._map;
|
|
24469
24469
|
}
|
|
24470
24470
|
_createButton(d, t) {
|
|
24471
|
-
const n =
|
|
24471
|
+
const n = fe.create("button", d, this._container);
|
|
24472
24472
|
return n.type = "button", n.addEventListener("click", t), n;
|
|
24473
24473
|
}
|
|
24474
24474
|
}, R.Popup = class extends h.E {
|
|
@@ -24478,7 +24478,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
24478
24478
|
}, this.remove = () => (this._content && this._content.remove(), this._container && (this._container.remove(), delete this._container), this._map && (this._map.off("move", this._update), this._map.off("move", this._onClose), this._map.off("click", this._onClose), this._map.off("remove", this.remove), this._map.off("terrain", this._update), this._map.off("projectiontransition", this._update), this._map.off("mousemove", this._update), this._map.off("mouseup", this._update), this._map.off("drag", this._update), this._map._canvasContainer.classList.remove("maplibregl-track-pointer"), delete this._map, this.fire(new h.n("close"))), this), this._update = (t) => {
|
|
24479
24479
|
if (!this._map || !this._lngLat && !this._trackPointer || !this._content) return;
|
|
24480
24480
|
if (!this._container) {
|
|
24481
|
-
if (this._container =
|
|
24481
|
+
if (this._container = fe.create("div", "maplibregl-popup", this._map.getContainer()), this._tip = fe.create("div", "maplibregl-popup-tip", this._container), this._container.appendChild(this._content), this.options.className) for (const x of this.options.className.split(" ")) this._container.classList.add(x);
|
|
24482
24482
|
this._closeButton && this._closeButton.setAttribute("aria-label", this._map._getUIString("Popup.Close")), this._trackPointer && this._container.classList.add("maplibregl-popup-track-pointer");
|
|
24483
24483
|
}
|
|
24484
24484
|
let n;
|
|
@@ -24537,7 +24537,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
24537
24537
|
}
|
|
24538
24538
|
setDOMContent(d) {
|
|
24539
24539
|
if (this._content) for (; this._content.hasChildNodes(); ) this._content.firstChild && this._content.removeChild(this._content.firstChild);
|
|
24540
|
-
else this._content =
|
|
24540
|
+
else this._content = fe.create("div", "maplibregl-popup-content", this._container);
|
|
24541
24541
|
return this._content.appendChild(d), this._createCloseButton(), this._update(), this._focusFirstElement(), this;
|
|
24542
24542
|
}
|
|
24543
24543
|
addClassName(d) {
|
|
@@ -24559,7 +24559,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
24559
24559
|
this.options.padding = d, this._update();
|
|
24560
24560
|
}
|
|
24561
24561
|
_createCloseButton() {
|
|
24562
|
-
this.options.closeButton && (this._closeButton =
|
|
24562
|
+
this.options.closeButton && (this._closeButton = fe.create("button", "maplibregl-popup-close-button", this._content), this._closeButton.type = "button", this._closeButton.innerHTML = "×", this._closeButton.addEventListener("click", this._onClose));
|
|
24563
24563
|
}
|
|
24564
24564
|
_focusFirstElement() {
|
|
24565
24565
|
if (!this.options.focusAfterOpen || !this._container) return;
|
|
@@ -24578,7 +24578,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
24578
24578
|
return "bottom-left";
|
|
24579
24579
|
}
|
|
24580
24580
|
onAdd(d) {
|
|
24581
|
-
return this._map = d, this._container =
|
|
24581
|
+
return this._map = d, this._container = fe.create("div", "maplibregl-ctrl maplibregl-ctrl-scale", d.getContainer()), this._map.on("move", this._onMove), this._onMove(), this._container;
|
|
24582
24582
|
}
|
|
24583
24583
|
onRemove() {
|
|
24584
24584
|
this._container.remove(), this._map.off("move", this._onMove), this._map = void 0;
|
|
@@ -24592,7 +24592,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
24592
24592
|
}, this.options = d;
|
|
24593
24593
|
}
|
|
24594
24594
|
onAdd(d) {
|
|
24595
|
-
return this._map = d, this._container =
|
|
24595
|
+
return this._map = d, this._container = fe.create("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._terrainButton = fe.create("button", "maplibregl-ctrl-terrain", this._container), fe.create("span", "maplibregl-ctrl-icon", this._terrainButton).setAttribute("aria-hidden", "true"), this._terrainButton.type = "button", this._terrainButton.addEventListener("click", this._toggleTerrain), this._updateTerrainIcon(), this._map.on("terrain", this._updateTerrainIcon), this._container;
|
|
24596
24596
|
}
|
|
24597
24597
|
onRemove() {
|
|
24598
24598
|
this._container.remove(), this._map.off("terrain", this._updateTerrainIcon), this._map = void 0;
|
|
@@ -24635,7 +24635,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
24635
24635
|
h.c.WORKER_URL = d;
|
|
24636
24636
|
};
|
|
24637
24637
|
}));
|
|
24638
|
-
var je =
|
|
24638
|
+
var je = pe;
|
|
24639
24639
|
return je;
|
|
24640
24640
|
}));
|
|
24641
24641
|
})(Vu)), Vu.exports;
|
|
@@ -24648,29 +24648,29 @@ class ly {
|
|
|
24648
24648
|
Ou(Q.id, "id is required"), this.id = Q.id, this.type = "custom", this.renderingMode = Q.renderingMode || "3d", this.slot = Q.slot, this.beforeId = Q.beforeId, this.map = null;
|
|
24649
24649
|
}
|
|
24650
24650
|
/* Mapbox custom layer methods */
|
|
24651
|
-
onAdd(Q,
|
|
24651
|
+
onAdd(Q, pe) {
|
|
24652
24652
|
this.map = Q;
|
|
24653
24653
|
}
|
|
24654
|
-
render(Q,
|
|
24655
|
-
this.map && py(this.map.__deck, this.map, this,
|
|
24654
|
+
render(Q, pe) {
|
|
24655
|
+
this.map && py(this.map.__deck, this.map, this, pe);
|
|
24656
24656
|
}
|
|
24657
24657
|
}
|
|
24658
24658
|
const Td = "__UNDEFINED__";
|
|
24659
|
-
function sc(
|
|
24660
|
-
return
|
|
24659
|
+
function sc(Me) {
|
|
24660
|
+
return Me.props.beforeId ? `deck-layer-group-before:${Me.props.beforeId}` : Me.props.slot ? `deck-layer-group-slot:${Me.props.slot}` : "deck-layer-group-last";
|
|
24661
24661
|
}
|
|
24662
|
-
function cy(
|
|
24663
|
-
if (!
|
|
24662
|
+
function cy(Me, Q, pe) {
|
|
24663
|
+
if (!Me || !Me.style || !Me.style._loaded)
|
|
24664
24664
|
return;
|
|
24665
|
-
const
|
|
24666
|
-
if (Q !==
|
|
24667
|
-
const R = Id(Q, Boolean), h = new Set(R.map((rt) => sc(rt))), ge = new Set(
|
|
24665
|
+
const Pe = Id(pe, Boolean);
|
|
24666
|
+
if (Q !== pe) {
|
|
24667
|
+
const R = Id(Q, Boolean), h = new Set(R.map((rt) => sc(rt))), ge = new Set(Pe.map((rt) => sc(rt)));
|
|
24668
24668
|
for (const rt of h)
|
|
24669
|
-
ge.has(rt) ||
|
|
24669
|
+
ge.has(rt) || Me.getLayer(rt) && Me.removeLayer(rt);
|
|
24670
24670
|
}
|
|
24671
24671
|
const Ce = {};
|
|
24672
|
-
for (const R of
|
|
24673
|
-
const h = sc(R), ge =
|
|
24672
|
+
for (const R of Pe) {
|
|
24673
|
+
const h = sc(R), ge = Me.getLayer(h);
|
|
24674
24674
|
if (ge) {
|
|
24675
24675
|
const rt = ge.implementation || ge;
|
|
24676
24676
|
Ce[h] = rt;
|
|
@@ -24680,49 +24680,49 @@ function cy(Ie, Q, me) {
|
|
|
24680
24680
|
slot: R.props.slot,
|
|
24681
24681
|
beforeId: R.props.beforeId
|
|
24682
24682
|
});
|
|
24683
|
-
Ce[h] = rt,
|
|
24683
|
+
Ce[h] = rt, Me.addLayer(rt, R.props.beforeId);
|
|
24684
24684
|
}
|
|
24685
24685
|
}
|
|
24686
|
-
const je =
|
|
24686
|
+
const je = Me.style._order;
|
|
24687
24687
|
for (const [R, h] of Object.entries(Ce)) {
|
|
24688
24688
|
const ge = h.beforeId || Td, rt = ge === Td ? je.length : je.indexOf(ge);
|
|
24689
24689
|
if (je.indexOf(R) !== rt - 1) {
|
|
24690
24690
|
const Ui = ge === Td ? void 0 : ge;
|
|
24691
|
-
|
|
24691
|
+
Me.moveLayer(R, Ui);
|
|
24692
24692
|
}
|
|
24693
24693
|
}
|
|
24694
24694
|
}
|
|
24695
24695
|
const ka = "mapbox", Sd = 512, uy = Math.PI / 180;
|
|
24696
|
-
function hy({ map:
|
|
24697
|
-
if (
|
|
24698
|
-
return
|
|
24699
|
-
const
|
|
24696
|
+
function hy({ map: Me, deck: Q }) {
|
|
24697
|
+
if (Me.__deck)
|
|
24698
|
+
return Me.__deck;
|
|
24699
|
+
const pe = Q.props._customRender, Pe = Q.props.onLoad, Ce = {
|
|
24700
24700
|
...Q.props,
|
|
24701
24701
|
_customRender: () => {
|
|
24702
|
-
|
|
24702
|
+
Me.triggerRepaint(), pe?.("");
|
|
24703
24703
|
}
|
|
24704
24704
|
};
|
|
24705
|
-
return Ce.views || (Ce.views = ju(
|
|
24705
|
+
return Ce.views || (Ce.views = ju(Me)), Object.assign(Ce, {
|
|
24706
24706
|
width: null,
|
|
24707
24707
|
height: null,
|
|
24708
24708
|
touchAction: "unset",
|
|
24709
|
-
viewState: oc(
|
|
24710
|
-
}), Q.isInitialized ? Jf(Q,
|
|
24711
|
-
|
|
24712
|
-
}, Q.setProps(Ce),
|
|
24713
|
-
Q.isInitialized && my(Q,
|
|
24709
|
+
viewState: oc(Me)
|
|
24710
|
+
}), Q.isInitialized ? Jf(Q, Me) : Ce.onLoad = () => {
|
|
24711
|
+
Pe?.(), Jf(Q, Me);
|
|
24712
|
+
}, Q.setProps(Ce), Me.__deck = Q, Me.on("render", () => {
|
|
24713
|
+
Q.isInitialized && my(Q, Me);
|
|
24714
24714
|
}), Q;
|
|
24715
24715
|
}
|
|
24716
|
-
function Jf(
|
|
24717
|
-
const
|
|
24718
|
-
|
|
24716
|
+
function Jf(Me, Q) {
|
|
24717
|
+
const pe = () => {
|
|
24718
|
+
Me.isInitialized ? gy(Me, Q) : Q.off("move", pe);
|
|
24719
24719
|
};
|
|
24720
|
-
Q.on("move",
|
|
24720
|
+
Q.on("move", pe);
|
|
24721
24721
|
}
|
|
24722
|
-
function dy(
|
|
24723
|
-
|
|
24722
|
+
function dy(Me) {
|
|
24723
|
+
Me.__deck?.finalize(), Me.__deck = null;
|
|
24724
24724
|
}
|
|
24725
|
-
function Pd(
|
|
24725
|
+
function Pd(Me, Q) {
|
|
24726
24726
|
return Q ? {
|
|
24727
24727
|
depthWriteEnabled: !0,
|
|
24728
24728
|
depthCompare: "less-equal",
|
|
@@ -24736,100 +24736,100 @@ function Pd(Ie, Q) {
|
|
|
24736
24736
|
blendAlphaOperation: "add"
|
|
24737
24737
|
} : {};
|
|
24738
24738
|
}
|
|
24739
|
-
function py(
|
|
24740
|
-
if (!
|
|
24739
|
+
function py(Me, Q, pe, Pe) {
|
|
24740
|
+
if (!Me.isInitialized)
|
|
24741
24741
|
return;
|
|
24742
|
-
let { currentViewport: Ce } =
|
|
24743
|
-
Ce || (Ce = tm(
|
|
24742
|
+
let { currentViewport: Ce } = Me.userData, je = !1;
|
|
24743
|
+
Ce || (Ce = tm(Me, Q, Pe), Me.userData.currentViewport = Ce, je = !0), Ce && Me._drawLayers("mapbox-repaint", {
|
|
24744
24744
|
viewports: [Ce],
|
|
24745
24745
|
layerFilter: (R) => {
|
|
24746
|
-
if (
|
|
24746
|
+
if (Me.props.layerFilter && !Me.props.layerFilter(R))
|
|
24747
24747
|
return !1;
|
|
24748
24748
|
const h = R.layer;
|
|
24749
|
-
return h.props.beforeId ===
|
|
24749
|
+
return h.props.beforeId === pe.beforeId && h.props.slot === pe.slot;
|
|
24750
24750
|
},
|
|
24751
24751
|
clearStack: je,
|
|
24752
24752
|
clearCanvas: !1
|
|
24753
24753
|
});
|
|
24754
24754
|
}
|
|
24755
|
-
function em(
|
|
24756
|
-
const Q =
|
|
24755
|
+
function em(Me) {
|
|
24756
|
+
const Q = Me.getProjection?.(), pe = (
|
|
24757
24757
|
// maplibre projection spec
|
|
24758
24758
|
Q?.type || // mapbox projection spec
|
|
24759
24759
|
Q?.name
|
|
24760
24760
|
);
|
|
24761
|
-
if (
|
|
24761
|
+
if (pe === "globe")
|
|
24762
24762
|
return "globe";
|
|
24763
|
-
if (
|
|
24763
|
+
if (pe && pe !== "mercator")
|
|
24764
24764
|
throw new Error("Unsupported projection");
|
|
24765
24765
|
return "mercator";
|
|
24766
24766
|
}
|
|
24767
|
-
function ju(
|
|
24768
|
-
return em(
|
|
24767
|
+
function ju(Me) {
|
|
24768
|
+
return em(Me) === "globe" ? new iy({ id: ka }) : new K_({ id: ka });
|
|
24769
24769
|
}
|
|
24770
|
-
function oc(
|
|
24771
|
-
const { lng: Q, lat:
|
|
24770
|
+
function oc(Me) {
|
|
24771
|
+
const { lng: Q, lat: pe } = Me.getCenter(), Pe = {
|
|
24772
24772
|
// Longitude returned by getCenter can be outside of [-180, 180] when zooming near the anti meridian
|
|
24773
24773
|
// https://github.com/visgl/deck.gl/issues/6894
|
|
24774
24774
|
longitude: (Q + 540) % 360 - 180,
|
|
24775
|
-
latitude:
|
|
24776
|
-
zoom:
|
|
24777
|
-
bearing:
|
|
24778
|
-
pitch:
|
|
24779
|
-
padding:
|
|
24780
|
-
repeat:
|
|
24775
|
+
latitude: pe,
|
|
24776
|
+
zoom: Me.getZoom(),
|
|
24777
|
+
bearing: Me.getBearing(),
|
|
24778
|
+
pitch: Me.getPitch(),
|
|
24779
|
+
padding: Me.getPadding(),
|
|
24780
|
+
repeat: Me.getRenderWorldCopies()
|
|
24781
24781
|
};
|
|
24782
|
-
return
|
|
24782
|
+
return Me.getTerrain?.() && fy(Me, Pe), Pe;
|
|
24783
24783
|
}
|
|
24784
|
-
function fy(
|
|
24785
|
-
if (
|
|
24786
|
-
const { position:
|
|
24787
|
-
if (!
|
|
24784
|
+
function fy(Me, Q) {
|
|
24785
|
+
if (Me.getFreeCameraOptions) {
|
|
24786
|
+
const { position: pe } = Me.getFreeCameraOptions();
|
|
24787
|
+
if (!pe || pe.z === void 0)
|
|
24788
24788
|
return;
|
|
24789
|
-
const
|
|
24789
|
+
const Pe = Me.transform.height, { longitude: Ce, latitude: je, pitch: R } = Q, h = pe.x * Sd, ge = (1 - pe.y) * Sd, rt = pe.z * Sd, Kt = J_([Ce, je]), Ui = h - Kt[0], gr = ge - Kt[1], Vt = Math.sqrt(Ui * Ui + gr * gr), Di = R * uy, Xe = 1.5 * Pe, lr = Di < 1e-3 ? (
|
|
24790
24790
|
// Pitch angle too small to deduce the look at point, assume elevation is 0
|
|
24791
24791
|
Xe * Math.cos(Di) / rt
|
|
24792
24792
|
) : Xe * Math.sin(Di) / Vt;
|
|
24793
24793
|
Q.zoom = Math.log2(lr);
|
|
24794
|
-
const pi = Xe * Math.cos(Di) / lr,
|
|
24795
|
-
Q.position = [0, 0,
|
|
24796
|
-
} else typeof
|
|
24794
|
+
const pi = Xe * Math.cos(Di) / lr, fe = rt - pi;
|
|
24795
|
+
Q.position = [0, 0, fe / Q_(je)];
|
|
24796
|
+
} else typeof Me.transform.elevation == "number" && (Q.position = [0, 0, Me.transform.elevation]);
|
|
24797
24797
|
}
|
|
24798
|
-
function tm(
|
|
24799
|
-
const
|
|
24800
|
-
|
|
24801
|
-
const je =
|
|
24802
|
-
return Number.isFinite(je) && (
|
|
24803
|
-
width:
|
|
24804
|
-
height:
|
|
24805
|
-
viewState:
|
|
24798
|
+
function tm(Me, Q, pe) {
|
|
24799
|
+
const Pe = oc(Q), Ce = Me.getView(ka) || ju(Q);
|
|
24800
|
+
pe && (Ce.props.nearZMultiplier = 0.2);
|
|
24801
|
+
const je = pe?.nearZ ?? Q.transform._nearZ, R = pe?.farZ ?? Q.transform._farZ;
|
|
24802
|
+
return Number.isFinite(je) && (Pe.nearZ = je / Q.transform.height, Pe.farZ = R / Q.transform.height), Ce.makeViewport({
|
|
24803
|
+
width: Me.width,
|
|
24804
|
+
height: Me.height,
|
|
24805
|
+
viewState: Pe
|
|
24806
24806
|
});
|
|
24807
24807
|
}
|
|
24808
|
-
function my(
|
|
24809
|
-
const
|
|
24810
|
-
let Ce =
|
|
24808
|
+
function my(Me, Q) {
|
|
24809
|
+
const Pe = Id(Me.props.layers, Boolean).some((h) => h && !Q.getLayer(sc(h)));
|
|
24810
|
+
let Ce = Me.getViewports();
|
|
24811
24811
|
const je = Ce.findIndex((h) => h.id === ka), R = Ce.length > 1 || je < 0;
|
|
24812
|
-
if (
|
|
24812
|
+
if (Pe || R) {
|
|
24813
24813
|
if (je >= 0) {
|
|
24814
24814
|
Ce = Ce.slice();
|
|
24815
|
-
const h = tm(
|
|
24815
|
+
const h = tm(Me, Q);
|
|
24816
24816
|
h ? Ce[je] = h : Ce.splice(je, 1);
|
|
24817
24817
|
}
|
|
24818
|
-
|
|
24818
|
+
Me._drawLayers("mapbox-repaint", {
|
|
24819
24819
|
viewports: Ce,
|
|
24820
|
-
layerFilter: (h) => (!
|
|
24820
|
+
layerFilter: (h) => (!Me.props.layerFilter || Me.props.layerFilter(h)) && (h.viewport.id !== ka || !Q.getLayer(sc(h.layer))),
|
|
24821
24821
|
clearCanvas: !1
|
|
24822
24822
|
});
|
|
24823
24823
|
} else {
|
|
24824
|
-
const h =
|
|
24825
|
-
|
|
24824
|
+
const h = Me.device, ge = h?.gl;
|
|
24825
|
+
Me.props.onBeforeRender?.({ device: h, gl: ge }), Me.props.onAfterRender?.({ device: h, gl: ge });
|
|
24826
24826
|
}
|
|
24827
|
-
|
|
24827
|
+
Me.userData.currentViewport = null;
|
|
24828
24828
|
}
|
|
24829
|
-
function gy(
|
|
24830
|
-
|
|
24829
|
+
function gy(Me, Q) {
|
|
24830
|
+
Me.setProps({
|
|
24831
24831
|
viewState: oc(Q)
|
|
24832
|
-
}),
|
|
24832
|
+
}), Me.needsRedraw({ clearRedrawFlags: !0 });
|
|
24833
24833
|
}
|
|
24834
24834
|
class _y {
|
|
24835
24835
|
constructor(Q) {
|
|
@@ -24839,36 +24839,36 @@ class _y {
|
|
|
24839
24839
|
em(this._map) && this._deck?.setProps({ views: this._getViews(this._map) });
|
|
24840
24840
|
}, this._updateContainerSize = () => {
|
|
24841
24841
|
if (this._map && this._container) {
|
|
24842
|
-
const { clientWidth:
|
|
24842
|
+
const { clientWidth: Pe, clientHeight: Ce } = this._map.getContainer();
|
|
24843
24843
|
Object.assign(this._container.style, {
|
|
24844
|
-
width: `${
|
|
24844
|
+
width: `${Pe}px`,
|
|
24845
24845
|
height: `${Ce}px`
|
|
24846
24846
|
});
|
|
24847
24847
|
}
|
|
24848
24848
|
}, this._updateViewState = () => {
|
|
24849
|
-
const
|
|
24850
|
-
|
|
24849
|
+
const Pe = this._deck, Ce = this._map;
|
|
24850
|
+
Pe && Ce && (Pe.setProps({
|
|
24851
24851
|
views: this._getViews(Ce),
|
|
24852
24852
|
viewState: oc(Ce)
|
|
24853
|
-
}),
|
|
24854
|
-
}, this._handleMouseEvent = (
|
|
24853
|
+
}), Pe.isInitialized && Pe.redraw());
|
|
24854
|
+
}, this._handleMouseEvent = (Pe) => {
|
|
24855
24855
|
const Ce = this._deck;
|
|
24856
24856
|
if (!Ce || !Ce.isInitialized)
|
|
24857
24857
|
return;
|
|
24858
24858
|
const je = {
|
|
24859
|
-
type:
|
|
24860
|
-
offsetCenter:
|
|
24861
|
-
srcEvent:
|
|
24859
|
+
type: Pe.type,
|
|
24860
|
+
offsetCenter: Pe.point,
|
|
24861
|
+
srcEvent: Pe
|
|
24862
24862
|
}, R = this._lastMouseDownPoint;
|
|
24863
|
-
switch (!
|
|
24863
|
+
switch (!Pe.point && R && (je.deltaX = Pe.originalEvent.clientX - R.clientX, je.deltaY = Pe.originalEvent.clientY - R.clientY, je.offsetCenter = {
|
|
24864
24864
|
x: R.x + je.deltaX,
|
|
24865
24865
|
y: R.y + je.deltaY
|
|
24866
24866
|
}), je.type) {
|
|
24867
24867
|
case "mousedown":
|
|
24868
24868
|
Ce._onPointerDown(je), this._lastMouseDownPoint = {
|
|
24869
|
-
...
|
|
24870
|
-
clientX:
|
|
24871
|
-
clientY:
|
|
24869
|
+
...Pe.point,
|
|
24870
|
+
clientX: Pe.originalEvent.clientX,
|
|
24871
|
+
clientY: Pe.originalEvent.clientY
|
|
24872
24872
|
};
|
|
24873
24873
|
break;
|
|
24874
24874
|
case "dragstart":
|
|
@@ -24896,13 +24896,13 @@ class _y {
|
|
|
24896
24896
|
return;
|
|
24897
24897
|
}
|
|
24898
24898
|
};
|
|
24899
|
-
const { interleaved:
|
|
24900
|
-
this._interleaved =
|
|
24899
|
+
const { interleaved: pe = !1 } = Q;
|
|
24900
|
+
this._interleaved = pe, this._props = this.filterProps(Q);
|
|
24901
24901
|
}
|
|
24902
24902
|
/** Filter out props to pass to Deck **/
|
|
24903
24903
|
filterProps(Q) {
|
|
24904
|
-
const { interleaved:
|
|
24905
|
-
return !
|
|
24904
|
+
const { interleaved: pe = !1, useDevicePixels: Pe, ...Ce } = Q;
|
|
24905
|
+
return !pe && Pe !== void 0 && (Ce.useDevicePixels = Pe), Ce;
|
|
24906
24906
|
}
|
|
24907
24907
|
/** Update (partial) props of the underlying Deck instance. */
|
|
24908
24908
|
setProps(Q) {
|
|
@@ -24922,35 +24922,35 @@ class _y {
|
|
|
24922
24922
|
return this._map = Q, this._interleaved ? this._onAddInterleaved(Q) : this._onAddOverlaid(Q);
|
|
24923
24923
|
}
|
|
24924
24924
|
_onAddOverlaid(Q) {
|
|
24925
|
-
const
|
|
24926
|
-
return Object.assign(
|
|
24925
|
+
const pe = document.createElement("div");
|
|
24926
|
+
return Object.assign(pe.style, {
|
|
24927
24927
|
position: "absolute",
|
|
24928
24928
|
left: 0,
|
|
24929
24929
|
top: 0,
|
|
24930
24930
|
textAlign: "initial",
|
|
24931
24931
|
pointerEvents: "none"
|
|
24932
|
-
}), this._container =
|
|
24932
|
+
}), this._container = pe, this._deck = new Yf({
|
|
24933
24933
|
...this._props,
|
|
24934
|
-
parent:
|
|
24934
|
+
parent: pe,
|
|
24935
24935
|
parameters: { ...Pd(Q, !1), ...this._props.parameters },
|
|
24936
24936
|
views: this._getViews(Q),
|
|
24937
24937
|
viewState: oc(Q)
|
|
24938
|
-
}), Q.on("resize", this._updateContainerSize), Q.on("render", this._updateViewState), Q.on("mousedown", this._handleMouseEvent), Q.on("dragstart", this._handleMouseEvent), Q.on("drag", this._handleMouseEvent), Q.on("dragend", this._handleMouseEvent), Q.on("mousemove", this._handleMouseEvent), Q.on("mouseout", this._handleMouseEvent), Q.on("click", this._handleMouseEvent), Q.on("dblclick", this._handleMouseEvent), this._updateContainerSize(),
|
|
24938
|
+
}), Q.on("resize", this._updateContainerSize), Q.on("render", this._updateViewState), Q.on("mousedown", this._handleMouseEvent), Q.on("dragstart", this._handleMouseEvent), Q.on("drag", this._handleMouseEvent), Q.on("dragend", this._handleMouseEvent), Q.on("mousemove", this._handleMouseEvent), Q.on("mouseout", this._handleMouseEvent), Q.on("click", this._handleMouseEvent), Q.on("dblclick", this._handleMouseEvent), this._updateContainerSize(), pe;
|
|
24939
24939
|
}
|
|
24940
24940
|
_onAddInterleaved(Q) {
|
|
24941
|
-
const
|
|
24942
|
-
return
|
|
24941
|
+
const pe = Q.painter.context.gl;
|
|
24942
|
+
return pe instanceof WebGLRenderingContext && ey.warn("Incompatible basemap library. See: https://deck.gl/docs/api-reference/mapbox/overview#compatibility")(), this._deck = hy({
|
|
24943
24943
|
map: Q,
|
|
24944
24944
|
deck: new Yf({
|
|
24945
24945
|
...this._props,
|
|
24946
24946
|
views: this._getViews(Q),
|
|
24947
|
-
gl:
|
|
24947
|
+
gl: pe,
|
|
24948
24948
|
parameters: { ...Pd(Q, !0), ...this._props.parameters }
|
|
24949
24949
|
})
|
|
24950
24950
|
}), Q.on("styledata", this._handleStyleChange), this._resolveLayers(Q, this._deck, [], this._props.layers), document.createElement("div");
|
|
24951
24951
|
}
|
|
24952
|
-
_resolveLayers(Q,
|
|
24953
|
-
cy(Q,
|
|
24952
|
+
_resolveLayers(Q, pe, Pe, Ce) {
|
|
24953
|
+
cy(Q, Pe, Ce);
|
|
24954
24954
|
}
|
|
24955
24955
|
/** Called when the control is removed from a map */
|
|
24956
24956
|
onRemove() {
|
|
@@ -24989,8 +24989,8 @@ class _y {
|
|
|
24989
24989
|
_getViews(Q) {
|
|
24990
24990
|
if (!this._props.views)
|
|
24991
24991
|
return ju(Q);
|
|
24992
|
-
const
|
|
24993
|
-
return
|
|
24992
|
+
const pe = Array.isArray(this._props.views) ? this._props.views : [this._props.views];
|
|
24993
|
+
return pe.some((Ce) => Ce.id === ka) ? this._props.views : [ju(Q), ...pe];
|
|
24994
24994
|
}
|
|
24995
24995
|
}
|
|
24996
24996
|
const yy = 600;
|
|
@@ -25029,10 +25029,10 @@ class by {
|
|
|
25029
25029
|
globe = !1;
|
|
25030
25030
|
/** The tilt ceiling the flat map had before the globe flattened it — restored when the globe turns off. */
|
|
25031
25031
|
flatMaxPitch;
|
|
25032
|
-
constructor(Q,
|
|
25032
|
+
constructor(Q, pe, Pe, Ce, je = !0, R, h = !1, ge = !1) {
|
|
25033
25033
|
this.showAttribution = je, this.globe = ge, this.attributionHost = R, this.map = new Bu.Map({
|
|
25034
25034
|
container: Q,
|
|
25035
|
-
style:
|
|
25035
|
+
style: pe.style,
|
|
25036
25036
|
// Determinism switch (issue #37 follow-up). NOT load-bearing for frame
|
|
25037
25037
|
// identity — the idle LATCH below is (isolated 2026-08-26: the warm-
|
|
25038
25038
|
// page byte-identity probe passes with the latch alone, because
|
|
@@ -25046,16 +25046,16 @@ class by {
|
|
|
25046
25046
|
// fade math goes NaN and every basemap label paints once, then
|
|
25047
25047
|
// vanishes permanently on the first camera move or placement update.
|
|
25048
25048
|
...h ? { fadeDuration: 0 } : null,
|
|
25049
|
-
center: [
|
|
25050
|
-
zoom:
|
|
25051
|
-
pitch:
|
|
25052
|
-
bearing:
|
|
25049
|
+
center: [Pe.longitude, Pe.latitude],
|
|
25050
|
+
zoom: Pe.zoom,
|
|
25051
|
+
pitch: Pe.pitch ?? 0,
|
|
25052
|
+
bearing: Pe.bearing ?? 0,
|
|
25053
25053
|
// MapLibre's default control is replaced by our own below so preset-
|
|
25054
25054
|
// level attribution overrides survive style swaps deterministically.
|
|
25055
25055
|
attributionControl: !1,
|
|
25056
25056
|
// OSM's tile server needs a request it can identify — see basemap-request.ts.
|
|
25057
25057
|
transformRequest: (rt) => ny(rt)
|
|
25058
|
-
}), this.mountAttribution(
|
|
25058
|
+
}), this.mountAttribution(pe.attribution), this.map.once("load", () => this.markInitialized()), this.map.on("style.load", () => this.applyProjection()), this.map.on("error", (rt) => {
|
|
25059
25059
|
this.initialized || (console.error("[onlymapjs] basemap error before load — settling readiness:", rt?.error ?? rt), this.markInitialized());
|
|
25060
25060
|
}), this.overlay = new _y({
|
|
25061
25061
|
interleaved: !1,
|
|
@@ -25127,7 +25127,7 @@ class by {
|
|
|
25127
25127
|
if (this.deckCaptures.length === 0) return;
|
|
25128
25128
|
const Q = this.deckCaptures;
|
|
25129
25129
|
this.deckCaptures = [];
|
|
25130
|
-
for (const
|
|
25130
|
+
for (const pe of Q) pe();
|
|
25131
25131
|
}
|
|
25132
25132
|
/**
|
|
25133
25133
|
* Scene snapshot (spec: "Snapshot API") — one composite canvas of the
|
|
@@ -25140,21 +25140,21 @@ class by {
|
|
|
25140
25140
|
* public Deck API, and the access is optional-chained).
|
|
25141
25141
|
*/
|
|
25142
25142
|
captureComposite() {
|
|
25143
|
-
return new Promise((Q,
|
|
25144
|
-
this.pendingCaptureRejects.add(
|
|
25145
|
-
let
|
|
25143
|
+
return new Promise((Q, pe) => {
|
|
25144
|
+
this.pendingCaptureRejects.add(pe);
|
|
25145
|
+
let Pe, Ce;
|
|
25146
25146
|
const je = (h) => {
|
|
25147
25147
|
const ge = document.createElement("canvas");
|
|
25148
25148
|
return ge.width = h.width, ge.height = h.height, ge.getContext("2d").drawImage(h, 0, 0), ge;
|
|
25149
25149
|
}, R = () => {
|
|
25150
|
-
if (!
|
|
25150
|
+
if (!Pe || Ce === void 0) return;
|
|
25151
25151
|
const h = document.createElement("canvas");
|
|
25152
|
-
h.width =
|
|
25152
|
+
h.width = Pe.width, h.height = Pe.height;
|
|
25153
25153
|
const ge = h.getContext("2d");
|
|
25154
|
-
ge.drawImage(
|
|
25154
|
+
ge.drawImage(Pe, 0, 0), Ce && ge.drawImage(Ce, 0, 0, h.width, h.height), this.pendingCaptureRejects.delete(pe), Q(h);
|
|
25155
25155
|
};
|
|
25156
25156
|
this.map.once("render", () => {
|
|
25157
|
-
|
|
25157
|
+
Pe = je(this.map.getCanvas()), R();
|
|
25158
25158
|
}), this.deckCaptures.push(() => {
|
|
25159
25159
|
const h = this.overlay.getCanvas();
|
|
25160
25160
|
Ce = h ? je(h) : null, R();
|
|
@@ -25166,7 +25166,7 @@ class by {
|
|
|
25166
25166
|
this.initialized = !0;
|
|
25167
25167
|
const Q = this.loadCallbacks;
|
|
25168
25168
|
this.loadCallbacks = [];
|
|
25169
|
-
for (const
|
|
25169
|
+
for (const pe of Q) pe();
|
|
25170
25170
|
}
|
|
25171
25171
|
onLoad(Q) {
|
|
25172
25172
|
this.initialized ? Q() : this.loadCallbacks.push(Q);
|
|
@@ -25179,12 +25179,12 @@ class by {
|
|
|
25179
25179
|
* fire without one. The ecosystem's standard user-vs-programmatic signal.
|
|
25180
25180
|
*/
|
|
25181
25181
|
onMove(Q) {
|
|
25182
|
-
let
|
|
25182
|
+
let pe = -1 / 0;
|
|
25183
25183
|
this.map.on("wheel", () => {
|
|
25184
|
-
|
|
25185
|
-
}), this.map.on("move", (
|
|
25184
|
+
pe = performance.now();
|
|
25185
|
+
}), this.map.on("move", (Pe) => {
|
|
25186
25186
|
if (this.moveSuppressed) return;
|
|
25187
|
-
const Ce =
|
|
25187
|
+
const Ce = Pe.originalEvent !== void 0 || performance.now() - pe < yy;
|
|
25188
25188
|
Q(Ce ? "user" : "programmatic");
|
|
25189
25189
|
}), this.map.on("projectiontransition", () => {
|
|
25190
25190
|
this.map.once("render", () => {
|
|
@@ -25210,8 +25210,8 @@ class by {
|
|
|
25210
25210
|
this.moveSuppressed = !0;
|
|
25211
25211
|
try {
|
|
25212
25212
|
this.overlay.setProps({ useDevicePixels: Q ?? !0 });
|
|
25213
|
-
const
|
|
25214
|
-
typeof
|
|
25213
|
+
const pe = this.map;
|
|
25214
|
+
typeof pe.setPixelRatio == "function" && pe.setPixelRatio(Q ?? (typeof devicePixelRatio == "number" ? devicePixelRatio : 1)), this.markBusy();
|
|
25215
25215
|
} finally {
|
|
25216
25216
|
this.moveSuppressed = !1;
|
|
25217
25217
|
}
|
|
@@ -25243,12 +25243,19 @@ class by {
|
|
|
25243
25243
|
this.markBusy(), this.map.setStyle(Q.style), Q.attribution !== this.attributionText && this.mountAttribution(Q.attribution);
|
|
25244
25244
|
}
|
|
25245
25245
|
/**
|
|
25246
|
-
* This basemap's attribution as plain text: every source's
|
|
25247
|
-
*
|
|
25246
|
+
* This basemap's attribution as plain text: every source's attribution plus
|
|
25247
|
+
* the preset's own line, de-duplicated.
|
|
25248
25248
|
*
|
|
25249
25249
|
* Every source the style DECLARES, not only the ones currently drawn — the
|
|
25250
25250
|
* superset MapLibre's control narrows to. On a printed sheet an extra credit
|
|
25251
25251
|
* costs nothing; a missing one is a licence breach.
|
|
25252
|
+
*
|
|
25253
|
+
* A source's credit is read from the LOADED source first. The keyless
|
|
25254
|
+
* presets — CARTO's dark-matter, positron and voyager, OpenFreeMap's liberty
|
|
25255
|
+
* and bright — declare each vector source as `{ type, url }`, and the credit
|
|
25256
|
+
* lives in the TileJSON behind that url, which `getStyle()` never reports
|
|
25257
|
+
* (MapLibre serialises the declared options). Reading the style alone
|
|
25258
|
+
* returned nothing for every one of them, and a sheet printed no credit.
|
|
25252
25259
|
*/
|
|
25253
25260
|
attributions() {
|
|
25254
25261
|
let Q = {};
|
|
@@ -25256,11 +25263,34 @@ class by {
|
|
|
25256
25263
|
Q = this.map.getStyle?.()?.sources ?? {};
|
|
25257
25264
|
} catch {
|
|
25258
25265
|
}
|
|
25259
|
-
|
|
25266
|
+
const pe = Object.keys(Q).map((Pe) => {
|
|
25267
|
+
try {
|
|
25268
|
+
return this.map.getSource?.(Pe)?.attribution;
|
|
25269
|
+
} catch {
|
|
25270
|
+
return;
|
|
25271
|
+
}
|
|
25272
|
+
});
|
|
25273
|
+
return ty([this.attributionText, ...pe, ...Object.values(Q).map((Pe) => Pe?.attribution)]);
|
|
25260
25274
|
}
|
|
25261
|
-
/**
|
|
25275
|
+
/**
|
|
25276
|
+
* Called when a (new) style has loaded, and again whenever a source's
|
|
25277
|
+
* metadata arrives with a credit the list did not have — the TileJSON of a
|
|
25278
|
+
* `{ type, url }` source loads AFTER `style.load`, which is the only event
|
|
25279
|
+
* MapLibre's own control does not wait on either (it re-reads on
|
|
25280
|
+
* `sourcedata` metadata).
|
|
25281
|
+
*/
|
|
25262
25282
|
onAttributionsChange(Q) {
|
|
25263
|
-
|
|
25283
|
+
let pe = "";
|
|
25284
|
+
const Pe = () => {
|
|
25285
|
+
const Ce = this.attributions().join(`
|
|
25286
|
+
`), je = Ce !== pe;
|
|
25287
|
+
return pe = Ce, je;
|
|
25288
|
+
};
|
|
25289
|
+
this.map.on("style.load", () => {
|
|
25290
|
+
Pe(), Q();
|
|
25291
|
+
}), this.map.on("sourcedata", (Ce) => {
|
|
25292
|
+
Ce.sourceDataType === "metadata" && Pe() && Q();
|
|
25293
|
+
});
|
|
25264
25294
|
}
|
|
25265
25295
|
/**
|
|
25266
25296
|
* (Re)mounts the compact attribution control. Source-declared attributions
|
|
@@ -25270,8 +25300,8 @@ class by {
|
|
|
25270
25300
|
*/
|
|
25271
25301
|
mountAttribution(Q) {
|
|
25272
25302
|
if (this.attributionText = Q, !!this.showAttribution && (this.attribution && (this.map.removeControl(this.attribution), this.attributionElement?.remove(), this.attributionElement = void 0), this.attribution = new Bu.AttributionControl({ compact: !0, ...Q ? { customAttribution: Q } : {} }), this.map.addControl(this.attribution), this.attributionHost)) {
|
|
25273
|
-
const
|
|
25274
|
-
|
|
25303
|
+
const pe = this.map.getContainer().querySelector(".maplibregl-ctrl-attrib");
|
|
25304
|
+
pe && (pe.setAttribute("data-om-mandated-chrome-item", "attribution"), pe.style.margin = "0", this.attributionHost.appendChild(pe), this.attributionElement = pe);
|
|
25275
25305
|
}
|
|
25276
25306
|
}
|
|
25277
25307
|
/**
|
|
@@ -25292,8 +25322,8 @@ class by {
|
|
|
25292
25322
|
* back, while a controller maximum simply refuses to go further.
|
|
25293
25323
|
*/
|
|
25294
25324
|
setMaxPitch(Q) {
|
|
25295
|
-
const
|
|
25296
|
-
this.globe ? this.flatMaxPitch =
|
|
25325
|
+
const pe = Q ?? 85;
|
|
25326
|
+
this.globe ? this.flatMaxPitch = pe : this.map.setMaxPitch(pe);
|
|
25297
25327
|
}
|
|
25298
25328
|
/**
|
|
25299
25329
|
* A globe is flat-on and north-up (docs/design/globe.md). MapLibre's globe
|
|
@@ -25335,12 +25365,12 @@ class by {
|
|
|
25335
25365
|
* survives a project → unproject round trip, a far-side one comes back as
|
|
25336
25366
|
* the near-side point under the same pixel.
|
|
25337
25367
|
*/
|
|
25338
|
-
isOccluded(Q,
|
|
25368
|
+
isOccluded(Q, pe) {
|
|
25339
25369
|
if (!this.globe) return !1;
|
|
25340
|
-
const
|
|
25341
|
-
if (typeof
|
|
25342
|
-
const Ce = this.map.unproject(this.map.project([Q,
|
|
25343
|
-
return Math.abs(Ce.lat -
|
|
25370
|
+
const Pe = this.map.transform;
|
|
25371
|
+
if (typeof Pe?.isLocationOccluded == "function") return Pe.isLocationOccluded(new Bu.LngLat(Q, pe));
|
|
25372
|
+
const Ce = this.map.unproject(this.map.project([Q, pe]));
|
|
25373
|
+
return Math.abs(Ce.lat - pe) > 1e-3 || Math.abs((Ce.lng - Q + 540) % 360 - 180) > 1e-3;
|
|
25344
25374
|
}
|
|
25345
25375
|
/**
|
|
25346
25376
|
* Is this screen pixel on the planet? Always true on a flat map. A globe
|
|
@@ -25350,28 +25380,28 @@ class by {
|
|
|
25350
25380
|
* isOccluded: the fallback re-projects the answer and checks it lands back
|
|
25351
25381
|
* on the pixel.
|
|
25352
25382
|
*/
|
|
25353
|
-
isOnSurface(Q,
|
|
25383
|
+
isOnSurface(Q, pe) {
|
|
25354
25384
|
if (!this.globe) return !0;
|
|
25355
|
-
const
|
|
25356
|
-
if (typeof
|
|
25357
|
-
const Ce = this.map.project(this.map.unproject([Q,
|
|
25358
|
-
return Math.hypot(Ce.x - Q, Ce.y -
|
|
25385
|
+
const Pe = this.map.transform;
|
|
25386
|
+
if (typeof Pe?.isPointOnMapSurface == "function") return Pe.isPointOnMapSurface(new Bu.Point(Q, pe));
|
|
25387
|
+
const Ce = this.map.project(this.map.unproject([Q, pe]));
|
|
25388
|
+
return Math.hypot(Ce.x - Q, Ce.y - pe) < 1;
|
|
25359
25389
|
}
|
|
25360
25390
|
getViewport() {
|
|
25361
25391
|
const Q = this.map;
|
|
25362
25392
|
return {
|
|
25363
|
-
project: (
|
|
25364
|
-
const
|
|
25365
|
-
return this.isOccluded(
|
|
25393
|
+
project: (pe) => {
|
|
25394
|
+
const Pe = Q.project([pe[0], pe[1]]);
|
|
25395
|
+
return this.isOccluded(pe[0], pe[1]) ? [Pe.x, Pe.y, -1] : [Pe.x, Pe.y];
|
|
25366
25396
|
},
|
|
25367
|
-
unproject: (
|
|
25368
|
-
if (!this.isOnSurface(
|
|
25369
|
-
const
|
|
25370
|
-
return [
|
|
25397
|
+
unproject: (pe) => {
|
|
25398
|
+
if (!this.isOnSurface(pe[0], pe[1])) return [];
|
|
25399
|
+
const Pe = Q.unproject([pe[0], pe[1]]);
|
|
25400
|
+
return [Pe.lng, Pe.lat];
|
|
25371
25401
|
},
|
|
25372
25402
|
getBounds: () => {
|
|
25373
|
-
const
|
|
25374
|
-
return [
|
|
25403
|
+
const pe = Q.getBounds();
|
|
25404
|
+
return [pe.getWest(), pe.getSouth(), pe.getEast(), pe.getNorth()];
|
|
25375
25405
|
},
|
|
25376
25406
|
width: Q.getContainer().clientWidth,
|
|
25377
25407
|
height: Q.getContainer().clientHeight
|
|
@@ -25382,8 +25412,8 @@ class by {
|
|
|
25382
25412
|
return { longitude: Q.lng, latitude: Q.lat, zoom: this.map.getZoom(), pitch: this.map.getPitch(), bearing: this.map.getBearing() };
|
|
25383
25413
|
}
|
|
25384
25414
|
/** Instant recenter/rezoom — the basemap's own camera jump, no deck viewState involved. */
|
|
25385
|
-
jumpTo(Q,
|
|
25386
|
-
this.markBusy(), this.map.jumpTo(
|
|
25415
|
+
jumpTo(Q, pe) {
|
|
25416
|
+
this.markBusy(), this.map.jumpTo(pe !== void 0 ? { center: Q, zoom: pe } : { center: Q });
|
|
25387
25417
|
}
|
|
25388
25418
|
/**
|
|
25389
25419
|
* Animated camera (spec: "Map Stories / Animation primitives") — MapLibre's
|
|
@@ -25391,19 +25421,19 @@ class by {
|
|
|
25391
25421
|
* the direct `easeTo` interpolation. duration 0 degrades to an instant
|
|
25392
25422
|
* move, so this is also the one method that reaches pitch/bearing.
|
|
25393
25423
|
*/
|
|
25394
|
-
easeTo(Q,
|
|
25424
|
+
easeTo(Q, pe, Pe = !1) {
|
|
25395
25425
|
this.markBusy();
|
|
25396
|
-
const Ce = { duration:
|
|
25426
|
+
const Ce = { duration: pe };
|
|
25397
25427
|
for (const [je, R] of Object.entries(Q)) R !== void 0 && (Ce[je] = R);
|
|
25398
|
-
this.globe && (Ce.pitch = 0, Ce.bearing = 0),
|
|
25428
|
+
this.globe && (Ce.pitch = 0, Ce.bearing = 0), Pe && pe > 0 ? this.map.flyTo(Ce) : this.map.easeTo(Ce);
|
|
25399
25429
|
}
|
|
25400
|
-
fitBounds(Q,
|
|
25401
|
-
this.markBusy(), this.map.fitBounds(Q, { padding:
|
|
25430
|
+
fitBounds(Q, pe, Pe = 0) {
|
|
25431
|
+
this.markBusy(), this.map.fitBounds(Q, { padding: pe, duration: Pe });
|
|
25402
25432
|
}
|
|
25403
25433
|
destroy() {
|
|
25404
25434
|
if (this.pendingCaptureRejects.size > 0) {
|
|
25405
25435
|
const Q = new Error("[onlymapjs] snapshot() canceled — the renderer was torn down before the capture frame rendered.");
|
|
25406
|
-
for (const
|
|
25436
|
+
for (const pe of this.pendingCaptureRejects) pe(Q);
|
|
25407
25437
|
this.pendingCaptureRejects.clear();
|
|
25408
25438
|
}
|
|
25409
25439
|
this.deckCaptures = [], this.attributionElement?.remove(), this.attributionElement = void 0, this.overlay.finalize(), this.map.remove();
|