@ewc-lib/ewc-singleselect 1.0.10-beta → 1.0.12-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.es.js CHANGED
@@ -1,26 +1,26 @@
1
- function m(r, t, e, o) {
2
- var i = arguments.length, s = i < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, e) : o, n;
3
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function") s = Reflect.decorate(r, t, e, o);
4
- else for (var c = r.length - 1; c >= 0; c--) (n = r[c]) && (s = (i < 3 ? n(s) : i > 3 ? n(t, e, s) : n(t, e)) || s);
5
- return i > 3 && s && Object.defineProperty(t, e, s), s;
1
+ function _(n, t, e, i) {
2
+ var o = arguments.length, s = o < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, e) : i, r;
3
+ if (typeof Reflect == "object" && typeof Reflect.decorate == "function") s = Reflect.decorate(n, t, e, i);
4
+ else for (var l = n.length - 1; l >= 0; l--) (r = n[l]) && (s = (o < 3 ? r(s) : o > 3 ? r(t, e, s) : r(t, e)) || s);
5
+ return o > 3 && s && Object.defineProperty(t, e, s), s;
6
6
  }
7
7
  /**
8
8
  * @license
9
9
  * Copyright 2019 Google LLC
10
10
  * SPDX-License-Identifier: BSD-3-Clause
11
11
  */
12
- const W = globalThis, Q = W.ShadowRoot && (W.ShadyCSS === void 0 || W.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, $t = Symbol(), ht = /* @__PURE__ */ new WeakMap();
13
- let Ot = class {
14
- constructor(t, e, o) {
15
- if (this._$cssResult$ = !0, o !== $t) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
12
+ const Z = globalThis, at = Z.ShadowRoot && (Z.ShadyCSS === void 0 || Z.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, _t = Symbol(), dt = /* @__PURE__ */ new WeakMap();
13
+ let St = class {
14
+ constructor(t, e, i) {
15
+ if (this._$cssResult$ = !0, i !== _t) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
16
16
  this.cssText = t, this.t = e;
17
17
  }
18
18
  get styleSheet() {
19
19
  let t = this.o;
20
20
  const e = this.t;
21
- if (Q && t === void 0) {
22
- const o = e !== void 0 && e.length === 1;
23
- o && (t = ht.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), o && ht.set(e, t));
21
+ if (at && t === void 0) {
22
+ const i = e !== void 0 && e.length === 1;
23
+ i && (t = dt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && dt.set(e, t));
24
24
  }
25
25
  return t;
26
26
  }
@@ -28,115 +28,115 @@ let Ot = class {
28
28
  return this.cssText;
29
29
  }
30
30
  };
31
- const Ct = (r) => new Ot(typeof r == "string" ? r : r + "", void 0, $t), Rt = (r, t) => {
32
- if (Q) r.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
31
+ const Tt = (n) => new St(typeof n == "string" ? n : n + "", void 0, _t), Ct = (n, t) => {
32
+ if (at) n.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
33
33
  else for (const e of t) {
34
- const o = document.createElement("style"), i = W.litNonce;
35
- i !== void 0 && o.setAttribute("nonce", i), o.textContent = e.cssText, r.appendChild(o);
34
+ const i = document.createElement("style"), o = Z.litNonce;
35
+ o !== void 0 && i.setAttribute("nonce", o), i.textContent = e.cssText, n.appendChild(i);
36
36
  }
37
- }, pt = Q ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
37
+ }, ht = at ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((t) => {
38
38
  let e = "";
39
- for (const o of t.cssRules) e += o.cssText;
40
- return Ct(e);
41
- })(r) : r;
39
+ for (const i of t.cssRules) e += i.cssText;
40
+ return Tt(e);
41
+ })(n) : n;
42
42
  /**
43
43
  * @license
44
44
  * Copyright 2017 Google LLC
45
45
  * SPDX-License-Identifier: BSD-3-Clause
46
46
  */
47
- const { is: Pt, defineProperty: zt, getOwnPropertyDescriptor: Ut, getOwnPropertyNames: It, getOwnPropertySymbols: Tt, getPrototypeOf: Ht } = Object, E = globalThis, ut = E.trustedTypes, Mt = ut ? ut.emptyScript : "", J = E.reactiveElementPolyfillSupport, M = (r, t) => r, F = { toAttribute(r, t) {
47
+ const { is: It, defineProperty: Rt, getOwnPropertyDescriptor: Nt, getOwnPropertyNames: Lt, getOwnPropertySymbols: Pt, getPrototypeOf: zt } = Object, P = globalThis, pt = P.trustedTypes, Dt = pt ? pt.emptyScript : "", it = P.reactiveElementPolyfillSupport, q = (n, t) => n, Q = { toAttribute(n, t) {
48
48
  switch (t) {
49
49
  case Boolean:
50
- r = r ? Mt : null;
50
+ n = n ? Dt : null;
51
51
  break;
52
52
  case Object:
53
53
  case Array:
54
- r = r == null ? r : JSON.stringify(r);
54
+ n = n == null ? n : JSON.stringify(n);
55
55
  }
56
- return r;
57
- }, fromAttribute(r, t) {
58
- let e = r;
56
+ return n;
57
+ }, fromAttribute(n, t) {
58
+ let e = n;
59
59
  switch (t) {
60
60
  case Boolean:
61
- e = r !== null;
61
+ e = n !== null;
62
62
  break;
63
63
  case Number:
64
- e = r === null ? null : Number(r);
64
+ e = n === null ? null : Number(n);
65
65
  break;
66
66
  case Object:
67
67
  case Array:
68
68
  try {
69
- e = JSON.parse(r);
69
+ e = JSON.parse(n);
70
70
  } catch {
71
71
  e = null;
72
72
  }
73
73
  }
74
74
  return e;
75
- } }, tt = (r, t) => !Pt(r, t), wt = { attribute: !0, type: String, converter: F, reflect: !1, hasChanged: tt };
76
- Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), E.litPropertyMetadata ?? (E.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
77
- class U extends HTMLElement {
75
+ } }, lt = (n, t) => !It(n, t), ut = { attribute: !0, type: String, converter: Q, reflect: !1, hasChanged: lt };
76
+ Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), P.litPropertyMetadata ?? (P.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
77
+ class W extends HTMLElement {
78
78
  static addInitializer(t) {
79
79
  this._$Ei(), (this.l ?? (this.l = [])).push(t);
80
80
  }
81
81
  static get observedAttributes() {
82
82
  return this.finalize(), this._$Eh && [...this._$Eh.keys()];
83
83
  }
84
- static createProperty(t, e = wt) {
84
+ static createProperty(t, e = ut) {
85
85
  if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
86
- const o = Symbol(), i = this.getPropertyDescriptor(t, o, e);
87
- i !== void 0 && zt(this.prototype, t, i);
86
+ const i = Symbol(), o = this.getPropertyDescriptor(t, i, e);
87
+ o !== void 0 && Rt(this.prototype, t, o);
88
88
  }
89
89
  }
90
- static getPropertyDescriptor(t, e, o) {
91
- const { get: i, set: s } = Ut(this.prototype, t) ?? { get() {
90
+ static getPropertyDescriptor(t, e, i) {
91
+ const { get: o, set: s } = Nt(this.prototype, t) ?? { get() {
92
92
  return this[e];
93
- }, set(n) {
94
- this[e] = n;
93
+ }, set(r) {
94
+ this[e] = r;
95
95
  } };
96
96
  return { get() {
97
- return i == null ? void 0 : i.call(this);
98
- }, set(n) {
99
- const c = i == null ? void 0 : i.call(this);
100
- s.call(this, n), this.requestUpdate(t, c, o);
97
+ return o == null ? void 0 : o.call(this);
98
+ }, set(r) {
99
+ const l = o == null ? void 0 : o.call(this);
100
+ s.call(this, r), this.requestUpdate(t, l, i);
101
101
  }, configurable: !0, enumerable: !0 };
102
102
  }
103
103
  static getPropertyOptions(t) {
104
- return this.elementProperties.get(t) ?? wt;
104
+ return this.elementProperties.get(t) ?? ut;
105
105
  }
106
106
  static _$Ei() {
107
- if (this.hasOwnProperty(M("elementProperties"))) return;
108
- const t = Ht(this);
107
+ if (this.hasOwnProperty(q("elementProperties"))) return;
108
+ const t = zt(this);
109
109
  t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
110
110
  }
111
111
  static finalize() {
112
- if (this.hasOwnProperty(M("finalized"))) return;
113
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(M("properties"))) {
114
- const e = this.properties, o = [...It(e), ...Tt(e)];
115
- for (const i of o) this.createProperty(i, e[i]);
112
+ if (this.hasOwnProperty(q("finalized"))) return;
113
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(q("properties"))) {
114
+ const e = this.properties, i = [...Lt(e), ...Pt(e)];
115
+ for (const o of i) this.createProperty(o, e[o]);
116
116
  }
117
117
  const t = this[Symbol.metadata];
118
118
  if (t !== null) {
119
119
  const e = litPropertyMetadata.get(t);
120
- if (e !== void 0) for (const [o, i] of e) this.elementProperties.set(o, i);
120
+ if (e !== void 0) for (const [i, o] of e) this.elementProperties.set(i, o);
121
121
  }
122
122
  this._$Eh = /* @__PURE__ */ new Map();
123
- for (const [e, o] of this.elementProperties) {
124
- const i = this._$Eu(e, o);
125
- i !== void 0 && this._$Eh.set(i, e);
123
+ for (const [e, i] of this.elementProperties) {
124
+ const o = this._$Eu(e, i);
125
+ o !== void 0 && this._$Eh.set(o, e);
126
126
  }
127
127
  this.elementStyles = this.finalizeStyles(this.styles);
128
128
  }
129
129
  static finalizeStyles(t) {
130
130
  const e = [];
131
131
  if (Array.isArray(t)) {
132
- const o = new Set(t.flat(1 / 0).reverse());
133
- for (const i of o) e.unshift(pt(i));
134
- } else t !== void 0 && e.push(pt(t));
132
+ const i = new Set(t.flat(1 / 0).reverse());
133
+ for (const o of i) e.unshift(ht(o));
134
+ } else t !== void 0 && e.push(ht(t));
135
135
  return e;
136
136
  }
137
137
  static _$Eu(t, e) {
138
- const o = e.attribute;
139
- return o === !1 ? void 0 : typeof o == "string" ? o : typeof t == "string" ? t.toLowerCase() : void 0;
138
+ const i = e.attribute;
139
+ return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0;
140
140
  }
141
141
  constructor() {
142
142
  super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
@@ -155,18 +155,18 @@ class U extends HTMLElement {
155
155
  }
156
156
  _$E_() {
157
157
  const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
158
- for (const o of e.keys()) this.hasOwnProperty(o) && (t.set(o, this[o]), delete this[o]);
158
+ for (const i of e.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
159
159
  t.size > 0 && (this._$Ep = t);
160
160
  }
161
161
  createRenderRoot() {
162
162
  const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
163
- return Rt(t, this.constructor.elementStyles), t;
163
+ return Ct(t, this.constructor.elementStyles), t;
164
164
  }
165
165
  connectedCallback() {
166
166
  var t;
167
167
  this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$EO) == null || t.forEach((e) => {
168
- var o;
169
- return (o = e.hostConnected) == null ? void 0 : o.call(e);
168
+ var i;
169
+ return (i = e.hostConnected) == null ? void 0 : i.call(e);
170
170
  });
171
171
  }
172
172
  enableUpdating(t) {
@@ -174,38 +174,38 @@ class U extends HTMLElement {
174
174
  disconnectedCallback() {
175
175
  var t;
176
176
  (t = this._$EO) == null || t.forEach((e) => {
177
- var o;
178
- return (o = e.hostDisconnected) == null ? void 0 : o.call(e);
177
+ var i;
178
+ return (i = e.hostDisconnected) == null ? void 0 : i.call(e);
179
179
  });
180
180
  }
181
- attributeChangedCallback(t, e, o) {
182
- this._$AK(t, o);
181
+ attributeChangedCallback(t, e, i) {
182
+ this._$AK(t, i);
183
183
  }
184
184
  _$EC(t, e) {
185
185
  var s;
186
- const o = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, o);
187
- if (i !== void 0 && o.reflect === !0) {
188
- const n = (((s = o.converter) == null ? void 0 : s.toAttribute) !== void 0 ? o.converter : F).toAttribute(e, o.type);
189
- this._$Em = t, n == null ? this.removeAttribute(i) : this.setAttribute(i, n), this._$Em = null;
186
+ const i = this.constructor.elementProperties.get(t), o = this.constructor._$Eu(t, i);
187
+ if (o !== void 0 && i.reflect === !0) {
188
+ const r = (((s = i.converter) == null ? void 0 : s.toAttribute) !== void 0 ? i.converter : Q).toAttribute(e, i.type);
189
+ this._$Em = t, r == null ? this.removeAttribute(o) : this.setAttribute(o, r), this._$Em = null;
190
190
  }
191
191
  }
192
192
  _$AK(t, e) {
193
193
  var s;
194
- const o = this.constructor, i = o._$Eh.get(t);
195
- if (i !== void 0 && this._$Em !== i) {
196
- const n = o.getPropertyOptions(i), c = typeof n.converter == "function" ? { fromAttribute: n.converter } : ((s = n.converter) == null ? void 0 : s.fromAttribute) !== void 0 ? n.converter : F;
197
- this._$Em = i, this[i] = c.fromAttribute(e, n.type), this._$Em = null;
194
+ const i = this.constructor, o = i._$Eh.get(t);
195
+ if (o !== void 0 && this._$Em !== o) {
196
+ const r = i.getPropertyOptions(o), l = typeof r.converter == "function" ? { fromAttribute: r.converter } : ((s = r.converter) == null ? void 0 : s.fromAttribute) !== void 0 ? r.converter : Q;
197
+ this._$Em = o, this[o] = l.fromAttribute(e, r.type), this._$Em = null;
198
198
  }
199
199
  }
200
- requestUpdate(t, e, o) {
200
+ requestUpdate(t, e, i) {
201
201
  if (t !== void 0) {
202
- if (o ?? (o = this.constructor.getPropertyOptions(t)), !(o.hasChanged ?? tt)(this[t], e)) return;
203
- this.P(t, e, o);
202
+ if (i ?? (i = this.constructor.getPropertyOptions(t)), !(i.hasChanged ?? lt)(this[t], e)) return;
203
+ this.P(t, e, i);
204
204
  }
205
205
  this.isUpdatePending === !1 && (this._$ES = this._$ET());
206
206
  }
207
- P(t, e, o) {
208
- this._$AL.has(t) || this._$AL.set(t, e), o.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
207
+ P(t, e, i) {
208
+ this._$AL.has(t) || this._$AL.set(t, e), i.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
209
209
  }
210
210
  async _$ET() {
211
211
  this.isUpdatePending = !0;
@@ -221,25 +221,25 @@ class U extends HTMLElement {
221
221
  return this.performUpdate();
222
222
  }
223
223
  performUpdate() {
224
- var o;
224
+ var i;
225
225
  if (!this.isUpdatePending) return;
226
226
  if (!this.hasUpdated) {
227
227
  if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
228
- for (const [s, n] of this._$Ep) this[s] = n;
228
+ for (const [s, r] of this._$Ep) this[s] = r;
229
229
  this._$Ep = void 0;
230
230
  }
231
- const i = this.constructor.elementProperties;
232
- if (i.size > 0) for (const [s, n] of i) n.wrapped !== !0 || this._$AL.has(s) || this[s] === void 0 || this.P(s, this[s], n);
231
+ const o = this.constructor.elementProperties;
232
+ if (o.size > 0) for (const [s, r] of o) r.wrapped !== !0 || this._$AL.has(s) || this[s] === void 0 || this.P(s, this[s], r);
233
233
  }
234
234
  let t = !1;
235
235
  const e = this._$AL;
236
236
  try {
237
- t = this.shouldUpdate(e), t ? (this.willUpdate(e), (o = this._$EO) == null || o.forEach((i) => {
237
+ t = this.shouldUpdate(e), t ? (this.willUpdate(e), (i = this._$EO) == null || i.forEach((o) => {
238
238
  var s;
239
- return (s = i.hostUpdate) == null ? void 0 : s.call(i);
239
+ return (s = o.hostUpdate) == null ? void 0 : s.call(o);
240
240
  }), this.update(e)) : this._$EU();
241
- } catch (i) {
242
- throw t = !1, this._$EU(), i;
241
+ } catch (o) {
242
+ throw t = !1, this._$EU(), o;
243
243
  }
244
244
  t && this._$AE(e);
245
245
  }
@@ -247,9 +247,9 @@ class U extends HTMLElement {
247
247
  }
248
248
  _$AE(t) {
249
249
  var e;
250
- (e = this._$EO) == null || e.forEach((o) => {
251
- var i;
252
- return (i = o.hostUpdated) == null ? void 0 : i.call(o);
250
+ (e = this._$EO) == null || e.forEach((i) => {
251
+ var o;
252
+ return (o = i.hostUpdated) == null ? void 0 : o.call(i);
253
253
  }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
254
254
  }
255
255
  _$EU() {
@@ -272,76 +272,76 @@ class U extends HTMLElement {
272
272
  firstUpdated(t) {
273
273
  }
274
274
  }
275
- U.elementStyles = [], U.shadowRootOptions = { mode: "open" }, U[M("elementProperties")] = /* @__PURE__ */ new Map(), U[M("finalized")] = /* @__PURE__ */ new Map(), J == null || J({ ReactiveElement: U }), (E.reactiveElementVersions ?? (E.reactiveElementVersions = [])).push("2.0.4");
275
+ W.elementStyles = [], W.shadowRootOptions = { mode: "open" }, W[q("elementProperties")] = /* @__PURE__ */ new Map(), W[q("finalized")] = /* @__PURE__ */ new Map(), it == null || it({ ReactiveElement: W }), (P.reactiveElementVersions ?? (P.reactiveElementVersions = [])).push("2.0.4");
276
276
  /**
277
277
  * @license
278
278
  * Copyright 2017 Google LLC
279
279
  * SPDX-License-Identifier: BSD-3-Clause
280
280
  */
281
- const D = globalThis, V = D.trustedTypes, ft = V ? V.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, _t = "$lit$", S = `lit$${Math.random().toFixed(9).slice(2)}$`, kt = "?" + S, Dt = `<${kt}>`, z = document, j = () => z.createComment(""), L = (r) => r === null || typeof r != "object" && typeof r != "function", et = Array.isArray, Nt = (r) => et(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", Y = `[
282
- \f\r]`, H = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, gt = /-->/g, bt = />/g, R = RegExp(`>|${Y}(?:([^\\s"'>=/]+)(${Y}*=${Y}*(?:[^
283
- \f\r"'\`<>=]|("|')|))|$)`, "g"), mt = /'/g, vt = /"/g, At = /^(?:script|style|textarea|title)$/i, jt = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), A = jt(1), I = Symbol.for("lit-noChange"), f = Symbol.for("lit-nothing"), yt = /* @__PURE__ */ new WeakMap(), P = z.createTreeWalker(z, 129);
284
- function St(r, t) {
285
- if (!et(r) || !r.hasOwnProperty("raw")) throw Error("invalid template strings array");
281
+ const V = globalThis, tt = V.trustedTypes, ft = tt ? tt.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, $t = "$lit$", L = `lit$${Math.random().toFixed(9).slice(2)}$`, At = "?" + L, Mt = `<${At}>`, M = document, K = () => M.createComment(""), J = (n) => n === null || typeof n != "object" && typeof n != "function", ct = Array.isArray, Ht = (n) => ct(n) || typeof (n == null ? void 0 : n[Symbol.iterator]) == "function", ot = `[
282
+ \f\r]`, F = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, wt = /-->/g, gt = />/g, z = RegExp(`>|${ot}(?:([^\\s"'>=/]+)(${ot}*=${ot}*(?:[^
283
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), bt = /'/g, mt = /"/g, kt = /^(?:script|style|textarea|title)$/i, Ut = (n) => (t, ...e) => ({ _$litType$: n, strings: t, values: e }), N = Ut(1), H = Symbol.for("lit-noChange"), g = Symbol.for("lit-nothing"), vt = /* @__PURE__ */ new WeakMap(), D = M.createTreeWalker(M, 129);
284
+ function Ot(n, t) {
285
+ if (!ct(n) || !n.hasOwnProperty("raw")) throw Error("invalid template strings array");
286
286
  return ft !== void 0 ? ft.createHTML(t) : t;
287
287
  }
288
- const Lt = (r, t) => {
289
- const e = r.length - 1, o = [];
290
- let i, s = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", n = H;
291
- for (let c = 0; c < e; c++) {
292
- const a = r[c];
293
- let d, u, h = -1, x = 0;
294
- for (; x < a.length && (n.lastIndex = x, u = n.exec(a), u !== null); ) x = n.lastIndex, n === H ? u[1] === "!--" ? n = gt : u[1] !== void 0 ? n = bt : u[2] !== void 0 ? (At.test(u[2]) && (i = RegExp("</" + u[2], "g")), n = R) : u[3] !== void 0 && (n = R) : n === R ? u[0] === ">" ? (n = i ?? H, h = -1) : u[1] === void 0 ? h = -2 : (h = n.lastIndex - u[2].length, d = u[1], n = u[3] === void 0 ? R : u[3] === '"' ? vt : mt) : n === vt || n === mt ? n = R : n === gt || n === bt ? n = H : (n = R, i = void 0);
295
- const $ = n === R && r[c + 1].startsWith("/>") ? " " : "";
296
- s += n === H ? a + Dt : h >= 0 ? (o.push(d), a.slice(0, h) + _t + a.slice(h) + S + $) : a + S + (h === -2 ? c : $);
297
- }
298
- return [St(r, s + (r[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), o];
288
+ const Bt = (n, t) => {
289
+ const e = n.length - 1, i = [];
290
+ let o, s = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", r = F;
291
+ for (let l = 0; l < e; l++) {
292
+ const a = n[l];
293
+ let h, u, d = -1, m = 0;
294
+ for (; m < a.length && (r.lastIndex = m, u = r.exec(a), u !== null); ) m = r.lastIndex, r === F ? u[1] === "!--" ? r = wt : u[1] !== void 0 ? r = gt : u[2] !== void 0 ? (kt.test(u[2]) && (o = RegExp("</" + u[2], "g")), r = z) : u[3] !== void 0 && (r = z) : r === z ? u[0] === ">" ? (r = o ?? F, d = -1) : u[1] === void 0 ? d = -2 : (d = r.lastIndex - u[2].length, h = u[1], r = u[3] === void 0 ? z : u[3] === '"' ? mt : bt) : r === mt || r === bt ? r = z : r === wt || r === gt ? r = F : (r = z, o = void 0);
295
+ const b = r === z && n[l + 1].startsWith("/>") ? " " : "";
296
+ s += r === F ? a + Mt : d >= 0 ? (i.push(h), a.slice(0, d) + $t + a.slice(d) + L + b) : a + L + (d === -2 ? l : b);
297
+ }
298
+ return [Ot(n, s + (n[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
299
299
  };
300
- class q {
301
- constructor({ strings: t, _$litType$: e }, o) {
302
- let i;
300
+ class Y {
301
+ constructor({ strings: t, _$litType$: e }, i) {
302
+ let o;
303
303
  this.parts = [];
304
- let s = 0, n = 0;
305
- const c = t.length - 1, a = this.parts, [d, u] = Lt(t, e);
306
- if (this.el = q.createElement(d, o), P.currentNode = this.el.content, e === 2 || e === 3) {
307
- const h = this.el.content.firstChild;
308
- h.replaceWith(...h.childNodes);
304
+ let s = 0, r = 0;
305
+ const l = t.length - 1, a = this.parts, [h, u] = Bt(t, e);
306
+ if (this.el = Y.createElement(h, i), D.currentNode = this.el.content, e === 2 || e === 3) {
307
+ const d = this.el.content.firstChild;
308
+ d.replaceWith(...d.childNodes);
309
309
  }
310
- for (; (i = P.nextNode()) !== null && a.length < c; ) {
311
- if (i.nodeType === 1) {
312
- if (i.hasAttributes()) for (const h of i.getAttributeNames()) if (h.endsWith(_t)) {
313
- const x = u[n++], $ = i.getAttribute(h).split(S), C = /([.?@])?(.*)/.exec(x);
314
- a.push({ type: 1, index: s, name: C[2], strings: $, ctor: C[1] === "." ? Bt : C[1] === "?" ? Wt : C[1] === "@" ? Ft : K }), i.removeAttribute(h);
315
- } else h.startsWith(S) && (a.push({ type: 6, index: s }), i.removeAttribute(h));
316
- if (At.test(i.tagName)) {
317
- const h = i.textContent.split(S), x = h.length - 1;
318
- if (x > 0) {
319
- i.textContent = V ? V.emptyScript : "";
320
- for (let $ = 0; $ < x; $++) i.append(h[$], j()), P.nextNode(), a.push({ type: 2, index: ++s });
321
- i.append(h[x], j());
310
+ for (; (o = D.nextNode()) !== null && a.length < l; ) {
311
+ if (o.nodeType === 1) {
312
+ if (o.hasAttributes()) for (const d of o.getAttributeNames()) if (d.endsWith($t)) {
313
+ const m = u[r++], b = o.getAttribute(d).split(L), O = /([.?@])?(.*)/.exec(m);
314
+ a.push({ type: 1, index: s, name: O[2], strings: b, ctor: O[1] === "." ? jt : O[1] === "?" ? Ft : O[1] === "@" ? qt : et }), o.removeAttribute(d);
315
+ } else d.startsWith(L) && (a.push({ type: 6, index: s }), o.removeAttribute(d));
316
+ if (kt.test(o.tagName)) {
317
+ const d = o.textContent.split(L), m = d.length - 1;
318
+ if (m > 0) {
319
+ o.textContent = tt ? tt.emptyScript : "";
320
+ for (let b = 0; b < m; b++) o.append(d[b], K()), D.nextNode(), a.push({ type: 2, index: ++s });
321
+ o.append(d[m], K());
322
322
  }
323
323
  }
324
- } else if (i.nodeType === 8) if (i.data === kt) a.push({ type: 2, index: s });
324
+ } else if (o.nodeType === 8) if (o.data === At) a.push({ type: 2, index: s });
325
325
  else {
326
- let h = -1;
327
- for (; (h = i.data.indexOf(S, h + 1)) !== -1; ) a.push({ type: 7, index: s }), h += S.length - 1;
326
+ let d = -1;
327
+ for (; (d = o.data.indexOf(L, d + 1)) !== -1; ) a.push({ type: 7, index: s }), d += L.length - 1;
328
328
  }
329
329
  s++;
330
330
  }
331
331
  }
332
332
  static createElement(t, e) {
333
- const o = z.createElement("template");
334
- return o.innerHTML = t, o;
333
+ const i = M.createElement("template");
334
+ return i.innerHTML = t, i;
335
335
  }
336
336
  }
337
- function T(r, t, e = r, o) {
338
- var n, c;
339
- if (t === I) return t;
340
- let i = o !== void 0 ? (n = e.o) == null ? void 0 : n[o] : e.l;
341
- const s = L(t) ? void 0 : t._$litDirective$;
342
- return (i == null ? void 0 : i.constructor) !== s && ((c = i == null ? void 0 : i._$AO) == null || c.call(i, !1), s === void 0 ? i = void 0 : (i = new s(r), i._$AT(r, e, o)), o !== void 0 ? (e.o ?? (e.o = []))[o] = i : e.l = i), i !== void 0 && (t = T(r, i._$AS(r, t.values), i, o)), t;
337
+ function j(n, t, e = n, i) {
338
+ var r, l;
339
+ if (t === H) return t;
340
+ let o = i !== void 0 ? (r = e.o) == null ? void 0 : r[i] : e.l;
341
+ const s = J(t) ? void 0 : t._$litDirective$;
342
+ return (o == null ? void 0 : o.constructor) !== s && ((l = o == null ? void 0 : o._$AO) == null || l.call(o, !1), s === void 0 ? o = void 0 : (o = new s(n), o._$AT(n, e, i)), i !== void 0 ? (e.o ?? (e.o = []))[i] = o : e.l = o), o !== void 0 && (t = j(n, o._$AS(n, t.values), o, i)), t;
343
343
  }
344
- class qt {
344
+ class Wt {
345
345
  constructor(t, e) {
346
346
  this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
347
347
  }
@@ -352,30 +352,30 @@ class qt {
352
352
  return this._$AM._$AU;
353
353
  }
354
354
  u(t) {
355
- const { el: { content: e }, parts: o } = this._$AD, i = ((t == null ? void 0 : t.creationScope) ?? z).importNode(e, !0);
356
- P.currentNode = i;
357
- let s = P.nextNode(), n = 0, c = 0, a = o[0];
355
+ const { el: { content: e }, parts: i } = this._$AD, o = ((t == null ? void 0 : t.creationScope) ?? M).importNode(e, !0);
356
+ D.currentNode = o;
357
+ let s = D.nextNode(), r = 0, l = 0, a = i[0];
358
358
  for (; a !== void 0; ) {
359
- if (n === a.index) {
360
- let d;
361
- a.type === 2 ? d = new B(s, s.nextSibling, this, t) : a.type === 1 ? d = new a.ctor(s, a.name, a.strings, this, t) : a.type === 6 && (d = new Vt(s, this, t)), this._$AV.push(d), a = o[++c];
359
+ if (r === a.index) {
360
+ let h;
361
+ a.type === 2 ? h = new X(s, s.nextSibling, this, t) : a.type === 1 ? h = new a.ctor(s, a.name, a.strings, this, t) : a.type === 6 && (h = new Vt(s, this, t)), this._$AV.push(h), a = i[++l];
362
362
  }
363
- n !== (a == null ? void 0 : a.index) && (s = P.nextNode(), n++);
363
+ r !== (a == null ? void 0 : a.index) && (s = D.nextNode(), r++);
364
364
  }
365
- return P.currentNode = z, i;
365
+ return D.currentNode = M, o;
366
366
  }
367
367
  p(t) {
368
368
  let e = 0;
369
- for (const o of this._$AV) o !== void 0 && (o.strings !== void 0 ? (o._$AI(t, o, e), e += o.strings.length - 2) : o._$AI(t[e])), e++;
369
+ for (const i of this._$AV) i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
370
370
  }
371
371
  }
372
- class B {
372
+ class X {
373
373
  get _$AU() {
374
374
  var t;
375
375
  return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this.v;
376
376
  }
377
- constructor(t, e, o, i) {
378
- this.type = 2, this._$AH = f, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = o, this.options = i, this.v = (i == null ? void 0 : i.isConnected) ?? !0;
377
+ constructor(t, e, i, o) {
378
+ this.type = 2, this._$AH = g, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = o, this.v = (o == null ? void 0 : o.isConnected) ?? !0;
379
379
  }
380
380
  get parentNode() {
381
381
  let t = this._$AA.parentNode;
@@ -389,7 +389,7 @@ class B {
389
389
  return this._$AB;
390
390
  }
391
391
  _$AI(t, e = this) {
392
- t = T(this, t, e), L(t) ? t === f || t == null || t === "" ? (this._$AH !== f && this._$AR(), this._$AH = f) : t !== this._$AH && t !== I && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Nt(t) ? this.k(t) : this._(t);
392
+ t = j(this, t, e), J(t) ? t === g || t == null || t === "" ? (this._$AH !== g && this._$AR(), this._$AH = g) : t !== this._$AH && t !== H && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Ht(t) ? this.k(t) : this._(t);
393
393
  }
394
394
  O(t) {
395
395
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -398,33 +398,33 @@ class B {
398
398
  this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
399
399
  }
400
400
  _(t) {
401
- this._$AH !== f && L(this._$AH) ? this._$AA.nextSibling.data = t : this.T(z.createTextNode(t)), this._$AH = t;
401
+ this._$AH !== g && J(this._$AH) ? this._$AA.nextSibling.data = t : this.T(M.createTextNode(t)), this._$AH = t;
402
402
  }
403
403
  $(t) {
404
404
  var s;
405
- const { values: e, _$litType$: o } = t, i = typeof o == "number" ? this._$AC(t) : (o.el === void 0 && (o.el = q.createElement(St(o.h, o.h[0]), this.options)), o);
406
- if (((s = this._$AH) == null ? void 0 : s._$AD) === i) this._$AH.p(e);
405
+ const { values: e, _$litType$: i } = t, o = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = Y.createElement(Ot(i.h, i.h[0]), this.options)), i);
406
+ if (((s = this._$AH) == null ? void 0 : s._$AD) === o) this._$AH.p(e);
407
407
  else {
408
- const n = new qt(i, this), c = n.u(this.options);
409
- n.p(e), this.T(c), this._$AH = n;
408
+ const r = new Wt(o, this), l = r.u(this.options);
409
+ r.p(e), this.T(l), this._$AH = r;
410
410
  }
411
411
  }
412
412
  _$AC(t) {
413
- let e = yt.get(t.strings);
414
- return e === void 0 && yt.set(t.strings, e = new q(t)), e;
413
+ let e = vt.get(t.strings);
414
+ return e === void 0 && vt.set(t.strings, e = new Y(t)), e;
415
415
  }
416
416
  k(t) {
417
- et(this._$AH) || (this._$AH = [], this._$AR());
417
+ ct(this._$AH) || (this._$AH = [], this._$AR());
418
418
  const e = this._$AH;
419
- let o, i = 0;
420
- for (const s of t) i === e.length ? e.push(o = new B(this.O(j()), this.O(j()), this, this.options)) : o = e[i], o._$AI(s), i++;
421
- i < e.length && (this._$AR(o && o._$AB.nextSibling, i), e.length = i);
419
+ let i, o = 0;
420
+ for (const s of t) o === e.length ? e.push(i = new X(this.O(K()), this.O(K()), this, this.options)) : i = e[o], i._$AI(s), o++;
421
+ o < e.length && (this._$AR(i && i._$AB.nextSibling, o), e.length = o);
422
422
  }
423
423
  _$AR(t = this._$AA.nextSibling, e) {
424
- var o;
425
- for ((o = this._$AP) == null ? void 0 : o.call(this, !1, !0, e); t && t !== this._$AB; ) {
426
- const i = t.nextSibling;
427
- t.remove(), t = i;
424
+ var i;
425
+ for ((i = this._$AP) == null ? void 0 : i.call(this, !1, !0, e); t && t !== this._$AB; ) {
426
+ const o = t.nextSibling;
427
+ t.remove(), t = o;
428
428
  }
429
429
  }
430
430
  setConnected(t) {
@@ -432,55 +432,55 @@ class B {
432
432
  this._$AM === void 0 && (this.v = t, (e = this._$AP) == null || e.call(this, t));
433
433
  }
434
434
  }
435
- class K {
435
+ class et {
436
436
  get tagName() {
437
437
  return this.element.tagName;
438
438
  }
439
439
  get _$AU() {
440
440
  return this._$AM._$AU;
441
441
  }
442
- constructor(t, e, o, i, s) {
443
- this.type = 1, this._$AH = f, this._$AN = void 0, this.element = t, this.name = e, this._$AM = i, this.options = s, o.length > 2 || o[0] !== "" || o[1] !== "" ? (this._$AH = Array(o.length - 1).fill(new String()), this.strings = o) : this._$AH = f;
442
+ constructor(t, e, i, o, s) {
443
+ this.type = 1, this._$AH = g, this._$AN = void 0, this.element = t, this.name = e, this._$AM = o, this.options = s, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = g;
444
444
  }
445
- _$AI(t, e = this, o, i) {
445
+ _$AI(t, e = this, i, o) {
446
446
  const s = this.strings;
447
- let n = !1;
448
- if (s === void 0) t = T(this, t, e, 0), n = !L(t) || t !== this._$AH && t !== I, n && (this._$AH = t);
447
+ let r = !1;
448
+ if (s === void 0) t = j(this, t, e, 0), r = !J(t) || t !== this._$AH && t !== H, r && (this._$AH = t);
449
449
  else {
450
- const c = t;
451
- let a, d;
452
- for (t = s[0], a = 0; a < s.length - 1; a++) d = T(this, c[o + a], e, a), d === I && (d = this._$AH[a]), n || (n = !L(d) || d !== this._$AH[a]), d === f ? t = f : t !== f && (t += (d ?? "") + s[a + 1]), this._$AH[a] = d;
450
+ const l = t;
451
+ let a, h;
452
+ for (t = s[0], a = 0; a < s.length - 1; a++) h = j(this, l[i + a], e, a), h === H && (h = this._$AH[a]), r || (r = !J(h) || h !== this._$AH[a]), h === g ? t = g : t !== g && (t += (h ?? "") + s[a + 1]), this._$AH[a] = h;
453
453
  }
454
- n && !i && this.j(t);
454
+ r && !o && this.j(t);
455
455
  }
456
456
  j(t) {
457
- t === f ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
457
+ t === g ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
458
458
  }
459
459
  }
460
- class Bt extends K {
460
+ class jt extends et {
461
461
  constructor() {
462
462
  super(...arguments), this.type = 3;
463
463
  }
464
464
  j(t) {
465
- this.element[this.name] = t === f ? void 0 : t;
465
+ this.element[this.name] = t === g ? void 0 : t;
466
466
  }
467
467
  }
468
- class Wt extends K {
468
+ class Ft extends et {
469
469
  constructor() {
470
470
  super(...arguments), this.type = 4;
471
471
  }
472
472
  j(t) {
473
- this.element.toggleAttribute(this.name, !!t && t !== f);
473
+ this.element.toggleAttribute(this.name, !!t && t !== g);
474
474
  }
475
475
  }
476
- class Ft extends K {
477
- constructor(t, e, o, i, s) {
478
- super(t, e, o, i, s), this.type = 5;
476
+ class qt extends et {
477
+ constructor(t, e, i, o, s) {
478
+ super(t, e, i, o, s), this.type = 5;
479
479
  }
480
480
  _$AI(t, e = this) {
481
- if ((t = T(this, t, e, 0) ?? f) === I) return;
482
- const o = this._$AH, i = t === f && o !== f || t.capture !== o.capture || t.once !== o.once || t.passive !== o.passive, s = t !== f && (o === f || i);
483
- i && this.element.removeEventListener(this.name, this, o), s && this.element.addEventListener(this.name, this, t), this._$AH = t;
481
+ if ((t = j(this, t, e, 0) ?? g) === H) return;
482
+ const i = this._$AH, o = t === g && i !== g || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, s = t !== g && (i === g || o);
483
+ o && this.element.removeEventListener(this.name, this, i), s && this.element.addEventListener(this.name, this, t), this._$AH = t;
484
484
  }
485
485
  handleEvent(t) {
486
486
  var e;
@@ -488,33 +488,33 @@ class Ft extends K {
488
488
  }
489
489
  }
490
490
  class Vt {
491
- constructor(t, e, o) {
492
- this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = o;
491
+ constructor(t, e, i) {
492
+ this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
493
493
  }
494
494
  get _$AU() {
495
495
  return this._$AM._$AU;
496
496
  }
497
497
  _$AI(t) {
498
- T(this, t);
498
+ j(this, t);
499
499
  }
500
500
  }
501
- const G = D.litHtmlPolyfillSupport;
502
- G == null || G(q, B), (D.litHtmlVersions ?? (D.litHtmlVersions = [])).push("3.2.0");
503
- const Kt = (r, t, e) => {
504
- const o = (e == null ? void 0 : e.renderBefore) ?? t;
505
- let i = o._$litPart$;
506
- if (i === void 0) {
501
+ const st = V.litHtmlPolyfillSupport;
502
+ st == null || st(Y, X), (V.litHtmlVersions ?? (V.litHtmlVersions = [])).push("3.2.0");
503
+ const Gt = (n, t, e) => {
504
+ const i = (e == null ? void 0 : e.renderBefore) ?? t;
505
+ let o = i._$litPart$;
506
+ if (o === void 0) {
507
507
  const s = (e == null ? void 0 : e.renderBefore) ?? null;
508
- o._$litPart$ = i = new B(t.insertBefore(j(), s), s, void 0, e ?? {});
508
+ i._$litPart$ = o = new X(t.insertBefore(K(), s), s, void 0, e ?? {});
509
509
  }
510
- return i._$AI(r), i;
510
+ return o._$AI(n), o;
511
511
  };
512
512
  /**
513
513
  * @license
514
514
  * Copyright 2017 Google LLC
515
515
  * SPDX-License-Identifier: BSD-3-Clause
516
516
  */
517
- class N extends U {
517
+ class G extends W {
518
518
  constructor() {
519
519
  super(...arguments), this.renderOptions = { host: this }, this.o = void 0;
520
520
  }
@@ -525,7 +525,7 @@ class N extends U {
525
525
  }
526
526
  update(t) {
527
527
  const e = this.render();
528
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this.o = Kt(e, this.renderRoot, this.renderOptions);
528
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this.o = Gt(e, this.renderRoot, this.renderOptions);
529
529
  }
530
530
  connectedCallback() {
531
531
  var t;
@@ -536,84 +536,132 @@ class N extends U {
536
536
  super.disconnectedCallback(), (t = this.o) == null || t.setConnected(!1);
537
537
  }
538
538
  render() {
539
- return I;
539
+ return H;
540
540
  }
541
541
  }
542
542
  var xt;
543
- N._$litElement$ = !0, N.finalized = !0, (xt = globalThis.litElementHydrateSupport) == null || xt.call(globalThis, { LitElement: N });
544
- const Z = globalThis.litElementPolyfillSupport;
545
- Z == null || Z({ LitElement: N });
543
+ G._$litElement$ = !0, G.finalized = !0, (xt = globalThis.litElementHydrateSupport) == null || xt.call(globalThis, { LitElement: G });
544
+ const rt = globalThis.litElementPolyfillSupport;
545
+ rt == null || rt({ LitElement: G });
546
546
  (globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.1.0");
547
547
  /**
548
548
  * @license
549
549
  * Copyright 2017 Google LLC
550
550
  * SPDX-License-Identifier: BSD-3-Clause
551
551
  */
552
- const Jt = (r) => (t, e) => {
552
+ const Kt = (n) => (t, e) => {
553
553
  e !== void 0 ? e.addInitializer(() => {
554
- customElements.define(r, t);
555
- }) : customElements.define(r, t);
554
+ customElements.define(n, t);
555
+ }) : customElements.define(n, t);
556
556
  };
557
557
  /**
558
558
  * @license
559
559
  * Copyright 2017 Google LLC
560
560
  * SPDX-License-Identifier: BSD-3-Clause
561
561
  */
562
- const Yt = { attribute: !0, type: String, converter: F, reflect: !1, hasChanged: tt }, Gt = (r = Yt, t, e) => {
563
- const { kind: o, metadata: i } = e;
564
- let s = globalThis.litPropertyMetadata.get(i);
565
- if (s === void 0 && globalThis.litPropertyMetadata.set(i, s = /* @__PURE__ */ new Map()), s.set(e.name, r), o === "accessor") {
566
- const { name: n } = e;
567
- return { set(c) {
562
+ const Jt = { attribute: !0, type: String, converter: Q, reflect: !1, hasChanged: lt }, Yt = (n = Jt, t, e) => {
563
+ const { kind: i, metadata: o } = e;
564
+ let s = globalThis.litPropertyMetadata.get(o);
565
+ if (s === void 0 && globalThis.litPropertyMetadata.set(o, s = /* @__PURE__ */ new Map()), s.set(e.name, n), i === "accessor") {
566
+ const { name: r } = e;
567
+ return { set(l) {
568
568
  const a = t.get.call(this);
569
- t.set.call(this, c), this.requestUpdate(n, a, r);
570
- }, init(c) {
571
- return c !== void 0 && this.P(n, void 0, r), c;
569
+ t.set.call(this, l), this.requestUpdate(r, a, n);
570
+ }, init(l) {
571
+ return l !== void 0 && this.P(r, void 0, n), l;
572
572
  } };
573
573
  }
574
- if (o === "setter") {
575
- const { name: n } = e;
576
- return function(c) {
577
- const a = this[n];
578
- t.call(this, c), this.requestUpdate(n, a, r);
574
+ if (i === "setter") {
575
+ const { name: r } = e;
576
+ return function(l) {
577
+ const a = this[r];
578
+ t.call(this, l), this.requestUpdate(r, a, n);
579
579
  };
580
580
  }
581
- throw Error("Unsupported decorator location: " + o);
581
+ throw Error("Unsupported decorator location: " + i);
582
582
  };
583
- function y(r) {
584
- return (t, e) => typeof e == "object" ? Gt(r, t, e) : ((o, i, s) => {
585
- const n = i.hasOwnProperty(s);
586
- return i.constructor.createProperty(s, n ? { ...o, wrapped: !0 } : o), n ? Object.getOwnPropertyDescriptor(i, s) : void 0;
587
- })(r, t, e);
583
+ function $(n) {
584
+ return (t, e) => typeof e == "object" ? Yt(n, t, e) : ((i, o, s) => {
585
+ const r = o.hasOwnProperty(s);
586
+ return o.constructor.createProperty(s, r ? { ...i, wrapped: !0 } : i), r ? Object.getOwnPropertyDescriptor(o, s) : void 0;
587
+ })(n, t, e);
588
588
  }
589
589
  /**
590
590
  * @license
591
591
  * Copyright 2017 Google LLC
592
592
  * SPDX-License-Identifier: BSD-3-Clause
593
593
  */
594
- function Zt(r) {
595
- return y({ ...r, state: !0, attribute: !1 });
594
+ function Xt(n) {
595
+ return $({ ...n, state: !0, attribute: !1 });
596
596
  }
597
597
  /**
598
598
  * @license
599
599
  * Copyright 2017 Google LLC
600
600
  * SPDX-License-Identifier: BSD-3-Clause
601
601
  */
602
- const Xt = (r, t, e) => (e.configurable = !0, e.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(r, t, e), e);
602
+ const Zt = (n, t, e) => (e.configurable = !0, e.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(n, t, e), e);
603
603
  /**
604
604
  * @license
605
605
  * Copyright 2017 Google LLC
606
606
  * SPDX-License-Identifier: BSD-3-Clause
607
607
  */
608
- function Qt(r) {
609
- return (t, e) => Xt(t, e, { async get() {
610
- var o;
611
- return await this.updateComplete, ((o = this.renderRoot) == null ? void 0 : o.querySelector(r)) ?? null;
608
+ function Qt(n) {
609
+ return (t, e) => Zt(t, e, { async get() {
610
+ var i;
611
+ return await this.updateComplete, ((i = this.renderRoot) == null ? void 0 : i.querySelector(n)) ?? null;
612
612
  } });
613
613
  }
614
- const te = `*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Arial,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}[type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,input:where(:not([type])):focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}@media (forced-colors: active){[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.static{position:static}.absolute{position:absolute}.relative{position:relative}.bottom-full{bottom:100%}.left-0{left:0}.right-0{right:0}.top-0{top:0}.z-20{z-index:20}.m-2{margin:.5rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.mb-1{margin-bottom:.25rem}.ml-2{margin-left:.5rem}.mr-2{margin-right:.5rem}.mt-1{margin-top:.25rem}.box-border{box-sizing:border-box}.block{display:block}.inline{display:inline}.flex{display:flex}.hidden{display:none}.size-5{width:1.25rem;height:1.25rem}.h-10\\.5{height:2.625rem}.h-11{height:2.75rem}.h-5{height:1.25rem}.h-full{height:100%}.max-h-48{max-height:12rem}.w-11{width:2.75rem}.w-5{width:1.25rem}.w-\\[93\\%\\]{width:93%}.w-full{width:100%}.min-w-11{min-width:2.75rem}.max-w-\\[93\\%\\]{max-width:93%}.shrink-0{flex-shrink:0}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-auto{cursor:auto}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.scroll-py-1{scroll-padding-top:.25rem;scroll-padding-bottom:.25rem}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-items-center{justify-items:center}.overflow-y-auto{overflow-y:auto}.scroll-smooth{scroll-behavior:smooth}.rounded{border-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-br-sm{border-bottom-right-radius:.125rem}.rounded-tr-sm{border-top-right-radius:.125rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-none{border-style:none}.border-ewc-msBorder{--tw-border-opacity: 1;border-color:rgb(81 85 96 / var(--tw-border-opacity))}.border-ewc-msBorderInvert{--tw-border-opacity: 1;border-color:rgb(168 170 175 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.bg-ewc-availableHover,.bg-ewc-blue{--tw-bg-opacity: 1;background-color:rgb(14 71 203 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.fill-current{fill:currentColor}.fill-white{fill:#fff}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-2\\.75{padding:.6875}.pl-2{padding-left:.5rem}.pr-12{padding-right:3rem}.text-left{text-align:left}.align-middle{vertical-align:middle}.text-ewc-available,.text-ewc-msText{--tw-text-opacity: 1;color:rgb(23 26 34 / var(--tw-text-opacity))}.text-ewc-notAvailable{--tw-text-opacity: 1;color:rgb(81 85 96 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.ewc-focus:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-inset: inset;--tw-ring-opacity: 1;--tw-ring-color: rgb(14 71 203 / var(--tw-ring-opacity))}.ewc-focus-invert:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-inset: inset;--tw-ring-opacity: 1;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity))}.ewc-hover:hover,.ewc-hover-invert:hover{opacity:.8}.hover\\:bg-\\[\\#CFDAF5\\]:hover{--tw-bg-opacity: 1;background-color:rgb(207 218 245 / var(--tw-bg-opacity))}.hover\\:bg-ewc-notAvailableHover:hover{--tw-bg-opacity: 1;background-color:rgb(125 128 136 / var(--tw-bg-opacity))}.hover\\:text-black:hover{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.focus\\:bg-\\[\\#CFDAF5\\]:focus{--tw-bg-opacity: 1;background-color:rgb(207 218 245 / var(--tw-bg-opacity))}.focus\\:bg-ewc-notAvailableHover:focus{--tw-bg-opacity: 1;background-color:rgb(125 128 136 / var(--tw-bg-opacity))}.focus\\:text-black:focus{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.focus\\:text-white:focus{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}`;
615
- var X, O;
616
- let b = (O = class extends N {
614
+ /**
615
+ * @license
616
+ * Copyright 2018 Google LLC
617
+ * SPDX-License-Identifier: BSD-3-Clause
618
+ */
619
+ const yt = (n) => n ?? g;
620
+ /**
621
+ * @license
622
+ * Copyright 2017 Google LLC
623
+ * SPDX-License-Identifier: BSD-3-Clause
624
+ */
625
+ const te = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, ee = (n) => (...t) => ({ _$litDirective$: n, values: t });
626
+ class ie {
627
+ constructor(t) {
628
+ }
629
+ get _$AU() {
630
+ return this._$AM._$AU;
631
+ }
632
+ _$AT(t, e, i) {
633
+ this.t = t, this._$AM = e, this.i = i;
634
+ }
635
+ _$AS(t, e) {
636
+ return this.update(t, e);
637
+ }
638
+ update(t, e) {
639
+ return this.render(...e);
640
+ }
641
+ }
642
+ /**
643
+ * @license
644
+ * Copyright 2017 Google LLC
645
+ * SPDX-License-Identifier: BSD-3-Clause
646
+ */
647
+ class nt extends ie {
648
+ constructor(t) {
649
+ if (super(t), this.it = g, t.type !== te.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
650
+ }
651
+ render(t) {
652
+ if (t === g || t == null) return this._t = void 0, this.it = t;
653
+ if (t === H) return t;
654
+ if (typeof t != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
655
+ if (t === this.it) return this._t;
656
+ this.it = t;
657
+ const e = [t];
658
+ return e.raw = e, this._t = { _$litType$: this.constructor.resultType, strings: e, values: [] };
659
+ }
660
+ }
661
+ nt.directiveName = "unsafeHTML", nt.resultType = 1;
662
+ const oe = ee(nt), se = `*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Arial,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}[type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,input:where(:not([type])):focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}@media (forced-colors: active){[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.visible{visibility:visible}.static{position:static}.absolute{position:absolute}.relative{position:relative}.bottom-full{bottom:100%}.left-0{left:0}.right-0{right:0}.top-0{top:0}.z-20{z-index:20}.m-2{margin:.5rem}.mb-1{margin-bottom:.25rem}.ml-2{margin-left:.5rem}.mr-2{margin-right:.5rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.box-border{box-sizing:border-box}.block{display:block}.inline{display:inline}.flex{display:flex}.hidden{display:none}.size-5{width:1.25rem;height:1.25rem}.h-10\\.5{height:2.625rem}.h-11{height:2.75rem}.h-5{height:1.25rem}.h-full{height:100%}.max-h-48{max-height:12rem}.min-h-10{min-height:2.5rem}.w-11{width:2.75rem}.w-5{width:1.25rem}.w-\\[93\\%\\]{width:93%}.w-full{width:100%}.min-w-11{min-width:2.75rem}.max-w-\\[93\\%\\]{max-width:93%}.shrink-0{flex-shrink:0}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-auto{cursor:auto}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.scroll-py-1{scroll-padding-top:.25rem;scroll-padding-bottom:.25rem}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-items-center{justify-items:center}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.scroll-smooth{scroll-behavior:smooth}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-br-sm{border-bottom-right-radius:.125rem}.rounded-tr-sm{border-top-right-radius:.125rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-none{border-style:none}.border-ewc-msBorder{--tw-border-opacity: 1;border-color:rgb(81 85 96 / var(--tw-border-opacity))}.border-ewc-msBorderInvert{--tw-border-opacity: 1;border-color:rgb(168 170 175 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.bg-ewc-availableHover,.bg-ewc-blue{--tw-bg-opacity: 1;background-color:rgb(14 71 203 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.fill-current{fill:currentColor}.fill-white{fill:#fff}.p-1{padding:.25rem}.p-2\\.75{padding:.6875}.px-2{padding-left:.5rem;padding-right:.5rem}.py-0{padding-top:0;padding-bottom:0}.pl-2{padding-left:.5rem}.pr-12{padding-right:3rem}.pt-2{padding-top:.5rem}.text-left{text-align:left}.align-middle{vertical-align:middle}.text-\\[16px\\]{font-size:16px}.font-bold{font-weight:700}.font-normal{font-weight:400}.italic{font-style:italic}.text-ewc-available,.text-ewc-msText{--tw-text-opacity: 1;color:rgb(23 26 34 / var(--tw-text-opacity))}.text-ewc-notAvailable{--tw-text-opacity: 1;color:rgb(81 85 96 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.ewc-focus:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-inset: inset;--tw-ring-opacity: 1;--tw-ring-color: rgb(14 71 203 / var(--tw-ring-opacity))}.ewc-focus-invert:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-inset: inset;--tw-ring-opacity: 1;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity))}.ewc-hover:hover,.ewc-hover-invert:hover{opacity:.8}.hover\\:bg-\\[\\#CFDAF5\\]:hover{--tw-bg-opacity: 1;background-color:rgb(207 218 245 / var(--tw-bg-opacity))}.hover\\:bg-ewc-notAvailableHover:hover{--tw-bg-opacity: 1;background-color:rgb(125 128 136 / var(--tw-bg-opacity))}.hover\\:text-black:hover{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.focus\\:bg-\\[\\#CFDAF5\\]:focus{--tw-bg-opacity: 1;background-color:rgb(207 218 245 / var(--tw-bg-opacity))}.focus\\:bg-ewc-notAvailableHover:focus{--tw-bg-opacity: 1;background-color:rgb(125 128 136 / var(--tw-bg-opacity))}.focus\\:text-black:focus{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.focus\\:text-white:focus{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}`;
663
+ var f, y;
664
+ let x = (y = class extends G {
617
665
  get invertColors() {
618
666
  return this._invertColors;
619
667
  }
@@ -621,56 +669,122 @@ let b = (O = class extends N {
621
669
  typeof t == "string" ? this._invertColors = t.toLowerCase() === "true" : this._invertColors = t;
622
670
  }
623
671
  constructor() {
624
- super(), this.options = [], this.selectedOption = "", this.isExpanded = !1, this.defaultOption = "", this.activeOption = "", this.dropdownHeight = "", this.selectedLabel = "options selected", this.searchMode = "", this._searchText = "", this.useParentWidth = !1, this._shouldShowSearch = !1, this._dropdownPosition = "bottom", this._invertColors = !1, this._originalOptions = [], this._initialOptions = [], this._initialDefaultOption = "", this._initialActiveOption = "", this._componentWidth = 250, this._handleShadowClick = (t) => {
672
+ super(), this.options = [], this.selectedOption = "", this.isExpanded = !1, this.defaultOption = "", this.activeOption = "", this.dropdownHeight = "", this.selectedLabel = "options selected", this.searchMode = "", this._searchText = "", this.useParentWidth = !1, this._shouldShowSearch = !1, this._dropdownPosition = "bottom", this._invertColors = !1, this._originalOptions = [], this._initialOptions = [], this._initialDefaultOption = "", this._initialActiveOption = "", this._componentWidth = 250, this._instanceId = `ewc-singleselect-${f.nextInstanceId++}`, this._selectedTextId = `${this._instanceId}-selected-text`, this._optionListId = `${this._instanceId}-option-list`, this._handleShadowClick = (t) => {
625
673
  t.stopPropagation();
626
674
  }, this.handleClickOutside = (t) => {
627
- var e, o;
628
- (o = (e = this.shadowRoot) == null ? void 0 : e.querySelector("#searchInput")) != null && o.contains(t.target) || this.shadowRoot && !this.shadowRoot.contains(t.target) && this.closeDropdownWithoutFocus();
629
- }, this.constructor.styles[0].replaceSync(te), this.addEventListener("keydown", this.handleKeyDown);
675
+ var e, i;
676
+ (i = (e = this.shadowRoot) == null ? void 0 : e.querySelector("#searchInput")) != null && i.contains(t.target) || this.shadowRoot && !this.shadowRoot.contains(t.target) && this.closeDropdownWithoutFocus();
677
+ }, this.constructor.styles[0].replaceSync(se), this.addEventListener("keydown", this.handleKeyDown);
630
678
  }
631
679
  connectedCallback() {
632
- super.connectedCallback(), this.setAttribute("ewc-version", X.version);
680
+ super.connectedCallback(), this.setAttribute("ewc-version", f.version);
633
681
  }
634
682
  updated(t) {
635
683
  var e;
636
- if (super.updated(t), t.has("searchMode") && (this._shouldShowSearch = this.determineInitialSearchVisibility()), t.has("useParentWidth") && this._updateWidth(), this.dropdownElement.then((o) => {
637
- var i;
638
- o && ((i = this.shadowRoot) == null || i.addEventListener("click", this._handleShadowClick), document.addEventListener("click", this.handleClickOutside));
684
+ if (super.updated(t), t.has("searchMode") && (this._shouldShowSearch = this.determineInitialSearchVisibility()), (t.has("useParentWidth") || t.has("options")) && this._updateWidth(), t.has("activeOption") && this.activeOption) {
685
+ const o = this.flattenOptions(this._originalOptions).find((s) => s.code === this.activeOption);
686
+ o && o.status === "active" && this.toggleSelection(o, !1, !1);
687
+ }
688
+ if (this.dropdownElement.then((i) => {
689
+ var o;
690
+ i && ((o = this.shadowRoot) == null || o.addEventListener("click", this._handleShadowClick), document.addEventListener("click", this.handleClickOutside));
639
691
  }), t.has("isExpanded") && this.isExpanded) {
640
- const o = (e = this.shadowRoot) == null ? void 0 : e.querySelector("#dropdown");
641
- o == null || o.addEventListener("keydown", this.handleKeyDown);
692
+ const i = (e = this.shadowRoot) == null ? void 0 : e.querySelector("#dropdown");
693
+ i == null || i.addEventListener("keydown", this.handleKeyDown);
642
694
  }
643
695
  }
696
+ // Normalize input options to OptionGroup[]
697
+ normalizeOptions(t) {
698
+ return !t || t.length === 0 ? [] : Array.isArray(t[0]) && Array.isArray(t[0]) ? t.map((e) => ({
699
+ label: "",
700
+ // Empty label for legacy groups
701
+ options: e
702
+ })) : t;
703
+ }
704
+ // Flatten options for search and calculations, preserving references
705
+ flattenOptions(t) {
706
+ let e = [];
707
+ for (const i of t) {
708
+ i.code && e.push(i);
709
+ for (const o of i.options)
710
+ "options" in o ? e = e.concat(this.flattenOptions([o])) : e.push(o);
711
+ }
712
+ return e;
713
+ }
644
714
  firstUpdated() {
645
- this._initialOptions = JSON.parse(JSON.stringify(this.options)), this._initialDefaultOption = this.defaultOption, this._initialActiveOption = this.activeOption, this._originalOptions = JSON.parse(this.getAttribute("options") || "[]"), this.options = [...this._originalOptions], this.selectedOption || (this.selectedOption = this.activeOption ? this.activeOption : this.defaultOption), this._shouldShowSearch = this.determineInitialSearchVisibility(), this.requestUpdate(), this._updateWidth();
715
+ const t = this.normalizeOptions(this.options.length ? this.options : JSON.parse(this.getAttribute("options") || "[]"));
716
+ this._originalOptions = JSON.parse(JSON.stringify(t)), this._initialOptions = JSON.parse(JSON.stringify(t)), this.options = [...this._originalOptions], this._initialDefaultOption = this.defaultOption, this._initialActiveOption = this.activeOption, this.selectedOption || (this.selectedOption = this.activeOption ? this.activeOption : this.defaultOption), this._shouldShowSearch = this.determineInitialSearchVisibility(), this.requestUpdate(), this._updateWidth();
646
717
  }
647
718
  determineInitialSearchVisibility() {
648
- return this.searchMode === "force" ? !0 : this.searchMode === "false" ? !1 : this._originalOptions.flat().length >= 10;
719
+ return this.searchMode === "force" ? !0 : this.searchMode === "false" ? !1 : this.flattenOptions(this._originalOptions).length >= 10;
649
720
  }
650
721
  disconnectedCallback() {
651
722
  var t;
652
- super.disconnectedCallback(), (t = this.shadowRoot) == null || t.removeEventListener("click", this._handleShadowClick), document.removeEventListener("click", this.handleClickOutside);
723
+ super.disconnectedCallback(), f.openInstance === this && (f.openInstance = null), (t = this.shadowRoot) == null || t.removeEventListener("click", this._handleShadowClick), document.removeEventListener("click", this.handleClickOutside);
724
+ }
725
+ parsePixelValue(t, e) {
726
+ const i = Number.parseFloat(t);
727
+ return Number.isFinite(i) ? i : e;
728
+ }
729
+ escapeHtml(t) {
730
+ return t.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;");
731
+ }
732
+ sanitizeAllowedOptionNode(t) {
733
+ if (t.nodeType === Node.TEXT_NODE)
734
+ return this.escapeHtml(t.textContent || "");
735
+ if (t.nodeType !== Node.ELEMENT_NODE)
736
+ return "";
737
+ const e = t, i = e.tagName.toLowerCase();
738
+ if (i === "script" || i === "style" || i === "template")
739
+ return "";
740
+ const o = Array.from(e.childNodes).map((s) => this.sanitizeAllowedOptionNode(s)).join("");
741
+ return f.ALLOWED_OPTION_NAME_TAGS.has(i) ? `<${i}>${o}</${i}>` : o;
742
+ }
743
+ getSanitizedOptionNameHtml(t) {
744
+ const e = document.createElement("template");
745
+ return e.innerHTML = t, Array.from(e.content.childNodes).map((i) => this.sanitizeAllowedOptionNode(i)).join("");
746
+ }
747
+ getOptionNamePlainText(t) {
748
+ var i;
749
+ const e = document.createElement("template");
750
+ return e.innerHTML = this.getSanitizedOptionNameHtml(t), ((i = e.content.textContent) == null ? void 0 : i.replace(/\s+/g, " ").trim()) || "";
751
+ }
752
+ getOptionDisplayText(t) {
753
+ return "name" in t ? this.getOptionNamePlainText(t.name) : t.label;
754
+ }
755
+ renderOptionName(t) {
756
+ const e = this.getSanitizedOptionNameHtml(t);
757
+ return e ? oe(e) : this.getOptionNamePlainText(t);
758
+ }
759
+ getSelectedOptionItem() {
760
+ if (this.selectedOption)
761
+ return this.flattenOptions(this._originalOptions).find((t) => t.code === this.selectedOption);
762
+ }
763
+ applyComponentWidth(t) {
764
+ this._componentWidth = Math.max(Math.ceil(t), f.MIN_COMPONENT_WIDTH), this.useParentWidth ? (this.style.width = "100%", this.style.minWidth = `${this._componentWidth}px`) : (this.style.width = `${this._componentWidth}px`, this.style.minWidth = "0"), this.style.maxWidth = "100%";
653
765
  }
654
766
  _updateWidth() {
655
- var s;
656
- const t = this._originalOptions.flat();
767
+ var C, I, A, S;
768
+ const t = this.flattenOptions(this._originalOptions);
657
769
  if (t.length === 0) {
658
- this.style.width = "250px";
770
+ this.applyComponentWidth(f.EMPTY_COMPONENT_WIDTH);
659
771
  return;
660
772
  }
661
- const e = t.reduce((n, c) => c.name.length > n.length ? c.name : n, ""), i = document.createElement("canvas").getContext("2d");
662
- if (i) {
663
- this.style.display = "block";
664
- const n = (s = this.shadowRoot) == null ? void 0 : s.querySelector("#selectedText");
665
- if (n) {
666
- const c = window.getComputedStyle(n);
667
- i.font = `${c.fontSize} ${c.fontFamily}`;
668
- const d = i.measureText(e).width + 72;
669
- this._componentWidth = Math.max(d, 150), this.useParentWidth ? (this.style.width = "100%", this.style.minWidth = "0") : (this.style.width = `${this._componentWidth}px`, this.style.minWidth = `${this._componentWidth}px`);
670
- } else
671
- this.style.width = "150px";
672
- } else
673
- this.style.width = "150px";
773
+ const i = document.createElement("canvas").getContext("2d"), o = (C = this.shadowRoot) == null ? void 0 : C.querySelector(`#${this._selectedTextId}`), s = (I = this.shadowRoot) == null ? void 0 : I.querySelector("#select"), r = (S = (A = this.shadowRoot) == null ? void 0 : A.querySelector("#dropdownButton")) == null ? void 0 : S.parentElement;
774
+ if (!i || !o || !s) {
775
+ this.applyComponentWidth(f.MIN_COMPONENT_WIDTH);
776
+ return;
777
+ }
778
+ this.style.display = "block";
779
+ const l = window.getComputedStyle(o), a = window.getComputedStyle(s), h = r ? window.getComputedStyle(r) : null;
780
+ i.font = [
781
+ l.fontStyle,
782
+ l.fontWeight,
783
+ l.fontSize,
784
+ l.fontFamily
785
+ ].filter(Boolean).join(" ");
786
+ const u = [...t.map((T) => this.getOptionDisplayText(T)), this.selectedLabel].reduce((T, B) => Math.max(T, i.measureText(B).width), 0), d = this.parsePixelValue(l.paddingLeft, f.FALLBACK_TEXT_LEFT_PADDING), m = this.parsePixelValue(l.paddingRight, f.FALLBACK_TEXT_RIGHT_PADDING), b = this.parsePixelValue(a.borderLeftWidth, f.FALLBACK_BORDER_WIDTH) + this.parsePixelValue(a.borderRightWidth, f.FALLBACK_BORDER_WIDTH), O = r ? r.getBoundingClientRect().width || this.parsePixelValue((h == null ? void 0 : h.width) || "", f.FALLBACK_BUTTON_WIDTH) : f.FALLBACK_BUTTON_WIDTH, U = Math.max(m, O);
787
+ this.applyComponentWidth(u + d + U + b);
674
788
  }
675
789
  resetSearch() {
676
790
  if (this.shadowRoot) {
@@ -691,75 +805,103 @@ let b = (O = class extends N {
691
805
  }
692
806
  }
693
807
  closeDropdown() {
694
- this.isExpanded = !1, this.resetSearch(), this.focusMultiSelect();
808
+ this.isExpanded = !1, f.openInstance === this && (f.openInstance = null), this.resetSearch(), this.focusMultiSelect();
695
809
  }
696
810
  closeDropdownWithoutFocus() {
697
- this.isExpanded = !1, this.resetSearch();
811
+ this.isExpanded = !1, f.openInstance === this && (f.openInstance = null), this.resetSearch();
698
812
  }
699
813
  toggleDropdown() {
700
- if (this.isExpanded = !this.isExpanded, this.isExpanded) {
701
- const t = this.getBoundingClientRect(), e = window.innerHeight - t.bottom, o = t.top;
702
- let i = 0;
703
- this.dropdownHeight ? i = parseInt(this.dropdownHeight, 10) : i = 192, this.shouldShowSearch() && (i += 50), e < i && o > e ? this._dropdownPosition = "top" : this._dropdownPosition = "bottom", setTimeout(() => {
704
- this.focusSearchInput();
705
- }, 0);
706
- } else
707
- this.resetSearch(), this.focusMultiSelect();
814
+ this.isExpanded = !this.isExpanded, this.isExpanded ? (f.openInstance && f.openInstance !== this && f.openInstance.closeDropdownWithoutFocus(), f.openInstance = this, this._dropdownPosition = "bottom", setTimeout(() => {
815
+ this.focusSearchInput();
816
+ }, 0)) : (f.openInstance === this && (f.openInstance = null), this.resetSearch(), this.focusMultiSelect());
817
+ }
818
+ // Recursive search filter
819
+ filterGroups(t, e) {
820
+ const i = [];
821
+ for (const o of t) {
822
+ const s = [], r = o.label.toLowerCase().includes(e);
823
+ for (const l of o.options)
824
+ if ("options" in l) {
825
+ const a = this.filterGroups([l], e);
826
+ a.length > 0 && s.push(a[0]);
827
+ } else
828
+ (this.getOptionNamePlainText(l.name).toLowerCase().includes(e) || r) && s.push(l);
829
+ (s.length > 0 || r) && i.push({
830
+ ...o,
831
+ options: s
832
+ });
833
+ }
834
+ return i;
708
835
  }
709
836
  search(t) {
710
837
  const e = t.target.value.toLowerCase();
711
- this.options = this._originalOptions.map((o) => o.filter((i) => i.name.toLowerCase().includes(e))), this.requestUpdate();
712
- }
713
- getSelectedOptionNames() {
714
- if (this.selectedOption) {
715
- const t = this._originalOptions.flat().find((e) => e.code === this.selectedOption);
716
- return t ? t.name : "";
717
- } else
718
- return this.selectedLabel;
838
+ e ? this.options = this.filterGroups(this._originalOptions, e) : this.options = [...this._originalOptions], this.requestUpdate();
839
+ }
840
+ getSelectedOptionText() {
841
+ const t = this.getSelectedOptionItem();
842
+ return t ? this.getOptionDisplayText(t) : this.selectedLabel;
843
+ }
844
+ renderSelectedOptionContent() {
845
+ const t = this.getSelectedOptionItem();
846
+ return t && "name" in t ? this.renderOptionName(t.name) : this.selectedLabel;
847
+ }
848
+ ensureId(t, e) {
849
+ return t.id || (t.id = `${this._instanceId}-${e}`), t.id;
850
+ }
851
+ getAssociatedLabelIds() {
852
+ const t = this.getAttribute("aria-labelledby");
853
+ if (t != null && t.trim())
854
+ return t.split(/\s+/).filter(Boolean);
855
+ if (this.id) {
856
+ const i = Array.from(document.querySelectorAll("label[for]")).find((o) => o.getAttribute("for") === this.id);
857
+ if (i)
858
+ return [this.ensureId(i, "external-label")];
859
+ }
860
+ const e = this.closest("label");
861
+ return e instanceof HTMLElement ? [this.ensureId(e, "wrapping-label")] : [];
719
862
  }
720
- get selectedText() {
721
- var e;
722
- return `${((e = this.selectedLabel) == null ? void 0 : e.trim()) || "options selected"}`;
863
+ getButtonLabelledBy() {
864
+ return [.../* @__PURE__ */ new Set([...this.getAssociatedLabelIds(), this._selectedTextId])].join(" ");
723
865
  }
724
866
  getFirstFocusableOptionElement() {
725
867
  return this.shadowRoot && Array.from(this.shadowRoot.querySelectorAll('div[role="option"]')).filter((e) => {
726
- const o = e.closest('div[role="option"]'), i = o == null ? void 0 : o.getAttribute("data-option-code");
727
- if (i) {
728
- const s = this.options.flat().find((n) => n.code === i);
868
+ const i = e.closest('div[role="option"]'), o = i == null ? void 0 : i.getAttribute("data-option-code");
869
+ if (o) {
870
+ const s = this.flattenOptions(this.options).find((r) => r.code === o);
729
871
  return (s == null ? void 0 : s.status) === "active";
730
872
  }
731
873
  return !1;
732
874
  })[0] || null;
733
875
  }
734
- handleKeyDown(t, e) {
735
- var s, n, c, a, d, u, h, x, $, C, ot, it, rt, st, nt, at, ct, lt, dt;
876
+ handleKeyDown(t) {
877
+ var o, s, r, l, a, h, u, d, m, b, O, U, C, I, A, S, T, B;
736
878
  if (!this.shadowRoot)
737
879
  return;
738
- const o = Array.from(this.shadowRoot.querySelectorAll('div[role="option"]')).filter((p) => {
739
- const l = p.closest('div[role="option"]'), v = l == null ? void 0 : l.getAttribute("data-option-code");
740
- if (v) {
741
- const w = this.options.flat().find((g) => g.code === v);
880
+ const e = Array.from(this.shadowRoot.querySelectorAll('div[role="option"]')).filter((p) => {
881
+ const c = p.closest('div[role="option"]'), k = c == null ? void 0 : c.getAttribute("data-option-code");
882
+ if (k) {
883
+ const w = this.flattenOptions(this.options).find((v) => v.code === k);
742
884
  return (w == null ? void 0 : w.status) === "active";
743
885
  }
744
886
  return !1;
745
887
  });
746
- let i = o.findIndex((p) => {
747
- var l;
748
- return p === ((l = this.shadowRoot) == null ? void 0 : l.activeElement);
888
+ let i = e.findIndex((p) => {
889
+ var c;
890
+ return p === ((c = this.shadowRoot) == null ? void 0 : c.activeElement);
749
891
  });
750
892
  switch (t.key) {
751
893
  case "ArrowDown":
752
894
  if (t.preventDefault(), this.isExpanded) {
753
- const p = (n = this.shadowRoot) == null ? void 0 : n.activeElement;
895
+ const p = (s = this.shadowRoot) == null ? void 0 : s.activeElement;
754
896
  if ((p == null ? void 0 : p.id) === "searchInput")
755
- i = 0, (c = o[i]) == null || c.focus();
756
- else if (i === o.length - 1) {
757
- const l = (a = this.shadowRoot) == null ? void 0 : a.querySelector("#searchInput");
758
- l ? l.focus() : (i = 0, (d = o[i]) == null || d.focus());
759
- } else i === -1 ? (i = 0, (u = o[i]) == null || u.focus()) : (i++, (h = o[i]) == null || h.focus());
897
+ i = 0, (r = e[i]) == null || r.focus();
898
+ else if (i === e.length - 1) {
899
+ const c = (l = this.shadowRoot) == null ? void 0 : l.querySelector("#searchInput");
900
+ c ? c.focus() : (i = 0, (a = e[i]) == null || a.focus());
901
+ } else i === -1 ? (i = 0, (h = e[i]) == null || h.focus()) : (i++, (u = e[i]) == null || u.focus());
760
902
  } else {
761
903
  this.isExpanded = !0, this.options = [...this._originalOptions];
762
- const p = (s = this.shadowRoot) == null ? void 0 : s.querySelector("#searchInput");
904
+ const p = (o = this.shadowRoot) == null ? void 0 : o.querySelector("#searchInput");
763
905
  p && (p.value = "", p.dispatchEvent(new Event("input"))), this.requestUpdate(), setTimeout(() => {
764
906
  this.focusSearchInput();
765
907
  }, 0);
@@ -767,34 +909,24 @@ let b = (O = class extends N {
767
909
  break;
768
910
  case "ArrowUp":
769
911
  if (t.preventDefault(), this.isExpanded) {
770
- const p = (x = this.shadowRoot) == null ? void 0 : x.querySelector("#searchInput"), l = ($ = this.shadowRoot) == null ? void 0 : $.activeElement;
771
- (l == null ? void 0 : l.id) === "searchInput" ? (i = o.length - 1, (C = o[i]) == null || C.focus()) : i === 0 ? p ? p.focus() : (i = o.length - 1, (ot = o[i]) == null || ot.focus()) : i === -1 ? (i = o.length - 1, (it = o[i]) == null || it.focus()) : (i--, (rt = o[i]) == null || rt.focus());
772
- }
773
- break;
774
- case "ArrowRight":
775
- case "ArrowLeft":
776
- if (t.preventDefault(), this.isExpanded) {
777
- const l = ((st = this.shadowRoot) == null ? void 0 : st.activeElement).closest('div[role="option"]');
778
- if (l && t.key === "ArrowRight") {
779
- const v = l.querySelector(".favouriteOptionBtn");
780
- v && v.focus();
781
- }
912
+ const p = (d = this.shadowRoot) == null ? void 0 : d.querySelector("#searchInput"), c = (m = this.shadowRoot) == null ? void 0 : m.activeElement;
913
+ (c == null ? void 0 : c.id) === "searchInput" ? (i = e.length - 1, (b = e[i]) == null || b.focus()) : i === 0 ? p ? p.focus() : (i = e.length - 1, (O = e[i]) == null || O.focus()) : i === -1 ? (i = e.length - 1, (U = e[i]) == null || U.focus()) : (i--, (C = e[i]) == null || C.focus());
782
914
  }
783
915
  break;
784
916
  case "Enter":
785
917
  case " ":
786
918
  if (t.preventDefault(), this.isExpanded) {
787
- let l = ((at = this.shadowRoot) == null ? void 0 : at.activeElement).closest('div[role="option"]');
788
- if (l != null && l.hasAttribute("data-option-code")) {
789
- const v = l.getAttribute("data-option-code");
790
- if (v) {
791
- const w = this.options.flat().find((g) => g.code === v);
919
+ let c = ((A = this.shadowRoot) == null ? void 0 : A.activeElement).closest('div[role="option"]');
920
+ if (c != null && c.hasAttribute("data-option-code")) {
921
+ const k = c.getAttribute("data-option-code");
922
+ if (k) {
923
+ const w = this.flattenOptions(this.options).find((v) => v.code === k);
792
924
  (w == null ? void 0 : w.status) === "active" && this.toggleSelection(w);
793
925
  }
794
926
  }
795
927
  } else {
796
928
  this.isExpanded = !0, this.options = [...this._originalOptions];
797
- const p = (nt = this.shadowRoot) == null ? void 0 : nt.querySelector("#searchInput");
929
+ const p = (I = this.shadowRoot) == null ? void 0 : I.querySelector("#searchInput");
798
930
  p && (p.value = "", p.dispatchEvent(new Event("input"))), this.requestUpdate(), setTimeout(() => {
799
931
  this.focusSearchInput();
800
932
  }, 0);
@@ -805,58 +937,58 @@ let b = (O = class extends N {
805
937
  break;
806
938
  case "Tab":
807
939
  if (this.isExpanded) {
808
- const p = (ct = this.shadowRoot) == null ? void 0 : ct.activeElement;
940
+ const p = (S = this.shadowRoot) == null ? void 0 : S.activeElement;
809
941
  if ((p == null ? void 0 : p.id) === "searchInput")
810
942
  if (t.preventDefault(), t.shiftKey) {
811
- const l = Array.from(this.shadowRoot.querySelectorAll('div[role="option"]')).filter((v) => {
812
- const w = v.closest('div[role="option"]'), g = w == null ? void 0 : w.getAttribute("data-option-code");
813
- if (g) {
814
- const _ = this.options.flat().find((k) => k.code === g);
815
- return (_ == null ? void 0 : _.status) === "active";
943
+ const c = Array.from(this.shadowRoot.querySelectorAll('div[role="option"]')).filter((k) => {
944
+ const w = k.closest('div[role="option"]'), v = w == null ? void 0 : w.getAttribute("data-option-code");
945
+ if (v) {
946
+ const E = this.flattenOptions(this.options).find((R) => R.code === v);
947
+ return (E == null ? void 0 : E.status) === "active";
816
948
  }
817
949
  return !1;
818
950
  });
819
- if (l.length > 0) {
820
- l[l.length - 1].focus();
951
+ if (c.length > 0) {
952
+ c[c.length - 1].focus();
821
953
  return;
822
954
  }
823
955
  } else {
824
- const l = this.getFirstFocusableOptionElement();
825
- l && l.focus();
956
+ const c = this.getFirstFocusableOptionElement();
957
+ c && c.focus();
826
958
  }
827
959
  else {
828
- const l = Array.from(this.shadowRoot.querySelectorAll('div[role="option"]')).filter((g) => {
829
- const _ = g.getAttribute("data-option-code"), k = this.options.flat().find((Et) => Et.code === _);
830
- return (k == null ? void 0 : k.status) === "active";
831
- }), v = p == null ? void 0 : p.closest('div[role="option"]'), w = v ? l.indexOf(v) : -1;
960
+ const c = Array.from(this.shadowRoot.querySelectorAll('div[role="option"]')).filter((v) => {
961
+ const E = v.getAttribute("data-option-code"), R = this.flattenOptions(this.options).find((Et) => Et.code === E);
962
+ return (R == null ? void 0 : R.status) === "active";
963
+ }), k = p == null ? void 0 : p.closest('div[role="option"]'), w = k ? c.indexOf(k) : -1;
832
964
  if (t.shiftKey)
833
965
  if (w > 0) {
834
966
  t.preventDefault();
835
- const g = l[w - 1];
836
- g && g.focus();
967
+ const v = c[w - 1];
968
+ v && v.focus();
837
969
  } else w === 0 && (t.preventDefault(), this.focusSearchInput());
838
- else if (w < l.length - 1) {
970
+ else if (w < c.length - 1) {
839
971
  t.preventDefault();
840
- const g = l[w + 1];
841
- if (g)
842
- g.focus();
972
+ const v = c[w + 1];
973
+ if (v)
974
+ v.focus();
843
975
  else {
844
- const _ = (lt = this.shadowRoot) == null ? void 0 : lt.querySelector("#searchInput");
845
- if (_)
846
- _.focus();
976
+ const E = (T = this.shadowRoot) == null ? void 0 : T.querySelector("#searchInput");
977
+ if (E)
978
+ E.focus();
847
979
  else {
848
- const k = this.getFirstFocusableOptionElement();
849
- k && k.focus();
980
+ const R = this.getFirstFocusableOptionElement();
981
+ R && R.focus();
850
982
  }
851
983
  }
852
- } else if (w === l.length - 1) {
984
+ } else if (w === c.length - 1) {
853
985
  t.preventDefault();
854
- const g = (dt = this.shadowRoot) == null ? void 0 : dt.querySelector("#searchInput");
855
- if (g)
856
- g.focus();
986
+ const v = (B = this.shadowRoot) == null ? void 0 : B.querySelector("#searchInput");
987
+ if (v)
988
+ v.focus();
857
989
  else {
858
- const _ = this.getFirstFocusableOptionElement();
859
- _ && _.focus();
990
+ const E = this.getFirstFocusableOptionElement();
991
+ E && E.focus();
860
992
  }
861
993
  }
862
994
  }
@@ -864,83 +996,122 @@ let b = (O = class extends N {
864
996
  break;
865
997
  }
866
998
  }
867
- hasVisibleOptionsInNextGroup(t) {
868
- for (let e = t + 1; e < this.options.length; e++)
869
- if (this.options[e].length > 0)
870
- return !0;
871
- return !1;
872
- }
873
- renderOptionList() {
874
- return A`
875
- ${this.options.map((t, e) => A`
876
- ${t.map((o, i) => A`
877
- <div
878
- role="option"
879
- aria-selected="${o.code === this.selectedOption}"
880
- class="p-2 scroll-py-1 scroll-smooth flex items-center justify-between ewc-focus
881
- ${o.status === "inactive" ? "cursor-not-allowed text-ewc-notAvailable hover:bg-ewc-notAvailableHover hover:text-white focus:bg-ewc-notAvailableHover focus:text-white focus:outline-none" : `cursor-pointer text-ewc-available focus:outline-none hover:bg-[#CFDAF5] hover:text-black focus:bg-[#CFDAF5] focus:text-black ${o.code === this.selectedOption ? "bg-ewc-availableHover text-white" : ""}`}"
882
- data-option-code="${o.code}"
883
- tabindex="0"
884
- @click="${(s) => {
885
- o.status === "active" && (s.preventDefault(), s.stopPropagation(), this.toggleSelection(o));
999
+ rendersVisibleRow(t) {
1000
+ return "options" in t ? !!(t.label || t.code) || t.options.some((e) => this.rendersVisibleRow(e)) : !0;
1001
+ }
1002
+ hasVisibleInteractiveContent(t) {
1003
+ return "options" in t ? !!t.code || t.options.some((e) => this.hasVisibleInteractiveContent(e)) : !0;
1004
+ }
1005
+ renderItem(t, e = 0, i = !1, o = "0") {
1006
+ const s = "options" in t, r = "code" in t && t.code !== void 0, l = (e + 1) * 16, a = s ? t.label : this.getOptionNamePlainText(t.name), h = r ? t.code : null, u = r ? t.status : "active", d = s && !!t.label, m = r && h === this.selectedOption;
1007
+ let b = "text-[16px] ";
1008
+ d ? (b += "font-bold ", r || (b += "italic ")) : b += "font-normal ";
1009
+ const O = i ? "border-t border-gray-300 mt-2 pt-2" : "", U = r ? u === "active" ? "0" : "-1" : void 0, C = `${this._instanceId}-group-label-${o.replace(/[^a-zA-Z0-9_-]/g, "-")}`, I = N`
1010
+ <div
1011
+ role="option"
1012
+ aria-selected="${yt(m ? "true" : "false")}"
1013
+ class="min-h-10 px-2 py-0 scroll-py-1 scroll-smooth flex items-center justify-between ewc-focus
1014
+ ${r ? u === "inactive" ? "cursor-not-allowed text-ewc-notAvailable hover:bg-ewc-notAvailableHover hover:text-white focus:bg-ewc-notAvailableHover focus:text-white focus:outline-none" : `cursor-pointer text-ewc-available focus:outline-none hover:bg-[#CFDAF5] hover:text-black focus:bg-[#CFDAF5] focus:text-black ${m ? "bg-ewc-availableHover text-white" : ""}` : "cursor-default text-ewc-available"} ${b} ${O}"
1015
+ data-group-label="${d ? "true" : "false"}"
1016
+ data-option-code="${h || ""}"
1017
+ style="padding-left: ${l}px;"
1018
+ tabindex="${yt(U)}"
1019
+ @click="${(A) => {
1020
+ r && u === "active" && (A.preventDefault(), A.stopPropagation(), this.toggleSelection(t));
886
1021
  }}"
1022
+ >
1023
+ <label
1024
+ class="min-h-10 h-full flex items-center w-full group justify-between whitespace-normal ${r && u === "active" ? "cursor-pointer" : "cursor-default"}"
1025
+ data-option-code="${h || ""}"
1026
+ tabindex="-1"
1027
+ >
1028
+ <span class="ml-2 break-words"> ${s ? a : this.renderOptionName(t.name)} </span>
1029
+ ${m ? N`<svg
1030
+ xmlns="http://www.w3.org/2000/svg"
1031
+ class="h-5 w-5 shrink-0 fill-current mr-2"
1032
+ viewBox="0 0 20 20"
1033
+ fill="currentColor"
1034
+ >
1035
+ <path
1036
+ fill-rule="evenodd"
1037
+ d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z"
1038
+ clip-rule="evenodd"
1039
+ />
1040
+ </svg>` : ""}
1041
+ </label>
1042
+ </div>`;
1043
+ if (s) {
1044
+ const A = t, S = A.label || r;
1045
+ let T = i && !S;
1046
+ const B = e + (S ? 1 : 0), p = A.options.map((c, k) => {
1047
+ const w = T && this.rendersVisibleRow(c);
1048
+ return w && (T = !1), this.renderItem(c, B, w, `${o}-${k}`);
1049
+ });
1050
+ return !r && A.label ? N`
1051
+ <div role="group" aria-labelledby="${C}">
1052
+ <div
1053
+ id="${C}"
1054
+ class="min-h-10 px-2 py-0 scroll-py-1 scroll-smooth flex items-center justify-between cursor-default text-ewc-available ${b} ${O}"
1055
+ data-group-label="true"
1056
+ style="padding-left: ${l}px;"
1057
+ >
1058
+ <div
1059
+ class="min-h-10 h-full flex items-center w-full group justify-between whitespace-normal cursor-default"
1060
+ tabindex="-1"
887
1061
  >
888
- <label
889
- for="option-${o.code}"
890
- class="flex items-center w-full group justify-between ${o.status === "active" ? "cursor-pointer" : "cursor-not-allowed text-ewc-disabled"}"
891
- data-option-code="${o.code}"
892
- tabindex="-1"
893
- @click="${(s) => {
894
- o.status === "active" && (s.preventDefault(), s.stopPropagation(), this.toggleSelection(o));
895
- }}"
896
- >
897
- <span class="ml-2"> ${o.name} </span>
898
- ${o.code === this.selectedOption ? A`<svg
899
- xmlns="http://www.w3.org/2000/svg"
900
- class="h-5 w-5 shrink-0 fill-current mr-2"
901
- viewBox="0 0 20 20"
902
- fill="currentColor"
903
- >
904
- <path
905
- fill-rule="evenodd"
906
- d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z"
907
- clip-rule="evenodd"
908
- />
909
- </svg>` : ""}
910
- </label>
1062
+ <span class="ml-2 break-words">${this.renderLabel ? this.renderLabel(A) : a}</span>
911
1063
  </div>
912
- ${i === t.length - 1 && this.hasVisibleOptionsInNextGroup(e) ? A`<hr class="border-t border-gray-300 my-2" />` : ""}
913
- `)}
914
- `)}
1064
+ </div>
1065
+ ${p}
1066
+ </div>
1067
+ ` : N`
1068
+ ${S ? I : ""}
1069
+ ${p}
1070
+ `;
1071
+ } else
1072
+ return I;
1073
+ }
1074
+ renderOptionList() {
1075
+ let t = !1, e = !1;
1076
+ return N`
1077
+ ${this.options.map((i, o) => {
1078
+ const s = this.rendersVisibleRow(i), r = this.hasVisibleInteractiveContent(i), l = t && e && r, a = this.renderItem(i, 0, l, `${o}`);
1079
+ return t = s, e = r, a;
1080
+ })}
915
1081
  `;
916
1082
  }
1083
+ // Helper to deep update active status
1084
+ updateOptionStatusInGroups(t, e) {
1085
+ return t.map((i) => {
1086
+ let o = { ...i };
1087
+ return i.code === e && (o.status = i.status === "active" ? "inactive" : "active"), o.options = i.options.map((s) => "options" in s ? this.updateOptionStatusInGroups([s], e)[0] : s.code === e ? { ...s, status: s.status === "active" ? "inactive" : "active" } : s), o;
1088
+ });
1089
+ }
917
1090
  toggleOptionStatus(t) {
918
- const e = this.options.map((a) => a.map((d) => ({ ...d }))), o = this._originalOptions.map((a) => a.map((d) => ({ ...d }))), i = (a) => a.map((d) => d.map((u) => u.code === t ? {
919
- ...u,
920
- status: u.status === "active" ? "inactive" : "active"
921
- } : u)), s = i(e), n = i(o), c = s.flat().find((a) => a.code === t);
922
- (c == null ? void 0 : c.status) === "inactive" && this.selectedOption === t && (this.selectedOption = ""), this.options = s, this._originalOptions = n, this.requestUpdate(), this.dispatchEvent(new CustomEvent("option-status-change", {
1091
+ this.options = this.updateOptionStatusInGroups(this.options, t), this._originalOptions = this.updateOptionStatusInGroups(this._originalOptions, t);
1092
+ const i = this.flattenOptions(this.options).find((o) => o.code === t);
1093
+ (i == null ? void 0 : i.status) === "inactive" && this.selectedOption === t && (this.selectedOption = ""), this.requestUpdate(), this.dispatchEvent(new CustomEvent("option-status-change", {
923
1094
  detail: {
924
1095
  optionCode: t,
925
- status: c == null ? void 0 : c.status
1096
+ status: i == null ? void 0 : i.status
926
1097
  }
927
1098
  }));
928
1099
  }
929
- toggleSelection(t) {
930
- var o;
1100
+ toggleSelection(t, e = !0, i = !0) {
1101
+ var s;
931
1102
  if (t.status !== "active")
932
1103
  return;
933
- this.selectedOption !== t.code && (this.selectedOption = t.code, this.dispatchEvent(new CustomEvent("option-selected", { detail: { option: t } })));
934
- const e = (o = this.shadowRoot) == null ? void 0 : o.querySelector("#searchInput");
935
- if (e) {
936
- const i = new Event("input", {
1104
+ this.selectedOption !== t.code && (this.selectedOption = t.code, e && this.dispatchEvent(new CustomEvent("option-selected", { detail: { option: t } })));
1105
+ const o = (s = this.shadowRoot) == null ? void 0 : s.querySelector("#searchInput");
1106
+ if (o) {
1107
+ const r = new Event("input", {
937
1108
  bubbles: !0,
938
1109
  cancelable: !0,
939
1110
  composed: !0
940
1111
  });
941
- e.dispatchEvent(i);
1112
+ o.dispatchEvent(r);
942
1113
  }
943
- this.requestUpdate(), this.closeDropdown();
1114
+ this.requestUpdate(), i ? this.closeDropdown() : this.closeDropdownWithoutFocus();
944
1115
  }
945
1116
  shouldShowSearch() {
946
1117
  return this._shouldShowSearch;
@@ -955,7 +1126,7 @@ let b = (O = class extends N {
955
1126
  })), this.requestUpdate();
956
1127
  }
957
1128
  render() {
958
- return A`
1129
+ return N`
959
1130
  <div class="relative bg-white rounded">
960
1131
  <button
961
1132
  id="select"
@@ -964,9 +1135,13 @@ let b = (O = class extends N {
964
1135
  @click="${this.toggleDropdown}"
965
1136
  @keydown="${this.handleKeyDown}"
966
1137
  aria-expanded="${this.isExpanded}"
1138
+ role="combobox"
1139
+ aria-haspopup="listbox"
1140
+ aria-controls="${this._optionListId}"
1141
+ aria-labelledby="${this.getButtonLabelledBy()}"
967
1142
  >
968
- <div id="selectedText" class="flex text-ewc-msText items-center text-left h-full pl-2 pr-12 relative w-full">
969
- ${this.getSelectedOptionNames()}
1143
+ <div id="${this._selectedTextId}" class="flex text-ewc-msText items-center text-left h-full pl-2 pr-12 relative w-full overflow-hidden whitespace-nowrap text-ellipsis">
1144
+ <span class="truncate">${this.renderSelectedOptionContent()}</span>
970
1145
  </div>
971
1146
  <div
972
1147
  class="items-center bg-ewc-blue flex h-10.5 absolute top-0 right-0 w-11 rounded-tr-sm rounded-br-sm"
@@ -980,13 +1155,13 @@ let b = (O = class extends N {
980
1155
  </div>
981
1156
  </div>
982
1157
  </button>
983
- ${this.isExpanded ? A`
1158
+ ${this.isExpanded ? N`
984
1159
  <div
985
1160
  id="dropdown"
986
1161
  class="absolute block justify-items-center left-0 w-full rounded shadow bg-white cursor-auto border-none box-border border-ewc-msBorder z-20 ${this._dropdownPosition === "top" ? "bottom-full mb-1" : "mt-1"}"
987
1162
  style="max-height: 80vh; overflow: hidden;"
988
1163
  >
989
- ${this.shouldShowSearch() ? A`
1164
+ ${this.shouldShowSearch() ? N`
990
1165
  <input
991
1166
  id="searchInput"
992
1167
  type="text"
@@ -999,7 +1174,9 @@ let b = (O = class extends N {
999
1174
  />
1000
1175
  ` : ""}
1001
1176
  <div
1002
- id="optionList"
1177
+ id="${this._optionListId}"
1178
+ role="listbox"
1179
+ aria-label="Options"
1003
1180
  style="
1004
1181
  ${this.dropdownHeight ? `max-height: ${this.dropdownHeight};` : ""}
1005
1182
  "
@@ -1012,53 +1189,66 @@ let b = (O = class extends N {
1012
1189
  </div>
1013
1190
  `;
1014
1191
  }
1015
- }, X = O, O.version = "1.0.10-beta", O.styles = [new CSSStyleSheet()], O);
1016
- m([
1017
- y({ type: Array })
1018
- ], b.prototype, "options", void 0);
1019
- m([
1020
- y({ type: String })
1021
- ], b.prototype, "selectedOption", void 0);
1022
- m([
1023
- y({ type: Boolean })
1024
- ], b.prototype, "isExpanded", void 0);
1025
- m([
1026
- y({ type: String })
1027
- ], b.prototype, "defaultOption", void 0);
1028
- m([
1029
- y({ type: String })
1030
- ], b.prototype, "activeOption", void 0);
1031
- m([
1032
- y({ type: String })
1033
- ], b.prototype, "dropdownHeight", void 0);
1034
- m([
1035
- y({ type: String })
1036
- ], b.prototype, "invertColors", null);
1037
- m([
1038
- y({ type: String })
1039
- ], b.prototype, "selectedLabel", void 0);
1040
- m([
1041
- y({ type: String })
1042
- ], b.prototype, "searchMode", void 0);
1043
- m([
1044
- y({ type: String })
1045
- ], b.prototype, "_searchText", void 0);
1046
- m([
1047
- y({
1192
+ }, f = y, y.version = "1.0.12-alpha", y.nextInstanceId = 0, y.openInstance = null, y.EMPTY_COMPONENT_WIDTH = 250, y.MIN_COMPONENT_WIDTH = 150, y.FALLBACK_TEXT_LEFT_PADDING = 8, y.FALLBACK_TEXT_RIGHT_PADDING = 48, y.FALLBACK_BORDER_WIDTH = 1, y.FALLBACK_BUTTON_WIDTH = 44, y.ALLOWED_OPTION_NAME_TAGS = /* @__PURE__ */ new Set([
1193
+ "sub",
1194
+ "sup",
1195
+ "em",
1196
+ "i",
1197
+ "strong",
1198
+ "b"
1199
+ ]), y.styles = [new CSSStyleSheet()], y);
1200
+ _([
1201
+ $({ type: Array })
1202
+ ], x.prototype, "options", void 0);
1203
+ _([
1204
+ $({ type: String })
1205
+ ], x.prototype, "selectedOption", void 0);
1206
+ _([
1207
+ $({ type: Boolean })
1208
+ ], x.prototype, "isExpanded", void 0);
1209
+ _([
1210
+ $({ type: String })
1211
+ ], x.prototype, "defaultOption", void 0);
1212
+ _([
1213
+ $({ type: String })
1214
+ ], x.prototype, "activeOption", void 0);
1215
+ _([
1216
+ $({ type: String })
1217
+ ], x.prototype, "dropdownHeight", void 0);
1218
+ _([
1219
+ $({ type: String })
1220
+ ], x.prototype, "invertColors", null);
1221
+ _([
1222
+ $({ type: String })
1223
+ ], x.prototype, "selectedLabel", void 0);
1224
+ _([
1225
+ $({ type: String })
1226
+ ], x.prototype, "searchMode", void 0);
1227
+ _([
1228
+ $({ type: String })
1229
+ ], x.prototype, "_searchText", void 0);
1230
+ _([
1231
+ $({
1048
1232
  type: Boolean,
1049
- converter: (r) => r === "true"
1233
+ converter: (n) => n === "true"
1050
1234
  })
1051
- ], b.prototype, "useParentWidth", void 0);
1052
- m([
1053
- y({ type: Boolean })
1054
- ], b.prototype, "_shouldShowSearch", void 0);
1055
- m([
1056
- Zt()
1057
- ], b.prototype, "_dropdownPosition", void 0);
1058
- m([
1235
+ ], x.prototype, "useParentWidth", void 0);
1236
+ _([
1237
+ $({ attribute: !1 })
1238
+ ], x.prototype, "renderLabel", void 0);
1239
+ _([
1240
+ $({ type: Boolean })
1241
+ ], x.prototype, "_shouldShowSearch", void 0);
1242
+ _([
1243
+ Xt()
1244
+ ], x.prototype, "_dropdownPosition", void 0);
1245
+ _([
1059
1246
  Qt("#dropdown")
1060
- ], b.prototype, "dropdownElement", void 0);
1061
- b = X = m([
1062
- Jt("ewc-singleselect")
1063
- ], b);
1247
+ ], x.prototype, "dropdownElement", void 0);
1248
+ x = f = _([
1249
+ Kt("ewc-singleselect")
1250
+ ], x);
1251
+ export {
1252
+ x as SingleSelect
1253
+ };
1064
1254
  //# sourceMappingURL=main.es.js.map