@plannco-ppe/ppe-core 1.0.14 → 1.0.15
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 +1 -1
- package/dist/index.js +174 -169
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8,13 +8,13 @@ const ct = {
|
|
|
8
8
|
};
|
|
9
9
|
function Oh(n, t, e) {
|
|
10
10
|
let i, s;
|
|
11
|
-
e = e ||
|
|
11
|
+
e = e || Ue;
|
|
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 Ue(n, t) {
|
|
18
18
|
return n > t ? 1 : n < t ? -1 : 0;
|
|
19
19
|
}
|
|
20
20
|
function kh(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 Ze(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 Ze(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 Ze(e, i, e, i, t);
|
|
134
134
|
}
|
|
135
135
|
function Gr(n, t, e, i, s) {
|
|
136
136
|
const r = xn(s);
|
|
@@ -159,7 +159,7 @@ function Qa(n, t) {
|
|
|
159
159
|
}
|
|
160
160
|
function zh(n) {
|
|
161
161
|
let t = 0;
|
|
162
|
-
return Ti(n) || (t =
|
|
162
|
+
return Ti(n) || (t = U(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 Ze(
|
|
181
181
|
Math.min(r, a, h, u),
|
|
182
182
|
Math.min(o, l, c, d),
|
|
183
183
|
Math.max(r, a, h, u),
|
|
@@ -213,7 +213,7 @@ function cs(n) {
|
|
|
213
213
|
function Vr(n) {
|
|
214
214
|
return [n[2], n[3]];
|
|
215
215
|
}
|
|
216
|
-
function
|
|
216
|
+
function U(n) {
|
|
217
217
|
return n[2] - n[0];
|
|
218
218
|
}
|
|
219
219
|
function mt(n, t) {
|
|
@@ -240,7 +240,7 @@ function Vh(n, t, e) {
|
|
|
240
240
|
function tl(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 = U(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 Xh(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
|
tl(n, t);
|
|
256
|
-
const s =
|
|
257
|
-
if (
|
|
256
|
+
const s = U(i);
|
|
257
|
+
if (U(n) > s)
|
|
258
258
|
return [[i[0], n[1], i[2], n[3]]];
|
|
259
259
|
if (n[0] < i[0])
|
|
260
260
|
return [
|
|
@@ -339,7 +339,7 @@ function mr(n, t, e) {
|
|
|
339
339
|
function Kh(n, t) {
|
|
340
340
|
return n[0] += +t[0], n[1] += +t[1], n;
|
|
341
341
|
}
|
|
342
|
-
function
|
|
342
|
+
function Uh(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;
|
|
@@ -365,7 +365,7 @@ function Br(n, t) {
|
|
|
365
365
|
const e = Math.cos(t), i = Math.sin(t), s = n[0] * e - n[1] * i, r = n[1] * e + n[0] * i;
|
|
366
366
|
return n[0] = s, n[1] = r, n;
|
|
367
367
|
}
|
|
368
|
-
function
|
|
368
|
+
function Zh(n, t) {
|
|
369
369
|
return n[0] *= t, n[1] *= t, n;
|
|
370
370
|
}
|
|
371
371
|
function me(n, t) {
|
|
@@ -380,7 +380,7 @@ function Hh(n, t) {
|
|
|
380
380
|
}
|
|
381
381
|
function el(n, t) {
|
|
382
382
|
if (t.canWrapX()) {
|
|
383
|
-
const e =
|
|
383
|
+
const e = U(t.getExtent()), i = qh(n, t, e);
|
|
384
384
|
i && (n[0] -= i * e);
|
|
385
385
|
}
|
|
386
386
|
return n;
|
|
@@ -388,7 +388,7 @@ function el(n, t) {
|
|
|
388
388
|
function qh(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 || U(i), s = Math.floor(
|
|
392
392
|
(n[0] - i[0]) / e
|
|
393
393
|
)), s;
|
|
394
394
|
}
|
|
@@ -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 Ur(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 ec(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 Uo(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 Zo = [
|
|
624
624
|
new ii("EPSG:3857"),
|
|
625
625
|
new ii("EPSG:102100"),
|
|
626
626
|
new ii("EPSG:102113"),
|
|
@@ -697,7 +697,7 @@ 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, Ve = zt / (1 - zt), $o = Math.sqrt(1 - zt), xi = (1 - $o) / (1 + $o), ll = xi * xi,
|
|
700
|
+
const Jn = 0.9996, zt = 669438e-8, fs = zt * zt, gs = fs * zt, Ve = zt / (1 - zt), $o = Math.sqrt(1 - zt), xi = (1 - $o) / (1 + $o), ll = xi * xi, Zr = ll * xi, Hr = Zr * xi, hl = Hr * xi, cl = 1 - zt / 4 - 3 * fs / 64 - 5 * gs / 256, uc = 3 * zt / 8 + 3 * fs / 32 + 45 * gs / 1024, dc = 15 * fs / 256 + 45 * gs / 1024, fc = 35 * gs / 3072, gc = 3 / 2 * xi - 27 / 32 * Zr + 269 / 512 * hl, _c = 21 / 16 * ll - 55 / 32 * Hr, mc = 151 / 96 * Zr - 417 / 128 * hl, yc = 1097 / 512 * Hr, Qn = 6378137;
|
|
701
701
|
function pc(n, t, e) {
|
|
702
702
|
const i = n - 5e5, o = (e.north ? t : t - 1e7) / Jn / (Qn * cl), a = o + gc * Math.sin(2 * o) + _c * Math.sin(4 * o) + mc * Math.sin(6 * o) + yc * 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 = Ve * c ** 2, E = p * p, x = i / (_ * Jn), C = x * x, S = C * x, T = S * x, I = T * x, R = I * x, P = a - u / y * (C / 2 - T / 24 * (5 + 3 * d + 10 * p - 4 * E - 9 * Ve)) + R / 720 * (61 + 90 * d + 298 * p + 45 * f - 252 * Ve - 3 * E);
|
|
703
703
|
let k = (x - S / 6 * (1 + 2 * d + p) + I / 120 * (5 - 2 * p + 28 * d - 3 * E + 8 * Ve + 24 * f)) / c;
|
|
@@ -948,9 +948,9 @@ function Me(n, t) {
|
|
|
948
948
|
return n;
|
|
949
949
|
}
|
|
950
950
|
function Fc() {
|
|
951
|
-
na(
|
|
951
|
+
na(Zo), na(qo), Lc(
|
|
952
952
|
qo,
|
|
953
|
-
|
|
953
|
+
Zo,
|
|
954
954
|
rc,
|
|
955
955
|
oc
|
|
956
956
|
);
|
|
@@ -2092,7 +2092,7 @@ class Ht extends Cn {
|
|
|
2092
2092
|
}
|
|
2093
2093
|
}
|
|
2094
2094
|
}
|
|
2095
|
-
const Dn = "ol-hidden",
|
|
2095
|
+
const Dn = "ol-hidden", Uc = "ol-selectable", ys = "ol-unselectable", ro = "ol-control", aa = "ol-collapsed", Zc = new RegExp(
|
|
2096
2096
|
[
|
|
2097
2097
|
"^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)",
|
|
2098
2098
|
"(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)",
|
|
@@ -2114,7 +2114,7 @@ const Dn = "ol-hidden", Zc = "ol-selectable", ys = "ol-unselectable", ro = "ol-c
|
|
|
2114
2114
|
normal: 400,
|
|
2115
2115
|
bold: 700
|
|
2116
2116
|
}, Sr = function(n) {
|
|
2117
|
-
const t = n.match(
|
|
2117
|
+
const t = n.match(Zc);
|
|
2118
2118
|
if (!t)
|
|
2119
2119
|
return null;
|
|
2120
2120
|
const e = (
|
|
@@ -3979,13 +3979,13 @@ class Cu {
|
|
|
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), Ze(
|
|
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
|
+
)) : Ze(
|
|
3989
3989
|
Math.min(T, T + C),
|
|
3990
3990
|
Math.min(I, I + S),
|
|
3991
3991
|
Math.max(T, T + C),
|
|
@@ -4652,7 +4652,7 @@ class Su {
|
|
|
4652
4652
|
}
|
|
4653
4653
|
}
|
|
4654
4654
|
const m = Object.keys(this.executorsByZIndex_).map(Number);
|
|
4655
|
-
m.sort(
|
|
4655
|
+
m.sort(Ue);
|
|
4656
4656
|
let _, y, p, E, x;
|
|
4657
4657
|
for (_ = m.length - 1; _ >= 0; --_) {
|
|
4658
4658
|
const C = m[_].toString();
|
|
@@ -4697,7 +4697,7 @@ class Su {
|
|
|
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 ? kh :
|
|
4700
|
+
l.sort(a ? kh : Ue), o = o || je;
|
|
4701
4701
|
const h = je.length;
|
|
4702
4702
|
for (let c = 0, u = l.length; c < u; ++c) {
|
|
4703
4703
|
const d = l[c].toString(), f = this.executorsByZIndex_[d];
|
|
@@ -4738,17 +4738,17 @@ class Su {
|
|
|
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(Ue);
|
|
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 Us = {};
|
|
4749
4749
|
function Iu(n) {
|
|
4750
|
-
if (
|
|
4751
|
-
return
|
|
4750
|
+
if (Us[n] !== void 0)
|
|
4751
|
+
return Us[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 Iu(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 Us[n] = s, s;
|
|
4765
4765
|
}
|
|
4766
4766
|
function ma(n) {
|
|
4767
4767
|
return n[0] > 0 && n[1] > 0;
|
|
@@ -6058,16 +6058,16 @@ function Ru(n) {
|
|
|
6058
6058
|
}
|
|
6059
6059
|
return t;
|
|
6060
6060
|
}
|
|
6061
|
-
let
|
|
6061
|
+
let Zs = null;
|
|
6062
6062
|
function Pl(n, t) {
|
|
6063
|
-
if (!
|
|
6063
|
+
if (!Zs) {
|
|
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
|
+
Zs = [
|
|
6071
6071
|
new at({
|
|
6072
6072
|
image: new Sn({
|
|
6073
6073
|
fill: e,
|
|
@@ -6079,7 +6079,7 @@ function Pl(n, t) {
|
|
|
6079
6079
|
})
|
|
6080
6080
|
];
|
|
6081
6081
|
}
|
|
6082
|
-
return
|
|
6082
|
+
return Zs;
|
|
6083
6083
|
}
|
|
6084
6084
|
function ho() {
|
|
6085
6085
|
const n = {}, t = [255, 255, 255, 1], e = [0, 153, 255, 1], i = 3;
|
|
@@ -7644,7 +7644,7 @@ function Lu(n, t, e, i, s, r, o, a, l) {
|
|
|
7644
7644
|
V[Q.replace("Multi", "")].push(N, j);
|
|
7645
7645
|
}
|
|
7646
7646
|
}
|
|
7647
|
-
const p = Object.keys(y).map(Number).sort(
|
|
7647
|
+
const p = Object.keys(y).map(Number).sort(Ue);
|
|
7648
7648
|
for (let E = 0, x = p.length; E < x; ++E) {
|
|
7649
7649
|
const C = y[p[E]];
|
|
7650
7650
|
for (const S in C) {
|
|
@@ -8069,7 +8069,7 @@ class Dl extends Bu {
|
|
|
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(U(i) / s * o), l = Math.round(dt(i) / s * o);
|
|
8073
8073
|
xe(
|
|
8074
8074
|
this.pixelTransform,
|
|
8075
8075
|
t.size[0] / 2,
|
|
@@ -8194,7 +8194,7 @@ class Ku extends Dl {
|
|
|
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(U(s) / a * f), p = Math.round(dt(s) / a * f), E = u.getWrapX() && l.canWrapX(), x = E ? U(c) : null, C = E ? Math.ceil((s[2] - c[2]) / x) + 1 : 1;
|
|
8198
8198
|
let S = E ? Math.floor((s[0] - c[0]) / x) : 0;
|
|
8199
8199
|
do {
|
|
8200
8200
|
let T = this.getRenderTransform(
|
|
@@ -8233,7 +8233,7 @@ class Ku extends Dl {
|
|
|
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, Ur(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 Ku extends Dl {
|
|
|
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 _ = U(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 Ku extends Dl {
|
|
|
8428
8428
|
g * u
|
|
8429
8429
|
), p = y.slice(), E = [y.slice()], x = c.getExtent();
|
|
8430
8430
|
if (i.getWrapX() && c.canWrapX() && !ge(x, t.extent)) {
|
|
8431
|
-
const F =
|
|
8431
|
+
const F = U(x), q = Math.max(U(y) / 2, F);
|
|
8432
8432
|
y[0] = x[0] - q, y[2] = x[2] + q, el(_, c);
|
|
8433
8433
|
const b = tl(E[0], c);
|
|
8434
8434
|
b[0] < x[0] && b[2] < x[2] ? E.push([
|
|
@@ -8534,7 +8534,7 @@ class Ku extends Dl {
|
|
|
8534
8534
|
return l;
|
|
8535
8535
|
}
|
|
8536
8536
|
}
|
|
8537
|
-
function Ol(n, t, e = 0, i = n.length - 1, s =
|
|
8537
|
+
function Ol(n, t, e = 0, i = n.length - 1, s = Uu) {
|
|
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));
|
|
@@ -8553,7 +8553,7 @@ function Vi(n, t, e) {
|
|
|
8553
8553
|
const i = n[t];
|
|
8554
8554
|
n[t] = n[e], n[e] = i;
|
|
8555
8555
|
}
|
|
8556
|
-
function
|
|
8556
|
+
function Uu(n, t) {
|
|
8557
8557
|
return n < t ? -1 : n > t ? 1 : 0;
|
|
8558
8558
|
}
|
|
8559
8559
|
let kl = class {
|
|
@@ -8627,7 +8627,7 @@ let kl = class {
|
|
|
8627
8627
|
let a, l, h;
|
|
8628
8628
|
for (; i || r.length; ) {
|
|
8629
8629
|
if (i || (i = r.pop(), l = r[r.length - 1], a = o.pop(), h = !0), i.leaf) {
|
|
8630
|
-
const c =
|
|
8630
|
+
const c = Zu(t, i.children, e);
|
|
8631
8631
|
if (c !== -1)
|
|
8632
8632
|
return i.children.splice(c, 1), r.push(i), this._condense(r), this;
|
|
8633
8633
|
}
|
|
@@ -8738,7 +8738,7 @@ let kl = class {
|
|
|
8738
8738
|
t[e].children.length === 0 ? e > 0 ? (i = t[e - 1].children, i.splice(i.indexOf(t[e]), 1)) : this.clear() : si(t[e], this.toBBox);
|
|
8739
8739
|
}
|
|
8740
8740
|
};
|
|
8741
|
-
function
|
|
8741
|
+
function Zu(n, t, e) {
|
|
8742
8742
|
if (!e) return t.indexOf(n);
|
|
8743
8743
|
for (let i = 0; i < t.length; i++)
|
|
8744
8744
|
if (e(n, t[i])) return i;
|
|
@@ -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++, Xt = 1 << ei++, $e = 1 << ei++,
|
|
8806
|
+
const Rt = 1 << ei++, Y = 1 << ei++, Pt = 1 << ei++, Xt = 1 << ei++, $e = 1 << ei++, Ui = 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
|
-
}, Qu = Object.keys(co).map(Number).sort(
|
|
8812
|
+
[Ui]: "size"
|
|
8813
|
+
}, Qu = Object.keys(co).map(Number).sort(Ue);
|
|
8814
8814
|
function td(n) {
|
|
8815
8815
|
return n in co;
|
|
8816
8816
|
}
|
|
8817
|
-
function
|
|
8817
|
+
function Zi(n) {
|
|
8818
8818
|
const t = [];
|
|
8819
8819
|
for (const e of Qu)
|
|
8820
8820
|
Hi(n, e) && t.push(co[e]);
|
|
@@ -8834,7 +8834,7 @@ class ot {
|
|
|
8834
8834
|
constructor(t, e) {
|
|
8835
8835
|
if (!td(t))
|
|
8836
8836
|
throw new Error(
|
|
8837
|
-
`literal expressions must have a specific type, got ${
|
|
8837
|
+
`literal expressions must have a specific type, got ${Zi(t)}`
|
|
8838
8838
|
);
|
|
8839
8839
|
this.type = t, this.value = e;
|
|
8840
8840
|
}
|
|
@@ -8865,19 +8865,19 @@ 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 ${Zi(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, Ui))
|
|
8874
|
+
return new ot(Ui, 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 ${Zi(t)}`);
|
|
8881
8881
|
return new ot(Y, n);
|
|
8882
8882
|
}
|
|
8883
8883
|
case "string": {
|
|
@@ -8886,7 +8886,7 @@ function yt(n, t, e) {
|
|
|
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 ${Zi(t)}`);
|
|
8890
8890
|
return new ot(Pt, n);
|
|
8891
8891
|
}
|
|
8892
8892
|
}
|
|
@@ -8899,12 +8899,12 @@ 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, Ui)) {
|
|
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(Ui, n);
|
|
8908
8908
|
}
|
|
8909
8909
|
if (ve(t, Xt)) {
|
|
8910
8910
|
if (n.length === 3)
|
|
@@ -8917,7 +8917,7 @@ function yt(n, t, e) {
|
|
|
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 ${Zi(t)}`
|
|
8921
8921
|
);
|
|
8922
8922
|
return new ot($e, n);
|
|
8923
8923
|
}
|
|
@@ -9441,9 +9441,9 @@ function zl() {
|
|
|
9441
9441
|
}
|
|
9442
9442
|
function Ce(n, t, e) {
|
|
9443
9443
|
const i = yt(n, t, e);
|
|
9444
|
-
return
|
|
9444
|
+
return Ut(i);
|
|
9445
9445
|
}
|
|
9446
|
-
function
|
|
9446
|
+
function Ut(n, t) {
|
|
9447
9447
|
if (n instanceof ot) {
|
|
9448
9448
|
if (n.type === Xt && typeof n.value == "string") {
|
|
9449
9449
|
const i = to(n.value);
|
|
@@ -9470,7 +9470,7 @@ function Zt(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) => Ut(s));
|
|
9474
9474
|
return (s) => "".concat(...i.map((r) => r(s).toString()));
|
|
9475
9475
|
}
|
|
9476
9476
|
case w.Resolution:
|
|
@@ -9519,7 +9519,7 @@ function Zt(n, t) {
|
|
|
9519
9519
|
function fd(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] = Ut(n.args[r]);
|
|
9523
9523
|
switch (e) {
|
|
9524
9524
|
case w.Coalesce:
|
|
9525
9525
|
return (r) => {
|
|
@@ -9590,7 +9590,7 @@ function gd(n, t) {
|
|
|
9590
9590
|
}
|
|
9591
9591
|
}
|
|
9592
9592
|
function _d(n, t) {
|
|
9593
|
-
const e = n.operator, i =
|
|
9593
|
+
const e = n.operator, i = Ut(n.args[0]), s = Ut(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 _d(n, t) {
|
|
|
9611
9611
|
function md(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] = Ut(n.args[r]);
|
|
9615
9615
|
switch (e) {
|
|
9616
9616
|
case w.Any:
|
|
9617
9617
|
return (r) => {
|
|
@@ -9649,7 +9649,7 @@ function md(n, t) {
|
|
|
9649
9649
|
function yd(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] = Ut(n.args[r]);
|
|
9653
9653
|
switch (e) {
|
|
9654
9654
|
case w.Multiply:
|
|
9655
9655
|
return (r) => {
|
|
@@ -9704,7 +9704,7 @@ function yd(n, t) {
|
|
|
9704
9704
|
function pd(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] = Ut(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 pd(n, t) {
|
|
|
9715
9715
|
function xd(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] = Ut(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 xd(n, t) {
|
|
|
9727
9727
|
function Ed(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] = Ut(n.args[s]);
|
|
9731
9731
|
return (s) => {
|
|
9732
9732
|
const r = i[0](s), o = i[1](s);
|
|
9733
9733
|
let a, l;
|
|
@@ -9759,7 +9759,7 @@ function Ed(n, t) {
|
|
|
9759
9759
|
function Cd(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] = Ut(n.args[r]);
|
|
9763
9763
|
switch (e) {
|
|
9764
9764
|
case w.ToString:
|
|
9765
9765
|
return (r) => {
|
|
@@ -10595,7 +10595,7 @@ function Rn(n, t, e, i, s) {
|
|
|
10595
10595
|
}
|
|
10596
10596
|
return s.length = r, s;
|
|
10597
10597
|
}
|
|
10598
|
-
function
|
|
10598
|
+
function Ul(n, t, e, i, s) {
|
|
10599
10599
|
s = s || [];
|
|
10600
10600
|
let r = 0;
|
|
10601
10601
|
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(Ue), 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];
|
|
@@ -10957,7 +10957,7 @@ function Kd(n, t, e, i, s) {
|
|
|
10957
10957
|
}
|
|
10958
10958
|
return !1;
|
|
10959
10959
|
}
|
|
10960
|
-
function
|
|
10960
|
+
function Ud(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 Zd(n, t, e, i, s) {
|
|
|
10989
10989
|
));
|
|
10990
10990
|
}
|
|
10991
10991
|
function ql(n, t, e, i, s) {
|
|
10992
|
-
if (!
|
|
10992
|
+
if (!Ud(n, t, e[0], i, s))
|
|
10993
10993
|
return !1;
|
|
10994
10994
|
if (e.length === 1)
|
|
10995
10995
|
return !0;
|
|
@@ -11010,7 +11010,7 @@ function ql(n, t, e, i, s) {
|
|
|
11010
11010
|
return !1;
|
|
11011
11011
|
return !0;
|
|
11012
11012
|
}
|
|
11013
|
-
function
|
|
11013
|
+
function Zd(n, t, e, i, s) {
|
|
11014
11014
|
for (let r = 0, o = e.length; r < o; ++r) {
|
|
11015
11015
|
const a = e[r];
|
|
11016
11016
|
if (ql(n, t, a, i, s))
|
|
@@ -11103,7 +11103,7 @@ function qd(n, t) {
|
|
|
11103
11103
|
}
|
|
11104
11104
|
return e;
|
|
11105
11105
|
}
|
|
11106
|
-
class
|
|
11106
|
+
class Zt 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 Ut extends Oe {
|
|
|
11141
11141
|
* @override
|
|
11142
11142
|
*/
|
|
11143
11143
|
clone() {
|
|
11144
|
-
const t = new
|
|
11144
|
+
const t = new Zt(
|
|
11145
11145
|
this.flatCoordinates.slice(),
|
|
11146
11146
|
this.layout,
|
|
11147
11147
|
this.ends_.slice()
|
|
@@ -11341,7 +11341,7 @@ class Ut extends Oe {
|
|
|
11341
11341
|
e,
|
|
11342
11342
|
0,
|
|
11343
11343
|
i
|
|
11344
|
-
), new
|
|
11344
|
+
), new Zt(e, "XY", i);
|
|
11345
11345
|
}
|
|
11346
11346
|
/**
|
|
11347
11347
|
* Get the type of this geometry.
|
|
@@ -11402,7 +11402,7 @@ function Da(n) {
|
|
|
11402
11402
|
t,
|
|
11403
11403
|
e
|
|
11404
11404
|
];
|
|
11405
|
-
return new
|
|
11405
|
+
return new Zt(r, "XY", [r.length]);
|
|
11406
11406
|
}
|
|
11407
11407
|
function $d(n, t, e) {
|
|
11408
11408
|
t = t || 32;
|
|
@@ -11412,7 +11412,7 @@ function $d(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
|
|
11415
|
+
const l = [a.length], h = new Zt(a, s, l);
|
|
11416
11416
|
return Jd(h, r, n.getRadius()), h;
|
|
11417
11417
|
}
|
|
11418
11418
|
function Jd(n, t, e, i) {
|
|
@@ -11424,7 +11424,7 @@ function Jd(n, t, e, i) {
|
|
|
11424
11424
|
n.changed();
|
|
11425
11425
|
}
|
|
11426
11426
|
function Co(n, t, e, i) {
|
|
11427
|
-
const s =
|
|
11427
|
+
const s = U(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) {
|
|
@@ -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 = U(t) / e[0], s = dt(t) / e[1];
|
|
12049
12049
|
return Math.max(i, s);
|
|
12050
12050
|
}
|
|
12051
12051
|
/**
|
|
@@ -12650,7 +12650,7 @@ function of(n) {
|
|
|
12650
12650
|
u
|
|
12651
12651
|
);
|
|
12652
12652
|
} else {
|
|
12653
|
-
const y = (f ? Math.max(
|
|
12653
|
+
const y = (f ? Math.max(U(f), dt(f)) : (
|
|
12654
12654
|
// use an extent that can fit the whole world if need be
|
|
12655
12655
|
360 * al.degrees / d.getMetersPerUnit()
|
|
12656
12656
|
)) / sf / 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 Z = {
|
|
12700
12700
|
OPACITY: "opacity",
|
|
12701
12701
|
VISIBLE: "visible",
|
|
12702
12702
|
EXTENT: "extent",
|
|
@@ -12715,10 +12715,10 @@ class Jl 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[Z.OPACITY] = t.opacity !== void 0 ? t.opacity : 1, nt(
|
|
12719
|
+
typeof e[Z.OPACITY] == "number",
|
|
12720
12720
|
"Layer opacity must be a number"
|
|
12721
|
-
), e[
|
|
12721
|
+
), e[Z.VISIBLE] = t.visible !== void 0 ? t.visible : !0, e[Z.Z_INDEX] = t.zIndex, e[Z.MAX_RESOLUTION] = t.maxResolution !== void 0 ? t.maxResolution : 1 / 0, e[Z.MIN_RESOLUTION] = t.minResolution !== void 0 ? t.minResolution : 0, e[Z.MIN_ZOOM] = t.minZoom !== void 0 ? t.minZoom : -1 / 0, e[Z.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 Jl extends Ht {
|
|
|
12776
12776
|
getExtent() {
|
|
12777
12777
|
return (
|
|
12778
12778
|
/** @type {import("../extent.js").Extent|undefined} */
|
|
12779
|
-
this.get(
|
|
12779
|
+
this.get(Z.EXTENT)
|
|
12780
12780
|
);
|
|
12781
12781
|
}
|
|
12782
12782
|
/**
|
|
@@ -12789,7 +12789,7 @@ class Jl extends Ht {
|
|
|
12789
12789
|
getMaxResolution() {
|
|
12790
12790
|
return (
|
|
12791
12791
|
/** @type {number} */
|
|
12792
|
-
this.get(
|
|
12792
|
+
this.get(Z.MAX_RESOLUTION)
|
|
12793
12793
|
);
|
|
12794
12794
|
}
|
|
12795
12795
|
/**
|
|
@@ -12802,7 +12802,7 @@ class Jl extends Ht {
|
|
|
12802
12802
|
getMinResolution() {
|
|
12803
12803
|
return (
|
|
12804
12804
|
/** @type {number} */
|
|
12805
|
-
this.get(
|
|
12805
|
+
this.get(Z.MIN_RESOLUTION)
|
|
12806
12806
|
);
|
|
12807
12807
|
}
|
|
12808
12808
|
/**
|
|
@@ -12815,7 +12815,7 @@ class Jl extends Ht {
|
|
|
12815
12815
|
getMinZoom() {
|
|
12816
12816
|
return (
|
|
12817
12817
|
/** @type {number} */
|
|
12818
|
-
this.get(
|
|
12818
|
+
this.get(Z.MIN_ZOOM)
|
|
12819
12819
|
);
|
|
12820
12820
|
}
|
|
12821
12821
|
/**
|
|
@@ -12828,7 +12828,7 @@ class Jl extends Ht {
|
|
|
12828
12828
|
getMaxZoom() {
|
|
12829
12829
|
return (
|
|
12830
12830
|
/** @type {number} */
|
|
12831
|
-
this.get(
|
|
12831
|
+
this.get(Z.MAX_ZOOM)
|
|
12832
12832
|
);
|
|
12833
12833
|
}
|
|
12834
12834
|
/**
|
|
@@ -12840,7 +12840,7 @@ class Jl extends Ht {
|
|
|
12840
12840
|
getOpacity() {
|
|
12841
12841
|
return (
|
|
12842
12842
|
/** @type {number} */
|
|
12843
|
-
this.get(
|
|
12843
|
+
this.get(Z.OPACITY)
|
|
12844
12844
|
);
|
|
12845
12845
|
}
|
|
12846
12846
|
/**
|
|
@@ -12860,7 +12860,7 @@ class Jl extends Ht {
|
|
|
12860
12860
|
getVisible() {
|
|
12861
12861
|
return (
|
|
12862
12862
|
/** @type {boolean} */
|
|
12863
|
-
this.get(
|
|
12863
|
+
this.get(Z.VISIBLE)
|
|
12864
12864
|
);
|
|
12865
12865
|
}
|
|
12866
12866
|
/**
|
|
@@ -12873,7 +12873,7 @@ class Jl extends Ht {
|
|
|
12873
12873
|
getZIndex() {
|
|
12874
12874
|
return (
|
|
12875
12875
|
/** @type {number|undefined} */
|
|
12876
|
-
this.get(
|
|
12876
|
+
this.get(Z.Z_INDEX)
|
|
12877
12877
|
);
|
|
12878
12878
|
}
|
|
12879
12879
|
/**
|
|
@@ -12891,7 +12891,7 @@ class Jl extends Ht {
|
|
|
12891
12891
|
* @api
|
|
12892
12892
|
*/
|
|
12893
12893
|
setExtent(t) {
|
|
12894
|
-
this.set(
|
|
12894
|
+
this.set(Z.EXTENT, t);
|
|
12895
12895
|
}
|
|
12896
12896
|
/**
|
|
12897
12897
|
* Set the maximum resolution at which the layer is visible.
|
|
@@ -12900,7 +12900,7 @@ class Jl extends Ht {
|
|
|
12900
12900
|
* @api
|
|
12901
12901
|
*/
|
|
12902
12902
|
setMaxResolution(t) {
|
|
12903
|
-
this.set(
|
|
12903
|
+
this.set(Z.MAX_RESOLUTION, t);
|
|
12904
12904
|
}
|
|
12905
12905
|
/**
|
|
12906
12906
|
* Set the minimum resolution at which the layer is visible.
|
|
@@ -12909,7 +12909,7 @@ class Jl extends Ht {
|
|
|
12909
12909
|
* @api
|
|
12910
12910
|
*/
|
|
12911
12911
|
setMinResolution(t) {
|
|
12912
|
-
this.set(
|
|
12912
|
+
this.set(Z.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 Jl extends Ht {
|
|
|
12920
12920
|
* @api
|
|
12921
12921
|
*/
|
|
12922
12922
|
setMaxZoom(t) {
|
|
12923
|
-
this.set(
|
|
12923
|
+
this.set(Z.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 Jl extends Ht {
|
|
|
12931
12931
|
* @api
|
|
12932
12932
|
*/
|
|
12933
12933
|
setMinZoom(t) {
|
|
12934
|
-
this.set(
|
|
12934
|
+
this.set(Z.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 Jl 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(Z.OPACITY, t);
|
|
12944
12944
|
}
|
|
12945
12945
|
/**
|
|
12946
12946
|
* Set the visibility of the layer (`true` or `false`).
|
|
@@ -12949,7 +12949,7 @@ class Jl extends Ht {
|
|
|
12949
12949
|
* @api
|
|
12950
12950
|
*/
|
|
12951
12951
|
setVisible(t) {
|
|
12952
|
-
this.set(
|
|
12952
|
+
this.set(Z.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 Jl extends Ht {
|
|
|
12959
12959
|
* @api
|
|
12960
12960
|
*/
|
|
12961
12961
|
setZIndex(t) {
|
|
12962
|
-
this.set(
|
|
12962
|
+
this.set(Z.Z_INDEX, t);
|
|
12963
12963
|
}
|
|
12964
12964
|
/**
|
|
12965
12965
|
* Clean up.
|
|
@@ -12976,7 +12976,7 @@ let vs = class extends Jl {
|
|
|
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
|
+
Z.SOURCE,
|
|
12980
12980
|
this.handleSourcePropertyChange_
|
|
12981
12981
|
);
|
|
12982
12982
|
const i = t.source ? (
|
|
@@ -13010,7 +13010,7 @@ let vs = class extends Jl {
|
|
|
13010
13010
|
getSource() {
|
|
13011
13011
|
return (
|
|
13012
13012
|
/** @type {SourceType} */
|
|
13013
|
-
this.get(
|
|
13013
|
+
this.get(Z.SOURCE) || null
|
|
13014
13014
|
);
|
|
13015
13015
|
}
|
|
13016
13016
|
/**
|
|
@@ -13148,14 +13148,14 @@ let vs = class extends Jl {
|
|
|
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(Z.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(Z.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 Jl {
|
|
|
13199
13199
|
* @api
|
|
13200
13200
|
*/
|
|
13201
13201
|
setSource(t) {
|
|
13202
|
-
this.set(
|
|
13202
|
+
this.set(Z.SOURCE, t);
|
|
13203
13203
|
}
|
|
13204
13204
|
/**
|
|
13205
13205
|
* Get the renderer for this layer.
|
|
@@ -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 Ze(
|
|
14034
14034
|
e[0] - i,
|
|
14035
14035
|
e[1] - i,
|
|
14036
14036
|
e[0] + i,
|
|
@@ -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 Zt(
|
|
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 Zt(
|
|
15308
15308
|
e.slice(r, h),
|
|
15309
15309
|
t,
|
|
15310
15310
|
l
|
|
@@ -15330,7 +15330,7 @@ class vi extends Oe {
|
|
|
15330
15330
|
* @override
|
|
15331
15331
|
*/
|
|
15332
15332
|
intersectsExtent(t) {
|
|
15333
|
-
return
|
|
15333
|
+
return Zd(
|
|
15334
15334
|
this.getOrientedFlatCoordinates(),
|
|
15335
15335
|
0,
|
|
15336
15336
|
this.endss_,
|
|
@@ -15347,7 +15347,7 @@ class vi extends Oe {
|
|
|
15347
15347
|
*/
|
|
15348
15348
|
setCoordinates(t, e) {
|
|
15349
15349
|
this.setLayout(e, t, 3), this.flatCoordinates || (this.flatCoordinates = []);
|
|
15350
|
-
const i =
|
|
15350
|
+
const i = Ul(
|
|
15351
15351
|
this.flatCoordinates,
|
|
15352
15352
|
0,
|
|
15353
15353
|
t,
|
|
@@ -15422,7 +15422,7 @@ class Ft {
|
|
|
15422
15422
|
getFlatInteriorPoints() {
|
|
15423
15423
|
if (!this.flatInteriorPoints_) {
|
|
15424
15424
|
const t = qd(this.flatCoordinates_, this.ends_), e = th(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 Ze(e.minX, e.minY, e.maxX, e.maxY, t);
|
|
15799
15799
|
}
|
|
15800
15800
|
/**
|
|
15801
15801
|
* @param {RBush<T>} rbush R-Tree.
|
|
@@ -16850,7 +16850,7 @@ class Sf 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 Zt([s]);
|
|
16854
16854
|
}
|
|
16855
16855
|
/**
|
|
16856
16856
|
* @return {import("../geom/Polygon.js").default} Geometry.
|
|
@@ -17129,7 +17129,7 @@ class Rf extends we {
|
|
|
17129
17129
|
this.lastCentroid[0] - s[0],
|
|
17130
17130
|
s[1] - this.lastCentroid[1]
|
|
17131
17131
|
], a = t.map.getView();
|
|
17132
|
-
|
|
17132
|
+
Zh(r, a.getResolution()), Br(r, a.getRotation()), a.adjustCenterInternal(r);
|
|
17133
17133
|
}
|
|
17134
17134
|
} else this.kinetic_ && this.kinetic_.begin();
|
|
17135
17135
|
this.lastCentroid = s, this.lastPointersCount_ = i.length, t.originalEvent.preventDefault();
|
|
@@ -17394,7 +17394,7 @@ function ah(n, t, e) {
|
|
|
17394
17394
|
Yn(n, i[s], !1, e);
|
|
17395
17395
|
return;
|
|
17396
17396
|
}
|
|
17397
|
-
if (t instanceof
|
|
17397
|
+
if (t instanceof Zt) {
|
|
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 Lf 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 = Zt), 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);
|
|
@@ -19951,7 +19951,7 @@ class Kf extends we {
|
|
|
19951
19951
|
const p = o[_];
|
|
19952
19952
|
if (p.feature.getGeometry().getType() === "Circle") {
|
|
19953
19953
|
let E = p.feature.getGeometry();
|
|
19954
|
-
y =
|
|
19954
|
+
y = Uh(
|
|
19955
19955
|
s,
|
|
19956
19956
|
/** @type {import("../geom/Circle.js").default} */
|
|
19957
19957
|
E
|
|
@@ -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 Uf extends we {
|
|
20015
20015
|
/**
|
|
20016
20016
|
* @param {Options} [options] Options.
|
|
20017
20017
|
*/
|
|
@@ -20184,7 +20184,7 @@ class Zf extends we {
|
|
|
20184
20184
|
(!e || !i) && (e = e || t, e && e.getViewport().classList.remove("ol-grab", "ol-grabbing"));
|
|
20185
20185
|
}
|
|
20186
20186
|
}
|
|
20187
|
-
class
|
|
20187
|
+
class Zf {
|
|
20188
20188
|
/**
|
|
20189
20189
|
* @param {number} decay Rate of decay (must be negative).
|
|
20190
20190
|
* @param {number} minVelocity Minimum velocity (pixels/millisecond).
|
|
@@ -20240,7 +20240,7 @@ class Uf {
|
|
|
20240
20240
|
}
|
|
20241
20241
|
function Hf(n) {
|
|
20242
20242
|
n = n || {};
|
|
20243
|
-
const t = new wt(), e = new
|
|
20243
|
+
const t = new wt(), e = new Zf(-5e-3, 0.05, 100);
|
|
20244
20244
|
return (n.altShiftDragRotate !== void 0 ? n.altShiftDragRotate : !0) && t.push(new vf()), (n.doubleClickZoom !== void 0 ? n.doubleClickZoom : !0) && t.push(
|
|
20245
20245
|
new mf({
|
|
20246
20246
|
delta: n.zoomDelta,
|
|
@@ -20854,7 +20854,7 @@ class tg 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_ ? Uo(this.collapseLabel_, this.label_) : Uo(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.
|
|
@@ -21267,7 +21267,7 @@ class sg extends io {
|
|
|
21267
21267
|
}
|
|
21268
21268
|
const d = c.projection, f = el(t.slice(), d), g = [[0, 0]];
|
|
21269
21269
|
if (d.canWrapX() && s) {
|
|
21270
|
-
const x = d.getExtent(), C =
|
|
21270
|
+
const x = d.getExtent(), C = U(x);
|
|
21271
21271
|
g.push([-C, 0], [C, 0]);
|
|
21272
21272
|
}
|
|
21273
21273
|
const m = e.layerStatesArray, _ = m.length, y = (
|
|
@@ -22450,7 +22450,7 @@ class hg 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 " + Uc, 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 ug = {
|
|
22875
22875
|
Point: vt,
|
|
22876
22876
|
LineString: ne,
|
|
22877
|
-
Polygon:
|
|
22877
|
+
Polygon: Zt,
|
|
22878
22878
|
MultiPoint: vn,
|
|
22879
22879
|
MultiLineString: Ri,
|
|
22880
22880
|
MultiPolygon: vi
|
|
@@ -22945,7 +22945,7 @@ class fg extends cg {
|
|
|
22945
22945
|
*/
|
|
22946
22946
|
readFeature(t, e) {
|
|
22947
22947
|
return this.readFeatureFromObject(
|
|
22948
|
-
|
|
22948
|
+
Un(t),
|
|
22949
22949
|
this.getReadOptions(t, e)
|
|
22950
22950
|
);
|
|
22951
22951
|
}
|
|
@@ -22961,7 +22961,7 @@ class fg extends cg {
|
|
|
22961
22961
|
*/
|
|
22962
22962
|
readFeatures(t, e) {
|
|
22963
22963
|
return this.readFeaturesFromObject(
|
|
22964
|
-
|
|
22964
|
+
Un(t),
|
|
22965
22965
|
this.getReadOptions(t, e)
|
|
22966
22966
|
);
|
|
22967
22967
|
}
|
|
@@ -22996,7 +22996,7 @@ class fg extends cg {
|
|
|
22996
22996
|
*/
|
|
22997
22997
|
readGeometry(t, e) {
|
|
22998
22998
|
return this.readGeometryFromObject(
|
|
22999
|
-
|
|
22999
|
+
Un(t),
|
|
23000
23000
|
this.getReadOptions(t, e)
|
|
23001
23001
|
);
|
|
23002
23002
|
}
|
|
@@ -23019,7 +23019,7 @@ class fg extends cg {
|
|
|
23019
23019
|
* @override
|
|
23020
23020
|
*/
|
|
23021
23021
|
readProjection(t) {
|
|
23022
|
-
return this.readProjectionFromObject(
|
|
23022
|
+
return this.readProjectionFromObject(Un(t));
|
|
23023
23023
|
}
|
|
23024
23024
|
/**
|
|
23025
23025
|
* @abstract
|
|
@@ -23094,7 +23094,7 @@ class fg extends cg {
|
|
|
23094
23094
|
return O();
|
|
23095
23095
|
}
|
|
23096
23096
|
}
|
|
23097
|
-
function
|
|
23097
|
+
function Un(n) {
|
|
23098
23098
|
if (typeof n == "string") {
|
|
23099
23099
|
const t = JSON.parse(n);
|
|
23100
23100
|
return t || null;
|
|
@@ -23381,7 +23381,7 @@ function xg(n) {
|
|
|
23381
23381
|
}
|
|
23382
23382
|
function Eg(n) {
|
|
23383
23383
|
var r, o;
|
|
23384
|
-
const t = n.coordinates, e = [], i = ((o = (r = t[0]) == null ? void 0 : r[0]) == null ? void 0 : o[0].length) || 2, s =
|
|
23384
|
+
const t = n.coordinates, e = [], i = ((o = (r = t[0]) == null ? void 0 : r[0]) == null ? void 0 : o[0].length) || 2, s = Ul(
|
|
23385
23385
|
e,
|
|
23386
23386
|
0,
|
|
23387
23387
|
t,
|
|
@@ -23593,7 +23593,7 @@ function Fg({
|
|
|
23593
23593
|
const bg = {
|
|
23594
23594
|
name: "ppe-zoning",
|
|
23595
23595
|
getInitialState: (n) => {
|
|
23596
|
-
const { layer: t, source: e } =
|
|
23596
|
+
const { layer: t, source: e } = Ug(n == null ? void 0 : n._extent), { layer: i, source: s } = Zg(n == null ? void 0 : n._extent), r = new Mo({
|
|
23597
23597
|
layers: [t],
|
|
23598
23598
|
condition: Ef,
|
|
23599
23599
|
style: (l) => {
|
|
@@ -23603,7 +23603,7 @@ const bg = {
|
|
|
23603
23603
|
}), o = new Of({
|
|
23604
23604
|
source: e,
|
|
23605
23605
|
features: r.getFeatures()
|
|
23606
|
-
}), a = new
|
|
23606
|
+
}), a = new Uf({
|
|
23607
23607
|
layers: [t],
|
|
23608
23608
|
condition: Cf,
|
|
23609
23609
|
features: r.getFeatures()
|
|
@@ -23901,14 +23901,14 @@ function Kg(n) {
|
|
|
23901
23901
|
} else i || n._hidePopup();
|
|
23902
23902
|
});
|
|
23903
23903
|
}
|
|
23904
|
-
function
|
|
23904
|
+
function Ug(n) {
|
|
23905
23905
|
const t = new Tn({ wrapX: !1 }), e = new Li({
|
|
23906
23906
|
source: t,
|
|
23907
23907
|
style: (i) => Dr(i.getProperties())
|
|
23908
23908
|
});
|
|
23909
23909
|
return n && e.setExtent(n), { layer: e, source: t };
|
|
23910
23910
|
}
|
|
23911
|
-
function
|
|
23911
|
+
function Zg(n) {
|
|
23912
23912
|
const t = new Tn({ wrapX: !1 }), e = new Li({
|
|
23913
23913
|
source: t
|
|
23914
23914
|
// Labels use their own styles set on each feature
|
|
@@ -23984,34 +23984,39 @@ async function ph(n, t, e) {
|
|
|
23984
23984
|
});
|
|
23985
23985
|
}
|
|
23986
23986
|
function xh(n) {
|
|
23987
|
-
const t = n.getTarget(), e =
|
|
23987
|
+
const t = n.getTarget(), e = typeof t == "string" ? document.getElementById(t) : t;
|
|
23988
|
+
if (!e)
|
|
23989
|
+
throw new Error("Unable to get editor container element");
|
|
23990
|
+
const i = n.getSize();
|
|
23988
23991
|
return {
|
|
23989
|
-
size:
|
|
23992
|
+
size: i ? [i[0], i[1]] : [0, 0],
|
|
23990
23993
|
view: {
|
|
23991
23994
|
center: n.getView().getCenter() || [0, 0],
|
|
23992
23995
|
zoom: n.getView().getZoom() || 1,
|
|
23993
23996
|
rotation: n.getView().getRotation() || 0
|
|
23994
23997
|
},
|
|
23995
23998
|
containerStyles: {
|
|
23996
|
-
width:
|
|
23997
|
-
height:
|
|
23998
|
-
maxWidth:
|
|
23999
|
-
maxHeight:
|
|
23999
|
+
width: e.style.width,
|
|
24000
|
+
height: e.style.height,
|
|
24001
|
+
maxWidth: e.style.maxWidth,
|
|
24002
|
+
maxHeight: e.style.maxHeight
|
|
24000
24003
|
}
|
|
24001
24004
|
};
|
|
24002
24005
|
}
|
|
24003
24006
|
function Eh(n, t) {
|
|
24004
|
-
const e = n.getTarget();
|
|
24005
|
-
|
|
24007
|
+
const e = n.getTarget(), i = typeof e == "string" ? document.getElementById(e) : e;
|
|
24008
|
+
if (!i)
|
|
24009
|
+
throw new Error("Unable to get editor container element");
|
|
24010
|
+
i.style.width = t.containerStyles.width, i.style.height = t.containerStyles.height, i.style.maxWidth = t.containerStyles.maxWidth, i.style.maxHeight = t.containerStyles.maxHeight, n.setSize(t.size), n.getView().setCenter(t.view.center), n.getView().setZoom(t.view.zoom), n.getView().setRotation(t.view.rotation);
|
|
24006
24011
|
}
|
|
24007
24012
|
function Ch(n, t, e, i) {
|
|
24008
24013
|
const s = $g[t];
|
|
24009
24014
|
if (!s)
|
|
24010
24015
|
throw new Error(`Invalid PDF format: ${t}`);
|
|
24011
|
-
const [r, o] = e === "landscape" ? [s[0], s[1]] : [s[1], s[0]], a = i / 25.4, l = Math.round(r * a), h = Math.round(o * a), c = n.getTarget();
|
|
24012
|
-
if (!
|
|
24013
|
-
throw new Error("Unable to get editor container");
|
|
24014
|
-
return
|
|
24016
|
+
const [r, o] = e === "landscape" ? [s[0], s[1]] : [s[1], s[0]], a = i / 25.4, l = Math.round(r * a), h = Math.round(o * a), c = n.getTarget(), u = typeof c == "string" ? document.getElementById(c) : c;
|
|
24017
|
+
if (!u)
|
|
24018
|
+
throw new Error("Unable to get editor container element");
|
|
24019
|
+
return u.style.width = `${l}px`, u.style.height = `${h}px`, u.style.maxWidth = "none", u.style.maxHeight = "none", n.setSize([l, h]), { width: r, height: o, canvasWidth: l, canvasHeight: h };
|
|
24015
24020
|
}
|
|
24016
24021
|
async function Qg(n, t) {
|
|
24017
24022
|
const e = (t == null ? void 0 : t.format) || "a4", i = (t == null ? void 0 : t.orientation) || "landscape", s = (t == null ? void 0 : t.resolution) || 350, r = (t == null ? void 0 : t.filename) || "map.pdf", o = (t == null ? void 0 : t.fitContent) !== !1, a = new Ha(i, "mm", e), l = xh(n);
|
|
@@ -24056,7 +24061,7 @@ async function t_(n, t) {
|
|
|
24056
24061
|
}
|
|
24057
24062
|
let dr;
|
|
24058
24063
|
const en = [];
|
|
24059
|
-
function
|
|
24064
|
+
function Ua(n, t, e, i, s) {
|
|
24060
24065
|
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();
|
|
24061
24066
|
}
|
|
24062
24067
|
function fr(n, t) {
|
|
@@ -24065,9 +24070,9 @@ function fr(n, t) {
|
|
|
24065
24070
|
function e_() {
|
|
24066
24071
|
if (dr === void 0) {
|
|
24067
24072
|
const n = ft(6, 6, en);
|
|
24068
|
-
n.globalCompositeOperation = "lighter", n.fillStyle = "rgba(210, 0, 0, 0.75)",
|
|
24073
|
+
n.globalCompositeOperation = "lighter", n.fillStyle = "rgba(210, 0, 0, 0.75)", Ua(n, 4, 5, 4, 0), Ua(n, 4, 5, 0, 5);
|
|
24069
24074
|
const t = n.getImageData(0, 0, 3, 3).data;
|
|
24070
|
-
dr = fr(t, 0) || fr(t, 4) || fr(t, 8),
|
|
24075
|
+
dr = fr(t, 0) || fr(t, 4) || fr(t, 8), Ur(n), en.push(n.canvas);
|
|
24071
24076
|
}
|
|
24072
24077
|
return dr;
|
|
24073
24078
|
}
|
|
@@ -24109,14 +24114,14 @@ function n_(n, t, e, i, s, r, o, a, l, h, c, u, d, f) {
|
|
|
24109
24114
|
let y;
|
|
24110
24115
|
const p = e / i, E = (u ? 1 : 1 + Math.pow(2, -24)) / p;
|
|
24111
24116
|
(l.length !== 1 || h !== 0) && (y = ft(
|
|
24112
|
-
Math.round(
|
|
24117
|
+
Math.round(U(_) * p),
|
|
24113
24118
|
Math.round(dt(_) * p),
|
|
24114
24119
|
en
|
|
24115
24120
|
), u || (y.imageSmoothingEnabled = !1), l.forEach(function(C, S, T) {
|
|
24116
24121
|
if (C.image.width > 0 && C.image.height > 0) {
|
|
24117
24122
|
if (C.clipExtent) {
|
|
24118
24123
|
y.save();
|
|
24119
|
-
const N = (C.clipExtent[0] - _[0]) * p, j = -(C.clipExtent[3] - _[3]) * p, F =
|
|
24124
|
+
const N = (C.clipExtent[0] - _[0]) * p, j = -(C.clipExtent[3] - _[3]) * p, F = U(C.clipExtent) * p, q = dt(C.clipExtent) * p;
|
|
24120
24125
|
y.rect(
|
|
24121
24126
|
u ? N : Math.round(N),
|
|
24122
24127
|
u ? j : Math.round(j),
|
|
@@ -24124,7 +24129,7 @@ function n_(n, t, e, i, s, r, o, a, l, h, c, u, d, f) {
|
|
|
24124
24129
|
u ? q : Math.round(j + q) - Math.round(j)
|
|
24125
24130
|
), y.clip();
|
|
24126
24131
|
}
|
|
24127
|
-
const I = (C.extent[0] - _[0]) * p, R = -(C.extent[3] - _[3]) * p, P =
|
|
24132
|
+
const I = (C.extent[0] - _[0]) * p, R = -(C.extent[3] - _[3]) * p, P = U(C.extent) * p, k = dt(C.extent) * p;
|
|
24128
24133
|
y.drawImage(
|
|
24129
24134
|
C.image,
|
|
24130
24135
|
h,
|
|
@@ -24189,17 +24194,17 @@ function n_(n, t, e, i, s, r, o, a, l, h, c, u, d, f) {
|
|
|
24189
24194
|
else {
|
|
24190
24195
|
const jt = l[0], Se = jt.extent;
|
|
24191
24196
|
qt = jt.image, g.scale(
|
|
24192
|
-
|
|
24197
|
+
U(Se) / qt.width,
|
|
24193
24198
|
-dt(Se) / qt.height
|
|
24194
24199
|
);
|
|
24195
24200
|
}
|
|
24196
24201
|
g.drawImage(qt, 0, 0), g.restore();
|
|
24197
|
-
}), y && (
|
|
24202
|
+
}), y && (Ur(y), en.push(y.canvas)), g.canvas;
|
|
24198
24203
|
}
|
|
24199
24204
|
function Or(n) {
|
|
24200
24205
|
return Array.isArray(n) ? Math.min(...n) : n;
|
|
24201
24206
|
}
|
|
24202
|
-
const s_ = 10,
|
|
24207
|
+
const s_ = 10, Za = 0.25;
|
|
24203
24208
|
class r_ {
|
|
24204
24209
|
/**
|
|
24205
24210
|
* @param {import("../proj/Projection.js").default} sourceProj Source projection.
|
|
@@ -24222,7 +24227,7 @@ class r_ {
|
|
|
24222
24227
|
this.transformInv_ = function(E) {
|
|
24223
24228
|
const x = E[0] + "/" + E[1];
|
|
24224
24229
|
return l[x] || (l[x] = h(E)), l[x];
|
|
24225
|
-
}, this.maxSourceExtent_ = s, this.errorThresholdSquared_ = r * r, this.triangles_ = [], this.wrapsXInSource_ = !1, this.canWrapXInSource_ = this.sourceProj_.canWrapX() && !!s && !!this.sourceProj_.getExtent() &&
|
|
24230
|
+
}, this.maxSourceExtent_ = s, this.errorThresholdSquared_ = r * r, this.triangles_ = [], this.wrapsXInSource_ = !1, this.canWrapXInSource_ = this.sourceProj_.canWrapX() && !!s && !!this.sourceProj_.getExtent() && U(s) >= U(this.sourceProj_.getExtent()), this.sourceWorldWidth_ = this.sourceProj_.getExtent() ? U(this.sourceProj_.getExtent()) : null, this.targetWorldWidth_ = this.targetProj_.getExtent() ? U(this.targetProj_.getExtent()) : null;
|
|
24226
24231
|
const c = cs(i), u = Vr(i), d = Wr(i), f = zr(i), g = this.transformInv_(c), m = this.transformInv_(u), _ = this.transformInv_(d), y = this.transformInv_(f), p = s_ + (o ? Math.max(
|
|
24227
24232
|
0,
|
|
24228
24233
|
Math.ceil(
|
|
@@ -24310,7 +24315,7 @@ class r_ {
|
|
|
24310
24315
|
* @private
|
|
24311
24316
|
*/
|
|
24312
24317
|
addQuad_(t, e, i, s, r, o, a, l, h) {
|
|
24313
|
-
const c = lt([r, o, a, l]), u = this.sourceWorldWidth_ ?
|
|
24318
|
+
const c = lt([r, o, a, l]), u = this.sourceWorldWidth_ ? U(c) / this.sourceWorldWidth_ : null, d = (
|
|
24314
24319
|
/** @type {number} */
|
|
24315
24320
|
this.sourceWorldWidth_
|
|
24316
24321
|
), f = this.sourceProj_.canWrapX() && u > 0.5 && u < 1;
|
|
@@ -24318,9 +24323,9 @@ class r_ {
|
|
|
24318
24323
|
if (h > 0) {
|
|
24319
24324
|
if (this.targetProj_.isGlobal() && this.targetWorldWidth_) {
|
|
24320
24325
|
const _ = lt([t, e, i, s]);
|
|
24321
|
-
g =
|
|
24326
|
+
g = U(_) / this.targetWorldWidth_ > Za || g;
|
|
24322
24327
|
}
|
|
24323
|
-
!f && this.sourceProj_.isGlobal() && u && (g = u >
|
|
24328
|
+
!f && this.sourceProj_.isGlobal() && u && (g = u > Za || g);
|
|
24324
24329
|
}
|
|
24325
24330
|
if (!g && this.maxSourceExtent_ && isFinite(c[0]) && isFinite(c[1]) && isFinite(c[2]) && isFinite(c[3]) && !mt(c, this.maxSourceExtent_))
|
|
24326
24331
|
return;
|
|
@@ -24474,7 +24479,7 @@ class a_ extends no {
|
|
|
24474
24479
|
reproject_() {
|
|
24475
24480
|
const t = this.sourceImage_.getState();
|
|
24476
24481
|
if (t == M.LOADED) {
|
|
24477
|
-
const e =
|
|
24482
|
+
const e = U(this.targetExtent_) / this.targetResolution_, i = dt(this.targetExtent_) / this.targetResolution_;
|
|
24478
24483
|
this.canvas_ = n_(
|
|
24479
24484
|
e,
|
|
24480
24485
|
i,
|
|
@@ -24525,7 +24530,7 @@ class a_ extends no {
|
|
|
24525
24530
|
), this.sourceListenerKey_ = null;
|
|
24526
24531
|
}
|
|
24527
24532
|
}
|
|
24528
|
-
const
|
|
24533
|
+
const Zn = 4, gr = {
|
|
24529
24534
|
/**
|
|
24530
24535
|
* Triggered when an image starts loading.
|
|
24531
24536
|
* @event module:ol/source/Image.ImageSourceEvent#imageloadstart
|
|
@@ -24675,7 +24680,7 @@ function c_(n, t) {
|
|
|
24675
24680
|
n.getImage().src = t;
|
|
24676
24681
|
}
|
|
24677
24682
|
function u_(n, t, e, i) {
|
|
24678
|
-
const s = t / e, r = Yt(n), o = An(
|
|
24683
|
+
const s = t / e, r = Yt(n), o = An(U(n) / s, Zn), a = An(dt(n) / s, Zn), l = An((i - 1) * o / 2, Zn), h = o + 2 * l, c = An((i - 1) * a / 2, Zn), u = a + 2 * c;
|
|
24679
24684
|
return Hn(r, s, 0, [
|
|
24680
24685
|
h,
|
|
24681
24686
|
u
|
|
@@ -24686,7 +24691,7 @@ function d_(n) {
|
|
|
24686
24691
|
return () => {
|
|
24687
24692
|
const s = new Image();
|
|
24688
24693
|
return s.crossOrigin = i, t(s, n.url).then((r) => {
|
|
24689
|
-
const o =
|
|
24694
|
+
const o = U(e) / r.width, a = dt(e) / r.height;
|
|
24690
24695
|
return { image: r, extent: e, resolution: o !== a ? [o, a] : a, pixelRatio: 1 };
|
|
24691
24696
|
});
|
|
24692
24697
|
};
|
|
@@ -24797,7 +24802,7 @@ class g_ extends Dl {
|
|
|
24797
24802
|
), r = i.getExtent();
|
|
24798
24803
|
if (r && !nn(r, s))
|
|
24799
24804
|
return null;
|
|
24800
|
-
const o = this.image.getExtent(), a = this.image.getImage(), l =
|
|
24805
|
+
const o = this.image.getExtent(), a = this.image.getImage(), l = U(o), h = Math.floor(
|
|
24801
24806
|
a.width * ((s[0] - o[0]) / l)
|
|
24802
24807
|
);
|
|
24803
24808
|
if (h < 0 || h >= a.width)
|