@patimweb/crtstyleguide 1.0.18 → 1.0.20

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.
Files changed (2) hide show
  1. package/dist/lib/index.js +1550 -1129
  2. package/package.json +3 -3
package/dist/lib/index.js CHANGED
@@ -1,21 +1,21 @@
1
- import { css as d, LitElement as h, html as l } from "lit";
2
- const u = (e) => (t, a) => {
1
+ import { css as c, LitElement as p, html as l } from "lit";
2
+ const d = (e) => (t, a) => {
3
3
  a !== void 0 ? a.addInitializer(() => {
4
4
  customElements.define(e, t);
5
5
  }) : customElements.define(e, t);
6
6
  };
7
- const Tt = globalThis, Jt = Tt.ShadowRoot && (Tt.ShadyCSS === void 0 || Tt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, ke = /* @__PURE__ */ Symbol(), de = /* @__PURE__ */ new WeakMap();
8
- let Oe = class {
9
- constructor(t, a, s) {
10
- if (this._$cssResult$ = !0, s !== ke) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
7
+ const zt = globalThis, Nt = zt.ShadowRoot && (zt.ShadyCSS === void 0 || zt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, te = /* @__PURE__ */ Symbol(), Gt = /* @__PURE__ */ new WeakMap();
8
+ let se = class {
9
+ constructor(t, a, i) {
10
+ if (this._$cssResult$ = !0, i !== te) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
11
11
  this.cssText = t, this.t = a;
12
12
  }
13
13
  get styleSheet() {
14
14
  let t = this.o;
15
15
  const a = this.t;
16
- if (Jt && t === void 0) {
17
- const s = a !== void 0 && a.length === 1;
18
- s && (t = de.get(a)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && de.set(a, t));
16
+ if (Nt && t === void 0) {
17
+ const i = a !== void 0 && a.length === 1;
18
+ i && (t = Gt.get(a)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && Gt.set(a, t));
19
19
  }
20
20
  return t;
21
21
  }
@@ -23,21 +23,21 @@ let Oe = class {
23
23
  return this.cssText;
24
24
  }
25
25
  };
26
- const Ae = (e) => new Oe(typeof e == "string" ? e : e + "", void 0, ke), Se = (e, t) => {
27
- if (Jt) e.adoptedStyleSheets = t.map((a) => a instanceof CSSStyleSheet ? a : a.styleSheet);
26
+ const oe = (e) => new se(typeof e == "string" ? e : e + "", void 0, te), ne = (e, t) => {
27
+ if (Nt) e.adoptedStyleSheets = t.map((a) => a instanceof CSSStyleSheet ? a : a.styleSheet);
28
28
  else for (const a of t) {
29
- const s = document.createElement("style"), r = Tt.litNonce;
30
- r !== void 0 && s.setAttribute("nonce", r), s.textContent = a.cssText, e.appendChild(s);
29
+ const i = document.createElement("style"), r = zt.litNonce;
30
+ r !== void 0 && i.setAttribute("nonce", r), i.textContent = a.cssText, e.appendChild(i);
31
31
  }
32
- }, he = Jt ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
32
+ }, Qt = Nt ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
33
33
  let a = "";
34
- for (const s of t.cssRules) a += s.cssText;
35
- return Ae(a);
34
+ for (const i of t.cssRules) a += i.cssText;
35
+ return oe(a);
36
36
  })(e) : e;
37
- const { is: Ee, defineProperty: Me, getOwnPropertyDescriptor: De, getOwnPropertyNames: Te, getOwnPropertySymbols: je, getPrototypeOf: Le } = Object, Vt = globalThis, ue = Vt.trustedTypes, Ie = ue ? ue.emptyScript : "", Be = Vt.reactiveElementPolyfillSupport, bt = (e, t) => e, jt = { toAttribute(e, t) {
37
+ const { is: le, defineProperty: ce, getOwnPropertyDescriptor: pe, getOwnPropertyNames: de, getOwnPropertySymbols: he, getPrototypeOf: ve } = Object, It = globalThis, Jt = It.trustedTypes, ue = Jt ? Jt.emptyScript : "", ge = It.reactiveElementPolyfillSupport, pt = (e, t) => e, Ct = { toAttribute(e, t) {
38
38
  switch (t) {
39
39
  case Boolean:
40
- e = e ? Ie : null;
40
+ e = e ? ue : null;
41
41
  break;
42
42
  case Object:
43
43
  case Array:
@@ -62,54 +62,54 @@ const { is: Ee, defineProperty: Me, getOwnPropertyDescriptor: De, getOwnProperty
62
62
  }
63
63
  }
64
64
  return a;
65
- } }, te = (e, t) => !Ee(e, t), ve = { attribute: !0, type: String, converter: jt, reflect: !1, useDefault: !1, hasChanged: te };
66
- Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), Vt.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
67
- let mt = class extends HTMLElement {
65
+ } }, Rt = (e, t) => !le(e, t), Zt = { attribute: !0, type: String, converter: Ct, reflect: !1, useDefault: !1, hasChanged: Rt };
66
+ Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), It.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
67
+ class ct extends HTMLElement {
68
68
  static addInitializer(t) {
69
69
  this._$Ei(), (this.l ??= []).push(t);
70
70
  }
71
71
  static get observedAttributes() {
72
72
  return this.finalize(), this._$Eh && [...this._$Eh.keys()];
73
73
  }
74
- static createProperty(t, a = ve) {
74
+ static createProperty(t, a = Zt) {
75
75
  if (a.state && (a.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((a = Object.create(a)).wrapped = !0), this.elementProperties.set(t, a), !a.noAccessor) {
76
- const s = /* @__PURE__ */ Symbol(), r = this.getPropertyDescriptor(t, s, a);
77
- r !== void 0 && Me(this.prototype, t, r);
76
+ const i = /* @__PURE__ */ Symbol(), r = this.getPropertyDescriptor(t, i, a);
77
+ r !== void 0 && ce(this.prototype, t, r);
78
78
  }
79
79
  }
80
- static getPropertyDescriptor(t, a, s) {
81
- const { get: r, set: i } = De(this.prototype, t) ?? { get() {
80
+ static getPropertyDescriptor(t, a, i) {
81
+ const { get: r, set: s } = pe(this.prototype, t) ?? { get() {
82
82
  return this[a];
83
83
  }, set(o) {
84
84
  this[a] = o;
85
85
  } };
86
86
  return { get: r, set(o) {
87
- const c = r?.call(this);
88
- i?.call(this, o), this.requestUpdate(t, c, s);
87
+ const h = r?.call(this);
88
+ s?.call(this, o), this.requestUpdate(t, h, i);
89
89
  }, configurable: !0, enumerable: !0 };
90
90
  }
91
91
  static getPropertyOptions(t) {
92
- return this.elementProperties.get(t) ?? ve;
92
+ return this.elementProperties.get(t) ?? Zt;
93
93
  }
94
94
  static _$Ei() {
95
- if (this.hasOwnProperty(bt("elementProperties"))) return;
96
- const t = Le(this);
95
+ if (this.hasOwnProperty(pt("elementProperties"))) return;
96
+ const t = ve(this);
97
97
  t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
98
98
  }
99
99
  static finalize() {
100
- if (this.hasOwnProperty(bt("finalized"))) return;
101
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(bt("properties"))) {
102
- const a = this.properties, s = [...Te(a), ...je(a)];
103
- for (const r of s) this.createProperty(r, a[r]);
100
+ if (this.hasOwnProperty(pt("finalized"))) return;
101
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(pt("properties"))) {
102
+ const a = this.properties, i = [...de(a), ...he(a)];
103
+ for (const r of i) this.createProperty(r, a[r]);
104
104
  }
105
105
  const t = this[Symbol.metadata];
106
106
  if (t !== null) {
107
107
  const a = litPropertyMetadata.get(t);
108
- if (a !== void 0) for (const [s, r] of a) this.elementProperties.set(s, r);
108
+ if (a !== void 0) for (const [i, r] of a) this.elementProperties.set(i, r);
109
109
  }
110
110
  this._$Eh = /* @__PURE__ */ new Map();
111
- for (const [a, s] of this.elementProperties) {
112
- const r = this._$Eu(a, s);
111
+ for (const [a, i] of this.elementProperties) {
112
+ const r = this._$Eu(a, i);
113
113
  r !== void 0 && this._$Eh.set(r, a);
114
114
  }
115
115
  this.elementStyles = this.finalizeStyles(this.styles);
@@ -117,14 +117,14 @@ let mt = class extends HTMLElement {
117
117
  static finalizeStyles(t) {
118
118
  const a = [];
119
119
  if (Array.isArray(t)) {
120
- const s = new Set(t.flat(1 / 0).reverse());
121
- for (const r of s) a.unshift(he(r));
122
- } else t !== void 0 && a.push(he(t));
120
+ const i = new Set(t.flat(1 / 0).reverse());
121
+ for (const r of i) a.unshift(Qt(r));
122
+ } else t !== void 0 && a.push(Qt(t));
123
123
  return a;
124
124
  }
125
125
  static _$Eu(t, a) {
126
- const s = a.attribute;
127
- return s === !1 ? void 0 : typeof s == "string" ? s : typeof t == "string" ? t.toLowerCase() : void 0;
126
+ const i = a.attribute;
127
+ return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0;
128
128
  }
129
129
  constructor() {
130
130
  super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
@@ -140,12 +140,12 @@ let mt = class extends HTMLElement {
140
140
  }
141
141
  _$E_() {
142
142
  const t = /* @__PURE__ */ new Map(), a = this.constructor.elementProperties;
143
- for (const s of a.keys()) this.hasOwnProperty(s) && (t.set(s, this[s]), delete this[s]);
143
+ for (const i of a.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
144
144
  t.size > 0 && (this._$Ep = t);
145
145
  }
146
146
  createRenderRoot() {
147
147
  const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
148
- return Se(t, this.constructor.elementStyles), t;
148
+ return ne(t, this.constructor.elementStyles), t;
149
149
  }
150
150
  connectedCallback() {
151
151
  this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((t) => t.hostConnected?.());
@@ -155,35 +155,35 @@ let mt = class extends HTMLElement {
155
155
  disconnectedCallback() {
156
156
  this._$EO?.forEach((t) => t.hostDisconnected?.());
157
157
  }
158
- attributeChangedCallback(t, a, s) {
159
- this._$AK(t, s);
158
+ attributeChangedCallback(t, a, i) {
159
+ this._$AK(t, i);
160
160
  }
161
161
  _$ET(t, a) {
162
- const s = this.constructor.elementProperties.get(t), r = this.constructor._$Eu(t, s);
163
- if (r !== void 0 && s.reflect === !0) {
164
- const i = (s.converter?.toAttribute !== void 0 ? s.converter : jt).toAttribute(a, s.type);
165
- this._$Em = t, i == null ? this.removeAttribute(r) : this.setAttribute(r, i), this._$Em = null;
162
+ const i = this.constructor.elementProperties.get(t), r = this.constructor._$Eu(t, i);
163
+ if (r !== void 0 && i.reflect === !0) {
164
+ const s = (i.converter?.toAttribute !== void 0 ? i.converter : Ct).toAttribute(a, i.type);
165
+ this._$Em = t, s == null ? this.removeAttribute(r) : this.setAttribute(r, s), this._$Em = null;
166
166
  }
167
167
  }
168
168
  _$AK(t, a) {
169
- const s = this.constructor, r = s._$Eh.get(t);
169
+ const i = this.constructor, r = i._$Eh.get(t);
170
170
  if (r !== void 0 && this._$Em !== r) {
171
- const i = s.getPropertyOptions(r), o = typeof i.converter == "function" ? { fromAttribute: i.converter } : i.converter?.fromAttribute !== void 0 ? i.converter : jt;
171
+ const s = i.getPropertyOptions(r), o = typeof s.converter == "function" ? { fromAttribute: s.converter } : s.converter?.fromAttribute !== void 0 ? s.converter : Ct;
172
172
  this._$Em = r;
173
- const c = o.fromAttribute(a, i.type);
174
- this[r] = c ?? this._$Ej?.get(r) ?? c, this._$Em = null;
173
+ const h = o.fromAttribute(a, s.type);
174
+ this[r] = h ?? this._$Ej?.get(r) ?? h, this._$Em = null;
175
175
  }
176
176
  }
177
- requestUpdate(t, a, s, r = !1, i) {
177
+ requestUpdate(t, a, i, r = !1, s) {
178
178
  if (t !== void 0) {
179
179
  const o = this.constructor;
180
- if (r === !1 && (i = this[t]), s ??= o.getPropertyOptions(t), !((s.hasChanged ?? te)(i, a) || s.useDefault && s.reflect && i === this._$Ej?.get(t) && !this.hasAttribute(o._$Eu(t, s)))) return;
181
- this.C(t, a, s);
180
+ if (r === !1 && (s = this[t]), i ??= o.getPropertyOptions(t), !((i.hasChanged ?? Rt)(s, a) || i.useDefault && i.reflect && s === this._$Ej?.get(t) && !this.hasAttribute(o._$Eu(t, i)))) return;
181
+ this.C(t, a, i);
182
182
  }
183
183
  this.isUpdatePending === !1 && (this._$ES = this._$EP());
184
184
  }
185
- C(t, a, { useDefault: s, reflect: r, wrapped: i }, o) {
186
- s && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, o ?? a ?? this[t]), i !== !0 || o !== void 0) || (this._$AL.has(t) || (this.hasUpdated || s || (a = void 0), this._$AL.set(t, a)), r === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
185
+ C(t, a, { useDefault: i, reflect: r, wrapped: s }, o) {
186
+ i && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, o ?? a ?? this[t]), s !== !0 || o !== void 0) || (this._$AL.has(t) || (this.hasUpdated || i || (a = void 0), this._$AL.set(t, a)), r === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
187
187
  }
188
188
  async _$EP() {
189
189
  this.isUpdatePending = !0;
@@ -202,21 +202,21 @@ let mt = class extends HTMLElement {
202
202
  if (!this.isUpdatePending) return;
203
203
  if (!this.hasUpdated) {
204
204
  if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
205
- for (const [r, i] of this._$Ep) this[r] = i;
205
+ for (const [r, s] of this._$Ep) this[r] = s;
206
206
  this._$Ep = void 0;
207
207
  }
208
- const s = this.constructor.elementProperties;
209
- if (s.size > 0) for (const [r, i] of s) {
210
- const { wrapped: o } = i, c = this[r];
211
- o !== !0 || this._$AL.has(r) || c === void 0 || this.C(r, void 0, i, c);
208
+ const i = this.constructor.elementProperties;
209
+ if (i.size > 0) for (const [r, s] of i) {
210
+ const { wrapped: o } = s, h = this[r];
211
+ o !== !0 || this._$AL.has(r) || h === void 0 || this.C(r, void 0, s, h);
212
212
  }
213
213
  }
214
214
  let t = !1;
215
215
  const a = this._$AL;
216
216
  try {
217
- t = this.shouldUpdate(a), t ? (this.willUpdate(a), this._$EO?.forEach((s) => s.hostUpdate?.()), this.update(a)) : this._$EM();
218
- } catch (s) {
219
- throw t = !1, this._$EM(), s;
217
+ t = this.shouldUpdate(a), t ? (this.willUpdate(a), this._$EO?.forEach((i) => i.hostUpdate?.()), this.update(a)) : this._$EM();
218
+ } catch (i) {
219
+ throw t = !1, this._$EM(), i;
220
220
  }
221
221
  t && this._$AE(a);
222
222
  }
@@ -244,302 +244,53 @@ let mt = class extends HTMLElement {
244
244
  }
245
245
  firstUpdated(t) {
246
246
  }
247
- };
248
- mt.elementStyles = [], mt.shadowRootOptions = { mode: "open" }, mt[bt("elementProperties")] = /* @__PURE__ */ new Map(), mt[bt("finalized")] = /* @__PURE__ */ new Map(), Be?.({ ReactiveElement: mt }), (Vt.reactiveElementVersions ??= []).push("2.1.2");
249
- const Ne = { attribute: !0, type: String, converter: jt, reflect: !1, hasChanged: te }, Ue = (e = Ne, t, a) => {
250
- const { kind: s, metadata: r } = a;
251
- let i = globalThis.litPropertyMetadata.get(r);
252
- if (i === void 0 && globalThis.litPropertyMetadata.set(r, i = /* @__PURE__ */ new Map()), s === "setter" && ((e = Object.create(e)).wrapped = !0), i.set(a.name, e), s === "accessor") {
247
+ }
248
+ ct.elementStyles = [], ct.shadowRootOptions = { mode: "open" }, ct[pt("elementProperties")] = /* @__PURE__ */ new Map(), ct[pt("finalized")] = /* @__PURE__ */ new Map(), ge?.({ ReactiveElement: ct }), (It.reactiveElementVersions ??= []).push("2.1.2");
249
+ const me = { attribute: !0, type: String, converter: Ct, reflect: !1, hasChanged: Rt }, fe = (e = me, t, a) => {
250
+ const { kind: i, metadata: r } = a;
251
+ let s = globalThis.litPropertyMetadata.get(r);
252
+ if (s === void 0 && globalThis.litPropertyMetadata.set(r, s = /* @__PURE__ */ new Map()), i === "setter" && ((e = Object.create(e)).wrapped = !0), s.set(a.name, e), i === "accessor") {
253
253
  const { name: o } = a;
254
- return { set(c) {
255
- const p = t.get.call(this);
256
- t.set.call(this, c), this.requestUpdate(o, p, e, !0, c);
257
- }, init(c) {
258
- return c !== void 0 && this.C(o, void 0, e, c), c;
254
+ return { set(h) {
255
+ const f = t.get.call(this);
256
+ t.set.call(this, h), this.requestUpdate(o, f, e, !0, h);
257
+ }, init(h) {
258
+ return h !== void 0 && this.C(o, void 0, e, h), h;
259
259
  } };
260
260
  }
261
- if (s === "setter") {
261
+ if (i === "setter") {
262
262
  const { name: o } = a;
263
- return function(c) {
264
- const p = this[o];
265
- t.call(this, c), this.requestUpdate(o, p, e, !0, c);
263
+ return function(h) {
264
+ const f = this[o];
265
+ t.call(this, h), this.requestUpdate(o, f, e, !0, h);
266
266
  };
267
267
  }
268
- throw Error("Unsupported decorator location: " + s);
268
+ throw Error("Unsupported decorator location: " + i);
269
269
  };
270
270
  function n(e) {
271
- return (t, a) => typeof a == "object" ? Ue(e, t, a) : ((s, r, i) => {
272
- const o = r.hasOwnProperty(i);
273
- return r.constructor.createProperty(i, s), o ? Object.getOwnPropertyDescriptor(r, i) : void 0;
271
+ return (t, a) => typeof a == "object" ? fe(e, t, a) : ((i, r, s) => {
272
+ const o = r.hasOwnProperty(s);
273
+ return r.constructor.createProperty(s, i), o ? Object.getOwnPropertyDescriptor(r, s) : void 0;
274
274
  })(e, t, a);
275
275
  }
276
- function m(e) {
276
+ function v(e) {
277
277
  return n({ ...e, state: !0, attribute: !1 });
278
278
  }
279
- const Re = (e, t, a) => (a.configurable = !0, a.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(e, t, a), a);
280
- function ee(e, t) {
281
- return (a, s, r) => {
282
- const i = (o) => o.renderRoot?.querySelector(e) ?? null;
283
- return Re(a, s, { get() {
284
- return i(this);
279
+ const be = (e, t, a) => (a.configurable = !0, a.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(e, t, a), a);
280
+ function Ft(e, t) {
281
+ return (a, i, r) => {
282
+ const s = (o) => o.renderRoot?.querySelector(e) ?? null;
283
+ return be(a, i, { get() {
284
+ return s(this);
285
285
  } });
286
286
  };
287
287
  }
288
- const re = globalThis, ge = (e) => e, Lt = re.trustedTypes, me = Lt ? Lt.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, $e = "$lit$", F = `lit$${Math.random().toFixed(9).slice(2)}$`, _e = "?" + F, Fe = `<${_e}>`, Q = document, It = () => Q.createComment(""), yt = (e) => e === null || typeof e != "object" && typeof e != "function", ae = Array.isArray, He = (e) => ae(e) || typeof e?.[Symbol.iterator] == "function", Gt = `[
289
- \f\r]`, ft = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, fe = /-->/g, be = />/g, G = RegExp(`>|${Gt}(?:([^\\s"'>=/]+)(${Gt}*=${Gt}*(?:[^
290
- \f\r"'\`<>=]|("|')|))|$)`, "g"), ye = /'/g, xe = /"/g, ze = /^(?:script|style|textarea|title)$/i, ct = /* @__PURE__ */ Symbol.for("lit-noChange"), f = /* @__PURE__ */ Symbol.for("lit-nothing"), we = /* @__PURE__ */ new WeakMap(), Z = Q.createTreeWalker(Q, 129);
291
- function Ce(e, t) {
292
- if (!ae(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
293
- return me !== void 0 ? me.createHTML(t) : t;
294
- }
295
- const Ye = (e, t) => {
296
- const a = e.length - 1, s = [];
297
- let r, i = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = ft;
298
- for (let c = 0; c < a; c++) {
299
- const p = e[c];
300
- let v, b, g = -1, E = 0;
301
- for (; E < p.length && (o.lastIndex = E, b = o.exec(p), b !== null); ) E = o.lastIndex, o === ft ? b[1] === "!--" ? o = fe : b[1] !== void 0 ? o = be : b[2] !== void 0 ? (ze.test(b[2]) && (r = RegExp("</" + b[2], "g")), o = G) : b[3] !== void 0 && (o = G) : o === G ? b[0] === ">" ? (o = r ?? ft, g = -1) : b[1] === void 0 ? g = -2 : (g = o.lastIndex - b[2].length, v = b[1], o = b[3] === void 0 ? G : b[3] === '"' ? xe : ye) : o === xe || o === ye ? o = G : o === fe || o === be ? o = ft : (o = G, r = void 0);
302
- const R = o === G && e[c + 1].startsWith("/>") ? " " : "";
303
- i += o === ft ? p + Fe : g >= 0 ? (s.push(v), p.slice(0, g) + $e + p.slice(g) + F + R) : p + F + (g === -2 ? c : R);
304
- }
305
- return [Ce(e, i + (e[a] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
306
- };
307
- class xt {
308
- constructor({ strings: t, _$litType$: a }, s) {
309
- let r;
310
- this.parts = [];
311
- let i = 0, o = 0;
312
- const c = t.length - 1, p = this.parts, [v, b] = Ye(t, a);
313
- if (this.el = xt.createElement(v, s), Z.currentNode = this.el.content, a === 2 || a === 3) {
314
- const g = this.el.content.firstChild;
315
- g.replaceWith(...g.childNodes);
316
- }
317
- for (; (r = Z.nextNode()) !== null && p.length < c; ) {
318
- if (r.nodeType === 1) {
319
- if (r.hasAttributes()) for (const g of r.getAttributeNames()) if (g.endsWith($e)) {
320
- const E = b[o++], R = r.getAttribute(g).split(F), Dt = /([.?@])?(.*)/.exec(E);
321
- p.push({ type: 1, index: i, name: Dt[2], strings: R, ctor: Dt[1] === "." ? qe : Dt[1] === "?" ? We : Dt[1] === "@" ? Xe : Wt }), r.removeAttribute(g);
322
- } else g.startsWith(F) && (p.push({ type: 6, index: i }), r.removeAttribute(g));
323
- if (ze.test(r.tagName)) {
324
- const g = r.textContent.split(F), E = g.length - 1;
325
- if (E > 0) {
326
- r.textContent = Lt ? Lt.emptyScript : "";
327
- for (let R = 0; R < E; R++) r.append(g[R], It()), Z.nextNode(), p.push({ type: 2, index: ++i });
328
- r.append(g[E], It());
329
- }
330
- }
331
- } else if (r.nodeType === 8) if (r.data === _e) p.push({ type: 2, index: i });
332
- else {
333
- let g = -1;
334
- for (; (g = r.data.indexOf(F, g + 1)) !== -1; ) p.push({ type: 7, index: i }), g += F.length - 1;
335
- }
336
- i++;
337
- }
338
- }
339
- static createElement(t, a) {
340
- const s = Q.createElement("template");
341
- return s.innerHTML = t, s;
342
- }
343
- }
344
- function pt(e, t, a = e, s) {
345
- if (t === ct) return t;
346
- let r = s !== void 0 ? a._$Co?.[s] : a._$Cl;
347
- const i = yt(t) ? void 0 : t._$litDirective$;
348
- return r?.constructor !== i && (r?._$AO?.(!1), i === void 0 ? r = void 0 : (r = new i(e), r._$AT(e, a, s)), s !== void 0 ? (a._$Co ??= [])[s] = r : a._$Cl = r), r !== void 0 && (t = pt(e, r._$AS(e, t.values), r, s)), t;
349
- }
350
- class Ve {
351
- constructor(t, a) {
352
- this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = a;
353
- }
354
- get parentNode() {
355
- return this._$AM.parentNode;
356
- }
357
- get _$AU() {
358
- return this._$AM._$AU;
359
- }
360
- u(t) {
361
- const { el: { content: a }, parts: s } = this._$AD, r = (t?.creationScope ?? Q).importNode(a, !0);
362
- Z.currentNode = r;
363
- let i = Z.nextNode(), o = 0, c = 0, p = s[0];
364
- for (; p !== void 0; ) {
365
- if (o === p.index) {
366
- let v;
367
- p.type === 2 ? v = new qt(i, i.nextSibling, this, t) : p.type === 1 ? v = new p.ctor(i, p.name, p.strings, this, t) : p.type === 6 && (v = new Ke(i, this, t)), this._$AV.push(v), p = s[++c];
368
- }
369
- o !== p?.index && (i = Z.nextNode(), o++);
370
- }
371
- return Z.currentNode = Q, r;
372
- }
373
- p(t) {
374
- let a = 0;
375
- for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, a), a += s.strings.length - 2) : s._$AI(t[a])), a++;
376
- }
377
- }
378
- class qt {
379
- get _$AU() {
380
- return this._$AM?._$AU ?? this._$Cv;
381
- }
382
- constructor(t, a, s, r) {
383
- this.type = 2, this._$AH = f, this._$AN = void 0, this._$AA = t, this._$AB = a, this._$AM = s, this.options = r, this._$Cv = r?.isConnected ?? !0;
384
- }
385
- get parentNode() {
386
- let t = this._$AA.parentNode;
387
- const a = this._$AM;
388
- return a !== void 0 && t?.nodeType === 11 && (t = a.parentNode), t;
389
- }
390
- get startNode() {
391
- return this._$AA;
392
- }
393
- get endNode() {
394
- return this._$AB;
395
- }
396
- _$AI(t, a = this) {
397
- t = pt(this, t, a), yt(t) ? t === f || t == null || t === "" ? (this._$AH !== f && this._$AR(), this._$AH = f) : t !== this._$AH && t !== ct && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : He(t) ? this.k(t) : this._(t);
398
- }
399
- O(t) {
400
- return this._$AA.parentNode.insertBefore(t, this._$AB);
401
- }
402
- T(t) {
403
- this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
404
- }
405
- _(t) {
406
- this._$AH !== f && yt(this._$AH) ? this._$AA.nextSibling.data = t : this.T(Q.createTextNode(t)), this._$AH = t;
407
- }
408
- $(t) {
409
- const { values: a, _$litType$: s } = t, r = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = xt.createElement(Ce(s.h, s.h[0]), this.options)), s);
410
- if (this._$AH?._$AD === r) this._$AH.p(a);
411
- else {
412
- const i = new Ve(r, this), o = i.u(this.options);
413
- i.p(a), this.T(o), this._$AH = i;
414
- }
415
- }
416
- _$AC(t) {
417
- let a = we.get(t.strings);
418
- return a === void 0 && we.set(t.strings, a = new xt(t)), a;
419
- }
420
- k(t) {
421
- ae(this._$AH) || (this._$AH = [], this._$AR());
422
- const a = this._$AH;
423
- let s, r = 0;
424
- for (const i of t) r === a.length ? a.push(s = new qt(this.O(It()), this.O(It()), this, this.options)) : s = a[r], s._$AI(i), r++;
425
- r < a.length && (this._$AR(s && s._$AB.nextSibling, r), a.length = r);
426
- }
427
- _$AR(t = this._$AA.nextSibling, a) {
428
- for (this._$AP?.(!1, !0, a); t !== this._$AB; ) {
429
- const s = ge(t).nextSibling;
430
- ge(t).remove(), t = s;
431
- }
432
- }
433
- setConnected(t) {
434
- this._$AM === void 0 && (this._$Cv = t, this._$AP?.(t));
435
- }
436
- }
437
- class Wt {
438
- get tagName() {
439
- return this.element.tagName;
440
- }
441
- get _$AU() {
442
- return this._$AM._$AU;
443
- }
444
- constructor(t, a, s, r, i) {
445
- this.type = 1, this._$AH = f, this._$AN = void 0, this.element = t, this.name = a, this._$AM = r, this.options = i, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = f;
446
- }
447
- _$AI(t, a = this, s, r) {
448
- const i = this.strings;
449
- let o = !1;
450
- if (i === void 0) t = pt(this, t, a, 0), o = !yt(t) || t !== this._$AH && t !== ct, o && (this._$AH = t);
451
- else {
452
- const c = t;
453
- let p, v;
454
- for (t = i[0], p = 0; p < i.length - 1; p++) v = pt(this, c[s + p], a, p), v === ct && (v = this._$AH[p]), o ||= !yt(v) || v !== this._$AH[p], v === f ? t = f : t !== f && (t += (v ?? "") + i[p + 1]), this._$AH[p] = v;
455
- }
456
- o && !r && this.j(t);
457
- }
458
- j(t) {
459
- t === f ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
460
- }
461
- }
462
- class qe extends Wt {
463
- constructor() {
464
- super(...arguments), this.type = 3;
465
- }
466
- j(t) {
467
- this.element[this.name] = t === f ? void 0 : t;
468
- }
469
- }
470
- class We extends Wt {
471
- constructor() {
472
- super(...arguments), this.type = 4;
473
- }
474
- j(t) {
475
- this.element.toggleAttribute(this.name, !!t && t !== f);
476
- }
477
- }
478
- class Xe extends Wt {
479
- constructor(t, a, s, r, i) {
480
- super(t, a, s, r, i), this.type = 5;
481
- }
482
- _$AI(t, a = this) {
483
- if ((t = pt(this, t, a, 0) ?? f) === ct) return;
484
- const s = this._$AH, r = t === f && s !== f || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, i = t !== f && (s === f || r);
485
- r && this.element.removeEventListener(this.name, this, s), i && this.element.addEventListener(this.name, this, t), this._$AH = t;
486
- }
487
- handleEvent(t) {
488
- typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
489
- }
490
- }
491
- class Ke {
492
- constructor(t, a, s) {
493
- this.element = t, this.type = 6, this._$AN = void 0, this._$AM = a, this.options = s;
494
- }
495
- get _$AU() {
496
- return this._$AM._$AU;
497
- }
498
- _$AI(t) {
499
- pt(this, t);
500
- }
501
- }
502
- const Ge = re.litHtmlPolyfillSupport;
503
- Ge?.(xt, qt), (re.litHtmlVersions ??= []).push("3.3.2");
504
- const Ze = { CHILD: 2 }, Qe = (e) => (...t) => ({ _$litDirective$: e, values: t });
505
- class Je {
506
- constructor(t) {
507
- }
508
- get _$AU() {
509
- return this._$AM._$AU;
510
- }
511
- _$AT(t, a, s) {
512
- this._$Ct = t, this._$AM = a, this._$Ci = s;
513
- }
514
- _$AS(t, a) {
515
- return this.update(t, a);
516
- }
517
- update(t, a) {
518
- return this.render(...a);
519
- }
520
- }
521
- class Zt extends Je {
522
- constructor(t) {
523
- if (super(t), this.it = f, t.type !== Ze.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
524
- }
525
- render(t) {
526
- if (t === f || t == null) return this._t = void 0, this.it = t;
527
- if (t === ct) return t;
528
- if (typeof t != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
529
- if (t === this.it) return this._t;
530
- this.it = t;
531
- const a = [t];
532
- return a.raw = a, this._t = { _$litType$: this.constructor.resultType, strings: a, values: [] };
533
- }
534
- }
535
- Zt.directiveName = "unsafeHTML", Zt.resultType = 1;
536
- const tr = Qe(Zt);
537
- var er = Object.defineProperty, rr = Object.getOwnPropertyDescriptor, se = (e, t, a, s) => {
538
- for (var r = s > 1 ? void 0 : s ? rr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
539
- (o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
540
- return s && r && er(t, a, r), r;
288
+ var ye = Object.defineProperty, xe = Object.getOwnPropertyDescriptor, Vt = (e, t, a, i) => {
289
+ for (var r = i > 1 ? void 0 : i ? xe(t, a) : t, s = e.length - 1, o; s >= 0; s--)
290
+ (o = e[s]) && (r = (i ? o(t, a, r) : o(r)) || r);
291
+ return i && r && ye(t, a, r), r;
541
292
  };
542
- const ar = {
293
+ const we = {
543
294
  check: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><path d="M20 6L9 17l-5-5"/></svg>',
544
295
  checkmark: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><path d="M20 6L9 17l-5-5"/></svg>',
545
296
  close: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><path d="M18 6L6 18M6 6l12 12"/></svg>',
@@ -593,16 +344,16 @@ const ar = {
593
344
  "volume-mute": '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"/><line x1="23" y1="9" x2="17" y2="15"/></svg>',
594
345
  music: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><path d="M9 18V5l12-2v13"/><circle cx="6" cy="18" r="3"/><circle cx="18" cy="16" r="3"/></svg>'
595
346
  };
596
- let wt = class extends h {
347
+ let dt = class extends p {
597
348
  constructor() {
598
349
  super(...arguments), this.name = "", this.size = "md";
599
350
  }
600
351
  render() {
601
- const e = ar[this.name] || '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><text x="0" y="14">?</text></svg>';
602
- return l`<span class="icon" aria-hidden="true">${tr(e)}</span>`;
352
+ const e = we[this.name] || '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><text x="0" y="14">?</text></svg>';
353
+ return l`<span class="icon" aria-hidden="true" .innerHTML=${e}></span>`;
603
354
  }
604
355
  };
605
- wt.styles = d`
356
+ dt.styles = c`
606
357
  :host {
607
358
  display: inline-flex;
608
359
  align-items: center;
@@ -619,29 +370,29 @@ wt.styles = d`
619
370
  height: 100%;
620
371
  }
621
372
  `;
622
- se([
373
+ Vt([
623
374
  n()
624
- ], wt.prototype, "name", 2);
625
- se([
375
+ ], dt.prototype, "name", 2);
376
+ Vt([
626
377
  n()
627
- ], wt.prototype, "size", 2);
628
- wt = se([
629
- u("crt-icon")
630
- ], wt);
631
- var sr = Object.defineProperty, ir = Object.getOwnPropertyDescriptor, K = (e, t, a, s) => {
632
- for (var r = s > 1 ? void 0 : s ? ir(t, a) : t, i = e.length - 1, o; i >= 0; i--)
633
- (o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
634
- return s && r && sr(t, a, r), r;
378
+ ], dt.prototype, "size", 2);
379
+ dt = Vt([
380
+ d("crt-icon")
381
+ ], dt);
382
+ var ke = Object.defineProperty, _e = Object.getOwnPropertyDescriptor, q = (e, t, a, i) => {
383
+ for (var r = i > 1 ? void 0 : i ? _e(t, a) : t, s = e.length - 1, o; s >= 0; s--)
384
+ (o = e[s]) && (r = (i ? o(t, a, r) : o(r)) || r);
385
+ return i && r && ke(t, a, r), r;
635
386
  };
636
- let C = class extends h {
387
+ let $ = class extends p {
637
388
  constructor() {
638
- super(), this.size = "medium", this.variant = "primary", this.disabled = !1, this.type = "button", this.iconOnly = !1, this.iconLeft = "", this.iconRight = "", console.log("Button constructor called");
389
+ super(), this.size = "medium", this.variant = "primary", this.disabled = !1, this.type = "button", this.iconOnly = !1, this.iconLeft = "", this.iconRight = "";
639
390
  }
640
391
  connectedCallback() {
641
- super.connectedCallback(), console.log("Button connected to DOM", this);
392
+ super.connectedCallback();
642
393
  }
643
394
  render() {
644
- if (console.log("Button render called"), this.iconOnly) {
395
+ if (this.iconOnly) {
645
396
  const e = this.iconLeft || this.iconRight;
646
397
  return l`
647
398
  <button type="${this.type}" ?disabled="${this.disabled}">
@@ -658,7 +409,7 @@ let C = class extends h {
658
409
  `;
659
410
  }
660
411
  };
661
- C.styles = d`
412
+ $.styles = c`
662
413
  :host {
663
414
  display: inline-block;
664
415
  }
@@ -814,36 +565,36 @@ C.styles = d`
814
565
  flex-shrink: 0;
815
566
  }
816
567
  `;
817
- K([
568
+ q([
818
569
  n({ reflect: !0 })
819
- ], C.prototype, "size", 2);
820
- K([
570
+ ], $.prototype, "size", 2);
571
+ q([
821
572
  n({ reflect: !0 })
822
- ], C.prototype, "variant", 2);
823
- K([
573
+ ], $.prototype, "variant", 2);
574
+ q([
824
575
  n({ type: Boolean })
825
- ], C.prototype, "disabled", 2);
826
- K([
576
+ ], $.prototype, "disabled", 2);
577
+ q([
827
578
  n()
828
- ], C.prototype, "type", 2);
829
- K([
579
+ ], $.prototype, "type", 2);
580
+ q([
830
581
  n({ attribute: "icon-only", type: Boolean })
831
- ], C.prototype, "iconOnly", 2);
832
- K([
582
+ ], $.prototype, "iconOnly", 2);
583
+ q([
833
584
  n({ attribute: "icon-left" })
834
- ], C.prototype, "iconLeft", 2);
835
- K([
585
+ ], $.prototype, "iconLeft", 2);
586
+ q([
836
587
  n({ attribute: "icon-right" })
837
- ], C.prototype, "iconRight", 2);
838
- C = K([
839
- u("crt-button")
840
- ], C);
841
- var or = Object.defineProperty, nr = Object.getOwnPropertyDescriptor, Pe = (e, t, a, s) => {
842
- for (var r = s > 1 ? void 0 : s ? nr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
843
- (o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
844
- return s && r && or(t, a, r), r;
588
+ ], $.prototype, "iconRight", 2);
589
+ $ = q([
590
+ d("crt-button")
591
+ ], $);
592
+ var $e = Object.defineProperty, ze = Object.getOwnPropertyDescriptor, ee = (e, t, a, i) => {
593
+ for (var r = i > 1 ? void 0 : i ? ze(t, a) : t, s = e.length - 1, o; s >= 0; s--)
594
+ (o = e[s]) && (r = (i ? o(t, a, r) : o(r)) || r);
595
+ return i && r && $e(t, a, r), r;
845
596
  };
846
- let Bt = class extends h {
597
+ let Pt = class extends p {
847
598
  constructor() {
848
599
  super(...arguments), this.variant = "primary";
849
600
  }
@@ -851,7 +602,7 @@ let Bt = class extends h {
851
602
  return l`<span class="badge"><slot></slot></span>`;
852
603
  }
853
604
  };
854
- Bt.styles = d`
605
+ Pt.styles = c`
855
606
  :host {
856
607
  --badge-bg: transparent;
857
608
  --badge-color: var(--crt-primary);
@@ -892,18 +643,18 @@ Bt.styles = d`
892
643
  --badge-border: 1px solid var(--crt-info);
893
644
  }
894
645
  `;
895
- Pe([
646
+ ee([
896
647
  n()
897
- ], Bt.prototype, "variant", 2);
898
- Bt = Pe([
899
- u("crt-badge")
900
- ], Bt);
901
- var lr = Object.defineProperty, cr = Object.getOwnPropertyDescriptor, Xt = (e, t, a, s) => {
902
- for (var r = s > 1 ? void 0 : s ? cr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
903
- (o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
904
- return s && r && lr(t, a, r), r;
648
+ ], Pt.prototype, "variant", 2);
649
+ Pt = ee([
650
+ d("crt-badge")
651
+ ], Pt);
652
+ var Ce = Object.defineProperty, Pe = Object.getOwnPropertyDescriptor, Lt = (e, t, a, i) => {
653
+ for (var r = i > 1 ? void 0 : i ? Pe(t, a) : t, s = e.length - 1, o; s >= 0; s--)
654
+ (o = e[s]) && (r = (i ? o(t, a, r) : o(r)) || r);
655
+ return i && r && Ce(t, a, r), r;
905
656
  };
906
- let Nt = class extends h {
657
+ let Ot = class extends p {
907
658
  constructor() {
908
659
  super(...arguments), this.level = 1;
909
660
  }
@@ -926,7 +677,7 @@ let Nt = class extends h {
926
677
  }
927
678
  }
928
679
  };
929
- Nt.styles = d`
680
+ Ot.styles = c`
930
681
  h1, h2, h3, h4, h5, h6 {
931
682
  font-family: var(--crt-font-family);
932
683
  color: var(--crt-text-primary);
@@ -955,13 +706,13 @@ Nt.styles = d`
955
706
  font-size: var(--crt-font-size-base);
956
707
  }
957
708
  `;
958
- Xt([
709
+ Lt([
959
710
  n({ type: Number })
960
- ], Nt.prototype, "level", 2);
961
- Nt = Xt([
962
- u("crt-heading")
963
- ], Nt);
964
- let Ut = class extends h {
711
+ ], Ot.prototype, "level", 2);
712
+ Ot = Lt([
713
+ d("crt-heading")
714
+ ], Ot);
715
+ let St = class extends p {
965
716
  constructor() {
966
717
  super(...arguments), this.muted = !1;
967
718
  }
@@ -969,7 +720,7 @@ let Ut = class extends h {
969
720
  return l`<p><slot></slot></p>`;
970
721
  }
971
722
  };
972
- Ut.styles = d`
723
+ St.styles = c`
973
724
  p {
974
725
  font-family: var(--crt-font-family);
975
726
  color: var(--crt-text-secondary);
@@ -981,18 +732,18 @@ Ut.styles = d`
981
732
  color: var(--crt-text-muted);
982
733
  }
983
734
  `;
984
- Xt([
735
+ Lt([
985
736
  n()
986
- ], Ut.prototype, "muted", 2);
987
- Ut = Xt([
988
- u("crt-text")
989
- ], Ut);
990
- var pr = Object.defineProperty, dr = Object.getOwnPropertyDescriptor, ie = (e, t, a, s) => {
991
- for (var r = s > 1 ? void 0 : s ? dr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
992
- (o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
993
- return s && r && pr(t, a, r), r;
737
+ ], St.prototype, "muted", 2);
738
+ St = Lt([
739
+ d("crt-text")
740
+ ], St);
741
+ var Oe = Object.defineProperty, Se = Object.getOwnPropertyDescriptor, Yt = (e, t, a, i) => {
742
+ for (var r = i > 1 ? void 0 : i ? Se(t, a) : t, s = e.length - 1, o; s >= 0; s--)
743
+ (o = e[s]) && (r = (i ? o(t, a, r) : o(r)) || r);
744
+ return i && r && Oe(t, a, r), r;
994
745
  };
995
- let kt = class extends h {
746
+ let ht = class extends p {
996
747
  constructor() {
997
748
  super(...arguments), this.activeTab = 0, this.tabs = [];
998
749
  }
@@ -1017,7 +768,7 @@ let kt = class extends h {
1017
768
  ${this.tabs.map(
1018
769
  (e, t) => l`
1019
770
  <div class="tab-pane ${t === this.activeTab ? "active" : ""}">
1020
- ${e.label.toLowerCase() === "code" ? l`<pre><code>${e.content}</code></pre>` : l`<div>${hr(e.content)}</div>`}
771
+ ${e.label.toLowerCase() === "code" ? l`<pre><code>${e.content}</code></pre>` : l`<div>${Ee(e.content)}</div>`}
1021
772
  </div>
1022
773
  `
1023
774
  )}
@@ -1025,7 +776,7 @@ let kt = class extends h {
1025
776
  `;
1026
777
  }
1027
778
  };
1028
- kt.styles = d`
779
+ ht.styles = c`
1029
780
  :host {
1030
781
  display: block;
1031
782
  }
@@ -1092,25 +843,25 @@ kt.styles = d`
1092
843
  font-family: var(--crt-font-family);
1093
844
  }
1094
845
  `;
1095
- ie([
1096
- m()
1097
- ], kt.prototype, "activeTab", 2);
1098
- ie([
846
+ Yt([
847
+ v()
848
+ ], ht.prototype, "activeTab", 2);
849
+ Yt([
1099
850
  n({ type: Array })
1100
- ], kt.prototype, "tabs", 2);
1101
- kt = ie([
1102
- u("crt-tabs")
1103
- ], kt);
1104
- function hr(e) {
851
+ ], ht.prototype, "tabs", 2);
852
+ ht = Yt([
853
+ d("crt-tabs")
854
+ ], ht);
855
+ function Ee(e) {
1105
856
  const t = document.createElement("div");
1106
857
  return t.innerHTML = e, t;
1107
858
  }
1108
- var ur = Object.defineProperty, vr = Object.getOwnPropertyDescriptor, P = (e, t, a, s) => {
1109
- for (var r = s > 1 ? void 0 : s ? vr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
1110
- (o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
1111
- return s && r && ur(t, a, r), r;
859
+ var De = Object.defineProperty, Me = Object.getOwnPropertyDescriptor, z = (e, t, a, i) => {
860
+ for (var r = i > 1 ? void 0 : i ? Me(t, a) : t, s = e.length - 1, o; s >= 0; s--)
861
+ (o = e[s]) && (r = (i ? o(t, a, r) : o(r)) || r);
862
+ return i && r && De(t, a, r), r;
1112
863
  };
1113
- let J = class extends h {
864
+ let H = class extends p {
1114
865
  constructor() {
1115
866
  super(...arguments), this.type = "text", this.placeholder = "", this.value = "", this.disabled = !1;
1116
867
  }
@@ -1128,7 +879,7 @@ let J = class extends h {
1128
879
  `;
1129
880
  }
1130
881
  };
1131
- J.styles = d`
882
+ H.styles = c`
1132
883
  :host {
1133
884
  display: block;
1134
885
  }
@@ -1174,22 +925,22 @@ J.styles = d`
1174
925
  padding-right: var(--crt-spacing-lg);
1175
926
  }
1176
927
  `;
1177
- P([
928
+ z([
1178
929
  n()
1179
- ], J.prototype, "type", 2);
1180
- P([
930
+ ], H.prototype, "type", 2);
931
+ z([
1181
932
  n()
1182
- ], J.prototype, "placeholder", 2);
1183
- P([
933
+ ], H.prototype, "placeholder", 2);
934
+ z([
1184
935
  n()
1185
- ], J.prototype, "value", 2);
1186
- P([
936
+ ], H.prototype, "value", 2);
937
+ z([
1187
938
  n()
1188
- ], J.prototype, "disabled", 2);
1189
- J = P([
1190
- u("crt-input")
1191
- ], J);
1192
- let tt = class extends h {
939
+ ], H.prototype, "disabled", 2);
940
+ H = z([
941
+ d("crt-input")
942
+ ], H);
943
+ let K = class extends p {
1193
944
  constructor() {
1194
945
  super(...arguments), this.placeholder = "", this.value = "", this.disabled = !1, this.rows = 4;
1195
946
  }
@@ -1207,7 +958,7 @@ let tt = class extends h {
1207
958
  `;
1208
959
  }
1209
960
  };
1210
- tt.styles = d`
961
+ K.styles = c`
1211
962
  :host {
1212
963
  display: block;
1213
964
  }
@@ -1249,33 +1000,40 @@ tt.styles = d`
1249
1000
  border-style: dashed;
1250
1001
  }
1251
1002
  `;
1252
- P([
1003
+ z([
1253
1004
  n()
1254
- ], tt.prototype, "placeholder", 2);
1255
- P([
1005
+ ], K.prototype, "placeholder", 2);
1006
+ z([
1256
1007
  n()
1257
- ], tt.prototype, "value", 2);
1258
- P([
1008
+ ], K.prototype, "value", 2);
1009
+ z([
1259
1010
  n()
1260
- ], tt.prototype, "disabled", 2);
1261
- P([
1011
+ ], K.prototype, "disabled", 2);
1012
+ z([
1262
1013
  n()
1263
- ], tt.prototype, "rows", 2);
1264
- tt = P([
1265
- u("crt-textarea")
1266
- ], tt);
1267
- var gr = Object.defineProperty, mr = Object.getOwnPropertyDescriptor, ut = (e, t, a, s) => {
1268
- for (var r = s > 1 ? void 0 : s ? mr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
1269
- (o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
1270
- return s && r && gr(t, a, r), r;
1014
+ ], K.prototype, "rows", 2);
1015
+ K = z([
1016
+ d("crt-textarea")
1017
+ ], K);
1018
+ var je = Object.defineProperty, Te = Object.getOwnPropertyDescriptor, ot = (e, t, a, i) => {
1019
+ for (var r = i > 1 ? void 0 : i ? Te(t, a) : t, s = e.length - 1, o; s >= 0; s--)
1020
+ (o = e[s]) && (r = (i ? o(t, a, r) : o(r)) || r);
1021
+ return i && r && je(t, a, r), r;
1271
1022
  };
1272
- let H = class extends h {
1023
+ let U = class extends p {
1273
1024
  constructor() {
1274
1025
  super(...arguments), this.href = "#", this.target = "", this.iconLeft = !1, this.iconRight = !1, this.icon = "";
1275
1026
  }
1027
+ _onClick(e) {
1028
+ this.href && this.href.startsWith("#") && (e.preventDefault(), this.dispatchEvent(new CustomEvent("navigate", {
1029
+ detail: { href: this.href },
1030
+ bubbles: !0,
1031
+ composed: !0
1032
+ })));
1033
+ }
1276
1034
  render() {
1277
1035
  return l`
1278
- <a href="${this.href}" ${this.target ? `target="${this.target}"` : ""}>
1036
+ <a href="${this.href}" ${this.target ? `target="${this.target}"` : ""} @click="${(e) => this._onClick(e)}">
1279
1037
  ${this.iconLeft ? l`<crt-icon name="${this.icon}"></crt-icon>` : ""}
1280
1038
  <slot></slot>
1281
1039
  ${this.iconRight ? l`<crt-icon name="${this.icon}"></crt-icon>` : ""}
@@ -1283,7 +1041,7 @@ let H = class extends h {
1283
1041
  `;
1284
1042
  }
1285
1043
  };
1286
- H.styles = d`
1044
+ U.styles = c`
1287
1045
  :host {
1288
1046
  --crt-link-color: var(--crt-primary);
1289
1047
  }
@@ -1309,30 +1067,30 @@ H.styles = d`
1309
1067
  color: var(--crt-primary-dark);
1310
1068
  }
1311
1069
  `;
1312
- ut([
1070
+ ot([
1313
1071
  n({ type: String })
1314
- ], H.prototype, "href", 2);
1315
- ut([
1072
+ ], U.prototype, "href", 2);
1073
+ ot([
1316
1074
  n({ type: String })
1317
- ], H.prototype, "target", 2);
1318
- ut([
1075
+ ], U.prototype, "target", 2);
1076
+ ot([
1319
1077
  n({ type: Boolean })
1320
- ], H.prototype, "iconLeft", 2);
1321
- ut([
1078
+ ], U.prototype, "iconLeft", 2);
1079
+ ot([
1322
1080
  n({ type: Boolean })
1323
- ], H.prototype, "iconRight", 2);
1324
- ut([
1081
+ ], U.prototype, "iconRight", 2);
1082
+ ot([
1325
1083
  n({ type: String })
1326
- ], H.prototype, "icon", 2);
1327
- H = ut([
1328
- u("crt-link")
1329
- ], H);
1330
- var fr = Object.defineProperty, br = Object.getOwnPropertyDescriptor, st = (e, t, a, s) => {
1331
- for (var r = s > 1 ? void 0 : s ? br(t, a) : t, i = e.length - 1, o; i >= 0; i--)
1332
- (o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
1333
- return s && r && fr(t, a, r), r;
1084
+ ], U.prototype, "icon", 2);
1085
+ U = ot([
1086
+ d("crt-link")
1087
+ ], U);
1088
+ var Ae = Object.defineProperty, Ie = Object.getOwnPropertyDescriptor, Z = (e, t, a, i) => {
1089
+ for (var r = i > 1 ? void 0 : i ? Ie(t, a) : t, s = e.length - 1, o; s >= 0; s--)
1090
+ (o = e[s]) && (r = (i ? o(t, a, r) : o(r)) || r);
1091
+ return i && r && Ae(t, a, r), r;
1334
1092
  };
1335
- let M = class extends h {
1093
+ let E = class extends p {
1336
1094
  constructor() {
1337
1095
  super(...arguments), this.accept = "", this.multiple = !0, this.name = "", this.maxSize = 10485760, this.maxFiles = 10, this.files = [], this._handleFileSelect = (e) => {
1338
1096
  const t = e.target;
@@ -1359,12 +1117,12 @@ let M = class extends h {
1359
1117
  return Math.random().toString(36).substring(2, 9);
1360
1118
  }
1361
1119
  _addFiles(e) {
1362
- const s = e.filter((r) => {
1120
+ const i = e.filter((r) => {
1363
1121
  if (r.size > this.maxSize)
1364
1122
  return console.warn(`File ${r.name} exceeds max size`), !1;
1365
1123
  if (this.accept) {
1366
- const i = this.accept.split(",").map((v) => v.trim()), o = r.type, c = "." + r.name.split(".").pop()?.toLowerCase();
1367
- if (!i.some((v) => v.startsWith(".") ? c === v.toLowerCase() : v.endsWith("/*") ? o.startsWith(v.replace("/*", "/")) : o === v))
1124
+ const s = this.accept.split(",").map((S) => S.trim()), o = r.type, h = "." + r.name.split(".").pop()?.toLowerCase();
1125
+ if (!s.some((S) => S.startsWith(".") ? h === S.toLowerCase() : S.endsWith("/*") ? o.startsWith(S.replace("/*", "/")) : o === S))
1368
1126
  return console.warn(`File ${r.name} type not accepted`), !1;
1369
1127
  }
1370
1128
  return !0;
@@ -1374,7 +1132,7 @@ let M = class extends h {
1374
1132
  progress: 100,
1375
1133
  status: "complete"
1376
1134
  }));
1377
- this.files = [...this.files, ...s], this.dispatchEvent(new CustomEvent("files-changed", {
1135
+ this.files = [...this.files, ...i], this.dispatchEvent(new CustomEvent("files-changed", {
1378
1136
  detail: { files: this.files.map((r) => r.file) }
1379
1137
  }));
1380
1138
  }
@@ -1384,8 +1142,8 @@ let M = class extends h {
1384
1142
  }
1385
1143
  _formatFileSize(e) {
1386
1144
  if (e === 0) return "0 B";
1387
- const t = 1024, a = ["B", "KB", "MB", "GB"], s = Math.floor(Math.log(e) / Math.log(t));
1388
- return parseFloat((e / Math.pow(t, s)).toFixed(1)) + " " + a[s];
1145
+ const t = 1024, a = ["B", "KB", "MB", "GB"], i = Math.floor(Math.log(e) / Math.log(t));
1146
+ return parseFloat((e / Math.pow(t, i)).toFixed(1)) + " " + a[i];
1389
1147
  }
1390
1148
  _getFileIcon(e) {
1391
1149
  const t = e.name.split(".").pop()?.toLowerCase() || "", a = e.type;
@@ -1473,7 +1231,7 @@ let M = class extends h {
1473
1231
  `;
1474
1232
  }
1475
1233
  };
1476
- M.styles = d`
1234
+ E.styles = c`
1477
1235
  :host {
1478
1236
  display: block;
1479
1237
  font-family: var(--crt-font-family);
@@ -1768,33 +1526,33 @@ M.styles = d`
1768
1526
  transition: width 0.3s ease;
1769
1527
  }
1770
1528
  `;
1771
- st([
1529
+ Z([
1772
1530
  n({ type: String })
1773
- ], M.prototype, "accept", 2);
1774
- st([
1531
+ ], E.prototype, "accept", 2);
1532
+ Z([
1775
1533
  n({ type: Boolean })
1776
- ], M.prototype, "multiple", 2);
1777
- st([
1534
+ ], E.prototype, "multiple", 2);
1535
+ Z([
1778
1536
  n({ type: String })
1779
- ], M.prototype, "name", 2);
1780
- st([
1537
+ ], E.prototype, "name", 2);
1538
+ Z([
1781
1539
  n({ type: Number })
1782
- ], M.prototype, "maxSize", 2);
1783
- st([
1540
+ ], E.prototype, "maxSize", 2);
1541
+ Z([
1784
1542
  n({ type: Number })
1785
- ], M.prototype, "maxFiles", 2);
1786
- st([
1787
- m()
1788
- ], M.prototype, "files", 2);
1789
- M = st([
1790
- u("crt-file-upload")
1791
- ], M);
1792
- var yr = Object.defineProperty, xr = Object.getOwnPropertyDescriptor, O = (e, t, a, s) => {
1793
- for (var r = s > 1 ? void 0 : s ? xr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
1794
- (o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
1795
- return s && r && yr(t, a, r), r;
1543
+ ], E.prototype, "maxFiles", 2);
1544
+ Z([
1545
+ v()
1546
+ ], E.prototype, "files", 2);
1547
+ E = Z([
1548
+ d("crt-file-upload")
1549
+ ], E);
1550
+ var Le = Object.defineProperty, Be = Object.getOwnPropertyDescriptor, C = (e, t, a, i) => {
1551
+ for (var r = i > 1 ? void 0 : i ? Be(t, a) : t, s = e.length - 1, o; s >= 0; s--)
1552
+ (o = e[s]) && (r = (i ? o(t, a, r) : o(r)) || r);
1553
+ return i && r && Le(t, a, r), r;
1796
1554
  };
1797
- let w = class extends h {
1555
+ let b = class extends p {
1798
1556
  constructor() {
1799
1557
  super(...arguments), this.value = "", this.placeholder = "Select date...", this.format = "DD.MM.YYYY", this.min = "", this.max = "", this.disabled = !1, this._isOpen = !1, this._viewDate = /* @__PURE__ */ new Date(), this._selectedDate = null, this._weekdays = ["Mo", "Di", "Mi", "Do", "Fr", "Sa", "So"], this._months = [
1800
1558
  "Januar",
@@ -1822,13 +1580,13 @@ let w = class extends h {
1822
1580
  _parseValue() {
1823
1581
  const e = this.value.split(".");
1824
1582
  if (e.length === 3) {
1825
- const [t, a, s] = e.map(Number);
1826
- this._selectedDate = new Date(s, a - 1, t), this._viewDate = new Date(this._selectedDate);
1583
+ const [t, a, i] = e.map(Number);
1584
+ this._selectedDate = new Date(i, a - 1, t), this._viewDate = new Date(this._selectedDate);
1827
1585
  }
1828
1586
  }
1829
1587
  _formatDate(e) {
1830
- const t = String(e.getDate()).padStart(2, "0"), a = String(e.getMonth() + 1).padStart(2, "0"), s = e.getFullYear();
1831
- return `${t}.${a}.${s}`;
1588
+ const t = String(e.getDate()).padStart(2, "0"), a = String(e.getMonth() + 1).padStart(2, "0"), i = e.getFullYear();
1589
+ return `${t}.${a}.${i}`;
1832
1590
  }
1833
1591
  _toggleCalendar() {
1834
1592
  this.disabled || (this._isOpen = !this._isOpen);
@@ -1875,36 +1633,36 @@ let w = class extends h {
1875
1633
  return this._selectedDate ? e.getDate() === this._selectedDate.getDate() && e.getMonth() === this._selectedDate.getMonth() && e.getFullYear() === this._selectedDate.getFullYear() : !1;
1876
1634
  }
1877
1635
  _renderDays() {
1878
- const e = this._viewDate.getFullYear(), t = this._viewDate.getMonth(), a = this._getDaysInMonth(e, t), s = this._getFirstDayOfMonth(e, t), r = this._getDaysInMonth(e, t - 1), i = [];
1879
- for (let c = s - 1; c >= 0; c--) {
1880
- const p = new Date(e, t - 1, r - c);
1881
- i.push(l`
1882
- <div class="day other-month" @click="${() => this._selectDate(p)}">
1883
- ${r - c}
1636
+ const e = this._viewDate.getFullYear(), t = this._viewDate.getMonth(), a = this._getDaysInMonth(e, t), i = this._getFirstDayOfMonth(e, t), r = this._getDaysInMonth(e, t - 1), s = [];
1637
+ for (let h = i - 1; h >= 0; h--) {
1638
+ const f = new Date(e, t - 1, r - h);
1639
+ s.push(l`
1640
+ <div class="day other-month" @click="${() => this._selectDate(f)}">
1641
+ ${r - h}
1884
1642
  </div>
1885
1643
  `);
1886
1644
  }
1887
- for (let c = 1; c <= a; c++) {
1888
- const p = new Date(e, t, c), v = this._isToday(p), b = this._isSelected(p);
1889
- i.push(l`
1645
+ for (let h = 1; h <= a; h++) {
1646
+ const f = new Date(e, t, h), S = this._isToday(f), ie = this._isSelected(f);
1647
+ s.push(l`
1890
1648
  <div
1891
- class="day ${v ? "today" : ""} ${b ? "selected" : ""}"
1892
- @click="${() => this._selectDate(p)}"
1649
+ class="day ${S ? "today" : ""} ${ie ? "selected" : ""}"
1650
+ @click="${() => this._selectDate(f)}"
1893
1651
  >
1894
- ${c}
1652
+ ${h}
1895
1653
  </div>
1896
1654
  `);
1897
1655
  }
1898
- const o = 42 - i.length;
1899
- for (let c = 1; c <= o; c++) {
1900
- const p = new Date(e, t + 1, c);
1901
- i.push(l`
1902
- <div class="day other-month" @click="${() => this._selectDate(p)}">
1903
- ${c}
1656
+ const o = 42 - s.length;
1657
+ for (let h = 1; h <= o; h++) {
1658
+ const f = new Date(e, t + 1, h);
1659
+ s.push(l`
1660
+ <div class="day other-month" @click="${() => this._selectDate(f)}">
1661
+ ${h}
1904
1662
  </div>
1905
1663
  `);
1906
1664
  }
1907
- return i;
1665
+ return s;
1908
1666
  }
1909
1667
  render() {
1910
1668
  const e = `${this._months[this._viewDate.getMonth()]} ${this._viewDate.getFullYear()}`;
@@ -1953,7 +1711,7 @@ let w = class extends h {
1953
1711
  `;
1954
1712
  }
1955
1713
  };
1956
- w.styles = d`
1714
+ b.styles = c`
1957
1715
  :host {
1958
1716
  display: inline-block;
1959
1717
  font-family: var(--crt-font-family);
@@ -2158,42 +1916,42 @@ w.styles = d`
2158
1916
  color: var(--crt-bg-dark);
2159
1917
  }
2160
1918
  `;
2161
- O([
1919
+ C([
2162
1920
  n({ type: String })
2163
- ], w.prototype, "value", 2);
2164
- O([
1921
+ ], b.prototype, "value", 2);
1922
+ C([
2165
1923
  n({ type: String })
2166
- ], w.prototype, "placeholder", 2);
2167
- O([
1924
+ ], b.prototype, "placeholder", 2);
1925
+ C([
2168
1926
  n({ type: String })
2169
- ], w.prototype, "format", 2);
2170
- O([
1927
+ ], b.prototype, "format", 2);
1928
+ C([
2171
1929
  n({ type: String })
2172
- ], w.prototype, "min", 2);
2173
- O([
1930
+ ], b.prototype, "min", 2);
1931
+ C([
2174
1932
  n({ type: String })
2175
- ], w.prototype, "max", 2);
2176
- O([
1933
+ ], b.prototype, "max", 2);
1934
+ C([
2177
1935
  n({ type: Boolean })
2178
- ], w.prototype, "disabled", 2);
2179
- O([
2180
- m()
2181
- ], w.prototype, "_isOpen", 2);
2182
- O([
2183
- m()
2184
- ], w.prototype, "_viewDate", 2);
2185
- O([
2186
- m()
2187
- ], w.prototype, "_selectedDate", 2);
2188
- w = O([
2189
- u("crt-calendar")
2190
- ], w);
2191
- var wr = Object.defineProperty, kr = Object.getOwnPropertyDescriptor, it = (e, t, a, s) => {
2192
- for (var r = s > 1 ? void 0 : s ? kr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
2193
- (o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
2194
- return s && r && wr(t, a, r), r;
1936
+ ], b.prototype, "disabled", 2);
1937
+ C([
1938
+ v()
1939
+ ], b.prototype, "_isOpen", 2);
1940
+ C([
1941
+ v()
1942
+ ], b.prototype, "_viewDate", 2);
1943
+ C([
1944
+ v()
1945
+ ], b.prototype, "_selectedDate", 2);
1946
+ b = C([
1947
+ d("crt-calendar")
1948
+ ], b);
1949
+ var Ue = Object.defineProperty, Ne = Object.getOwnPropertyDescriptor, tt = (e, t, a, i) => {
1950
+ for (var r = i > 1 ? void 0 : i ? Ne(t, a) : t, s = e.length - 1, o; s >= 0; s--)
1951
+ (o = e[s]) && (r = (i ? o(t, a, r) : o(r)) || r);
1952
+ return i && r && Ue(t, a, r), r;
2195
1953
  };
2196
- let D = class extends h {
1954
+ let D = class extends p {
2197
1955
  constructor() {
2198
1956
  super(...arguments), this.value = "", this.placeholder = "Select...", this.label = "", this.disabled = !1, this.options = [], this._isOpen = !1, this._handleOutsideClick = (e) => {
2199
1957
  this.contains(e.target) || (this._isOpen = !1);
@@ -2231,15 +1989,15 @@ let D = class extends h {
2231
1989
  e.forEach((r) => {
2232
1990
  r.group ? (t.has(r.group) || t.set(r.group, []), t.get(r.group).push(r)) : a.push(r);
2233
1991
  });
2234
- const s = [];
1992
+ const i = [];
2235
1993
  for (const r of a)
2236
- s.push(this._renderOption(r));
2237
- for (const [r, i] of t) {
2238
- s.push(l`<div class="select-group-label">${r}</div>`);
2239
- for (const o of i)
2240
- s.push(this._renderOption(o));
1994
+ i.push(this._renderOption(r));
1995
+ for (const [r, s] of t) {
1996
+ i.push(l`<div class="select-group-label">${r}</div>`);
1997
+ for (const o of s)
1998
+ i.push(this._renderOption(o));
2241
1999
  }
2242
- return s;
2000
+ return i;
2243
2001
  }
2244
2002
  _renderOption(e) {
2245
2003
  const t = e.value === this.value;
@@ -2274,7 +2032,7 @@ let D = class extends h {
2274
2032
  `;
2275
2033
  }
2276
2034
  };
2277
- D.styles = d`
2035
+ D.styles = c`
2278
2036
  :host {
2279
2037
  display: inline-block;
2280
2038
  font-family: var(--crt-font-family);
@@ -2431,33 +2189,256 @@ D.styles = d`
2431
2189
  box-shadow: var(--crt-glow-sm);
2432
2190
  }
2433
2191
  `;
2434
- it([
2192
+ tt([
2435
2193
  n({ type: String })
2436
2194
  ], D.prototype, "value", 2);
2437
- it([
2195
+ tt([
2438
2196
  n({ type: String })
2439
2197
  ], D.prototype, "placeholder", 2);
2440
- it([
2198
+ tt([
2441
2199
  n({ type: String })
2442
2200
  ], D.prototype, "label", 2);
2443
- it([
2201
+ tt([
2444
2202
  n({ type: Boolean })
2445
2203
  ], D.prototype, "disabled", 2);
2446
- it([
2204
+ tt([
2447
2205
  n({ type: Array })
2448
2206
  ], D.prototype, "options", 2);
2449
- it([
2450
- m()
2207
+ tt([
2208
+ v()
2451
2209
  ], D.prototype, "_isOpen", 2);
2452
- D = it([
2453
- u("crt-select")
2210
+ D = tt([
2211
+ d("crt-select")
2454
2212
  ], D);
2455
- var $r = Object.defineProperty, _r = Object.getOwnPropertyDescriptor, y = (e, t, a, s) => {
2456
- for (var r = s > 1 ? void 0 : s ? _r(t, a) : t, i = e.length - 1, o; i >= 0; i--)
2457
- (o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
2458
- return s && r && $r(t, a, r), r;
2213
+ var Re = Object.defineProperty, Fe = Object.getOwnPropertyDescriptor, _ = (e, t, a, i) => {
2214
+ for (var r = i > 1 ? void 0 : i ? Fe(t, a) : t, s = e.length - 1, o; s >= 0; s--)
2215
+ (o = e[s]) && (r = (i ? o(t, a, r) : o(r)) || r);
2216
+ return i && r && Re(t, a, r), r;
2459
2217
  };
2460
- let Y = class extends h {
2218
+ let m = class extends p {
2219
+ constructor() {
2220
+ super(...arguments), this.value = "", this.placeholder = "Search...", this.debounceMs = 300, this.minLength = 1, this.suggestions = [], this._open = !1, this._activeIndex = -1, this._filtered = [], this._loading = !1, this._id = `crt-search-${Math.random().toString(36).slice(2, 9)}`;
2221
+ }
2222
+ connectedCallback() {
2223
+ super.connectedCallback(), this._filtered = [...this.suggestions];
2224
+ }
2225
+ updated(e) {
2226
+ e.has("suggestions") && (this._filtered = [...this.suggestions]);
2227
+ }
2228
+ _onInput(e) {
2229
+ const t = e.target.value;
2230
+ if (this.value = t, this.dispatchEvent(new CustomEvent("input-change", { detail: { value: this.value } })), this._debounceTimer && window.clearTimeout(this._debounceTimer), this.value.length < this.minLength) {
2231
+ this._open = !1, this._filtered = [];
2232
+ return;
2233
+ }
2234
+ this._debounceTimer = window.setTimeout(async () => {
2235
+ if (this._loading = !0, this.fetcher)
2236
+ try {
2237
+ const a = await this.fetcher(this.value);
2238
+ this._filtered = (a || []).slice(0, 50);
2239
+ } catch (a) {
2240
+ console.warn("crt-search: fetcher error", a), this._filtered = [];
2241
+ }
2242
+ else {
2243
+ const a = this.value.toLowerCase();
2244
+ this._filtered = this.suggestions.filter((i) => (i.label || i.value).toLowerCase().includes(a)).slice(0, 50);
2245
+ }
2246
+ this._activeIndex = this._filtered.length > 0 ? 0 : -1, this._open = this._filtered.length > 0, this._loading = !1;
2247
+ }, this.debounceMs);
2248
+ }
2249
+ _onKeyDown(e) {
2250
+ if (!this._open && (e.key === "ArrowDown" || e.key === "ArrowUp") && this._filtered.length > 0 && (this._open = !0), !this._open) {
2251
+ e.key === "Enter" && this.dispatchEvent(new CustomEvent("search", { detail: { value: this.value } }));
2252
+ return;
2253
+ }
2254
+ switch (e.key) {
2255
+ case "ArrowDown":
2256
+ e.preventDefault(), this._activeIndex = (this._activeIndex + 1) % this._filtered.length, this._scrollIntoView();
2257
+ break;
2258
+ case "ArrowUp":
2259
+ e.preventDefault(), this._activeIndex = (this._activeIndex - 1 + this._filtered.length) % this._filtered.length, this._scrollIntoView();
2260
+ break;
2261
+ case "Home":
2262
+ e.preventDefault(), this._activeIndex = 0, this._scrollIntoView();
2263
+ break;
2264
+ case "End":
2265
+ e.preventDefault(), this._activeIndex = this._filtered.length - 1, this._scrollIntoView();
2266
+ break;
2267
+ case "Enter":
2268
+ e.preventDefault(), this._activeIndex >= 0 && this._filtered[this._activeIndex] ? this._select(this._activeIndex) : this.dispatchEvent(new CustomEvent("search", { detail: { value: this.value } }));
2269
+ break;
2270
+ case "Escape":
2271
+ e.preventDefault(), this._open = !1;
2272
+ break;
2273
+ }
2274
+ }
2275
+ _scrollIntoView() {
2276
+ const e = this.shadowRoot?.querySelector(".list"), t = e?.querySelectorAll(".item")[this._activeIndex];
2277
+ if (t && e) {
2278
+ const a = t.getBoundingClientRect(), i = e.getBoundingClientRect();
2279
+ a.top < i.top && t.scrollIntoView({ block: "nearest" }), a.bottom > i.bottom && t.scrollIntoView({ block: "nearest" });
2280
+ }
2281
+ }
2282
+ _select(e) {
2283
+ const t = this._filtered[e];
2284
+ t && (this.value = t.value, this._open = !1, this._activeIndex = -1, this.dispatchEvent(new CustomEvent("select", { detail: { item: t, value: t.value, label: t.label, index: e } })));
2285
+ }
2286
+ _onBlur() {
2287
+ setTimeout(() => {
2288
+ const e = this.shadowRoot?.activeElement;
2289
+ (!e || !e.classList?.contains("item")) && (this._open = !1, this._activeIndex = -1);
2290
+ }, 150);
2291
+ }
2292
+ render() {
2293
+ const e = `${this._id}-list`;
2294
+ return l`
2295
+ <div class="search">
2296
+ <input
2297
+ class="input"
2298
+ role="combobox"
2299
+ aria-autocomplete="list"
2300
+ aria-expanded="${this._open ? "true" : "false"}"
2301
+ aria-controls="${e}"
2302
+ aria-activedescendant="${this._activeIndex >= 0 ? `${this._id}-option-${this._activeIndex}` : ""}"
2303
+ .value=${this.value}
2304
+ placeholder=${this.placeholder}
2305
+ @input=${this._onInput}
2306
+ @keydown=${this._onKeyDown}
2307
+ @blur=${this._onBlur}
2308
+ />
2309
+
2310
+ ${this._open ? l`
2311
+ <ul class="list" id="${e}" role="listbox">
2312
+ ${this._loading ? l`<li class="loading">Loading...</li>` : ""}
2313
+ ${this._filtered.length === 0 && !this._loading ? l`<li class="empty">No results</li>` : ""}
2314
+ ${this._filtered.map((t, a) => l`
2315
+ <li
2316
+ id="${this._id}-option-${a}"
2317
+ class="item"
2318
+ role="option"
2319
+ aria-selected="${this._activeIndex === a ? "true" : "false"}"
2320
+ @click="${() => this._select(a)}"
2321
+ >
2322
+ ${t.label ?? t.value}
2323
+ </li>
2324
+ `)}
2325
+ </ul>
2326
+ ` : ""}
2327
+ </div>
2328
+ `;
2329
+ }
2330
+ };
2331
+ m.styles = c`
2332
+ :host { display: block; font-family: var(--crt-font-family); }
2333
+
2334
+ .search {
2335
+ position: relative;
2336
+ width: 100%;
2337
+ min-width: 0;
2338
+ }
2339
+
2340
+ .input {
2341
+ width: 100%;
2342
+ padding: var(--crt-spacing-md);
2343
+ font-family: var(--crt-font-family);
2344
+ background: var(--crt-bg-dark);
2345
+ color: var(--crt-text-primary);
2346
+ border: 2px solid var(--crt-primary);
2347
+ box-shadow: var(--crt-glow-inset);
2348
+ box-sizing: border-box;
2349
+ transition: var(--crt-transition);
2350
+ cursor: var(--crt-cursor-text);
2351
+ }
2352
+
2353
+ .input:focus {
2354
+ outline: none;
2355
+ box-shadow: inset 0 0 10px rgba(51,255,51,0.2), var(--crt-glow);
2356
+ }
2357
+
2358
+ .list {
2359
+ position: absolute;
2360
+ top: calc(100% + var(--crt-spacing-xs));
2361
+ left: 0;
2362
+ right: 0;
2363
+ background: var(--crt-bg-dark);
2364
+ border: 2px solid var(--crt-primary);
2365
+ box-shadow: 0 10px 20px color-mix(in srgb, var(--crt-primary) 20%, transparent), var(--crt-glow-inset);
2366
+ max-height: 240px;
2367
+ overflow-y: auto;
2368
+ z-index: 1000;
2369
+ padding: 0;
2370
+ margin: 0;
2371
+ }
2372
+
2373
+ .item {
2374
+ list-style: none;
2375
+ padding: var(--crt-spacing-md);
2376
+ cursor: var(--crt-cursor-pointer);
2377
+ color: var(--crt-text-primary);
2378
+ transition: var(--crt-transition);
2379
+ display: flex;
2380
+ align-items: center;
2381
+ gap: var(--crt-spacing-sm);
2382
+ }
2383
+
2384
+ .item:hover,
2385
+ .item[aria-selected="true"] {
2386
+ background: color-mix(in srgb, var(--crt-primary) 10%, transparent);
2387
+ box-shadow: var(--crt-glow-sm);
2388
+ color: var(--crt-primary);
2389
+ }
2390
+
2391
+ .empty {
2392
+ padding: var(--crt-spacing-md);
2393
+ color: var(--crt-text-muted);
2394
+ text-align: center;
2395
+ }
2396
+
2397
+ .loading {
2398
+ padding: var(--crt-spacing-md);
2399
+ color: var(--crt-text-muted);
2400
+ text-align: center;
2401
+ }
2402
+ `;
2403
+ _([
2404
+ n({ type: String })
2405
+ ], m.prototype, "value", 2);
2406
+ _([
2407
+ n({ type: String })
2408
+ ], m.prototype, "placeholder", 2);
2409
+ _([
2410
+ n({ type: Number })
2411
+ ], m.prototype, "debounceMs", 2);
2412
+ _([
2413
+ n({ type: Number })
2414
+ ], m.prototype, "minLength", 2);
2415
+ _([
2416
+ n({ type: Array })
2417
+ ], m.prototype, "suggestions", 2);
2418
+ _([
2419
+ n()
2420
+ ], m.prototype, "fetcher", 2);
2421
+ _([
2422
+ v()
2423
+ ], m.prototype, "_open", 2);
2424
+ _([
2425
+ v()
2426
+ ], m.prototype, "_activeIndex", 2);
2427
+ _([
2428
+ v()
2429
+ ], m.prototype, "_filtered", 2);
2430
+ _([
2431
+ v()
2432
+ ], m.prototype, "_loading", 2);
2433
+ m = _([
2434
+ d("crt-search")
2435
+ ], m);
2436
+ var Ve = Object.defineProperty, Ye = Object.getOwnPropertyDescriptor, u = (e, t, a, i) => {
2437
+ for (var r = i > 1 ? void 0 : i ? Ye(t, a) : t, s = e.length - 1, o; s >= 0; s--)
2438
+ (o = e[s]) && (r = (i ? o(t, a, r) : o(r)) || r);
2439
+ return i && r && Ve(t, a, r), r;
2440
+ };
2441
+ let N = class extends p {
2461
2442
  constructor() {
2462
2443
  super(...arguments), this.checked = !1, this.disabled = !1, this.indeterminate = !1, this.label = "", this.value = "";
2463
2444
  }
@@ -2485,7 +2466,7 @@ let Y = class extends h {
2485
2466
  `;
2486
2467
  }
2487
2468
  };
2488
- Y.styles = d`
2469
+ N.styles = c`
2489
2470
  :host {
2490
2471
  display: inline-flex;
2491
2472
  align-items: center;
@@ -2567,25 +2548,25 @@ Y.styles = d`
2567
2548
  transform: scale(1);
2568
2549
  }
2569
2550
  `;
2570
- y([
2551
+ u([
2571
2552
  n({ type: Boolean, reflect: !0 })
2572
- ], Y.prototype, "checked", 2);
2573
- y([
2553
+ ], N.prototype, "checked", 2);
2554
+ u([
2574
2555
  n({ type: Boolean, reflect: !0 })
2575
- ], Y.prototype, "disabled", 2);
2576
- y([
2556
+ ], N.prototype, "disabled", 2);
2557
+ u([
2577
2558
  n({ type: Boolean })
2578
- ], Y.prototype, "indeterminate", 2);
2579
- y([
2559
+ ], N.prototype, "indeterminate", 2);
2560
+ u([
2580
2561
  n({ type: String })
2581
- ], Y.prototype, "label", 2);
2582
- y([
2562
+ ], N.prototype, "label", 2);
2563
+ u([
2583
2564
  n({ type: String })
2584
- ], Y.prototype, "value", 2);
2585
- Y = y([
2586
- u("crt-checkbox")
2587
- ], Y);
2588
- let V = class extends h {
2565
+ ], N.prototype, "value", 2);
2566
+ N = u([
2567
+ d("crt-checkbox")
2568
+ ], N);
2569
+ let R = class extends p {
2589
2570
  constructor() {
2590
2571
  super(...arguments), this.checked = !1, this.disabled = !1, this.label = "", this.value = "", this.name = "";
2591
2572
  }
@@ -2614,7 +2595,7 @@ let V = class extends h {
2614
2595
  `;
2615
2596
  }
2616
2597
  };
2617
- V.styles = d`
2598
+ R.styles = c`
2618
2599
  :host {
2619
2600
  display: inline-flex;
2620
2601
  align-items: center;
@@ -2688,25 +2669,25 @@ V.styles = d`
2688
2669
  user-select: none;
2689
2670
  }
2690
2671
  `;
2691
- y([
2672
+ u([
2692
2673
  n({ type: Boolean, reflect: !0 })
2693
- ], V.prototype, "checked", 2);
2694
- y([
2674
+ ], R.prototype, "checked", 2);
2675
+ u([
2695
2676
  n({ type: Boolean, reflect: !0 })
2696
- ], V.prototype, "disabled", 2);
2697
- y([
2677
+ ], R.prototype, "disabled", 2);
2678
+ u([
2698
2679
  n({ type: String })
2699
- ], V.prototype, "label", 2);
2700
- y([
2680
+ ], R.prototype, "label", 2);
2681
+ u([
2701
2682
  n({ type: String })
2702
- ], V.prototype, "value", 2);
2703
- y([
2683
+ ], R.prototype, "value", 2);
2684
+ u([
2704
2685
  n({ type: String })
2705
- ], V.prototype, "name", 2);
2706
- V = y([
2707
- u("crt-radio")
2708
- ], V);
2709
- let dt = class extends h {
2686
+ ], R.prototype, "name", 2);
2687
+ R = u([
2688
+ d("crt-radio")
2689
+ ], R);
2690
+ let it = class extends p {
2710
2691
  constructor() {
2711
2692
  super(...arguments), this.name = "", this.value = "", this.horizontal = !1, this._handleChange = (e) => {
2712
2693
  const t = e.target;
@@ -2727,7 +2708,7 @@ let dt = class extends h {
2727
2708
  return l`<slot></slot>`;
2728
2709
  }
2729
2710
  };
2730
- dt.styles = d`
2711
+ it.styles = c`
2731
2712
  :host {
2732
2713
  display: flex;
2733
2714
  flex-direction: column;
@@ -2740,24 +2721,24 @@ dt.styles = d`
2740
2721
  gap: var(--crt-spacing-lg);
2741
2722
  }
2742
2723
  `;
2743
- y([
2724
+ u([
2744
2725
  n({ type: String })
2745
- ], dt.prototype, "name", 2);
2746
- y([
2726
+ ], it.prototype, "name", 2);
2727
+ u([
2747
2728
  n({ type: String })
2748
- ], dt.prototype, "value", 2);
2749
- y([
2729
+ ], it.prototype, "value", 2);
2730
+ u([
2750
2731
  n({ type: Boolean, reflect: !0 })
2751
- ], dt.prototype, "horizontal", 2);
2752
- dt = y([
2753
- u("crt-radio-group")
2754
- ], dt);
2755
- var zr = Object.defineProperty, Cr = Object.getOwnPropertyDescriptor, A = (e, t, a, s) => {
2756
- for (var r = s > 1 ? void 0 : s ? Cr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
2757
- (o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
2758
- return s && r && zr(t, a, r), r;
2732
+ ], it.prototype, "horizontal", 2);
2733
+ it = u([
2734
+ d("crt-radio-group")
2735
+ ], it);
2736
+ var qe = Object.defineProperty, He = Object.getOwnPropertyDescriptor, P = (e, t, a, i) => {
2737
+ for (var r = i > 1 ? void 0 : i ? He(t, a) : t, s = e.length - 1, o; s >= 0; s--)
2738
+ (o = e[s]) && (r = (i ? o(t, a, r) : o(r)) || r);
2739
+ return i && r && qe(t, a, r), r;
2759
2740
  };
2760
- let k = class extends h {
2741
+ let y = class extends p {
2761
2742
  constructor() {
2762
2743
  super(...arguments), this.value = 0, this.max = 100, this.label = "", this.animated = !1, this.indeterminate = !1, this.segmented = !1, this.size = "medium", this.variant = "default", this.showValue = !0;
2763
2744
  }
@@ -2783,7 +2764,7 @@ let k = class extends h {
2783
2764
  `;
2784
2765
  }
2785
2766
  };
2786
- k.styles = d`
2767
+ y.styles = c`
2787
2768
  :host {
2788
2769
  display: block;
2789
2770
  font-family: var(--crt-font-family);
@@ -2907,42 +2888,42 @@ k.styles = d`
2907
2888
  );
2908
2889
  }
2909
2890
  `;
2910
- A([
2891
+ P([
2911
2892
  n({ type: Number })
2912
- ], k.prototype, "value", 2);
2913
- A([
2893
+ ], y.prototype, "value", 2);
2894
+ P([
2914
2895
  n({ type: Number })
2915
- ], k.prototype, "max", 2);
2916
- A([
2896
+ ], y.prototype, "max", 2);
2897
+ P([
2917
2898
  n({ type: String })
2918
- ], k.prototype, "label", 2);
2919
- A([
2899
+ ], y.prototype, "label", 2);
2900
+ P([
2920
2901
  n({ type: Boolean, reflect: !0 })
2921
- ], k.prototype, "animated", 2);
2922
- A([
2902
+ ], y.prototype, "animated", 2);
2903
+ P([
2923
2904
  n({ type: Boolean, reflect: !0 })
2924
- ], k.prototype, "indeterminate", 2);
2925
- A([
2905
+ ], y.prototype, "indeterminate", 2);
2906
+ P([
2926
2907
  n({ type: Boolean, reflect: !0 })
2927
- ], k.prototype, "segmented", 2);
2928
- A([
2908
+ ], y.prototype, "segmented", 2);
2909
+ P([
2929
2910
  n({ type: String, reflect: !0 })
2930
- ], k.prototype, "size", 2);
2931
- A([
2911
+ ], y.prototype, "size", 2);
2912
+ P([
2932
2913
  n({ type: String, reflect: !0 })
2933
- ], k.prototype, "variant", 2);
2934
- A([
2914
+ ], y.prototype, "variant", 2);
2915
+ P([
2935
2916
  n({ type: Boolean })
2936
- ], k.prototype, "showValue", 2);
2937
- k = A([
2938
- u("crt-progress")
2939
- ], k);
2940
- var Pr = Object.defineProperty, Or = Object.getOwnPropertyDescriptor, At = (e, t, a, s) => {
2941
- for (var r = s > 1 ? void 0 : s ? Or(t, a) : t, i = e.length - 1, o; i >= 0; i--)
2942
- (o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
2943
- return s && r && Pr(t, a, r), r;
2917
+ ], y.prototype, "showValue", 2);
2918
+ y = P([
2919
+ d("crt-progress")
2920
+ ], y);
2921
+ var Ke = Object.defineProperty, Xe = Object.getOwnPropertyDescriptor, yt = (e, t, a, i) => {
2922
+ for (var r = i > 1 ? void 0 : i ? Xe(t, a) : t, s = e.length - 1, o; s >= 0; s--)
2923
+ (o = e[s]) && (r = (i ? o(t, a, r) : o(r)) || r);
2924
+ return i && r && Ke(t, a, r), r;
2944
2925
  };
2945
- let et = class extends h {
2926
+ let X = class extends p {
2946
2927
  constructor() {
2947
2928
  super(...arguments), this.text = "", this.position = "top", this.delay = 200, this._visible = !1;
2948
2929
  }
@@ -2971,7 +2952,7 @@ let et = class extends h {
2971
2952
  `;
2972
2953
  }
2973
2954
  };
2974
- et.styles = d`
2955
+ X.styles = c`
2975
2956
  :host {
2976
2957
  display: inline-block;
2977
2958
  position: relative;
@@ -3078,27 +3059,27 @@ et.styles = d`
3078
3059
  border-right-color: var(--crt-primary);
3079
3060
  }
3080
3061
  `;
3081
- At([
3062
+ yt([
3082
3063
  n({ type: String })
3083
- ], et.prototype, "text", 2);
3084
- At([
3064
+ ], X.prototype, "text", 2);
3065
+ yt([
3085
3066
  n({ type: String, reflect: !0 })
3086
- ], et.prototype, "position", 2);
3087
- At([
3067
+ ], X.prototype, "position", 2);
3068
+ yt([
3088
3069
  n({ type: Number })
3089
- ], et.prototype, "delay", 2);
3090
- At([
3091
- m()
3092
- ], et.prototype, "_visible", 2);
3093
- et = At([
3094
- u("crt-tooltip")
3095
- ], et);
3096
- var Ar = Object.defineProperty, Sr = Object.getOwnPropertyDescriptor, oe = (e, t, a, s) => {
3097
- for (var r = s > 1 ? void 0 : s ? Sr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
3098
- (o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
3099
- return s && r && Ar(t, a, r), r;
3070
+ ], X.prototype, "delay", 2);
3071
+ yt([
3072
+ v()
3073
+ ], X.prototype, "_visible", 2);
3074
+ X = yt([
3075
+ d("crt-tooltip")
3076
+ ], X);
3077
+ var We = Object.defineProperty, Ge = Object.getOwnPropertyDescriptor, qt = (e, t, a, i) => {
3078
+ for (var r = i > 1 ? void 0 : i ? Ge(t, a) : t, s = e.length - 1, o; s >= 0; s--)
3079
+ (o = e[s]) && (r = (i ? o(t, a, r) : o(r)) || r);
3080
+ return i && r && We(t, a, r), r;
3100
3081
  };
3101
- let $t = class extends h {
3082
+ let vt = class extends p {
3102
3083
  constructor() {
3103
3084
  super(...arguments), this.items = [], this.separator = ">";
3104
3085
  }
@@ -3116,7 +3097,7 @@ let $t = class extends h {
3116
3097
  `;
3117
3098
  }
3118
3099
  };
3119
- $t.styles = d`
3100
+ vt.styles = c`
3120
3101
  :host {
3121
3102
  display: block;
3122
3103
  font-family: var(--crt-font-family);
@@ -3165,21 +3146,21 @@ $t.styles = d`
3165
3146
  font-size: var(--crt-font-size-sm);
3166
3147
  }
3167
3148
  `;
3168
- oe([
3149
+ qt([
3169
3150
  n({ type: Array })
3170
- ], $t.prototype, "items", 2);
3171
- oe([
3151
+ ], vt.prototype, "items", 2);
3152
+ qt([
3172
3153
  n({ type: String })
3173
- ], $t.prototype, "separator", 2);
3174
- $t = oe([
3175
- u("crt-breadcrumb")
3176
- ], $t);
3177
- var Er = Object.defineProperty, Mr = Object.getOwnPropertyDescriptor, St = (e, t, a, s) => {
3178
- for (var r = s > 1 ? void 0 : s ? Mr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
3179
- (o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
3180
- return s && r && Er(t, a, r), r;
3154
+ ], vt.prototype, "separator", 2);
3155
+ vt = qt([
3156
+ d("crt-breadcrumb")
3157
+ ], vt);
3158
+ var Qe = Object.defineProperty, Je = Object.getOwnPropertyDescriptor, xt = (e, t, a, i) => {
3159
+ for (var r = i > 1 ? void 0 : i ? Je(t, a) : t, s = e.length - 1, o; s >= 0; s--)
3160
+ (o = e[s]) && (r = (i ? o(t, a, r) : o(r)) || r);
3161
+ return i && r && Qe(t, a, r), r;
3181
3162
  };
3182
- let rt = class extends h {
3163
+ let W = class extends p {
3183
3164
  constructor() {
3184
3165
  super(...arguments), this.current = 1, this.total = 1, this.siblings = 1, this.showInfo = !0;
3185
3166
  }
@@ -3191,9 +3172,9 @@ let rt = class extends h {
3191
3172
  _getPageNumbers() {
3192
3173
  const e = [], t = this.current > this.siblings + 2, a = this.current < this.total - this.siblings - 1;
3193
3174
  e.push(1), t && e.push("...");
3194
- const s = Math.max(2, this.current - this.siblings), r = Math.min(this.total - 1, this.current + this.siblings);
3195
- for (let i = s; i <= r; i++)
3196
- e.includes(i) || e.push(i);
3175
+ const i = Math.max(2, this.current - this.siblings), r = Math.min(this.total - 1, this.current + this.siblings);
3176
+ for (let s = i; s <= r; s++)
3177
+ e.includes(s) || e.push(s);
3197
3178
  return a && e.push("..."), this.total > 1 && !e.includes(this.total) && e.push(this.total), e;
3198
3179
  }
3199
3180
  render() {
@@ -3238,7 +3219,7 @@ let rt = class extends h {
3238
3219
  `;
3239
3220
  }
3240
3221
  };
3241
- rt.styles = d`
3222
+ W.styles = c`
3242
3223
  :host {
3243
3224
  display: block;
3244
3225
  font-family: var(--crt-font-family);
@@ -3293,27 +3274,27 @@ rt.styles = d`
3293
3274
  margin-left: var(--crt-spacing-md);
3294
3275
  }
3295
3276
  `;
3296
- St([
3277
+ xt([
3297
3278
  n({ type: Number })
3298
- ], rt.prototype, "current", 2);
3299
- St([
3279
+ ], W.prototype, "current", 2);
3280
+ xt([
3300
3281
  n({ type: Number })
3301
- ], rt.prototype, "total", 2);
3302
- St([
3282
+ ], W.prototype, "total", 2);
3283
+ xt([
3303
3284
  n({ type: Number })
3304
- ], rt.prototype, "siblings", 2);
3305
- St([
3285
+ ], W.prototype, "siblings", 2);
3286
+ xt([
3306
3287
  n({ type: Boolean })
3307
- ], rt.prototype, "showInfo", 2);
3308
- rt = St([
3309
- u("crt-pagination")
3310
- ], rt);
3311
- var Dr = Object.defineProperty, Tr = Object.getOwnPropertyDescriptor, B = (e, t, a, s) => {
3312
- for (var r = s > 1 ? void 0 : s ? Tr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
3313
- (o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
3314
- return s && r && Dr(t, a, r), r;
3288
+ ], W.prototype, "showInfo", 2);
3289
+ W = xt([
3290
+ d("crt-pagination")
3291
+ ], W);
3292
+ var Ze = Object.defineProperty, tr = Object.getOwnPropertyDescriptor, I = (e, t, a, i) => {
3293
+ for (var r = i > 1 ? void 0 : i ? tr(t, a) : t, s = e.length - 1, o; s >= 0; s--)
3294
+ (o = e[s]) && (r = (i ? o(t, a, r) : o(r)) || r);
3295
+ return i && r && Ze(t, a, r), r;
3315
3296
  };
3316
- let _ = class extends h {
3297
+ let w = class extends p {
3317
3298
  constructor() {
3318
3299
  super(...arguments), this.value = 50, this.min = 0, this.max = 100, this.step = 1, this.label = "", this.disabled = !1, this.showMarks = !1, this.unit = "";
3319
3300
  }
@@ -3370,7 +3351,7 @@ let _ = class extends h {
3370
3351
  `;
3371
3352
  }
3372
3353
  };
3373
- _.styles = d`
3354
+ w.styles = c`
3374
3355
  :host {
3375
3356
  display: block;
3376
3357
  font-family: var(--crt-font-family);
@@ -3504,39 +3485,39 @@ _.styles = d`
3504
3485
  cursor: not-allowed;
3505
3486
  }
3506
3487
  `;
3507
- B([
3488
+ I([
3508
3489
  n({ type: Number })
3509
- ], _.prototype, "value", 2);
3510
- B([
3490
+ ], w.prototype, "value", 2);
3491
+ I([
3511
3492
  n({ type: Number })
3512
- ], _.prototype, "min", 2);
3513
- B([
3493
+ ], w.prototype, "min", 2);
3494
+ I([
3514
3495
  n({ type: Number })
3515
- ], _.prototype, "max", 2);
3516
- B([
3496
+ ], w.prototype, "max", 2);
3497
+ I([
3517
3498
  n({ type: Number })
3518
- ], _.prototype, "step", 2);
3519
- B([
3499
+ ], w.prototype, "step", 2);
3500
+ I([
3520
3501
  n({ type: String })
3521
- ], _.prototype, "label", 2);
3522
- B([
3502
+ ], w.prototype, "label", 2);
3503
+ I([
3523
3504
  n({ type: Boolean, reflect: !0 })
3524
- ], _.prototype, "disabled", 2);
3525
- B([
3505
+ ], w.prototype, "disabled", 2);
3506
+ I([
3526
3507
  n({ type: Boolean })
3527
- ], _.prototype, "showMarks", 2);
3528
- B([
3508
+ ], w.prototype, "showMarks", 2);
3509
+ I([
3529
3510
  n({ type: String })
3530
- ], _.prototype, "unit", 2);
3531
- _ = B([
3532
- u("crt-slider")
3533
- ], _);
3534
- var jr = Object.defineProperty, Lr = Object.getOwnPropertyDescriptor, ot = (e, t, a, s) => {
3535
- for (var r = s > 1 ? void 0 : s ? Lr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
3536
- (o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
3537
- return s && r && jr(t, a, r), r;
3511
+ ], w.prototype, "unit", 2);
3512
+ w = I([
3513
+ d("crt-slider")
3514
+ ], w);
3515
+ var er = Object.defineProperty, rr = Object.getOwnPropertyDescriptor, et = (e, t, a, i) => {
3516
+ for (var r = i > 1 ? void 0 : i ? rr(t, a) : t, s = e.length - 1, o; s >= 0; s--)
3517
+ (o = e[s]) && (r = (i ? o(t, a, r) : o(r)) || r);
3518
+ return i && r && er(t, a, r), r;
3538
3519
  };
3539
- let T = class extends h {
3520
+ let M = class extends p {
3540
3521
  constructor() {
3541
3522
  super(...arguments), this.checked = !1, this.disabled = !1, this.label = "", this.onLabel = "1", this.offLabel = "0", this.size = "medium";
3542
3523
  }
@@ -3567,7 +3548,7 @@ let T = class extends h {
3567
3548
  `;
3568
3549
  }
3569
3550
  };
3570
- T.styles = d`
3551
+ M.styles = c`
3571
3552
  :host {
3572
3553
  display: inline-flex;
3573
3554
  align-items: center;
@@ -3689,33 +3670,33 @@ T.styles = d`
3689
3670
  left: 35px;
3690
3671
  }
3691
3672
  `;
3692
- ot([
3673
+ et([
3693
3674
  n({ type: Boolean, reflect: !0 })
3694
- ], T.prototype, "checked", 2);
3695
- ot([
3675
+ ], M.prototype, "checked", 2);
3676
+ et([
3696
3677
  n({ type: Boolean, reflect: !0 })
3697
- ], T.prototype, "disabled", 2);
3698
- ot([
3678
+ ], M.prototype, "disabled", 2);
3679
+ et([
3699
3680
  n({ type: String })
3700
- ], T.prototype, "label", 2);
3701
- ot([
3681
+ ], M.prototype, "label", 2);
3682
+ et([
3702
3683
  n({ type: String })
3703
- ], T.prototype, "onLabel", 2);
3704
- ot([
3684
+ ], M.prototype, "onLabel", 2);
3685
+ et([
3705
3686
  n({ type: String })
3706
- ], T.prototype, "offLabel", 2);
3707
- ot([
3687
+ ], M.prototype, "offLabel", 2);
3688
+ et([
3708
3689
  n({ type: String, reflect: !0 })
3709
- ], T.prototype, "size", 2);
3710
- T = ot([
3711
- u("crt-toggle")
3712
- ], T);
3713
- var Ir = Object.defineProperty, Br = Object.getOwnPropertyDescriptor, N = (e, t, a, s) => {
3714
- for (var r = s > 1 ? void 0 : s ? Br(t, a) : t, i = e.length - 1, o; i >= 0; i--)
3715
- (o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
3716
- return s && r && Ir(t, a, r), r;
3690
+ ], M.prototype, "size", 2);
3691
+ M = et([
3692
+ d("crt-toggle")
3693
+ ], M);
3694
+ var ar = Object.defineProperty, ir = Object.getOwnPropertyDescriptor, L = (e, t, a, i) => {
3695
+ for (var r = i > 1 ? void 0 : i ? ir(t, a) : t, s = e.length - 1, o; s >= 0; s--)
3696
+ (o = e[s]) && (r = (i ? o(t, a, r) : o(r)) || r);
3697
+ return i && r && ar(t, a, r), r;
3717
3698
  };
3718
- let j = class extends h {
3699
+ let j = class extends p {
3719
3700
  constructor() {
3720
3701
  super(...arguments), this.src = "", this.alt = "", this.name = "", this.size = "md", this.shape = "square", this.status = "";
3721
3702
  }
@@ -3748,7 +3729,7 @@ let j = class extends h {
3748
3729
  `;
3749
3730
  }
3750
3731
  };
3751
- j.styles = d`
3732
+ j.styles = c`
3752
3733
  :host {
3753
3734
  display: inline-block;
3754
3735
  font-family: var(--crt-font-family);
@@ -3876,28 +3857,28 @@ j.styles = d`
3876
3857
  border-color: var(--crt-bg-dark);
3877
3858
  }
3878
3859
  `;
3879
- N([
3860
+ L([
3880
3861
  n({ type: String })
3881
3862
  ], j.prototype, "src", 2);
3882
- N([
3863
+ L([
3883
3864
  n({ type: String })
3884
3865
  ], j.prototype, "alt", 2);
3885
- N([
3866
+ L([
3886
3867
  n({ type: String })
3887
3868
  ], j.prototype, "name", 2);
3888
- N([
3869
+ L([
3889
3870
  n({ type: String, reflect: !0 })
3890
3871
  ], j.prototype, "size", 2);
3891
- N([
3872
+ L([
3892
3873
  n({ type: String, reflect: !0 })
3893
3874
  ], j.prototype, "shape", 2);
3894
- N([
3875
+ L([
3895
3876
  n({ type: String, reflect: !0 })
3896
3877
  ], j.prototype, "status", 2);
3897
- j = N([
3898
- u("crt-avatar")
3878
+ j = L([
3879
+ d("crt-avatar")
3899
3880
  ], j);
3900
- let Rt = class extends h {
3881
+ let Et = class extends p {
3901
3882
  constructor() {
3902
3883
  super(...arguments), this.max = 5;
3903
3884
  }
@@ -3907,7 +3888,7 @@ let Rt = class extends h {
3907
3888
  `;
3908
3889
  }
3909
3890
  };
3910
- Rt.styles = d`
3891
+ Et.styles = c`
3911
3892
  :host {
3912
3893
  display: inline-flex;
3913
3894
  align-items: center;
@@ -3936,18 +3917,18 @@ Rt.styles = d`
3936
3917
  box-shadow: var(--crt-glow-sm);
3937
3918
  }
3938
3919
  `;
3939
- N([
3920
+ L([
3940
3921
  n({ type: Number })
3941
- ], Rt.prototype, "max", 2);
3942
- Rt = N([
3943
- u("crt-avatar-group")
3944
- ], Rt);
3945
- var Nr = Object.defineProperty, Ur = Object.getOwnPropertyDescriptor, S = (e, t, a, s) => {
3946
- for (var r = s > 1 ? void 0 : s ? Ur(t, a) : t, i = e.length - 1, o; i >= 0; i--)
3947
- (o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
3948
- return s && r && Nr(t, a, r), r;
3922
+ ], Et.prototype, "max", 2);
3923
+ Et = L([
3924
+ d("crt-avatar-group")
3925
+ ], Et);
3926
+ var sr = Object.defineProperty, or = Object.getOwnPropertyDescriptor, O = (e, t, a, i) => {
3927
+ for (var r = i > 1 ? void 0 : i ? or(t, a) : t, s = e.length - 1, o; s >= 0; s--)
3928
+ (o = e[s]) && (r = (i ? o(t, a, r) : o(r)) || r);
3929
+ return i && r && sr(t, a, r), r;
3949
3930
  };
3950
- let q = class extends h {
3931
+ let F = class extends p {
3951
3932
  constructor() {
3952
3933
  super(...arguments), this.variant = "rectangular", this.animation = "shimmer", this.width = "100%", this.height = "20px", this.effect = !1;
3953
3934
  }
@@ -3960,7 +3941,7 @@ let q = class extends h {
3960
3941
  `;
3961
3942
  }
3962
3943
  };
3963
- q.styles = d`
3944
+ F.styles = c`
3964
3945
  :host {
3965
3946
  display: block;
3966
3947
  }
@@ -4075,25 +4056,25 @@ q.styles = d`
4075
4056
  pointer-events: none;
4076
4057
  }
4077
4058
  `;
4078
- S([
4059
+ O([
4079
4060
  n({ type: String, reflect: !0 })
4080
- ], q.prototype, "variant", 2);
4081
- S([
4061
+ ], F.prototype, "variant", 2);
4062
+ O([
4082
4063
  n({ type: String, reflect: !0 })
4083
- ], q.prototype, "animation", 2);
4084
- S([
4064
+ ], F.prototype, "animation", 2);
4065
+ O([
4085
4066
  n({ type: String })
4086
- ], q.prototype, "width", 2);
4087
- S([
4067
+ ], F.prototype, "width", 2);
4068
+ O([
4088
4069
  n({ type: String })
4089
- ], q.prototype, "height", 2);
4090
- S([
4070
+ ], F.prototype, "height", 2);
4071
+ O([
4091
4072
  n({ type: Boolean, reflect: !0 })
4092
- ], q.prototype, "effect", 2);
4093
- q = S([
4094
- u("crt-skeleton")
4095
- ], q);
4096
- let Ft = class extends h {
4073
+ ], F.prototype, "effect", 2);
4074
+ F = O([
4075
+ d("crt-skeleton")
4076
+ ], F);
4077
+ let Dt = class extends p {
4097
4078
  constructor() {
4098
4079
  super(...arguments), this.lines = 3;
4099
4080
  }
@@ -4105,7 +4086,7 @@ let Ft = class extends h {
4105
4086
  `;
4106
4087
  }
4107
4088
  };
4108
- Ft.styles = d`
4089
+ Dt.styles = c`
4109
4090
  :host {
4110
4091
  display: block;
4111
4092
  }
@@ -4137,13 +4118,13 @@ Ft.styles = d`
4137
4118
  }
4138
4119
  }
4139
4120
  `;
4140
- S([
4121
+ O([
4141
4122
  n({ type: Number })
4142
- ], Ft.prototype, "lines", 2);
4143
- Ft = S([
4144
- u("crt-skeleton-text")
4145
- ], Ft);
4146
- let Ht = class extends h {
4123
+ ], Dt.prototype, "lines", 2);
4124
+ Dt = O([
4125
+ d("crt-skeleton-text")
4126
+ ], Dt);
4127
+ let Mt = class extends p {
4147
4128
  constructor() {
4148
4129
  super(...arguments), this.hideImage = !1;
4149
4130
  }
@@ -4159,7 +4140,7 @@ let Ht = class extends h {
4159
4140
  `;
4160
4141
  }
4161
4142
  };
4162
- Ht.styles = d`
4143
+ Mt.styles = c`
4163
4144
  :host {
4164
4145
  display: block;
4165
4146
  }
@@ -4210,18 +4191,18 @@ Ht.styles = d`
4210
4191
  }
4211
4192
  }
4212
4193
  `;
4213
- S([
4194
+ O([
4214
4195
  n({ type: Boolean })
4215
- ], Ht.prototype, "hideImage", 2);
4216
- Ht = S([
4217
- u("crt-skeleton-card")
4218
- ], Ht);
4219
- var Rr = Object.defineProperty, Fr = Object.getOwnPropertyDescriptor, U = (e, t, a, s) => {
4220
- for (var r = s > 1 ? void 0 : s ? Fr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
4221
- (o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
4222
- return s && r && Rr(t, a, r), r;
4196
+ ], Mt.prototype, "hideImage", 2);
4197
+ Mt = O([
4198
+ d("crt-skeleton-card")
4199
+ ], Mt);
4200
+ var nr = Object.defineProperty, lr = Object.getOwnPropertyDescriptor, B = (e, t, a, i) => {
4201
+ for (var r = i > 1 ? void 0 : i ? lr(t, a) : t, s = e.length - 1, o; s >= 0; s--)
4202
+ (o = e[s]) && (r = (i ? o(t, a, r) : o(r)) || r);
4203
+ return i && r && nr(t, a, r), r;
4223
4204
  };
4224
- let z = class extends h {
4205
+ let k = class extends p {
4225
4206
  constructor() {
4226
4207
  super(...arguments), this.variant = "info", this.title = "", this.closable = !1, this.filled = !1, this.outlined = !1, this.banner = !1, this.animated = !1, this.icon = "";
4227
4208
  }
@@ -4256,7 +4237,7 @@ let z = class extends h {
4256
4237
  `;
4257
4238
  }
4258
4239
  };
4259
- z.styles = d`
4240
+ k.styles = c`
4260
4241
  :host {
4261
4242
  display: block;
4262
4243
  font-family: var(--crt-font-family);
@@ -4421,39 +4402,39 @@ z.styles = d`
4421
4402
  border-top: none;
4422
4403
  }
4423
4404
  `;
4424
- U([
4405
+ B([
4425
4406
  n({ type: String, reflect: !0 })
4426
- ], z.prototype, "variant", 2);
4427
- U([
4407
+ ], k.prototype, "variant", 2);
4408
+ B([
4428
4409
  n({ type: String })
4429
- ], z.prototype, "title", 2);
4430
- U([
4410
+ ], k.prototype, "title", 2);
4411
+ B([
4431
4412
  n({ type: Boolean, reflect: !0 })
4432
- ], z.prototype, "closable", 2);
4433
- U([
4413
+ ], k.prototype, "closable", 2);
4414
+ B([
4434
4415
  n({ type: Boolean, reflect: !0 })
4435
- ], z.prototype, "filled", 2);
4436
- U([
4416
+ ], k.prototype, "filled", 2);
4417
+ B([
4437
4418
  n({ type: Boolean, reflect: !0 })
4438
- ], z.prototype, "outlined", 2);
4439
- U([
4419
+ ], k.prototype, "outlined", 2);
4420
+ B([
4440
4421
  n({ type: Boolean, reflect: !0 })
4441
- ], z.prototype, "banner", 2);
4442
- U([
4422
+ ], k.prototype, "banner", 2);
4423
+ B([
4443
4424
  n({ type: Boolean, reflect: !0 })
4444
- ], z.prototype, "animated", 2);
4445
- U([
4425
+ ], k.prototype, "animated", 2);
4426
+ B([
4446
4427
  n({ type: String })
4447
- ], z.prototype, "icon", 2);
4448
- z = U([
4449
- u("crt-alert")
4450
- ], z);
4451
- var Hr = Object.defineProperty, Yr = Object.getOwnPropertyDescriptor, ne = (e, t, a, s) => {
4452
- for (var r = s > 1 ? void 0 : s ? Yr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
4453
- (o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
4454
- return s && r && Hr(t, a, r), r;
4428
+ ], k.prototype, "icon", 2);
4429
+ k = B([
4430
+ d("crt-alert")
4431
+ ], k);
4432
+ var cr = Object.defineProperty, pr = Object.getOwnPropertyDescriptor, Ht = (e, t, a, i) => {
4433
+ for (var r = i > 1 ? void 0 : i ? pr(t, a) : t, s = e.length - 1, o; s >= 0; s--)
4434
+ (o = e[s]) && (r = (i ? o(t, a, r) : o(r)) || r);
4435
+ return i && r && cr(t, a, r), r;
4455
4436
  };
4456
- let _t = class extends h {
4437
+ let ut = class extends p {
4457
4438
  constructor() {
4458
4439
  super(...arguments), this.open = !1, this.message = "LOADING...";
4459
4440
  }
@@ -4477,7 +4458,7 @@ let _t = class extends h {
4477
4458
  ` : l``;
4478
4459
  }
4479
4460
  };
4480
- _t.styles = d`
4461
+ ut.styles = c`
4481
4462
  :host {
4482
4463
  display: block;
4483
4464
  }
@@ -4699,21 +4680,21 @@ _t.styles = d`
4699
4680
  50% { opacity: 0.5; }
4700
4681
  }
4701
4682
  `;
4702
- ne([
4683
+ Ht([
4703
4684
  n({ type: Boolean, reflect: !0 })
4704
- ], _t.prototype, "open", 2);
4705
- ne([
4685
+ ], ut.prototype, "open", 2);
4686
+ Ht([
4706
4687
  n({ type: String })
4707
- ], _t.prototype, "message", 2);
4708
- _t = ne([
4709
- u("crt-spinner")
4710
- ], _t);
4711
- var Vr = Object.getOwnPropertyDescriptor, qr = (e, t, a, s) => {
4712
- for (var r = s > 1 ? void 0 : s ? Vr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
4713
- (o = e[i]) && (r = o(r) || r);
4688
+ ], ut.prototype, "message", 2);
4689
+ ut = Ht([
4690
+ d("crt-spinner")
4691
+ ], ut);
4692
+ var dr = Object.getOwnPropertyDescriptor, hr = (e, t, a, i) => {
4693
+ for (var r = i > 1 ? void 0 : i ? dr(t, a) : t, s = e.length - 1, o; s >= 0; s--)
4694
+ (o = e[s]) && (r = o(r) || r);
4714
4695
  return r;
4715
4696
  };
4716
- let Qt = class extends h {
4697
+ let Ut = class extends p {
4717
4698
  render() {
4718
4699
  return l`
4719
4700
  <div class="card">
@@ -4730,7 +4711,7 @@ let Qt = class extends h {
4730
4711
  `;
4731
4712
  }
4732
4713
  };
4733
- Qt.styles = d`
4714
+ Ut.styles = c`
4734
4715
  :host {
4735
4716
  /* Make the card element act like a normal block-level container
4736
4717
  so external width/height styles can be applied responsively. */
@@ -4772,15 +4753,15 @@ Qt.styles = d`
4772
4753
  margin-top: var(--crt-spacing-md);
4773
4754
  }
4774
4755
  `;
4775
- Qt = qr([
4776
- u("crt-card")
4777
- ], Qt);
4778
- var Wr = Object.defineProperty, Xr = Object.getOwnPropertyDescriptor, le = (e, t, a, s) => {
4779
- for (var r = s > 1 ? void 0 : s ? Xr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
4780
- (o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
4781
- return s && r && Wr(t, a, r), r;
4756
+ Ut = hr([
4757
+ d("crt-card")
4758
+ ], Ut);
4759
+ var vr = Object.defineProperty, ur = Object.getOwnPropertyDescriptor, Kt = (e, t, a, i) => {
4760
+ for (var r = i > 1 ? void 0 : i ? ur(t, a) : t, s = e.length - 1, o; s >= 0; s--)
4761
+ (o = e[s]) && (r = (i ? o(t, a, r) : o(r)) || r);
4762
+ return i && r && vr(t, a, r), r;
4782
4763
  };
4783
- let zt = class extends h {
4764
+ let gt = class extends p {
4784
4765
  constructor() {
4785
4766
  super(...arguments), this.headers = [], this.rows = [];
4786
4767
  }
@@ -4799,7 +4780,7 @@ let zt = class extends h {
4799
4780
  `;
4800
4781
  }
4801
4782
  };
4802
- zt.styles = d`
4783
+ gt.styles = c`
4803
4784
  :host {
4804
4785
  display: block;
4805
4786
  }
@@ -4851,21 +4832,21 @@ zt.styles = d`
4851
4832
  border-bottom: none;
4852
4833
  }
4853
4834
  `;
4854
- le([
4835
+ Kt([
4855
4836
  n({ type: Array })
4856
- ], zt.prototype, "headers", 2);
4857
- le([
4837
+ ], gt.prototype, "headers", 2);
4838
+ Kt([
4858
4839
  n({ type: Array })
4859
- ], zt.prototype, "rows", 2);
4860
- zt = le([
4861
- u("crt-table")
4862
- ], zt);
4863
- var Kr = Object.defineProperty, Gr = Object.getOwnPropertyDescriptor, ce = (e, t, a, s) => {
4864
- for (var r = s > 1 ? void 0 : s ? Gr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
4865
- (o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
4866
- return s && r && Kr(t, a, r), r;
4840
+ ], gt.prototype, "rows", 2);
4841
+ gt = Kt([
4842
+ d("crt-table")
4843
+ ], gt);
4844
+ var gr = Object.defineProperty, mr = Object.getOwnPropertyDescriptor, Xt = (e, t, a, i) => {
4845
+ for (var r = i > 1 ? void 0 : i ? mr(t, a) : t, s = e.length - 1, o; s >= 0; s--)
4846
+ (o = e[s]) && (r = (i ? o(t, a, r) : o(r)) || r);
4847
+ return i && r && gr(t, a, r), r;
4867
4848
  };
4868
- let Ct = class extends h {
4849
+ let mt = class extends p {
4869
4850
  constructor() {
4870
4851
  super(...arguments), this.columns = 3, this.gap = "var(--crt-spacing-lg)";
4871
4852
  }
@@ -4883,7 +4864,7 @@ let Ct = class extends h {
4883
4864
  `;
4884
4865
  }
4885
4866
  };
4886
- Ct.styles = d`
4867
+ mt.styles = c`
4887
4868
  :host {
4888
4869
  display: block;
4889
4870
  }
@@ -4912,21 +4893,21 @@ Ct.styles = d`
4912
4893
  }
4913
4894
  }
4914
4895
  `;
4915
- ce([
4896
+ Xt([
4916
4897
  n({ type: Number })
4917
- ], Ct.prototype, "columns", 2);
4918
- ce([
4898
+ ], mt.prototype, "columns", 2);
4899
+ Xt([
4919
4900
  n({ type: String })
4920
- ], Ct.prototype, "gap", 2);
4921
- Ct = ce([
4922
- u("crt-grid")
4923
- ], Ct);
4924
- var Zr = Object.defineProperty, Qr = Object.getOwnPropertyDescriptor, vt = (e, t, a, s) => {
4925
- for (var r = s > 1 ? void 0 : s ? Qr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
4926
- (o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
4927
- return s && r && Zr(t, a, r), r;
4901
+ ], mt.prototype, "gap", 2);
4902
+ mt = Xt([
4903
+ d("crt-grid")
4904
+ ], mt);
4905
+ var fr = Object.defineProperty, br = Object.getOwnPropertyDescriptor, nt = (e, t, a, i) => {
4906
+ for (var r = i > 1 ? void 0 : i ? br(t, a) : t, s = e.length - 1, o; s >= 0; s--)
4907
+ (o = e[s]) && (r = (i ? o(t, a, r) : o(r)) || r);
4908
+ return i && r && fr(t, a, r), r;
4928
4909
  };
4929
- let W = class extends h {
4910
+ let V = class extends p {
4930
4911
  constructor() {
4931
4912
  super(...arguments), this.title = "", this.description = "", this.code = "", this.activeTab = "preview", this.copied = !1;
4932
4913
  }
@@ -4983,7 +4964,7 @@ let W = class extends h {
4983
4964
  `;
4984
4965
  }
4985
4966
  };
4986
- W.styles = d`
4967
+ V.styles = c`
4987
4968
  :host {
4988
4969
  display: block;
4989
4970
  margin-bottom: var(--crt-spacing-xl);
@@ -5132,30 +5113,30 @@ W.styles = d`
5132
5113
  color: var(--crt-bg-dark);
5133
5114
  }
5134
5115
  `;
5135
- vt([
5116
+ nt([
5136
5117
  n()
5137
- ], W.prototype, "title", 2);
5138
- vt([
5118
+ ], V.prototype, "title", 2);
5119
+ nt([
5139
5120
  n()
5140
- ], W.prototype, "description", 2);
5141
- vt([
5121
+ ], V.prototype, "description", 2);
5122
+ nt([
5142
5123
  n()
5143
- ], W.prototype, "code", 2);
5144
- vt([
5145
- m()
5146
- ], W.prototype, "activeTab", 2);
5147
- vt([
5148
- m()
5149
- ], W.prototype, "copied", 2);
5150
- W = vt([
5151
- u("crt-code-example")
5152
- ], W);
5153
- var Jr = Object.defineProperty, ta = Object.getOwnPropertyDescriptor, Kt = (e, t, a, s) => {
5154
- for (var r = s > 1 ? void 0 : s ? ta(t, a) : t, i = e.length - 1, o; i >= 0; i--)
5155
- (o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
5156
- return s && r && Jr(t, a, r), r;
5124
+ ], V.prototype, "code", 2);
5125
+ nt([
5126
+ v()
5127
+ ], V.prototype, "activeTab", 2);
5128
+ nt([
5129
+ v()
5130
+ ], V.prototype, "copied", 2);
5131
+ V = nt([
5132
+ d("crt-code-example")
5133
+ ], V);
5134
+ var yr = Object.defineProperty, xr = Object.getOwnPropertyDescriptor, Bt = (e, t, a, i) => {
5135
+ for (var r = i > 1 ? void 0 : i ? xr(t, a) : t, s = e.length - 1, o; s >= 0; s--)
5136
+ (o = e[s]) && (r = (i ? o(t, a, r) : o(r)) || r);
5137
+ return i && r && yr(t, a, r), r;
5157
5138
  };
5158
- let ht = class extends h {
5139
+ let st = class extends p {
5159
5140
  constructor() {
5160
5141
  super(...arguments), this.open = !1, this.title = "Modal", this.size = "medium", this._handleKeydown = (e) => {
5161
5142
  e.key === "Escape" && this.open && this.close();
@@ -5192,7 +5173,7 @@ let ht = class extends h {
5192
5173
  `;
5193
5174
  }
5194
5175
  };
5195
- ht.styles = d`
5176
+ st.styles = c`
5196
5177
  :host {
5197
5178
  display: none;
5198
5179
  }
@@ -5319,24 +5300,24 @@ ht.styles = d`
5319
5300
  height: calc(95vh - 120px);
5320
5301
  }
5321
5302
  `;
5322
- Kt([
5303
+ Bt([
5323
5304
  n({ type: Boolean, reflect: !0 })
5324
- ], ht.prototype, "open", 2);
5325
- Kt([
5305
+ ], st.prototype, "open", 2);
5306
+ Bt([
5326
5307
  n({ type: String })
5327
- ], ht.prototype, "title", 2);
5328
- Kt([
5308
+ ], st.prototype, "title", 2);
5309
+ Bt([
5329
5310
  n({ type: String })
5330
- ], ht.prototype, "size", 2);
5331
- ht = Kt([
5332
- u("crt-modal")
5333
- ], ht);
5334
- var ea = Object.defineProperty, ra = Object.getOwnPropertyDescriptor, nt = (e, t, a, s) => {
5335
- for (var r = s > 1 ? void 0 : s ? ra(t, a) : t, i = e.length - 1, o; i >= 0; i--)
5336
- (o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
5337
- return s && r && ea(t, a, r), r;
5311
+ ], st.prototype, "size", 2);
5312
+ st = Bt([
5313
+ d("crt-modal")
5314
+ ], st);
5315
+ var wr = Object.defineProperty, kr = Object.getOwnPropertyDescriptor, rt = (e, t, a, i) => {
5316
+ for (var r = i > 1 ? void 0 : i ? kr(t, a) : t, s = e.length - 1, o; s >= 0; s--)
5317
+ (o = e[s]) && (r = (i ? o(t, a, r) : o(r)) || r);
5318
+ return i && r && wr(t, a, r), r;
5338
5319
  };
5339
- let L = class extends h {
5320
+ let T = class extends p {
5340
5321
  constructor() {
5341
5322
  super(...arguments), this.position = "top-right", this.message = "", this.title = "", this.variant = "default", this.duration = 4e3, this._toasts = [], this._counter = 0, this._initialized = !1;
5342
5323
  }
@@ -5401,7 +5382,7 @@ let L = class extends h {
5401
5382
  `;
5402
5383
  }
5403
5384
  };
5404
- L.styles = d`
5385
+ T.styles = c`
5405
5386
  :host {
5406
5387
  position: fixed;
5407
5388
  z-index: 10001;
@@ -5568,33 +5549,33 @@ L.styles = d`
5568
5549
  to { width: 0%; }
5569
5550
  }
5570
5551
  `;
5571
- nt([
5552
+ rt([
5572
5553
  n({ type: String, reflect: !0 })
5573
- ], L.prototype, "position", 2);
5574
- nt([
5554
+ ], T.prototype, "position", 2);
5555
+ rt([
5575
5556
  n({ type: String })
5576
- ], L.prototype, "message", 2);
5577
- nt([
5557
+ ], T.prototype, "message", 2);
5558
+ rt([
5578
5559
  n({ type: String })
5579
- ], L.prototype, "title", 2);
5580
- nt([
5560
+ ], T.prototype, "title", 2);
5561
+ rt([
5581
5562
  n({ type: String })
5582
- ], L.prototype, "variant", 2);
5583
- nt([
5563
+ ], T.prototype, "variant", 2);
5564
+ rt([
5584
5565
  n({ type: Number })
5585
- ], L.prototype, "duration", 2);
5586
- nt([
5587
- m()
5588
- ], L.prototype, "_toasts", 2);
5589
- L = nt([
5590
- u("crt-toast")
5591
- ], L);
5592
- var aa = Object.defineProperty, sa = Object.getOwnPropertyDescriptor, Et = (e, t, a, s) => {
5593
- for (var r = s > 1 ? void 0 : s ? sa(t, a) : t, i = e.length - 1, o; i >= 0; i--)
5594
- (o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
5595
- return s && r && aa(t, a, r), r;
5566
+ ], T.prototype, "duration", 2);
5567
+ rt([
5568
+ v()
5569
+ ], T.prototype, "_toasts", 2);
5570
+ T = rt([
5571
+ d("crt-toast")
5572
+ ], T);
5573
+ var _r = Object.defineProperty, $r = Object.getOwnPropertyDescriptor, wt = (e, t, a, i) => {
5574
+ for (var r = i > 1 ? void 0 : i ? $r(t, a) : t, s = e.length - 1, o; s >= 0; s--)
5575
+ (o = e[s]) && (r = (i ? o(t, a, r) : o(r)) || r);
5576
+ return i && r && _r(t, a, r), r;
5596
5577
  };
5597
- let Pt = class extends h {
5578
+ let ft = class extends p {
5598
5579
  constructor() {
5599
5580
  super(...arguments), this.header = "", this.open = !1;
5600
5581
  }
@@ -5623,7 +5604,7 @@ let Pt = class extends h {
5623
5604
  `;
5624
5605
  }
5625
5606
  };
5626
- Pt.styles = d`
5607
+ ft.styles = c`
5627
5608
  :host {
5628
5609
  display: block;
5629
5610
  font-family: var(--crt-font-family);
@@ -5694,16 +5675,16 @@ Pt.styles = d`
5694
5675
  color: var(--crt-text-secondary);
5695
5676
  }
5696
5677
  `;
5697
- Et([
5678
+ wt([
5698
5679
  n({ type: String })
5699
- ], Pt.prototype, "header", 2);
5700
- Et([
5680
+ ], ft.prototype, "header", 2);
5681
+ wt([
5701
5682
  n({ type: Boolean, reflect: !0 })
5702
- ], Pt.prototype, "open", 2);
5703
- Pt = Et([
5704
- u("crt-accordion-item")
5705
- ], Pt);
5706
- let Yt = class extends h {
5683
+ ], ft.prototype, "open", 2);
5684
+ ft = wt([
5685
+ d("crt-accordion-item")
5686
+ ], ft);
5687
+ let jt = class extends p {
5707
5688
  constructor() {
5708
5689
  super(...arguments), this.multiple = !1, this._handleToggle = (e) => {
5709
5690
  !this.multiple && e.detail.open && this.querySelectorAll("crt-accordion-item").forEach((t) => {
@@ -5721,33 +5702,33 @@ let Yt = class extends h {
5721
5702
  return l`<slot></slot>`;
5722
5703
  }
5723
5704
  };
5724
- Yt.styles = d`
5705
+ jt.styles = c`
5725
5706
  :host {
5726
5707
  display: block;
5727
5708
  }
5728
5709
  `;
5729
- Et([
5710
+ wt([
5730
5711
  n({ type: Boolean })
5731
- ], Yt.prototype, "multiple", 2);
5732
- Yt = Et([
5733
- u("crt-accordion")
5734
- ], Yt);
5735
- var ia = Object.defineProperty, oa = Object.getOwnPropertyDescriptor, Mt = (e, t, a, s) => {
5736
- for (var r = s > 1 ? void 0 : s ? oa(t, a) : t, i = e.length - 1, o; i >= 0; i--)
5737
- (o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
5738
- return s && r && ia(t, a, r), r;
5712
+ ], jt.prototype, "multiple", 2);
5713
+ jt = wt([
5714
+ d("crt-accordion")
5715
+ ], jt);
5716
+ var zr = Object.defineProperty, Cr = Object.getOwnPropertyDescriptor, kt = (e, t, a, i) => {
5717
+ for (var r = i > 1 ? void 0 : i ? Cr(t, a) : t, s = e.length - 1, o; s >= 0; s--)
5718
+ (o = e[s]) && (r = (i ? o(t, a, r) : o(r)) || r);
5719
+ return i && r && zr(t, a, r), r;
5739
5720
  };
5740
- let at = class extends h {
5721
+ let G = class extends p {
5741
5722
  constructor() {
5742
5723
  super(...arguments), this.bars = 20, this.mode = 1, this.barHeights = [], this.isActive = !1, this.visualize = () => {
5743
5724
  if (!this.isActive || !this.analyser || !this.dataArray) return;
5744
5725
  this.analyser.getByteFrequencyData(this.dataArray);
5745
5726
  const e = Math.floor(this.dataArray.length / this.bars), t = [];
5746
5727
  for (let a = 0; a < this.bars; a++) {
5747
- let s;
5748
- this.mode === 1 ? s = a * e : this.mode === 2 ? a < this.bars / 2 ? s = Math.floor((this.bars / 2 - a - 1) * e) : s = Math.floor((a - this.bars / 2) * e) : a < this.bars / 2 ? s = Math.floor(a * e) : s = Math.floor((this.bars - a - 1) * e);
5749
- const i = (this.dataArray[s] || 0) / 255 * 100;
5750
- t.push(Math.max(20, i));
5728
+ let i;
5729
+ this.mode === 1 ? i = a * e : this.mode === 2 ? a < this.bars / 2 ? i = Math.floor((this.bars / 2 - a - 1) * e) : i = Math.floor((a - this.bars / 2) * e) : a < this.bars / 2 ? i = Math.floor(a * e) : i = Math.floor((this.bars - a - 1) * e);
5730
+ const s = (this.dataArray[i] || 0) / 255 * 100;
5731
+ t.push(Math.max(20, s));
5751
5732
  }
5752
5733
  this.barHeights = t, this.animationId = requestAnimationFrame(this.visualize);
5753
5734
  };
@@ -5790,7 +5771,7 @@ let at = class extends h {
5790
5771
  `;
5791
5772
  }
5792
5773
  };
5793
- at.styles = d`
5774
+ G.styles = c`
5794
5775
  :host {
5795
5776
  display: block;
5796
5777
  }
@@ -5865,27 +5846,27 @@ at.styles = d`
5865
5846
  animation: none;
5866
5847
  }
5867
5848
  `;
5868
- Mt([
5849
+ kt([
5869
5850
  n({ type: Number })
5870
- ], at.prototype, "bars", 2);
5871
- Mt([
5851
+ ], G.prototype, "bars", 2);
5852
+ kt([
5872
5853
  n({ type: Number })
5873
- ], at.prototype, "mode", 2);
5874
- Mt([
5875
- m()
5876
- ], at.prototype, "barHeights", 2);
5877
- Mt([
5878
- m()
5879
- ], at.prototype, "isActive", 2);
5880
- at = Mt([
5881
- u("crt-visualizer")
5882
- ], at);
5883
- var na = Object.defineProperty, la = Object.getOwnPropertyDescriptor, pe = (e, t, a, s) => {
5884
- for (var r = s > 1 ? void 0 : s ? la(t, a) : t, i = e.length - 1, o; i >= 0; i--)
5885
- (o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
5886
- return s && r && na(t, a, r), r;
5854
+ ], G.prototype, "mode", 2);
5855
+ kt([
5856
+ v()
5857
+ ], G.prototype, "barHeights", 2);
5858
+ kt([
5859
+ v()
5860
+ ], G.prototype, "isActive", 2);
5861
+ G = kt([
5862
+ d("crt-visualizer")
5863
+ ], G);
5864
+ var Pr = Object.defineProperty, Or = Object.getOwnPropertyDescriptor, Wt = (e, t, a, i) => {
5865
+ for (var r = i > 1 ? void 0 : i ? Or(t, a) : t, s = e.length - 1, o; s >= 0; s--)
5866
+ (o = e[s]) && (r = (i ? o(t, a, r) : o(r)) || r);
5867
+ return i && r && Pr(t, a, r), r;
5887
5868
  };
5888
- let Ot = class extends h {
5869
+ let bt = class extends p {
5889
5870
  constructor() {
5890
5871
  super(...arguments), this.tracks = [], this.currentIndex = 0;
5891
5872
  }
@@ -5954,7 +5935,7 @@ let Ot = class extends h {
5954
5935
  `;
5955
5936
  }
5956
5937
  };
5957
- Ot.styles = d`
5938
+ bt.styles = c`
5958
5939
  :host {
5959
5940
  display: block;
5960
5941
  width: 100%;
@@ -6124,21 +6105,21 @@ Ot.styles = d`
6124
6105
  box-shadow: var(--crt-glow-sm);
6125
6106
  }
6126
6107
  `;
6127
- pe([
6108
+ Wt([
6128
6109
  n({ type: Array })
6129
- ], Ot.prototype, "tracks", 2);
6130
- pe([
6110
+ ], bt.prototype, "tracks", 2);
6111
+ Wt([
6131
6112
  n({ type: Number })
6132
- ], Ot.prototype, "currentIndex", 2);
6133
- Ot = pe([
6134
- u("crt-playlist")
6135
- ], Ot);
6136
- var ca = Object.defineProperty, pa = Object.getOwnPropertyDescriptor, $ = (e, t, a, s) => {
6137
- for (var r = s > 1 ? void 0 : s ? pa(t, a) : t, i = e.length - 1, o; i >= 0; i--)
6138
- (o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
6139
- return s && r && ca(t, a, r), r;
6113
+ ], bt.prototype, "currentIndex", 2);
6114
+ bt = Wt([
6115
+ d("crt-playlist")
6116
+ ], bt);
6117
+ var Sr = Object.defineProperty, Er = Object.getOwnPropertyDescriptor, x = (e, t, a, i) => {
6118
+ for (var r = i > 1 ? void 0 : i ? Er(t, a) : t, s = e.length - 1, o; s >= 0; s--)
6119
+ (o = e[s]) && (r = (i ? o(t, a, r) : o(r)) || r);
6120
+ return i && r && Sr(t, a, r), r;
6140
6121
  };
6141
- let x = class extends h {
6122
+ let g = class extends p {
6142
6123
  constructor() {
6143
6124
  super(...arguments), this.tracks = [], this.currentIndex = 0, this.autoplay = !1, this.autoplayDelay = 500, this.isPlaying = !1, this.currentTime = 0, this.duration = 0, this.volume = 80, this.autoplayMuted = !1, this.togglePlay = async () => {
6144
6125
  this.isPlaying ? this.pause() : await this.play();
@@ -6153,8 +6134,8 @@ let x = class extends h {
6153
6134
  }, this.handleEnded = () => {
6154
6135
  this.nextTrack();
6155
6136
  }, this.handleProgressClick = (e) => {
6156
- const a = e.currentTarget.getBoundingClientRect(), s = (e.clientX - a.left) / a.width;
6157
- this.audio && (this.audio.currentTime = this.duration * s);
6137
+ const a = e.currentTarget.getBoundingClientRect(), i = (e.clientX - a.left) / a.width;
6138
+ this.audio && (this.audio.currentTime = this.duration * i);
6158
6139
  }, this.handleVolumeChange = (e) => {
6159
6140
  this.volume = e.detail.value, this.audio && (this.audio.volume = this.volume / 100), localStorage.setItem("crtPlayerVolume", this.volume.toString());
6160
6141
  };
@@ -6322,7 +6303,7 @@ let x = class extends h {
6322
6303
  `;
6323
6304
  }
6324
6305
  };
6325
- x.styles = d`
6306
+ g.styles = c`
6326
6307
  :host {
6327
6308
  display: block;
6328
6309
  font-family: var(--crt-font-family);
@@ -6475,48 +6456,48 @@ x.styles = d`
6475
6456
  opacity: 0.5;
6476
6457
  }
6477
6458
  `;
6478
- $([
6459
+ x([
6479
6460
  n({ type: Array })
6480
- ], x.prototype, "tracks", 2);
6481
- $([
6461
+ ], g.prototype, "tracks", 2);
6462
+ x([
6482
6463
  n({ type: Number })
6483
- ], x.prototype, "currentIndex", 2);
6484
- $([
6464
+ ], g.prototype, "currentIndex", 2);
6465
+ x([
6485
6466
  n({ type: Boolean })
6486
- ], x.prototype, "autoplay", 2);
6487
- $([
6467
+ ], g.prototype, "autoplay", 2);
6468
+ x([
6488
6469
  n({ type: Number })
6489
- ], x.prototype, "autoplayDelay", 2);
6490
- $([
6491
- m()
6492
- ], x.prototype, "isPlaying", 2);
6493
- $([
6494
- m()
6495
- ], x.prototype, "currentTime", 2);
6496
- $([
6497
- m()
6498
- ], x.prototype, "duration", 2);
6499
- $([
6500
- m()
6501
- ], x.prototype, "volume", 2);
6502
- $([
6503
- m()
6504
- ], x.prototype, "autoplayMuted", 2);
6505
- $([
6506
- ee("audio")
6507
- ], x.prototype, "audio", 2);
6508
- $([
6509
- ee("crt-visualizer")
6510
- ], x.prototype, "visualizer", 2);
6511
- x = $([
6512
- u("crt-music-player")
6513
- ], x);
6514
- var da = Object.defineProperty, ha = Object.getOwnPropertyDescriptor, gt = (e, t, a, s) => {
6515
- for (var r = s > 1 ? void 0 : s ? ha(t, a) : t, i = e.length - 1, o; i >= 0; i--)
6516
- (o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
6517
- return s && r && da(t, a, r), r;
6470
+ ], g.prototype, "autoplayDelay", 2);
6471
+ x([
6472
+ v()
6473
+ ], g.prototype, "isPlaying", 2);
6474
+ x([
6475
+ v()
6476
+ ], g.prototype, "currentTime", 2);
6477
+ x([
6478
+ v()
6479
+ ], g.prototype, "duration", 2);
6480
+ x([
6481
+ v()
6482
+ ], g.prototype, "volume", 2);
6483
+ x([
6484
+ v()
6485
+ ], g.prototype, "autoplayMuted", 2);
6486
+ x([
6487
+ Ft("audio")
6488
+ ], g.prototype, "audio", 2);
6489
+ x([
6490
+ Ft("crt-visualizer")
6491
+ ], g.prototype, "visualizer", 2);
6492
+ g = x([
6493
+ d("crt-music-player")
6494
+ ], g);
6495
+ var Dr = Object.defineProperty, Mr = Object.getOwnPropertyDescriptor, lt = (e, t, a, i) => {
6496
+ for (var r = i > 1 ? void 0 : i ? Mr(t, a) : t, s = e.length - 1, o; s >= 0; s--)
6497
+ (o = e[s]) && (r = (i ? o(t, a, r) : o(r)) || r);
6498
+ return i && r && Dr(t, a, r), r;
6518
6499
  };
6519
- let X = class extends h {
6500
+ let Y = class extends p {
6520
6501
  constructor() {
6521
6502
  super(), this.rows = 10, this.prompt = "$", this.disabled = !1, this.outputs = [], this.input = "", this.handleFocus = () => {
6522
6503
  this.disabled || this.focus();
@@ -6572,14 +6553,14 @@ let X = class extends h {
6572
6553
  const { text: e, speed: t } = this.typeQueue.shift();
6573
6554
  await new Promise((a) => {
6574
6555
  this.outputs = [...this.outputs, ""];
6575
- let s = 0;
6556
+ let i = 0;
6576
6557
  const r = () => {
6577
- if (s >= e.length) {
6558
+ if (i >= e.length) {
6578
6559
  a();
6579
6560
  return;
6580
6561
  }
6581
- const i = this.outputs.length - 1;
6582
- this.outputs[i] = (this.outputs[i] || "") + e[s++], this.requestUpdate(), this.scrollToBottom(), setTimeout(r, t);
6562
+ const s = this.outputs.length - 1;
6563
+ this.outputs[s] = (this.outputs[s] || "") + e[i++], this.requestUpdate(), this.scrollToBottom(), setTimeout(r, t);
6583
6564
  };
6584
6565
  r();
6585
6566
  });
@@ -6601,7 +6582,7 @@ let X = class extends h {
6601
6582
  `;
6602
6583
  }
6603
6584
  };
6604
- X.styles = d`
6585
+ Y.styles = c`
6605
6586
  :host { display: block; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, 'Roboto Mono', monospace; width: 100%; max-width: none; box-sizing: border-box; min-width: 0; }
6606
6587
  .term {
6607
6588
  width: 100%;
@@ -6641,43 +6622,478 @@ X.styles = d`
6641
6622
  .fake-input .input-text { display:inline-block; white-space:pre; }
6642
6623
  .muted { opacity: 0.7; font-size: 0.9em; }
6643
6624
  `;
6644
- gt([
6625
+ lt([
6645
6626
  n({ type: Number })
6646
- ], X.prototype, "rows", 2);
6647
- gt([
6627
+ ], Y.prototype, "rows", 2);
6628
+ lt([
6648
6629
  n({ type: String })
6649
- ], X.prototype, "prompt", 2);
6650
- gt([
6630
+ ], Y.prototype, "prompt", 2);
6631
+ lt([
6651
6632
  n({ type: Boolean, reflect: !0 })
6652
- ], X.prototype, "disabled", 2);
6653
- gt([
6654
- m()
6655
- ], X.prototype, "outputs", 2);
6656
- gt([
6657
- m()
6658
- ], X.prototype, "input", 2);
6659
- X = gt([
6660
- u("crt-terminal")
6661
- ], X);
6662
- var ua = Object.defineProperty, va = Object.getOwnPropertyDescriptor, lt = (e, t, a, s) => {
6663
- for (var r = s > 1 ? void 0 : s ? va(t, a) : t, i = e.length - 1, o; i >= 0; i--)
6664
- (o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
6665
- return s && r && ua(t, a, r), r;
6633
+ ], Y.prototype, "disabled", 2);
6634
+ lt([
6635
+ v()
6636
+ ], Y.prototype, "outputs", 2);
6637
+ lt([
6638
+ v()
6639
+ ], Y.prototype, "input", 2);
6640
+ Y = lt([
6641
+ d("crt-terminal")
6642
+ ], Y);
6643
+ var jr = Object.defineProperty, Tr = Object.getOwnPropertyDescriptor, _t = (e, t, a, i) => {
6644
+ for (var r = i > 1 ? void 0 : i ? Tr(t, a) : t, s = e.length - 1, o; s >= 0; s--)
6645
+ (o = e[s]) && (r = (i ? o(t, a, r) : o(r)) || r);
6646
+ return i && r && jr(t, a, r), r;
6647
+ };
6648
+ let Q = class extends p {
6649
+ constructor() {
6650
+ super(...arguments), this.items = [], this.brand = "", this._open = !1;
6651
+ }
6652
+ _toggle() {
6653
+ this._open = !this._open;
6654
+ }
6655
+ _onLinkClick(e, t) {
6656
+ try {
6657
+ const a = (t.href || "").trim();
6658
+ if (a && a.startsWith("#")) {
6659
+ e.preventDefault();
6660
+ const i = document.querySelector(a);
6661
+ if (i) {
6662
+ i.scrollIntoView({ behavior: "smooth", block: "start" });
6663
+ try {
6664
+ history.replaceState(null, "", a);
6665
+ } catch {
6666
+ location.hash = a;
6667
+ }
6668
+ } else
6669
+ console.warn("crt-navbar: target not found for", a);
6670
+ }
6671
+ } catch {
6672
+ }
6673
+ this.dispatchEvent(new CustomEvent("nav-select", { detail: t })), this.items = this.items.map((a) => ({ ...a, active: a.href === t.href }));
6674
+ }
6675
+ _onMenuSelect(e) {
6676
+ const t = e.detail?.item;
6677
+ t && (this._handleNavHref(t.href), this.items = this.items.map((a) => ({ ...a, active: a.href === t.href })));
6678
+ }
6679
+ _onLinkNavigate(e, t) {
6680
+ e.stopPropagation(), this._handleNavHref(t.href), this.items = this.items.map((a) => ({ ...a, active: a.href === t.href }));
6681
+ }
6682
+ _handleNavHref(e) {
6683
+ const t = (e || "").trim();
6684
+ if (t && t.startsWith("#")) {
6685
+ const a = document.querySelector(t);
6686
+ if (a) {
6687
+ a.scrollIntoView({ behavior: "smooth", block: "start" });
6688
+ try {
6689
+ history.replaceState(null, "", t);
6690
+ } catch {
6691
+ location.hash = t;
6692
+ }
6693
+ }
6694
+ }
6695
+ }
6696
+ render() {
6697
+ const e = typeof this.maxVisible == "number" ? this.items.slice(0, this.maxVisible) : this.items.slice(0), t = typeof this.maxVisible == "number" ? this.items.slice(this.maxVisible) : [];
6698
+ return l`
6699
+ <nav class="nav" role="navigation" aria-label="Main Navigation">
6700
+ <div style="display:flex;align-items:center;justify-content:space-between;gap:12px;">
6701
+ <div class="brand">
6702
+ <slot name="brand">${this.brand || "CRT"}</slot>
6703
+ </div>
6704
+ <button class="toggle" @click="${this._toggle}" aria-expanded="${this._open ? "true" : "false"}" aria-label="Toggle navigation">☰</button>
6705
+ </div>
6706
+
6707
+ <div class="menu ${this._open ? "open" : ""}" role="menubar">
6708
+ ${e.map((a) => l`
6709
+ <crt-link
6710
+ href="${a.href}"
6711
+ class="link"
6712
+ ?aria-current="${a.active ? !0 : void 0}"
6713
+ @click=${(i) => this._onLinkClick(i, a)}
6714
+ @navigate=${(i) => this._onLinkNavigate(i, a)}
6715
+ >${a.label}</crt-link>
6716
+ `)}
6717
+
6718
+ ${t.length > 0 ? l`
6719
+ <div style="position:relative;">
6720
+ <crt-menu .items="${t}" label="MORE" class="more-dropdown-container" @select="${(a) => this._onMenuSelect(a)}"></crt-menu>
6721
+ </div>
6722
+ ` : ""}
6723
+
6724
+ <slot name="end"></slot>
6725
+ </div>
6726
+ </nav>
6727
+ `;
6728
+ }
6729
+ };
6730
+ Q.styles = c`
6731
+ :host { display: block; font-family: var(--crt-font-family); }
6732
+ .nav {
6733
+ position: relative;
6734
+ display: flex;
6735
+ align-items: center;
6736
+ justify-content: space-between;
6737
+ gap: 12px;
6738
+ padding: var(--crt-spacing-md) var(--crt-spacing-lg);
6739
+ background: var(--crt-bg-darker);
6740
+ border-bottom: 2px solid var(--crt-primary);
6741
+ box-shadow: var(--crt-glow-inset);
6742
+ }
6743
+
6744
+ .brand {
6745
+ display: flex;
6746
+ gap: 12px;
6747
+ align-items: center;
6748
+ color: var(--crt-primary);
6749
+ text-shadow: var(--crt-glow);
6750
+ font-weight: 700;
6751
+ text-transform: uppercase;
6752
+ letter-spacing: 2px;
6753
+ }
6754
+
6755
+ .menu {
6756
+ display: flex;
6757
+ gap: 12px;
6758
+ align-items: center;
6759
+ overflow: hidden;
6760
+ min-width: 0;
6761
+ }
6762
+
6763
+ .link {
6764
+ color: var(--crt-primary);
6765
+ padding: 8px 12px;
6766
+ text-decoration: none;
6767
+ border: 1px solid transparent;
6768
+ transition: var(--crt-transition);
6769
+ font-family: var(--crt-font-family);
6770
+ text-transform: uppercase;
6771
+ letter-spacing: 1px;
6772
+ white-space: nowrap;
6773
+ }
6774
+
6775
+ .link:hover {
6776
+ background: color-mix(in srgb, var(--crt-primary) 10%, transparent);
6777
+ box-shadow: var(--crt-glow-sm);
6778
+ }
6779
+
6780
+ .link[aria-current="true"] {
6781
+ background: color-mix(in srgb, var(--crt-primary) 18%, transparent);
6782
+ box-shadow: var(--crt-glow);
6783
+ color: var(--crt-bg-dark);
6784
+ }
6785
+
6786
+ /* .more-button replaced with crt-button - keep visual spacing rules */
6787
+ .more-button {
6788
+ background: transparent;
6789
+ border: 1px solid transparent;
6790
+ color: var(--crt-primary);
6791
+ padding: 0;
6792
+ }
6793
+
6794
+ .more-dropdown-container {
6795
+ position: absolute;
6796
+ right: 0;
6797
+ margin-top: 8px;
6798
+ }
6799
+
6800
+ .toggle {
6801
+ display: none;
6802
+ background: transparent;
6803
+ border: 1px solid var(--crt-primary);
6804
+ color: var(--crt-primary);
6805
+ padding: 8px;
6806
+ cursor: var(--crt-cursor-pointer);
6807
+ font-family: var(--crt-font-family);
6808
+ }
6809
+
6810
+ @media (max-width: 720px) {
6811
+ .menu { display: none; }
6812
+ .menu.open { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
6813
+ .toggle { display: inline-flex; }
6814
+ .nav { flex-direction: column; align-items: stretch; }
6815
+ .brand { justify-content: space-between; width: 100%; }
6816
+ }
6817
+ `;
6818
+ _t([
6819
+ n({ type: Array })
6820
+ ], Q.prototype, "items", 2);
6821
+ _t([
6822
+ n({ type: String })
6823
+ ], Q.prototype, "brand", 2);
6824
+ _t([
6825
+ v()
6826
+ ], Q.prototype, "_open", 2);
6827
+ _t([
6828
+ n({ type: Number })
6829
+ ], Q.prototype, "maxVisible", 2);
6830
+ Q = _t([
6831
+ d("crt-navbar")
6832
+ ], Q);
6833
+ var Ar = Object.defineProperty, Ir = Object.getOwnPropertyDescriptor, re = (e, t, a, i) => {
6834
+ for (var r = i > 1 ? void 0 : i ? Ir(t, a) : t, s = e.length - 1, o; s >= 0; s--)
6835
+ (o = e[s]) && (r = (i ? o(t, a, r) : o(r)) || r);
6836
+ return i && r && Ar(t, a, r), r;
6666
6837
  };
6667
- let I = class extends h {
6838
+ let Tt = class extends p {
6839
+ constructor() {
6840
+ super(...arguments), this.title = "";
6841
+ }
6842
+ render() {
6843
+ return l`
6844
+ <header class="header-wrap" role="banner">
6845
+ <div style="display:flex;align-items:center;gap:12px;min-width:0;">
6846
+ <slot name="brand">
6847
+ <div style="display:flex;flex-direction:column;gap:2px;min-width:0;">
6848
+ <crt-heading level="4">${this.title || "CRT LIVING STYLE GUIDE"}</crt-heading>
6849
+ <crt-text muted style="font-size:var(--crt-font-size-xs);">Component Library · Lit Web Components</crt-text>
6850
+ </div>
6851
+ </slot>
6852
+ </div>
6853
+
6854
+ <div class="actions">
6855
+ <slot name="actions">
6856
+ <!-- default action: search -->
6857
+ <crt-search placeholder="Search styleguide..." style="width:220px;"></crt-search>
6858
+ </slot>
6859
+ </div>
6860
+ </header>
6861
+ `;
6862
+ }
6863
+ };
6864
+ Tt.styles = c`
6865
+ :host { display: block; }
6866
+ .header-wrap {
6867
+ padding: var(--crt-spacing-lg) var(--crt-spacing-md);
6868
+ background: linear-gradient(180deg, rgba(0,0,0,0.65), rgba(0,0,0,0.75));
6869
+ border-bottom: 2px solid var(--crt-primary);
6870
+ box-shadow: var(--crt-glow-inset);
6871
+ display: flex;
6872
+ align-items: center;
6873
+ justify-content: space-between;
6874
+ gap: 12px;
6875
+ }
6876
+
6877
+ .title {
6878
+ display: flex;
6879
+ flex-direction: column;
6880
+ gap: 4px;
6881
+ }
6882
+
6883
+ /* Make nested atoms adopt spacing */
6884
+ .title ::slotted(crt-heading) { margin: 0; }
6885
+ .title ::slotted(crt-text) { margin: 0; }
6886
+
6887
+ .actions { display: flex; align-items: center; gap: 12px; }
6888
+
6889
+ @media (max-width: 720px) {
6890
+ .header-wrap { flex-direction: column; align-items: stretch; }
6891
+ .actions { justify-content: flex-end; width: 100%; }
6892
+ }
6893
+ `;
6894
+ re([
6895
+ n({ type: String })
6896
+ ], Tt.prototype, "title", 2);
6897
+ Tt = re([
6898
+ d("crt-header")
6899
+ ], Tt);
6900
+ var Lr = Object.defineProperty, Br = Object.getOwnPropertyDescriptor, ae = (e, t, a, i) => {
6901
+ for (var r = i > 1 ? void 0 : i ? Br(t, a) : t, s = e.length - 1, o; s >= 0; s--)
6902
+ (o = e[s]) && (r = (i ? o(t, a, r) : o(r)) || r);
6903
+ return i && r && Lr(t, a, r), r;
6904
+ };
6905
+ let At = class extends p {
6906
+ constructor() {
6907
+ super(...arguments), this.copyright = "";
6908
+ }
6909
+ render() {
6910
+ return l`
6911
+ <footer class="footer">
6912
+ <div><slot name="left">${this.copyright || "© 2026 CRT Style Guide"}</slot></div>
6913
+ <div><slot name="right">Made with ♥ · <crt-link href="https://github.com/" target="_blank">GitHub</crt-link></slot></div>
6914
+ </footer>
6915
+ `;
6916
+ }
6917
+ };
6918
+ At.styles = c`
6919
+ :host { display: block; }
6920
+ .footer {
6921
+ padding: var(--crt-spacing-md) var(--crt-spacing-lg);
6922
+ border-top: 2px solid var(--crt-primary);
6923
+ background: var(--crt-bg-darker);
6924
+ color: var(--crt-text-muted);
6925
+ display: flex;
6926
+ align-items: center;
6927
+ justify-content: space-between;
6928
+ gap: 12px;
6929
+ font-family: var(--crt-font-family);
6930
+ font-size: var(--crt-font-size-sm);
6931
+ }
6932
+ `;
6933
+ ae([
6934
+ n({ type: String })
6935
+ ], At.prototype, "copyright", 2);
6936
+ At = ae([
6937
+ d("crt-footer")
6938
+ ], At);
6939
+ var Ur = Object.defineProperty, Nr = Object.getOwnPropertyDescriptor, $t = (e, t, a, i) => {
6940
+ for (var r = i > 1 ? void 0 : i ? Nr(t, a) : t, s = e.length - 1, o; s >= 0; s--)
6941
+ (o = e[s]) && (r = (i ? o(t, a, r) : o(r)) || r);
6942
+ return i && r && Ur(t, a, r), r;
6943
+ };
6944
+ let J = class extends p {
6945
+ constructor() {
6946
+ super(...arguments), this.items = [], this.open = !1, this.label = "Menu", this._active = -1, this._triggerId = `crt-menu-trigger-${Math.random().toString(36).slice(2, 8)}`, this._listId = `crt-menu-list-${Math.random().toString(36).slice(2, 8)}`, this._onDocClick = (e) => {
6947
+ this.open && (this.contains(e.target) || (this.open = !1, this._active = -1, this.shadowRoot?.querySelector("button.trigger")?.focus()));
6948
+ }, this._onDocKeydown = (e) => {
6949
+ this.open && e.key === "Escape" && (this.open = !1, this._active = -1, this.shadowRoot?.querySelector("button.trigger")?.focus());
6950
+ }, this._toggle = () => {
6951
+ this.open = !this.open, this.open ? (this._active = this.items.findIndex((e) => !e.disabled), this.updateComplete.then(() => {
6952
+ this._focusActive();
6953
+ })) : (this._active = -1, this.shadowRoot?.querySelector("button.trigger")?.focus());
6954
+ };
6955
+ }
6956
+ connectedCallback() {
6957
+ super.connectedCallback(), document.addEventListener("click", this._onDocClick), document.addEventListener("keydown", this._onDocKeydown);
6958
+ }
6959
+ disconnectedCallback() {
6960
+ super.disconnectedCallback(), document.removeEventListener("click", this._onDocClick), document.removeEventListener("keydown", this._onDocKeydown);
6961
+ }
6962
+ _focusActive() {
6963
+ const e = this.shadowRoot?.querySelectorAll(".item");
6964
+ if (!e) return;
6965
+ e.forEach((a, i) => a.setAttribute("tabindex", this._active === i ? "0" : "-1")), e[this._active]?.focus();
6966
+ }
6967
+ _onKey(e) {
6968
+ if (!this.open) return;
6969
+ if (e.key === "Tab") {
6970
+ this.open = !1, this._active = -1;
6971
+ return;
6972
+ }
6973
+ const t = this.items.map((a, i) => ({ it: a, idx: i })).filter((a) => !a.it.disabled);
6974
+ switch (["ArrowDown", "ArrowUp", "Home", "End", "Enter", " "].includes(e.key) && e.preventDefault(), e.key) {
6975
+ case "ArrowDown": {
6976
+ const a = t.find((i) => i.idx > this._active) || t[0];
6977
+ this._active = a?.idx ?? this._active, this._focusActive();
6978
+ break;
6979
+ }
6980
+ case "ArrowUp": {
6981
+ const a = t.filter((r) => r.idx < this._active), i = a[a.length - 1] || t[t.length - 1];
6982
+ this._active = i?.idx ?? this._active, this._focusActive();
6983
+ break;
6984
+ }
6985
+ case "Home":
6986
+ this._active = t[0]?.idx ?? this._active, this._focusActive();
6987
+ break;
6988
+ case "End":
6989
+ this._active = t[t.length - 1]?.idx ?? this._active, this._focusActive();
6990
+ break;
6991
+ case "Enter":
6992
+ case " ":
6993
+ this._active >= 0 && this._select(this._active);
6994
+ break;
6995
+ }
6996
+ }
6997
+ _select(e) {
6998
+ const t = this.items[e];
6999
+ !t || t.disabled || (this.open = !1, this._active = -1, this.dispatchEvent(new CustomEvent("select", { detail: { item: t, index: e } })), t.href && (window.location.href = t.href), this.shadowRoot?.querySelector("button.trigger")?.focus());
7000
+ }
7001
+ render() {
7002
+ return l`
7003
+ <div style="display:flex;align-items:center;gap:8px;">
7004
+ <button id="${this._triggerId}" class="trigger" @click=${this._toggle} aria-expanded="${this.open ? "true" : "false"}" aria-haspopup="true" aria-controls="${this._listId}" aria-label="${this.label}">${this.label} ▾</button>
7005
+ <div id="${this._listId}" class="dropdown ${this.open ? "open" : ""}" role="menu" aria-labelledby="${this._triggerId}" @keydown=${(e) => this._onKey(e)}>
7006
+ ${this.items.map((e, t) => l`
7007
+ <div
7008
+ class="item"
7009
+ role="menuitem"
7010
+ tabindex="${this._active === t ? "0" : "-1"}"
7011
+ aria-disabled="${e.disabled ? "true" : "false"}"
7012
+ aria-selected="${this._active === t ? "true" : "false"}"
7013
+ @click=${() => this._select(t)}
7014
+ @keydown=${(a) => this._onKey(a)}
7015
+ >${e.label}</div>
7016
+ `)}
7017
+ </div>
7018
+ </div>
7019
+ `;
7020
+ }
7021
+ };
7022
+ J.styles = c`
7023
+ :host { display: inline-block; position: relative; font-family: var(--crt-font-family); }
7024
+ button.trigger {
7025
+ background: transparent;
7026
+ border: 1px solid var(--crt-primary);
7027
+ color: var(--crt-primary);
7028
+ padding: 8px 10px;
7029
+ cursor: var(--crt-cursor-pointer);
7030
+ font-family: var(--crt-font-family);
7031
+ }
7032
+
7033
+ .dropdown {
7034
+ position: absolute;
7035
+ right: 0;
7036
+ background: var(--crt-bg-dark);
7037
+ border: 2px solid var(--crt-primary);
7038
+ box-shadow: var(--crt-glow-sm);
7039
+ margin-top: 8px;
7040
+ min-width: 160px;
7041
+ display: none;
7042
+ flex-direction: column;
7043
+ z-index: 2000;
7044
+ }
7045
+
7046
+ .dropdown.open { display: flex; }
7047
+
7048
+ .item {
7049
+ padding: var(--crt-spacing-sm) var(--crt-spacing-md);
7050
+ cursor: var(--crt-cursor-pointer);
7051
+ color: var(--crt-primary);
7052
+ white-space: nowrap;
7053
+ }
7054
+
7055
+ .item[aria-disabled='true'] { opacity: 0.5; cursor: not-allowed; }
7056
+
7057
+ .item[aria-selected='true'] {
7058
+ background: color-mix(in srgb, var(--crt-primary) 18%, transparent);
7059
+ box-shadow: var(--crt-glow-sm);
7060
+ color: var(--crt-bg-dark);
7061
+ }
7062
+ `;
7063
+ $t([
7064
+ n({ type: Array })
7065
+ ], J.prototype, "items", 2);
7066
+ $t([
7067
+ n({ type: Boolean, reflect: !0 })
7068
+ ], J.prototype, "open", 2);
7069
+ $t([
7070
+ n({ type: String })
7071
+ ], J.prototype, "label", 2);
7072
+ $t([
7073
+ v()
7074
+ ], J.prototype, "_active", 2);
7075
+ J = $t([
7076
+ d("crt-menu")
7077
+ ], J);
7078
+ var Rr = Object.defineProperty, Fr = Object.getOwnPropertyDescriptor, at = (e, t, a, i) => {
7079
+ for (var r = i > 1 ? void 0 : i ? Fr(t, a) : t, s = e.length - 1, o; s >= 0; s--)
7080
+ (o = e[s]) && (r = (i ? o(t, a, r) : o(r)) || r);
7081
+ return i && r && Rr(t, a, r), r;
7082
+ };
7083
+ let A = class extends p {
6668
7084
  constructor() {
6669
7085
  super(...arguments), this.autoplay = !1, this.autoplayDelay = 500, this.tracks = [], this.currentIndex = 0, this.showUploadModal = !1, this.handleFilesChanged = (e) => {
6670
- const a = e.detail.files.filter((s) => s.type.startsWith("audio/") || s.name.endsWith(".mp3") || s.name.endsWith(".wav") || s.name.endsWith(".ogg") || s.name.endsWith(".flac")).map((s) => {
6671
- const r = s.name.replace(/\.[^/.]+$/, "");
6672
- let i = "UNKNOWN ARTIST", o = r.toUpperCase();
7086
+ const a = e.detail.files.filter((i) => i.type.startsWith("audio/") || i.name.endsWith(".mp3") || i.name.endsWith(".wav") || i.name.endsWith(".ogg") || i.name.endsWith(".flac")).map((i) => {
7087
+ const r = i.name.replace(/\.[^/.]+$/, "");
7088
+ let s = "UNKNOWN ARTIST", o = r.toUpperCase();
6673
7089
  if (r.includes(" - ")) {
6674
- const c = r.split(" - ");
6675
- i = c[0].trim().toUpperCase(), o = c.slice(1).join(" - ").trim().toUpperCase();
7090
+ const h = r.split(" - ");
7091
+ s = h[0].trim().toUpperCase(), o = h.slice(1).join(" - ").trim().toUpperCase();
6676
7092
  }
6677
7093
  return {
6678
7094
  title: o,
6679
- artist: i,
6680
- url: URL.createObjectURL(s)
7095
+ artist: s,
7096
+ url: URL.createObjectURL(i)
6681
7097
  };
6682
7098
  });
6683
7099
  this.tracks = [...this.tracks, ...a];
@@ -6685,7 +7101,7 @@ let I = class extends h {
6685
7101
  this.currentIndex = e.detail.index;
6686
7102
  }, this.handleTrackRemove = (e) => {
6687
7103
  const t = e.detail.index, a = this.tracks[t];
6688
- URL.revokeObjectURL(a.url), this.tracks = this.tracks.filter((s, r) => r !== t), this.tracks.length === 0 ? this.currentIndex = 0 : t <= this.currentIndex && (this.currentIndex = Math.max(0, this.currentIndex - 1));
7104
+ URL.revokeObjectURL(a.url), this.tracks = this.tracks.filter((i, r) => r !== t), this.tracks.length === 0 ? this.currentIndex = 0 : t <= this.currentIndex && (this.currentIndex = Math.max(0, this.currentIndex - 1));
6689
7105
  }, this.handleTrackChange = (e) => {
6690
7106
  this.currentIndex = e.detail.index;
6691
7107
  }, this.openUploadModal = () => {
@@ -6754,7 +7170,7 @@ let I = class extends h {
6754
7170
  `;
6755
7171
  }
6756
7172
  };
6757
- I.styles = d`
7173
+ A.styles = c`
6758
7174
  :host {
6759
7175
  display: block;
6760
7176
  font-family: var(--crt-font-family);
@@ -6827,67 +7243,72 @@ I.styles = d`
6827
7243
  padding-top: var(--crt-spacing-md);
6828
7244
  }
6829
7245
  `;
6830
- lt([
7246
+ at([
6831
7247
  n({ type: Boolean })
6832
- ], I.prototype, "autoplay", 2);
6833
- lt([
7248
+ ], A.prototype, "autoplay", 2);
7249
+ at([
6834
7250
  n({ type: Number })
6835
- ], I.prototype, "autoplayDelay", 2);
6836
- lt([
6837
- m()
6838
- ], I.prototype, "tracks", 2);
6839
- lt([
6840
- m()
6841
- ], I.prototype, "currentIndex", 2);
6842
- lt([
6843
- m()
6844
- ], I.prototype, "showUploadModal", 2);
6845
- lt([
6846
- ee("crt-file-upload")
6847
- ], I.prototype, "fileUpload", 2);
6848
- I = lt([
6849
- u("crt-music-station")
6850
- ], I);
7251
+ ], A.prototype, "autoplayDelay", 2);
7252
+ at([
7253
+ v()
7254
+ ], A.prototype, "tracks", 2);
7255
+ at([
7256
+ v()
7257
+ ], A.prototype, "currentIndex", 2);
7258
+ at([
7259
+ v()
7260
+ ], A.prototype, "showUploadModal", 2);
7261
+ at([
7262
+ Ft("crt-file-upload")
7263
+ ], A.prototype, "fileUpload", 2);
7264
+ A = at([
7265
+ d("crt-music-station")
7266
+ ], A);
6851
7267
  export {
6852
- Yt as Accordion,
6853
- Pt as AccordionItem,
6854
- z as Alert,
7268
+ jt as Accordion,
7269
+ ft as AccordionItem,
7270
+ k as Alert,
6855
7271
  j as Avatar,
6856
- Rt as AvatarGroup,
6857
- Bt as Badge,
6858
- $t as Breadcrumb,
6859
- C as Button,
6860
- w as Calendar,
6861
- Qt as Card,
6862
- Y as Checkbox,
6863
- W as CodeExample,
6864
- M as FileUpload,
6865
- Ct as Grid,
6866
- Nt as Heading,
6867
- wt as Icon,
6868
- J as Input,
6869
- H as Link,
6870
- ht as Modal,
6871
- x as MusicPlayer,
6872
- I as MusicStation,
6873
- rt as Pagination,
6874
- Ot as Playlist,
6875
- k as Progress,
6876
- V as Radio,
6877
- dt as RadioGroup,
7272
+ Et as AvatarGroup,
7273
+ Pt as Badge,
7274
+ vt as Breadcrumb,
7275
+ $ as Button,
7276
+ b as Calendar,
7277
+ Ut as Card,
7278
+ N as Checkbox,
7279
+ V as CodeExample,
7280
+ E as FileUpload,
7281
+ At as Footer,
7282
+ mt as Grid,
7283
+ Tt as Header,
7284
+ Ot as Heading,
7285
+ dt as Icon,
7286
+ H as Input,
7287
+ U as Link,
7288
+ J as Menu,
7289
+ st as Modal,
7290
+ g as MusicPlayer,
7291
+ A as MusicStation,
7292
+ Q as Navbar,
7293
+ W as Pagination,
7294
+ bt as Playlist,
7295
+ y as Progress,
7296
+ R as Radio,
7297
+ it as RadioGroup,
7298
+ m as Search,
6878
7299
  D as Select,
6879
- q as Skeleton,
6880
- Ht as SkeletonCard,
6881
- Ft as SkeletonText,
6882
- _ as Slider,
6883
- _t as Spinner,
6884
- zt as Table,
6885
- kt as Tabs,
6886
- X as Terminal,
6887
- Ut as Text,
6888
- tt as Textarea,
6889
- L as Toast,
6890
- T as Toggle,
6891
- et as Tooltip,
6892
- at as Visualizer
7300
+ F as Skeleton,
7301
+ Mt as SkeletonCard,
7302
+ Dt as SkeletonText,
7303
+ w as Slider,
7304
+ ut as Spinner,
7305
+ gt as Table,
7306
+ ht as Tabs,
7307
+ Y as Terminal,
7308
+ St as Text,
7309
+ K as Textarea,
7310
+ T as Toast,
7311
+ M as Toggle,
7312
+ X as Tooltip,
7313
+ G as Visualizer
6893
7314
  };