@patimweb/crtstyleguide 1.0.9 → 1.0.10

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 +724 -501
  2. package/package.json +1 -1
package/dist/lib/index.js CHANGED
@@ -4,18 +4,18 @@ const d = (r) => (t, a) => {
4
4
  customElements.define(r, t);
5
5
  }) : customElements.define(r, t);
6
6
  };
7
- const bt = globalThis, Dt = bt.ShadowRoot && (bt.ShadyCSS === void 0 || bt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Vt = /* @__PURE__ */ Symbol(), Rt = /* @__PURE__ */ new WeakMap();
8
- let Wt = class {
9
- constructor(t, a, s) {
10
- if (this._$cssResult$ = !0, s !== Vt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
7
+ const yt = globalThis, Tt = yt.ShadowRoot && (yt.ShadyCSS === void 0 || yt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Xt = /* @__PURE__ */ Symbol(), Bt = /* @__PURE__ */ new WeakMap();
8
+ let Ht = class {
9
+ constructor(t, a, i) {
10
+ if (this._$cssResult$ = !0, i !== Xt) 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 (Dt && t === void 0) {
17
- const s = a !== void 0 && a.length === 1;
18
- s && (t = Rt.get(a)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && Rt.set(a, t));
16
+ if (Tt && t === void 0) {
17
+ const i = a !== void 0 && a.length === 1;
18
+ i && (t = Bt.get(a)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && Bt.set(a, t));
19
19
  }
20
20
  return t;
21
21
  }
@@ -23,21 +23,21 @@ let Wt = class {
23
23
  return this.cssText;
24
24
  }
25
25
  };
26
- const Ht = (r) => new Wt(typeof r == "string" ? r : r + "", void 0, Vt), Kt = (r, t) => {
27
- if (Dt) r.adoptedStyleSheets = t.map((a) => a instanceof CSSStyleSheet ? a : a.styleSheet);
26
+ const Gt = (r) => new Ht(typeof r == "string" ? r : r + "", void 0, Xt), Qt = (r, t) => {
27
+ if (Tt) r.adoptedStyleSheets = t.map((a) => a instanceof CSSStyleSheet ? a : a.styleSheet);
28
28
  else for (const a of t) {
29
- const s = document.createElement("style"), e = bt.litNonce;
30
- e !== void 0 && s.setAttribute("nonce", e), s.textContent = a.cssText, r.appendChild(s);
29
+ const i = document.createElement("style"), e = yt.litNonce;
30
+ e !== void 0 && i.setAttribute("nonce", e), i.textContent = a.cssText, r.appendChild(i);
31
31
  }
32
- }, Ft = Dt ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
32
+ }, Yt = Tt ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
33
33
  let a = "";
34
- for (const s of t.cssRules) a += s.cssText;
35
- return Ht(a);
34
+ for (const i of t.cssRules) a += i.cssText;
35
+ return Gt(a);
36
36
  })(r) : r;
37
- const { is: Gt, defineProperty: Jt, getOwnPropertyDescriptor: Zt, getOwnPropertyNames: Qt, getOwnPropertySymbols: tr, getPrototypeOf: rr } = Object, Ot = globalThis, Bt = Ot.trustedTypes, er = Bt ? Bt.emptyScript : "", ar = Ot.reactiveElementPolyfillSupport, at = (r, t) => r, ft = { toAttribute(r, t) {
37
+ const { is: Jt, defineProperty: Zt, getOwnPropertyDescriptor: tr, getOwnPropertyNames: rr, getOwnPropertySymbols: er, getPrototypeOf: ar } = Object, Ct = globalThis, qt = Ct.trustedTypes, ir = qt ? qt.emptyScript : "", sr = Ct.reactiveElementPolyfillSupport, st = (r, t) => r, xt = { toAttribute(r, t) {
38
38
  switch (t) {
39
39
  case Boolean:
40
- r = r ? er : null;
40
+ r = r ? ir : null;
41
41
  break;
42
42
  case Object:
43
43
  case Array:
@@ -62,54 +62,54 @@ const { is: Gt, defineProperty: Jt, getOwnPropertyDescriptor: Zt, getOwnProperty
62
62
  }
63
63
  }
64
64
  return a;
65
- } }, Et = (r, t) => !Gt(r, t), Yt = { attribute: !0, type: String, converter: ft, reflect: !1, useDefault: !1, hasChanged: Et };
66
- Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), Ot.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
67
- class et extends HTMLElement {
65
+ } }, jt = (r, t) => !Jt(r, t), Vt = { attribute: !0, type: String, converter: xt, reflect: !1, useDefault: !1, hasChanged: jt };
66
+ Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), Ct.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
67
+ class it 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 = Yt) {
74
+ static createProperty(t, a = Vt) {
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(), e = this.getPropertyDescriptor(t, s, a);
77
- e !== void 0 && Jt(this.prototype, t, e);
76
+ const i = /* @__PURE__ */ Symbol(), e = this.getPropertyDescriptor(t, i, a);
77
+ e !== void 0 && Zt(this.prototype, t, e);
78
78
  }
79
79
  }
80
- static getPropertyDescriptor(t, a, s) {
81
- const { get: e, set: i } = Zt(this.prototype, t) ?? { get() {
80
+ static getPropertyDescriptor(t, a, i) {
81
+ const { get: e, set: s } = tr(this.prototype, t) ?? { get() {
82
82
  return this[a];
83
83
  }, set(o) {
84
84
  this[a] = o;
85
85
  } };
86
86
  return { get: e, set(o) {
87
87
  const h = e?.call(this);
88
- i?.call(this, o), this.requestUpdate(t, h, s);
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) ?? Yt;
92
+ return this.elementProperties.get(t) ?? Vt;
93
93
  }
94
94
  static _$Ei() {
95
- if (this.hasOwnProperty(at("elementProperties"))) return;
96
- const t = rr(this);
95
+ if (this.hasOwnProperty(st("elementProperties"))) return;
96
+ const t = ar(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(at("finalized"))) return;
101
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(at("properties"))) {
102
- const a = this.properties, s = [...Qt(a), ...tr(a)];
103
- for (const e of s) this.createProperty(e, a[e]);
100
+ if (this.hasOwnProperty(st("finalized"))) return;
101
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(st("properties"))) {
102
+ const a = this.properties, i = [...rr(a), ...er(a)];
103
+ for (const e of i) this.createProperty(e, a[e]);
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, e] of a) this.elementProperties.set(s, e);
108
+ if (a !== void 0) for (const [i, e] of a) this.elementProperties.set(i, e);
109
109
  }
110
110
  this._$Eh = /* @__PURE__ */ new Map();
111
- for (const [a, s] of this.elementProperties) {
112
- const e = this._$Eu(a, s);
111
+ for (const [a, i] of this.elementProperties) {
112
+ const e = this._$Eu(a, i);
113
113
  e !== void 0 && this._$Eh.set(e, a);
114
114
  }
115
115
  this.elementStyles = this.finalizeStyles(this.styles);
@@ -117,14 +117,14 @@ class et 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 e of s) a.unshift(Ft(e));
122
- } else t !== void 0 && a.push(Ft(t));
120
+ const i = new Set(t.flat(1 / 0).reverse());
121
+ for (const e of i) a.unshift(Yt(e));
122
+ } else t !== void 0 && a.push(Yt(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 @@ class et 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 Kt(t, this.constructor.elementStyles), t;
148
+ return Qt(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 @@ class et 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), e = this.constructor._$Eu(t, s);
163
- if (e !== void 0 && s.reflect === !0) {
164
- const i = (s.converter?.toAttribute !== void 0 ? s.converter : ft).toAttribute(a, s.type);
165
- this._$Em = t, i == null ? this.removeAttribute(e) : this.setAttribute(e, i), this._$Em = null;
162
+ const i = this.constructor.elementProperties.get(t), e = this.constructor._$Eu(t, i);
163
+ if (e !== void 0 && i.reflect === !0) {
164
+ const s = (i.converter?.toAttribute !== void 0 ? i.converter : xt).toAttribute(a, i.type);
165
+ this._$Em = t, s == null ? this.removeAttribute(e) : this.setAttribute(e, s), this._$Em = null;
166
166
  }
167
167
  }
168
168
  _$AK(t, a) {
169
- const s = this.constructor, e = s._$Eh.get(t);
169
+ const i = this.constructor, e = i._$Eh.get(t);
170
170
  if (e !== void 0 && this._$Em !== e) {
171
- const i = s.getPropertyOptions(e), o = typeof i.converter == "function" ? { fromAttribute: i.converter } : i.converter?.fromAttribute !== void 0 ? i.converter : ft;
171
+ const s = i.getPropertyOptions(e), o = typeof s.converter == "function" ? { fromAttribute: s.converter } : s.converter?.fromAttribute !== void 0 ? s.converter : xt;
172
172
  this._$Em = e;
173
- const h = o.fromAttribute(a, i.type);
173
+ const h = o.fromAttribute(a, s.type);
174
174
  this[e] = h ?? this._$Ej?.get(e) ?? h, this._$Em = null;
175
175
  }
176
176
  }
177
- requestUpdate(t, a, s, e = !1, i) {
177
+ requestUpdate(t, a, i, e = !1, s) {
178
178
  if (t !== void 0) {
179
179
  const o = this.constructor;
180
- if (e === !1 && (i = this[t]), s ??= o.getPropertyOptions(t), !((s.hasChanged ?? Et)(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 (e === !1 && (s = this[t]), i ??= o.getPropertyOptions(t), !((i.hasChanged ?? jt)(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: e, 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)), e === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
185
+ C(t, a, { useDefault: i, reflect: e, 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)), e === !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 @@ class et 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 [e, i] of this._$Ep) this[e] = i;
205
+ for (const [e, s] of this._$Ep) this[e] = s;
206
206
  this._$Ep = void 0;
207
207
  }
208
- const s = this.constructor.elementProperties;
209
- if (s.size > 0) for (const [e, i] of s) {
210
- const { wrapped: o } = i, h = this[e];
211
- o !== !0 || this._$AL.has(e) || h === void 0 || this.C(e, void 0, i, h);
208
+ const i = this.constructor.elementProperties;
209
+ if (i.size > 0) for (const [e, s] of i) {
210
+ const { wrapped: o } = s, h = this[e];
211
+ o !== !0 || this._$AL.has(e) || h === void 0 || this.C(e, 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
  }
@@ -245,11 +245,11 @@ class et extends HTMLElement {
245
245
  firstUpdated(t) {
246
246
  }
247
247
  }
248
- et.elementStyles = [], et.shadowRootOptions = { mode: "open" }, et[at("elementProperties")] = /* @__PURE__ */ new Map(), et[at("finalized")] = /* @__PURE__ */ new Map(), ar?.({ ReactiveElement: et }), (Ot.reactiveElementVersions ??= []).push("2.1.2");
249
- const sr = { attribute: !0, type: String, converter: ft, reflect: !1, hasChanged: Et }, ir = (r = sr, t, a) => {
250
- const { kind: s, metadata: e } = a;
251
- let i = globalThis.litPropertyMetadata.get(e);
252
- if (i === void 0 && globalThis.litPropertyMetadata.set(e, i = /* @__PURE__ */ new Map()), s === "setter" && ((r = Object.create(r)).wrapped = !0), i.set(a.name, r), s === "accessor") {
248
+ it.elementStyles = [], it.shadowRootOptions = { mode: "open" }, it[st("elementProperties")] = /* @__PURE__ */ new Map(), it[st("finalized")] = /* @__PURE__ */ new Map(), sr?.({ ReactiveElement: it }), (Ct.reactiveElementVersions ??= []).push("2.1.2");
249
+ const or = { attribute: !0, type: String, converter: xt, reflect: !1, hasChanged: jt }, nr = (r = or, t, a) => {
250
+ const { kind: i, metadata: e } = a;
251
+ let s = globalThis.litPropertyMetadata.get(e);
252
+ if (s === void 0 && globalThis.litPropertyMetadata.set(e, s = /* @__PURE__ */ new Map()), i === "setter" && ((r = Object.create(r)).wrapped = !0), s.set(a.name, r), i === "accessor") {
253
253
  const { name: o } = a;
254
254
  return { set(h) {
255
255
  const u = t.get.call(this);
@@ -258,39 +258,39 @@ const sr = { attribute: !0, type: String, converter: ft, reflect: !1, hasChanged
258
258
  return h !== void 0 && this.C(o, void 0, r, h), h;
259
259
  } };
260
260
  }
261
- if (s === "setter") {
261
+ if (i === "setter") {
262
262
  const { name: o } = a;
263
263
  return function(h) {
264
264
  const u = this[o];
265
265
  t.call(this, h), this.requestUpdate(o, u, r, !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(r) {
271
- return (t, a) => typeof a == "object" ? ir(r, t, a) : ((s, e, i) => {
272
- const o = e.hasOwnProperty(i);
273
- return e.constructor.createProperty(i, s), o ? Object.getOwnPropertyDescriptor(e, i) : void 0;
271
+ return (t, a) => typeof a == "object" ? nr(r, t, a) : ((i, e, s) => {
272
+ const o = e.hasOwnProperty(s);
273
+ return e.constructor.createProperty(s, i), o ? Object.getOwnPropertyDescriptor(e, s) : void 0;
274
274
  })(r, t, a);
275
275
  }
276
276
  function v(r) {
277
277
  return n({ ...r, state: !0, attribute: !1 });
278
278
  }
279
- const or = (r, t, a) => (a.configurable = !0, a.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(r, t, a), a);
280
- function Tt(r, t) {
281
- return (a, s, e) => {
282
- const i = (o) => o.renderRoot?.querySelector(r) ?? null;
283
- return or(a, s, { get() {
284
- return i(this);
279
+ const cr = (r, t, a) => (a.configurable = !0, a.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(r, t, a), a);
280
+ function At(r, t) {
281
+ return (a, i, e) => {
282
+ const s = (o) => o.renderRoot?.querySelector(r) ?? null;
283
+ return cr(a, i, { get() {
284
+ return s(this);
285
285
  } });
286
286
  };
287
287
  }
288
- var nr = Object.defineProperty, cr = Object.getOwnPropertyDescriptor, jt = (r, t, a, s) => {
289
- for (var e = s > 1 ? void 0 : s ? cr(t, a) : t, i = r.length - 1, o; i >= 0; i--)
290
- (o = r[i]) && (e = (s ? o(t, a, e) : o(e)) || e);
291
- return s && e && nr(t, a, e), e;
288
+ var lr = Object.defineProperty, pr = Object.getOwnPropertyDescriptor, Mt = (r, t, a, i) => {
289
+ for (var e = i > 1 ? void 0 : i ? pr(t, a) : t, s = r.length - 1, o; s >= 0; s--)
290
+ (o = r[s]) && (e = (i ? o(t, a, e) : o(e)) || e);
291
+ return i && e && lr(t, a, e), e;
292
292
  };
293
- let st = class extends p {
293
+ let ot = class extends p {
294
294
  constructor() {
295
295
  super(...arguments), this.name = "", this.size = "md", this.icons = {
296
296
  checkmark: "✓",
@@ -335,7 +335,7 @@ let st = class extends p {
335
335
  return c`<span class="icon">${this.icons[this.name] || "?"}</span>`;
336
336
  }
337
337
  };
338
- st.styles = l`
338
+ ot.styles = l`
339
339
  :host {
340
340
  display: inline-flex;
341
341
  align-items: center;
@@ -352,19 +352,19 @@ st.styles = l`
352
352
  height: 100%;
353
353
  }
354
354
  `;
355
- jt([
355
+ Mt([
356
356
  n()
357
- ], st.prototype, "name", 2);
358
- jt([
357
+ ], ot.prototype, "name", 2);
358
+ Mt([
359
359
  n()
360
- ], st.prototype, "size", 2);
361
- st = jt([
360
+ ], ot.prototype, "size", 2);
361
+ ot = Mt([
362
362
  d("crt-icon")
363
- ], st);
364
- var lr = Object.defineProperty, pr = Object.getOwnPropertyDescriptor, F = (r, t, a, s) => {
365
- for (var e = s > 1 ? void 0 : s ? pr(t, a) : t, i = r.length - 1, o; i >= 0; i--)
366
- (o = r[i]) && (e = (s ? o(t, a, e) : o(e)) || e);
367
- return s && e && lr(t, a, e), e;
363
+ ], ot);
364
+ var dr = Object.defineProperty, hr = Object.getOwnPropertyDescriptor, B = (r, t, a, i) => {
365
+ for (var e = i > 1 ? void 0 : i ? hr(t, a) : t, s = r.length - 1, o; s >= 0; s--)
366
+ (o = r[s]) && (e = (i ? o(t, a, e) : o(e)) || e);
367
+ return i && e && dr(t, a, e), e;
368
368
  };
369
369
  let w = class extends p {
370
370
  constructor() {
@@ -400,6 +400,8 @@ w.styles = l`
400
400
  background-color: transparent;
401
401
  color: #33ff33;
402
402
  border: 2px solid #33ff33;
403
+ box-sizing: border-box;
404
+ height: 100%;
403
405
  padding: 16px 32px;
404
406
  font-family: 'VT323', 'Courier New', monospace;
405
407
  font-size: 1rem;
@@ -545,36 +547,36 @@ w.styles = l`
545
547
  flex-shrink: 0;
546
548
  }
547
549
  `;
548
- F([
550
+ B([
549
551
  n({ reflect: !0 })
550
552
  ], w.prototype, "size", 2);
551
- F([
553
+ B([
552
554
  n({ reflect: !0 })
553
555
  ], w.prototype, "variant", 2);
554
- F([
556
+ B([
555
557
  n({ type: Boolean })
556
558
  ], w.prototype, "disabled", 2);
557
- F([
559
+ B([
558
560
  n()
559
561
  ], w.prototype, "type", 2);
560
- F([
562
+ B([
561
563
  n({ attribute: "icon-only", type: Boolean })
562
564
  ], w.prototype, "iconOnly", 2);
563
- F([
565
+ B([
564
566
  n({ attribute: "icon-left" })
565
567
  ], w.prototype, "iconLeft", 2);
566
- F([
568
+ B([
567
569
  n({ attribute: "icon-right" })
568
570
  ], w.prototype, "iconRight", 2);
569
- w = F([
571
+ w = B([
570
572
  d("crt-button")
571
573
  ], w);
572
- var dr = Object.defineProperty, hr = Object.getOwnPropertyDescriptor, Xt = (r, t, a, s) => {
573
- for (var e = s > 1 ? void 0 : s ? hr(t, a) : t, i = r.length - 1, o; i >= 0; i--)
574
- (o = r[i]) && (e = (s ? o(t, a, e) : o(e)) || e);
575
- return s && e && dr(t, a, e), e;
574
+ var vr = Object.defineProperty, gr = Object.getOwnPropertyDescriptor, Kt = (r, t, a, i) => {
575
+ for (var e = i > 1 ? void 0 : i ? gr(t, a) : t, s = r.length - 1, o; s >= 0; s--)
576
+ (o = r[s]) && (e = (i ? o(t, a, e) : o(e)) || e);
577
+ return i && e && vr(t, a, e), e;
576
578
  };
577
- let yt = class extends p {
579
+ let wt = class extends p {
578
580
  constructor() {
579
581
  super(...arguments), this.variant = "primary";
580
582
  }
@@ -582,7 +584,7 @@ let yt = class extends p {
582
584
  return c`<span class="badge"><slot></slot></span>`;
583
585
  }
584
586
  };
585
- yt.styles = l`
587
+ wt.styles = l`
586
588
  :host {
587
589
  --badge-bg: transparent;
588
590
  --badge-color: var(--crt-primary);
@@ -623,18 +625,18 @@ yt.styles = l`
623
625
  --badge-border: 1px solid var(--crt-info);
624
626
  }
625
627
  `;
626
- Xt([
628
+ Kt([
627
629
  n()
628
- ], yt.prototype, "variant", 2);
629
- yt = Xt([
630
+ ], wt.prototype, "variant", 2);
631
+ wt = Kt([
630
632
  d("crt-badge")
631
- ], yt);
632
- var vr = Object.defineProperty, gr = Object.getOwnPropertyDescriptor, Pt = (r, t, a, s) => {
633
- for (var e = s > 1 ? void 0 : s ? gr(t, a) : t, i = r.length - 1, o; i >= 0; i--)
634
- (o = r[i]) && (e = (s ? o(t, a, e) : o(e)) || e);
635
- return s && e && vr(t, a, e), e;
633
+ ], wt);
634
+ var ur = Object.defineProperty, mr = Object.getOwnPropertyDescriptor, St = (r, t, a, i) => {
635
+ for (var e = i > 1 ? void 0 : i ? mr(t, a) : t, s = r.length - 1, o; s >= 0; s--)
636
+ (o = r[s]) && (e = (i ? o(t, a, e) : o(e)) || e);
637
+ return i && e && ur(t, a, e), e;
636
638
  };
637
- let xt = class extends p {
639
+ let kt = class extends p {
638
640
  constructor() {
639
641
  super(...arguments), this.level = 1;
640
642
  }
@@ -657,7 +659,7 @@ let xt = class extends p {
657
659
  }
658
660
  }
659
661
  };
660
- xt.styles = l`
662
+ kt.styles = l`
661
663
  h1, h2, h3, h4, h5, h6 {
662
664
  font-family: var(--crt-font-family);
663
665
  color: var(--crt-text-primary);
@@ -686,13 +688,13 @@ xt.styles = l`
686
688
  font-size: var(--crt-font-size-base);
687
689
  }
688
690
  `;
689
- Pt([
691
+ St([
690
692
  n({ type: Number })
691
- ], xt.prototype, "level", 2);
692
- xt = Pt([
693
+ ], kt.prototype, "level", 2);
694
+ kt = St([
693
695
  d("crt-heading")
694
- ], xt);
695
- let wt = class extends p {
696
+ ], kt);
697
+ let $t = class extends p {
696
698
  constructor() {
697
699
  super(...arguments), this.muted = !1;
698
700
  }
@@ -700,7 +702,7 @@ let wt = class extends p {
700
702
  return c`<p><slot></slot></p>`;
701
703
  }
702
704
  };
703
- wt.styles = l`
705
+ $t.styles = l`
704
706
  p {
705
707
  font-family: var(--crt-font-family);
706
708
  color: var(--crt-text-secondary);
@@ -712,18 +714,18 @@ wt.styles = l`
712
714
  color: var(--crt-text-muted);
713
715
  }
714
716
  `;
715
- Pt([
717
+ St([
716
718
  n()
717
- ], wt.prototype, "muted", 2);
718
- wt = Pt([
719
+ ], $t.prototype, "muted", 2);
720
+ $t = St([
719
721
  d("crt-text")
720
- ], wt);
721
- var ur = Object.defineProperty, mr = Object.getOwnPropertyDescriptor, At = (r, t, a, s) => {
722
- for (var e = s > 1 ? void 0 : s ? mr(t, a) : t, i = r.length - 1, o; i >= 0; i--)
723
- (o = r[i]) && (e = (s ? o(t, a, e) : o(e)) || e);
724
- return s && e && ur(t, a, e), e;
722
+ ], $t);
723
+ var br = Object.defineProperty, fr = Object.getOwnPropertyDescriptor, It = (r, t, a, i) => {
724
+ for (var e = i > 1 ? void 0 : i ? fr(t, a) : t, s = r.length - 1, o; s >= 0; s--)
725
+ (o = r[s]) && (e = (i ? o(t, a, e) : o(e)) || e);
726
+ return i && e && br(t, a, e), e;
725
727
  };
726
- let it = class extends p {
728
+ let nt = class extends p {
727
729
  constructor() {
728
730
  super(...arguments), this.activeTab = 0, this.tabs = [];
729
731
  }
@@ -748,7 +750,7 @@ let it = class extends p {
748
750
  ${this.tabs.map(
749
751
  (r, t) => c`
750
752
  <div class="tab-pane ${t === this.activeTab ? "active" : ""}">
751
- ${r.label.toLowerCase() === "code" ? c`<pre><code>${r.content}</code></pre>` : c`<div>${br(r.content)}</div>`}
753
+ ${r.label.toLowerCase() === "code" ? c`<pre><code>${r.content}</code></pre>` : c`<div>${yr(r.content)}</div>`}
752
754
  </div>
753
755
  `
754
756
  )}
@@ -756,7 +758,7 @@ let it = class extends p {
756
758
  `;
757
759
  }
758
760
  };
759
- it.styles = l`
761
+ nt.styles = l`
760
762
  :host {
761
763
  display: block;
762
764
  }
@@ -823,25 +825,25 @@ it.styles = l`
823
825
  font-family: var(--crt-font-family);
824
826
  }
825
827
  `;
826
- At([
828
+ It([
827
829
  v()
828
- ], it.prototype, "activeTab", 2);
829
- At([
830
+ ], nt.prototype, "activeTab", 2);
831
+ It([
830
832
  n({ type: Array })
831
- ], it.prototype, "tabs", 2);
832
- it = At([
833
+ ], nt.prototype, "tabs", 2);
834
+ nt = It([
833
835
  d("crt-tabs")
834
- ], it);
835
- function br(r) {
836
+ ], nt);
837
+ function yr(r) {
836
838
  const t = document.createElement("div");
837
839
  return t.innerHTML = r, t;
838
840
  }
839
- var fr = Object.defineProperty, yr = Object.getOwnPropertyDescriptor, k = (r, t, a, s) => {
840
- for (var e = s > 1 ? void 0 : s ? yr(t, a) : t, i = r.length - 1, o; i >= 0; i--)
841
- (o = r[i]) && (e = (s ? o(t, a, e) : o(e)) || e);
842
- return s && e && fr(t, a, e), e;
841
+ var xr = Object.defineProperty, wr = Object.getOwnPropertyDescriptor, k = (r, t, a, i) => {
842
+ for (var e = i > 1 ? void 0 : i ? wr(t, a) : t, s = r.length - 1, o; s >= 0; s--)
843
+ (o = r[s]) && (e = (i ? o(t, a, e) : o(e)) || e);
844
+ return i && e && xr(t, a, e), e;
843
845
  };
844
- let B = class extends p {
846
+ let Y = class extends p {
845
847
  constructor() {
846
848
  super(...arguments), this.type = "text", this.placeholder = "", this.value = "", this.disabled = !1;
847
849
  }
@@ -859,7 +861,7 @@ let B = class extends p {
859
861
  `;
860
862
  }
861
863
  };
862
- B.styles = l`
864
+ Y.styles = l`
863
865
  :host {
864
866
  display: block;
865
867
  }
@@ -907,20 +909,20 @@ B.styles = l`
907
909
  `;
908
910
  k([
909
911
  n()
910
- ], B.prototype, "type", 2);
912
+ ], Y.prototype, "type", 2);
911
913
  k([
912
914
  n()
913
- ], B.prototype, "placeholder", 2);
915
+ ], Y.prototype, "placeholder", 2);
914
916
  k([
915
917
  n()
916
- ], B.prototype, "value", 2);
918
+ ], Y.prototype, "value", 2);
917
919
  k([
918
920
  n()
919
- ], B.prototype, "disabled", 2);
920
- B = k([
921
+ ], Y.prototype, "disabled", 2);
922
+ Y = k([
921
923
  d("crt-input")
922
- ], B);
923
- let Y = class extends p {
924
+ ], Y);
925
+ let q = class extends p {
924
926
  constructor() {
925
927
  super(...arguments), this.placeholder = "", this.value = "", this.disabled = !1, this.rows = 4;
926
928
  }
@@ -939,7 +941,7 @@ ${this.value}</textarea
939
941
  `;
940
942
  }
941
943
  };
942
- Y.styles = l`
944
+ q.styles = l`
943
945
  :host {
944
946
  display: block;
945
947
  }
@@ -983,23 +985,23 @@ Y.styles = l`
983
985
  `;
984
986
  k([
985
987
  n()
986
- ], Y.prototype, "placeholder", 2);
988
+ ], q.prototype, "placeholder", 2);
987
989
  k([
988
990
  n()
989
- ], Y.prototype, "value", 2);
991
+ ], q.prototype, "value", 2);
990
992
  k([
991
993
  n()
992
- ], Y.prototype, "disabled", 2);
994
+ ], q.prototype, "disabled", 2);
993
995
  k([
994
996
  n()
995
- ], Y.prototype, "rows", 2);
996
- Y = k([
997
+ ], q.prototype, "rows", 2);
998
+ q = k([
997
999
  d("crt-textarea")
998
- ], Y);
999
- var xr = Object.defineProperty, wr = Object.getOwnPropertyDescriptor, tt = (r, t, a, s) => {
1000
- for (var e = s > 1 ? void 0 : s ? wr(t, a) : t, i = r.length - 1, o; i >= 0; i--)
1001
- (o = r[i]) && (e = (s ? o(t, a, e) : o(e)) || e);
1002
- return s && e && xr(t, a, e), e;
1000
+ ], q);
1001
+ var kr = Object.defineProperty, $r = Object.getOwnPropertyDescriptor, rt = (r, t, a, i) => {
1002
+ for (var e = i > 1 ? void 0 : i ? $r(t, a) : t, s = r.length - 1, o; s >= 0; s--)
1003
+ (o = r[s]) && (e = (i ? o(t, a, e) : o(e)) || e);
1004
+ return i && e && kr(t, a, e), e;
1003
1005
  };
1004
1006
  let I = class extends p {
1005
1007
  constructor() {
@@ -1041,28 +1043,28 @@ I.styles = l`
1041
1043
  color: var(--crt-primary-dark);
1042
1044
  }
1043
1045
  `;
1044
- tt([
1046
+ rt([
1045
1047
  n({ type: String })
1046
1048
  ], I.prototype, "href", 2);
1047
- tt([
1049
+ rt([
1048
1050
  n({ type: String })
1049
1051
  ], I.prototype, "target", 2);
1050
- tt([
1052
+ rt([
1051
1053
  n({ type: Boolean })
1052
1054
  ], I.prototype, "iconLeft", 2);
1053
- tt([
1055
+ rt([
1054
1056
  n({ type: Boolean })
1055
1057
  ], I.prototype, "iconRight", 2);
1056
- tt([
1058
+ rt([
1057
1059
  n({ type: String })
1058
1060
  ], I.prototype, "icon", 2);
1059
- I = tt([
1061
+ I = rt([
1060
1062
  d("crt-link")
1061
1063
  ], I);
1062
- var kr = Object.defineProperty, $r = Object.getOwnPropertyDescriptor, H = (r, t, a, s) => {
1063
- for (var e = s > 1 ? void 0 : s ? $r(t, a) : t, i = r.length - 1, o; i >= 0; i--)
1064
- (o = r[i]) && (e = (s ? o(t, a, e) : o(e)) || e);
1065
- return s && e && kr(t, a, e), e;
1064
+ var _r = Object.defineProperty, zr = Object.getOwnPropertyDescriptor, H = (r, t, a, i) => {
1065
+ for (var e = i > 1 ? void 0 : i ? zr(t, a) : t, s = r.length - 1, o; s >= 0; s--)
1066
+ (o = r[s]) && (e = (i ? o(t, a, e) : o(e)) || e);
1067
+ return i && e && _r(t, a, e), e;
1066
1068
  };
1067
1069
  let P = class extends p {
1068
1070
  constructor() {
@@ -1091,12 +1093,12 @@ let P = class extends p {
1091
1093
  return Math.random().toString(36).substring(2, 9);
1092
1094
  }
1093
1095
  _addFiles(r) {
1094
- const s = r.filter((e) => {
1096
+ const i = r.filter((e) => {
1095
1097
  if (e.size > this.maxSize)
1096
1098
  return console.warn(`File ${e.name} exceeds max size`), !1;
1097
1099
  if (this.accept) {
1098
- const i = this.accept.split(",").map((O) => O.trim()), o = e.type, h = "." + e.name.split(".").pop()?.toLowerCase();
1099
- if (!i.some((O) => O.startsWith(".") ? h === O.toLowerCase() : O.endsWith("/*") ? o.startsWith(O.replace("/*", "/")) : o === O))
1100
+ const s = this.accept.split(",").map((O) => O.trim()), o = e.type, h = "." + e.name.split(".").pop()?.toLowerCase();
1101
+ if (!s.some((O) => O.startsWith(".") ? h === O.toLowerCase() : O.endsWith("/*") ? o.startsWith(O.replace("/*", "/")) : o === O))
1100
1102
  return console.warn(`File ${e.name} type not accepted`), !1;
1101
1103
  }
1102
1104
  return !0;
@@ -1106,7 +1108,7 @@ let P = class extends p {
1106
1108
  progress: 100,
1107
1109
  status: "complete"
1108
1110
  }));
1109
- this.files = [...this.files, ...s], this.dispatchEvent(new CustomEvent("files-changed", {
1111
+ this.files = [...this.files, ...i], this.dispatchEvent(new CustomEvent("files-changed", {
1110
1112
  detail: { files: this.files.map((e) => e.file) }
1111
1113
  }));
1112
1114
  }
@@ -1116,8 +1118,8 @@ let P = class extends p {
1116
1118
  }
1117
1119
  _formatFileSize(r) {
1118
1120
  if (r === 0) return "0 B";
1119
- const t = 1024, a = ["B", "KB", "MB", "GB"], s = Math.floor(Math.log(r) / Math.log(t));
1120
- return parseFloat((r / Math.pow(t, s)).toFixed(1)) + " " + a[s];
1121
+ const t = 1024, a = ["B", "KB", "MB", "GB"], i = Math.floor(Math.log(r) / Math.log(t));
1122
+ return parseFloat((r / Math.pow(t, i)).toFixed(1)) + " " + a[i];
1121
1123
  }
1122
1124
  _getFileIcon(r) {
1123
1125
  const t = r.name.split(".").pop()?.toLowerCase() || "", a = r.type;
@@ -1210,7 +1212,7 @@ P.styles = l`
1210
1212
  display: block;
1211
1213
  font-family: var(--crt-font-family);
1212
1214
  width: 100%;
1213
- min-width: 500px;
1215
+ min-width: 0;
1214
1216
  }
1215
1217
 
1216
1218
  .file-manager {
@@ -1312,6 +1314,7 @@ P.styles = l`
1312
1314
  .file-list {
1313
1315
  max-height: 300px;
1314
1316
  overflow-y: auto;
1317
+ width: 100%;
1315
1318
  }
1316
1319
 
1317
1320
  .file-list-header {
@@ -1365,6 +1368,26 @@ P.styles = l`
1365
1368
  min-width: 0;
1366
1369
  }
1367
1370
 
1371
+ /* Responsive adjustments */
1372
+ @media (max-width: 700px) {
1373
+ .file-list-header,
1374
+ .file-item {
1375
+ grid-template-columns: 1fr 70px 70px 40px;
1376
+ }
1377
+ .drop-zone {
1378
+ padding: var(--crt-spacing-md);
1379
+ }
1380
+ }
1381
+
1382
+ @media (max-width: 420px) {
1383
+ .file-list-header,
1384
+ .file-item {
1385
+ grid-template-columns: 1fr 60px 60px 40px;
1386
+ }
1387
+ .file-list-header { font-size: 0.75rem; }
1388
+ .drop-zone { padding: var(--crt-spacing-sm); min-height: 100px; }
1389
+ }
1390
+
1368
1391
  .file-size {
1369
1392
  color: var(--crt-text-muted);
1370
1393
  font-size: var(--crt-font-size-sm);
@@ -1500,10 +1523,10 @@ H([
1500
1523
  P = H([
1501
1524
  d("crt-file-upload")
1502
1525
  ], P);
1503
- var _r = Object.defineProperty, zr = Object.getOwnPropertyDescriptor, $ = (r, t, a, s) => {
1504
- for (var e = s > 1 ? void 0 : s ? zr(t, a) : t, i = r.length - 1, o; i >= 0; i--)
1505
- (o = r[i]) && (e = (s ? o(t, a, e) : o(e)) || e);
1506
- return s && e && _r(t, a, e), e;
1526
+ var Or = Object.defineProperty, Pr = Object.getOwnPropertyDescriptor, $ = (r, t, a, i) => {
1527
+ for (var e = i > 1 ? void 0 : i ? Pr(t, a) : t, s = r.length - 1, o; s >= 0; s--)
1528
+ (o = r[s]) && (e = (i ? o(t, a, e) : o(e)) || e);
1529
+ return i && e && Or(t, a, e), e;
1507
1530
  };
1508
1531
  let m = class extends p {
1509
1532
  constructor() {
@@ -1533,13 +1556,13 @@ let m = class extends p {
1533
1556
  _parseValue() {
1534
1557
  const r = this.value.split(".");
1535
1558
  if (r.length === 3) {
1536
- const [t, a, s] = r.map(Number);
1537
- this._selectedDate = new Date(s, a - 1, t), this._viewDate = new Date(this._selectedDate);
1559
+ const [t, a, i] = r.map(Number);
1560
+ this._selectedDate = new Date(i, a - 1, t), this._viewDate = new Date(this._selectedDate);
1538
1561
  }
1539
1562
  }
1540
1563
  _formatDate(r) {
1541
- const t = String(r.getDate()).padStart(2, "0"), a = String(r.getMonth() + 1).padStart(2, "0"), s = r.getFullYear();
1542
- return `${t}.${a}.${s}`;
1564
+ const t = String(r.getDate()).padStart(2, "0"), a = String(r.getMonth() + 1).padStart(2, "0"), i = r.getFullYear();
1565
+ return `${t}.${a}.${i}`;
1543
1566
  }
1544
1567
  _toggleCalendar() {
1545
1568
  this.disabled || (this._isOpen = !this._isOpen);
@@ -1586,36 +1609,36 @@ let m = class extends p {
1586
1609
  return this._selectedDate ? r.getDate() === this._selectedDate.getDate() && r.getMonth() === this._selectedDate.getMonth() && r.getFullYear() === this._selectedDate.getFullYear() : !1;
1587
1610
  }
1588
1611
  _renderDays() {
1589
- const r = this._viewDate.getFullYear(), t = this._viewDate.getMonth(), a = this._getDaysInMonth(r, t), s = this._getFirstDayOfMonth(r, t), e = this._getDaysInMonth(r, t - 1), i = [];
1590
- for (let h = s - 1; h >= 0; h--) {
1612
+ const r = this._viewDate.getFullYear(), t = this._viewDate.getMonth(), a = this._getDaysInMonth(r, t), i = this._getFirstDayOfMonth(r, t), e = this._getDaysInMonth(r, t - 1), s = [];
1613
+ for (let h = i - 1; h >= 0; h--) {
1591
1614
  const u = new Date(r, t - 1, e - h);
1592
- i.push(c`
1615
+ s.push(c`
1593
1616
  <div class="day other-month" @click="${() => this._selectDate(u)}">
1594
1617
  ${e - h}
1595
1618
  </div>
1596
1619
  `);
1597
1620
  }
1598
1621
  for (let h = 1; h <= a; h++) {
1599
- const u = new Date(r, t, h), O = this._isToday(u), qt = this._isSelected(u);
1600
- i.push(c`
1622
+ const u = new Date(r, t, h), O = this._isToday(u), Wt = this._isSelected(u);
1623
+ s.push(c`
1601
1624
  <div
1602
- class="day ${O ? "today" : ""} ${qt ? "selected" : ""}"
1625
+ class="day ${O ? "today" : ""} ${Wt ? "selected" : ""}"
1603
1626
  @click="${() => this._selectDate(u)}"
1604
1627
  >
1605
1628
  ${h}
1606
1629
  </div>
1607
1630
  `);
1608
1631
  }
1609
- const o = 42 - i.length;
1632
+ const o = 42 - s.length;
1610
1633
  for (let h = 1; h <= o; h++) {
1611
1634
  const u = new Date(r, t + 1, h);
1612
- i.push(c`
1635
+ s.push(c`
1613
1636
  <div class="day other-month" @click="${() => this._selectDate(u)}">
1614
1637
  ${h}
1615
1638
  </div>
1616
1639
  `);
1617
1640
  }
1618
- return i;
1641
+ return s;
1619
1642
  }
1620
1643
  render() {
1621
1644
  const r = `${this._months[this._viewDate.getMonth()]} ${this._viewDate.getFullYear()}`;
@@ -1899,10 +1922,10 @@ $([
1899
1922
  m = $([
1900
1923
  d("crt-calendar")
1901
1924
  ], m);
1902
- var Or = Object.defineProperty, Pr = Object.getOwnPropertyDescriptor, K = (r, t, a, s) => {
1903
- for (var e = s > 1 ? void 0 : s ? Pr(t, a) : t, i = r.length - 1, o; i >= 0; i--)
1904
- (o = r[i]) && (e = (s ? o(t, a, e) : o(e)) || e);
1905
- return s && e && Or(t, a, e), e;
1925
+ var Cr = Object.defineProperty, Sr = Object.getOwnPropertyDescriptor, G = (r, t, a, i) => {
1926
+ for (var e = i > 1 ? void 0 : i ? Sr(t, a) : t, s = r.length - 1, o; s >= 0; s--)
1927
+ (o = r[s]) && (e = (i ? o(t, a, e) : o(e)) || e);
1928
+ return i && e && Cr(t, a, e), e;
1906
1929
  };
1907
1930
  let C = class extends p {
1908
1931
  constructor() {
@@ -1942,15 +1965,15 @@ let C = class extends p {
1942
1965
  r.forEach((e) => {
1943
1966
  e.group ? (t.has(e.group) || t.set(e.group, []), t.get(e.group).push(e)) : a.push(e);
1944
1967
  });
1945
- const s = [];
1968
+ const i = [];
1946
1969
  for (const e of a)
1947
- s.push(this._renderOption(e));
1948
- for (const [e, i] of t) {
1949
- s.push(c`<div class="select-group-label">${e}</div>`);
1950
- for (const o of i)
1951
- s.push(this._renderOption(o));
1970
+ i.push(this._renderOption(e));
1971
+ for (const [e, s] of t) {
1972
+ i.push(c`<div class="select-group-label">${e}</div>`);
1973
+ for (const o of s)
1974
+ i.push(this._renderOption(o));
1952
1975
  }
1953
- return s;
1976
+ return i;
1954
1977
  }
1955
1978
  _renderOption(r) {
1956
1979
  const t = r.value === this.value;
@@ -2142,31 +2165,31 @@ C.styles = l`
2142
2165
  box-shadow: var(--crt-glow-sm);
2143
2166
  }
2144
2167
  `;
2145
- K([
2168
+ G([
2146
2169
  n({ type: String })
2147
2170
  ], C.prototype, "value", 2);
2148
- K([
2171
+ G([
2149
2172
  n({ type: String })
2150
2173
  ], C.prototype, "placeholder", 2);
2151
- K([
2174
+ G([
2152
2175
  n({ type: String })
2153
2176
  ], C.prototype, "label", 2);
2154
- K([
2177
+ G([
2155
2178
  n({ type: Boolean })
2156
2179
  ], C.prototype, "disabled", 2);
2157
- K([
2180
+ G([
2158
2181
  n({ type: Array })
2159
2182
  ], C.prototype, "options", 2);
2160
- K([
2183
+ G([
2161
2184
  v()
2162
2185
  ], C.prototype, "_isOpen", 2);
2163
- C = K([
2186
+ C = G([
2164
2187
  d("crt-select")
2165
2188
  ], C);
2166
- var Cr = Object.defineProperty, Sr = Object.getOwnPropertyDescriptor, g = (r, t, a, s) => {
2167
- for (var e = s > 1 ? void 0 : s ? Sr(t, a) : t, i = r.length - 1, o; i >= 0; i--)
2168
- (o = r[i]) && (e = (s ? o(t, a, e) : o(e)) || e);
2169
- return s && e && Cr(t, a, e), e;
2189
+ var Er = Object.defineProperty, Dr = Object.getOwnPropertyDescriptor, g = (r, t, a, i) => {
2190
+ for (var e = i > 1 ? void 0 : i ? Dr(t, a) : t, s = r.length - 1, o; s >= 0; s--)
2191
+ (o = r[s]) && (e = (i ? o(t, a, e) : o(e)) || e);
2192
+ return i && e && Er(t, a, e), e;
2170
2193
  };
2171
2194
  let L = class extends p {
2172
2195
  constructor() {
@@ -2463,10 +2486,10 @@ g([
2463
2486
  Z = g([
2464
2487
  d("crt-radio-group")
2465
2488
  ], Z);
2466
- var Dr = Object.defineProperty, Er = Object.getOwnPropertyDescriptor, _ = (r, t, a, s) => {
2467
- for (var e = s > 1 ? void 0 : s ? Er(t, a) : t, i = r.length - 1, o; i >= 0; i--)
2468
- (o = r[i]) && (e = (s ? o(t, a, e) : o(e)) || e);
2469
- return s && e && Dr(t, a, e), e;
2489
+ var Tr = Object.defineProperty, jr = Object.getOwnPropertyDescriptor, _ = (r, t, a, i) => {
2490
+ for (var e = i > 1 ? void 0 : i ? jr(t, a) : t, s = r.length - 1, o; s >= 0; s--)
2491
+ (o = r[s]) && (e = (i ? o(t, a, e) : o(e)) || e);
2492
+ return i && e && Tr(t, a, e), e;
2470
2493
  };
2471
2494
  let b = class extends p {
2472
2495
  constructor() {
@@ -2648,10 +2671,10 @@ _([
2648
2671
  b = _([
2649
2672
  d("crt-progress")
2650
2673
  ], b);
2651
- var Tr = Object.defineProperty, jr = Object.getOwnPropertyDescriptor, ht = (r, t, a, s) => {
2652
- for (var e = s > 1 ? void 0 : s ? jr(t, a) : t, i = r.length - 1, o; i >= 0; i--)
2653
- (o = r[i]) && (e = (s ? o(t, a, e) : o(e)) || e);
2654
- return s && e && Tr(t, a, e), e;
2674
+ var Ar = Object.defineProperty, Mr = Object.getOwnPropertyDescriptor, gt = (r, t, a, i) => {
2675
+ for (var e = i > 1 ? void 0 : i ? Mr(t, a) : t, s = r.length - 1, o; s >= 0; s--)
2676
+ (o = r[s]) && (e = (i ? o(t, a, e) : o(e)) || e);
2677
+ return i && e && Ar(t, a, e), e;
2655
2678
  };
2656
2679
  let V = class extends p {
2657
2680
  constructor() {
@@ -2789,27 +2812,27 @@ V.styles = l`
2789
2812
  border-right-color: var(--crt-primary);
2790
2813
  }
2791
2814
  `;
2792
- ht([
2815
+ gt([
2793
2816
  n({ type: String })
2794
2817
  ], V.prototype, "text", 2);
2795
- ht([
2818
+ gt([
2796
2819
  n({ type: String, reflect: !0 })
2797
2820
  ], V.prototype, "position", 2);
2798
- ht([
2821
+ gt([
2799
2822
  n({ type: Number })
2800
2823
  ], V.prototype, "delay", 2);
2801
- ht([
2824
+ gt([
2802
2825
  v()
2803
2826
  ], V.prototype, "_visible", 2);
2804
- V = ht([
2827
+ V = gt([
2805
2828
  d("crt-tooltip")
2806
2829
  ], V);
2807
- var Ar = Object.defineProperty, Mr = Object.getOwnPropertyDescriptor, Mt = (r, t, a, s) => {
2808
- for (var e = s > 1 ? void 0 : s ? Mr(t, a) : t, i = r.length - 1, o; i >= 0; i--)
2809
- (o = r[i]) && (e = (s ? o(t, a, e) : o(e)) || e);
2810
- return s && e && Ar(t, a, e), e;
2830
+ var Ir = Object.defineProperty, Lr = Object.getOwnPropertyDescriptor, Lt = (r, t, a, i) => {
2831
+ for (var e = i > 1 ? void 0 : i ? Lr(t, a) : t, s = r.length - 1, o; s >= 0; s--)
2832
+ (o = r[s]) && (e = (i ? o(t, a, e) : o(e)) || e);
2833
+ return i && e && Ir(t, a, e), e;
2811
2834
  };
2812
- let ot = class extends p {
2835
+ let ct = class extends p {
2813
2836
  constructor() {
2814
2837
  super(...arguments), this.items = [], this.separator = ">";
2815
2838
  }
@@ -2827,7 +2850,7 @@ let ot = class extends p {
2827
2850
  `;
2828
2851
  }
2829
2852
  };
2830
- ot.styles = l`
2853
+ ct.styles = l`
2831
2854
  :host {
2832
2855
  display: block;
2833
2856
  font-family: var(--crt-font-family);
@@ -2876,19 +2899,19 @@ ot.styles = l`
2876
2899
  font-size: var(--crt-font-size-sm);
2877
2900
  }
2878
2901
  `;
2879
- Mt([
2902
+ Lt([
2880
2903
  n({ type: Array })
2881
- ], ot.prototype, "items", 2);
2882
- Mt([
2904
+ ], ct.prototype, "items", 2);
2905
+ Lt([
2883
2906
  n({ type: String })
2884
- ], ot.prototype, "separator", 2);
2885
- ot = Mt([
2907
+ ], ct.prototype, "separator", 2);
2908
+ ct = Lt([
2886
2909
  d("crt-breadcrumb")
2887
- ], ot);
2888
- var Ir = Object.defineProperty, Lr = Object.getOwnPropertyDescriptor, vt = (r, t, a, s) => {
2889
- for (var e = s > 1 ? void 0 : s ? Lr(t, a) : t, i = r.length - 1, o; i >= 0; i--)
2890
- (o = r[i]) && (e = (s ? o(t, a, e) : o(e)) || e);
2891
- return s && e && Ir(t, a, e), e;
2910
+ ], ct);
2911
+ var Ur = Object.defineProperty, Nr = Object.getOwnPropertyDescriptor, ut = (r, t, a, i) => {
2912
+ for (var e = i > 1 ? void 0 : i ? Nr(t, a) : t, s = r.length - 1, o; s >= 0; s--)
2913
+ (o = r[s]) && (e = (i ? o(t, a, e) : o(e)) || e);
2914
+ return i && e && Ur(t, a, e), e;
2892
2915
  };
2893
2916
  let X = class extends p {
2894
2917
  constructor() {
@@ -2902,9 +2925,9 @@ let X = class extends p {
2902
2925
  _getPageNumbers() {
2903
2926
  const r = [], t = this.current > this.siblings + 2, a = this.current < this.total - this.siblings - 1;
2904
2927
  r.push(1), t && r.push("...");
2905
- const s = Math.max(2, this.current - this.siblings), e = Math.min(this.total - 1, this.current + this.siblings);
2906
- for (let i = s; i <= e; i++)
2907
- r.includes(i) || r.push(i);
2928
+ const i = Math.max(2, this.current - this.siblings), e = Math.min(this.total - 1, this.current + this.siblings);
2929
+ for (let s = i; s <= e; s++)
2930
+ r.includes(s) || r.push(s);
2908
2931
  return a && r.push("..."), this.total > 1 && !r.includes(this.total) && r.push(this.total), r;
2909
2932
  }
2910
2933
  render() {
@@ -3004,25 +3027,25 @@ X.styles = l`
3004
3027
  margin-left: var(--crt-spacing-md);
3005
3028
  }
3006
3029
  `;
3007
- vt([
3030
+ ut([
3008
3031
  n({ type: Number })
3009
3032
  ], X.prototype, "current", 2);
3010
- vt([
3033
+ ut([
3011
3034
  n({ type: Number })
3012
3035
  ], X.prototype, "total", 2);
3013
- vt([
3036
+ ut([
3014
3037
  n({ type: Number })
3015
3038
  ], X.prototype, "siblings", 2);
3016
- vt([
3039
+ ut([
3017
3040
  n({ type: Boolean })
3018
3041
  ], X.prototype, "showInfo", 2);
3019
- X = vt([
3042
+ X = ut([
3020
3043
  d("crt-pagination")
3021
3044
  ], X);
3022
- var Ur = Object.defineProperty, Nr = Object.getOwnPropertyDescriptor, T = (r, t, a, s) => {
3023
- for (var e = s > 1 ? void 0 : s ? Nr(t, a) : t, i = r.length - 1, o; i >= 0; i--)
3024
- (o = r[i]) && (e = (s ? o(t, a, e) : o(e)) || e);
3025
- return s && e && Ur(t, a, e), e;
3045
+ var Rr = Object.defineProperty, Fr = Object.getOwnPropertyDescriptor, T = (r, t, a, i) => {
3046
+ for (var e = i > 1 ? void 0 : i ? Fr(t, a) : t, s = r.length - 1, o; s >= 0; s--)
3047
+ (o = r[s]) && (e = (i ? o(t, a, e) : o(e)) || e);
3048
+ return i && e && Rr(t, a, e), e;
3026
3049
  };
3027
3050
  let f = class extends p {
3028
3051
  constructor() {
@@ -3105,7 +3128,8 @@ f.styles = l`
3105
3128
  .slider-value {
3106
3129
  color: var(--crt-primary);
3107
3130
  font-size: var(--crt-font-size-base);
3108
- min-width: 50px;
3131
+ min-width: 36px;
3132
+ flex: 0 0 auto;
3109
3133
  text-align: right;
3110
3134
  }
3111
3135
 
@@ -3116,6 +3140,13 @@ f.styles = l`
3116
3140
  align-items: center;
3117
3141
  }
3118
3142
 
3143
+ /* Allow range input and wrapper to shrink inside flexible containers */
3144
+ .slider-wrapper, .slider-track, input[type="range"] {
3145
+ box-sizing: border-box;
3146
+ min-width: 0;
3147
+ width: 100%;
3148
+ }
3149
+
3119
3150
  input[type="range"] {
3120
3151
  -webkit-appearance: none;
3121
3152
  appearance: none;
@@ -3230,10 +3261,10 @@ T([
3230
3261
  f = T([
3231
3262
  d("crt-slider")
3232
3263
  ], f);
3233
- var Rr = Object.defineProperty, Fr = Object.getOwnPropertyDescriptor, G = (r, t, a, s) => {
3234
- for (var e = s > 1 ? void 0 : s ? Fr(t, a) : t, i = r.length - 1, o; i >= 0; i--)
3235
- (o = r[i]) && (e = (s ? o(t, a, e) : o(e)) || e);
3236
- return s && e && Rr(t, a, e), e;
3264
+ var Br = Object.defineProperty, Yr = Object.getOwnPropertyDescriptor, Q = (r, t, a, i) => {
3265
+ for (var e = i > 1 ? void 0 : i ? Yr(t, a) : t, s = r.length - 1, o; s >= 0; s--)
3266
+ (o = r[s]) && (e = (i ? o(t, a, e) : o(e)) || e);
3267
+ return i && e && Br(t, a, e), e;
3237
3268
  };
3238
3269
  let S = class extends p {
3239
3270
  constructor() {
@@ -3388,33 +3419,33 @@ S.styles = l`
3388
3419
  left: 35px;
3389
3420
  }
3390
3421
  `;
3391
- G([
3422
+ Q([
3392
3423
  n({ type: Boolean, reflect: !0 })
3393
3424
  ], S.prototype, "checked", 2);
3394
- G([
3425
+ Q([
3395
3426
  n({ type: Boolean, reflect: !0 })
3396
3427
  ], S.prototype, "disabled", 2);
3397
- G([
3428
+ Q([
3398
3429
  n({ type: String })
3399
3430
  ], S.prototype, "label", 2);
3400
- G([
3431
+ Q([
3401
3432
  n({ type: String })
3402
3433
  ], S.prototype, "onLabel", 2);
3403
- G([
3434
+ Q([
3404
3435
  n({ type: String })
3405
3436
  ], S.prototype, "offLabel", 2);
3406
- G([
3437
+ Q([
3407
3438
  n({ type: String, reflect: !0 })
3408
3439
  ], S.prototype, "size", 2);
3409
- S = G([
3440
+ S = Q([
3410
3441
  d("crt-toggle")
3411
3442
  ], S);
3412
- var Br = Object.defineProperty, Yr = Object.getOwnPropertyDescriptor, j = (r, t, a, s) => {
3413
- for (var e = s > 1 ? void 0 : s ? Yr(t, a) : t, i = r.length - 1, o; i >= 0; i--)
3414
- (o = r[i]) && (e = (s ? o(t, a, e) : o(e)) || e);
3415
- return s && e && Br(t, a, e), e;
3443
+ var qr = Object.defineProperty, Vr = Object.getOwnPropertyDescriptor, j = (r, t, a, i) => {
3444
+ for (var e = i > 1 ? void 0 : i ? Vr(t, a) : t, s = r.length - 1, o; s >= 0; s--)
3445
+ (o = r[s]) && (e = (i ? o(t, a, e) : o(e)) || e);
3446
+ return i && e && qr(t, a, e), e;
3416
3447
  };
3417
- let D = class extends p {
3448
+ let E = class extends p {
3418
3449
  constructor() {
3419
3450
  super(...arguments), this.src = "", this.alt = "", this.name = "", this.size = "md", this.shape = "square", this.status = "";
3420
3451
  }
@@ -3447,7 +3478,7 @@ let D = class extends p {
3447
3478
  `;
3448
3479
  }
3449
3480
  };
3450
- D.styles = l`
3481
+ E.styles = l`
3451
3482
  :host {
3452
3483
  display: inline-block;
3453
3484
  font-family: var(--crt-font-family);
@@ -3577,26 +3608,26 @@ D.styles = l`
3577
3608
  `;
3578
3609
  j([
3579
3610
  n({ type: String })
3580
- ], D.prototype, "src", 2);
3611
+ ], E.prototype, "src", 2);
3581
3612
  j([
3582
3613
  n({ type: String })
3583
- ], D.prototype, "alt", 2);
3614
+ ], E.prototype, "alt", 2);
3584
3615
  j([
3585
3616
  n({ type: String })
3586
- ], D.prototype, "name", 2);
3617
+ ], E.prototype, "name", 2);
3587
3618
  j([
3588
3619
  n({ type: String, reflect: !0 })
3589
- ], D.prototype, "size", 2);
3620
+ ], E.prototype, "size", 2);
3590
3621
  j([
3591
3622
  n({ type: String, reflect: !0 })
3592
- ], D.prototype, "shape", 2);
3623
+ ], E.prototype, "shape", 2);
3593
3624
  j([
3594
3625
  n({ type: String, reflect: !0 })
3595
- ], D.prototype, "status", 2);
3596
- D = j([
3626
+ ], E.prototype, "status", 2);
3627
+ E = j([
3597
3628
  d("crt-avatar")
3598
- ], D);
3599
- let kt = class extends p {
3629
+ ], E);
3630
+ let _t = class extends p {
3600
3631
  constructor() {
3601
3632
  super(...arguments), this.max = 5;
3602
3633
  }
@@ -3606,7 +3637,7 @@ let kt = class extends p {
3606
3637
  `;
3607
3638
  }
3608
3639
  };
3609
- kt.styles = l`
3640
+ _t.styles = l`
3610
3641
  :host {
3611
3642
  display: inline-flex;
3612
3643
  align-items: center;
@@ -3637,14 +3668,14 @@ kt.styles = l`
3637
3668
  `;
3638
3669
  j([
3639
3670
  n({ type: Number })
3640
- ], kt.prototype, "max", 2);
3641
- kt = j([
3671
+ ], _t.prototype, "max", 2);
3672
+ _t = j([
3642
3673
  d("crt-avatar-group")
3643
- ], kt);
3644
- var Vr = Object.defineProperty, Xr = Object.getOwnPropertyDescriptor, z = (r, t, a, s) => {
3645
- for (var e = s > 1 ? void 0 : s ? Xr(t, a) : t, i = r.length - 1, o; i >= 0; i--)
3646
- (o = r[i]) && (e = (s ? o(t, a, e) : o(e)) || e);
3647
- return s && e && Vr(t, a, e), e;
3674
+ ], _t);
3675
+ var Xr = Object.defineProperty, Kr = Object.getOwnPropertyDescriptor, z = (r, t, a, i) => {
3676
+ for (var e = i > 1 ? void 0 : i ? Kr(t, a) : t, s = r.length - 1, o; s >= 0; s--)
3677
+ (o = r[s]) && (e = (i ? o(t, a, e) : o(e)) || e);
3678
+ return i && e && Xr(t, a, e), e;
3648
3679
  };
3649
3680
  let N = class extends p {
3650
3681
  constructor() {
@@ -3792,7 +3823,7 @@ z([
3792
3823
  N = z([
3793
3824
  d("crt-skeleton")
3794
3825
  ], N);
3795
- let $t = class extends p {
3826
+ let zt = class extends p {
3796
3827
  constructor() {
3797
3828
  super(...arguments), this.lines = 3;
3798
3829
  }
@@ -3804,7 +3835,7 @@ let $t = class extends p {
3804
3835
  `;
3805
3836
  }
3806
3837
  };
3807
- $t.styles = l`
3838
+ zt.styles = l`
3808
3839
  :host {
3809
3840
  display: block;
3810
3841
  }
@@ -3838,11 +3869,11 @@ $t.styles = l`
3838
3869
  `;
3839
3870
  z([
3840
3871
  n({ type: Number })
3841
- ], $t.prototype, "lines", 2);
3842
- $t = z([
3872
+ ], zt.prototype, "lines", 2);
3873
+ zt = z([
3843
3874
  d("crt-skeleton-text")
3844
- ], $t);
3845
- let _t = class extends p {
3875
+ ], zt);
3876
+ let Ot = class extends p {
3846
3877
  constructor() {
3847
3878
  super(...arguments), this.hideImage = !1;
3848
3879
  }
@@ -3858,7 +3889,7 @@ let _t = class extends p {
3858
3889
  `;
3859
3890
  }
3860
3891
  };
3861
- _t.styles = l`
3892
+ Ot.styles = l`
3862
3893
  :host {
3863
3894
  display: block;
3864
3895
  }
@@ -3911,14 +3942,14 @@ _t.styles = l`
3911
3942
  `;
3912
3943
  z([
3913
3944
  n({ type: Boolean })
3914
- ], _t.prototype, "hideImage", 2);
3915
- _t = z([
3945
+ ], Ot.prototype, "hideImage", 2);
3946
+ Ot = z([
3916
3947
  d("crt-skeleton-card")
3917
- ], _t);
3918
- var qr = Object.defineProperty, Wr = Object.getOwnPropertyDescriptor, A = (r, t, a, s) => {
3919
- for (var e = s > 1 ? void 0 : s ? Wr(t, a) : t, i = r.length - 1, o; i >= 0; i--)
3920
- (o = r[i]) && (e = (s ? o(t, a, e) : o(e)) || e);
3921
- return s && e && qr(t, a, e), e;
3948
+ ], Ot);
3949
+ var Wr = Object.defineProperty, Hr = Object.getOwnPropertyDescriptor, A = (r, t, a, i) => {
3950
+ for (var e = i > 1 ? void 0 : i ? Hr(t, a) : t, s = r.length - 1, o; s >= 0; s--)
3951
+ (o = r[s]) && (e = (i ? o(t, a, e) : o(e)) || e);
3952
+ return i && e && Wr(t, a, e), e;
3922
3953
  };
3923
3954
  let y = class extends p {
3924
3955
  constructor() {
@@ -4147,12 +4178,12 @@ A([
4147
4178
  y = A([
4148
4179
  d("crt-alert")
4149
4180
  ], y);
4150
- var Hr = Object.defineProperty, Kr = Object.getOwnPropertyDescriptor, It = (r, t, a, s) => {
4151
- for (var e = s > 1 ? void 0 : s ? Kr(t, a) : t, i = r.length - 1, o; i >= 0; i--)
4152
- (o = r[i]) && (e = (s ? o(t, a, e) : o(e)) || e);
4153
- return s && e && Hr(t, a, e), e;
4181
+ var Gr = Object.defineProperty, Qr = Object.getOwnPropertyDescriptor, Ut = (r, t, a, i) => {
4182
+ for (var e = i > 1 ? void 0 : i ? Qr(t, a) : t, s = r.length - 1, o; s >= 0; s--)
4183
+ (o = r[s]) && (e = (i ? o(t, a, e) : o(e)) || e);
4184
+ return i && e && Gr(t, a, e), e;
4154
4185
  };
4155
- let nt = class extends p {
4186
+ let lt = class extends p {
4156
4187
  constructor() {
4157
4188
  super(...arguments), this.open = !1, this.message = "LOADING...";
4158
4189
  }
@@ -4176,7 +4207,7 @@ let nt = class extends p {
4176
4207
  ` : c``;
4177
4208
  }
4178
4209
  };
4179
- nt.styles = l`
4210
+ lt.styles = l`
4180
4211
  :host {
4181
4212
  display: block;
4182
4213
  }
@@ -4398,21 +4429,21 @@ nt.styles = l`
4398
4429
  50% { opacity: 0.5; }
4399
4430
  }
4400
4431
  `;
4401
- It([
4432
+ Ut([
4402
4433
  n({ type: Boolean, reflect: !0 })
4403
- ], nt.prototype, "open", 2);
4404
- It([
4434
+ ], lt.prototype, "open", 2);
4435
+ Ut([
4405
4436
  n({ type: String })
4406
- ], nt.prototype, "message", 2);
4407
- nt = It([
4437
+ ], lt.prototype, "message", 2);
4438
+ lt = Ut([
4408
4439
  d("crt-spinner")
4409
- ], nt);
4410
- var Gr = Object.getOwnPropertyDescriptor, Jr = (r, t, a, s) => {
4411
- for (var e = s > 1 ? void 0 : s ? Gr(t, a) : t, i = r.length - 1, o; i >= 0; i--)
4412
- (o = r[i]) && (e = o(e) || e);
4440
+ ], lt);
4441
+ var Jr = Object.getOwnPropertyDescriptor, Zr = (r, t, a, i) => {
4442
+ for (var e = i > 1 ? void 0 : i ? Jr(t, a) : t, s = r.length - 1, o; s >= 0; s--)
4443
+ (o = r[s]) && (e = o(e) || e);
4413
4444
  return e;
4414
4445
  };
4415
- let St = class extends p {
4446
+ let Dt = class extends p {
4416
4447
  render() {
4417
4448
  return c`
4418
4449
  <div class="card">
@@ -4429,7 +4460,7 @@ let St = class extends p {
4429
4460
  `;
4430
4461
  }
4431
4462
  };
4432
- St.styles = l`
4463
+ Dt.styles = l`
4433
4464
  .card {
4434
4465
  border: 3px double var(--crt-primary);
4435
4466
  padding: var(--crt-spacing-lg);
@@ -4461,15 +4492,15 @@ St.styles = l`
4461
4492
  margin-top: var(--crt-spacing-md);
4462
4493
  }
4463
4494
  `;
4464
- St = Jr([
4495
+ Dt = Zr([
4465
4496
  d("crt-card")
4466
- ], St);
4467
- var Zr = Object.defineProperty, Qr = Object.getOwnPropertyDescriptor, Lt = (r, t, a, s) => {
4468
- for (var e = s > 1 ? void 0 : s ? Qr(t, a) : t, i = r.length - 1, o; i >= 0; i--)
4469
- (o = r[i]) && (e = (s ? o(t, a, e) : o(e)) || e);
4470
- return s && e && Zr(t, a, e), e;
4497
+ ], Dt);
4498
+ var te = Object.defineProperty, re = Object.getOwnPropertyDescriptor, Nt = (r, t, a, i) => {
4499
+ for (var e = i > 1 ? void 0 : i ? re(t, a) : t, s = r.length - 1, o; s >= 0; s--)
4500
+ (o = r[s]) && (e = (i ? o(t, a, e) : o(e)) || e);
4501
+ return i && e && te(t, a, e), e;
4471
4502
  };
4472
- let ct = class extends p {
4503
+ let pt = class extends p {
4473
4504
  constructor() {
4474
4505
  super(...arguments), this.headers = [], this.rows = [];
4475
4506
  }
@@ -4488,7 +4519,7 @@ let ct = class extends p {
4488
4519
  `;
4489
4520
  }
4490
4521
  };
4491
- ct.styles = l`
4522
+ pt.styles = l`
4492
4523
  :host {
4493
4524
  display: block;
4494
4525
  }
@@ -4540,21 +4571,21 @@ ct.styles = l`
4540
4571
  border-bottom: none;
4541
4572
  }
4542
4573
  `;
4543
- Lt([
4574
+ Nt([
4544
4575
  n({ type: Array })
4545
- ], ct.prototype, "headers", 2);
4546
- Lt([
4576
+ ], pt.prototype, "headers", 2);
4577
+ Nt([
4547
4578
  n({ type: Array })
4548
- ], ct.prototype, "rows", 2);
4549
- ct = Lt([
4579
+ ], pt.prototype, "rows", 2);
4580
+ pt = Nt([
4550
4581
  d("crt-table")
4551
- ], ct);
4552
- var te = Object.defineProperty, re = Object.getOwnPropertyDescriptor, Ut = (r, t, a, s) => {
4553
- for (var e = s > 1 ? void 0 : s ? re(t, a) : t, i = r.length - 1, o; i >= 0; i--)
4554
- (o = r[i]) && (e = (s ? o(t, a, e) : o(e)) || e);
4555
- return s && e && te(t, a, e), e;
4582
+ ], pt);
4583
+ var ee = Object.defineProperty, ae = Object.getOwnPropertyDescriptor, Rt = (r, t, a, i) => {
4584
+ for (var e = i > 1 ? void 0 : i ? ae(t, a) : t, s = r.length - 1, o; s >= 0; s--)
4585
+ (o = r[s]) && (e = (i ? o(t, a, e) : o(e)) || e);
4586
+ return i && e && ee(t, a, e), e;
4556
4587
  };
4557
- let lt = class extends p {
4588
+ let dt = class extends p {
4558
4589
  constructor() {
4559
4590
  super(...arguments), this.columns = 3, this.gap = "var(--crt-spacing-lg)";
4560
4591
  }
@@ -4572,7 +4603,7 @@ let lt = class extends p {
4572
4603
  `;
4573
4604
  }
4574
4605
  };
4575
- lt.styles = l`
4606
+ dt.styles = l`
4576
4607
  :host {
4577
4608
  display: block;
4578
4609
  }
@@ -4601,19 +4632,19 @@ lt.styles = l`
4601
4632
  }
4602
4633
  }
4603
4634
  `;
4604
- Ut([
4635
+ Rt([
4605
4636
  n({ type: Number })
4606
- ], lt.prototype, "columns", 2);
4607
- Ut([
4637
+ ], dt.prototype, "columns", 2);
4638
+ Rt([
4608
4639
  n({ type: String })
4609
- ], lt.prototype, "gap", 2);
4610
- lt = Ut([
4640
+ ], dt.prototype, "gap", 2);
4641
+ dt = Rt([
4611
4642
  d("crt-grid")
4612
- ], lt);
4613
- var ee = Object.defineProperty, ae = Object.getOwnPropertyDescriptor, rt = (r, t, a, s) => {
4614
- for (var e = s > 1 ? void 0 : s ? ae(t, a) : t, i = r.length - 1, o; i >= 0; i--)
4615
- (o = r[i]) && (e = (s ? o(t, a, e) : o(e)) || e);
4616
- return s && e && ee(t, a, e), e;
4643
+ ], dt);
4644
+ var ie = Object.defineProperty, se = Object.getOwnPropertyDescriptor, et = (r, t, a, i) => {
4645
+ for (var e = i > 1 ? void 0 : i ? se(t, a) : t, s = r.length - 1, o; s >= 0; s--)
4646
+ (o = r[s]) && (e = (i ? o(t, a, e) : o(e)) || e);
4647
+ return i && e && ie(t, a, e), e;
4617
4648
  };
4618
4649
  let R = class extends p {
4619
4650
  constructor() {
@@ -4805,30 +4836,30 @@ R.styles = l`
4805
4836
  color: var(--crt-bg-dark);
4806
4837
  }
4807
4838
  `;
4808
- rt([
4839
+ et([
4809
4840
  n()
4810
4841
  ], R.prototype, "title", 2);
4811
- rt([
4842
+ et([
4812
4843
  n()
4813
4844
  ], R.prototype, "description", 2);
4814
- rt([
4845
+ et([
4815
4846
  n()
4816
4847
  ], R.prototype, "code", 2);
4817
- rt([
4848
+ et([
4818
4849
  v()
4819
4850
  ], R.prototype, "activeTab", 2);
4820
- rt([
4851
+ et([
4821
4852
  v()
4822
4853
  ], R.prototype, "copied", 2);
4823
- R = rt([
4854
+ R = et([
4824
4855
  d("crt-code-example")
4825
4856
  ], R);
4826
- var se = Object.defineProperty, ie = Object.getOwnPropertyDescriptor, Ct = (r, t, a, s) => {
4827
- for (var e = s > 1 ? void 0 : s ? ie(t, a) : t, i = r.length - 1, o; i >= 0; i--)
4828
- (o = r[i]) && (e = (s ? o(t, a, e) : o(e)) || e);
4829
- return s && e && se(t, a, e), e;
4857
+ var oe = Object.defineProperty, ne = Object.getOwnPropertyDescriptor, Et = (r, t, a, i) => {
4858
+ for (var e = i > 1 ? void 0 : i ? ne(t, a) : t, s = r.length - 1, o; s >= 0; s--)
4859
+ (o = r[s]) && (e = (i ? o(t, a, e) : o(e)) || e);
4860
+ return i && e && oe(t, a, e), e;
4830
4861
  };
4831
- let Q = class extends p {
4862
+ let tt = class extends p {
4832
4863
  constructor() {
4833
4864
  super(...arguments), this.open = !1, this.title = "Modal", this.size = "medium", this._handleKeydown = (r) => {
4834
4865
  r.key === "Escape" && this.open && this.close();
@@ -4865,7 +4896,7 @@ let Q = class extends p {
4865
4896
  `;
4866
4897
  }
4867
4898
  };
4868
- Q.styles = l`
4899
+ tt.styles = l`
4869
4900
  :host {
4870
4901
  display: none;
4871
4902
  }
@@ -4992,24 +5023,24 @@ Q.styles = l`
4992
5023
  height: calc(95vh - 120px);
4993
5024
  }
4994
5025
  `;
4995
- Ct([
5026
+ Et([
4996
5027
  n({ type: Boolean, reflect: !0 })
4997
- ], Q.prototype, "open", 2);
4998
- Ct([
5028
+ ], tt.prototype, "open", 2);
5029
+ Et([
4999
5030
  n({ type: String })
5000
- ], Q.prototype, "title", 2);
5001
- Ct([
5031
+ ], tt.prototype, "title", 2);
5032
+ Et([
5002
5033
  n({ type: String })
5003
- ], Q.prototype, "size", 2);
5004
- Q = Ct([
5034
+ ], tt.prototype, "size", 2);
5035
+ tt = Et([
5005
5036
  d("crt-modal")
5006
- ], Q);
5007
- var oe = Object.defineProperty, ne = Object.getOwnPropertyDescriptor, J = (r, t, a, s) => {
5008
- for (var e = s > 1 ? void 0 : s ? ne(t, a) : t, i = r.length - 1, o; i >= 0; i--)
5009
- (o = r[i]) && (e = (s ? o(t, a, e) : o(e)) || e);
5010
- return s && e && oe(t, a, e), e;
5037
+ ], tt);
5038
+ var ce = Object.defineProperty, le = Object.getOwnPropertyDescriptor, J = (r, t, a, i) => {
5039
+ for (var e = i > 1 ? void 0 : i ? le(t, a) : t, s = r.length - 1, o; s >= 0; s--)
5040
+ (o = r[s]) && (e = (i ? o(t, a, e) : o(e)) || e);
5041
+ return i && e && ce(t, a, e), e;
5011
5042
  };
5012
- let E = class extends p {
5043
+ let D = class extends p {
5013
5044
  constructor() {
5014
5045
  super(...arguments), this.position = "top-right", this.message = "", this.title = "", this.variant = "default", this.duration = 4e3, this._toasts = [], this._counter = 0, this._initialized = !1;
5015
5046
  }
@@ -5074,7 +5105,7 @@ let E = class extends p {
5074
5105
  `;
5075
5106
  }
5076
5107
  };
5077
- E.styles = l`
5108
+ D.styles = l`
5078
5109
  :host {
5079
5110
  position: fixed;
5080
5111
  z-index: 10001;
@@ -5243,31 +5274,31 @@ E.styles = l`
5243
5274
  `;
5244
5275
  J([
5245
5276
  n({ type: String, reflect: !0 })
5246
- ], E.prototype, "position", 2);
5277
+ ], D.prototype, "position", 2);
5247
5278
  J([
5248
5279
  n({ type: String })
5249
- ], E.prototype, "message", 2);
5280
+ ], D.prototype, "message", 2);
5250
5281
  J([
5251
5282
  n({ type: String })
5252
- ], E.prototype, "title", 2);
5283
+ ], D.prototype, "title", 2);
5253
5284
  J([
5254
5285
  n({ type: String })
5255
- ], E.prototype, "variant", 2);
5286
+ ], D.prototype, "variant", 2);
5256
5287
  J([
5257
5288
  n({ type: Number })
5258
- ], E.prototype, "duration", 2);
5289
+ ], D.prototype, "duration", 2);
5259
5290
  J([
5260
5291
  v()
5261
- ], E.prototype, "_toasts", 2);
5262
- E = J([
5292
+ ], D.prototype, "_toasts", 2);
5293
+ D = J([
5263
5294
  d("crt-toast")
5264
- ], E);
5265
- var ce = Object.defineProperty, le = Object.getOwnPropertyDescriptor, gt = (r, t, a, s) => {
5266
- for (var e = s > 1 ? void 0 : s ? le(t, a) : t, i = r.length - 1, o; i >= 0; i--)
5267
- (o = r[i]) && (e = (s ? o(t, a, e) : o(e)) || e);
5268
- return s && e && ce(t, a, e), e;
5295
+ ], D);
5296
+ var pe = Object.defineProperty, de = Object.getOwnPropertyDescriptor, mt = (r, t, a, i) => {
5297
+ for (var e = i > 1 ? void 0 : i ? de(t, a) : t, s = r.length - 1, o; s >= 0; s--)
5298
+ (o = r[s]) && (e = (i ? o(t, a, e) : o(e)) || e);
5299
+ return i && e && pe(t, a, e), e;
5269
5300
  };
5270
- let pt = class extends p {
5301
+ let ht = class extends p {
5271
5302
  constructor() {
5272
5303
  super(...arguments), this.header = "", this.open = !1;
5273
5304
  }
@@ -5296,7 +5327,7 @@ let pt = class extends p {
5296
5327
  `;
5297
5328
  }
5298
5329
  };
5299
- pt.styles = l`
5330
+ ht.styles = l`
5300
5331
  :host {
5301
5332
  display: block;
5302
5333
  font-family: var(--crt-font-family);
@@ -5367,16 +5398,16 @@ pt.styles = l`
5367
5398
  color: var(--crt-text-secondary);
5368
5399
  }
5369
5400
  `;
5370
- gt([
5401
+ mt([
5371
5402
  n({ type: String })
5372
- ], pt.prototype, "header", 2);
5373
- gt([
5403
+ ], ht.prototype, "header", 2);
5404
+ mt([
5374
5405
  n({ type: Boolean, reflect: !0 })
5375
- ], pt.prototype, "open", 2);
5376
- pt = gt([
5406
+ ], ht.prototype, "open", 2);
5407
+ ht = mt([
5377
5408
  d("crt-accordion-item")
5378
- ], pt);
5379
- let zt = class extends p {
5409
+ ], ht);
5410
+ let Pt = class extends p {
5380
5411
  constructor() {
5381
5412
  super(...arguments), this.multiple = !1, this._handleToggle = (r) => {
5382
5413
  !this.multiple && r.detail.open && this.querySelectorAll("crt-accordion-item").forEach((t) => {
@@ -5394,33 +5425,33 @@ let zt = class extends p {
5394
5425
  return c`<slot></slot>`;
5395
5426
  }
5396
5427
  };
5397
- zt.styles = l`
5428
+ Pt.styles = l`
5398
5429
  :host {
5399
5430
  display: block;
5400
5431
  }
5401
5432
  `;
5402
- gt([
5433
+ mt([
5403
5434
  n({ type: Boolean })
5404
- ], zt.prototype, "multiple", 2);
5405
- zt = gt([
5435
+ ], Pt.prototype, "multiple", 2);
5436
+ Pt = mt([
5406
5437
  d("crt-accordion")
5407
- ], zt);
5408
- var pe = Object.defineProperty, de = Object.getOwnPropertyDescriptor, ut = (r, t, a, s) => {
5409
- for (var e = s > 1 ? void 0 : s ? de(t, a) : t, i = r.length - 1, o; i >= 0; i--)
5410
- (o = r[i]) && (e = (s ? o(t, a, e) : o(e)) || e);
5411
- return s && e && pe(t, a, e), e;
5438
+ ], Pt);
5439
+ var he = Object.defineProperty, ve = Object.getOwnPropertyDescriptor, bt = (r, t, a, i) => {
5440
+ for (var e = i > 1 ? void 0 : i ? ve(t, a) : t, s = r.length - 1, o; s >= 0; s--)
5441
+ (o = r[s]) && (e = (i ? o(t, a, e) : o(e)) || e);
5442
+ return i && e && he(t, a, e), e;
5412
5443
  };
5413
- let q = class extends p {
5444
+ let K = class extends p {
5414
5445
  constructor() {
5415
5446
  super(...arguments), this.bars = 20, this.mode = 1, this.barHeights = [], this.isActive = !1, this.visualize = () => {
5416
5447
  if (!this.isActive || !this.analyser || !this.dataArray) return;
5417
5448
  this.analyser.getByteFrequencyData(this.dataArray);
5418
5449
  const r = Math.floor(this.dataArray.length / this.bars), t = [];
5419
5450
  for (let a = 0; a < this.bars; a++) {
5420
- let s;
5421
- this.mode === 1 ? s = a * r : this.mode === 2 ? a < this.bars / 2 ? s = Math.floor((this.bars / 2 - a - 1) * r) : s = Math.floor((a - this.bars / 2) * r) : a < this.bars / 2 ? s = Math.floor(a * r) : s = Math.floor((this.bars - a - 1) * r);
5422
- const i = (this.dataArray[s] || 0) / 255 * 100;
5423
- t.push(Math.max(20, i));
5451
+ let i;
5452
+ this.mode === 1 ? i = a * r : this.mode === 2 ? a < this.bars / 2 ? i = Math.floor((this.bars / 2 - a - 1) * r) : i = Math.floor((a - this.bars / 2) * r) : a < this.bars / 2 ? i = Math.floor(a * r) : i = Math.floor((this.bars - a - 1) * r);
5453
+ const s = (this.dataArray[i] || 0) / 255 * 100;
5454
+ t.push(Math.max(20, s));
5424
5455
  }
5425
5456
  this.barHeights = t, this.animationId = requestAnimationFrame(this.visualize);
5426
5457
  };
@@ -5463,7 +5494,7 @@ let q = class extends p {
5463
5494
  `;
5464
5495
  }
5465
5496
  };
5466
- q.styles = l`
5497
+ K.styles = l`
5467
5498
  :host {
5468
5499
  display: block;
5469
5500
  }
@@ -5472,8 +5503,8 @@ q.styles = l`
5472
5503
  display: flex;
5473
5504
  justify-content: space-between;
5474
5505
  align-items: flex-end;
5475
- /* give a concrete height so percent heights on bars resolve reliably */
5476
- height: 160px;
5506
+ /* allow configurable height and responsive fallback */
5507
+ height: var(--crt-visualizer-height, 160px);
5477
5508
  gap: 6px;
5478
5509
  border: 2px solid var(--crt-primary);
5479
5510
  padding: var(--crt-spacing-md);
@@ -5484,6 +5515,11 @@ q.styles = l`
5484
5515
  overflow: hidden;
5485
5516
  }
5486
5517
 
5518
+ @media (max-width: 520px) {
5519
+ .visualizer { height: var(--crt-visualizer-height-sm, 110px); padding: calc(var(--crt-spacing-sm) + 2px); }
5520
+ .bar { min-width: 4px; }
5521
+ }
5522
+
5487
5523
  .label {
5488
5524
  position: absolute;
5489
5525
  top: 10px;
@@ -5519,9 +5555,9 @@ q.styles = l`
5519
5555
  }
5520
5556
 
5521
5557
  .bar {
5522
- flex: 1 1 auto;
5558
+ flex: 1 1 0;
5523
5559
  align-self: flex-end;
5524
- min-width: 6px;
5560
+ min-width: 4px;
5525
5561
  background: linear-gradient(180deg, color-mix(in srgb, var(--crt-primary) 80%, white 20%), var(--crt-primary));
5526
5562
  box-shadow: 0 0 8px color-mix(in srgb, var(--crt-primary) 40%, transparent);
5527
5563
  transition: height 0.05s ease, background 0.2s ease;
@@ -5533,27 +5569,27 @@ q.styles = l`
5533
5569
  animation: none;
5534
5570
  }
5535
5571
  `;
5536
- ut([
5572
+ bt([
5537
5573
  n({ type: Number })
5538
- ], q.prototype, "bars", 2);
5539
- ut([
5574
+ ], K.prototype, "bars", 2);
5575
+ bt([
5540
5576
  n({ type: Number })
5541
- ], q.prototype, "mode", 2);
5542
- ut([
5577
+ ], K.prototype, "mode", 2);
5578
+ bt([
5543
5579
  v()
5544
- ], q.prototype, "barHeights", 2);
5545
- ut([
5580
+ ], K.prototype, "barHeights", 2);
5581
+ bt([
5546
5582
  v()
5547
- ], q.prototype, "isActive", 2);
5548
- q = ut([
5583
+ ], K.prototype, "isActive", 2);
5584
+ K = bt([
5549
5585
  d("crt-visualizer")
5550
- ], q);
5551
- var he = Object.defineProperty, ve = Object.getOwnPropertyDescriptor, Nt = (r, t, a, s) => {
5552
- for (var e = s > 1 ? void 0 : s ? ve(t, a) : t, i = r.length - 1, o; i >= 0; i--)
5553
- (o = r[i]) && (e = (s ? o(t, a, e) : o(e)) || e);
5554
- return s && e && he(t, a, e), e;
5586
+ ], K);
5587
+ var ge = Object.defineProperty, ue = Object.getOwnPropertyDescriptor, Ft = (r, t, a, i) => {
5588
+ for (var e = i > 1 ? void 0 : i ? ue(t, a) : t, s = r.length - 1, o; s >= 0; s--)
5589
+ (o = r[s]) && (e = (i ? o(t, a, e) : o(e)) || e);
5590
+ return i && e && ge(t, a, e), e;
5555
5591
  };
5556
- let dt = class extends p {
5592
+ let vt = class extends p {
5557
5593
  constructor() {
5558
5594
  super(...arguments), this.tracks = [], this.currentIndex = 0;
5559
5595
  }
@@ -5622,7 +5658,7 @@ let dt = class extends p {
5622
5658
  `;
5623
5659
  }
5624
5660
  };
5625
- dt.styles = l`
5661
+ vt.styles = l`
5626
5662
  :host {
5627
5663
  display: block;
5628
5664
  }
@@ -5635,6 +5671,8 @@ dt.styles = l`
5635
5671
  font-size: var(--crt-font-size-sm);
5636
5672
  border: 2px solid var(--crt-primary);
5637
5673
  box-shadow: var(--crt-glow-sm);
5674
+ box-sizing: border-box;
5675
+ table-layout: fixed;
5638
5676
  }
5639
5677
 
5640
5678
  thead {
@@ -5653,10 +5691,15 @@ dt.styles = l`
5653
5691
  }
5654
5692
 
5655
5693
  th.actions {
5656
- width: 50px;
5694
+ width: 48px;
5657
5695
  text-align: center;
5658
5696
  }
5659
5697
 
5698
+ /* Fix column widths in fixed table layout so title column can shrink
5699
+ without forcing the whole table to overflow */
5700
+ thead th:first-child { width: 48px; }
5701
+ thead th:nth-child(2) { width: auto; }
5702
+
5660
5703
  tbody tr {
5661
5704
  border-bottom: 1px solid rgba(51, 255, 51, 0.2);
5662
5705
  transition: var(--crt-transition);
@@ -5693,16 +5736,17 @@ dt.styles = l`
5693
5736
  }
5694
5737
 
5695
5738
  td.track-number {
5696
- width: 60px;
5739
+ min-width: 48px;
5740
+ width: 48px;
5697
5741
  text-align: center;
5698
5742
  opacity: 0.7;
5699
5743
  }
5700
5744
 
5701
5745
  td.track-title {
5702
- max-width: 200px;
5703
5746
  white-space: nowrap;
5704
5747
  overflow: hidden;
5705
5748
  text-overflow: ellipsis;
5749
+ min-width: 0;
5706
5750
  }
5707
5751
 
5708
5752
  td.track-artist {
@@ -5745,10 +5789,18 @@ dt.styles = l`
5745
5789
  .table-wrapper {
5746
5790
  max-height: 400px;
5747
5791
  overflow-y: auto;
5792
+ min-width: 0;
5748
5793
  scrollbar-width: thin;
5749
5794
  scrollbar-color: var(--crt-primary) var(--crt-bg-dark);
5750
5795
  }
5751
5796
 
5797
+ /* Responsive: hide artist on narrow screens and allow horizontal scroll fallback */
5798
+ @media (max-width: 520px) {
5799
+ td.track-artist { display: none; }
5800
+ td.track-title { max-width: 140px; min-width: 0; }
5801
+ .table-wrapper { overflow-x: auto; min-width: 0; }
5802
+ }
5803
+
5752
5804
  .table-wrapper::-webkit-scrollbar {
5753
5805
  width: 10px;
5754
5806
  }
@@ -5763,19 +5815,19 @@ dt.styles = l`
5763
5815
  box-shadow: var(--crt-glow-sm);
5764
5816
  }
5765
5817
  `;
5766
- Nt([
5818
+ Ft([
5767
5819
  n({ type: Array })
5768
- ], dt.prototype, "tracks", 2);
5769
- Nt([
5820
+ ], vt.prototype, "tracks", 2);
5821
+ Ft([
5770
5822
  n({ type: Number })
5771
- ], dt.prototype, "currentIndex", 2);
5772
- dt = Nt([
5823
+ ], vt.prototype, "currentIndex", 2);
5824
+ vt = Ft([
5773
5825
  d("crt-playlist")
5774
- ], dt);
5775
- var ge = Object.defineProperty, ue = Object.getOwnPropertyDescriptor, M = (r, t, a, s) => {
5776
- for (var e = s > 1 ? void 0 : s ? ue(t, a) : t, i = r.length - 1, o; i >= 0; i--)
5777
- (o = r[i]) && (e = (s ? o(t, a, e) : o(e)) || e);
5778
- return s && e && ge(t, a, e), e;
5826
+ ], vt);
5827
+ var me = Object.defineProperty, be = Object.getOwnPropertyDescriptor, M = (r, t, a, i) => {
5828
+ for (var e = i > 1 ? void 0 : i ? be(t, a) : t, s = r.length - 1, o; s >= 0; s--)
5829
+ (o = r[s]) && (e = (i ? o(t, a, e) : o(e)) || e);
5830
+ return i && e && me(t, a, e), e;
5779
5831
  };
5780
5832
  let x = class extends p {
5781
5833
  constructor() {
@@ -5792,8 +5844,8 @@ let x = class extends p {
5792
5844
  }, this.handleEnded = () => {
5793
5845
  this.nextTrack();
5794
5846
  }, this.handleProgressClick = (r) => {
5795
- const a = r.currentTarget.getBoundingClientRect(), s = (r.clientX - a.left) / a.width;
5796
- this.audio && (this.audio.currentTime = this.duration * s);
5847
+ const a = r.currentTarget.getBoundingClientRect(), i = (r.clientX - a.left) / a.width;
5848
+ this.audio && (this.audio.currentTime = this.duration * i);
5797
5849
  }, this.handleVolumeChange = (r) => {
5798
5850
  this.volume = r.detail.value, this.audio && (this.audio.volume = this.volume / 100), localStorage.setItem("crtPlayerVolume", this.volume.toString());
5799
5851
  };
@@ -5921,12 +5973,22 @@ x.styles = l`
5921
5973
  :host {
5922
5974
  display: block;
5923
5975
  font-family: var(--crt-font-family);
5976
+ width: 100%;
5977
+ box-sizing: border-box;
5924
5978
  }
5925
5979
 
5926
5980
  .player {
5927
5981
  border: 3px double var(--crt-primary);
5928
5982
  background: var(--crt-bg-dark);
5929
5983
  box-shadow: var(--crt-glow-inset);
5984
+ width: 100%;
5985
+ box-sizing: border-box;
5986
+ overflow: hidden;
5987
+ }
5988
+
5989
+ /* Ensure nested controls can shrink and respect host width */
5990
+ .player, .player * {
5991
+ box-sizing: border-box;
5930
5992
  }
5931
5993
 
5932
5994
  /* Header */
@@ -5972,6 +6034,8 @@ x.styles = l`
5972
6034
 
5973
6035
  .track-details {
5974
6036
  overflow: hidden;
6037
+ flex: 1 1 auto;
6038
+ min-width: 0;
5975
6039
  }
5976
6040
 
5977
6041
  .track-title {
@@ -5995,6 +6059,9 @@ x.styles = l`
5995
6059
  margin-left: var(--crt-spacing-md);
5996
6060
  }
5997
6061
 
6062
+ .visualizer-section { width: 100%; }
6063
+ .now-playing { width: 100%; }
6064
+
5998
6065
  /* Progress */
5999
6066
  .progress-section {
6000
6067
  margin-bottom: var(--crt-spacing-md);
@@ -6019,18 +6086,27 @@ x.styles = l`
6019
6086
  align-items: center;
6020
6087
  gap: var(--crt-spacing-md);
6021
6088
  flex-wrap: wrap;
6089
+ min-width: 0;
6022
6090
  }
6023
6091
 
6024
6092
  .control-buttons {
6025
6093
  display: flex;
6026
6094
  gap: var(--crt-spacing-sm);
6027
6095
  align-items: center;
6096
+ min-width: 0;
6028
6097
  }
6029
6098
 
6030
6099
  .volume-section {
6031
- flex: 1;
6100
+ flex: 1 1 auto;
6032
6101
  max-width: 200px;
6033
- min-width: 150px;
6102
+ min-width: 0;
6103
+ }
6104
+
6105
+ /* Responsive: stack controls on narrow viewports */
6106
+ @media (max-width: 520px) {
6107
+ .controls { flex-direction: column; align-items: stretch; }
6108
+ .control-buttons { justify-content: center; margin-bottom: var(--crt-spacing-sm); }
6109
+ .volume-section { max-width: 100%; min-width: 0; }
6034
6110
  }
6035
6111
 
6036
6112
  /* Empty State */
@@ -6065,33 +6141,179 @@ M([
6065
6141
  v()
6066
6142
  ], x.prototype, "volume", 2);
6067
6143
  M([
6068
- Tt("audio")
6144
+ At("audio")
6069
6145
  ], x.prototype, "audio", 2);
6070
6146
  M([
6071
- Tt("crt-visualizer")
6147
+ At("crt-visualizer")
6072
6148
  ], x.prototype, "visualizer", 2);
6073
6149
  x = M([
6074
6150
  d("crt-music-player")
6075
6151
  ], x);
6076
- var me = Object.defineProperty, be = Object.getOwnPropertyDescriptor, mt = (r, t, a, s) => {
6077
- for (var e = s > 1 ? void 0 : s ? be(t, a) : t, i = r.length - 1, o; i >= 0; i--)
6078
- (o = r[i]) && (e = (s ? o(t, a, e) : o(e)) || e);
6079
- return s && e && me(t, a, e), e;
6152
+ var fe = Object.defineProperty, ye = Object.getOwnPropertyDescriptor, at = (r, t, a, i) => {
6153
+ for (var e = i > 1 ? void 0 : i ? ye(t, a) : t, s = r.length - 1, o; s >= 0; s--)
6154
+ (o = r[s]) && (e = (i ? o(t, a, e) : o(e)) || e);
6155
+ return i && e && fe(t, a, e), e;
6156
+ };
6157
+ let F = class extends p {
6158
+ constructor() {
6159
+ super(), this.rows = 10, this.prompt = "$", this.disabled = !1, this.outputs = [], this.input = "", this.handleFocus = () => {
6160
+ this.disabled || this.focus();
6161
+ }, this.handleKeydown = (r) => {
6162
+ if (!this.disabled) {
6163
+ if (r.key === "Backspace") {
6164
+ r.preventDefault(), this.input = this.input.slice(0, -1), this.requestUpdate();
6165
+ return;
6166
+ }
6167
+ if (r.key === "Enter") {
6168
+ r.preventDefault();
6169
+ const t = this.input.trim();
6170
+ this.println(`${this.prompt} ${t}`), this.dispatchEvent(new CustomEvent("command", { detail: t })), this.input = "", this.requestUpdate();
6171
+ return;
6172
+ }
6173
+ r.key.length === 1 && !r.ctrlKey && !r.metaKey && (this.input += r.key, this.requestUpdate());
6174
+ }
6175
+ }, this.typing = !1, this.typeQueue = [], this.outputs = ["$ SYSTEM READY _"];
6176
+ }
6177
+ connectedCallback() {
6178
+ super.connectedCallback(), this.addEventListener("click", this.handleFocus), this.addEventListener("keydown", this.handleKeydown), this.setAttribute("tabindex", this.disabled ? "-1" : "0");
6179
+ }
6180
+ disconnectedCallback() {
6181
+ this.removeEventListener("click", this.handleFocus), this.removeEventListener("keydown", this.handleKeydown), super.disconnectedCallback();
6182
+ }
6183
+ // Public API
6184
+ write(r) {
6185
+ this.outputs.length === 0 && (this.outputs = []);
6186
+ const t = this.outputs[this.outputs.length - 1] || "";
6187
+ this.outputs[this.outputs.length - 1] = t + r, this.requestUpdate(), this.scrollToBottom();
6188
+ }
6189
+ println(r) {
6190
+ this.outputs = [...this.outputs, r], this.requestUpdate(), this.scrollToBottom();
6191
+ }
6192
+ clear() {
6193
+ this.outputs = [], this.requestUpdate();
6194
+ }
6195
+ focus() {
6196
+ super.focus();
6197
+ }
6198
+ scrollToBottom() {
6199
+ requestAnimationFrame(() => {
6200
+ const r = this.shadowRoot?.querySelector(".term");
6201
+ r && (r.scrollTop = r.scrollHeight);
6202
+ });
6203
+ }
6204
+ type(r, t = 30) {
6205
+ this.typeQueue.push({ text: r, speed: t }), this.typing || this.processTypeQueue();
6206
+ }
6207
+ async processTypeQueue() {
6208
+ if (!this.typing) {
6209
+ for (this.typing = !0; this.typeQueue.length > 0; ) {
6210
+ const { text: r, speed: t } = this.typeQueue.shift();
6211
+ await new Promise((a) => {
6212
+ this.outputs = [...this.outputs, ""];
6213
+ let i = 0;
6214
+ const e = () => {
6215
+ if (i >= r.length) {
6216
+ a();
6217
+ return;
6218
+ }
6219
+ const s = this.outputs.length - 1;
6220
+ this.outputs[s] = (this.outputs[s] || "") + r[i++], this.requestUpdate(), this.scrollToBottom(), setTimeout(e, t);
6221
+ };
6222
+ e();
6223
+ });
6224
+ }
6225
+ this.typing = !1;
6226
+ }
6227
+ }
6228
+ render() {
6229
+ const r = this.outputs.slice(-this.rows);
6230
+ return c`
6231
+ <div class="term" role="textbox" aria-label="Terminal" tabindex="0" aria-disabled="${this.disabled}">
6232
+ ${r.map((t) => c`<div class="line">${t}</div>`)}
6233
+ <div class="line input-line">
6234
+ <span class="prompt">${this.prompt}</span>
6235
+ <div class="fake-input"><span class="input-text">${this.input}</span></div>
6236
+ <span class="caret">_</span>
6237
+ </div>
6238
+ </div>
6239
+ `;
6240
+ }
6241
+ };
6242
+ F.styles = l`
6243
+ :host { display: block; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, 'Roboto Mono', monospace; }
6244
+ .term {
6245
+ background: #0b0f0b;
6246
+ color: #8aff8a;
6247
+ padding: 12px;
6248
+ border: 2px solid var(--crt-primary);
6249
+ min-height: calc(var(--crt-font-size-md, 16px) * 1.2 * 6);
6250
+ max-height: min(380px, 50vh);
6251
+ overflow: auto;
6252
+ box-sizing: border-box;
6253
+ border-radius: 6px;
6254
+ }
6255
+ @media (max-width: 480px) {
6256
+ .term { min-height: calc(var(--crt-font-size-md, 16px) * 1.2 * 4); max-height: 40vh; padding: 8px; }
6257
+ }
6258
+ .term[aria-disabled="true"] {
6259
+ opacity: 0.65;
6260
+ filter: grayscale(20%);
6261
+ pointer-events: none;
6262
+ }
6263
+ .line { white-space: pre-wrap; word-break: break-word; margin: 2px 0; }
6264
+ .input-line { display:flex; gap:4px; align-items:center; justify-content:flex-start; }
6265
+ .prompt { opacity: 0.9; color: var(--crt-primary); }
6266
+ .term[aria-disabled="true"] .prompt { opacity: 0.6; }
6267
+ .caret {
6268
+ display:inline-block;
6269
+ width:10px;
6270
+ margin-left:2px;
6271
+ animation: blink 1s steps(2,start) infinite;
6272
+ color: var(--crt-primary);
6273
+ }
6274
+ .term[aria-disabled="true"] .caret { visibility: hidden; }
6275
+ @keyframes blink { to { visibility: hidden; } }
6276
+ .fake-input { outline: none; flex: 0 1 auto; min-width: 4px; display:inline-flex; align-items:center; gap:0; }
6277
+ .fake-input .input-text { display:inline-block; white-space:pre; }
6278
+ .muted { opacity: 0.7; font-size: 0.9em; }
6279
+ `;
6280
+ at([
6281
+ n({ type: Number })
6282
+ ], F.prototype, "rows", 2);
6283
+ at([
6284
+ n({ type: String })
6285
+ ], F.prototype, "prompt", 2);
6286
+ at([
6287
+ n({ type: Boolean, reflect: !0 })
6288
+ ], F.prototype, "disabled", 2);
6289
+ at([
6290
+ v()
6291
+ ], F.prototype, "outputs", 2);
6292
+ at([
6293
+ v()
6294
+ ], F.prototype, "input", 2);
6295
+ F = at([
6296
+ d("crt-terminal")
6297
+ ], F);
6298
+ var xe = Object.defineProperty, we = Object.getOwnPropertyDescriptor, ft = (r, t, a, i) => {
6299
+ for (var e = i > 1 ? void 0 : i ? we(t, a) : t, s = r.length - 1, o; s >= 0; s--)
6300
+ (o = r[s]) && (e = (i ? o(t, a, e) : o(e)) || e);
6301
+ return i && e && xe(t, a, e), e;
6080
6302
  };
6081
6303
  let W = class extends p {
6082
6304
  constructor() {
6083
6305
  super(...arguments), this.tracks = [], this.currentIndex = 0, this.showUploadModal = !1, this.handleFilesChanged = (r) => {
6084
- const a = r.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) => {
6085
- const e = s.name.replace(/\.[^/.]+$/, "");
6086
- let i = "UNKNOWN ARTIST", o = e.toUpperCase();
6306
+ const a = r.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) => {
6307
+ const e = i.name.replace(/\.[^/.]+$/, "");
6308
+ let s = "UNKNOWN ARTIST", o = e.toUpperCase();
6087
6309
  if (e.includes(" - ")) {
6088
6310
  const h = e.split(" - ");
6089
- i = h[0].trim().toUpperCase(), o = h.slice(1).join(" - ").trim().toUpperCase();
6311
+ s = h[0].trim().toUpperCase(), o = h.slice(1).join(" - ").trim().toUpperCase();
6090
6312
  }
6091
6313
  return {
6092
6314
  title: o,
6093
- artist: i,
6094
- url: URL.createObjectURL(s)
6315
+ artist: s,
6316
+ url: URL.createObjectURL(i)
6095
6317
  };
6096
6318
  });
6097
6319
  this.tracks = [...this.tracks, ...a];
@@ -6099,7 +6321,7 @@ let W = class extends p {
6099
6321
  this.currentIndex = r.detail.index;
6100
6322
  }, this.handleTrackRemove = (r) => {
6101
6323
  const t = r.detail.index, a = this.tracks[t];
6102
- URL.revokeObjectURL(a.url), this.tracks = this.tracks.filter((s, e) => e !== t), this.tracks.length === 0 ? this.currentIndex = 0 : t <= this.currentIndex && (this.currentIndex = Math.max(0, this.currentIndex - 1));
6324
+ URL.revokeObjectURL(a.url), this.tracks = this.tracks.filter((i, e) => e !== t), this.tracks.length === 0 ? this.currentIndex = 0 : t <= this.currentIndex && (this.currentIndex = Math.max(0, this.currentIndex - 1));
6103
6325
  }, this.handleTrackChange = (r) => {
6104
6326
  this.currentIndex = r.detail.index;
6105
6327
  }, this.openUploadModal = () => {
@@ -6239,60 +6461,61 @@ W.styles = l`
6239
6461
  padding-top: var(--crt-spacing-md);
6240
6462
  }
6241
6463
  `;
6242
- mt([
6464
+ ft([
6243
6465
  v()
6244
6466
  ], W.prototype, "tracks", 2);
6245
- mt([
6467
+ ft([
6246
6468
  v()
6247
6469
  ], W.prototype, "currentIndex", 2);
6248
- mt([
6470
+ ft([
6249
6471
  v()
6250
6472
  ], W.prototype, "showUploadModal", 2);
6251
- mt([
6252
- Tt("crt-file-upload")
6473
+ ft([
6474
+ At("crt-file-upload")
6253
6475
  ], W.prototype, "fileUpload", 2);
6254
- W = mt([
6476
+ W = ft([
6255
6477
  d("crt-music-station")
6256
6478
  ], W);
6257
6479
  export {
6258
- zt as Accordion,
6259
- pt as AccordionItem,
6480
+ Pt as Accordion,
6481
+ ht as AccordionItem,
6260
6482
  y as Alert,
6261
- D as Avatar,
6262
- kt as AvatarGroup,
6263
- yt as Badge,
6264
- ot as Breadcrumb,
6483
+ E as Avatar,
6484
+ _t as AvatarGroup,
6485
+ wt as Badge,
6486
+ ct as Breadcrumb,
6265
6487
  w as Button,
6266
6488
  m as Calendar,
6267
- St as Card,
6489
+ Dt as Card,
6268
6490
  L as Checkbox,
6269
6491
  R as CodeExample,
6270
6492
  P as FileUpload,
6271
- lt as Grid,
6272
- xt as Heading,
6273
- st as Icon,
6274
- B as Input,
6493
+ dt as Grid,
6494
+ kt as Heading,
6495
+ ot as Icon,
6496
+ Y as Input,
6275
6497
  I as Link,
6276
- Q as Modal,
6498
+ tt as Modal,
6277
6499
  x as MusicPlayer,
6278
6500
  W as MusicStation,
6279
6501
  X as Pagination,
6280
- dt as Playlist,
6502
+ vt as Playlist,
6281
6503
  b as Progress,
6282
6504
  U as Radio,
6283
6505
  Z as RadioGroup,
6284
6506
  C as Select,
6285
6507
  N as Skeleton,
6286
- _t as SkeletonCard,
6287
- $t as SkeletonText,
6508
+ Ot as SkeletonCard,
6509
+ zt as SkeletonText,
6288
6510
  f as Slider,
6289
- nt as Spinner,
6290
- ct as Table,
6291
- it as Tabs,
6292
- wt as Text,
6293
- Y as Textarea,
6294
- E as Toast,
6511
+ lt as Spinner,
6512
+ pt as Table,
6513
+ nt as Tabs,
6514
+ F as Terminal,
6515
+ $t as Text,
6516
+ q as Textarea,
6517
+ D as Toast,
6295
6518
  S as Toggle,
6296
6519
  V as Tooltip,
6297
- q as Visualizer
6520
+ K as Visualizer
6298
6521
  };