@datosgeo-atdt/geo-ui 0.12.2 → 0.12.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/MapaPMTiles.d.ts.map +1 -1
- package/dist/geo-ui.js +233 -233
- package/dist/geo-ui.js.map +1 -1
- package/dist/geo-ui.umd.cjs +13 -13
- package/dist/geo-ui.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/geo-ui.js
CHANGED
|
@@ -162,9 +162,9 @@ function Z_() {
|
|
|
162
162
|
return this.sampleCurveY(this.solveCurveX(e, r));
|
|
163
163
|
} }, Ge;
|
|
164
164
|
})(), _t = Me(tt);
|
|
165
|
-
let
|
|
165
|
+
let wt, et;
|
|
166
166
|
function pe() {
|
|
167
|
-
return
|
|
167
|
+
return wt == null && (wt = typeof OffscreenCanvas < "u" && new OffscreenCanvas(1, 1).getContext("2d") && typeof createImageBitmap == "function"), wt;
|
|
168
168
|
}
|
|
169
169
|
function jt() {
|
|
170
170
|
if (et == null && (et = !1, pe())) {
|
|
@@ -305,9 +305,9 @@ function Z_() {
|
|
|
305
305
|
function lt(i) {
|
|
306
306
|
return Array.isArray(i) ? i.map(lt) : typeof i == "object" && i ? ut(i, lt) : i;
|
|
307
307
|
}
|
|
308
|
-
const
|
|
309
|
-
function
|
|
310
|
-
|
|
308
|
+
const bt = {};
|
|
309
|
+
function st(i) {
|
|
310
|
+
bt[i] || (typeof console < "u" && console.warn(i), bt[i] = !0);
|
|
311
311
|
}
|
|
312
312
|
function rt(i, e, r) {
|
|
313
313
|
return (r.y - i.y) * (e.x - i.x) > (e.y - i.y) * (r.x - i.x);
|
|
@@ -341,7 +341,7 @@ function Z_() {
|
|
|
341
341
|
}
|
|
342
342
|
}));
|
|
343
343
|
}
|
|
344
|
-
let
|
|
344
|
+
let Dr, Gt;
|
|
345
345
|
function Yt(i, e, r, s) {
|
|
346
346
|
return i.addEventListener(e, r, s), { unsubscribe: () => {
|
|
347
347
|
i.removeEventListener(e, r, s);
|
|
@@ -812,23 +812,23 @@ function Z_() {
|
|
|
812
812
|
return new pi(fs(e.values, r.values, s));
|
|
813
813
|
}
|
|
814
814
|
}
|
|
815
|
-
class
|
|
815
|
+
class zr {
|
|
816
816
|
constructor(e) {
|
|
817
817
|
this.values = e.slice();
|
|
818
818
|
}
|
|
819
819
|
static parse(e) {
|
|
820
|
-
if (e instanceof
|
|
821
|
-
if (typeof e == "number") return new
|
|
820
|
+
if (e instanceof zr) return e;
|
|
821
|
+
if (typeof e == "number") return new zr([e]);
|
|
822
822
|
if (Array.isArray(e)) {
|
|
823
823
|
for (const r of e) if (typeof r != "number") return;
|
|
824
|
-
return new
|
|
824
|
+
return new zr(e);
|
|
825
825
|
}
|
|
826
826
|
}
|
|
827
827
|
toString() {
|
|
828
828
|
return JSON.stringify(this.values);
|
|
829
829
|
}
|
|
830
830
|
static interpolate(e, r, s) {
|
|
831
|
-
return new
|
|
831
|
+
return new zr(fs(e.values, r.values, s));
|
|
832
832
|
}
|
|
833
833
|
}
|
|
834
834
|
class xt {
|
|
@@ -926,7 +926,7 @@ function Z_() {
|
|
|
926
926
|
return typeof i == "number" && i >= 0 && i <= 255 && typeof e == "number" && e >= 0 && e <= 255 && typeof r == "number" && r >= 0 && r <= 255 ? s === void 0 || typeof s == "number" && s >= 0 && s <= 1 ? null : `Invalid rgba value [${[i, e, r, s].join(", ")}]: 'a' must be between 0 and 1.` : `Invalid rgba value [${(typeof s == "number" ? [i, e, r, s] : [i, e, r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`;
|
|
927
927
|
}
|
|
928
928
|
function Sn(i) {
|
|
929
|
-
if (i === null || typeof i == "string" || typeof i == "boolean" || typeof i == "number" || i instanceof Ti || i instanceof Rt || i instanceof rl || i instanceof Ei || i instanceof pi || i instanceof
|
|
929
|
+
if (i === null || typeof i == "string" || typeof i == "boolean" || typeof i == "number" || i instanceof Ti || i instanceof Rt || i instanceof rl || i instanceof Ei || i instanceof pi || i instanceof zr || i instanceof xt || i instanceof wi || i instanceof Ri) return !0;
|
|
930
930
|
if (Array.isArray(i)) {
|
|
931
931
|
for (const e of i) if (!Sn(e)) return !1;
|
|
932
932
|
return !0;
|
|
@@ -947,7 +947,7 @@ function Z_() {
|
|
|
947
947
|
if (i instanceof rl) return $s;
|
|
948
948
|
if (i instanceof Ei) return Zs;
|
|
949
949
|
if (i instanceof pi) return Ga;
|
|
950
|
-
if (i instanceof
|
|
950
|
+
if (i instanceof zr) return Ws;
|
|
951
951
|
if (i instanceof xt) return us;
|
|
952
952
|
if (i instanceof wi) return Hs;
|
|
953
953
|
if (i instanceof Ri) return hs;
|
|
@@ -969,7 +969,7 @@ function Z_() {
|
|
|
969
969
|
}
|
|
970
970
|
function jn(i) {
|
|
971
971
|
const e = typeof i;
|
|
972
|
-
return i === null ? "" : e === "string" || e === "number" || e === "boolean" ? String(i) : i instanceof Rt || i instanceof Ti || i instanceof Ei || i instanceof pi || i instanceof
|
|
972
|
+
return i === null ? "" : e === "string" || e === "number" || e === "boolean" ? String(i) : i instanceof Rt || i instanceof Ti || i instanceof Ei || i instanceof pi || i instanceof zr || i instanceof xt || i instanceof wi || i instanceof Ri ? i.toString() : JSON.stringify(i);
|
|
973
973
|
}
|
|
974
974
|
class an {
|
|
975
975
|
constructor(e, r) {
|
|
@@ -1086,7 +1086,7 @@ function Z_() {
|
|
|
1086
1086
|
let r;
|
|
1087
1087
|
for (const s of this.args) {
|
|
1088
1088
|
r = s.evaluate(e);
|
|
1089
|
-
const o =
|
|
1089
|
+
const o = zr.parse(r);
|
|
1090
1090
|
if (o) return o;
|
|
1091
1091
|
}
|
|
1092
1092
|
throw new pr(`Could not parse numberArray from value '${typeof r == "string" ? r : JSON.stringify(r)}'`);
|
|
@@ -1597,7 +1597,7 @@ function Z_() {
|
|
|
1597
1597
|
case "colorArray":
|
|
1598
1598
|
return xt.interpolate(g, y, f);
|
|
1599
1599
|
case "numberArray":
|
|
1600
|
-
return
|
|
1600
|
+
return zr.interpolate(g, y, f);
|
|
1601
1601
|
case "variableAnchorOffsetCollection":
|
|
1602
1602
|
return wi.interpolate(g, y, f);
|
|
1603
1603
|
case "array":
|
|
@@ -1633,7 +1633,7 @@ function Z_() {
|
|
|
1633
1633
|
const o = s - r, u = i - r;
|
|
1634
1634
|
return o === 0 ? 0 : e === 1 ? u / o : (Math.pow(e, u) - 1) / (Math.pow(e, o) - 1);
|
|
1635
1635
|
}
|
|
1636
|
-
const Ir = { color: Rt.interpolate, number: wn, padding: pi.interpolate, numberArray:
|
|
1636
|
+
const Ir = { color: Rt.interpolate, number: wn, padding: pi.interpolate, numberArray: zr.interpolate, colorArray: xt.interpolate, variableAnchorOffsetCollection: wi.interpolate, array: fs };
|
|
1637
1637
|
class qn {
|
|
1638
1638
|
constructor(e, r) {
|
|
1639
1639
|
this.type = e, this.args = r;
|
|
@@ -2574,7 +2574,7 @@ function Z_() {
|
|
|
2574
2574
|
case "padding":
|
|
2575
2575
|
return pi.parse;
|
|
2576
2576
|
case "numberArray":
|
|
2577
|
-
return
|
|
2577
|
+
return zr.parse;
|
|
2578
2578
|
case "colorArray":
|
|
2579
2579
|
return xt.parse;
|
|
2580
2580
|
default:
|
|
@@ -2670,7 +2670,7 @@ function Z_() {
|
|
|
2670
2670
|
r = xt.parse(r);
|
|
2671
2671
|
break;
|
|
2672
2672
|
case "numberArray":
|
|
2673
|
-
r =
|
|
2673
|
+
r = zr.parse(r);
|
|
2674
2674
|
break;
|
|
2675
2675
|
default:
|
|
2676
2676
|
Lt(r) === e.type || e.type === "enum" && e.values[r] || (r = void 0);
|
|
@@ -2744,7 +2744,7 @@ function Z_() {
|
|
|
2744
2744
|
case "padding":
|
|
2745
2745
|
return pi.parse(o.default) || null;
|
|
2746
2746
|
case "numberArray":
|
|
2747
|
-
return
|
|
2747
|
+
return zr.parse(o.default) || null;
|
|
2748
2748
|
case "colorArray":
|
|
2749
2749
|
return xt.parse(o.default) || null;
|
|
2750
2750
|
case "variableAnchorOffsetCollection":
|
|
@@ -3635,7 +3635,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
3635
3635
|
}
|
|
3636
3636
|
{
|
|
3637
3637
|
let f = o;
|
|
3638
|
-
return u.type === "color" && typeof o == "string" ? f = Rt.parse(o) : u.type !== "padding" || typeof o != "number" && !Array.isArray(o) ? u.type !== "numberArray" || typeof o != "number" && !Array.isArray(o) ? u.type !== "colorArray" || typeof o != "string" && !Array.isArray(o) ? u.type === "variableAnchorOffsetCollection" && Array.isArray(o) ? f = wi.parse(o) : u.type === "projectionDefinition" && typeof o == "string" && (f = Ti.parse(o)) : f = xt.parse(o) : f =
|
|
3638
|
+
return u.type === "color" && typeof o == "string" ? f = Rt.parse(o) : u.type !== "padding" || typeof o != "number" && !Array.isArray(o) ? u.type !== "numberArray" || typeof o != "number" && !Array.isArray(o) ? u.type !== "colorArray" || typeof o != "string" && !Array.isArray(o) ? u.type === "variableAnchorOffsetCollection" && Array.isArray(o) ? f = wi.parse(o) : u.type === "projectionDefinition" && typeof o == "string" && (f = Ti.parse(o)) : f = xt.parse(o) : f = zr.parse(o) : f = pi.parse(o), { globalStateRefs: /* @__PURE__ */ new Set(), _globalState: null, kind: "constant", evaluate: () => f };
|
|
3639
3639
|
}
|
|
3640
3640
|
})(r === void 0 ? e.specification.default : r, e.specification, s);
|
|
3641
3641
|
}
|
|
@@ -4004,7 +4004,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4004
4004
|
this._structArray = e, this._pos1 = r * this.size, this._pos2 = this._pos1 / 2, this._pos4 = this._pos1 / 4, this._pos8 = this._pos1 / 8;
|
|
4005
4005
|
}
|
|
4006
4006
|
}
|
|
4007
|
-
class
|
|
4007
|
+
class kr {
|
|
4008
4008
|
constructor() {
|
|
4009
4009
|
this.isTransferred = !1, this.capacity = -1, this.resize(0);
|
|
4010
4010
|
}
|
|
@@ -4045,7 +4045,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4045
4045
|
function Qn(i, e) {
|
|
4046
4046
|
return Math.ceil(i / e) * e;
|
|
4047
4047
|
}
|
|
4048
|
-
class Pa extends
|
|
4048
|
+
class Pa extends kr {
|
|
4049
4049
|
_refreshViews() {
|
|
4050
4050
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
|
|
4051
4051
|
}
|
|
@@ -4059,7 +4059,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4059
4059
|
}
|
|
4060
4060
|
}
|
|
4061
4061
|
Pa.prototype.bytesPerElement = 4, Ye("StructArrayLayout2i4", Pa);
|
|
4062
|
-
class So extends
|
|
4062
|
+
class So extends kr {
|
|
4063
4063
|
_refreshViews() {
|
|
4064
4064
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
|
|
4065
4065
|
}
|
|
@@ -4073,7 +4073,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4073
4073
|
}
|
|
4074
4074
|
}
|
|
4075
4075
|
So.prototype.bytesPerElement = 6, Ye("StructArrayLayout3i6", So);
|
|
4076
|
-
class Vl extends
|
|
4076
|
+
class Vl extends kr {
|
|
4077
4077
|
_refreshViews() {
|
|
4078
4078
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
|
|
4079
4079
|
}
|
|
@@ -4087,7 +4087,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4087
4087
|
}
|
|
4088
4088
|
}
|
|
4089
4089
|
Vl.prototype.bytesPerElement = 8, Ye("StructArrayLayout4i8", Vl);
|
|
4090
|
-
class Po extends
|
|
4090
|
+
class Po extends kr {
|
|
4091
4091
|
_refreshViews() {
|
|
4092
4092
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
|
|
4093
4093
|
}
|
|
@@ -4101,7 +4101,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4101
4101
|
}
|
|
4102
4102
|
}
|
|
4103
4103
|
Po.prototype.bytesPerElement = 12, Ye("StructArrayLayout2i4i12", Po);
|
|
4104
|
-
class Nl extends
|
|
4104
|
+
class Nl extends kr {
|
|
4105
4105
|
_refreshViews() {
|
|
4106
4106
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
|
|
4107
4107
|
}
|
|
@@ -4115,7 +4115,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4115
4115
|
}
|
|
4116
4116
|
}
|
|
4117
4117
|
Nl.prototype.bytesPerElement = 8, Ye("StructArrayLayout2i4ub8", Nl);
|
|
4118
|
-
class Ia extends
|
|
4118
|
+
class Ia extends kr {
|
|
4119
4119
|
_refreshViews() {
|
|
4120
4120
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
|
|
4121
4121
|
}
|
|
@@ -4129,7 +4129,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4129
4129
|
}
|
|
4130
4130
|
}
|
|
4131
4131
|
Ia.prototype.bytesPerElement = 8, Ye("StructArrayLayout2f8", Ia);
|
|
4132
|
-
class fn extends
|
|
4132
|
+
class fn extends kr {
|
|
4133
4133
|
_refreshViews() {
|
|
4134
4134
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
|
|
4135
4135
|
}
|
|
@@ -4143,7 +4143,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4143
4143
|
}
|
|
4144
4144
|
}
|
|
4145
4145
|
fn.prototype.bytesPerElement = 20, Ye("StructArrayLayout10ui20", fn);
|
|
4146
|
-
class Io extends
|
|
4146
|
+
class Io extends kr {
|
|
4147
4147
|
_refreshViews() {
|
|
4148
4148
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
|
|
4149
4149
|
}
|
|
@@ -4157,7 +4157,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4157
4157
|
}
|
|
4158
4158
|
}
|
|
4159
4159
|
Io.prototype.bytesPerElement = 16, Ye("StructArrayLayout8ui16", Io);
|
|
4160
|
-
class Ma extends
|
|
4160
|
+
class Ma extends kr {
|
|
4161
4161
|
_refreshViews() {
|
|
4162
4162
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
|
|
4163
4163
|
}
|
|
@@ -4171,7 +4171,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4171
4171
|
}
|
|
4172
4172
|
}
|
|
4173
4173
|
Ma.prototype.bytesPerElement = 24, Ye("StructArrayLayout4i4ui4i24", Ma);
|
|
4174
|
-
class Mo extends
|
|
4174
|
+
class Mo extends kr {
|
|
4175
4175
|
_refreshViews() {
|
|
4176
4176
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
|
|
4177
4177
|
}
|
|
@@ -4185,7 +4185,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4185
4185
|
}
|
|
4186
4186
|
}
|
|
4187
4187
|
Mo.prototype.bytesPerElement = 12, Ye("StructArrayLayout3f12", Mo);
|
|
4188
|
-
class Ea extends
|
|
4188
|
+
class Ea extends kr {
|
|
4189
4189
|
_refreshViews() {
|
|
4190
4190
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer);
|
|
4191
4191
|
}
|
|
@@ -4198,7 +4198,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4198
4198
|
}
|
|
4199
4199
|
}
|
|
4200
4200
|
Ea.prototype.bytesPerElement = 4, Ye("StructArrayLayout1ul4", Ea);
|
|
4201
|
-
class jl extends
|
|
4201
|
+
class jl extends kr {
|
|
4202
4202
|
_refreshViews() {
|
|
4203
4203
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
|
|
4204
4204
|
}
|
|
@@ -4212,7 +4212,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4212
4212
|
}
|
|
4213
4213
|
}
|
|
4214
4214
|
jl.prototype.bytesPerElement = 20, Ye("StructArrayLayout6i1ul2ui20", jl);
|
|
4215
|
-
class Ls extends
|
|
4215
|
+
class Ls extends kr {
|
|
4216
4216
|
_refreshViews() {
|
|
4217
4217
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
|
|
4218
4218
|
}
|
|
@@ -4226,7 +4226,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4226
4226
|
}
|
|
4227
4227
|
}
|
|
4228
4228
|
Ls.prototype.bytesPerElement = 12, Ye("StructArrayLayout2i2i2i12", Ls);
|
|
4229
|
-
class es extends
|
|
4229
|
+
class es extends kr {
|
|
4230
4230
|
_refreshViews() {
|
|
4231
4231
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
|
|
4232
4232
|
}
|
|
@@ -4240,7 +4240,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4240
4240
|
}
|
|
4241
4241
|
}
|
|
4242
4242
|
es.prototype.bytesPerElement = 16, Ye("StructArrayLayout2f1f2i16", es);
|
|
4243
|
-
class Ul extends
|
|
4243
|
+
class Ul extends kr {
|
|
4244
4244
|
_refreshViews() {
|
|
4245
4245
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
|
|
4246
4246
|
}
|
|
@@ -4254,7 +4254,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4254
4254
|
}
|
|
4255
4255
|
}
|
|
4256
4256
|
Ul.prototype.bytesPerElement = 16, Ye("StructArrayLayout2ub2f2i16", Ul);
|
|
4257
|
-
class Ca extends
|
|
4257
|
+
class Ca extends kr {
|
|
4258
4258
|
_refreshViews() {
|
|
4259
4259
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
|
|
4260
4260
|
}
|
|
@@ -4268,7 +4268,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4268
4268
|
}
|
|
4269
4269
|
}
|
|
4270
4270
|
Ca.prototype.bytesPerElement = 6, Ye("StructArrayLayout3ui6", Ca);
|
|
4271
|
-
class ts extends
|
|
4271
|
+
class ts extends kr {
|
|
4272
4272
|
_refreshViews() {
|
|
4273
4273
|
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);
|
|
4274
4274
|
}
|
|
@@ -4282,7 +4282,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4282
4282
|
}
|
|
4283
4283
|
}
|
|
4284
4284
|
ts.prototype.bytesPerElement = 48, Ye("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48", ts);
|
|
4285
|
-
class Gl extends
|
|
4285
|
+
class Gl extends kr {
|
|
4286
4286
|
_refreshViews() {
|
|
4287
4287
|
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);
|
|
4288
4288
|
}
|
|
@@ -4296,7 +4296,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4296
4296
|
}
|
|
4297
4297
|
}
|
|
4298
4298
|
Gl.prototype.bytesPerElement = 64, Ye("StructArrayLayout8i15ui1ul2f2ui64", Gl);
|
|
4299
|
-
class Eo extends
|
|
4299
|
+
class Eo extends kr {
|
|
4300
4300
|
_refreshViews() {
|
|
4301
4301
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
|
|
4302
4302
|
}
|
|
@@ -4309,7 +4309,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4309
4309
|
}
|
|
4310
4310
|
}
|
|
4311
4311
|
Eo.prototype.bytesPerElement = 4, Ye("StructArrayLayout1f4", Eo);
|
|
4312
|
-
class Co extends
|
|
4312
|
+
class Co extends kr {
|
|
4313
4313
|
_refreshViews() {
|
|
4314
4314
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
|
|
4315
4315
|
}
|
|
@@ -4323,7 +4323,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4323
4323
|
}
|
|
4324
4324
|
}
|
|
4325
4325
|
Co.prototype.bytesPerElement = 12, Ye("StructArrayLayout1ui2f12", Co);
|
|
4326
|
-
class ql extends
|
|
4326
|
+
class ql extends kr {
|
|
4327
4327
|
_refreshViews() {
|
|
4328
4328
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
|
|
4329
4329
|
}
|
|
@@ -4337,7 +4337,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4337
4337
|
}
|
|
4338
4338
|
}
|
|
4339
4339
|
ql.prototype.bytesPerElement = 8, Ye("StructArrayLayout1ul2ui8", ql);
|
|
4340
|
-
class d extends
|
|
4340
|
+
class d extends kr {
|
|
4341
4341
|
_refreshViews() {
|
|
4342
4342
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
|
|
4343
4343
|
}
|
|
@@ -4351,7 +4351,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4351
4351
|
}
|
|
4352
4352
|
}
|
|
4353
4353
|
d.prototype.bytesPerElement = 4, Ye("StructArrayLayout2ui4", d);
|
|
4354
|
-
class t extends
|
|
4354
|
+
class t extends kr {
|
|
4355
4355
|
_refreshViews() {
|
|
4356
4356
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
|
|
4357
4357
|
}
|
|
@@ -4364,7 +4364,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4364
4364
|
}
|
|
4365
4365
|
}
|
|
4366
4366
|
t.prototype.bytesPerElement = 2, Ye("StructArrayLayout1ui2", t);
|
|
4367
|
-
class n extends
|
|
4367
|
+
class n extends kr {
|
|
4368
4368
|
_refreshViews() {
|
|
4369
4369
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
|
|
4370
4370
|
}
|
|
@@ -4673,7 +4673,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4673
4673
|
}
|
|
4674
4674
|
prepareSegment(e, r, s, o) {
|
|
4675
4675
|
const u = this.segments[this.segments.length - 1];
|
|
4676
|
-
return e > Ne.MAX_VERTEX_ARRAY_LENGTH &&
|
|
4676
|
+
return e > Ne.MAX_VERTEX_ARRAY_LENGTH && st(`Max vertices per segment is ${Ne.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${e}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${Ne.MAX_VERTEX_ARRAY_LENGTH} vertices.`), this._forceNewSegmentOnNextPrepare || !u || u.vertexLength + e > Ne.MAX_VERTEX_ARRAY_LENGTH || u.sortKey !== o ? this.createNewSegment(r, s, o) : u;
|
|
4677
4677
|
}
|
|
4678
4678
|
createNewSegment(e, r, s) {
|
|
4679
4679
|
const o = { vertexOffset: e.length, primitiveOffset: r.length, vertexLength: 0, primitiveLength: 0, vaos: {} };
|
|
@@ -5136,7 +5136,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5136
5136
|
const o = r[s];
|
|
5137
5137
|
for (let u = 0; u < o.length; u++) {
|
|
5138
5138
|
const h = o[u], f = Math.round(h.x * e), g = Math.round(h.y * e);
|
|
5139
|
-
h.x = Zt(f, zn, $l), h.y = Zt(g, zn, $l), (f < h.x || f > h.x + 1 || g < h.y || g > h.y + 1) &&
|
|
5139
|
+
h.x = Zt(f, zn, $l), h.y = Zt(g, zn, $l), (f < h.x || f > h.x + 1 || g < h.y || g > h.y + 1) && st("Geometry exceeds allowed extent, reduce your vector tile buffer size");
|
|
5140
5140
|
}
|
|
5141
5141
|
}
|
|
5142
5142
|
return r;
|
|
@@ -5522,7 +5522,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5522
5522
|
class $d {
|
|
5523
5523
|
constructor(e, r, s, o = 1, u = 1, h = 1, f = 0) {
|
|
5524
5524
|
if (this.uid = e, r.height !== r.width) throw new RangeError("DEM tiles must be square");
|
|
5525
|
-
if (s && !["mapbox", "terrarium", "custom"].includes(s)) return void
|
|
5525
|
+
if (s && !["mapbox", "terrarium", "custom"].includes(s)) return void st(`"${s}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);
|
|
5526
5526
|
this.stride = r.height;
|
|
5527
5527
|
const g = this.dim = r.height - 2;
|
|
5528
5528
|
switch (this.data = new Uint32Array(r.data.buffer), s) {
|
|
@@ -5603,7 +5603,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5603
5603
|
if (r.elevationStops.length < 1 && (r.elevationStops = [0], r.colorStops = [Rt.transparent]), r.elevationStops.length < 2 && (r.elevationStops.push(r.elevationStops[0] + 1), r.colorStops.push(r.colorStops[0])), r.elevationStops.length <= e) return r;
|
|
5604
5604
|
const o = { elevationStops: [], colorStops: [] }, u = (r.elevationStops.length - 1) / (e - 1);
|
|
5605
5605
|
for (let h = 0; h < r.elevationStops.length - 0.5; h += u) o.elevationStops.push(r.elevationStops[Math.round(h)]), o.colorStops.push(r.colorStops[Math.round(h)]);
|
|
5606
|
-
return
|
|
5606
|
+
return st(`Too many colors in specification of ${this.id} color-relief layer, may not render properly. Max possible colors: ${e}, provided: ${r.elevationStops.length}`), o;
|
|
5607
5607
|
}
|
|
5608
5608
|
_colorRampChanged() {
|
|
5609
5609
|
return this.colorRampExpression != this._transitionablePaint._values["color-relief-color"].value.expression;
|
|
@@ -6483,7 +6483,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6483
6483
|
for (const Oe of P) {
|
|
6484
6484
|
const ze = [], Se = [];
|
|
6485
6485
|
for (const xe of Oe) {
|
|
6486
|
-
const He = xe.x, $e = xe.y, Ke = z[0] * He + z[4] * $e + z[12], Ue = z[1] * He + z[5] * $e + z[13],
|
|
6486
|
+
const He = xe.x, $e = xe.y, Ke = z[0] * He + z[4] * $e + z[12], Ue = z[1] * He + z[5] * $e + z[13], at = z[2] * He + z[6] * $e + z[14], $t = z[3] * He + z[7] * $e + z[15], Bt = at + W, Cr = $t + J, gi = Ke + fe, Kr = Ue + Pe, Ar = at + Te, Sr = $t + Ce, Qt = new de((Ke + O) / Cr, (Ue + N) / Cr);
|
|
6487
6487
|
Qt.z = Bt / Cr, ze.push(Qt);
|
|
6488
6488
|
const Vr = new de(gi / Sr, Kr / Sr);
|
|
6489
6489
|
Vr.z = Ar / Sr, Se.push(Vr);
|
|
@@ -6625,8 +6625,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6625
6625
|
const $t = Ue - 0.5;
|
|
6626
6626
|
Ue += Ue * $t * (Ue - 1) * ((1.0904 + W * (W * (3.55645 - 1.43519 * W) - 3.2452)) * $t * $t + (0.848013 + W * (0.215638 * W - 1.06021)));
|
|
6627
6627
|
}
|
|
6628
|
-
const
|
|
6629
|
-
this.addHalfVertex(C,
|
|
6628
|
+
const at = $.sub(B)._mult(Ue)._add(B)._unit()._mult(Ce ? -1 : 1);
|
|
6629
|
+
this.addHalfVertex(C, at.x, at.y, !1, Ce, 0, P);
|
|
6630
6630
|
}
|
|
6631
6631
|
}
|
|
6632
6632
|
z && this.addCurrentVertex(C, $, -xe, -He, P);
|
|
@@ -6866,9 +6866,9 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6866
6866
|
}
|
|
6867
6867
|
addImageSection(e) {
|
|
6868
6868
|
const r = e.image ? e.image.name : "";
|
|
6869
|
-
if (r.length === 0) return void
|
|
6869
|
+
if (r.length === 0) return void st("Can't add FormattedSection with an empty image.");
|
|
6870
6870
|
const s = this.getNextImageSectionCharCode();
|
|
6871
|
-
s ? (this.text += String.fromCharCode(s), this.sections.push({ scale: 1, verticalAlign: e.verticalAlign || "bottom", imageName: r }), this.sectionIndex.push(this.sections.length - 1)) :
|
|
6871
|
+
s ? (this.text += String.fromCharCode(s), this.sections.push({ scale: 1, verticalAlign: e.verticalAlign || "bottom", imageName: r }), this.sectionIndex.push(this.sections.length - 1)) : st("Reached maximum number of images 6401");
|
|
6872
6872
|
}
|
|
6873
6873
|
getNextImageSectionCharCode() {
|
|
6874
6874
|
return this.imageSectionID ? this.imageSectionID >= 63743 ? null : ++this.imageSectionID : (this.imageSectionID = 57344, this.imageSectionID);
|
|
@@ -7336,7 +7336,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7336
7336
|
})(A, B);
|
|
7337
7337
|
const N = [], W = { positionedLines: N, text: A.toString(), top: v[1], bottom: v[1], left: v[0], right: v[0], writingMode: w, iconsInText: !1, verticalizable: !1 };
|
|
7338
7338
|
return (function(J, fe, Pe, Te, Ce, Oe, ze, Se, xe, He, $e, Ke) {
|
|
7339
|
-
let Ue = 0,
|
|
7339
|
+
let Ue = 0, at = 0, $t = 0, Bt = 0;
|
|
7340
7340
|
const Cr = Se === "right" ? 1 : Se === "left" ? 0 : 0.5, gi = ni / Ke;
|
|
7341
7341
|
let Kr = 0;
|
|
7342
7342
|
for (const Qt of Ce) {
|
|
@@ -7346,35 +7346,35 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7346
7346
|
const xr = Zr.positionedGlyphs;
|
|
7347
7347
|
let Bi = 0;
|
|
7348
7348
|
if (!Qt.length()) {
|
|
7349
|
-
|
|
7349
|
+
at += Oe, ++Kr;
|
|
7350
7350
|
continue;
|
|
7351
7351
|
}
|
|
7352
7352
|
const _i = Lg(Te, Qt, gi);
|
|
7353
7353
|
let Oi = 0;
|
|
7354
7354
|
for (const oi of Qt.text) {
|
|
7355
|
-
const
|
|
7355
|
+
const Rr = Qt.getSection(Oi), Jr = oi.codePointAt(0), Nr = Fg(xe, $e, Jr), li = { glyph: Jr, imageName: null, x: Ue, y: at + -17, vertical: Nr, scale: 1, fontStack: "", sectionIndex: Qt.getSectionIndex(Oi), metrics: null, rect: null };
|
|
7356
7356
|
let os;
|
|
7357
|
-
if ("fontStack" in
|
|
7358
|
-
if (os = Bg(
|
|
7359
|
-
li.fontStack =
|
|
7357
|
+
if ("fontStack" in Rr) {
|
|
7358
|
+
if (os = Bg(Rr, Jr, Nr, _i, fe, Pe), !os) continue;
|
|
7359
|
+
li.fontStack = Rr.fontStack;
|
|
7360
7360
|
} else {
|
|
7361
|
-
if (J.iconsInText = !0,
|
|
7362
|
-
Bi = Math.max(Bi, os.imageOffset), li.imageName =
|
|
7361
|
+
if (J.iconsInText = !0, Rr.scale *= gi, os = Og(Rr, Nr, Vr, _i, Te), !os) continue;
|
|
7362
|
+
Bi = Math.max(Bi, os.imageOffset), li.imageName = Rr.imageName;
|
|
7363
7363
|
}
|
|
7364
7364
|
const { rect: yn, metrics: hc, baselineOffset: js } = os;
|
|
7365
|
-
li.y += js, li.scale =
|
|
7365
|
+
li.y += js, li.scale = Rr.scale, li.metrics = hc, li.rect = yn, xr.push(li), Nr ? (J.verticalizable = !0, Ue += ("imageName" in Rr ? hc.advance : ni) * Rr.scale + He) : Ue += hc.advance * Rr.scale + He, Oi++;
|
|
7366
7366
|
}
|
|
7367
7367
|
xr.length !== 0 && ($t = Math.max(Ue - He, $t), Vg(xr, 0, xr.length - 1, Cr)), Ue = 0, Zr.lineOffset = Math.max(Bi, (Vr - 1) * ni);
|
|
7368
7368
|
const un = Oe * Vr + Bi;
|
|
7369
|
-
|
|
7369
|
+
at += un, Bt = Math.max(un, Bt), ++Kr;
|
|
7370
7370
|
}
|
|
7371
7371
|
const { horizontalAlign: Ar, verticalAlign: Sr } = Bh(ze);
|
|
7372
7372
|
(function(Qt, Vr, Zr, xr, Bi, _i, Oi, un, oi) {
|
|
7373
|
-
const
|
|
7373
|
+
const Rr = (Vr - Zr) * Bi;
|
|
7374
7374
|
let Jr = 0;
|
|
7375
7375
|
Jr = _i !== Oi ? -un * xr - -17 : -xr * oi * Oi + 0.5 * Oi;
|
|
7376
|
-
for (const Nr of Qt) for (const li of Nr.positionedGlyphs) li.x +=
|
|
7377
|
-
})(J.positionedLines, Cr, Ar, Sr, $t, Bt, Oe,
|
|
7376
|
+
for (const Nr of Qt) for (const li of Nr.positionedGlyphs) li.x += Rr, li.y += Jr;
|
|
7377
|
+
})(J.positionedLines, Cr, Ar, Sr, $t, Bt, Oe, at, Ce.length), J.top += -Sr * at, J.bottom = J.top + at, J.left += -Ar * $t, J.right = J.left + $t;
|
|
7378
7378
|
})(W, e, r, s, z, h, f, g, w, y, S, C), !(function(J) {
|
|
7379
7379
|
for (const fe of J) if (fe.positionedGlyphs.length !== 0) return !1;
|
|
7380
7380
|
return !0;
|
|
@@ -9509,7 +9509,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
9509
9509
|
if ($e && $e.size() !== Se.length - 1) {
|
|
9510
9510
|
const Ke = new Int32Array($e.size());
|
|
9511
9511
|
let Ue = 0;
|
|
9512
|
-
for (let
|
|
9512
|
+
for (let at = 0; at < $e.size(); at++) Ke[at] = $e.get(at) ? Ue++ : 0;
|
|
9513
9513
|
return new qo(ze, Ke, Se, xe, $e);
|
|
9514
9514
|
}
|
|
9515
9515
|
return $e ? new pf(ze, Se, xe, $e) : new pf(ze, Se, xe);
|
|
@@ -9521,8 +9521,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
9521
9521
|
const Se = df(Te, Math.ceil(Ce / 8), Oe), xe = new _n(Se, Ce), He = ze.size(), $e = new _n(new Uint8Array(He), He);
|
|
9522
9522
|
let Ke = 0;
|
|
9523
9523
|
for (let Ue = 0; Ue < ze.size(); Ue++) {
|
|
9524
|
-
const
|
|
9525
|
-
$e.set(Ue,
|
|
9524
|
+
const at = !!ze.get(Ue) && xe.get(Ke++);
|
|
9525
|
+
$e.set(Ue, at);
|
|
9526
9526
|
}
|
|
9527
9527
|
return $e.getBuffer();
|
|
9528
9528
|
})(A, W, z, O) : ac(A, W, z);
|
|
@@ -9540,17 +9540,17 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
9540
9540
|
switch (xe.logicalLevelTechnique1) {
|
|
9541
9541
|
case Ot.DELTA:
|
|
9542
9542
|
return xe.logicalLevelTechnique2 === Ot.RLE && (Se = Zp(Se, xe.runs, xe.numRleValues)), (function(Ke, Ue) {
|
|
9543
|
-
const
|
|
9543
|
+
const at = new BigInt64Array(Ke.size());
|
|
9544
9544
|
let $t = 0;
|
|
9545
|
-
Ke.get(0) ? (
|
|
9545
|
+
Ke.get(0) ? (at[0] = Ke.get(0) ? Ue[0] >> 1n ^ -(1n & Ue[0]) : 0n, $t = 1) : at[0] = 0n;
|
|
9546
9546
|
let Bt = 1;
|
|
9547
|
-
for (; Bt !=
|
|
9548
|
-
return
|
|
9547
|
+
for (; Bt != at.length; ++Bt) at[Bt] = Ke.get(Bt) ? at[Bt - 1] + (Ue[$t] >> 1n ^ -(1n & Ue[$t++])) : at[Bt - 1];
|
|
9548
|
+
return at;
|
|
9549
9549
|
})($e, Se);
|
|
9550
9550
|
case Ot.RLE:
|
|
9551
|
-
return (function(Ke, Ue,
|
|
9551
|
+
return (function(Ke, Ue, at, $t) {
|
|
9552
9552
|
const Bt = Ue;
|
|
9553
|
-
return
|
|
9553
|
+
return at ? (function(Cr, gi, Kr) {
|
|
9554
9554
|
const Ar = new BigInt64Array(Cr.size());
|
|
9555
9555
|
let Sr = 0;
|
|
9556
9556
|
for (let Qt = 0; Qt < Kr; Qt++) {
|
|
@@ -9574,18 +9574,18 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
9574
9574
|
})(Se, xe, He, $e);
|
|
9575
9575
|
case Ot.NONE:
|
|
9576
9576
|
return Se = He ? (function(Ke, Ue) {
|
|
9577
|
-
const
|
|
9577
|
+
const at = new BigInt64Array(Ke.size());
|
|
9578
9578
|
let $t = 0, Bt = 0;
|
|
9579
|
-
for (; Bt !=
|
|
9579
|
+
for (; Bt != at.length; ++Bt) if (Ke.get(Bt)) {
|
|
9580
9580
|
const Cr = Ue[$t++];
|
|
9581
|
-
|
|
9582
|
-
} else
|
|
9583
|
-
return
|
|
9581
|
+
at[Bt] = Cr >> 1n ^ -(1n & Cr);
|
|
9582
|
+
} else at[Bt] = 0n;
|
|
9583
|
+
return at;
|
|
9584
9584
|
})($e, Se) : (function(Ke, Ue) {
|
|
9585
|
-
const
|
|
9585
|
+
const at = new BigInt64Array(Ke.size());
|
|
9586
9586
|
let $t = 0, Bt = 0;
|
|
9587
|
-
for (; Bt !=
|
|
9588
|
-
return
|
|
9587
|
+
for (; Bt != at.length; ++Bt) at[Bt] = Ke.get(Bt) ? Ue[$t++] : 0n;
|
|
9588
|
+
return at;
|
|
9589
9589
|
})($e, Se), Se;
|
|
9590
9590
|
default:
|
|
9591
9591
|
throw new Error("The specified Logical level technique is not supported");
|
|
@@ -10268,9 +10268,9 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
10268
10268
|
(u.textFitWidth || u.textFitHeight) && (y = Tp(i)), B = Vu(v, 0, xe[0]), O = Vu(w, 0, xe[1]), $ = Vu(v, xe[0], xe[2]), N = Vu(w, xe[1], xe[3]), W = xe[0] - B, fe = xe[1] - O, J = He - $, Pe = $e - N;
|
|
10269
10269
|
}
|
|
10270
10270
|
const Te = y.x1, Ce = y.y1, Oe = y.x2 - Te, ze = y.y2 - Ce, Se = (xe, He, $e, Ke) => {
|
|
10271
|
-
const Ue = Nu(xe.stretch - B, $, Oe, Te),
|
|
10271
|
+
const Ue = Nu(xe.stretch - B, $, Oe, Te), at = ju(xe.fixed - W, J, xe.stretch, P), $t = Nu(He.stretch - O, N, ze, Ce), Bt = ju(He.fixed - fe, Pe, He.stretch, C), Cr = Nu($e.stretch - B, $, Oe, Te), gi = ju($e.fixed - W, J, $e.stretch, P), Kr = Nu(Ke.stretch - O, N, ze, Ce), Ar = ju(Ke.fixed - fe, Pe, Ke.stretch, C), Sr = new de(Ue, $t), Qt = new de(Cr, $t), Vr = new de(Cr, Kr), Zr = new de(Ue, Kr), xr = new de(at / h, Bt / h), Bi = new de(gi / h, Ar / h), _i = e * Math.PI / 180;
|
|
10272
10272
|
if (_i) {
|
|
10273
|
-
const oi = Math.sin(_i),
|
|
10273
|
+
const oi = Math.sin(_i), Rr = Math.cos(_i), Jr = [Rr, -oi, oi, Rr];
|
|
10274
10274
|
Sr._matMult(Jr), Qt._matMult(Jr), Zr._matMult(Jr), Vr._matMult(Jr);
|
|
10275
10275
|
}
|
|
10276
10276
|
const Oi = xe.stretch + xe.fixed, un = He.stretch + He.fixed;
|
|
@@ -10280,7 +10280,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
10280
10280
|
const xe = Af(v, A, P), He = Af(w, z, C);
|
|
10281
10281
|
for (let $e = 0; $e < xe.length - 1; $e++) {
|
|
10282
10282
|
const Ke = xe[$e], Ue = xe[$e + 1];
|
|
10283
|
-
for (let
|
|
10283
|
+
for (let at = 0; at < He.length - 1; at++) o.push(Se(Ke, He[at], Ue, He[at + 1]));
|
|
10284
10284
|
}
|
|
10285
10285
|
} else o.push(Se({ fixed: 0, stretch: -1 }, { fixed: 0, stretch: -1 }, { fixed: 0, stretch: f + 1 }, { fixed: 0, stretch: g + 1 }));
|
|
10286
10286
|
return o;
|
|
@@ -10502,28 +10502,28 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
10502
10502
|
function C_(i, e, r, s, o, u, h, f, g, y, v, w) {
|
|
10503
10503
|
let S = u.textMaxSize.evaluate(e, {});
|
|
10504
10504
|
S === void 0 && (S = h);
|
|
10505
|
-
const P = i.layers[0].layout, C = P.get("icon-offset").evaluate(e, {}, v), A = Rf(r.horizontal), z = h / 24, B = i.tilePixelRatio * z, $ = i.tilePixelRatio * S / 24, O = i.tilePixelRatio * f, N = i.tilePixelRatio * P.get("symbol-spacing"), W = P.get("text-padding") * i.tilePixelRatio, J = (function($e, Ke, Ue,
|
|
10505
|
+
const P = i.layers[0].layout, C = P.get("icon-offset").evaluate(e, {}, v), A = Rf(r.horizontal), z = h / 24, B = i.tilePixelRatio * z, $ = i.tilePixelRatio * S / 24, O = i.tilePixelRatio * f, N = i.tilePixelRatio * P.get("symbol-spacing"), W = P.get("text-padding") * i.tilePixelRatio, J = (function($e, Ke, Ue, at = 1) {
|
|
10506
10506
|
const $t = $e.get("icon-padding").evaluate(Ke, {}, Ue), Bt = $t && $t.values;
|
|
10507
|
-
return [Bt[0] *
|
|
10507
|
+
return [Bt[0] * at, Bt[1] * at, Bt[2] * at, Bt[3] * at];
|
|
10508
10508
|
})(P, e, v, i.tilePixelRatio), fe = P.get("text-max-angle") / 180 * Math.PI, Pe = P.get("text-rotation-alignment") !== "viewport" && P.get("symbol-placement") !== "point", Te = P.get("icon-rotation-alignment") === "map" && P.get("symbol-placement") !== "point", Ce = P.get("symbol-placement"), Oe = N / 2, ze = P.get("icon-text-fit");
|
|
10509
10509
|
let Se;
|
|
10510
10510
|
s && ze !== "none" && (i.allowVerticalPlacement && r.vertical && (Se = Sp(s, r.vertical, ze, P.get("icon-text-fit-padding"), C, z)), A && (s = Sp(s, A, ze, P.get("icon-text-fit-padding"), C, z)));
|
|
10511
10511
|
const xe = v ? w.line.getGranularityForZoomLevel(v.z) : 1, He = ($e, Ke) => {
|
|
10512
|
-
Ke.x < 0 || Ke.x >= je || Ke.y < 0 || Ke.y >= je || (function(Ue,
|
|
10513
|
-
const js = Ue.addToLineVertexArray(
|
|
10512
|
+
Ke.x < 0 || Ke.x >= je || Ke.y < 0 || Ke.y >= je || (function(Ue, at, $t, Bt, Cr, gi, Kr, Ar, Sr, Qt, Vr, Zr, xr, Bi, _i, Oi, un, oi, Rr, Jr, Nr, li, os, yn, hc) {
|
|
10513
|
+
const js = Ue.addToLineVertexArray(at, $t);
|
|
10514
10514
|
let Fa, Zo, Wo, Ho, Of = 0, Vf = 0, Nf = 0, jf = 0, _d = -1, yd = -1;
|
|
10515
10515
|
const ls = {};
|
|
10516
10516
|
let Uf = $r("");
|
|
10517
10517
|
if (Ue.allowVerticalPlacement && Bt.vertical) {
|
|
10518
10518
|
const Ii = Ar.layout.get("text-rotate").evaluate(Nr, {}, yn) + 90;
|
|
10519
|
-
Wo = new Uu(Sr,
|
|
10519
|
+
Wo = new Uu(Sr, at, Qt, Vr, Zr, Bt.vertical, xr, Bi, _i, Ii), Kr && (Ho = new Uu(Sr, at, Qt, Vr, Zr, Kr, un, oi, _i, Ii));
|
|
10520
10520
|
}
|
|
10521
10521
|
if (Cr) {
|
|
10522
10522
|
const Ii = Ar.layout.get("icon-rotate").evaluate(Nr, {}), rn = Ar.layout.get("icon-text-fit") !== "none", Ba = Cf(Cr, Ii, os, rn), vn = Kr ? Cf(Kr, Ii, os, rn) : void 0;
|
|
10523
|
-
Zo = new Uu(Sr,
|
|
10523
|
+
Zo = new Uu(Sr, at, Qt, Vr, Zr, Cr, un, oi, !1, Ii), Of = 4 * Ba.length;
|
|
10524
10524
|
const Oa = Ue.iconSizeData;
|
|
10525
10525
|
let Ln = null;
|
|
10526
|
-
Oa.kind === "source" ? (Ln = [ss * Ar.layout.get("icon-size").evaluate(Nr, {})], Ln[0] > Bs &&
|
|
10526
|
+
Oa.kind === "source" ? (Ln = [ss * Ar.layout.get("icon-size").evaluate(Nr, {})], Ln[0] > Bs && st(`${Ue.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)) : Oa.kind === "composite" && (Ln = [ss * li.compositeIconSizes[0].evaluate(Nr, {}, yn), ss * li.compositeIconSizes[1].evaluate(Nr, {}, yn)], (Ln[0] > Bs || Ln[1] > Bs) && st(`${Ue.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)), Ue.addSymbols(Ue.icon, Ba, Ln, Jr, Rr, Nr, M.az.none, at, js.lineStartIndex, js.lineLength, -1, yn), _d = Ue.icon.placedSymbolArray.length - 1, vn && (Vf = 4 * vn.length, Ue.addSymbols(Ue.icon, vn, Ln, Jr, Rr, Nr, M.az.vertical, at, js.lineStartIndex, js.lineLength, -1, yn), yd = Ue.icon.placedSymbolArray.length - 1);
|
|
10527
10527
|
}
|
|
10528
10528
|
const Gf = Object.keys(Bt.horizontal);
|
|
10529
10529
|
for (const Ii of Gf) {
|
|
@@ -10531,18 +10531,18 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
10531
10531
|
if (!Fa) {
|
|
10532
10532
|
Uf = $r(rn.text);
|
|
10533
10533
|
const vn = Ar.layout.get("text-rotate").evaluate(Nr, {}, yn);
|
|
10534
|
-
Fa = new Uu(Sr,
|
|
10534
|
+
Fa = new Uu(Sr, at, Qt, Vr, Zr, rn, xr, Bi, _i, vn);
|
|
10535
10535
|
}
|
|
10536
10536
|
const Ba = rn.positionedLines.length === 1;
|
|
10537
|
-
if (Nf += kf(Ue,
|
|
10537
|
+
if (Nf += kf(Ue, at, rn, gi, Ar, _i, Nr, Oi, js, Bt.vertical ? M.az.horizontal : M.az.horizontalOnly, Ba ? Gf : [Ii], ls, _d, li, yn), Ba) break;
|
|
10538
10538
|
}
|
|
10539
|
-
Bt.vertical && (jf += kf(Ue,
|
|
10539
|
+
Bt.vertical && (jf += kf(Ue, at, Bt.vertical, gi, Ar, _i, Nr, Oi, js, M.az.vertical, ["vertical"], ls, yd, li, yn));
|
|
10540
10540
|
const z_ = Fa ? Fa.boxStartIndex : Ue.collisionBoxArray.length, k_ = Fa ? Fa.boxEndIndex : Ue.collisionBoxArray.length, R_ = Wo ? Wo.boxStartIndex : Ue.collisionBoxArray.length, L_ = Wo ? Wo.boxEndIndex : Ue.collisionBoxArray.length, F_ = Zo ? Zo.boxStartIndex : Ue.collisionBoxArray.length, B_ = Zo ? Zo.boxEndIndex : Ue.collisionBoxArray.length, O_ = Ho ? Ho.boxStartIndex : Ue.collisionBoxArray.length, V_ = Ho ? Ho.boxEndIndex : Ue.collisionBoxArray.length;
|
|
10541
10541
|
let xn = -1;
|
|
10542
10542
|
const qu = (Ii, rn) => Ii && Ii.circleDiameter ? Math.max(Ii.circleDiameter, rn) : rn;
|
|
10543
10543
|
xn = qu(Fa, xn), xn = qu(Wo, xn), xn = qu(Zo, xn), xn = qu(Ho, xn);
|
|
10544
10544
|
const qf = xn > -1 ? 1 : 0;
|
|
10545
|
-
qf && (xn *= hc / ni), Ue.glyphOffsetArray.length >= Vo.MAX_GLYPHS &&
|
|
10545
|
+
qf && (xn *= hc / ni), Ue.glyphOffsetArray.length >= Vo.MAX_GLYPHS && st("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"), Nr.sortKey !== void 0 && Ue.addToSortKeyRanges(Ue.symbolInstances.length, Nr.sortKey);
|
|
10546
10546
|
const N_ = zf(Ar, Nr, yn), [j_, U_] = (function(Ii, rn) {
|
|
10547
10547
|
const Ba = Ii.length, vn = rn == null ? void 0 : rn.values;
|
|
10548
10548
|
if ((vn == null ? void 0 : vn.length) > 0) for (let Oa = 0; Oa < vn.length; Oa += 2) {
|
|
@@ -10551,12 +10551,12 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
10551
10551
|
}
|
|
10552
10552
|
return [Ba, Ii.length];
|
|
10553
10553
|
})(Ue.textAnchorOffsets, N_);
|
|
10554
|
-
Ue.symbolInstances.emplaceBack(
|
|
10554
|
+
Ue.symbolInstances.emplaceBack(at.x, at.y, ls.right >= 0 ? ls.right : -1, ls.center >= 0 ? ls.center : -1, ls.left >= 0 ? ls.left : -1, ls.vertical || -1, _d, yd, Uf, z_, k_, R_, L_, F_, B_, O_, V_, Qt, Nf, jf, Of, Vf, qf, 0, xr, xn, j_, U_);
|
|
10555
10555
|
})(i, Ke, $e, r, s, o, Se, i.layers[0], i.collisionBoxArray, e.index, e.sourceLayerIndex, i.index, B, [W, W, W, W], Pe, g, O, J, Te, C, e, u, y, v, h);
|
|
10556
10556
|
};
|
|
10557
10557
|
if (Ce === "line") for (const $e of bf(e.geometry, 0, 0, je, je)) {
|
|
10558
10558
|
const Ke = za($e, xe), Ue = P_(Ke, N, fe, r.vertical || A, s, 24, $, i.overscaling, je);
|
|
10559
|
-
for (const
|
|
10559
|
+
for (const at of Ue) A && A_(i, A.text, Oe, at) || He(Ke, at);
|
|
10560
10560
|
}
|
|
10561
10561
|
else if (Ce === "line-center") {
|
|
10562
10562
|
for (const $e of e.geometry) if ($e.length > 1) {
|
|
@@ -10580,21 +10580,21 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
10580
10580
|
if (!Se.rect) continue;
|
|
10581
10581
|
const xe = Se.rect || {};
|
|
10582
10582
|
let He = 4, $e = !0, Ke = 1, Ue = 0;
|
|
10583
|
-
const
|
|
10583
|
+
const at = (J || Te) && Se.vertical, $t = Se.metrics.advance * Se.scale / 2;
|
|
10584
10584
|
if (Te && O.verticalizable && (Ue = ze.lineOffset / 2 - (Se.imageName ? -(ni - Se.metrics.width * Se.scale) / 2 : (Se.scale - 1) * ni)), Se.imageName) {
|
|
10585
10585
|
const oi = Pe[Se.imageName];
|
|
10586
10586
|
$e = oi.sdf, Ke = oi.pixelRatio, He = 1 / Ke;
|
|
10587
10587
|
}
|
|
10588
10588
|
const Bt = J ? [Se.x + $t, Se.y] : [0, 0];
|
|
10589
10589
|
let Cr = J ? [0, 0] : [Se.x + $t + N[0], Se.y + N[1] - Ue], gi = [0, 0];
|
|
10590
|
-
|
|
10590
|
+
at && (gi = Cr, Cr = [0, 0]);
|
|
10591
10591
|
const Kr = Se.metrics.isDoubleResolution ? 2 : 1, Ar = (Se.metrics.left - He) * Se.scale - $t + Cr[0], Sr = (-Se.metrics.top - He) * Se.scale + Cr[1], Qt = Ar + xe.w / Kr * Se.scale / Ke, Vr = Sr + xe.h / Kr * Se.scale / Ke, Zr = new de(Ar, Sr), xr = new de(Qt, Sr), Bi = new de(Ar, Vr), _i = new de(Qt, Vr);
|
|
10592
|
-
if (
|
|
10593
|
-
const oi = new de(-$t, $t - -17),
|
|
10594
|
-
Zr._rotateAround(
|
|
10592
|
+
if (at) {
|
|
10593
|
+
const oi = new de(-$t, $t - -17), Rr = -Math.PI / 2, Jr = 12 - $t, Nr = new de(22 - Jr, -(Se.imageName ? Jr : 0)), li = new de(...gi);
|
|
10594
|
+
Zr._rotateAround(Rr, oi)._add(Nr)._add(li), xr._rotateAround(Rr, oi)._add(Nr)._add(li), Bi._rotateAround(Rr, oi)._add(Nr)._add(li), _i._rotateAround(Rr, oi)._add(Nr)._add(li);
|
|
10595
10595
|
}
|
|
10596
10596
|
if (Ce) {
|
|
10597
|
-
const oi = Math.sin(Ce),
|
|
10597
|
+
const oi = Math.sin(Ce), Rr = Math.cos(Ce), Jr = [Rr, -oi, oi, Rr];
|
|
10598
10598
|
Zr._matMult(Jr), xr._matMult(Jr), Bi._matMult(Jr), _i._matMult(Jr);
|
|
10599
10599
|
}
|
|
10600
10600
|
const Oi = new de(0, 0), un = new de(0, 0);
|
|
@@ -10603,7 +10603,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
10603
10603
|
return Oe;
|
|
10604
10604
|
})(0, r, f, o, u, h, s, i.allowVerticalPlacement), z = i.textSizeData;
|
|
10605
10605
|
let B = null;
|
|
10606
|
-
z.kind === "source" ? (B = [ss * o.layout.get("text-size").evaluate(h, {})], B[0] > Bs &&
|
|
10606
|
+
z.kind === "source" ? (B = [ss * o.layout.get("text-size").evaluate(h, {})], B[0] > Bs && st(`${i.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)) : z.kind === "composite" && (B = [ss * P.compositeTextSizes[0].evaluate(h, {}, C), ss * P.compositeTextSizes[1].evaluate(h, {}, C)], (B[0] > Bs || B[1] > Bs) && st(`${i.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)), i.addSymbols(i.text, A, B, f, u, h, y, e, g.lineStartIndex, g.lineLength, S, C);
|
|
10607
10607
|
for (const $ of v) w[$] = i.text.placedSymbolArray.length - 1;
|
|
10608
10608
|
return 4 * A.length;
|
|
10609
10609
|
}
|
|
@@ -11224,7 +11224,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11224
11224
|
}
|
|
11225
11225
|
return (function(u, h, f, g, y) {
|
|
11226
11226
|
const v = u.width, w = u.height;
|
|
11227
|
-
|
|
11227
|
+
Dr && Gt || (Dr = new OffscreenCanvas(v, w), Gt = Dr.getContext("2d", { willReadFrequently: !0 })), Dr.width = v, Dr.height = w, Gt.drawImage(u, 0, 0, v, w);
|
|
11228
11228
|
const S = Gt.getImageData(h, f, g, y);
|
|
11229
11229
|
return Gt.clearRect(0, 0, v, w), S.data;
|
|
11230
11230
|
})(i, e, r, s, o);
|
|
@@ -11359,7 +11359,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11359
11359
|
let $ = !1;
|
|
11360
11360
|
if (y.icon && y.icon.name) {
|
|
11361
11361
|
const N = i.imageMap[y.icon.name];
|
|
11362
|
-
N && (z = Ng(i.imagePositions[y.icon.name], r.get("icon-offset").evaluate(y, {}, i.canonical), r.get("icon-anchor").evaluate(y, {}, i.canonical)), $ = !!N.sdf, i.bucket.sdfIcons === void 0 ? i.bucket.sdfIcons = $ : i.bucket.sdfIcons !== $ &&
|
|
11362
|
+
N && (z = Ng(i.imagePositions[y.icon.name], r.get("icon-offset").evaluate(y, {}, i.canonical), r.get("icon-anchor").evaluate(y, {}, i.canonical)), $ = !!N.sdf, i.bucket.sdfIcons === void 0 ? i.bucket.sdfIcons = $ : i.bucket.sdfIcons !== $ && st("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"), (N.pixelRatio !== i.bucket.pixelRatio || r.get("icon-rotate").constantOr(1) !== 0) && (i.bucket.iconsNeedLinear = !0));
|
|
11363
11363
|
}
|
|
11364
11364
|
const O = Rf(C.horizontal) || C.vertical;
|
|
11365
11365
|
i.bucket.iconsInText = !!O && O.iconsInText, (O || z) && C_(i.bucket, y, C, z, i.imageMap, o, S, P, B, $, i.canonical, i.subdivisionGranularity);
|
|
@@ -11452,7 +11452,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11452
11452
|
return new Mu(i).readFields(zg, []);
|
|
11453
11453
|
}, M.p = vp, M.q = function(i) {
|
|
11454
11454
|
return /[\u02EA\u02EB\u1100-\u11FF\u2E80-\u2FDF\u3000-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE4F\uFF00-\uFFEF]|\uD81B[\uDFE0-\uDFFF]|[\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDEFB]|\uD83C[\uDE00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(i));
|
|
11455
|
-
}, M.r = Hl, M.s = Yt, M.t = Pi, M.u = ge, M.v = ga, M.w =
|
|
11455
|
+
}, M.r = Hl, M.s = Yt, M.t = Pi, M.u = ge, M.v = ga, M.w = st, M.x = Bl, M.y = _a, M.z = ba;
|
|
11456
11456
|
})), we("worker", ["./shared"], (function(M) {
|
|
11457
11457
|
class c {
|
|
11458
11458
|
constructor(R, k) {
|
|
@@ -11594,7 +11594,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11594
11594
|
this.layers[R.name] = R;
|
|
11595
11595
|
}
|
|
11596
11596
|
}
|
|
11597
|
-
function
|
|
11597
|
+
function wt(oe) {
|
|
11598
11598
|
let R = M.cU(oe);
|
|
11599
11599
|
return R.byteOffset === 0 && R.byteLength === R.buffer.byteLength || (R = new Uint8Array(R)), { vectorTile: oe, rawData: R.buffer };
|
|
11600
11600
|
}
|
|
@@ -11671,7 +11671,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11671
11671
|
const Tt = et(it, ue, V.canonical);
|
|
11672
11672
|
Tt.length > 0 && ve.addLayer(Tt);
|
|
11673
11673
|
}
|
|
11674
|
-
const Ie =
|
|
11674
|
+
const Ie = wt(ve);
|
|
11675
11675
|
return this.overzoomedTileResultCache.set(le, Ie), Ie;
|
|
11676
11676
|
}
|
|
11677
11677
|
reloadTile(R) {
|
|
@@ -12076,20 +12076,20 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12076
12076
|
const ue = (te - k) / (Y - k);
|
|
12077
12077
|
return ut(oe, R + (V - R) * ue, te, 1), ue;
|
|
12078
12078
|
}
|
|
12079
|
-
function
|
|
12079
|
+
function bt(oe, R) {
|
|
12080
12080
|
const k = [];
|
|
12081
12081
|
for (let V = 0; V < oe.length; V++) {
|
|
12082
12082
|
const Y = oe[V], te = Y.type;
|
|
12083
12083
|
let ue;
|
|
12084
|
-
if (te === "Point" || te === "MultiPoint" || te === "LineString") ue =
|
|
12084
|
+
if (te === "Point" || te === "MultiPoint" || te === "LineString") ue = st(Y.geometry, R);
|
|
12085
12085
|
else if (te === "MultiLineString" || te === "Polygon") {
|
|
12086
12086
|
ue = [];
|
|
12087
|
-
for (const le of Y.geometry) ue.push(
|
|
12087
|
+
for (const le of Y.geometry) ue.push(st(le, R));
|
|
12088
12088
|
} else if (te === "MultiPolygon") {
|
|
12089
12089
|
ue = [];
|
|
12090
12090
|
for (const le of Y.geometry) {
|
|
12091
12091
|
const se = [];
|
|
12092
|
-
for (const ve of le) se.push(
|
|
12092
|
+
for (const ve of le) se.push(st(ve, R));
|
|
12093
12093
|
ue.push(se);
|
|
12094
12094
|
}
|
|
12095
12095
|
}
|
|
@@ -12097,7 +12097,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12097
12097
|
}
|
|
12098
12098
|
return k;
|
|
12099
12099
|
}
|
|
12100
|
-
function
|
|
12100
|
+
function st(oe, R) {
|
|
12101
12101
|
const k = [];
|
|
12102
12102
|
k.size = oe.size, oe.start !== void 0 && (k.start = oe.start, k.end = oe.end);
|
|
12103
12103
|
for (let V = 0; V < oe.length; V += 3) k.push(oe[V] + R, oe[V + 1], oe[V + 2]);
|
|
@@ -12160,7 +12160,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12160
12160
|
})(le, te), oe.push(le);
|
|
12161
12161
|
}
|
|
12162
12162
|
const nr = { maxZoom: 14, indexMaxZoom: 5, indexMaxPoints: 1e5, tolerance: 3, extent: 4096, buffer: 64, lineMetrics: !1, promoteId: null, generateId: !1, debug: 0 };
|
|
12163
|
-
class
|
|
12163
|
+
class Dr {
|
|
12164
12164
|
constructor(R, k) {
|
|
12165
12165
|
const V = (k = this.options = (function(te, ue) {
|
|
12166
12166
|
for (const le in ue) te[le] = ue[le];
|
|
@@ -12178,7 +12178,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12178
12178
|
const le = ue.buffer / ue.extent;
|
|
12179
12179
|
let se = te;
|
|
12180
12180
|
const ve = Ct(te, 1, -1 - le, le, 0, -1, 2, ue), ke = Ct(te, 1, 1 - le, 2 + le, 0, -1, 2, ue);
|
|
12181
|
-
return (ve || ke) && (se = Ct(te, 1, -le, 1 + le, 0, -1, 2, ue) || [], ve && (se =
|
|
12181
|
+
return (ve || ke) && (se = Ct(te, 1, -le, 1 + le, 0, -1, 2, ue) || [], ve && (se = bt(ve, 1).concat(se)), ke && (se = se.concat(bt(ke, -1)))), se;
|
|
12182
12182
|
})(Y, k), Y.length && this.splitTile(Y, 0, 0, 0), V && (Y.length && console.log("features: %d, points: %d", this.tiles[0].numFeatures, this.tiles[0].numPoints), console.timeEnd("generate tiles"), console.log("tiles generated:", this.total, JSON.stringify(this.stats)));
|
|
12183
12183
|
}
|
|
12184
12184
|
splitTile(R, k, V, Y, te, ue, le) {
|
|
@@ -12232,7 +12232,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12232
12232
|
const V = R.tileID.canonical;
|
|
12233
12233
|
if (!this._geoJSONIndex) throw new Error("Unable to parse the data into a cluster or geojson");
|
|
12234
12234
|
const Y = this._geoJSONIndex.getTile(V.z, V.x, V.y);
|
|
12235
|
-
return Y ?
|
|
12235
|
+
return Y ? wt(new M.d2(Y.features, { version: 2, extent: M.a5 })) : null;
|
|
12236
12236
|
}));
|
|
12237
12237
|
}
|
|
12238
12238
|
loadData(R) {
|
|
@@ -12335,7 +12335,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12335
12335
|
for (const Ie of se) ue.accumulated = ve[Ie], ve[Ie] = te[Ie].evaluate(ue, le);
|
|
12336
12336
|
}, k;
|
|
12337
12337
|
})(R)).load(oe.features) : (function(k, V) {
|
|
12338
|
-
return new
|
|
12338
|
+
return new Dr(k, V);
|
|
12339
12339
|
})(oe, R.geojsonVtOptions);
|
|
12340
12340
|
}
|
|
12341
12341
|
class sr {
|
|
@@ -12446,7 +12446,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12446
12446
|
return tt !== void 0 ? tt : !!matchMedia && (Be == null && (Be = matchMedia("(prefers-reduced-motion: reduce)")), Be.matches);
|
|
12447
12447
|
}, set prefersReducedMotion(d) {
|
|
12448
12448
|
tt = d;
|
|
12449
|
-
} },
|
|
12449
|
+
} }, wt = new class {
|
|
12450
12450
|
constructor() {
|
|
12451
12451
|
this._realTime = typeof performance < "u" && performance && performance.now ? performance.now.bind(performance) : Date.now.bind(Date), this._frozenAt = null;
|
|
12452
12452
|
}
|
|
@@ -12464,7 +12464,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12464
12464
|
}
|
|
12465
12465
|
}();
|
|
12466
12466
|
function et() {
|
|
12467
|
-
return
|
|
12467
|
+
return wt.getCurrentTime();
|
|
12468
12468
|
}
|
|
12469
12469
|
class pe {
|
|
12470
12470
|
static testProp(t) {
|
|
@@ -13123,7 +13123,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
13123
13123
|
const n = c.N();
|
|
13124
13124
|
return c.O(n, n, [1, 1, 0]), c.Q(n, n, [0.5 * d.width, 0.5 * d.height, 1]), d.calculatePosMatrix ? c.S(n, n, d.calculatePosMatrix(t.toUnwrapped())) : n;
|
|
13125
13125
|
}
|
|
13126
|
-
function
|
|
13126
|
+
function bt(d, t, n, a, l, p, m) {
|
|
13127
13127
|
var _;
|
|
13128
13128
|
const x = (function(I, D, F) {
|
|
13129
13129
|
if (I) for (const j of I) {
|
|
@@ -13136,7 +13136,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
13136
13136
|
}
|
|
13137
13137
|
return !1;
|
|
13138
13138
|
})((_ = l == null ? void 0 : l.layers) !== null && _ !== void 0 ? _ : null, t, d.id), b = p.maxPitchScaleFactor(), T = d.tilesIn(a, b, x);
|
|
13139
|
-
T.sort(
|
|
13139
|
+
T.sort(st);
|
|
13140
13140
|
const E = [];
|
|
13141
13141
|
for (const I of T) E.push({ wrappedTileID: I.tileID.wrapped().key, queryResults: I.tile.queryRenderedFeatures(t, n, d.getState(), I.queryGeometry, I.cameraQueryGeometry, I.scale, l, p, b, lt(p, I.tileID), m ? (D, F) => m(I.tileID, D, F) : void 0) });
|
|
13142
13142
|
return (function(I, D) {
|
|
@@ -13154,7 +13154,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
13154
13154
|
return D;
|
|
13155
13155
|
})(E), d);
|
|
13156
13156
|
}
|
|
13157
|
-
function
|
|
13157
|
+
function st(d, t) {
|
|
13158
13158
|
const n = d.tileID, a = t.tileID;
|
|
13159
13159
|
return n.overscaledZ - a.overscaledZ || n.canonical.y - a.canonical.y || n.wrap - a.wrap || n.canonical.x - a.canonical.x;
|
|
13160
13160
|
}
|
|
@@ -13428,7 +13428,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
13428
13428
|
return !1;
|
|
13429
13429
|
}
|
|
13430
13430
|
}
|
|
13431
|
-
class
|
|
13431
|
+
class Dr extends nr {
|
|
13432
13432
|
constructor(t, n, a, l) {
|
|
13433
13433
|
super(t, n, a, l), this.type = "raster-dem", this.maxzoom = 22, this._options = c.e({ type: "raster-dem" }, n), this.encoding = n.encoding || "mapbox", this.redFactor = n.redFactor, this.greenFactor = n.greenFactor, this.blueFactor = n.blueFactor, this.baseShift = n.baseShift;
|
|
13434
13434
|
}
|
|
@@ -13816,7 +13816,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
13816
13816
|
case "raster":
|
|
13817
13817
|
return nr;
|
|
13818
13818
|
case "raster-dem":
|
|
13819
|
-
return
|
|
13819
|
+
return Dr;
|
|
13820
13820
|
case "vector":
|
|
13821
13821
|
return Ft;
|
|
13822
13822
|
case "video":
|
|
@@ -15484,7 +15484,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
15484
15484
|
}
|
|
15485
15485
|
}
|
|
15486
15486
|
var pi = "void main() {fragColor=vec4(1.0);}";
|
|
15487
|
-
const
|
|
15487
|
+
const zr = { prelude: xt(`#ifdef GL_ES
|
|
15488
15488
|
precision mediump float;
|
|
15489
15489
|
#else
|
|
15490
15490
|
#if !defined(lowp)
|
|
@@ -16318,10 +16318,10 @@ uniform ${T} ${E} u_${I};
|
|
|
16318
16318
|
return wi;
|
|
16319
16319
|
}
|
|
16320
16320
|
get shaderPreludeCode() {
|
|
16321
|
-
return
|
|
16321
|
+
return zr.projectionMercator;
|
|
16322
16322
|
}
|
|
16323
16323
|
get vertexShaderPreludeCode() {
|
|
16324
|
-
return
|
|
16324
|
+
return zr.projectionMercator.vertexSource;
|
|
16325
16325
|
}
|
|
16326
16326
|
get subdivisionGranularity() {
|
|
16327
16327
|
return c.aV.noSubdivision;
|
|
@@ -17367,10 +17367,10 @@ uniform ${T} ${E} u_${I};
|
|
|
17367
17367
|
return "#define GLOBE";
|
|
17368
17368
|
}
|
|
17369
17369
|
get shaderPreludeCode() {
|
|
17370
|
-
return
|
|
17370
|
+
return zr.projectionGlobe;
|
|
17371
17371
|
}
|
|
17372
17372
|
get vertexShaderPreludeCode() {
|
|
17373
|
-
return
|
|
17373
|
+
return zr.projectionMercator.vertexSource;
|
|
17374
17374
|
}
|
|
17375
17375
|
get subdivisionGranularity() {
|
|
17376
17376
|
return ea;
|
|
@@ -19102,11 +19102,11 @@ uniform ${T} ${E} u_${I};
|
|
|
19102
19102
|
const p = [];
|
|
19103
19103
|
n.availableImages = this._availableImages;
|
|
19104
19104
|
const m = this._serializedAllLayers(), _ = n.layers instanceof Set ? n.layers : Array.isArray(n.layers) ? new Set(n.layers) : null, x = Object.assign(Object.assign({}, n), { layers: _, globalState: this._globalState });
|
|
19105
|
-
for (const b in this.tileManagers) n.layers && !l[b] || p.push(
|
|
19105
|
+
for (const b in this.tileManagers) n.layers && !l[b] || p.push(bt(this.tileManagers[b], this._layers, m, t, x, a, this.map.terrain ? (T, E, I) => this.map.terrain.getElevation(T, E, I) : void 0));
|
|
19106
19106
|
return this.placement && p.push((function(b, T, E, I, D, F, j) {
|
|
19107
19107
|
const G = {}, U = F.queryRenderedSymbols(I), Z = [];
|
|
19108
19108
|
for (const Q of Object.keys(U).map(Number)) Z.push(j[Q]);
|
|
19109
|
-
Z.sort(
|
|
19109
|
+
Z.sort(st);
|
|
19110
19110
|
for (const Q of Z) {
|
|
19111
19111
|
const q = Q.featureIndex.lookupSymbolFeatures(U[Q.bucketInstanceId], T, Q.bucketIndex, Q.sourceLayerIndex, { filterSpec: D.filter, globalState: D.globalState }, D.layers, D.availableImages, b);
|
|
19112
19112
|
for (const K in q) {
|
|
@@ -19351,12 +19351,12 @@ uniform ${T} ${E} u_${I};
|
|
|
19351
19351
|
constructor(t, n, a, l, p, m, _, x, b = []) {
|
|
19352
19352
|
const T = t.gl;
|
|
19353
19353
|
this.program = T.createProgram();
|
|
19354
|
-
const E = Ka(n.staticAttributes), I = a ? a.getBinderAttributes() : [], D = E.concat(I), F =
|
|
19354
|
+
const E = Ka(n.staticAttributes), I = a ? a.getBinderAttributes() : [], D = E.concat(I), F = zr.prelude.staticUniforms ? Ka(zr.prelude.staticUniforms) : [], j = _.staticUniforms ? Ka(_.staticUniforms) : [], G = n.staticUniforms ? Ka(n.staticUniforms) : [], U = a ? a.getBinderUniforms() : [], Z = F.concat(j).concat(G).concat(U), Q = [];
|
|
19355
19355
|
for (const me of Z) Q.indexOf(me) < 0 && Q.push(me);
|
|
19356
19356
|
const q = a ? a.defines() : [];
|
|
19357
19357
|
Ni(T) && q.unshift("#version 300 es"), p && q.push("#define OVERDRAW_INSPECTOR;"), m && q.push("#define TERRAIN3D;"), x && q.push(x), b && q.push(...b);
|
|
19358
|
-
let K = q.concat(
|
|
19359
|
-
`), ie = q.concat(
|
|
19358
|
+
let K = q.concat(zr.prelude.fragmentSource, _.fragmentSource, n.fragmentSource).join(`
|
|
19359
|
+
`), ie = q.concat(zr.prelude.vertexSource, _.vertexSource, n.vertexSource).join(`
|
|
19360
19360
|
`);
|
|
19361
19361
|
Ni(T) || (K = (function(me) {
|
|
19362
19362
|
return me.replace(/\bin\s/g, "varying ").replace("out highp vec4 fragColor;", "").replace(/fragColor/g, "gl_FragColor").replace(/texture\(/g, "texture2D(");
|
|
@@ -20717,8 +20717,8 @@ ${D.shaderPreludeCode.vertexSource}`, define: D.shaderDefine }, defaultProjectio
|
|
|
20717
20717
|
}
|
|
20718
20718
|
useProgram(t, n, a = !1, l = []) {
|
|
20719
20719
|
this.cache = this.cache || {};
|
|
20720
|
-
const p = !!this.style.map.terrain, m = this.style.projection, _ = a ?
|
|
20721
|
-
return this.cache[b] || (this.cache[b] = new Cc(this.context,
|
|
20720
|
+
const p = !!this.style.map.terrain, m = this.style.projection, _ = a ? zr.projectionMercator : m.shaderPreludeCode, x = a ? wi : m.shaderDefine, b = t + (n ? n.cacheKey : "") + `/${a ? Ri : m.shaderVariantName}` + (this._showOverdrawInspector ? "/overdraw" : "") + (p ? "/terrain" : "") + (l ? `/${l.join("/")}` : "");
|
|
20721
|
+
return this.cache[b] || (this.cache[b] = new Cc(this.context, zr[t], n, nh[t], this._showOverdrawInspector, p, _, x, l)), this.cache[b];
|
|
20722
20722
|
}
|
|
20723
20723
|
setCustomLayerDefaults() {
|
|
20724
20724
|
this.context.unbindVAO(), this.context.cullFace.setDefault(), this.context.activeTexture.setDefault(), this.context.pixelStoreUnpack.setDefault(), this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(), this.context.pixelStoreUnpackFlipY.setDefault();
|
|
@@ -22403,7 +22403,7 @@ ${D.shaderPreludeCode.vertexSource}`, define: D.shaderDefine }, defaultProjectio
|
|
|
22403
22403
|
return n[t.canonical.z] && t.canonical.x >= n[t.canonical.z].minTileX && t.canonical.x <= n[t.canonical.z].maxTileX && t.canonical.y >= n[t.canonical.z].minTileY && t.canonical.y <= n[t.canonical.z].maxTileY;
|
|
22404
22404
|
}
|
|
22405
22405
|
}
|
|
22406
|
-
class
|
|
22406
|
+
class kr {
|
|
22407
22407
|
constructor(t, n, a) {
|
|
22408
22408
|
this._meshCache = {}, this.painter = t, this.tileManager = new Sa(n), this.options = a, this.exaggeration = typeof a.exaggeration == "number" ? a.exaggeration : 1, this.qualityFactor = 2, this.meshSize = 128, this._demMatrixCache = {}, this.coordsIndex = [], this._coordsTextureSize = 1024;
|
|
22409
22409
|
}
|
|
@@ -23410,7 +23410,7 @@ ${D.shaderPreludeCode.vertexSource}`, define: D.shaderDefine }, defaultProjectio
|
|
|
23410
23410
|
const a = this.style._layers[n];
|
|
23411
23411
|
a.type === "hillshade" && a.source === d.source && c.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality."), a.type === "color-relief" && a.source === d.source && c.w("You are using the same source for a color-relief layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.");
|
|
23412
23412
|
}
|
|
23413
|
-
this.terrain = new
|
|
23413
|
+
this.terrain = new kr(this.painter, t, d), this.painter.renderToTexture = new Pa(this.painter, this.terrain), this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center, this.transform.tileZoom)), this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center, this.transform.tileZoom)), this._terrainDataCallback = (n) => {
|
|
23414
23414
|
var a;
|
|
23415
23415
|
n.dataType === "style" ? this.terrain.tileManager.freeRtt() : n.dataType === "source" && n.tile && (n.sourceId !== d.source || this._elevationFreeze || (this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center, this.transform.tileZoom)), this._centerClampedToGround && this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center, this.transform.tileZoom))), ((a = n.source) === null || a === void 0 ? void 0 : a.type) === "image" ? this.terrain.tileManager.freeRtt() : this.terrain.tileManager.freeRtt(n.tile.tileID));
|
|
23416
23416
|
}, this.style.on("data", this._terrainDataCallback);
|
|
@@ -23825,7 +23825,7 @@ ${D.shaderPreludeCode.vertexSource}`, define: D.shaderDefine }, defaultProjectio
|
|
|
23825
23825
|
const d = this._container.querySelector(Eo);
|
|
23826
23826
|
d && d.focus();
|
|
23827
23827
|
}
|
|
23828
|
-
}, M.RasterDEMTileSource =
|
|
23828
|
+
}, M.RasterDEMTileSource = Dr, M.RasterTileSource = nr, M.ScaleControl = class {
|
|
23829
23829
|
constructor(d) {
|
|
23830
23830
|
this._onMove = () => {
|
|
23831
23831
|
Ca(this._map, this._container, this.options);
|
|
@@ -23877,15 +23877,15 @@ ${D.shaderPreludeCode.vertexSource}`, define: D.shaderDefine }, defaultProjectio
|
|
|
23877
23877
|
}, M.importScriptInWorkers = function(d) {
|
|
23878
23878
|
return Qe().broadcast("IS", d);
|
|
23879
23879
|
}, M.isTimeFrozen = function() {
|
|
23880
|
-
return
|
|
23880
|
+
return wt.isFrozen();
|
|
23881
23881
|
}, M.now = et, M.prewarm = function() {
|
|
23882
23882
|
Mt().acquire(Nt);
|
|
23883
23883
|
}, M.restoreNow = function() {
|
|
23884
|
-
|
|
23884
|
+
wt.restoreNow();
|
|
23885
23885
|
}, M.setMaxParallelImageRequests = function(d) {
|
|
23886
23886
|
c.c.MAX_PARALLEL_IMAGE_REQUESTS = d;
|
|
23887
23887
|
}, M.setNow = function(d) {
|
|
23888
|
-
|
|
23888
|
+
wt.setNow(d);
|
|
23889
23889
|
}, M.setRTLTextPlugin = function(d, t) {
|
|
23890
23890
|
return le().setRTLTextPlugin(d, t);
|
|
23891
23891
|
}, M.setWorkerCount = function(d) {
|
|
@@ -24058,17 +24058,17 @@ var J_ = /* @__PURE__ */ pc(mc, 9, 1), Q_ = /* @__PURE__ */ pc(am, 5, 1), vd = f
|
|
|
24058
24058
|
var Me = function(Qe) {
|
|
24059
24059
|
var lt = X.length;
|
|
24060
24060
|
if (Qe > lt) {
|
|
24061
|
-
var
|
|
24062
|
-
|
|
24061
|
+
var bt = new sn(Math.max(lt * 2, Qe));
|
|
24062
|
+
bt.set(X), X = bt;
|
|
24063
24063
|
}
|
|
24064
|
-
}, Ge = ee.f || 0, Be = ee.p || 0, tt = ee.b || 0, _t = ee.l,
|
|
24064
|
+
}, Ge = ee.f || 0, Be = ee.p || 0, tt = ee.b || 0, _t = ee.l, wt = ee.d, et = ee.m, pe = ee.n, jt = we * 8;
|
|
24065
24065
|
do {
|
|
24066
24066
|
if (!_t) {
|
|
24067
24067
|
Ge = bn(re, Be, 1);
|
|
24068
24068
|
var Vt = bn(re, Be + 1, 3);
|
|
24069
24069
|
if (Be += 3, Vt)
|
|
24070
24070
|
if (Vt == 1)
|
|
24071
|
-
_t = J_,
|
|
24071
|
+
_t = J_, wt = Q_, et = 9, pe = 5;
|
|
24072
24072
|
else if (Vt == 2) {
|
|
24073
24073
|
var er = bn(re, Be, 31) + 257, vt = bn(re, Be + 10, 15) + 4, he = er + bn(re, Be + 5, 31) + 1;
|
|
24074
24074
|
Be += 14;
|
|
@@ -24088,7 +24088,7 @@ var J_ = /* @__PURE__ */ pc(mc, 9, 1), Q_ = /* @__PURE__ */ pc(am, 5, 1), vd = f
|
|
|
24088
24088
|
}
|
|
24089
24089
|
}
|
|
24090
24090
|
var Ve = ce.subarray(0, er), je = ce.subarray(er);
|
|
24091
|
-
et = vd(Ve), pe = vd(je), _t = pc(Ve, et, 1),
|
|
24091
|
+
et = vd(Ve), pe = vd(je), _t = pc(Ve, et, 1), wt = pc(je, pe, 1);
|
|
24092
24092
|
} else
|
|
24093
24093
|
nn(1);
|
|
24094
24094
|
else {
|
|
@@ -24123,7 +24123,7 @@ var J_ = /* @__PURE__ */ pc(mc, 9, 1), Q_ = /* @__PURE__ */ pc(am, 5, 1), vd = f
|
|
|
24123
24123
|
var Ze = Je - 257, Ct = tm[Ze];
|
|
24124
24124
|
Nt = bn(re, Be, (1 << Ct) - 1) + sm[Ze], Be += Ct;
|
|
24125
24125
|
}
|
|
24126
|
-
var Zt =
|
|
24126
|
+
var Zt = wt[bd(re, Be) & ft], Xt = Zt >> 4;
|
|
24127
24127
|
Zt || nn(3), Be += Zt & 15;
|
|
24128
24128
|
var je = K_[Xt];
|
|
24129
24129
|
if (Xt > 3) {
|
|
@@ -24145,7 +24145,7 @@ var J_ = /* @__PURE__ */ pc(mc, 9, 1), Q_ = /* @__PURE__ */ pc(am, 5, 1), vd = f
|
|
|
24145
24145
|
X[tt] = X[tt - je];
|
|
24146
24146
|
}
|
|
24147
24147
|
}
|
|
24148
|
-
ee.l = _t, ee.p = It, ee.b = tt, ee.f = Ge, _t && (Ge = 1, ee.m = et, ee.d =
|
|
24148
|
+
ee.l = _t, ee.p = It, ee.b = tt, ee.f = Ge, _t && (Ge = 1, ee.m = et, ee.d = wt, ee.n = pe);
|
|
24149
24149
|
} while (!Ge);
|
|
24150
24150
|
return tt != X.length && M ? ty(X, 0, tt) : X.subarray(0, tt);
|
|
24151
24151
|
}, iy = /* @__PURE__ */ new sn(0), ny = function(re) {
|
|
@@ -24224,9 +24224,9 @@ var fy = Pr((re) => (ee, X) => {
|
|
|
24224
24224
|
constructor(ee) {
|
|
24225
24225
|
this.tilev4 = Pr((X, ne) => yi(this, null, function* () {
|
|
24226
24226
|
if (X.type === "json") {
|
|
24227
|
-
let _t = X.url.substr(10),
|
|
24228
|
-
if (
|
|
24229
|
-
let et = yield
|
|
24227
|
+
let _t = X.url.substr(10), wt = this.tiles.get(_t);
|
|
24228
|
+
if (wt || (wt = new Wf(_t), this.tiles.set(_t, wt)), this.metadata) return { data: yield wt.getTileJson(X.url) };
|
|
24229
|
+
let et = yield wt.getHeader();
|
|
24230
24230
|
return (et.minLon >= et.maxLon || et.minLat >= et.maxLat) && console.error(`Bounds of PMTiles archive ${et.minLon},${et.minLat},${et.maxLon},${et.maxLat} are not valid.`), { data: { tiles: [`${X.url}/{z}/{x}/{y}`], minzoom: et.minZoom, maxzoom: et.maxZoom, bounds: [et.minLon, et.minLat, et.maxLon, et.maxLat] } };
|
|
24231
24231
|
}
|
|
24232
24232
|
let we = new RegExp(/pmtiles:\/\/(.+)\/(\d+)\/(\d+)\/(\d+)/), Ee = X.url.match(we);
|
|
@@ -24679,7 +24679,7 @@ function Iy() {
|
|
|
24679
24679
|
if (!this._finished) return De = this._config.chunkSize, ce = De ? (Ze = ce.substring(0, De), ce.substring(De)) : (Ze = ce, ""), this._finished = !ce, this.parseChunk(Ze);
|
|
24680
24680
|
};
|
|
24681
24681
|
}
|
|
24682
|
-
function
|
|
24682
|
+
function wt(he) {
|
|
24683
24683
|
Ge.call(this, he = he || {});
|
|
24684
24684
|
var ce = [], De = !0, Ze = !1;
|
|
24685
24685
|
this.pause = function() {
|
|
@@ -24715,8 +24715,8 @@ function Iy() {
|
|
|
24715
24715
|
if (Je && Ze && (Xt("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '" + Me.DefaultDelimiter + "'"), Ze = !1), he.skipEmptyLines && (Je.data = Je.data.filter(function(Qe) {
|
|
24716
24716
|
return !Nt(Qe);
|
|
24717
24717
|
})), Zt()) {
|
|
24718
|
-
let Qe = function(lt,
|
|
24719
|
-
vt(he.transformHeader) && (lt = he.transformHeader(lt,
|
|
24718
|
+
let Qe = function(lt, bt) {
|
|
24719
|
+
vt(he.transformHeader) && (lt = he.transformHeader(lt, bt)), It.push(lt);
|
|
24720
24720
|
};
|
|
24721
24721
|
if (Je) if (Array.isArray(Je.data[0])) {
|
|
24722
24722
|
for (var ht = 0; Zt() && ht < Je.data.length; ht++) Je.data[ht].forEach(Qe);
|
|
@@ -24724,14 +24724,14 @@ function Iy() {
|
|
|
24724
24724
|
} else Je.data.forEach(Qe);
|
|
24725
24725
|
}
|
|
24726
24726
|
function Mt(Qe, lt) {
|
|
24727
|
-
for (var
|
|
24728
|
-
var rt =
|
|
24727
|
+
for (var bt = he.header ? {} : [], st = 0; st < Qe.length; st++) {
|
|
24728
|
+
var rt = st, ct = Qe[st], ct = ((mt, gt) => ((Ft) => (he.dynamicTypingFunction && he.dynamicTyping[Ft] === void 0 && (he.dynamicTyping[Ft] = he.dynamicTypingFunction(Ft)), (he.dynamicTyping[Ft] || he.dynamicTyping) === !0))(mt) ? gt === "true" || gt === "TRUE" || gt !== "false" && gt !== "FALSE" && (((Ft) => {
|
|
24729
24729
|
if (ur.test(Ft) && (Ft = parseFloat(Ft), tr < Ft && Ft < yt))
|
|
24730
24730
|
return 1;
|
|
24731
|
-
})(gt) ? parseFloat(gt) : br.test(gt) ? new Date(gt) : gt === "" ? null : gt) : gt)(rt = he.header ?
|
|
24732
|
-
rt === "__parsed_extra" ? (
|
|
24731
|
+
})(gt) ? parseFloat(gt) : br.test(gt) ? new Date(gt) : gt === "" ? null : gt) : gt)(rt = he.header ? st >= It.length ? "__parsed_extra" : It[st] : rt, ct = he.transform ? he.transform(ct, rt) : ct);
|
|
24732
|
+
rt === "__parsed_extra" ? (bt[rt] = bt[rt] || [], bt[rt].push(ct)) : bt[rt] = ct;
|
|
24733
24733
|
}
|
|
24734
|
-
return he.header && (
|
|
24734
|
+
return he.header && (st > It.length ? Xt("FieldMismatch", "TooManyFields", "Too many fields: expected " + It.length + " fields but parsed " + st, je + lt) : st < It.length && Xt("FieldMismatch", "TooFewFields", "Too few fields: expected " + It.length + " fields but parsed " + st, je + lt)), bt;
|
|
24735
24735
|
}
|
|
24736
24736
|
var ut;
|
|
24737
24737
|
Je && (he.header || he.dynamicTyping || he.transform) && (ut = 1, !Je.data.length || Array.isArray(Je.data[0]) ? (Je.data = Je.data.map(Mt), ut = Je.data.length) : Je.data = Mt(Je.data, 0), he.header && Je.meta && (Je.meta.fields = It), je += ut);
|
|
@@ -24745,11 +24745,11 @@ function Iy() {
|
|
|
24745
24745
|
vt(he.step) && (Xe = he.step, he.step = function(ht) {
|
|
24746
24746
|
Je = ht, Zt() ? Ct() : (Ct(), Je.data.length !== 0 && (Ve += ht.data.length, he.preview && Ve > he.preview ? De.abort() : (Je.data = Je.data[0], Xe(Je, pt))));
|
|
24747
24747
|
}), this.parse = function(ht, Mt, ut) {
|
|
24748
|
-
var Qe = he.quoteChar || '"', Qe = (he.newline || (he.newline = this.guessLineEndings(ht, Qe)), Ze = !1, he.delimiter ? vt(he.delimiter) && (he.delimiter = he.delimiter(ht), Je.meta.delimiter = he.delimiter) : ((Qe = ((lt,
|
|
24748
|
+
var Qe = he.quoteChar || '"', Qe = (he.newline || (he.newline = this.guessLineEndings(ht, Qe)), Ze = !1, he.delimiter ? vt(he.delimiter) && (he.delimiter = he.delimiter(ht), Je.meta.delimiter = he.delimiter) : ((Qe = ((lt, bt, st, rt, ct) => {
|
|
24749
24749
|
var mt, gt, Ft, nr;
|
|
24750
24750
|
ct = ct || [",", " ", "|", ";", Me.RECORD_SEP, Me.UNIT_SEP];
|
|
24751
|
-
for (var
|
|
24752
|
-
for (var Gt, Yt = ct[
|
|
24751
|
+
for (var Dr = 0; Dr < ct.length; Dr++) {
|
|
24752
|
+
for (var Gt, Yt = ct[Dr], rr = 0, sr = 0, oe = 0, R = (Ft = void 0, new jt({ comments: rt, delimiter: Yt, newline: bt, preview: 10 }).parse(lt)), k = 0; k < R.data.length; k++) st && Nt(R.data[k]) ? oe++ : (Gt = R.data[k].length, sr += Gt, Ft === void 0 ? Ft = Gt : 0 < Gt && (rr += Math.abs(Gt - Ft), Ft = Gt));
|
|
24753
24753
|
0 < R.data.length && (sr /= R.data.length - oe), (gt === void 0 || rr <= gt) && (nr === void 0 || nr < sr) && 1.99 < sr && (gt = rr, mt = Yt, nr = sr);
|
|
24754
24754
|
}
|
|
24755
24755
|
return { successful: !!(he.delimiter = mt), bestDelimiter: mt };
|
|
@@ -24771,9 +24771,9 @@ function Iy() {
|
|
|
24771
24771
|
`), lt = 1 < Qe.length && Qe[0].length < ut[0].length;
|
|
24772
24772
|
if (ut.length === 1 || lt) return `
|
|
24773
24773
|
`;
|
|
24774
|
-
for (var
|
|
24775
|
-
` &&
|
|
24776
|
-
return
|
|
24774
|
+
for (var bt = 0, st = 0; st < ut.length; st++) ut[st][0] === `
|
|
24775
|
+
` && bt++;
|
|
24776
|
+
return bt >= ut.length / 2 ? `\r
|
|
24777
24777
|
` : "\r";
|
|
24778
24778
|
};
|
|
24779
24779
|
}
|
|
@@ -24793,14 +24793,14 @@ function Iy() {
|
|
|
24793
24793
|
var Nt = ft.length, Ct = ce.length, Zt = De.length, Xt = Ze.length, ht = vt(Xe), Mt = [], ut = [], Qe = [], lt = je = 0;
|
|
24794
24794
|
if (!ft) return rr();
|
|
24795
24795
|
if (tr || tr !== !1 && ft.indexOf(pt) === -1) {
|
|
24796
|
-
for (var
|
|
24797
|
-
if (Qe =
|
|
24796
|
+
for (var bt = ft.split(De), st = 0; st < bt.length; st++) {
|
|
24797
|
+
if (Qe = bt[st], je += Qe.length, st !== bt.length - 1) je += De.length;
|
|
24798
24798
|
else if (Je) return rr();
|
|
24799
24799
|
if (!Ze || Qe.substring(0, Xt) !== Ze) {
|
|
24800
24800
|
if (ht) {
|
|
24801
24801
|
if (Mt = [], nr(Qe.split(ce)), sr(), Wt) return rr();
|
|
24802
24802
|
} else nr(Qe.split(ce));
|
|
24803
|
-
if (yt && yt <=
|
|
24803
|
+
if (yt && yt <= st) return Mt = Mt.slice(0, yt), rr(!0);
|
|
24804
24804
|
}
|
|
24805
24805
|
}
|
|
24806
24806
|
return rr();
|
|
@@ -24811,12 +24811,12 @@ function Iy() {
|
|
|
24811
24811
|
if (pt === Ve && ft[gt + 1] === Ve) gt++;
|
|
24812
24812
|
else if (pt === Ve || gt === 0 || ft[gt - 1] !== Ve) {
|
|
24813
24813
|
rt !== -1 && rt < gt + 1 && (rt = ft.indexOf(ce, gt + 1));
|
|
24814
|
-
var Ft =
|
|
24814
|
+
var Ft = Dr((ct = ct !== -1 && ct < gt + 1 ? ft.indexOf(De, gt + 1) : ct) === -1 ? rt : Math.min(rt, ct));
|
|
24815
24815
|
if (ft.substr(gt + 1 + Ft, Ct) === ce) {
|
|
24816
24816
|
Qe.push(ft.substring(je, gt).replace(mt, pt)), ft[je = gt + 1 + Ft + Ct] !== pt && (gt = ft.indexOf(pt, je)), rt = ft.indexOf(ce, je), ct = ft.indexOf(De, je);
|
|
24817
24817
|
break;
|
|
24818
24818
|
}
|
|
24819
|
-
if (Ft =
|
|
24819
|
+
if (Ft = Dr(ct), ft.substring(gt + 1 + Ft, gt + 1 + Ft + Zt) === De) {
|
|
24820
24820
|
if (Qe.push(ft.substring(je, gt).replace(mt, pt)), Yt(gt + 1 + Ft + Zt), rt = ft.indexOf(ce, je), gt = ft.indexOf(pt, je), ht && (sr(), Wt)) return rr();
|
|
24821
24821
|
if (yt && Mt.length >= yt) return rr(!0);
|
|
24822
24822
|
break;
|
|
@@ -24837,7 +24837,7 @@ function Iy() {
|
|
|
24837
24837
|
function nr(oe) {
|
|
24838
24838
|
Mt.push(oe), lt = je;
|
|
24839
24839
|
}
|
|
24840
|
-
function
|
|
24840
|
+
function Dr(oe) {
|
|
24841
24841
|
var R = 0;
|
|
24842
24842
|
return R = oe !== -1 && (oe = ft.substring(gt + 1, oe)) && oe.trim() === "" ? oe.length : R;
|
|
24843
24843
|
}
|
|
@@ -24910,7 +24910,7 @@ function Iy() {
|
|
|
24910
24910
|
}
|
|
24911
24911
|
return Me.parse = function(he, ce) {
|
|
24912
24912
|
var De = (ce = ce || {}).dynamicTyping || !1;
|
|
24913
|
-
if (vt(De) && (ce.dynamicTypingFunction = De, De = {}), ce.dynamicTyping = De, ce.transform = !!vt(ce.transform) && ce.transform, !ce.worker || !Me.WORKERS_SUPPORTED) return De = null, Me.NODE_STREAM_INPUT, typeof he == "string" ? (he = ((Ze) => Ze.charCodeAt(0) !== 65279 ? Ze : Ze.slice(1))(he), De = new (ce.download ? Be : _t)(ce)) : he.readable === !0 && vt(he.read) && vt(he.on) ? De = new
|
|
24913
|
+
if (vt(De) && (ce.dynamicTypingFunction = De, De = {}), ce.dynamicTyping = De, ce.transform = !!vt(ce.transform) && ce.transform, !ce.worker || !Me.WORKERS_SUPPORTED) return De = null, Me.NODE_STREAM_INPUT, typeof he == "string" ? (he = ((Ze) => Ze.charCodeAt(0) !== 65279 ? Ze : Ze.slice(1))(he), De = new (ce.download ? Be : _t)(ce)) : he.readable === !0 && vt(he.read) && vt(he.on) ? De = new wt(ce) : (ne.File && he instanceof File || he instanceof Object) && (De = new tt(ce)), De.stream(he);
|
|
24914
24914
|
(De = (() => {
|
|
24915
24915
|
var Ze;
|
|
24916
24916
|
return !!Me.WORKERS_SUPPORTED && (Ze = (() => {
|
|
@@ -24945,11 +24945,11 @@ function Iy() {
|
|
|
24945
24945
|
for (var Mt = 0; Mt < Je.length; Mt++) {
|
|
24946
24946
|
var ut = (Zt ? It : Je[Mt]).length, Qe = !1, lt = Zt ? Object.keys(Je[Mt]).length === 0 : Je[Mt].length === 0;
|
|
24947
24947
|
if (Nt && !Zt && (Qe = Nt === "greedy" ? Je[Mt].join("").trim() === "" : Je[Mt].length === 1 && Je[Mt][0].length === 0), Nt === "greedy" && Zt) {
|
|
24948
|
-
for (var
|
|
24949
|
-
var rt = Xt ? It[
|
|
24950
|
-
|
|
24948
|
+
for (var bt = [], st = 0; st < ut; st++) {
|
|
24949
|
+
var rt = Xt ? It[st] : st;
|
|
24950
|
+
bt.push(Je[Mt][rt]);
|
|
24951
24951
|
}
|
|
24952
|
-
Qe =
|
|
24952
|
+
Qe = bt.join("").trim() === "";
|
|
24953
24953
|
}
|
|
24954
24954
|
if (!Qe) {
|
|
24955
24955
|
for (var ct = 0; ct < ut; ct++) {
|
|
@@ -24970,7 +24970,7 @@ function Iy() {
|
|
|
24970
24970
|
})(Nt, Me.BAD_DELIMITERS) || -1 < Nt.indexOf(Xe) || Nt.charAt(0) === " " || Nt.charAt(Nt.length - 1) === " ") ? tr + Nt + tr : Nt);
|
|
24971
24971
|
}
|
|
24972
24972
|
}, Me.RECORD_SEP = "", Me.UNIT_SEP = "", Me.BYTE_ORDER_MARK = "\uFEFF", Me.BAD_DELIMITERS = ["\r", `
|
|
24973
|
-
`, '"', Me.BYTE_ORDER_MARK], Me.WORKERS_SUPPORTED = !Ee && !!ne.Worker, Me.NODE_STREAM_INPUT = 1, Me.LocalChunkSize = 10485760, Me.RemoteChunkSize = 5242880, Me.DefaultDelimiter = ",", Me.Parser = jt, Me.ParserHandle = et, Me.NetworkStreamer = Be, Me.FileStreamer = tt, Me.StringStreamer = _t, Me.ReadableStreamStreamer =
|
|
24973
|
+
`, '"', Me.BYTE_ORDER_MARK], Me.WORKERS_SUPPORTED = !Ee && !!ne.Worker, Me.NODE_STREAM_INPUT = 1, Me.LocalChunkSize = 10485760, Me.RemoteChunkSize = 5242880, Me.DefaultDelimiter = ",", Me.Parser = jt, Me.ParserHandle = et, Me.NetworkStreamer = Be, Me.FileStreamer = tt, Me.StringStreamer = _t, Me.ReadableStreamStreamer = wt, ne.jQuery && ((we = ne.jQuery).fn.parse = function(he) {
|
|
24974
24974
|
var ce = he.config || {}, De = [];
|
|
24975
24975
|
return this.each(function(yt) {
|
|
24976
24976
|
if (!(we(this).prop("tagName").toUpperCase() === "INPUT" && we(this).attr("type").toLowerCase() === "file" && ne.FileReader) || !this.files || this.files.length === 0) return !0;
|
|
@@ -24999,7 +24999,7 @@ function Iy() {
|
|
|
24999
24999
|
}
|
|
25000
25000
|
}), M && (ne.onmessage = function(he) {
|
|
25001
25001
|
he = he.data, Me.WORKER_ID === void 0 && he && (Me.WORKER_ID = he.workerId), typeof he.input == "string" ? ne.postMessage({ workerId: Me.WORKER_ID, results: Me.parse(he.input, he.config), finished: !0 }) : (ne.File && he.input instanceof File || he.input instanceof Object) && (he = Me.parse(he.input, he.config)) && ne.postMessage({ workerId: Me.WORKER_ID, results: he, finished: !0 });
|
|
25002
|
-
}), (Be.prototype = Object.create(Ge.prototype)).constructor = Be, (tt.prototype = Object.create(Ge.prototype)).constructor = tt, (_t.prototype = Object.create(_t.prototype)).constructor = _t, (
|
|
25002
|
+
}), (Be.prototype = Object.create(Ge.prototype)).constructor = Be, (tt.prototype = Object.create(Ge.prototype)).constructor = tt, (_t.prototype = Object.create(_t.prototype)).constructor = _t, (wt.prototype = Object.create(Ge.prototype)).constructor = wt, Me;
|
|
25003
25003
|
});
|
|
25004
25004
|
})(Zu)), Zu.exports;
|
|
25005
25005
|
}
|
|
@@ -25071,8 +25071,8 @@ function Xf(re, ee) {
|
|
|
25071
25071
|
for (let de = 2; de <= ne; de++) {
|
|
25072
25072
|
let Me = 0, Ge = 0, Be = 0;
|
|
25073
25073
|
for (let tt = 1; tt <= de; tt++) {
|
|
25074
|
-
const _t = de - tt + 1,
|
|
25075
|
-
Ge +=
|
|
25074
|
+
const _t = de - tt + 1, wt = X[_t - 1];
|
|
25075
|
+
Ge += wt * wt, Me += wt, Be++;
|
|
25076
25076
|
const et = Ge - Me * Me / Be, pe = _t - 1;
|
|
25077
25077
|
if (pe !== 0)
|
|
25078
25078
|
for (let jt = 2; jt <= ee; jt++)
|
|
@@ -25151,7 +25151,7 @@ const Va = "pmtiles-source", Fn = "pmtiles-fill", Bn = "municipios-source", cs =
|
|
|
25151
25151
|
fitToIds: Be,
|
|
25152
25152
|
bboxField: tt = "bbox",
|
|
25153
25153
|
jenksK: _t = 5,
|
|
25154
|
-
showMunicipios:
|
|
25154
|
+
showMunicipios: wt = !1,
|
|
25155
25155
|
enablePopup: et = !1,
|
|
25156
25156
|
popupDataLabel: pe,
|
|
25157
25157
|
popupDataField: jt,
|
|
@@ -25203,14 +25203,14 @@ const Va = "pmtiles-source", Fn = "pmtiles-fill", Bn = "municipios-source", cs =
|
|
|
25203
25203
|
type: "vector",
|
|
25204
25204
|
url: `pmtiles://${re}`,
|
|
25205
25205
|
promoteId: X
|
|
25206
|
-
}),
|
|
25206
|
+
}), wt && Ve.addSource(Bn, {
|
|
25207
25207
|
type: "vector",
|
|
25208
25208
|
url: `pmtiles://${Jf}`,
|
|
25209
25209
|
promoteId: "cvegeo"
|
|
25210
25210
|
});
|
|
25211
25211
|
const Je = Ee || X, Nt = we ? await Id(we, Je, M) : await Pd(ne, Je, M);
|
|
25212
25212
|
Ve.__csvDataMap = Nt.joinMap;
|
|
25213
|
-
const Ct =
|
|
25213
|
+
const Ct = wt ? Bn : Va, Zt = wt ? Na : ee;
|
|
25214
25214
|
Nt.joinMap.forEach((ut, Qe) => {
|
|
25215
25215
|
try {
|
|
25216
25216
|
Ve.setFeatureState(
|
|
@@ -25234,23 +25234,23 @@ const Va = "pmtiles-source", Fn = "pmtiles-fill", Bn = "municipios-source", cs =
|
|
|
25234
25234
|
];
|
|
25235
25235
|
else {
|
|
25236
25236
|
let ut;
|
|
25237
|
-
if (
|
|
25238
|
-
const lt = (Array.isArray(Be) ? Be : [Be]).map((
|
|
25239
|
-
ut = Array.from(Nt.joinMap.entries()).filter(([
|
|
25237
|
+
if (wt && Be) {
|
|
25238
|
+
const lt = (Array.isArray(Be) ? Be : [Be]).map((bt) => String(bt).substring(0, 2));
|
|
25239
|
+
ut = Array.from(Nt.joinMap.entries()).filter(([bt, st]) => lt.some((rt) => bt.startsWith(rt)) && typeof st == "number").map(([bt, st]) => st);
|
|
25240
25240
|
} else
|
|
25241
25241
|
ut = Array.from(Nt.joinMap.values()).filter((Qe) => typeof Qe == "number").map((Qe) => Qe);
|
|
25242
25242
|
if (ut.length === 0)
|
|
25243
25243
|
Xt = ["case", ["!=", ["feature-state", "value"], null], "#66827f", "#f3f3f3"];
|
|
25244
25244
|
else {
|
|
25245
|
-
const Qe = Xf(ut, _t), lt = Qe.length - 1,
|
|
25245
|
+
const Qe = Xf(ut, _t), lt = Qe.length - 1, bt = Yf("#f3f3f3", "#66827f", lt), st = ["step", ["coalesce", ["feature-state", "value"], 0], bt[0]];
|
|
25246
25246
|
for (let rt = 1; rt < lt; rt++)
|
|
25247
|
-
|
|
25248
|
-
Xt =
|
|
25247
|
+
st.push(Qe[rt]), st.push(bt[rt]);
|
|
25248
|
+
Xt = st;
|
|
25249
25249
|
}
|
|
25250
25250
|
}
|
|
25251
25251
|
const ht = Be ? (Array.isArray(Be) ? Be : [Be]).map(String) : [];
|
|
25252
|
-
if (
|
|
25253
|
-
const ut = ht.map((
|
|
25252
|
+
if (wt && ht.length > 0) {
|
|
25253
|
+
const ut = ht.map((bt) => bt.substring(0, 2)), Qe = ["in", ["get", X], ["literal", ht]];
|
|
25254
25254
|
Ve.addLayer({
|
|
25255
25255
|
id: Kf,
|
|
25256
25256
|
type: "line",
|
|
@@ -25309,7 +25309,7 @@ const Va = "pmtiles-source", Fn = "pmtiles-fill", Bn = "municipios-source", cs =
|
|
|
25309
25309
|
});
|
|
25310
25310
|
}
|
|
25311
25311
|
if (et) {
|
|
25312
|
-
const ut =
|
|
25312
|
+
const ut = wt ? cs : Fn, Qe = new wd.Popup({
|
|
25313
25313
|
closeButton: !1,
|
|
25314
25314
|
closeOnClick: !1,
|
|
25315
25315
|
closeOnMove: !1,
|
|
@@ -25320,20 +25320,20 @@ const Va = "pmtiles-source", Fn = "pmtiles-fill", Bn = "municipios-source", cs =
|
|
|
25320
25320
|
}), Ve.on("mouseleave", ut, () => {
|
|
25321
25321
|
Ve.getCanvas().style.cursor = "", Qe.remove();
|
|
25322
25322
|
}), Ve.on("mousemove", ut, (lt) => {
|
|
25323
|
-
var
|
|
25323
|
+
var bt;
|
|
25324
25324
|
if (lt.features && lt.features.length > 0) {
|
|
25325
25325
|
const rt = lt.features[0].properties;
|
|
25326
25326
|
let ct = "";
|
|
25327
|
-
if (
|
|
25327
|
+
if (wt)
|
|
25328
25328
|
ct = (rt == null ? void 0 : rt.nomgeo) || "Sin nombre";
|
|
25329
25329
|
else {
|
|
25330
25330
|
const nr = (rt == null ? void 0 : rt[X]) || "";
|
|
25331
25331
|
ct = Dy[nr] || nr;
|
|
25332
25332
|
}
|
|
25333
25333
|
let mt;
|
|
25334
|
-
if (jt && (
|
|
25334
|
+
if (jt && (wt || !Vt && !ot)) {
|
|
25335
25335
|
const nr = rt == null ? void 0 : rt[X];
|
|
25336
|
-
nr && (mt = (
|
|
25336
|
+
nr && (mt = (bt = Ve.__csvDataMap) == null ? void 0 : bt.get(nr));
|
|
25337
25337
|
}
|
|
25338
25338
|
let Ft = `<div class="geo-ui-popup-content">
|
|
25339
25339
|
<div class="geo-ui-popup-title">${ct}</div>`;
|
|
@@ -25346,24 +25346,24 @@ const Va = "pmtiles-source", Fn = "pmtiles-fill", Bn = "municipios-source", cs =
|
|
|
25346
25346
|
});
|
|
25347
25347
|
}
|
|
25348
25348
|
const Mt = Be ? Array.isArray(Be) ? Be : [Be] : [];
|
|
25349
|
-
if (Mt.length >= 2 && !
|
|
25349
|
+
if (Mt.length >= 2 && !wt && (Ve.on("click", Fn, async (ut) => {
|
|
25350
25350
|
var Qe;
|
|
25351
25351
|
if (ut.features && ut.features.length > 0) {
|
|
25352
|
-
const lt = (Qe = ut.features[0].properties) == null ? void 0 : Qe[X],
|
|
25352
|
+
const lt = (Qe = ut.features[0].properties) == null ? void 0 : Qe[X], bt = ut.features[0].properties;
|
|
25353
25353
|
if (lt) {
|
|
25354
|
-
vt && vt(lt,
|
|
25355
|
-
const
|
|
25354
|
+
vt && vt(lt, bt);
|
|
25355
|
+
const st = bt == null ? void 0 : bt[tt];
|
|
25356
25356
|
let rt = null;
|
|
25357
|
-
if (
|
|
25358
|
-
if (typeof
|
|
25357
|
+
if (console.log("🗺️ Click en entidad:", lt), console.log("📦 bboxField:", tt), console.log("📦 bboxValue del feature:", st), console.log("📋 Todas las properties:", bt), st)
|
|
25358
|
+
if (typeof st == "string")
|
|
25359
25359
|
try {
|
|
25360
|
-
rt = JSON.parse(`[${
|
|
25360
|
+
rt = JSON.parse(`[${st}]`);
|
|
25361
25361
|
} catch {
|
|
25362
|
-
const ct =
|
|
25362
|
+
const ct = st.split(",").map((mt) => parseFloat(mt.trim()));
|
|
25363
25363
|
ct.length === 4 && (rt = ct);
|
|
25364
25364
|
}
|
|
25365
|
-
else Array.isArray(
|
|
25366
|
-
if (rt && Ve) {
|
|
25365
|
+
else Array.isArray(st) && st.length === 4 && (rt = st);
|
|
25366
|
+
if (console.log("🎯 entityBbox parseado:", rt), rt && Ve) {
|
|
25367
25367
|
if (!Ve.getStyle()) return;
|
|
25368
25368
|
Ve.getLayer(Fn) && Ve.removeLayer(Fn), Ve.getLayer(`${Fn}-outline`) && Ve.removeLayer(`${Fn}-outline`), Ve.getSource(Bn) || Ve.addSource(Bn, {
|
|
25369
25369
|
type: "vector",
|
|
@@ -25440,15 +25440,15 @@ const Va = "pmtiles-source", Fn = "pmtiles-fill", Bn = "municipios-source", cs =
|
|
|
25440
25440
|
},
|
|
25441
25441
|
filter: nr
|
|
25442
25442
|
});
|
|
25443
|
-
const
|
|
25443
|
+
const Dr = [
|
|
25444
25444
|
[rt[0], rt[1]],
|
|
25445
25445
|
[rt[2], rt[3]]
|
|
25446
25446
|
];
|
|
25447
25447
|
Ve.once("idle", () => {
|
|
25448
|
-
if (Ve.fitBounds(
|
|
25448
|
+
if (console.log("🔍 Haciendo zoom al bbox:", Dr), Ve.fitBounds(Dr, {
|
|
25449
25449
|
duration: 0,
|
|
25450
25450
|
padding: 20
|
|
25451
|
-
}), Ve.getLayer(cs) && et && De.current) {
|
|
25451
|
+
}), console.log("✅ Zoom completado"), Ve.getLayer(cs) && et && De.current) {
|
|
25452
25452
|
const Gt = De.current;
|
|
25453
25453
|
Ve.on("mouseenter", cs, () => {
|
|
25454
25454
|
Ve.getCanvas().style.cursor = "pointer";
|
|
@@ -25482,7 +25482,7 @@ const Va = "pmtiles-source", Fn = "pmtiles-fill", Bn = "municipios-source", cs =
|
|
|
25482
25482
|
}), Ve.on("mouseleave", Fn, () => {
|
|
25483
25483
|
et || (Ve.getCanvas().style.cursor = "");
|
|
25484
25484
|
})), Mt.length > 0) {
|
|
25485
|
-
const ut =
|
|
25485
|
+
const ut = wt ? Bn : Va, Qe = wt ? Na : ee, lt = () => {
|
|
25486
25486
|
try {
|
|
25487
25487
|
const ct = Ve.querySourceFeatures(ut, {
|
|
25488
25488
|
sourceLayer: Qe
|
|
@@ -25491,9 +25491,9 @@ const Va = "pmtiles-source", Fn = "pmtiles-fill", Bn = "municipios-source", cs =
|
|
|
25491
25491
|
);
|
|
25492
25492
|
if (ct.length > 0) {
|
|
25493
25493
|
let mt = 1 / 0, gt = 1 / 0, Ft = -1 / 0, nr = -1 / 0;
|
|
25494
|
-
if (ct.forEach((
|
|
25495
|
-
if (
|
|
25496
|
-
const Gt =
|
|
25494
|
+
if (ct.forEach((Dr) => {
|
|
25495
|
+
if (Dr.properties && Dr.properties[tt]) {
|
|
25496
|
+
const Gt = Dr.properties[tt];
|
|
25497
25497
|
let Yt = null;
|
|
25498
25498
|
if (typeof Gt == "string")
|
|
25499
25499
|
try {
|
|
@@ -25506,11 +25506,11 @@ const Va = "pmtiles-source", Fn = "pmtiles-fill", Bn = "municipios-source", cs =
|
|
|
25506
25506
|
Yt && Yt.length === 4 && (mt = Math.min(mt, Yt[0]), gt = Math.min(gt, Yt[1]), Ft = Math.max(Ft, Yt[2]), nr = Math.max(nr, Yt[3]));
|
|
25507
25507
|
}
|
|
25508
25508
|
}), mt !== 1 / 0) {
|
|
25509
|
-
const
|
|
25509
|
+
const Dr = [
|
|
25510
25510
|
[mt, gt],
|
|
25511
25511
|
[Ft, nr]
|
|
25512
25512
|
];
|
|
25513
|
-
Ve.fitBounds(
|
|
25513
|
+
Ve.fitBounds(Dr, {
|
|
25514
25514
|
duration: 0,
|
|
25515
25515
|
padding: 20
|
|
25516
25516
|
});
|
|
@@ -25520,15 +25520,15 @@ const Va = "pmtiles-source", Fn = "pmtiles-fill", Bn = "municipios-source", cs =
|
|
|
25520
25520
|
} catch {
|
|
25521
25521
|
tr(!0);
|
|
25522
25522
|
}
|
|
25523
|
-
},
|
|
25523
|
+
}, bt = (rt) => {
|
|
25524
25524
|
rt.sourceId === ut && rt.isSourceLoaded && lt();
|
|
25525
25525
|
};
|
|
25526
|
-
Ve.on("sourcedata",
|
|
25527
|
-
const
|
|
25526
|
+
Ve.on("sourcedata", bt);
|
|
25527
|
+
const st = setTimeout(() => {
|
|
25528
25528
|
yt || lt();
|
|
25529
25529
|
}, 2e3);
|
|
25530
25530
|
return () => {
|
|
25531
|
-
Ve.off("sourcedata",
|
|
25531
|
+
Ve.off("sourcedata", bt), clearTimeout(st);
|
|
25532
25532
|
};
|
|
25533
25533
|
} else
|
|
25534
25534
|
tr(!0);
|
|
@@ -25545,7 +25545,7 @@ const Va = "pmtiles-source", Fn = "pmtiles-fill", Bn = "municipios-source", cs =
|
|
|
25545
25545
|
})(), () => {
|
|
25546
25546
|
ce.current && (ce.current.remove(), ce.current = null), Zf.removeProtocol("pmtiles");
|
|
25547
25547
|
};
|
|
25548
|
-
}, [re, ee, X, ne, we, Ee, M, c, _t, Be, tt, Ge,
|
|
25548
|
+
}, [re, ee, X, ne, we, Ee, M, c, _t, Be, tt, Ge, wt, et, pe, jt, Vt, ot, Ht, vr, er]), Wu(() => {
|
|
25549
25549
|
if (!ur || !ce.current) return;
|
|
25550
25550
|
const Ve = ce.current, je = (ft) => {
|
|
25551
25551
|
ft.key === "Escape" && ur && window.location.reload();
|
|
@@ -25605,7 +25605,7 @@ const Va = "pmtiles-source", Fn = "pmtiles-fill", Bn = "municipios-source", cs =
|
|
|
25605
25605
|
labelFormatter: de,
|
|
25606
25606
|
valueFormatter: Me
|
|
25607
25607
|
}) => {
|
|
25608
|
-
const [Ge, Be] = On([]), [tt, _t] = On(null), [
|
|
25608
|
+
const [Ge, Be] = On([]), [tt, _t] = On(null), [wt, et] = On(!1);
|
|
25609
25609
|
return Wu(() => {
|
|
25610
25610
|
(async () => {
|
|
25611
25611
|
if (re && re.length > 0) {
|
|
@@ -25634,7 +25634,7 @@ const Va = "pmtiles-source", Fn = "pmtiles-fill", Bn = "municipios-source", cs =
|
|
|
25634
25634
|
et(!1);
|
|
25635
25635
|
}
|
|
25636
25636
|
})();
|
|
25637
|
-
}, [re, ee, X, ne, we, Ee, de, Me]),
|
|
25637
|
+
}, [re, ee, X, ne, we, Ee, de, Me]), wt ? /* @__PURE__ */ ti("div", { className: `totales-display-container ${M ? "totales-centered" : ""} ${c}`, children: /* @__PURE__ */ ti("div", { className: "totales-loading", children: "Cargando datos..." }) }) : tt ? /* @__PURE__ */ ti("div", { className: `totales-display-container ${M ? "totales-centered" : ""} ${c}`, children: /* @__PURE__ */ ti("div", { className: "totales-error", children: tt }) }) : Ge.length === 0 ? null : /* @__PURE__ */ ti("div", { className: `totales-display-container ${M ? "totales-centered" : ""} ${c}`, children: Ge.map((pe, jt) => /* @__PURE__ */ dc("div", { className: "totales-item", children: [
|
|
25638
25638
|
pe.label,
|
|
25639
25639
|
": ",
|
|
25640
25640
|
/* @__PURE__ */ ti("span", { className: "totales-value", children: pe.value })
|
|
@@ -25660,12 +25660,12 @@ const Va = "pmtiles-source", Fn = "pmtiles-fill", Bn = "municipios-source", cs =
|
|
|
25660
25660
|
indexLabel: c = "#",
|
|
25661
25661
|
onRowClick: de
|
|
25662
25662
|
}) => {
|
|
25663
|
-
const [Me, Ge] = On(re || []), [Be, tt] = On(ee || []), [_t,
|
|
25663
|
+
const [Me, Ge] = On(re || []), [Be, tt] = On(ee || []), [_t, wt] = On(!1), [et, pe] = On(null);
|
|
25664
25664
|
Wu(() => {
|
|
25665
25665
|
X ? jt(X) : re && (Ge(re), ee && tt(ee));
|
|
25666
25666
|
}, [X, re, ee]);
|
|
25667
25667
|
const jt = async (ot) => {
|
|
25668
|
-
|
|
25668
|
+
wt(!0), pe(null);
|
|
25669
25669
|
try {
|
|
25670
25670
|
const Ht = await fetch(ot);
|
|
25671
25671
|
if (!Ht.ok)
|
|
@@ -25686,14 +25686,14 @@ const Va = "pmtiles-source", Fn = "pmtiles-fill", Bn = "municipios-source", cs =
|
|
|
25686
25686
|
tt(ce);
|
|
25687
25687
|
}
|
|
25688
25688
|
}
|
|
25689
|
-
|
|
25689
|
+
wt(!1);
|
|
25690
25690
|
},
|
|
25691
25691
|
error: (er) => {
|
|
25692
|
-
pe(`Error al parsear CSV: ${er.message}`),
|
|
25692
|
+
pe(`Error al parsear CSV: ${er.message}`), wt(!1);
|
|
25693
25693
|
}
|
|
25694
25694
|
});
|
|
25695
25695
|
} catch (Ht) {
|
|
25696
|
-
pe(Ht instanceof Error ? Ht.message : "Error desconocido"),
|
|
25696
|
+
pe(Ht instanceof Error ? Ht.message : "Error desconocido"), wt(!1);
|
|
25697
25697
|
}
|
|
25698
25698
|
}, Vt = (ot) => ot == null ? "-" : typeof ot == "number" ? ot.toLocaleString("es-MX") : String(ot);
|
|
25699
25699
|
return _t ? /* @__PURE__ */ ti(
|