@plannco-ppe/ppe-core 1.0.21 → 1.0.23

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.js CHANGED
@@ -352,7 +352,7 @@ function Br(n, t) {
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];
354
354
  }
355
- function Rt(n, t) {
355
+ function vt(n, t) {
356
356
  let e = !0;
357
357
  for (let i = n.length - 1; i >= 0; --i)
358
358
  if (n[i] != t[i]) {
@@ -699,7 +699,7 @@ function zs(n, t) {
699
699
  }
700
700
  const Qn = 0.9996, zt = 669438e-8, _s = zt * zt, ms = _s * zt, Be = zt / (1 - zt), Jo = Math.sqrt(1 - zt), Ei = (1 - Jo) / (1 + Jo), hl = Ei * Ei, Hr = hl * Ei, qr = Hr * Ei, cl = qr * Ei, ul = 1 - zt / 4 - 3 * _s / 64 - 5 * ms / 256, dc = 3 * zt / 8 + 3 * _s / 32 + 45 * ms / 1024, fc = 15 * _s / 256 + 45 * ms / 1024, gc = 35 * ms / 3072, _c = 3 / 2 * Ei - 27 / 32 * Hr + 269 / 512 * cl, mc = 21 / 16 * hl - 55 / 32 * qr, yc = 151 / 96 * Hr - 417 / 128 * cl, pc = 1097 / 512 * qr, ts = 6378137;
701
701
  function xc(n, t, e) {
702
- const i = n - 5e5, o = (e.north ? t : t - 1e7) / Qn / (ts * ul), a = o + _c * Math.sin(2 * o) + mc * Math.sin(4 * o) + yc * Math.sin(6 * o) + pc * 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), _ = ts / m, y = (1 - zt) / g, p = Be * c ** 2, E = p * p, x = i / (_ * Qn), 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 * Be)) + R / 720 * (61 + 90 * d + 298 * p + 45 * f - 252 * Be - 3 * E);
702
+ const i = n - 5e5, o = (e.north ? t : t - 1e7) / Qn / (ts * ul), a = o + _c * Math.sin(2 * o) + mc * Math.sin(4 * o) + yc * Math.sin(6 * o) + pc * 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), _ = ts / m, y = (1 - zt) / g, p = Be * c ** 2, E = p * p, x = i / (_ * Qn), C = x * x, S = C * x, T = S * x, I = T * x, v = I * x, P = a - u / y * (C / 2 - T / 24 * (5 + 3 * d + 10 * p - 4 * E - 9 * Be)) + v / 720 * (61 + 90 * d + 298 * p + 45 * f - 252 * Be - 3 * E);
703
703
  let k = (x - S / 6 * (1 + 2 * d + p) + I / 120 * (5 - 2 * p + 28 * d - 3 * E + 8 * Be + 24 * f)) / c;
704
704
  return k = pr(
705
705
  k + De(dl(e.number)),
@@ -750,20 +750,20 @@ function ea(n, t) {
750
750
  function Ic(n) {
751
751
  return fl(n) ? new gs({ code: n, units: "m" }) : null;
752
752
  }
753
- function Rc(n) {
753
+ function vc(n) {
754
754
  const t = fl(n.getCode());
755
755
  return t ? {
756
756
  forward: ea(wc, t),
757
757
  inverse: ea(xc, t)
758
758
  } : null;
759
759
  }
760
- const vc = 63710088e-1;
760
+ const Rc = 63710088e-1;
761
761
  function ia(n, t, e) {
762
- e = e || vc;
762
+ e = e || Rc;
763
763
  const i = De(n[1]), s = De(t[1]), r = (s - i) / 2, o = De(t[0] - n[0]) / 2, a = Math.sin(r) * Math.sin(r) + Math.sin(o) * Math.sin(o) * Math.cos(i) * Math.cos(s);
764
764
  return 2 * e * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
765
765
  }
766
- const Tc = [Rc], Pc = [Ic];
766
+ const Tc = [vc], Pc = [Ic];
767
767
  let Er = !0;
768
768
  function Mc(n) {
769
769
  Er = !1;
@@ -937,7 +937,7 @@ function ke(n, t) {
937
937
  return n;
938
938
  }
939
939
  function H(n, t) {
940
- return Er && !Rt(n, [0, 0]) && n[0] >= -180 && n[0] <= 180 && n[1] >= -90 && n[1] <= 90 && (Er = !1, al(
940
+ return Er && !vt(n, [0, 0]) && n[0] >= -180 && n[0] <= 180 && n[1] >= -90 && n[1] <= 90 && (Er = !1, al(
941
941
  "Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates."
942
942
  )), n;
943
943
  }
@@ -2113,7 +2113,7 @@ const On = "ol-hidden", Uc = "ol-selectable", xs = "ol-unselectable", oo = "ol-c
2113
2113
  ], Ir = {
2114
2114
  normal: 400,
2115
2115
  bold: 700
2116
- }, Rr = function(n) {
2116
+ }, vr = function(n) {
2117
2117
  const t = n.match(Hc);
2118
2118
  if (!t)
2119
2119
  return null;
@@ -2134,7 +2134,7 @@ const On = "ol-hidden", Uc = "ol-selectable", xs = "ol-unselectable", oo = "ol-c
2134
2134
  return isNaN(Number(e.weight)) && e.weight in Ir && (e.weight = Ir[e.weight]), e.families = e.family.split(/,\s?/).map((i) => i.trim().replace(/^['"]|['"]$/g, "")), e;
2135
2135
  }, wl = "10px sans-serif", Tt = "#000", Si = "round", pe = [], xe = 0, Ii = "round", cn = 10, un = "#000", dn = "center", es = "middle", Ye = [0, 0, 0, 0], fn = 1, hi = new Ht();
2136
2136
  let ji = null, ca;
2137
- const vr = {}, qc = /* @__PURE__ */ new Set([
2137
+ const Rr = {}, qc = /* @__PURE__ */ new Set([
2138
2138
  "serif",
2139
2139
  "sans-serif",
2140
2140
  "monospace",
@@ -2159,7 +2159,7 @@ const Jc = /* @__PURE__ */ (function() {
2159
2159
  const o = await e.load(r);
2160
2160
  if (o.length === 0)
2161
2161
  return !1;
2162
- const a = Rr(r), l = a.families[0].toLowerCase(), h = a.weight;
2162
+ const a = vr(r), l = a.families[0].toLowerCase(), h = a.weight;
2163
2163
  return o.some(
2164
2164
  /**
2165
2165
  * @param {import('../css.js').FontParameters} f Font.
@@ -2180,13 +2180,13 @@ const Jc = /* @__PURE__ */ (function() {
2180
2180
  for (let l = a.length - 1; l >= 0; --l) {
2181
2181
  const h = a[l];
2182
2182
  let c = o[h];
2183
- c < 100 && (await i(h) ? (Mi(vr), hi.set(h, 100)) : (c += 10, hi.set(h, c, !0), c < 100 && (r = !1)));
2183
+ c < 100 && (await i(h) ? (Mi(Rr), hi.set(h, 100)) : (c += 10, hi.set(h, c, !0), c < 100 && (r = !1)));
2184
2184
  }
2185
2185
  t = void 0, r || (t = setTimeout(s, 100));
2186
2186
  }
2187
2187
  return async function(r) {
2188
2188
  e || (e = Kr ? self.fonts : document.fonts);
2189
- const o = Rr(r);
2189
+ const o = vr(r);
2190
2190
  if (!o)
2191
2191
  return;
2192
2192
  const a = o.families;
@@ -2202,14 +2202,14 @@ const Jc = /* @__PURE__ */ (function() {
2202
2202
  })(), Qc = /* @__PURE__ */ (function() {
2203
2203
  let n;
2204
2204
  return function(t) {
2205
- let e = vr[t];
2205
+ let e = Rr[t];
2206
2206
  if (e == null) {
2207
2207
  if (Kr) {
2208
- const i = Rr(t), s = Sl(t, "Žg");
2208
+ const i = vr(t), s = Sl(t, "Žg");
2209
2209
  e = (isNaN(Number(i.lineHeight)) ? 1.2 : Number(i.lineHeight)) * (s.actualBoundingBoxAscent + s.actualBoundingBoxDescent);
2210
2210
  } else
2211
2211
  n || (n = document.createElement("div"), n.innerHTML = "M", n.style.minHeight = "0", n.style.maxHeight = "none", n.style.height = "auto", n.style.padding = "0", n.style.border = "none", n.style.position = "absolute", n.style.display = "block", n.style.left = "-99999px"), n.style.font = t, document.body.appendChild(n), e = n.offsetHeight, document.body.removeChild(n);
2212
- vr[t] = e;
2212
+ Rr[t] = e;
2213
2213
  }
2214
2214
  return e;
2215
2215
  };
@@ -2970,7 +2970,7 @@ function Es(n, t, e, i, s, r, o) {
2970
2970
  l[u] && (r[o++] = n[t + u * i], r[o++] = n[t + u * i + 1]);
2971
2971
  return o;
2972
2972
  }
2973
- function Rl(n, t, e, i, s, r, o, a) {
2973
+ function vl(n, t, e, i, s, r, o, a) {
2974
2974
  for (let l = 0, h = e.length; l < h; ++l) {
2975
2975
  const c = e[l];
2976
2976
  o = Es(
@@ -3314,17 +3314,17 @@ class hu extends Sn {
3314
3314
  const C = p[E];
3315
3315
  let S = 0, T = C.length;
3316
3316
  if (g == null) {
3317
- const R = lu(
3317
+ const v = lu(
3318
3318
  o.maxAngle,
3319
3319
  C,
3320
3320
  0,
3321
3321
  C.length,
3322
3322
  2
3323
3323
  );
3324
- S = R[0], T = R[1];
3324
+ S = v[0], T = v[1];
3325
3325
  }
3326
- for (let R = S; R < T; R += u)
3327
- a.push(C[R], C[R + 1]);
3326
+ for (let v = S; v < T; v += u)
3327
+ a.push(C[v], C[v + 1]);
3328
3328
  const I = a.length;
3329
3329
  m = d[_], this.drawChars_(l, I), l = I;
3330
3330
  }
@@ -3675,7 +3675,7 @@ function Ee(n, t, e, i, s, r, o, a) {
3675
3675
  const l = Math.sin(r), h = Math.cos(r);
3676
3676
  return n[0] = i * h, n[1] = s * l, n[2] = -i * l, n[3] = s * h, n[4] = o * i * h - a * i * l + t, n[5] = o * s * l + a * s * h + e, n;
3677
3677
  }
3678
- function vl(n, t) {
3678
+ function Rl(n, t) {
3679
3679
  const e = _u(t);
3680
3680
  nt(e !== 0, "Transformation matrix cannot be inverted");
3681
3681
  const i = t[0], s = t[1], r = t[2], o = t[3], a = t[4], l = t[5];
@@ -3715,10 +3715,10 @@ function xu(n, t, e, i, s, r, o, a, l, h, c, u, d = !0) {
3715
3715
  E();
3716
3716
  while (t < e - i && p + y < r);
3717
3717
  let x = y === 0 ? 0 : (r - p) / y;
3718
- const C = At(m, f, x), S = At(_, g, x), T = t - i, I = p, R = r + a * l(h, s, c);
3719
- for (; t < e - i && p + y < R; )
3718
+ const C = At(m, f, x), S = At(_, g, x), T = t - i, I = p, v = r + a * l(h, s, c);
3719
+ for (; t < e - i && p + y < v; )
3720
3720
  E();
3721
- x = y === 0 ? 0 : (R - p) / y;
3721
+ x = y === 0 ? 0 : (v - p) / y;
3722
3722
  const P = At(m, f, x), k = At(_, g, x);
3723
3723
  let N = !1;
3724
3724
  if (d)
@@ -3733,7 +3733,7 @@ function xu(n, t, e, i, s, r, o, a, l, h, c, u, d = !0) {
3733
3733
  if (q) {
3734
3734
  E(), b = Math.atan2(g - _, f - m), N && (b += b > 0 ? -V : V);
3735
3735
  const z = (P + C) / 2, j = (k + S) / 2;
3736
- return F[0] = [z, j, (R - r) / 2, b, s], F;
3736
+ return F[0] = [z, j, (v - r) / 2, b, s], F;
3737
3737
  }
3738
3738
  s = s.replace(/\n/g, " ");
3739
3739
  for (let z = 0, j = s.length; z < j; ) {
@@ -3755,10 +3755,10 @@ function xu(n, t, e, i, s, r, o, a, l, h, c, u, d = !0) {
3755
3755
  }
3756
3756
  if (z === J)
3757
3757
  continue;
3758
- const v = N ? s.substring(j - J, j - z) : s.substring(J, z);
3758
+ const R = 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 re = At(m, f, x), Ge = At(_, g, x);
3761
- F.push([re, Ge, tt / 2, Q, v]), r += tt;
3761
+ F.push([re, Ge, tt / 2, Q, R]), r += tt;
3762
3762
  }
3763
3763
  return F;
3764
3764
  }
@@ -3841,7 +3841,7 @@ class Tl {
3841
3841
  this.offset_ = this.instructions_.length, this.zIndex = 0;
3842
3842
  }
3843
3843
  }
3844
- const si = Wt(), Re = [], he = [], ce = [], ve = [];
3844
+ const si = Wt(), ve = [], he = [], ce = [], Re = [];
3845
3845
  function _a(n) {
3846
3846
  return n[3].declutterBox;
3847
3847
  }
@@ -3905,24 +3905,24 @@ class wu {
3905
3905
  };
3906
3906
  (c[0] != 1 || c[1] != 1) && x.push("scale", c), s && (x.push("strokeStyle", o.strokeStyle), x.push("lineWidth", d), x.push("lineCap", o.lineCap), x.push("lineJoin", o.lineJoin), x.push("miterLimit", o.miterLimit), x.push("setLineDash", [o.lineDash]), x.push("lineDashOffset", o.lineDashOffset)), i && x.push("fillStyle", a.fillStyle), x.push("textBaseline", "middle"), x.push("textAlign", "center");
3907
3907
  const I = 0.5 - u;
3908
- let R = u * E + I * d;
3908
+ let v = u * E + I * d;
3909
3909
  const P = [], k = [];
3910
3910
  let N = 0, V = 0, F = 0, q = 0, b;
3911
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
- V += N, N = 0, R = u * E + I * d, ++q;
3915
+ V += N, N = 0, v = u * E + I * d, ++q;
3916
3916
  continue;
3917
3917
  }
3918
3918
  const J = f[z + 1] || l.font;
3919
3919
  J !== b && (s && P.push("font", J), i && k.push("font", J), b = J), N = Math.max(N, y[F]);
3920
3920
  const tt = [
3921
3921
  Q,
3922
- R + I * _[F] + u * (_[F] - p[q]),
3922
+ v + I * _[F] + u * (_[F] - p[q]),
3923
3923
  0.5 * (d + N) + V
3924
3924
  ];
3925
- R += _[F], s && P.push("strokeText", tt), i && k.push("fillText", tt), ++F;
3925
+ v += _[F], s && P.push("strokeText", tt), i && k.push("fillText", tt), ++F;
3926
3926
  }
3927
3927
  return Array.prototype.push.apply(x, P), Array.prototype.push.apply(x, k), this.labels_[r] = T, T;
3928
3928
  }
@@ -3968,9 +3968,9 @@ class wu {
3968
3968
  a *= d[0], l *= d[1];
3969
3969
  let y = i - a, p = s - l;
3970
3970
  const E = r + h > t ? t - h : r, x = o + c > e ? e - c : o, C = g[3] + E * d[0] + g[1], S = g[0] + x * d[1] + g[2], T = y - g[3], I = p - g[0];
3971
- (m || u !== 0) && (Re[0] = T, ve[0] = T, Re[1] = I, he[1] = I, he[0] = T + C, ce[0] = he[0], ce[1] = I + S, ve[1] = ce[1]);
3972
- let R;
3973
- return u !== 0 ? (R = Ee(
3971
+ (m || u !== 0) && (ve[0] = T, Re[0] = T, ve[1] = I, he[1] = I, he[0] = T + C, ce[0] = he[0], ce[1] = I + S, Re[1] = ce[1]);
3972
+ let v;
3973
+ return u !== 0 ? (v = Ee(
3974
3974
  Bt(),
3975
3975
  i,
3976
3976
  s,
@@ -3979,11 +3979,11 @@ class wu {
3979
3979
  u,
3980
3980
  -i,
3981
3981
  -s
3982
- ), _t(R, Re), _t(R, he), _t(R, ce), _t(R, ve), He(
3983
- Math.min(Re[0], he[0], ce[0], ve[0]),
3984
- Math.min(Re[1], he[1], ce[1], ve[1]),
3985
- Math.max(Re[0], he[0], ce[0], ve[0]),
3986
- Math.max(Re[1], he[1], ce[1], ve[1]),
3982
+ ), _t(v, ve), _t(v, he), _t(v, ce), _t(v, Re), He(
3983
+ Math.min(ve[0], he[0], ce[0], Re[0]),
3984
+ Math.min(ve[1], he[1], ce[1], Re[1]),
3985
+ Math.max(ve[0], he[0], ce[0], Re[0]),
3986
+ Math.max(ve[1], he[1], ce[1], Re[1]),
3987
3987
  si
3988
3988
  )) : He(
3989
3989
  Math.min(T, T + C),
@@ -4005,7 +4005,7 @@ class wu {
4005
4005
  maxY: si[3],
4006
4006
  value: _
4007
4007
  },
4008
- canvasTransform: R,
4008
+ canvasTransform: v,
4009
4009
  scale: d
4010
4010
  };
4011
4011
  }
@@ -4024,10 +4024,10 @@ class wu {
4024
4024
  const l = !!(o || a), h = s.declutterBox, c = a ? a[2] * s.scale[0] / 2 : 0;
4025
4025
  return h.minX - c <= e[0] && h.maxX + c >= 0 && h.minY - c <= e[1] && h.maxY + c >= 0 && (l && this.replayTextBackground_(
4026
4026
  t,
4027
- Re,
4027
+ ve,
4028
4028
  he,
4029
4029
  ce,
4030
- ve,
4030
+ Re,
4031
4031
  /** @type {Array<*>} */
4032
4032
  o,
4033
4033
  /** @type {Array<*>} */
@@ -4121,7 +4121,7 @@ class wu {
4121
4121
  ), gu(this.renderedTransform_, i));
4122
4122
  let u = 0;
4123
4123
  const d = s.length;
4124
- let f = 0, g, m, _, y, p, E, x, C, S, T, I, R, P, k = 0, N = 0;
4124
+ let f = 0, g, m, _, y, p, E, x, C, S, T, I, v, P, k = 0, N = 0;
4125
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
  {
@@ -4133,23 +4133,23 @@ class wu {
4133
4133
  ), z = this.instructions != s || this.overlaps ? 0 : 200;
4134
4134
  let j, Q, J, tt;
4135
4135
  for (; u < d; ) {
4136
- const v = s[u];
4136
+ const R = s[u];
4137
4137
  switch (
4138
4138
  /** @type {import("./Instruction.js").default} */
4139
- v[0]
4139
+ R[0]
4140
4140
  ) {
4141
4141
  case L.BEGIN_GEOMETRY:
4142
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
- v[2] + 1 : ++u : u = /** @type {number} */
4145
- v[2], h && (h.zIndex = v[4]);
4143
+ R[1], tt = R[3], j.getGeometry() ? a !== void 0 && !mt(a, tt.getExtent()) ? u = /** @type {number} */
4144
+ R[2] + 1 : ++u : u = /** @type {number} */
4145
+ R[2], h && (h.zIndex = R[4]);
4146
4146
  break;
4147
4147
  case L.BEGIN_PATH:
4148
4148
  k > z && (this.fill_(t), k = 0), N > z && (t.stroke(), N = 0), !k && !N && (t.beginPath(), p = NaN, E = NaN), ++u;
4149
4149
  break;
4150
4150
  case L.CIRCLE:
4151
4151
  f = /** @type {number} */
4152
- v[1];
4152
+ R[1];
4153
4153
  const Ge = c[f], pt = c[f + 1], qt = c[f + 2], Vt = c[f + 3], Ie = qt - Ge, Di = Vt - pt, $t = Math.sqrt(Ie * Ie + Di * Di);
4154
4154
  t.moveTo(Ge + $t, pt), t.arc(Ge, pt, $t, 0, 2 * Math.PI, !0), ++u;
4155
4155
  break;
@@ -4158,88 +4158,88 @@ class wu {
4158
4158
  break;
4159
4159
  case L.CUSTOM:
4160
4160
  f = /** @type {number} */
4161
- v[1], g = v[2];
4161
+ R[1], g = R[2];
4162
4162
  const Sh = (
4163
4163
  /** @type {import("../../geom/SimpleGeometry.js").default} */
4164
- v[3]
4165
- ), Ih = v[4], No = v[5];
4164
+ R[3]
4165
+ ), Ih = R[4], No = R[5];
4166
4166
  b.geometry = Sh, b.feature = j, u in V || (V[u] = []);
4167
4167
  const Oi = V[u];
4168
- No ? No(c, f, g, 2, Oi) : (Oi[0] = c[f], Oi[1] = c[f + 1], Oi.length = 2), h && (h.zIndex = v[6]), Ih(Oi, b), ++u;
4168
+ No ? No(c, f, g, 2, Oi) : (Oi[0] = c[f], Oi[1] = c[f + 1], Oi.length = 2), h && (h.zIndex = R[6]), Ih(Oi, b), ++u;
4169
4169
  break;
4170
4170
  case L.DRAW_IMAGE:
4171
4171
  f = /** @type {number} */
4172
- v[1], g = /** @type {number} */
4173
- v[2], S = /** @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} */
4174
- v[3], m = /** @type {number} */
4175
- v[4], _ = /** @type {number} */
4176
- v[5];
4172
+ R[1], g = /** @type {number} */
4173
+ R[2], S = /** @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} */
4174
+ R[3], m = /** @type {number} */
4175
+ R[4], _ = /** @type {number} */
4176
+ R[5];
4177
4177
  let As = (
4178
4178
  /** @type {number} */
4179
- v[6]
4179
+ R[6]
4180
4180
  );
4181
- const Rh = (
4181
+ const vh = (
4182
4182
  /** @type {number} */
4183
- v[7]
4184
- ), vh = (
4183
+ R[7]
4184
+ ), Rh = (
4185
4185
  /** @type {number} */
4186
- v[8]
4186
+ R[8]
4187
4187
  ), Th = (
4188
4188
  /** @type {number} */
4189
- v[9]
4189
+ R[9]
4190
4190
  ), Go = (
4191
4191
  /** @type {boolean} */
4192
- v[10]
4192
+ R[10]
4193
4193
  );
4194
4194
  let Fs = (
4195
4195
  /** @type {number} */
4196
- v[11]
4196
+ R[11]
4197
4197
  );
4198
4198
  const Ph = (
4199
4199
  /** @type {import("../../size.js").Size} */
4200
- v[12]
4200
+ R[12]
4201
4201
  );
4202
4202
  let Mn = (
4203
4203
  /** @type {number} */
4204
- v[13]
4204
+ R[13]
4205
4205
  );
4206
- y = v[14] || "declutter";
4206
+ y = R[14] || "declutter";
4207
4207
  const ki = (
4208
4208
  /** @type {{args: import("../canvas.js").DeclutterImageWithText, declutterMode: import('../../style/Style.js').DeclutterMode}} */
4209
- v[15]
4209
+ R[15]
4210
4210
  );
4211
- if (!S && v.length >= 20) {
4211
+ if (!S && R.length >= 20) {
4212
4212
  T = /** @type {string} */
4213
- v[19], I = /** @type {string} */
4214
- v[20], R = /** @type {string} */
4215
- v[21], P = /** @type {string} */
4216
- v[22];
4213
+ R[19], I = /** @type {string} */
4214
+ R[20], v = /** @type {string} */
4215
+ R[21], P = /** @type {string} */
4216
+ R[22];
4217
4217
  const bt = this.drawLabelWithPointPlacement_(
4218
4218
  T,
4219
4219
  I,
4220
- R,
4220
+ v,
4221
4221
  P
4222
4222
  );
4223
- S = bt.label, v[3] = S;
4223
+ S = bt.label, R[3] = S;
4224
4224
  const ze = (
4225
4225
  /** @type {number} */
4226
- v[23]
4226
+ R[23]
4227
4227
  );
4228
- m = (bt.anchorX - ze) * this.pixelRatio, v[4] = m;
4228
+ m = (bt.anchorX - ze) * this.pixelRatio, R[4] = m;
4229
4229
  const Dt = (
4230
4230
  /** @type {number} */
4231
- v[24]
4231
+ R[24]
4232
4232
  );
4233
- _ = (bt.anchorY - Dt) * this.pixelRatio, v[5] = _, As = S.height, v[6] = As, Mn = S.width, v[13] = Mn;
4233
+ _ = (bt.anchorY - Dt) * this.pixelRatio, R[5] = _, As = S.height, R[6] = As, Mn = S.width, R[13] = Mn;
4234
4234
  }
4235
4235
  let bs;
4236
- v.length > 25 && (bs = /** @type {number} */
4237
- v[25]);
4236
+ R.length > 25 && (bs = /** @type {number} */
4237
+ R[25]);
4238
4238
  let Ds, Ln, An;
4239
- v.length > 17 ? (Ds = /** @type {Array<number>} */
4240
- v[16], Ln = /** @type {Array<*>} */
4241
- v[17], An = /** @type {Array<*>} */
4242
- v[18]) : (Ds = Ye, Ln = null, An = null), Go && q ? Fs += F : !Go && !q && (Fs -= F);
4239
+ R.length > 17 ? (Ds = /** @type {Array<number>} */
4240
+ R[16], Ln = /** @type {Array<*>} */
4241
+ R[17], An = /** @type {Array<*>} */
4242
+ R[18]) : (Ds = Ye, Ln = null, An = null), Go && q ? Fs += F : !Go && !q && (Fs -= F);
4243
4243
  let Mh = 0;
4244
4244
  for (; f < g; f += 2) {
4245
4245
  if (bs && bs[Mh++] < Mn / this.pixelRatio)
@@ -4253,7 +4253,7 @@ class wu {
4253
4253
  As,
4254
4254
  m,
4255
4255
  _,
4256
- vh,
4256
+ Rh,
4257
4257
  Th,
4258
4258
  Fs,
4259
4259
  Ph,
@@ -4266,7 +4266,7 @@ class wu {
4266
4266
  e,
4267
4267
  S,
4268
4268
  bt,
4269
- Rh,
4269
+ vh,
4270
4270
  Ln,
4271
4271
  An
4272
4272
  ];
@@ -4295,48 +4295,48 @@ class wu {
4295
4295
  case L.DRAW_CHARS:
4296
4296
  const zo = (
4297
4297
  /** @type {number} */
4298
- v[1]
4298
+ R[1]
4299
4299
  ), Wo = (
4300
4300
  /** @type {number} */
4301
- v[2]
4301
+ R[2]
4302
4302
  ), Os = (
4303
4303
  /** @type {number} */
4304
- v[3]
4304
+ R[3]
4305
4305
  ), Lh = (
4306
4306
  /** @type {number} */
4307
- v[4]
4307
+ R[4]
4308
4308
  );
4309
4309
  P = /** @type {string} */
4310
- v[5];
4310
+ R[5];
4311
4311
  const Ah = (
4312
4312
  /** @type {number} */
4313
- v[6]
4313
+ R[6]
4314
4314
  ), Vo = (
4315
4315
  /** @type {number} */
4316
- v[7]
4316
+ R[7]
4317
4317
  ), jo = (
4318
4318
  /** @type {number} */
4319
- v[8]
4319
+ R[8]
4320
4320
  );
4321
- R = /** @type {string} */
4322
- v[9];
4321
+ v = /** @type {string} */
4322
+ R[9];
4323
4323
  const ks = (
4324
4324
  /** @type {number} */
4325
- v[10]
4325
+ R[10]
4326
4326
  );
4327
4327
  T = /** @type {string|Array<string>} */
4328
- v[11], Array.isArray(T) && (T = T.reduce(Cu, "")), I = /** @type {string} */
4329
- v[12];
4328
+ R[11], Array.isArray(T) && (T = T.reduce(Cu, "")), I = /** @type {string} */
4329
+ R[12];
4330
4330
  const Xo = [
4331
4331
  /** @type {number} */
4332
- v[13],
4332
+ R[13],
4333
4333
  /** @type {number} */
4334
- v[13]
4334
+ R[13]
4335
4335
  ];
4336
- y = v[14] || "declutter";
4336
+ y = R[14] || "declutter";
4337
4337
  const Fh = (
4338
4338
  /** @type {boolean} */
4339
- v[15]
4339
+ R[15]
4340
4340
  ), Ns = this.textStates[I], Ni = Ns.font, Gi = [
4341
4341
  Ns.scale[0] * Vo,
4342
4342
  Ns.scale[1] * Vo
@@ -4363,10 +4363,10 @@ class wu {
4363
4363
  t: if (Dt) {
4364
4364
  const Jt = [];
4365
4365
  let Ot, oe, ae, et, It;
4366
- if (R)
4366
+ if (v)
4367
4367
  for (Ot = 0, oe = Dt.length; Ot < oe; ++Ot) {
4368
4368
  It = Dt[Ot], ae = /** @type {string} */
4369
- It[4], et = this.createLabel(ae, I, "", R), m = /** @type {number} */
4369
+ It[4], et = this.createLabel(ae, I, "", v), m = /** @type {number} */
4370
4370
  It[2] + (Gi[0] < 0 ? -ks : ks), _ = Os * et.height + (0.5 - Os) * 2 * ks * Gi[1] / Gi[0] - jo;
4371
4371
  const le = this.calculateImageOrLabelDimensions_(
4372
4372
  et.width,
@@ -4443,7 +4443,7 @@ class wu {
4443
4443
  case L.END_GEOMETRY:
4444
4444
  if (o !== void 0) {
4445
4445
  j = /** @type {import("../../Feature.js").FeatureLike} */
4446
- v[1];
4446
+ R[1];
4447
4447
  const bt = o(
4448
4448
  j,
4449
4449
  tt,
@@ -4459,19 +4459,19 @@ class wu {
4459
4459
  break;
4460
4460
  case L.MOVE_TO_LINE_TO:
4461
4461
  for (f = /** @type {number} */
4462
- v[1], g = /** @type {number} */
4463
- v[2], Q = c[f], J = c[f + 1], t.moveTo(Q, J), p = Q + 0.5 | 0, E = J + 0.5 | 0, f += 2; f < g; f += 2)
4462
+ R[1], g = /** @type {number} */
4463
+ R[2], Q = c[f], J = c[f + 1], t.moveTo(Q, J), p = Q + 0.5 | 0, E = J + 0.5 | 0, f += 2; f < g; f += 2)
4464
4464
  Q = c[f], J = c[f + 1], x = Q + 0.5 | 0, C = J + 0.5 | 0, (f == g - 2 || x !== p || C !== E) && (t.lineTo(Q, J), p = x, E = C);
4465
4465
  ++u;
4466
4466
  break;
4467
4467
  case L.SET_FILL_STYLE:
4468
- this.alignAndScaleFill_ = v[2], k && (this.fill_(t), k = 0, N && (t.stroke(), N = 0)), t.fillStyle = v[1], ++u;
4468
+ this.alignAndScaleFill_ = R[2], k && (this.fill_(t), k = 0, N && (t.stroke(), N = 0)), t.fillStyle = R[1], ++u;
4469
4469
  break;
4470
4470
  case L.SET_STROKE_STYLE:
4471
4471
  N && (t.stroke(), N = 0), this.setStrokeStyle_(
4472
4472
  t,
4473
4473
  /** @type {Array<*>} */
4474
- v
4474
+ R
4475
4475
  ), ++u;
4476
4476
  break;
4477
4477
  case L.STROKE:
@@ -4631,7 +4631,7 @@ class Iu {
4631
4631
  e * (this.renderBuffer_ + s),
4632
4632
  u
4633
4633
  ));
4634
- const d = Ru(s);
4634
+ const d = vu(s);
4635
4635
  let f;
4636
4636
  function g(C, S, T) {
4637
4637
  const I = c.getImageData(
@@ -4640,10 +4640,10 @@ class Iu {
4640
4640
  a,
4641
4641
  a
4642
4642
  ).data;
4643
- for (let R = 0, P = d.length; R < P; R++)
4644
- if (I[d[R]] > 0) {
4643
+ for (let v = 0, P = d.length; v < P; v++)
4644
+ if (I[d[v]] > 0) {
4645
4645
  if (!o || T === "none" || f !== "Image" && f !== "Text" || o.includes(C)) {
4646
- const k = (d[R] - 3) / 4, N = s - k % a, V = s - (k / a | 0), F = r(C, S, N * N + V * V);
4646
+ const k = (d[v] - 3) / 4, N = s - k % a, V = s - (k / a | 0), F = r(C, S, N * N + V * V);
4647
4647
  if (F)
4648
4648
  return F;
4649
4649
  }
@@ -4746,7 +4746,7 @@ class Iu {
4746
4746
  }
4747
4747
  }
4748
4748
  const Hs = {};
4749
- function Ru(n) {
4749
+ function vu(n) {
4750
4750
  if (Hs[n] !== void 0)
4751
4751
  return Hs[n];
4752
4752
  const t = n * 2 + 1, e = n * n, i = new Array(e + 1);
@@ -4766,7 +4766,7 @@ function Ru(n) {
4766
4766
  function ya(n) {
4767
4767
  return n[0] > 0 && n[1] > 0;
4768
4768
  }
4769
- function Ri(n, t) {
4769
+ function vi(n, t) {
4770
4770
  return Array.isArray(n) ? n : (t === void 0 ? t = [n, n] : (t[0] = n, t[1] = n), t);
4771
4771
  }
4772
4772
  class Cs {
@@ -4774,7 +4774,7 @@ class Cs {
4774
4774
  * @param {Options} options Options.
4775
4775
  */
4776
4776
  constructor(t) {
4777
- this.opacity_ = t.opacity, this.rotateWithView_ = t.rotateWithView, this.rotation_ = t.rotation, this.scale_ = t.scale, this.scaleArray_ = Ri(t.scale), this.displacement_ = t.displacement, this.declutterMode_ = t.declutterMode;
4777
+ this.opacity_ = t.opacity, this.rotateWithView_ = t.rotateWithView, this.rotation_ = t.rotation, this.scale_ = t.scale, this.scaleArray_ = vi(t.scale), this.displacement_ = t.displacement, this.declutterMode_ = t.declutterMode;
4778
4778
  }
4779
4779
  /**
4780
4780
  * Clones the style.
@@ -4953,7 +4953,7 @@ class Cs {
4953
4953
  * @api
4954
4954
  */
4955
4955
  setScale(t) {
4956
- this.scale_ = t, this.scaleArray_ = Ri(t);
4956
+ this.scale_ = t, this.scaleArray_ = vi(t);
4957
4957
  }
4958
4958
  /**
4959
4959
  * @abstract
@@ -6039,7 +6039,7 @@ class rt {
6039
6039
  this.zIndex_ = t;
6040
6040
  }
6041
6041
  }
6042
- function vu(n) {
6042
+ function Ru(n) {
6043
6043
  let t;
6044
6044
  if (typeof n == "function")
6045
6045
  t = n;
@@ -6130,7 +6130,7 @@ class Le {
6130
6130
  * @param {Options} [options] Options.
6131
6131
  */
6132
6132
  constructor(t) {
6133
- t = t || {}, this.font_ = t.font, this.rotation_ = t.rotation, this.rotateWithView_ = t.rotateWithView, this.keepUpright_ = t.keepUpright, this.scale_ = t.scale, this.scaleArray_ = Ri(t.scale !== void 0 ? t.scale : 1), this.text_ = t.text, this.textAlign_ = t.textAlign, this.justify_ = t.justify, this.repeat_ = t.repeat, this.textBaseline_ = t.textBaseline, this.fill_ = t.fill !== void 0 ? t.fill : new lt({ color: Tu }), this.maxAngle_ = t.maxAngle !== void 0 ? t.maxAngle : Math.PI / 4, this.placement_ = t.placement !== void 0 ? t.placement : "point", this.overflow_ = !!t.overflow, this.stroke_ = t.stroke !== void 0 ? t.stroke : null, this.offsetX_ = t.offsetX !== void 0 ? t.offsetX : 0, this.offsetY_ = t.offsetY !== void 0 ? t.offsetY : 0, this.backgroundFill_ = t.backgroundFill ? t.backgroundFill : null, this.backgroundStroke_ = t.backgroundStroke ? t.backgroundStroke : null, this.padding_ = t.padding === void 0 ? null : t.padding, this.declutterMode_ = t.declutterMode;
6133
+ t = t || {}, this.font_ = t.font, this.rotation_ = t.rotation, this.rotateWithView_ = t.rotateWithView, this.keepUpright_ = t.keepUpright, this.scale_ = t.scale, this.scaleArray_ = vi(t.scale !== void 0 ? t.scale : 1), this.text_ = t.text, this.textAlign_ = t.textAlign, this.justify_ = t.justify, this.repeat_ = t.repeat, this.textBaseline_ = t.textBaseline, this.fill_ = t.fill !== void 0 ? t.fill : new lt({ color: Tu }), this.maxAngle_ = t.maxAngle !== void 0 ? t.maxAngle : Math.PI / 4, this.placement_ = t.placement !== void 0 ? t.placement : "point", this.overflow_ = !!t.overflow, this.stroke_ = t.stroke !== void 0 ? t.stroke : null, this.offsetX_ = t.offsetX !== void 0 ? t.offsetX : 0, this.offsetY_ = t.offsetY !== void 0 ? t.offsetY : 0, this.backgroundFill_ = t.backgroundFill ? t.backgroundFill : null, this.backgroundStroke_ = t.backgroundStroke ? t.backgroundStroke : null, this.padding_ = t.padding === void 0 ? null : t.padding, this.declutterMode_ = t.declutterMode;
6134
6134
  }
6135
6135
  /**
6136
6136
  * Clones the style.
@@ -6443,7 +6443,7 @@ class Le {
6443
6443
  * @api
6444
6444
  */
6445
6445
  setScale(t) {
6446
- this.scale_ = t, this.scaleArray_ = Ri(t !== void 0 ? t : 1);
6446
+ this.scale_ = t, this.scaleArray_ = vi(t !== void 0 ? t : 1);
6447
6447
  }
6448
6448
  /**
6449
6449
  * Set the stroke.
@@ -7590,8 +7590,8 @@ function Au(n, t, e, i, s, r, o, a, l) {
7590
7590
  continue;
7591
7591
  Array.isArray(S) || (S = [S]);
7592
7592
  const I = (E * _).toString(16).padStart(7, "#00000");
7593
- for (let R = 0, P = S.length; R < P; ++R) {
7594
- const k = S[R], N = k.getGeometryFunction()(x);
7593
+ for (let v = 0, P = S.length; v < P; ++v) {
7594
+ const k = S[v], N = k.getGeometryFunction()(x);
7595
7595
  if (!N || !mt(h, N.getExtent()))
7596
7596
  continue;
7597
7597
  const V = k.clone(), F = V.getFill();
@@ -7608,10 +7608,10 @@ function Au(n, t, e, i, s, r, o, a, l) {
7608
7608
  J[1],
7609
7609
  void 0,
7610
7610
  { alpha: !1 }
7611
- ), v = tt.canvas;
7612
- tt.fillStyle = I, tt.fillRect(0, 0, v.width, v.height), V.setImage(
7611
+ ), R = tt.canvas;
7612
+ tt.fillStyle = I, tt.fillRect(0, 0, R.width, R.height), V.setImage(
7613
7613
  new Ss({
7614
- img: v,
7614
+ img: R,
7615
7615
  anchor: b.getAnchor(),
7616
7616
  anchorXUnits: "pixels",
7617
7617
  anchorYUnits: "pixels",
@@ -7633,7 +7633,7 @@ function Au(n, t, e, i, s, r, o, a, l) {
7633
7633
  /** @type {import("../../geom/GeometryCollection.js").default} */
7634
7634
  N.getGeometriesArrayRecursive()
7635
7635
  );
7636
- for (let tt = 0, v = J.length; tt < v; ++tt) {
7636
+ for (let tt = 0, R = J.length; tt < R; ++tt) {
7637
7637
  const re = J[tt];
7638
7638
  j[re.getType().replace("Multi", "")].push(
7639
7639
  re,
@@ -7649,7 +7649,7 @@ function Au(n, t, e, i, s, r, o, a, l) {
7649
7649
  const C = y[p[E]];
7650
7650
  for (const S in C) {
7651
7651
  const T = C[S];
7652
- for (let I = 0, R = T.length; I < R; I += 2) {
7652
+ for (let I = 0, v = T.length; I < v; I += 2) {
7653
7653
  g.setStyle(T[I + 1]);
7654
7654
  for (let P = 0, k = t.length; P < k; ++P)
7655
7655
  g.setTransform(t[P]), g.drawGeometry(T[I]);
@@ -8079,7 +8079,7 @@ class Ol extends Yu {
8079
8079
  r,
8080
8080
  -a / 2,
8081
8081
  -l / 2
8082
- ), vl(this.inversePixelTransform, this.pixelTransform);
8082
+ ), Rl(this.inversePixelTransform, this.pixelTransform);
8083
8083
  const h = yu(this.pixelTransform);
8084
8084
  if (this.useContainer(e, h, this.getBackground(t)), !this.containerReused) {
8085
8085
  const c = this.context.canvas;
@@ -8457,7 +8457,7 @@ class Ku extends Ol {
8457
8457
  i.loadFeatures(E[F], u, c);
8458
8458
  const T = Ca(u, d);
8459
8459
  let I = !0;
8460
- const R = (
8460
+ const v = (
8461
8461
  /**
8462
8462
  * @param {import("../../Feature.js").default} feature Feature.
8463
8463
  * @param {number} index Index.
@@ -8481,7 +8481,7 @@ class Ku extends Ol {
8481
8481
  ), P = ys(y), k = i.getFeaturesInExtent(P);
8482
8482
  m && k.sort(m);
8483
8483
  for (let F = 0, q = k.length; F < q; ++F)
8484
- R(k[F], F);
8484
+ v(k[F], F);
8485
8485
  this.renderedFeatures_ = k, this.ready = I;
8486
8486
  const N = C.finish(), V = new Iu(
8487
8487
  y,
@@ -8803,8 +8803,8 @@ function Ia(n, t, e, i, s) {
8803
8803
  }
8804
8804
  }
8805
8805
  let ii = 0;
8806
- const vt = 1 << ii++, Y = 1 << ii++, Pt = 1 << ii++, Xt = 1 << ii++, Je = 1 << ii++, Ui = 1 << ii++, zn = Math.pow(2, ii) - 1, uo = {
8807
- [vt]: "boolean",
8806
+ const Rt = 1 << ii++, Y = 1 << ii++, Pt = 1 << ii++, Xt = 1 << ii++, Je = 1 << ii++, Ui = 1 << ii++, zn = Math.pow(2, ii) - 1, uo = {
8807
+ [Rt]: "boolean",
8808
8808
  [Y]: "number",
8809
8809
  [Pt]: "string",
8810
8810
  [Xt]: "color",
@@ -8863,17 +8863,17 @@ function yt(n, t, e) {
8863
8863
  case "boolean": {
8864
8864
  if (Te(t, Pt))
8865
8865
  return new at(Pt, n ? "true" : "false");
8866
- if (!qi(t, vt))
8866
+ if (!qi(t, Rt))
8867
8867
  throw new Error(
8868
8868
  `got a boolean, but expected ${Hi(t)}`
8869
8869
  );
8870
- return new at(vt, n);
8870
+ return new at(Rt, n);
8871
8871
  }
8872
8872
  case "number": {
8873
8873
  if (Te(t, Ui))
8874
- return new at(Ui, Ri(n));
8875
- if (Te(t, vt))
8876
- return new at(vt, !!n);
8874
+ return new at(Ui, vi(n));
8875
+ if (Te(t, Rt))
8876
+ return new at(Rt, !!n);
8877
8877
  if (Te(t, Pt))
8878
8878
  return new at(Pt, n.toString());
8879
8879
  if (!qi(t, Y))
@@ -8883,8 +8883,8 @@ function yt(n, t, e) {
8883
8883
  case "string": {
8884
8884
  if (Te(t, Xt))
8885
8885
  return new at(Xt, eo(n));
8886
- if (Te(t, vt))
8887
- return new at(vt, !!n);
8886
+ if (Te(t, Rt))
8887
+ return new at(Rt, !!n);
8888
8888
  if (!qi(t, Pt))
8889
8889
  throw new Error(`got a string, but expected ${Hi(t)}`);
8890
8890
  return new at(Pt, n);
@@ -8970,9 +8970,9 @@ const w = {
8970
8970
  ToString: "to-string",
8971
8971
  Has: "has"
8972
8972
  }, nd = {
8973
- [w.Get]: A(G(1, 1 / 0), Ra),
8973
+ [w.Get]: A(G(1, 1 / 0), va),
8974
8974
  [w.Var]: A(G(1, 1), sd),
8975
- [w.Has]: A(G(1, 1 / 0), Ra),
8975
+ [w.Has]: A(G(1, 1 / 0), va),
8976
8976
  [w.Id]: A(rd, oi),
8977
8977
  [w.Concat]: A(
8978
8978
  G(2, 1 / 0),
@@ -8985,15 +8985,15 @@ const w = {
8985
8985
  [w.Time]: A(Qs, oi),
8986
8986
  [w.Any]: A(
8987
8987
  G(2, 1 / 0),
8988
- Z(vt)
8988
+ Z(Rt)
8989
8989
  ),
8990
8990
  [w.All]: A(
8991
8991
  G(2, 1 / 0),
8992
- Z(vt)
8992
+ Z(Rt)
8993
8993
  ),
8994
8994
  [w.Not]: A(
8995
8995
  G(1, 1),
8996
- Z(vt)
8996
+ Z(Rt)
8997
8997
  ),
8998
8998
  [w.Equal]: A(
8999
8999
  G(2, 2),
@@ -9021,11 +9021,11 @@ const w = {
9021
9021
  ),
9022
9022
  [w.Multiply]: A(
9023
9023
  G(2, 1 / 0),
9024
- va
9024
+ Ra
9025
9025
  ),
9026
9026
  [w.Coalesce]: A(
9027
9027
  G(2, 1 / 0),
9028
- va
9028
+ Ra
9029
9029
  ),
9030
9030
  [w.Divide]: A(
9031
9031
  G(2, 2),
@@ -9129,10 +9129,10 @@ const w = {
9129
9129
  ),
9130
9130
  [w.ToString]: A(
9131
9131
  G(1, 1),
9132
- Z(vt | Y | Pt | Xt)
9132
+ Z(Rt | Y | Pt | Xt)
9133
9133
  )
9134
9134
  };
9135
- function Ra(n, t, e) {
9135
+ function va(n, t, e) {
9136
9136
  const i = n.length - 1, s = new Array(i);
9137
9137
  for (let r = 0; r < i; ++r) {
9138
9138
  const o = n[r + 1];
@@ -9193,7 +9193,7 @@ function G(n, t) {
9193
9193
  }
9194
9194
  };
9195
9195
  }
9196
- function va(n, t, e) {
9196
+ function Ra(n, t, e) {
9197
9197
  const i = n.length - 1, s = new Array(i);
9198
9198
  for (let r = 0; r < i; ++r) {
9199
9199
  const o = yt(n[r + 1], t, e);
@@ -9226,7 +9226,7 @@ function Ta(n, t, e) {
9226
9226
  );
9227
9227
  }
9228
9228
  function ld(n, t, e) {
9229
- const i = n.length - 1, s = Pt | Y | vt, r = yt(n[1], s, e), o = yt(n[n.length - 1], t, e), a = new Array(i - 2);
9229
+ const i = n.length - 1, s = Pt | Y | Rt, r = yt(n[1], s, e), o = yt(n[n.length - 1], t, e), a = new Array(i - 2);
9230
9230
  for (let l = 0; l < i - 2; l += 2) {
9231
9231
  try {
9232
9232
  const h = yt(n[l + 2], r.type, e);
@@ -9301,7 +9301,7 @@ function cd(n, t, e) {
9301
9301
  const i = yt(n[n.length - 1], t, e), s = new Array(n.length - 1);
9302
9302
  for (let r = 0; r < s.length - 1; r += 2) {
9303
9303
  try {
9304
- const o = yt(n[r + 1], vt, e);
9304
+ const o = yt(n[r + 1], Rt, e);
9305
9305
  s[r] = o;
9306
9306
  } catch (o) {
9307
9307
  throw new Error(
@@ -9794,8 +9794,8 @@ function Sd(n, t, e, i, s, r) {
9794
9794
  function Id(n) {
9795
9795
  return !0;
9796
9796
  }
9797
- function Rd(n) {
9798
- const t = Gl(), e = vd(n, t), i = Wl();
9797
+ function vd(n) {
9798
+ const t = Gl(), e = Rd(n, t), i = Wl();
9799
9799
  return function(s, r) {
9800
9800
  if (i.properties = s.getPropertiesInternal(), i.resolution = r, t.featureId) {
9801
9801
  const o = s.getId();
@@ -9824,10 +9824,10 @@ function Pa(n) {
9824
9824
  return r.length = l, r;
9825
9825
  };
9826
9826
  }
9827
- function vd(n, t) {
9827
+ function Rd(n, t) {
9828
9828
  const e = n.length, i = new Array(e);
9829
9829
  for (let s = 0; s < e; ++s) {
9830
- const r = n[s], o = "filter" in r ? we(r.filter, vt, t) : Id;
9830
+ const r = n[s], o = "filter" in r ? we(r.filter, Rt, t) : Id;
9831
9831
  let a;
9832
9832
  if (Array.isArray(r.style)) {
9833
9833
  const l = r.style.length;
@@ -10014,19 +10014,19 @@ function Td(n, t) {
10014
10014
  n,
10015
10015
  e + "padding",
10016
10016
  t
10017
- ), T = Rs(
10017
+ ), T = vs(
10018
10018
  n,
10019
10019
  e + "declutter-mode"
10020
10020
  ), I = new Le({ declutterMode: T });
10021
- return function(R) {
10022
- if (I.setText(i(R)), s && I.setFill(s(R)), r && I.setBackgroundFill(r(R)), o && I.setStroke(o(R)), a && I.setBackgroundStroke(a(R)), l && I.setFont(l(R)), h && I.setMaxAngle(h(R)), c && I.setOffsetX(c(R)), u && I.setOffsetY(u(R)), d && I.setOverflow(d(R)), f) {
10023
- const P = f(R);
10021
+ return function(v) {
10022
+ if (I.setText(i(v)), s && I.setFill(s(v)), r && I.setBackgroundFill(r(v)), o && I.setStroke(o(v)), a && I.setBackgroundStroke(a(v)), l && I.setFont(l(v)), h && I.setMaxAngle(h(v)), c && I.setOffsetX(c(v)), u && I.setOffsetY(u(v)), d && I.setOverflow(d(v)), f) {
10023
+ const P = f(v);
10024
10024
  if (P !== "point" && P !== "line")
10025
10025
  throw new Error("Expected point or line for text-placement");
10026
10026
  I.setPlacement(P);
10027
10027
  }
10028
- if (g && I.setRepeat(g(R)), m && I.setScale(m(R)), _ && I.setRotateWithView(_(R)), y && I.setRotation(y(R)), p) {
10029
- const P = p(R);
10028
+ if (g && I.setRepeat(g(v)), m && I.setScale(m(v)), _ && I.setRotateWithView(_(v)), y && I.setRotation(y(v)), p) {
10029
+ const P = p(v);
10030
10030
  if (P !== "left" && P !== "center" && P !== "right" && P !== "end" && P !== "start")
10031
10031
  throw new Error(
10032
10032
  "Expected left, right, center, start, or end for text-align"
@@ -10034,20 +10034,20 @@ function Td(n, t) {
10034
10034
  I.setTextAlign(P);
10035
10035
  }
10036
10036
  if (E) {
10037
- const P = E(R);
10037
+ const P = E(v);
10038
10038
  if (P !== "left" && P !== "right" && P !== "center")
10039
10039
  throw new Error("Expected left, right, or center for text-justify");
10040
10040
  I.setJustify(P);
10041
10041
  }
10042
10042
  if (x) {
10043
- const P = x(R);
10043
+ const P = x(v);
10044
10044
  if (P !== "bottom" && P !== "top" && P !== "middle" && P !== "alphabetic" && P !== "hanging")
10045
10045
  throw new Error(
10046
10046
  "Expected bottom, top, middle, alphabetic, or hanging for text-baseline"
10047
10047
  );
10048
10048
  I.setTextBaseline(P);
10049
10049
  }
10050
- return S && I.setPadding(S(R)), C && I.setKeepUpright(C(R)), I;
10050
+ return S && I.setPadding(S(v)), C && I.setKeepUpright(C(v)), I;
10051
10051
  };
10052
10052
  }
10053
10053
  function Pd(n, t) {
@@ -10080,7 +10080,7 @@ function Md(n, t) {
10080
10080
  ), f = Aa(
10081
10081
  n,
10082
10082
  e + "anchor-y-units"
10083
- ), g = kd(n, e + "color"), m = Dd(n, e + "cross-origin"), _ = Od(n, e + "offset"), y = La(n, e + "offset-origin"), p = rs(n, e + "width"), E = rs(n, e + "height"), x = bd(n, e + "size"), C = Rs(
10083
+ ), g = kd(n, e + "color"), m = Dd(n, e + "cross-origin"), _ = Od(n, e + "offset"), y = La(n, e + "offset-origin"), p = rs(n, e + "width"), E = rs(n, e + "height"), x = bd(n, e + "size"), C = vs(
10084
10084
  n,
10085
10085
  e + "declutter-mode"
10086
10086
  ), S = new Ss({
@@ -10114,7 +10114,7 @@ function Ld(n, t) {
10114
10114
  n,
10115
10115
  e + "rotate-with-view",
10116
10116
  t
10117
- ), f = rs(n, e + "radius2"), g = rs(n, e + "angle"), m = Rs(
10117
+ ), f = rs(n, e + "radius2"), g = rs(n, e + "angle"), m = vs(
10118
10118
  n,
10119
10119
  e + "declutter-mode"
10120
10120
  ), _ = new ws({
@@ -10141,7 +10141,7 @@ function Ad(n, t) {
10141
10141
  n,
10142
10142
  e + "rotate-with-view",
10143
10143
  t
10144
- ), c = Rs(
10144
+ ), c = vs(
10145
10145
  n,
10146
10146
  e + "declutter-mode"
10147
10147
  ), u = new In({
@@ -10199,7 +10199,7 @@ function Fd(n, t, e) {
10199
10199
  function pi(n, t, e) {
10200
10200
  if (!(t in n))
10201
10201
  return null;
10202
- const i = we(n[t], vt, e);
10202
+ const i = we(n[t], Rt, e);
10203
10203
  return function(s) {
10204
10204
  const r = i(s);
10205
10205
  if (typeof r != "boolean")
@@ -10220,7 +10220,7 @@ function Vl(n, t, e) {
10220
10220
  return null;
10221
10221
  const i = we(n[t], Je, e);
10222
10222
  return function(s) {
10223
- return Rn(i(s), t);
10223
+ return vn(i(s), t);
10224
10224
  };
10225
10225
  }
10226
10226
  function ss(n, t, e) {
@@ -10228,7 +10228,7 @@ function ss(n, t, e) {
10228
10228
  return null;
10229
10229
  const i = we(n[t], Je, e);
10230
10230
  return function(s) {
10231
- const r = Rn(i(s), t);
10231
+ const r = vn(i(s), t);
10232
10232
  if (r.length !== 2)
10233
10233
  throw new Error(`Expected two numbers for ${t}`);
10234
10234
  return r;
@@ -10266,7 +10266,7 @@ function bd(n, t) {
10266
10266
  const e = n[t];
10267
10267
  if (e !== void 0) {
10268
10268
  if (typeof e == "number")
10269
- return Ri(e);
10269
+ return vi(e);
10270
10270
  if (!Array.isArray(e))
10271
10271
  throw new Error(`Expected a number or size array for ${t}`);
10272
10272
  if (e.length !== 2 || typeof e[0] != "number" || typeof e[1] != "number")
@@ -10303,9 +10303,9 @@ function Aa(n, t) {
10303
10303
  function Od(n, t) {
10304
10304
  const e = n[t];
10305
10305
  if (e !== void 0)
10306
- return Rn(e, t);
10306
+ return vn(e, t);
10307
10307
  }
10308
- function Rs(n, t) {
10308
+ function vs(n, t) {
10309
10309
  const e = n[t];
10310
10310
  if (e !== void 0) {
10311
10311
  if (typeof e != "string")
@@ -10320,7 +10320,7 @@ function kd(n, t) {
10320
10320
  if (e !== void 0)
10321
10321
  return Xl(e, t);
10322
10322
  }
10323
- function Rn(n, t) {
10323
+ function vn(n, t) {
10324
10324
  if (!Array.isArray(n))
10325
10325
  throw new Error(`Expected an array for ${t}`);
10326
10326
  const e = n.length;
@@ -10342,13 +10342,13 @@ function Pr(n, t) {
10342
10342
  function Xl(n, t) {
10343
10343
  if (typeof n == "string")
10344
10344
  return n;
10345
- const e = Rn(n, t), i = e.length;
10345
+ const e = vn(n, t), i = e.length;
10346
10346
  if (i < 3 || i > 4)
10347
10347
  throw new Error(`Expected a color with 3 or 4 values for ${t}`);
10348
10348
  return e;
10349
10349
  }
10350
10350
  function Bl(n, t) {
10351
- const e = Rn(n, t);
10351
+ const e = vn(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;
@@ -10573,7 +10573,7 @@ function Kl(n, t, e, i) {
10573
10573
  n[t++] = e[s];
10574
10574
  return t;
10575
10575
  }
10576
- function vs(n, t, e, i) {
10576
+ function Rs(n, t, e, i) {
10577
10577
  for (let s = 0, r = e.length; s < r; ++s) {
10578
10578
  const o = e[s];
10579
10579
  for (let a = 0; a < i; ++a)
@@ -10581,11 +10581,11 @@ function vs(n, t, e, i) {
10581
10581
  }
10582
10582
  return t;
10583
10583
  }
10584
- function vn(n, t, e, i, s) {
10584
+ function Rn(n, t, e, i, s) {
10585
10585
  s = s || [];
10586
10586
  let r = 0;
10587
10587
  for (let o = 0, a = e.length; o < a; ++o) {
10588
- const l = vs(
10588
+ const l = Rs(
10589
10589
  n,
10590
10590
  t,
10591
10591
  e[o],
@@ -10599,7 +10599,7 @@ 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) {
10602
- const l = vn(
10602
+ const l = Rn(
10603
10603
  n,
10604
10604
  t,
10605
10605
  e[o],
@@ -10738,7 +10738,7 @@ class mn extends Ne {
10738
10738
  * @override
10739
10739
  */
10740
10740
  setCoordinates(t, e) {
10741
- this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = vs(
10741
+ this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = Rs(
10742
10742
  this.flatCoordinates,
10743
10743
  0,
10744
10744
  t,
@@ -11377,7 +11377,7 @@ class Ut extends Ne {
11377
11377
  */
11378
11378
  setCoordinates(t, e) {
11379
11379
  this.setLayout(e, t, 2), this.flatCoordinates || (this.flatCoordinates = []);
11380
- const i = vn(
11380
+ const i = Rn(
11381
11381
  this.flatCoordinates,
11382
11382
  0,
11383
11383
  t,
@@ -12497,7 +12497,7 @@ class te extends Ht {
12497
12497
  r
12498
12498
  )
12499
12499
  );
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) || !Rt(this.get(jt.CENTER), a)) && this.set(jt.CENTER, a), this.getAnimating() && !t && this.cancelAnimations(), this.cancelAnchor_ = void 0;
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) || !vt(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.
@@ -12530,7 +12530,7 @@ class te extends Ht {
12530
12530
  this.targetResolution_ = a, this.targetRotation_ = r, this.targetCenter_ = l, this.applyTargetState_();
12531
12531
  return;
12532
12532
  }
12533
- i = i || (t === 0 ? this.cancelAnchor_ : void 0), this.cancelAnchor_ = void 0, (this.getResolution() !== a || this.getRotation() !== r || !this.getCenterInternal() || !Rt(this.getCenterInternal(), l)) && (this.getAnimating() && this.cancelAnimations(), this.animateInternal({
12533
+ i = i || (t === 0 ? this.cancelAnchor_ : void 0), this.cancelAnchor_ = void 0, (this.getResolution() !== a || this.getRotation() !== r || !this.getCenterInternal() || !vt(this.getCenterInternal(), l)) && (this.getAnimating() && this.cancelAnimations(), this.animateInternal({
12534
12534
  rotation: r,
12535
12535
  center: l,
12536
12536
  resolution: a,
@@ -12687,7 +12687,7 @@ function lf(n) {
12687
12687
  return Io;
12688
12688
  }
12689
12689
  function hf(n) {
12690
- return !(n.sourceCenter && n.targetCenter && !Rt(n.sourceCenter, n.targetCenter) || n.sourceResolution !== n.targetResolution || n.sourceRotation !== n.targetRotation);
12690
+ return !(n.sourceCenter && n.targetCenter && !vt(n.sourceCenter, n.targetCenter) || n.sourceResolution !== n.targetResolution || n.sourceRotation !== n.targetRotation);
12691
12691
  }
12692
12692
  function er(n, t, e, i, s) {
12693
12693
  const r = Math.cos(-s);
@@ -13088,7 +13088,7 @@ let Ps = class extends Ql {
13088
13088
  } else
13089
13089
  s = this.getLayerState();
13090
13090
  const r = this.getExtent();
13091
- return Ro(s, e.viewState) && (!r || mt(r, e.extent));
13091
+ return vo(s, e.viewState) && (!r || mt(r, e.extent));
13092
13092
  }
13093
13093
  /**
13094
13094
  * Get the attributions of the source of this layer for the given view.
@@ -13236,7 +13236,7 @@ let Ps = class extends Ql {
13236
13236
  this.clearRenderer(), this.setSource(null), super.disposeInternal();
13237
13237
  }
13238
13238
  };
13239
- function Ro(n, t) {
13239
+ function vo(n, t) {
13240
13240
  if (!n.visible)
13241
13241
  return !1;
13242
13242
  const e = t.resolution;
@@ -13369,7 +13369,7 @@ class th extends Ps {
13369
13369
  setStyle(t) {
13370
13370
  this.style_ = t === void 0 ? Ml : t;
13371
13371
  const e = cf(t);
13372
- this.styleFunction_ = t === null ? void 0 : vu(e), this.changed();
13372
+ this.styleFunction_ = t === null ? void 0 : Ru(e), this.changed();
13373
13373
  }
13374
13374
  /**
13375
13375
  * @param {boolean|string|number} declutter Declutter images and text.
@@ -13409,7 +13409,7 @@ function cf(n) {
13409
13409
  throw new Error("Expected a list of rules with a style property");
13410
13410
  s[r] = o;
13411
13411
  }
13412
- return Rd(s);
13412
+ return vd(s);
13413
13413
  }
13414
13414
  return Pa(
13415
13415
  /** @type {Array<import("../style/flat.js").FlatStyle>} */
@@ -14608,7 +14608,7 @@ class ne extends Ne {
14608
14608
  * @override
14609
14609
  */
14610
14610
  setCoordinates(t, e) {
14611
- this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = vs(
14611
+ this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = Rs(
14612
14612
  this.flatCoordinates,
14613
14613
  0,
14614
14614
  t,
@@ -14616,7 +14616,7 @@ class ne extends Ne {
14616
14616
  ), this.changed();
14617
14617
  }
14618
14618
  }
14619
- class vi extends Ne {
14619
+ class Ri extends Ne {
14620
14620
  /**
14621
14621
  * @param {Array<Array<import("../coordinate.js").Coordinate>|LineString>|Array<number>} coordinates
14622
14622
  * Coordinates or LineString geometries. (For internal use, flat coordinates in
@@ -14665,7 +14665,7 @@ class vi extends Ne {
14665
14665
  * @override
14666
14666
  */
14667
14667
  clone() {
14668
- const t = new vi(
14668
+ const t = new Ri(
14669
14669
  this.flatCoordinates.slice(),
14670
14670
  this.layout,
14671
14671
  this.ends_.slice()
@@ -14831,7 +14831,7 @@ class vi extends Ne {
14831
14831
  */
14832
14832
  getSimplifiedGeometryInternal(t) {
14833
14833
  const e = [], i = [];
14834
- return e.length = Rl(
14834
+ return e.length = vl(
14835
14835
  this.flatCoordinates,
14836
14836
  0,
14837
14837
  this.ends_,
@@ -14840,7 +14840,7 @@ class vi extends Ne {
14840
14840
  e,
14841
14841
  0,
14842
14842
  i
14843
- ), new vi(e, "XY", i);
14843
+ ), new Ri(e, "XY", i);
14844
14844
  }
14845
14845
  /**
14846
14846
  * Get the type of this geometry.
@@ -14876,7 +14876,7 @@ class vi extends Ne {
14876
14876
  */
14877
14877
  setCoordinates(t, e) {
14878
14878
  this.setLayout(e, t, 2), this.flatCoordinates || (this.flatCoordinates = []);
14879
- const i = vn(
14879
+ const i = Rn(
14880
14880
  this.flatCoordinates,
14881
14881
  0,
14882
14882
  t,
@@ -15028,7 +15028,7 @@ class Tn extends Ne {
15028
15028
  * @override
15029
15029
  */
15030
15030
  setCoordinates(t, e) {
15031
- this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = vs(
15031
+ this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = Rs(
15032
15032
  this.flatCoordinates,
15033
15033
  0,
15034
15034
  t,
@@ -15622,7 +15622,7 @@ class Ft {
15622
15622
  ), s = [i.length];
15623
15623
  break;
15624
15624
  case "MultiLineString":
15625
- s = [], i.length = Rl(
15625
+ s = [], i.length = vl(
15626
15626
  i,
15627
15627
  0,
15628
15628
  this.simplifiedGeometry_.ends_,
@@ -16699,7 +16699,7 @@ function mf(n, t, e) {
16699
16699
  });
16700
16700
  }
16701
16701
  }
16702
- function vo(n, t, e, i) {
16702
+ function Ro(n, t, e, i) {
16703
16703
  const s = n.getZoom();
16704
16704
  if (s === void 0)
16705
16705
  return;
@@ -16732,7 +16732,7 @@ class yf extends Fi {
16732
16732
  /** @type {MouseEvent} */
16733
16733
  t.originalEvent
16734
16734
  ), s = t.map, r = t.coordinate, o = i.shiftKey ? -this.delta_ : this.delta_, a = s.getView();
16735
- vo(a, o, r, this.duration_), i.preventDefault(), e = !0;
16735
+ Ro(a, o, r, this.duration_), i.preventDefault(), e = !0;
16736
16736
  }
16737
16737
  return !e;
16738
16738
  }
@@ -16996,7 +16996,7 @@ class Bi extends Lt {
16996
16996
  super(t), this.coordinate = e, this.mapBrowserEvent = i;
16997
16997
  }
16998
16998
  }
16999
- class Rf extends Se {
16999
+ class vf extends Se {
17000
17000
  /**
17001
17001
  * @param {Options} [options] Options.
17002
17002
  */
@@ -17103,7 +17103,7 @@ class Rf extends Se {
17103
17103
  ), this.startPixel_ = null)), super.setMap(t);
17104
17104
  }
17105
17105
  }
17106
- class vf extends Se {
17106
+ class Rf extends Se {
17107
17107
  /**
17108
17108
  * @param {Options} [options] Options.
17109
17109
  */
@@ -17218,7 +17218,7 @@ class Tf extends Se {
17218
17218
  return nr(t) && sh(t) && this.condition_(t) ? (t.map.getView().beginInteraction(), this.lastAngle_ = void 0, !0) : !1;
17219
17219
  }
17220
17220
  }
17221
- class Pf extends Rf {
17221
+ class Pf extends vf {
17222
17222
  /**
17223
17223
  * @param {Options} [options] Options.
17224
17224
  */
@@ -17388,7 +17388,7 @@ function lh(n, t, e) {
17388
17388
  Zn(n, t.getCoordinates(), !1, e);
17389
17389
  return;
17390
17390
  }
17391
- if (t instanceof vi) {
17391
+ if (t instanceof Ri) {
17392
17392
  const i = t.getCoordinates();
17393
17393
  for (let s = 0, r = i.length; s < r; ++s)
17394
17394
  Zn(n, i[s], !1, e);
@@ -17948,7 +17948,7 @@ class Af extends Se {
17948
17948
  e
17949
17949
  ])
17950
17950
  ) : this.type_ === "MultiLineString" ? t.setGeometry(
17951
- new vi([
17951
+ new Ri([
17952
17952
  /** @type {LineCoordType} */
17953
17953
  e
17954
17954
  ])
@@ -18134,7 +18134,7 @@ class Of extends Fi {
18134
18134
  ), s = i.key;
18135
18135
  if (this.condition_(t) && (s === "+" || s === "-")) {
18136
18136
  const r = t.map, o = s === "+" ? this.delta_ : -this.delta_, a = r.getView();
18137
- vo(a, o, void 0, this.duration_), i.preventDefault(), e = !0;
18137
+ Ro(a, o, void 0, this.duration_), i.preventDefault(), e = !0;
18138
18138
  }
18139
18139
  }
18140
18140
  return !e;
@@ -18578,14 +18578,14 @@ class kf extends Se {
18578
18578
  t,
18579
18579
  c
18580
18580
  );
18581
- Rt(g, s) && !a[d][0] && (this.dragSegments_.push([c, 0]), a[d][0] = c);
18581
+ vt(g, s) && !a[d][0] && (this.dragSegments_.push([c, 0]), a[d][0] = c);
18582
18582
  continue;
18583
18583
  }
18584
- if (Rt(u[0], s) && !a[d][0]) {
18584
+ if (vt(u[0], s) && !a[d][0]) {
18585
18585
  this.dragSegments_.push([c, 0]), a[d][0] = c;
18586
18586
  continue;
18587
18587
  }
18588
- if (Rt(u[1], s) && !a[d][1]) {
18588
+ if (vt(u[1], s) && !a[d][1]) {
18589
18589
  if (a[d][0] && a[d][0].index === 0) {
18590
18590
  let g = c.geometry.getCoordinates();
18591
18591
  switch (c.geometry.getType()) {
@@ -18809,7 +18809,7 @@ class kf extends Se {
18809
18809
  y[B(a.geometry)] = !0;
18810
18810
  for (let p = 1, E = r.length; p < E; ++p) {
18811
18811
  const x = r[p].segment;
18812
- if (Rt(l[0], x[0]) && Rt(l[1], x[1]) || Rt(l[0], x[1]) && Rt(l[1], x[0])) {
18812
+ if (vt(l[0], x[0]) && vt(l[1], x[1]) || vt(l[0], x[1]) && vt(l[1], x[0])) {
18813
18813
  const C = B(r[p].geometry);
18814
18814
  C in y || (y[C] = !0, d[B(x)] = !0);
18815
18815
  } else
@@ -18898,7 +18898,7 @@ class kf extends Se {
18898
18898
  return !1;
18899
18899
  const t = this.vertexFeature_.getGeometry().getCoordinates();
18900
18900
  return this.rBush_.getInExtent(ct([t])).some(
18901
- ({ segment: i }) => Rt(i[0], t) || Rt(i[1], t)
18901
+ ({ segment: i }) => vt(i[0], t) || vt(i[1], t)
18902
18902
  );
18903
18903
  }
18904
18904
  /**
@@ -18988,7 +18988,7 @@ class kf extends Se {
18988
18988
  return !1;
18989
18989
  const t = this.vertexFeature_.getGeometry().getCoordinates();
18990
18990
  return this.rBush_.getInExtent(ct([t])).some(
18991
- ({ segment: i }) => !(Rt(i[0], t) || Rt(i[1], t))
18991
+ ({ segment: i }) => !(vt(i[0], t) || vt(i[1], t))
18992
18992
  );
18993
18993
  }
18994
18994
  /**
@@ -19155,7 +19155,7 @@ class Vf extends Fi {
19155
19155
  -this.maxDelta_ * this.deltaPerZoom_,
19156
19156
  this.maxDelta_ * this.deltaPerZoom_
19157
19157
  ) / this.deltaPerZoom_;
19158
- (e.getConstrainResolution() || this.constrainResolution_) && (i = i ? i > 0 ? 1 : -1 : 0), vo(
19158
+ (e.getConstrainResolution() || this.constrainResolution_) && (i = i ? i > 0 ? 1 : -1 : 0), Ro(
19159
19159
  e,
19160
19160
  i,
19161
19161
  this.lastAnchor_ ? t.getCoordinateFromPixel(this.lastAnchor_) : null,
@@ -20247,7 +20247,7 @@ function qf(n) {
20247
20247
  duration: n.zoomDuration
20248
20248
  })
20249
20249
  ), (n.dragPan !== void 0 ? n.dragPan : !0) && t.push(
20250
- new vf({
20250
+ new Rf({
20251
20251
  onFocusOnly: n.onFocusOnly,
20252
20252
  kinetic: e
20253
20253
  })
@@ -21242,7 +21242,7 @@ class rg extends no {
21242
21242
  -e.rotation,
21243
21243
  -e.center[0],
21244
21244
  -e.center[1]
21245
- ), vl(s, i);
21245
+ ), Rl(s, i);
21246
21246
  }
21247
21247
  /**
21248
21248
  * @param {import("../coordinate.js").Coordinate} coordinate Coordinate.
@@ -21277,10 +21277,10 @@ class rg extends no {
21277
21277
  for (let x = 0; x < g.length; x++)
21278
21278
  for (let C = _ - 1; C >= 0; --C) {
21279
21279
  const S = m[C], T = S.layer;
21280
- if (T.hasRenderer() && Ro(S, c) && a.call(l, T)) {
21281
- const I = T.getRenderer(), R = T.getSource();
21282
- if (I && R) {
21283
- const P = R.getWrapX() ? f : t, k = u.bind(
21280
+ if (T.hasRenderer() && vo(S, c) && a.call(l, T)) {
21281
+ const I = T.getRenderer(), v = T.getSource();
21282
+ if (I && v) {
21283
+ const P = v.getWrapX() ? f : t, k = u.bind(
21284
21284
  null,
21285
21285
  S.managed
21286
21286
  );
@@ -21410,7 +21410,7 @@ class ag extends rg {
21410
21410
  const h = e[a];
21411
21411
  t.layerIndex = a;
21412
21412
  const c = h.layer, u = c.getSourceState();
21413
- if (!Ro(h, s) || u != "ready" && u != "undefined") {
21413
+ if (!vo(h, s) || u != "ready" && u != "undefined") {
21414
21414
  c.unrender();
21415
21415
  continue;
21416
21416
  }
@@ -22876,7 +22876,7 @@ const dg = {
22876
22876
  LineString: ne,
22877
22877
  Polygon: Ut,
22878
22878
  MultiPoint: Tn,
22879
- MultiLineString: vi,
22879
+ MultiLineString: Ri,
22880
22880
  MultiPolygon: Ti
22881
22881
  };
22882
22882
  function fg(n, t, e) {
@@ -23362,7 +23362,7 @@ function pg(n) {
23362
23362
  }
23363
23363
  function xg(n) {
23364
23364
  var r, o;
23365
- const t = n.coordinates, e = ((o = (r = t[0]) == null ? void 0 : r[0]) == null ? void 0 : o.length) || 2, i = [], s = vn(i, 0, t, e);
23365
+ const t = n.coordinates, e = ((o = (r = t[0]) == null ? void 0 : r[0]) == null ? void 0 : o.length) || 2, i = [], s = Rn(i, 0, t, e);
23366
23366
  return {
23367
23367
  type: "MultiLineString",
23368
23368
  flatCoordinates: i,
@@ -23396,7 +23396,7 @@ function Cg(n) {
23396
23396
  }
23397
23397
  function wg(n) {
23398
23398
  var r, o;
23399
- const t = n.coordinates, e = [], i = (o = (r = t[0]) == null ? void 0 : r[0]) == null ? void 0 : o.length, s = vn(e, 0, t, i);
23399
+ const t = n.coordinates, e = [], i = (o = (r = t[0]) == null ? void 0 : r[0]) == null ? void 0 : o.length, s = Rn(e, 0, t, i);
23400
23400
  return {
23401
23401
  type: "Polygon",
23402
23402
  flatCoordinates: e,
@@ -23432,14 +23432,14 @@ function Or(n, t) {
23432
23432
  break;
23433
23433
  }
23434
23434
  case "MultiPoint": {
23435
- i = vg(
23435
+ i = Rg(
23436
23436
  /** @type {import("../geom/MultiPoint.js").default} */
23437
23437
  n
23438
23438
  );
23439
23439
  break;
23440
23440
  }
23441
23441
  case "MultiLineString": {
23442
- i = Rg(
23442
+ i = vg(
23443
23443
  /** @type {import("../geom/MultiLineString.js").default} */
23444
23444
  n
23445
23445
  );
@@ -23487,13 +23487,13 @@ function Ig(n, t) {
23487
23487
  coordinates: n.getCoordinates()
23488
23488
  };
23489
23489
  }
23490
- function Rg(n, t) {
23490
+ function vg(n, t) {
23491
23491
  return {
23492
23492
  type: "MultiLineString",
23493
23493
  coordinates: n.getCoordinates()
23494
23494
  };
23495
23495
  }
23496
- function vg(n, t) {
23496
+ function Rg(n, t) {
23497
23497
  return {
23498
23498
  type: "MultiPoint",
23499
23499
  coordinates: n.getCoordinates()
@@ -23593,12 +23593,12 @@ function Fg({
23593
23593
  const bg = {
23594
23594
  name: "ppe-zoning",
23595
23595
  getInitialState: (n) => {
23596
- const { layer: t, source: e } = Hg(n == null ? void 0 : n._extent), { layer: i, source: s } = qg(n == null ? void 0 : n._extent), r = new Lo({
23596
+ const { layer: t, source: e } = qg(n == null ? void 0 : n._extent), { layer: i, source: s } = $g(n == null ? void 0 : n._extent), r = new Lo({
23597
23597
  layers: [t],
23598
23598
  condition: Cf,
23599
23599
  style: (l) => {
23600
23600
  const h = l.getProperties(), c = (n == null ? void 0 : n._zoneFillVisible) ?? !0;
23601
- return $g(h, c);
23601
+ return Jg(h, c);
23602
23602
  }
23603
23603
  }), o = new kf({
23604
23604
  source: e,
@@ -23624,6 +23624,7 @@ const bg = {
23624
23624
  _zoneFilter: void 0,
23625
23625
  _zoneFillVisible: !0,
23626
23626
  _zonePopupVisible: !0,
23627
+ _hiddenZoneFills: /* @__PURE__ */ new Set(),
23627
23628
  ...n
23628
23629
  };
23629
23630
  },
@@ -23632,13 +23633,25 @@ const bg = {
23632
23633
  const t = n.initialState, { _zoneLayer: e, _zoneLabelLayer: i } = t;
23633
23634
  e && n.addLayer(e), i && n.addLayer(i), e.setStyle((o) => {
23634
23635
  const a = o.getProperties();
23635
- return t._zoneFilter && !t._zoneFilter(a) ? [] : us(a, t._zoneFillVisible);
23636
- }), Dg(n), se(n), Ug(n), kg(n);
23636
+ if (t._zoneFilter && !t._zoneFilter(a)) return [];
23637
+ const l = t._zoneFillVisible && !t._hiddenZoneFills.has(a.id);
23638
+ return us(a, l);
23639
+ }), Dg(n), se(n), Hg(n), Ug(n), kg(n);
23637
23640
  const s = ((r = n.options.zoningConfig) == null ? void 0 : r.editMode) || "editing";
23638
23641
  t._editMode = s, _h(n, s), n.drawZone = (o) => mh(n, o), n.deleteZone = (o) => yh(n, o), n.updateZone = (o) => jg(n, o), n.setZoningMode = (o) => Yg(n, o), n.setEditMode = (o) => Ng(n, o), n.selectZone = (o) => Gg(n, o), n.deselectZone = () => ko(n), n.getSelectedZone = () => zg(n), n.startDrawingZone = (o) => Vg(n, o), n.cancelCurrentAction = () => Ls(n), n.deleteSelectedZone = () => ph(n), n.updateZoneOccupationColors = () => Zg(n), n.filterZones = (o) => Kg(n, o), n.setZoneLayerVisible = (o) => t._zoneLayer.setVisible(o), n.setZoneLabelLayerVisible = (o) => t._zoneLabelLayer.setVisible(o), n.setZoneFillVisible = (o) => {
23639
23642
  t._zoneFillVisible = o, t._zoneLayer.changed();
23640
23643
  }, n.setZonePopupVisible = (o) => {
23641
23644
  t._zonePopupVisible = o;
23645
+ }, n.toggleZoneFill = (o) => {
23646
+ t._hiddenZoneFills.has(o) ? t._hiddenZoneFills.delete(o) : t._hiddenZoneFills.add(o), t._zoneLayer.changed();
23647
+ }, n.isZoneFillHidden = (o) => t._hiddenZoneFills.has(o), n.zoomToZone = (o) => {
23648
+ const a = t._zoneSource.getFeatureById(o);
23649
+ if (!a) return;
23650
+ const l = a.getGeometry();
23651
+ l && n.getView().fit(l.getExtent(), {
23652
+ padding: [50, 50, 50, 50],
23653
+ duration: 500
23654
+ });
23642
23655
  }, n.isZoneLayerVisible = () => t._zoneLayer.getVisible(), n.isZoneLabelLayerVisible = () => t._zoneLabelLayer.getVisible(), n.isZoneFillVisible = () => t._zoneFillVisible, n.isZonePopupVisible = () => t._zonePopupVisible, n.restoreZones = (o) => Og(n, o);
23643
23656
  }
23644
23657
  };
@@ -23790,10 +23803,10 @@ function Ls(n) {
23790
23803
  function Yg(n, t) {
23791
23804
  const e = n.initialState, { _zoneLayer: i } = e;
23792
23805
  t === "occupation" ? (i.setStyle((s) => {
23793
- var l, h;
23806
+ var h, c;
23794
23807
  const r = s.getProperties();
23795
23808
  if (e._zoneFilter && !e._zoneFilter(r)) return [];
23796
- const o = ((h = (l = n.options).getZoneOccupationColors) == null ? void 0 : h.call(l, r)) ?? [];
23809
+ const o = ((c = (h = n.options).getZoneOccupationColors) == null ? void 0 : c.call(h, r)) ?? [];
23797
23810
  if (o.length === 0)
23798
23811
  return [
23799
23812
  new rt({
@@ -23805,14 +23818,16 @@ function Yg(n, t) {
23805
23818
  fill: new lt({ color: "rgba(0,0,0,0)" })
23806
23819
  })
23807
23820
  ];
23808
- const a = o.length ? o : [r.color];
23821
+ const a = o.length ? o : [r.color], l = e._zoneFillVisible && !e._hiddenZoneFills.has(r.id);
23809
23822
  return [
23810
- ...us(s.getProperties(), e._zoneFillVisible),
23823
+ ...us(r, l),
23811
23824
  Fg({ colors: a })
23812
23825
  ];
23813
23826
  }), se(n)) : (i.setStyle((s) => {
23814
23827
  const r = s.getProperties();
23815
- return e._zoneFilter && !e._zoneFilter(r) ? [] : us(r, e._zoneFillVisible);
23828
+ if (e._zoneFilter && !e._zoneFilter(r)) return [];
23829
+ const o = e._zoneFillVisible && !e._hiddenZoneFills.has(r.id);
23830
+ return us(r, o);
23816
23831
  }), se(n));
23817
23832
  }
23818
23833
  function Zg(n) {
@@ -23930,6 +23945,18 @@ function Kg(n, t) {
23930
23945
  e._zoneFilter = t, e._zoneLayer.changed(), se(n);
23931
23946
  }
23932
23947
  function Ug(n) {
23948
+ n.options.onZoneDoubleClick && n.getInteractions().forEach((t) => {
23949
+ t.constructor.name === "DoubleClickZoom" && t.setActive(!1);
23950
+ }), n.on("dblclick", (t) => {
23951
+ var i, s;
23952
+ const e = n.forEachFeatureAtPixel(t.pixel, (r) => r);
23953
+ if (e && e.get("__type") === "zone") {
23954
+ const r = e.getProperties();
23955
+ (s = (i = n.options).onZoneDoubleClick) == null || s.call(i, r);
23956
+ }
23957
+ });
23958
+ }
23959
+ function Hg(n) {
23933
23960
  n.on("pointermove", (t) => {
23934
23961
  var s;
23935
23962
  const e = n.initialState;
@@ -23939,7 +23966,7 @@ function Ug(n) {
23939
23966
  }
23940
23967
  const i = n.forEachFeatureAtPixel(t.pixel, (r) => r);
23941
23968
  if (i && i.get("__type") === "zone") {
23942
- const r = i.getProperties(), o = (s = n.options.zoningConfig) == null ? void 0 : s.popup, a = o && o.template ? o.template(r) : Jg(r);
23969
+ const r = i.getProperties(), o = (s = n.options.zoningConfig) == null ? void 0 : s.popup, a = o && o.template ? o.template(r) : Qg(r);
23943
23970
  n._showPopup({
23944
23971
  event: t,
23945
23972
  content: a
@@ -23947,14 +23974,14 @@ function Ug(n) {
23947
23974
  } else i || n._hidePopup();
23948
23975
  });
23949
23976
  }
23950
- function Hg(n) {
23977
+ function qg(n) {
23951
23978
  const t = new Pn({ wrapX: !1 }), e = new Ai({
23952
23979
  source: t,
23953
23980
  style: (i) => us(i.getProperties())
23954
23981
  });
23955
23982
  return n && e.setExtent(n), { layer: e, source: t };
23956
23983
  }
23957
- function qg(n) {
23984
+ function $g(n) {
23958
23985
  const t = new Pn({ wrapX: !1 }), e = new Ai({
23959
23986
  source: t
23960
23987
  // Labels use their own styles set on each feature
@@ -23969,7 +23996,7 @@ function us({ color: n }, t = !0) {
23969
23996
  })
23970
23997
  ];
23971
23998
  }
23972
- function $g({ color: n }, t = !0) {
23999
+ function Jg({ color: n }, t = !0) {
23973
24000
  return [
23974
24001
  new rt({
23975
24002
  stroke: new ie({ color: n, width: 5 }),
@@ -23977,7 +24004,7 @@ function $g({ color: n }, t = !0) {
23977
24004
  })
23978
24005
  ];
23979
24006
  }
23980
- function Jg(n) {
24007
+ function Qg(n) {
23981
24008
  return `
23982
24009
  <div style="display: flex; gap: 1rem; background-color: rgba(220,220,220,0.75); padding: 1rem">
23983
24010
  <div style="height: 1rem; width: 1rem; background-color: ${n.color}"></div>
@@ -23985,20 +24012,20 @@ function Jg(n) {
23985
24012
  </div>
23986
24013
  `;
23987
24014
  }
23988
- const Qg = {
24015
+ const t_ = {
23989
24016
  a0: [1189, 841],
23990
24017
  a1: [841, 594],
23991
24018
  a2: [594, 420],
23992
24019
  a3: [420, 297],
23993
24020
  a4: [297, 210],
23994
24021
  a5: [210, 148]
23995
- }, t_ = {
24022
+ }, e_ = {
23996
24023
  name: "ppe-pdf-export",
23997
24024
  getInitialState: (n) => ({
23998
24025
  ...n
23999
24026
  }),
24000
24027
  createPlanEditor: (n) => {
24001
- n.exportToPdf = (t) => e_(n, t), n.exportPeriodicPdf = (t) => i_(n, t);
24028
+ n.exportToPdf = (t) => i_(n, t), n.exportPeriodicPdf = (t) => n_(n, t);
24002
24029
  }
24003
24030
  };
24004
24031
  async function xh(n, t, e) {
@@ -24056,7 +24083,7 @@ function Ch(n, t) {
24056
24083
  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);
24057
24084
  }
24058
24085
  function wh(n, t, e, i) {
24059
- const s = Qg[t];
24086
+ const s = t_[t];
24060
24087
  if (!s)
24061
24088
  throw new Error(`Invalid PDF format: ${t}`);
24062
24089
  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;
@@ -24064,7 +24091,7 @@ function wh(n, t, e, i) {
24064
24091
  throw new Error("Unable to get editor container element");
24065
24092
  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 };
24066
24093
  }
24067
- async function e_(n, t) {
24094
+ async function i_(n, t) {
24068
24095
  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 qa(i, "mm", e), l = Eh(n);
24069
24096
  try {
24070
24097
  const { width: h, height: c, canvasWidth: u, canvasHeight: d } = wh(
@@ -24080,7 +24107,7 @@ async function e_(n, t) {
24080
24107
  Ch(n, l);
24081
24108
  }
24082
24109
  }
24083
- async function i_(n, t) {
24110
+ async function n_(n, t) {
24084
24111
  var h, c, u;
24085
24112
  const e = t.format || "a4", i = t.orientation || "landscape", s = t.resolution || 350, r = t.filename || "periodic-export.pdf", o = t.periods;
24086
24113
  if (!o || o.length === 0)
@@ -24105,7 +24132,7 @@ async function i_(n, t) {
24105
24132
  Ch(n, l);
24106
24133
  }
24107
24134
  }
24108
- const n_ = {
24135
+ const s_ = {
24109
24136
  name: "ppe-history",
24110
24137
  getInitialState: (n) => ({
24111
24138
  _historyStack: [],
@@ -24130,7 +24157,7 @@ function Ua(n, t, e, i, s) {
24130
24157
  function _r(n, t) {
24131
24158
  return Math.abs(n[t * 4] - 210) > 2 || Math.abs(n[t * 4 + 3] - 0.75 * 255) > 2;
24132
24159
  }
24133
- function s_() {
24160
+ function r_() {
24134
24161
  if (gr === void 0) {
24135
24162
  const n = gt(6, 6, nn);
24136
24163
  n.globalCompositeOperation = "lighter", n.fillStyle = "rgba(210, 0, 0, 0.75)", Ua(n, 4, 5, 4, 0), Ua(n, 4, 5, 0, 5);
@@ -24139,7 +24166,7 @@ function s_() {
24139
24166
  }
24140
24167
  return gr;
24141
24168
  }
24142
- function r_(n, t, e, i) {
24169
+ function o_(n, t, e, i) {
24143
24170
  const s = gl(e, t, n);
24144
24171
  let r = na(
24145
24172
  t,
@@ -24157,7 +24184,7 @@ function r_(n, t, e, i) {
24157
24184
  }
24158
24185
  return r;
24159
24186
  }
24160
- function o_(n, t, e, i, s, r, o, a, l, h, c, u, d, f) {
24187
+ function a_(n, t, e, i, s, r, o, a, l, h, c, u, d, f) {
24161
24188
  const g = gt(
24162
24189
  Math.round(e * n),
24163
24190
  Math.round(e * t),
@@ -24192,7 +24219,7 @@ function o_(n, t, e, i, s, r, o, a, l, h, c, u, d, f) {
24192
24219
  u ? q : Math.round(V + q) - Math.round(V)
24193
24220
  ), y.clip();
24194
24221
  }
24195
- const I = (C.extent[0] - _[0]) * p, R = -(C.extent[3] - _[3]) * p, P = K(C.extent) * p, k = ft(C.extent) * p;
24222
+ const I = (C.extent[0] - _[0]) * p, v = -(C.extent[3] - _[3]) * p, P = K(C.extent) * p, k = ft(C.extent) * p;
24196
24223
  y.drawImage(
24197
24224
  C.image,
24198
24225
  h,
@@ -24200,24 +24227,24 @@ function o_(n, t, e, i, s, r, o, a, l, h, c, u, d, f) {
24200
24227
  C.image.width - 2 * h,
24201
24228
  C.image.height - 2 * h,
24202
24229
  u ? I : Math.round(I),
24203
- u ? R : Math.round(R),
24230
+ u ? v : Math.round(v),
24204
24231
  u ? P : Math.round(I + P) - Math.round(I),
24205
- u ? k : Math.round(R + k) - Math.round(R)
24232
+ u ? k : Math.round(v + k) - Math.round(v)
24206
24233
  ), C.clipExtent && y.restore();
24207
24234
  }
24208
24235
  }));
24209
24236
  const x = ds(o);
24210
24237
  return a.getTriangles().forEach(function(C, S, T) {
24211
- const I = C.source, R = C.target;
24238
+ const I = C.source, v = C.target;
24212
24239
  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];
24213
- const b = m((R[0][0] - x[0]) / r), z = m(
24214
- -(R[0][1] - x[1]) / r
24215
- ), j = m((R[1][0] - x[0]) / r), Q = m(
24216
- -(R[1][1] - x[1]) / r
24217
- ), J = m((R[2][0] - x[0]) / r), tt = m(
24218
- -(R[2][1] - x[1]) / r
24219
- ), v = P, re = k;
24220
- P = 0, k = 0, N -= v, V -= re, F -= v, q -= re;
24240
+ const b = m((v[0][0] - x[0]) / r), z = m(
24241
+ -(v[0][1] - x[1]) / r
24242
+ ), j = m((v[1][0] - x[0]) / r), Q = m(
24243
+ -(v[1][1] - x[1]) / r
24244
+ ), J = m((v[2][0] - x[0]) / r), tt = m(
24245
+ -(v[2][1] - x[1]) / r
24246
+ ), R = P, re = k;
24247
+ P = 0, k = 0, N -= R, V -= re, F -= R, q -= re;
24221
24248
  const Ge = [
24222
24249
  [N, V, 0, 0, j - b],
24223
24250
  [F, q, 0, 0, J - b],
@@ -24226,7 +24253,7 @@ function o_(n, t, e, i, s, r, o, a, l, h, c, u, d, f) {
24226
24253
  ], pt = Zh(Ge);
24227
24254
  if (!pt)
24228
24255
  return;
24229
- if (g.save(), g.beginPath(), s_() || !u) {
24256
+ if (g.save(), g.beginPath(), r_() || !u) {
24230
24257
  g.moveTo(j, Q);
24231
24258
  const Vt = 4, Ie = b - j, Di = z - Q;
24232
24259
  for (let $t = 0; $t < Vt; $t++)
@@ -24248,7 +24275,7 @@ function o_(n, t, e, i, s, r, o, a, l, h, c, u, d, f) {
24248
24275
  b,
24249
24276
  z
24250
24277
  ), g.translate(
24251
- _[0] - v,
24278
+ _[0] - R,
24252
24279
  _[3] - re
24253
24280
  );
24254
24281
  let qt;
@@ -24267,8 +24294,8 @@ function o_(n, t, e, i, s, r, o, a, l, h, c, u, d, f) {
24267
24294
  function kr(n) {
24268
24295
  return Array.isArray(n) ? Math.min(...n) : n;
24269
24296
  }
24270
- const a_ = 10, Ha = 0.25;
24271
- class l_ {
24297
+ const l_ = 10, Ha = 0.25;
24298
+ class h_ {
24272
24299
  /**
24273
24300
  * @param {import("../proj/Projection.js").default} sourceProj Source projection.
24274
24301
  * @param {import("../proj/Projection.js").default} targetProj Target projection.
@@ -24291,7 +24318,7 @@ class l_ {
24291
24318
  const x = E[0] + "/" + E[1];
24292
24319
  return l[x] || (l[x] = h(E)), l[x];
24293
24320
  }, this.maxSourceExtent_ = s, this.errorThresholdSquared_ = r * r, this.triangles_ = [], this.wrapsXInSource_ = !1, this.canWrapXInSource_ = this.sourceProj_.canWrapX() && !!s && !!this.sourceProj_.getExtent() && K(s) >= K(this.sourceProj_.getExtent()), this.sourceWorldWidth_ = this.sourceProj_.getExtent() ? K(this.sourceProj_.getExtent()) : null, this.targetWorldWidth_ = this.targetProj_.getExtent() ? K(this.targetProj_.getExtent()) : null;
24294
- const c = ds(i), u = Xr(i), d = Vr(i), f = Wr(i), g = this.transformInv_(c), m = this.transformInv_(u), _ = this.transformInv_(d), y = this.transformInv_(f), p = a_ + (o ? Math.max(
24321
+ const c = ds(i), u = Xr(i), d = Vr(i), f = Wr(i), g = this.transformInv_(c), m = this.transformInv_(u), _ = this.transformInv_(d), y = this.transformInv_(f), p = l_ + (o ? Math.max(
24295
24322
  0,
24296
24323
  Math.ceil(
24297
24324
  Math.log2(
@@ -24484,8 +24511,8 @@ class l_ {
24484
24511
  return this.triangles_;
24485
24512
  }
24486
24513
  }
24487
- const h_ = 0.5;
24488
- class c_ extends so {
24514
+ const c_ = 0.5;
24515
+ class u_ extends so {
24489
24516
  /**
24490
24517
  * @param {import("../proj/Projection.js").default} sourceProj Source projection (of the data).
24491
24518
  * @param {import("../proj/Projection.js").default} targetProj Target projection.
@@ -24501,12 +24528,12 @@ class c_ extends so {
24501
24528
  l && t.canWrapX() && (l = l.slice(), l[0] = -1 / 0, l[2] = 1 / 0);
24502
24529
  let h = e.getExtent();
24503
24530
  h && e.canWrapX() && (h = h.slice(), h[0] = -1 / 0, h[2] = 1 / 0);
24504
- const c = h ? jr(i, h) : i, u = Yt(c), d = r_(
24531
+ const c = h ? jr(i, h) : i, u = Yt(c), d = o_(
24505
24532
  t,
24506
24533
  e,
24507
24534
  u,
24508
24535
  s
24509
- ), f = h_, g = new l_(
24536
+ ), f = c_, g = new h_(
24510
24537
  t,
24511
24538
  e,
24512
24539
  c,
@@ -24543,7 +24570,7 @@ class c_ extends so {
24543
24570
  const t = this.sourceImage_.getState();
24544
24571
  if (t == M.LOADED) {
24545
24572
  const e = K(this.targetExtent_) / this.targetResolution_, i = ft(this.targetExtent_) / this.targetResolution_;
24546
- this.canvas_ = o_(
24573
+ this.canvas_ = a_(
24547
24574
  e,
24548
24575
  i,
24549
24576
  this.sourcePixelRatio_,
@@ -24613,7 +24640,7 @@ const Hn = 4, mr = {
24613
24640
  */
24614
24641
  IMAGELOADERROR: "imageloaderror"
24615
24642
  };
24616
- class u_ extends Lt {
24643
+ class d_ extends Lt {
24617
24644
  /**
24618
24645
  * @param {string} type Type.
24619
24646
  * @param {import("../Image.js").default} image The image.
@@ -24622,7 +24649,7 @@ class u_ extends Lt {
24622
24649
  super(t), this.image = e;
24623
24650
  }
24624
24651
  }
24625
- class d_ extends ih {
24652
+ class f_ extends ih {
24626
24653
  /**
24627
24654
  * @param {Options} options Single image source options.
24628
24655
  */
@@ -24676,7 +24703,7 @@ class d_ extends ih {
24676
24703
  return this.reprojectedImage_;
24677
24704
  this.reprojectedImage_.dispose(), this.reprojectedImage_ = null;
24678
24705
  }
24679
- return this.reprojectedImage_ = new c_(
24706
+ return this.reprojectedImage_ = new u_(
24680
24707
  r,
24681
24708
  s,
24682
24709
  t,
@@ -24697,7 +24724,7 @@ class d_ extends ih {
24697
24724
  */
24698
24725
  getImageInternal(t, e, i, s) {
24699
24726
  if (this.loader) {
24700
- const r = g_(t, e, i, 1), o = this.findNearestResolution(e);
24727
+ const r = __(t, e, i, 1), o = this.findNearestResolution(e);
24701
24728
  if (this.image && (this.static_ || this.wantedProjection_ === s && (this.wantedExtent_ && _e(this.wantedExtent_, r) || _e(this.image.getExtent(), r)) && (this.wantedResolution_ && kr(this.wantedResolution_) === o || kr(this.image.getResolution()) === o)))
24702
24729
  return this.image;
24703
24730
  this.wantedProjection_ = s, this.wantedExtent_ = r, this.wantedResolution_ = o, this.image = new so(
@@ -24736,20 +24763,20 @@ class d_ extends ih {
24736
24763
  default:
24737
24764
  return;
24738
24765
  }
24739
- this.hasListener(i) && this.dispatchEvent(new u_(i, e));
24766
+ this.hasListener(i) && this.dispatchEvent(new d_(i, e));
24740
24767
  }
24741
24768
  }
24742
- function f_(n, t) {
24769
+ function g_(n, t) {
24743
24770
  n.getImage().src = t;
24744
24771
  }
24745
- function g_(n, t, e, i) {
24772
+ function __(n, t, e, i) {
24746
24773
  const s = t / e, r = Yt(n), o = Fn(K(n) / s, Hn), a = Fn(ft(n) / s, Hn), l = Fn((i - 1) * o / 2, Hn), h = o + 2 * l, c = Fn((i - 1) * a / 2, Hn), u = a + 2 * c;
24747
24774
  return qn(r, s, 0, [
24748
24775
  h,
24749
24776
  u
24750
24777
  ]);
24751
24778
  }
24752
- function __(n) {
24779
+ function m_(n) {
24753
24780
  const t = n.load || xl, e = n.imageExtent, i = n.crossOrigin ?? null;
24754
24781
  return () => {
24755
24782
  const s = new Image();
@@ -24759,12 +24786,12 @@ function __(n) {
24759
24786
  });
24760
24787
  };
24761
24788
  }
24762
- class m_ extends d_ {
24789
+ class y_ extends f_ {
24763
24790
  /**
24764
24791
  * @param {Options} options ImageStatic options.
24765
24792
  */
24766
24793
  constructor(t) {
24767
- const e = t.crossOrigin !== void 0 ? t.crossOrigin : null, i = t.imageLoadFunction !== void 0 ? t.imageLoadFunction : f_;
24794
+ const e = t.crossOrigin !== void 0 ? t.crossOrigin : null, i = t.imageLoadFunction !== void 0 ? t.imageLoadFunction : g_;
24768
24795
  super({
24769
24796
  attributions: t.attributions,
24770
24797
  interpolate: t.interpolate,
@@ -24773,7 +24800,7 @@ class m_ extends d_ {
24773
24800
  this.imageExtent_,
24774
24801
  void 0,
24775
24802
  1,
24776
- __({
24803
+ m_({
24777
24804
  url: t.url,
24778
24805
  imageExtent: t.imageExtent,
24779
24806
  crossOrigin: e,
@@ -24812,7 +24839,7 @@ class m_ extends d_ {
24812
24839
  return this.url_;
24813
24840
  }
24814
24841
  }
24815
- class y_ extends Ol {
24842
+ class p_ extends Ol {
24816
24843
  /**
24817
24844
  * @param {import("../../layer/Image.js").default} imageLayer Image layer.
24818
24845
  */
@@ -24888,11 +24915,11 @@ class y_ extends Ol {
24888
24915
  const _ = this.context.canvas.width, y = this.context.canvas.height, p = this.getRenderContext(t);
24889
24916
  let E = !1, x = !0;
24890
24917
  if (h.extent) {
24891
- const R = Ae(
24918
+ const v = Ae(
24892
24919
  h.extent,
24893
24920
  u.projection
24894
24921
  );
24895
- x = mt(R, t.extent), E = x && !_e(R, t.extent), E && this.clipUnrotated(p, t, R);
24922
+ x = mt(v, t.extent), E = x && !_e(v, t.extent), E && this.clipUnrotated(p, t, v);
24896
24923
  }
24897
24924
  const C = i.getImage(), S = Ee(
24898
24925
  this.tempTransform,
@@ -24907,13 +24934,13 @@ class y_ extends Ol {
24907
24934
  this.renderedResolution = a * c / l;
24908
24935
  const T = C.width * S[0], I = C.height * S[3];
24909
24936
  if (this.getLayer().getSource().getInterpolate() || (p.imageSmoothingEnabled = !1), this.preRender(p, t), x && T >= 0.5 && I >= 0.5) {
24910
- const R = S[4], P = S[5], k = h.opacity;
24911
- k !== 1 && (p.save(), p.globalAlpha = k), p.drawImage(C, 0, 0, +C.width, +C.height, R, P, T, I), k !== 1 && p.restore();
24937
+ const v = S[4], P = S[5], k = h.opacity;
24938
+ k !== 1 && (p.save(), p.globalAlpha = k), p.drawImage(C, 0, 0, +C.width, +C.height, v, P, T, I), k !== 1 && p.restore();
24912
24939
  }
24913
24940
  return this.postRender(this.context, t), E && p.restore(), p.imageSmoothingEnabled = !0, this.container;
24914
24941
  }
24915
24942
  }
24916
- class p_ extends Ps {
24943
+ class x_ extends Ps {
24917
24944
  /**
24918
24945
  * @param {Options<ImageSourceType>} [options] Layer options.
24919
24946
  */
@@ -24921,7 +24948,7 @@ class p_ extends Ps {
24921
24948
  t = t || {}, super(t);
24922
24949
  }
24923
24950
  }
24924
- class x_ extends p_ {
24951
+ class E_ extends x_ {
24925
24952
  /**
24926
24953
  * @param {import("./BaseImage.js").Options<ImageSourceType>} [options] Layer options.
24927
24954
  */
@@ -24932,7 +24959,7 @@ class x_ extends p_ {
24932
24959
  * @override
24933
24960
  */
24934
24961
  createRenderer() {
24935
- return new y_(this);
24962
+ return new p_(this);
24936
24963
  }
24937
24964
  /**
24938
24965
  * Get data for a pixel location. A four element RGBA array will be returned. For requests outside the
@@ -24954,31 +24981,31 @@ class x_ extends p_ {
24954
24981
  return super.getData(t);
24955
24982
  }
24956
24983
  }
24957
- function E_(n, t) {
24984
+ function C_(n, t) {
24958
24985
  return typeof n == "function" ? n(t) : n;
24959
24986
  }
24960
- const C_ = {
24987
+ const w_ = {
24961
24988
  name: "ppe-popup",
24962
24989
  getInitialState: (n) => ({
24963
24990
  ...n
24964
24991
  }),
24965
24992
  createPlanEditor: (n) => {
24966
- const { overlay: t, closerElement: e, popupElement: i } = S_();
24993
+ const { overlay: t, closerElement: e, popupElement: i } = I_();
24967
24994
  n.addOverlay(t), e.addEventListener("click", () => (t.setPosition(void 0), e.blur(), !1)), n._showPopup = (s, r) => {
24968
- t.setPosition(s.event.coordinate), i.innerHTML = s.content, r != null && r.offset && t.setOffset(r.offset), t.setPositioning(w_(n, s.event, r == null ? void 0 : r.positioning));
24995
+ t.setPosition(s.event.coordinate), i.innerHTML = s.content, r != null && r.offset && t.setOffset(r.offset), t.setPositioning(S_(n, s.event, r == null ? void 0 : r.positioning));
24969
24996
  }, n._hidePopup = () => {
24970
24997
  t.setPosition(void 0);
24971
24998
  };
24972
24999
  }
24973
25000
  };
24974
- function w_(n, t, e) {
25001
+ function S_(n, t, e) {
24975
25002
  if (e && e != "auto") return e;
24976
25003
  const i = n.getSize();
24977
25004
  if (!i) return "top-right";
24978
25005
  const [s, r] = n.getPixelFromCoordinate(t.coordinate), [o, a] = i, l = s < o / 2 ? "left" : "right";
24979
25006
  return `${r < a / 2 ? "top" : "bottom"}-${l}`;
24980
25007
  }
24981
- function S_() {
25008
+ function I_() {
24982
25009
  const n = document.createElement("div");
24983
25010
  n.id = "ppe-popup", n.className = "ppe-popup";
24984
25011
  const t = document.createElement("button");
@@ -24993,7 +25020,7 @@ function S_() {
24993
25020
  closerElement: t
24994
25021
  };
24995
25022
  }
24996
- const I_ = {
25023
+ const v_ = {
24997
25024
  name: "ppe-layer",
24998
25025
  getInitialState: (n) => ({
24999
25026
  ...n
@@ -25006,12 +25033,12 @@ const I_ = {
25006
25033
  }
25007
25034
  }, R_ = [
25008
25035
  bg,
25009
- I_,
25010
- C_,
25011
- t_,
25012
- n_
25036
+ v_,
25037
+ w_,
25038
+ e_,
25039
+ s_
25013
25040
  ];
25014
- function L_(n) {
25041
+ function A_(n) {
25015
25042
  var m;
25016
25043
  const t = [
25017
25044
  ...R_,
@@ -25020,12 +25047,12 @@ function L_(n) {
25020
25047
  code: "",
25021
25048
  units: "pixels",
25022
25049
  extent: i
25023
- }), r = new m_({
25050
+ }), r = new y_({
25024
25051
  imageExtent: i,
25025
25052
  projection: s,
25026
25053
  url: e.file.original_url,
25027
25054
  crossOrigin: "anonymous"
25028
- }), o = new x_({ source: r }), a = new te({
25055
+ }), o = new E_({ source: r }), a = new te({
25029
25056
  projection: s,
25030
25057
  center: Yt(i),
25031
25058
  zoom: 2,
@@ -25074,7 +25101,7 @@ function L_(n) {
25074
25101
  (p = (y = c.options).onStateChange) == null || p.call(y, _);
25075
25102
  },
25076
25103
  setOptions: (_) => {
25077
- const y = E_(_, c.options), p = c.getTarget(), E = f(y);
25104
+ const y = C_(_, c.options), p = c.getTarget(), E = f(y);
25078
25105
  c.options = E, E.target && E.target !== p && c.setTarget(E.target);
25079
25106
  },
25080
25107
  fitToContent: () => {
@@ -25092,11 +25119,11 @@ function L_(n) {
25092
25119
  return c;
25093
25120
  }
25094
25121
  export {
25095
- n_ as HistoryPlugin,
25096
- t_ as PdfExportPlugin,
25122
+ s_ as HistoryPlugin,
25123
+ e_ as PdfExportPlugin,
25097
25124
  bg as ZoningPlugin,
25098
25125
  Oo as convertToZoneGeometry,
25099
25126
  gh as convertZoneToGeometryFeatures,
25100
- L_ as createPlanEditor,
25127
+ A_ as createPlanEditor,
25101
25128
  R_ as defaultPlugins
25102
25129
  };