@eox/drawtools 0.8.0 → 0.9.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,32 +1,27 @@
1
- var _t = Object.defineProperty;
2
- var xt = (r, t, e) => t in r ? _t(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
3
- var b = (r, t, e) => (xt(r, typeof t != "symbol" ? t + "" : t, e), e), Q = (r, t, e) => {
4
- if (!t.has(r))
5
- throw TypeError("Cannot " + e);
1
+ var At = Object.defineProperty;
2
+ var Q = (i) => {
3
+ throw TypeError(i);
6
4
  };
7
- var g = (r, t, e) => (Q(r, t, "read from private field"), e ? e.call(r) : t.get(r)), S = (r, t, e) => {
8
- if (t.has(r))
9
- throw TypeError("Cannot add the same private member more than once");
10
- t instanceof WeakSet ? t.add(r) : t.set(r, e);
11
- }, E = (r, t, e, i) => (Q(r, t, "write to private field"), i ? i.call(r, e) : t.set(r, e), e);
5
+ var St = (i, t, e) => t in i ? At(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
6
+ var m = (i, t, e) => St(i, typeof t != "symbol" ? t + "" : t, e), X = (i, t, e) => t.has(i) || Q("Cannot " + e);
7
+ var b = (i, t, e) => (X(i, t, "read from private field"), e ? e.call(i) : t.get(i)), S = (i, t, e) => t.has(i) ? Q("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(i) : t.set(i, e), $ = (i, t, e, r) => (X(i, t, "write to private field"), r ? r.call(i, e) : t.set(i, e), e);
12
8
  /**
13
9
  * @license
14
10
  * Copyright 2019 Google LLC
15
11
  * SPDX-License-Identifier: BSD-3-Clause
16
12
  */
17
- const D = globalThis, K = D.ShadowRoot && (D.ShadyCSS === void 0 || D.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, pt = Symbol(), X = /* @__PURE__ */ new WeakMap();
18
- let At = class {
19
- constructor(t, e, i) {
20
- if (this._$cssResult$ = !0, i !== pt)
21
- throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
13
+ const D = globalThis, K = D.ShadowRoot && (D.ShadyCSS === void 0 || D.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, yt = Symbol(), Y = /* @__PURE__ */ new WeakMap();
14
+ let Et = class {
15
+ constructor(t, e, r) {
16
+ if (this._$cssResult$ = !0, r !== yt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
22
17
  this.cssText = t, this.t = e;
23
18
  }
24
19
  get styleSheet() {
25
20
  let t = this.o;
26
21
  const e = this.t;
27
22
  if (K && t === void 0) {
28
- const i = e !== void 0 && e.length === 1;
29
- i && (t = X.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && X.set(e, t));
23
+ const r = e !== void 0 && e.length === 1;
24
+ r && (t = Y.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), r && Y.set(e, t));
30
25
  }
31
26
  return t;
32
27
  }
@@ -34,70 +29,67 @@ let At = class {
34
29
  return this.cssText;
35
30
  }
36
31
  };
37
- const St = (r) => new At(typeof r == "string" ? r : r + "", void 0, pt), Et = (r, t) => {
38
- if (K)
39
- r.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
40
- else
41
- for (const e of t) {
42
- const i = document.createElement("style"), s = D.litNonce;
43
- s !== void 0 && i.setAttribute("nonce", s), i.textContent = e.cssText, r.appendChild(i);
44
- }
45
- }, Y = K ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
32
+ const Ct = (i) => new Et(typeof i == "string" ? i : i + "", void 0, yt), Ft = (i, t) => {
33
+ if (K) i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
34
+ else for (const e of t) {
35
+ const r = document.createElement("style"), s = D.litNonce;
36
+ s !== void 0 && r.setAttribute("nonce", s), r.textContent = e.cssText, i.appendChild(r);
37
+ }
38
+ }, tt = K ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
46
39
  let e = "";
47
- for (const i of t.cssRules)
48
- e += i.cssText;
49
- return St(e);
50
- })(r) : r;
40
+ for (const r of t.cssRules) e += r.cssText;
41
+ return Ct(e);
42
+ })(i) : i;
51
43
  /**
52
44
  * @license
53
45
  * Copyright 2017 Google LLC
54
46
  * SPDX-License-Identifier: BSD-3-Clause
55
47
  */
56
- const { is: Ct, defineProperty: Ft, getOwnPropertyDescriptor: Ht, getOwnPropertyNames: kt, getOwnPropertySymbols: Mt, getPrototypeOf: Ut } = Object, $ = globalThis, tt = $.trustedTypes, Pt = tt ? tt.emptyScript : "", q = $.reactiveElementPolyfillSupport, M = (r, t) => r, Z = { toAttribute(r, t) {
48
+ const { is: Mt, defineProperty: Ht, getOwnPropertyDescriptor: kt, getOwnPropertyNames: Ut, getOwnPropertySymbols: Pt, getPrototypeOf: Ot } = Object, f = globalThis, et = f.trustedTypes, Nt = et ? et.emptyScript : "", q = f.reactiveElementPolyfillSupport, U = (i, t) => i, Z = { toAttribute(i, t) {
57
49
  switch (t) {
58
50
  case Boolean:
59
- r = r ? Pt : null;
51
+ i = i ? Nt : null;
60
52
  break;
61
53
  case Object:
62
54
  case Array:
63
- r = r == null ? r : JSON.stringify(r);
55
+ i = i == null ? i : JSON.stringify(i);
64
56
  }
65
- return r;
66
- }, fromAttribute(r, t) {
67
- let e = r;
57
+ return i;
58
+ }, fromAttribute(i, t) {
59
+ let e = i;
68
60
  switch (t) {
69
61
  case Boolean:
70
- e = r !== null;
62
+ e = i !== null;
71
63
  break;
72
64
  case Number:
73
- e = r === null ? null : Number(r);
65
+ e = i === null ? null : Number(i);
74
66
  break;
75
67
  case Object:
76
68
  case Array:
77
69
  try {
78
- e = JSON.parse(r);
70
+ e = JSON.parse(i);
79
71
  } catch {
80
72
  e = null;
81
73
  }
82
74
  }
83
75
  return e;
84
- } }, ut = (r, t) => !Ct(r, t), et = { attribute: !0, type: String, converter: Z, reflect: !1, hasChanged: ut };
85
- Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), $.litPropertyMetadata ?? ($.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
86
- class C extends HTMLElement {
76
+ } }, gt = (i, t) => !Mt(i, t), it = { attribute: !0, type: String, converter: Z, reflect: !1, hasChanged: gt };
77
+ Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), f.litPropertyMetadata ?? (f.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
78
+ class E extends HTMLElement {
87
79
  static addInitializer(t) {
88
80
  this._$Ei(), (this.l ?? (this.l = [])).push(t);
89
81
  }
90
82
  static get observedAttributes() {
91
83
  return this.finalize(), this._$Eh && [...this._$Eh.keys()];
92
84
  }
93
- static createProperty(t, e = et) {
85
+ static createProperty(t, e = it) {
94
86
  if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
95
- const i = Symbol(), s = this.getPropertyDescriptor(t, i, e);
96
- s !== void 0 && Ft(this.prototype, t, s);
87
+ const r = Symbol(), s = this.getPropertyDescriptor(t, r, e);
88
+ s !== void 0 && Ht(this.prototype, t, s);
97
89
  }
98
90
  }
99
- static getPropertyDescriptor(t, e, i) {
100
- const { get: s, set: n } = Ht(this.prototype, t) ?? { get() {
91
+ static getPropertyDescriptor(t, e, r) {
92
+ const { get: s, set: n } = kt(this.prototype, t) ?? { get() {
101
93
  return this[e];
102
94
  }, set(o) {
103
95
  this[e] = o;
@@ -106,36 +98,31 @@ class C extends HTMLElement {
106
98
  return s == null ? void 0 : s.call(this);
107
99
  }, set(o) {
108
100
  const l = s == null ? void 0 : s.call(this);
109
- n.call(this, o), this.requestUpdate(t, l, i);
101
+ n.call(this, o), this.requestUpdate(t, l, r);
110
102
  }, configurable: !0, enumerable: !0 };
111
103
  }
112
104
  static getPropertyOptions(t) {
113
- return this.elementProperties.get(t) ?? et;
105
+ return this.elementProperties.get(t) ?? it;
114
106
  }
115
107
  static _$Ei() {
116
- if (this.hasOwnProperty(M("elementProperties")))
117
- return;
118
- const t = Ut(this);
108
+ if (this.hasOwnProperty(U("elementProperties"))) return;
109
+ const t = Ot(this);
119
110
  t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
120
111
  }
121
112
  static finalize() {
122
- if (this.hasOwnProperty(M("finalized")))
123
- return;
124
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(M("properties"))) {
125
- const e = this.properties, i = [...kt(e), ...Mt(e)];
126
- for (const s of i)
127
- this.createProperty(s, e[s]);
113
+ if (this.hasOwnProperty(U("finalized"))) return;
114
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(U("properties"))) {
115
+ const e = this.properties, r = [...Ut(e), ...Pt(e)];
116
+ for (const s of r) this.createProperty(s, e[s]);
128
117
  }
129
118
  const t = this[Symbol.metadata];
130
119
  if (t !== null) {
131
120
  const e = litPropertyMetadata.get(t);
132
- if (e !== void 0)
133
- for (const [i, s] of e)
134
- this.elementProperties.set(i, s);
121
+ if (e !== void 0) for (const [r, s] of e) this.elementProperties.set(r, s);
135
122
  }
136
123
  this._$Eh = /* @__PURE__ */ new Map();
137
- for (const [e, i] of this.elementProperties) {
138
- const s = this._$Eu(e, i);
124
+ for (const [e, r] of this.elementProperties) {
125
+ const s = this._$Eu(e, r);
139
126
  s !== void 0 && this._$Eh.set(s, e);
140
127
  }
141
128
  this.elementStyles = this.finalizeStyles(this.styles);
@@ -143,16 +130,14 @@ class C extends HTMLElement {
143
130
  static finalizeStyles(t) {
144
131
  const e = [];
145
132
  if (Array.isArray(t)) {
146
- const i = new Set(t.flat(1 / 0).reverse());
147
- for (const s of i)
148
- e.unshift(Y(s));
149
- } else
150
- t !== void 0 && e.push(Y(t));
133
+ const r = new Set(t.flat(1 / 0).reverse());
134
+ for (const s of r) e.unshift(tt(s));
135
+ } else t !== void 0 && e.push(tt(t));
151
136
  return e;
152
137
  }
153
138
  static _$Eu(t, e) {
154
- const i = e.attribute;
155
- return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0;
139
+ const r = e.attribute;
140
+ return r === !1 ? void 0 : typeof r == "string" ? r : typeof t == "string" ? t.toLowerCase() : void 0;
156
141
  }
157
142
  constructor() {
158
143
  super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
@@ -171,19 +156,18 @@ class C extends HTMLElement {
171
156
  }
172
157
  _$E_() {
173
158
  const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
174
- for (const i of e.keys())
175
- this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
159
+ for (const r of e.keys()) this.hasOwnProperty(r) && (t.set(r, this[r]), delete this[r]);
176
160
  t.size > 0 && (this._$Ep = t);
177
161
  }
178
162
  createRenderRoot() {
179
163
  const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
180
- return Et(t, this.constructor.elementStyles), t;
164
+ return Ft(t, this.constructor.elementStyles), t;
181
165
  }
182
166
  connectedCallback() {
183
167
  var t;
184
168
  this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$EO) == null || t.forEach((e) => {
185
- var i;
186
- return (i = e.hostConnected) == null ? void 0 : i.call(e);
169
+ var r;
170
+ return (r = e.hostConnected) == null ? void 0 : r.call(e);
187
171
  });
188
172
  }
189
173
  enableUpdating(t) {
@@ -191,39 +175,38 @@ class C extends HTMLElement {
191
175
  disconnectedCallback() {
192
176
  var t;
193
177
  (t = this._$EO) == null || t.forEach((e) => {
194
- var i;
195
- return (i = e.hostDisconnected) == null ? void 0 : i.call(e);
178
+ var r;
179
+ return (r = e.hostDisconnected) == null ? void 0 : r.call(e);
196
180
  });
197
181
  }
198
- attributeChangedCallback(t, e, i) {
199
- this._$AK(t, i);
182
+ attributeChangedCallback(t, e, r) {
183
+ this._$AK(t, r);
200
184
  }
201
185
  _$EC(t, e) {
202
186
  var n;
203
- const i = this.constructor.elementProperties.get(t), s = this.constructor._$Eu(t, i);
204
- if (s !== void 0 && i.reflect === !0) {
205
- const o = (((n = i.converter) == null ? void 0 : n.toAttribute) !== void 0 ? i.converter : Z).toAttribute(e, i.type);
187
+ const r = this.constructor.elementProperties.get(t), s = this.constructor._$Eu(t, r);
188
+ if (s !== void 0 && r.reflect === !0) {
189
+ const o = (((n = r.converter) == null ? void 0 : n.toAttribute) !== void 0 ? r.converter : Z).toAttribute(e, r.type);
206
190
  this._$Em = t, o == null ? this.removeAttribute(s) : this.setAttribute(s, o), this._$Em = null;
207
191
  }
208
192
  }
209
193
  _$AK(t, e) {
210
194
  var n;
211
- const i = this.constructor, s = i._$Eh.get(t);
195
+ const r = this.constructor, s = r._$Eh.get(t);
212
196
  if (s !== void 0 && this._$Em !== s) {
213
- const o = i.getPropertyOptions(s), l = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((n = o.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? o.converter : Z;
197
+ const o = r.getPropertyOptions(s), l = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((n = o.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? o.converter : Z;
214
198
  this._$Em = s, this[s] = l.fromAttribute(e, o.type), this._$Em = null;
215
199
  }
216
200
  }
217
- requestUpdate(t, e, i) {
201
+ requestUpdate(t, e, r) {
218
202
  if (t !== void 0) {
219
- if (i ?? (i = this.constructor.getPropertyOptions(t)), !(i.hasChanged ?? ut)(this[t], e))
220
- return;
221
- this.P(t, e, i);
203
+ if (r ?? (r = this.constructor.getPropertyOptions(t)), !(r.hasChanged ?? gt)(this[t], e)) return;
204
+ this.P(t, e, r);
222
205
  }
223
206
  this.isUpdatePending === !1 && (this._$ES = this._$ET());
224
207
  }
225
- P(t, e, i) {
226
- this._$AL.has(t) || this._$AL.set(t, e), i.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
208
+ P(t, e, r) {
209
+ this._$AL.has(t) || this._$AL.set(t, e), r.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
227
210
  }
228
211
  async _$ET() {
229
212
  this.isUpdatePending = !0;
@@ -239,24 +222,20 @@ class C extends HTMLElement {
239
222
  return this.performUpdate();
240
223
  }
241
224
  performUpdate() {
242
- var i;
243
- if (!this.isUpdatePending)
244
- return;
225
+ var r;
226
+ if (!this.isUpdatePending) return;
245
227
  if (!this.hasUpdated) {
246
228
  if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
247
- for (const [n, o] of this._$Ep)
248
- this[n] = o;
229
+ for (const [n, o] of this._$Ep) this[n] = o;
249
230
  this._$Ep = void 0;
250
231
  }
251
232
  const s = this.constructor.elementProperties;
252
- if (s.size > 0)
253
- for (const [n, o] of s)
254
- o.wrapped !== !0 || this._$AL.has(n) || this[n] === void 0 || this.P(n, this[n], o);
233
+ if (s.size > 0) for (const [n, o] of s) o.wrapped !== !0 || this._$AL.has(n) || this[n] === void 0 || this.P(n, this[n], o);
255
234
  }
256
235
  let t = !1;
257
236
  const e = this._$AL;
258
237
  try {
259
- t = this.shouldUpdate(e), t ? (this.willUpdate(e), (i = this._$EO) == null || i.forEach((s) => {
238
+ t = this.shouldUpdate(e), t ? (this.willUpdate(e), (r = this._$EO) == null || r.forEach((s) => {
260
239
  var n;
261
240
  return (n = s.hostUpdate) == null ? void 0 : n.call(s);
262
241
  }), this.update(e)) : this._$EU();
@@ -269,9 +248,9 @@ class C extends HTMLElement {
269
248
  }
270
249
  _$AE(t) {
271
250
  var e;
272
- (e = this._$EO) == null || e.forEach((i) => {
251
+ (e = this._$EO) == null || e.forEach((r) => {
273
252
  var s;
274
- return (s = i.hostUpdated) == null ? void 0 : s.call(i);
253
+ return (s = r.hostUpdated) == null ? void 0 : s.call(r);
275
254
  }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
276
255
  }
277
256
  _$EU() {
@@ -294,86 +273,76 @@ class C extends HTMLElement {
294
273
  firstUpdated(t) {
295
274
  }
296
275
  }
297
- C.elementStyles = [], C.shadowRootOptions = { mode: "open" }, C[M("elementProperties")] = /* @__PURE__ */ new Map(), C[M("finalized")] = /* @__PURE__ */ new Map(), q == null || q({ ReactiveElement: C }), ($.reactiveElementVersions ?? ($.reactiveElementVersions = [])).push("2.0.4");
276
+ E.elementStyles = [], E.shadowRootOptions = { mode: "open" }, E[U("elementProperties")] = /* @__PURE__ */ new Map(), E[U("finalized")] = /* @__PURE__ */ new Map(), q == null || q({ ReactiveElement: E }), (f.reactiveElementVersions ?? (f.reactiveElementVersions = [])).push("2.0.4");
298
277
  /**
299
278
  * @license
300
279
  * Copyright 2017 Google LLC
301
280
  * SPDX-License-Identifier: BSD-3-Clause
302
281
  */
303
- const U = globalThis, j = U.trustedTypes, rt = j ? j.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, gt = "$lit$", f = `lit$${(Math.random() + "").slice(9)}$`, yt = "?" + f, Ot = `<${yt}>`, A = document, P = () => A.createComment(""), O = (r) => r === null || typeof r != "object" && typeof r != "function", ft = Array.isArray, Nt = (r) => ft(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", T = `[
304
- \f\r]`, k = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, it = /-->/g, st = />/g, v = RegExp(`>|${T}(?:([^\\s"'>=/]+)(${T}*=${T}*(?:[^
305
- \f\r"'\`<>=]|("|')|))|$)`, "g"), nt = /'/g, ot = /"/g, mt = /^(?:script|style|textarea|title)$/i, It = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), _ = It(1), F = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), at = /* @__PURE__ */ new WeakMap(), w = A.createTreeWalker(A, 129);
306
- function $t(r, t) {
307
- if (!Array.isArray(r) || !r.hasOwnProperty("raw"))
308
- throw Error("invalid template strings array");
282
+ const P = globalThis, j = P.trustedTypes, rt = j ? j.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, ft = "$lit$", g = `lit$${Math.random().toFixed(9).slice(2)}$`, mt = "?" + g, It = `<${mt}>`, A = document, O = () => A.createComment(""), N = (i) => i === null || typeof i != "object" && typeof i != "function", bt = Array.isArray, Bt = (i) => bt(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", T = `[
283
+ \f\r]`, k = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, st = /-->/g, nt = />/g, v = RegExp(`>|${T}(?:([^\\s"'>=/]+)(${T}*=${T}*(?:[^
284
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), ot = /'/g, at = /"/g, $t = /^(?:script|style|textarea|title)$/i, Vt = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), x = Vt(1), M = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), lt = /* @__PURE__ */ new WeakMap(), w = A.createTreeWalker(A, 129);
285
+ function vt(i, t) {
286
+ if (!Array.isArray(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array");
309
287
  return rt !== void 0 ? rt.createHTML(t) : t;
310
288
  }
311
- const Bt = (r, t) => {
312
- const e = r.length - 1, i = [];
289
+ const Lt = (i, t) => {
290
+ const e = i.length - 1, r = [];
313
291
  let s, n = t === 2 ? "<svg>" : "", o = k;
314
292
  for (let l = 0; l < e; l++) {
315
- const a = r[l];
293
+ const a = i[l];
316
294
  let h, p, c = -1, u = 0;
317
- for (; u < a.length && (o.lastIndex = u, p = o.exec(a), p !== null); )
318
- u = o.lastIndex, o === k ? p[1] === "!--" ? o = it : p[1] !== void 0 ? o = st : p[2] !== void 0 ? (mt.test(p[2]) && (s = RegExp("</" + p[2], "g")), o = v) : p[3] !== void 0 && (o = v) : o === v ? p[0] === ">" ? (o = s ?? k, c = -1) : p[1] === void 0 ? c = -2 : (c = o.lastIndex - p[2].length, h = p[1], o = p[3] === void 0 ? v : p[3] === '"' ? ot : nt) : o === ot || o === nt ? o = v : o === it || o === st ? o = k : (o = v, s = void 0);
319
- const y = o === v && r[l + 1].startsWith("/>") ? " " : "";
320
- n += o === k ? a + Ot : c >= 0 ? (i.push(h), a.slice(0, c) + gt + a.slice(c) + f + y) : a + f + (c === -2 ? l : y);
295
+ for (; u < a.length && (o.lastIndex = u, p = o.exec(a), p !== null); ) u = o.lastIndex, o === k ? p[1] === "!--" ? o = st : p[1] !== void 0 ? o = nt : p[2] !== void 0 ? ($t.test(p[2]) && (s = RegExp("</" + p[2], "g")), o = v) : p[3] !== void 0 && (o = v) : o === v ? p[0] === ">" ? (o = s ?? k, c = -1) : p[1] === void 0 ? c = -2 : (c = o.lastIndex - p[2].length, h = p[1], o = p[3] === void 0 ? v : p[3] === '"' ? at : ot) : o === at || o === ot ? o = v : o === st || o === nt ? o = k : (o = v, s = void 0);
296
+ const y = o === v && i[l + 1].startsWith("/>") ? " " : "";
297
+ n += o === k ? a + It : c >= 0 ? (r.push(h), a.slice(0, c) + ft + a.slice(c) + g + y) : a + g + (c === -2 ? l : y);
321
298
  }
322
- return [$t(r, n + (r[e] || "<?>") + (t === 2 ? "</svg>" : "")), i];
299
+ return [vt(i, n + (i[e] || "<?>") + (t === 2 ? "</svg>" : "")), r];
323
300
  };
324
- class N {
325
- constructor({ strings: t, _$litType$: e }, i) {
301
+ class I {
302
+ constructor({ strings: t, _$litType$: e }, r) {
326
303
  let s;
327
304
  this.parts = [];
328
305
  let n = 0, o = 0;
329
- const l = t.length - 1, a = this.parts, [h, p] = Bt(t, e);
330
- if (this.el = N.createElement(h, i), w.currentNode = this.el.content, e === 2) {
306
+ const l = t.length - 1, a = this.parts, [h, p] = Lt(t, e);
307
+ if (this.el = I.createElement(h, r), w.currentNode = this.el.content, e === 2) {
331
308
  const c = this.el.content.firstChild;
332
309
  c.replaceWith(...c.childNodes);
333
310
  }
334
311
  for (; (s = w.nextNode()) !== null && a.length < l; ) {
335
312
  if (s.nodeType === 1) {
336
- if (s.hasAttributes())
337
- for (const c of s.getAttributeNames())
338
- if (c.endsWith(gt)) {
339
- const u = p[o++], y = s.getAttribute(c).split(f), z = /([.?@])?(.*)/.exec(u);
340
- a.push({ type: 1, index: n, name: z[2], strings: y, ctor: z[1] === "." ? Rt : z[1] === "?" ? Vt : z[1] === "@" ? zt : J }), s.removeAttribute(c);
341
- } else
342
- c.startsWith(f) && (a.push({ type: 6, index: n }), s.removeAttribute(c));
343
- if (mt.test(s.tagName)) {
344
- const c = s.textContent.split(f), u = c.length - 1;
313
+ if (s.hasAttributes()) for (const c of s.getAttributeNames()) if (c.endsWith(ft)) {
314
+ const u = p[o++], y = s.getAttribute(c).split(g), z = /([.?@])?(.*)/.exec(u);
315
+ a.push({ type: 1, index: n, name: z[2], strings: y, ctor: z[1] === "." ? zt : z[1] === "?" ? Dt : z[1] === "@" ? jt : J }), s.removeAttribute(c);
316
+ } else c.startsWith(g) && (a.push({ type: 6, index: n }), s.removeAttribute(c));
317
+ if ($t.test(s.tagName)) {
318
+ const c = s.textContent.split(g), u = c.length - 1;
345
319
  if (u > 0) {
346
320
  s.textContent = j ? j.emptyScript : "";
347
- for (let y = 0; y < u; y++)
348
- s.append(c[y], P()), w.nextNode(), a.push({ type: 2, index: ++n });
349
- s.append(c[u], P());
321
+ for (let y = 0; y < u; y++) s.append(c[y], O()), w.nextNode(), a.push({ type: 2, index: ++n });
322
+ s.append(c[u], O());
350
323
  }
351
324
  }
352
- } else if (s.nodeType === 8)
353
- if (s.data === yt)
354
- a.push({ type: 2, index: n });
355
- else {
356
- let c = -1;
357
- for (; (c = s.data.indexOf(f, c + 1)) !== -1; )
358
- a.push({ type: 7, index: n }), c += f.length - 1;
359
- }
325
+ } else if (s.nodeType === 8) if (s.data === mt) a.push({ type: 2, index: n });
326
+ else {
327
+ let c = -1;
328
+ for (; (c = s.data.indexOf(g, c + 1)) !== -1; ) a.push({ type: 7, index: n }), c += g.length - 1;
329
+ }
360
330
  n++;
361
331
  }
362
332
  }
363
333
  static createElement(t, e) {
364
- const i = A.createElement("template");
365
- return i.innerHTML = t, i;
334
+ const r = A.createElement("template");
335
+ return r.innerHTML = t, r;
366
336
  }
367
337
  }
368
- function H(r, t, e = r, i) {
338
+ function H(i, t, e = i, r) {
369
339
  var o, l;
370
- if (t === F)
371
- return t;
372
- let s = i !== void 0 ? (o = e._$Co) == null ? void 0 : o[i] : e._$Cl;
373
- const n = O(t) ? void 0 : t._$litDirective$;
374
- return (s == null ? void 0 : s.constructor) !== n && ((l = s == null ? void 0 : s._$AO) == null || l.call(s, !1), n === void 0 ? s = void 0 : (s = new n(r), s._$AT(r, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = s : e._$Cl = s), s !== void 0 && (t = H(r, s._$AS(r, t.values), s, i)), t;
340
+ if (t === M) return t;
341
+ let s = r !== void 0 ? (o = e._$Co) == null ? void 0 : o[r] : e._$Cl;
342
+ const n = N(t) ? void 0 : t._$litDirective$;
343
+ return (s == null ? void 0 : s.constructor) !== n && ((l = s == null ? void 0 : s._$AO) == null || l.call(s, !1), n === void 0 ? s = void 0 : (s = new n(i), s._$AT(i, e, r)), r !== void 0 ? (e._$Co ?? (e._$Co = []))[r] = s : e._$Cl = s), s !== void 0 && (t = H(i, s._$AS(i, t.values), s, r)), t;
375
344
  }
376
- class Lt {
345
+ class Rt {
377
346
  constructor(t, e) {
378
347
  this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
379
348
  }
@@ -384,13 +353,13 @@ class Lt {
384
353
  return this._$AM._$AU;
385
354
  }
386
355
  u(t) {
387
- const { el: { content: e }, parts: i } = this._$AD, s = ((t == null ? void 0 : t.creationScope) ?? A).importNode(e, !0);
356
+ const { el: { content: e }, parts: r } = this._$AD, s = ((t == null ? void 0 : t.creationScope) ?? A).importNode(e, !0);
388
357
  w.currentNode = s;
389
- let n = w.nextNode(), o = 0, l = 0, a = i[0];
358
+ let n = w.nextNode(), o = 0, l = 0, a = r[0];
390
359
  for (; a !== void 0; ) {
391
360
  if (o === a.index) {
392
361
  let h;
393
- a.type === 2 ? h = new V(n, n.nextSibling, this, t) : a.type === 1 ? h = new a.ctor(n, a.name, a.strings, this, t) : a.type === 6 && (h = new Dt(n, this, t)), this._$AV.push(h), a = i[++l];
362
+ a.type === 2 ? h = new R(n, n.nextSibling, this, t) : a.type === 1 ? h = new a.ctor(n, a.name, a.strings, this, t) : a.type === 6 && (h = new Jt(n, this, t)), this._$AV.push(h), a = r[++l];
394
363
  }
395
364
  o !== (a == null ? void 0 : a.index) && (n = w.nextNode(), o++);
396
365
  }
@@ -398,17 +367,16 @@ class Lt {
398
367
  }
399
368
  p(t) {
400
369
  let e = 0;
401
- for (const i of this._$AV)
402
- i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
370
+ for (const r of this._$AV) r !== void 0 && (r.strings !== void 0 ? (r._$AI(t, r, e), e += r.strings.length - 2) : r._$AI(t[e])), e++;
403
371
  }
404
372
  }
405
- class V {
373
+ class R {
406
374
  get _$AU() {
407
375
  var t;
408
376
  return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
409
377
  }
410
- constructor(t, e, i, s) {
411
- this.type = 2, this._$AH = d, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = s, this._$Cv = (s == null ? void 0 : s.isConnected) ?? !0;
378
+ constructor(t, e, r, s) {
379
+ this.type = 2, this._$AH = d, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = r, this.options = s, this._$Cv = (s == null ? void 0 : s.isConnected) ?? !0;
412
380
  }
413
381
  get parentNode() {
414
382
  let t = this._$AA.parentNode;
@@ -422,7 +390,7 @@ class V {
422
390
  return this._$AB;
423
391
  }
424
392
  _$AI(t, e = this) {
425
- t = H(this, t, e), O(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !== F && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Nt(t) ? this.k(t) : this._(t);
393
+ t = H(this, t, e), N(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !== M && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Bt(t) ? this.k(t) : this._(t);
426
394
  }
427
395
  S(t) {
428
396
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -431,33 +399,31 @@ class V {
431
399
  this._$AH !== t && (this._$AR(), this._$AH = this.S(t));
432
400
  }
433
401
  _(t) {
434
- this._$AH !== d && O(this._$AH) ? this._$AA.nextSibling.data = t : this.T(A.createTextNode(t)), this._$AH = t;
402
+ this._$AH !== d && N(this._$AH) ? this._$AA.nextSibling.data = t : this.T(A.createTextNode(t)), this._$AH = t;
435
403
  }
436
404
  $(t) {
437
405
  var n;
438
- const { values: e, _$litType$: i } = t, s = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = N.createElement($t(i.h, i.h[0]), this.options)), i);
439
- if (((n = this._$AH) == null ? void 0 : n._$AD) === s)
440
- this._$AH.p(e);
406
+ const { values: e, _$litType$: r } = t, s = typeof r == "number" ? this._$AC(t) : (r.el === void 0 && (r.el = I.createElement(vt(r.h, r.h[0]), this.options)), r);
407
+ if (((n = this._$AH) == null ? void 0 : n._$AD) === s) this._$AH.p(e);
441
408
  else {
442
- const o = new Lt(s, this), l = o.u(this.options);
409
+ const o = new Rt(s, this), l = o.u(this.options);
443
410
  o.p(e), this.T(l), this._$AH = o;
444
411
  }
445
412
  }
446
413
  _$AC(t) {
447
- let e = at.get(t.strings);
448
- return e === void 0 && at.set(t.strings, e = new N(t)), e;
414
+ let e = lt.get(t.strings);
415
+ return e === void 0 && lt.set(t.strings, e = new I(t)), e;
449
416
  }
450
417
  k(t) {
451
- ft(this._$AH) || (this._$AH = [], this._$AR());
418
+ bt(this._$AH) || (this._$AH = [], this._$AR());
452
419
  const e = this._$AH;
453
- let i, s = 0;
454
- for (const n of t)
455
- s === e.length ? e.push(i = new V(this.S(P()), this.S(P()), this, this.options)) : i = e[s], i._$AI(n), s++;
456
- s < e.length && (this._$AR(i && i._$AB.nextSibling, s), e.length = s);
420
+ let r, s = 0;
421
+ for (const n of t) s === e.length ? e.push(r = new R(this.S(O()), this.S(O()), this, this.options)) : r = e[s], r._$AI(n), s++;
422
+ s < e.length && (this._$AR(r && r._$AB.nextSibling, s), e.length = s);
457
423
  }
458
424
  _$AR(t = this._$AA.nextSibling, e) {
459
- var i;
460
- for ((i = this._$AP) == null ? void 0 : i.call(this, !1, !0, e); t && t !== this._$AB; ) {
425
+ var r;
426
+ for ((r = this._$AP) == null ? void 0 : r.call(this, !1, !0, e); t && t !== this._$AB; ) {
461
427
  const s = t.nextSibling;
462
428
  t.remove(), t = s;
463
429
  }
@@ -474,19 +440,17 @@ class J {
474
440
  get _$AU() {
475
441
  return this._$AM._$AU;
476
442
  }
477
- constructor(t, e, i, s, n) {
478
- this.type = 1, this._$AH = d, this._$AN = void 0, this.element = t, this.name = e, this._$AM = s, this.options = n, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = d;
443
+ constructor(t, e, r, s, n) {
444
+ this.type = 1, this._$AH = d, this._$AN = void 0, this.element = t, this.name = e, this._$AM = s, this.options = n, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = d;
479
445
  }
480
- _$AI(t, e = this, i, s) {
446
+ _$AI(t, e = this, r, s) {
481
447
  const n = this.strings;
482
448
  let o = !1;
483
- if (n === void 0)
484
- t = H(this, t, e, 0), o = !O(t) || t !== this._$AH && t !== F, o && (this._$AH = t);
449
+ if (n === void 0) t = H(this, t, e, 0), o = !N(t) || t !== this._$AH && t !== M, o && (this._$AH = t);
485
450
  else {
486
451
  const l = t;
487
452
  let a, h;
488
- for (t = n[0], a = 0; a < n.length - 1; a++)
489
- h = H(this, l[i + a], e, a), h === F && (h = this._$AH[a]), o || (o = !O(h) || h !== this._$AH[a]), h === d ? t = d : t !== d && (t += (h ?? "") + n[a + 1]), this._$AH[a] = h;
453
+ for (t = n[0], a = 0; a < n.length - 1; a++) h = H(this, l[r + a], e, a), h === M && (h = this._$AH[a]), o || (o = !N(h) || h !== this._$AH[a]), h === d ? t = d : t !== d && (t += (h ?? "") + n[a + 1]), this._$AH[a] = h;
490
454
  }
491
455
  o && !s && this.j(t);
492
456
  }
@@ -494,7 +458,7 @@ class J {
494
458
  t === d ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
495
459
  }
496
460
  }
497
- class Rt extends J {
461
+ class zt extends J {
498
462
  constructor() {
499
463
  super(...arguments), this.type = 3;
500
464
  }
@@ -502,7 +466,7 @@ class Rt extends J {
502
466
  this.element[this.name] = t === d ? void 0 : t;
503
467
  }
504
468
  }
505
- class Vt extends J {
469
+ class Dt extends J {
506
470
  constructor() {
507
471
  super(...arguments), this.type = 4;
508
472
  }
@@ -510,24 +474,23 @@ class Vt extends J {
510
474
  this.element.toggleAttribute(this.name, !!t && t !== d);
511
475
  }
512
476
  }
513
- class zt extends J {
514
- constructor(t, e, i, s, n) {
515
- super(t, e, i, s, n), this.type = 5;
477
+ class jt extends J {
478
+ constructor(t, e, r, s, n) {
479
+ super(t, e, r, s, n), this.type = 5;
516
480
  }
517
481
  _$AI(t, e = this) {
518
- if ((t = H(this, t, e, 0) ?? d) === F)
519
- return;
520
- const i = this._$AH, s = t === d && i !== d || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, n = t !== d && (i === d || s);
521
- s && this.element.removeEventListener(this.name, this, i), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
482
+ if ((t = H(this, t, e, 0) ?? d) === M) return;
483
+ const r = this._$AH, s = t === d && r !== d || t.capture !== r.capture || t.once !== r.once || t.passive !== r.passive, n = t !== d && (r === d || s);
484
+ s && this.element.removeEventListener(this.name, this, r), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
522
485
  }
523
486
  handleEvent(t) {
524
487
  var e;
525
488
  typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
526
489
  }
527
490
  }
528
- class Dt {
529
- constructor(t, e, i) {
530
- this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
491
+ class Jt {
492
+ constructor(t, e, r) {
493
+ this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = r;
531
494
  }
532
495
  get _$AU() {
533
496
  return this._$AM._$AU;
@@ -536,23 +499,23 @@ class Dt {
536
499
  H(this, t);
537
500
  }
538
501
  }
539
- const G = U.litHtmlPolyfillSupport;
540
- G == null || G(N, V), (U.litHtmlVersions ?? (U.litHtmlVersions = [])).push("3.1.2");
541
- const jt = (r, t, e) => {
542
- const i = (e == null ? void 0 : e.renderBefore) ?? t;
543
- let s = i._$litPart$;
502
+ const G = P.litHtmlPolyfillSupport;
503
+ G == null || G(I, R), (P.litHtmlVersions ?? (P.litHtmlVersions = [])).push("3.1.4");
504
+ const qt = (i, t, e) => {
505
+ const r = (e == null ? void 0 : e.renderBefore) ?? t;
506
+ let s = r._$litPart$;
544
507
  if (s === void 0) {
545
508
  const n = (e == null ? void 0 : e.renderBefore) ?? null;
546
- i._$litPart$ = s = new V(t.insertBefore(P(), n), n, void 0, e ?? {});
509
+ r._$litPart$ = s = new R(t.insertBefore(O(), n), n, void 0, e ?? {});
547
510
  }
548
- return s._$AI(r), s;
511
+ return s._$AI(i), s;
549
512
  };
550
513
  /**
551
514
  * @license
552
515
  * Copyright 2017 Google LLC
553
516
  * SPDX-License-Identifier: BSD-3-Clause
554
517
  */
555
- class x extends C {
518
+ class _ extends E {
556
519
  constructor() {
557
520
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
558
521
  }
@@ -563,7 +526,7 @@ class x extends C {
563
526
  }
564
527
  update(t) {
565
528
  const e = this.render();
566
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = jt(e, this.renderRoot, this.renderOptions);
529
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = qt(e, this.renderRoot, this.renderOptions);
567
530
  }
568
531
  connectedCallback() {
569
532
  var t;
@@ -574,28 +537,28 @@ class x extends C {
574
537
  super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
575
538
  }
576
539
  render() {
577
- return F;
540
+ return M;
578
541
  }
579
542
  }
580
- var dt;
581
- x._$litElement$ = !0, x.finalized = !0, (dt = globalThis.litElementHydrateSupport) == null || dt.call(globalThis, { LitElement: x });
543
+ var ut;
544
+ _._$litElement$ = !0, _.finalized = !0, (ut = globalThis.litElementHydrateSupport) == null || ut.call(globalThis, { LitElement: _ });
582
545
  const W = globalThis.litElementPolyfillSupport;
583
- W == null || W({ LitElement: x });
584
- (globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.4");
546
+ W == null || W({ LitElement: _ });
547
+ (globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.6");
585
548
  /**
586
549
  * @license
587
550
  * Copyright 2017 Google LLC
588
551
  * SPDX-License-Identifier: BSD-3-Clause
589
552
  */
590
- const Jt = (r) => (...t) => ({ _$litDirective$: r, values: t });
591
- let qt = class {
553
+ const Tt = (i) => (...t) => ({ _$litDirective$: i, values: t });
554
+ let Gt = class {
592
555
  constructor(t) {
593
556
  }
594
557
  get _$AU() {
595
558
  return this._$AM._$AU;
596
559
  }
597
- _$AT(t, e, i) {
598
- this._$Ct = t, this._$AM = e, this._$Ci = i;
560
+ _$AT(t, e, r) {
561
+ this._$Ct = t, this._$AM = e, this._$Ci = r;
599
562
  }
600
563
  _$AS(t, e) {
601
564
  return this.update(t, e);
@@ -609,76 +572,75 @@ let qt = class {
609
572
  * Copyright 2020 Google LLC
610
573
  * SPDX-License-Identifier: BSD-3-Clause
611
574
  */
612
- const Tt = {}, Gt = (r, t = Tt) => r._$AH = t;
575
+ const Wt = {}, Zt = (i, t = Wt) => i._$AH = t;
613
576
  /**
614
577
  * @license
615
578
  * Copyright 2021 Google LLC
616
579
  * SPDX-License-Identifier: BSD-3-Clause
617
580
  */
618
- const Wt = Jt(class extends qt {
581
+ const Kt = Tt(class extends Gt {
619
582
  constructor() {
620
583
  super(...arguments), this.key = d;
621
584
  }
622
- render(r, t) {
623
- return this.key = r, t;
585
+ render(i, t) {
586
+ return this.key = i, t;
624
587
  }
625
- update(r, [t, e]) {
626
- return t !== this.key && (Gt(r), this.key = t), e;
588
+ update(i, [t, e]) {
589
+ return t !== this.key && (Zt(i), this.key = t), e;
627
590
  }
628
- }), Zt = (r) => {
629
- r.hoverInteraction = r.eoxMap.selectInteractions.selectHover, r.clickInteraction = r.eoxMap.selectInteractions.selectClick;
591
+ }), Qt = (i) => {
592
+ i.hoverInteraction = i.eoxMap.selectInteractions.selectHover, i.clickInteraction = i.eoxMap.selectInteractions.selectClick;
630
593
  const t = () => {
631
- r.requestUpdate();
594
+ i.requestUpdate();
632
595
  };
633
- r.hoverInteraction.selectStyleLayer.on(
596
+ i.hoverInteraction.selectStyleLayer.on(
634
597
  "change",
635
598
  t
636
- ), r.clickInteraction.selectStyleLayer.on(
599
+ ), i.clickInteraction.selectStyleLayer.on(
637
600
  "change",
638
601
  t
639
602
  );
640
- }, Kt = (r, t, e) => {
641
- if (r.clickId === t)
642
- return;
643
- const i = e ? [] : [t];
644
- r.hoverInteraction.highlightById(i);
645
- }, Qt = (r, t) => {
646
- r.stopPropagation();
647
- const e = Number(r.target.getAttribute("index")), i = t.drawnFeatures[e];
648
- t.drawLayer.getSource().removeFeature(i), t.drawnFeatures.splice(e, 1), t.requestUpdate();
649
- }, lt = { duration: 750 }, ct = {
603
+ }, Xt = (i, t, e) => {
604
+ if (i.clickId === t) return;
605
+ const r = e ? [] : [t];
606
+ i.hoverInteraction.highlightById(r);
607
+ }, Yt = (i, t) => {
608
+ i.stopPropagation();
609
+ const e = Number(i.target.getAttribute("index")), r = t.drawnFeatures[e];
610
+ t.drawLayer.getSource().removeFeature(r), t.drawnFeatures.splice(e, 1), t.requestUpdate();
611
+ }, ct = { duration: 750 }, ht = {
650
612
  type: "FeatureCollection",
651
613
  features: []
652
- }, Xt = (r, t) => {
653
- const e = r.get("id"), { clickId: i, drawLayer: s, olMap: n, clickInteraction: o } = t, l = i === e, a = r.getGeometry();
614
+ }, te = (i, t) => {
615
+ const e = i.get("id"), { clickId: r, drawLayer: s, olMap: n, clickInteraction: o } = t, l = r === e, a = i.getGeometry();
654
616
  if (l) {
655
617
  const h = s.getSource().getExtent();
656
- n.getView().fit(h, lt), o.highlightById([]);
618
+ n.getView().fit(h, ct), o.highlightById([]);
657
619
  } else {
658
620
  const h = a.getExtent();
659
- o.highlightById([e]), n.getView().fit(h, lt);
621
+ o.highlightById([e]), n.getView().fit(h, ct);
660
622
  }
661
623
  t.requestUpdate();
662
- }, Yt = "ul.list-wrap { padding: 0;}ul.list-wrap li:hover,ul.list-wrap li.selected { background: var(--secondary-bg-color-hover);}ul.list-wrap li { list-style: none; padding: 4px;}ul.list-wrap li { border-bottom: 1.2px solid var(--secondary-color);}ul.list-wrap li:first-child { border-top: 1.2px solid var(--secondary-color);}ul.list-wrap li .list { width: 100%; align-items: center; justify-content: space-between; display: flex; align-items: center; cursor: pointer; font-size: small; gap: 10px;}ul.list-wrap li .list span { display: flex; align-items: center; cursor: pointer; font-size: small; flex-grow: 1;}";
663
- class bt extends x {
624
+ }, ee = "ul.list-wrap { padding: 0;}ul.list-wrap li:hover,ul.list-wrap li.selected { background: var(--secondary-bg-color-hover);}ul.list-wrap li { list-style: none; padding: 4px;}ul.list-wrap li { border-bottom: 1.2px solid var(--secondary-color);}ul.list-wrap li:first-child { border-top: 1.2px solid var(--secondary-color);}ul.list-wrap li .list { width: 100%; align-items: center; justify-content: space-between; display: flex; align-items: center; cursor: pointer; font-size: small; gap: 10px;}ul.list-wrap li .list span { display: flex; align-items: center; cursor: pointer; font-size: small; flex-grow: 1;}";
625
+ class wt extends _ {
664
626
  constructor() {
665
627
  super();
666
628
  /**
667
629
  * @type import("../../../map/src/select").EOxSelectInteraction
668
630
  */
669
- b(this, "hoverInteraction");
631
+ m(this, "hoverInteraction");
670
632
  /**
671
633
  * @type import("../../../map/src/select").EOxSelectInteraction
672
634
  */
673
- b(this, "clickInteraction");
635
+ m(this, "clickInteraction");
674
636
  /**
675
637
  * @type string | number
676
638
  */
677
- b(this, "hoverId");
639
+ m(this, "hoverId");
678
640
  /**
679
641
  * @type string | number
680
642
  */
681
- b(this, "clickId");
643
+ m(this, "clickId");
682
644
  this.eoxMap = null, this.olMap = null, this.draw = null, this.drawLayer = null, this.drawnFeatures = [], this.modify = null, this.unstyled = !1;
683
645
  }
684
646
  /**
@@ -687,7 +649,7 @@ class bt extends x {
687
649
  * @param {Event & { target: HTMLButtonElement }} evt - Event object containing button target.
688
650
  */
689
651
  _handleDelete(e) {
690
- Qt(e, this), this.dispatchEvent(new CustomEvent("changed", { bubbles: !0 }));
652
+ Yt(e, this), this.dispatchEvent(new CustomEvent("changed", { bubbles: !0 }));
691
653
  }
692
654
  /**
693
655
  * Handles the selection and deselection of a feature from the list.
@@ -695,21 +657,21 @@ class bt extends x {
695
657
  * @param {import("ol").Feature} feature - The selected feature.
696
658
  */
697
659
  _handleFeatureSelectAndDeselect(e) {
698
- Xt(e, this);
660
+ te(e, this);
699
661
  }
700
662
  /**
701
663
  *
702
664
  * @param {Number} featureId - The ID of the feature to hover.
703
665
  * @param {Boolean} mouseOut - Flag indicating mouse out event.
704
666
  */
705
- _handleHoverFeature(e, i = !1) {
706
- Kt(this, e, i);
667
+ _handleHoverFeature(e, r = !1) {
668
+ Xt(this, e, r);
707
669
  }
708
670
  /**
709
671
  * Initiates initial settings and event triggers upon the component's first update.
710
672
  */
711
673
  firstUpdated() {
712
- Zt(this);
674
+ Qt(this);
713
675
  }
714
676
  /**
715
677
  * Overrides createRenderRoot to handle shadow DOM.
@@ -718,17 +680,17 @@ class bt extends x {
718
680
  return this;
719
681
  }
720
682
  render() {
721
- var e, i;
722
- return this.hoverId = (e = this.hoverInteraction) == null ? void 0 : e.selectedFids[0], this.clickId = (i = this.clickInteraction) == null ? void 0 : i.selectedFids[0], _`
683
+ var e, r;
684
+ return this.hoverId = (e = this.hoverInteraction) == null ? void 0 : e.selectedFids[0], this.clickId = (r = this.clickInteraction) == null ? void 0 : r.selectedFids[0], x`
723
685
  <style>
724
- ${!this.unstyled && Yt}
686
+ ${!this.unstyled && ee}
725
687
  </style>
726
688
  <ul class="list-wrap">
727
689
  ${this.drawnFeatures.map((s, n) => {
728
690
  const o = n + 1, l = s.get("id"), a = this.hoverId === l, h = this.clickId === l;
729
- return Wt(
691
+ return Kt(
730
692
  o,
731
- _`
693
+ x`
732
694
  <li
733
695
  class="${a || h ? "selected" : d}"
734
696
  @mouseover=${() => this._handleHoverFeature(l)}
@@ -755,7 +717,7 @@ class bt extends x {
755
717
  `;
756
718
  }
757
719
  }
758
- b(bt, "properties", {
720
+ m(wt, "properties", {
759
721
  eoxMap: { attribute: !1, state: !0 },
760
722
  olMap: { attribute: !1, state: !0 },
761
723
  draw: { attribute: !1, state: !0 },
@@ -764,13 +726,13 @@ b(bt, "properties", {
764
726
  modify: { attribute: !1, state: !0 },
765
727
  unstyled: { type: Boolean }
766
728
  });
767
- customElements.define("eox-drawtools-list", bt);
768
- const te = (r) => {
769
- const { multipleFeatures: t, drawnFeatures: e, currentlyDrawing: i } = r, s = !t && (e == null ? void 0 : e.length) > 0 || i, n = !(e != null && e.length) && !i;
729
+ customElements.define("eox-drawtools-list", wt);
730
+ const ie = (i) => {
731
+ const { multipleFeatures: t, drawnFeatures: e, currentlyDrawing: r } = i, s = !t && (e == null ? void 0 : e.length) > 0 || r, n = !(e != null && e.length) && !r;
770
732
  return { drawDisabled: s, discardDisabled: n };
771
- }, ee = "button,.button { display: inline-flex; position: relative; align-items: center; color: #fff; border-width: 0; outline: none; border-radius: 4px; padding: 16px; height: 36px; cursor: pointer; font-family: inherit; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 1.25px; font-weight: 500; box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12); transition-property: box-shadow, transform, opacity, background; transition-duration: 0.28s; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);}button:hover:not([disabled]):not(.icon),.button:hover:not([disabled]):not(.icon) { box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12); background: var(--primary-btn-color-hover);}button,button:active,.button,.button:active { background: var(--primary-color);}button[disabled],.button[disabled] { opacity: 0.5; cursor: not-allowed;}button.outline,.button.outline { background: transparent; box-shadow: none; color: var(--primary-color); outline: 1px solid var(--primary-color);}button.outline:hover,.button.outline:hover { background: transparent;}button.icon,.button.icon { background: transparent; border: none; box-shadow: none; padding: 0; border-radius: 50%; width: 24px; height: 24px; text-indent: -9999px;}button.icon-text,.button.icon-text { text-indent: 26px;}button.icon:before,button.icon-text:before,.button.icon:before,.button.icon-text:before { position: absolute; text-indent: 0; line-height: initial;}button.icon:before,.button.icon:before { width: 24px; height: 24px; margin-right: 0;}button.icon-text:before,.button.icon-text:before { width: 18px; height: 18px;}button.small,.button.small { height: 28px; padding: 12.4px; font-size: 0.75rem;}button.smallest.icon,button.smallest.icon::before { height: 16px; width: 16px; padding: 0px;}", re = "textarea { height: 90px; resize: none; border-radius: 4px; box-sizing: border-box !important; width: 100%; padding: 5px 7px; border: 1px solid var(--secondary-color); font-size: smaller; background: var(--background-color);}";
772
- function ie(r) {
773
- navigator.clipboard.writeText(r).then(
733
+ }, re = 'button,.button { display: inline-flex; position: relative; align-items: center; color: #fff; border-width: 0; outline: none; border-radius: 4px; padding: 16px; height: 36px; cursor: pointer; font-family: inherit; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 1.25px; font-weight: 500; box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12); transition-property: box-shadow, transform, opacity, background; transition-duration: 0.28s; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);}button:hover:not([disabled]):not(.icon):not(.json-editor-btntype-*),.button:hover:not([disabled]):not(.icon) { box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12); background: var(--primary-btn-color-hover);}button,button:active,.button,.button:active { background: var(--primary-color);}button[disabled],.button[disabled] { opacity: 0.5; cursor: not-allowed;}button.block,.button.block { display: block;}button.outline,.button.outline { background: transparent; box-shadow: none; color: var(--primary-color); outline: 1px solid var(--primary-color);}button.outline:hover,.button.outline:hover { background: transparent;}button.icon,.button.icon,button[class*="json-editor-btntype-"] { background: transparent; border: none; box-shadow: none; padding: 0; border-radius: 50%; width: 24px; height: 24px; text-indent: -9999px;}button.icon-text,.button.icon-text { text-indent: 26px;}button.icon-text.block,.button.icon-text.block { text-indent: 20px;}button.icon:before,button.icon-text:before,.button.icon:before,.button.icon-text:before { position: absolute; text-indent: 0; line-height: initial;}button.icon-text.block:before,.button.icon-text.block:before { text-indent: -54px;}button.icon:before,.button.icon:before,button[class*="json-editor-btntype-"]::before { width: 24px; height: 24px; margin-right: 0;}button.icon-text:before,.button.icon-text:before { width: 18px; height: 18px;}button.small,.button.small { height: 28px; padding: 12.4px; font-size: 0.75rem;}button.smallest.icon,button.smallest.icon::before { height: 16px; width: 16px; padding: 0;}', se = 'textarea { height: 90px; resize: none; border-radius: 4px; box-sizing: border-box !important; width: 100%; padding: 5px 7px; border: 1px solid var(--secondary-color); font-size: smaller; background: var(--background-color);}input[type="text"],input[type="url"],input[type="email"],input[type="password"],input[type="text"],input[type="number"],input[type="search"],input[type="tel"],select { box-sizing: border-box; width: 100%; margin-top: 0.5rem; margin-bottom: 0.5rem; padding: 5px 7px; border-radius: 4px; border: 1px solid #0004;}';
734
+ function ne(i) {
735
+ navigator.clipboard.writeText(i).then(
774
736
  function() {
775
737
  },
776
738
  function(t) {
@@ -783,29 +745,29 @@ function ie(r) {
783
745
  * Copyright 2021 Google LLC
784
746
  * SPDX-License-Identifier: BSD-3-Clause
785
747
  */
786
- function ht(r, t, e) {
787
- return r ? t(r) : e == null ? void 0 : e(r);
748
+ function dt(i, t, e) {
749
+ return i ? t(i) : e == null ? void 0 : e(i);
788
750
  }
789
- var I, B;
790
- class vt extends x {
751
+ var B, V;
752
+ class xt extends _ {
791
753
  constructor() {
792
754
  super();
793
755
  /**
794
756
  * @type boolean | import("lit").nothing
795
757
  */
796
- S(this, I, !0);
758
+ S(this, B, !0);
797
759
  /**
798
760
  * @type boolean | import("lit").nothing
799
761
  */
800
- S(this, B, !0);
762
+ S(this, V, !0);
801
763
  this.multipleFeatures = !1, this.drawnFeatures = [], this.importFeatures = !1, this.showEditor = !1, this.currentlyDrawing = !1, this.drawFunc = null, this.geoJSON = "", this.unstyled = !1;
802
764
  }
803
765
  /**
804
766
  * Updates button states based on conditions
805
767
  */
806
768
  updateButtonStates() {
807
- const { drawDisabled: e, discardDisabled: i } = te(this);
808
- E(this, I, e), E(this, B, i);
769
+ const { drawDisabled: e, discardDisabled: r } = ie(this);
770
+ $(this, B, e), $(this, V, r);
809
771
  }
810
772
  /**
811
773
  * Overrides createRenderRoot to handle shadow DOM
@@ -816,10 +778,10 @@ class vt extends x {
816
778
  render() {
817
779
  this.updateButtonStates();
818
780
  const e = this.currentlyDrawing ? "drawing" : "draw";
819
- return _`
781
+ return x`
820
782
  <style>
821
- ${!this.unstyled && ee}
822
783
  ${!this.unstyled && re}
784
+ ${!this.unstyled && se}
823
785
  </style>
824
786
  <div class="wrap-btn">
825
787
  <slot></slot>
@@ -828,7 +790,7 @@ class vt extends x {
828
790
  <button
829
791
  data-cy="drawBtn"
830
792
  class="polygon icon"
831
- ?disabled="${g(this, I) || d}"
793
+ ?disabled="${b(this, B) || d}"
832
794
  @click="${() => this.drawFunc.start()}"
833
795
  >
834
796
  ${e}
@@ -838,7 +800,7 @@ class vt extends x {
838
800
  <button
839
801
  data-cy="discardBtn"
840
802
  class="discard icon"
841
- ?disabled="${g(this, B) || d}"
803
+ ?disabled="${b(this, V) || d}"
842
804
  @click="${() => this.drawFunc.discard()}"
843
805
  >
844
806
  discard
@@ -846,9 +808,9 @@ class vt extends x {
846
808
  </div>
847
809
 
848
810
  <!-- Import Button -->
849
- ${ht(
811
+ ${dt(
850
812
  this.importFeatures,
851
- () => _`
813
+ () => x`
852
814
  <!-- Import Input Field : Hidden -->
853
815
  <input
854
816
  type="file"
@@ -870,9 +832,9 @@ class vt extends x {
870
832
  </div>
871
833
 
872
834
  <!-- Geo JSON Wrapper -->
873
- ${ht(
835
+ ${dt(
874
836
  this.showEditor,
875
- () => _`
837
+ () => x`
876
838
  <div class="json-wrapper">
877
839
  <!-- Geo JSON Editor -->
878
840
  <textarea
@@ -885,7 +847,7 @@ class vt extends x {
885
847
  <button
886
848
  data-cy="copyBtn"
887
849
  class="icon-copy"
888
- @click=${() => ie(this.geoJSON)}
850
+ @click=${() => ne(this.geoJSON)}
889
851
  >
890
852
  ${this.unstyled ? "copy" : d}
891
853
  </button>
@@ -895,8 +857,8 @@ class vt extends x {
895
857
  `;
896
858
  }
897
859
  }
898
- I = new WeakMap(), B = new WeakMap(), // Define properties with default values and types
899
- b(vt, "properties", {
860
+ B = new WeakMap(), V = new WeakMap(), // Define properties with default values and types
861
+ m(xt, "properties", {
900
862
  multipleFeatures: { attribute: !1, type: Boolean },
901
863
  drawnFeatures: { attribute: !1, state: !0, type: Array },
902
864
  currentlyDrawing: { attribute: !1, state: !0, type: Boolean },
@@ -906,8 +868,8 @@ b(vt, "properties", {
906
868
  geoJSON: { attribute: "geo-json", type: String },
907
869
  unstyled: { type: Boolean }
908
870
  });
909
- customElements.define("eox-drawtools-controller", vt);
910
- const se = `
871
+ customElements.define("eox-drawtools-controller", xt);
872
+ const oe = `
911
873
  button.discard:before {
912
874
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23FF5252' viewBox='0 0 24 24'%3E%3Ctitle%3Etrash-can-outline%3C/title%3E%3Cpath d='M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M7,6H17V19H7V6M9,8V17H11V8H9M13,8V17H15V8H13Z' /%3E%3C/svg%3E")
913
875
  }
@@ -949,21 +911,25 @@ const se = `
949
911
  color: white;
950
912
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ctitle%3Econtent-copy%3C/title%3E%3Cpath 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' fill='white' /%3E%3C/svg%3E")
951
913
  }
952
- `, ne = (r) => {
914
+ `, ae = (i) => {
953
915
  (() => {
954
- r.emitDrawnFeatures(), r.multipleFeatures || (r.draw.setActive(!1), r.currentlyDrawing = !1);
955
- })(), r.requestUpdate();
956
- }, oe = (r) => {
916
+ i.emitDrawnFeatures(), i.multipleFeatures || (i.draw.setActive(!1), i.currentlyDrawing = !1);
917
+ })(), i.requestUpdate();
918
+ }, le = (i) => {
957
919
  const t = () => {
958
- r.drawLayer.set("isDrawingEnabled", !0), r.draw.setActive(!0);
920
+ i.drawLayer.set("isDrawingEnabled", !0), i.draw.setActive(!0);
959
921
  }, e = () => {
960
- r.currentlyDrawing = !0, r.requestUpdate();
922
+ i.currentlyDrawing = !0, i.requestUpdate();
961
923
  };
962
924
  t(), e();
963
- }, ae = (r, t) => {
925
+ }, ce = (i) => {
926
+ let t;
927
+ return typeof i == "string" ? t = /** @type {HTMLElement} */
928
+ document.querySelector(i) : t = i, t;
929
+ }, pt = (i, t) => {
964
930
  var n;
965
- const i = document.querySelector(r.for), s = i.map;
966
- return r.drawLayer = i.addOrUpdateLayer({
931
+ const r = ce(i.for), s = r.map;
932
+ return i.drawLayer = r.addOrUpdateLayer({
967
933
  type: "Vector",
968
934
  properties: {
969
935
  id: "drawLayer",
@@ -980,8 +946,8 @@ const se = `
980
946
  options: {
981
947
  active: !1,
982
948
  id: "drawInteraction",
983
- type: r.type,
984
- modify: r.allowModify,
949
+ type: i.type,
950
+ modify: i.allowModify,
985
951
  stopClick: !0
986
952
  }
987
953
  },
@@ -1011,67 +977,67 @@ const se = `
1011
977
  }
1012
978
  }
1013
979
  ]
1014
- }), r.draw = /** @type {import("ol/interaction").Draw} */
980
+ }), i.draw = /** @type {import("ol/interaction").Draw} */
1015
981
  /** @type {unknown} */
1016
- i.interactions.drawInteraction, r.modify = /** @type {import("ol/interaction").Modify} */
982
+ r.interactions.drawInteraction, i.modify = /** @type {import("ol/interaction").Modify} */
1017
983
  /** @type {unknown} */
1018
- i.interactions.drawInteractionmodify, (n = r.modify) == null || n.on("modifyend", () => r.onModifyEnd()), i.addEventListener("addfeatures", () => ne(r)), { EoxMap: i, OlMap: s };
1019
- }, le = (r) => {
984
+ r.interactions.drawInteractionmodify, (n = i.modify) == null || n.on("modifyend", () => i.onModifyEnd()), r.addEventListener("addfeatures", () => ae(i)), { EoxMap: r, OlMap: s };
985
+ }, he = (i) => {
1020
986
  const t = () => {
1021
- r.drawnFeatures = [], r.draw.setActive(!1), r.drawLayer.getSource().clear(), r.geoJSON = null;
987
+ i.drawnFeatures = [], i.draw.setActive(!1), i.drawLayer.getSource().clear(), i.geoJSON = null;
1022
988
  }, e = () => {
1023
- r.emitDrawnFeatures(), r.currentlyDrawing = !1, r.requestUpdate();
989
+ i.emitDrawnFeatures(), i.currentlyDrawing = !1, i.requestUpdate();
1024
990
  };
1025
991
  t(), e();
1026
- }, ce = (r, t) => {
992
+ }, de = (i, t) => {
1027
993
  setTimeout(() => {
1028
- r.drawnFeatures = r.drawLayer.getSource().getFeatures(), r.updateGeoJSON(), r.requestUpdate(), t();
994
+ i.drawnFeatures = i.drawLayer.getSource().getFeatures(), i.updateGeoJSON(), i.requestUpdate(), t();
1029
995
  }, 0);
1030
- }, he = ':root,:host { --spacing: 1rem; --block-spacing-vertical: calc(var(--spacing) * 2); --block-spacing-horizontal: var(--spacing); --background-color: var(--eox-background-color, white); --color: var(--eox-color, #2c3d49); --h-color: var(--eox-h-color, var(--color)); --hover-transparency: var(--eox-hover-transparency, 20%); --bg-hover-transparency: var(--eox-bg-hover-transparency, 40%); --btn-hover-transparency: var(--eox-btn-hover-transparency, 80%); --primary-color: var(--eox-primary-color, #004170); --primary-color-hover: color-mix( in srgb, var(--primary-color) var(--hover-transparency), transparent ); --primary-bg-color-hover: color-mix( in srgb, var(--primary-color) var(--bg-hover-transparency), transparent ); --primary-btn-color-hover: color-mix( in srgb, var(--primary-color) var(--btn-hover-transparency), transparent ); --secondary-color: var(--eox-secondary-color, #c6d4df); --secondary-color-hover: color-mix( in srgb, var(--secondary-color) var(--hover-transparency), transparent ); --secondary-bg-color-hover: color-mix( in srgb, var(--secondary-color) var(--bg-hover-transparency), transparent ); --secondary-btn-color-hover: color-mix( in srgb, var(--secondary-color) var(--btn-hover-transparency), transparent ); --success: var(--eox-success, #26cc0f); --warning: var(--eox-warning, #f18e32); --error: var(--eox-error, #ff5252); --header-font-family: var(--eox-header-font-family, "Roboto", sans-serif); --body-font-family: var(--eox-body-font-family, "Roboto", sans-serif);}* { font-family: var(--body-font-family); color: var(--eox-color);}h1,h2,h3,h4,h5,h6 { font-family: var(--header-font-family);}span,p,div,main,label { font-family: var(--body-font-family);}@media (min-width: 576px) { .container { max-width: 510px; padding-right: 0; padding-left: 0; --block-spacing-vertical: calc(var(--spacing) * 2.5); }}@media (min-width: 768px) { .container { max-width: 700px; --block-spacing-vertical: calc(var(--spacing) * 3); }}@media (min-width: 992px) { .container { max-width: 920px; --block-spacing-vertical: calc(var(--spacing) * 3.5); }}@media (min-width: 1200px) { .container { max-width: 1130px; --block-spacing-vertical: calc(var(--spacing) * 4); }}.container { width: 100%; margin-right: auto; margin-left: auto; display: block; padding: var(--block-spacing-vertical) var(--block-spacing-horizontal);}h1,h2,h3 { line-height: 120%; margin-top: 0.8rem; margin-bottom: 0.8rem;}p { font-weight: 400; line-height: 170%; margin-top: 0.8rem; margin-bottom: 1.6rem;}body { padding: 0; margin: 0;}.sb-show-main.sb-main-padded { padding: 0;}h1,h2,h3,h4,h5,h6 { --font-weight: 700;}h1 { --font-size: 3rem; --typography-spacing-vertical: 0.5rem;}h2 { --font-size: 2rem; --typography-spacing-vertical: 0.5rem;}h3 { --font-size: 1.75rem; --typography-spacing-vertical: 0.5rem;}h4 { --font-size: 1.5rem; --typography-spacing-vertical: 0.5rem;}h5 { --font-size: 1.25rem; --typography-spacing-vertical: 0.5rem;}h1,h2,h3,h4,h5,h6 { margin-top: 0; margin-bottom: var(--typography-spacing-vertical); color: var(--h-color); font-weight: var(--font-weight); font-size: var(--font-size); font-family: var(--header-font-family);}';
1031
- function de(r, t) {
996
+ }, pe = ':root,:host { --spacing: 1rem; --block-spacing-vertical: calc(var(--spacing) * 2); --block-spacing-horizontal: var(--spacing); --background-color: var(--eox-background-color, white); --color: var(--eox-color, #2c3d49); --h-color: var(--eox-h-color, var(--color)); --hover-transparency: var(--eox-hover-transparency, 20%); --bg-hover-transparency: var(--eox-bg-hover-transparency, 40%); --btn-hover-transparency: var(--eox-btn-hover-transparency, 80%); --primary-color: var(--eox-primary-color, #004170); --primary-color-hover: color-mix( in srgb, var(--primary-color) var(--hover-transparency), transparent ); --primary-bg-color-hover: color-mix( in srgb, var(--primary-color) var(--bg-hover-transparency), transparent ); --primary-btn-color-hover: color-mix( in srgb, var(--primary-color) var(--btn-hover-transparency), transparent ); --secondary-color: var(--eox-secondary-color, #c6d4df); --secondary-color-hover: color-mix( in srgb, var(--secondary-color) var(--hover-transparency), transparent ); --secondary-bg-color-hover: color-mix( in srgb, var(--secondary-color) var(--bg-hover-transparency), transparent ); --secondary-btn-color-hover: color-mix( in srgb, var(--secondary-color) var(--btn-hover-transparency), transparent ); --success: var(--eox-success, #26cc0f); --warning: var(--eox-warning, #f18e32); --error: var(--eox-error, #ff5252); --header-font-family: var(--eox-header-font-family, "Roboto", sans-serif); --body-font-family: var(--eox-body-font-family, "Roboto", sans-serif);}* { font-size: normal; font-family: var(--body-font-family); color: var(--eox-color);}h1,h2,h3,h4,h5,h6 { font-family: var(--header-font-family);}span,p,div,main,label { font-family: var(--body-font-family);}@media (min-width: 576px) { .container { max-width: 510px; padding-right: 0; padding-left: 0; --block-spacing-vertical: calc(var(--spacing) * 2.5); }}@media (min-width: 768px) { .container { max-width: 700px; --block-spacing-vertical: calc(var(--spacing) * 3); }}@media (min-width: 992px) { .container { max-width: 920px; --block-spacing-vertical: calc(var(--spacing) * 3.5); }}@media (min-width: 1200px) { .container { max-width: 1130px; --block-spacing-vertical: calc(var(--spacing) * 4); }}.container { width: 100%; margin-right: auto; margin-left: auto; display: block; padding: var(--block-spacing-vertical) var(--block-spacing-horizontal);}h1,h2,h3 { line-height: 120%; margin-top: 0.8rem; margin-bottom: 0.8rem;}p { --font-size: 1rem; font-weight: 400; line-height: 170%; margin-top: 0.8rem; margin-bottom: 1.6rem; font-size: var(--font-size);}body { padding: 0; margin: 0;}.sb-show-main.sb-main-padded { padding: 0;}h1,h2,h3,h4,h5,h6 { --font-weight: 700;}h1 { --font-size: 3rem; --typography-spacing-vertical: 0.5rem;}h2 { --font-size: 2rem; --typography-spacing-vertical: 0.5rem;}h3 { --font-size: 1.75rem; --typography-spacing-vertical: 0.5rem;}h4 { --font-size: 1.5rem; --typography-spacing-vertical: 0.5rem;}h5 { --font-size: 1.25rem; --typography-spacing-vertical: 0.5rem;}h1,h2,h3,h4,h5,h6 { margin-top: 0; margin-bottom: var(--typography-spacing-vertical); color: var(--h-color); font-weight: var(--font-weight); font-size: var(--font-size); font-family: var(--header-font-family);}';
997
+ function ue(i, t) {
1032
998
  function e(n) {
1033
999
  n.preventDefault(), n.stopPropagation();
1034
1000
  }
1035
- function i(n) {
1001
+ function r(n) {
1036
1002
  n.srcElement.style.opacity = "0.4";
1037
1003
  }
1038
1004
  function s(n) {
1039
1005
  n.srcElement.style.opacity = "1";
1040
1006
  }
1041
1007
  ["dragenter", "dragover", "dragleave", "drop"].forEach((n) => {
1042
- t.addEventListener(n, e, !1), ["dragenter", "dragover"].includes(n) ? t.addEventListener(n, i, !1) : t.addEventListener(n, s, !1);
1043
- }), t.addEventListener("drop", (n) => wt(n, r), !1);
1008
+ t.addEventListener(n, e, !1), ["dragenter", "dragover"].includes(n) ? t.addEventListener(n, r, !1) : t.addEventListener(n, s, !1);
1009
+ }), t.addEventListener("drop", (n) => _t(n, i), !1);
1044
1010
  }
1045
- function pe(r) {
1046
- r.preventDefault(), r.stopPropagation();
1011
+ function ye(i) {
1012
+ i.preventDefault(), i.stopPropagation();
1047
1013
  }
1048
- function wt(r, t) {
1049
- pe(r);
1050
- const e = r.dataTransfer ? r.dataTransfer.files : r.target.files;
1051
- Array.from(e).forEach((i) => ue(i, t));
1014
+ function _t(i, t) {
1015
+ ye(i);
1016
+ const e = i.dataTransfer ? i.dataTransfer.files : i.target.files;
1017
+ Array.from(e).forEach((r) => ge(r, t));
1052
1018
  }
1053
- function ue(r, t) {
1019
+ function ge(i, t) {
1054
1020
  const e = new FileReader();
1055
- e.readAsText(r), e.onloadend = function() {
1021
+ e.readAsText(i), e.onloadend = function() {
1056
1022
  typeof e.result == "string" && t.handleFeatureChange(e.result);
1057
1023
  };
1058
1024
  }
1059
- var m, L, R;
1060
- class ge extends x {
1025
+ var C, F, L;
1026
+ class fe extends _ {
1061
1027
  constructor() {
1062
1028
  super();
1063
1029
  /**
1064
1030
  * @type import("../../map/main").EOxMap
1065
1031
  */
1066
- S(this, m, void 0);
1032
+ S(this, C);
1067
1033
  /**
1068
1034
  * @type import("ol").Map
1069
1035
  */
1070
- S(this, L, void 0);
1036
+ S(this, F);
1071
1037
  /**
1072
1038
  * @type string
1073
1039
  */
1074
- S(this, R, void 0);
1040
+ S(this, L);
1075
1041
  this.allowModify = !1, this.for = "eox-map", this.currentlyDrawing = !1, this.draw = null, this.drawLayer = null, this.drawnFeatures = [], this.modify = null, this.multipleFeatures = !1, this.importFeatures = !1, this.showEditor = !1, this.showList = !1, this.type = "Polygon", this.unstyled = !1, this.noShadow = !1;
1076
1042
  }
1077
1043
  // Define properties with defaults and types
@@ -1097,31 +1063,31 @@ class ge extends x {
1097
1063
  * @onClick Event handler triggered to start drawing on the map.
1098
1064
  */
1099
1065
  handleStartDrawing() {
1100
- oe(this);
1066
+ le(this);
1101
1067
  }
1102
1068
  /**
1103
1069
  * @onClick Event handler triggered to discard/stop drawing
1104
1070
  * on the map and delete the drawn shapes.
1105
1071
  */
1106
1072
  handleDiscardDrawing() {
1107
- le(this);
1073
+ he(this);
1108
1074
  }
1109
1075
  /**
1110
1076
  * @param {string} text - The string representation of the features to be parsed.
1111
1077
  * @param {boolean} replaceFeatures - A boolean flag indicating whether to replace the existing features.
1112
1078
  */
1113
- handleFeatureChange(e, i = !1) {
1114
- g(this, m).parseTextToFeature(
1115
- e || JSON.stringify(ct),
1079
+ handleFeatureChange(e, r = !1) {
1080
+ this.eoxMap.parseTextToFeature(
1081
+ e || JSON.stringify(ht),
1116
1082
  this.drawLayer,
1117
- i
1083
+ r
1118
1084
  );
1119
1085
  }
1120
1086
  /**
1121
1087
  * @param {DragEvent | Event} evt - The event object from the file input interaction.
1122
1088
  */
1123
1089
  handleFilesChange(e) {
1124
- wt(e, this);
1090
+ _t(e, this);
1125
1091
  }
1126
1092
  /**
1127
1093
  * @event onModifyEnd triggered when the modification of a shape is completed.
@@ -1133,8 +1099,8 @@ class ge extends x {
1133
1099
  * Update #geoJSON with stringify feature.
1134
1100
  */
1135
1101
  updateGeoJSON() {
1136
- E(this, R, JSON.stringify(
1137
- g(this, m).parseFeature(this.drawnFeatures) || ct,
1102
+ $(this, L, JSON.stringify(
1103
+ this.eoxMap.parseFeature(this.drawnFeatures) || ht,
1138
1104
  void 0,
1139
1105
  2
1140
1106
  ));
@@ -1143,7 +1109,7 @@ class ge extends x {
1143
1109
  * Triggers different events when the drawing of a shape is completed.
1144
1110
  */
1145
1111
  emitDrawnFeatures() {
1146
- ce(this, () => {
1112
+ de(this, () => {
1147
1113
  this.dispatchEvent(
1148
1114
  new CustomEvent("drawupdate", { detail: this.drawnFeatures })
1149
1115
  );
@@ -1161,17 +1127,30 @@ class ge extends x {
1161
1127
  * It then calls requestUpdate to trigger a re-render.
1162
1128
  */
1163
1129
  firstUpdated() {
1164
- const { EoxMap: e, OlMap: i } = ae(this, this.multipleFeatures);
1165
- E(this, m, e), E(this, L, i), this.importFeatures && de(this, g(this, m)), this.updateGeoJSON(), this.requestUpdate();
1130
+ const { EoxMap: e, OlMap: r } = pt(this, this.multipleFeatures);
1131
+ this.eoxMap = e, $(this, F, r), this.importFeatures && ue(this, this.eoxMap), this.updateGeoJSON(), this.requestUpdate();
1132
+ }
1133
+ updated(e) {
1134
+ if (e.has("for")) {
1135
+ const { EoxMap: r, OlMap: s } = pt(this, this.multipleFeatures);
1136
+ this.eoxMap = r, $(this, F, s);
1137
+ }
1138
+ }
1139
+ get eoxMap() {
1140
+ return b(this, C);
1141
+ }
1142
+ set eoxMap(e) {
1143
+ const r = b(this, C);
1144
+ $(this, C, e), this.requestUpdate("eoxMap", r);
1166
1145
  }
1167
1146
  // Render method for UI display
1168
1147
  render() {
1169
1148
  var e;
1170
- return _`
1149
+ return x`
1171
1150
  <style>
1172
1151
  :host { display: block; }
1173
- ${!this.unstyled && he}
1174
- ${!this.unstyled && se}
1152
+ ${!this.unstyled && pe}
1153
+ ${!this.unstyled && oe}
1175
1154
  </style>
1176
1155
 
1177
1156
  <!-- Controller Component -->
@@ -1179,8 +1158,8 @@ class ge extends x {
1179
1158
  .drawFunc=${{
1180
1159
  start: () => this.handleStartDrawing(),
1181
1160
  discard: () => this.handleDiscardDrawing(),
1182
- editor: (i) => this.handleFeatureChange(i.target.value, !0),
1183
- import: (i) => this.handleFilesChange(i)
1161
+ editor: (r) => this.handleFeatureChange(r.target.value, !0),
1162
+ import: (r) => this.handleFilesChange(r)
1184
1163
  }}
1185
1164
  .unstyled=${this.unstyled}
1186
1165
  .drawnFeatures=${this.drawnFeatures}
@@ -1188,13 +1167,13 @@ class ge extends x {
1188
1167
  .multipleFeatures=${this.multipleFeatures}
1189
1168
  .importFeatures=${this.importFeatures}
1190
1169
  .showEditor=${this.showEditor}
1191
- .geoJSON=${g(this, R)}
1170
+ .geoJSON=${b(this, L)}
1192
1171
  ></eox-drawtools-controller>
1193
1172
 
1194
1173
  <!-- List Component -->
1195
- ${this.showList && ((e = this.drawnFeatures) != null && e.length) ? _`<eox-drawtools-list
1196
- .eoxMap=${g(this, m)}
1197
- .olMap=${g(this, L)}
1174
+ ${this.showList && ((e = this.drawnFeatures) != null && e.length) ? x`<eox-drawtools-list
1175
+ .eoxMap=${this.eoxMap}
1176
+ .olMap=${b(this, F)}
1198
1177
  .draw=${this.draw}
1199
1178
  .drawLayer=${this.drawLayer}
1200
1179
  .drawnFeatures=${this.drawnFeatures}
@@ -1207,8 +1186,8 @@ class ge extends x {
1207
1186
  `;
1208
1187
  }
1209
1188
  }
1210
- m = new WeakMap(), L = new WeakMap(), R = new WeakMap();
1211
- customElements.define("eox-drawtools", ge);
1189
+ C = new WeakMap(), F = new WeakMap(), L = new WeakMap();
1190
+ customElements.define("eox-drawtools", fe);
1212
1191
  export {
1213
- ge as EOxDrawTools
1192
+ fe as EOxDrawTools
1214
1193
  };