@eox/drawtools 1.0.0 → 1.1.0

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.
@@ -1,16 +1,16 @@
1
1
  var vi = Object.defineProperty;
2
- var jt = (i) => {
2
+ var Vt = (i) => {
3
3
  throw TypeError(i);
4
4
  };
5
5
  var xi = (i, e, t) => e in i ? vi(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
6
- var L = (i, e, t) => xi(i, typeof e != "symbol" ? e + "" : e, t), Vt = (i, e, t) => e.has(i) || jt("Cannot " + t);
7
- var M = (i, e, t) => (Vt(i, e, "read from private field"), t ? t.call(i) : e.get(i)), A = (i, e, t) => e.has(i) ? jt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t), E = (i, e, t, r) => (Vt(i, e, "write to private field"), r ? r.call(i, t) : e.set(i, t), t);
6
+ var I = (i, e, t) => xi(i, typeof e != "symbol" ? e + "" : e, t), Ut = (i, e, t) => e.has(i) || Vt("Cannot " + t);
7
+ var M = (i, e, t) => (Ut(i, e, "read from private field"), t ? t.call(i) : e.get(i)), A = (i, e, t) => e.has(i) ? Vt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t), P = (i, e, t, r) => (Ut(i, e, "write to private field"), r ? r.call(i, t) : e.set(i, t), t);
8
8
  /**
9
9
  * @license
10
10
  * Copyright 2019 Google LLC
11
11
  * SPDX-License-Identifier: BSD-3-Clause
12
12
  */
13
- const Ge = globalThis, pt = Ge.ShadowRoot && (Ge.ShadyCSS === void 0 || Ge.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, _r = Symbol(), Ut = /* @__PURE__ */ new WeakMap();
13
+ const Le = globalThis, gt = Le.ShadowRoot && (Le.ShadyCSS === void 0 || Le.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, _r = Symbol(), Yt = /* @__PURE__ */ new WeakMap();
14
14
  let ki = class {
15
15
  constructor(e, t, r) {
16
16
  if (this._$cssResult$ = !0, r !== _r) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
@@ -19,9 +19,9 @@ let ki = class {
19
19
  get styleSheet() {
20
20
  let e = this.o;
21
21
  const t = this.t;
22
- if (pt && e === void 0) {
22
+ if (gt && e === void 0) {
23
23
  const r = t !== void 0 && t.length === 1;
24
- r && (e = Ut.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), r && Ut.set(t, e));
24
+ r && (e = Yt.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), r && Yt.set(t, e));
25
25
  }
26
26
  return e;
27
27
  }
@@ -30,12 +30,12 @@ let ki = class {
30
30
  }
31
31
  };
32
32
  const _i = (i) => new ki(typeof i == "string" ? i : i + "", void 0, _r), wi = (i, e) => {
33
- if (pt) i.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
33
+ if (gt) i.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
34
34
  else for (const t of e) {
35
- const r = document.createElement("style"), n = Ge.litNonce;
35
+ const r = document.createElement("style"), n = Le.litNonce;
36
36
  n !== void 0 && r.setAttribute("nonce", n), r.textContent = t.cssText, i.appendChild(r);
37
37
  }
38
- }, Yt = pt ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((e) => {
38
+ }, Xt = gt ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((e) => {
39
39
  let t = "";
40
40
  for (const r of e.cssRules) t += r.cssText;
41
41
  return _i(t);
@@ -45,7 +45,7 @@ const _i = (i) => new ki(typeof i == "string" ? i : i + "", void 0, _r), wi = (i
45
45
  * Copyright 2017 Google LLC
46
46
  * SPDX-License-Identifier: BSD-3-Clause
47
47
  */
48
- const { is: zi, defineProperty: Ci, getOwnPropertyDescriptor: Si, getOwnPropertyNames: Mi, getOwnPropertySymbols: Pi, getPrototypeOf: Ei } = Object, G = globalThis, Xt = G.trustedTypes, $i = Xt ? Xt.emptyScript : "", De = G.reactiveElementPolyfillSupport, he = (i, e) => i, ot = { toAttribute(i, e) {
48
+ const { is: zi, defineProperty: Ci, getOwnPropertyDescriptor: Si, getOwnPropertyNames: Mi, getOwnPropertySymbols: Ei, getPrototypeOf: Pi } = Object, L = globalThis, Bt = L.trustedTypes, $i = Bt ? Bt.emptyScript : "", De = L.reactiveElementPolyfillSupport, he = (i, e) => i, at = { toAttribute(i, e) {
49
49
  switch (e) {
50
50
  case Boolean:
51
51
  i = i ? $i : null;
@@ -73,8 +73,8 @@ const { is: zi, defineProperty: Ci, getOwnPropertyDescriptor: Si, getOwnProperty
73
73
  }
74
74
  }
75
75
  return t;
76
- } }, wr = (i, e) => !zi(i, e), Bt = { attribute: !0, type: String, converter: ot, reflect: !1, hasChanged: wr };
77
- Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), G.litPropertyMetadata ?? (G.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
76
+ } }, wr = (i, e) => !zi(i, e), qt = { attribute: !0, type: String, converter: at, reflect: !1, hasChanged: wr };
77
+ Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), L.litPropertyMetadata ?? (L.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
78
78
  class ee extends HTMLElement {
79
79
  static addInitializer(e) {
80
80
  this._$Ei(), (this.l ?? (this.l = [])).push(e);
@@ -82,7 +82,7 @@ class ee extends HTMLElement {
82
82
  static get observedAttributes() {
83
83
  return this.finalize(), this._$Eh && [...this._$Eh.keys()];
84
84
  }
85
- static createProperty(e, t = Bt) {
85
+ static createProperty(e, t = qt) {
86
86
  if (t.state && (t.attribute = !1), this._$Ei(), this.elementProperties.set(e, t), !t.noAccessor) {
87
87
  const r = Symbol(), n = this.getPropertyDescriptor(e, r, t);
88
88
  n !== void 0 && Ci(this.prototype, e, n);
@@ -102,17 +102,17 @@ class ee extends HTMLElement {
102
102
  }, configurable: !0, enumerable: !0 };
103
103
  }
104
104
  static getPropertyOptions(e) {
105
- return this.elementProperties.get(e) ?? Bt;
105
+ return this.elementProperties.get(e) ?? qt;
106
106
  }
107
107
  static _$Ei() {
108
108
  if (this.hasOwnProperty(he("elementProperties"))) return;
109
- const e = Ei(this);
109
+ const e = Pi(this);
110
110
  e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
111
111
  }
112
112
  static finalize() {
113
113
  if (this.hasOwnProperty(he("finalized"))) return;
114
114
  if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(he("properties"))) {
115
- const t = this.properties, r = [...Mi(t), ...Pi(t)];
115
+ const t = this.properties, r = [...Mi(t), ...Ei(t)];
116
116
  for (const n of r) this.createProperty(n, t[n]);
117
117
  }
118
118
  const e = this[Symbol.metadata];
@@ -131,8 +131,8 @@ class ee extends HTMLElement {
131
131
  const t = [];
132
132
  if (Array.isArray(e)) {
133
133
  const r = new Set(e.flat(1 / 0).reverse());
134
- for (const n of r) t.unshift(Yt(n));
135
- } else e !== void 0 && t.push(Yt(e));
134
+ for (const n of r) t.unshift(Xt(n));
135
+ } else e !== void 0 && t.push(Xt(e));
136
136
  return t;
137
137
  }
138
138
  static _$Eu(e, t) {
@@ -186,7 +186,7 @@ class ee extends HTMLElement {
186
186
  var o;
187
187
  const r = this.constructor.elementProperties.get(e), n = this.constructor._$Eu(e, r);
188
188
  if (n !== void 0 && r.reflect === !0) {
189
- const a = (((o = r.converter) == null ? void 0 : o.toAttribute) !== void 0 ? r.converter : ot).toAttribute(t, r.type);
189
+ const a = (((o = r.converter) == null ? void 0 : o.toAttribute) !== void 0 ? r.converter : at).toAttribute(t, r.type);
190
190
  this._$Em = e, a == null ? this.removeAttribute(n) : this.setAttribute(n, a), this._$Em = null;
191
191
  }
192
192
  }
@@ -194,7 +194,7 @@ class ee extends HTMLElement {
194
194
  var o;
195
195
  const r = this.constructor, n = r._$Eh.get(e);
196
196
  if (n !== void 0 && this._$Em !== n) {
197
- const a = r.getPropertyOptions(n), s = typeof a.converter == "function" ? { fromAttribute: a.converter } : ((o = a.converter) == null ? void 0 : o.fromAttribute) !== void 0 ? a.converter : ot;
197
+ const a = r.getPropertyOptions(n), s = typeof a.converter == "function" ? { fromAttribute: a.converter } : ((o = a.converter) == null ? void 0 : o.fromAttribute) !== void 0 ? a.converter : at;
198
198
  this._$Em = n, this[n] = s.fromAttribute(t, a.type), this._$Em = null;
199
199
  }
200
200
  }
@@ -273,26 +273,26 @@ class ee extends HTMLElement {
273
273
  firstUpdated(e) {
274
274
  }
275
275
  }
276
- ee.elementStyles = [], ee.shadowRootOptions = { mode: "open" }, ee[he("elementProperties")] = /* @__PURE__ */ new Map(), ee[he("finalized")] = /* @__PURE__ */ new Map(), De == null || De({ ReactiveElement: ee }), (G.reactiveElementVersions ?? (G.reactiveElementVersions = [])).push("2.0.4");
276
+ ee.elementStyles = [], ee.shadowRootOptions = { mode: "open" }, ee[he("elementProperties")] = /* @__PURE__ */ new Map(), ee[he("finalized")] = /* @__PURE__ */ new Map(), De == null || De({ ReactiveElement: ee }), (L.reactiveElementVersions ?? (L.reactiveElementVersions = [])).push("2.0.4");
277
277
  /**
278
278
  * @license
279
279
  * Copyright 2017 Google LLC
280
280
  * SPDX-License-Identifier: BSD-3-Clause
281
281
  */
282
- const me = globalThis, Le = me.trustedTypes, qt = Le ? Le.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, zr = "$lit$", F = `lit$${Math.random().toFixed(9).slice(2)}$`, Cr = "?" + F, Ai = `<${Cr}>`, U = document, pe = () => U.createComment(""), ge = (i) => i === null || typeof i != "object" && typeof i != "function", gt = Array.isArray, Fi = (i) => gt(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", Qe = `[
283
- \f\r]`, ue = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Jt = /-->/g, Wt = />/g, R = RegExp(`>|${Qe}(?:([^\\s"'>=/]+)(${Qe}*=${Qe}*(?:[^
284
- \f\r"'\`<>=]|("|')|))|$)`, "g"), Zt = /'/g, Kt = /"/g, Sr = /^(?:script|style|textarea|title)$/i, Gi = (i) => (e, ...t) => ({ _$litType$: i, strings: e, values: t }), k = Gi(1), ae = Symbol.for("lit-noChange"), x = Symbol.for("lit-nothing"), Dt = /* @__PURE__ */ new WeakMap(), T = U.createTreeWalker(U, 129);
282
+ const me = globalThis, Ie = me.trustedTypes, Jt = Ie ? Ie.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, zr = "$lit$", F = `lit$${Math.random().toFixed(9).slice(2)}$`, Cr = "?" + F, Ai = `<${Cr}>`, U = document, pe = () => U.createComment(""), ge = (i) => i === null || typeof i != "object" && typeof i != "function", ft = Array.isArray, Fi = (i) => ft(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", Qe = `[
283
+ \f\r]`, ue = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Wt = /-->/g, Zt = />/g, R = RegExp(`>|${Qe}(?:([^\\s"'>=/]+)(${Qe}*=${Qe}*(?:[^
284
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), Kt = /'/g, Dt = /"/g, Sr = /^(?:script|style|textarea|title)$/i, Li = (i) => (e, ...t) => ({ _$litType$: i, strings: e, values: t }), x = Li(1), ae = Symbol.for("lit-noChange"), k = Symbol.for("lit-nothing"), Qt = /* @__PURE__ */ new WeakMap(), T = U.createTreeWalker(U, 129);
285
285
  function Mr(i, e) {
286
- if (!gt(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array");
287
- return qt !== void 0 ? qt.createHTML(e) : e;
286
+ if (!ft(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array");
287
+ return Jt !== void 0 ? Jt.createHTML(e) : e;
288
288
  }
289
- const Ii = (i, e) => {
289
+ const Gi = (i, e) => {
290
290
  const t = i.length - 1, r = [];
291
291
  let n, o = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", a = ue;
292
292
  for (let s = 0; s < t; s++) {
293
293
  const l = i[s];
294
294
  let c, d, u = -1, h = 0;
295
- for (; h < l.length && (a.lastIndex = h, d = a.exec(l), d !== null); ) h = a.lastIndex, a === ue ? d[1] === "!--" ? a = Jt : d[1] !== void 0 ? a = Wt : d[2] !== void 0 ? (Sr.test(d[2]) && (n = RegExp("</" + d[2], "g")), a = R) : d[3] !== void 0 && (a = R) : a === R ? d[0] === ">" ? (a = n ?? ue, u = -1) : d[1] === void 0 ? u = -2 : (u = a.lastIndex - d[2].length, c = d[1], a = d[3] === void 0 ? R : d[3] === '"' ? Kt : Zt) : a === Kt || a === Zt ? a = R : a === Jt || a === Wt ? a = ue : (a = R, n = void 0);
295
+ for (; h < l.length && (a.lastIndex = h, d = a.exec(l), d !== null); ) h = a.lastIndex, a === ue ? d[1] === "!--" ? a = Wt : d[1] !== void 0 ? a = Zt : d[2] !== void 0 ? (Sr.test(d[2]) && (n = RegExp("</" + d[2], "g")), a = R) : d[3] !== void 0 && (a = R) : a === R ? d[0] === ">" ? (a = n ?? ue, u = -1) : d[1] === void 0 ? u = -2 : (u = a.lastIndex - d[2].length, c = d[1], a = d[3] === void 0 ? R : d[3] === '"' ? Dt : Kt) : a === Dt || a === Kt ? a = R : a === Wt || a === Zt ? a = ue : (a = R, n = void 0);
296
296
  const m = a === R && i[s + 1].startsWith("/>") ? " " : "";
297
297
  o += a === ue ? l + Ai : u >= 0 ? (r.push(c), l.slice(0, u) + zr + l.slice(u) + F + m) : l + F + (u === -2 ? s : m);
298
298
  }
@@ -303,7 +303,7 @@ class fe {
303
303
  let n;
304
304
  this.parts = [];
305
305
  let o = 0, a = 0;
306
- const s = e.length - 1, l = this.parts, [c, d] = Ii(e, t);
306
+ const s = e.length - 1, l = this.parts, [c, d] = Gi(e, t);
307
307
  if (this.el = fe.createElement(c, r), T.currentNode = this.el.content, t === 2 || t === 3) {
308
308
  const u = this.el.content.firstChild;
309
309
  u.replaceWith(...u.childNodes);
@@ -317,7 +317,7 @@ class fe {
317
317
  if (Sr.test(n.tagName)) {
318
318
  const u = n.textContent.split(F), h = u.length - 1;
319
319
  if (h > 0) {
320
- n.textContent = Le ? Le.emptyScript : "";
320
+ n.textContent = Ie ? Ie.emptyScript : "";
321
321
  for (let m = 0; m < h; m++) n.append(u[m], pe()), T.nextNode(), l.push({ type: 2, index: ++o });
322
322
  n.append(u[h], pe());
323
323
  }
@@ -342,7 +342,7 @@ function se(i, e, t = i, r) {
342
342
  const o = ge(e) ? void 0 : e._$litDirective$;
343
343
  return (n == null ? void 0 : n.constructor) !== o && ((s = n == null ? void 0 : n._$AO) == null || s.call(n, !1), o === void 0 ? n = void 0 : (n = new o(i), n._$AT(i, t, r)), r !== void 0 ? (t._$Co ?? (t._$Co = []))[r] = n : t._$Cl = n), n !== void 0 && (e = se(i, n._$AS(i, e.values), n, r)), e;
344
344
  }
345
- let Li = class {
345
+ let Ii = class {
346
346
  constructor(e, t) {
347
347
  this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
348
348
  }
@@ -359,7 +359,7 @@ let Li = class {
359
359
  for (; l !== void 0; ) {
360
360
  if (a === l.index) {
361
361
  let c;
362
- l.type === 2 ? c = new ft(o, o.nextSibling, this, e) : l.type === 1 ? c = new l.ctor(o, l.name, l.strings, this, e) : l.type === 6 && (c = new Oi(o, this, e)), this._$AV.push(c), l = r[++s];
362
+ l.type === 2 ? c = new bt(o, o.nextSibling, this, e) : l.type === 1 ? c = new l.ctor(o, l.name, l.strings, this, e) : l.type === 6 && (c = new Oi(o, this, e)), this._$AV.push(c), l = r[++s];
363
363
  }
364
364
  a !== (l == null ? void 0 : l.index) && (o = T.nextNode(), a++);
365
365
  }
@@ -369,13 +369,13 @@ let Li = class {
369
369
  let t = 0;
370
370
  for (const r of this._$AV) r !== void 0 && (r.strings !== void 0 ? (r._$AI(e, r, t), t += r.strings.length - 2) : r._$AI(e[t])), t++;
371
371
  }
372
- }, ft = class Pr {
372
+ }, bt = class Er {
373
373
  get _$AU() {
374
374
  var e;
375
375
  return ((e = this._$AM) == null ? void 0 : e._$AU) ?? this._$Cv;
376
376
  }
377
377
  constructor(e, t, r, n) {
378
- this.type = 2, this._$AH = x, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = r, this.options = n, this._$Cv = (n == null ? void 0 : n.isConnected) ?? !0;
378
+ this.type = 2, this._$AH = k, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = r, this.options = n, this._$Cv = (n == null ? void 0 : n.isConnected) ?? !0;
379
379
  }
380
380
  get parentNode() {
381
381
  let e = this._$AA.parentNode;
@@ -389,7 +389,7 @@ let Li = class {
389
389
  return this._$AB;
390
390
  }
391
391
  _$AI(e, t = this) {
392
- e = se(this, e, t), ge(e) ? e === x || e == null || e === "" ? (this._$AH !== x && this._$AR(), this._$AH = x) : e !== this._$AH && e !== ae && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Fi(e) ? this.k(e) : this._(e);
392
+ e = se(this, e, t), ge(e) ? e === k || e == null || e === "" ? (this._$AH !== k && this._$AR(), this._$AH = k) : e !== this._$AH && e !== ae && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Fi(e) ? this.k(e) : this._(e);
393
393
  }
394
394
  O(e) {
395
395
  return this._$AA.parentNode.insertBefore(e, this._$AB);
@@ -398,26 +398,26 @@ let Li = class {
398
398
  this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
399
399
  }
400
400
  _(e) {
401
- this._$AH !== x && ge(this._$AH) ? this._$AA.nextSibling.data = e : this.T(U.createTextNode(e)), this._$AH = e;
401
+ this._$AH !== k && ge(this._$AH) ? this._$AA.nextSibling.data = e : this.T(U.createTextNode(e)), this._$AH = e;
402
402
  }
403
403
  $(e) {
404
404
  var o;
405
405
  const { values: t, _$litType$: r } = e, n = typeof r == "number" ? this._$AC(e) : (r.el === void 0 && (r.el = fe.createElement(Mr(r.h, r.h[0]), this.options)), r);
406
406
  if (((o = this._$AH) == null ? void 0 : o._$AD) === n) this._$AH.p(t);
407
407
  else {
408
- const a = new Li(n, this), s = a.u(this.options);
408
+ const a = new Ii(n, this), s = a.u(this.options);
409
409
  a.p(t), this.T(s), this._$AH = a;
410
410
  }
411
411
  }
412
412
  _$AC(e) {
413
- let t = Dt.get(e.strings);
414
- return t === void 0 && Dt.set(e.strings, t = new fe(e)), t;
413
+ let t = Qt.get(e.strings);
414
+ return t === void 0 && Qt.set(e.strings, t = new fe(e)), t;
415
415
  }
416
416
  k(e) {
417
- gt(this._$AH) || (this._$AH = [], this._$AR());
417
+ ft(this._$AH) || (this._$AH = [], this._$AR());
418
418
  const t = this._$AH;
419
419
  let r, n = 0;
420
- for (const o of e) n === t.length ? t.push(r = new Pr(this.O(pe()), this.O(pe()), this, this.options)) : r = t[n], r._$AI(o), n++;
420
+ for (const o of e) n === t.length ? t.push(r = new Er(this.O(pe()), this.O(pe()), this, this.options)) : r = t[n], r._$AI(o), n++;
421
421
  n < t.length && (this._$AR(r && r._$AB.nextSibling, n), t.length = n);
422
422
  }
423
423
  _$AR(e = this._$AA.nextSibling, t) {
@@ -440,7 +440,7 @@ class Ve {
440
440
  return this._$AM._$AU;
441
441
  }
442
442
  constructor(e, t, r, n, o) {
443
- this.type = 1, this._$AH = x, this._$AN = void 0, this.element = e, this.name = t, this._$AM = n, this.options = o, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = x;
443
+ this.type = 1, this._$AH = k, this._$AN = void 0, this.element = e, this.name = t, this._$AM = n, this.options = o, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = k;
444
444
  }
445
445
  _$AI(e, t = this, r, n) {
446
446
  const o = this.strings;
@@ -449,12 +449,12 @@ class Ve {
449
449
  else {
450
450
  const s = e;
451
451
  let l, c;
452
- for (e = o[0], l = 0; l < o.length - 1; l++) c = se(this, s[r + l], t, l), c === ae && (c = this._$AH[l]), a || (a = !ge(c) || c !== this._$AH[l]), c === x ? e = x : e !== x && (e += (c ?? "") + o[l + 1]), this._$AH[l] = c;
452
+ for (e = o[0], l = 0; l < o.length - 1; l++) c = se(this, s[r + l], t, l), c === ae && (c = this._$AH[l]), a || (a = !ge(c) || c !== this._$AH[l]), c === k ? e = k : e !== k && (e += (c ?? "") + o[l + 1]), this._$AH[l] = c;
453
453
  }
454
454
  a && !n && this.j(e);
455
455
  }
456
456
  j(e) {
457
- e === x ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
457
+ e === k ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
458
458
  }
459
459
  }
460
460
  class Ri extends Ve {
@@ -462,7 +462,7 @@ class Ri extends Ve {
462
462
  super(...arguments), this.type = 3;
463
463
  }
464
464
  j(e) {
465
- this.element[this.name] = e === x ? void 0 : e;
465
+ this.element[this.name] = e === k ? void 0 : e;
466
466
  }
467
467
  }
468
468
  class Ni extends Ve {
@@ -470,7 +470,7 @@ class Ni extends Ve {
470
470
  super(...arguments), this.type = 4;
471
471
  }
472
472
  j(e) {
473
- this.element.toggleAttribute(this.name, !!e && e !== x);
473
+ this.element.toggleAttribute(this.name, !!e && e !== k);
474
474
  }
475
475
  }
476
476
  class Ti extends Ve {
@@ -478,8 +478,8 @@ class Ti extends Ve {
478
478
  super(e, t, r, n, o), this.type = 5;
479
479
  }
480
480
  _$AI(e, t = this) {
481
- if ((e = se(this, e, t, 0) ?? x) === ae) return;
482
- const r = this._$AH, n = e === x && r !== x || e.capture !== r.capture || e.once !== r.once || e.passive !== r.passive, o = e !== x && (r === x || n);
481
+ if ((e = se(this, e, t, 0) ?? k) === ae) return;
482
+ const r = this._$AH, n = e === k && r !== k || e.capture !== r.capture || e.once !== r.once || e.passive !== r.passive, o = e !== k && (r === k || n);
483
483
  n && this.element.removeEventListener(this.name, this, r), o && this.element.addEventListener(this.name, this, e), this._$AH = e;
484
484
  }
485
485
  handleEvent(e) {
@@ -499,13 +499,13 @@ class Oi {
499
499
  }
500
500
  }
501
501
  const et = me.litHtmlPolyfillSupport;
502
- et == null || et(fe, ft), (me.litHtmlVersions ?? (me.litHtmlVersions = [])).push("3.2.1");
502
+ et == null || et(fe, bt), (me.litHtmlVersions ?? (me.litHtmlVersions = [])).push("3.2.1");
503
503
  const Hi = (i, e, t) => {
504
504
  const r = (t == null ? void 0 : t.renderBefore) ?? e;
505
505
  let n = r._$litPart$;
506
506
  if (n === void 0) {
507
507
  const o = (t == null ? void 0 : t.renderBefore) ?? null;
508
- r._$litPart$ = n = new ft(e.insertBefore(pe(), o), o, void 0, t ?? {});
508
+ r._$litPart$ = n = new bt(e.insertBefore(pe(), o), o, void 0, t ?? {});
509
509
  }
510
510
  return n._$AI(i), n;
511
511
  };
@@ -579,7 +579,7 @@ const Ui = {}, Yi = (i, e = Ui) => i._$AH = e;
579
579
  */
580
580
  const Xi = ji(class extends Vi {
581
581
  constructor() {
582
- super(...arguments), this.key = x;
582
+ super(...arguments), this.key = k;
583
583
  }
584
584
  render(i, e) {
585
585
  return this.key = i, e;
@@ -603,46 +603,46 @@ const Xi = ji(class extends Vi {
603
603
  if (i.clickId === e) return;
604
604
  const r = t ? [] : [e];
605
605
  i.hoverInteraction.highlightById(r);
606
- }, Ji = (i, e) => {
606
+ }, Ji = (i, e, t) => {
607
607
  i.stopPropagation();
608
- const t = Number(i.target.getAttribute("index")), r = e.drawLayer.getSource().getFeatures()[t];
609
- e.drawLayer.getSource().removeFeature(r), e.drawnFeatures.splice(t, 1), e.requestUpdate();
610
- }, Qt = {
608
+ const r = Number(i.target.getAttribute("index")), n = e.drawLayer.getSource().getFeatures()[r];
609
+ e.drawLayer.getSource().removeFeature(n), e.drawnFeatures.splice(r, 1), t.emitDrawnFeatures(), e.requestUpdate();
610
+ }, er = {
611
611
  duration: 750,
612
612
  padding: [20, 20, 20, 20]
613
- }, er = {
613
+ }, tr = {
614
614
  type: "FeatureCollection",
615
615
  features: []
616
616
  }, Wi = (i, e) => {
617
617
  const { clickId: t, drawLayer: r, olMap: n, clickInteraction: o } = e, a = o.getId(i);
618
618
  if (t === a) {
619
619
  const l = r.getSource().getExtent();
620
- n.getView().fit(l, Qt), o.highlightById([]);
620
+ n.getView().fit(l, er), o.highlightById([]);
621
621
  } else {
622
622
  const l = e.eoxMap.projection || "EPSG:3857", c = e.eoxDrawTools.projection, d = i.clone().getGeometry().transform(c, l).getExtent();
623
- o.highlightById([a]), n.getView().fit(d, Qt);
623
+ o.highlightById([a]), n.getView().fit(d, er);
624
624
  }
625
625
  e.requestUpdate();
626
626
  };
627
- class Er extends j {
627
+ class Pr extends j {
628
628
  constructor() {
629
629
  super();
630
630
  /**
631
631
  * @type {import("@eox/map").EOxMap["selectInteractions"][string]}
632
632
  */
633
- L(this, "hoverInteraction");
633
+ I(this, "hoverInteraction");
634
634
  /**
635
635
  * @type {import("@eox/map").EOxMap["selectInteractions"][string]}
636
636
  */
637
- L(this, "clickInteraction");
637
+ I(this, "clickInteraction");
638
638
  /**
639
639
  * @type string | number
640
640
  */
641
- L(this, "hoverId");
641
+ I(this, "hoverId");
642
642
  /**
643
643
  * @type string | number
644
644
  */
645
- L(this, "clickId");
645
+ I(this, "clickId");
646
646
  this.eoxDrawTools = null, this.eoxMap = null, this.olMap = null, this.draw = null, this.drawLayer = null, this.drawnFeatures = [], this.featureName = "Feature", this.featureNameKey = null, this.modify = null, this.unstyled = !1;
647
647
  }
648
648
  /**
@@ -651,7 +651,7 @@ class Er extends j {
651
651
  * @param {Event & { target: HTMLButtonElement }} evt - Event object containing button target.
652
652
  */
653
653
  _handleDelete(t) {
654
- Ji(t, this), this.dispatchEvent(new CustomEvent("changed", { bubbles: !0 }));
654
+ Ji(t, this, this.eoxDrawTools), this.dispatchEvent(new CustomEvent("changed", { bubbles: !0 }));
655
655
  }
656
656
  /**
657
657
  * Handles the selection and deselection of a feature from the list.
@@ -684,7 +684,7 @@ class Er extends j {
684
684
  render() {
685
685
  var r, n;
686
686
  this.hoverId = (r = this.hoverInteraction) == null ? void 0 : r.selectedFids[0], this.clickId = (n = this.clickInteraction) == null ? void 0 : n.selectedFids[0];
687
- const t = k`<svg
687
+ const t = x`<svg
688
688
  xmlns="http://www.w3.org/2000/svg"
689
689
  viewBox="0 0 24 24"
690
690
  >
@@ -693,15 +693,18 @@ class Er extends j {
693
693
  d="M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M7,6H17V19H7V6M9,8V17H11V8H9M13,8V17H15V8H13Z"
694
694
  />
695
695
  </svg>`;
696
- return k`
696
+ return x`
697
697
  <ul class="list no-space">
698
698
  ${this.drawnFeatures.map((o, a) => {
699
+ var g;
699
700
  const s = a + 1, l = Object.values(
700
701
  this.eoxMap.selectInteractions
701
- )[0].getId(o), c = this.hoverId === l, d = this.clickId === l, u = c ? "surface-container-low" : d ? "fill" : x, h = o.get(this.featureNameKey), m = h || `${this.featureName} ${s}`;
702
+ )[0].getId(o), c = this.hoverId === l, d = this.clickId === l, u = c ? "surface-container-low" : d ? "fill" : k, h = (g = this.featureNameKey) == null ? void 0 : g.split("."), m = o.get(this.featureNameKey) || (h == null ? void 0 : h.reduce((f, _) => f == null ? void 0 : f[_], {
703
+ ...o.getProperties()
704
+ })), p = m || `${this.featureName} ${s}`;
702
705
  return Xi(
703
706
  s,
704
- k`
707
+ x`
705
708
  <li
706
709
  class="${u} no-round"
707
710
  @mouseover=${() => this._handleHoverFeature(l)}
@@ -709,7 +712,7 @@ class Er extends j {
709
712
  @click="${() => this._handleFeatureSelectAndDeselect(o)}"
710
713
  >
711
714
  <div class="max">
712
- <span class="title">${m}</span>
715
+ <span class="title">${p}</span>
713
716
  </div>
714
717
  <button
715
718
  index=${a}
@@ -717,7 +720,7 @@ class Er extends j {
717
720
  class="transparent square small error-text front"
718
721
  @click="${this._handleDelete}"
719
722
  >
720
- ${this.unstyled ? "x" : k`<i class="small">${t}</i>`}
723
+ ${this.unstyled ? "x" : x`<i class="small">${t}</i>`}
721
724
  </button>
722
725
  </li>
723
726
  `
@@ -727,7 +730,7 @@ class Er extends j {
727
730
  `;
728
731
  }
729
732
  }
730
- L(Er, "properties", {
733
+ I(Pr, "properties", {
731
734
  eoxDrawTools: { attribute: !1, state: !0 },
732
735
  eoxMap: { attribute: !1, state: !0 },
733
736
  olMap: { attribute: !1, state: !0 },
@@ -739,7 +742,7 @@ L(Er, "properties", {
739
742
  modify: { attribute: !1, state: !0 },
740
743
  unstyled: { type: Boolean }
741
744
  });
742
- customElements.define("eox-drawtools-list", Er);
745
+ customElements.define("eox-drawtools-list", Pr);
743
746
  const Zi = (i) => {
744
747
  const { multipleFeatures: e, drawnFeatures: t, currentlyDrawing: r } = i, n = !e && (t == null ? void 0 : t.length) > 0 || r, o = !(t != null && t.length) && !r;
745
748
  return { drawDisabled: n, discardDisabled: o };
@@ -760,7 +763,7 @@ const Di = {
760
763
  * @api
761
764
  */
762
765
  PROPERTYCHANGE: "propertychange"
763
- }, bt = {
766
+ }, yt = {
764
767
  /**
765
768
  * Generic change event. Triggered when the revision counter is increased.
766
769
  * @event module:ol/events/Event~BaseEvent#change
@@ -810,7 +813,7 @@ function tn(i, e) {
810
813
  return !1;
811
814
  return !0;
812
815
  }
813
- function tr() {
816
+ function rr() {
814
817
  }
815
818
  function Ar(i) {
816
819
  let e, t, r;
@@ -823,13 +826,13 @@ function Fr(i) {
823
826
  for (const e in i)
824
827
  delete i[e];
825
828
  }
826
- function Gr(i) {
829
+ function Lr(i) {
827
830
  let e;
828
831
  for (e in i)
829
832
  return !1;
830
833
  return !e;
831
834
  }
832
- class Ir {
835
+ class Gr {
833
836
  /**
834
837
  * @param {string} type Type.
835
838
  */
@@ -883,7 +886,7 @@ class rn extends Qi {
883
886
  const t = typeof e == "string", r = t ? e : e.type, n = this.listeners_ && this.listeners_[r];
884
887
  if (!n)
885
888
  return;
886
- const o = t ? new Ir(e) : (
889
+ const o = t ? new Gr(e) : (
887
890
  /** @type {Event} */
888
891
  e
889
892
  );
@@ -901,7 +904,7 @@ class rn extends Qi {
901
904
  if (--a[r] === 0) {
902
905
  let c = s[r];
903
906
  for (delete s[r]; c--; )
904
- this.removeEventListener(r, tr);
907
+ this.removeEventListener(r, rr);
905
908
  delete a[r];
906
909
  }
907
910
  return l;
@@ -942,7 +945,7 @@ class rn extends Qi {
942
945
  if (!r)
943
946
  return;
944
947
  const n = r.indexOf(t);
945
- n !== -1 && (this.pendingRemovals_ && e in this.pendingRemovals_ ? (r[n] = tr, ++this.pendingRemovals_[e]) : (r.splice(n, 1), r.length === 0 && delete this.listeners_[e]));
948
+ n !== -1 && (this.pendingRemovals_ && e in this.pendingRemovals_ ? (r[n] = rr, ++this.pendingRemovals_[e]) : (r.splice(n, 1), r.length === 0 && delete this.listeners_[e]));
946
949
  }
947
950
  }
948
951
  function be(i, e, t, r, n) {
@@ -959,7 +962,7 @@ function be(i, e, t, r, n) {
959
962
  };
960
963
  return i.addEventListener(e, t), o;
961
964
  }
962
- function rr(i, e, t, r) {
965
+ function ir(i, e, t, r) {
963
966
  return be(i, e, t, r, !0);
964
967
  }
965
968
  function Re(i) {
@@ -977,7 +980,7 @@ class Ue extends rn {
977
980
  * @api
978
981
  */
979
982
  changed() {
980
- ++this.revision_, this.dispatchEvent(bt.CHANGE);
983
+ ++this.revision_, this.dispatchEvent(yt.CHANGE);
981
984
  }
982
985
  /**
983
986
  * Get the version number for this object. Each time the object is modified,
@@ -1020,9 +1023,9 @@ class Ue extends rn {
1020
1023
  const n = e.length;
1021
1024
  r = new Array(n);
1022
1025
  for (let o = 0; o < n; ++o)
1023
- r[o] = rr(this, e[o], t);
1026
+ r[o] = ir(this, e[o], t);
1024
1027
  } else
1025
- r = rr(
1028
+ r = ir(
1026
1029
  this,
1027
1030
  /** @type {string} */
1028
1031
  e,
@@ -1063,14 +1066,14 @@ function nn(i) {
1063
1066
  i
1064
1067
  );
1065
1068
  }
1066
- function f() {
1069
+ function b() {
1067
1070
  throw new Error("Unimplemented abstract method.");
1068
1071
  }
1069
1072
  let on = 0;
1070
1073
  function an(i) {
1071
1074
  return i.ol_uid || (i.ol_uid = String(++on));
1072
1075
  }
1073
- class ir extends Ir {
1076
+ class nr extends Gr {
1074
1077
  /**
1075
1078
  * @param {string} type The event type.
1076
1079
  * @param {string} key The property name.
@@ -1080,7 +1083,7 @@ class ir extends Ir {
1080
1083
  super(e), this.key = t, this.oldValue = r;
1081
1084
  }
1082
1085
  }
1083
- class Lr extends Ue {
1086
+ class Ir extends Ue {
1084
1087
  /**
1085
1088
  * @param {Object<string, *>} [values] An object with key-value pairs.
1086
1089
  */
@@ -1132,7 +1135,7 @@ class Lr extends Ue {
1132
1135
  */
1133
1136
  notify(e, t) {
1134
1137
  let r;
1135
- r = `change:${e}`, this.hasListener(r) && this.dispatchEvent(new ir(r, e, t)), r = Di.PROPERTYCHANGE, this.hasListener(r) && this.dispatchEvent(new ir(r, e, t));
1138
+ r = `change:${e}`, this.hasListener(r) && this.dispatchEvent(new nr(r, e, t)), r = Di.PROPERTYCHANGE, this.hasListener(r) && this.dispatchEvent(new nr(r, e, t));
1136
1139
  }
1137
1140
  /**
1138
1141
  * @param {string} key Key name.
@@ -1192,7 +1195,7 @@ class Lr extends Ue {
1192
1195
  unset(e, t) {
1193
1196
  if (this.values_ && e in this.values_) {
1194
1197
  const r = this.values_[e];
1195
- delete this.values_[e], Gr(this.values_) && (this.values_ = null), t || this.notify(e, r);
1198
+ delete this.values_[e], Lr(this.values_) && (this.values_ = null), t || this.notify(e, r);
1196
1199
  }
1197
1200
  }
1198
1201
  }
@@ -1200,7 +1203,7 @@ function sn(i, e) {
1200
1203
  if (!i)
1201
1204
  throw new Error(e);
1202
1205
  }
1203
- class le extends Lr {
1206
+ class le extends Ir {
1204
1207
  /**
1205
1208
  * @param {Geometry|ObjectWithGeometry<Geometry>} [geometryOrProperties]
1206
1209
  * You may pass a Geometry object directly, or an object literal containing
@@ -1307,7 +1310,7 @@ class le extends Lr {
1307
1310
  const e = this.getGeometry();
1308
1311
  e && (this.geometryChangeKey_ = be(
1309
1312
  e,
1310
- bt.CHANGE,
1313
+ yt.CHANGE,
1311
1314
  this.handleGeometryChange_,
1312
1315
  this
1313
1316
  )), this.changed();
@@ -1372,7 +1375,7 @@ function ln(i) {
1372
1375
  return e;
1373
1376
  };
1374
1377
  }
1375
- const _ = {
1378
+ const w = {
1376
1379
  UNKNOWN: 0,
1377
1380
  INTERSECTING: 1,
1378
1381
  ABOVE: 2,
@@ -1387,26 +1390,26 @@ function W(i, e, t) {
1387
1390
  function Rr(i, e, t) {
1388
1391
  return i[0] <= e && e <= i[2] && i[1] <= t && t <= i[3];
1389
1392
  }
1390
- function nr(i, e) {
1393
+ function or(i, e) {
1391
1394
  const t = i[0], r = i[1], n = i[2], o = i[3], a = e[0], s = e[1];
1392
- let l = _.UNKNOWN;
1393
- return a < t ? l = l | _.LEFT : a > n && (l = l | _.RIGHT), s < r ? l = l | _.BELOW : s > o && (l = l | _.ABOVE), l === _.UNKNOWN && (l = _.INTERSECTING), l;
1395
+ let l = w.UNKNOWN;
1396
+ return a < t ? l = l | w.LEFT : a > n && (l = l | w.RIGHT), s < r ? l = l | w.BELOW : s > o && (l = l | w.ABOVE), l === w.UNKNOWN && (l = w.INTERSECTING), l;
1394
1397
  }
1395
- function yt() {
1398
+ function vt() {
1396
1399
  return [1 / 0, 1 / 0, -1 / 0, -1 / 0];
1397
1400
  }
1398
1401
  function Nr(i, e, t, r, n) {
1399
1402
  return n ? (n[0] = i, n[1] = e, n[2] = t, n[3] = r, n) : [i, e, t, r];
1400
1403
  }
1401
- function vt(i) {
1404
+ function xt(i) {
1402
1405
  return Nr(1 / 0, 1 / 0, -1 / 0, -1 / 0, i);
1403
1406
  }
1404
1407
  function Tr(i, e) {
1405
1408
  const t = i[0], r = i[1];
1406
1409
  return Nr(t, r, t, r, e);
1407
1410
  }
1408
- function xt(i, e, t, r, n) {
1409
- const o = vt(n);
1411
+ function kt(i, e, t, r, n) {
1412
+ const o = xt(n);
1410
1413
  return Or(o, i, e, t, r);
1411
1414
  }
1412
1415
  function cn(i, e) {
@@ -1450,13 +1453,13 @@ function bn(i, e) {
1450
1453
  }
1451
1454
  function yn(i, e, t) {
1452
1455
  let r = !1;
1453
- const n = nr(i, e), o = nr(i, t);
1454
- if (n === _.INTERSECTING || o === _.INTERSECTING)
1456
+ const n = or(i, e), o = or(i, t);
1457
+ if (n === w.INTERSECTING || o === w.INTERSECTING)
1455
1458
  r = !0;
1456
1459
  else {
1457
1460
  const a = i[0], s = i[1], l = i[2], c = i[3], d = e[0], u = e[1], h = t[0], m = t[1], p = (m - u) / (h - d);
1458
- let g, y;
1459
- o & _.ABOVE && !(n & _.ABOVE) && (g = h - (m - c) / p, r = g >= a && g <= l), !r && o & _.RIGHT && !(n & _.RIGHT) && (y = m - (h - l) * p, r = y >= s && y <= c), !r && o & _.BELOW && !(n & _.BELOW) && (g = h - (m - s) / p, r = g >= a && g <= l), !r && o & _.LEFT && !(n & _.LEFT) && (y = m - (h - a) * p, r = y >= s && y <= c);
1461
+ let g, f;
1462
+ o & w.ABOVE && !(n & w.ABOVE) && (g = h - (m - c) / p, r = g >= a && g <= l), !r && o & w.RIGHT && !(n & w.RIGHT) && (f = m - (h - l) * p, r = f >= s && f <= c), !r && o & w.BELOW && !(n & w.BELOW) && (g = h - (m - s) / p, r = g >= a && g <= l), !r && o & w.LEFT && !(n & w.LEFT) && (f = m - (h - a) * p, r = f >= s && f <= c);
1460
1463
  }
1461
1464
  return r;
1462
1465
  }
@@ -1472,16 +1475,16 @@ function V(i, e, t, r) {
1472
1475
  const n = t - i, o = r - e;
1473
1476
  return n * n + o * o;
1474
1477
  }
1475
- function or(i) {
1478
+ function ar(i) {
1476
1479
  return i * 180 / Math.PI;
1477
1480
  }
1478
- function Ie(i) {
1481
+ function Ge(i) {
1479
1482
  return i * Math.PI / 180;
1480
1483
  }
1481
- function kt(i, e, t) {
1484
+ function _t(i, e, t) {
1482
1485
  return i + t * (e - i);
1483
1486
  }
1484
- function at(i, e, t) {
1487
+ function st(i, e, t) {
1485
1488
  if (i >= e && i < t)
1486
1489
  return i;
1487
1490
  const r = t - e;
@@ -1495,7 +1498,7 @@ const xn = {
1495
1498
  m: 1,
1496
1499
  "us-ft": 1200 / 3937
1497
1500
  };
1498
- class _t {
1501
+ class wt {
1499
1502
  /**
1500
1503
  * @param {Options} options Projection options.
1501
1504
  */
@@ -1629,7 +1632,7 @@ class _t {
1629
1632
  }
1630
1633
  }
1631
1634
  const Me = 6378137, te = Math.PI * Me, kn = [-te, -te, te, te], _n = [-180, -85, 180, 85], $e = Me * Math.log(Math.tan(Math.PI / 2));
1632
- class D extends _t {
1635
+ class D extends wt {
1633
1636
  /**
1634
1637
  * @param {string} code Code.
1635
1638
  */
@@ -1646,7 +1649,7 @@ class D extends _t {
1646
1649
  });
1647
1650
  }
1648
1651
  }
1649
- const ar = [
1652
+ const sr = [
1650
1653
  new D("EPSG:3857"),
1651
1654
  new D("EPSG:102100"),
1652
1655
  new D("EPSG:102113"),
@@ -1671,8 +1674,8 @@ function zn(i, e, t, r) {
1671
1674
  e[o] = 180 * i[o] / te, e[o + 1] = 360 * Math.atan(Math.exp(i[o + 1] / Me)) / Math.PI - 90;
1672
1675
  return e;
1673
1676
  }
1674
- const Cn = 6378137, sr = [-180, -90, 180, 90], Sn = Math.PI * Cn / 180;
1675
- class N extends _t {
1677
+ const Cn = 6378137, lr = [-180, -90, 180, 90], Sn = Math.PI * Cn / 180;
1678
+ class N extends wt {
1676
1679
  /**
1677
1680
  * @param {string} code Code.
1678
1681
  * @param {string} [axisOrientation] Axis orientation.
@@ -1681,15 +1684,15 @@ class N extends _t {
1681
1684
  super({
1682
1685
  code: e,
1683
1686
  units: "degrees",
1684
- extent: sr,
1687
+ extent: lr,
1685
1688
  axisOrientation: t,
1686
1689
  global: !0,
1687
1690
  metersPerUnit: Sn,
1688
- worldExtent: sr
1691
+ worldExtent: lr
1689
1692
  });
1690
1693
  }
1691
1694
  }
1692
- const lr = [
1695
+ const cr = [
1693
1696
  new N("CRS:84"),
1694
1697
  new N("EPSG:4326", "neu"),
1695
1698
  new N("urn:ogc:def:crs:OGC:1.3:CRS84"),
@@ -1698,12 +1701,12 @@ const lr = [
1698
1701
  new N("http://www.opengis.net/gml/srs/epsg.xml#4326", "neu"),
1699
1702
  new N("http://www.opengis.net/def/crs/EPSG/0/4326", "neu")
1700
1703
  ];
1701
- let st = {};
1704
+ let lt = {};
1702
1705
  function Mn(i) {
1703
- return st[i] || st[i.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/, "EPSG:$3")] || null;
1706
+ return lt[i] || lt[i.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/, "EPSG:$3")] || null;
1704
1707
  }
1705
- function Pn(i, e) {
1706
- st[i] = e;
1708
+ function En(i, e) {
1709
+ lt[i] = e;
1707
1710
  }
1708
1711
  let re = {};
1709
1712
  function ye(i, e, t) {
@@ -1713,22 +1716,22 @@ function ye(i, e, t) {
1713
1716
  function rt(i, e) {
1714
1717
  return i in re && e in re[i] ? re[i][e] : null;
1715
1718
  }
1716
- const Te = 0.9996, S = 669438e-8, Xe = S * S, Be = Xe * S, O = S / (1 - S), cr = Math.sqrt(1 - S), ce = (1 - cr) / (1 + cr), Hr = ce * ce, wt = Hr * ce, zt = wt * ce, jr = zt * ce, Vr = 1 - S / 4 - 3 * Xe / 64 - 5 * Be / 256, En = 3 * S / 8 + 3 * Xe / 32 + 45 * Be / 1024, $n = 15 * Xe / 256 + 45 * Be / 1024, An = 35 * Be / 3072, Fn = 3 / 2 * ce - 27 / 32 * wt + 269 / 512 * jr, Gn = 21 / 16 * Hr - 55 / 32 * zt, In = 151 / 96 * wt - 417 / 128 * jr, Ln = 1097 / 512 * zt, Oe = 6378137;
1719
+ const Te = 0.9996, S = 669438e-8, Xe = S * S, Be = Xe * S, O = S / (1 - S), dr = Math.sqrt(1 - S), ce = (1 - dr) / (1 + dr), Hr = ce * ce, zt = Hr * ce, Ct = zt * ce, jr = Ct * ce, Vr = 1 - S / 4 - 3 * Xe / 64 - 5 * Be / 256, Pn = 3 * S / 8 + 3 * Xe / 32 + 45 * Be / 1024, $n = 15 * Xe / 256 + 45 * Be / 1024, An = 35 * Be / 3072, Fn = 3 / 2 * ce - 27 / 32 * zt + 269 / 512 * jr, Ln = 21 / 16 * Hr - 55 / 32 * Ct, Gn = 151 / 96 * zt - 417 / 128 * jr, In = 1097 / 512 * Ct, Oe = 6378137;
1717
1720
  function Rn(i, e, t) {
1718
- const r = i - 5e5, a = (t.north ? e : e - 1e7) / Te / (Oe * Vr), s = a + Fn * Math.sin(2 * a) + Gn * Math.sin(4 * a) + In * Math.sin(6 * a) + Ln * Math.sin(8 * a), l = Math.sin(s), c = l * l, d = Math.cos(s), u = l / d, h = u * u, m = h * h, p = 1 - S * c, g = Math.sqrt(1 - S * c), y = Oe / g, w = (1 - S) / p, v = O * d ** 2, P = v * v, z = r / (y * Te), I = z * z, de = I * z, Ot = de * z, Ht = Ot * z, bi = Ht * z, yi = s - u / w * (I / 2 - Ot / 24 * (5 + 3 * h + 10 * v - 4 * P - 9 * O)) + bi / 720 * (61 + 90 * h + 298 * v + 45 * m - 252 * O - 3 * P);
1719
- let Ke = (z - de / 6 * (1 + 2 * h + v) + Ht / 120 * (5 - 2 * v + 28 * h - 3 * P + 8 * O + 24 * m)) / d;
1720
- return Ke = at(
1721
- Ke + Ie(Ur(t.number)),
1721
+ const r = i - 5e5, a = (t.north ? e : e - 1e7) / Te / (Oe * Vr), s = a + Fn * Math.sin(2 * a) + Ln * Math.sin(4 * a) + Gn * Math.sin(6 * a) + In * Math.sin(8 * a), l = Math.sin(s), c = l * l, d = Math.cos(s), u = l / d, h = u * u, m = h * h, p = 1 - S * c, g = Math.sqrt(1 - S * c), f = Oe / g, _ = (1 - S) / p, v = O * d ** 2, E = v * v, z = r / (f * Te), G = z * z, de = G * z, Ht = de * z, jt = Ht * z, bi = jt * z, yi = s - u / _ * (G / 2 - Ht / 24 * (5 + 3 * h + 10 * v - 4 * E - 9 * O)) + bi / 720 * (61 + 90 * h + 298 * v + 45 * m - 252 * O - 3 * E);
1722
+ let Ke = (z - de / 6 * (1 + 2 * h + v) + jt / 120 * (5 - 2 * v + 28 * h - 3 * E + 8 * O + 24 * m)) / d;
1723
+ return Ke = st(
1724
+ Ke + Ge(Ur(t.number)),
1722
1725
  -Math.PI,
1723
1726
  Math.PI
1724
- ), [or(Ke), or(yi)];
1727
+ ), [ar(Ke), ar(yi)];
1725
1728
  }
1726
- const dr = -80, ur = 84, Nn = -180, Tn = 180;
1729
+ const ur = -80, hr = 84, Nn = -180, Tn = 180;
1727
1730
  function On(i, e, t) {
1728
- i = at(i, Nn, Tn), e < dr ? e = dr : e > ur && (e = ur);
1729
- const r = Ie(e), n = Math.sin(r), o = Math.cos(r), a = n / o, s = a * a, l = s * s, c = Ie(i), d = Ur(t.number), u = Ie(d), h = Oe / Math.sqrt(1 - S * n ** 2), m = O * o ** 2, p = o * at(c - u, -Math.PI, Math.PI), g = p * p, y = g * p, w = y * p, v = w * p, P = v * p, z = Oe * (Vr * r - En * Math.sin(2 * r) + $n * Math.sin(4 * r) - An * Math.sin(6 * r)), I = Te * h * (p + y / 6 * (1 - s + m) + v / 120 * (5 - 18 * s + l + 72 * m - 58 * O)) + 5e5;
1730
- let de = Te * (z + h * a * (g / 2 + w / 24 * (5 - s + 9 * m + 4 * m ** 2) + P / 720 * (61 - 58 * s + l + 600 * m - 330 * O)));
1731
- return t.north || (de += 1e7), [I, de];
1731
+ i = st(i, Nn, Tn), e < ur ? e = ur : e > hr && (e = hr);
1732
+ const r = Ge(e), n = Math.sin(r), o = Math.cos(r), a = n / o, s = a * a, l = s * s, c = Ge(i), d = Ur(t.number), u = Ge(d), h = Oe / Math.sqrt(1 - S * n ** 2), m = O * o ** 2, p = o * st(c - u, -Math.PI, Math.PI), g = p * p, f = g * p, _ = f * p, v = _ * p, E = v * p, z = Oe * (Vr * r - Pn * Math.sin(2 * r) + $n * Math.sin(4 * r) - An * Math.sin(6 * r)), G = Te * h * (p + f / 6 * (1 - s + m) + v / 120 * (5 - 18 * s + l + 72 * m - 58 * O)) + 5e5;
1733
+ let de = Te * (z + h * a * (g / 2 + _ / 24 * (5 - s + 9 * m + 4 * m ** 2) + E / 720 * (61 - 58 * s + l + 600 * m - 330 * O)));
1734
+ return t.north || (de += 1e7), [G, de];
1732
1735
  }
1733
1736
  function Ur(i) {
1734
1737
  return (i - 1) * 6 - 180 + 3;
@@ -1752,7 +1755,7 @@ function Yr(i) {
1752
1755
  let t = 0, r = !1;
1753
1756
  return e > 32700 && e < 32761 ? t = e - 32700 : e > 32600 && e < 32661 && (r = !0, t = e - 32600), t ? { number: t, north: r } : null;
1754
1757
  }
1755
- function hr(i, e) {
1758
+ function mr(i, e) {
1756
1759
  return function(t, r, n, o) {
1757
1760
  const a = t.length;
1758
1761
  n = n > 1 ? n : 2, o = o ?? n, r || (n > 2 ? r = t.slice() : r = new Array(a));
@@ -1764,17 +1767,17 @@ function hr(i, e) {
1764
1767
  };
1765
1768
  }
1766
1769
  function jn(i) {
1767
- return Yr(i) ? new _t({ code: i, units: "m" }) : null;
1770
+ return Yr(i) ? new wt({ code: i, units: "m" }) : null;
1768
1771
  }
1769
1772
  function Vn(i) {
1770
1773
  const e = Yr(i.getCode());
1771
1774
  return e ? {
1772
- forward: hr(On, e),
1773
- inverse: hr(Rn, e)
1775
+ forward: mr(On, e),
1776
+ inverse: mr(Rn, e)
1774
1777
  } : null;
1775
1778
  }
1776
1779
  const Un = [Vn], Yn = [jn];
1777
- function Ct(i, e) {
1780
+ function St(i, e) {
1778
1781
  if (e !== void 0) {
1779
1782
  for (let t = 0, r = i.length; t < r; ++t)
1780
1783
  e[t] = i[t];
@@ -1783,11 +1786,11 @@ function Ct(i, e) {
1783
1786
  e = i.slice();
1784
1787
  return e;
1785
1788
  }
1786
- function lt(i) {
1787
- Pn(i.getCode(), i), ye(i, i, Ct);
1789
+ function ct(i) {
1790
+ En(i.getCode(), i), ye(i, i, St);
1788
1791
  }
1789
1792
  function Xn(i) {
1790
- i.forEach(lt);
1793
+ i.forEach(ct);
1791
1794
  }
1792
1795
  function C(i) {
1793
1796
  if (typeof i != "string")
@@ -1802,10 +1805,10 @@ function C(i) {
1802
1805
  }
1803
1806
  return null;
1804
1807
  }
1805
- function mr(i) {
1808
+ function pr(i) {
1806
1809
  Xn(i), i.forEach(function(e) {
1807
1810
  i.forEach(function(t) {
1808
- e !== t && ye(e, t, Ct);
1811
+ e !== t && ye(e, t, St);
1809
1812
  });
1810
1813
  });
1811
1814
  }
@@ -1820,7 +1823,7 @@ function qn(i, e) {
1820
1823
  if (i === e)
1821
1824
  return !0;
1822
1825
  const t = i.getUnits() === e.getUnits();
1823
- return (i.getCode() === e.getCode() || Xr(i, e) === Ct) && t;
1826
+ return (i.getCode() === e.getCode() || Xr(i, e) === St) && t;
1824
1827
  }
1825
1828
  function Xr(i, e) {
1826
1829
  const t = i.getCode(), r = e.getCode();
@@ -1853,21 +1856,21 @@ function Xr(i, e) {
1853
1856
  l
1854
1857
  ));
1855
1858
  }
1856
- return n && (lt(i), lt(e), ye(i, e, n)), n;
1859
+ return n && (ct(i), ct(e), ye(i, e, n)), n;
1857
1860
  }
1858
1861
  function it(i, e) {
1859
1862
  return function(t, r, n, o) {
1860
1863
  return r = i(t, r, n, o), e(r, r, n, o);
1861
1864
  };
1862
1865
  }
1863
- function ct(i, e) {
1866
+ function dt(i, e) {
1864
1867
  const t = C(i), r = C(e);
1865
1868
  return Xr(t, r);
1866
1869
  }
1867
1870
  function Jn() {
1868
- mr(ar), mr(lr), Bn(
1869
- lr,
1870
- ar,
1871
+ pr(sr), pr(cr), Bn(
1872
+ cr,
1873
+ sr,
1871
1874
  wn,
1872
1875
  zn
1873
1876
  );
@@ -1926,10 +1929,10 @@ function Kn(i, e, t, r, n, o, a) {
1926
1929
  }
1927
1930
  return a && a.length != s && (a.length = s), a;
1928
1931
  }
1929
- const pr = Br(), Dn = [NaN, NaN];
1930
- class Wr extends Lr {
1932
+ const gr = Br(), Dn = [NaN, NaN];
1933
+ class Wr extends Ir {
1931
1934
  constructor() {
1932
- super(), this.extent_ = yt(), this.extentRevision_ = -1, this.simplifiedGeometryMaxMinSquaredTolerance = 0, this.simplifiedGeometryRevision = 0, this.simplifyTransformedInternal = Ar(
1935
+ super(), this.extent_ = vt(), this.extentRevision_ = -1, this.simplifiedGeometryMaxMinSquaredTolerance = 0, this.simplifiedGeometryRevision = 0, this.simplifyTransformedInternal = Ar(
1933
1936
  (e, t, r) => {
1934
1937
  if (!r)
1935
1938
  return this.getSimplifiedGeometry(t);
@@ -1958,7 +1961,7 @@ class Wr extends Lr {
1958
1961
  * @return {!Geometry} Clone.
1959
1962
  */
1960
1963
  clone() {
1961
- return f();
1964
+ return b();
1962
1965
  }
1963
1966
  /**
1964
1967
  * @abstract
@@ -1969,7 +1972,7 @@ class Wr extends Lr {
1969
1972
  * @return {number} Minimum squared distance.
1970
1973
  */
1971
1974
  closestPointXY(e, t, r, n) {
1972
- return f();
1975
+ return b();
1973
1976
  }
1974
1977
  /**
1975
1978
  * @param {number} x X.
@@ -2007,7 +2010,7 @@ class Wr extends Lr {
2007
2010
  * @return {import("../extent.js").Extent} extent Extent.
2008
2011
  */
2009
2012
  computeExtent(e) {
2010
- return f();
2013
+ return b();
2011
2014
  }
2012
2015
  /**
2013
2016
  * Get the extent of the geometry.
@@ -2018,7 +2021,7 @@ class Wr extends Lr {
2018
2021
  getExtent(e) {
2019
2022
  if (this.extentRevision_ != this.getRevision()) {
2020
2023
  const t = this.computeExtent(this.extent_);
2021
- (isNaN(t[0]) || isNaN(t[1])) && vt(t), this.extentRevision_ = this.getRevision();
2024
+ (isNaN(t[0]) || isNaN(t[1])) && xt(t), this.extentRevision_ = this.getRevision();
2022
2025
  }
2023
2026
  return bn(this.extent_, e);
2024
2027
  }
@@ -2031,7 +2034,7 @@ class Wr extends Lr {
2031
2034
  * @api
2032
2035
  */
2033
2036
  rotate(e, t) {
2034
- f();
2037
+ b();
2035
2038
  }
2036
2039
  /**
2037
2040
  * Scale the geometry (with an optional origin). This modifies the geometry
@@ -2044,7 +2047,7 @@ class Wr extends Lr {
2044
2047
  * @api
2045
2048
  */
2046
2049
  scale(e, t, r) {
2047
- f();
2050
+ b();
2048
2051
  }
2049
2052
  /**
2050
2053
  * Create a simplified version of this geometry. For linestrings, this uses
@@ -2067,7 +2070,7 @@ class Wr extends Lr {
2067
2070
  * @return {Geometry} Simplified geometry.
2068
2071
  */
2069
2072
  getSimplifiedGeometry(e) {
2070
- return f();
2073
+ return b();
2071
2074
  }
2072
2075
  /**
2073
2076
  * Get the type of this geometry.
@@ -2075,7 +2078,7 @@ class Wr extends Lr {
2075
2078
  * @return {Type} Geometry type.
2076
2079
  */
2077
2080
  getType() {
2078
- return f();
2081
+ return b();
2079
2082
  }
2080
2083
  /**
2081
2084
  * Apply a transform function to the coordinates of the geometry.
@@ -2087,7 +2090,7 @@ class Wr extends Lr {
2087
2090
  * Called with a flat array of geometry coordinates.
2088
2091
  */
2089
2092
  applyTransform(e) {
2090
- f();
2093
+ b();
2091
2094
  }
2092
2095
  /**
2093
2096
  * Test if the geometry and the passed extent intersect.
@@ -2096,7 +2099,7 @@ class Wr extends Lr {
2096
2099
  * @return {boolean} `true` if the geometry and the extent intersect.
2097
2100
  */
2098
2101
  intersectsExtent(e) {
2099
- return f();
2102
+ return b();
2100
2103
  }
2101
2104
  /**
2102
2105
  * Translate the geometry. This modifies the geometry coordinates in place. If
@@ -2107,7 +2110,7 @@ class Wr extends Lr {
2107
2110
  * @api
2108
2111
  */
2109
2112
  translate(e, t) {
2110
- f();
2113
+ b();
2111
2114
  }
2112
2115
  /**
2113
2116
  * Transform each coordinate of the geometry from one coordinate reference
@@ -2128,7 +2131,7 @@ class Wr extends Lr {
2128
2131
  const r = C(e), n = r.getUnits() == "tile-pixels" ? function(o, a, s) {
2129
2132
  const l = r.getExtent(), c = r.getWorldExtent(), d = Ne(c) / Ne(l);
2130
2133
  qr(
2131
- pr,
2134
+ gr,
2132
2135
  c[0],
2133
2136
  c[3],
2134
2137
  d,
@@ -2142,11 +2145,11 @@ class Wr extends Lr {
2142
2145
  0,
2143
2146
  o.length,
2144
2147
  s,
2145
- pr,
2148
+ gr,
2146
2149
  a
2147
- ), h = ct(r, t);
2150
+ ), h = dt(r, t);
2148
2151
  return h ? h(u, u, s) : u;
2149
- } : ct(r, t);
2152
+ } : dt(r, t);
2150
2153
  return this.applyTransform(n), this;
2151
2154
  }
2152
2155
  }
@@ -2161,7 +2164,7 @@ class Z extends Wr {
2161
2164
  * @override
2162
2165
  */
2163
2166
  computeExtent(e) {
2164
- return xt(
2167
+ return kt(
2165
2168
  this.flatCoordinates,
2166
2169
  0,
2167
2170
  this.flatCoordinates.length,
@@ -2174,7 +2177,7 @@ class Z extends Wr {
2174
2177
  * @return {Array<*> | null} Coordinates.
2175
2178
  */
2176
2179
  getCoordinates() {
2177
- return f();
2180
+ return b();
2178
2181
  }
2179
2182
  /**
2180
2183
  * Return the first coordinate of the geometry.
@@ -2239,7 +2242,7 @@ class Z extends Wr {
2239
2242
  * @param {Array<number>} flatCoordinates Flat coordinates.
2240
2243
  */
2241
2244
  setFlatCoordinates(e, t) {
2242
- this.stride = gr(e), this.layout = e, this.flatCoordinates = t;
2245
+ this.stride = fr(e), this.layout = e, this.flatCoordinates = t;
2243
2246
  }
2244
2247
  /**
2245
2248
  * @abstract
@@ -2247,7 +2250,7 @@ class Z extends Wr {
2247
2250
  * @param {import("./Geometry.js").GeometryLayout} [layout] Layout.
2248
2251
  */
2249
2252
  setCoordinates(e, t) {
2250
- f();
2253
+ b();
2251
2254
  }
2252
2255
  /**
2253
2256
  * @param {import("./Geometry.js").GeometryLayout|undefined} layout Layout.
@@ -2258,7 +2261,7 @@ class Z extends Wr {
2258
2261
  setLayout(e, t, r) {
2259
2262
  let n;
2260
2263
  if (e)
2261
- n = gr(e);
2264
+ n = fr(e);
2262
2265
  else {
2263
2266
  for (let o = 0; o < r; ++o) {
2264
2267
  if (t.length === 0) {
@@ -2369,7 +2372,7 @@ function K(i) {
2369
2372
  return i == 2 ? e = "XY" : i == 3 ? e = "XYZ" : i == 4 && (e = "XYZM"), /** @type {import("./Geometry.js").GeometryLayout} */
2370
2373
  e;
2371
2374
  }
2372
- function gr(i) {
2375
+ function fr(i) {
2373
2376
  let e;
2374
2377
  return i == "XY" ? e = 2 : i == "XYZ" || i == "XYM" ? e = 3 : i == "XYZM" && (e = 4), /** @type {number} */
2375
2378
  e;
@@ -2387,7 +2390,7 @@ function qe(i, e, t, r) {
2387
2390
  }
2388
2391
  return e;
2389
2392
  }
2390
- function Pe(i, e, t, r, n) {
2393
+ function Ee(i, e, t, r, n) {
2391
2394
  n = n || [];
2392
2395
  let o = 0;
2393
2396
  for (let a = 0, s = t.length; a < s; ++a) {
@@ -2405,7 +2408,7 @@ function Zr(i, e, t, r, n) {
2405
2408
  n = n || [];
2406
2409
  let o = 0;
2407
2410
  for (let a = 0, s = t.length; a < s; ++a) {
2408
- const l = Pe(
2411
+ const l = Ee(
2409
2412
  i,
2410
2413
  e,
2411
2414
  t[a],
@@ -2418,10 +2421,10 @@ function Zr(i, e, t, r, n) {
2418
2421
  }
2419
2422
  function Kr(i, e, t, r) {
2420
2423
  const n = [];
2421
- let o = yt();
2424
+ let o = vt();
2422
2425
  for (let a = 0, s = t.length; a < s; ++a) {
2423
2426
  const l = t[a];
2424
- o = xt(
2427
+ o = kt(
2425
2428
  i,
2426
2429
  e,
2427
2430
  l[0],
@@ -2457,7 +2460,7 @@ function H(i, e, t, r, n, o) {
2457
2460
  }
2458
2461
  return a !== 0;
2459
2462
  }
2460
- function St(i, e, t, r, n, o) {
2463
+ function Mt(i, e, t, r, n, o) {
2461
2464
  if (t.length === 0 || !H(i, e, t[0], r, n, o))
2462
2465
  return !1;
2463
2466
  for (let a = 1, s = t.length; a < s; ++a)
@@ -2470,33 +2473,33 @@ function to(i, e, t, r, n, o) {
2470
2473
  return !1;
2471
2474
  for (let a = 0, s = t.length; a < s; ++a) {
2472
2475
  const l = t[a];
2473
- if (St(i, e, l, r, n, o))
2476
+ if (Mt(i, e, l, r, n, o))
2474
2477
  return !0;
2475
2478
  e = l[l.length - 1];
2476
2479
  }
2477
2480
  return !1;
2478
2481
  }
2479
- function Mt(i, e, t, r, n, o, a) {
2482
+ function Et(i, e, t, r, n, o, a) {
2480
2483
  let s, l, c, d, u, h, m;
2481
2484
  const p = n[o + 1], g = [];
2482
- for (let v = 0, P = t.length; v < P; ++v) {
2485
+ for (let v = 0, E = t.length; v < E; ++v) {
2483
2486
  const z = t[v];
2484
2487
  for (d = i[z - r], h = i[z - r + 1], s = e; s < z; s += r)
2485
2488
  u = i[s], m = i[s + 1], (p <= h && m <= p || h <= p && p <= m) && (c = (p - h) / (m - h) * (u - d) + d, g.push(c)), d = u, h = m;
2486
2489
  }
2487
- let y = NaN, w = -1 / 0;
2490
+ let f = NaN, _ = -1 / 0;
2488
2491
  for (g.sort($r), d = g[0], s = 1, l = g.length; s < l; ++s) {
2489
2492
  u = g[s];
2490
2493
  const v = Math.abs(u - d);
2491
- v > w && (c = (d + u) / 2, St(i, e, t, r, c, p) && (y = c, w = v)), d = u;
2494
+ v > _ && (c = (d + u) / 2, Mt(i, e, t, r, c, p) && (f = c, _ = v)), d = u;
2492
2495
  }
2493
- return isNaN(y) && (y = n[o]), a ? (a.push(y, p, w), a) : [y, p, w];
2496
+ return isNaN(f) && (f = n[o]), a ? (a.push(f, p, _), a) : [f, p, _];
2494
2497
  }
2495
2498
  function Dr(i, e, t, r, n) {
2496
2499
  let o = [];
2497
2500
  for (let a = 0, s = t.length; a < s; ++a) {
2498
2501
  const l = t[a];
2499
- o = Mt(
2502
+ o = Et(
2500
2503
  i,
2501
2504
  e,
2502
2505
  l,
@@ -2518,19 +2521,19 @@ function He(i, e, t, r, n, o, a) {
2518
2521
  else if (c !== 0) {
2519
2522
  let d = i[e], u = i[e + 1], h = 0;
2520
2523
  const m = [0];
2521
- for (let y = e + r; y < t; y += r) {
2522
- const w = i[y], v = i[y + 1];
2523
- h += Math.sqrt((w - d) * (w - d) + (v - u) * (v - u)), m.push(h), d = w, u = v;
2524
+ for (let f = e + r; f < t; f += r) {
2525
+ const _ = i[f], v = i[f + 1];
2526
+ h += Math.sqrt((_ - d) * (_ - d) + (v - u) * (v - u)), m.push(h), d = _, u = v;
2524
2527
  }
2525
2528
  const p = n * h, g = en(m, p);
2526
2529
  g < 0 ? (l = (p - m[-g - 2]) / (m[-g - 1] - m[-g - 2]), s = e + (-g - 2) * r) : s = e + g * r;
2527
2530
  }
2528
2531
  a = a > 1 ? a : 2, o = o || new Array(a);
2529
2532
  for (let d = 0; d < a; ++d)
2530
- o[d] = s === void 0 ? NaN : l === void 0 ? i[s + d] : kt(i[s + d], i[s + r + d], l);
2533
+ o[d] = s === void 0 ? NaN : l === void 0 ? i[s + d] : _t(i[s + d], i[s + r + d], l);
2531
2534
  return o;
2532
2535
  }
2533
- function dt(i, e, t, r, n, o) {
2536
+ function ut(i, e, t, r, n, o) {
2534
2537
  if (t == e)
2535
2538
  return null;
2536
2539
  let a;
@@ -2552,7 +2555,7 @@ function dt(i, e, t, r, n, o) {
2552
2555
  a = [];
2553
2556
  for (let h = 0; h < r - 1; ++h)
2554
2557
  a.push(
2555
- kt(
2558
+ _t(
2556
2559
  i[(s - 1) * r + h],
2557
2560
  i[s * r + h],
2558
2561
  u
@@ -2562,7 +2565,7 @@ function dt(i, e, t, r, n, o) {
2562
2565
  }
2563
2566
  function ro(i, e, t, r, n, o, a) {
2564
2567
  if (a)
2565
- return dt(
2568
+ return ut(
2566
2569
  i,
2567
2570
  e,
2568
2571
  t[t.length - 1],
@@ -2581,7 +2584,7 @@ function ro(i, e, t, r, n, o, a) {
2581
2584
  if (n < i[e + r - 1])
2582
2585
  return null;
2583
2586
  if (n <= i[d - 1])
2584
- return dt(
2587
+ return ut(
2585
2588
  i,
2586
2589
  e,
2587
2590
  d,
@@ -2611,7 +2614,7 @@ function Pt(i, e, t, r) {
2611
2614
  }
2612
2615
  return n === 0 ? void 0 : n > 0;
2613
2616
  }
2614
- function Et(i, e, t, r, n) {
2617
+ function $t(i, e, t, r, n) {
2615
2618
  n = n !== void 0 ? n : !1;
2616
2619
  for (let o = 0, a = t.length; o < a; ++o) {
2617
2620
  const s = t[o], l = Pt(
@@ -2632,7 +2635,7 @@ function Et(i, e, t, r, n) {
2632
2635
  function Qr(i, e, t, r, n) {
2633
2636
  for (let o = 0, a = t.length; o < a; ++o) {
2634
2637
  const s = t[o];
2635
- if (!Et(i, e, s, r, n))
2638
+ if (!$t(i, e, s, r, n))
2636
2639
  return !1;
2637
2640
  s.length && (e = s[s.length - 1]);
2638
2641
  }
@@ -2651,7 +2654,7 @@ function je(i, e, t, r, n) {
2651
2654
  }
2652
2655
  return e;
2653
2656
  }
2654
- function ut(i, e, t, r, n) {
2657
+ function ht(i, e, t, r, n) {
2655
2658
  for (let o = 0, a = t.length; o < a; ++o)
2656
2659
  e = je(
2657
2660
  i,
@@ -2692,10 +2695,10 @@ function Je(i, e, t, r, n, o, a) {
2692
2695
  for (; c.length > 0; ) {
2693
2696
  const u = c.pop(), h = c.pop();
2694
2697
  let m = 0;
2695
- const p = i[h], g = i[h + 1], y = i[u], w = i[u + 1];
2698
+ const p = i[h], g = i[h + 1], f = i[u], _ = i[u + 1];
2696
2699
  for (let v = h + r; v < u; v += r) {
2697
- const P = i[v], z = i[v + 1], I = vn(P, z, p, g, y, w);
2698
- I > m && (d = v, m = I);
2700
+ const E = i[v], z = i[v + 1], G = vn(E, z, p, g, f, _);
2701
+ G > m && (d = v, m = G);
2699
2702
  }
2700
2703
  m > n && (l[(d - e) / r] = 1, h + r < d && c.push(h, d), d + r < u && c.push(d, u));
2701
2704
  }
@@ -2735,8 +2738,8 @@ function oo(i, e, t, r, n, o, a) {
2735
2738
  const u = Q(i[e], n), h = Q(i[e + 1], n);
2736
2739
  if (e += r, u == c && h == d)
2737
2740
  continue;
2738
- const m = c - s, p = d - l, g = u - s, y = h - l;
2739
- if (m * y == p * g && (m < 0 && g < m || m == g || m > 0 && g > m) && (p < 0 && y < p || p == y || p > 0 && y > p)) {
2741
+ const m = c - s, p = d - l, g = u - s, f = h - l;
2742
+ if (m * f == p * g && (m < 0 && g < m || m == g || m > 0 && g > m) && (p < 0 && f < p || p == f || p > 0 && f > p)) {
2740
2743
  c = u, d = h;
2741
2744
  continue;
2742
2745
  }
@@ -2744,7 +2747,7 @@ function oo(i, e, t, r, n, o, a) {
2744
2747
  }
2745
2748
  return o[a++] = c, o[a++] = d, a;
2746
2749
  }
2747
- function $t(i, e, t, r, n, o, a, s) {
2750
+ function At(i, e, t, r, n, o, a, s) {
2748
2751
  for (let l = 0, c = t.length; l < c; ++l) {
2749
2752
  const d = t[l];
2750
2753
  a = oo(
@@ -2762,7 +2765,7 @@ function $t(i, e, t, r, n, o, a, s) {
2762
2765
  function ao(i, e, t, r, n, o, a, s) {
2763
2766
  for (let l = 0, c = t.length; l < c; ++l) {
2764
2767
  const d = t[l], u = [];
2765
- a = $t(
2768
+ a = At(
2766
2769
  i,
2767
2770
  e,
2768
2771
  d,
@@ -2795,7 +2798,7 @@ class Y extends Wr {
2795
2798
  const e = this.geometries_;
2796
2799
  for (let t = 0, r = e.length; t < r; ++t)
2797
2800
  this.changeEventsKeys_.push(
2798
- be(e[t], bt.CHANGE, this.changed, this)
2801
+ be(e[t], yt.CHANGE, this.changed, this)
2799
2802
  );
2800
2803
  }
2801
2804
  /**
@@ -2851,7 +2854,7 @@ class Y extends Wr {
2851
2854
  * @override
2852
2855
  */
2853
2856
  computeExtent(e) {
2854
- vt(e);
2857
+ xt(e);
2855
2858
  const t = this.geometries_;
2856
2859
  for (let r = 0, n = t.length; r < n; ++r)
2857
2860
  cn(e, t[r].getExtent());
@@ -3045,7 +3048,7 @@ function so(i, e, t, r) {
3045
3048
  }
3046
3049
  return n;
3047
3050
  }
3048
- function fr(i, e, t, r, n, o, a) {
3051
+ function br(i, e, t, r, n, o, a) {
3049
3052
  const s = i[e], l = i[e + 1], c = i[t] - s, d = i[t + 1] - l;
3050
3053
  let u;
3051
3054
  if (c === 0 && d === 0)
@@ -3056,7 +3059,7 @@ function fr(i, e, t, r, n, o, a) {
3056
3059
  u = t;
3057
3060
  else if (h > 0) {
3058
3061
  for (let m = 0; m < r; ++m)
3059
- a[m] = kt(
3062
+ a[m] = _t(
3060
3063
  i[e + m],
3061
3064
  i[t + m],
3062
3065
  h
@@ -3070,7 +3073,7 @@ function fr(i, e, t, r, n, o, a) {
3070
3073
  a[h] = i[u + h];
3071
3074
  a.length = r;
3072
3075
  }
3073
- function At(i, e, t, r, n) {
3076
+ function Ft(i, e, t, r, n) {
3074
3077
  let o = i[e], a = i[e + 1];
3075
3078
  for (e += r; e < t; e += r) {
3076
3079
  const s = i[e], l = i[e + 1], c = V(o, a, s, l);
@@ -3078,17 +3081,17 @@ function At(i, e, t, r, n) {
3078
3081
  }
3079
3082
  return n;
3080
3083
  }
3081
- function Ft(i, e, t, r, n) {
3084
+ function Lt(i, e, t, r, n) {
3082
3085
  for (let o = 0, a = t.length; o < a; ++o) {
3083
3086
  const s = t[o];
3084
- n = At(i, e, s, r, n), e = s;
3087
+ n = Ft(i, e, s, r, n), e = s;
3085
3088
  }
3086
3089
  return n;
3087
3090
  }
3088
3091
  function lo(i, e, t, r, n) {
3089
3092
  for (let o = 0, a = t.length; o < a; ++o) {
3090
3093
  const s = t[o];
3091
- n = Ft(i, e, s, r, n), e = s[s.length - 1];
3094
+ n = Lt(i, e, s, r, n), e = s[s.length - 1];
3092
3095
  }
3093
3096
  return n;
3094
3097
  }
@@ -3112,7 +3115,7 @@ function Gt(i, e, t, r, n, o, a, s, l, c, d) {
3112
3115
  d = d || [NaN, NaN];
3113
3116
  let m = e + r;
3114
3117
  for (; m < t; )
3115
- if (fr(
3118
+ if (br(
3116
3119
  i,
3117
3120
  m - r,
3118
3121
  m,
@@ -3129,7 +3132,7 @@ function Gt(i, e, t, r, n, o, a, s, l, c, d) {
3129
3132
  (Math.sqrt(h) - Math.sqrt(c)) / n | 0,
3130
3133
  1
3131
3134
  );
3132
- if (o && (fr(
3135
+ if (o && (br(
3133
3136
  i,
3134
3137
  t - r,
3135
3138
  e,
@@ -3191,7 +3194,7 @@ function We(i, e, t, r, n) {
3191
3194
  n[o++] = i.slice(a, a + r);
3192
3195
  return n.length = o, n;
3193
3196
  }
3194
- function Lt(i, e, t, r, n) {
3197
+ function Rt(i, e, t, r, n) {
3195
3198
  n = n !== void 0 ? n : [];
3196
3199
  let o = 0;
3197
3200
  for (let a = 0, s = t.length; a < s; ++a) {
@@ -3211,7 +3214,7 @@ function uo(i, e, t, r, n) {
3211
3214
  let o = 0;
3212
3215
  for (let a = 0, s = t.length; a < s; ++a) {
3213
3216
  const l = t[a];
3214
- n[o++] = l.length === 1 && l[0] === e ? [] : Lt(
3217
+ n[o++] = l.length === 1 && l[0] === e ? [] : Rt(
3215
3218
  i,
3216
3219
  e,
3217
3220
  l,
@@ -3257,7 +3260,7 @@ class ve extends Z {
3257
3260
  */
3258
3261
  closestPointXY(e, t, r, n) {
3259
3262
  return n < W(this.getExtent(), e, t) ? n : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt(
3260
- At(
3263
+ Ft(
3261
3264
  this.flatCoordinates,
3262
3265
  0,
3263
3266
  this.flatCoordinates.length,
@@ -3368,7 +3371,7 @@ function ii(i, e, t, r, n) {
3368
3371
  return !1;
3369
3372
  }
3370
3373
  function Ze(i, e, t, r, n, o) {
3371
- return o = o ?? Or(yt(), i, e, t, r), fn(n, o) ? o[0] >= n[0] && o[2] <= n[2] || o[1] >= n[1] && o[3] <= n[3] ? !0 : ii(
3374
+ return o = o ?? Or(vt(), i, e, t, r), fn(n, o) ? o[0] >= n[0] && o[2] <= n[2] || o[1] >= n[1] && o[3] <= n[3] ? !0 : ii(
3372
3375
  i,
3373
3376
  e,
3374
3377
  t,
@@ -3510,7 +3513,7 @@ class X extends Z {
3510
3513
  */
3511
3514
  closestPointXY(e, t, r, n) {
3512
3515
  return n < W(this.getExtent(), e, t) ? n : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt(
3513
- At(
3516
+ Ft(
3514
3517
  this.flatCoordinates,
3515
3518
  0,
3516
3519
  this.flatCoordinates.length,
@@ -3565,7 +3568,7 @@ class X extends Z {
3565
3568
  * @api
3566
3569
  */
3567
3570
  getCoordinateAtM(e, t) {
3568
- return this.layout != "XYM" && this.layout != "XYZM" ? null : (t = t !== void 0 ? t : !1, dt(
3571
+ return this.layout != "XYM" && this.layout != "XYZM" ? null : (t = t !== void 0 ? t : !1, ut(
3569
3572
  this.flatCoordinates,
3570
3573
  0,
3571
3574
  this.flatCoordinates.length,
@@ -3758,7 +3761,7 @@ class xe extends Z {
3758
3761
  */
3759
3762
  closestPointXY(e, t, r, n) {
3760
3763
  return n < W(this.getExtent(), e, t) ? n : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt(
3761
- Ft(
3764
+ Lt(
3762
3765
  this.flatCoordinates,
3763
3766
  0,
3764
3767
  this.ends_,
@@ -3818,7 +3821,7 @@ class xe extends Z {
3818
3821
  * @override
3819
3822
  */
3820
3823
  getCoordinates() {
3821
- return Lt(
3824
+ return Rt(
3822
3825
  this.flatCoordinates,
3823
3826
  0,
3824
3827
  this.ends_,
@@ -3935,7 +3938,7 @@ class xe extends Z {
3935
3938
  */
3936
3939
  setCoordinates(e, t) {
3937
3940
  this.setLayout(t, e, 2), this.flatCoordinates || (this.flatCoordinates = []);
3938
- const r = Pe(
3941
+ const r = Ee(
3939
3942
  this.flatCoordinates,
3940
3943
  0,
3941
3944
  e,
@@ -4038,7 +4041,7 @@ class B extends Z {
4038
4041
  ), this.changed();
4039
4042
  }
4040
4043
  }
4041
- class Ee extends Z {
4044
+ class Pe extends Z {
4042
4045
  /**
4043
4046
  * @param {Array<import("../coordinate.js").Coordinate>|Array<number>} coordinates Coordinates.
4044
4047
  * For internal use, flat coordinates in combination with `layout` are also accepted.
@@ -4070,7 +4073,7 @@ class Ee extends Z {
4070
4073
  * @override
4071
4074
  */
4072
4075
  clone() {
4073
- const e = new Ee(
4076
+ const e = new Pe(
4074
4077
  this.flatCoordinates.slice(),
4075
4078
  this.layout
4076
4079
  );
@@ -4243,7 +4246,7 @@ class q extends Z {
4243
4246
  */
4244
4247
  closestPointXY(e, t, r, n) {
4245
4248
  return n < W(this.getExtent(), e, t) ? n : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt(
4246
- Ft(
4249
+ Lt(
4247
4250
  this.flatCoordinates,
4248
4251
  0,
4249
4252
  this.ends_,
@@ -4270,7 +4273,7 @@ class q extends Z {
4270
4273
  * @override
4271
4274
  */
4272
4275
  containsXY(e, t) {
4273
- return St(
4276
+ return Mt(
4274
4277
  this.getOrientedFlatCoordinates(),
4275
4278
  0,
4276
4279
  this.ends_,
@@ -4308,7 +4311,7 @@ class q extends Z {
4308
4311
  */
4309
4312
  getCoordinates(e) {
4310
4313
  let t;
4311
- return e !== void 0 ? (t = this.getOrientedFlatCoordinates().slice(), je(t, 0, this.ends_, this.stride, e)) : t = this.flatCoordinates, Lt(t, 0, this.ends_, this.stride);
4314
+ return e !== void 0 ? (t = this.getOrientedFlatCoordinates().slice(), je(t, 0, this.ends_, this.stride, e)) : t = this.flatCoordinates, Rt(t, 0, this.ends_, this.stride);
4312
4315
  }
4313
4316
  /**
4314
4317
  * @return {Array<number>} Ends.
@@ -4322,7 +4325,7 @@ class q extends Z {
4322
4325
  getFlatInteriorPoint() {
4323
4326
  if (this.flatInteriorPointRevision_ != this.getRevision()) {
4324
4327
  const e = Ye(this.getExtent());
4325
- this.flatInteriorPoint_ = Mt(
4328
+ this.flatInteriorPoint_ = Et(
4326
4329
  this.getOrientedFlatCoordinates(),
4327
4330
  0,
4328
4331
  this.ends_,
@@ -4397,7 +4400,7 @@ class q extends Z {
4397
4400
  getOrientedFlatCoordinates() {
4398
4401
  if (this.orientedRevision_ != this.getRevision()) {
4399
4402
  const e = this.flatCoordinates;
4400
- Et(e, 0, this.ends_, this.stride) ? this.orientedFlatCoordinates_ = e : (this.orientedFlatCoordinates_ = e.slice(), this.orientedFlatCoordinates_.length = je(
4403
+ $t(e, 0, this.ends_, this.stride) ? this.orientedFlatCoordinates_ = e : (this.orientedFlatCoordinates_ = e.slice(), this.orientedFlatCoordinates_.length = je(
4401
4404
  this.orientedFlatCoordinates_,
4402
4405
  0,
4403
4406
  this.ends_,
@@ -4417,7 +4420,7 @@ class q extends Z {
4417
4420
  */
4418
4421
  getSimplifiedGeometryInternal(e) {
4419
4422
  const t = [], r = [];
4420
- return t.length = $t(
4423
+ return t.length = At(
4421
4424
  this.flatCoordinates,
4422
4425
  0,
4423
4426
  this.ends_,
@@ -4462,7 +4465,7 @@ class q extends Z {
4462
4465
  */
4463
4466
  setCoordinates(e, t) {
4464
4467
  this.setLayout(t, e, 2), this.flatCoordinates || (this.flatCoordinates = []);
4465
- const r = Pe(
4468
+ const r = Ee(
4466
4469
  this.flatCoordinates,
4467
4470
  0,
4468
4471
  e,
@@ -4612,7 +4615,7 @@ class ke extends Z {
4612
4615
  */
4613
4616
  getCoordinates(e) {
4614
4617
  let t;
4615
- return e !== void 0 ? (t = this.getOrientedFlatCoordinates().slice(), ut(
4618
+ return e !== void 0 ? (t = this.getOrientedFlatCoordinates().slice(), ht(
4616
4619
  t,
4617
4620
  0,
4618
4621
  this.endss_,
@@ -4662,7 +4665,7 @@ class ke extends Z {
4662
4665
  * @api
4663
4666
  */
4664
4667
  getInteriorPoints() {
4665
- return new Ee(this.getFlatInteriorPoints().slice(), "XYM");
4668
+ return new Pe(this.getFlatInteriorPoints().slice(), "XYM");
4666
4669
  }
4667
4670
  /**
4668
4671
  * @return {Array<number>} Oriented flat coordinates.
@@ -4670,7 +4673,7 @@ class ke extends Z {
4670
4673
  getOrientedFlatCoordinates() {
4671
4674
  if (this.orientedRevision_ != this.getRevision()) {
4672
4675
  const e = this.flatCoordinates;
4673
- Qr(e, 0, this.endss_, this.stride) ? this.orientedFlatCoordinates_ = e : (this.orientedFlatCoordinates_ = e.slice(), this.orientedFlatCoordinates_.length = ut(
4676
+ Qr(e, 0, this.endss_, this.stride) ? this.orientedFlatCoordinates_ = e : (this.orientedFlatCoordinates_ = e.slice(), this.orientedFlatCoordinates_.length = ht(
4674
4677
  this.orientedFlatCoordinates_,
4675
4678
  0,
4676
4679
  this.endss_,
@@ -4799,7 +4802,7 @@ class ke extends Z {
4799
4802
  this.changed();
4800
4803
  }
4801
4804
  }
4802
- const br = Br();
4805
+ const yr = Br();
4803
4806
  class J {
4804
4807
  /**
4805
4808
  * @param {Type} type Geometry type.
@@ -4828,7 +4831,7 @@ class J {
4828
4831
  * @api
4829
4832
  */
4830
4833
  getExtent() {
4831
- return this.extent_ || (this.extent_ = this.type_ === "Point" ? Tr(this.flatCoordinates_) : xt(
4834
+ return this.extent_ || (this.extent_ = this.type_ === "Point" ? Tr(this.flatCoordinates_) : kt(
4832
4835
  this.flatCoordinates_,
4833
4836
  0,
4834
4837
  this.flatCoordinates_.length,
@@ -4841,7 +4844,7 @@ class J {
4841
4844
  getFlatInteriorPoint() {
4842
4845
  if (!this.flatInteriorPoints_) {
4843
4846
  const e = Ye(this.getExtent());
4844
- this.flatInteriorPoints_ = Mt(
4847
+ this.flatInteriorPoints_ = Et(
4845
4848
  this.flatCoordinates_,
4846
4849
  0,
4847
4850
  this.ends_,
@@ -4986,7 +4989,7 @@ class J {
4986
4989
  if (t && r) {
4987
4990
  const n = Ne(r) / Ne(t);
4988
4991
  qr(
4989
- br,
4992
+ yr,
4990
4993
  r[0],
4991
4994
  r[3],
4992
4995
  n,
@@ -4999,7 +5002,7 @@ class J {
4999
5002
  0,
5000
5003
  this.flatCoordinates_.length,
5001
5004
  2,
5002
- br,
5005
+ yr,
5003
5006
  this.flatCoordinates_
5004
5007
  );
5005
5008
  }
@@ -5070,7 +5073,7 @@ class J {
5070
5073
  );
5071
5074
  break;
5072
5075
  case "Polygon":
5073
- n = [], r.length = $t(
5076
+ n = [], r.length = At(
5074
5077
  r,
5075
5078
  0,
5076
5079
  this.simplifiedGeometry_.ends_,
@@ -5140,7 +5143,7 @@ class oi {
5140
5143
  * @return {Type} The format type.
5141
5144
  */
5142
5145
  getType() {
5143
- return f();
5146
+ return b();
5144
5147
  }
5145
5148
  /**
5146
5149
  * Read a single feature from a source.
@@ -5151,7 +5154,7 @@ class oi {
5151
5154
  * @return {FeatureType|Array<FeatureType>} Feature.
5152
5155
  */
5153
5156
  readFeature(e, t) {
5154
- return f();
5157
+ return b();
5155
5158
  }
5156
5159
  /**
5157
5160
  * Read all features from a source.
@@ -5162,7 +5165,7 @@ class oi {
5162
5165
  * @return {Array<FeatureType>} Features.
5163
5166
  */
5164
5167
  readFeatures(e, t) {
5165
- return f();
5168
+ return b();
5166
5169
  }
5167
5170
  /**
5168
5171
  * Read a single geometry from a source.
@@ -5173,7 +5176,7 @@ class oi {
5173
5176
  * @return {import("../geom/Geometry.js").default} Geometry.
5174
5177
  */
5175
5178
  readGeometry(e, t) {
5176
- return f();
5179
+ return b();
5177
5180
  }
5178
5181
  /**
5179
5182
  * Read the projection from a source.
@@ -5183,7 +5186,7 @@ class oi {
5183
5186
  * @return {import("../proj/Projection.js").default|undefined} Projection.
5184
5187
  */
5185
5188
  readProjection(e) {
5186
- return f();
5189
+ return b();
5187
5190
  }
5188
5191
  /**
5189
5192
  * Encode a feature in this format.
@@ -5194,7 +5197,7 @@ class oi {
5194
5197
  * @return {string|ArrayBuffer} Result.
5195
5198
  */
5196
5199
  writeFeature(e, t) {
5197
- return f();
5200
+ return b();
5198
5201
  }
5199
5202
  /**
5200
5203
  * Encode an array of features in this format.
@@ -5205,7 +5208,7 @@ class oi {
5205
5208
  * @return {string|ArrayBuffer} Result.
5206
5209
  */
5207
5210
  writeFeatures(e, t) {
5208
- return f();
5211
+ return b();
5209
5212
  }
5210
5213
  /**
5211
5214
  * Write a single geometry in this format.
@@ -5216,7 +5219,7 @@ class oi {
5216
5219
  * @return {string|ArrayBuffer} Result.
5217
5220
  */
5218
5221
  writeGeometry(e, t) {
5219
- return f();
5222
+ return b();
5220
5223
  }
5221
5224
  }
5222
5225
  function _e(i, e, t) {
@@ -5226,7 +5229,7 @@ function _e(i, e, t) {
5226
5229
  e && (o = /** @type {T} */
5227
5230
  i.clone());
5228
5231
  const a = e ? r : n, s = e ? n : r;
5229
- a.getUnits() === "tile-pixels" ? o.transform(a, s) : o.applyTransform(ct(a, s));
5232
+ a.getUnits() === "tile-pixels" ? o.transform(a, s) : o.applyTransform(dt(a, s));
5230
5233
  }
5231
5234
  if (e && t && /** @type {WriteOptions} */
5232
5235
  t.decimals !== void 0) {
@@ -5248,12 +5251,12 @@ const fo = {
5248
5251
  Point: B,
5249
5252
  LineString: X,
5250
5253
  Polygon: q,
5251
- MultiPoint: Ee,
5254
+ MultiPoint: Pe,
5252
5255
  MultiLineString: xe,
5253
5256
  MultiPolygon: ke
5254
5257
  };
5255
5258
  function bo(i, e, t) {
5256
- return Array.isArray(e[0]) ? (Qr(i, 0, e, t) || (i = i.slice(), ut(i, 0, e, t)), i) : (Et(i, 0, e, t) || (i = i.slice(), je(i, 0, e, t)), i);
5259
+ return Array.isArray(e[0]) ? (Qr(i, 0, e, t) || (i = i.slice(), ht(i, 0, e, t)), i) : ($t(i, 0, e, t) || (i = i.slice(), je(i, 0, e, t)), i);
5257
5260
  }
5258
5261
  function ai(i, e) {
5259
5262
  var o;
@@ -5279,12 +5282,12 @@ function ai(i, e) {
5279
5282
  e
5280
5283
  );
5281
5284
  }
5282
- function Rt(i, e) {
5285
+ function Nt(i, e) {
5283
5286
  if (!i)
5284
5287
  return null;
5285
5288
  if (Array.isArray(i)) {
5286
5289
  const r = i.map(
5287
- (n) => Rt(n, e)
5290
+ (n) => Nt(n, e)
5288
5291
  );
5289
5292
  return new Y(r);
5290
5293
  }
@@ -5346,7 +5349,7 @@ class yo extends oi {
5346
5349
  * @return {FeatureType|Array<FeatureType>} Feature.
5347
5350
  */
5348
5351
  readFeatureFromObject(e, t) {
5349
- return f();
5352
+ return b();
5350
5353
  }
5351
5354
  /**
5352
5355
  * @abstract
@@ -5356,7 +5359,7 @@ class yo extends oi {
5356
5359
  * @return {Array<FeatureType>} Features.
5357
5360
  */
5358
5361
  readFeaturesFromObject(e, t) {
5359
- return f();
5362
+ return b();
5360
5363
  }
5361
5364
  /**
5362
5365
  * Read a geometry.
@@ -5381,7 +5384,7 @@ class yo extends oi {
5381
5384
  * @return {import("../geom/Geometry.js").default} Geometry.
5382
5385
  */
5383
5386
  readGeometryFromObject(e, t) {
5384
- return f();
5387
+ return b();
5385
5388
  }
5386
5389
  /**
5387
5390
  * Read the projection.
@@ -5401,7 +5404,7 @@ class yo extends oi {
5401
5404
  * @return {import("../proj/Projection.js").default} Projection.
5402
5405
  */
5403
5406
  readProjectionFromObject(e) {
5404
- return f();
5407
+ return b();
5405
5408
  }
5406
5409
  /**
5407
5410
  * Encode a feature as string.
@@ -5422,7 +5425,7 @@ class yo extends oi {
5422
5425
  * @return {Object} Object.
5423
5426
  */
5424
5427
  writeFeatureObject(e, t) {
5425
- return f();
5428
+ return b();
5426
5429
  }
5427
5430
  /**
5428
5431
  * Encode an array of features as string.
@@ -5443,7 +5446,7 @@ class yo extends oi {
5443
5446
  * @return {Object} Object.
5444
5447
  */
5445
5448
  writeFeaturesObject(e, t) {
5446
- return f();
5449
+ return b();
5447
5450
  }
5448
5451
  /**
5449
5452
  * Encode a geometry as string.
@@ -5464,7 +5467,7 @@ class yo extends oi {
5464
5467
  * @return {Object} Object.
5465
5468
  */
5466
5469
  writeGeometryObject(e, t) {
5467
- return f();
5470
+ return b();
5468
5471
  }
5469
5472
  }
5470
5473
  function Ae(i) {
@@ -5504,7 +5507,7 @@ class vo extends yo {
5504
5507
  ),
5505
5508
  properties: null
5506
5509
  };
5507
- const n = Nt(r.geometry);
5510
+ const n = Tt(r.geometry);
5508
5511
  if (this.featureClass === J)
5509
5512
  return (
5510
5513
  /** @type {FeatureType|Array<FeatureType>} */
@@ -5518,7 +5521,7 @@ class vo extends yo {
5518
5521
  )
5519
5522
  );
5520
5523
  const o = new le();
5521
- return this.geometryName_ ? o.setGeometryName(this.geometryName_) : this.extractGeometryName_ && r.geometry_name && o.setGeometryName(r.geometry_name), o.setGeometry(Rt(n, t)), "id" in r && o.setId(r.id), r.properties && o.setProperties(r.properties, !0), /** @type {FeatureType|Array<FeatureType>} */
5524
+ return this.geometryName_ ? o.setGeometryName(this.geometryName_) : this.extractGeometryName_ && r.geometry_name && o.setGeometryName(r.geometry_name), o.setGeometry(Nt(n, t)), "id" in r && o.setId(r.id), r.properties && o.setProperties(r.properties, !0), /** @type {FeatureType|Array<FeatureType>} */
5522
5525
  o;
5523
5526
  }
5524
5527
  /**
@@ -5607,7 +5610,7 @@ class vo extends yo {
5607
5610
  if (n !== void 0 && (r.id = n), !e.hasProperties())
5608
5611
  return r;
5609
5612
  const o = e.getProperties(), a = e.getGeometry();
5610
- return a && (r.geometry = ht(a, t), delete o[e.getGeometryName()]), Gr(o) || (r.properties = o), r;
5613
+ return a && (r.geometry = mt(a, t), delete o[e.getGeometryName()]), Lr(o) || (r.properties = o), r;
5611
5614
  }
5612
5615
  /**
5613
5616
  * Encode an array of features as a GeoJSON object.
@@ -5638,10 +5641,10 @@ class vo extends yo {
5638
5641
  * @override
5639
5642
  */
5640
5643
  writeGeometryObject(e, t) {
5641
- return ht(e, this.adaptOptions(t));
5644
+ return mt(e, this.adaptOptions(t));
5642
5645
  }
5643
5646
  }
5644
- function Nt(i, e) {
5647
+ function Tt(i, e) {
5645
5648
  if (!i)
5646
5649
  return null;
5647
5650
  let t;
@@ -5701,8 +5704,8 @@ function Nt(i, e) {
5701
5704
  return t;
5702
5705
  }
5703
5706
  function xo(i, e) {
5704
- const t = Nt(i);
5705
- return Rt(t, e);
5707
+ const t = Tt(i);
5708
+ return Nt(t, e);
5706
5709
  }
5707
5710
  function ko(i, e) {
5708
5711
  return i.geometries.map(
@@ -5711,7 +5714,7 @@ function ko(i, e) {
5711
5714
  * @return {import("./Feature.js").GeometryObject} geometry Geometry.
5712
5715
  */
5713
5716
  function(r) {
5714
- return Nt(r);
5717
+ return Tt(r);
5715
5718
  }
5716
5719
  );
5717
5720
  }
@@ -5735,7 +5738,7 @@ function wo(i) {
5735
5738
  }
5736
5739
  function zo(i) {
5737
5740
  var o, a;
5738
- const e = i.coordinates, t = ((a = (o = e[0]) == null ? void 0 : o[0]) == null ? void 0 : a.length) || 2, r = [], n = Pe(r, 0, e, t);
5741
+ const e = i.coordinates, t = ((a = (o = e[0]) == null ? void 0 : o[0]) == null ? void 0 : a.length) || 2, r = [], n = Ee(r, 0, e, t);
5739
5742
  return {
5740
5743
  type: "MultiLineString",
5741
5744
  flatCoordinates: r,
@@ -5769,7 +5772,7 @@ function So(i) {
5769
5772
  }
5770
5773
  function Mo(i) {
5771
5774
  var o, a;
5772
- const e = i.coordinates, t = [], r = (a = (o = e[0]) == null ? void 0 : o[0]) == null ? void 0 : a.length, n = Pe(t, 0, e, r);
5775
+ const e = i.coordinates, t = [], r = (a = (o = e[0]) == null ? void 0 : o[0]) == null ? void 0 : a.length, n = Ee(t, 0, e, r);
5773
5776
  return {
5774
5777
  type: "Polygon",
5775
5778
  flatCoordinates: t,
@@ -5777,27 +5780,27 @@ function Mo(i) {
5777
5780
  layout: K(r)
5778
5781
  };
5779
5782
  }
5780
- function ht(i, e) {
5783
+ function mt(i, e) {
5781
5784
  i = _e(i, !0, e);
5782
5785
  const t = i.getType();
5783
5786
  let r;
5784
5787
  switch (t) {
5785
5788
  case "Point": {
5786
- r = Go(
5789
+ r = Lo(
5787
5790
  /** @type {import("../geom/Point.js").default} */
5788
5791
  i
5789
5792
  );
5790
5793
  break;
5791
5794
  }
5792
5795
  case "LineString": {
5793
- r = Eo(
5796
+ r = Po(
5794
5797
  /** @type {import("../geom/LineString.js").default} */
5795
5798
  i
5796
5799
  );
5797
5800
  break;
5798
5801
  }
5799
5802
  case "Polygon": {
5800
- r = Io(
5803
+ r = Go(
5801
5804
  /** @type {import("../geom/Polygon.js").default} */
5802
5805
  i,
5803
5806
  e
@@ -5827,7 +5830,7 @@ function ht(i, e) {
5827
5830
  break;
5828
5831
  }
5829
5832
  case "GeometryCollection": {
5830
- r = Po(
5833
+ r = Eo(
5831
5834
  /** @type {import("../geom/GeometryCollection.js").default} */
5832
5835
  i,
5833
5836
  e
@@ -5846,15 +5849,15 @@ function ht(i, e) {
5846
5849
  }
5847
5850
  return r;
5848
5851
  }
5849
- function Po(i, e) {
5852
+ function Eo(i, e) {
5850
5853
  return e = Object.assign({}, e), delete e.featureProjection, {
5851
5854
  type: "GeometryCollection",
5852
5855
  geometries: i.getGeometriesArray().map(function(r) {
5853
- return ht(r, e);
5856
+ return mt(r, e);
5854
5857
  })
5855
5858
  };
5856
5859
  }
5857
- function Eo(i, e) {
5860
+ function Po(i, e) {
5858
5861
  return {
5859
5862
  type: "LineString",
5860
5863
  coordinates: i.getCoordinates()
@@ -5879,20 +5882,20 @@ function Fo(i, e) {
5879
5882
  coordinates: i.getCoordinates(t)
5880
5883
  };
5881
5884
  }
5882
- function Go(i, e) {
5885
+ function Lo(i, e) {
5883
5886
  return {
5884
5887
  type: "Point",
5885
5888
  coordinates: i.getCoordinates()
5886
5889
  };
5887
5890
  }
5888
- function Io(i, e) {
5891
+ function Go(i, e) {
5889
5892
  let t;
5890
5893
  return e && (t = e.rightHanded), {
5891
5894
  type: "Polygon",
5892
5895
  coordinates: i.getCoordinates(t)
5893
5896
  };
5894
5897
  }
5895
- const Lo = (i, e) => new vo().writeFeaturesObject(i, e);
5898
+ const Io = (i, e) => new vo().writeFeaturesObject(i, e);
5896
5899
  class Ro extends oi {
5897
5900
  constructor() {
5898
5901
  super();
@@ -5927,7 +5930,7 @@ class Ro extends oi {
5927
5930
  * @return {import("../Feature.js").default} Feature.
5928
5931
  */
5929
5932
  readFeatureFromText(e, t) {
5930
- return f();
5933
+ return b();
5931
5934
  }
5932
5935
  /**
5933
5936
  * Read the features from the source.
@@ -5952,7 +5955,7 @@ class Ro extends oi {
5952
5955
  * @return {Array<import("../Feature.js").default>} Features.
5953
5956
  */
5954
5957
  readFeaturesFromText(e, t) {
5955
- return f();
5958
+ return b();
5956
5959
  }
5957
5960
  /**
5958
5961
  * Read the geometry from the source.
@@ -5977,7 +5980,7 @@ class Ro extends oi {
5977
5980
  * @return {import("../geom/Geometry.js").default} Geometry.
5978
5981
  */
5979
5982
  readGeometryFromText(e, t) {
5980
- return f();
5983
+ return b();
5981
5984
  }
5982
5985
  /**
5983
5986
  * Read the projection from the source.
@@ -6018,7 +6021,7 @@ class Ro extends oi {
6018
6021
  * @return {string} Text.
6019
6022
  */
6020
6023
  writeFeatureText(e, t) {
6021
- return f();
6024
+ return b();
6022
6025
  }
6023
6026
  /**
6024
6027
  * Encode an array of features as string.
@@ -6040,7 +6043,7 @@ class Ro extends oi {
6040
6043
  * @return {string} Text.
6041
6044
  */
6042
6045
  writeFeaturesText(e, t) {
6043
- return f();
6046
+ return b();
6044
6047
  }
6045
6048
  /**
6046
6049
  * Write a single geometry.
@@ -6062,7 +6065,7 @@ class Ro extends oi {
6062
6065
  * @return {string} Text.
6063
6066
  */
6064
6067
  writeGeometryText(e, t) {
6065
- return f();
6068
+ return b();
6066
6069
  }
6067
6070
  }
6068
6071
  function Fe(i) {
@@ -6072,10 +6075,10 @@ const No = {
6072
6075
  POINT: B,
6073
6076
  LINESTRING: X,
6074
6077
  POLYGON: q,
6075
- MULTIPOINT: Ee,
6078
+ MULTIPOINT: Pe,
6076
6079
  MULTILINESTRING: xe,
6077
6080
  MULTIPOLYGON: ke
6078
- }, si = "EMPTY", li = "Z", ci = "M", To = "ZM", b = {
6081
+ }, si = "EMPTY", li = "Z", ci = "M", To = "ZM", y = {
6079
6082
  START: 0,
6080
6083
  TEXT: 1,
6081
6084
  LEFT_PAREN: 2,
@@ -6142,20 +6145,20 @@ class Ho {
6142
6145
  const e = this.nextChar_(), t = this.index_;
6143
6146
  let r = e, n;
6144
6147
  if (e == "(")
6145
- n = b.LEFT_PAREN;
6148
+ n = y.LEFT_PAREN;
6146
6149
  else if (e == ",")
6147
- n = b.COMMA;
6150
+ n = y.COMMA;
6148
6151
  else if (e == ")")
6149
- n = b.RIGHT_PAREN;
6152
+ n = y.RIGHT_PAREN;
6150
6153
  else if (this.isNumeric_(e) || e == "-")
6151
- n = b.NUMBER, r = this.readNumber_();
6154
+ n = y.NUMBER, r = this.readNumber_();
6152
6155
  else if (this.isAlpha_(e))
6153
- n = b.TEXT, r = this.readText_();
6156
+ n = y.TEXT, r = this.readText_();
6154
6157
  else {
6155
6158
  if (this.isWhiteSpace_(e))
6156
6159
  return this.nextToken();
6157
6160
  if (e === "")
6158
- n = b.EOF;
6161
+ n = y.EOF;
6159
6162
  else
6160
6163
  throw new Error("Unexpected character: " + e);
6161
6164
  }
@@ -6198,7 +6201,7 @@ class jo {
6198
6201
  constructor(e) {
6199
6202
  this.lexer_ = e, this.token_ = {
6200
6203
  position: 0,
6201
- type: b.START
6204
+ type: y.START
6202
6205
  }, this.layout_ = "XY";
6203
6206
  }
6204
6207
  /**
@@ -6240,7 +6243,7 @@ class jo {
6240
6243
  parseGeometryLayout_() {
6241
6244
  let e = "XY";
6242
6245
  const t = this.token_;
6243
- if (this.isTokenType(b.TEXT)) {
6246
+ if (this.isTokenType(y.TEXT)) {
6244
6247
  const r = t.value;
6245
6248
  r === li ? e = "XYZ" : r === ci ? e = "XYM" : r === To && (e = "XYZM"), e !== "XY" && this.consume_();
6246
6249
  }
@@ -6251,12 +6254,12 @@ class jo {
6251
6254
  * @private
6252
6255
  */
6253
6256
  parseGeometryCollectionText_() {
6254
- if (this.match(b.LEFT_PAREN)) {
6257
+ if (this.match(y.LEFT_PAREN)) {
6255
6258
  const e = [];
6256
6259
  do
6257
6260
  e.push(this.parseGeometry_());
6258
- while (this.match(b.COMMA));
6259
- if (this.match(b.RIGHT_PAREN))
6261
+ while (this.match(y.COMMA));
6262
+ if (this.match(y.RIGHT_PAREN))
6260
6263
  return e;
6261
6264
  }
6262
6265
  throw new Error(this.formatErrorMessage_());
@@ -6266,9 +6269,9 @@ class jo {
6266
6269
  * @private
6267
6270
  */
6268
6271
  parsePointText_() {
6269
- if (this.match(b.LEFT_PAREN)) {
6272
+ if (this.match(y.LEFT_PAREN)) {
6270
6273
  const e = this.parsePoint_();
6271
- if (this.match(b.RIGHT_PAREN))
6274
+ if (this.match(y.RIGHT_PAREN))
6272
6275
  return e;
6273
6276
  }
6274
6277
  throw new Error(this.formatErrorMessage_());
@@ -6278,9 +6281,9 @@ class jo {
6278
6281
  * @private
6279
6282
  */
6280
6283
  parseLineStringText_() {
6281
- if (this.match(b.LEFT_PAREN)) {
6284
+ if (this.match(y.LEFT_PAREN)) {
6282
6285
  const e = this.parsePointList_();
6283
- if (this.match(b.RIGHT_PAREN))
6286
+ if (this.match(y.RIGHT_PAREN))
6284
6287
  return e;
6285
6288
  }
6286
6289
  throw new Error(this.formatErrorMessage_());
@@ -6290,9 +6293,9 @@ class jo {
6290
6293
  * @private
6291
6294
  */
6292
6295
  parsePolygonText_() {
6293
- if (this.match(b.LEFT_PAREN)) {
6296
+ if (this.match(y.LEFT_PAREN)) {
6294
6297
  const e = this.parseLineStringTextList_();
6295
- if (this.match(b.RIGHT_PAREN))
6298
+ if (this.match(y.RIGHT_PAREN))
6296
6299
  return e;
6297
6300
  }
6298
6301
  throw new Error(this.formatErrorMessage_());
@@ -6302,9 +6305,9 @@ class jo {
6302
6305
  * @private
6303
6306
  */
6304
6307
  parseMultiPointText_() {
6305
- if (this.match(b.LEFT_PAREN)) {
6308
+ if (this.match(y.LEFT_PAREN)) {
6306
6309
  let e;
6307
- if (this.token_.type == b.LEFT_PAREN ? e = this.parsePointTextList_() : e = this.parsePointList_(), this.match(b.RIGHT_PAREN))
6310
+ if (this.token_.type == y.LEFT_PAREN ? e = this.parsePointTextList_() : e = this.parsePointList_(), this.match(y.RIGHT_PAREN))
6308
6311
  return e;
6309
6312
  }
6310
6313
  throw new Error(this.formatErrorMessage_());
@@ -6315,9 +6318,9 @@ class jo {
6315
6318
  * @private
6316
6319
  */
6317
6320
  parseMultiLineStringText_() {
6318
- if (this.match(b.LEFT_PAREN)) {
6321
+ if (this.match(y.LEFT_PAREN)) {
6319
6322
  const e = this.parseLineStringTextList_();
6320
- if (this.match(b.RIGHT_PAREN))
6323
+ if (this.match(y.RIGHT_PAREN))
6321
6324
  return e;
6322
6325
  }
6323
6326
  throw new Error(this.formatErrorMessage_());
@@ -6327,9 +6330,9 @@ class jo {
6327
6330
  * @private
6328
6331
  */
6329
6332
  parseMultiPolygonText_() {
6330
- if (this.match(b.LEFT_PAREN)) {
6333
+ if (this.match(y.LEFT_PAREN)) {
6331
6334
  const e = this.parsePolygonTextList_();
6332
- if (this.match(b.RIGHT_PAREN))
6335
+ if (this.match(y.RIGHT_PAREN))
6333
6336
  return e;
6334
6337
  }
6335
6338
  throw new Error(this.formatErrorMessage_());
@@ -6342,7 +6345,7 @@ class jo {
6342
6345
  const e = [], t = this.layout_.length;
6343
6346
  for (let r = 0; r < t; ++r) {
6344
6347
  const n = this.token_;
6345
- if (this.match(b.NUMBER))
6348
+ if (this.match(y.NUMBER))
6346
6349
  e.push(
6347
6350
  /** @type {number} */
6348
6351
  n.value
@@ -6360,7 +6363,7 @@ class jo {
6360
6363
  */
6361
6364
  parsePointList_() {
6362
6365
  const e = [this.parsePoint_()];
6363
- for (; this.match(b.COMMA); )
6366
+ for (; this.match(y.COMMA); )
6364
6367
  e.push(this.parsePoint_());
6365
6368
  return e;
6366
6369
  }
@@ -6370,7 +6373,7 @@ class jo {
6370
6373
  */
6371
6374
  parsePointTextList_() {
6372
6375
  const e = [this.parsePointText_()];
6373
- for (; this.match(b.COMMA); )
6376
+ for (; this.match(y.COMMA); )
6374
6377
  e.push(this.parsePointText_());
6375
6378
  return e;
6376
6379
  }
@@ -6380,7 +6383,7 @@ class jo {
6380
6383
  */
6381
6384
  parseLineStringTextList_() {
6382
6385
  const e = [this.parseLineStringText_()];
6383
- for (; this.match(b.COMMA); )
6386
+ for (; this.match(y.COMMA); )
6384
6387
  e.push(this.parseLineStringText_());
6385
6388
  return e;
6386
6389
  }
@@ -6390,7 +6393,7 @@ class jo {
6390
6393
  */
6391
6394
  parsePolygonTextList_() {
6392
6395
  const e = [this.parsePolygonText_()];
6393
- for (; this.match(b.COMMA); )
6396
+ for (; this.match(y.COMMA); )
6394
6397
  e.push(this.parsePolygonText_());
6395
6398
  return e;
6396
6399
  }
@@ -6399,7 +6402,7 @@ class jo {
6399
6402
  * @private
6400
6403
  */
6401
6404
  isEmptyGeometry_() {
6402
- const e = this.isTokenType(b.TEXT) && this.token_.value == si;
6405
+ const e = this.isTokenType(y.TEXT) && this.token_.value == si;
6403
6406
  return e && this.consume_(), e;
6404
6407
  }
6405
6408
  /**
@@ -6416,7 +6419,7 @@ class jo {
6416
6419
  */
6417
6420
  parseGeometry_() {
6418
6421
  const e = this.token_;
6419
- if (this.match(b.TEXT)) {
6422
+ if (this.match(y.TEXT)) {
6420
6423
  const t = (
6421
6424
  /** @type {string} */
6422
6425
  e.value
@@ -6580,7 +6583,7 @@ function Yo(i) {
6580
6583
  e.push(hi(t[r]));
6581
6584
  return e.join(",");
6582
6585
  }
6583
- function Tt(i) {
6586
+ function Ot(i) {
6584
6587
  const e = i.getCoordinates(), t = [];
6585
6588
  for (let r = 0, n = e.length; r < n; ++r)
6586
6589
  t.push(e[r].join(" "));
@@ -6589,13 +6592,13 @@ function Tt(i) {
6589
6592
  function Xo(i) {
6590
6593
  const e = [], t = i.getLineStrings();
6591
6594
  for (let r = 0, n = t.length; r < n; ++r)
6592
- e.push("(" + Tt(t[r]) + ")");
6595
+ e.push("(" + Ot(t[r]) + ")");
6593
6596
  return e.join(",");
6594
6597
  }
6595
6598
  function ui(i) {
6596
6599
  const e = [], t = i.getLinearRings();
6597
6600
  for (let r = 0, n = t.length; r < n; ++r)
6598
- e.push("(" + Tt(t[r]) + ")");
6601
+ e.push("(" + Ot(t[r]) + ")");
6599
6602
  return e.join(",");
6600
6603
  }
6601
6604
  function Bo(i) {
@@ -6611,7 +6614,7 @@ function qo(i) {
6611
6614
  }
6612
6615
  const Jo = {
6613
6616
  Point: di,
6614
- LineString: Tt,
6617
+ LineString: Ot,
6615
6618
  Polygon: ui,
6616
6619
  MultiPoint: Uo,
6617
6620
  MultiLineString: Xo,
@@ -6637,7 +6640,7 @@ const Wo = (i, e) => new Vo().writeFeatures(i, e);
6637
6640
  * Copyright 2021 Google LLC
6638
6641
  * SPDX-License-Identifier: BSD-3-Clause
6639
6642
  */
6640
- function yr(i, e, t) {
6643
+ function ot(i, e, t) {
6641
6644
  return i ? e(i) : t == null ? void 0 : t(i);
6642
6645
  }
6643
6646
  var we, ze;
@@ -6659,7 +6662,7 @@ class mi extends j {
6659
6662
  */
6660
6663
  updateButtonStates() {
6661
6664
  const { drawDisabled: t, discardDisabled: r } = Zi(this);
6662
- E(this, we, t), E(this, ze, r);
6665
+ P(this, we, t), P(this, ze, r);
6663
6666
  }
6664
6667
  /**
6665
6668
  * Overrides createRenderRoot to handle shadow DOM
@@ -6670,13 +6673,13 @@ class mi extends j {
6670
6673
  render() {
6671
6674
  this.updateButtonStates();
6672
6675
  const t = this.currentlyDrawing ? "drawing" : "draw", r = {
6673
- Polygon: k`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
6676
+ Polygon: x`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
6674
6677
  <title>shape-polygon-plus</title>
6675
6678
  <path
6676
6679
  d="M17,15.7V13H19V17L10,21L3,14L7,5H11V7H8.3L5.4,13.6L10.4,18.6L17,15.7M22,5V7H19V10H17V7H14V5H17V2H19V5H22Z"
6677
6680
  />
6678
6681
  </svg>`,
6679
- Point: k`
6682
+ Point: x`
6680
6683
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
6681
6684
  <title>vector-point-plus</title>
6682
6685
  <path
@@ -6684,7 +6687,7 @@ class mi extends j {
6684
6687
  />
6685
6688
  </svg>
6686
6689
  `,
6687
- Circle: k`
6690
+ Circle: x`
6688
6691
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
6689
6692
  <title>shape-circle-plus</title>
6690
6693
  <path
@@ -6692,7 +6695,7 @@ class mi extends j {
6692
6695
  />
6693
6696
  </svg>
6694
6697
  `,
6695
- LineString: k`
6698
+ LineString: x`
6696
6699
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
6697
6700
  <title>vector-polyline-plus</title>
6698
6701
  <path
@@ -6700,7 +6703,7 @@ class mi extends j {
6700
6703
  />
6701
6704
  </svg>
6702
6705
  `,
6703
- Box: k`
6706
+ Box: x`
6704
6707
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
6705
6708
  <title>shape-rectangle-plus</title>
6706
6709
  <path
@@ -6708,7 +6711,7 @@ class mi extends j {
6708
6711
  />
6709
6712
  </svg>
6710
6713
  `
6711
- }, n = k`<svg
6714
+ }, n = x`<svg
6712
6715
  xmlns="http://www.w3.org/2000/svg"
6713
6716
  viewBox="0 0 24 24"
6714
6717
  >
@@ -6716,7 +6719,7 @@ class mi extends j {
6716
6719
  <path
6717
6720
  d="M10.76,8.69A0.76,0.76 0 0,0 10,9.45V20.9C10,21.32 10.34,21.66 10.76,21.66C10.95,21.66 11.11,21.6 11.24,21.5L13.15,19.95L14.81,23.57C14.94,23.84 15.21,24 15.5,24C15.61,24 15.72,24 15.83,23.92L18.59,22.64C18.97,22.46 19.15,22 18.95,21.63L17.28,18L19.69,17.55C19.85,17.5 20,17.43 20.12,17.29C20.39,16.97 20.35,16.5 20,16.21L11.26,8.86L11.25,8.87C11.12,8.76 10.95,8.69 10.76,8.69M15,10V8H20V10H15M13.83,4.76L16.66,1.93L18.07,3.34L15.24,6.17L13.83,4.76M10,0H12V5H10V0M3.93,14.66L6.76,11.83L8.17,13.24L5.34,16.07L3.93,14.66M3.93,3.34L5.34,1.93L8.17,4.76L6.76,6.17L3.93,3.34M7,10H2V8H7V10"
6718
6721
  />
6719
- </svg>`, o = k`<svg
6722
+ </svg>`, o = x`<svg
6720
6723
  xmlns="http://www.w3.org/2000/svg"
6721
6724
  viewBox="0 0 24 24"
6722
6725
  >
@@ -6724,7 +6727,15 @@ class mi extends j {
6724
6727
  <path
6725
6728
  d="M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M7,6H17V19H7V6M9,8V17H11V8H9M13,8V17H15V8H13Z"
6726
6729
  />
6727
- </svg>`, a = k`<svg
6730
+ </svg>`, a = x`<svg
6731
+ xmlns="http://www.w3.org/2000/svg"
6732
+ viewBox="0 0 24 24"
6733
+ >
6734
+ <title>pencil-outline</title>
6735
+ <path
6736
+ d="M14.06,9L15,9.94L5.92,19H5V18.08L14.06,9M17.66,3C17.41,3 17.15,3.1 16.96,3.29L15.13,5.12L18.88,8.87L20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18.17,3.09 17.92,3 17.66,3M14.06,6.19L3,17.25V21H6.75L17.81,9.94L14.06,6.19Z"
6737
+ />
6738
+ </svg>`, s = x`<svg
6728
6739
  xmlns="http://www.w3.org/2000/svg"
6729
6740
  viewBox="0 0 24 24"
6730
6741
  >
@@ -6732,7 +6743,7 @@ class mi extends j {
6732
6743
  <path
6733
6744
  d="M14,12L10,8V11H2V13H10V16M20,18V6C20,4.89 19.1,4 18,4H6A2,2 0 0,0 4,6V9H6V6H18V18H6V15H4V18A2,2 0 0,0 6,20H18A2,2 0 0,0 20,18Z"
6734
6745
  />
6735
- </svg>`, s = k`<svg
6746
+ </svg>`, l = x`<svg
6736
6747
  xmlns="http://www.w3.org/2000/svg"
6737
6748
  viewBox="0 0 24 24"
6738
6749
  >
@@ -6741,7 +6752,7 @@ class mi extends j {
6741
6752
  d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"
6742
6753
  />
6743
6754
  </svg>`;
6744
- return k`
6755
+ return x`
6745
6756
  <nav>
6746
6757
  <slot></slot>
6747
6758
  <div class="max">
@@ -6750,10 +6761,10 @@ class mi extends j {
6750
6761
  data-cy="drawBtn"
6751
6762
  class="transparent square primary-text no-margin small"
6752
6763
  title="${this.unstyled ? this.select ? "Select" : "Draw" : ""}"
6753
- ?disabled="${M(this, we) || x}"
6764
+ ?disabled="${M(this, we) || k}"
6754
6765
  @click="${() => this.drawFunc.start()}"
6755
6766
  >
6756
- ${this.unstyled ? t : k`
6767
+ ${this.unstyled ? t : x`
6757
6768
  <i class="small"
6758
6769
  >${this.select ? n : r[this.type]}</i
6759
6770
  >
@@ -6768,20 +6779,38 @@ class mi extends j {
6768
6779
  data-cy="discardBtn"
6769
6780
  class="transparent square error-text no-margin small"
6770
6781
  title="${this.unstyled ? "Discard" : ""}"
6771
- ?disabled="${M(this, ze) || x}"
6782
+ ?disabled="${M(this, ze) || k}"
6772
6783
  @click="${() => this.drawFunc.discard()}"
6773
6784
  >
6774
- ${this.unstyled ? "discard" : k`
6785
+ ${this.unstyled ? "discard" : x`
6775
6786
  <i class="small">${o}</i>
6776
6787
  <div class="tooltip bottom">Discard</div>
6777
6788
  `}
6778
6789
  </button>
6779
6790
  </div>
6780
6791
 
6792
+ <!-- Editor Button -->
6793
+ ${ot(
6794
+ this.showEditor,
6795
+ () => x`
6796
+ <button
6797
+ data-cy="editorBtn"
6798
+ class="transparent circle primary-text no-margin small"
6799
+ title="${this.unstyled ? "Edit features" : ""}"
6800
+ @click=${() => this.renderRoot.querySelector("#editor").classList.toggle("hidden")}
6801
+ >
6802
+ ${this.unstyled ? "import" : x`
6803
+ <i class="small">${a}</i>
6804
+ <div class="tooltip bottom">Edit features</div>
6805
+ `}
6806
+ </button>
6807
+ `
6808
+ )}
6809
+
6781
6810
  <!-- Import Button -->
6782
- ${yr(
6811
+ ${ot(
6783
6812
  this.importFeatures,
6784
- () => k`
6813
+ () => x`
6785
6814
  <!-- Import Input Field : Hidden -->
6786
6815
  <input
6787
6816
  type="file"
@@ -6800,9 +6829,9 @@ class mi extends j {
6800
6829
  this.querySelector("#import-file").click()
6801
6830
  )}
6802
6831
  >
6803
- ${this.unstyled ? "import" : k`
6804
- <i class="small">${a}</i>
6805
- <div class="tooltip left">Import features</div>
6832
+ ${this.unstyled ? "import" : x`
6833
+ <i class="small">${s}</i>
6834
+ <div class="tooltip bottom">Import features</div>
6806
6835
  `}
6807
6836
  </button>
6808
6837
  `
@@ -6810,13 +6839,13 @@ class mi extends j {
6810
6839
  </nav>
6811
6840
 
6812
6841
  <!-- Geo JSON Wrapper -->
6813
- ${yr(
6842
+ ${ot(
6814
6843
  this.showEditor,
6815
- () => k`
6816
- <div class="field textarea border extra">
6844
+ () => x`
6845
+ <div id="editor" class="field textarea border extra hidden">
6817
6846
  <!-- Geo JSON Editor -->
6818
6847
  <textarea
6819
- style="font-family: monospace"
6848
+ style="font-family: monospace; font-size: small; line-height: 1.4; padding: 0.4rem;"
6820
6849
  @drop=${this.drawFunc.import}
6821
6850
  @input=${this.drawFunc.editor}
6822
6851
  .value=${this.geoJSON}
@@ -6828,8 +6857,8 @@ class mi extends j {
6828
6857
  class="circle absolute bottom right medium-margin"
6829
6858
  @click=${() => Ki(this.geoJSON)}
6830
6859
  >
6831
- ${this.unstyled ? "copy" : k`
6832
- <i class="tiny">${s}</i>
6860
+ ${this.unstyled ? "copy" : x`
6861
+ <i class="tiny">${l}</i>
6833
6862
  <div class="tooltip top">Copy</div>
6834
6863
  `}
6835
6864
  </button>
@@ -6840,7 +6869,7 @@ class mi extends j {
6840
6869
  }
6841
6870
  }
6842
6871
  we = new WeakMap(), ze = new WeakMap(), // Define properties with default values and types
6843
- L(mi, "properties", {
6872
+ I(mi, "properties", {
6844
6873
  multipleFeatures: { attribute: !1, type: Boolean },
6845
6874
  drawnFeatures: { attribute: !1, state: !0, type: Array },
6846
6875
  currentlyDrawing: { attribute: !1, state: !0, type: Boolean },
@@ -6904,6 +6933,9 @@ const Do = `
6904
6933
  padding-left: var(--padding);
6905
6934
  padding-right: var(--padding);
6906
6935
  }
6936
+ .hidden {
6937
+ display: none;
6938
+ }
6907
6939
  `, Qo = (i) => {
6908
6940
  (() => {
6909
6941
  if (i.emitDrawnFeatures(), !i.multipleFeatures)
@@ -6999,7 +7031,7 @@ const Do = `
6999
7031
  /** @type {unknown} */
7000
7032
  r.interactions.drawInteraction, i.modify = /** @type {import("ol/interaction").Modify} */
7001
7033
  /** @type {unknown} */
7002
- r.interactions.drawInteractionmodify, mt(i, r, i.layerId), (d = i.modify) == null || d.on("modifyend", () => i.onModifyEnd()), r.addEventListener("addfeatures", () => Qo(i)), { EoxMap: r, OlMap: n };
7034
+ r.interactions.drawInteractionmodify, pt(i, r, i.layerId), (d = i.modify) == null || d.on("modifyend", () => i.onModifyEnd()), r.addEventListener("addfeatures", () => Qo(i)), { EoxMap: r, OlMap: n };
7003
7035
  }, ta = (i) => {
7004
7036
  const e = () => {
7005
7037
  i.drawnFeatures = [], i.draw.setActive(!1), i.selectionEvents.removeSelectionEvent(), i.drawLayer.getSource().clear(), i.geoJSON = null;
@@ -7018,7 +7050,7 @@ const Do = `
7018
7050
  let a;
7019
7051
  switch (i.format) {
7020
7052
  case "geojson":
7021
- a = Lo(i.drawnFeatures);
7053
+ a = Io(i.drawnFeatures);
7022
7054
  break;
7023
7055
  case "wkt":
7024
7056
  a = Wo(i.drawnFeatures);
@@ -7045,7 +7077,7 @@ const Do = `
7045
7077
  const n = (o = i.eoxMap.selectInteractions) == null ? void 0 : o.SelectLayerHoverInteraction;
7046
7078
  n && (n.selectedFids = [], n.setActive(!1)), i.eoxMap.removeEventListener("select", e);
7047
7079
  } };
7048
- }, mt = (i, e, t) => {
7080
+ }, pt = (i, e, t) => {
7049
7081
  var l, c;
7050
7082
  if (!t || !e)
7051
7083
  return;
@@ -7104,7 +7136,7 @@ function gi(i, e, t) {
7104
7136
  const na = (i, e, t, r) => {
7105
7137
  if (e) {
7106
7138
  if (t) {
7107
- r && t !== r && xr(i, e), mt(i, e, t);
7139
+ r && t !== r && xr(i, e), pt(i, e, t);
7108
7140
  return;
7109
7141
  }
7110
7142
  if (!t && r) {
@@ -7206,7 +7238,7 @@ class la extends j {
7206
7238
  * @type {boolean}
7207
7239
  */
7208
7240
  set continuous(t) {
7209
- E(this, Se, t), t && (this.multipleFeatures = !0);
7241
+ P(this, Se, t), t && (this.multipleFeatures = !0);
7210
7242
  }
7211
7243
  get continuous() {
7212
7244
  return M(this, Se);
@@ -7216,7 +7248,7 @@ class la extends j {
7216
7248
  * @type {string}
7217
7249
  */
7218
7250
  set layerId(t) {
7219
- na(this, this.eoxMap, t, M(this, oe)), E(this, oe, t);
7251
+ na(this, this.eoxMap, t, M(this, oe)), P(this, oe, t);
7220
7252
  }
7221
7253
  get layerId() {
7222
7254
  return M(this, oe);
@@ -7241,7 +7273,7 @@ class la extends j {
7241
7273
  */
7242
7274
  handleFeatureChange(t, r = !1, n = !0) {
7243
7275
  this.eoxMap.parseTextToFeature(
7244
- t || JSON.stringify(er),
7276
+ t || JSON.stringify(tr),
7245
7277
  this.drawLayer,
7246
7278
  this.eoxMap,
7247
7279
  r,
@@ -7268,8 +7300,8 @@ class la extends j {
7268
7300
  * Update #geoJSON with stringify feature.
7269
7301
  */
7270
7302
  updateGeoJSON() {
7271
- E(this, Ce, JSON.stringify(
7272
- this.eoxMap.parseFeature(this.drawnFeatures) || er,
7303
+ P(this, Ce, JSON.stringify(
7304
+ this.eoxMap.parseFeature(this.drawnFeatures) || tr,
7273
7305
  void 0,
7274
7306
  2
7275
7307
  ));
@@ -7295,12 +7327,12 @@ class la extends j {
7295
7327
  */
7296
7328
  firstUpdated() {
7297
7329
  const { EoxMap: t, OlMap: r } = vr(this, this.multipleFeatures);
7298
- this.eoxMap = t, E(this, ne, r), this.selectionEvents = ia(this), this.importFeatures && oa(this, this.eoxMap), this.updateGeoJSON(), this.requestUpdate();
7330
+ this.eoxMap = t, P(this, ne, r), this.selectionEvents = ia(this), this.importFeatures && oa(this, this.eoxMap), this.updateGeoJSON(), this.requestUpdate();
7299
7331
  }
7300
7332
  updated(t) {
7301
7333
  if (t.has("for")) {
7302
7334
  const { EoxMap: r, OlMap: n } = vr(this, this.multipleFeatures);
7303
- this.eoxMap = r, E(this, ne, n);
7335
+ this.eoxMap = r, P(this, ne, n);
7304
7336
  }
7305
7337
  }
7306
7338
  get eoxMap() {
@@ -7308,7 +7340,7 @@ class la extends j {
7308
7340
  }
7309
7341
  set eoxMap(t) {
7310
7342
  const r = M(this, ie);
7311
- E(this, ie, t), this.requestUpdate("eoxMap", r);
7343
+ P(this, ie, t), this.requestUpdate("eoxMap", r);
7312
7344
  }
7313
7345
  disconnectedCallback() {
7314
7346
  var t;
@@ -7317,7 +7349,7 @@ class la extends j {
7317
7349
  // Render method for UI display
7318
7350
  render() {
7319
7351
  var t;
7320
- return k`
7352
+ return x`
7321
7353
  <style>
7322
7354
  :host { display: block; }
7323
7355
  ${!this.unstyled && Do}
@@ -7349,7 +7381,7 @@ class la extends j {
7349
7381
  ></eox-drawtools-controller>
7350
7382
 
7351
7383
  <!-- List Component -->
7352
- ${this.showList && ((t = this.drawnFeatures) != null && t.length) ? k`<eox-drawtools-list
7384
+ ${this.showList && ((t = this.drawnFeatures) != null && t.length) ? x`<eox-drawtools-list
7353
7385
  .eoxDrawTools=${this}
7354
7386
  .eoxMap=${this.eoxMap}
7355
7387
  .olMap=${M(this, ne)}
@@ -7363,7 +7395,7 @@ class la extends j {
7363
7395
  @changed=${() => {
7364
7396
  this.updateGeoJSON(), this.requestUpdate();
7365
7397
  }}
7366
- ></eox-drawtools-list>` : x}
7398
+ ></eox-drawtools-list>` : k}
7367
7399
  `;
7368
7400
  }
7369
7401
  }