@eox/drawtools 0.3.0 → 0.4.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,24 +1,21 @@
1
- var _t = Object.defineProperty;
2
- var $t = (r, t, e) => t in r ? _t(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
3
- var p = (r, t, e) => ($t(r, typeof t != "symbol" ? t + "" : t, e), e);
4
1
  /**
5
2
  * @license
6
3
  * Copyright 2019 Google LLC
7
4
  * SPDX-License-Identifier: BSD-3-Clause
8
5
  */
9
- const D = window, Q = D.ShadowRoot && (D.ShadyCSS === void 0 || D.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, ht = Symbol(), G = /* @__PURE__ */ new WeakMap();
10
- let vt = class {
6
+ const T = window, J = T.ShadowRoot && (T.ShadyCSS === void 0 || T.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, at = Symbol(), Q = /* @__PURE__ */ new WeakMap();
7
+ let ut = class {
11
8
  constructor(t, e, i) {
12
- if (this._$cssResult$ = !0, i !== ht)
9
+ if (this._$cssResult$ = !0, i !== at)
13
10
  throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
14
11
  this.cssText = t, this.t = e;
15
12
  }
16
13
  get styleSheet() {
17
14
  let t = this.o;
18
15
  const e = this.t;
19
- if (Q && t === void 0) {
16
+ if (J && t === void 0) {
20
17
  const i = e !== void 0 && e.length === 1;
21
- i && (t = G.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && G.set(e, t));
18
+ i && (t = Q.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && Q.set(e, t));
22
19
  }
23
20
  return t;
24
21
  }
@@ -26,27 +23,27 @@ let vt = class {
26
23
  return this.cssText;
27
24
  }
28
25
  };
29
- const yt = (r) => new vt(typeof r == "string" ? r : r + "", void 0, ht), ft = (r, t) => {
30
- Q ? r.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet) : t.forEach((e) => {
31
- const i = document.createElement("style"), s = D.litNonce;
26
+ const _t = (r) => new ut(typeof r == "string" ? r : r + "", void 0, at), $t = (r, t) => {
27
+ J ? r.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet) : t.forEach((e) => {
28
+ const i = document.createElement("style"), s = T.litNonce;
32
29
  s !== void 0 && i.setAttribute("nonce", s), i.textContent = e.cssText, r.appendChild(i);
33
30
  });
34
- }, X = Q ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
31
+ }, X = J ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
35
32
  let e = "";
36
33
  for (const i of t.cssRules)
37
34
  e += i.cssText;
38
- return yt(e);
35
+ return _t(e);
39
36
  })(r) : r;
40
37
  /**
41
38
  * @license
42
39
  * Copyright 2017 Google LLC
43
40
  * SPDX-License-Identifier: BSD-3-Clause
44
41
  */
45
- var j;
46
- const k = window, Y = k.trustedTypes, gt = Y ? Y.emptyScript : "", tt = k.reactiveElementPolyfillSupport, K = { toAttribute(r, t) {
42
+ var I;
43
+ const D = window, G = D.trustedTypes, vt = G ? G.emptyScript : "", Y = D.reactiveElementPolyfillSupport, W = { toAttribute(r, t) {
47
44
  switch (t) {
48
45
  case Boolean:
49
- r = r ? gt : null;
46
+ r = r ? vt : null;
50
47
  break;
51
48
  case Object:
52
49
  case Array:
@@ -71,8 +68,8 @@ const k = window, Y = k.trustedTypes, gt = Y ? Y.emptyScript : "", tt = k.reacti
71
68
  }
72
69
  }
73
70
  return e;
74
- } }, dt = (r, t) => t !== r && (t == t || r == r), z = { attribute: !0, type: String, converter: K, reflect: !1, hasChanged: dt }, J = "finalized";
75
- let w = class extends HTMLElement {
71
+ } }, ht = (r, t) => t !== r && (t == t || r == r), B = { attribute: !0, type: String, converter: W, reflect: !1, hasChanged: ht }, K = "finalized";
72
+ let A = class extends HTMLElement {
76
73
  constructor() {
77
74
  super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this.u();
78
75
  }
@@ -88,7 +85,7 @@ let w = class extends HTMLElement {
88
85
  s !== void 0 && (this._$Ev.set(s, i), t.push(s));
89
86
  }), t;
90
87
  }
91
- static createProperty(t, e = z) {
88
+ static createProperty(t, e = B) {
92
89
  if (e.state && (e.attribute = !1), this.finalize(), this.elementProperties.set(t, e), !e.noAccessor && !this.prototype.hasOwnProperty(t)) {
93
90
  const i = typeof t == "symbol" ? Symbol() : "__" + t, s = this.getPropertyDescriptor(t, i, e);
94
91
  s !== void 0 && Object.defineProperty(this.prototype, t, s);
@@ -98,17 +95,17 @@ let w = class extends HTMLElement {
98
95
  return { get() {
99
96
  return this[e];
100
97
  }, set(s) {
101
- const o = this[t];
102
- this[e] = s, this.requestUpdate(t, o, i);
98
+ const n = this[t];
99
+ this[e] = s, this.requestUpdate(t, n, i);
103
100
  }, configurable: !0, enumerable: !0 };
104
101
  }
105
102
  static getPropertyOptions(t) {
106
- return this.elementProperties.get(t) || z;
103
+ return this.elementProperties.get(t) || B;
107
104
  }
108
105
  static finalize() {
109
- if (this.hasOwnProperty(J))
106
+ if (this.hasOwnProperty(K))
110
107
  return !1;
111
- this[J] = !0;
108
+ this[K] = !0;
112
109
  const t = Object.getPrototypeOf(this);
113
110
  if (t.finalize(), t.h !== void 0 && (this.h = [...t.h]), this.elementProperties = new Map(t.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) {
114
111
  const e = this.properties, i = [...Object.getOwnPropertyNames(e), ...Object.getOwnPropertySymbols(e)];
@@ -151,7 +148,7 @@ let w = class extends HTMLElement {
151
148
  createRenderRoot() {
152
149
  var t;
153
150
  const e = (t = this.shadowRoot) !== null && t !== void 0 ? t : this.attachShadow(this.constructor.shadowRootOptions);
154
- return ft(e, this.constructor.elementStyles), e;
151
+ return $t(e, this.constructor.elementStyles), e;
155
152
  }
156
153
  connectedCallback() {
157
154
  var t;
@@ -172,25 +169,25 @@ let w = class extends HTMLElement {
172
169
  attributeChangedCallback(t, e, i) {
173
170
  this._$AK(t, i);
174
171
  }
175
- _$EO(t, e, i = z) {
172
+ _$EO(t, e, i = B) {
176
173
  var s;
177
- const o = this.constructor._$Ep(t, i);
178
- if (o !== void 0 && i.reflect === !0) {
179
- const n = (((s = i.converter) === null || s === void 0 ? void 0 : s.toAttribute) !== void 0 ? i.converter : K).toAttribute(e, i.type);
180
- this._$El = t, n == null ? this.removeAttribute(o) : this.setAttribute(o, n), this._$El = null;
174
+ const n = this.constructor._$Ep(t, i);
175
+ if (n !== void 0 && i.reflect === !0) {
176
+ const o = (((s = i.converter) === null || s === void 0 ? void 0 : s.toAttribute) !== void 0 ? i.converter : W).toAttribute(e, i.type);
177
+ this._$El = t, o == null ? this.removeAttribute(n) : this.setAttribute(n, o), this._$El = null;
181
178
  }
182
179
  }
183
180
  _$AK(t, e) {
184
181
  var i;
185
- const s = this.constructor, o = s._$Ev.get(t);
186
- if (o !== void 0 && this._$El !== o) {
187
- const n = s.getPropertyOptions(o), d = typeof n.converter == "function" ? { fromAttribute: n.converter } : ((i = n.converter) === null || i === void 0 ? void 0 : i.fromAttribute) !== void 0 ? n.converter : K;
188
- this._$El = o, this[o] = d.fromAttribute(e, n.type), this._$El = null;
182
+ const s = this.constructor, n = s._$Ev.get(t);
183
+ if (n !== void 0 && this._$El !== n) {
184
+ const o = s.getPropertyOptions(n), d = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((i = o.converter) === null || i === void 0 ? void 0 : i.fromAttribute) !== void 0 ? o.converter : W;
185
+ this._$El = n, this[n] = d.fromAttribute(e, o.type), this._$El = null;
189
186
  }
190
187
  }
191
188
  requestUpdate(t, e, i) {
192
189
  let s = !0;
193
- t !== void 0 && (((i = i || this.constructor.getPropertyOptions(t)).hasChanged || dt)(this[t], e) ? (this._$AL.has(t) || this._$AL.set(t, e), i.reflect === !0 && this._$El !== t && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t, i))) : s = !1), !this.isUpdatePending && s && (this._$E_ = this._$Ej());
190
+ t !== void 0 && (((i = i || this.constructor.getPropertyOptions(t)).hasChanged || ht)(this[t], e) ? (this._$AL.has(t) || this._$AL.set(t, e), i.reflect === !0 && this._$El !== t && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t, i))) : s = !1), !this.isUpdatePending && s && (this._$E_ = this._$Ej());
194
191
  }
195
192
  async _$Ej() {
196
193
  this.isUpdatePending = !0;
@@ -209,13 +206,13 @@ let w = class extends HTMLElement {
209
206
  var t;
210
207
  if (!this.isUpdatePending)
211
208
  return;
212
- this.hasUpdated, this._$Ei && (this._$Ei.forEach((s, o) => this[o] = s), this._$Ei = void 0);
209
+ this.hasUpdated, this._$Ei && (this._$Ei.forEach((s, n) => this[n] = s), this._$Ei = void 0);
213
210
  let e = !1;
214
211
  const i = this._$AL;
215
212
  try {
216
213
  e = this.shouldUpdate(i), e ? (this.willUpdate(i), (t = this._$ES) === null || t === void 0 || t.forEach((s) => {
217
- var o;
218
- return (o = s.hostUpdate) === null || o === void 0 ? void 0 : o.call(s);
214
+ var n;
215
+ return (n = s.hostUpdate) === null || n === void 0 ? void 0 : n.call(s);
219
216
  }), this.update(i)) : this._$Ek();
220
217
  } catch (s) {
221
218
  throw e = !1, this._$Ek(), s;
@@ -251,75 +248,75 @@ let w = class extends HTMLElement {
251
248
  firstUpdated(t) {
252
249
  }
253
250
  };
254
- w[J] = !0, w.elementProperties = /* @__PURE__ */ new Map(), w.elementStyles = [], w.shadowRootOptions = { mode: "open" }, tt == null || tt({ ReactiveElement: w }), ((j = k.reactiveElementVersions) !== null && j !== void 0 ? j : k.reactiveElementVersions = []).push("1.6.2");
251
+ A[K] = !0, A.elementProperties = /* @__PURE__ */ new Map(), A.elementStyles = [], A.shadowRootOptions = { mode: "open" }, Y == null || Y({ ReactiveElement: A }), ((I = D.reactiveElementVersions) !== null && I !== void 0 ? I : D.reactiveElementVersions = []).push("1.6.2");
255
252
  /**
256
253
  * @license
257
254
  * Copyright 2017 Google LLC
258
255
  * SPDX-License-Identifier: BSD-3-Clause
259
256
  */
260
- var B;
261
- const R = window, E = R.trustedTypes, et = E ? E.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, Z = "$lit$", f = `lit$${(Math.random() + "").slice(9)}$`, ct = "?" + f, At = `<${ct}>`, m = document, U = () => m.createComment(""), M = (r) => r === null || typeof r != "object" && typeof r != "function", ut = Array.isArray, mt = (r) => ut(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", F = `[
262
- \f\r]`, x = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, it = /-->/g, st = />/g, g = RegExp(`>|${F}(?:([^\\s"'>=/]+)(${F}*=${F}*(?:[^
263
- \f\r"'\`<>=]|("|')|))|$)`, "g"), rt = /'/g, nt = /"/g, pt = /^(?:script|style|textarea|title)$/i, wt = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), Et = wt(1), S = Symbol.for("lit-noChange"), u = Symbol.for("lit-nothing"), ot = /* @__PURE__ */ new WeakMap(), A = m.createTreeWalker(m, 129, null, !1), St = (r, t) => {
257
+ var z;
258
+ const L = window, b = L.trustedTypes, tt = b ? b.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, Z = "$lit$", y = `lit$${(Math.random() + "").slice(9)}$`, dt = "?" + y, yt = `<${dt}>`, m = document, P = () => m.createComment(""), H = (r) => r === null || typeof r != "object" && typeof r != "function", ct = Array.isArray, ft = (r) => ct(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", V = `[
259
+ \f\r]`, S = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, et = /-->/g, it = />/g, f = RegExp(`>|${V}(?:([^\\s"'>=/]+)(${V}*=${V}*(?:[^
260
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), st = /'/g, rt = /"/g, pt = /^(?:script|style|textarea|title)$/i, gt = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), mt = gt(1), w = Symbol.for("lit-noChange"), p = Symbol.for("lit-nothing"), ot = /* @__PURE__ */ new WeakMap(), g = m.createTreeWalker(m, 129, null, !1), At = (r, t) => {
264
261
  const e = r.length - 1, i = [];
265
- let s, o = t === 2 ? "<svg>" : "", n = x;
262
+ let s, n = t === 2 ? "<svg>" : "", o = S;
266
263
  for (let l = 0; l < e; l++) {
267
264
  const a = r[l];
268
- let y, h, c = -1, _ = 0;
269
- for (; _ < a.length && (n.lastIndex = _, h = n.exec(a), h !== null); )
270
- _ = n.lastIndex, n === x ? h[1] === "!--" ? n = it : h[1] !== void 0 ? n = st : h[2] !== void 0 ? (pt.test(h[2]) && (s = RegExp("</" + h[2], "g")), n = g) : h[3] !== void 0 && (n = g) : n === g ? h[0] === ">" ? (n = s ?? x, c = -1) : h[1] === void 0 ? c = -2 : (c = n.lastIndex - h[2].length, y = h[1], n = h[3] === void 0 ? g : h[3] === '"' ? nt : rt) : n === nt || n === rt ? n = g : n === it || n === st ? n = x : (n = g, s = void 0);
271
- const O = n === g && r[l + 1].startsWith("/>") ? " " : "";
272
- o += n === x ? a + At : c >= 0 ? (i.push(y), a.slice(0, c) + Z + a.slice(c) + f + O) : a + f + (c === -2 ? (i.push(void 0), l) : O);
265
+ let v, h, c = -1, _ = 0;
266
+ for (; _ < a.length && (o.lastIndex = _, h = o.exec(a), h !== null); )
267
+ _ = o.lastIndex, o === S ? h[1] === "!--" ? o = et : h[1] !== void 0 ? o = it : h[2] !== void 0 ? (pt.test(h[2]) && (s = RegExp("</" + h[2], "g")), o = f) : h[3] !== void 0 && (o = f) : o === f ? h[0] === ">" ? (o = s ?? S, c = -1) : h[1] === void 0 ? c = -2 : (c = o.lastIndex - h[2].length, v = h[1], o = h[3] === void 0 ? f : h[3] === '"' ? rt : st) : o === rt || o === st ? o = f : o === et || o === it ? o = S : (o = f, s = void 0);
268
+ const k = o === f && r[l + 1].startsWith("/>") ? " " : "";
269
+ n += o === S ? a + yt : c >= 0 ? (i.push(v), a.slice(0, c) + Z + a.slice(c) + y + k) : a + y + (c === -2 ? (i.push(void 0), l) : k);
273
270
  }
274
- const d = o + (r[e] || "<?>") + (t === 2 ? "</svg>" : "");
271
+ const d = n + (r[e] || "<?>") + (t === 2 ? "</svg>" : "");
275
272
  if (!Array.isArray(r) || !r.hasOwnProperty("raw"))
276
273
  throw Error("invalid template strings array");
277
- return [et !== void 0 ? et.createHTML(d) : d, i];
274
+ return [tt !== void 0 ? tt.createHTML(d) : d, i];
278
275
  };
279
- class H {
276
+ class U {
280
277
  constructor({ strings: t, _$litType$: e }, i) {
281
278
  let s;
282
279
  this.parts = [];
283
- let o = 0, n = 0;
284
- const d = t.length - 1, l = this.parts, [a, y] = St(t, e);
285
- if (this.el = H.createElement(a, i), A.currentNode = this.el.content, e === 2) {
280
+ let n = 0, o = 0;
281
+ const d = t.length - 1, l = this.parts, [a, v] = At(t, e);
282
+ if (this.el = U.createElement(a, i), g.currentNode = this.el.content, e === 2) {
286
283
  const h = this.el.content, c = h.firstChild;
287
284
  c.remove(), h.append(...c.childNodes);
288
285
  }
289
- for (; (s = A.nextNode()) !== null && l.length < d; ) {
286
+ for (; (s = g.nextNode()) !== null && l.length < d; ) {
290
287
  if (s.nodeType === 1) {
291
288
  if (s.hasAttributes()) {
292
289
  const h = [];
293
290
  for (const c of s.getAttributeNames())
294
- if (c.endsWith(Z) || c.startsWith(f)) {
295
- const _ = y[n++];
291
+ if (c.endsWith(Z) || c.startsWith(y)) {
292
+ const _ = v[o++];
296
293
  if (h.push(c), _ !== void 0) {
297
- const O = s.getAttribute(_.toLowerCase() + Z).split(f), T = /([.?@])?(.*)/.exec(_);
298
- l.push({ type: 1, index: o, name: T[2], strings: O, ctor: T[1] === "." ? Ct : T[1] === "?" ? Pt : T[1] === "@" ? Ut : I });
294
+ const k = s.getAttribute(_.toLowerCase() + Z).split(y), N = /([.?@])?(.*)/.exec(_);
295
+ l.push({ type: 1, index: n, name: N[2], strings: k, ctor: N[1] === "." ? wt : N[1] === "?" ? xt : N[1] === "@" ? St : R });
299
296
  } else
300
- l.push({ type: 6, index: o });
297
+ l.push({ type: 6, index: n });
301
298
  }
302
299
  for (const c of h)
303
300
  s.removeAttribute(c);
304
301
  }
305
302
  if (pt.test(s.tagName)) {
306
- const h = s.textContent.split(f), c = h.length - 1;
303
+ const h = s.textContent.split(y), c = h.length - 1;
307
304
  if (c > 0) {
308
- s.textContent = E ? E.emptyScript : "";
305
+ s.textContent = b ? b.emptyScript : "";
309
306
  for (let _ = 0; _ < c; _++)
310
- s.append(h[_], U()), A.nextNode(), l.push({ type: 2, index: ++o });
311
- s.append(h[c], U());
307
+ s.append(h[_], P()), g.nextNode(), l.push({ type: 2, index: ++n });
308
+ s.append(h[c], P());
312
309
  }
313
310
  }
314
311
  } else if (s.nodeType === 8)
315
- if (s.data === ct)
316
- l.push({ type: 2, index: o });
312
+ if (s.data === dt)
313
+ l.push({ type: 2, index: n });
317
314
  else {
318
315
  let h = -1;
319
- for (; (h = s.data.indexOf(f, h + 1)) !== -1; )
320
- l.push({ type: 7, index: o }), h += f.length - 1;
316
+ for (; (h = s.data.indexOf(y, h + 1)) !== -1; )
317
+ l.push({ type: 7, index: n }), h += y.length - 1;
321
318
  }
322
- o++;
319
+ n++;
323
320
  }
324
321
  }
325
322
  static createElement(t, e) {
@@ -327,13 +324,13 @@ class H {
327
324
  return i.innerHTML = t, i;
328
325
  }
329
326
  }
330
- function b(r, t, e = r, i) {
331
- var s, o, n, d;
332
- if (t === S)
327
+ function E(r, t, e = r, i) {
328
+ var s, n, o, d;
329
+ if (t === w)
333
330
  return t;
334
331
  let l = i !== void 0 ? (s = e._$Co) === null || s === void 0 ? void 0 : s[i] : e._$Cl;
335
- const a = M(t) ? void 0 : t._$litDirective$;
336
- return (l == null ? void 0 : l.constructor) !== a && ((o = l == null ? void 0 : l._$AO) === null || o === void 0 || o.call(l, !1), a === void 0 ? l = void 0 : (l = new a(r), l._$AT(r, e, i)), i !== void 0 ? ((n = (d = e)._$Co) !== null && n !== void 0 ? n : d._$Co = [])[i] = l : e._$Cl = l), l !== void 0 && (t = b(r, l._$AS(r, t.values), l, i)), t;
332
+ const a = H(t) ? void 0 : t._$litDirective$;
333
+ return (l == null ? void 0 : l.constructor) !== a && ((n = l == null ? void 0 : l._$AO) === null || n === void 0 || n.call(l, !1), a === void 0 ? l = void 0 : (l = new a(r), l._$AT(r, e, i)), i !== void 0 ? ((o = (d = e)._$Co) !== null && o !== void 0 ? o : d._$Co = [])[i] = l : e._$Cl = l), l !== void 0 && (t = E(r, l._$AS(r, t.values), l, i)), t;
337
334
  }
338
335
  class bt {
339
336
  constructor(t, e) {
@@ -347,17 +344,17 @@ class bt {
347
344
  }
348
345
  u(t) {
349
346
  var e;
350
- const { el: { content: i }, parts: s } = this._$AD, o = ((e = t == null ? void 0 : t.creationScope) !== null && e !== void 0 ? e : m).importNode(i, !0);
351
- A.currentNode = o;
352
- let n = A.nextNode(), d = 0, l = 0, a = s[0];
347
+ const { el: { content: i }, parts: s } = this._$AD, n = ((e = t == null ? void 0 : t.creationScope) !== null && e !== void 0 ? e : m).importNode(i, !0);
348
+ g.currentNode = n;
349
+ let o = g.nextNode(), d = 0, l = 0, a = s[0];
353
350
  for (; a !== void 0; ) {
354
351
  if (d === a.index) {
355
- let y;
356
- a.type === 2 ? y = new N(n, n.nextSibling, this, t) : a.type === 1 ? y = new a.ctor(n, a.name, a.strings, this, t) : a.type === 6 && (y = new Mt(n, this, t)), this._$AV.push(y), a = s[++l];
352
+ let v;
353
+ a.type === 2 ? v = new M(o, o.nextSibling, this, t) : a.type === 1 ? v = new a.ctor(o, a.name, a.strings, this, t) : a.type === 6 && (v = new Ct(o, this, t)), this._$AV.push(v), a = s[++l];
357
354
  }
358
- d !== (a == null ? void 0 : a.index) && (n = A.nextNode(), d++);
355
+ d !== (a == null ? void 0 : a.index) && (o = g.nextNode(), d++);
359
356
  }
360
- return A.currentNode = m, o;
357
+ return g.currentNode = m, n;
361
358
  }
362
359
  v(t) {
363
360
  let e = 0;
@@ -365,10 +362,10 @@ class bt {
365
362
  i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
366
363
  }
367
364
  }
368
- class N {
365
+ class M {
369
366
  constructor(t, e, i, s) {
370
- var o;
371
- this.type = 2, this._$AH = u, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = s, this._$Cp = (o = s == null ? void 0 : s.isConnected) === null || o === void 0 || o;
367
+ var n;
368
+ this.type = 2, this._$AH = p, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = s, this._$Cp = (n = s == null ? void 0 : s.isConnected) === null || n === void 0 || n;
372
369
  }
373
370
  get _$AU() {
374
371
  var t, e;
@@ -386,7 +383,7 @@ class N {
386
383
  return this._$AB;
387
384
  }
388
385
  _$AI(t, e = this) {
389
- t = b(this, t, e), M(t) ? t === u || t == null || t === "" ? (this._$AH !== u && this._$AR(), this._$AH = u) : t !== this._$AH && t !== S && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : mt(t) ? this.T(t) : this._(t);
386
+ t = E(this, t, e), H(t) ? t === p || t == null || t === "" ? (this._$AH !== p && this._$AR(), this._$AH = p) : t !== this._$AH && t !== w && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : ft(t) ? this.T(t) : this._(t);
390
387
  }
391
388
  k(t) {
392
389
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -395,28 +392,28 @@ class N {
395
392
  this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
396
393
  }
397
394
  _(t) {
398
- this._$AH !== u && M(this._$AH) ? this._$AA.nextSibling.data = t : this.$(m.createTextNode(t)), this._$AH = t;
395
+ this._$AH !== p && H(this._$AH) ? this._$AA.nextSibling.data = t : this.$(m.createTextNode(t)), this._$AH = t;
399
396
  }
400
397
  g(t) {
401
398
  var e;
402
- const { values: i, _$litType$: s } = t, o = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = H.createElement(s.h, this.options)), s);
403
- if (((e = this._$AH) === null || e === void 0 ? void 0 : e._$AD) === o)
399
+ const { values: i, _$litType$: s } = t, n = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = U.createElement(s.h, this.options)), s);
400
+ if (((e = this._$AH) === null || e === void 0 ? void 0 : e._$AD) === n)
404
401
  this._$AH.v(i);
405
402
  else {
406
- const n = new bt(o, this), d = n.u(this.options);
407
- n.v(i), this.$(d), this._$AH = n;
403
+ const o = new bt(n, this), d = o.u(this.options);
404
+ o.v(i), this.$(d), this._$AH = o;
408
405
  }
409
406
  }
410
407
  _$AC(t) {
411
408
  let e = ot.get(t.strings);
412
- return e === void 0 && ot.set(t.strings, e = new H(t)), e;
409
+ return e === void 0 && ot.set(t.strings, e = new U(t)), e;
413
410
  }
414
411
  T(t) {
415
- ut(this._$AH) || (this._$AH = [], this._$AR());
412
+ ct(this._$AH) || (this._$AH = [], this._$AR());
416
413
  const e = this._$AH;
417
414
  let i, s = 0;
418
- for (const o of t)
419
- s === e.length ? e.push(i = new N(this.k(U()), this.k(U()), this, this.options)) : i = e[s], i._$AI(o), s++;
415
+ for (const n of t)
416
+ s === e.length ? e.push(i = new M(this.k(P()), this.k(P()), this, this.options)) : i = e[s], i._$AI(n), s++;
420
417
  s < e.length && (this._$AR(i && i._$AB.nextSibling, s), e.length = s);
421
418
  }
422
419
  _$AR(t = this._$AA.nextSibling, e) {
@@ -431,9 +428,9 @@ class N {
431
428
  this._$AM === void 0 && (this._$Cp = t, (e = this._$AP) === null || e === void 0 || e.call(this, t));
432
429
  }
433
430
  }
434
- class I {
435
- constructor(t, e, i, s, o) {
436
- this.type = 1, this._$AH = u, this._$AN = void 0, this.element = t, this.name = e, this._$AM = s, this.options = o, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = u;
431
+ class R {
432
+ constructor(t, e, i, s, n) {
433
+ this.type = 1, this._$AH = p, 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 = p;
437
434
  }
438
435
  get tagName() {
439
436
  return this.element.tagName;
@@ -442,56 +439,56 @@ class I {
442
439
  return this._$AM._$AU;
443
440
  }
444
441
  _$AI(t, e = this, i, s) {
445
- const o = this.strings;
446
- let n = !1;
447
- if (o === void 0)
448
- t = b(this, t, e, 0), n = !M(t) || t !== this._$AH && t !== S, n && (this._$AH = t);
442
+ const n = this.strings;
443
+ let o = !1;
444
+ if (n === void 0)
445
+ t = E(this, t, e, 0), o = !H(t) || t !== this._$AH && t !== w, o && (this._$AH = t);
449
446
  else {
450
447
  const d = t;
451
448
  let l, a;
452
- for (t = o[0], l = 0; l < o.length - 1; l++)
453
- a = b(this, d[i + l], e, l), a === S && (a = this._$AH[l]), n || (n = !M(a) || a !== this._$AH[l]), a === u ? t = u : t !== u && (t += (a ?? "") + o[l + 1]), this._$AH[l] = a;
449
+ for (t = n[0], l = 0; l < n.length - 1; l++)
450
+ a = E(this, d[i + l], e, l), a === w && (a = this._$AH[l]), o || (o = !H(a) || a !== this._$AH[l]), a === p ? t = p : t !== p && (t += (a ?? "") + n[l + 1]), this._$AH[l] = a;
454
451
  }
455
- n && !s && this.j(t);
452
+ o && !s && this.j(t);
456
453
  }
457
454
  j(t) {
458
- t === u ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
455
+ t === p ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
459
456
  }
460
457
  }
461
- class Ct extends I {
458
+ class wt extends R {
462
459
  constructor() {
463
460
  super(...arguments), this.type = 3;
464
461
  }
465
462
  j(t) {
466
- this.element[this.name] = t === u ? void 0 : t;
463
+ this.element[this.name] = t === p ? void 0 : t;
467
464
  }
468
465
  }
469
- const xt = E ? E.emptyScript : "";
470
- class Pt extends I {
466
+ const Et = b ? b.emptyScript : "";
467
+ class xt extends R {
471
468
  constructor() {
472
469
  super(...arguments), this.type = 4;
473
470
  }
474
471
  j(t) {
475
- t && t !== u ? this.element.setAttribute(this.name, xt) : this.element.removeAttribute(this.name);
472
+ t && t !== p ? this.element.setAttribute(this.name, Et) : this.element.removeAttribute(this.name);
476
473
  }
477
474
  }
478
- class Ut extends I {
479
- constructor(t, e, i, s, o) {
480
- super(t, e, i, s, o), this.type = 5;
475
+ class St extends R {
476
+ constructor(t, e, i, s, n) {
477
+ super(t, e, i, s, n), this.type = 5;
481
478
  }
482
479
  _$AI(t, e = this) {
483
480
  var i;
484
- if ((t = (i = b(this, t, e, 0)) !== null && i !== void 0 ? i : u) === S)
481
+ if ((t = (i = E(this, t, e, 0)) !== null && i !== void 0 ? i : p) === w)
485
482
  return;
486
- const s = this._$AH, o = t === u && s !== u || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, n = t !== u && (s === u || o);
487
- o && this.element.removeEventListener(this.name, this, s), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
483
+ const s = this._$AH, n = t === p && s !== p || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, o = t !== p && (s === p || n);
484
+ n && this.element.removeEventListener(this.name, this, s), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
488
485
  }
489
486
  handleEvent(t) {
490
487
  var e, i;
491
488
  typeof this._$AH == "function" ? this._$AH.call((i = (e = this.options) === null || e === void 0 ? void 0 : e.host) !== null && i !== void 0 ? i : this.element, t) : this._$AH.handleEvent(t);
492
489
  }
493
490
  }
494
- class Mt {
491
+ class Ct {
495
492
  constructor(t, e, i) {
496
493
  this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
497
494
  }
@@ -499,28 +496,28 @@ class Mt {
499
496
  return this._$AM._$AU;
500
497
  }
501
498
  _$AI(t) {
502
- b(this, t);
499
+ E(this, t);
503
500
  }
504
501
  }
505
- const lt = R.litHtmlPolyfillSupport;
506
- lt == null || lt(H, N), ((B = R.litHtmlVersions) !== null && B !== void 0 ? B : R.litHtmlVersions = []).push("2.7.4");
507
- const Ht = (r, t, e) => {
502
+ const nt = L.litHtmlPolyfillSupport;
503
+ nt == null || nt(U, M), ((z = L.litHtmlVersions) !== null && z !== void 0 ? z : L.litHtmlVersions = []).push("2.7.4");
504
+ const Pt = (r, t, e) => {
508
505
  var i, s;
509
- const o = (i = e == null ? void 0 : e.renderBefore) !== null && i !== void 0 ? i : t;
510
- let n = o._$litPart$;
511
- if (n === void 0) {
506
+ const n = (i = e == null ? void 0 : e.renderBefore) !== null && i !== void 0 ? i : t;
507
+ let o = n._$litPart$;
508
+ if (o === void 0) {
512
509
  const d = (s = e == null ? void 0 : e.renderBefore) !== null && s !== void 0 ? s : null;
513
- o._$litPart$ = n = new N(t.insertBefore(U(), d), d, void 0, e ?? {});
510
+ n._$litPart$ = o = new M(t.insertBefore(P(), d), d, void 0, e ?? {});
514
511
  }
515
- return n._$AI(r), n;
512
+ return o._$AI(r), o;
516
513
  };
517
514
  /**
518
515
  * @license
519
516
  * Copyright 2017 Google LLC
520
517
  * SPDX-License-Identifier: BSD-3-Clause
521
518
  */
522
- var q, V;
523
- class P extends w {
519
+ var j, F;
520
+ class C extends A {
524
521
  constructor() {
525
522
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
526
523
  }
@@ -531,7 +528,7 @@ class P extends w {
531
528
  }
532
529
  update(t) {
533
530
  const e = this.render();
534
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Ht(e, this.renderRoot, this.renderOptions);
531
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Pt(e, this.renderRoot, this.renderOptions);
535
532
  }
536
533
  connectedCallback() {
537
534
  var t;
@@ -542,22 +539,22 @@ class P extends w {
542
539
  super.disconnectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!1);
543
540
  }
544
541
  render() {
545
- return S;
542
+ return w;
546
543
  }
547
544
  }
548
- P.finalized = !0, P._$litElement$ = !0, (q = globalThis.litElementHydrateSupport) === null || q === void 0 || q.call(globalThis, { LitElement: P });
549
- const at = globalThis.litElementPolyfillSupport;
550
- at == null || at({ LitElement: P });
551
- ((V = globalThis.litElementVersions) !== null && V !== void 0 ? V : globalThis.litElementVersions = []).push("3.3.2");
545
+ C.finalized = !0, C._$litElement$ = !0, (j = globalThis.litElementHydrateSupport) === null || j === void 0 || j.call(globalThis, { LitElement: C });
546
+ const lt = globalThis.litElementPolyfillSupport;
547
+ lt == null || lt({ LitElement: C });
548
+ ((F = globalThis.litElementVersions) !== null && F !== void 0 ? F : globalThis.litElementVersions = []).push("3.3.2");
552
549
  /**
553
550
  * @license
554
551
  * Copyright 2017 Google LLC
555
552
  * SPDX-License-Identifier: BSD-3-Clause
556
553
  */
557
- const Nt = (r) => (t) => typeof t == "function" ? ((e, i) => (customElements.define(e, i), i))(r, t) : ((e, i) => {
558
- const { kind: s, elements: o } = i;
559
- return { kind: s, elements: o, finisher(n) {
560
- customElements.define(e, n);
554
+ const Ht = (r) => (t) => typeof t == "function" ? ((e, i) => (customElements.define(e, i), i))(r, t) : ((e, i) => {
555
+ const { kind: s, elements: n } = i;
556
+ return { kind: s, elements: n, finisher(o) {
557
+ customElements.define(e, o);
561
558
  } };
562
559
  })(r, t);
563
560
  /**
@@ -565,98 +562,182 @@ const Nt = (r) => (t) => typeof t == "function" ? ((e, i) => (customElements.def
565
562
  * Copyright 2017 Google LLC
566
563
  * SPDX-License-Identifier: BSD-3-Clause
567
564
  */
568
- const Ot = (r, t) => t.kind === "method" && t.descriptor && !("value" in t.descriptor) ? { ...t, finisher(e) {
565
+ const Ut = (r, t) => t.kind === "method" && t.descriptor && !("value" in t.descriptor) ? { ...t, finisher(e) {
569
566
  e.createProperty(t.key, r);
570
567
  } } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: t.key, initializer() {
571
568
  typeof t.initializer == "function" && (this[t.key] = t.initializer.call(this));
572
569
  }, finisher(e) {
573
570
  e.createProperty(t.key, r);
574
- } }, Tt = (r, t, e) => {
571
+ } }, Mt = (r, t, e) => {
575
572
  t.constructor.createProperty(e, r);
576
573
  };
577
- function L(r) {
578
- return (t, e) => e !== void 0 ? Tt(r, t, e) : Ot(r, t);
574
+ function O(r) {
575
+ return (t, e) => e !== void 0 ? Mt(r, t, e) : Ut(r, t);
579
576
  }
580
577
  /**
581
578
  * @license
582
579
  * Copyright 2017 Google LLC
583
580
  * SPDX-License-Identifier: BSD-3-Clause
584
581
  */
585
- function C(r) {
586
- return L({ ...r, state: !0 });
582
+ function x(r) {
583
+ return O({ ...r, state: !0 });
587
584
  }
588
585
  /**
589
586
  * @license
590
587
  * Copyright 2021 Google LLC
591
588
  * SPDX-License-Identifier: BSD-3-Clause
592
589
  */
593
- var W;
594
- ((W = window.HTMLSlotElement) === null || W === void 0 ? void 0 : W.prototype.assignedElements) != null;
595
- const Dt = `
590
+ var q;
591
+ ((q = window.HTMLSlotElement) === null || q === void 0 ? void 0 : q.prototype.assignedElements) != null;
592
+ const Ot = `
596
593
  :host {
597
594
  display: block;
598
595
  }
596
+ `, kt = `
597
+ button {
598
+ /* TODO: why does this only work here and not from :root? */
599
+ --primary-color: #004170;
600
+ --primary-color-hover: #004170CC;
601
+ --error-color: #FF5252;
602
+
603
+ display: inline-flex;
604
+ align-items: center;
605
+ color: #fff;
606
+ border-width: 0;
607
+ outline: none;
608
+ border-radius: 4px;
609
+ padding: 16px;
610
+ height: 36px;
611
+ cursor: pointer;
612
+ font-family: inherit;
613
+ font-size: 0.875rem;
614
+ text-transform: uppercase;
615
+ letter-spacing: 1.25px;
616
+ font-weight: 500;
617
+ 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);
618
+ transition-property: box-shadow, transform, opacity, background;
619
+ transition-duration: 0.28s;
620
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
621
+ }
622
+
623
+ button:hover {
624
+ 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);
625
+ background: var(--primary-color-hover);
626
+ }
627
+
628
+ button, button:active {
629
+ background: var(--primary-color);
630
+ }
631
+
632
+ button.outline {
633
+ background: transparent;
634
+ box-shadow: none;
635
+ color: var(--primary-color);
636
+ outline: 1px solid var(--primary-color);
637
+ }
638
+
639
+ button.outline:hover {
640
+ background: transparent;
641
+ }
642
+
643
+ button.icon {
644
+ background: transparent;
645
+ border: none;
646
+ box-shadow: none;
647
+ padding: 0;
648
+ border-radius: 50%;
649
+ width: 24px;
650
+ }
651
+
652
+ button.icon-text {
653
+ text-indent: 26px;
654
+ }
655
+
656
+ button.icon:before, button.icon-text:before {
657
+ position: absolute;
658
+ text-indent: 0;
659
+ line-height: initial;
660
+ }
661
+
662
+ button.icon:before {
663
+ width: 24px;
664
+ height: 24px;
665
+ margin-right: 0;
666
+ }
667
+
668
+ button.icon-text:before {
669
+ width: 18px;
670
+ height: 18px;
671
+ }
672
+ `, Nt = `
673
+ * {
674
+ font-family: Roboto, sans-serif;
675
+ }
676
+
677
+ ${kt}
678
+
679
+ button.discard {
680
+ background: var(--error-color);
681
+ }
682
+
683
+ button.polygon:before {
684
+ content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 24 24'%3E%3Ctitle%3Eshape-polygon-plus%3C/title%3E%3Cpath d='M17,15.7V13H19V17L10,21L3,14L7,5H11V7H8.3L5.4,13.6L10.4,18.6L17,15.7M22,5V7H19V10H17V7H14V5H17V2H19V5H22Z' /%3E%3C/svg%3E");
685
+ }
599
686
  `;
600
- var kt = Object.defineProperty, Rt = Object.getOwnPropertyDescriptor, v = (r, t, e, i) => {
601
- for (var s = i > 1 ? void 0 : i ? Rt(t, e) : t, o = r.length - 1, n; o >= 0; o--)
602
- (n = r[o]) && (s = (i ? n(t, e, s) : n(s)) || s);
603
- return i && s && kt(t, e, s), s;
687
+ var Tt = Object.defineProperty, Dt = Object.getOwnPropertyDescriptor, $ = (r, t, e, i) => {
688
+ for (var s = i > 1 ? void 0 : i ? Dt(t, e) : t, n = r.length - 1, o; n >= 0; n--)
689
+ (o = r[n]) && (s = (i ? o(t, e, s) : o(s)) || s);
690
+ return i && s && Tt(t, e, s), s;
604
691
  };
605
- let $ = class extends P {
692
+ let u = class extends C {
606
693
  constructor() {
607
- super(...arguments);
608
- p(this, "_layerId");
609
- p(this, "_eoxMap");
610
- p(this, "_olMap");
611
- p(this, "_drawLayer");
612
- p(this, "_drawnFeatures", []);
613
- p(this, "_currentlyDrawing");
614
- p(this, "multipleFeatures");
615
- p(this, "for");
616
- p(this, "layer");
617
- p(this, "_draw");
618
- p(this, "_modify");
694
+ super(...arguments), this._drawnFeatures = [];
619
695
  }
620
696
  _startDrawing() {
621
697
  this._eoxMap.addDraw(this._layerId, {
622
698
  id: "drawInteraction",
623
699
  type: "Polygon"
624
- }), this._draw = this._eoxMap.interactions.drawInteraction, this._modify = this._eoxMap.interactions.drawInteraction_modify, this._draw.on("drawend", (t) => this._onDrawEnd(t)), this._modify.on("modifyend", (t) => this._onModifyEnd(t)), this._currentlyDrawing = !0, this.requestUpdate();
700
+ }), this._draw = this._eoxMap.interactions.drawInteraction, this._modify = this._eoxMap.interactions.drawInteraction_modify, this._draw.on("drawend", (r) => this._onDrawEnd(r)), this._modify.on("modifyend", (r) => this._onModifyEnd(r)), this._currentlyDrawing = !0, this.requestUpdate();
625
701
  }
626
702
  _discardDrawing() {
627
703
  this._drawnFeatures = [], this._eoxMap.removeInteraction("drawInteraction"), this._drawLayer.getSource().clear(), this._currentlyDrawing = !1, this.requestUpdate();
628
704
  }
629
- _onDrawEnd(t) {
630
- console.log(t), this._emitDrawnFeatures(), this._eoxMap.removeInteraction("drawInteraction"), this._currentlyDrawing = !1, this.requestUpdate();
705
+ _onDrawEnd(r) {
706
+ console.log(r), this._emitDrawnFeatures(), this._eoxMap.removeInteraction("drawInteraction"), this._currentlyDrawing = !1, this.requestUpdate();
631
707
  }
632
- _onModifyEnd(t) {
633
- console.log(t), this._emitDrawnFeatures();
708
+ _onModifyEnd(r) {
709
+ console.log(r), this._emitDrawnFeatures();
634
710
  }
635
711
  _emitDrawnFeatures() {
636
712
  setTimeout(() => {
637
713
  this._drawnFeatures = this._drawLayer.getSource().getFeatures(), this.requestUpdate();
638
- const t = new CustomEvent("drawupdate", {
714
+ const r = new CustomEvent("drawupdate", {
639
715
  detail: this._drawnFeatures
640
716
  });
641
- this.dispatchEvent(t);
717
+ this.dispatchEvent(r);
642
718
  }, 0);
643
719
  }
644
720
  render() {
645
- const t = document.querySelector(this.for);
646
- return this._eoxMap = t, this._olMap = t.map, this._layerId = this.layer, this._drawLayer = this._olMap.getLayers().getArray().find((e) => e.get("id") === this._layerId), this.requestUpdate(), Et`
721
+ const r = document.querySelector(this.for);
722
+ return this._eoxMap = r, this._olMap = r.map, this._layerId = this.layer, this._drawLayer = this._olMap.getLayers().getArray().find((t) => t.get("id") === this._layerId), this.requestUpdate(), mt`
647
723
  <style>
648
- ${Dt}
724
+ ${Ot}
725
+ ${!this.unstyled && Nt}
649
726
  </style>
650
727
  <div>
651
728
  <slot></slot>
652
729
  <button
653
- disabled="${!this.multipleFeatures && this._drawnFeatures.length || this._currentlyDrawing || u}"
730
+ data-cy="drawBtn"
731
+ class="icon-text polygon"
732
+ disabled="${!this.multipleFeatures && this._drawnFeatures.length || this._currentlyDrawing || p}"
654
733
  @click="${() => this._startDrawing()}"
655
734
  >
656
735
  ${this._currentlyDrawing ? "drawing" : "draw"}
657
736
  </button>
658
737
  <button
659
- disabled="${!this._drawnFeatures.length && !this._currentlyDrawing || u}"
738
+ data-cy="discardBtn"
739
+ class="discard"
740
+ disabled="${!this._drawnFeatures.length && !this._currentlyDrawing || p}"
660
741
  @click="${() => this._discardDrawing()}"
661
742
  >
662
743
  discard
@@ -665,36 +746,39 @@ let $ = class extends P {
665
746
  `;
666
747
  }
667
748
  };
668
- v([
669
- C()
670
- ], $.prototype, "_layerId", 2);
671
- v([
672
- C()
673
- ], $.prototype, "_eoxMap", 2);
674
- v([
675
- C()
676
- ], $.prototype, "_olMap", 2);
677
- v([
678
- C()
679
- ], $.prototype, "_drawLayer", 2);
680
- v([
681
- C()
682
- ], $.prototype, "_drawnFeatures", 2);
683
- v([
684
- C()
685
- ], $.prototype, "_currentlyDrawing", 2);
686
- v([
687
- L({ type: Boolean })
688
- ], $.prototype, "multipleFeatures", 2);
689
- v([
690
- L()
691
- ], $.prototype, "for", 2);
692
- v([
693
- L()
694
- ], $.prototype, "layer", 2);
695
- $ = v([
696
- Nt("eox-drawtools")
697
- ], $);
749
+ $([
750
+ x()
751
+ ], u.prototype, "_layerId", 2);
752
+ $([
753
+ x()
754
+ ], u.prototype, "_eoxMap", 2);
755
+ $([
756
+ x()
757
+ ], u.prototype, "_olMap", 2);
758
+ $([
759
+ x()
760
+ ], u.prototype, "_drawLayer", 2);
761
+ $([
762
+ x()
763
+ ], u.prototype, "_drawnFeatures", 2);
764
+ $([
765
+ x()
766
+ ], u.prototype, "_currentlyDrawing", 2);
767
+ $([
768
+ O({ type: Boolean })
769
+ ], u.prototype, "multipleFeatures", 2);
770
+ $([
771
+ O()
772
+ ], u.prototype, "for", 2);
773
+ $([
774
+ O()
775
+ ], u.prototype, "layer", 2);
776
+ $([
777
+ O({ type: Boolean })
778
+ ], u.prototype, "unstyled", 2);
779
+ u = $([
780
+ Ht("eox-drawtools")
781
+ ], u);
698
782
  export {
699
- $ as EOxDrawTools
783
+ u as EOxDrawTools
700
784
  };