@ewc-lib/ewc-singleselect 1.0.1-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.
@@ -0,0 +1,1007 @@
1
+ function v(s, t, e, o) {
2
+ var i = arguments.length, r = i < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, e) : o, n;
3
+ if (typeof Reflect == "object" && typeof Reflect.decorate == "function") r = Reflect.decorate(s, t, e, o);
4
+ else for (var c = s.length - 1; c >= 0; c--) (n = s[c]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, e, r) : n(t, e)) || r);
5
+ return i > 3 && r && Object.defineProperty(t, e, r), r;
6
+ }
7
+ /**
8
+ * @license
9
+ * Copyright 2019 Google LLC
10
+ * SPDX-License-Identifier: BSD-3-Clause
11
+ */
12
+ const F = globalThis, Q = F.ShadowRoot && (F.ShadyCSS === void 0 || F.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.");
16
+ this.cssText = t, this.t = e;
17
+ }
18
+ get styleSheet() {
19
+ let t = this.o;
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));
24
+ }
25
+ return t;
26
+ }
27
+ toString() {
28
+ return this.cssText;
29
+ }
30
+ };
31
+ const Ct = (s) => new Ot(typeof s == "string" ? s : s + "", void 0, $t), Rt = (s, t) => {
32
+ if (Q) s.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
33
+ else for (const e of t) {
34
+ const o = document.createElement("style"), i = F.litNonce;
35
+ i !== void 0 && o.setAttribute("nonce", i), o.textContent = e.cssText, s.appendChild(o);
36
+ }
37
+ }, pt = Q ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((t) => {
38
+ let e = "";
39
+ for (const o of t.cssRules) e += o.cssText;
40
+ return Ct(e);
41
+ })(s) : s;
42
+ /**
43
+ * @license
44
+ * Copyright 2017 Google LLC
45
+ * SPDX-License-Identifier: BSD-3-Clause
46
+ */
47
+ const { is: Pt, defineProperty: zt, getOwnPropertyDescriptor: Ut, getOwnPropertyNames: It, getOwnPropertySymbols: Ht, getPrototypeOf: Tt } = Object, S = globalThis, ut = S.trustedTypes, Mt = ut ? ut.emptyScript : "", J = S.reactiveElementPolyfillSupport, M = (s, t) => s, V = { toAttribute(s, t) {
48
+ switch (t) {
49
+ case Boolean:
50
+ s = s ? Mt : null;
51
+ break;
52
+ case Object:
53
+ case Array:
54
+ s = s == null ? s : JSON.stringify(s);
55
+ }
56
+ return s;
57
+ }, fromAttribute(s, t) {
58
+ let e = s;
59
+ switch (t) {
60
+ case Boolean:
61
+ e = s !== null;
62
+ break;
63
+ case Number:
64
+ e = s === null ? null : Number(s);
65
+ break;
66
+ case Object:
67
+ case Array:
68
+ try {
69
+ e = JSON.parse(s);
70
+ } catch {
71
+ e = null;
72
+ }
73
+ }
74
+ return e;
75
+ } }, tt = (s, t) => !Pt(s, t), wt = { attribute: !0, type: String, converter: V, reflect: !1, hasChanged: tt };
76
+ Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), S.litPropertyMetadata ?? (S.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
77
+ class U extends HTMLElement {
78
+ static addInitializer(t) {
79
+ this._$Ei(), (this.l ?? (this.l = [])).push(t);
80
+ }
81
+ static get observedAttributes() {
82
+ return this.finalize(), this._$Eh && [...this._$Eh.keys()];
83
+ }
84
+ static createProperty(t, e = wt) {
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);
88
+ }
89
+ }
90
+ static getPropertyDescriptor(t, e, o) {
91
+ const { get: i, set: r } = Ut(this.prototype, t) ?? { get() {
92
+ return this[e];
93
+ }, set(n) {
94
+ this[e] = n;
95
+ } };
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
+ r.call(this, n), this.requestUpdate(t, c, o);
101
+ }, configurable: !0, enumerable: !0 };
102
+ }
103
+ static getPropertyOptions(t) {
104
+ return this.elementProperties.get(t) ?? wt;
105
+ }
106
+ static _$Ei() {
107
+ if (this.hasOwnProperty(M("elementProperties"))) return;
108
+ const t = Tt(this);
109
+ t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
110
+ }
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), ...Ht(e)];
115
+ for (const i of o) this.createProperty(i, e[i]);
116
+ }
117
+ const t = this[Symbol.metadata];
118
+ if (t !== null) {
119
+ const e = litPropertyMetadata.get(t);
120
+ if (e !== void 0) for (const [o, i] of e) this.elementProperties.set(o, i);
121
+ }
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);
126
+ }
127
+ this.elementStyles = this.finalizeStyles(this.styles);
128
+ }
129
+ static finalizeStyles(t) {
130
+ const e = [];
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));
135
+ return e;
136
+ }
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;
140
+ }
141
+ constructor() {
142
+ super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
143
+ }
144
+ _$Ev() {
145
+ var t;
146
+ this._$ES = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (t = this.constructor.l) == null || t.forEach((e) => e(this));
147
+ }
148
+ addController(t) {
149
+ var e;
150
+ (this._$EO ?? (this._$EO = /* @__PURE__ */ new Set())).add(t), this.renderRoot !== void 0 && this.isConnected && ((e = t.hostConnected) == null || e.call(t));
151
+ }
152
+ removeController(t) {
153
+ var e;
154
+ (e = this._$EO) == null || e.delete(t);
155
+ }
156
+ _$E_() {
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]);
159
+ t.size > 0 && (this._$Ep = t);
160
+ }
161
+ createRenderRoot() {
162
+ const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
163
+ return Rt(t, this.constructor.elementStyles), t;
164
+ }
165
+ connectedCallback() {
166
+ var t;
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);
170
+ });
171
+ }
172
+ enableUpdating(t) {
173
+ }
174
+ disconnectedCallback() {
175
+ var t;
176
+ (t = this._$EO) == null || t.forEach((e) => {
177
+ var o;
178
+ return (o = e.hostDisconnected) == null ? void 0 : o.call(e);
179
+ });
180
+ }
181
+ attributeChangedCallback(t, e, o) {
182
+ this._$AK(t, o);
183
+ }
184
+ _$EC(t, e) {
185
+ var r;
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 = (((r = o.converter) == null ? void 0 : r.toAttribute) !== void 0 ? o.converter : V).toAttribute(e, o.type);
189
+ this._$Em = t, n == null ? this.removeAttribute(i) : this.setAttribute(i, n), this._$Em = null;
190
+ }
191
+ }
192
+ _$AK(t, e) {
193
+ var r;
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 } : ((r = n.converter) == null ? void 0 : r.fromAttribute) !== void 0 ? n.converter : V;
197
+ this._$Em = i, this[i] = c.fromAttribute(e, n.type), this._$Em = null;
198
+ }
199
+ }
200
+ requestUpdate(t, e, o) {
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);
204
+ }
205
+ this.isUpdatePending === !1 && (this._$ES = this._$ET());
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);
209
+ }
210
+ async _$ET() {
211
+ this.isUpdatePending = !0;
212
+ try {
213
+ await this._$ES;
214
+ } catch (e) {
215
+ Promise.reject(e);
216
+ }
217
+ const t = this.scheduleUpdate();
218
+ return t != null && await t, !this.isUpdatePending;
219
+ }
220
+ scheduleUpdate() {
221
+ return this.performUpdate();
222
+ }
223
+ performUpdate() {
224
+ var o;
225
+ if (!this.isUpdatePending) return;
226
+ if (!this.hasUpdated) {
227
+ if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
228
+ for (const [r, n] of this._$Ep) this[r] = n;
229
+ this._$Ep = void 0;
230
+ }
231
+ const i = this.constructor.elementProperties;
232
+ if (i.size > 0) for (const [r, n] of i) n.wrapped !== !0 || this._$AL.has(r) || this[r] === void 0 || this.P(r, this[r], n);
233
+ }
234
+ let t = !1;
235
+ const e = this._$AL;
236
+ try {
237
+ t = this.shouldUpdate(e), t ? (this.willUpdate(e), (o = this._$EO) == null || o.forEach((i) => {
238
+ var r;
239
+ return (r = i.hostUpdate) == null ? void 0 : r.call(i);
240
+ }), this.update(e)) : this._$EU();
241
+ } catch (i) {
242
+ throw t = !1, this._$EU(), i;
243
+ }
244
+ t && this._$AE(e);
245
+ }
246
+ willUpdate(t) {
247
+ }
248
+ _$AE(t) {
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);
253
+ }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
254
+ }
255
+ _$EU() {
256
+ this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
257
+ }
258
+ get updateComplete() {
259
+ return this.getUpdateComplete();
260
+ }
261
+ getUpdateComplete() {
262
+ return this._$ES;
263
+ }
264
+ shouldUpdate(t) {
265
+ return !0;
266
+ }
267
+ update(t) {
268
+ this._$Ej && (this._$Ej = this._$Ej.forEach((e) => this._$EC(e, this[e]))), this._$EU();
269
+ }
270
+ updated(t) {
271
+ }
272
+ firstUpdated(t) {
273
+ }
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 }), (S.reactiveElementVersions ?? (S.reactiveElementVersions = [])).push("2.0.4");
276
+ /**
277
+ * @license
278
+ * Copyright 2017 Google LLC
279
+ * SPDX-License-Identifier: BSD-3-Clause
280
+ */
281
+ const N = globalThis, W = N.trustedTypes, ft = W ? W.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, kt = "$lit$", A = `lit$${Math.random().toFixed(9).slice(2)}$`, _t = "?" + A, Nt = `<${_t}>`, z = document, D = () => z.createComment(""), L = (s) => s === null || typeof s != "object" && typeof s != "function", et = Array.isArray, jt = (s) => et(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", Y = `[
282
+ \f\r]`, T = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, gt = /-->/g, bt = />/g, C = RegExp(`>|${Y}(?:([^\\s"'>=/]+)(${Y}*=${Y}*(?:[^
283
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), mt = /'/g, vt = /"/g, At = /^(?:script|style|textarea|title)$/i, Dt = (s) => (t, ...e) => ({ _$litType$: s, strings: t, values: e }), R = Dt(1), I = Symbol.for("lit-noChange"), f = Symbol.for("lit-nothing"), yt = /* @__PURE__ */ new WeakMap(), P = z.createTreeWalker(z, 129);
284
+ function St(s, t) {
285
+ if (!et(s) || !s.hasOwnProperty("raw")) throw Error("invalid template strings array");
286
+ return ft !== void 0 ? ft.createHTML(t) : t;
287
+ }
288
+ const Lt = (s, t) => {
289
+ const e = s.length - 1, o = [];
290
+ let i, r = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", n = T;
291
+ for (let c = 0; c < e; c++) {
292
+ const a = s[c];
293
+ let d, u, h = -1, y = 0;
294
+ for (; y < a.length && (n.lastIndex = y, u = n.exec(a), u !== null); ) y = n.lastIndex, n === T ? u[1] === "!--" ? n = gt : u[1] !== void 0 ? n = bt : u[2] !== void 0 ? (At.test(u[2]) && (i = RegExp("</" + u[2], "g")), n = C) : u[3] !== void 0 && (n = C) : n === C ? u[0] === ">" ? (n = i ?? T, h = -1) : u[1] === void 0 ? h = -2 : (h = n.lastIndex - u[2].length, d = u[1], n = u[3] === void 0 ? C : u[3] === '"' ? vt : mt) : n === vt || n === mt ? n = C : n === gt || n === bt ? n = T : (n = C, i = void 0);
295
+ const x = n === C && s[c + 1].startsWith("/>") ? " " : "";
296
+ r += n === T ? a + Nt : h >= 0 ? (o.push(d), a.slice(0, h) + kt + a.slice(h) + A + x) : a + A + (h === -2 ? c : x);
297
+ }
298
+ return [St(s, r + (s[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), o];
299
+ };
300
+ class q {
301
+ constructor({ strings: t, _$litType$: e }, o) {
302
+ let i;
303
+ this.parts = [];
304
+ let r = 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);
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(kt)) {
313
+ const y = u[n++], x = i.getAttribute(h).split(A), O = /([.?@])?(.*)/.exec(y);
314
+ a.push({ type: 1, index: r, name: O[2], strings: x, ctor: O[1] === "." ? Bt : O[1] === "?" ? Ft : O[1] === "@" ? Vt : K }), i.removeAttribute(h);
315
+ } else h.startsWith(A) && (a.push({ type: 6, index: r }), i.removeAttribute(h));
316
+ if (At.test(i.tagName)) {
317
+ const h = i.textContent.split(A), y = h.length - 1;
318
+ if (y > 0) {
319
+ i.textContent = W ? W.emptyScript : "";
320
+ for (let x = 0; x < y; x++) i.append(h[x], D()), P.nextNode(), a.push({ type: 2, index: ++r });
321
+ i.append(h[y], D());
322
+ }
323
+ }
324
+ } else if (i.nodeType === 8) if (i.data === _t) a.push({ type: 2, index: r });
325
+ else {
326
+ let h = -1;
327
+ for (; (h = i.data.indexOf(A, h + 1)) !== -1; ) a.push({ type: 7, index: r }), h += A.length - 1;
328
+ }
329
+ r++;
330
+ }
331
+ }
332
+ static createElement(t, e) {
333
+ const o = z.createElement("template");
334
+ return o.innerHTML = t, o;
335
+ }
336
+ }
337
+ function H(s, t, e = s, 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 r = L(t) ? void 0 : t._$litDirective$;
342
+ return (i == null ? void 0 : i.constructor) !== r && ((c = i == null ? void 0 : i._$AO) == null || c.call(i, !1), r === void 0 ? i = void 0 : (i = new r(s), i._$AT(s, e, o)), o !== void 0 ? (e.o ?? (e.o = []))[o] = i : e.l = i), i !== void 0 && (t = H(s, i._$AS(s, t.values), i, o)), t;
343
+ }
344
+ class qt {
345
+ constructor(t, e) {
346
+ this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
347
+ }
348
+ get parentNode() {
349
+ return this._$AM.parentNode;
350
+ }
351
+ get _$AU() {
352
+ return this._$AM._$AU;
353
+ }
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 r = P.nextNode(), n = 0, c = 0, a = o[0];
358
+ for (; a !== void 0; ) {
359
+ if (n === a.index) {
360
+ let d;
361
+ a.type === 2 ? d = new B(r, r.nextSibling, this, t) : a.type === 1 ? d = new a.ctor(r, a.name, a.strings, this, t) : a.type === 6 && (d = new Wt(r, this, t)), this._$AV.push(d), a = o[++c];
362
+ }
363
+ n !== (a == null ? void 0 : a.index) && (r = P.nextNode(), n++);
364
+ }
365
+ return P.currentNode = z, i;
366
+ }
367
+ p(t) {
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++;
370
+ }
371
+ }
372
+ class B {
373
+ get _$AU() {
374
+ var t;
375
+ return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this.v;
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;
379
+ }
380
+ get parentNode() {
381
+ let t = this._$AA.parentNode;
382
+ const e = this._$AM;
383
+ return e !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = e.parentNode), t;
384
+ }
385
+ get startNode() {
386
+ return this._$AA;
387
+ }
388
+ get endNode() {
389
+ return this._$AB;
390
+ }
391
+ _$AI(t, e = this) {
392
+ t = H(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) : jt(t) ? this.k(t) : this._(t);
393
+ }
394
+ O(t) {
395
+ return this._$AA.parentNode.insertBefore(t, this._$AB);
396
+ }
397
+ T(t) {
398
+ this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
399
+ }
400
+ _(t) {
401
+ this._$AH !== f && L(this._$AH) ? this._$AA.nextSibling.data = t : this.T(z.createTextNode(t)), this._$AH = t;
402
+ }
403
+ $(t) {
404
+ var r;
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 (((r = this._$AH) == null ? void 0 : r._$AD) === i) this._$AH.p(e);
407
+ else {
408
+ const n = new qt(i, this), c = n.u(this.options);
409
+ n.p(e), this.T(c), this._$AH = n;
410
+ }
411
+ }
412
+ _$AC(t) {
413
+ let e = yt.get(t.strings);
414
+ return e === void 0 && yt.set(t.strings, e = new q(t)), e;
415
+ }
416
+ k(t) {
417
+ et(this._$AH) || (this._$AH = [], this._$AR());
418
+ const e = this._$AH;
419
+ let o, i = 0;
420
+ for (const r of t) i === e.length ? e.push(o = new B(this.O(D()), this.O(D()), this, this.options)) : o = e[i], o._$AI(r), i++;
421
+ i < e.length && (this._$AR(o && o._$AB.nextSibling, i), e.length = i);
422
+ }
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;
428
+ }
429
+ }
430
+ setConnected(t) {
431
+ var e;
432
+ this._$AM === void 0 && (this.v = t, (e = this._$AP) == null || e.call(this, t));
433
+ }
434
+ }
435
+ class K {
436
+ get tagName() {
437
+ return this.element.tagName;
438
+ }
439
+ get _$AU() {
440
+ return this._$AM._$AU;
441
+ }
442
+ constructor(t, e, o, i, r) {
443
+ this.type = 1, this._$AH = f, this._$AN = void 0, this.element = t, this.name = e, this._$AM = i, this.options = r, o.length > 2 || o[0] !== "" || o[1] !== "" ? (this._$AH = Array(o.length - 1).fill(new String()), this.strings = o) : this._$AH = f;
444
+ }
445
+ _$AI(t, e = this, o, i) {
446
+ const r = this.strings;
447
+ let n = !1;
448
+ if (r === void 0) t = H(this, t, e, 0), n = !L(t) || t !== this._$AH && t !== I, n && (this._$AH = t);
449
+ else {
450
+ const c = t;
451
+ let a, d;
452
+ for (t = r[0], a = 0; a < r.length - 1; a++) d = H(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 ?? "") + r[a + 1]), this._$AH[a] = d;
453
+ }
454
+ n && !i && this.j(t);
455
+ }
456
+ j(t) {
457
+ t === f ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
458
+ }
459
+ }
460
+ class Bt extends K {
461
+ constructor() {
462
+ super(...arguments), this.type = 3;
463
+ }
464
+ j(t) {
465
+ this.element[this.name] = t === f ? void 0 : t;
466
+ }
467
+ }
468
+ class Ft extends K {
469
+ constructor() {
470
+ super(...arguments), this.type = 4;
471
+ }
472
+ j(t) {
473
+ this.element.toggleAttribute(this.name, !!t && t !== f);
474
+ }
475
+ }
476
+ class Vt extends K {
477
+ constructor(t, e, o, i, r) {
478
+ super(t, e, o, i, r), this.type = 5;
479
+ }
480
+ _$AI(t, e = this) {
481
+ if ((t = H(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, r = t !== f && (o === f || i);
483
+ i && this.element.removeEventListener(this.name, this, o), r && this.element.addEventListener(this.name, this, t), this._$AH = t;
484
+ }
485
+ handleEvent(t) {
486
+ var e;
487
+ typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
488
+ }
489
+ }
490
+ class Wt {
491
+ constructor(t, e, o) {
492
+ this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = o;
493
+ }
494
+ get _$AU() {
495
+ return this._$AM._$AU;
496
+ }
497
+ _$AI(t) {
498
+ H(this, t);
499
+ }
500
+ }
501
+ const Z = N.litHtmlPolyfillSupport;
502
+ Z == null || Z(q, B), (N.litHtmlVersions ?? (N.litHtmlVersions = [])).push("3.2.0");
503
+ const Kt = (s, t, e) => {
504
+ const o = (e == null ? void 0 : e.renderBefore) ?? t;
505
+ let i = o._$litPart$;
506
+ if (i === void 0) {
507
+ const r = (e == null ? void 0 : e.renderBefore) ?? null;
508
+ o._$litPart$ = i = new B(t.insertBefore(D(), r), r, void 0, e ?? {});
509
+ }
510
+ return i._$AI(s), i;
511
+ };
512
+ /**
513
+ * @license
514
+ * Copyright 2017 Google LLC
515
+ * SPDX-License-Identifier: BSD-3-Clause
516
+ */
517
+ class j extends U {
518
+ constructor() {
519
+ super(...arguments), this.renderOptions = { host: this }, this.o = void 0;
520
+ }
521
+ createRenderRoot() {
522
+ var e;
523
+ const t = super.createRenderRoot();
524
+ return (e = this.renderOptions).renderBefore ?? (e.renderBefore = t.firstChild), t;
525
+ }
526
+ update(t) {
527
+ const e = this.render();
528
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this.o = Kt(e, this.renderRoot, this.renderOptions);
529
+ }
530
+ connectedCallback() {
531
+ var t;
532
+ super.connectedCallback(), (t = this.o) == null || t.setConnected(!0);
533
+ }
534
+ disconnectedCallback() {
535
+ var t;
536
+ super.disconnectedCallback(), (t = this.o) == null || t.setConnected(!1);
537
+ }
538
+ render() {
539
+ return I;
540
+ }
541
+ }
542
+ var xt;
543
+ j._$litElement$ = !0, j.finalized = !0, (xt = globalThis.litElementHydrateSupport) == null || xt.call(globalThis, { LitElement: j });
544
+ const X = globalThis.litElementPolyfillSupport;
545
+ X == null || X({ LitElement: j });
546
+ (globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.1.0");
547
+ /**
548
+ * @license
549
+ * Copyright 2017 Google LLC
550
+ * SPDX-License-Identifier: BSD-3-Clause
551
+ */
552
+ const Jt = (s) => (t, e) => {
553
+ e !== void 0 ? e.addInitializer(() => {
554
+ customElements.define(s, t);
555
+ }) : customElements.define(s, t);
556
+ };
557
+ /**
558
+ * @license
559
+ * Copyright 2017 Google LLC
560
+ * SPDX-License-Identifier: BSD-3-Clause
561
+ */
562
+ const Yt = { attribute: !0, type: String, converter: V, reflect: !1, hasChanged: tt }, Zt = (s = Yt, t, e) => {
563
+ const { kind: o, metadata: i } = e;
564
+ let r = globalThis.litPropertyMetadata.get(i);
565
+ if (r === void 0 && globalThis.litPropertyMetadata.set(i, r = /* @__PURE__ */ new Map()), r.set(e.name, s), o === "accessor") {
566
+ const { name: n } = e;
567
+ return { set(c) {
568
+ const a = t.get.call(this);
569
+ t.set.call(this, c), this.requestUpdate(n, a, s);
570
+ }, init(c) {
571
+ return c !== void 0 && this.P(n, void 0, s), c;
572
+ } };
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, s);
579
+ };
580
+ }
581
+ throw Error("Unsupported decorator location: " + o);
582
+ };
583
+ function k(s) {
584
+ return (t, e) => typeof e == "object" ? Zt(s, t, e) : ((o, i, r) => {
585
+ const n = i.hasOwnProperty(r);
586
+ return i.constructor.createProperty(r, n ? { ...o, wrapped: !0 } : o), n ? Object.getOwnPropertyDescriptor(i, r) : void 0;
587
+ })(s, t, e);
588
+ }
589
+ /**
590
+ * @license
591
+ * Copyright 2017 Google LLC
592
+ * SPDX-License-Identifier: BSD-3-Clause
593
+ */
594
+ const Xt = (s, t, e) => (e.configurable = !0, e.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(s, t, e), e);
595
+ /**
596
+ * @license
597
+ * Copyright 2017 Google LLC
598
+ * SPDX-License-Identifier: BSD-3-Clause
599
+ */
600
+ function Gt(s) {
601
+ return (t, e) => Xt(t, e, { async get() {
602
+ var o;
603
+ return await this.updateComplete, ((o = this.renderRoot) == null ? void 0 : o.querySelector(s)) ?? null;
604
+ } });
605
+ }
606
+ const Qt = `*,: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}.left-0{left:0}.right-0{right:0}.top-0{top:0}.z-10{z-index:10}.m-2{margin:.5rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.ml-2{margin-left:.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-11{height:2.75rem}.h-48{height:12rem}.max-h-48{max-height:12rem}.min-h-48{min-height:12rem}.w-11{width:2.75rem}.w-\\[93\\%\\]{width:93%}.w-full{width:100%}.min-w-11{min-width:2.75rem}.max-w-\\[93\\%\\]{max-width:93%}.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-start{align-items:flex-start}.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-white{fill:#fff}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-2\\.75{padding:.6875}.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{--tw-ring-opacity: 1;--tw-ring-color: rgb(14 71 203 / var(--tw-ring-opacity))}.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)}.ewc-focus-invert{--tw-ring-opacity: 1;--tw-ring-color: rgb(255 255 255 / 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)}.ewc-hover:hover,.ewc-hover-invert:hover{opacity:.8;--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\\:bg-ewc-availableHover:hover{--tw-bg-opacity: 1;background-color:rgb(14 71 203 / 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-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.focus\\:bg-ewc-availableHover:focus{--tw-bg-opacity: 1;background-color:rgb(14 71 203 / 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-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}`;
607
+ var G, E;
608
+ let m = (E = class extends j {
609
+ get invertColors() {
610
+ return this._invertColors;
611
+ }
612
+ set invertColors(t) {
613
+ typeof t == "string" ? this._invertColors = t.toLowerCase() === "true" : this._invertColors = t;
614
+ }
615
+ constructor() {
616
+ super(), this.options = [], this.selectedOption = "", this.isExpanded = !1, this.defaultOption = "", this.activeOption = "", this.dropdownHeight = "", this.selectedLabel = "options selected", this.searchMode = "", this._searchText = "", this._shouldShowSearch = !1, this._invertColors = !1, this._originalOptions = [], this._initialOptions = [], this._initialDefaultOption = "", this._initialActiveOption = "", this._handleShadowClick = (t) => {
617
+ t.stopPropagation();
618
+ }, this.handleClickOutside = (t) => {
619
+ var e, o;
620
+ (o = (e = this.shadowRoot) == null ? void 0 : e.querySelector("#searchInput")) != null && o.contains(t.target) || this.shadowRoot && !this.shadowRoot.contains(t.target) && this.closeDropdownWithoutFocus();
621
+ }, this.constructor.styles[0].replaceSync(Qt), this.addEventListener("keydown", this.handleKeyDown);
622
+ }
623
+ connectedCallback() {
624
+ super.connectedCallback(), this.setAttribute("ewc-version", G.version);
625
+ }
626
+ updated(t) {
627
+ var e;
628
+ if (super.updated(t), t.has("searchMode") && (this._shouldShowSearch = this.determineInitialSearchVisibility()), this.dropdownElement.then((o) => {
629
+ var i;
630
+ o && ((i = this.shadowRoot) == null || i.addEventListener("click", this._handleShadowClick), document.addEventListener("click", this.handleClickOutside));
631
+ }), t.has("isExpanded") && this.isExpanded) {
632
+ const o = (e = this.shadowRoot) == null ? void 0 : e.querySelector("#dropdown");
633
+ o == null || o.addEventListener("keydown", this.handleKeyDown);
634
+ }
635
+ }
636
+ firstUpdated() {
637
+ 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();
638
+ }
639
+ determineInitialSearchVisibility() {
640
+ return this.searchMode === "force" ? !0 : this.searchMode === "false" ? !1 : this._originalOptions.flat().length >= 10;
641
+ }
642
+ disconnectedCallback() {
643
+ var t;
644
+ super.disconnectedCallback(), (t = this.shadowRoot) == null || t.removeEventListener("click", this._handleShadowClick), document.removeEventListener("click", this.handleClickOutside);
645
+ }
646
+ resetSearch() {
647
+ if (this.shadowRoot) {
648
+ const t = this.shadowRoot.querySelector("#searchInput");
649
+ t && (t.value = "", t.dispatchEvent(new Event("input"))), this.options = [...this._originalOptions], this.requestUpdate();
650
+ }
651
+ }
652
+ focusSearchInput() {
653
+ if (this.shadowRoot) {
654
+ const t = this.shadowRoot.querySelector("#searchInput");
655
+ t && t.focus();
656
+ }
657
+ }
658
+ focusMultiSelect() {
659
+ if (this.shadowRoot) {
660
+ const t = this.shadowRoot.querySelector("#select");
661
+ t && t.focus();
662
+ }
663
+ }
664
+ closeDropdown() {
665
+ this.isExpanded = !1, this.resetSearch(), this.focusMultiSelect(), this.restorePageScrollbar();
666
+ }
667
+ closeDropdownWithoutFocus() {
668
+ this.isExpanded = !1, this.resetSearch(), this.restorePageScrollbar();
669
+ }
670
+ toggleDropdown() {
671
+ this.isExpanded = !this.isExpanded, this.isExpanded ? (this.preventPageScrollbar(), setTimeout(() => {
672
+ this.focusSearchInput();
673
+ }, 0)) : (this.resetSearch(), this.focusMultiSelect(), this.restorePageScrollbar());
674
+ }
675
+ preventPageScrollbar() {
676
+ let t = document.getElementById("ewc-multiselect-style");
677
+ t || (t = document.createElement("style"), t.id = "ewc-multiselect-style", t.textContent = "html, body { overflow: hidden !important; }", document.head.appendChild(t));
678
+ }
679
+ restorePageScrollbar() {
680
+ const t = document.getElementById("ewc-multiselect-style");
681
+ t && document.head.removeChild(t);
682
+ }
683
+ search(t) {
684
+ const e = t.target.value.toLowerCase();
685
+ this.options = this._originalOptions.map((o) => o.filter((i) => i.name.toLowerCase().includes(e))), this.requestUpdate();
686
+ }
687
+ getSelectedOptionNames() {
688
+ if (this.selectedOption) {
689
+ const t = this._originalOptions.flat().find((e) => e.code === this.selectedOption);
690
+ return t ? t.name : "";
691
+ } else
692
+ return this.selectedLabel;
693
+ }
694
+ get selectedText() {
695
+ var e;
696
+ return `${((e = this.selectedLabel) == null ? void 0 : e.trim()) || "options selected"}`;
697
+ }
698
+ getFirstFocusableOptionElement() {
699
+ return this.shadowRoot && Array.from(this.shadowRoot.querySelectorAll('div[role="option"]')).filter((e) => {
700
+ const o = e.closest('div[role="option"]'), i = o == null ? void 0 : o.getAttribute("data-option-code");
701
+ if (i) {
702
+ const r = this.options.flat().find((n) => n.code === i);
703
+ return (r == null ? void 0 : r.status) === "active";
704
+ }
705
+ return !1;
706
+ })[0] || null;
707
+ }
708
+ handleKeyDown(t, e) {
709
+ var r, n, c, a, d, u, h, y, x, O, ot, it, rt, st, nt, at, ct, lt, dt;
710
+ if (!this.shadowRoot)
711
+ return;
712
+ const o = Array.from(this.shadowRoot.querySelectorAll('div[role="option"]')).filter((p) => {
713
+ const l = p.closest('div[role="option"]'), g = l == null ? void 0 : l.getAttribute("data-option-code");
714
+ if (g) {
715
+ const w = this.options.flat().find((b) => b.code === g);
716
+ return (w == null ? void 0 : w.status) === "active";
717
+ }
718
+ return !1;
719
+ });
720
+ let i = o.findIndex((p) => {
721
+ var l;
722
+ return p === ((l = this.shadowRoot) == null ? void 0 : l.activeElement);
723
+ });
724
+ switch (t.key) {
725
+ case "ArrowDown":
726
+ if (t.preventDefault(), this.isExpanded) {
727
+ const p = (n = this.shadowRoot) == null ? void 0 : n.activeElement;
728
+ if ((p == null ? void 0 : p.id) === "searchInput")
729
+ i = 0, (c = o[i]) == null || c.focus();
730
+ else if (i === o.length - 1) {
731
+ const l = (a = this.shadowRoot) == null ? void 0 : a.querySelector("#searchInput");
732
+ l ? l.focus() : (i = 0, (d = o[i]) == null || d.focus());
733
+ } else i === -1 ? (i = 0, (u = o[i]) == null || u.focus()) : (i++, (h = o[i]) == null || h.focus());
734
+ } else {
735
+ this.isExpanded = !0, this.options = [...this._originalOptions];
736
+ const p = (r = this.shadowRoot) == null ? void 0 : r.querySelector("#searchInput");
737
+ p && (p.value = "", p.dispatchEvent(new Event("input"))), this.requestUpdate(), setTimeout(() => {
738
+ this.focusSearchInput();
739
+ }, 0);
740
+ }
741
+ break;
742
+ case "ArrowUp":
743
+ if (t.preventDefault(), this.isExpanded) {
744
+ const p = (y = this.shadowRoot) == null ? void 0 : y.querySelector("#searchInput"), l = (x = this.shadowRoot) == null ? void 0 : x.activeElement;
745
+ (l == null ? void 0 : l.id) === "searchInput" ? (i = o.length - 1, (O = o[i]) == null || O.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());
746
+ }
747
+ break;
748
+ case "ArrowRight":
749
+ case "ArrowLeft":
750
+ if (t.preventDefault(), this.isExpanded) {
751
+ const l = ((st = this.shadowRoot) == null ? void 0 : st.activeElement).closest('div[role="option"]');
752
+ if (l && t.key === "ArrowRight") {
753
+ const g = l.querySelector(".favouriteOptionBtn");
754
+ g && g.focus();
755
+ }
756
+ }
757
+ break;
758
+ case "Enter":
759
+ case " ":
760
+ if (t.preventDefault(), this.isExpanded) {
761
+ let l = ((at = this.shadowRoot) == null ? void 0 : at.activeElement).closest('div[role="option"]');
762
+ if (l != null && l.hasAttribute("data-option-code")) {
763
+ const g = l.getAttribute("data-option-code");
764
+ if (g) {
765
+ const w = this.options.flat().find((b) => b.code === g);
766
+ (w == null ? void 0 : w.status) === "active" && this.toggleSelection(w);
767
+ }
768
+ }
769
+ } else {
770
+ this.isExpanded = !0, this.options = [...this._originalOptions];
771
+ const p = (nt = this.shadowRoot) == null ? void 0 : nt.querySelector("#searchInput");
772
+ p && (p.value = "", p.dispatchEvent(new Event("input"))), this.requestUpdate(), setTimeout(() => {
773
+ this.focusSearchInput();
774
+ }, 0);
775
+ }
776
+ break;
777
+ case "Escape":
778
+ this.isExpanded && (t.preventDefault(), this.closeDropdown());
779
+ break;
780
+ case "Tab":
781
+ if (this.isExpanded) {
782
+ const p = (ct = this.shadowRoot) == null ? void 0 : ct.activeElement;
783
+ if ((p == null ? void 0 : p.id) === "searchInput")
784
+ if (t.preventDefault(), t.shiftKey) {
785
+ const l = Array.from(this.shadowRoot.querySelectorAll('div[role="option"]')).filter((g) => {
786
+ const w = g.closest('div[role="option"]'), b = w == null ? void 0 : w.getAttribute("data-option-code");
787
+ if (b) {
788
+ const $ = this.options.flat().find((_) => _.code === b);
789
+ return ($ == null ? void 0 : $.status) === "active";
790
+ }
791
+ return !1;
792
+ });
793
+ if (l.length > 0) {
794
+ l[l.length - 1].focus();
795
+ return;
796
+ }
797
+ } else {
798
+ const l = this.getFirstFocusableOptionElement();
799
+ l && l.focus();
800
+ }
801
+ else {
802
+ const l = Array.from(this.shadowRoot.querySelectorAll('div[role="option"]')).filter((b) => {
803
+ const $ = b.getAttribute("data-option-code"), _ = this.options.flat().find((Et) => Et.code === $);
804
+ return (_ == null ? void 0 : _.status) === "active";
805
+ }), g = p == null ? void 0 : p.closest('div[role="option"]'), w = g ? l.indexOf(g) : -1;
806
+ if (t.shiftKey)
807
+ w > 0 ? (t.preventDefault(), l[w - 1]) : w === 0 && (t.preventDefault(), this.focusSearchInput());
808
+ else if (w < l.length - 1) {
809
+ t.preventDefault();
810
+ const b = l[w + 1];
811
+ if (b)
812
+ b.focus();
813
+ else {
814
+ const $ = (lt = this.shadowRoot) == null ? void 0 : lt.querySelector("#searchInput");
815
+ if ($)
816
+ $.focus();
817
+ else {
818
+ const _ = this.getFirstFocusableOptionElement();
819
+ _ && _.focus();
820
+ }
821
+ }
822
+ } else if (w === l.length - 1) {
823
+ t.preventDefault();
824
+ const b = (dt = this.shadowRoot) == null ? void 0 : dt.querySelector("#searchInput");
825
+ if (b)
826
+ b.focus();
827
+ else {
828
+ const $ = this.getFirstFocusableOptionElement();
829
+ $ && $.focus();
830
+ }
831
+ }
832
+ }
833
+ }
834
+ break;
835
+ }
836
+ }
837
+ renderOptionList() {
838
+ return R`
839
+ ${this.options.map((t, e) => R`
840
+ ${t.map((o, i) => R`
841
+ <div
842
+ role="option"
843
+ aria-selected="${o.code === this.selectedOption}"
844
+ class="p-2 scroll-py-1 scroll-smooth flex items-center justify-between
845
+ ${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 ewc-focus text-ewc-available hover:bg-ewc-availableHover hover:text-white focus:bg-ewc-availableHover focus:text-white focus:outline-none"}
846
+ ${o.code === this.selectedOption ? "bg-ewc-availableHover text-white" : ""}"
847
+ data-option-code="${o.code}"
848
+ tabindex="0"
849
+ @click="${(r) => {
850
+ o.status === "active" && (r.preventDefault(), r.stopPropagation(), this.toggleSelection(o));
851
+ }}"
852
+ >
853
+ <label
854
+ for="option-${o.code}"
855
+ class="flex items-center w-full group ${o.status === "active" ? "cursor-pointer" : "cursor-not-allowed text-ewc-disabled"}"
856
+ data-option-code="${o.code}"
857
+ tabindex="-1"
858
+ @click="${(r) => {
859
+ o.status === "active" && (r.preventDefault(), r.stopPropagation(), this.toggleSelection(o));
860
+ }}"
861
+ >
862
+ <span class="w-full ml-2 "> ${o.name} </span>
863
+ </label>
864
+ </div>
865
+ ${i === t.length - 1 && e !== this.options.length - 1 ? R`<hr class="border-t border-gray-300 my-2" />` : ""}
866
+ `)}
867
+ `)}
868
+ `;
869
+ }
870
+ toggleOptionStatus(t) {
871
+ 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 ? {
872
+ ...u,
873
+ status: u.status === "active" ? "inactive" : "active"
874
+ } : u)), r = i(e), n = i(o), c = r.flat().find((a) => a.code === t);
875
+ (c == null ? void 0 : c.status) === "inactive" && this.selectedOption === t && (this.selectedOption = ""), this.options = r, this._originalOptions = n, this.requestUpdate(), this.dispatchEvent(new CustomEvent("option-status-change", {
876
+ detail: {
877
+ optionCode: t,
878
+ status: c == null ? void 0 : c.status
879
+ }
880
+ }));
881
+ }
882
+ toggleSelection(t) {
883
+ var o;
884
+ if (t.status !== "active")
885
+ return;
886
+ this.selectedOption !== t.code && (this.selectedOption = t.code, this.dispatchEvent(new CustomEvent("option-selected", { detail: { option: t } })));
887
+ const e = (o = this.shadowRoot) == null ? void 0 : o.querySelector("#searchInput");
888
+ if (e) {
889
+ const i = new Event("input", {
890
+ bubbles: !0,
891
+ cancelable: !0,
892
+ composed: !0
893
+ });
894
+ e.dispatchEvent(i);
895
+ }
896
+ this.requestUpdate();
897
+ }
898
+ shouldShowSearch() {
899
+ return this._shouldShowSearch;
900
+ }
901
+ // Add reset method
902
+ resetSelect() {
903
+ this.options = JSON.parse(JSON.stringify(this._initialOptions)), this.selectedOption = this._initialDefaultOption, this.activeOption = this._initialActiveOption, this.dispatchEvent(new CustomEvent("reset-select", {
904
+ detail: {
905
+ defaultOption: this._initialDefaultOption,
906
+ activeOption: this._initialActiveOption
907
+ }
908
+ })), this.requestUpdate();
909
+ }
910
+ render() {
911
+ return R`
912
+ <div class="relative bg-white rounded">
913
+ <button
914
+ id="select"
915
+ class="w-full h-11 border cursor-pointer align-middle flex relative rounded ewc-hover
916
+ ${this.invertColors ? "ewc-focus-invert border-ewc-msBorderInvert" : "ewc-focus border-ewc-msBorder "}"
917
+ @click="${this.toggleDropdown}"
918
+ @keydown="${this.handleKeyDown}"
919
+ aria-expanded="${this.isExpanded}"
920
+ >
921
+ <div id="selectedText" class="p-2 flex items-start relative w-full">
922
+ ${this.getSelectedOptionNames()}
923
+ </div>
924
+ <div
925
+ class="items-center bg-ewc-blue flex h-11 absolute top-0 right-0 w-11 rounded-tr-sm rounded-br-sm"
926
+ >
927
+ <div id="dropdownButton" class="rounded-r min-w-11 h-11 w-full text-white bg-ewc-blue flex justify-center items-center p-1">
928
+ <span class="cursor-pointer flex">
929
+ <svg id="dropdownArrow" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" focusable="false" aria-hidden="true" class="transform transition duration-300 fill-white size-5 ${this.isExpanded ? "" : "rotate-180"}">
930
+ <path fill-rule="evenodd" d="m45 30.12-2.73 2.82-18.24-18.36L5.73 33 3 30.18 24.03 9z" clip-rule="evenodd"></path>
931
+ </svg>
932
+ </span>
933
+ </div>
934
+ </div>
935
+ </button>
936
+ ${this.isExpanded ? R`
937
+ <div
938
+ id="dropdown"
939
+ class="absolute block justify-items-center left-0 w-full rounded shadow bg-white cursor-auto border-none box-border border-ewc-msBorder mt-1 z-10"
940
+ style="max-height: 80vh; overflow: hidden;"
941
+ >
942
+ ${this.shouldShowSearch() ? R`
943
+ <input
944
+ id="searchInput"
945
+ type="text"
946
+ placeholder="Search"
947
+ aria-label="Search"
948
+ autocomplete="off"
949
+ .value="${this._searchText}"
950
+ class="border-b border-ewc-msBorder box-border appearance-none bg-white w-[93%] max-w-[93%] rounded text-ewc-msText block p-2.75 m-2 shadow-md"
951
+ @input="${this.search}"
952
+ />
953
+ ` : ""}
954
+ <div
955
+ id="optionList"
956
+ style="
957
+ ${this.dropdownHeight ? `height: ${this.dropdownHeight};` : ""}"
958
+ class="overflow-y-auto w-full ${this.dropdownHeight ? "" : "min-h-48 max-h-48 h-48"}"
959
+ >
960
+ ${this.renderOptionList()}
961
+ </div>
962
+ </div>
963
+ ` : ""}
964
+ </div>
965
+ `;
966
+ }
967
+ }, G = E, E.version = "1.0.0-alpha", E.styles = [new CSSStyleSheet()], E);
968
+ v([
969
+ k({ type: Array })
970
+ ], m.prototype, "options", void 0);
971
+ v([
972
+ k({ type: String })
973
+ ], m.prototype, "selectedOption", void 0);
974
+ v([
975
+ k({ type: Boolean })
976
+ ], m.prototype, "isExpanded", void 0);
977
+ v([
978
+ k({ type: String })
979
+ ], m.prototype, "defaultOption", void 0);
980
+ v([
981
+ k({ type: String })
982
+ ], m.prototype, "activeOption", void 0);
983
+ v([
984
+ k({ type: String })
985
+ ], m.prototype, "dropdownHeight", void 0);
986
+ v([
987
+ k({ type: String })
988
+ ], m.prototype, "invertColors", null);
989
+ v([
990
+ k({ type: String })
991
+ ], m.prototype, "selectedLabel", void 0);
992
+ v([
993
+ k({ type: String })
994
+ ], m.prototype, "searchMode", void 0);
995
+ v([
996
+ k({ type: String })
997
+ ], m.prototype, "_searchText", void 0);
998
+ v([
999
+ k({ type: Boolean })
1000
+ ], m.prototype, "_shouldShowSearch", void 0);
1001
+ v([
1002
+ Gt("#dropdown")
1003
+ ], m.prototype, "dropdownElement", void 0);
1004
+ m = G = v([
1005
+ Jt("ewc-singleselect")
1006
+ ], m);
1007
+ //# sourceMappingURL=main.es.js.map