@plannco-ppe/ppe-core 1.0.10 → 1.0.12
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/index.iife.js +5 -5
- package/dist/index.js +405 -402
- package/dist/index.umd.js +6 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8,13 +8,13 @@ const ct = {
|
|
|
8
8
|
};
|
|
9
9
|
function Ah(n, t, e) {
|
|
10
10
|
let i, s;
|
|
11
|
-
e = e ||
|
|
11
|
+
e = e || Ze;
|
|
12
12
|
let r = 0, o = n.length, a = !1;
|
|
13
13
|
for (; r < o; )
|
|
14
14
|
i = r + (o - r >> 1), s = +e(n[i], t), s < 0 ? r = i + 1 : (o = i, a = !s);
|
|
15
15
|
return a ? r : ~r;
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function Ze(n, t) {
|
|
18
18
|
return n > t ? 1 : n < t ? -1 : 0;
|
|
19
19
|
}
|
|
20
20
|
function Fh(n, t) {
|
|
@@ -122,15 +122,15 @@ function _r(n, t) {
|
|
|
122
122
|
function Wt() {
|
|
123
123
|
return [1 / 0, 1 / 0, -1 / 0, -1 / 0];
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function Ue(n, t, e, i, s) {
|
|
126
126
|
return s ? (s[0] = n, s[1] = t, s[2] = e, s[3] = i, s) : [n, t, e, i];
|
|
127
127
|
}
|
|
128
128
|
function xn(n) {
|
|
129
|
-
return
|
|
129
|
+
return Ue(1 / 0, 1 / 0, -1 / 0, -1 / 0, n);
|
|
130
130
|
}
|
|
131
131
|
function $i(n, t) {
|
|
132
132
|
const e = n[0], i = n[1];
|
|
133
|
-
return
|
|
133
|
+
return Ue(e, i, e, i, t);
|
|
134
134
|
}
|
|
135
135
|
function Gr(n, t, e, i, s) {
|
|
136
136
|
const r = xn(s);
|
|
@@ -155,11 +155,11 @@ function Dh(n, t, e) {
|
|
|
155
155
|
}
|
|
156
156
|
function Ja(n, t) {
|
|
157
157
|
let e;
|
|
158
|
-
return e = t(zr(n)), e || (e = t(Wr(n)), e) || (e = t(
|
|
158
|
+
return e = t(zr(n)), e || (e = t(Wr(n)), e) || (e = t(jr(n)), e) || (e = t(cs(n)), e) ? e : !1;
|
|
159
159
|
}
|
|
160
160
|
function Oh(n) {
|
|
161
161
|
let t = 0;
|
|
162
|
-
return Ti(n) || (t =
|
|
162
|
+
return Ti(n) || (t = Z(n) * dt(n)), t;
|
|
163
163
|
}
|
|
164
164
|
function zr(n) {
|
|
165
165
|
return [n[0], n[1]];
|
|
@@ -177,7 +177,7 @@ function Hn(n, t, e, i, s) {
|
|
|
177
177
|
e,
|
|
178
178
|
i
|
|
179
179
|
);
|
|
180
|
-
return
|
|
180
|
+
return Ue(
|
|
181
181
|
Math.min(r, a, h, u),
|
|
182
182
|
Math.min(o, l, c, d),
|
|
183
183
|
Math.max(r, a, h, u),
|
|
@@ -203,17 +203,17 @@ function kh(n, t, e, i) {
|
|
|
203
203
|
function dt(n) {
|
|
204
204
|
return n[3] - n[1];
|
|
205
205
|
}
|
|
206
|
-
function
|
|
206
|
+
function Vr(n, t, e) {
|
|
207
207
|
const i = e || Wt();
|
|
208
208
|
return mt(n, t) ? (n[0] > t[0] ? i[0] = n[0] : i[0] = t[0], n[1] > t[1] ? i[1] = n[1] : i[1] = t[1], n[2] < t[2] ? i[2] = n[2] : i[2] = t[2], n[3] < t[3] ? i[3] = n[3] : i[3] = t[3]) : xn(i), i;
|
|
209
209
|
}
|
|
210
210
|
function cs(n) {
|
|
211
211
|
return [n[0], n[3]];
|
|
212
212
|
}
|
|
213
|
-
function
|
|
213
|
+
function jr(n) {
|
|
214
214
|
return [n[2], n[3]];
|
|
215
215
|
}
|
|
216
|
-
function
|
|
216
|
+
function Z(n) {
|
|
217
217
|
return n[2] - n[0];
|
|
218
218
|
}
|
|
219
219
|
function mt(n, t) {
|
|
@@ -240,7 +240,7 @@ function Gh(n, t, e) {
|
|
|
240
240
|
function Qa(n, t) {
|
|
241
241
|
const e = t.getExtent(), i = Yt(n);
|
|
242
242
|
if (t.canWrapX() && (i[0] < e[0] || i[0] >= e[2])) {
|
|
243
|
-
const s =
|
|
243
|
+
const s = Z(e), o = Math.floor(
|
|
244
244
|
(i[0] - e[0]) / s
|
|
245
245
|
) * s;
|
|
246
246
|
n[0] -= o, n[2] -= o;
|
|
@@ -253,8 +253,8 @@ function zh(n, t, e) {
|
|
|
253
253
|
if (!isFinite(n[0]) || !isFinite(n[2]))
|
|
254
254
|
return [[i[0], n[1], i[2], n[3]]];
|
|
255
255
|
Qa(n, t);
|
|
256
|
-
const s =
|
|
257
|
-
if (
|
|
256
|
+
const s = Z(i);
|
|
257
|
+
if (Z(n) > s)
|
|
258
258
|
return [[i[0], n[1], i[2], n[3]]];
|
|
259
259
|
if (n[0] < i[0])
|
|
260
260
|
return [
|
|
@@ -284,7 +284,7 @@ function _e(n, t, e, i) {
|
|
|
284
284
|
const s = e - n, r = i - t;
|
|
285
285
|
return s * s + r * r;
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function Vh(n) {
|
|
288
288
|
const t = n.length;
|
|
289
289
|
for (let i = 0; i < t; i++) {
|
|
290
290
|
let s = i, r = Math.abs(n[i][i]);
|
|
@@ -336,10 +336,10 @@ function mr(n, t, e) {
|
|
|
336
336
|
const i = e - t;
|
|
337
337
|
return ((n - t) % i + i) % i + t;
|
|
338
338
|
}
|
|
339
|
-
function
|
|
339
|
+
function jh(n, t) {
|
|
340
340
|
return n[0] += +t[0], n[1] += +t[1], n;
|
|
341
341
|
}
|
|
342
|
-
function
|
|
342
|
+
function Xh(n, t) {
|
|
343
343
|
const e = t.getRadius(), i = t.getCenter(), s = i[0], r = i[1], o = n[0], a = n[1];
|
|
344
344
|
let l = o - s;
|
|
345
345
|
const h = a - r;
|
|
@@ -347,7 +347,7 @@ function Vh(n, t) {
|
|
|
347
347
|
const c = Math.sqrt(l * l + h * h), u = s + e * l / c, d = r + e * h / c;
|
|
348
348
|
return [u, d];
|
|
349
349
|
}
|
|
350
|
-
function
|
|
350
|
+
function Xr(n, t) {
|
|
351
351
|
const e = n[0], i = n[1], s = t[0], r = t[1], o = s[0], a = s[1], l = r[0], h = r[1], c = l - o, u = h - a, d = c === 0 && u === 0 ? 0 : (c * (e - o) + u * (i - a)) / (c * c + u * u || 0);
|
|
352
352
|
let f, g;
|
|
353
353
|
return d <= 0 ? (f = o, g = a) : d >= 1 ? (f = l, g = h) : (f = o + d * c, g = a + d * u), [f, g];
|
|
@@ -376,11 +376,11 @@ function qn(n, t) {
|
|
|
376
376
|
return Math.sqrt(me(n, t));
|
|
377
377
|
}
|
|
378
378
|
function Yh(n, t) {
|
|
379
|
-
return me(n,
|
|
379
|
+
return me(n, Xr(n, t));
|
|
380
380
|
}
|
|
381
381
|
function tl(n, t) {
|
|
382
382
|
if (t.canWrapX()) {
|
|
383
|
-
const e =
|
|
383
|
+
const e = Z(t.getExtent()), i = Kh(n, t, e);
|
|
384
384
|
i && (n[0] -= i * e);
|
|
385
385
|
}
|
|
386
386
|
return n;
|
|
@@ -388,13 +388,13 @@ function tl(n, t) {
|
|
|
388
388
|
function Kh(n, t, e) {
|
|
389
389
|
const i = t.getExtent();
|
|
390
390
|
let s = 0;
|
|
391
|
-
return t.canWrapX() && (n[0] < i[0] || n[0] > i[2]) && (e = e ||
|
|
391
|
+
return t.canWrapX() && (n[0] < i[0] || n[0] > i[2]) && (e = e || Z(i), s = Math.floor(
|
|
392
392
|
(n[0] - i[0]) / e
|
|
393
393
|
)), s;
|
|
394
394
|
}
|
|
395
|
-
const He = typeof navigator < "u" && typeof navigator.userAgent < "u" ? navigator.userAgent.toLowerCase() : "",
|
|
396
|
-
|
|
397
|
-
const
|
|
395
|
+
const He = typeof navigator < "u" && typeof navigator.userAgent < "u" ? navigator.userAgent.toLowerCase() : "", Zh = He.includes("safari") && !He.includes("chrom");
|
|
396
|
+
Zh && (He.includes("version/15.4") || /cpu (os|iphone os) 15_4 like mac os x/.test(He));
|
|
397
|
+
const Uh = He.includes("webkit") && !He.includes("edge"), Yr = He.includes("macintosh"), Hh = typeof devicePixelRatio < "u" ? devicePixelRatio : 1, Kr = typeof WorkerGlobalScope < "u" && typeof OffscreenCanvas < "u" && self instanceof WorkerGlobalScope, el = typeof Image < "u" && Image.prototype.decode, il = typeof createImageBitmap == "function", nl = (function() {
|
|
398
398
|
let n = !1;
|
|
399
399
|
try {
|
|
400
400
|
const t = Object.defineProperty({}, "passive", {
|
|
@@ -417,7 +417,7 @@ let ks;
|
|
|
417
417
|
function $n() {
|
|
418
418
|
return ks || (ks = ft(1, 1)), ks;
|
|
419
419
|
}
|
|
420
|
-
function
|
|
420
|
+
function Zr(n) {
|
|
421
421
|
const t = n.canvas;
|
|
422
422
|
t.width = 1, t.height = 1, n.clearRect(0, 0, 1, 1);
|
|
423
423
|
}
|
|
@@ -431,7 +431,7 @@ function $h(n) {
|
|
|
431
431
|
const e = getComputedStyle(n);
|
|
432
432
|
return t += parseInt(e.marginTop, 10) + parseInt(e.marginBottom, 10), t;
|
|
433
433
|
}
|
|
434
|
-
function
|
|
434
|
+
function Zo(n, t) {
|
|
435
435
|
const e = t.parentNode;
|
|
436
436
|
e && e.replaceChild(n, t);
|
|
437
437
|
}
|
|
@@ -620,7 +620,7 @@ class ii extends ds {
|
|
|
620
620
|
});
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
|
-
const
|
|
623
|
+
const Uo = [
|
|
624
624
|
new ii("EPSG:3857"),
|
|
625
625
|
new ii("EPSG:102100"),
|
|
626
626
|
new ii("EPSG:102113"),
|
|
@@ -697,10 +697,10 @@ function rn(n, t, e) {
|
|
|
697
697
|
function Ns(n, t) {
|
|
698
698
|
return n in mi && t in mi[n] ? mi[n][t] : null;
|
|
699
699
|
}
|
|
700
|
-
const Jn = 0.9996, zt = 669438e-8, fs = zt * zt, gs = fs * zt,
|
|
700
|
+
const Jn = 0.9996, zt = 669438e-8, fs = zt * zt, gs = fs * zt, je = zt / (1 - zt), $o = Math.sqrt(1 - zt), xi = (1 - $o) / (1 + $o), al = xi * xi, Ur = al * xi, Hr = Ur * xi, ll = Hr * xi, hl = 1 - zt / 4 - 3 * fs / 64 - 5 * gs / 256, ac = 3 * zt / 8 + 3 * fs / 32 + 45 * gs / 1024, lc = 15 * fs / 256 + 45 * gs / 1024, hc = 35 * gs / 3072, cc = 3 / 2 * xi - 27 / 32 * Ur + 269 / 512 * ll, uc = 21 / 16 * al - 55 / 32 * Hr, dc = 151 / 96 * Ur - 417 / 128 * ll, fc = 1097 / 512 * Hr, Qn = 6378137;
|
|
701
701
|
function gc(n, t, e) {
|
|
702
|
-
const i = n - 5e5, o = (e.north ? t : t - 1e7) / Jn / (Qn * hl), a = o + cc * Math.sin(2 * o) + uc * Math.sin(4 * o) + dc * Math.sin(6 * o) + fc * Math.sin(8 * o), l = Math.sin(a), h = l * l, c = Math.cos(a), u = l / c, d = u * u, f = d * d, g = 1 - zt * h, m = Math.sqrt(1 - zt * h), _ = Qn / m, y = (1 - zt) / g, p =
|
|
703
|
-
let k = (x - S / 6 * (1 + 2 * d + p) + I / 120 * (5 - 2 * p + 28 * d - 3 * C + 8 *
|
|
702
|
+
const i = n - 5e5, o = (e.north ? t : t - 1e7) / Jn / (Qn * hl), a = o + cc * Math.sin(2 * o) + uc * Math.sin(4 * o) + dc * Math.sin(6 * o) + fc * Math.sin(8 * o), l = Math.sin(a), h = l * l, c = Math.cos(a), u = l / c, d = u * u, f = d * d, g = 1 - zt * h, m = Math.sqrt(1 - zt * h), _ = Qn / m, y = (1 - zt) / g, p = je * c ** 2, C = p * p, x = i / (_ * Jn), E = x * x, S = E * x, T = S * x, I = T * x, R = I * x, P = a - u / y * (E / 2 - T / 24 * (5 + 3 * d + 10 * p - 4 * C - 9 * je)) + R / 720 * (61 + 90 * d + 298 * p + 45 * f - 252 * je - 3 * C);
|
|
703
|
+
let k = (x - S / 6 * (1 + 2 * d + p) + I / 120 * (5 - 2 * p + 28 * d - 3 * C + 8 * je + 24 * f)) / c;
|
|
704
704
|
return k = mr(
|
|
705
705
|
k + Fe(cl(e.number)),
|
|
706
706
|
-Math.PI,
|
|
@@ -710,8 +710,8 @@ function gc(n, t, e) {
|
|
|
710
710
|
const Jo = -80, Qo = 84, _c = -180, mc = 180;
|
|
711
711
|
function yc(n, t, e) {
|
|
712
712
|
n = mr(n, _c, mc), t < Jo ? t = Jo : t > Qo && (t = Qo);
|
|
713
|
-
const i = Fe(t), s = Math.sin(i), r = Math.cos(i), o = s / r, a = o * o, l = a * a, h = Fe(n), c = cl(e.number), u = Fe(c), d = Qn / Math.sqrt(1 - zt * s ** 2), f =
|
|
714
|
-
let S = Jn * (x + d * o * (m / 2 + y / 24 * (5 - a + 9 * f + 4 * f ** 2) + C / 720 * (61 - 58 * a + l + 600 * f - 330 *
|
|
713
|
+
const i = Fe(t), s = Math.sin(i), r = Math.cos(i), o = s / r, a = o * o, l = a * a, h = Fe(n), c = cl(e.number), u = Fe(c), d = Qn / Math.sqrt(1 - zt * s ** 2), f = je * r ** 2, g = r * mr(h - u, -Math.PI, Math.PI), m = g * g, _ = m * g, y = _ * g, p = y * g, C = p * g, x = Qn * (hl * i - ac * Math.sin(2 * i) + lc * Math.sin(4 * i) - hc * Math.sin(6 * i)), E = Jn * d * (g + _ / 6 * (1 - a + f) + p / 120 * (5 - 18 * a + l + 72 * f - 58 * je)) + 5e5;
|
|
714
|
+
let S = Jn * (x + d * o * (m / 2 + y / 24 * (5 - a + 9 * f + 4 * f ** 2) + C / 720 * (61 - 58 * a + l + 600 * f - 330 * je)));
|
|
715
715
|
return e.north || (S += 1e7), [E, S];
|
|
716
716
|
}
|
|
717
717
|
function cl(n) {
|
|
@@ -948,9 +948,9 @@ function Me(n, t) {
|
|
|
948
948
|
return n;
|
|
949
949
|
}
|
|
950
950
|
function Pc() {
|
|
951
|
-
na(
|
|
951
|
+
na(Uo), na(qo), vc(
|
|
952
952
|
qo,
|
|
953
|
-
|
|
953
|
+
Uo,
|
|
954
954
|
ec,
|
|
955
955
|
ic
|
|
956
956
|
);
|
|
@@ -1061,20 +1061,20 @@ function kc(n) {
|
|
|
1061
1061
|
const t = n.slice();
|
|
1062
1062
|
return t[3] = 1, t;
|
|
1063
1063
|
}
|
|
1064
|
-
function
|
|
1064
|
+
function Vs(n) {
|
|
1065
1065
|
return n > 31308e-7 ? Math.pow(n, 1 / 2.4) * 269.025 - 14.025 : n * 3294.6;
|
|
1066
1066
|
}
|
|
1067
|
-
function
|
|
1067
|
+
function js(n) {
|
|
1068
1068
|
return n > 0.2068965 ? Math.pow(n, 3) : (n - 4 / 29) * (108 / 841);
|
|
1069
1069
|
}
|
|
1070
|
-
function
|
|
1070
|
+
function Xs(n) {
|
|
1071
1071
|
return n > 10.314724 ? Math.pow((n + 14.025) / 269.025, 2.4) : n / 3294.6;
|
|
1072
1072
|
}
|
|
1073
1073
|
function Bs(n) {
|
|
1074
1074
|
return n > 88564e-7 ? Math.pow(n, 1 / 3) : n / (108 / 841) + 4 / 29;
|
|
1075
1075
|
}
|
|
1076
1076
|
function sa(n) {
|
|
1077
|
-
const t =
|
|
1077
|
+
const t = Xs(n[0]), e = Xs(n[1]), i = Xs(n[2]), s = Bs(t * 0.222488403 + e * 0.716873169 + i * 0.06060791), r = 500 * (Bs(t * 0.452247074 + e * 0.399439023 + i * 0.148375274) - s), o = 200 * (s - Bs(t * 0.016863605 + e * 0.117638439 + i * 0.865350722)), a = Math.atan2(o, r) * (180 / Math.PI);
|
|
1078
1078
|
return [
|
|
1079
1079
|
116 * s - 16,
|
|
1080
1080
|
Math.sqrt(r * r + o * o),
|
|
@@ -1083,7 +1083,7 @@ function sa(n) {
|
|
|
1083
1083
|
];
|
|
1084
1084
|
}
|
|
1085
1085
|
function Nc(n) {
|
|
1086
|
-
const t = (n[0] + 16) / 116, e = n[1], i = n[2] * Math.PI / 180, s =
|
|
1086
|
+
const t = (n[0] + 16) / 116, e = n[1], i = n[2] * Math.PI / 180, s = js(t), r = js(t + e / 500 * Math.cos(i)), o = js(t - e / 200 * Math.sin(i)), a = Vs(r * 3.021973625 - s * 1.617392459 - o * 0.404875592), l = Vs(r * -0.943766287 + s * 1.916279586 + o * 0.027607165), h = Vs(r * 0.069407491 - s * 0.22898585 + o * 1.159737864);
|
|
1087
1087
|
return [
|
|
1088
1088
|
st(a + 0.5 | 0, 0, 255),
|
|
1089
1089
|
st(l + 0.5 | 0, 0, 255),
|
|
@@ -1938,7 +1938,7 @@ class Cn extends ms {
|
|
|
1938
1938
|
e.ol_key
|
|
1939
1939
|
);
|
|
1940
1940
|
if (i)
|
|
1941
|
-
|
|
1941
|
+
Vc(i);
|
|
1942
1942
|
else if (Array.isArray(t))
|
|
1943
1943
|
for (let s = 0, r = t.length; s < r; ++s)
|
|
1944
1944
|
this.removeEventListener(t[s], e);
|
|
@@ -1949,7 +1949,7 @@ class Cn extends ms {
|
|
|
1949
1949
|
Cn.prototype.on;
|
|
1950
1950
|
Cn.prototype.once;
|
|
1951
1951
|
Cn.prototype.un;
|
|
1952
|
-
function
|
|
1952
|
+
function Vc(n) {
|
|
1953
1953
|
if (Array.isArray(n))
|
|
1954
1954
|
for (let t = 0, e = n.length; t < e; ++t)
|
|
1955
1955
|
$(n[t]);
|
|
@@ -1962,9 +1962,9 @@ function jc(n) {
|
|
|
1962
1962
|
function O() {
|
|
1963
1963
|
throw new Error("Unimplemented abstract method.");
|
|
1964
1964
|
}
|
|
1965
|
-
let
|
|
1965
|
+
let jc = 0;
|
|
1966
1966
|
function B(n) {
|
|
1967
|
-
return n.ol_uid || (n.ol_uid = String(++
|
|
1967
|
+
return n.ol_uid || (n.ol_uid = String(++jc));
|
|
1968
1968
|
}
|
|
1969
1969
|
class oa extends Lt {
|
|
1970
1970
|
/**
|
|
@@ -2092,7 +2092,7 @@ class Ht extends Cn {
|
|
|
2092
2092
|
}
|
|
2093
2093
|
}
|
|
2094
2094
|
}
|
|
2095
|
-
const Dn = "ol-hidden",
|
|
2095
|
+
const Dn = "ol-hidden", Xc = "ol-selectable", ys = "ol-unselectable", ro = "ol-control", aa = "ol-collapsed", Bc = new RegExp(
|
|
2096
2096
|
[
|
|
2097
2097
|
"^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)",
|
|
2098
2098
|
"(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)",
|
|
@@ -2132,8 +2132,8 @@ const Dn = "ol-hidden", Vc = "ol-selectable", ys = "ol-unselectable", ro = "ol-c
|
|
|
2132
2132
|
r !== void 0 && (e[la[i]] = typeof r == "string" ? r.trim() : r);
|
|
2133
2133
|
}
|
|
2134
2134
|
return isNaN(Number(e.weight)) && e.weight in wr && (e.weight = wr[e.weight]), e.families = e.family.split(/,\s?/).map((i) => i.trim().replace(/^['"]|['"]$/g, "")), e;
|
|
2135
|
-
}, El = "10px sans-serif", Tt = "#000", wi = "round", ye = [], pe = 0, Si = "round", hn = 10, cn = "#000", un = "center", ts = "middle",
|
|
2136
|
-
let
|
|
2135
|
+
}, El = "10px sans-serif", Tt = "#000", wi = "round", ye = [], pe = 0, Si = "round", hn = 10, cn = "#000", un = "center", ts = "middle", Xe = [0, 0, 0, 0], dn = 1, li = new Ht();
|
|
2136
|
+
let Vi = null, ha;
|
|
2137
2137
|
const Ir = {}, Yc = /* @__PURE__ */ new Set([
|
|
2138
2138
|
"serif",
|
|
2139
2139
|
"sans-serif",
|
|
@@ -2152,7 +2152,7 @@ const Ir = {}, Yc = /* @__PURE__ */ new Set([
|
|
|
2152
2152
|
function Kc(n, t, e) {
|
|
2153
2153
|
return `${n} ${t} 16px "${e}"`;
|
|
2154
2154
|
}
|
|
2155
|
-
const
|
|
2155
|
+
const Zc = /* @__PURE__ */ (function() {
|
|
2156
2156
|
let t, e;
|
|
2157
2157
|
async function i(r) {
|
|
2158
2158
|
await e.ready;
|
|
@@ -2199,7 +2199,7 @@ const Uc = /* @__PURE__ */ (function() {
|
|
|
2199
2199
|
}
|
|
2200
2200
|
l && (clearTimeout(t), t = setTimeout(s, 100));
|
|
2201
2201
|
};
|
|
2202
|
-
})(),
|
|
2202
|
+
})(), Uc = /* @__PURE__ */ (function() {
|
|
2203
2203
|
let n;
|
|
2204
2204
|
return function(t) {
|
|
2205
2205
|
let e = Ir[t];
|
|
@@ -2215,7 +2215,7 @@ const Uc = /* @__PURE__ */ (function() {
|
|
|
2215
2215
|
};
|
|
2216
2216
|
})();
|
|
2217
2217
|
function Cl(n, t) {
|
|
2218
|
-
return
|
|
2218
|
+
return Vi || (Vi = ft(1, 1)), n != ha && (Vi.font = n, ha = Vi.font), Vi.measureText(t);
|
|
2219
2219
|
}
|
|
2220
2220
|
function wl(n, t) {
|
|
2221
2221
|
return Cl(n, t).width;
|
|
@@ -2239,7 +2239,7 @@ function Hc(n, t) {
|
|
|
2239
2239
|
}
|
|
2240
2240
|
const d = t[h + 1] || n.font, f = wl(d, u);
|
|
2241
2241
|
e.push(f), o += f;
|
|
2242
|
-
const g =
|
|
2242
|
+
const g = Uc(d);
|
|
2243
2243
|
i.push(g), l = Math.max(l, g);
|
|
2244
2244
|
}
|
|
2245
2245
|
return { width: r, height: a, widths: e, heights: i, lineWidths: s };
|
|
@@ -3381,7 +3381,7 @@ class su extends wn {
|
|
|
3381
3381
|
const g = o.backgroundFill ? this.createFill(this.fillStyleToState(o.backgroundFill)) : null, m = o.backgroundStroke ? this.createStroke(this.strokeStyleToState(o.backgroundStroke)) : null;
|
|
3382
3382
|
this.beginGeometry(t, e, i);
|
|
3383
3383
|
let _ = o.padding;
|
|
3384
|
-
if (_ !=
|
|
3384
|
+
if (_ != Xe && (o.scale[0] < 0 || o.scale[1] < 0)) {
|
|
3385
3385
|
let x = o.padding[0], E = o.padding[1], S = o.padding[2], T = o.padding[3];
|
|
3386
3386
|
o.scale[0] < 0 && (E = -E, T = -T), o.scale[1] < 0 && (x = -x, S = -S), _ = [x, E, S, T];
|
|
3387
3387
|
}
|
|
@@ -3403,7 +3403,7 @@ class su extends wn {
|
|
|
3403
3403
|
NaN,
|
|
3404
3404
|
this.declutterMode_,
|
|
3405
3405
|
this.declutterImageWithText_,
|
|
3406
|
-
_ ==
|
|
3406
|
+
_ == Xe ? Xe : _.map(function(x) {
|
|
3407
3407
|
return x * y;
|
|
3408
3408
|
}),
|
|
3409
3409
|
g,
|
|
@@ -3547,9 +3547,9 @@ class su extends wn {
|
|
|
3547
3547
|
}
|
|
3548
3548
|
i = this.textState_;
|
|
3549
3549
|
const l = t.getFont() || El;
|
|
3550
|
-
|
|
3550
|
+
Zc(l);
|
|
3551
3551
|
const h = t.getScaleArray();
|
|
3552
|
-
i.overflow = t.getOverflow(), i.font = l, i.maxAngle = t.getMaxAngle(), i.placement = t.getPlacement(), i.textAlign = t.getTextAlign(), i.repeat = t.getRepeat(), i.justify = t.getJustify(), i.textBaseline = t.getTextBaseline() || ts, i.backgroundFill = t.getBackgroundFill(), i.backgroundStroke = t.getBackgroundStroke(), i.padding = t.getPadding() ||
|
|
3552
|
+
i.overflow = t.getOverflow(), i.font = l, i.maxAngle = t.getMaxAngle(), i.placement = t.getPlacement(), i.textAlign = t.getTextAlign(), i.repeat = t.getRepeat(), i.justify = t.getJustify(), i.textBaseline = t.getTextBaseline() || ts, i.backgroundFill = t.getBackgroundFill(), i.backgroundStroke = t.getBackgroundStroke(), i.padding = t.getPadding() || Xe, i.scale = h === void 0 ? [1, 1] : h;
|
|
3553
3553
|
const c = t.getOffsetX(), u = t.getOffsetY(), d = t.getRotateWithView(), f = t.getKeepUpright(), g = t.getRotation();
|
|
3554
3554
|
this.text_ = t.getText() || "", this.textOffsetX_ = c === void 0 ? 0 : c, this.textOffsetY_ = u === void 0 ? 0 : u, this.textRotateWithView_ = d === void 0 ? !1 : d, this.textKeepUpright_ = f === void 0 ? !0 : f, this.textRotation_ = g === void 0 ? 0 : g, this.strokeKey_ = r ? (typeof r.strokeStyle == "string" ? r.strokeStyle : B(r.strokeStyle)) + r.lineCap + r.lineDashOffset + "|" + r.lineWidth + r.lineJoin + r.miterLimit + "[" + r.lineDash.join() + "]" : "", this.textKey_ = i.font + i.scale + (i.textAlign || "?") + (i.repeat || "?") + (i.justify || "?") + (i.textBaseline || "?"), this.fillKey_ = s && s.fillStyle ? typeof s.fillStyle == "string" ? s.fillStyle : "|" + B(s.fillStyle) : "";
|
|
3555
3555
|
}
|
|
@@ -3727,35 +3727,35 @@ function gu(n, t, e, i, s, r, o, a, l, h, c, u, d = !0) {
|
|
|
3727
3727
|
ao(z, 0, 4, 2, u, z, z), N = z[0] > z[2];
|
|
3728
3728
|
} else
|
|
3729
3729
|
N = E > P;
|
|
3730
|
-
const
|
|
3730
|
+
const V = Math.PI, F = [], q = T + i === t;
|
|
3731
3731
|
t = T, y = 0, p = I, f = n[t], g = n[t + 1];
|
|
3732
3732
|
let b;
|
|
3733
3733
|
if (q) {
|
|
3734
|
-
C(), b = Math.atan2(g - _, f - m), N && (b += b > 0 ? -
|
|
3735
|
-
const z = (P + E) / 2,
|
|
3736
|
-
return F[0] = [z,
|
|
3734
|
+
C(), b = Math.atan2(g - _, f - m), N && (b += b > 0 ? -V : V);
|
|
3735
|
+
const z = (P + E) / 2, j = (k + S) / 2;
|
|
3736
|
+
return F[0] = [z, j, (R - r) / 2, b, s], F;
|
|
3737
3737
|
}
|
|
3738
3738
|
s = s.replace(/\n/g, " ");
|
|
3739
|
-
for (let z = 0,
|
|
3739
|
+
for (let z = 0, j = s.length; z < j; ) {
|
|
3740
3740
|
C();
|
|
3741
3741
|
let Q = Math.atan2(g - _, f - m);
|
|
3742
|
-
if (N && (Q += Q > 0 ? -
|
|
3742
|
+
if (N && (Q += Q > 0 ? -V : V), b !== void 0) {
|
|
3743
3743
|
let pt = Q - b;
|
|
3744
|
-
if (pt += pt >
|
|
3744
|
+
if (pt += pt > V ? -2 * V : pt < -V ? 2 * V : 0, Math.abs(pt) > o)
|
|
3745
3745
|
return null;
|
|
3746
3746
|
}
|
|
3747
3747
|
b = Q;
|
|
3748
3748
|
const J = z;
|
|
3749
3749
|
let tt = 0;
|
|
3750
|
-
for (; z <
|
|
3751
|
-
const pt = N ?
|
|
3750
|
+
for (; z < j; ++z) {
|
|
3751
|
+
const pt = N ? j - z - 1 : z, qt = a * l(h, s[pt], c);
|
|
3752
3752
|
if (t + i < e && p + y < r + tt + qt / 2)
|
|
3753
3753
|
break;
|
|
3754
3754
|
tt += qt;
|
|
3755
3755
|
}
|
|
3756
3756
|
if (z === J)
|
|
3757
3757
|
continue;
|
|
3758
|
-
const v = N ? s.substring(
|
|
3758
|
+
const v = N ? s.substring(j - J, j - z) : s.substring(J, z);
|
|
3759
3759
|
x = y === 0 ? 0 : (r + tt / 2 - p) / y;
|
|
3760
3760
|
const se = At(m, f, x), ke = At(_, g, x);
|
|
3761
3761
|
F.push([se, ke, tt / 2, Q, v]), r += tt;
|
|
@@ -3907,12 +3907,12 @@ class yu {
|
|
|
3907
3907
|
const I = 0.5 - u;
|
|
3908
3908
|
let R = u * C + I * d;
|
|
3909
3909
|
const P = [], k = [];
|
|
3910
|
-
let N = 0,
|
|
3911
|
-
for (let z = 0,
|
|
3910
|
+
let N = 0, V = 0, F = 0, q = 0, b;
|
|
3911
|
+
for (let z = 0, j = f.length; z < j; z += 2) {
|
|
3912
3912
|
const Q = f[z];
|
|
3913
3913
|
if (Q === `
|
|
3914
3914
|
`) {
|
|
3915
|
-
|
|
3915
|
+
V += N, N = 0, R = u * C + I * d, ++q;
|
|
3916
3916
|
continue;
|
|
3917
3917
|
}
|
|
3918
3918
|
const J = f[z + 1] || l.font;
|
|
@@ -3920,7 +3920,7 @@ class yu {
|
|
|
3920
3920
|
const tt = [
|
|
3921
3921
|
Q,
|
|
3922
3922
|
R + I * _[F] + u * (_[F] - p[q]),
|
|
3923
|
-
0.5 * (d + N) +
|
|
3923
|
+
0.5 * (d + N) + V
|
|
3924
3924
|
];
|
|
3925
3925
|
R += _[F], s && P.push("strokeText", tt), i && k.push("fillText", tt), ++F;
|
|
3926
3926
|
}
|
|
@@ -3979,13 +3979,13 @@ class yu {
|
|
|
3979
3979
|
u,
|
|
3980
3980
|
-i,
|
|
3981
3981
|
-s
|
|
3982
|
-
), gt(R, Ie), gt(R, le), gt(R, he), gt(R, Re),
|
|
3982
|
+
), gt(R, Ie), gt(R, le), gt(R, he), gt(R, Re), Ue(
|
|
3983
3983
|
Math.min(Ie[0], le[0], he[0], Re[0]),
|
|
3984
3984
|
Math.min(Ie[1], le[1], he[1], Re[1]),
|
|
3985
3985
|
Math.max(Ie[0], le[0], he[0], Re[0]),
|
|
3986
3986
|
Math.max(Ie[1], le[1], he[1], Re[1]),
|
|
3987
3987
|
ni
|
|
3988
|
-
)) :
|
|
3988
|
+
)) : Ue(
|
|
3989
3989
|
Math.min(T, T + E),
|
|
3990
3990
|
Math.min(I, I + S),
|
|
3991
3991
|
Math.max(T, T + E),
|
|
@@ -4122,7 +4122,7 @@ class yu {
|
|
|
4122
4122
|
let u = 0;
|
|
4123
4123
|
const d = s.length;
|
|
4124
4124
|
let f = 0, g, m, _, y, p, C, x, E, S, T, I, R, P, k = 0, N = 0;
|
|
4125
|
-
const
|
|
4125
|
+
const V = this.coordinateCache_, F = this.viewRotation_, q = Math.round(Math.atan2(-i[1], i[0]) * 1e12) / 1e12, b = (
|
|
4126
4126
|
/** @type {import("../../render.js").State} */
|
|
4127
4127
|
{
|
|
4128
4128
|
context: t,
|
|
@@ -4131,7 +4131,7 @@ class yu {
|
|
|
4131
4131
|
rotation: F
|
|
4132
4132
|
}
|
|
4133
4133
|
), z = this.instructions != s || this.overlaps ? 0 : 200;
|
|
4134
|
-
let
|
|
4134
|
+
let j, Q, J, tt;
|
|
4135
4135
|
for (; u < d; ) {
|
|
4136
4136
|
const v = s[u];
|
|
4137
4137
|
switch (
|
|
@@ -4139,8 +4139,8 @@ class yu {
|
|
|
4139
4139
|
v[0]
|
|
4140
4140
|
) {
|
|
4141
4141
|
case L.BEGIN_GEOMETRY:
|
|
4142
|
-
|
|
4143
|
-
v[1], tt = v[3],
|
|
4142
|
+
j = /** @type {import("../../Feature.js").FeatureLike} */
|
|
4143
|
+
v[1], tt = v[3], j.getGeometry() ? a !== void 0 && !mt(a, tt.getExtent()) ? u = /** @type {number} */
|
|
4144
4144
|
v[2] + 1 : ++u : u = /** @type {number} */
|
|
4145
4145
|
v[2], h && (h.zIndex = v[4]);
|
|
4146
4146
|
break;
|
|
@@ -4150,7 +4150,7 @@ class yu {
|
|
|
4150
4150
|
case L.CIRCLE:
|
|
4151
4151
|
f = /** @type {number} */
|
|
4152
4152
|
v[1];
|
|
4153
|
-
const ke = c[f], pt = c[f + 1], qt = c[f + 2],
|
|
4153
|
+
const ke = c[f], pt = c[f + 1], qt = c[f + 2], Vt = c[f + 3], Se = qt - ke, bi = Vt - pt, $t = Math.sqrt(Se * Se + bi * bi);
|
|
4154
4154
|
t.moveTo(ke + $t, pt), t.arc(ke, pt, $t, 0, 2 * Math.PI, !0), ++u;
|
|
4155
4155
|
break;
|
|
4156
4156
|
case L.CLOSE_PATH:
|
|
@@ -4163,8 +4163,8 @@ class yu {
|
|
|
4163
4163
|
/** @type {import("../../geom/SimpleGeometry.js").default} */
|
|
4164
4164
|
v[3]
|
|
4165
4165
|
), ph = v[4], ko = v[5];
|
|
4166
|
-
b.geometry = yh, b.feature =
|
|
4167
|
-
const Di =
|
|
4166
|
+
b.geometry = yh, b.feature = j, u in V || (V[u] = []);
|
|
4167
|
+
const Di = V[u];
|
|
4168
4168
|
ko ? ko(c, f, g, 2, Di) : (Di[0] = c[f], Di[1] = c[f + 1], Di.length = 2), h && (h.zIndex = v[6]), ph(Di, b), ++u;
|
|
4169
4169
|
break;
|
|
4170
4170
|
case L.DRAW_IMAGE:
|
|
@@ -4239,7 +4239,7 @@ class yu {
|
|
|
4239
4239
|
v.length > 17 ? (Fs = /** @type {Array<number>} */
|
|
4240
4240
|
v[16], Mn = /** @type {Array<*>} */
|
|
4241
4241
|
v[17], Ln = /** @type {Array<*>} */
|
|
4242
|
-
v[18]) : (Fs =
|
|
4242
|
+
v[18]) : (Fs = Xe, Mn = null, Ln = null), No && q ? Ls += F : !No && !q && (Ls -= F);
|
|
4243
4243
|
let Sh = 0;
|
|
4244
4244
|
for (; f < g; f += 2) {
|
|
4245
4245
|
if (As && As[Sh++] < Pn / this.pixelRatio)
|
|
@@ -4260,7 +4260,7 @@ class yu {
|
|
|
4260
4260
|
r,
|
|
4261
4261
|
Fs,
|
|
4262
4262
|
!!Mn || !!Ln,
|
|
4263
|
-
|
|
4263
|
+
j
|
|
4264
4264
|
), Ne = [
|
|
4265
4265
|
t,
|
|
4266
4266
|
e,
|
|
@@ -4314,7 +4314,7 @@ class yu {
|
|
|
4314
4314
|
), Wo = (
|
|
4315
4315
|
/** @type {number} */
|
|
4316
4316
|
v[7]
|
|
4317
|
-
),
|
|
4317
|
+
), Vo = (
|
|
4318
4318
|
/** @type {number} */
|
|
4319
4319
|
v[8]
|
|
4320
4320
|
);
|
|
@@ -4327,7 +4327,7 @@ class yu {
|
|
|
4327
4327
|
T = /** @type {string|Array<string>} */
|
|
4328
4328
|
v[11], Array.isArray(T) && (T = T.reduce(mu, "")), I = /** @type {string} */
|
|
4329
4329
|
v[12];
|
|
4330
|
-
const
|
|
4330
|
+
const jo = [
|
|
4331
4331
|
/** @type {number} */
|
|
4332
4332
|
v[13],
|
|
4333
4333
|
/** @type {number} */
|
|
@@ -4343,9 +4343,9 @@ class yu {
|
|
|
4343
4343
|
];
|
|
4344
4344
|
let Gi;
|
|
4345
4345
|
ki in this.widths_ ? Gi = this.widths_[ki] : (Gi = {}, this.widths_[ki] = Gi);
|
|
4346
|
-
const
|
|
4347
|
-
if (Ih || Bo <=
|
|
4348
|
-
const bt = this.textStates[I].textAlign, Ne = (
|
|
4346
|
+
const Xo = lo(c, Go, zo, 2), Bo = Math.abs(Ni[0]) * ca(ki, T, Gi);
|
|
4347
|
+
if (Ih || Bo <= Xo) {
|
|
4348
|
+
const bt = this.textStates[I].textAlign, Ne = (Xo - Bo) * Ks(T, bt), Dt = gu(
|
|
4349
4349
|
c,
|
|
4350
4350
|
Go,
|
|
4351
4351
|
zo,
|
|
@@ -4367,7 +4367,7 @@ class yu {
|
|
|
4367
4367
|
for (Ot = 0, re = Dt.length; Ot < re; ++Ot) {
|
|
4368
4368
|
St = Dt[Ot], oe = /** @type {string} */
|
|
4369
4369
|
St[4], et = this.createLabel(oe, I, "", R), m = /** @type {number} */
|
|
4370
|
-
St[2] + (Ni[0] < 0 ? -Ds : Ds), _ = bs * et.height + (0.5 - bs) * 2 * Ds * Ni[1] / Ni[0] -
|
|
4370
|
+
St[2] + (Ni[0] < 0 ? -Ds : Ds), _ = bs * et.height + (0.5 - bs) * 2 * Ds * Ni[1] / Ni[0] - Vo;
|
|
4371
4371
|
const ae = this.calculateImageOrLabelDimensions_(
|
|
4372
4372
|
et.width,
|
|
4373
4373
|
et.height,
|
|
@@ -4380,11 +4380,11 @@ class yu {
|
|
|
4380
4380
|
0,
|
|
4381
4381
|
0,
|
|
4382
4382
|
St[3],
|
|
4383
|
-
|
|
4383
|
+
jo,
|
|
4384
4384
|
!1,
|
|
4385
|
-
|
|
4385
|
+
Xe,
|
|
4386
4386
|
!1,
|
|
4387
|
-
|
|
4387
|
+
j
|
|
4388
4388
|
);
|
|
4389
4389
|
if (l && y === "declutter" && l.collides(ae.declutterBox))
|
|
4390
4390
|
break t;
|
|
@@ -4402,7 +4402,7 @@ class yu {
|
|
|
4402
4402
|
for (Ot = 0, re = Dt.length; Ot < re; ++Ot) {
|
|
4403
4403
|
St = Dt[Ot], oe = /** @type {string} */
|
|
4404
4404
|
St[4], et = this.createLabel(oe, I, P, ""), m = /** @type {number} */
|
|
4405
|
-
St[2], _ = bs * et.height -
|
|
4405
|
+
St[2], _ = bs * et.height - Vo;
|
|
4406
4406
|
const ae = this.calculateImageOrLabelDimensions_(
|
|
4407
4407
|
et.width,
|
|
4408
4408
|
et.height,
|
|
@@ -4415,11 +4415,11 @@ class yu {
|
|
|
4415
4415
|
0,
|
|
4416
4416
|
0,
|
|
4417
4417
|
St[3],
|
|
4418
|
-
|
|
4418
|
+
jo,
|
|
4419
4419
|
!1,
|
|
4420
|
-
|
|
4420
|
+
Xe,
|
|
4421
4421
|
!1,
|
|
4422
|
-
|
|
4422
|
+
j
|
|
4423
4423
|
);
|
|
4424
4424
|
if (l && y === "declutter" && l.collides(ae.declutterBox))
|
|
4425
4425
|
break t;
|
|
@@ -4442,10 +4442,10 @@ class yu {
|
|
|
4442
4442
|
break;
|
|
4443
4443
|
case L.END_GEOMETRY:
|
|
4444
4444
|
if (o !== void 0) {
|
|
4445
|
-
|
|
4445
|
+
j = /** @type {import("../../Feature.js").FeatureLike} */
|
|
4446
4446
|
v[1];
|
|
4447
4447
|
const bt = o(
|
|
4448
|
-
|
|
4448
|
+
j,
|
|
4449
4449
|
tt,
|
|
4450
4450
|
y
|
|
4451
4451
|
);
|
|
@@ -4526,14 +4526,14 @@ class yu {
|
|
|
4526
4526
|
);
|
|
4527
4527
|
}
|
|
4528
4528
|
}
|
|
4529
|
-
const
|
|
4529
|
+
const Ve = [
|
|
4530
4530
|
"Polygon",
|
|
4531
4531
|
"Circle",
|
|
4532
4532
|
"LineString",
|
|
4533
4533
|
"Image",
|
|
4534
4534
|
"Text",
|
|
4535
4535
|
"Default"
|
|
4536
|
-
], vl = ["Image", "Text"], pu =
|
|
4536
|
+
], vl = ["Image", "Text"], pu = Ve.filter(
|
|
4537
4537
|
(n) => !vl.includes(n)
|
|
4538
4538
|
);
|
|
4539
4539
|
class xu {
|
|
@@ -4643,7 +4643,7 @@ class xu {
|
|
|
4643
4643
|
for (let R = 0, P = d.length; R < P; R++)
|
|
4644
4644
|
if (I[d[R]] > 0) {
|
|
4645
4645
|
if (!o || T === "none" || f !== "Image" && f !== "Text" || o.includes(E)) {
|
|
4646
|
-
const k = (d[R] - 3) / 4, N = s - k % a,
|
|
4646
|
+
const k = (d[R] - 3) / 4, N = s - k % a, V = s - (k / a | 0), F = r(E, S, N * N + V * V);
|
|
4647
4647
|
if (F)
|
|
4648
4648
|
return F;
|
|
4649
4649
|
}
|
|
@@ -4652,12 +4652,12 @@ class xu {
|
|
|
4652
4652
|
}
|
|
4653
4653
|
}
|
|
4654
4654
|
const m = Object.keys(this.executorsByZIndex_).map(Number);
|
|
4655
|
-
m.sort(
|
|
4655
|
+
m.sort(Ze);
|
|
4656
4656
|
let _, y, p, C, x;
|
|
4657
4657
|
for (_ = m.length - 1; _ >= 0; --_) {
|
|
4658
4658
|
const E = m[_].toString();
|
|
4659
|
-
for (p = this.executorsByZIndex_[E], y =
|
|
4660
|
-
if (f =
|
|
4659
|
+
for (p = this.executorsByZIndex_[E], y = Ve.length - 1; y >= 0; --y)
|
|
4660
|
+
if (f = Ve[y], C = p[f], C !== void 0 && (x = C.executeHitDetection(
|
|
4661
4661
|
c,
|
|
4662
4662
|
l,
|
|
4663
4663
|
i,
|
|
@@ -4697,8 +4697,8 @@ class xu {
|
|
|
4697
4697
|
*/
|
|
4698
4698
|
execute(t, e, i, s, r, o, a) {
|
|
4699
4699
|
const l = Object.keys(this.executorsByZIndex_).map(Number);
|
|
4700
|
-
l.sort(a ? Fh :
|
|
4701
|
-
const h =
|
|
4700
|
+
l.sort(a ? Fh : Ze), o = o || Ve;
|
|
4701
|
+
const h = Ve.length;
|
|
4702
4702
|
for (let c = 0, u = l.length; c < u; ++c) {
|
|
4703
4703
|
const d = l[c].toString(), f = this.executorsByZIndex_[d];
|
|
4704
4704
|
for (let g = 0, m = o.length; g < m; ++g) {
|
|
@@ -4723,7 +4723,7 @@ class xu {
|
|
|
4723
4723
|
)
|
|
4724
4724
|
), x && C.restore(), p) {
|
|
4725
4725
|
p.offset();
|
|
4726
|
-
const E = l[c] * h +
|
|
4726
|
+
const E = l[c] * h + Ve.indexOf(_);
|
|
4727
4727
|
this.deferredZIndexContexts_[E] || (this.deferredZIndexContexts_[E] = []), this.deferredZIndexContexts_[E].push(p);
|
|
4728
4728
|
}
|
|
4729
4729
|
}
|
|
@@ -4738,17 +4738,17 @@ class xu {
|
|
|
4738
4738
|
return this.renderedContext_;
|
|
4739
4739
|
}
|
|
4740
4740
|
renderDeferred() {
|
|
4741
|
-
const t = this.deferredZIndexContexts_, e = Object.keys(t).map(Number).sort(
|
|
4741
|
+
const t = this.deferredZIndexContexts_, e = Object.keys(t).map(Number).sort(Ze);
|
|
4742
4742
|
for (let i = 0, s = e.length; i < s; ++i)
|
|
4743
4743
|
t[e[i]].forEach((r) => {
|
|
4744
4744
|
r.draw(this.renderedContext_), r.clear();
|
|
4745
4745
|
}), t[e[i]].length = 0;
|
|
4746
4746
|
}
|
|
4747
4747
|
}
|
|
4748
|
-
const
|
|
4748
|
+
const Zs = {};
|
|
4749
4749
|
function Eu(n) {
|
|
4750
|
-
if (
|
|
4751
|
-
return
|
|
4750
|
+
if (Zs[n] !== void 0)
|
|
4751
|
+
return Zs[n];
|
|
4752
4752
|
const t = n * 2 + 1, e = n * n, i = new Array(e + 1);
|
|
4753
4753
|
for (let r = 0; r <= n; ++r)
|
|
4754
4754
|
for (let o = 0; o <= n; ++o) {
|
|
@@ -4761,7 +4761,7 @@ function Eu(n) {
|
|
|
4761
4761
|
const s = [];
|
|
4762
4762
|
for (let r = 0, o = i.length; r < o; ++r)
|
|
4763
4763
|
i[r] && s.push(...i[r]);
|
|
4764
|
-
return
|
|
4764
|
+
return Zs[n] = s, s;
|
|
4765
4765
|
}
|
|
4766
4766
|
function ma(n) {
|
|
4767
4767
|
return n[0] > 0 && n[1] > 0;
|
|
@@ -6058,16 +6058,16 @@ function Cu(n) {
|
|
|
6058
6058
|
}
|
|
6059
6059
|
return t;
|
|
6060
6060
|
}
|
|
6061
|
-
let
|
|
6061
|
+
let Us = null;
|
|
6062
6062
|
function Tl(n, t) {
|
|
6063
|
-
if (!
|
|
6063
|
+
if (!Us) {
|
|
6064
6064
|
const e = new _t({
|
|
6065
6065
|
color: "rgba(255,255,255,0.4)"
|
|
6066
6066
|
}), i = new ie({
|
|
6067
6067
|
color: "#3399CC",
|
|
6068
6068
|
width: 1.25
|
|
6069
6069
|
});
|
|
6070
|
-
|
|
6070
|
+
Us = [
|
|
6071
6071
|
new at({
|
|
6072
6072
|
image: new Sn({
|
|
6073
6073
|
fill: e,
|
|
@@ -6079,7 +6079,7 @@ function Tl(n, t) {
|
|
|
6079
6079
|
})
|
|
6080
6080
|
];
|
|
6081
6081
|
}
|
|
6082
|
-
return
|
|
6082
|
+
return Us;
|
|
6083
6083
|
}
|
|
6084
6084
|
function ho() {
|
|
6085
6085
|
const n = {}, t = [255, 255, 255, 1], e = [0, 153, 255, 1], i = 3;
|
|
@@ -7594,10 +7594,10 @@ function vu(n, t, e, i, s, r, o, a, l) {
|
|
|
7594
7594
|
const k = S[R], N = k.getGeometryFunction()(x);
|
|
7595
7595
|
if (!N || !mt(h, N.getExtent()))
|
|
7596
7596
|
continue;
|
|
7597
|
-
const
|
|
7597
|
+
const V = k.clone(), F = V.getFill();
|
|
7598
7598
|
F && F.setColor(I);
|
|
7599
|
-
const q =
|
|
7600
|
-
q && (q.setColor(I), q.setLineDash(null)),
|
|
7599
|
+
const q = V.getStroke();
|
|
7600
|
+
q && (q.setColor(I), q.setLineDash(null)), V.setText(void 0);
|
|
7601
7601
|
const b = k.getImage();
|
|
7602
7602
|
if (b) {
|
|
7603
7603
|
const J = b.getImageSize();
|
|
@@ -7609,7 +7609,7 @@ function vu(n, t, e, i, s, r, o, a, l) {
|
|
|
7609
7609
|
void 0,
|
|
7610
7610
|
{ alpha: !1 }
|
|
7611
7611
|
), v = tt.canvas;
|
|
7612
|
-
tt.fillStyle = I, tt.fillRect(0, 0, v.width, v.height),
|
|
7612
|
+
tt.fillStyle = I, tt.fillRect(0, 0, v.width, v.height), V.setImage(
|
|
7613
7613
|
new Cs({
|
|
7614
7614
|
img: v,
|
|
7615
7615
|
anchor: b.getAnchor(),
|
|
@@ -7624,9 +7624,9 @@ function vu(n, t, e, i, s, r, o, a, l) {
|
|
|
7624
7624
|
})
|
|
7625
7625
|
);
|
|
7626
7626
|
}
|
|
7627
|
-
const z =
|
|
7628
|
-
let
|
|
7629
|
-
|
|
7627
|
+
const z = V.getZIndex() || 0;
|
|
7628
|
+
let j = y[z];
|
|
7629
|
+
j || (j = {}, y[z] = j, j.Polygon = [], j.Circle = [], j.LineString = [], j.Point = []);
|
|
7630
7630
|
const Q = N.getType();
|
|
7631
7631
|
if (Q === "GeometryCollection") {
|
|
7632
7632
|
const J = (
|
|
@@ -7635,16 +7635,16 @@ function vu(n, t, e, i, s, r, o, a, l) {
|
|
|
7635
7635
|
);
|
|
7636
7636
|
for (let tt = 0, v = J.length; tt < v; ++tt) {
|
|
7637
7637
|
const se = J[tt];
|
|
7638
|
-
|
|
7638
|
+
j[se.getType().replace("Multi", "")].push(
|
|
7639
7639
|
se,
|
|
7640
|
-
|
|
7640
|
+
V
|
|
7641
7641
|
);
|
|
7642
7642
|
}
|
|
7643
7643
|
} else
|
|
7644
|
-
|
|
7644
|
+
j[Q.replace("Multi", "")].push(N, V);
|
|
7645
7645
|
}
|
|
7646
7646
|
}
|
|
7647
|
-
const p = Object.keys(y).map(Number).sort(
|
|
7647
|
+
const p = Object.keys(y).map(Number).sort(Ze);
|
|
7648
7648
|
for (let C = 0, x = p.length; C < x; ++C) {
|
|
7649
7649
|
const E = y[p[C]];
|
|
7650
7650
|
for (const S in E) {
|
|
@@ -7990,7 +7990,7 @@ class Wu extends Cn {
|
|
|
7990
7990
|
}
|
|
7991
7991
|
const wa = [];
|
|
7992
7992
|
let hi = null;
|
|
7993
|
-
function
|
|
7993
|
+
function Vu() {
|
|
7994
7994
|
hi = ft(1, 1, void 0, {
|
|
7995
7995
|
willReadFrequently: !0
|
|
7996
7996
|
});
|
|
@@ -8009,7 +8009,7 @@ class bl extends Wu {
|
|
|
8009
8009
|
* @return {Uint8ClampedArray|null} The image data.
|
|
8010
8010
|
*/
|
|
8011
8011
|
getImageData(t, e, i) {
|
|
8012
|
-
hi ||
|
|
8012
|
+
hi || Vu(), hi.clearRect(0, 0, 1, 1);
|
|
8013
8013
|
let s;
|
|
8014
8014
|
try {
|
|
8015
8015
|
hi.drawImage(t, e, i, 1, 1, 0, 0, 1, 1), s = hi.getImageData(0, 0, 1, 1).data;
|
|
@@ -8058,7 +8058,7 @@ class bl extends Wu {
|
|
|
8058
8058
|
* @protected
|
|
8059
8059
|
*/
|
|
8060
8060
|
clipUnrotated(t, e, i) {
|
|
8061
|
-
const s = cs(i), r =
|
|
8061
|
+
const s = cs(i), r = jr(i), o = Wr(i), a = zr(i);
|
|
8062
8062
|
gt(e.coordinateToPixelTransform, s), gt(e.coordinateToPixelTransform, r), gt(e.coordinateToPixelTransform, o), gt(e.coordinateToPixelTransform, a);
|
|
8063
8063
|
const l = this.inversePixelTransform;
|
|
8064
8064
|
gt(l, s), gt(l, r), gt(l, o), gt(l, a), t.save(), t.beginPath(), t.moveTo(Math.round(s[0]), Math.round(s[1])), t.lineTo(Math.round(r[0]), Math.round(r[1])), t.lineTo(Math.round(o[0]), Math.round(o[1])), t.lineTo(Math.round(a[0]), Math.round(a[1])), t.clip();
|
|
@@ -8069,7 +8069,7 @@ class bl extends Wu {
|
|
|
8069
8069
|
* @protected
|
|
8070
8070
|
*/
|
|
8071
8071
|
prepareContainer(t, e) {
|
|
8072
|
-
const i = t.extent, s = t.viewState.resolution, r = t.viewState.rotation, o = t.pixelRatio, a = Math.round(
|
|
8072
|
+
const i = t.extent, s = t.viewState.resolution, r = t.viewState.rotation, o = t.pixelRatio, a = Math.round(Z(i) / s * o), l = Math.round(dt(i) / s * o);
|
|
8073
8073
|
xe(
|
|
8074
8074
|
this.pixelTransform,
|
|
8075
8075
|
t.size[0] / 2,
|
|
@@ -8180,7 +8180,7 @@ class bl extends Wu {
|
|
|
8180
8180
|
delete this.frameState, super.disposeInternal();
|
|
8181
8181
|
}
|
|
8182
8182
|
}
|
|
8183
|
-
class
|
|
8183
|
+
class ju extends bl {
|
|
8184
8184
|
/**
|
|
8185
8185
|
* @param {import("../../layer/BaseVector.js").default} vectorLayer Vector layer.
|
|
8186
8186
|
*/
|
|
@@ -8194,7 +8194,7 @@ class Xu extends bl {
|
|
|
8194
8194
|
* `false` to only render non-declutterable items, `undefined` to render all.
|
|
8195
8195
|
*/
|
|
8196
8196
|
renderWorlds(t, e, i) {
|
|
8197
|
-
const s = e.extent, r = e.viewState, o = r.center, a = r.resolution, l = r.projection, h = r.rotation, c = l.getExtent(), u = this.getLayer().getSource(), d = this.getLayer().getDeclutter(), f = e.pixelRatio, g = e.viewHints, m = !(g[ct.ANIMATING] || g[ct.INTERACTING]), _ = this.context, y = Math.round(
|
|
8197
|
+
const s = e.extent, r = e.viewState, o = r.center, a = r.resolution, l = r.projection, h = r.rotation, c = l.getExtent(), u = this.getLayer().getSource(), d = this.getLayer().getDeclutter(), f = e.pixelRatio, g = e.viewHints, m = !(g[ct.ANIMATING] || g[ct.INTERACTING]), _ = this.context, y = Math.round(Z(s) / a * f), p = Math.round(dt(s) / a * f), C = u.getWrapX() && l.canWrapX(), x = C ? Z(c) : null, E = C ? Math.ceil((s[2] - c[2]) / x) + 1 : 1;
|
|
8198
8198
|
let S = C ? Math.floor((s[0] - c[0]) / x) : 0;
|
|
8199
8199
|
do {
|
|
8200
8200
|
let T = this.getRenderTransform(
|
|
@@ -8212,7 +8212,7 @@ class Xu extends bl {
|
|
|
8212
8212
|
T,
|
|
8213
8213
|
h,
|
|
8214
8214
|
m,
|
|
8215
|
-
i === void 0 ?
|
|
8215
|
+
i === void 0 ? Ve : i ? vl : pu,
|
|
8216
8216
|
i ? d && e.declutter[d] : void 0
|
|
8217
8217
|
);
|
|
8218
8218
|
} while (++S < E);
|
|
@@ -8233,7 +8233,7 @@ class Xu extends bl {
|
|
|
8233
8233
|
resetDrawContext_() {
|
|
8234
8234
|
if (this.opacity_ !== 1 && this.targetContext_) {
|
|
8235
8235
|
const t = this.targetContext_.globalAlpha;
|
|
8236
|
-
this.targetContext_.globalAlpha = this.opacity_, this.targetContext_.drawImage(this.context.canvas, 0, 0), this.targetContext_.globalAlpha = t,
|
|
8236
|
+
this.targetContext_.globalAlpha = this.opacity_, this.targetContext_.drawImage(this.context.canvas, 0, 0), this.targetContext_.globalAlpha = t, Zr(this.context), wa.push(this.context.canvas), this.context = this.targetContext_, this.targetContext_ = null;
|
|
8237
8237
|
}
|
|
8238
8238
|
}
|
|
8239
8239
|
/**
|
|
@@ -8302,7 +8302,7 @@ class Xu extends bl {
|
|
|
8302
8302
|
const f = h.getSource(), g = a.getExtent();
|
|
8303
8303
|
if (f.getWrapX() && a.canWrapX() && !ge(g, l)) {
|
|
8304
8304
|
let m = l[0];
|
|
8305
|
-
const _ =
|
|
8305
|
+
const _ = Z(g);
|
|
8306
8306
|
let y = 0, p;
|
|
8307
8307
|
for (; m < g[0]; )
|
|
8308
8308
|
--y, p = _ * y, c.push(
|
|
@@ -8428,7 +8428,7 @@ class Xu extends bl {
|
|
|
8428
8428
|
g * u
|
|
8429
8429
|
), p = y.slice(), C = [y.slice()], x = c.getExtent();
|
|
8430
8430
|
if (i.getWrapX() && c.canWrapX() && !ge(x, t.extent)) {
|
|
8431
|
-
const F =
|
|
8431
|
+
const F = Z(x), q = Math.max(Z(y) / 2, F);
|
|
8432
8432
|
y[0] = x[0] - q, y[2] = x[2] + q, tl(_, c);
|
|
8433
8433
|
const b = Qa(C[0], c);
|
|
8434
8434
|
b[0] < x[0] && b[2] < x[2] ? C.push([
|
|
@@ -8466,7 +8466,7 @@ class Xu extends bl {
|
|
|
8466
8466
|
let b;
|
|
8467
8467
|
const z = F.getStyleFunction() || e.getStyleFunction();
|
|
8468
8468
|
if (z && (b = z(F, u)), b) {
|
|
8469
|
-
const
|
|
8469
|
+
const j = this.renderFeature(
|
|
8470
8470
|
F,
|
|
8471
8471
|
T,
|
|
8472
8472
|
b,
|
|
@@ -8475,7 +8475,7 @@ class Xu extends bl {
|
|
|
8475
8475
|
this.getLayer().getDeclutter(),
|
|
8476
8476
|
q
|
|
8477
8477
|
);
|
|
8478
|
-
I = I && !
|
|
8478
|
+
I = I && !j;
|
|
8479
8479
|
}
|
|
8480
8480
|
}
|
|
8481
8481
|
), P = _s(y), k = i.getFeaturesInExtent(P);
|
|
@@ -8483,7 +8483,7 @@ class Xu extends bl {
|
|
|
8483
8483
|
for (let F = 0, q = k.length; F < q; ++F)
|
|
8484
8484
|
R(k[F], F);
|
|
8485
8485
|
this.renderedFeatures_ = k, this.ready = I;
|
|
8486
|
-
const N = E.finish(),
|
|
8486
|
+
const N = E.finish(), V = new xu(
|
|
8487
8487
|
y,
|
|
8488
8488
|
u,
|
|
8489
8489
|
d,
|
|
@@ -8492,7 +8492,7 @@ class Xu extends bl {
|
|
|
8492
8492
|
e.getRenderBuffer(),
|
|
8493
8493
|
!!t.declutter
|
|
8494
8494
|
);
|
|
8495
|
-
return this.renderedResolution_ = u, this.renderedRevision_ = f, this.renderedRenderOrder_ = m, this.renderedFrameDeclutter_ = !!t.declutter, this.renderedExtent_ = p, this.wrappedRenderedExtent_ = y, this.renderedCenter_ = _, this.renderedProjection_ = c, this.renderedPixelRatio_ = d, this.replayGroup_ =
|
|
8495
|
+
return this.renderedResolution_ = u, this.renderedRevision_ = f, this.renderedRenderOrder_ = m, this.renderedFrameDeclutter_ = !!t.declutter, this.renderedExtent_ = p, this.wrappedRenderedExtent_ = y, this.renderedCenter_ = _, this.renderedProjection_ = c, this.renderedPixelRatio_ = d, this.replayGroup_ = V, this.hitDetectionImageData_ = null, this.replayGroupChanged = !0, !0;
|
|
8496
8496
|
}
|
|
8497
8497
|
/**
|
|
8498
8498
|
* @param {import("../../Feature.js").default} feature Feature.
|
|
@@ -8534,7 +8534,7 @@ class Xu extends bl {
|
|
|
8534
8534
|
return l;
|
|
8535
8535
|
}
|
|
8536
8536
|
}
|
|
8537
|
-
function Dl(n, t, e = 0, i = n.length - 1, s =
|
|
8537
|
+
function Dl(n, t, e = 0, i = n.length - 1, s = Xu) {
|
|
8538
8538
|
for (; i > e; ) {
|
|
8539
8539
|
if (i - e > 600) {
|
|
8540
8540
|
const l = i - e + 1, h = t - e + 1, c = Math.log(l), u = 0.5 * Math.exp(2 * c / 3), d = 0.5 * Math.sqrt(c * u * (l - u) / l) * (h - l / 2 < 0 ? -1 : 1), f = Math.max(e, Math.floor(t - h * u / l + d)), g = Math.min(i, Math.floor(t + (l - h) * u / l + d));
|
|
@@ -8542,18 +8542,18 @@ function Dl(n, t, e = 0, i = n.length - 1, s = Vu) {
|
|
|
8542
8542
|
}
|
|
8543
8543
|
const r = n[t];
|
|
8544
8544
|
let o = e, a = i;
|
|
8545
|
-
for (
|
|
8546
|
-
for (
|
|
8545
|
+
for (ji(n, e, t), s(n[i], r) > 0 && ji(n, e, i); o < a; ) {
|
|
8546
|
+
for (ji(n, o, a), o++, a--; s(n[o], r) < 0; ) o++;
|
|
8547
8547
|
for (; s(n[a], r) > 0; ) a--;
|
|
8548
8548
|
}
|
|
8549
|
-
s(n[e], r) === 0 ?
|
|
8549
|
+
s(n[e], r) === 0 ? ji(n, e, a) : (a++, ji(n, a, i)), a <= t && (e = a + 1), t <= a && (i = a - 1);
|
|
8550
8550
|
}
|
|
8551
8551
|
}
|
|
8552
|
-
function
|
|
8552
|
+
function ji(n, t, e) {
|
|
8553
8553
|
const i = n[t];
|
|
8554
8554
|
n[t] = n[e], n[e] = i;
|
|
8555
8555
|
}
|
|
8556
|
-
function
|
|
8556
|
+
function Xu(n, t) {
|
|
8557
8557
|
return n < t ? -1 : n > t ? 1 : 0;
|
|
8558
8558
|
}
|
|
8559
8559
|
let Ol = class {
|
|
@@ -8678,7 +8678,7 @@ let Ol = class {
|
|
|
8678
8678
|
for (; s.push(e), !(e.leaf || s.length - 1 === i); ) {
|
|
8679
8679
|
let r = 1 / 0, o = 1 / 0, a;
|
|
8680
8680
|
for (let l = 0; l < e.children.length; l++) {
|
|
8681
|
-
const h = e.children[l], c = Hs(h), u =
|
|
8681
|
+
const h = e.children[l], c = Hs(h), u = Zu(t, h) - c;
|
|
8682
8682
|
u < o ? (o = u, r = c < r ? c : r, a = h) : u === o && c < r && (r = c, a = h);
|
|
8683
8683
|
}
|
|
8684
8684
|
e = a || e.children[0];
|
|
@@ -8704,7 +8704,7 @@ let Ol = class {
|
|
|
8704
8704
|
_chooseSplitIndex(t, e, i) {
|
|
8705
8705
|
let s, r = 1 / 0, o = 1 / 0;
|
|
8706
8706
|
for (let a = e; a <= i - e; a++) {
|
|
8707
|
-
const l = Yi(t, 0, a, this.toBBox), h = Yi(t, a, i, this.toBBox), c =
|
|
8707
|
+
const l = Yi(t, 0, a, this.toBBox), h = Yi(t, a, i, this.toBBox), c = Uu(l, h), u = Hs(l) + Hs(h);
|
|
8708
8708
|
c < r ? (r = c, s = a, o = u < o ? u : o) : c === r && u < o && (o = u, s = a);
|
|
8709
8709
|
}
|
|
8710
8710
|
return s || i - e;
|
|
@@ -8770,10 +8770,10 @@ function Hs(n) {
|
|
|
8770
8770
|
function kn(n) {
|
|
8771
8771
|
return n.maxX - n.minX + (n.maxY - n.minY);
|
|
8772
8772
|
}
|
|
8773
|
-
function
|
|
8773
|
+
function Zu(n, t) {
|
|
8774
8774
|
return (Math.max(t.maxX, n.maxX) - Math.min(t.minX, n.minX)) * (Math.max(t.maxY, n.maxY) - Math.min(t.minY, n.minY));
|
|
8775
8775
|
}
|
|
8776
|
-
function
|
|
8776
|
+
function Uu(n, t) {
|
|
8777
8777
|
const e = Math.max(n.minX, t.minX), i = Math.max(n.minY, t.minY), s = Math.min(n.maxX, t.maxX), r = Math.min(n.maxY, t.maxY);
|
|
8778
8778
|
return Math.max(0, s - e) * Math.max(0, r - i);
|
|
8779
8779
|
}
|
|
@@ -8803,18 +8803,18 @@ function Sa(n, t, e, i, s) {
|
|
|
8803
8803
|
}
|
|
8804
8804
|
}
|
|
8805
8805
|
let ei = 0;
|
|
8806
|
-
const Rt = 1 << ei++, Y = 1 << ei++, Pt = 1 << ei++,
|
|
8806
|
+
const Rt = 1 << ei++, Y = 1 << ei++, Pt = 1 << ei++, Xt = 1 << ei++, $e = 1 << ei++, Zi = 1 << ei++, Gn = Math.pow(2, ei) - 1, co = {
|
|
8807
8807
|
[Rt]: "boolean",
|
|
8808
8808
|
[Y]: "number",
|
|
8809
8809
|
[Pt]: "string",
|
|
8810
|
-
[
|
|
8810
|
+
[Xt]: "color",
|
|
8811
8811
|
[$e]: "number[]",
|
|
8812
|
-
[
|
|
8813
|
-
}, Hu = Object.keys(co).map(Number).sort(
|
|
8812
|
+
[Zi]: "size"
|
|
8813
|
+
}, Hu = Object.keys(co).map(Number).sort(Ze);
|
|
8814
8814
|
function qu(n) {
|
|
8815
8815
|
return n in co;
|
|
8816
8816
|
}
|
|
8817
|
-
function
|
|
8817
|
+
function Ui(n) {
|
|
8818
8818
|
const t = [];
|
|
8819
8819
|
for (const e of Hu)
|
|
8820
8820
|
Hi(n, e) && t.push(co[e]);
|
|
@@ -8834,7 +8834,7 @@ class ot {
|
|
|
8834
8834
|
constructor(t, e) {
|
|
8835
8835
|
if (!qu(t))
|
|
8836
8836
|
throw new Error(
|
|
8837
|
-
`literal expressions must have a specific type, got ${
|
|
8837
|
+
`literal expressions must have a specific type, got ${Ui(t)}`
|
|
8838
8838
|
);
|
|
8839
8839
|
this.type = t, this.value = e;
|
|
8840
8840
|
}
|
|
@@ -8865,28 +8865,28 @@ function yt(n, t, e) {
|
|
|
8865
8865
|
return new ot(Pt, n ? "true" : "false");
|
|
8866
8866
|
if (!Hi(t, Rt))
|
|
8867
8867
|
throw new Error(
|
|
8868
|
-
`got a boolean, but expected ${
|
|
8868
|
+
`got a boolean, but expected ${Ui(t)}`
|
|
8869
8869
|
);
|
|
8870
8870
|
return new ot(Rt, n);
|
|
8871
8871
|
}
|
|
8872
8872
|
case "number": {
|
|
8873
|
-
if (ve(t,
|
|
8874
|
-
return new ot(
|
|
8873
|
+
if (ve(t, Zi))
|
|
8874
|
+
return new ot(Zi, Ii(n));
|
|
8875
8875
|
if (ve(t, Rt))
|
|
8876
8876
|
return new ot(Rt, !!n);
|
|
8877
8877
|
if (ve(t, Pt))
|
|
8878
8878
|
return new ot(Pt, n.toString());
|
|
8879
8879
|
if (!Hi(t, Y))
|
|
8880
|
-
throw new Error(`got a number, but expected ${
|
|
8880
|
+
throw new Error(`got a number, but expected ${Ui(t)}`);
|
|
8881
8881
|
return new ot(Y, n);
|
|
8882
8882
|
}
|
|
8883
8883
|
case "string": {
|
|
8884
|
-
if (ve(t,
|
|
8885
|
-
return new ot(
|
|
8884
|
+
if (ve(t, Xt))
|
|
8885
|
+
return new ot(Xt, to(n));
|
|
8886
8886
|
if (ve(t, Rt))
|
|
8887
8887
|
return new ot(Rt, !!n);
|
|
8888
8888
|
if (!Hi(t, Pt))
|
|
8889
|
-
throw new Error(`got a string, but expected ${
|
|
8889
|
+
throw new Error(`got a string, but expected ${Ui(t)}`);
|
|
8890
8890
|
return new ot(Pt, n);
|
|
8891
8891
|
}
|
|
8892
8892
|
}
|
|
@@ -8899,25 +8899,25 @@ function yt(n, t, e) {
|
|
|
8899
8899
|
for (const i of n)
|
|
8900
8900
|
if (typeof i != "number")
|
|
8901
8901
|
throw new Error("expected an array of numbers");
|
|
8902
|
-
if (ve(t,
|
|
8902
|
+
if (ve(t, Zi)) {
|
|
8903
8903
|
if (n.length !== 2)
|
|
8904
8904
|
throw new Error(
|
|
8905
8905
|
`expected an array of two values for a size, got ${n.length}`
|
|
8906
8906
|
);
|
|
8907
|
-
return new ot(
|
|
8907
|
+
return new ot(Zi, n);
|
|
8908
8908
|
}
|
|
8909
|
-
if (ve(t,
|
|
8909
|
+
if (ve(t, Xt)) {
|
|
8910
8910
|
if (n.length === 3)
|
|
8911
|
-
return new ot(
|
|
8911
|
+
return new ot(Xt, [...n, 1]);
|
|
8912
8912
|
if (n.length === 4)
|
|
8913
|
-
return new ot(
|
|
8913
|
+
return new ot(Xt, n);
|
|
8914
8914
|
throw new Error(
|
|
8915
8915
|
`expected an array of 3 or 4 values for a color, got ${n.length}`
|
|
8916
8916
|
);
|
|
8917
8917
|
}
|
|
8918
8918
|
if (!Hi(t, $e))
|
|
8919
8919
|
throw new Error(
|
|
8920
|
-
`got an array of numbers, but expected ${
|
|
8920
|
+
`got an array of numbers, but expected ${Ui(t)}`
|
|
8921
8921
|
);
|
|
8922
8922
|
return new ot($e, n);
|
|
8923
8923
|
}
|
|
@@ -9129,7 +9129,7 @@ const w = {
|
|
|
9129
9129
|
),
|
|
9130
9130
|
[w.ToString]: A(
|
|
9131
9131
|
G(1, 1),
|
|
9132
|
-
K(Rt | Y | Pt |
|
|
9132
|
+
K(Rt | Y | Pt | Xt)
|
|
9133
9133
|
)
|
|
9134
9134
|
};
|
|
9135
9135
|
function Ia(n, t, e) {
|
|
@@ -9366,7 +9366,7 @@ function ad(n, t, e) {
|
|
|
9366
9366
|
for (let o = 0; o < r.length; o++) {
|
|
9367
9367
|
let a;
|
|
9368
9368
|
try {
|
|
9369
|
-
a = yt(s[o],
|
|
9369
|
+
a = yt(s[o], Xt, e);
|
|
9370
9370
|
} catch (l) {
|
|
9371
9371
|
throw new Error(
|
|
9372
9372
|
`failed to parse color at index ${o} in palette expression: ${l.message}`
|
|
@@ -9441,11 +9441,11 @@ function Gl() {
|
|
|
9441
9441
|
}
|
|
9442
9442
|
function Ce(n, t, e) {
|
|
9443
9443
|
const i = yt(n, t, e);
|
|
9444
|
-
return
|
|
9444
|
+
return Zt(i);
|
|
9445
9445
|
}
|
|
9446
|
-
function
|
|
9446
|
+
function Zt(n, t) {
|
|
9447
9447
|
if (n instanceof ot) {
|
|
9448
|
-
if (n.type ===
|
|
9448
|
+
if (n.type === Xt && typeof n.value == "string") {
|
|
9449
9449
|
const i = to(n.value);
|
|
9450
9450
|
return function() {
|
|
9451
9451
|
return i;
|
|
@@ -9470,7 +9470,7 @@ function Ut(n, t) {
|
|
|
9470
9470
|
case w.GeometryType:
|
|
9471
9471
|
return (i) => i.geometryType;
|
|
9472
9472
|
case w.Concat: {
|
|
9473
|
-
const i = n.args.map((s) =>
|
|
9473
|
+
const i = n.args.map((s) => Zt(s));
|
|
9474
9474
|
return (s) => "".concat(...i.map((r) => r(s).toString()));
|
|
9475
9475
|
}
|
|
9476
9476
|
case w.Resolution:
|
|
@@ -9519,7 +9519,7 @@ function Ut(n, t) {
|
|
|
9519
9519
|
function hd(n, t) {
|
|
9520
9520
|
const e = n.operator, i = n.args.length, s = new Array(i);
|
|
9521
9521
|
for (let r = 0; r < i; ++r)
|
|
9522
|
-
s[r] =
|
|
9522
|
+
s[r] = Zt(n.args[r]);
|
|
9523
9523
|
switch (e) {
|
|
9524
9524
|
case w.Coalesce:
|
|
9525
9525
|
return (r) => {
|
|
@@ -9590,7 +9590,7 @@ function cd(n, t) {
|
|
|
9590
9590
|
}
|
|
9591
9591
|
}
|
|
9592
9592
|
function ud(n, t) {
|
|
9593
|
-
const e = n.operator, i =
|
|
9593
|
+
const e = n.operator, i = Zt(n.args[0]), s = Zt(n.args[1]);
|
|
9594
9594
|
switch (e) {
|
|
9595
9595
|
case w.Equal:
|
|
9596
9596
|
return (r) => i(r) === s(r);
|
|
@@ -9611,7 +9611,7 @@ function ud(n, t) {
|
|
|
9611
9611
|
function dd(n, t) {
|
|
9612
9612
|
const e = n.operator, i = n.args.length, s = new Array(i);
|
|
9613
9613
|
for (let r = 0; r < i; ++r)
|
|
9614
|
-
s[r] =
|
|
9614
|
+
s[r] = Zt(n.args[r]);
|
|
9615
9615
|
switch (e) {
|
|
9616
9616
|
case w.Any:
|
|
9617
9617
|
return (r) => {
|
|
@@ -9649,7 +9649,7 @@ function dd(n, t) {
|
|
|
9649
9649
|
function fd(n, t) {
|
|
9650
9650
|
const e = n.operator, i = n.args.length, s = new Array(i);
|
|
9651
9651
|
for (let r = 0; r < i; ++r)
|
|
9652
|
-
s[r] =
|
|
9652
|
+
s[r] = Zt(n.args[r]);
|
|
9653
9653
|
switch (e) {
|
|
9654
9654
|
case w.Multiply:
|
|
9655
9655
|
return (r) => {
|
|
@@ -9704,7 +9704,7 @@ function fd(n, t) {
|
|
|
9704
9704
|
function gd(n, t) {
|
|
9705
9705
|
const e = n.args.length, i = new Array(e);
|
|
9706
9706
|
for (let s = 0; s < e; ++s)
|
|
9707
|
-
i[s] =
|
|
9707
|
+
i[s] = Zt(n.args[s]);
|
|
9708
9708
|
return (s) => {
|
|
9709
9709
|
for (let r = 0; r < e - 1; r += 2)
|
|
9710
9710
|
if (i[r](s))
|
|
@@ -9715,7 +9715,7 @@ function gd(n, t) {
|
|
|
9715
9715
|
function _d(n, t) {
|
|
9716
9716
|
const e = n.args.length, i = new Array(e);
|
|
9717
9717
|
for (let s = 0; s < e; ++s)
|
|
9718
|
-
i[s] =
|
|
9718
|
+
i[s] = Zt(n.args[s]);
|
|
9719
9719
|
return (s) => {
|
|
9720
9720
|
const r = i[0](s);
|
|
9721
9721
|
for (let o = 1; o < e - 1; o += 2)
|
|
@@ -9727,7 +9727,7 @@ function _d(n, t) {
|
|
|
9727
9727
|
function md(n, t) {
|
|
9728
9728
|
const e = n.args.length, i = new Array(e);
|
|
9729
9729
|
for (let s = 0; s < e; ++s)
|
|
9730
|
-
i[s] =
|
|
9730
|
+
i[s] = Zt(n.args[s]);
|
|
9731
9731
|
return (s) => {
|
|
9732
9732
|
const r = i[0](s), o = i[1](s);
|
|
9733
9733
|
let a, l;
|
|
@@ -9759,12 +9759,12 @@ function md(n, t) {
|
|
|
9759
9759
|
function yd(n, t) {
|
|
9760
9760
|
const e = n.operator, i = n.args.length, s = new Array(i);
|
|
9761
9761
|
for (let r = 0; r < i; ++r)
|
|
9762
|
-
s[r] =
|
|
9762
|
+
s[r] = Zt(n.args[r]);
|
|
9763
9763
|
switch (e) {
|
|
9764
9764
|
case w.ToString:
|
|
9765
9765
|
return (r) => {
|
|
9766
9766
|
const o = s[0](r);
|
|
9767
|
-
return n.args[0].type ===
|
|
9767
|
+
return n.args[0].type === Xt ? eo(o) : o.toString();
|
|
9768
9768
|
};
|
|
9769
9769
|
default:
|
|
9770
9770
|
throw new Error(`Unsupported convert operator ${e}`);
|
|
@@ -10210,9 +10210,9 @@ function yi(n, t, e) {
|
|
|
10210
10210
|
function uo(n, t, e) {
|
|
10211
10211
|
if (!(t in n))
|
|
10212
10212
|
return null;
|
|
10213
|
-
const i = Ce(n[t],
|
|
10213
|
+
const i = Ce(n[t], Xt, e);
|
|
10214
10214
|
return function(s) {
|
|
10215
|
-
return
|
|
10215
|
+
return Vl(i(s), t);
|
|
10216
10216
|
};
|
|
10217
10217
|
}
|
|
10218
10218
|
function zl(n, t, e) {
|
|
@@ -10239,7 +10239,7 @@ function Pa(n, t, e) {
|
|
|
10239
10239
|
return null;
|
|
10240
10240
|
const i = Ce(n[t], $e, e);
|
|
10241
10241
|
return function(s) {
|
|
10242
|
-
return
|
|
10242
|
+
return jl(i(s), t);
|
|
10243
10243
|
};
|
|
10244
10244
|
}
|
|
10245
10245
|
function ws(n, t, e) {
|
|
@@ -10318,7 +10318,7 @@ function Ss(n, t) {
|
|
|
10318
10318
|
function Ad(n, t) {
|
|
10319
10319
|
const e = n[t];
|
|
10320
10320
|
if (e !== void 0)
|
|
10321
|
-
return
|
|
10321
|
+
return Vl(e, t);
|
|
10322
10322
|
}
|
|
10323
10323
|
function In(n, t) {
|
|
10324
10324
|
if (!Array.isArray(n))
|
|
@@ -10339,7 +10339,7 @@ function vr(n, t) {
|
|
|
10339
10339
|
throw new Error(`Expected a number for ${t}`);
|
|
10340
10340
|
return n;
|
|
10341
10341
|
}
|
|
10342
|
-
function
|
|
10342
|
+
function Vl(n, t) {
|
|
10343
10343
|
if (typeof n == "string")
|
|
10344
10344
|
return n;
|
|
10345
10345
|
const e = In(n, t), i = e.length;
|
|
@@ -10347,16 +10347,16 @@ function jl(n, t) {
|
|
|
10347
10347
|
throw new Error(`Expected a color with 3 or 4 values for ${t}`);
|
|
10348
10348
|
return e;
|
|
10349
10349
|
}
|
|
10350
|
-
function
|
|
10350
|
+
function jl(n, t) {
|
|
10351
10351
|
const e = In(n, t);
|
|
10352
10352
|
if (e.length !== 2)
|
|
10353
10353
|
throw new Error(`Expected an array of two numbers for ${t}`);
|
|
10354
10354
|
return e;
|
|
10355
10355
|
}
|
|
10356
10356
|
function Fd(n, t) {
|
|
10357
|
-
return typeof n == "number" ? n :
|
|
10357
|
+
return typeof n == "number" ? n : jl(n, t);
|
|
10358
10358
|
}
|
|
10359
|
-
const
|
|
10359
|
+
const jt = {
|
|
10360
10360
|
CENTER: "center",
|
|
10361
10361
|
RESOLUTION: "resolution",
|
|
10362
10362
|
ROTATION: "rotation"
|
|
@@ -10403,7 +10403,7 @@ function Od(n) {
|
|
|
10403
10403
|
function kd(n) {
|
|
10404
10404
|
return n;
|
|
10405
10405
|
}
|
|
10406
|
-
function
|
|
10406
|
+
function Xl(n, t, e, i) {
|
|
10407
10407
|
let s = 0;
|
|
10408
10408
|
const r = n[e - i], o = n[e - i + 1];
|
|
10409
10409
|
let a = 0, l = 0;
|
|
@@ -10417,7 +10417,7 @@ function Bl(n, t, e, i) {
|
|
|
10417
10417
|
let s = 0;
|
|
10418
10418
|
for (let r = 0, o = e.length; r < o; ++r) {
|
|
10419
10419
|
const a = e[r];
|
|
10420
|
-
s +=
|
|
10420
|
+
s += Xl(n, t, a, i), t = a;
|
|
10421
10421
|
}
|
|
10422
10422
|
return s;
|
|
10423
10423
|
}
|
|
@@ -10672,7 +10672,7 @@ class _n extends Oe {
|
|
|
10672
10672
|
* @api
|
|
10673
10673
|
*/
|
|
10674
10674
|
getArea() {
|
|
10675
|
-
return
|
|
10675
|
+
return Xl(
|
|
10676
10676
|
this.flatCoordinates,
|
|
10677
10677
|
0,
|
|
10678
10678
|
this.flatCoordinates.length,
|
|
@@ -10874,7 +10874,7 @@ function yo(n, t, e, i, s, r) {
|
|
|
10874
10874
|
return !1;
|
|
10875
10875
|
return !0;
|
|
10876
10876
|
}
|
|
10877
|
-
function
|
|
10877
|
+
function Vd(n, t, e, i, s, r) {
|
|
10878
10878
|
if (e.length === 0)
|
|
10879
10879
|
return !1;
|
|
10880
10880
|
for (let o = 0, a = e.length; o < a; ++o) {
|
|
@@ -10894,14 +10894,14 @@ function po(n, t, e, i, s, r, o) {
|
|
|
10894
10894
|
u = n[a], f = n[a + 1], (g <= d && f <= g || d <= g && g <= f) && (h = (g - d) / (f - d) * (u - c) + c, m.push(h)), c = u, d = f;
|
|
10895
10895
|
}
|
|
10896
10896
|
let _ = NaN, y = -1 / 0;
|
|
10897
|
-
for (m.sort(
|
|
10897
|
+
for (m.sort(Ze), c = m[0], a = 1, l = m.length; a < l; ++a) {
|
|
10898
10898
|
u = m[a];
|
|
10899
10899
|
const p = Math.abs(u - c);
|
|
10900
10900
|
p > y && (h = (c + u) / 2, yo(n, t, e, i, h, g) && (_ = h, y = p)), c = u;
|
|
10901
10901
|
}
|
|
10902
10902
|
return isNaN(_) && (_ = s[r]), o ? (o.push(_, g, y), o) : [_, g, y];
|
|
10903
10903
|
}
|
|
10904
|
-
function
|
|
10904
|
+
function Zl(n, t, e, i, s) {
|
|
10905
10905
|
let r = [];
|
|
10906
10906
|
for (let o = 0, a = e.length; o < a; ++o) {
|
|
10907
10907
|
const l = e[o];
|
|
@@ -10917,7 +10917,7 @@ function Ul(n, t, e, i, s) {
|
|
|
10917
10917
|
}
|
|
10918
10918
|
return r;
|
|
10919
10919
|
}
|
|
10920
|
-
function
|
|
10920
|
+
function Ul(n, t, e, i, s) {
|
|
10921
10921
|
let r;
|
|
10922
10922
|
for (t += i; t < e; t += i)
|
|
10923
10923
|
if (r = s(
|
|
@@ -10933,7 +10933,7 @@ function ba(n, t) {
|
|
|
10933
10933
|
return [e[0] + o * (i[0] - e[0]), e[1] + o * (i[1] - e[1])];
|
|
10934
10934
|
}
|
|
10935
10935
|
function Rs(n, t, e, i, s, r) {
|
|
10936
|
-
return r = r ?? $a(Wt(), n, t, e, i), mt(s, r) ? r[0] >= s[0] && r[2] <= s[2] || r[1] >= s[1] && r[3] <= s[3] ? !0 :
|
|
10936
|
+
return r = r ?? $a(Wt(), n, t, e, i), mt(s, r) ? r[0] >= s[0] && r[2] <= s[2] || r[1] >= s[1] && r[3] <= s[3] ? !0 : Ul(
|
|
10937
10937
|
n,
|
|
10938
10938
|
t,
|
|
10939
10939
|
e,
|
|
@@ -10949,7 +10949,7 @@ function Rs(n, t, e, i, s, r) {
|
|
|
10949
10949
|
}
|
|
10950
10950
|
) : !1;
|
|
10951
10951
|
}
|
|
10952
|
-
function
|
|
10952
|
+
function jd(n, t, e, i, s) {
|
|
10953
10953
|
for (let r = 0, o = e.length; r < o; ++r) {
|
|
10954
10954
|
if (Rs(n, t, e[r], i, s))
|
|
10955
10955
|
return !0;
|
|
@@ -10957,7 +10957,7 @@ function Xd(n, t, e, i, s) {
|
|
|
10957
10957
|
}
|
|
10958
10958
|
return !1;
|
|
10959
10959
|
}
|
|
10960
|
-
function
|
|
10960
|
+
function Xd(n, t, e, i, s) {
|
|
10961
10961
|
return !!(Rs(n, t, e, i, s) || Ke(
|
|
10962
10962
|
n,
|
|
10963
10963
|
t,
|
|
@@ -10989,7 +10989,7 @@ function Vd(n, t, e, i, s) {
|
|
|
10989
10989
|
));
|
|
10990
10990
|
}
|
|
10991
10991
|
function Hl(n, t, e, i, s) {
|
|
10992
|
-
if (!
|
|
10992
|
+
if (!Xd(n, t, e[0], i, s))
|
|
10993
10993
|
return !1;
|
|
10994
10994
|
if (e.length === 1)
|
|
10995
10995
|
return !0;
|
|
@@ -11103,7 +11103,7 @@ function Kd(n, t) {
|
|
|
11103
11103
|
}
|
|
11104
11104
|
return e;
|
|
11105
11105
|
}
|
|
11106
|
-
class
|
|
11106
|
+
class Ut extends Oe {
|
|
11107
11107
|
/**
|
|
11108
11108
|
* @param {!Array<Array<import("../coordinate.js").Coordinate>>|!Array<number>} coordinates
|
|
11109
11109
|
* Array of linear rings that define the polygon. The first linear ring of the
|
|
@@ -11141,7 +11141,7 @@ class Zt extends Oe {
|
|
|
11141
11141
|
* @override
|
|
11142
11142
|
*/
|
|
11143
11143
|
clone() {
|
|
11144
|
-
const t = new
|
|
11144
|
+
const t = new Ut(
|
|
11145
11145
|
this.flatCoordinates.slice(),
|
|
11146
11146
|
this.layout,
|
|
11147
11147
|
this.ends_.slice()
|
|
@@ -11341,7 +11341,7 @@ class Zt extends Oe {
|
|
|
11341
11341
|
e,
|
|
11342
11342
|
0,
|
|
11343
11343
|
i
|
|
11344
|
-
), new
|
|
11344
|
+
), new Ut(e, "XY", i);
|
|
11345
11345
|
}
|
|
11346
11346
|
/**
|
|
11347
11347
|
* Get the type of this geometry.
|
|
@@ -11402,9 +11402,9 @@ function Da(n) {
|
|
|
11402
11402
|
t,
|
|
11403
11403
|
e
|
|
11404
11404
|
];
|
|
11405
|
-
return new
|
|
11405
|
+
return new Ut(r, "XY", [r.length]);
|
|
11406
11406
|
}
|
|
11407
|
-
function
|
|
11407
|
+
function Zd(n, t, e) {
|
|
11408
11408
|
t = t || 32;
|
|
11409
11409
|
const i = n.getStride(), s = n.getLayout(), r = n.getCenter(), o = i * (t + 1), a = new Array(o);
|
|
11410
11410
|
for (let c = 0; c < o; c += i) {
|
|
@@ -11412,10 +11412,10 @@ function Ud(n, t, e) {
|
|
|
11412
11412
|
for (let u = 2; u < i; u++)
|
|
11413
11413
|
a[c + u] = r[u];
|
|
11414
11414
|
}
|
|
11415
|
-
const l = [a.length], h = new
|
|
11416
|
-
return
|
|
11415
|
+
const l = [a.length], h = new Ut(a, s, l);
|
|
11416
|
+
return Ud(h, r, n.getRadius()), h;
|
|
11417
11417
|
}
|
|
11418
|
-
function
|
|
11418
|
+
function Ud(n, t, e, i) {
|
|
11419
11419
|
const s = n.getFlatCoordinates(), r = n.getStride(), o = s.length / r - 1, a = 0;
|
|
11420
11420
|
for (let l = 0; l <= o; ++l) {
|
|
11421
11421
|
const h = l * r, c = a + _i(l, o) * 2 * Math.PI / o;
|
|
@@ -11424,7 +11424,7 @@ function Zd(n, t, e, i) {
|
|
|
11424
11424
|
n.changed();
|
|
11425
11425
|
}
|
|
11426
11426
|
function Co(n, t, e, i) {
|
|
11427
|
-
const s =
|
|
11427
|
+
const s = Z(t) / e[0], r = dt(t) / e[1];
|
|
11428
11428
|
return i ? Math.min(n, Math.max(s, r)) : Math.min(n, Math.min(s, r));
|
|
11429
11429
|
}
|
|
11430
11430
|
function wo(n, t, e) {
|
|
@@ -11565,7 +11565,7 @@ class te extends Ht {
|
|
|
11565
11565
|
*/
|
|
11566
11566
|
applyOptions_(t) {
|
|
11567
11567
|
const e = Object.assign({}, t);
|
|
11568
|
-
for (const a in
|
|
11568
|
+
for (const a in jt)
|
|
11569
11569
|
delete e[a];
|
|
11570
11570
|
this.setProperties(e, !0);
|
|
11571
11571
|
const i = ef(t);
|
|
@@ -11812,7 +11812,7 @@ class te extends Ht {
|
|
|
11812
11812
|
calculateCenterRotate(t, e) {
|
|
11813
11813
|
let i;
|
|
11814
11814
|
const s = this.getCenterInternal();
|
|
11815
|
-
return s !== void 0 && (i = [s[0] - e[0], s[1] - e[1]], Br(i, t - this.getRotation()),
|
|
11815
|
+
return s !== void 0 && (i = [s[0] - e[0], s[1] - e[1]], Br(i, t - this.getRotation()), jh(i, e)), i;
|
|
11816
11816
|
}
|
|
11817
11817
|
/**
|
|
11818
11818
|
* @param {number} resolution Target resolution.
|
|
@@ -11872,7 +11872,7 @@ class te extends Ht {
|
|
|
11872
11872
|
getCenterInternal() {
|
|
11873
11873
|
return (
|
|
11874
11874
|
/** @type {import("./coordinate.js").Coordinate|undefined} */
|
|
11875
|
-
this.get(
|
|
11875
|
+
this.get(jt.CENTER)
|
|
11876
11876
|
);
|
|
11877
11877
|
}
|
|
11878
11878
|
/**
|
|
@@ -12010,7 +12010,7 @@ class te extends Ht {
|
|
|
12010
12010
|
getResolution() {
|
|
12011
12011
|
return (
|
|
12012
12012
|
/** @type {number|undefined} */
|
|
12013
|
-
this.get(
|
|
12013
|
+
this.get(jt.RESOLUTION)
|
|
12014
12014
|
);
|
|
12015
12015
|
}
|
|
12016
12016
|
/**
|
|
@@ -12045,7 +12045,7 @@ class te extends Ht {
|
|
|
12045
12045
|
*/
|
|
12046
12046
|
getResolutionForExtentInternal(t, e) {
|
|
12047
12047
|
e = e || this.getViewportSizeMinusPadding_();
|
|
12048
|
-
const i =
|
|
12048
|
+
const i = Z(t) / e[0], s = dt(t) / e[1];
|
|
12049
12049
|
return Math.max(i, s);
|
|
12050
12050
|
}
|
|
12051
12051
|
/**
|
|
@@ -12076,7 +12076,7 @@ class te extends Ht {
|
|
|
12076
12076
|
getRotation() {
|
|
12077
12077
|
return (
|
|
12078
12078
|
/** @type {number} */
|
|
12079
|
-
this.get(
|
|
12079
|
+
this.get(jt.ROTATION)
|
|
12080
12080
|
);
|
|
12081
12081
|
}
|
|
12082
12082
|
/**
|
|
@@ -12497,7 +12497,7 @@ class te extends Ht {
|
|
|
12497
12497
|
r
|
|
12498
12498
|
)
|
|
12499
12499
|
);
|
|
12500
|
-
this.get(
|
|
12500
|
+
this.get(jt.ROTATION) !== s && this.set(jt.ROTATION, s), this.get(jt.RESOLUTION) !== o && (this.set(jt.RESOLUTION, o), this.set("zoom", this.getZoom(), !0)), (!a || !this.get(jt.CENTER) || !It(this.get(jt.CENTER), a)) && this.set(jt.CENTER, a), this.getAnimating() && !t && this.cancelAnimations(), this.cancelAnchor_ = void 0;
|
|
12501
12501
|
}
|
|
12502
12502
|
/**
|
|
12503
12503
|
* If any constraints need to be applied, an animation will be triggered.
|
|
@@ -12650,7 +12650,7 @@ function ef(n) {
|
|
|
12650
12650
|
u
|
|
12651
12651
|
);
|
|
12652
12652
|
} else {
|
|
12653
|
-
const y = (f ? Math.max(
|
|
12653
|
+
const y = (f ? Math.max(Z(f), dt(f)) : (
|
|
12654
12654
|
// use an extent that can fit the whole world if need be
|
|
12655
12655
|
360 * ol.degrees / d.getMetersPerUnit()
|
|
12656
12656
|
)) / Qd / Math.pow(2, Js), p = y / Math.pow(2, 28 - Js);
|
|
@@ -12696,7 +12696,7 @@ function Qs(n, t, e, i, s) {
|
|
|
12696
12696
|
const h = a * r - l * o, c = l * r + a * o;
|
|
12697
12697
|
return [h, c];
|
|
12698
12698
|
}
|
|
12699
|
-
const
|
|
12699
|
+
const U = {
|
|
12700
12700
|
OPACITY: "opacity",
|
|
12701
12701
|
VISIBLE: "visible",
|
|
12702
12702
|
EXTENT: "extent",
|
|
@@ -12715,10 +12715,10 @@ class $l extends Ht {
|
|
|
12715
12715
|
constructor(t) {
|
|
12716
12716
|
super(), this.on, this.once, this.un, this.background_ = t.background;
|
|
12717
12717
|
const e = Object.assign({}, t);
|
|
12718
|
-
typeof t.properties == "object" && (delete e.properties, Object.assign(e, t.properties)), e[
|
|
12719
|
-
typeof e[
|
|
12718
|
+
typeof t.properties == "object" && (delete e.properties, Object.assign(e, t.properties)), e[U.OPACITY] = t.opacity !== void 0 ? t.opacity : 1, nt(
|
|
12719
|
+
typeof e[U.OPACITY] == "number",
|
|
12720
12720
|
"Layer opacity must be a number"
|
|
12721
|
-
), e[
|
|
12721
|
+
), e[U.VISIBLE] = t.visible !== void 0 ? t.visible : !0, e[U.Z_INDEX] = t.zIndex, e[U.MAX_RESOLUTION] = t.maxResolution !== void 0 ? t.maxResolution : 1 / 0, e[U.MIN_RESOLUTION] = t.minResolution !== void 0 ? t.minResolution : 0, e[U.MIN_ZOOM] = t.minZoom !== void 0 ? t.minZoom : -1 / 0, e[U.MAX_ZOOM] = t.maxZoom !== void 0 ? t.maxZoom : 1 / 0, this.className_ = e.className !== void 0 ? e.className : "ol-layer", delete e.className, this.setProperties(e), this.state_ = null;
|
|
12722
12722
|
}
|
|
12723
12723
|
/**
|
|
12724
12724
|
* Get the background for this layer.
|
|
@@ -12776,7 +12776,7 @@ class $l extends Ht {
|
|
|
12776
12776
|
getExtent() {
|
|
12777
12777
|
return (
|
|
12778
12778
|
/** @type {import("../extent.js").Extent|undefined} */
|
|
12779
|
-
this.get(
|
|
12779
|
+
this.get(U.EXTENT)
|
|
12780
12780
|
);
|
|
12781
12781
|
}
|
|
12782
12782
|
/**
|
|
@@ -12789,7 +12789,7 @@ class $l extends Ht {
|
|
|
12789
12789
|
getMaxResolution() {
|
|
12790
12790
|
return (
|
|
12791
12791
|
/** @type {number} */
|
|
12792
|
-
this.get(
|
|
12792
|
+
this.get(U.MAX_RESOLUTION)
|
|
12793
12793
|
);
|
|
12794
12794
|
}
|
|
12795
12795
|
/**
|
|
@@ -12802,7 +12802,7 @@ class $l extends Ht {
|
|
|
12802
12802
|
getMinResolution() {
|
|
12803
12803
|
return (
|
|
12804
12804
|
/** @type {number} */
|
|
12805
|
-
this.get(
|
|
12805
|
+
this.get(U.MIN_RESOLUTION)
|
|
12806
12806
|
);
|
|
12807
12807
|
}
|
|
12808
12808
|
/**
|
|
@@ -12815,7 +12815,7 @@ class $l extends Ht {
|
|
|
12815
12815
|
getMinZoom() {
|
|
12816
12816
|
return (
|
|
12817
12817
|
/** @type {number} */
|
|
12818
|
-
this.get(
|
|
12818
|
+
this.get(U.MIN_ZOOM)
|
|
12819
12819
|
);
|
|
12820
12820
|
}
|
|
12821
12821
|
/**
|
|
@@ -12828,7 +12828,7 @@ class $l extends Ht {
|
|
|
12828
12828
|
getMaxZoom() {
|
|
12829
12829
|
return (
|
|
12830
12830
|
/** @type {number} */
|
|
12831
|
-
this.get(
|
|
12831
|
+
this.get(U.MAX_ZOOM)
|
|
12832
12832
|
);
|
|
12833
12833
|
}
|
|
12834
12834
|
/**
|
|
@@ -12840,7 +12840,7 @@ class $l extends Ht {
|
|
|
12840
12840
|
getOpacity() {
|
|
12841
12841
|
return (
|
|
12842
12842
|
/** @type {number} */
|
|
12843
|
-
this.get(
|
|
12843
|
+
this.get(U.OPACITY)
|
|
12844
12844
|
);
|
|
12845
12845
|
}
|
|
12846
12846
|
/**
|
|
@@ -12860,7 +12860,7 @@ class $l extends Ht {
|
|
|
12860
12860
|
getVisible() {
|
|
12861
12861
|
return (
|
|
12862
12862
|
/** @type {boolean} */
|
|
12863
|
-
this.get(
|
|
12863
|
+
this.get(U.VISIBLE)
|
|
12864
12864
|
);
|
|
12865
12865
|
}
|
|
12866
12866
|
/**
|
|
@@ -12873,7 +12873,7 @@ class $l extends Ht {
|
|
|
12873
12873
|
getZIndex() {
|
|
12874
12874
|
return (
|
|
12875
12875
|
/** @type {number|undefined} */
|
|
12876
|
-
this.get(
|
|
12876
|
+
this.get(U.Z_INDEX)
|
|
12877
12877
|
);
|
|
12878
12878
|
}
|
|
12879
12879
|
/**
|
|
@@ -12891,7 +12891,7 @@ class $l extends Ht {
|
|
|
12891
12891
|
* @api
|
|
12892
12892
|
*/
|
|
12893
12893
|
setExtent(t) {
|
|
12894
|
-
this.set(
|
|
12894
|
+
this.set(U.EXTENT, t);
|
|
12895
12895
|
}
|
|
12896
12896
|
/**
|
|
12897
12897
|
* Set the maximum resolution at which the layer is visible.
|
|
@@ -12900,7 +12900,7 @@ class $l extends Ht {
|
|
|
12900
12900
|
* @api
|
|
12901
12901
|
*/
|
|
12902
12902
|
setMaxResolution(t) {
|
|
12903
|
-
this.set(
|
|
12903
|
+
this.set(U.MAX_RESOLUTION, t);
|
|
12904
12904
|
}
|
|
12905
12905
|
/**
|
|
12906
12906
|
* Set the minimum resolution at which the layer is visible.
|
|
@@ -12909,7 +12909,7 @@ class $l extends Ht {
|
|
|
12909
12909
|
* @api
|
|
12910
12910
|
*/
|
|
12911
12911
|
setMinResolution(t) {
|
|
12912
|
-
this.set(
|
|
12912
|
+
this.set(U.MIN_RESOLUTION, t);
|
|
12913
12913
|
}
|
|
12914
12914
|
/**
|
|
12915
12915
|
* Set the maximum zoom (exclusive) at which the layer is visible.
|
|
@@ -12920,7 +12920,7 @@ class $l extends Ht {
|
|
|
12920
12920
|
* @api
|
|
12921
12921
|
*/
|
|
12922
12922
|
setMaxZoom(t) {
|
|
12923
|
-
this.set(
|
|
12923
|
+
this.set(U.MAX_ZOOM, t);
|
|
12924
12924
|
}
|
|
12925
12925
|
/**
|
|
12926
12926
|
* Set the minimum zoom (inclusive) at which the layer is visible.
|
|
@@ -12931,7 +12931,7 @@ class $l extends Ht {
|
|
|
12931
12931
|
* @api
|
|
12932
12932
|
*/
|
|
12933
12933
|
setMinZoom(t) {
|
|
12934
|
-
this.set(
|
|
12934
|
+
this.set(U.MIN_ZOOM, t);
|
|
12935
12935
|
}
|
|
12936
12936
|
/**
|
|
12937
12937
|
* Set the opacity of the layer, allowed values range from 0 to 1.
|
|
@@ -12940,7 +12940,7 @@ class $l extends Ht {
|
|
|
12940
12940
|
* @api
|
|
12941
12941
|
*/
|
|
12942
12942
|
setOpacity(t) {
|
|
12943
|
-
nt(typeof t == "number", "Layer opacity must be a number"), this.set(
|
|
12943
|
+
nt(typeof t == "number", "Layer opacity must be a number"), this.set(U.OPACITY, t);
|
|
12944
12944
|
}
|
|
12945
12945
|
/**
|
|
12946
12946
|
* Set the visibility of the layer (`true` or `false`).
|
|
@@ -12949,7 +12949,7 @@ class $l extends Ht {
|
|
|
12949
12949
|
* @api
|
|
12950
12950
|
*/
|
|
12951
12951
|
setVisible(t) {
|
|
12952
|
-
this.set(
|
|
12952
|
+
this.set(U.VISIBLE, t);
|
|
12953
12953
|
}
|
|
12954
12954
|
/**
|
|
12955
12955
|
* Set Z-index of the layer, which is used to order layers before rendering.
|
|
@@ -12959,7 +12959,7 @@ class $l extends Ht {
|
|
|
12959
12959
|
* @api
|
|
12960
12960
|
*/
|
|
12961
12961
|
setZIndex(t) {
|
|
12962
|
-
this.set(
|
|
12962
|
+
this.set(U.Z_INDEX, t);
|
|
12963
12963
|
}
|
|
12964
12964
|
/**
|
|
12965
12965
|
* Clean up.
|
|
@@ -12976,7 +12976,7 @@ let vs = class extends $l {
|
|
|
12976
12976
|
constructor(t) {
|
|
12977
12977
|
const e = Object.assign({}, t);
|
|
12978
12978
|
delete e.source, super(e), this.on, this.once, this.un, this.mapPrecomposeKey_ = null, this.mapRenderKey_ = null, this.sourceChangeKey_ = null, this.renderer_ = null, this.sourceReady_ = !1, this.rendered = !1, t.render && (this.render = t.render), t.map && this.setMap(t.map), this.addChangeListener(
|
|
12979
|
-
|
|
12979
|
+
U.SOURCE,
|
|
12980
12980
|
this.handleSourcePropertyChange_
|
|
12981
12981
|
);
|
|
12982
12982
|
const i = t.source ? (
|
|
@@ -13010,7 +13010,7 @@ let vs = class extends $l {
|
|
|
13010
13010
|
getSource() {
|
|
13011
13011
|
return (
|
|
13012
13012
|
/** @type {SourceType} */
|
|
13013
|
-
this.get(
|
|
13013
|
+
this.get(U.SOURCE) || null
|
|
13014
13014
|
);
|
|
13015
13015
|
}
|
|
13016
13016
|
/**
|
|
@@ -13148,14 +13148,14 @@ let vs = class extends $l {
|
|
|
13148
13148
|
* @param {import("../Map.js").default|null} map Map.
|
|
13149
13149
|
*/
|
|
13150
13150
|
setMapInternal(t) {
|
|
13151
|
-
t || this.unrender(), this.set(
|
|
13151
|
+
t || this.unrender(), this.set(U.MAP, t);
|
|
13152
13152
|
}
|
|
13153
13153
|
/**
|
|
13154
13154
|
* For use inside the library only.
|
|
13155
13155
|
* @return {import("../Map.js").default|null} Map.
|
|
13156
13156
|
*/
|
|
13157
13157
|
getMapInternal() {
|
|
13158
|
-
return this.get(
|
|
13158
|
+
return this.get(U.MAP);
|
|
13159
13159
|
}
|
|
13160
13160
|
/**
|
|
13161
13161
|
* Sets the layer to be rendered on top of other layers on a map. The map will
|
|
@@ -13199,7 +13199,7 @@ let vs = class extends $l {
|
|
|
13199
13199
|
* @api
|
|
13200
13200
|
*/
|
|
13201
13201
|
setSource(t) {
|
|
13202
|
-
this.set(
|
|
13202
|
+
this.set(U.SOURCE, t);
|
|
13203
13203
|
}
|
|
13204
13204
|
/**
|
|
13205
13205
|
* Get the renderer for this layer.
|
|
@@ -13427,7 +13427,7 @@ class Li extends Jl {
|
|
|
13427
13427
|
* @override
|
|
13428
13428
|
*/
|
|
13429
13429
|
createRenderer() {
|
|
13430
|
-
return new
|
|
13430
|
+
return new ju(this);
|
|
13431
13431
|
}
|
|
13432
13432
|
}
|
|
13433
13433
|
const it = {
|
|
@@ -14030,7 +14030,7 @@ class Ts extends Oe {
|
|
|
14030
14030
|
*/
|
|
14031
14031
|
computeExtent(t) {
|
|
14032
14032
|
const e = this.flatCoordinates, i = e[this.stride] - e[0];
|
|
14033
|
-
return
|
|
14033
|
+
return Ue(
|
|
14034
14034
|
e[0] - i,
|
|
14035
14035
|
e[1] - i,
|
|
14036
14036
|
e[0] + i,
|
|
@@ -14466,7 +14466,7 @@ class ne extends Oe {
|
|
|
14466
14466
|
* @api
|
|
14467
14467
|
*/
|
|
14468
14468
|
forEachSegment(t) {
|
|
14469
|
-
return
|
|
14469
|
+
return Ul(
|
|
14470
14470
|
this.flatCoordinates,
|
|
14471
14471
|
0,
|
|
14472
14472
|
this.flatCoordinates.length,
|
|
@@ -14859,7 +14859,7 @@ class Ri extends Oe {
|
|
|
14859
14859
|
* @override
|
|
14860
14860
|
*/
|
|
14861
14861
|
intersectsExtent(t) {
|
|
14862
|
-
return
|
|
14862
|
+
return jd(
|
|
14863
14863
|
this.flatCoordinates,
|
|
14864
14864
|
0,
|
|
14865
14865
|
this.ends_,
|
|
@@ -15138,7 +15138,7 @@ class vi extends Oe {
|
|
|
15138
15138
|
* @override
|
|
15139
15139
|
*/
|
|
15140
15140
|
containsXY(t, e) {
|
|
15141
|
-
return
|
|
15141
|
+
return Vd(
|
|
15142
15142
|
this.getOrientedFlatCoordinates(),
|
|
15143
15143
|
0,
|
|
15144
15144
|
this.endss_,
|
|
@@ -15206,7 +15206,7 @@ class vi extends Oe {
|
|
|
15206
15206
|
this.endss_,
|
|
15207
15207
|
this.stride
|
|
15208
15208
|
);
|
|
15209
|
-
this.flatInteriorPoints_ =
|
|
15209
|
+
this.flatInteriorPoints_ = Zl(
|
|
15210
15210
|
this.getOrientedFlatCoordinates(),
|
|
15211
15211
|
0,
|
|
15212
15212
|
this.endss_,
|
|
@@ -15285,7 +15285,7 @@ class vi extends Oe {
|
|
|
15285
15285
|
if (e !== 0)
|
|
15286
15286
|
for (let r = 0, o = i.length; r < o; ++r)
|
|
15287
15287
|
i[r] -= e;
|
|
15288
|
-
return new
|
|
15288
|
+
return new Ut(
|
|
15289
15289
|
this.flatCoordinates.slice(e, s),
|
|
15290
15290
|
this.layout,
|
|
15291
15291
|
i
|
|
@@ -15304,7 +15304,7 @@ class vi extends Oe {
|
|
|
15304
15304
|
if (r !== 0)
|
|
15305
15305
|
for (let u = 0, d = l.length; u < d; ++u)
|
|
15306
15306
|
l[u] -= r;
|
|
15307
|
-
const c = new
|
|
15307
|
+
const c = new Ut(
|
|
15308
15308
|
e.slice(r, h),
|
|
15309
15309
|
t,
|
|
15310
15310
|
l
|
|
@@ -15422,7 +15422,7 @@ class Ft {
|
|
|
15422
15422
|
getFlatInteriorPoints() {
|
|
15423
15423
|
if (!this.flatInteriorPoints_) {
|
|
15424
15424
|
const t = Kd(this.flatCoordinates_, this.ends_), e = Ql(this.flatCoordinates_, 0, t, 2);
|
|
15425
|
-
this.flatInteriorPoints_ =
|
|
15425
|
+
this.flatInteriorPoints_ = Zl(
|
|
15426
15426
|
this.flatCoordinates_,
|
|
15427
15427
|
0,
|
|
15428
15428
|
t,
|
|
@@ -15795,7 +15795,7 @@ class as {
|
|
|
15795
15795
|
*/
|
|
15796
15796
|
getExtent(t) {
|
|
15797
15797
|
const e = this.rbush_.toJSON();
|
|
15798
|
-
return
|
|
15798
|
+
return Ue(e.minX, e.minY, e.maxX, e.maxY, t);
|
|
15799
15799
|
}
|
|
15800
15800
|
/**
|
|
15801
15801
|
* @param {RBush<T>} rbush R-Tree.
|
|
@@ -15811,7 +15811,7 @@ class th extends Ht {
|
|
|
15811
15811
|
* @param {Options} options Source options.
|
|
15812
15812
|
*/
|
|
15813
15813
|
constructor(t) {
|
|
15814
|
-
super(), this.projection = rt(t.projection), this.attributions_ =
|
|
15814
|
+
super(), this.projection = rt(t.projection), this.attributions_ = Va(t.attributions), this.attributionsCollapsible_ = t.attributionsCollapsible ?? !0, this.loading = !1, this.state_ = t.state !== void 0 ? t.state : "ready", this.wrapX_ = t.wrapX !== void 0 ? t.wrapX : !1, this.interpolate_ = !!t.interpolate, this.viewResolver = null, this.viewRejector = null;
|
|
15815
15815
|
const e = this;
|
|
15816
15816
|
this.viewPromise_ = new Promise(function(i, s) {
|
|
15817
15817
|
e.viewResolver = i, e.viewRejector = s;
|
|
@@ -15888,7 +15888,7 @@ class th extends Ht {
|
|
|
15888
15888
|
* @api
|
|
15889
15889
|
*/
|
|
15890
15890
|
setAttributions(t) {
|
|
15891
|
-
this.attributions_ =
|
|
15891
|
+
this.attributions_ = Va(t), this.changed();
|
|
15892
15892
|
}
|
|
15893
15893
|
/**
|
|
15894
15894
|
* Set the state of the source.
|
|
@@ -15898,7 +15898,7 @@ class th extends Ht {
|
|
|
15898
15898
|
this.state_ = t, this.changed();
|
|
15899
15899
|
}
|
|
15900
15900
|
}
|
|
15901
|
-
function
|
|
15901
|
+
function Va(n) {
|
|
15902
15902
|
return n ? typeof n == "function" ? n : (Array.isArray(n) || (n = [n]), (t) => n) : null;
|
|
15903
15903
|
}
|
|
15904
15904
|
const Ct = {
|
|
@@ -16590,7 +16590,7 @@ class Tn extends th {
|
|
|
16590
16590
|
this.overlaps_ = t, this.changed();
|
|
16591
16591
|
}
|
|
16592
16592
|
}
|
|
16593
|
-
const
|
|
16593
|
+
const X = {
|
|
16594
16594
|
/**
|
|
16595
16595
|
* A true single click with no dragging and no double click. Note that this
|
|
16596
16596
|
* event is delayed by 250 ms to ensure that it is not a double click.
|
|
@@ -16727,7 +16727,7 @@ class df extends Ai {
|
|
|
16727
16727
|
*/
|
|
16728
16728
|
handleEvent(t) {
|
|
16729
16729
|
let e = !1;
|
|
16730
|
-
if (t.type ==
|
|
16730
|
+
if (t.type == X.DBLCLICK) {
|
|
16731
16731
|
const i = (
|
|
16732
16732
|
/** @type {MouseEvent} */
|
|
16733
16733
|
t.originalEvent
|
|
@@ -16759,12 +16759,12 @@ const ff = function(n) {
|
|
|
16759
16759
|
const t = n.map.getTargetElement(), e = t.getRootNode();
|
|
16760
16760
|
return (e instanceof ShadowRoot ? e.host : t).hasAttribute("tabindex") ? _f(n) : !0;
|
|
16761
16761
|
}, yn = Kt, mf = function(n) {
|
|
16762
|
-
return n.type ==
|
|
16762
|
+
return n.type == X.CLICK;
|
|
16763
16763
|
}, ih = function(n) {
|
|
16764
16764
|
const t = n.originalEvent;
|
|
16765
|
-
return "pointerId" in t && t.button == 0 && !(
|
|
16765
|
+
return "pointerId" in t && t.button == 0 && !(Uh && Yr && t.ctrlKey);
|
|
16766
16766
|
}, Lr = Qe, nh = function(n) {
|
|
16767
|
-
return n.type ==
|
|
16767
|
+
return n.type == X.SINGLECLICK;
|
|
16768
16768
|
}, vo = function(n) {
|
|
16769
16769
|
const t = (
|
|
16770
16770
|
/** @type {KeyboardEvent|MouseEvent|TouchEvent} */
|
|
@@ -16850,7 +16850,7 @@ class xf extends io {
|
|
|
16850
16850
|
this.map_.getCoordinateFromPixelInternal,
|
|
16851
16851
|
this.map_
|
|
16852
16852
|
);
|
|
16853
|
-
s[4] = s[0].slice(), this.geometry_ ? this.geometry_.setCoordinates([s]) : this.geometry_ = new
|
|
16853
|
+
s[4] = s[0].slice(), this.geometry_ ? this.geometry_.setCoordinates([s]) : this.geometry_ = new Ut([s]);
|
|
16854
16854
|
}
|
|
16855
16855
|
/**
|
|
16856
16856
|
* @return {import("../geom/Polygon.js").default} Geometry.
|
|
@@ -16908,16 +16908,16 @@ class we extends Ai {
|
|
|
16908
16908
|
return !0;
|
|
16909
16909
|
let e = !1;
|
|
16910
16910
|
if (this.updateTrackedPointers_(t), this.handlingDownUpSequence) {
|
|
16911
|
-
if (t.type ==
|
|
16911
|
+
if (t.type == X.POINTERDRAG)
|
|
16912
16912
|
this.handleDragEvent(t), t.originalEvent.preventDefault();
|
|
16913
|
-
else if (t.type ==
|
|
16913
|
+
else if (t.type == X.POINTERUP) {
|
|
16914
16914
|
const i = this.handleUpEvent(t);
|
|
16915
16915
|
this.handlingDownUpSequence = i && this.targetPointers.length > 0;
|
|
16916
16916
|
}
|
|
16917
|
-
} else if (t.type ==
|
|
16917
|
+
} else if (t.type == X.POINTERDOWN) {
|
|
16918
16918
|
const i = this.handleDownEvent(t);
|
|
16919
16919
|
this.handlingDownUpSequence = i, e = this.stopDown(i);
|
|
16920
|
-
} else t.type ==
|
|
16920
|
+
} else t.type == X.POINTERMOVE && this.handleMoveEvent(t);
|
|
16921
16921
|
return !e;
|
|
16922
16922
|
}
|
|
16923
16923
|
/**
|
|
@@ -16986,7 +16986,7 @@ const oi = {
|
|
|
16986
16986
|
*/
|
|
16987
16987
|
BOXCANCEL: "boxcancel"
|
|
16988
16988
|
};
|
|
16989
|
-
class
|
|
16989
|
+
class Xi extends Lt {
|
|
16990
16990
|
/**
|
|
16991
16991
|
* @param {string} type The event type.
|
|
16992
16992
|
* @param {import("../coordinate.js").Coordinate} coordinate The event coordinate.
|
|
@@ -17031,7 +17031,7 @@ class Ef extends we {
|
|
|
17031
17031
|
*/
|
|
17032
17032
|
handleDragEvent(t) {
|
|
17033
17033
|
this.startPixel_ && (this.box_.setPixels(this.startPixel_, t.pixel), this.dispatchEvent(
|
|
17034
|
-
new
|
|
17034
|
+
new Xi(
|
|
17035
17035
|
oi.BOXDRAG,
|
|
17036
17036
|
t.coordinate,
|
|
17037
17037
|
t
|
|
@@ -17053,7 +17053,7 @@ class Ef extends we {
|
|
|
17053
17053
|
t.pixel
|
|
17054
17054
|
);
|
|
17055
17055
|
return e && this.onBoxEnd(t), this.dispatchEvent(
|
|
17056
|
-
new
|
|
17056
|
+
new Xi(
|
|
17057
17057
|
e ? oi.BOXEND : oi.BOXCANCEL,
|
|
17058
17058
|
t.coordinate,
|
|
17059
17059
|
t
|
|
@@ -17068,7 +17068,7 @@ class Ef extends we {
|
|
|
17068
17068
|
*/
|
|
17069
17069
|
handleDownEvent(t) {
|
|
17070
17070
|
return this.condition_(t) ? (this.startPixel_ = t.pixel, this.box_.setMap(t.map), this.box_.setPixels(this.startPixel_, this.startPixel_), this.dispatchEvent(
|
|
17071
|
-
new
|
|
17071
|
+
new Xi(
|
|
17072
17072
|
oi.BOXSTART,
|
|
17073
17073
|
t.coordinate,
|
|
17074
17074
|
t
|
|
@@ -17090,7 +17090,7 @@ class Ef extends we {
|
|
|
17090
17090
|
*/
|
|
17091
17091
|
setActive(t) {
|
|
17092
17092
|
t || (this.box_.setMap(null), this.startPixel_ && (this.dispatchEvent(
|
|
17093
|
-
new
|
|
17093
|
+
new Xi(oi.BOXCANCEL, this.startPixel_, null)
|
|
17094
17094
|
), this.startPixel_ = null)), super.setActive(t);
|
|
17095
17095
|
}
|
|
17096
17096
|
/**
|
|
@@ -17099,7 +17099,7 @@ class Ef extends we {
|
|
|
17099
17099
|
*/
|
|
17100
17100
|
setMap(t) {
|
|
17101
17101
|
this.getMap() && (this.box_.setMap(null), this.startPixel_ && (this.dispatchEvent(
|
|
17102
|
-
new
|
|
17102
|
+
new Xi(oi.BOXCANCEL, this.startPixel_, null)
|
|
17103
17103
|
), this.startPixel_ = null)), super.setMap(t);
|
|
17104
17104
|
}
|
|
17105
17105
|
}
|
|
@@ -17316,7 +17316,7 @@ class ue extends ui {
|
|
|
17316
17316
|
super.stopPropagation(), "stopPropagation" in this.originalEvent && this.originalEvent.stopPropagation();
|
|
17317
17317
|
}
|
|
17318
17318
|
}
|
|
17319
|
-
const
|
|
17319
|
+
const Vn = {
|
|
17320
17320
|
/**
|
|
17321
17321
|
* Triggered upon feature draw start
|
|
17322
17322
|
* @event DrawEvent#drawstart
|
|
@@ -17336,7 +17336,7 @@ const jn = {
|
|
|
17336
17336
|
*/
|
|
17337
17337
|
DRAWABORT: "drawabort"
|
|
17338
17338
|
};
|
|
17339
|
-
class
|
|
17339
|
+
class jn extends Lt {
|
|
17340
17340
|
/**
|
|
17341
17341
|
* @param {DrawEventType} type Type.
|
|
17342
17342
|
* @param {Feature} feature The feature drawn.
|
|
@@ -17353,7 +17353,7 @@ function If(n, t) {
|
|
|
17353
17353
|
}
|
|
17354
17354
|
return e;
|
|
17355
17355
|
}
|
|
17356
|
-
function
|
|
17356
|
+
function Xn(n, t) {
|
|
17357
17357
|
return _e(n[0], n[1], t[0], t[1]);
|
|
17358
17358
|
}
|
|
17359
17359
|
function fi(n, t) {
|
|
@@ -17366,20 +17366,20 @@ function Bn(n, t, e) {
|
|
|
17366
17366
|
const r = Math.ceil(i), o = Math.floor(s);
|
|
17367
17367
|
if (r > o) {
|
|
17368
17368
|
const l = gi(n, i), h = gi(n, s);
|
|
17369
|
-
return
|
|
17369
|
+
return Xn(l, h);
|
|
17370
17370
|
}
|
|
17371
17371
|
let a = 0;
|
|
17372
17372
|
if (i < r) {
|
|
17373
17373
|
const l = gi(n, i), h = fi(n, r);
|
|
17374
|
-
a +=
|
|
17374
|
+
a += Xn(l, h);
|
|
17375
17375
|
}
|
|
17376
17376
|
if (o < s) {
|
|
17377
17377
|
const l = fi(n, o), h = gi(n, s);
|
|
17378
|
-
a +=
|
|
17378
|
+
a += Xn(l, h);
|
|
17379
17379
|
}
|
|
17380
17380
|
for (let l = r; l < o - 1; ++l) {
|
|
17381
17381
|
const h = fi(n, l), c = fi(n, l + 1);
|
|
17382
|
-
a +=
|
|
17382
|
+
a += Xn(h, c);
|
|
17383
17383
|
}
|
|
17384
17384
|
return a;
|
|
17385
17385
|
}
|
|
@@ -17394,7 +17394,7 @@ function oh(n, t, e) {
|
|
|
17394
17394
|
Yn(n, i[s], !1, e);
|
|
17395
17395
|
return;
|
|
17396
17396
|
}
|
|
17397
|
-
if (t instanceof
|
|
17397
|
+
if (t instanceof Ut) {
|
|
17398
17398
|
const i = t.getCoordinates();
|
|
17399
17399
|
for (let s = 0, r = i.length; s < r; ++s)
|
|
17400
17400
|
Yn(n, i[s], !0, e);
|
|
@@ -17526,7 +17526,7 @@ class vf extends we {
|
|
|
17526
17526
|
};
|
|
17527
17527
|
else {
|
|
17528
17528
|
let r;
|
|
17529
|
-
s === "Point" ? r = vt : s === "LineString" ? r = ne : s === "Polygon" && (r =
|
|
17529
|
+
s === "Point" ? r = vt : s === "LineString" ? r = ne : s === "Polygon" && (r = Ut), i = (o, a, l) => (a ? s === "Polygon" ? o[0].length ? a.setCoordinates(
|
|
17530
17530
|
[o[0].concat([o[0][0]])],
|
|
17531
17531
|
this.geometryLayout_
|
|
17532
17532
|
) : a.setCoordinates([], this.geometryLayout_) : a.setCoordinates(o, this.geometryLayout_) : a = new r(o, this.geometryLayout_), a);
|
|
@@ -17578,8 +17578,8 @@ class vf extends we {
|
|
|
17578
17578
|
*/
|
|
17579
17579
|
handleEvent(t) {
|
|
17580
17580
|
t.originalEvent.type === D.CONTEXTMENU && t.originalEvent.preventDefault(), this.freehand_ = this.mode_ !== "Point" && this.freehandCondition_(t);
|
|
17581
|
-
let e = t.type ===
|
|
17582
|
-
return !this.freehand_ && this.lastDragTime_ && t.type ===
|
|
17581
|
+
let e = t.type === X.POINTERMOVE, i = !0;
|
|
17582
|
+
return !this.freehand_ && this.lastDragTime_ && t.type === X.POINTERDRAG && (Date.now() - this.lastDragTime_ >= this.dragVertexDelay_ ? (this.downPx_ = t.pixel, this.shouldHandle_ = !this.freehand_, e = !0) : this.lastDragTime_ = void 0, this.shouldHandle_ && this.downTimeout_ !== void 0 && (clearTimeout(this.downTimeout_), this.downTimeout_ = void 0)), this.freehand_ && t.type === X.POINTERDRAG && this.sketchFeature_ !== null ? (this.addToDrawing_(t.coordinate), i = !1) : this.freehand_ && t.type === X.POINTERDOWN ? i = !1 : e && this.getPointerCount() < 2 ? (i = t.type === X.POINTERMOVE, i && this.freehand_ ? (this.handlePointerMove_(t), this.shouldHandle_ && t.originalEvent.preventDefault()) : (t.originalEvent.pointerType === "mouse" || t.type === X.POINTERDRAG && this.downTimeout_ === void 0) && this.handlePointerMove_(t)) : t.type === X.DBLCLICK && (i = !1), super.handleEvent(t) && i;
|
|
17583
17583
|
}
|
|
17584
17584
|
/**
|
|
17585
17585
|
* Handle pointer down events.
|
|
@@ -17591,7 +17591,7 @@ class vf extends we {
|
|
|
17591
17591
|
return this.shouldHandle_ = !this.freehand_, this.freehand_ ? (this.downPx_ = t.pixel, this.finishCoordinate_ || this.startDrawing_(t.coordinate), !0) : this.condition_(t) ? (this.lastDragTime_ = Date.now(), this.downTimeout_ = setTimeout(() => {
|
|
17592
17592
|
this.handlePointerMove_(
|
|
17593
17593
|
new ue(
|
|
17594
|
-
|
|
17594
|
+
X.POINTERMOVE,
|
|
17595
17595
|
t.map,
|
|
17596
17596
|
t.originalEvent,
|
|
17597
17597
|
!1,
|
|
@@ -17846,7 +17846,7 @@ class vf extends we {
|
|
|
17846
17846
|
e
|
|
17847
17847
|
);
|
|
17848
17848
|
this.sketchFeature_ = new ut(), this.geometryName_ && this.sketchFeature_.setGeometryName(this.geometryName_), this.sketchFeature_.setGeometry(s), this.updateSketchFeatures_(), this.dispatchEvent(
|
|
17849
|
-
new
|
|
17849
|
+
new jn(Vn.DRAWSTART, this.sketchFeature_)
|
|
17850
17850
|
);
|
|
17851
17851
|
}
|
|
17852
17852
|
/**
|
|
@@ -17957,7 +17957,7 @@ class vf extends we {
|
|
|
17957
17957
|
/** @type {PolyCoordType} */
|
|
17958
17958
|
e
|
|
17959
17959
|
])
|
|
17960
|
-
), this.dispatchEvent(new
|
|
17960
|
+
), this.dispatchEvent(new jn(Vn.DRAWEND, t)), this.features_ && this.features_.push(t), this.source_ && this.source_.addFeature(t), t;
|
|
17961
17961
|
}
|
|
17962
17962
|
/**
|
|
17963
17963
|
* Stop drawing without adding the sketch feature to the target layer.
|
|
@@ -17975,7 +17975,7 @@ class vf extends we {
|
|
|
17975
17975
|
*/
|
|
17976
17976
|
abortDrawing() {
|
|
17977
17977
|
const t = this.abortDrawing_();
|
|
17978
|
-
t && this.dispatchEvent(new
|
|
17978
|
+
t && this.dispatchEvent(new jn(Vn.DRAWABORT, t));
|
|
17979
17979
|
}
|
|
17980
17980
|
/**
|
|
17981
17981
|
* Append coordinates to the end of the geometry that is currently being drawn.
|
|
@@ -18023,7 +18023,7 @@ class vf extends we {
|
|
|
18023
18023
|
this.sketchFeature_ = t, this.sketchCoords_ = i.getCoordinates();
|
|
18024
18024
|
const s = this.sketchCoords_[this.sketchCoords_.length - 1];
|
|
18025
18025
|
this.finishCoordinate_ = s.slice(), this.sketchCoords_.push(s.slice()), this.sketchPoint_ = new ut(new vt(s)), this.updateSketchFeatures_(), this.dispatchEvent(
|
|
18026
|
-
new
|
|
18026
|
+
new jn(Vn.DRAWSTART, this.sketchFeature_)
|
|
18027
18027
|
);
|
|
18028
18028
|
}
|
|
18029
18029
|
/**
|
|
@@ -18171,7 +18171,7 @@ const de = {
|
|
|
18171
18171
|
* @api
|
|
18172
18172
|
*/
|
|
18173
18173
|
LOADEND: "loadend"
|
|
18174
|
-
},
|
|
18174
|
+
}, ja = 0, tn = 1, Xa = [0, 0, 0, 0], pi = [], sr = {
|
|
18175
18175
|
/**
|
|
18176
18176
|
* Triggered upon feature modification start
|
|
18177
18177
|
* @event ModifyEvent#modifystart
|
|
@@ -18509,7 +18509,7 @@ class Af extends we {
|
|
|
18509
18509
|
const i = e.getCenter(), s = {
|
|
18510
18510
|
feature: t,
|
|
18511
18511
|
geometry: e,
|
|
18512
|
-
index:
|
|
18512
|
+
index: ja,
|
|
18513
18513
|
segment: [i, i]
|
|
18514
18514
|
}, r = {
|
|
18515
18515
|
feature: t,
|
|
@@ -18559,7 +18559,7 @@ class Af extends we {
|
|
|
18559
18559
|
return !0;
|
|
18560
18560
|
this.lastPointerEvent_ = t;
|
|
18561
18561
|
let e;
|
|
18562
|
-
return !t.map.getView().getInteracting() && t.type ==
|
|
18562
|
+
return !t.map.getView().getInteracting() && t.type == X.POINTERMOVE && !this.handlingDownUpSequence && this.handlePointerMove_(t), this.vertexFeature_ && this.deleteCondition_(t) && (t.type != X.SINGLECLICK || !this.ignoreNextSingleClick_ ? e = this.removePoint() : e = !0), t.type == X.SINGLECLICK && (this.ignoreNextSingleClick_ = !1), super.handleEvent(t) && !e;
|
|
18563
18563
|
}
|
|
18564
18564
|
findInsertVerticesAndUpdateDragSegments_(t) {
|
|
18565
18565
|
this.handlePointerAtPixel_(t), this.dragSegments_.length = 0, this.featuresBeingModified_ = null;
|
|
@@ -18659,7 +18659,7 @@ class Af extends we {
|
|
|
18659
18659
|
/** @type {import("../geom/Circle.js").default} */
|
|
18660
18660
|
c
|
|
18661
18661
|
);
|
|
18662
|
-
if (f[0] = e, f[1] = e, l.index ===
|
|
18662
|
+
if (f[0] = e, f[1] = e, l.index === ja)
|
|
18663
18663
|
this.changingFeature_ = !0, m.setCenter(e), this.changingFeature_ = !1;
|
|
18664
18664
|
else {
|
|
18665
18665
|
this.changingFeature_ = !0, t.map.getView().getProjection();
|
|
@@ -18773,9 +18773,9 @@ class Af extends we {
|
|
|
18773
18773
|
}
|
|
18774
18774
|
if (!r) {
|
|
18775
18775
|
const a = Me(
|
|
18776
|
-
$i(t,
|
|
18776
|
+
$i(t, Xa)
|
|
18777
18777
|
), l = e.getView().getResolution() * this.pixelTolerance_, h = _s(
|
|
18778
|
-
pn(a, l,
|
|
18778
|
+
pn(a, l, Xa)
|
|
18779
18779
|
);
|
|
18780
18780
|
r = this.rBush_.getInExtent(h);
|
|
18781
18781
|
}
|
|
@@ -18912,7 +18912,7 @@ class Af extends we {
|
|
|
18912
18912
|
if (t && (t = H(
|
|
18913
18913
|
t,
|
|
18914
18914
|
this.getMap().getView().getProjection()
|
|
18915
|
-
), this.updatePointer_(t)), !this.lastPointerEvent_ || this.lastPointerEvent_ && this.lastPointerEvent_.type !=
|
|
18915
|
+
), this.updatePointer_(t)), !this.lastPointerEvent_ || this.lastPointerEvent_ && this.lastPointerEvent_.type != X.POINTERDRAG) {
|
|
18916
18916
|
const e = this.lastPointerEvent_;
|
|
18917
18917
|
this.willModifyFeatures_(
|
|
18918
18918
|
e,
|
|
@@ -19062,7 +19062,7 @@ function Ya(n, t, e) {
|
|
|
19062
19062
|
);
|
|
19063
19063
|
const s = H(n);
|
|
19064
19064
|
return pi[0] = H(t.segment[0]), pi[1] = H(t.segment[1]), De(
|
|
19065
|
-
|
|
19065
|
+
Xr(s, pi)
|
|
19066
19066
|
);
|
|
19067
19067
|
}
|
|
19068
19068
|
function bf() {
|
|
@@ -19307,7 +19307,7 @@ class Mo extends Ai {
|
|
|
19307
19307
|
* @param {Options} [options] Options.
|
|
19308
19308
|
*/
|
|
19309
19309
|
constructor(t) {
|
|
19310
|
-
super(), this.on, this.once, this.un, t = t || {}, this.boundAddFeature_ = this.addFeature_.bind(this), this.boundRemoveFeature_ = this.removeFeature_.bind(this), this.condition_ = t.condition ? t.condition : nh, this.addCondition_ = t.addCondition ? t.addCondition : Lr, this.removeCondition_ = t.removeCondition ? t.removeCondition : Lr, this.toggleCondition_ = t.toggleCondition ? t.toggleCondition : To, this.multi_ = t.multi ? t.multi : !1, this.filter_ = t.filter ? t.filter : Kt, this.hitTolerance_ = t.hitTolerance ? t.hitTolerance : 0, this.style_ = t.style !== void 0 ? t.style :
|
|
19310
|
+
super(), this.on, this.once, this.un, t = t || {}, this.boundAddFeature_ = this.addFeature_.bind(this), this.boundRemoveFeature_ = this.removeFeature_.bind(this), this.condition_ = t.condition ? t.condition : nh, this.addCondition_ = t.addCondition ? t.addCondition : Lr, this.removeCondition_ = t.removeCondition ? t.removeCondition : Lr, this.toggleCondition_ = t.toggleCondition ? t.toggleCondition : To, this.multi_ = t.multi ? t.multi : !1, this.filter_ = t.filter ? t.filter : Kt, this.hitTolerance_ = t.hitTolerance ? t.hitTolerance : 0, this.style_ = t.style !== void 0 ? t.style : Vf(), this.features_ = t.features || new wt();
|
|
19311
19311
|
let e;
|
|
19312
19312
|
if (t.layers)
|
|
19313
19313
|
if (typeof t.layers == "function")
|
|
@@ -19515,7 +19515,7 @@ class Mo extends Ai {
|
|
|
19515
19515
|
), !0;
|
|
19516
19516
|
}
|
|
19517
19517
|
}
|
|
19518
|
-
function
|
|
19518
|
+
function Vf() {
|
|
19519
19519
|
const n = ho();
|
|
19520
19520
|
return Gt(n.Polygon, n.LineString), Gt(n.GeometryCollection, n.LineString), function(t) {
|
|
19521
19521
|
return t.getGeometry() ? n[t.getGeometry().getType()] : null;
|
|
@@ -19550,7 +19550,7 @@ const Ar = {
|
|
|
19550
19550
|
* @return {Array<Segment>} Segments
|
|
19551
19551
|
*/
|
|
19552
19552
|
Circle(n, t) {
|
|
19553
|
-
const i =
|
|
19553
|
+
const i = Zd(n);
|
|
19554
19554
|
return Ar.Polygon(i);
|
|
19555
19555
|
},
|
|
19556
19556
|
/**
|
|
@@ -19670,7 +19670,7 @@ function Ka(n) {
|
|
|
19670
19670
|
);
|
|
19671
19671
|
}
|
|
19672
19672
|
const lr = [], ce = [], ai = [];
|
|
19673
|
-
class
|
|
19673
|
+
class jf extends we {
|
|
19674
19674
|
/**
|
|
19675
19675
|
* @param {Options} [options] Options.
|
|
19676
19676
|
*/
|
|
@@ -19951,14 +19951,14 @@ class Xf extends we {
|
|
|
19951
19951
|
const p = o[_];
|
|
19952
19952
|
if (p.feature.getGeometry().getType() === "Circle") {
|
|
19953
19953
|
let C = p.feature.getGeometry();
|
|
19954
|
-
y =
|
|
19954
|
+
y = Xh(
|
|
19955
19955
|
s,
|
|
19956
19956
|
/** @type {import("../geom/Circle.js").default} */
|
|
19957
19957
|
C
|
|
19958
19958
|
);
|
|
19959
19959
|
} else {
|
|
19960
19960
|
const [C, x] = p.segment;
|
|
19961
|
-
x && (lr[0] = H(C), lr[1] = H(x), y =
|
|
19961
|
+
x && (lr[0] = H(C), lr[1] = H(x), y = Xr(s, lr));
|
|
19962
19962
|
}
|
|
19963
19963
|
if (y) {
|
|
19964
19964
|
const C = me(s, y);
|
|
@@ -20011,7 +20011,7 @@ class cr extends Lt {
|
|
|
20011
20011
|
super(t), this.features = e, this.coordinate = i, this.startCoordinate = s, this.mapBrowserEvent = r;
|
|
20012
20012
|
}
|
|
20013
20013
|
}
|
|
20014
|
-
class
|
|
20014
|
+
class Xf extends we {
|
|
20015
20015
|
/**
|
|
20016
20016
|
* @param {Options} [options] Options.
|
|
20017
20017
|
*/
|
|
@@ -20315,18 +20315,18 @@ class Kf extends ms {
|
|
|
20315
20315
|
*/
|
|
20316
20316
|
emulateClick_(t) {
|
|
20317
20317
|
let e = new ue(
|
|
20318
|
-
|
|
20318
|
+
X.CLICK,
|
|
20319
20319
|
this.map_,
|
|
20320
20320
|
t
|
|
20321
20321
|
);
|
|
20322
20322
|
this.dispatchEvent(e), this.clickTimeoutId_ !== void 0 ? (clearTimeout(this.clickTimeoutId_), this.clickTimeoutId_ = void 0, e = new ue(
|
|
20323
|
-
|
|
20323
|
+
X.DBLCLICK,
|
|
20324
20324
|
this.map_,
|
|
20325
20325
|
t
|
|
20326
20326
|
), this.dispatchEvent(e)) : this.clickTimeoutId_ = setTimeout(() => {
|
|
20327
20327
|
this.clickTimeoutId_ = void 0;
|
|
20328
20328
|
const i = new ue(
|
|
20329
|
-
|
|
20329
|
+
X.SINGLECLICK,
|
|
20330
20330
|
this.map_,
|
|
20331
20331
|
t
|
|
20332
20332
|
);
|
|
@@ -20342,14 +20342,14 @@ class Kf extends ms {
|
|
|
20342
20342
|
*/
|
|
20343
20343
|
updateActivePointers_(t) {
|
|
20344
20344
|
const e = t, i = e.pointerId;
|
|
20345
|
-
if (e.type ==
|
|
20345
|
+
if (e.type == X.POINTERUP || e.type == X.POINTERCANCEL) {
|
|
20346
20346
|
delete this.trackedTouches_[i];
|
|
20347
20347
|
for (const s in this.trackedTouches_)
|
|
20348
20348
|
if (this.trackedTouches_[s].target !== e.target) {
|
|
20349
20349
|
delete this.trackedTouches_[s];
|
|
20350
20350
|
break;
|
|
20351
20351
|
}
|
|
20352
|
-
} else (e.type ==
|
|
20352
|
+
} else (e.type == X.POINTERDOWN || e.type == X.POINTERMOVE) && (this.trackedTouches_[i] = e);
|
|
20353
20353
|
this.activePointers_ = Object.values(this.trackedTouches_);
|
|
20354
20354
|
}
|
|
20355
20355
|
/**
|
|
@@ -20360,7 +20360,7 @@ class Kf extends ms {
|
|
|
20360
20360
|
handlePointerUp_(t) {
|
|
20361
20361
|
this.updateActivePointers_(t);
|
|
20362
20362
|
const e = new ue(
|
|
20363
|
-
|
|
20363
|
+
X.POINTERUP,
|
|
20364
20364
|
this.map_,
|
|
20365
20365
|
t,
|
|
20366
20366
|
void 0,
|
|
@@ -20386,7 +20386,7 @@ class Kf extends ms {
|
|
|
20386
20386
|
handlePointerDown_(t) {
|
|
20387
20387
|
this.emulateClicks_ = this.activePointers_.length === 0, this.updateActivePointers_(t);
|
|
20388
20388
|
const e = new ue(
|
|
20389
|
-
|
|
20389
|
+
X.POINTERDOWN,
|
|
20390
20390
|
this.map_,
|
|
20391
20391
|
t,
|
|
20392
20392
|
void 0,
|
|
@@ -20401,11 +20401,11 @@ class Kf extends ms {
|
|
|
20401
20401
|
this.dragListenerKeys_.push(
|
|
20402
20402
|
W(
|
|
20403
20403
|
i,
|
|
20404
|
-
|
|
20404
|
+
X.POINTERMOVE,
|
|
20405
20405
|
this.handlePointerMove_,
|
|
20406
20406
|
this
|
|
20407
20407
|
),
|
|
20408
|
-
W(i,
|
|
20408
|
+
W(i, X.POINTERUP, this.handlePointerUp_, this),
|
|
20409
20409
|
/* Note that the listener for `pointercancel is set up on
|
|
20410
20410
|
* `pointerEventHandler_` and not `documentPointerEventHandler_` like
|
|
20411
20411
|
* the `pointerup` and `pointermove` listeners.
|
|
@@ -20421,14 +20421,14 @@ class Kf extends ms {
|
|
|
20421
20421
|
*/
|
|
20422
20422
|
W(
|
|
20423
20423
|
this.element_,
|
|
20424
|
-
|
|
20424
|
+
X.POINTERCANCEL,
|
|
20425
20425
|
this.handlePointerUp_,
|
|
20426
20426
|
this
|
|
20427
20427
|
)
|
|
20428
20428
|
), this.element_.getRootNode && this.element_.getRootNode() !== i && this.dragListenerKeys_.push(
|
|
20429
20429
|
W(
|
|
20430
20430
|
this.element_.getRootNode(),
|
|
20431
|
-
|
|
20431
|
+
X.POINTERUP,
|
|
20432
20432
|
this.handlePointerUp_,
|
|
20433
20433
|
this
|
|
20434
20434
|
)
|
|
@@ -20444,7 +20444,7 @@ class Kf extends ms {
|
|
|
20444
20444
|
if (this.isMoving_(t)) {
|
|
20445
20445
|
this.updateActivePointers_(t), this.dragging_ = !0;
|
|
20446
20446
|
const e = new ue(
|
|
20447
|
-
|
|
20447
|
+
X.POINTERDRAG,
|
|
20448
20448
|
this.map_,
|
|
20449
20449
|
t,
|
|
20450
20450
|
this.dragging_,
|
|
@@ -20465,7 +20465,7 @@ class Kf extends ms {
|
|
|
20465
20465
|
const e = !!(this.down_ && this.isMoving_(t));
|
|
20466
20466
|
this.dispatchEvent(
|
|
20467
20467
|
new ue(
|
|
20468
|
-
|
|
20468
|
+
X.POINTERMOVE,
|
|
20469
20469
|
this.map_,
|
|
20470
20470
|
t,
|
|
20471
20471
|
e
|
|
@@ -20510,7 +20510,7 @@ const Et = {
|
|
|
20510
20510
|
TARGET: "target",
|
|
20511
20511
|
VIEW: "view"
|
|
20512
20512
|
}, hs = 1 / 0;
|
|
20513
|
-
class
|
|
20513
|
+
class Zf {
|
|
20514
20514
|
/**
|
|
20515
20515
|
* @param {function(T): number} priorityFunction Priority function.
|
|
20516
20516
|
* @param {function(T): string} keyFunction Key function.
|
|
@@ -20652,7 +20652,7 @@ class Uf {
|
|
|
20652
20652
|
e.length = s, i.length = s, this.heapify_();
|
|
20653
20653
|
}
|
|
20654
20654
|
}
|
|
20655
|
-
class
|
|
20655
|
+
class Uf extends Zf {
|
|
20656
20656
|
/**
|
|
20657
20657
|
* @param {PriorityFunction} tilePriorityFunction Tile priority function.
|
|
20658
20658
|
* @param {function(): ?} tileChangeCallback Function called on each tile change event.
|
|
@@ -20854,7 +20854,7 @@ class qf extends Lo {
|
|
|
20854
20854
|
* @private
|
|
20855
20855
|
*/
|
|
20856
20856
|
handleToggle_() {
|
|
20857
|
-
this.element.classList.toggle(aa), this.collapsed_ ?
|
|
20857
|
+
this.element.classList.toggle(aa), this.collapsed_ ? Zo(this.collapseLabel_, this.label_) : Zo(this.label_, this.collapseLabel_), this.collapsed_ = !this.collapsed_, this.toggleButton_.setAttribute("aria-expanded", String(!this.collapsed_));
|
|
20858
20858
|
}
|
|
20859
20859
|
/**
|
|
20860
20860
|
* Return `true` if the attribution is collapsible, `false` otherwise.
|
|
@@ -21197,7 +21197,7 @@ class Fi extends $l {
|
|
|
21197
21197
|
), l.minResolution = Math.max(
|
|
21198
21198
|
l.minResolution,
|
|
21199
21199
|
s.minResolution
|
|
21200
|
-
), l.minZoom = Math.max(l.minZoom, s.minZoom), l.maxZoom = Math.min(l.maxZoom, s.maxZoom), s.extent !== void 0 && (l.extent !== void 0 ? l.extent =
|
|
21200
|
+
), l.minZoom = Math.max(l.minZoom, s.minZoom), l.maxZoom = Math.min(l.maxZoom, s.maxZoom), s.extent !== void 0 && (l.extent !== void 0 ? l.extent = Vr(
|
|
21201
21201
|
l.extent,
|
|
21202
21202
|
s.extent
|
|
21203
21203
|
) : l.extent = s.extent), l.zIndex === void 0 && (l.zIndex = r);
|
|
@@ -21267,7 +21267,7 @@ class tg extends io {
|
|
|
21267
21267
|
}
|
|
21268
21268
|
const d = c.projection, f = tl(t.slice(), d), g = [[0, 0]];
|
|
21269
21269
|
if (d.canWrapX() && s) {
|
|
21270
|
-
const x = d.getExtent(), E =
|
|
21270
|
+
const x = d.getExtent(), E = Z(x);
|
|
21271
21271
|
g.push([-E, 0], [E, 0]);
|
|
21272
21272
|
}
|
|
21273
21273
|
const m = e.layerStatesArray, _ = m.length, y = (
|
|
@@ -21462,7 +21462,7 @@ class ng extends Ht {
|
|
|
21462
21462
|
const e = sg(t);
|
|
21463
21463
|
this.renderComplete_ = !1, this.loaded_ = !0, this.boundHandleBrowserEvent_ = this.handleBrowserEvent.bind(this), this.maxTilesLoading_ = t.maxTilesLoading !== void 0 ? t.maxTilesLoading : 16, this.pixelRatio_ = t.pixelRatio !== void 0 ? t.pixelRatio : Hh, this.postRenderTimeoutHandle_, this.animationDelayKey_, this.animationDelay_ = this.animationDelay_.bind(this), this.coordinateToPixelTransform_ = Bt(), this.pixelToCoordinateTransform_ = Bt(), this.frameIndex_ = 0, this.frameState_ = null, this.previousExtent_ = null, this.viewPropertyListenerKey_ = null, this.viewChangeListenerKey_ = null, this.layerGroupPropertyListenerKeys_ = null, this.viewport_ = document.createElement("div"), this.viewport_.className = "ol-viewport" + ("ontouchstart" in window ? " ol-touch" : ""), this.viewport_.style.position = "relative", this.viewport_.style.overflow = "hidden", this.viewport_.style.width = "100%", this.viewport_.style.height = "100%", this.overlayContainer_ = document.createElement("div"), this.overlayContainer_.style.position = "absolute", this.overlayContainer_.style.zIndex = "0", this.overlayContainer_.style.width = "100%", this.overlayContainer_.style.height = "100%", this.overlayContainer_.style.pointerEvents = "none", this.overlayContainer_.className = "ol-overlaycontainer", this.viewport_.appendChild(this.overlayContainer_), this.overlayContainerStopEvent_ = document.createElement("div"), this.overlayContainerStopEvent_.style.position = "absolute", this.overlayContainerStopEvent_.style.zIndex = "0", this.overlayContainerStopEvent_.style.width = "100%", this.overlayContainerStopEvent_.style.height = "100%", this.overlayContainerStopEvent_.style.pointerEvents = "none", this.overlayContainerStopEvent_.className = "ol-overlaycontainer-stopevent", this.viewport_.appendChild(this.overlayContainerStopEvent_), this.mapBrowserEventHandler_ = null, this.moveTolerance_ = t.moveTolerance, this.keyboardEventTarget_ = e.keyboardEventTarget, this.targetChangeHandlerKeys_ = null, this.targetElement_ = null, this.resizeObserver_ = new ResizeObserver(() => this.updateSize()), this.controls = e.controls || Qf(), this.interactions = e.interactions || Yf({
|
|
21464
21464
|
onFocusOnly: !0
|
|
21465
|
-
}), this.overlays_ = e.overlays, this.overlayIdIndex_ = {}, this.renderer_ = null, this.postRenderFunctions_ = [], this.tileQueue_ = new
|
|
21465
|
+
}), this.overlays_ = e.overlays, this.overlayIdIndex_ = {}, this.renderer_ = null, this.postRenderFunctions_ = [], this.tileQueue_ = new Uf(
|
|
21466
21466
|
this.getTilePriority.bind(this),
|
|
21467
21467
|
this.handleTileChange_.bind(this)
|
|
21468
21468
|
), this.addChangeListener(
|
|
@@ -22095,9 +22095,9 @@ class ng extends Ht {
|
|
|
22095
22095
|
this,
|
|
22096
22096
|
this.moveTolerance_
|
|
22097
22097
|
);
|
|
22098
|
-
for (const r in
|
|
22098
|
+
for (const r in X)
|
|
22099
22099
|
this.mapBrowserEventHandler_.addEventListener(
|
|
22100
|
-
|
|
22100
|
+
X[r],
|
|
22101
22101
|
this.handleMapBrowserEvent.bind(this)
|
|
22102
22102
|
);
|
|
22103
22103
|
this.viewport_.addEventListener(
|
|
@@ -22450,7 +22450,7 @@ class rg extends Ht {
|
|
|
22450
22450
|
* @param {Options} options Overlay options.
|
|
22451
22451
|
*/
|
|
22452
22452
|
constructor(t) {
|
|
22453
|
-
super(), this.on, this.once, this.un, this.options = t, this.id = t.id, this.insertFirst = t.insertFirst !== void 0 ? t.insertFirst : !0, this.stopEvent = t.stopEvent !== void 0 ? t.stopEvent : !0, this.element = document.createElement("div"), this.element.className = t.className !== void 0 ? t.className : "ol-overlay-container " +
|
|
22453
|
+
super(), this.on, this.once, this.un, this.options = t, this.id = t.id, this.insertFirst = t.insertFirst !== void 0 ? t.insertFirst : !0, this.stopEvent = t.stopEvent !== void 0 ? t.stopEvent : !0, this.element = document.createElement("div"), this.element.className = t.className !== void 0 ? t.className : "ol-overlay-container " + Xc, this.element.style.position = "absolute", this.element.style.pointerEvents = "auto", this.autoPan = t.autoPan === !0 ? {} : t.autoPan || void 0, this.rendered = {
|
|
22454
22454
|
transform_: "",
|
|
22455
22455
|
visible: !0
|
|
22456
22456
|
}, this.mapPostrenderListenerKey = null, this.addChangeListener(xt.ELEMENT, this.handleElementChanged), this.addChangeListener(xt.MAP, this.handleMapChanged), this.addChangeListener(xt.OFFSET, this.handleOffsetChanged), this.addChangeListener(xt.POSITION, this.handlePositionChanged), this.addChangeListener(xt.POSITIONING, this.handlePositioningChanged), t.element !== void 0 && this.setElement(t.element), this.setOffset(t.offset !== void 0 ? t.offset : [0, 0]), this.setPositioning(t.positioning || "top-left"), t.position !== void 0 && this.setPosition(t.position);
|
|
@@ -22874,7 +22874,7 @@ function Ao(n, t, e) {
|
|
|
22874
22874
|
const ag = {
|
|
22875
22875
|
Point: vt,
|
|
22876
22876
|
LineString: ne,
|
|
22877
|
-
Polygon:
|
|
22877
|
+
Polygon: Ut,
|
|
22878
22878
|
MultiPoint: vn,
|
|
22879
22879
|
MultiLineString: Ri,
|
|
22880
22880
|
MultiPolygon: vi
|
|
@@ -22945,7 +22945,7 @@ class hg extends og {
|
|
|
22945
22945
|
*/
|
|
22946
22946
|
readFeature(t, e) {
|
|
22947
22947
|
return this.readFeatureFromObject(
|
|
22948
|
-
|
|
22948
|
+
Zn(t),
|
|
22949
22949
|
this.getReadOptions(t, e)
|
|
22950
22950
|
);
|
|
22951
22951
|
}
|
|
@@ -22961,7 +22961,7 @@ class hg extends og {
|
|
|
22961
22961
|
*/
|
|
22962
22962
|
readFeatures(t, e) {
|
|
22963
22963
|
return this.readFeaturesFromObject(
|
|
22964
|
-
|
|
22964
|
+
Zn(t),
|
|
22965
22965
|
this.getReadOptions(t, e)
|
|
22966
22966
|
);
|
|
22967
22967
|
}
|
|
@@ -22996,7 +22996,7 @@ class hg extends og {
|
|
|
22996
22996
|
*/
|
|
22997
22997
|
readGeometry(t, e) {
|
|
22998
22998
|
return this.readGeometryFromObject(
|
|
22999
|
-
|
|
22999
|
+
Zn(t),
|
|
23000
23000
|
this.getReadOptions(t, e)
|
|
23001
23001
|
);
|
|
23002
23002
|
}
|
|
@@ -23019,7 +23019,7 @@ class hg extends og {
|
|
|
23019
23019
|
* @override
|
|
23020
23020
|
*/
|
|
23021
23021
|
readProjection(t) {
|
|
23022
|
-
return this.readProjectionFromObject(
|
|
23022
|
+
return this.readProjectionFromObject(Zn(t));
|
|
23023
23023
|
}
|
|
23024
23024
|
/**
|
|
23025
23025
|
* @abstract
|
|
@@ -23094,7 +23094,7 @@ class hg extends og {
|
|
|
23094
23094
|
return O();
|
|
23095
23095
|
}
|
|
23096
23096
|
}
|
|
23097
|
-
function
|
|
23097
|
+
function Zn(n) {
|
|
23098
23098
|
if (typeof n == "string") {
|
|
23099
23099
|
const t = JSON.parse(n);
|
|
23100
23100
|
return t || null;
|
|
@@ -23593,7 +23593,7 @@ function Pg({
|
|
|
23593
23593
|
const Mg = {
|
|
23594
23594
|
name: "ppe-zoning",
|
|
23595
23595
|
getInitialState: (n) => {
|
|
23596
|
-
const { layer: t, source: e } =
|
|
23596
|
+
const { layer: t, source: e } = Xg(n == null ? void 0 : n._extent), { layer: i, source: s } = Bg(n == null ? void 0 : n._extent), r = new Mo({
|
|
23597
23597
|
layers: [t],
|
|
23598
23598
|
condition: mf,
|
|
23599
23599
|
style: (l) => {
|
|
@@ -23603,7 +23603,7 @@ const Mg = {
|
|
|
23603
23603
|
}), o = new Af({
|
|
23604
23604
|
source: e,
|
|
23605
23605
|
features: r.getFeatures()
|
|
23606
|
-
}), a = new
|
|
23606
|
+
}), a = new Xf({
|
|
23607
23607
|
layers: [t],
|
|
23608
23608
|
condition: yf,
|
|
23609
23609
|
features: r.getFeatures()
|
|
@@ -23627,9 +23627,9 @@ const Mg = {
|
|
|
23627
23627
|
createPlanEditor: (n) => {
|
|
23628
23628
|
var r;
|
|
23629
23629
|
const t = n.initialState, { _zoneLayer: e, _zoneLabelLayer: i } = t;
|
|
23630
|
-
e && n.addLayer(e), i && n.addLayer(i), Lg(n),
|
|
23630
|
+
e && n.addLayer(e), i && n.addLayer(i), Lg(n), jg(n), Ag(n);
|
|
23631
23631
|
const s = ((r = n.options.zoningConfig) == null ? void 0 : r.editMode) || "editing";
|
|
23632
|
-
t._editMode = s, dh(n, s), n.drawZone = (o) => fh(n, o), n.deleteZone = (o) => gh(n, o), n.updateZone = (o) => Ng(n, o), n.setZoningMode = (o) => Wg(n, o), n.setEditMode = (o) => Fg(n, o), n.selectZone = (o) => bg(n, o), n.deselectZone = () => Oo(n), n.getSelectedZone = () => Dg(n), n.startDrawingZone = (o) => kg(n, o), n.cancelCurrentAction = () => Ps(n), n.deleteSelectedZone = () => _h(n), n.updateZoneOccupationColors = () =>
|
|
23632
|
+
t._editMode = s, dh(n, s), n.drawZone = (o) => fh(n, o), n.deleteZone = (o) => gh(n, o), n.updateZone = (o) => Ng(n, o), n.setZoningMode = (o) => Wg(n, o), n.setEditMode = (o) => Fg(n, o), n.selectZone = (o) => bg(n, o), n.deselectZone = () => Oo(n), n.getSelectedZone = () => Dg(n), n.startDrawingZone = (o) => kg(n, o), n.cancelCurrentAction = () => Ps(n), n.deleteSelectedZone = () => _h(n), n.updateZoneOccupationColors = () => Vg(n);
|
|
23633
23633
|
}
|
|
23634
23634
|
};
|
|
23635
23635
|
function Lg(n) {
|
|
@@ -23691,7 +23691,7 @@ function fh(n, t) {
|
|
|
23691
23691
|
source: e._zoneSource,
|
|
23692
23692
|
type: "Polygon",
|
|
23693
23693
|
geometryName: "zone"
|
|
23694
|
-
}), e._zoneSnap = new
|
|
23694
|
+
}), e._zoneSnap = new jf({ source: e._zoneSource }), n.addInteraction(e._zoneDraw), n.addInteraction(e._zoneSnap), e._currentAction = "drawing", e._currentDrawingZone = t, e._zoneDraw.on("drawend", (i) => {
|
|
23695
23695
|
var r, o;
|
|
23696
23696
|
i.feature.setId(t.id), i.feature.setProperties({
|
|
23697
23697
|
id: t.id,
|
|
@@ -23794,7 +23794,7 @@ function Wg(n, t) {
|
|
|
23794
23794
|
(s) => Dr(s.getProperties())
|
|
23795
23795
|
), i.clear());
|
|
23796
23796
|
}
|
|
23797
|
-
function
|
|
23797
|
+
function Vg(n) {
|
|
23798
23798
|
const { _zoneLayer: t } = n.initialState;
|
|
23799
23799
|
t.changed(), mh(n);
|
|
23800
23800
|
}
|
|
@@ -23884,7 +23884,7 @@ function mh(n) {
|
|
|
23884
23884
|
}
|
|
23885
23885
|
});
|
|
23886
23886
|
}
|
|
23887
|
-
function
|
|
23887
|
+
function jg(n) {
|
|
23888
23888
|
n.on("pointermove", (t) => {
|
|
23889
23889
|
var s;
|
|
23890
23890
|
if (n.initialState._currentAction === "drawing") {
|
|
@@ -23901,7 +23901,7 @@ function Xg(n) {
|
|
|
23901
23901
|
} else i || n._hidePopup();
|
|
23902
23902
|
});
|
|
23903
23903
|
}
|
|
23904
|
-
function
|
|
23904
|
+
function Xg(n) {
|
|
23905
23905
|
const t = new Tn({ wrapX: !1 }), e = new Li({
|
|
23906
23906
|
source: t,
|
|
23907
23907
|
style: (i) => Dr(i.getProperties())
|
|
@@ -23939,14 +23939,14 @@ function Kg(n) {
|
|
|
23939
23939
|
</div>
|
|
23940
23940
|
`;
|
|
23941
23941
|
}
|
|
23942
|
-
const
|
|
23942
|
+
const Zg = {
|
|
23943
23943
|
a0: [1189, 841],
|
|
23944
23944
|
a1: [841, 594],
|
|
23945
23945
|
a2: [594, 420],
|
|
23946
23946
|
a3: [420, 297],
|
|
23947
23947
|
a4: [297, 210],
|
|
23948
23948
|
a5: [210, 148]
|
|
23949
|
-
},
|
|
23949
|
+
}, Ug = {
|
|
23950
23950
|
name: "ppe-pdf-export",
|
|
23951
23951
|
getInitialState: (n) => ({
|
|
23952
23952
|
...n
|
|
@@ -23956,8 +23956,8 @@ const Ug = {
|
|
|
23956
23956
|
}
|
|
23957
23957
|
};
|
|
23958
23958
|
async function Hg(n, t) {
|
|
23959
|
-
const e = (t == null ? void 0 : t.format) || "a4", i = (t == null ? void 0 : t.orientation) || "landscape", s =
|
|
23960
|
-
if (!
|
|
23959
|
+
const e = (t == null ? void 0 : t.format) || "a4", i = (t == null ? void 0 : t.orientation) || "landscape", s = (t == null ? void 0 : t.resolution) || 150, r = Zg[e], o = i === "landscape" ? r[0] : r[1], a = i === "landscape" ? r[1] : r[0], l = n.getSize();
|
|
23960
|
+
if (!l) {
|
|
23961
23961
|
console.error("Unable to get map size");
|
|
23962
23962
|
return;
|
|
23963
23963
|
}
|
|
@@ -23965,39 +23965,42 @@ async function Hg(n, t) {
|
|
|
23965
23965
|
console.error("Unable to get view resolution");
|
|
23966
23966
|
return;
|
|
23967
23967
|
}
|
|
23968
|
-
const
|
|
23969
|
-
|
|
23968
|
+
const c = [...l], u = {
|
|
23969
|
+
center: n.getView().getCenter(),
|
|
23970
|
+
zoom: n.getView().getZoom(),
|
|
23971
|
+
rotation: n.getView().getRotation()
|
|
23972
|
+
}, d = s / 25.4, f = Math.round(o * d), g = Math.round(a * d);
|
|
23973
|
+
n.setSize([f, g]), u.center && n.getView().setCenter(u.center), u.zoom !== void 0 && n.getView().setZoom(u.zoom), u.rotation !== void 0 && n.getView().setRotation(u.rotation);
|
|
23974
|
+
const m = new Lh(i, "mm", e);
|
|
23975
|
+
await new Promise((_) => {
|
|
23970
23976
|
n.once("rendercomplete", function() {
|
|
23971
|
-
const
|
|
23972
|
-
|
|
23973
|
-
const
|
|
23974
|
-
if (!
|
|
23975
|
-
console.error("Unable to get canvas context"),
|
|
23977
|
+
const y = document.createElement("canvas");
|
|
23978
|
+
y.width = f, y.height = g;
|
|
23979
|
+
const p = y.getContext("2d");
|
|
23980
|
+
if (!p) {
|
|
23981
|
+
console.error("Unable to get canvas context"), _();
|
|
23976
23982
|
return;
|
|
23977
23983
|
}
|
|
23978
|
-
const
|
|
23979
|
-
Array.from(
|
|
23984
|
+
const C = n.getViewport().querySelectorAll(".ol-layer canvas, canvas.ol-layer");
|
|
23985
|
+
Array.from(C).forEach((E) => {
|
|
23980
23986
|
var S, T;
|
|
23981
23987
|
if (E instanceof HTMLCanvasElement && E.width > 0) {
|
|
23982
23988
|
const I = ((S = E.parentNode) == null ? void 0 : S.style.opacity) || "1";
|
|
23983
|
-
|
|
23984
|
-
const P = (T = E.style.transform.match(/^matrix\(([
|
|
23985
|
-
P &&
|
|
23989
|
+
p.globalAlpha = parseFloat(I);
|
|
23990
|
+
const P = (T = E.style.transform.match(/^matrix\(([^(]*)\)$/)) == null ? void 0 : T[1].split(",").map(Number);
|
|
23991
|
+
P && p.setTransform(
|
|
23986
23992
|
...P
|
|
23987
|
-
),
|
|
23993
|
+
), p.drawImage(E, 0, 0), p.setTransform(1, 0, 0, 1, 0, 0), p.globalAlpha = 1;
|
|
23988
23994
|
}
|
|
23989
23995
|
});
|
|
23990
|
-
const
|
|
23991
|
-
|
|
23992
|
-
m > _ ? p = r / m : y = o * m;
|
|
23993
|
-
const C = (r - y) / 2, x = (o - p) / 2;
|
|
23994
|
-
h.addImage(g, "JPEG", C, x, y, p), h.save("map.pdf"), c();
|
|
23996
|
+
const x = y.toDataURL("image/jpeg", 0.95);
|
|
23997
|
+
m.addImage(x, "JPEG", 0, 0, o, a, void 0, "FAST"), m.save("map.pdf"), n.setSize(c), u.center && n.getView().setCenter(u.center), u.zoom !== void 0 && n.getView().setZoom(u.zoom), u.rotation !== void 0 && n.getView().setRotation(u.rotation), _();
|
|
23995
23998
|
}), n.renderSync();
|
|
23996
23999
|
});
|
|
23997
24000
|
}
|
|
23998
24001
|
let dr;
|
|
23999
24002
|
const en = [];
|
|
24000
|
-
function
|
|
24003
|
+
function Za(n, t, e, i, s) {
|
|
24001
24004
|
n.beginPath(), n.moveTo(0, 0), n.lineTo(t, e), n.lineTo(i, s), n.closePath(), n.save(), n.clip(), n.fillRect(0, 0, Math.max(t, i) + 1, Math.max(e, s)), n.restore();
|
|
24002
24005
|
}
|
|
24003
24006
|
function fr(n, t) {
|
|
@@ -24006,9 +24009,9 @@ function fr(n, t) {
|
|
|
24006
24009
|
function qg() {
|
|
24007
24010
|
if (dr === void 0) {
|
|
24008
24011
|
const n = ft(6, 6, en);
|
|
24009
|
-
n.globalCompositeOperation = "lighter", n.fillStyle = "rgba(210, 0, 0, 0.75)",
|
|
24012
|
+
n.globalCompositeOperation = "lighter", n.fillStyle = "rgba(210, 0, 0, 0.75)", Za(n, 4, 5, 4, 0), Za(n, 4, 5, 0, 5);
|
|
24010
24013
|
const t = n.getImageData(0, 0, 3, 3).data;
|
|
24011
|
-
dr = fr(t, 0) || fr(t, 4) || fr(t, 8),
|
|
24014
|
+
dr = fr(t, 0) || fr(t, 4) || fr(t, 8), Zr(n), en.push(n.canvas);
|
|
24012
24015
|
}
|
|
24013
24016
|
return dr;
|
|
24014
24017
|
}
|
|
@@ -24050,22 +24053,22 @@ function Jg(n, t, e, i, s, r, o, a, l, h, c, u, d, f) {
|
|
|
24050
24053
|
let y;
|
|
24051
24054
|
const p = e / i, C = (u ? 1 : 1 + Math.pow(2, -24)) / p;
|
|
24052
24055
|
(l.length !== 1 || h !== 0) && (y = ft(
|
|
24053
|
-
Math.round(
|
|
24056
|
+
Math.round(Z(_) * p),
|
|
24054
24057
|
Math.round(dt(_) * p),
|
|
24055
24058
|
en
|
|
24056
24059
|
), u || (y.imageSmoothingEnabled = !1), l.forEach(function(E, S, T) {
|
|
24057
24060
|
if (E.image.width > 0 && E.image.height > 0) {
|
|
24058
24061
|
if (E.clipExtent) {
|
|
24059
24062
|
y.save();
|
|
24060
|
-
const N = (E.clipExtent[0] - _[0]) * p,
|
|
24063
|
+
const N = (E.clipExtent[0] - _[0]) * p, V = -(E.clipExtent[3] - _[3]) * p, F = Z(E.clipExtent) * p, q = dt(E.clipExtent) * p;
|
|
24061
24064
|
y.rect(
|
|
24062
24065
|
u ? N : Math.round(N),
|
|
24063
|
-
u ?
|
|
24066
|
+
u ? V : Math.round(V),
|
|
24064
24067
|
u ? F : Math.round(N + F) - Math.round(N),
|
|
24065
|
-
u ? q : Math.round(
|
|
24068
|
+
u ? q : Math.round(V + q) - Math.round(V)
|
|
24066
24069
|
), y.clip();
|
|
24067
24070
|
}
|
|
24068
|
-
const I = (E.extent[0] - _[0]) * p, R = -(E.extent[3] - _[3]) * p, P =
|
|
24071
|
+
const I = (E.extent[0] - _[0]) * p, R = -(E.extent[3] - _[3]) * p, P = Z(E.extent) * p, k = dt(E.extent) * p;
|
|
24069
24072
|
y.drawImage(
|
|
24070
24073
|
E.image,
|
|
24071
24074
|
h,
|
|
@@ -24082,37 +24085,37 @@ function Jg(n, t, e, i, s, r, o, a, l, h, c, u, d, f) {
|
|
|
24082
24085
|
const x = cs(o);
|
|
24083
24086
|
return a.getTriangles().forEach(function(E, S, T) {
|
|
24084
24087
|
const I = E.source, R = E.target;
|
|
24085
|
-
let P = I[0][0], k = I[0][1], N = I[1][0],
|
|
24088
|
+
let P = I[0][0], k = I[0][1], N = I[1][0], V = I[1][1], F = I[2][0], q = I[2][1];
|
|
24086
24089
|
const b = m((R[0][0] - x[0]) / r), z = m(
|
|
24087
24090
|
-(R[0][1] - x[1]) / r
|
|
24088
|
-
),
|
|
24091
|
+
), j = m((R[1][0] - x[0]) / r), Q = m(
|
|
24089
24092
|
-(R[1][1] - x[1]) / r
|
|
24090
24093
|
), J = m((R[2][0] - x[0]) / r), tt = m(
|
|
24091
24094
|
-(R[2][1] - x[1]) / r
|
|
24092
24095
|
), v = P, se = k;
|
|
24093
|
-
P = 0, k = 0, N -= v,
|
|
24096
|
+
P = 0, k = 0, N -= v, V -= se, F -= v, q -= se;
|
|
24094
24097
|
const ke = [
|
|
24095
|
-
[N,
|
|
24098
|
+
[N, V, 0, 0, j - b],
|
|
24096
24099
|
[F, q, 0, 0, J - b],
|
|
24097
|
-
[0, 0, N,
|
|
24100
|
+
[0, 0, N, V, Q - z],
|
|
24098
24101
|
[0, 0, F, q, tt - z]
|
|
24099
|
-
], pt =
|
|
24102
|
+
], pt = Vh(ke);
|
|
24100
24103
|
if (!pt)
|
|
24101
24104
|
return;
|
|
24102
24105
|
if (g.save(), g.beginPath(), qg() || !u) {
|
|
24103
|
-
g.moveTo(
|
|
24104
|
-
const
|
|
24105
|
-
for (let $t = 0; $t <
|
|
24106
|
+
g.moveTo(j, Q);
|
|
24107
|
+
const Vt = 4, Se = b - j, bi = z - Q;
|
|
24108
|
+
for (let $t = 0; $t < Vt; $t++)
|
|
24106
24109
|
g.lineTo(
|
|
24107
|
-
|
|
24108
|
-
Q + m($t * bi / (
|
|
24109
|
-
), $t !=
|
|
24110
|
-
|
|
24111
|
-
Q + m(($t + 1) * bi / (
|
|
24110
|
+
j + m(($t + 1) * Se / Vt),
|
|
24111
|
+
Q + m($t * bi / (Vt - 1))
|
|
24112
|
+
), $t != Vt - 1 && g.lineTo(
|
|
24113
|
+
j + m(($t + 1) * Se / Vt),
|
|
24114
|
+
Q + m(($t + 1) * bi / (Vt - 1))
|
|
24112
24115
|
);
|
|
24113
24116
|
g.lineTo(J, tt);
|
|
24114
24117
|
} else
|
|
24115
|
-
g.moveTo(
|
|
24118
|
+
g.moveTo(j, Q), g.lineTo(b, z), g.lineTo(J, tt);
|
|
24116
24119
|
g.clip(), g.transform(
|
|
24117
24120
|
pt[0],
|
|
24118
24121
|
pt[2],
|
|
@@ -24128,19 +24131,19 @@ function Jg(n, t, e, i, s, r, o, a, l, h, c, u, d, f) {
|
|
|
24128
24131
|
if (y)
|
|
24129
24132
|
qt = y.canvas, g.scale(C, -C);
|
|
24130
24133
|
else {
|
|
24131
|
-
const
|
|
24132
|
-
qt =
|
|
24133
|
-
|
|
24134
|
+
const Vt = l[0], Se = Vt.extent;
|
|
24135
|
+
qt = Vt.image, g.scale(
|
|
24136
|
+
Z(Se) / qt.width,
|
|
24134
24137
|
-dt(Se) / qt.height
|
|
24135
24138
|
);
|
|
24136
24139
|
}
|
|
24137
24140
|
g.drawImage(qt, 0, 0), g.restore();
|
|
24138
|
-
}), y && (
|
|
24141
|
+
}), y && (Zr(y), en.push(y.canvas)), g.canvas;
|
|
24139
24142
|
}
|
|
24140
24143
|
function Or(n) {
|
|
24141
24144
|
return Array.isArray(n) ? Math.min(...n) : n;
|
|
24142
24145
|
}
|
|
24143
|
-
const Qg = 10,
|
|
24146
|
+
const Qg = 10, Ua = 0.25;
|
|
24144
24147
|
class t_ {
|
|
24145
24148
|
/**
|
|
24146
24149
|
* @param {import("../proj/Projection.js").default} sourceProj Source projection.
|
|
@@ -24163,8 +24166,8 @@ class t_ {
|
|
|
24163
24166
|
this.transformInv_ = function(C) {
|
|
24164
24167
|
const x = C[0] + "/" + C[1];
|
|
24165
24168
|
return l[x] || (l[x] = h(C)), l[x];
|
|
24166
|
-
}, this.maxSourceExtent_ = s, this.errorThresholdSquared_ = r * r, this.triangles_ = [], this.wrapsXInSource_ = !1, this.canWrapXInSource_ = this.sourceProj_.canWrapX() && !!s && !!this.sourceProj_.getExtent() &&
|
|
24167
|
-
const c = cs(i), u =
|
|
24169
|
+
}, this.maxSourceExtent_ = s, this.errorThresholdSquared_ = r * r, this.triangles_ = [], this.wrapsXInSource_ = !1, this.canWrapXInSource_ = this.sourceProj_.canWrapX() && !!s && !!this.sourceProj_.getExtent() && Z(s) >= Z(this.sourceProj_.getExtent()), this.sourceWorldWidth_ = this.sourceProj_.getExtent() ? Z(this.sourceProj_.getExtent()) : null, this.targetWorldWidth_ = this.targetProj_.getExtent() ? Z(this.targetProj_.getExtent()) : null;
|
|
24170
|
+
const c = cs(i), u = jr(i), d = Wr(i), f = zr(i), g = this.transformInv_(c), m = this.transformInv_(u), _ = this.transformInv_(d), y = this.transformInv_(f), p = Qg + (o ? Math.max(
|
|
24168
24171
|
0,
|
|
24169
24172
|
Math.ceil(
|
|
24170
24173
|
Math.log2(
|
|
@@ -24251,7 +24254,7 @@ class t_ {
|
|
|
24251
24254
|
* @private
|
|
24252
24255
|
*/
|
|
24253
24256
|
addQuad_(t, e, i, s, r, o, a, l, h) {
|
|
24254
|
-
const c = lt([r, o, a, l]), u = this.sourceWorldWidth_ ?
|
|
24257
|
+
const c = lt([r, o, a, l]), u = this.sourceWorldWidth_ ? Z(c) / this.sourceWorldWidth_ : null, d = (
|
|
24255
24258
|
/** @type {number} */
|
|
24256
24259
|
this.sourceWorldWidth_
|
|
24257
24260
|
), f = this.sourceProj_.canWrapX() && u > 0.5 && u < 1;
|
|
@@ -24259,9 +24262,9 @@ class t_ {
|
|
|
24259
24262
|
if (h > 0) {
|
|
24260
24263
|
if (this.targetProj_.isGlobal() && this.targetWorldWidth_) {
|
|
24261
24264
|
const _ = lt([t, e, i, s]);
|
|
24262
|
-
g =
|
|
24265
|
+
g = Z(_) / this.targetWorldWidth_ > Ua || g;
|
|
24263
24266
|
}
|
|
24264
|
-
!f && this.sourceProj_.isGlobal() && u && (g = u >
|
|
24267
|
+
!f && this.sourceProj_.isGlobal() && u && (g = u > Ua || g);
|
|
24265
24268
|
}
|
|
24266
24269
|
if (!g && this.maxSourceExtent_ && isFinite(c[0]) && isFinite(c[1]) && isFinite(c[2]) && isFinite(c[3]) && !mt(c, this.maxSourceExtent_))
|
|
24267
24270
|
return;
|
|
@@ -24374,7 +24377,7 @@ class i_ extends no {
|
|
|
24374
24377
|
l && t.canWrapX() && (l = l.slice(), l[0] = -1 / 0, l[2] = 1 / 0);
|
|
24375
24378
|
let h = e.getExtent();
|
|
24376
24379
|
h && e.canWrapX() && (h = h.slice(), h[0] = -1 / 0, h[2] = 1 / 0);
|
|
24377
|
-
const c = h ?
|
|
24380
|
+
const c = h ? Vr(i, h) : i, u = Yt(c), d = $g(
|
|
24378
24381
|
t,
|
|
24379
24382
|
e,
|
|
24380
24383
|
u,
|
|
@@ -24415,7 +24418,7 @@ class i_ extends no {
|
|
|
24415
24418
|
reproject_() {
|
|
24416
24419
|
const t = this.sourceImage_.getState();
|
|
24417
24420
|
if (t == M.LOADED) {
|
|
24418
|
-
const e =
|
|
24421
|
+
const e = Z(this.targetExtent_) / this.targetResolution_, i = dt(this.targetExtent_) / this.targetResolution_;
|
|
24419
24422
|
this.canvas_ = Jg(
|
|
24420
24423
|
e,
|
|
24421
24424
|
i,
|
|
@@ -24466,7 +24469,7 @@ class i_ extends no {
|
|
|
24466
24469
|
), this.sourceListenerKey_ = null;
|
|
24467
24470
|
}
|
|
24468
24471
|
}
|
|
24469
|
-
const
|
|
24472
|
+
const Un = 4, gr = {
|
|
24470
24473
|
/**
|
|
24471
24474
|
* Triggered when an image starts loading.
|
|
24472
24475
|
* @event module:ol/source/Image.ImageSourceEvent#imageloadstart
|
|
@@ -24616,7 +24619,7 @@ function r_(n, t) {
|
|
|
24616
24619
|
n.getImage().src = t;
|
|
24617
24620
|
}
|
|
24618
24621
|
function o_(n, t, e, i) {
|
|
24619
|
-
const s = t / e, r = Yt(n), o = An(
|
|
24622
|
+
const s = t / e, r = Yt(n), o = An(Z(n) / s, Un), a = An(dt(n) / s, Un), l = An((i - 1) * o / 2, Un), h = o + 2 * l, c = An((i - 1) * a / 2, Un), u = a + 2 * c;
|
|
24620
24623
|
return Hn(r, s, 0, [
|
|
24621
24624
|
h,
|
|
24622
24625
|
u
|
|
@@ -24627,7 +24630,7 @@ function a_(n) {
|
|
|
24627
24630
|
return () => {
|
|
24628
24631
|
const s = new Image();
|
|
24629
24632
|
return s.crossOrigin = i, t(s, n.url).then((r) => {
|
|
24630
|
-
const o =
|
|
24633
|
+
const o = Z(e) / r.width, a = dt(e) / r.height;
|
|
24631
24634
|
return { image: r, extent: e, resolution: o !== a ? [o, a] : a, pixelRatio: 1 };
|
|
24632
24635
|
});
|
|
24633
24636
|
};
|
|
@@ -24707,7 +24710,7 @@ class h_ extends bl {
|
|
|
24707
24710
|
prepareFrame(t) {
|
|
24708
24711
|
const e = t.layerStatesArray[t.layerIndex], i = t.pixelRatio, s = t.viewState, r = s.resolution, o = this.getLayer().getSource(), a = t.viewHints;
|
|
24709
24712
|
let l = t.extent;
|
|
24710
|
-
if (e.extent !== void 0 && (l =
|
|
24713
|
+
if (e.extent !== void 0 && (l = Vr(
|
|
24711
24714
|
l,
|
|
24712
24715
|
Me(e.extent, s.projection)
|
|
24713
24716
|
)), !a[ct.ANIMATING] && !a[ct.INTERACTING] && !Ti(l))
|
|
@@ -24738,7 +24741,7 @@ class h_ extends bl {
|
|
|
24738
24741
|
), r = i.getExtent();
|
|
24739
24742
|
if (r && !nn(r, s))
|
|
24740
24743
|
return null;
|
|
24741
|
-
const o = this.image.getExtent(), a = this.image.getImage(), l =
|
|
24744
|
+
const o = this.image.getExtent(), a = this.image.getImage(), l = Z(o), h = Math.floor(
|
|
24742
24745
|
a.width * ((s[0] - o[0]) / l)
|
|
24743
24746
|
);
|
|
24744
24747
|
if (h < 0 || h >= a.width)
|
|
@@ -24881,7 +24884,7 @@ const m_ = {
|
|
|
24881
24884
|
Mg,
|
|
24882
24885
|
m_,
|
|
24883
24886
|
f_,
|
|
24884
|
-
|
|
24887
|
+
Ug
|
|
24885
24888
|
];
|
|
24886
24889
|
function w_(n) {
|
|
24887
24890
|
var m;
|
|
@@ -24964,7 +24967,7 @@ function w_(n) {
|
|
|
24964
24967
|
return c;
|
|
24965
24968
|
}
|
|
24966
24969
|
export {
|
|
24967
|
-
|
|
24970
|
+
Ug as PdfExportPlugin,
|
|
24968
24971
|
Mg as ZoningPlugin,
|
|
24969
24972
|
Do as convertToZoneGeometry,
|
|
24970
24973
|
Tg as convertZoneToGeometryFeatures,
|