@patimweb/crtstyleguide 1.0.10 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/index.js +1500 -1208
- package/package.json +1 -1
package/dist/lib/index.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { css as
|
|
2
|
-
const
|
|
1
|
+
import { css as d, LitElement as h, html as l } from "lit";
|
|
2
|
+
const v = (e) => (t, a) => {
|
|
3
3
|
a !== void 0 ? a.addInitializer(() => {
|
|
4
|
-
customElements.define(
|
|
5
|
-
}) : customElements.define(
|
|
4
|
+
customElements.define(e, t);
|
|
5
|
+
}) : customElements.define(e, t);
|
|
6
6
|
};
|
|
7
|
-
const
|
|
8
|
-
let
|
|
9
|
-
constructor(t, a,
|
|
10
|
-
if (this._$cssResult$ = !0,
|
|
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 Pe = class {
|
|
9
|
+
constructor(t, a, s) {
|
|
10
|
+
if (this._$cssResult$ = !0, s !== ke) 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 (
|
|
17
|
-
const
|
|
18
|
-
|
|
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));
|
|
19
19
|
}
|
|
20
20
|
return t;
|
|
21
21
|
}
|
|
@@ -23,108 +23,108 @@ let Ht = class {
|
|
|
23
23
|
return this.cssText;
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
|
-
const
|
|
27
|
-
if (
|
|
26
|
+
const Ae = (e) => new Pe(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);
|
|
28
28
|
else for (const a of t) {
|
|
29
|
-
const
|
|
30
|
-
|
|
29
|
+
const s = document.createElement("style"), r = Tt.litNonce;
|
|
30
|
+
r !== void 0 && s.setAttribute("nonce", r), s.textContent = a.cssText, e.appendChild(s);
|
|
31
31
|
}
|
|
32
|
-
},
|
|
32
|
+
}, he = Jt ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
|
|
33
33
|
let a = "";
|
|
34
|
-
for (const
|
|
35
|
-
return
|
|
36
|
-
})(
|
|
37
|
-
const { is:
|
|
34
|
+
for (const s of t.cssRules) a += s.cssText;
|
|
35
|
+
return Ae(a);
|
|
36
|
+
})(e) : e;
|
|
37
|
+
const { is: Ee, defineProperty: Me, getOwnPropertyDescriptor: De, getOwnPropertyNames: Te, getOwnPropertySymbols: je, getPrototypeOf: Le } = Object, Vt = globalThis, ve = Vt.trustedTypes, Ie = ve ? ve.emptyScript : "", Be = Vt.reactiveElementPolyfillSupport, ft = (e, t) => e, jt = { toAttribute(e, t) {
|
|
38
38
|
switch (t) {
|
|
39
39
|
case Boolean:
|
|
40
|
-
|
|
40
|
+
e = e ? Ie : null;
|
|
41
41
|
break;
|
|
42
42
|
case Object:
|
|
43
43
|
case Array:
|
|
44
|
-
|
|
44
|
+
e = e == null ? e : JSON.stringify(e);
|
|
45
45
|
}
|
|
46
|
-
return
|
|
47
|
-
}, fromAttribute(
|
|
48
|
-
let a =
|
|
46
|
+
return e;
|
|
47
|
+
}, fromAttribute(e, t) {
|
|
48
|
+
let a = e;
|
|
49
49
|
switch (t) {
|
|
50
50
|
case Boolean:
|
|
51
|
-
a =
|
|
51
|
+
a = e !== null;
|
|
52
52
|
break;
|
|
53
53
|
case Number:
|
|
54
|
-
a =
|
|
54
|
+
a = e === null ? null : Number(e);
|
|
55
55
|
break;
|
|
56
56
|
case Object:
|
|
57
57
|
case Array:
|
|
58
58
|
try {
|
|
59
|
-
a = JSON.parse(
|
|
59
|
+
a = JSON.parse(e);
|
|
60
60
|
} catch {
|
|
61
61
|
a = null;
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
return a;
|
|
65
|
-
} },
|
|
66
|
-
Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"),
|
|
67
|
-
class
|
|
65
|
+
} }, te = (e, t) => !Ee(e, t), ge = { 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 ut = class 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 =
|
|
74
|
+
static createProperty(t, a = ge) {
|
|
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
|
|
77
|
-
|
|
76
|
+
const s = /* @__PURE__ */ Symbol(), r = this.getPropertyDescriptor(t, s, a);
|
|
77
|
+
r !== void 0 && Me(this.prototype, t, r);
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
static getPropertyDescriptor(t, a,
|
|
81
|
-
const { get:
|
|
80
|
+
static getPropertyDescriptor(t, a, s) {
|
|
81
|
+
const { get: r, set: i } = De(this.prototype, t) ?? { get() {
|
|
82
82
|
return this[a];
|
|
83
83
|
}, set(o) {
|
|
84
84
|
this[a] = o;
|
|
85
85
|
} };
|
|
86
|
-
return { get:
|
|
87
|
-
const
|
|
88
|
-
|
|
86
|
+
return { get: r, set(o) {
|
|
87
|
+
const c = r?.call(this);
|
|
88
|
+
i?.call(this, o), this.requestUpdate(t, c, s);
|
|
89
89
|
}, configurable: !0, enumerable: !0 };
|
|
90
90
|
}
|
|
91
91
|
static getPropertyOptions(t) {
|
|
92
|
-
return this.elementProperties.get(t) ??
|
|
92
|
+
return this.elementProperties.get(t) ?? ge;
|
|
93
93
|
}
|
|
94
94
|
static _$Ei() {
|
|
95
|
-
if (this.hasOwnProperty(
|
|
96
|
-
const t =
|
|
95
|
+
if (this.hasOwnProperty(ft("elementProperties"))) return;
|
|
96
|
+
const t = Le(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(
|
|
101
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
|
102
|
-
const a = this.properties,
|
|
103
|
-
for (const
|
|
100
|
+
if (this.hasOwnProperty(ft("finalized"))) return;
|
|
101
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(ft("properties"))) {
|
|
102
|
+
const a = this.properties, s = [...Te(a), ...je(a)];
|
|
103
|
+
for (const r of s) 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 [
|
|
108
|
+
if (a !== void 0) for (const [s, r] of a) this.elementProperties.set(s, r);
|
|
109
109
|
}
|
|
110
110
|
this._$Eh = /* @__PURE__ */ new Map();
|
|
111
|
-
for (const [a,
|
|
112
|
-
const
|
|
113
|
-
|
|
111
|
+
for (const [a, s] of this.elementProperties) {
|
|
112
|
+
const r = this._$Eu(a, s);
|
|
113
|
+
r !== void 0 && this._$Eh.set(r, a);
|
|
114
114
|
}
|
|
115
115
|
this.elementStyles = this.finalizeStyles(this.styles);
|
|
116
116
|
}
|
|
117
117
|
static finalizeStyles(t) {
|
|
118
118
|
const a = [];
|
|
119
119
|
if (Array.isArray(t)) {
|
|
120
|
-
const
|
|
121
|
-
for (const
|
|
122
|
-
} else t !== void 0 && a.push(
|
|
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));
|
|
123
123
|
return a;
|
|
124
124
|
}
|
|
125
125
|
static _$Eu(t, a) {
|
|
126
|
-
const
|
|
127
|
-
return
|
|
126
|
+
const s = a.attribute;
|
|
127
|
+
return s === !1 ? void 0 : typeof s == "string" ? s : 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 it extends HTMLElement {
|
|
|
140
140
|
}
|
|
141
141
|
_$E_() {
|
|
142
142
|
const t = /* @__PURE__ */ new Map(), a = this.constructor.elementProperties;
|
|
143
|
-
for (const
|
|
143
|
+
for (const s of a.keys()) this.hasOwnProperty(s) && (t.set(s, this[s]), delete this[s]);
|
|
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
|
|
148
|
+
return Se(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 it extends HTMLElement {
|
|
|
155
155
|
disconnectedCallback() {
|
|
156
156
|
this._$EO?.forEach((t) => t.hostDisconnected?.());
|
|
157
157
|
}
|
|
158
|
-
attributeChangedCallback(t, a,
|
|
159
|
-
this._$AK(t,
|
|
158
|
+
attributeChangedCallback(t, a, s) {
|
|
159
|
+
this._$AK(t, s);
|
|
160
160
|
}
|
|
161
161
|
_$ET(t, a) {
|
|
162
|
-
const
|
|
163
|
-
if (
|
|
164
|
-
const
|
|
165
|
-
this._$Em = t,
|
|
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;
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
_$AK(t, a) {
|
|
169
|
-
const
|
|
170
|
-
if (
|
|
171
|
-
const
|
|
172
|
-
this._$Em =
|
|
173
|
-
const
|
|
174
|
-
this[
|
|
169
|
+
const s = this.constructor, r = s._$Eh.get(t);
|
|
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;
|
|
172
|
+
this._$Em = r;
|
|
173
|
+
const c = o.fromAttribute(a, i.type);
|
|
174
|
+
this[r] = c ?? this._$Ej?.get(r) ?? c, this._$Em = null;
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
|
-
requestUpdate(t, a,
|
|
177
|
+
requestUpdate(t, a, s, r = !1, i) {
|
|
178
178
|
if (t !== void 0) {
|
|
179
179
|
const o = this.constructor;
|
|
180
|
-
if (
|
|
181
|
-
this.C(t, a,
|
|
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);
|
|
182
182
|
}
|
|
183
183
|
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
184
184
|
}
|
|
185
|
-
C(t, a, { useDefault:
|
|
186
|
-
|
|
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));
|
|
187
187
|
}
|
|
188
188
|
async _$EP() {
|
|
189
189
|
this.isUpdatePending = !0;
|
|
@@ -202,21 +202,21 @@ class it 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 [
|
|
205
|
+
for (const [r, i] of this._$Ep) this[r] = i;
|
|
206
206
|
this._$Ep = void 0;
|
|
207
207
|
}
|
|
208
|
-
const
|
|
209
|
-
if (
|
|
210
|
-
const { wrapped: o } =
|
|
211
|
-
o !== !0 || this._$AL.has(
|
|
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);
|
|
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((
|
|
218
|
-
} catch (
|
|
219
|
-
throw t = !1, this._$EM(),
|
|
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;
|
|
220
220
|
}
|
|
221
221
|
t && this._$AE(a);
|
|
222
222
|
}
|
|
@@ -244,98 +244,349 @@ class it extends HTMLElement {
|
|
|
244
244
|
}
|
|
245
245
|
firstUpdated(t) {
|
|
246
246
|
}
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
const
|
|
250
|
-
const { kind:
|
|
251
|
-
let
|
|
252
|
-
if (
|
|
247
|
+
};
|
|
248
|
+
ut.elementStyles = [], ut.shadowRootOptions = { mode: "open" }, ut[ft("elementProperties")] = /* @__PURE__ */ new Map(), ut[ft("finalized")] = /* @__PURE__ */ new Map(), Be?.({ ReactiveElement: ut }), (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") {
|
|
253
253
|
const { name: o } = a;
|
|
254
|
-
return { set(
|
|
255
|
-
const
|
|
256
|
-
t.set.call(this,
|
|
257
|
-
}, init(
|
|
258
|
-
return
|
|
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;
|
|
259
259
|
} };
|
|
260
260
|
}
|
|
261
|
-
if (
|
|
261
|
+
if (s === "setter") {
|
|
262
262
|
const { name: o } = a;
|
|
263
|
-
return function(
|
|
264
|
-
const
|
|
265
|
-
t.call(this,
|
|
263
|
+
return function(c) {
|
|
264
|
+
const p = this[o];
|
|
265
|
+
t.call(this, c), this.requestUpdate(o, p, e, !0, c);
|
|
266
266
|
};
|
|
267
267
|
}
|
|
268
|
-
throw Error("Unsupported decorator location: " +
|
|
268
|
+
throw Error("Unsupported decorator location: " + s);
|
|
269
269
|
};
|
|
270
|
-
function n(
|
|
271
|
-
return (t, a) => typeof a == "object" ?
|
|
272
|
-
const o =
|
|
273
|
-
return
|
|
274
|
-
})(
|
|
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;
|
|
274
|
+
})(e, t, a);
|
|
275
275
|
}
|
|
276
|
-
function
|
|
277
|
-
return n({ ...
|
|
276
|
+
function m(e) {
|
|
277
|
+
return n({ ...e, state: !0, attribute: !1 });
|
|
278
278
|
}
|
|
279
|
-
const
|
|
280
|
-
function
|
|
281
|
-
return (a,
|
|
282
|
-
const
|
|
283
|
-
return
|
|
284
|
-
return
|
|
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);
|
|
285
285
|
} });
|
|
286
286
|
};
|
|
287
287
|
}
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
288
|
+
const re = globalThis, ue = (e) => e, Lt = re.trustedTypes, me = Lt ? Lt.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, $e = "$lit$", R = `lit$${Math.random().toFixed(9).slice(2)}$`, _e = "?" + R, Fe = `<${_e}>`, Z = document, It = () => Z.createComment(""), bt = (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]`, mt = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, fe = /-->/g, be = />/g, K = RegExp(`>|${Gt}(?:([^\\s"'>=/]+)(${Gt}*=${Gt}*(?:[^
|
|
290
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), ye = /'/g, xe = /"/g, ze = /^(?:script|style|textarea|title)$/i, lt = /* @__PURE__ */ Symbol.for("lit-noChange"), f = /* @__PURE__ */ Symbol.for("lit-nothing"), we = /* @__PURE__ */ new WeakMap(), G = Z.createTreeWalker(Z, 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 = mt;
|
|
298
|
+
for (let c = 0; c < a; c++) {
|
|
299
|
+
const p = e[c];
|
|
300
|
+
let g, b, u = -1, S = 0;
|
|
301
|
+
for (; S < p.length && (o.lastIndex = S, b = o.exec(p), b !== null); ) S = o.lastIndex, o === mt ? b[1] === "!--" ? o = fe : b[1] !== void 0 ? o = be : b[2] !== void 0 ? (ze.test(b[2]) && (r = RegExp("</" + b[2], "g")), o = K) : b[3] !== void 0 && (o = K) : o === K ? b[0] === ">" ? (o = r ?? mt, u = -1) : b[1] === void 0 ? u = -2 : (u = o.lastIndex - b[2].length, g = b[1], o = b[3] === void 0 ? K : b[3] === '"' ? xe : ye) : o === xe || o === ye ? o = K : o === fe || o === be ? o = mt : (o = K, r = void 0);
|
|
302
|
+
const U = o === K && e[c + 1].startsWith("/>") ? " " : "";
|
|
303
|
+
i += o === mt ? p + Fe : u >= 0 ? (s.push(g), p.slice(0, u) + $e + p.slice(u) + R + U) : p + R + (u === -2 ? c : U);
|
|
304
|
+
}
|
|
305
|
+
return [Ce(e, i + (e[a] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
|
|
292
306
|
};
|
|
293
|
-
|
|
307
|
+
class yt {
|
|
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, [g, b] = Ye(t, a);
|
|
313
|
+
if (this.el = yt.createElement(g, s), G.currentNode = this.el.content, a === 2 || a === 3) {
|
|
314
|
+
const u = this.el.content.firstChild;
|
|
315
|
+
u.replaceWith(...u.childNodes);
|
|
316
|
+
}
|
|
317
|
+
for (; (r = G.nextNode()) !== null && p.length < c; ) {
|
|
318
|
+
if (r.nodeType === 1) {
|
|
319
|
+
if (r.hasAttributes()) for (const u of r.getAttributeNames()) if (u.endsWith($e)) {
|
|
320
|
+
const S = b[o++], U = r.getAttribute(u).split(R), Dt = /([.?@])?(.*)/.exec(S);
|
|
321
|
+
p.push({ type: 1, index: i, name: Dt[2], strings: U, ctor: Dt[1] === "." ? qe : Dt[1] === "?" ? We : Dt[1] === "@" ? Xe : Wt }), r.removeAttribute(u);
|
|
322
|
+
} else u.startsWith(R) && (p.push({ type: 6, index: i }), r.removeAttribute(u));
|
|
323
|
+
if (ze.test(r.tagName)) {
|
|
324
|
+
const u = r.textContent.split(R), S = u.length - 1;
|
|
325
|
+
if (S > 0) {
|
|
326
|
+
r.textContent = Lt ? Lt.emptyScript : "";
|
|
327
|
+
for (let U = 0; U < S; U++) r.append(u[U], It()), G.nextNode(), p.push({ type: 2, index: ++i });
|
|
328
|
+
r.append(u[S], It());
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
} else if (r.nodeType === 8) if (r.data === _e) p.push({ type: 2, index: i });
|
|
332
|
+
else {
|
|
333
|
+
let u = -1;
|
|
334
|
+
for (; (u = r.data.indexOf(R, u + 1)) !== -1; ) p.push({ type: 7, index: i }), u += R.length - 1;
|
|
335
|
+
}
|
|
336
|
+
i++;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
static createElement(t, a) {
|
|
340
|
+
const s = Z.createElement("template");
|
|
341
|
+
return s.innerHTML = t, s;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
function ct(e, t, a = e, s) {
|
|
345
|
+
if (t === lt) return t;
|
|
346
|
+
let r = s !== void 0 ? a._$Co?.[s] : a._$Cl;
|
|
347
|
+
const i = bt(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 = ct(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 ?? Z).importNode(a, !0);
|
|
362
|
+
G.currentNode = r;
|
|
363
|
+
let i = G.nextNode(), o = 0, c = 0, p = s[0];
|
|
364
|
+
for (; p !== void 0; ) {
|
|
365
|
+
if (o === p.index) {
|
|
366
|
+
let g;
|
|
367
|
+
p.type === 2 ? g = new qt(i, i.nextSibling, this, t) : p.type === 1 ? g = new p.ctor(i, p.name, p.strings, this, t) : p.type === 6 && (g = new Ke(i, this, t)), this._$AV.push(g), p = s[++c];
|
|
368
|
+
}
|
|
369
|
+
o !== p?.index && (i = G.nextNode(), o++);
|
|
370
|
+
}
|
|
371
|
+
return G.currentNode = Z, 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 = ct(this, t, a), bt(t) ? t === f || t == null || t === "" ? (this._$AH !== f && this._$AR(), this._$AH = f) : t !== this._$AH && t !== lt && 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 && bt(this._$AH) ? this._$AA.nextSibling.data = t : this.T(Z.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 = yt.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 yt(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 = ue(t).nextSibling;
|
|
430
|
+
ue(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 = ct(this, t, a, 0), o = !bt(t) || t !== this._$AH && t !== lt, o && (this._$AH = t);
|
|
451
|
+
else {
|
|
452
|
+
const c = t;
|
|
453
|
+
let p, g;
|
|
454
|
+
for (t = i[0], p = 0; p < i.length - 1; p++) g = ct(this, c[s + p], a, p), g === lt && (g = this._$AH[p]), o ||= !bt(g) || g !== this._$AH[p], g === f ? t = f : t !== f && (t += (g ?? "") + i[p + 1]), this._$AH[p] = g;
|
|
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 {
|
|
294
463
|
constructor() {
|
|
295
|
-
super(...arguments), this.
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
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 = ct(this, t, a, 0) ?? f) === lt) 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
|
+
ct(this, t);
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
const Ge = re.litHtmlPolyfillSupport;
|
|
503
|
+
Ge?.(yt, 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 === lt) 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;
|
|
541
|
+
};
|
|
542
|
+
const ar = {
|
|
543
|
+
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
|
+
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
|
+
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>',
|
|
546
|
+
x: '<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>',
|
|
547
|
+
plus: '<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="M12 5v14M5 12h14"/></svg>',
|
|
548
|
+
minus: '<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="M5 12h14"/></svg>',
|
|
549
|
+
search: '<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"><circle cx="11" cy="11" r="7"/><path d="M21 21l-4.35-4.35"/></svg>',
|
|
550
|
+
"arrow-right": '<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="M5 12h14"/><path d="M13 5l7 7-7 7"/></svg>',
|
|
551
|
+
"arrow-left": '<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="M19 12H5"/><path d="M11 19l-7-7 7-7"/></svg>',
|
|
552
|
+
"arrow-up": '<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="M12 19V5"/><path d="M5 12l7-7 7 7"/></svg>',
|
|
553
|
+
"arrow-down": '<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="M12 5v14"/><path d="M19 12l-7 7-7-7"/></svg>',
|
|
554
|
+
download: '<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="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><path d="M7 10l5 5 5-5"/><path d="M12 15V3"/></svg>',
|
|
555
|
+
upload: '<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="M21 9V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v4"/><path d="M7 14l5-5 5 5"/><path d="M12 9v12"/></svg>',
|
|
556
|
+
folder: '<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="M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/></svg>',
|
|
557
|
+
file: '<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="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><path d="M14 2v6h6"/></svg>',
|
|
558
|
+
trash: '<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"><polyline points="3 6 5 6 21 6"/><path d="M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"/><path d="M10 11v6M14 11v6"/></svg>',
|
|
559
|
+
delete: '<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"><polyline points="3 6 5 6 21 6"/><path d="M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"/><path d="M10 11v6M14 11v6"/></svg>',
|
|
560
|
+
edit: '<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="M12 20h9"/><path d="M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"/></svg>',
|
|
561
|
+
pencil: '<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="M12 20h9"/><path d="M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"/></svg>',
|
|
562
|
+
eye: '<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="M1 12s4-7 11-7 11 7 11 7-4 7-11 7S1 12 1 12z"/><circle cx="12" cy="12" r="3"/></svg>',
|
|
563
|
+
menu: '<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="M3 12h18M3 6h18M3 18h18"/></svg>',
|
|
564
|
+
hamburger: '<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="M3 12h18M3 6h18M3 18h18"/></svg>',
|
|
565
|
+
settings: '<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="M19.43 12.98c.04-.32.07-.66.07-.98s-.03-.66-.07-.98l2.11-1.65a.5.5 0 0 0 .12-.64l-2-3.46a.5.5 0 0 0-.6-.22l-2.49 1a7.03 7.03 0 0 0-1.7-.98l-.38-2.65A.5.5 0 0 0 13.5 2h-4a.5.5 0 0 0-.5.42l-.38 2.65c-.61.24-1.18.56-1.7.98l-2.49-1a.5.5 0 0 0-.6.22l-2 3.46a.5.5 0 0 0 .12.64L4.57 11c-.04.32-.07.66-.07.98s.03.66.07.98L2.46 14.6a.5.5 0 0 0-.12.64l2 3.46c.14.24.44.34.7.22l2.49-1c.52.42 1.09.74 1.7.98l.38 2.65c.05.28.29.42.5.42h4c.21 0 .45-.14.5-.42l.38-2.65c.61-.24 1.18-.56 1.7-.98l2.49 1c.26.12.56.02.7-.22l2-3.46a.5.5 0 0 0-.12-.64L19.43 12.98z"/><circle cx="12" cy="12" r="3"/></svg>',
|
|
566
|
+
gear: '<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="M19.43 12.98c.04-.32.07-.66.07-.98s-.03-.66-.07-.98l2.11-1.65a.5.5 0 0 0 .12-.64l-2-3.46a.5.5 0 0 0-.6-.22l-2.49 1a7.03 7.03 0 0 0-1.7-.98l-.38-2.65A.5.5 0 0 0 13.5 2h-4a.5.5 0 0 0-.5.42l-.38 2.65c-.61.24-1.18.56-1.7.98l-2.49-1a.5.5 0 0 0-.6.22l-2 3.46a.5.5 0 0 0 .12.64L4.57 11c-.04.32-.07.66-.07.98s.03.66.07.98L2.46 14.6a.5.5 0 0 0-.12.64l2 3.46c.14.24.44.34.7.22l2.49-1c.52.42 1.09.74 1.7.98l.38 2.65c.05.28.29.42.5.42h4c.21 0 .45-.14.5-.42l.38-2.65c.61-.24 1.18-.56 1.7-.98l2.49 1c.26.12.56.02.7-.22l2-3.46a.5.5 0 0 0-.12-.64L19.43 12.98z"/><circle cx="12" cy="12" r="3"/></svg>',
|
|
567
|
+
star: '<svg viewBox="0 0 24 24" fill="currentColor" stroke="currentColor" stroke-width="0" xmlns="http://www.w3.org/2000/svg"><path d="M12 .587l3.668 7.431L23.4 9.75l-5.6 5.455L18.335 24 12 19.897 5.665 24l.535-8.795L.6 9.75l7.732-1.732L12 .587z"/></svg>',
|
|
568
|
+
heart: '<svg viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M12 21s-7-4.35-9.2-7.1C.8 11.9 2 7.9 5 6.4 7 5.3 9.6 6 12 8.2 14.4 6 17 5.3 19 6.4c3 1.5 4.2 5.5 2.2 7.5C19 16.65 12 21 12 21z"/></svg>',
|
|
569
|
+
play: '<svg viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M5 3v18l15-9L5 3z"/></svg>',
|
|
570
|
+
pause: '<svg viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><rect x="6" y="4" width="4" height="16"/><rect x="14" y="4" width="4" height="16"/></svg>',
|
|
571
|
+
stop: '<svg viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><rect x="6" y="6" width="12" height="12"/></svg>',
|
|
572
|
+
prev: '<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="M11 19l-7-7 7-7"/><path d="M18 19l-7-7 7-7"/></svg>',
|
|
573
|
+
next: '<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="M13 5l7 7-7 7"/><path d="M6 5l7 7-7 7"/></svg>',
|
|
574
|
+
rewind: '<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="M11 19l-7-7 7-7"/><path d="M18 19l-7-7 7-7"/></svg>',
|
|
575
|
+
forward: '<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="M13 5l7 7-7 7"/><path d="M6 5l7 7-7 7"/></svg>',
|
|
576
|
+
volume: '<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"/><path d="M19 5a4 4 0 0 1 0 14"/></svg>',
|
|
577
|
+
"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>',
|
|
578
|
+
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>'
|
|
579
|
+
};
|
|
580
|
+
let xt = class extends h {
|
|
581
|
+
constructor() {
|
|
582
|
+
super(...arguments), this.name = "", this.size = "md";
|
|
333
583
|
}
|
|
334
584
|
render() {
|
|
335
|
-
|
|
585
|
+
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>';
|
|
586
|
+
return l`<span class="icon" aria-hidden="true">${tr(e)}</span>`;
|
|
336
587
|
}
|
|
337
588
|
};
|
|
338
|
-
|
|
589
|
+
xt.styles = d`
|
|
339
590
|
:host {
|
|
340
591
|
display: inline-flex;
|
|
341
592
|
align-items: center;
|
|
@@ -352,21 +603,21 @@ ot.styles = l`
|
|
|
352
603
|
height: 100%;
|
|
353
604
|
}
|
|
354
605
|
`;
|
|
355
|
-
|
|
606
|
+
se([
|
|
356
607
|
n()
|
|
357
|
-
],
|
|
358
|
-
|
|
608
|
+
], xt.prototype, "name", 2);
|
|
609
|
+
se([
|
|
359
610
|
n()
|
|
360
|
-
],
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
],
|
|
364
|
-
var
|
|
365
|
-
for (var
|
|
366
|
-
(o =
|
|
367
|
-
return
|
|
611
|
+
], xt.prototype, "size", 2);
|
|
612
|
+
xt = se([
|
|
613
|
+
v("crt-icon")
|
|
614
|
+
], xt);
|
|
615
|
+
var sr = Object.defineProperty, ir = Object.getOwnPropertyDescriptor, X = (e, t, a, s) => {
|
|
616
|
+
for (var r = s > 1 ? void 0 : s ? ir(t, a) : t, i = e.length - 1, o; i >= 0; i--)
|
|
617
|
+
(o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
|
|
618
|
+
return s && r && sr(t, a, r), r;
|
|
368
619
|
};
|
|
369
|
-
let
|
|
620
|
+
let z = class extends h {
|
|
370
621
|
constructor() {
|
|
371
622
|
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");
|
|
372
623
|
}
|
|
@@ -375,23 +626,23 @@ let w = class extends p {
|
|
|
375
626
|
}
|
|
376
627
|
render() {
|
|
377
628
|
if (console.log("Button render called"), this.iconOnly) {
|
|
378
|
-
const
|
|
379
|
-
return
|
|
629
|
+
const e = this.iconLeft || this.iconRight;
|
|
630
|
+
return l`
|
|
380
631
|
<button type="${this.type}" ?disabled="${this.disabled}">
|
|
381
|
-
${
|
|
632
|
+
${e ? l`<crt-icon name="${e}"></crt-icon>` : l`<slot></slot>`}
|
|
382
633
|
</button>
|
|
383
634
|
`;
|
|
384
635
|
}
|
|
385
|
-
return
|
|
636
|
+
return l`
|
|
386
637
|
<button type="${this.type}" ?disabled="${this.disabled}">
|
|
387
|
-
${this.iconLeft ?
|
|
638
|
+
${this.iconLeft ? l`<crt-icon name="${this.iconLeft}"></crt-icon>` : ""}
|
|
388
639
|
<slot></slot>
|
|
389
|
-
${this.iconRight ?
|
|
640
|
+
${this.iconRight ? l`<crt-icon name="${this.iconRight}"></crt-icon>` : ""}
|
|
390
641
|
</button>
|
|
391
642
|
`;
|
|
392
643
|
}
|
|
393
644
|
};
|
|
394
|
-
|
|
645
|
+
z.styles = d`
|
|
395
646
|
:host {
|
|
396
647
|
display: inline-block;
|
|
397
648
|
}
|
|
@@ -547,44 +798,44 @@ w.styles = l`
|
|
|
547
798
|
flex-shrink: 0;
|
|
548
799
|
}
|
|
549
800
|
`;
|
|
550
|
-
|
|
801
|
+
X([
|
|
551
802
|
n({ reflect: !0 })
|
|
552
|
-
],
|
|
553
|
-
|
|
803
|
+
], z.prototype, "size", 2);
|
|
804
|
+
X([
|
|
554
805
|
n({ reflect: !0 })
|
|
555
|
-
],
|
|
556
|
-
|
|
806
|
+
], z.prototype, "variant", 2);
|
|
807
|
+
X([
|
|
557
808
|
n({ type: Boolean })
|
|
558
|
-
],
|
|
559
|
-
|
|
809
|
+
], z.prototype, "disabled", 2);
|
|
810
|
+
X([
|
|
560
811
|
n()
|
|
561
|
-
],
|
|
562
|
-
|
|
812
|
+
], z.prototype, "type", 2);
|
|
813
|
+
X([
|
|
563
814
|
n({ attribute: "icon-only", type: Boolean })
|
|
564
|
-
],
|
|
565
|
-
|
|
815
|
+
], z.prototype, "iconOnly", 2);
|
|
816
|
+
X([
|
|
566
817
|
n({ attribute: "icon-left" })
|
|
567
|
-
],
|
|
568
|
-
|
|
818
|
+
], z.prototype, "iconLeft", 2);
|
|
819
|
+
X([
|
|
569
820
|
n({ attribute: "icon-right" })
|
|
570
|
-
],
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
],
|
|
574
|
-
var
|
|
575
|
-
for (var
|
|
576
|
-
(o =
|
|
577
|
-
return
|
|
821
|
+
], z.prototype, "iconRight", 2);
|
|
822
|
+
z = X([
|
|
823
|
+
v("crt-button")
|
|
824
|
+
], z);
|
|
825
|
+
var or = Object.defineProperty, nr = Object.getOwnPropertyDescriptor, Oe = (e, t, a, s) => {
|
|
826
|
+
for (var r = s > 1 ? void 0 : s ? nr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
|
|
827
|
+
(o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
|
|
828
|
+
return s && r && or(t, a, r), r;
|
|
578
829
|
};
|
|
579
|
-
let
|
|
830
|
+
let Bt = class extends h {
|
|
580
831
|
constructor() {
|
|
581
832
|
super(...arguments), this.variant = "primary";
|
|
582
833
|
}
|
|
583
834
|
render() {
|
|
584
|
-
return
|
|
835
|
+
return l`<span class="badge"><slot></slot></span>`;
|
|
585
836
|
}
|
|
586
837
|
};
|
|
587
|
-
|
|
838
|
+
Bt.styles = d`
|
|
588
839
|
:host {
|
|
589
840
|
--badge-bg: transparent;
|
|
590
841
|
--badge-color: var(--crt-primary);
|
|
@@ -625,41 +876,41 @@ wt.styles = l`
|
|
|
625
876
|
--badge-border: 1px solid var(--crt-info);
|
|
626
877
|
}
|
|
627
878
|
`;
|
|
628
|
-
|
|
879
|
+
Oe([
|
|
629
880
|
n()
|
|
630
|
-
],
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
],
|
|
634
|
-
var
|
|
635
|
-
for (var
|
|
636
|
-
(o =
|
|
637
|
-
return
|
|
881
|
+
], Bt.prototype, "variant", 2);
|
|
882
|
+
Bt = Oe([
|
|
883
|
+
v("crt-badge")
|
|
884
|
+
], Bt);
|
|
885
|
+
var lr = Object.defineProperty, cr = Object.getOwnPropertyDescriptor, Xt = (e, t, a, s) => {
|
|
886
|
+
for (var r = s > 1 ? void 0 : s ? cr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
|
|
887
|
+
(o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
|
|
888
|
+
return s && r && lr(t, a, r), r;
|
|
638
889
|
};
|
|
639
|
-
let
|
|
890
|
+
let Nt = class extends h {
|
|
640
891
|
constructor() {
|
|
641
892
|
super(...arguments), this.level = 1;
|
|
642
893
|
}
|
|
643
894
|
render() {
|
|
644
895
|
switch (this.level) {
|
|
645
896
|
case 1:
|
|
646
|
-
return
|
|
897
|
+
return l`<h1><slot></slot></h1>`;
|
|
647
898
|
case 2:
|
|
648
|
-
return
|
|
899
|
+
return l`<h2><slot></slot></h2>`;
|
|
649
900
|
case 3:
|
|
650
|
-
return
|
|
901
|
+
return l`<h3><slot></slot></h3>`;
|
|
651
902
|
case 4:
|
|
652
|
-
return
|
|
903
|
+
return l`<h4><slot></slot></h4>`;
|
|
653
904
|
case 5:
|
|
654
|
-
return
|
|
905
|
+
return l`<h5><slot></slot></h5>`;
|
|
655
906
|
case 6:
|
|
656
|
-
return
|
|
907
|
+
return l`<h6><slot></slot></h6>`;
|
|
657
908
|
default:
|
|
658
|
-
return
|
|
909
|
+
return l`<h1><slot></slot></h1>`;
|
|
659
910
|
}
|
|
660
911
|
}
|
|
661
912
|
};
|
|
662
|
-
|
|
913
|
+
Nt.styles = d`
|
|
663
914
|
h1, h2, h3, h4, h5, h6 {
|
|
664
915
|
font-family: var(--crt-font-family);
|
|
665
916
|
color: var(--crt-text-primary);
|
|
@@ -688,21 +939,21 @@ kt.styles = l`
|
|
|
688
939
|
font-size: var(--crt-font-size-base);
|
|
689
940
|
}
|
|
690
941
|
`;
|
|
691
|
-
|
|
942
|
+
Xt([
|
|
692
943
|
n({ type: Number })
|
|
693
|
-
],
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
],
|
|
697
|
-
let
|
|
944
|
+
], Nt.prototype, "level", 2);
|
|
945
|
+
Nt = Xt([
|
|
946
|
+
v("crt-heading")
|
|
947
|
+
], Nt);
|
|
948
|
+
let Ut = class extends h {
|
|
698
949
|
constructor() {
|
|
699
950
|
super(...arguments), this.muted = !1;
|
|
700
951
|
}
|
|
701
952
|
render() {
|
|
702
|
-
return
|
|
953
|
+
return l`<p><slot></slot></p>`;
|
|
703
954
|
}
|
|
704
955
|
};
|
|
705
|
-
|
|
956
|
+
Ut.styles = d`
|
|
706
957
|
p {
|
|
707
958
|
font-family: var(--crt-font-family);
|
|
708
959
|
color: var(--crt-text-secondary);
|
|
@@ -714,43 +965,43 @@ $t.styles = l`
|
|
|
714
965
|
color: var(--crt-text-muted);
|
|
715
966
|
}
|
|
716
967
|
`;
|
|
717
|
-
|
|
968
|
+
Xt([
|
|
718
969
|
n()
|
|
719
|
-
],
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
],
|
|
723
|
-
var
|
|
724
|
-
for (var
|
|
725
|
-
(o =
|
|
726
|
-
return
|
|
970
|
+
], Ut.prototype, "muted", 2);
|
|
971
|
+
Ut = Xt([
|
|
972
|
+
v("crt-text")
|
|
973
|
+
], Ut);
|
|
974
|
+
var pr = Object.defineProperty, dr = Object.getOwnPropertyDescriptor, ie = (e, t, a, s) => {
|
|
975
|
+
for (var r = s > 1 ? void 0 : s ? dr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
|
|
976
|
+
(o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
|
|
977
|
+
return s && r && pr(t, a, r), r;
|
|
727
978
|
};
|
|
728
|
-
let
|
|
979
|
+
let wt = class extends h {
|
|
729
980
|
constructor() {
|
|
730
981
|
super(...arguments), this.activeTab = 0, this.tabs = [];
|
|
731
982
|
}
|
|
732
|
-
selectTab(
|
|
733
|
-
this.activeTab =
|
|
983
|
+
selectTab(e) {
|
|
984
|
+
this.activeTab = e;
|
|
734
985
|
}
|
|
735
986
|
render() {
|
|
736
|
-
return
|
|
987
|
+
return l`
|
|
737
988
|
<div class="tabs-header">
|
|
738
989
|
${this.tabs.map(
|
|
739
|
-
(
|
|
990
|
+
(e, t) => l`
|
|
740
991
|
<button
|
|
741
992
|
class="tab-button ${t === this.activeTab ? "active" : ""}"
|
|
742
993
|
@click="${() => this.selectTab(t)}"
|
|
743
994
|
>
|
|
744
|
-
${
|
|
995
|
+
${e.label}
|
|
745
996
|
</button>
|
|
746
997
|
`
|
|
747
998
|
)}
|
|
748
999
|
</div>
|
|
749
1000
|
<div class="tabs-content">
|
|
750
1001
|
${this.tabs.map(
|
|
751
|
-
(
|
|
1002
|
+
(e, t) => l`
|
|
752
1003
|
<div class="tab-pane ${t === this.activeTab ? "active" : ""}">
|
|
753
|
-
${
|
|
1004
|
+
${e.label.toLowerCase() === "code" ? l`<pre><code>${e.content}</code></pre>` : l`<div>${hr(e.content)}</div>`}
|
|
754
1005
|
</div>
|
|
755
1006
|
`
|
|
756
1007
|
)}
|
|
@@ -758,7 +1009,7 @@ let nt = class extends p {
|
|
|
758
1009
|
`;
|
|
759
1010
|
}
|
|
760
1011
|
};
|
|
761
|
-
|
|
1012
|
+
wt.styles = d`
|
|
762
1013
|
:host {
|
|
763
1014
|
display: block;
|
|
764
1015
|
}
|
|
@@ -825,43 +1076,43 @@ nt.styles = l`
|
|
|
825
1076
|
font-family: var(--crt-font-family);
|
|
826
1077
|
}
|
|
827
1078
|
`;
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
],
|
|
831
|
-
|
|
1079
|
+
ie([
|
|
1080
|
+
m()
|
|
1081
|
+
], wt.prototype, "activeTab", 2);
|
|
1082
|
+
ie([
|
|
832
1083
|
n({ type: Array })
|
|
833
|
-
],
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
],
|
|
837
|
-
function
|
|
1084
|
+
], wt.prototype, "tabs", 2);
|
|
1085
|
+
wt = ie([
|
|
1086
|
+
v("crt-tabs")
|
|
1087
|
+
], wt);
|
|
1088
|
+
function hr(e) {
|
|
838
1089
|
const t = document.createElement("div");
|
|
839
|
-
return t.innerHTML =
|
|
1090
|
+
return t.innerHTML = e, t;
|
|
840
1091
|
}
|
|
841
|
-
var
|
|
842
|
-
for (var
|
|
843
|
-
(o =
|
|
844
|
-
return
|
|
1092
|
+
var vr = Object.defineProperty, gr = Object.getOwnPropertyDescriptor, C = (e, t, a, s) => {
|
|
1093
|
+
for (var r = s > 1 ? void 0 : s ? gr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
|
|
1094
|
+
(o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
|
|
1095
|
+
return s && r && vr(t, a, r), r;
|
|
845
1096
|
};
|
|
846
|
-
let
|
|
1097
|
+
let Q = class extends h {
|
|
847
1098
|
constructor() {
|
|
848
1099
|
super(...arguments), this.type = "text", this.placeholder = "", this.value = "", this.disabled = !1;
|
|
849
1100
|
}
|
|
850
1101
|
render() {
|
|
851
|
-
return
|
|
1102
|
+
return l`
|
|
852
1103
|
<input
|
|
853
1104
|
type="${this.type}"
|
|
854
1105
|
placeholder="${this.placeholder}"
|
|
855
1106
|
value="${this.value}"
|
|
856
1107
|
?disabled="${this.disabled}"
|
|
857
|
-
@input="${(
|
|
858
|
-
this.value =
|
|
1108
|
+
@input="${(e) => {
|
|
1109
|
+
this.value = e.target.value;
|
|
859
1110
|
}}"
|
|
860
1111
|
/>
|
|
861
1112
|
`;
|
|
862
1113
|
}
|
|
863
1114
|
};
|
|
864
|
-
|
|
1115
|
+
Q.styles = d`
|
|
865
1116
|
:host {
|
|
866
1117
|
display: block;
|
|
867
1118
|
}
|
|
@@ -907,33 +1158,33 @@ Y.styles = l`
|
|
|
907
1158
|
padding-right: var(--crt-spacing-lg);
|
|
908
1159
|
}
|
|
909
1160
|
`;
|
|
910
|
-
|
|
1161
|
+
C([
|
|
911
1162
|
n()
|
|
912
|
-
],
|
|
913
|
-
|
|
1163
|
+
], Q.prototype, "type", 2);
|
|
1164
|
+
C([
|
|
914
1165
|
n()
|
|
915
|
-
],
|
|
916
|
-
|
|
1166
|
+
], Q.prototype, "placeholder", 2);
|
|
1167
|
+
C([
|
|
917
1168
|
n()
|
|
918
|
-
],
|
|
919
|
-
|
|
1169
|
+
], Q.prototype, "value", 2);
|
|
1170
|
+
C([
|
|
920
1171
|
n()
|
|
921
|
-
],
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
],
|
|
925
|
-
let
|
|
1172
|
+
], Q.prototype, "disabled", 2);
|
|
1173
|
+
Q = C([
|
|
1174
|
+
v("crt-input")
|
|
1175
|
+
], Q);
|
|
1176
|
+
let J = class extends h {
|
|
926
1177
|
constructor() {
|
|
927
1178
|
super(...arguments), this.placeholder = "", this.value = "", this.disabled = !1, this.rows = 4;
|
|
928
1179
|
}
|
|
929
1180
|
render() {
|
|
930
|
-
return
|
|
1181
|
+
return l`
|
|
931
1182
|
<textarea
|
|
932
1183
|
placeholder="${this.placeholder}"
|
|
933
1184
|
rows="${this.rows}"
|
|
934
1185
|
?disabled="${this.disabled}"
|
|
935
|
-
@input="${(
|
|
936
|
-
this.value =
|
|
1186
|
+
@input="${(e) => {
|
|
1187
|
+
this.value = e.target.value;
|
|
937
1188
|
}}"
|
|
938
1189
|
>
|
|
939
1190
|
${this.value}</textarea
|
|
@@ -941,7 +1192,7 @@ ${this.value}</textarea
|
|
|
941
1192
|
`;
|
|
942
1193
|
}
|
|
943
1194
|
};
|
|
944
|
-
|
|
1195
|
+
J.styles = d`
|
|
945
1196
|
:host {
|
|
946
1197
|
display: block;
|
|
947
1198
|
}
|
|
@@ -983,41 +1234,41 @@ q.styles = l`
|
|
|
983
1234
|
border-style: dashed;
|
|
984
1235
|
}
|
|
985
1236
|
`;
|
|
986
|
-
|
|
1237
|
+
C([
|
|
987
1238
|
n()
|
|
988
|
-
],
|
|
989
|
-
|
|
1239
|
+
], J.prototype, "placeholder", 2);
|
|
1240
|
+
C([
|
|
990
1241
|
n()
|
|
991
|
-
],
|
|
992
|
-
|
|
1242
|
+
], J.prototype, "value", 2);
|
|
1243
|
+
C([
|
|
993
1244
|
n()
|
|
994
|
-
],
|
|
995
|
-
|
|
1245
|
+
], J.prototype, "disabled", 2);
|
|
1246
|
+
C([
|
|
996
1247
|
n()
|
|
997
|
-
],
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
],
|
|
1001
|
-
var
|
|
1002
|
-
for (var
|
|
1003
|
-
(o =
|
|
1004
|
-
return
|
|
1248
|
+
], J.prototype, "rows", 2);
|
|
1249
|
+
J = C([
|
|
1250
|
+
v("crt-textarea")
|
|
1251
|
+
], J);
|
|
1252
|
+
var ur = Object.defineProperty, mr = Object.getOwnPropertyDescriptor, ht = (e, t, a, s) => {
|
|
1253
|
+
for (var r = s > 1 ? void 0 : s ? mr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
|
|
1254
|
+
(o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
|
|
1255
|
+
return s && r && ur(t, a, r), r;
|
|
1005
1256
|
};
|
|
1006
|
-
let
|
|
1257
|
+
let F = class extends h {
|
|
1007
1258
|
constructor() {
|
|
1008
1259
|
super(...arguments), this.href = "#", this.target = "", this.iconLeft = !1, this.iconRight = !1, this.icon = "";
|
|
1009
1260
|
}
|
|
1010
1261
|
render() {
|
|
1011
|
-
return
|
|
1262
|
+
return l`
|
|
1012
1263
|
<a href="${this.href}" ${this.target ? `target="${this.target}"` : ""}>
|
|
1013
|
-
${this.iconLeft ?
|
|
1264
|
+
${this.iconLeft ? l`<crt-icon name="${this.icon}"></crt-icon>` : ""}
|
|
1014
1265
|
<slot></slot>
|
|
1015
|
-
${this.iconRight ?
|
|
1266
|
+
${this.iconRight ? l`<crt-icon name="${this.icon}"></crt-icon>` : ""}
|
|
1016
1267
|
</a>
|
|
1017
1268
|
`;
|
|
1018
1269
|
}
|
|
1019
1270
|
};
|
|
1020
|
-
|
|
1271
|
+
F.styles = d`
|
|
1021
1272
|
:host {
|
|
1022
1273
|
--crt-link-color: var(--crt-primary);
|
|
1023
1274
|
}
|
|
@@ -1043,38 +1294,38 @@ I.styles = l`
|
|
|
1043
1294
|
color: var(--crt-primary-dark);
|
|
1044
1295
|
}
|
|
1045
1296
|
`;
|
|
1046
|
-
|
|
1297
|
+
ht([
|
|
1047
1298
|
n({ type: String })
|
|
1048
|
-
],
|
|
1049
|
-
|
|
1299
|
+
], F.prototype, "href", 2);
|
|
1300
|
+
ht([
|
|
1050
1301
|
n({ type: String })
|
|
1051
|
-
],
|
|
1052
|
-
|
|
1302
|
+
], F.prototype, "target", 2);
|
|
1303
|
+
ht([
|
|
1053
1304
|
n({ type: Boolean })
|
|
1054
|
-
],
|
|
1055
|
-
|
|
1305
|
+
], F.prototype, "iconLeft", 2);
|
|
1306
|
+
ht([
|
|
1056
1307
|
n({ type: Boolean })
|
|
1057
|
-
],
|
|
1058
|
-
|
|
1308
|
+
], F.prototype, "iconRight", 2);
|
|
1309
|
+
ht([
|
|
1059
1310
|
n({ type: String })
|
|
1060
|
-
],
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
],
|
|
1064
|
-
var
|
|
1065
|
-
for (var
|
|
1066
|
-
(o =
|
|
1067
|
-
return
|
|
1311
|
+
], F.prototype, "icon", 2);
|
|
1312
|
+
F = ht([
|
|
1313
|
+
v("crt-link")
|
|
1314
|
+
], F);
|
|
1315
|
+
var fr = Object.defineProperty, br = Object.getOwnPropertyDescriptor, st = (e, t, a, s) => {
|
|
1316
|
+
for (var r = s > 1 ? void 0 : s ? br(t, a) : t, i = e.length - 1, o; i >= 0; i--)
|
|
1317
|
+
(o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
|
|
1318
|
+
return s && r && fr(t, a, r), r;
|
|
1068
1319
|
};
|
|
1069
|
-
let
|
|
1320
|
+
let E = class extends h {
|
|
1070
1321
|
constructor() {
|
|
1071
|
-
super(...arguments), this.accept = "", this.multiple = !0, this.name = "", this.maxSize = 10485760, this.maxFiles = 10, this.files = [], this._handleFileSelect = (
|
|
1072
|
-
const t =
|
|
1322
|
+
super(...arguments), this.accept = "", this.multiple = !0, this.name = "", this.maxSize = 10485760, this.maxFiles = 10, this.files = [], this._handleFileSelect = (e) => {
|
|
1323
|
+
const t = e.target;
|
|
1073
1324
|
t.files && (this._addFiles(Array.from(t.files)), t.value = "");
|
|
1074
1325
|
}, this._handleUploadClick = () => {
|
|
1075
1326
|
this.shadowRoot?.querySelector('input[type="file"]')?.click();
|
|
1076
|
-
}, this._handleRemoveFile = (
|
|
1077
|
-
this.files = this.files.filter((t) => t.id !==
|
|
1327
|
+
}, this._handleRemoveFile = (e) => {
|
|
1328
|
+
this.files = this.files.filter((t) => t.id !== e), this.dispatchEvent(new CustomEvent("files-changed", {
|
|
1078
1329
|
detail: { files: this.files.map((t) => t.file) }
|
|
1079
1330
|
}));
|
|
1080
1331
|
}, this._handleClearAll = () => {
|
|
@@ -1092,44 +1343,44 @@ let P = class extends p {
|
|
|
1092
1343
|
_generateId() {
|
|
1093
1344
|
return Math.random().toString(36).substring(2, 9);
|
|
1094
1345
|
}
|
|
1095
|
-
_addFiles(
|
|
1096
|
-
const
|
|
1097
|
-
if (
|
|
1098
|
-
return console.warn(`File ${
|
|
1346
|
+
_addFiles(e) {
|
|
1347
|
+
const s = e.filter((r) => {
|
|
1348
|
+
if (r.size > this.maxSize)
|
|
1349
|
+
return console.warn(`File ${r.name} exceeds max size`), !1;
|
|
1099
1350
|
if (this.accept) {
|
|
1100
|
-
const
|
|
1101
|
-
if (!
|
|
1102
|
-
return console.warn(`File ${
|
|
1351
|
+
const i = this.accept.split(",").map((g) => g.trim()), o = r.type, c = "." + r.name.split(".").pop()?.toLowerCase();
|
|
1352
|
+
if (!i.some((g) => g.startsWith(".") ? c === g.toLowerCase() : g.endsWith("/*") ? o.startsWith(g.replace("/*", "/")) : o === g))
|
|
1353
|
+
return console.warn(`File ${r.name} type not accepted`), !1;
|
|
1103
1354
|
}
|
|
1104
1355
|
return !0;
|
|
1105
|
-
}).slice(0, this.maxFiles - this.files.length).map((
|
|
1106
|
-
file:
|
|
1356
|
+
}).slice(0, this.maxFiles - this.files.length).map((r) => ({
|
|
1357
|
+
file: r,
|
|
1107
1358
|
id: this._generateId(),
|
|
1108
1359
|
progress: 100,
|
|
1109
1360
|
status: "complete"
|
|
1110
1361
|
}));
|
|
1111
|
-
this.files = [...this.files, ...
|
|
1112
|
-
detail: { files: this.files.map((
|
|
1362
|
+
this.files = [...this.files, ...s], this.dispatchEvent(new CustomEvent("files-changed", {
|
|
1363
|
+
detail: { files: this.files.map((r) => r.file) }
|
|
1113
1364
|
}));
|
|
1114
1365
|
}
|
|
1115
1366
|
/** Public method to clear all files */
|
|
1116
1367
|
clearFiles() {
|
|
1117
1368
|
this._handleClearAll();
|
|
1118
1369
|
}
|
|
1119
|
-
_formatFileSize(
|
|
1120
|
-
if (
|
|
1121
|
-
const t = 1024, a = ["B", "KB", "MB", "GB"],
|
|
1122
|
-
return parseFloat((
|
|
1370
|
+
_formatFileSize(e) {
|
|
1371
|
+
if (e === 0) return "0 B";
|
|
1372
|
+
const t = 1024, a = ["B", "KB", "MB", "GB"], s = Math.floor(Math.log(e) / Math.log(t));
|
|
1373
|
+
return parseFloat((e / Math.pow(t, s)).toFixed(1)) + " " + a[s];
|
|
1123
1374
|
}
|
|
1124
|
-
_getFileIcon(
|
|
1125
|
-
const t =
|
|
1375
|
+
_getFileIcon(e) {
|
|
1376
|
+
const t = e.name.split(".").pop()?.toLowerCase() || "", a = e.type;
|
|
1126
1377
|
return a.startsWith("image/") ? "[IMG]" : a.startsWith("video/") ? "[VID]" : a.startsWith("audio/") ? "[AUD]" : a === "application/pdf" ? "[PDF]" : ["doc", "docx"].includes(t) ? "[DOC]" : ["xls", "xlsx"].includes(t) ? "[XLS]" : ["zip", "rar", "7z", "tar", "gz"].includes(t) ? "[ZIP]" : ["js", "ts", "py", "java", "cpp", "c", "html", "css"].includes(t) ? "[COD]" : ["txt", "md", "json", "xml"].includes(t) ? "[TXT]" : "[FIL]";
|
|
1127
1378
|
}
|
|
1128
1379
|
_getTotalSize() {
|
|
1129
|
-
return this.files.reduce((
|
|
1380
|
+
return this.files.reduce((e, t) => e + t.file.size, 0);
|
|
1130
1381
|
}
|
|
1131
1382
|
render() {
|
|
1132
|
-
return
|
|
1383
|
+
return l`
|
|
1133
1384
|
<div class="file-manager">
|
|
1134
1385
|
<!-- Header -->
|
|
1135
1386
|
<div class="fm-header">
|
|
@@ -1154,7 +1405,7 @@ let P = class extends p {
|
|
|
1154
1405
|
</div>
|
|
1155
1406
|
|
|
1156
1407
|
<!-- File List -->
|
|
1157
|
-
${this.files.length > 0 ?
|
|
1408
|
+
${this.files.length > 0 ? l`
|
|
1158
1409
|
<div class="file-list-header">
|
|
1159
1410
|
<span>FILENAME</span>
|
|
1160
1411
|
<span style="text-align: right;">SIZE</span>
|
|
@@ -1162,25 +1413,25 @@ let P = class extends p {
|
|
|
1162
1413
|
<span style="text-align: center;">ACT</span>
|
|
1163
1414
|
</div>
|
|
1164
1415
|
<div class="file-list">
|
|
1165
|
-
${this.files.map((
|
|
1416
|
+
${this.files.map((e) => l`
|
|
1166
1417
|
<div class="file-item">
|
|
1167
1418
|
<div class="file-info">
|
|
1168
|
-
<span class="file-icon">${this._getFileIcon(
|
|
1169
|
-
<span class="file-name">${
|
|
1419
|
+
<span class="file-icon">${this._getFileIcon(e.file)}</span>
|
|
1420
|
+
<span class="file-name">${e.file.name}</span>
|
|
1170
1421
|
</div>
|
|
1171
|
-
<span class="file-size">${this._formatFileSize(
|
|
1172
|
-
<span class="file-status ${
|
|
1422
|
+
<span class="file-size">${this._formatFileSize(e.file.size)}</span>
|
|
1423
|
+
<span class="file-status ${e.status}">${e.status.toUpperCase()}</span>
|
|
1173
1424
|
<div class="file-actions">
|
|
1174
1425
|
<button
|
|
1175
1426
|
class="file-remove"
|
|
1176
|
-
@click="${() => this._handleRemoveFile(
|
|
1427
|
+
@click="${() => this._handleRemoveFile(e.id)}"
|
|
1177
1428
|
title="Remove file"
|
|
1178
1429
|
>X</button>
|
|
1179
1430
|
</div>
|
|
1180
1431
|
</div>
|
|
1181
1432
|
`)}
|
|
1182
1433
|
</div>
|
|
1183
|
-
` :
|
|
1434
|
+
` : l`
|
|
1184
1435
|
<div class="empty-state">
|
|
1185
1436
|
<div class="empty-icon">[---]</div>
|
|
1186
1437
|
<div>NO FILES LOADED</div>
|
|
@@ -1193,7 +1444,7 @@ let P = class extends p {
|
|
|
1193
1444
|
READY FOR TRANSFER
|
|
1194
1445
|
</span>
|
|
1195
1446
|
<div class="fm-footer-actions">
|
|
1196
|
-
${this.files.length > 0 ?
|
|
1447
|
+
${this.files.length > 0 ? l`
|
|
1197
1448
|
<crt-button size="small" variant="error" @click="${this._handleClearAll}">
|
|
1198
1449
|
CLEAR ALL
|
|
1199
1450
|
</crt-button>
|
|
@@ -1207,7 +1458,7 @@ let P = class extends p {
|
|
|
1207
1458
|
`;
|
|
1208
1459
|
}
|
|
1209
1460
|
};
|
|
1210
|
-
|
|
1461
|
+
E.styles = d`
|
|
1211
1462
|
:host {
|
|
1212
1463
|
display: block;
|
|
1213
1464
|
font-family: var(--crt-font-family);
|
|
@@ -1502,33 +1753,33 @@ P.styles = l`
|
|
|
1502
1753
|
transition: width 0.3s ease;
|
|
1503
1754
|
}
|
|
1504
1755
|
`;
|
|
1505
|
-
|
|
1756
|
+
st([
|
|
1506
1757
|
n({ type: String })
|
|
1507
|
-
],
|
|
1508
|
-
|
|
1758
|
+
], E.prototype, "accept", 2);
|
|
1759
|
+
st([
|
|
1509
1760
|
n({ type: Boolean })
|
|
1510
|
-
],
|
|
1511
|
-
|
|
1761
|
+
], E.prototype, "multiple", 2);
|
|
1762
|
+
st([
|
|
1512
1763
|
n({ type: String })
|
|
1513
|
-
],
|
|
1514
|
-
|
|
1764
|
+
], E.prototype, "name", 2);
|
|
1765
|
+
st([
|
|
1515
1766
|
n({ type: Number })
|
|
1516
|
-
],
|
|
1517
|
-
|
|
1767
|
+
], E.prototype, "maxSize", 2);
|
|
1768
|
+
st([
|
|
1518
1769
|
n({ type: Number })
|
|
1519
|
-
],
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
],
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
],
|
|
1526
|
-
var
|
|
1527
|
-
for (var
|
|
1528
|
-
(o =
|
|
1529
|
-
return
|
|
1770
|
+
], E.prototype, "maxFiles", 2);
|
|
1771
|
+
st([
|
|
1772
|
+
m()
|
|
1773
|
+
], E.prototype, "files", 2);
|
|
1774
|
+
E = st([
|
|
1775
|
+
v("crt-file-upload")
|
|
1776
|
+
], E);
|
|
1777
|
+
var yr = Object.defineProperty, xr = Object.getOwnPropertyDescriptor, O = (e, t, a, s) => {
|
|
1778
|
+
for (var r = s > 1 ? void 0 : s ? xr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
|
|
1779
|
+
(o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
|
|
1780
|
+
return s && r && yr(t, a, r), r;
|
|
1530
1781
|
};
|
|
1531
|
-
let
|
|
1782
|
+
let x = class extends h {
|
|
1532
1783
|
constructor() {
|
|
1533
1784
|
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 = [
|
|
1534
1785
|
"Januar",
|
|
@@ -1543,8 +1794,8 @@ let m = class extends p {
|
|
|
1543
1794
|
"Oktober",
|
|
1544
1795
|
"November",
|
|
1545
1796
|
"Dezember"
|
|
1546
|
-
], this._handleOutsideClick = (
|
|
1547
|
-
this.contains(
|
|
1797
|
+
], this._handleOutsideClick = (e) => {
|
|
1798
|
+
this.contains(e.target) || (this._isOpen = !1);
|
|
1548
1799
|
};
|
|
1549
1800
|
}
|
|
1550
1801
|
connectedCallback() {
|
|
@@ -1554,15 +1805,15 @@ let m = class extends p {
|
|
|
1554
1805
|
super.disconnectedCallback(), document.removeEventListener("click", this._handleOutsideClick);
|
|
1555
1806
|
}
|
|
1556
1807
|
_parseValue() {
|
|
1557
|
-
const
|
|
1558
|
-
if (
|
|
1559
|
-
const [t, a,
|
|
1560
|
-
this._selectedDate = new Date(
|
|
1808
|
+
const e = this.value.split(".");
|
|
1809
|
+
if (e.length === 3) {
|
|
1810
|
+
const [t, a, s] = e.map(Number);
|
|
1811
|
+
this._selectedDate = new Date(s, a - 1, t), this._viewDate = new Date(this._selectedDate);
|
|
1561
1812
|
}
|
|
1562
1813
|
}
|
|
1563
|
-
_formatDate(
|
|
1564
|
-
const t = String(
|
|
1565
|
-
return `${t}.${a}.${
|
|
1814
|
+
_formatDate(e) {
|
|
1815
|
+
const t = String(e.getDate()).padStart(2, "0"), a = String(e.getMonth() + 1).padStart(2, "0"), s = e.getFullYear();
|
|
1816
|
+
return `${t}.${a}.${s}`;
|
|
1566
1817
|
}
|
|
1567
1818
|
_toggleCalendar() {
|
|
1568
1819
|
this.disabled || (this._isOpen = !this._isOpen);
|
|
@@ -1581,9 +1832,9 @@ let m = class extends p {
|
|
|
1581
1832
|
1
|
|
1582
1833
|
);
|
|
1583
1834
|
}
|
|
1584
|
-
_selectDate(
|
|
1585
|
-
this._selectedDate =
|
|
1586
|
-
detail: { value: this.value, date:
|
|
1835
|
+
_selectDate(e) {
|
|
1836
|
+
this._selectedDate = e, this.value = this._formatDate(e), this._isOpen = !1, this.dispatchEvent(new CustomEvent("change", {
|
|
1837
|
+
detail: { value: this.value, date: e }
|
|
1587
1838
|
}));
|
|
1588
1839
|
}
|
|
1589
1840
|
_selectToday() {
|
|
@@ -1594,55 +1845,55 @@ let m = class extends p {
|
|
|
1594
1845
|
detail: { value: "", date: null }
|
|
1595
1846
|
}));
|
|
1596
1847
|
}
|
|
1597
|
-
_getDaysInMonth(
|
|
1598
|
-
return new Date(
|
|
1848
|
+
_getDaysInMonth(e, t) {
|
|
1849
|
+
return new Date(e, t + 1, 0).getDate();
|
|
1599
1850
|
}
|
|
1600
|
-
_getFirstDayOfMonth(
|
|
1601
|
-
const a = new Date(
|
|
1851
|
+
_getFirstDayOfMonth(e, t) {
|
|
1852
|
+
const a = new Date(e, t, 1).getDay();
|
|
1602
1853
|
return a === 0 ? 6 : a - 1;
|
|
1603
1854
|
}
|
|
1604
|
-
_isToday(
|
|
1855
|
+
_isToday(e) {
|
|
1605
1856
|
const t = /* @__PURE__ */ new Date();
|
|
1606
|
-
return
|
|
1857
|
+
return e.getDate() === t.getDate() && e.getMonth() === t.getMonth() && e.getFullYear() === t.getFullYear();
|
|
1607
1858
|
}
|
|
1608
|
-
_isSelected(
|
|
1609
|
-
return this._selectedDate ?
|
|
1859
|
+
_isSelected(e) {
|
|
1860
|
+
return this._selectedDate ? e.getDate() === this._selectedDate.getDate() && e.getMonth() === this._selectedDate.getMonth() && e.getFullYear() === this._selectedDate.getFullYear() : !1;
|
|
1610
1861
|
}
|
|
1611
1862
|
_renderDays() {
|
|
1612
|
-
const
|
|
1613
|
-
for (let
|
|
1614
|
-
const
|
|
1615
|
-
|
|
1616
|
-
<div class="day other-month" @click="${() => this._selectDate(
|
|
1617
|
-
${
|
|
1863
|
+
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 = [];
|
|
1864
|
+
for (let c = s - 1; c >= 0; c--) {
|
|
1865
|
+
const p = new Date(e, t - 1, r - c);
|
|
1866
|
+
i.push(l`
|
|
1867
|
+
<div class="day other-month" @click="${() => this._selectDate(p)}">
|
|
1868
|
+
${r - c}
|
|
1618
1869
|
</div>
|
|
1619
1870
|
`);
|
|
1620
1871
|
}
|
|
1621
|
-
for (let
|
|
1622
|
-
const
|
|
1623
|
-
|
|
1872
|
+
for (let c = 1; c <= a; c++) {
|
|
1873
|
+
const p = new Date(e, t, c), g = this._isToday(p), b = this._isSelected(p);
|
|
1874
|
+
i.push(l`
|
|
1624
1875
|
<div
|
|
1625
|
-
class="day ${
|
|
1626
|
-
@click="${() => this._selectDate(
|
|
1876
|
+
class="day ${g ? "today" : ""} ${b ? "selected" : ""}"
|
|
1877
|
+
@click="${() => this._selectDate(p)}"
|
|
1627
1878
|
>
|
|
1628
|
-
${
|
|
1879
|
+
${c}
|
|
1629
1880
|
</div>
|
|
1630
1881
|
`);
|
|
1631
1882
|
}
|
|
1632
|
-
const o = 42 -
|
|
1633
|
-
for (let
|
|
1634
|
-
const
|
|
1635
|
-
|
|
1636
|
-
<div class="day other-month" @click="${() => this._selectDate(
|
|
1637
|
-
${
|
|
1883
|
+
const o = 42 - i.length;
|
|
1884
|
+
for (let c = 1; c <= o; c++) {
|
|
1885
|
+
const p = new Date(e, t + 1, c);
|
|
1886
|
+
i.push(l`
|
|
1887
|
+
<div class="day other-month" @click="${() => this._selectDate(p)}">
|
|
1888
|
+
${c}
|
|
1638
1889
|
</div>
|
|
1639
1890
|
`);
|
|
1640
1891
|
}
|
|
1641
|
-
return
|
|
1892
|
+
return i;
|
|
1642
1893
|
}
|
|
1643
1894
|
render() {
|
|
1644
|
-
const
|
|
1645
|
-
return
|
|
1895
|
+
const e = `${this._months[this._viewDate.getMonth()]} ${this._viewDate.getFullYear()}`;
|
|
1896
|
+
return l`
|
|
1646
1897
|
<div class="calendar-wrapper">
|
|
1647
1898
|
<div class="calendar-input">
|
|
1648
1899
|
<input
|
|
@@ -1666,12 +1917,12 @@ let m = class extends p {
|
|
|
1666
1917
|
<div class="calendar-dropdown ${this._isOpen ? "open" : ""}">
|
|
1667
1918
|
<div class="calendar-header">
|
|
1668
1919
|
<button class="calendar-nav-btn" @click="${this._prevMonth}">◄</button>
|
|
1669
|
-
<span class="calendar-title">${
|
|
1920
|
+
<span class="calendar-title">${e}</span>
|
|
1670
1921
|
<button class="calendar-nav-btn" @click="${this._nextMonth}">►</button>
|
|
1671
1922
|
</div>
|
|
1672
1923
|
|
|
1673
1924
|
<div class="calendar-weekdays">
|
|
1674
|
-
${this._weekdays.map((t) =>
|
|
1925
|
+
${this._weekdays.map((t) => l`<div class="weekday">${t}</div>`)}
|
|
1675
1926
|
</div>
|
|
1676
1927
|
|
|
1677
1928
|
<div class="calendar-days">
|
|
@@ -1687,7 +1938,7 @@ let m = class extends p {
|
|
|
1687
1938
|
`;
|
|
1688
1939
|
}
|
|
1689
1940
|
};
|
|
1690
|
-
|
|
1941
|
+
x.styles = d`
|
|
1691
1942
|
:host {
|
|
1692
1943
|
display: inline-block;
|
|
1693
1944
|
font-family: var(--crt-font-family);
|
|
@@ -1892,56 +2143,56 @@ m.styles = l`
|
|
|
1892
2143
|
color: var(--crt-bg-dark);
|
|
1893
2144
|
}
|
|
1894
2145
|
`;
|
|
1895
|
-
|
|
2146
|
+
O([
|
|
1896
2147
|
n({ type: String })
|
|
1897
|
-
],
|
|
1898
|
-
|
|
2148
|
+
], x.prototype, "value", 2);
|
|
2149
|
+
O([
|
|
1899
2150
|
n({ type: String })
|
|
1900
|
-
],
|
|
1901
|
-
|
|
2151
|
+
], x.prototype, "placeholder", 2);
|
|
2152
|
+
O([
|
|
1902
2153
|
n({ type: String })
|
|
1903
|
-
],
|
|
1904
|
-
|
|
2154
|
+
], x.prototype, "format", 2);
|
|
2155
|
+
O([
|
|
1905
2156
|
n({ type: String })
|
|
1906
|
-
],
|
|
1907
|
-
|
|
2157
|
+
], x.prototype, "min", 2);
|
|
2158
|
+
O([
|
|
1908
2159
|
n({ type: String })
|
|
1909
|
-
],
|
|
1910
|
-
|
|
2160
|
+
], x.prototype, "max", 2);
|
|
2161
|
+
O([
|
|
1911
2162
|
n({ type: Boolean })
|
|
1912
|
-
],
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
],
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
],
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
],
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
],
|
|
1925
|
-
var
|
|
1926
|
-
for (var
|
|
1927
|
-
(o =
|
|
1928
|
-
return
|
|
2163
|
+
], x.prototype, "disabled", 2);
|
|
2164
|
+
O([
|
|
2165
|
+
m()
|
|
2166
|
+
], x.prototype, "_isOpen", 2);
|
|
2167
|
+
O([
|
|
2168
|
+
m()
|
|
2169
|
+
], x.prototype, "_viewDate", 2);
|
|
2170
|
+
O([
|
|
2171
|
+
m()
|
|
2172
|
+
], x.prototype, "_selectedDate", 2);
|
|
2173
|
+
x = O([
|
|
2174
|
+
v("crt-calendar")
|
|
2175
|
+
], x);
|
|
2176
|
+
var wr = Object.defineProperty, kr = Object.getOwnPropertyDescriptor, it = (e, t, a, s) => {
|
|
2177
|
+
for (var r = s > 1 ? void 0 : s ? kr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
|
|
2178
|
+
(o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
|
|
2179
|
+
return s && r && wr(t, a, r), r;
|
|
1929
2180
|
};
|
|
1930
|
-
let
|
|
2181
|
+
let M = class extends h {
|
|
1931
2182
|
constructor() {
|
|
1932
|
-
super(...arguments), this.value = "", this.placeholder = "Select...", this.label = "", this.disabled = !1, this.options = [], this._isOpen = !1, this._handleOutsideClick = (
|
|
1933
|
-
this.contains(
|
|
2183
|
+
super(...arguments), this.value = "", this.placeholder = "Select...", this.label = "", this.disabled = !1, this.options = [], this._isOpen = !1, this._handleOutsideClick = (e) => {
|
|
2184
|
+
this.contains(e.target) || (this._isOpen = !1);
|
|
1934
2185
|
};
|
|
1935
2186
|
}
|
|
1936
2187
|
// Normalize options to flat array with group property
|
|
1937
2188
|
_getNormalizedOptions() {
|
|
1938
|
-
const
|
|
2189
|
+
const e = [];
|
|
1939
2190
|
for (const t of this.options)
|
|
1940
2191
|
if ("options" in t && Array.isArray(t.options))
|
|
1941
2192
|
for (const a of t.options)
|
|
1942
|
-
|
|
1943
|
-
else "value" in t &&
|
|
1944
|
-
return
|
|
2193
|
+
e.push({ ...a, group: t.group });
|
|
2194
|
+
else "value" in t && e.push(t);
|
|
2195
|
+
return e;
|
|
1945
2196
|
}
|
|
1946
2197
|
connectedCallback() {
|
|
1947
2198
|
super.connectedCallback(), document.addEventListener("click", this._handleOutsideClick);
|
|
@@ -1952,51 +2203,51 @@ let C = class extends p {
|
|
|
1952
2203
|
_toggle() {
|
|
1953
2204
|
this.disabled || (this._isOpen = !this._isOpen);
|
|
1954
2205
|
}
|
|
1955
|
-
_selectOption(
|
|
1956
|
-
|
|
1957
|
-
detail: { value:
|
|
2206
|
+
_selectOption(e) {
|
|
2207
|
+
e.disabled || (this.value = e.value, this._isOpen = !1, this.dispatchEvent(new CustomEvent("change", {
|
|
2208
|
+
detail: { value: e.value, label: e.label }
|
|
1958
2209
|
})));
|
|
1959
2210
|
}
|
|
1960
2211
|
_getSelectedLabel() {
|
|
1961
2212
|
return this._getNormalizedOptions().find((a) => a.value === this.value)?.label || "";
|
|
1962
2213
|
}
|
|
1963
2214
|
_renderOptions() {
|
|
1964
|
-
const
|
|
1965
|
-
|
|
1966
|
-
|
|
2215
|
+
const e = this._getNormalizedOptions(), t = /* @__PURE__ */ new Map(), a = [];
|
|
2216
|
+
e.forEach((r) => {
|
|
2217
|
+
r.group ? (t.has(r.group) || t.set(r.group, []), t.get(r.group).push(r)) : a.push(r);
|
|
1967
2218
|
});
|
|
1968
|
-
const
|
|
1969
|
-
for (const
|
|
1970
|
-
|
|
1971
|
-
for (const [
|
|
1972
|
-
|
|
1973
|
-
for (const o of
|
|
1974
|
-
|
|
2219
|
+
const s = [];
|
|
2220
|
+
for (const r of a)
|
|
2221
|
+
s.push(this._renderOption(r));
|
|
2222
|
+
for (const [r, i] of t) {
|
|
2223
|
+
s.push(l`<div class="select-group-label">${r}</div>`);
|
|
2224
|
+
for (const o of i)
|
|
2225
|
+
s.push(this._renderOption(o));
|
|
1975
2226
|
}
|
|
1976
|
-
return
|
|
2227
|
+
return s;
|
|
1977
2228
|
}
|
|
1978
|
-
_renderOption(
|
|
1979
|
-
const t =
|
|
1980
|
-
return
|
|
2229
|
+
_renderOption(e) {
|
|
2230
|
+
const t = e.value === this.value;
|
|
2231
|
+
return l`
|
|
1981
2232
|
<div
|
|
1982
|
-
class="select-option ${t ? "selected" : ""} ${
|
|
1983
|
-
@click="${() => this._selectOption(
|
|
2233
|
+
class="select-option ${t ? "selected" : ""} ${e.disabled ? "disabled" : ""}"
|
|
2234
|
+
@click="${() => this._selectOption(e)}"
|
|
1984
2235
|
>
|
|
1985
|
-
${
|
|
2236
|
+
${e.label}
|
|
1986
2237
|
</div>
|
|
1987
2238
|
`;
|
|
1988
2239
|
}
|
|
1989
2240
|
render() {
|
|
1990
|
-
const
|
|
1991
|
-
return
|
|
1992
|
-
${this.label ?
|
|
2241
|
+
const e = this._getSelectedLabel();
|
|
2242
|
+
return l`
|
|
2243
|
+
${this.label ? l`<label class="select-label">${this.label}</label>` : ""}
|
|
1993
2244
|
<div class="select-wrapper">
|
|
1994
2245
|
<div
|
|
1995
2246
|
class="select-trigger ${this._isOpen ? "open" : ""} ${this.disabled ? "disabled" : ""}"
|
|
1996
2247
|
@click="${this._toggle}"
|
|
1997
2248
|
>
|
|
1998
|
-
<span class="select-value ${
|
|
1999
|
-
${
|
|
2249
|
+
<span class="select-value ${e ? "" : "placeholder"}">
|
|
2250
|
+
${e || this.placeholder}
|
|
2000
2251
|
</span>
|
|
2001
2252
|
<span class="select-arrow">▼</span>
|
|
2002
2253
|
</div>
|
|
@@ -2008,7 +2259,7 @@ let C = class extends p {
|
|
|
2008
2259
|
`;
|
|
2009
2260
|
}
|
|
2010
2261
|
};
|
|
2011
|
-
|
|
2262
|
+
M.styles = d`
|
|
2012
2263
|
:host {
|
|
2013
2264
|
display: inline-block;
|
|
2014
2265
|
font-family: var(--crt-font-family);
|
|
@@ -2165,44 +2416,44 @@ C.styles = l`
|
|
|
2165
2416
|
box-shadow: var(--crt-glow-sm);
|
|
2166
2417
|
}
|
|
2167
2418
|
`;
|
|
2168
|
-
|
|
2419
|
+
it([
|
|
2169
2420
|
n({ type: String })
|
|
2170
|
-
],
|
|
2171
|
-
|
|
2421
|
+
], M.prototype, "value", 2);
|
|
2422
|
+
it([
|
|
2172
2423
|
n({ type: String })
|
|
2173
|
-
],
|
|
2174
|
-
|
|
2424
|
+
], M.prototype, "placeholder", 2);
|
|
2425
|
+
it([
|
|
2175
2426
|
n({ type: String })
|
|
2176
|
-
],
|
|
2177
|
-
|
|
2427
|
+
], M.prototype, "label", 2);
|
|
2428
|
+
it([
|
|
2178
2429
|
n({ type: Boolean })
|
|
2179
|
-
],
|
|
2180
|
-
|
|
2430
|
+
], M.prototype, "disabled", 2);
|
|
2431
|
+
it([
|
|
2181
2432
|
n({ type: Array })
|
|
2182
|
-
],
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
],
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
],
|
|
2189
|
-
var
|
|
2190
|
-
for (var
|
|
2191
|
-
(o =
|
|
2192
|
-
return
|
|
2433
|
+
], M.prototype, "options", 2);
|
|
2434
|
+
it([
|
|
2435
|
+
m()
|
|
2436
|
+
], M.prototype, "_isOpen", 2);
|
|
2437
|
+
M = it([
|
|
2438
|
+
v("crt-select")
|
|
2439
|
+
], M);
|
|
2440
|
+
var $r = Object.defineProperty, _r = Object.getOwnPropertyDescriptor, y = (e, t, a, s) => {
|
|
2441
|
+
for (var r = s > 1 ? void 0 : s ? _r(t, a) : t, i = e.length - 1, o; i >= 0; i--)
|
|
2442
|
+
(o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
|
|
2443
|
+
return s && r && $r(t, a, r), r;
|
|
2193
2444
|
};
|
|
2194
|
-
let
|
|
2445
|
+
let H = class extends h {
|
|
2195
2446
|
constructor() {
|
|
2196
2447
|
super(...arguments), this.checked = !1, this.disabled = !1, this.indeterminate = !1, this.label = "", this.value = "";
|
|
2197
2448
|
}
|
|
2198
|
-
_handleChange(
|
|
2199
|
-
const t =
|
|
2449
|
+
_handleChange(e) {
|
|
2450
|
+
const t = e.target;
|
|
2200
2451
|
this.checked = t.checked, this.indeterminate = !1, this.dispatchEvent(new CustomEvent("change", {
|
|
2201
2452
|
detail: { checked: this.checked, value: this.value }
|
|
2202
2453
|
}));
|
|
2203
2454
|
}
|
|
2204
2455
|
render() {
|
|
2205
|
-
return
|
|
2456
|
+
return l`
|
|
2206
2457
|
<label class="checkbox-wrapper">
|
|
2207
2458
|
<input
|
|
2208
2459
|
type="checkbox"
|
|
@@ -2215,11 +2466,11 @@ let L = class extends p {
|
|
|
2215
2466
|
<span class="checkmark">${this.indeterminate ? "−" : "✓"}</span>
|
|
2216
2467
|
</div>
|
|
2217
2468
|
</label>
|
|
2218
|
-
${this.label ?
|
|
2469
|
+
${this.label ? l`<span class="label">${this.label}</span>` : ""}
|
|
2219
2470
|
`;
|
|
2220
2471
|
}
|
|
2221
2472
|
};
|
|
2222
|
-
|
|
2473
|
+
H.styles = d`
|
|
2223
2474
|
:host {
|
|
2224
2475
|
display: inline-flex;
|
|
2225
2476
|
align-items: center;
|
|
@@ -2301,36 +2552,36 @@ L.styles = l`
|
|
|
2301
2552
|
transform: scale(1);
|
|
2302
2553
|
}
|
|
2303
2554
|
`;
|
|
2304
|
-
|
|
2555
|
+
y([
|
|
2305
2556
|
n({ type: Boolean, reflect: !0 })
|
|
2306
|
-
],
|
|
2307
|
-
|
|
2557
|
+
], H.prototype, "checked", 2);
|
|
2558
|
+
y([
|
|
2308
2559
|
n({ type: Boolean, reflect: !0 })
|
|
2309
|
-
],
|
|
2310
|
-
|
|
2560
|
+
], H.prototype, "disabled", 2);
|
|
2561
|
+
y([
|
|
2311
2562
|
n({ type: Boolean })
|
|
2312
|
-
],
|
|
2313
|
-
|
|
2563
|
+
], H.prototype, "indeterminate", 2);
|
|
2564
|
+
y([
|
|
2314
2565
|
n({ type: String })
|
|
2315
|
-
],
|
|
2316
|
-
|
|
2566
|
+
], H.prototype, "label", 2);
|
|
2567
|
+
y([
|
|
2317
2568
|
n({ type: String })
|
|
2318
|
-
],
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
],
|
|
2322
|
-
let
|
|
2569
|
+
], H.prototype, "value", 2);
|
|
2570
|
+
H = y([
|
|
2571
|
+
v("crt-checkbox")
|
|
2572
|
+
], H);
|
|
2573
|
+
let Y = class extends h {
|
|
2323
2574
|
constructor() {
|
|
2324
2575
|
super(...arguments), this.checked = !1, this.disabled = !1, this.label = "", this.value = "", this.name = "";
|
|
2325
2576
|
}
|
|
2326
|
-
_handleChange(
|
|
2327
|
-
|
|
2577
|
+
_handleChange(e) {
|
|
2578
|
+
e.target.checked && (this.checked = !0, this.dispatchEvent(new CustomEvent("change", {
|
|
2328
2579
|
detail: { checked: this.checked, value: this.value },
|
|
2329
2580
|
bubbles: !0
|
|
2330
2581
|
})));
|
|
2331
2582
|
}
|
|
2332
2583
|
render() {
|
|
2333
|
-
return
|
|
2584
|
+
return l`
|
|
2334
2585
|
<label class="radio-wrapper">
|
|
2335
2586
|
<input
|
|
2336
2587
|
type="radio"
|
|
@@ -2344,11 +2595,11 @@ let U = class extends p {
|
|
|
2344
2595
|
<div class="radio-dot"></div>
|
|
2345
2596
|
</div>
|
|
2346
2597
|
</label>
|
|
2347
|
-
${this.label ?
|
|
2598
|
+
${this.label ? l`<span class="label">${this.label}</span>` : ""}
|
|
2348
2599
|
`;
|
|
2349
2600
|
}
|
|
2350
2601
|
};
|
|
2351
|
-
|
|
2602
|
+
Y.styles = d`
|
|
2352
2603
|
:host {
|
|
2353
2604
|
display: inline-flex;
|
|
2354
2605
|
align-items: center;
|
|
@@ -2422,28 +2673,28 @@ U.styles = l`
|
|
|
2422
2673
|
user-select: none;
|
|
2423
2674
|
}
|
|
2424
2675
|
`;
|
|
2425
|
-
|
|
2676
|
+
y([
|
|
2426
2677
|
n({ type: Boolean, reflect: !0 })
|
|
2427
|
-
],
|
|
2428
|
-
|
|
2678
|
+
], Y.prototype, "checked", 2);
|
|
2679
|
+
y([
|
|
2429
2680
|
n({ type: Boolean, reflect: !0 })
|
|
2430
|
-
],
|
|
2431
|
-
|
|
2681
|
+
], Y.prototype, "disabled", 2);
|
|
2682
|
+
y([
|
|
2432
2683
|
n({ type: String })
|
|
2433
|
-
],
|
|
2434
|
-
|
|
2684
|
+
], Y.prototype, "label", 2);
|
|
2685
|
+
y([
|
|
2435
2686
|
n({ type: String })
|
|
2436
|
-
],
|
|
2437
|
-
|
|
2687
|
+
], Y.prototype, "value", 2);
|
|
2688
|
+
y([
|
|
2438
2689
|
n({ type: String })
|
|
2439
|
-
],
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
],
|
|
2443
|
-
let
|
|
2690
|
+
], Y.prototype, "name", 2);
|
|
2691
|
+
Y = y([
|
|
2692
|
+
v("crt-radio")
|
|
2693
|
+
], Y);
|
|
2694
|
+
let pt = class extends h {
|
|
2444
2695
|
constructor() {
|
|
2445
|
-
super(...arguments), this.name = "", this.value = "", this.horizontal = !1, this._handleChange = (
|
|
2446
|
-
const t =
|
|
2696
|
+
super(...arguments), this.name = "", this.value = "", this.horizontal = !1, this._handleChange = (e) => {
|
|
2697
|
+
const t = e.target;
|
|
2447
2698
|
t.tagName === "CRT-RADIO" && (this.value = t.value, this.querySelectorAll("crt-radio").forEach((a) => {
|
|
2448
2699
|
a.checked = a === t;
|
|
2449
2700
|
}), this.dispatchEvent(new CustomEvent("change", {
|
|
@@ -2458,10 +2709,10 @@ let Z = class extends p {
|
|
|
2458
2709
|
super.disconnectedCallback(), this.removeEventListener("change", this._handleChange);
|
|
2459
2710
|
}
|
|
2460
2711
|
render() {
|
|
2461
|
-
return
|
|
2712
|
+
return l`<slot></slot>`;
|
|
2462
2713
|
}
|
|
2463
2714
|
};
|
|
2464
|
-
|
|
2715
|
+
pt.styles = d`
|
|
2465
2716
|
:host {
|
|
2466
2717
|
display: flex;
|
|
2467
2718
|
flex-direction: column;
|
|
@@ -2474,24 +2725,24 @@ Z.styles = l`
|
|
|
2474
2725
|
gap: var(--crt-spacing-lg);
|
|
2475
2726
|
}
|
|
2476
2727
|
`;
|
|
2477
|
-
|
|
2728
|
+
y([
|
|
2478
2729
|
n({ type: String })
|
|
2479
|
-
],
|
|
2480
|
-
|
|
2730
|
+
], pt.prototype, "name", 2);
|
|
2731
|
+
y([
|
|
2481
2732
|
n({ type: String })
|
|
2482
|
-
],
|
|
2483
|
-
|
|
2733
|
+
], pt.prototype, "value", 2);
|
|
2734
|
+
y([
|
|
2484
2735
|
n({ type: Boolean, reflect: !0 })
|
|
2485
|
-
],
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
],
|
|
2489
|
-
var
|
|
2490
|
-
for (var
|
|
2491
|
-
(o =
|
|
2492
|
-
return
|
|
2736
|
+
], pt.prototype, "horizontal", 2);
|
|
2737
|
+
pt = y([
|
|
2738
|
+
v("crt-radio-group")
|
|
2739
|
+
], pt);
|
|
2740
|
+
var zr = Object.defineProperty, Cr = Object.getOwnPropertyDescriptor, P = (e, t, a, s) => {
|
|
2741
|
+
for (var r = s > 1 ? void 0 : s ? Cr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
|
|
2742
|
+
(o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
|
|
2743
|
+
return s && r && zr(t, a, r), r;
|
|
2493
2744
|
};
|
|
2494
|
-
let
|
|
2745
|
+
let w = class extends h {
|
|
2495
2746
|
constructor() {
|
|
2496
2747
|
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;
|
|
2497
2748
|
}
|
|
@@ -2499,25 +2750,25 @@ let b = class extends p {
|
|
|
2499
2750
|
return Math.min(100, Math.max(0, this.value / this.max * 100));
|
|
2500
2751
|
}
|
|
2501
2752
|
render() {
|
|
2502
|
-
const
|
|
2503
|
-
return
|
|
2753
|
+
const e = this._getPercentage();
|
|
2754
|
+
return l`
|
|
2504
2755
|
<div class="progress-wrapper">
|
|
2505
|
-
${this.label || this.showValue ?
|
|
2756
|
+
${this.label || this.showValue ? l`
|
|
2506
2757
|
<div class="progress-header">
|
|
2507
|
-
${this.label ?
|
|
2508
|
-
${this.showValue && !this.indeterminate ?
|
|
2509
|
-
<span class="progress-value">${Math.round(
|
|
2758
|
+
${this.label ? l`<span class="progress-label">${this.label}</span>` : ""}
|
|
2759
|
+
${this.showValue && !this.indeterminate ? l`
|
|
2760
|
+
<span class="progress-value">${Math.round(e)}%</span>
|
|
2510
2761
|
` : ""}
|
|
2511
2762
|
</div>
|
|
2512
2763
|
` : ""}
|
|
2513
2764
|
<div class="progress-track" role="progressbar" aria-valuenow="${this.value}" aria-valuemax="${this.max}">
|
|
2514
|
-
<div class="progress-bar" style="width: ${this.indeterminate ? "30" :
|
|
2765
|
+
<div class="progress-bar" style="width: ${this.indeterminate ? "30" : e}%"></div>
|
|
2515
2766
|
</div>
|
|
2516
2767
|
</div>
|
|
2517
2768
|
`;
|
|
2518
2769
|
}
|
|
2519
2770
|
};
|
|
2520
|
-
|
|
2771
|
+
w.styles = d`
|
|
2521
2772
|
:host {
|
|
2522
2773
|
display: block;
|
|
2523
2774
|
font-family: var(--crt-font-family);
|
|
@@ -2641,42 +2892,42 @@ b.styles = l`
|
|
|
2641
2892
|
);
|
|
2642
2893
|
}
|
|
2643
2894
|
`;
|
|
2644
|
-
|
|
2895
|
+
P([
|
|
2645
2896
|
n({ type: Number })
|
|
2646
|
-
],
|
|
2647
|
-
|
|
2897
|
+
], w.prototype, "value", 2);
|
|
2898
|
+
P([
|
|
2648
2899
|
n({ type: Number })
|
|
2649
|
-
],
|
|
2650
|
-
|
|
2900
|
+
], w.prototype, "max", 2);
|
|
2901
|
+
P([
|
|
2651
2902
|
n({ type: String })
|
|
2652
|
-
],
|
|
2653
|
-
|
|
2903
|
+
], w.prototype, "label", 2);
|
|
2904
|
+
P([
|
|
2654
2905
|
n({ type: Boolean, reflect: !0 })
|
|
2655
|
-
],
|
|
2656
|
-
|
|
2906
|
+
], w.prototype, "animated", 2);
|
|
2907
|
+
P([
|
|
2657
2908
|
n({ type: Boolean, reflect: !0 })
|
|
2658
|
-
],
|
|
2659
|
-
|
|
2909
|
+
], w.prototype, "indeterminate", 2);
|
|
2910
|
+
P([
|
|
2660
2911
|
n({ type: Boolean, reflect: !0 })
|
|
2661
|
-
],
|
|
2662
|
-
|
|
2912
|
+
], w.prototype, "segmented", 2);
|
|
2913
|
+
P([
|
|
2663
2914
|
n({ type: String, reflect: !0 })
|
|
2664
|
-
],
|
|
2665
|
-
|
|
2915
|
+
], w.prototype, "size", 2);
|
|
2916
|
+
P([
|
|
2666
2917
|
n({ type: String, reflect: !0 })
|
|
2667
|
-
],
|
|
2668
|
-
|
|
2918
|
+
], w.prototype, "variant", 2);
|
|
2919
|
+
P([
|
|
2669
2920
|
n({ type: Boolean })
|
|
2670
|
-
],
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
],
|
|
2674
|
-
var
|
|
2675
|
-
for (var
|
|
2676
|
-
(o =
|
|
2677
|
-
return
|
|
2921
|
+
], w.prototype, "showValue", 2);
|
|
2922
|
+
w = P([
|
|
2923
|
+
v("crt-progress")
|
|
2924
|
+
], w);
|
|
2925
|
+
var Or = Object.defineProperty, Pr = Object.getOwnPropertyDescriptor, Pt = (e, t, a, s) => {
|
|
2926
|
+
for (var r = s > 1 ? void 0 : s ? Pr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
|
|
2927
|
+
(o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
|
|
2928
|
+
return s && r && Or(t, a, r), r;
|
|
2678
2929
|
};
|
|
2679
|
-
let
|
|
2930
|
+
let tt = class extends h {
|
|
2680
2931
|
constructor() {
|
|
2681
2932
|
super(...arguments), this.text = "", this.position = "top", this.delay = 200, this._visible = !1;
|
|
2682
2933
|
}
|
|
@@ -2689,7 +2940,7 @@ let V = class extends p {
|
|
|
2689
2940
|
this._timeout && clearTimeout(this._timeout), this._visible = !1;
|
|
2690
2941
|
}
|
|
2691
2942
|
render() {
|
|
2692
|
-
return
|
|
2943
|
+
return l`
|
|
2693
2944
|
<div
|
|
2694
2945
|
class="trigger"
|
|
2695
2946
|
@mouseenter="${this._show}"
|
|
@@ -2705,7 +2956,7 @@ let V = class extends p {
|
|
|
2705
2956
|
`;
|
|
2706
2957
|
}
|
|
2707
2958
|
};
|
|
2708
|
-
|
|
2959
|
+
tt.styles = d`
|
|
2709
2960
|
:host {
|
|
2710
2961
|
display: inline-block;
|
|
2711
2962
|
position: relative;
|
|
@@ -2812,37 +3063,37 @@ V.styles = l`
|
|
|
2812
3063
|
border-right-color: var(--crt-primary);
|
|
2813
3064
|
}
|
|
2814
3065
|
`;
|
|
2815
|
-
|
|
3066
|
+
Pt([
|
|
2816
3067
|
n({ type: String })
|
|
2817
|
-
],
|
|
2818
|
-
|
|
3068
|
+
], tt.prototype, "text", 2);
|
|
3069
|
+
Pt([
|
|
2819
3070
|
n({ type: String, reflect: !0 })
|
|
2820
|
-
],
|
|
2821
|
-
|
|
3071
|
+
], tt.prototype, "position", 2);
|
|
3072
|
+
Pt([
|
|
2822
3073
|
n({ type: Number })
|
|
2823
|
-
],
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
],
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
],
|
|
2830
|
-
var
|
|
2831
|
-
for (var
|
|
2832
|
-
(o =
|
|
2833
|
-
return
|
|
3074
|
+
], tt.prototype, "delay", 2);
|
|
3075
|
+
Pt([
|
|
3076
|
+
m()
|
|
3077
|
+
], tt.prototype, "_visible", 2);
|
|
3078
|
+
tt = Pt([
|
|
3079
|
+
v("crt-tooltip")
|
|
3080
|
+
], tt);
|
|
3081
|
+
var Ar = Object.defineProperty, Sr = Object.getOwnPropertyDescriptor, oe = (e, t, a, s) => {
|
|
3082
|
+
for (var r = s > 1 ? void 0 : s ? Sr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
|
|
3083
|
+
(o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
|
|
3084
|
+
return s && r && Ar(t, a, r), r;
|
|
2834
3085
|
};
|
|
2835
|
-
let
|
|
3086
|
+
let kt = class extends h {
|
|
2836
3087
|
constructor() {
|
|
2837
3088
|
super(...arguments), this.items = [], this.separator = ">";
|
|
2838
3089
|
}
|
|
2839
3090
|
render() {
|
|
2840
|
-
return
|
|
3091
|
+
return l`
|
|
2841
3092
|
<nav class="breadcrumb" aria-label="Breadcrumb">
|
|
2842
|
-
${this.items.map((
|
|
3093
|
+
${this.items.map((e, t) => l`
|
|
2843
3094
|
<span class="item ${t === this.items.length - 1 ? "active" : ""}">
|
|
2844
|
-
${
|
|
2845
|
-
${t < this.items.length - 1 ?
|
|
3095
|
+
${e.href && t !== this.items.length - 1 ? l`<a href="${e.href}">${e.label}</a>` : l`<span class="text">${e.label}</span>`}
|
|
3096
|
+
${t < this.items.length - 1 ? l`<span class="separator">${this.separator}</span>` : ""}
|
|
2846
3097
|
</span>
|
|
2847
3098
|
`)}
|
|
2848
3099
|
<slot></slot>
|
|
@@ -2850,7 +3101,7 @@ let ct = class extends p {
|
|
|
2850
3101
|
`;
|
|
2851
3102
|
}
|
|
2852
3103
|
};
|
|
2853
|
-
|
|
3104
|
+
kt.styles = d`
|
|
2854
3105
|
:host {
|
|
2855
3106
|
display: block;
|
|
2856
3107
|
font-family: var(--crt-font-family);
|
|
@@ -2899,40 +3150,40 @@ ct.styles = l`
|
|
|
2899
3150
|
font-size: var(--crt-font-size-sm);
|
|
2900
3151
|
}
|
|
2901
3152
|
`;
|
|
2902
|
-
|
|
3153
|
+
oe([
|
|
2903
3154
|
n({ type: Array })
|
|
2904
|
-
],
|
|
2905
|
-
|
|
3155
|
+
], kt.prototype, "items", 2);
|
|
3156
|
+
oe([
|
|
2906
3157
|
n({ type: String })
|
|
2907
|
-
],
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
],
|
|
2911
|
-
var
|
|
2912
|
-
for (var
|
|
2913
|
-
(o =
|
|
2914
|
-
return
|
|
3158
|
+
], kt.prototype, "separator", 2);
|
|
3159
|
+
kt = oe([
|
|
3160
|
+
v("crt-breadcrumb")
|
|
3161
|
+
], kt);
|
|
3162
|
+
var Er = Object.defineProperty, Mr = Object.getOwnPropertyDescriptor, At = (e, t, a, s) => {
|
|
3163
|
+
for (var r = s > 1 ? void 0 : s ? Mr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
|
|
3164
|
+
(o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
|
|
3165
|
+
return s && r && Er(t, a, r), r;
|
|
2915
3166
|
};
|
|
2916
|
-
let
|
|
3167
|
+
let et = class extends h {
|
|
2917
3168
|
constructor() {
|
|
2918
3169
|
super(...arguments), this.current = 1, this.total = 1, this.siblings = 1, this.showInfo = !0;
|
|
2919
3170
|
}
|
|
2920
|
-
_goToPage(
|
|
2921
|
-
|
|
3171
|
+
_goToPage(e) {
|
|
3172
|
+
e >= 1 && e <= this.total && e !== this.current && (this.current = e, this.dispatchEvent(new CustomEvent("change", {
|
|
2922
3173
|
detail: { page: this.current }
|
|
2923
3174
|
})));
|
|
2924
3175
|
}
|
|
2925
3176
|
_getPageNumbers() {
|
|
2926
|
-
const
|
|
2927
|
-
|
|
2928
|
-
const
|
|
2929
|
-
for (let
|
|
2930
|
-
|
|
2931
|
-
return a &&
|
|
3177
|
+
const e = [], t = this.current > this.siblings + 2, a = this.current < this.total - this.siblings - 1;
|
|
3178
|
+
e.push(1), t && e.push("...");
|
|
3179
|
+
const s = Math.max(2, this.current - this.siblings), r = Math.min(this.total - 1, this.current + this.siblings);
|
|
3180
|
+
for (let i = s; i <= r; i++)
|
|
3181
|
+
e.includes(i) || e.push(i);
|
|
3182
|
+
return a && e.push("..."), this.total > 1 && !e.includes(this.total) && e.push(this.total), e;
|
|
2932
3183
|
}
|
|
2933
3184
|
render() {
|
|
2934
|
-
const
|
|
2935
|
-
return
|
|
3185
|
+
const e = this._getPageNumbers();
|
|
3186
|
+
return l`
|
|
2936
3187
|
<nav class="pagination" aria-label="Pagination">
|
|
2937
3188
|
<button
|
|
2938
3189
|
class="page-btn"
|
|
@@ -2943,8 +3194,8 @@ let X = class extends p {
|
|
|
2943
3194
|
◄
|
|
2944
3195
|
</button>
|
|
2945
3196
|
|
|
2946
|
-
${
|
|
2947
|
-
(t) => t === "..." ?
|
|
3197
|
+
${e.map(
|
|
3198
|
+
(t) => t === "..." ? l`<span class="page-ellipsis">...</span>` : l`
|
|
2948
3199
|
<button
|
|
2949
3200
|
class="page-btn ${t === this.current ? "active" : ""}"
|
|
2950
3201
|
@click="${() => this._goToPage(t)}"
|
|
@@ -2965,14 +3216,14 @@ let X = class extends p {
|
|
|
2965
3216
|
►
|
|
2966
3217
|
</button>
|
|
2967
3218
|
|
|
2968
|
-
${this.showInfo ?
|
|
3219
|
+
${this.showInfo ? l`
|
|
2969
3220
|
<span class="page-info">Seite ${this.current} von ${this.total}</span>
|
|
2970
3221
|
` : ""}
|
|
2971
3222
|
</nav>
|
|
2972
3223
|
`;
|
|
2973
3224
|
}
|
|
2974
3225
|
};
|
|
2975
|
-
|
|
3226
|
+
et.styles = d`
|
|
2976
3227
|
:host {
|
|
2977
3228
|
display: block;
|
|
2978
3229
|
font-family: var(--crt-font-family);
|
|
@@ -3027,38 +3278,38 @@ X.styles = l`
|
|
|
3027
3278
|
margin-left: var(--crt-spacing-md);
|
|
3028
3279
|
}
|
|
3029
3280
|
`;
|
|
3030
|
-
|
|
3281
|
+
At([
|
|
3031
3282
|
n({ type: Number })
|
|
3032
|
-
],
|
|
3033
|
-
|
|
3283
|
+
], et.prototype, "current", 2);
|
|
3284
|
+
At([
|
|
3034
3285
|
n({ type: Number })
|
|
3035
|
-
],
|
|
3036
|
-
|
|
3286
|
+
], et.prototype, "total", 2);
|
|
3287
|
+
At([
|
|
3037
3288
|
n({ type: Number })
|
|
3038
|
-
],
|
|
3039
|
-
|
|
3289
|
+
], et.prototype, "siblings", 2);
|
|
3290
|
+
At([
|
|
3040
3291
|
n({ type: Boolean })
|
|
3041
|
-
],
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
],
|
|
3045
|
-
var
|
|
3046
|
-
for (var
|
|
3047
|
-
(o =
|
|
3048
|
-
return
|
|
3292
|
+
], et.prototype, "showInfo", 2);
|
|
3293
|
+
et = At([
|
|
3294
|
+
v("crt-pagination")
|
|
3295
|
+
], et);
|
|
3296
|
+
var Dr = Object.defineProperty, Tr = Object.getOwnPropertyDescriptor, L = (e, t, a, s) => {
|
|
3297
|
+
for (var r = s > 1 ? void 0 : s ? Tr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
|
|
3298
|
+
(o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
|
|
3299
|
+
return s && r && Dr(t, a, r), r;
|
|
3049
3300
|
};
|
|
3050
|
-
let
|
|
3301
|
+
let k = class extends h {
|
|
3051
3302
|
constructor() {
|
|
3052
3303
|
super(...arguments), this.value = 50, this.min = 0, this.max = 100, this.step = 1, this.label = "", this.disabled = !1, this.showMarks = !1, this.unit = "";
|
|
3053
3304
|
}
|
|
3054
|
-
_handleInput(
|
|
3055
|
-
const t =
|
|
3305
|
+
_handleInput(e) {
|
|
3306
|
+
const t = e.target;
|
|
3056
3307
|
this.value = Number(t.value), this.dispatchEvent(new CustomEvent("input", {
|
|
3057
3308
|
detail: { value: this.value }
|
|
3058
3309
|
}));
|
|
3059
3310
|
}
|
|
3060
|
-
_handleChange(
|
|
3061
|
-
const t =
|
|
3311
|
+
_handleChange(e) {
|
|
3312
|
+
const t = e.target;
|
|
3062
3313
|
this.value = Number(t.value), this.dispatchEvent(new CustomEvent("change", {
|
|
3063
3314
|
detail: { value: this.value }
|
|
3064
3315
|
}));
|
|
@@ -3067,9 +3318,9 @@ let f = class extends p {
|
|
|
3067
3318
|
return (this.value - this.min) / (this.max - this.min) * 100;
|
|
3068
3319
|
}
|
|
3069
3320
|
render() {
|
|
3070
|
-
return
|
|
3321
|
+
return l`
|
|
3071
3322
|
<div class="slider-wrapper">
|
|
3072
|
-
${this.label ?
|
|
3323
|
+
${this.label ? l`
|
|
3073
3324
|
<div class="slider-header">
|
|
3074
3325
|
<span class="slider-label">${this.label}</span>
|
|
3075
3326
|
<span class="slider-value">${this.value}${this.unit}</span>
|
|
@@ -3090,7 +3341,7 @@ let f = class extends p {
|
|
|
3090
3341
|
/>
|
|
3091
3342
|
</div>
|
|
3092
3343
|
|
|
3093
|
-
${this.showMarks ?
|
|
3344
|
+
${this.showMarks ? l`
|
|
3094
3345
|
<div class="slider-marks">
|
|
3095
3346
|
<span class="slider-mark">${this.min}${this.unit}</span>
|
|
3096
3347
|
<span class="slider-mark">${this.max}${this.unit}</span>
|
|
@@ -3100,7 +3351,7 @@ let f = class extends p {
|
|
|
3100
3351
|
`;
|
|
3101
3352
|
}
|
|
3102
3353
|
};
|
|
3103
|
-
|
|
3354
|
+
k.styles = d`
|
|
3104
3355
|
:host {
|
|
3105
3356
|
display: block;
|
|
3106
3357
|
font-family: var(--crt-font-family);
|
|
@@ -3234,50 +3485,50 @@ f.styles = l`
|
|
|
3234
3485
|
cursor: not-allowed;
|
|
3235
3486
|
}
|
|
3236
3487
|
`;
|
|
3237
|
-
|
|
3488
|
+
L([
|
|
3238
3489
|
n({ type: Number })
|
|
3239
|
-
],
|
|
3240
|
-
|
|
3490
|
+
], k.prototype, "value", 2);
|
|
3491
|
+
L([
|
|
3241
3492
|
n({ type: Number })
|
|
3242
|
-
],
|
|
3243
|
-
|
|
3493
|
+
], k.prototype, "min", 2);
|
|
3494
|
+
L([
|
|
3244
3495
|
n({ type: Number })
|
|
3245
|
-
],
|
|
3246
|
-
|
|
3496
|
+
], k.prototype, "max", 2);
|
|
3497
|
+
L([
|
|
3247
3498
|
n({ type: Number })
|
|
3248
|
-
],
|
|
3249
|
-
|
|
3499
|
+
], k.prototype, "step", 2);
|
|
3500
|
+
L([
|
|
3250
3501
|
n({ type: String })
|
|
3251
|
-
],
|
|
3252
|
-
|
|
3502
|
+
], k.prototype, "label", 2);
|
|
3503
|
+
L([
|
|
3253
3504
|
n({ type: Boolean, reflect: !0 })
|
|
3254
|
-
],
|
|
3255
|
-
|
|
3505
|
+
], k.prototype, "disabled", 2);
|
|
3506
|
+
L([
|
|
3256
3507
|
n({ type: Boolean })
|
|
3257
|
-
],
|
|
3258
|
-
|
|
3508
|
+
], k.prototype, "showMarks", 2);
|
|
3509
|
+
L([
|
|
3259
3510
|
n({ type: String })
|
|
3260
|
-
],
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
],
|
|
3264
|
-
var
|
|
3265
|
-
for (var
|
|
3266
|
-
(o =
|
|
3267
|
-
return
|
|
3511
|
+
], k.prototype, "unit", 2);
|
|
3512
|
+
k = L([
|
|
3513
|
+
v("crt-slider")
|
|
3514
|
+
], k);
|
|
3515
|
+
var jr = Object.defineProperty, Lr = Object.getOwnPropertyDescriptor, ot = (e, t, a, s) => {
|
|
3516
|
+
for (var r = s > 1 ? void 0 : s ? Lr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
|
|
3517
|
+
(o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
|
|
3518
|
+
return s && r && jr(t, a, r), r;
|
|
3268
3519
|
};
|
|
3269
|
-
let
|
|
3520
|
+
let D = class extends h {
|
|
3270
3521
|
constructor() {
|
|
3271
3522
|
super(...arguments), this.checked = !1, this.disabled = !1, this.label = "", this.onLabel = "1", this.offLabel = "0", this.size = "medium";
|
|
3272
3523
|
}
|
|
3273
|
-
_handleChange(
|
|
3274
|
-
const t =
|
|
3524
|
+
_handleChange(e) {
|
|
3525
|
+
const t = e.target;
|
|
3275
3526
|
this.checked = t.checked, this.dispatchEvent(new CustomEvent("change", {
|
|
3276
3527
|
detail: { checked: this.checked }
|
|
3277
3528
|
}));
|
|
3278
3529
|
}
|
|
3279
3530
|
render() {
|
|
3280
|
-
return
|
|
3531
|
+
return l`
|
|
3281
3532
|
<label class="toggle-wrapper">
|
|
3282
3533
|
<input
|
|
3283
3534
|
type="checkbox"
|
|
@@ -3293,11 +3544,11 @@ let S = class extends p {
|
|
|
3293
3544
|
</div>
|
|
3294
3545
|
</div>
|
|
3295
3546
|
</label>
|
|
3296
|
-
${this.label ?
|
|
3547
|
+
${this.label ? l`<span class="label">${this.label}</span>` : ""}
|
|
3297
3548
|
`;
|
|
3298
3549
|
}
|
|
3299
3550
|
};
|
|
3300
|
-
|
|
3551
|
+
D.styles = d`
|
|
3301
3552
|
:host {
|
|
3302
3553
|
display: inline-flex;
|
|
3303
3554
|
align-items: center;
|
|
@@ -3419,66 +3670,66 @@ S.styles = l`
|
|
|
3419
3670
|
left: 35px;
|
|
3420
3671
|
}
|
|
3421
3672
|
`;
|
|
3422
|
-
|
|
3673
|
+
ot([
|
|
3423
3674
|
n({ type: Boolean, reflect: !0 })
|
|
3424
|
-
],
|
|
3425
|
-
|
|
3675
|
+
], D.prototype, "checked", 2);
|
|
3676
|
+
ot([
|
|
3426
3677
|
n({ type: Boolean, reflect: !0 })
|
|
3427
|
-
],
|
|
3428
|
-
|
|
3678
|
+
], D.prototype, "disabled", 2);
|
|
3679
|
+
ot([
|
|
3429
3680
|
n({ type: String })
|
|
3430
|
-
],
|
|
3431
|
-
|
|
3681
|
+
], D.prototype, "label", 2);
|
|
3682
|
+
ot([
|
|
3432
3683
|
n({ type: String })
|
|
3433
|
-
],
|
|
3434
|
-
|
|
3684
|
+
], D.prototype, "onLabel", 2);
|
|
3685
|
+
ot([
|
|
3435
3686
|
n({ type: String })
|
|
3436
|
-
],
|
|
3437
|
-
|
|
3687
|
+
], D.prototype, "offLabel", 2);
|
|
3688
|
+
ot([
|
|
3438
3689
|
n({ type: String, reflect: !0 })
|
|
3439
|
-
],
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
],
|
|
3443
|
-
var
|
|
3444
|
-
for (var
|
|
3445
|
-
(o =
|
|
3446
|
-
return
|
|
3690
|
+
], D.prototype, "size", 2);
|
|
3691
|
+
D = ot([
|
|
3692
|
+
v("crt-toggle")
|
|
3693
|
+
], D);
|
|
3694
|
+
var Ir = Object.defineProperty, Br = Object.getOwnPropertyDescriptor, I = (e, t, a, s) => {
|
|
3695
|
+
for (var r = s > 1 ? void 0 : s ? Br(t, a) : t, i = e.length - 1, o; i >= 0; i--)
|
|
3696
|
+
(o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
|
|
3697
|
+
return s && r && Ir(t, a, r), r;
|
|
3447
3698
|
};
|
|
3448
|
-
let
|
|
3699
|
+
let T = class extends h {
|
|
3449
3700
|
constructor() {
|
|
3450
3701
|
super(...arguments), this.src = "", this.alt = "", this.name = "", this.size = "md", this.shape = "square", this.status = "";
|
|
3451
3702
|
}
|
|
3452
3703
|
_getInitials() {
|
|
3453
3704
|
if (!this.name) return "?";
|
|
3454
|
-
const
|
|
3455
|
-
return
|
|
3705
|
+
const e = this.name.trim().split(/\s+/);
|
|
3706
|
+
return e.length === 1 ? e[0].substring(0, 2) : e[0][0] + e[e.length - 1][0];
|
|
3456
3707
|
}
|
|
3457
3708
|
_handleError() {
|
|
3458
3709
|
this.src = "";
|
|
3459
3710
|
}
|
|
3460
3711
|
render() {
|
|
3461
|
-
return
|
|
3712
|
+
return l`
|
|
3462
3713
|
<div class="avatar-wrapper">
|
|
3463
3714
|
<div class="avatar">
|
|
3464
|
-
${this.src ?
|
|
3715
|
+
${this.src ? l`
|
|
3465
3716
|
<img
|
|
3466
3717
|
src="${this.src}"
|
|
3467
3718
|
alt="${this.alt || this.name}"
|
|
3468
3719
|
@error="${this._handleError}"
|
|
3469
3720
|
/>
|
|
3470
|
-
` : this.name ?
|
|
3721
|
+
` : this.name ? l`
|
|
3471
3722
|
<span class="initials">${this._getInitials()}</span>
|
|
3472
|
-
` :
|
|
3723
|
+
` : l`
|
|
3473
3724
|
<span class="fallback-icon">[?]</span>
|
|
3474
3725
|
`}
|
|
3475
3726
|
</div>
|
|
3476
|
-
${this.status ?
|
|
3727
|
+
${this.status ? l`<div class="status-indicator"></div>` : ""}
|
|
3477
3728
|
</div>
|
|
3478
3729
|
`;
|
|
3479
3730
|
}
|
|
3480
3731
|
};
|
|
3481
|
-
|
|
3732
|
+
T.styles = d`
|
|
3482
3733
|
:host {
|
|
3483
3734
|
display: inline-block;
|
|
3484
3735
|
font-family: var(--crt-font-family);
|
|
@@ -3606,38 +3857,38 @@ E.styles = l`
|
|
|
3606
3857
|
border-color: var(--crt-bg-dark);
|
|
3607
3858
|
}
|
|
3608
3859
|
`;
|
|
3609
|
-
|
|
3860
|
+
I([
|
|
3610
3861
|
n({ type: String })
|
|
3611
|
-
],
|
|
3612
|
-
|
|
3862
|
+
], T.prototype, "src", 2);
|
|
3863
|
+
I([
|
|
3613
3864
|
n({ type: String })
|
|
3614
|
-
],
|
|
3615
|
-
|
|
3865
|
+
], T.prototype, "alt", 2);
|
|
3866
|
+
I([
|
|
3616
3867
|
n({ type: String })
|
|
3617
|
-
],
|
|
3618
|
-
|
|
3868
|
+
], T.prototype, "name", 2);
|
|
3869
|
+
I([
|
|
3619
3870
|
n({ type: String, reflect: !0 })
|
|
3620
|
-
],
|
|
3621
|
-
|
|
3871
|
+
], T.prototype, "size", 2);
|
|
3872
|
+
I([
|
|
3622
3873
|
n({ type: String, reflect: !0 })
|
|
3623
|
-
],
|
|
3624
|
-
|
|
3874
|
+
], T.prototype, "shape", 2);
|
|
3875
|
+
I([
|
|
3625
3876
|
n({ type: String, reflect: !0 })
|
|
3626
|
-
],
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
],
|
|
3630
|
-
let
|
|
3877
|
+
], T.prototype, "status", 2);
|
|
3878
|
+
T = I([
|
|
3879
|
+
v("crt-avatar")
|
|
3880
|
+
], T);
|
|
3881
|
+
let Rt = class extends h {
|
|
3631
3882
|
constructor() {
|
|
3632
3883
|
super(...arguments), this.max = 5;
|
|
3633
3884
|
}
|
|
3634
3885
|
render() {
|
|
3635
|
-
return
|
|
3886
|
+
return l`
|
|
3636
3887
|
<slot></slot>
|
|
3637
3888
|
`;
|
|
3638
3889
|
}
|
|
3639
3890
|
};
|
|
3640
|
-
|
|
3891
|
+
Rt.styles = d`
|
|
3641
3892
|
:host {
|
|
3642
3893
|
display: inline-flex;
|
|
3643
3894
|
align-items: center;
|
|
@@ -3666,23 +3917,23 @@ _t.styles = l`
|
|
|
3666
3917
|
box-shadow: var(--crt-glow-sm);
|
|
3667
3918
|
}
|
|
3668
3919
|
`;
|
|
3669
|
-
|
|
3920
|
+
I([
|
|
3670
3921
|
n({ type: Number })
|
|
3671
|
-
],
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
],
|
|
3675
|
-
var
|
|
3676
|
-
for (var
|
|
3677
|
-
(o =
|
|
3678
|
-
return
|
|
3922
|
+
], Rt.prototype, "max", 2);
|
|
3923
|
+
Rt = I([
|
|
3924
|
+
v("crt-avatar-group")
|
|
3925
|
+
], Rt);
|
|
3926
|
+
var Nr = Object.defineProperty, Ur = Object.getOwnPropertyDescriptor, A = (e, t, a, s) => {
|
|
3927
|
+
for (var r = s > 1 ? void 0 : s ? Ur(t, a) : t, i = e.length - 1, o; i >= 0; i--)
|
|
3928
|
+
(o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
|
|
3929
|
+
return s && r && Nr(t, a, r), r;
|
|
3679
3930
|
};
|
|
3680
|
-
let
|
|
3931
|
+
let V = class extends h {
|
|
3681
3932
|
constructor() {
|
|
3682
3933
|
super(...arguments), this.variant = "rectangular", this.animation = "shimmer", this.width = "100%", this.height = "20px", this.effect = !1;
|
|
3683
3934
|
}
|
|
3684
3935
|
render() {
|
|
3685
|
-
return
|
|
3936
|
+
return l`
|
|
3686
3937
|
<div
|
|
3687
3938
|
class="skeleton"
|
|
3688
3939
|
style="width: ${this.width}; height: ${this.height};"
|
|
@@ -3690,7 +3941,7 @@ let N = class extends p {
|
|
|
3690
3941
|
`;
|
|
3691
3942
|
}
|
|
3692
3943
|
};
|
|
3693
|
-
|
|
3944
|
+
V.styles = d`
|
|
3694
3945
|
:host {
|
|
3695
3946
|
display: block;
|
|
3696
3947
|
}
|
|
@@ -3805,37 +4056,37 @@ N.styles = l`
|
|
|
3805
4056
|
pointer-events: none;
|
|
3806
4057
|
}
|
|
3807
4058
|
`;
|
|
3808
|
-
|
|
4059
|
+
A([
|
|
3809
4060
|
n({ type: String, reflect: !0 })
|
|
3810
|
-
],
|
|
3811
|
-
|
|
4061
|
+
], V.prototype, "variant", 2);
|
|
4062
|
+
A([
|
|
3812
4063
|
n({ type: String, reflect: !0 })
|
|
3813
|
-
],
|
|
3814
|
-
|
|
4064
|
+
], V.prototype, "animation", 2);
|
|
4065
|
+
A([
|
|
3815
4066
|
n({ type: String })
|
|
3816
|
-
],
|
|
3817
|
-
|
|
4067
|
+
], V.prototype, "width", 2);
|
|
4068
|
+
A([
|
|
3818
4069
|
n({ type: String })
|
|
3819
|
-
],
|
|
3820
|
-
|
|
4070
|
+
], V.prototype, "height", 2);
|
|
4071
|
+
A([
|
|
3821
4072
|
n({ type: Boolean, reflect: !0 })
|
|
3822
|
-
],
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
],
|
|
3826
|
-
let
|
|
4073
|
+
], V.prototype, "effect", 2);
|
|
4074
|
+
V = A([
|
|
4075
|
+
v("crt-skeleton")
|
|
4076
|
+
], V);
|
|
4077
|
+
let Ft = class extends h {
|
|
3827
4078
|
constructor() {
|
|
3828
4079
|
super(...arguments), this.lines = 3;
|
|
3829
4080
|
}
|
|
3830
4081
|
render() {
|
|
3831
|
-
return
|
|
3832
|
-
${Array.from({ length: this.lines }).map(() =>
|
|
4082
|
+
return l`
|
|
4083
|
+
${Array.from({ length: this.lines }).map(() => l`
|
|
3833
4084
|
<div class="line"></div>
|
|
3834
4085
|
`)}
|
|
3835
4086
|
`;
|
|
3836
4087
|
}
|
|
3837
4088
|
};
|
|
3838
|
-
|
|
4089
|
+
Ft.styles = d`
|
|
3839
4090
|
:host {
|
|
3840
4091
|
display: block;
|
|
3841
4092
|
}
|
|
@@ -3867,20 +4118,20 @@ zt.styles = l`
|
|
|
3867
4118
|
}
|
|
3868
4119
|
}
|
|
3869
4120
|
`;
|
|
3870
|
-
|
|
4121
|
+
A([
|
|
3871
4122
|
n({ type: Number })
|
|
3872
|
-
],
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
],
|
|
3876
|
-
let
|
|
4123
|
+
], Ft.prototype, "lines", 2);
|
|
4124
|
+
Ft = A([
|
|
4125
|
+
v("crt-skeleton-text")
|
|
4126
|
+
], Ft);
|
|
4127
|
+
let Ht = class extends h {
|
|
3877
4128
|
constructor() {
|
|
3878
4129
|
super(...arguments), this.hideImage = !1;
|
|
3879
4130
|
}
|
|
3880
4131
|
render() {
|
|
3881
|
-
return
|
|
4132
|
+
return l`
|
|
3882
4133
|
<div class="card">
|
|
3883
|
-
${this.hideImage ? "" :
|
|
4134
|
+
${this.hideImage ? "" : l`<div class="image"></div>`}
|
|
3884
4135
|
<div class="title"></div>
|
|
3885
4136
|
<div class="text"></div>
|
|
3886
4137
|
<div class="text"></div>
|
|
@@ -3889,7 +4140,7 @@ let Ot = class extends p {
|
|
|
3889
4140
|
`;
|
|
3890
4141
|
}
|
|
3891
4142
|
};
|
|
3892
|
-
|
|
4143
|
+
Ht.styles = d`
|
|
3893
4144
|
:host {
|
|
3894
4145
|
display: block;
|
|
3895
4146
|
}
|
|
@@ -3940,18 +4191,18 @@ Ot.styles = l`
|
|
|
3940
4191
|
}
|
|
3941
4192
|
}
|
|
3942
4193
|
`;
|
|
3943
|
-
|
|
4194
|
+
A([
|
|
3944
4195
|
n({ type: Boolean })
|
|
3945
|
-
],
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
],
|
|
3949
|
-
var
|
|
3950
|
-
for (var
|
|
3951
|
-
(o =
|
|
3952
|
-
return
|
|
4196
|
+
], Ht.prototype, "hideImage", 2);
|
|
4197
|
+
Ht = A([
|
|
4198
|
+
v("crt-skeleton-card")
|
|
4199
|
+
], Ht);
|
|
4200
|
+
var Rr = Object.defineProperty, Fr = Object.getOwnPropertyDescriptor, B = (e, t, a, s) => {
|
|
4201
|
+
for (var r = s > 1 ? void 0 : s ? Fr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
|
|
4202
|
+
(o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
|
|
4203
|
+
return s && r && Rr(t, a, r), r;
|
|
3953
4204
|
};
|
|
3954
|
-
let
|
|
4205
|
+
let $ = class extends h {
|
|
3955
4206
|
constructor() {
|
|
3956
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 = "";
|
|
3957
4208
|
}
|
|
@@ -3967,11 +4218,11 @@ let y = class extends p {
|
|
|
3967
4218
|
this.dispatchEvent(new CustomEvent("close")), this.remove();
|
|
3968
4219
|
}
|
|
3969
4220
|
render() {
|
|
3970
|
-
return
|
|
4221
|
+
return l`
|
|
3971
4222
|
<div class="alert" role="alert">
|
|
3972
4223
|
<span class="alert-icon">${this.icon || this._getDefaultIcon()}</span>
|
|
3973
4224
|
<div class="alert-content">
|
|
3974
|
-
${this.title ?
|
|
4225
|
+
${this.title ? l`<div class="alert-title">${this.title}</div>` : ""}
|
|
3975
4226
|
<div class="alert-message">
|
|
3976
4227
|
<slot></slot>
|
|
3977
4228
|
</div>
|
|
@@ -3979,14 +4230,14 @@ let y = class extends p {
|
|
|
3979
4230
|
<slot name="actions"></slot>
|
|
3980
4231
|
</div>
|
|
3981
4232
|
</div>
|
|
3982
|
-
${this.closable ?
|
|
4233
|
+
${this.closable ? l`
|
|
3983
4234
|
<button class="alert-close" @click="${this._handleClose}">[X]</button>
|
|
3984
4235
|
` : ""}
|
|
3985
4236
|
</div>
|
|
3986
4237
|
`;
|
|
3987
4238
|
}
|
|
3988
4239
|
};
|
|
3989
|
-
|
|
4240
|
+
$.styles = d`
|
|
3990
4241
|
:host {
|
|
3991
4242
|
display: block;
|
|
3992
4243
|
font-family: var(--crt-font-family);
|
|
@@ -4151,44 +4402,44 @@ y.styles = l`
|
|
|
4151
4402
|
border-top: none;
|
|
4152
4403
|
}
|
|
4153
4404
|
`;
|
|
4154
|
-
|
|
4405
|
+
B([
|
|
4155
4406
|
n({ type: String, reflect: !0 })
|
|
4156
|
-
],
|
|
4157
|
-
|
|
4407
|
+
], $.prototype, "variant", 2);
|
|
4408
|
+
B([
|
|
4158
4409
|
n({ type: String })
|
|
4159
|
-
],
|
|
4160
|
-
|
|
4410
|
+
], $.prototype, "title", 2);
|
|
4411
|
+
B([
|
|
4161
4412
|
n({ type: Boolean, reflect: !0 })
|
|
4162
|
-
],
|
|
4163
|
-
|
|
4413
|
+
], $.prototype, "closable", 2);
|
|
4414
|
+
B([
|
|
4164
4415
|
n({ type: Boolean, reflect: !0 })
|
|
4165
|
-
],
|
|
4166
|
-
|
|
4416
|
+
], $.prototype, "filled", 2);
|
|
4417
|
+
B([
|
|
4167
4418
|
n({ type: Boolean, reflect: !0 })
|
|
4168
|
-
],
|
|
4169
|
-
|
|
4419
|
+
], $.prototype, "outlined", 2);
|
|
4420
|
+
B([
|
|
4170
4421
|
n({ type: Boolean, reflect: !0 })
|
|
4171
|
-
],
|
|
4172
|
-
|
|
4422
|
+
], $.prototype, "banner", 2);
|
|
4423
|
+
B([
|
|
4173
4424
|
n({ type: Boolean, reflect: !0 })
|
|
4174
|
-
],
|
|
4175
|
-
|
|
4425
|
+
], $.prototype, "animated", 2);
|
|
4426
|
+
B([
|
|
4176
4427
|
n({ type: String })
|
|
4177
|
-
],
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
],
|
|
4181
|
-
var
|
|
4182
|
-
for (var
|
|
4183
|
-
(o =
|
|
4184
|
-
return
|
|
4428
|
+
], $.prototype, "icon", 2);
|
|
4429
|
+
$ = B([
|
|
4430
|
+
v("crt-alert")
|
|
4431
|
+
], $);
|
|
4432
|
+
var Hr = Object.defineProperty, Yr = Object.getOwnPropertyDescriptor, ne = (e, t, a, s) => {
|
|
4433
|
+
for (var r = s > 1 ? void 0 : s ? Yr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
|
|
4434
|
+
(o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
|
|
4435
|
+
return s && r && Hr(t, a, r), r;
|
|
4185
4436
|
};
|
|
4186
|
-
let
|
|
4437
|
+
let $t = class extends h {
|
|
4187
4438
|
constructor() {
|
|
4188
4439
|
super(...arguments), this.open = !1, this.message = "LOADING...";
|
|
4189
4440
|
}
|
|
4190
4441
|
render() {
|
|
4191
|
-
return this.open ?
|
|
4442
|
+
return this.open ? l`
|
|
4192
4443
|
<div class="overlay">
|
|
4193
4444
|
<div class="atom">
|
|
4194
4445
|
<div class="nucleus"></div>
|
|
@@ -4204,10 +4455,10 @@ let lt = class extends p {
|
|
|
4204
4455
|
</div>
|
|
4205
4456
|
<div class="message">${this.message}</div>
|
|
4206
4457
|
</div>
|
|
4207
|
-
` :
|
|
4458
|
+
` : l``;
|
|
4208
4459
|
}
|
|
4209
4460
|
};
|
|
4210
|
-
|
|
4461
|
+
$t.styles = d`
|
|
4211
4462
|
:host {
|
|
4212
4463
|
display: block;
|
|
4213
4464
|
}
|
|
@@ -4429,23 +4680,23 @@ lt.styles = l`
|
|
|
4429
4680
|
50% { opacity: 0.5; }
|
|
4430
4681
|
}
|
|
4431
4682
|
`;
|
|
4432
|
-
|
|
4683
|
+
ne([
|
|
4433
4684
|
n({ type: Boolean, reflect: !0 })
|
|
4434
|
-
],
|
|
4435
|
-
|
|
4685
|
+
], $t.prototype, "open", 2);
|
|
4686
|
+
ne([
|
|
4436
4687
|
n({ type: String })
|
|
4437
|
-
],
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
],
|
|
4441
|
-
var
|
|
4442
|
-
for (var
|
|
4443
|
-
(o =
|
|
4444
|
-
return
|
|
4688
|
+
], $t.prototype, "message", 2);
|
|
4689
|
+
$t = ne([
|
|
4690
|
+
v("crt-spinner")
|
|
4691
|
+
], $t);
|
|
4692
|
+
var Vr = Object.getOwnPropertyDescriptor, qr = (e, t, a, s) => {
|
|
4693
|
+
for (var r = s > 1 ? void 0 : s ? Vr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
|
|
4694
|
+
(o = e[i]) && (r = o(r) || r);
|
|
4695
|
+
return r;
|
|
4445
4696
|
};
|
|
4446
|
-
let
|
|
4697
|
+
let Qt = class extends h {
|
|
4447
4698
|
render() {
|
|
4448
|
-
return
|
|
4699
|
+
return l`
|
|
4449
4700
|
<div class="card">
|
|
4450
4701
|
<div class="card-header">
|
|
4451
4702
|
<slot name="header"></slot>
|
|
@@ -4460,8 +4711,18 @@ let Dt = class extends p {
|
|
|
4460
4711
|
`;
|
|
4461
4712
|
}
|
|
4462
4713
|
};
|
|
4463
|
-
|
|
4714
|
+
Qt.styles = d`
|
|
4715
|
+
:host {
|
|
4716
|
+
/* Make the card element act like a normal block-level container
|
|
4717
|
+
so external width/height styles can be applied responsively. */
|
|
4718
|
+
display: block;
|
|
4719
|
+
width: 100%;
|
|
4720
|
+
box-sizing: border-box;
|
|
4721
|
+
}
|
|
4722
|
+
|
|
4464
4723
|
.card {
|
|
4724
|
+
width: 100%;
|
|
4725
|
+
box-sizing: border-box;
|
|
4465
4726
|
border: 3px double var(--crt-primary);
|
|
4466
4727
|
padding: var(--crt-spacing-lg);
|
|
4467
4728
|
background-color: var(--crt-bg-dark);
|
|
@@ -4492,34 +4753,34 @@ Dt.styles = l`
|
|
|
4492
4753
|
margin-top: var(--crt-spacing-md);
|
|
4493
4754
|
}
|
|
4494
4755
|
`;
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
],
|
|
4498
|
-
var
|
|
4499
|
-
for (var
|
|
4500
|
-
(o =
|
|
4501
|
-
return
|
|
4756
|
+
Qt = qr([
|
|
4757
|
+
v("crt-card")
|
|
4758
|
+
], Qt);
|
|
4759
|
+
var Wr = Object.defineProperty, Xr = Object.getOwnPropertyDescriptor, le = (e, t, a, s) => {
|
|
4760
|
+
for (var r = s > 1 ? void 0 : s ? Xr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
|
|
4761
|
+
(o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
|
|
4762
|
+
return s && r && Wr(t, a, r), r;
|
|
4502
4763
|
};
|
|
4503
|
-
let
|
|
4764
|
+
let _t = class extends h {
|
|
4504
4765
|
constructor() {
|
|
4505
4766
|
super(...arguments), this.headers = [], this.rows = [];
|
|
4506
4767
|
}
|
|
4507
4768
|
render() {
|
|
4508
|
-
return
|
|
4769
|
+
return l`
|
|
4509
4770
|
<table>
|
|
4510
4771
|
<thead>
|
|
4511
4772
|
<tr>
|
|
4512
|
-
${this.headers.map((
|
|
4773
|
+
${this.headers.map((e) => l`<th>${e}</th>`)}
|
|
4513
4774
|
</tr>
|
|
4514
4775
|
</thead>
|
|
4515
4776
|
<tbody>
|
|
4516
|
-
${this.rows.map((
|
|
4777
|
+
${this.rows.map((e) => l`<tr>${e.map((t) => l`<td>${t}</td>`)}</tr>`)}
|
|
4517
4778
|
</tbody>
|
|
4518
4779
|
</table>
|
|
4519
4780
|
`;
|
|
4520
4781
|
}
|
|
4521
4782
|
};
|
|
4522
|
-
|
|
4783
|
+
_t.styles = d`
|
|
4523
4784
|
:host {
|
|
4524
4785
|
display: block;
|
|
4525
4786
|
}
|
|
@@ -4571,26 +4832,26 @@ pt.styles = l`
|
|
|
4571
4832
|
border-bottom: none;
|
|
4572
4833
|
}
|
|
4573
4834
|
`;
|
|
4574
|
-
|
|
4835
|
+
le([
|
|
4575
4836
|
n({ type: Array })
|
|
4576
|
-
],
|
|
4577
|
-
|
|
4837
|
+
], _t.prototype, "headers", 2);
|
|
4838
|
+
le([
|
|
4578
4839
|
n({ type: Array })
|
|
4579
|
-
],
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
],
|
|
4583
|
-
var
|
|
4584
|
-
for (var
|
|
4585
|
-
(o =
|
|
4586
|
-
return
|
|
4840
|
+
], _t.prototype, "rows", 2);
|
|
4841
|
+
_t = le([
|
|
4842
|
+
v("crt-table")
|
|
4843
|
+
], _t);
|
|
4844
|
+
var Kr = Object.defineProperty, Gr = Object.getOwnPropertyDescriptor, ce = (e, t, a, s) => {
|
|
4845
|
+
for (var r = s > 1 ? void 0 : s ? Gr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
|
|
4846
|
+
(o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
|
|
4847
|
+
return s && r && Kr(t, a, r), r;
|
|
4587
4848
|
};
|
|
4588
|
-
let
|
|
4849
|
+
let zt = class extends h {
|
|
4589
4850
|
constructor() {
|
|
4590
4851
|
super(...arguments), this.columns = 3, this.gap = "var(--crt-spacing-lg)";
|
|
4591
4852
|
}
|
|
4592
4853
|
render() {
|
|
4593
|
-
return
|
|
4854
|
+
return l`
|
|
4594
4855
|
<style>
|
|
4595
4856
|
:host {
|
|
4596
4857
|
--grid-gap: ${this.gap};
|
|
@@ -4603,7 +4864,7 @@ let dt = class extends p {
|
|
|
4603
4864
|
`;
|
|
4604
4865
|
}
|
|
4605
4866
|
};
|
|
4606
|
-
|
|
4867
|
+
zt.styles = d`
|
|
4607
4868
|
:host {
|
|
4608
4869
|
display: block;
|
|
4609
4870
|
}
|
|
@@ -4632,42 +4893,42 @@ dt.styles = l`
|
|
|
4632
4893
|
}
|
|
4633
4894
|
}
|
|
4634
4895
|
`;
|
|
4635
|
-
|
|
4896
|
+
ce([
|
|
4636
4897
|
n({ type: Number })
|
|
4637
|
-
],
|
|
4638
|
-
|
|
4898
|
+
], zt.prototype, "columns", 2);
|
|
4899
|
+
ce([
|
|
4639
4900
|
n({ type: String })
|
|
4640
|
-
],
|
|
4641
|
-
|
|
4642
|
-
|
|
4643
|
-
],
|
|
4644
|
-
var
|
|
4645
|
-
for (var
|
|
4646
|
-
(o =
|
|
4647
|
-
return
|
|
4901
|
+
], zt.prototype, "gap", 2);
|
|
4902
|
+
zt = ce([
|
|
4903
|
+
v("crt-grid")
|
|
4904
|
+
], zt);
|
|
4905
|
+
var Zr = Object.defineProperty, Qr = Object.getOwnPropertyDescriptor, vt = (e, t, a, s) => {
|
|
4906
|
+
for (var r = s > 1 ? void 0 : s ? Qr(t, a) : t, i = e.length - 1, o; i >= 0; i--)
|
|
4907
|
+
(o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
|
|
4908
|
+
return s && r && Zr(t, a, r), r;
|
|
4648
4909
|
};
|
|
4649
|
-
let
|
|
4910
|
+
let q = class extends h {
|
|
4650
4911
|
constructor() {
|
|
4651
4912
|
super(...arguments), this.title = "", this.description = "", this.code = "", this.activeTab = "preview", this.copied = !1;
|
|
4652
4913
|
}
|
|
4653
|
-
switchTab(
|
|
4654
|
-
this.activeTab =
|
|
4914
|
+
switchTab(e) {
|
|
4915
|
+
this.activeTab = e;
|
|
4655
4916
|
}
|
|
4656
4917
|
async copyCode() {
|
|
4657
4918
|
try {
|
|
4658
4919
|
await navigator.clipboard.writeText(this.code), this.copied = !0, setTimeout(() => {
|
|
4659
4920
|
this.copied = !1;
|
|
4660
4921
|
}, 2e3);
|
|
4661
|
-
} catch (
|
|
4662
|
-
console.error("Failed to copy:",
|
|
4922
|
+
} catch (e) {
|
|
4923
|
+
console.error("Failed to copy:", e);
|
|
4663
4924
|
}
|
|
4664
4925
|
}
|
|
4665
4926
|
render() {
|
|
4666
|
-
return
|
|
4927
|
+
return l`
|
|
4667
4928
|
<div class="example-header">
|
|
4668
4929
|
<h4 class="example-title">${this.title}</h4>
|
|
4669
4930
|
</div>
|
|
4670
|
-
${this.description ?
|
|
4931
|
+
${this.description ? l`<p class="example-description">${this.description}</p>` : ""}
|
|
4671
4932
|
|
|
4672
4933
|
<div class="tabs-wrapper">
|
|
4673
4934
|
<div class="tab-header">
|
|
@@ -4703,10 +4964,13 @@ let R = class extends p {
|
|
|
4703
4964
|
`;
|
|
4704
4965
|
}
|
|
4705
4966
|
};
|
|
4706
|
-
|
|
4967
|
+
q.styles = d`
|
|
4707
4968
|
:host {
|
|
4708
4969
|
display: block;
|
|
4709
4970
|
margin-bottom: var(--crt-spacing-xl);
|
|
4971
|
+
width: 100%;
|
|
4972
|
+
max-width: none;
|
|
4973
|
+
box-sizing: border-box;
|
|
4710
4974
|
}
|
|
4711
4975
|
|
|
4712
4976
|
.example-header {
|
|
@@ -4734,6 +4998,8 @@ R.styles = l`
|
|
|
4734
4998
|
border: 2px solid var(--crt-primary);
|
|
4735
4999
|
background: var(--crt-bg-light);
|
|
4736
5000
|
box-shadow: var(--crt-glow-inset);
|
|
5001
|
+
width: 100%;
|
|
5002
|
+
box-sizing: border-box;
|
|
4737
5003
|
}
|
|
4738
5004
|
|
|
4739
5005
|
.tab-header {
|
|
@@ -4778,6 +5044,17 @@ R.styles = l`
|
|
|
4778
5044
|
flex-wrap: wrap;
|
|
4779
5045
|
gap: var(--crt-spacing-md);
|
|
4780
5046
|
align-items: center;
|
|
5047
|
+
width: 100%;
|
|
5048
|
+
box-sizing: border-box;
|
|
5049
|
+
}
|
|
5050
|
+
|
|
5051
|
+
/* Ensure embedded demo components stretch to the available width
|
|
5052
|
+
so examples don't get stuck at an intrinsic/narrow width. */
|
|
5053
|
+
.preview-pane > * {
|
|
5054
|
+
flex: 1 1 100%;
|
|
5055
|
+
min-width: 0; /* allow children to shrink below their content width */
|
|
5056
|
+
width: 100%;
|
|
5057
|
+
box-sizing: border-box;
|
|
4781
5058
|
}
|
|
4782
5059
|
|
|
4783
5060
|
.code-pane {
|
|
@@ -4836,33 +5113,33 @@ R.styles = l`
|
|
|
4836
5113
|
color: var(--crt-bg-dark);
|
|
4837
5114
|
}
|
|
4838
5115
|
`;
|
|
4839
|
-
|
|
5116
|
+
vt([
|
|
4840
5117
|
n()
|
|
4841
|
-
],
|
|
4842
|
-
|
|
5118
|
+
], q.prototype, "title", 2);
|
|
5119
|
+
vt([
|
|
4843
5120
|
n()
|
|
4844
|
-
],
|
|
4845
|
-
|
|
5121
|
+
], q.prototype, "description", 2);
|
|
5122
|
+
vt([
|
|
4846
5123
|
n()
|
|
4847
|
-
],
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
],
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
],
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
],
|
|
4857
|
-
var
|
|
4858
|
-
for (var
|
|
4859
|
-
(o =
|
|
4860
|
-
return
|
|
5124
|
+
], q.prototype, "code", 2);
|
|
5125
|
+
vt([
|
|
5126
|
+
m()
|
|
5127
|
+
], q.prototype, "activeTab", 2);
|
|
5128
|
+
vt([
|
|
5129
|
+
m()
|
|
5130
|
+
], q.prototype, "copied", 2);
|
|
5131
|
+
q = vt([
|
|
5132
|
+
v("crt-code-example")
|
|
5133
|
+
], q);
|
|
5134
|
+
var Jr = Object.defineProperty, ta = Object.getOwnPropertyDescriptor, Kt = (e, t, a, s) => {
|
|
5135
|
+
for (var r = s > 1 ? void 0 : s ? ta(t, a) : t, i = e.length - 1, o; i >= 0; i--)
|
|
5136
|
+
(o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
|
|
5137
|
+
return s && r && Jr(t, a, r), r;
|
|
4861
5138
|
};
|
|
4862
|
-
let
|
|
5139
|
+
let dt = class extends h {
|
|
4863
5140
|
constructor() {
|
|
4864
|
-
super(...arguments), this.open = !1, this.title = "Modal", this.size = "medium", this._handleKeydown = (
|
|
4865
|
-
|
|
5141
|
+
super(...arguments), this.open = !1, this.title = "Modal", this.size = "medium", this._handleKeydown = (e) => {
|
|
5142
|
+
e.key === "Escape" && this.open && this.close();
|
|
4866
5143
|
};
|
|
4867
5144
|
}
|
|
4868
5145
|
connectedCallback() {
|
|
@@ -4874,11 +5151,11 @@ let tt = class extends p {
|
|
|
4874
5151
|
close() {
|
|
4875
5152
|
this.open = !1, this.dispatchEvent(new CustomEvent("close"));
|
|
4876
5153
|
}
|
|
4877
|
-
_handleBackdropClick(
|
|
4878
|
-
|
|
5154
|
+
_handleBackdropClick(e) {
|
|
5155
|
+
e.target.classList.contains("backdrop") && this.close();
|
|
4879
5156
|
}
|
|
4880
5157
|
render() {
|
|
4881
|
-
return
|
|
5158
|
+
return l`
|
|
4882
5159
|
<div class="backdrop" @click="${this._handleBackdropClick}">
|
|
4883
5160
|
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="modal-title">
|
|
4884
5161
|
<div class="modal-header">
|
|
@@ -4896,7 +5173,7 @@ let tt = class extends p {
|
|
|
4896
5173
|
`;
|
|
4897
5174
|
}
|
|
4898
5175
|
};
|
|
4899
|
-
|
|
5176
|
+
dt.styles = d`
|
|
4900
5177
|
:host {
|
|
4901
5178
|
display: none;
|
|
4902
5179
|
}
|
|
@@ -5023,24 +5300,24 @@ tt.styles = l`
|
|
|
5023
5300
|
height: calc(95vh - 120px);
|
|
5024
5301
|
}
|
|
5025
5302
|
`;
|
|
5026
|
-
|
|
5303
|
+
Kt([
|
|
5027
5304
|
n({ type: Boolean, reflect: !0 })
|
|
5028
|
-
],
|
|
5029
|
-
|
|
5305
|
+
], dt.prototype, "open", 2);
|
|
5306
|
+
Kt([
|
|
5030
5307
|
n({ type: String })
|
|
5031
|
-
],
|
|
5032
|
-
|
|
5308
|
+
], dt.prototype, "title", 2);
|
|
5309
|
+
Kt([
|
|
5033
5310
|
n({ type: String })
|
|
5034
|
-
],
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
],
|
|
5038
|
-
var
|
|
5039
|
-
for (var
|
|
5040
|
-
(o =
|
|
5041
|
-
return
|
|
5311
|
+
], dt.prototype, "size", 2);
|
|
5312
|
+
dt = Kt([
|
|
5313
|
+
v("crt-modal")
|
|
5314
|
+
], dt);
|
|
5315
|
+
var ea = Object.defineProperty, ra = Object.getOwnPropertyDescriptor, nt = (e, t, a, s) => {
|
|
5316
|
+
for (var r = s > 1 ? void 0 : s ? ra(t, a) : t, i = e.length - 1, o; i >= 0; i--)
|
|
5317
|
+
(o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
|
|
5318
|
+
return s && r && ea(t, a, r), r;
|
|
5042
5319
|
};
|
|
5043
|
-
let
|
|
5320
|
+
let j = class extends h {
|
|
5044
5321
|
constructor() {
|
|
5045
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;
|
|
5046
5323
|
}
|
|
@@ -5054,25 +5331,25 @@ let D = class extends p {
|
|
|
5054
5331
|
});
|
|
5055
5332
|
}));
|
|
5056
5333
|
}
|
|
5057
|
-
show(
|
|
5334
|
+
show(e) {
|
|
5058
5335
|
const t = ++this._counter, a = {
|
|
5059
5336
|
id: t,
|
|
5060
|
-
title:
|
|
5061
|
-
message:
|
|
5062
|
-
variant:
|
|
5063
|
-
duration:
|
|
5337
|
+
title: e.title,
|
|
5338
|
+
message: e.message,
|
|
5339
|
+
variant: e.variant || "default",
|
|
5340
|
+
duration: e.duration ?? 4e3
|
|
5064
5341
|
};
|
|
5065
5342
|
this._toasts = [...this._toasts, a], a.duration > 0 && setTimeout(() => this._removeToast(t), a.duration);
|
|
5066
5343
|
}
|
|
5067
|
-
_removeToast(
|
|
5344
|
+
_removeToast(e) {
|
|
5068
5345
|
this._toasts = this._toasts.map(
|
|
5069
|
-
(t) => t.id ===
|
|
5346
|
+
(t) => t.id === e ? { ...t, removing: !0 } : t
|
|
5070
5347
|
), setTimeout(() => {
|
|
5071
|
-
this._toasts = this._toasts.filter((t) => t.id !==
|
|
5348
|
+
this._toasts = this._toasts.filter((t) => t.id !== e);
|
|
5072
5349
|
}, 300);
|
|
5073
5350
|
}
|
|
5074
|
-
_getIcon(
|
|
5075
|
-
switch (
|
|
5351
|
+
_getIcon(e) {
|
|
5352
|
+
switch (e) {
|
|
5076
5353
|
case "success":
|
|
5077
5354
|
return "[✓]";
|
|
5078
5355
|
case "warning":
|
|
@@ -5086,18 +5363,18 @@ let D = class extends p {
|
|
|
5086
5363
|
}
|
|
5087
5364
|
}
|
|
5088
5365
|
render() {
|
|
5089
|
-
return
|
|
5366
|
+
return l`
|
|
5090
5367
|
<div class="toast-container">
|
|
5091
|
-
${this._toasts.map((
|
|
5092
|
-
<div class="toast ${
|
|
5093
|
-
<span class="toast-icon">${this._getIcon(
|
|
5368
|
+
${this._toasts.map((e) => l`
|
|
5369
|
+
<div class="toast ${e.variant} ${e.removing ? "removing" : ""}">
|
|
5370
|
+
<span class="toast-icon">${this._getIcon(e.variant)}</span>
|
|
5094
5371
|
<div class="toast-content">
|
|
5095
|
-
${
|
|
5096
|
-
<p class="toast-message">${
|
|
5372
|
+
${e.title ? l`<h4 class="toast-title">${e.title}</h4>` : ""}
|
|
5373
|
+
<p class="toast-message">${e.message}</p>
|
|
5097
5374
|
</div>
|
|
5098
|
-
<button class="toast-close" @click="${() => this._removeToast(
|
|
5099
|
-
${
|
|
5100
|
-
<div class="toast-progress" style="animation-duration: ${
|
|
5375
|
+
<button class="toast-close" @click="${() => this._removeToast(e.id)}">✕</button>
|
|
5376
|
+
${e.duration > 0 ? l`
|
|
5377
|
+
<div class="toast-progress" style="animation-duration: ${e.duration}ms"></div>
|
|
5101
5378
|
` : ""}
|
|
5102
5379
|
</div>
|
|
5103
5380
|
`)}
|
|
@@ -5105,7 +5382,7 @@ let D = class extends p {
|
|
|
5105
5382
|
`;
|
|
5106
5383
|
}
|
|
5107
5384
|
};
|
|
5108
|
-
|
|
5385
|
+
j.styles = d`
|
|
5109
5386
|
:host {
|
|
5110
5387
|
position: fixed;
|
|
5111
5388
|
z-index: 10001;
|
|
@@ -5272,33 +5549,33 @@ D.styles = l`
|
|
|
5272
5549
|
to { width: 0%; }
|
|
5273
5550
|
}
|
|
5274
5551
|
`;
|
|
5275
|
-
|
|
5552
|
+
nt([
|
|
5276
5553
|
n({ type: String, reflect: !0 })
|
|
5277
|
-
],
|
|
5278
|
-
|
|
5554
|
+
], j.prototype, "position", 2);
|
|
5555
|
+
nt([
|
|
5279
5556
|
n({ type: String })
|
|
5280
|
-
],
|
|
5281
|
-
|
|
5557
|
+
], j.prototype, "message", 2);
|
|
5558
|
+
nt([
|
|
5282
5559
|
n({ type: String })
|
|
5283
|
-
],
|
|
5284
|
-
|
|
5560
|
+
], j.prototype, "title", 2);
|
|
5561
|
+
nt([
|
|
5285
5562
|
n({ type: String })
|
|
5286
|
-
],
|
|
5287
|
-
|
|
5563
|
+
], j.prototype, "variant", 2);
|
|
5564
|
+
nt([
|
|
5288
5565
|
n({ type: Number })
|
|
5289
|
-
],
|
|
5290
|
-
|
|
5291
|
-
|
|
5292
|
-
],
|
|
5293
|
-
|
|
5294
|
-
|
|
5295
|
-
],
|
|
5296
|
-
var
|
|
5297
|
-
for (var
|
|
5298
|
-
(o =
|
|
5299
|
-
return
|
|
5566
|
+
], j.prototype, "duration", 2);
|
|
5567
|
+
nt([
|
|
5568
|
+
m()
|
|
5569
|
+
], j.prototype, "_toasts", 2);
|
|
5570
|
+
j = nt([
|
|
5571
|
+
v("crt-toast")
|
|
5572
|
+
], j);
|
|
5573
|
+
var aa = Object.defineProperty, sa = Object.getOwnPropertyDescriptor, St = (e, t, a, s) => {
|
|
5574
|
+
for (var r = s > 1 ? void 0 : s ? sa(t, a) : t, i = e.length - 1, o; i >= 0; i--)
|
|
5575
|
+
(o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
|
|
5576
|
+
return s && r && aa(t, a, r), r;
|
|
5300
5577
|
};
|
|
5301
|
-
let
|
|
5578
|
+
let Ct = class extends h {
|
|
5302
5579
|
constructor() {
|
|
5303
5580
|
super(...arguments), this.header = "", this.open = !1;
|
|
5304
5581
|
}
|
|
@@ -5309,7 +5586,7 @@ let ht = class extends p {
|
|
|
5309
5586
|
}));
|
|
5310
5587
|
}
|
|
5311
5588
|
render() {
|
|
5312
|
-
return
|
|
5589
|
+
return l`
|
|
5313
5590
|
<div
|
|
5314
5591
|
class="accordion-header ${this.open ? "open" : ""}"
|
|
5315
5592
|
@click="${this.toggle}"
|
|
@@ -5327,7 +5604,7 @@ let ht = class extends p {
|
|
|
5327
5604
|
`;
|
|
5328
5605
|
}
|
|
5329
5606
|
};
|
|
5330
|
-
|
|
5607
|
+
Ct.styles = d`
|
|
5331
5608
|
:host {
|
|
5332
5609
|
display: block;
|
|
5333
5610
|
font-family: var(--crt-font-family);
|
|
@@ -5398,20 +5675,20 @@ ht.styles = l`
|
|
|
5398
5675
|
color: var(--crt-text-secondary);
|
|
5399
5676
|
}
|
|
5400
5677
|
`;
|
|
5401
|
-
|
|
5678
|
+
St([
|
|
5402
5679
|
n({ type: String })
|
|
5403
|
-
],
|
|
5404
|
-
|
|
5680
|
+
], Ct.prototype, "header", 2);
|
|
5681
|
+
St([
|
|
5405
5682
|
n({ type: Boolean, reflect: !0 })
|
|
5406
|
-
],
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
],
|
|
5410
|
-
let
|
|
5683
|
+
], Ct.prototype, "open", 2);
|
|
5684
|
+
Ct = St([
|
|
5685
|
+
v("crt-accordion-item")
|
|
5686
|
+
], Ct);
|
|
5687
|
+
let Yt = class extends h {
|
|
5411
5688
|
constructor() {
|
|
5412
|
-
super(...arguments), this.multiple = !1, this._handleToggle = (
|
|
5413
|
-
!this.multiple &&
|
|
5414
|
-
t !==
|
|
5689
|
+
super(...arguments), this.multiple = !1, this._handleToggle = (e) => {
|
|
5690
|
+
!this.multiple && e.detail.open && this.querySelectorAll("crt-accordion-item").forEach((t) => {
|
|
5691
|
+
t !== e.target && (t.open = !1);
|
|
5415
5692
|
});
|
|
5416
5693
|
};
|
|
5417
5694
|
}
|
|
@@ -5422,36 +5699,36 @@ let Pt = class extends p {
|
|
|
5422
5699
|
super.disconnectedCallback(), this.removeEventListener("toggle", this._handleToggle);
|
|
5423
5700
|
}
|
|
5424
5701
|
render() {
|
|
5425
|
-
return
|
|
5702
|
+
return l`<slot></slot>`;
|
|
5426
5703
|
}
|
|
5427
5704
|
};
|
|
5428
|
-
|
|
5705
|
+
Yt.styles = d`
|
|
5429
5706
|
:host {
|
|
5430
5707
|
display: block;
|
|
5431
5708
|
}
|
|
5432
5709
|
`;
|
|
5433
|
-
|
|
5710
|
+
St([
|
|
5434
5711
|
n({ type: Boolean })
|
|
5435
|
-
],
|
|
5436
|
-
|
|
5437
|
-
|
|
5438
|
-
],
|
|
5439
|
-
var
|
|
5440
|
-
for (var
|
|
5441
|
-
(o =
|
|
5442
|
-
return
|
|
5712
|
+
], Yt.prototype, "multiple", 2);
|
|
5713
|
+
Yt = St([
|
|
5714
|
+
v("crt-accordion")
|
|
5715
|
+
], Yt);
|
|
5716
|
+
var ia = Object.defineProperty, oa = Object.getOwnPropertyDescriptor, Et = (e, t, a, s) => {
|
|
5717
|
+
for (var r = s > 1 ? void 0 : s ? oa(t, a) : t, i = e.length - 1, o; i >= 0; i--)
|
|
5718
|
+
(o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
|
|
5719
|
+
return s && r && ia(t, a, r), r;
|
|
5443
5720
|
};
|
|
5444
|
-
let
|
|
5721
|
+
let rt = class extends h {
|
|
5445
5722
|
constructor() {
|
|
5446
5723
|
super(...arguments), this.bars = 20, this.mode = 1, this.barHeights = [], this.isActive = !1, this.visualize = () => {
|
|
5447
5724
|
if (!this.isActive || !this.analyser || !this.dataArray) return;
|
|
5448
5725
|
this.analyser.getByteFrequencyData(this.dataArray);
|
|
5449
|
-
const
|
|
5726
|
+
const e = Math.floor(this.dataArray.length / this.bars), t = [];
|
|
5450
5727
|
for (let a = 0; a < this.bars; a++) {
|
|
5451
|
-
let
|
|
5452
|
-
this.mode === 1 ?
|
|
5453
|
-
const
|
|
5454
|
-
t.push(Math.max(20,
|
|
5728
|
+
let s;
|
|
5729
|
+
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);
|
|
5730
|
+
const i = (this.dataArray[s] || 0) / 255 * 100;
|
|
5731
|
+
t.push(Math.max(20, i));
|
|
5455
5732
|
}
|
|
5456
5733
|
this.barHeights = t, this.animationId = requestAnimationFrame(this.visualize);
|
|
5457
5734
|
};
|
|
@@ -5462,9 +5739,9 @@ let K = class extends p {
|
|
|
5462
5739
|
disconnectedCallback() {
|
|
5463
5740
|
super.disconnectedCallback(), this.stop();
|
|
5464
5741
|
}
|
|
5465
|
-
connectAudio(
|
|
5742
|
+
connectAudio(e) {
|
|
5466
5743
|
if (!this.audioContext) {
|
|
5467
|
-
this.audioContext = new (window.AudioContext || window.webkitAudioContext)(), this.analyser = this.audioContext.createAnalyser(), this.analyser.fftSize = 64, this.sourceNode = this.audioContext.createMediaElementSource(
|
|
5744
|
+
this.audioContext = new (window.AudioContext || window.webkitAudioContext)(), this.analyser = this.audioContext.createAnalyser(), this.analyser.fftSize = 64, this.sourceNode = this.audioContext.createMediaElementSource(e), this.sourceNode.connect(this.analyser), this.analyser.connect(this.audioContext.destination);
|
|
5468
5745
|
const t = this.analyser.frequencyBinCount;
|
|
5469
5746
|
this.dataArray = new Uint8Array(t);
|
|
5470
5747
|
}
|
|
@@ -5483,18 +5760,18 @@ let K = class extends p {
|
|
|
5483
5760
|
this.mode = this.mode === 3 ? 1 : this.mode + 1, this.dispatchEvent(new CustomEvent("mode-change", { detail: { mode: this.mode } }));
|
|
5484
5761
|
}
|
|
5485
5762
|
render() {
|
|
5486
|
-
return
|
|
5763
|
+
return l`
|
|
5487
5764
|
<div class="visualizer">
|
|
5488
5765
|
<span class="label">[VISUALIZER]</span>
|
|
5489
5766
|
<button class="mode-toggle" @click="${this.toggleMode}">MODE ${this.mode}</button>
|
|
5490
|
-
${this.barHeights.map((
|
|
5491
|
-
<div class="bar" style="height: ${
|
|
5767
|
+
${this.barHeights.map((e) => l`
|
|
5768
|
+
<div class="bar" style="height: ${e}%"></div>
|
|
5492
5769
|
`)}
|
|
5493
5770
|
</div>
|
|
5494
5771
|
`;
|
|
5495
5772
|
}
|
|
5496
5773
|
};
|
|
5497
|
-
|
|
5774
|
+
rt.styles = d`
|
|
5498
5775
|
:host {
|
|
5499
5776
|
display: block;
|
|
5500
5777
|
}
|
|
@@ -5569,37 +5846,37 @@ K.styles = l`
|
|
|
5569
5846
|
animation: none;
|
|
5570
5847
|
}
|
|
5571
5848
|
`;
|
|
5572
|
-
|
|
5849
|
+
Et([
|
|
5573
5850
|
n({ type: Number })
|
|
5574
|
-
],
|
|
5575
|
-
|
|
5851
|
+
], rt.prototype, "bars", 2);
|
|
5852
|
+
Et([
|
|
5576
5853
|
n({ type: Number })
|
|
5577
|
-
],
|
|
5578
|
-
|
|
5579
|
-
|
|
5580
|
-
],
|
|
5581
|
-
|
|
5582
|
-
|
|
5583
|
-
],
|
|
5584
|
-
|
|
5585
|
-
|
|
5586
|
-
],
|
|
5587
|
-
var
|
|
5588
|
-
for (var
|
|
5589
|
-
(o =
|
|
5590
|
-
return
|
|
5854
|
+
], rt.prototype, "mode", 2);
|
|
5855
|
+
Et([
|
|
5856
|
+
m()
|
|
5857
|
+
], rt.prototype, "barHeights", 2);
|
|
5858
|
+
Et([
|
|
5859
|
+
m()
|
|
5860
|
+
], rt.prototype, "isActive", 2);
|
|
5861
|
+
rt = Et([
|
|
5862
|
+
v("crt-visualizer")
|
|
5863
|
+
], rt);
|
|
5864
|
+
var na = Object.defineProperty, la = Object.getOwnPropertyDescriptor, pe = (e, t, a, s) => {
|
|
5865
|
+
for (var r = s > 1 ? void 0 : s ? la(t, a) : t, i = e.length - 1, o; i >= 0; i--)
|
|
5866
|
+
(o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
|
|
5867
|
+
return s && r && na(t, a, r), r;
|
|
5591
5868
|
};
|
|
5592
|
-
let
|
|
5869
|
+
let Ot = class extends h {
|
|
5593
5870
|
constructor() {
|
|
5594
5871
|
super(...arguments), this.tracks = [], this.currentIndex = 0;
|
|
5595
5872
|
}
|
|
5596
|
-
handleTrackClick(
|
|
5873
|
+
handleTrackClick(e) {
|
|
5597
5874
|
this.dispatchEvent(new CustomEvent("track-select", {
|
|
5598
|
-
detail: { index:
|
|
5875
|
+
detail: { index: e, track: this.tracks[e] }
|
|
5599
5876
|
}));
|
|
5600
5877
|
}
|
|
5601
|
-
handleRemoveTrack(
|
|
5602
|
-
|
|
5878
|
+
handleRemoveTrack(e, t) {
|
|
5879
|
+
e.stopPropagation(), this.dispatchEvent(new CustomEvent("track-remove", {
|
|
5603
5880
|
detail: { index: t }
|
|
5604
5881
|
}));
|
|
5605
5882
|
}
|
|
@@ -5607,17 +5884,17 @@ let vt = class extends p {
|
|
|
5607
5884
|
this.dispatchEvent(new CustomEvent("add-tracks"));
|
|
5608
5885
|
}
|
|
5609
5886
|
render() {
|
|
5610
|
-
return
|
|
5887
|
+
return l`
|
|
5611
5888
|
<crt-card>
|
|
5612
5889
|
<crt-heading level="4" slot="header" style="margin: 0;">[PLAYLIST]</crt-heading>
|
|
5613
5890
|
|
|
5614
|
-
${this.tracks.length === 0 ?
|
|
5891
|
+
${this.tracks.length === 0 ? l`
|
|
5615
5892
|
<div class="empty-state" @click="${this.handleEmptyClick}">
|
|
5616
5893
|
<div class="empty-icon">[+]</div>
|
|
5617
5894
|
<crt-heading level="4" style="margin: 0 0 var(--crt-spacing-sm) 0;">NO TRACKS LOADED</crt-heading>
|
|
5618
5895
|
<crt-text muted style="margin: 0;">CLICK TO ADD AUDIO FILES</crt-text>
|
|
5619
5896
|
</div>
|
|
5620
|
-
` :
|
|
5897
|
+
` : l`
|
|
5621
5898
|
<div class="table-wrapper">
|
|
5622
5899
|
<table>
|
|
5623
5900
|
<thead>
|
|
@@ -5629,14 +5906,14 @@ let vt = class extends p {
|
|
|
5629
5906
|
</tr>
|
|
5630
5907
|
</thead>
|
|
5631
5908
|
<tbody>
|
|
5632
|
-
${this.tracks.map((
|
|
5909
|
+
${this.tracks.map((e, t) => l`
|
|
5633
5910
|
<tr
|
|
5634
5911
|
class="${t === this.currentIndex ? "active" : ""}"
|
|
5635
5912
|
@click="${() => this.handleTrackClick(t)}"
|
|
5636
5913
|
>
|
|
5637
5914
|
<td class="track-number">${t + 1}</td>
|
|
5638
|
-
<td class="track-title">${
|
|
5639
|
-
<td class="track-artist">${
|
|
5915
|
+
<td class="track-title">${e.title}</td>
|
|
5916
|
+
<td class="track-artist">${e.artist}</td>
|
|
5640
5917
|
<td class="actions">
|
|
5641
5918
|
<crt-button
|
|
5642
5919
|
class="remove-btn"
|
|
@@ -5658,9 +5935,11 @@ let vt = class extends p {
|
|
|
5658
5935
|
`;
|
|
5659
5936
|
}
|
|
5660
5937
|
};
|
|
5661
|
-
|
|
5938
|
+
Ot.styles = d`
|
|
5662
5939
|
:host {
|
|
5663
5940
|
display: block;
|
|
5941
|
+
width: 100%;
|
|
5942
|
+
box-sizing: border-box;
|
|
5664
5943
|
}
|
|
5665
5944
|
|
|
5666
5945
|
/* Table Styles */
|
|
@@ -5743,10 +6022,12 @@ vt.styles = l`
|
|
|
5743
6022
|
}
|
|
5744
6023
|
|
|
5745
6024
|
td.track-title {
|
|
5746
|
-
|
|
6025
|
+
/* Allow titles to wrap on narrow screens to avoid forcing huge action column widths */
|
|
6026
|
+
white-space: normal;
|
|
5747
6027
|
overflow: hidden;
|
|
5748
6028
|
text-overflow: ellipsis;
|
|
5749
6029
|
min-width: 0;
|
|
6030
|
+
word-break: break-word;
|
|
5750
6031
|
}
|
|
5751
6032
|
|
|
5752
6033
|
td.track-artist {
|
|
@@ -5758,7 +6039,8 @@ vt.styles = l`
|
|
|
5758
6039
|
}
|
|
5759
6040
|
|
|
5760
6041
|
.remove-btn {
|
|
5761
|
-
opacity
|
|
6042
|
+
/* Visible by default at low opacity so touch devices can see it */
|
|
6043
|
+
opacity: 0.65;
|
|
5762
6044
|
transition: var(--crt-transition);
|
|
5763
6045
|
}
|
|
5764
6046
|
|
|
@@ -5772,6 +6054,13 @@ vt.styles = l`
|
|
|
5772
6054
|
text-align: center;
|
|
5773
6055
|
padding: var(--crt-spacing-xl);
|
|
5774
6056
|
transition: var(--crt-transition);
|
|
6057
|
+
/* Ensure the empty preview stretches to the container width */
|
|
6058
|
+
width: 100%;
|
|
6059
|
+
box-sizing: border-box;
|
|
6060
|
+
display: flex;
|
|
6061
|
+
flex-direction: column;
|
|
6062
|
+
align-items: center;
|
|
6063
|
+
justify-content: center;
|
|
5775
6064
|
}
|
|
5776
6065
|
|
|
5777
6066
|
.empty-state:hover {
|
|
@@ -5796,8 +6085,9 @@ vt.styles = l`
|
|
|
5796
6085
|
|
|
5797
6086
|
/* Responsive: hide artist on narrow screens and allow horizontal scroll fallback */
|
|
5798
6087
|
@media (max-width: 520px) {
|
|
5799
|
-
|
|
5800
|
-
td.track-
|
|
6088
|
+
/* Keep artist visible on narrow screens but allow wrapping */
|
|
6089
|
+
td.track-artist { display: table-cell; max-width: 120px; white-space: normal; word-break: break-word; }
|
|
6090
|
+
td.track-title { max-width: 140px; min-width: 0; white-space: normal; }
|
|
5801
6091
|
.table-wrapper { overflow-x: auto; min-width: 0; }
|
|
5802
6092
|
}
|
|
5803
6093
|
|
|
@@ -5815,21 +6105,21 @@ vt.styles = l`
|
|
|
5815
6105
|
box-shadow: var(--crt-glow-sm);
|
|
5816
6106
|
}
|
|
5817
6107
|
`;
|
|
5818
|
-
|
|
6108
|
+
pe([
|
|
5819
6109
|
n({ type: Array })
|
|
5820
|
-
],
|
|
5821
|
-
|
|
6110
|
+
], Ot.prototype, "tracks", 2);
|
|
6111
|
+
pe([
|
|
5822
6112
|
n({ type: Number })
|
|
5823
|
-
],
|
|
5824
|
-
|
|
5825
|
-
|
|
5826
|
-
],
|
|
5827
|
-
var
|
|
5828
|
-
for (var
|
|
5829
|
-
(o =
|
|
5830
|
-
return
|
|
6113
|
+
], Ot.prototype, "currentIndex", 2);
|
|
6114
|
+
Ot = pe([
|
|
6115
|
+
v("crt-playlist")
|
|
6116
|
+
], Ot);
|
|
6117
|
+
var ca = Object.defineProperty, pa = Object.getOwnPropertyDescriptor, N = (e, t, a, s) => {
|
|
6118
|
+
for (var r = s > 1 ? void 0 : s ? pa(t, a) : t, i = e.length - 1, o; i >= 0; i--)
|
|
6119
|
+
(o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
|
|
6120
|
+
return s && r && ca(t, a, r), r;
|
|
5831
6121
|
};
|
|
5832
|
-
let
|
|
6122
|
+
let _ = class extends h {
|
|
5833
6123
|
constructor() {
|
|
5834
6124
|
super(...arguments), this.tracks = [], this.currentIndex = 0, this.isPlaying = !1, this.currentTime = 0, this.duration = 0, this.volume = 80, this.togglePlay = () => {
|
|
5835
6125
|
this.isPlaying ? this.pause() : this.play();
|
|
@@ -5843,34 +6133,34 @@ let x = class extends p {
|
|
|
5843
6133
|
this.duration = this.audio?.duration || 0;
|
|
5844
6134
|
}, this.handleEnded = () => {
|
|
5845
6135
|
this.nextTrack();
|
|
5846
|
-
}, this.handleProgressClick = (
|
|
5847
|
-
const a =
|
|
5848
|
-
this.audio && (this.audio.currentTime = this.duration *
|
|
5849
|
-
}, this.handleVolumeChange = (
|
|
5850
|
-
this.volume =
|
|
6136
|
+
}, this.handleProgressClick = (e) => {
|
|
6137
|
+
const a = e.currentTarget.getBoundingClientRect(), s = (e.clientX - a.left) / a.width;
|
|
6138
|
+
this.audio && (this.audio.currentTime = this.duration * s);
|
|
6139
|
+
}, this.handleVolumeChange = (e) => {
|
|
6140
|
+
this.volume = e.detail.value, this.audio && (this.audio.volume = this.volume / 100), localStorage.setItem("crtPlayerVolume", this.volume.toString());
|
|
5851
6141
|
};
|
|
5852
6142
|
}
|
|
5853
6143
|
connectedCallback() {
|
|
5854
6144
|
super.connectedCallback();
|
|
5855
|
-
const
|
|
5856
|
-
|
|
6145
|
+
const e = localStorage.getItem("crtPlayerVolume");
|
|
6146
|
+
e && (this.volume = parseInt(e));
|
|
5857
6147
|
}
|
|
5858
6148
|
firstUpdated() {
|
|
5859
6149
|
this.audio && (this.audio.volume = this.volume / 100);
|
|
5860
6150
|
}
|
|
5861
|
-
updated(
|
|
5862
|
-
|
|
6151
|
+
updated(e) {
|
|
6152
|
+
e.has("tracks") && this.tracks.length > 0 && (e.get("tracks") === void 0 || e.get("tracks")?.length === 0) && this.loadTrack(0);
|
|
5863
6153
|
}
|
|
5864
|
-
loadTrack(
|
|
5865
|
-
if (
|
|
5866
|
-
const t = this.tracks[
|
|
6154
|
+
loadTrack(e) {
|
|
6155
|
+
if (e < 0 || e >= this.tracks.length) return;
|
|
6156
|
+
const t = this.tracks[e];
|
|
5867
6157
|
if (!t?.url) {
|
|
5868
|
-
this.currentIndex =
|
|
6158
|
+
this.currentIndex = e;
|
|
5869
6159
|
return;
|
|
5870
6160
|
}
|
|
5871
6161
|
const a = this.isPlaying;
|
|
5872
|
-
this.isPlaying && (this.audio?.pause(), this.visualizer?.stop()), this.currentIndex =
|
|
5873
|
-
detail: { index:
|
|
6162
|
+
this.isPlaying && (this.audio?.pause(), this.visualizer?.stop()), this.currentIndex = e, this.currentTime = 0, this.audio && (this.audio.src = t.url, this.audio.load()), a && this.audio?.addEventListener("canplay", () => this.play(), { once: !0 }), this.dispatchEvent(new CustomEvent("track-change", {
|
|
6163
|
+
detail: { index: e, track: this.tracks[e] }
|
|
5874
6164
|
}));
|
|
5875
6165
|
}
|
|
5876
6166
|
play() {
|
|
@@ -5879,9 +6169,9 @@ let x = class extends p {
|
|
|
5879
6169
|
pause() {
|
|
5880
6170
|
this.audio?.pause(), this.isPlaying = !1, this.visualizer?.stop();
|
|
5881
6171
|
}
|
|
5882
|
-
formatTime(
|
|
5883
|
-
if (!
|
|
5884
|
-
const t = Math.floor(
|
|
6172
|
+
formatTime(e) {
|
|
6173
|
+
if (!e || isNaN(e)) return "00:00";
|
|
6174
|
+
const t = Math.floor(e / 60), a = Math.floor(e % 60);
|
|
5885
6175
|
return `${t.toString().padStart(2, "0")}:${a.toString().padStart(2, "0")}`;
|
|
5886
6176
|
}
|
|
5887
6177
|
get currentTrack() {
|
|
@@ -5891,15 +6181,15 @@ let x = class extends p {
|
|
|
5891
6181
|
return this.duration ? this.currentTime / this.duration * 100 : 0;
|
|
5892
6182
|
}
|
|
5893
6183
|
render() {
|
|
5894
|
-
const
|
|
5895
|
-
return
|
|
6184
|
+
const e = this.tracks.length > 0 && this.currentTrack;
|
|
6185
|
+
return l`
|
|
5896
6186
|
<div class="player">
|
|
5897
6187
|
<!-- Header -->
|
|
5898
6188
|
<div class="player-header">
|
|
5899
6189
|
<crt-heading level="4" style="margin: 0;">[♫] MUSIC PLAYER [♫]</crt-heading>
|
|
5900
6190
|
</div>
|
|
5901
6191
|
|
|
5902
|
-
${
|
|
6192
|
+
${e ? l`
|
|
5903
6193
|
<!-- Visualizer -->
|
|
5904
6194
|
<div class="visualizer-section">
|
|
5905
6195
|
<crt-visualizer .bars="${20}"></crt-visualizer>
|
|
@@ -5950,7 +6240,7 @@ let x = class extends p {
|
|
|
5950
6240
|
</div>
|
|
5951
6241
|
</div>
|
|
5952
6242
|
</div>
|
|
5953
|
-
` :
|
|
6243
|
+
` : l`
|
|
5954
6244
|
<!-- Empty State -->
|
|
5955
6245
|
<div class="empty-state">
|
|
5956
6246
|
<crt-text muted style="font-size: 2rem; margin: 0 0 var(--crt-spacing-md) 0;">[---]</crt-text>
|
|
@@ -5969,7 +6259,7 @@ let x = class extends p {
|
|
|
5969
6259
|
`;
|
|
5970
6260
|
}
|
|
5971
6261
|
};
|
|
5972
|
-
|
|
6262
|
+
_.styles = d`
|
|
5973
6263
|
:host {
|
|
5974
6264
|
display: block;
|
|
5975
6265
|
font-family: var(--crt-font-family);
|
|
@@ -6122,55 +6412,55 @@ x.styles = l`
|
|
|
6122
6412
|
opacity: 0.5;
|
|
6123
6413
|
}
|
|
6124
6414
|
`;
|
|
6125
|
-
|
|
6415
|
+
N([
|
|
6126
6416
|
n({ type: Array })
|
|
6127
|
-
],
|
|
6128
|
-
|
|
6417
|
+
], _.prototype, "tracks", 2);
|
|
6418
|
+
N([
|
|
6129
6419
|
n({ type: Number })
|
|
6130
|
-
],
|
|
6131
|
-
|
|
6132
|
-
|
|
6133
|
-
],
|
|
6134
|
-
|
|
6135
|
-
|
|
6136
|
-
],
|
|
6137
|
-
|
|
6138
|
-
|
|
6139
|
-
],
|
|
6140
|
-
|
|
6141
|
-
|
|
6142
|
-
],
|
|
6143
|
-
|
|
6144
|
-
|
|
6145
|
-
],
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
],
|
|
6149
|
-
|
|
6150
|
-
|
|
6151
|
-
],
|
|
6152
|
-
var
|
|
6153
|
-
for (var
|
|
6154
|
-
(o =
|
|
6155
|
-
return
|
|
6420
|
+
], _.prototype, "currentIndex", 2);
|
|
6421
|
+
N([
|
|
6422
|
+
m()
|
|
6423
|
+
], _.prototype, "isPlaying", 2);
|
|
6424
|
+
N([
|
|
6425
|
+
m()
|
|
6426
|
+
], _.prototype, "currentTime", 2);
|
|
6427
|
+
N([
|
|
6428
|
+
m()
|
|
6429
|
+
], _.prototype, "duration", 2);
|
|
6430
|
+
N([
|
|
6431
|
+
m()
|
|
6432
|
+
], _.prototype, "volume", 2);
|
|
6433
|
+
N([
|
|
6434
|
+
ee("audio")
|
|
6435
|
+
], _.prototype, "audio", 2);
|
|
6436
|
+
N([
|
|
6437
|
+
ee("crt-visualizer")
|
|
6438
|
+
], _.prototype, "visualizer", 2);
|
|
6439
|
+
_ = N([
|
|
6440
|
+
v("crt-music-player")
|
|
6441
|
+
], _);
|
|
6442
|
+
var da = Object.defineProperty, ha = Object.getOwnPropertyDescriptor, gt = (e, t, a, s) => {
|
|
6443
|
+
for (var r = s > 1 ? void 0 : s ? ha(t, a) : t, i = e.length - 1, o; i >= 0; i--)
|
|
6444
|
+
(o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
|
|
6445
|
+
return s && r && da(t, a, r), r;
|
|
6156
6446
|
};
|
|
6157
|
-
let
|
|
6447
|
+
let W = class extends h {
|
|
6158
6448
|
constructor() {
|
|
6159
6449
|
super(), this.rows = 10, this.prompt = "$", this.disabled = !1, this.outputs = [], this.input = "", this.handleFocus = () => {
|
|
6160
6450
|
this.disabled || this.focus();
|
|
6161
|
-
}, this.handleKeydown = (
|
|
6451
|
+
}, this.handleKeydown = (e) => {
|
|
6162
6452
|
if (!this.disabled) {
|
|
6163
|
-
if (
|
|
6164
|
-
|
|
6453
|
+
if (e.key === "Backspace") {
|
|
6454
|
+
e.preventDefault(), this.input = this.input.slice(0, -1), this.requestUpdate();
|
|
6165
6455
|
return;
|
|
6166
6456
|
}
|
|
6167
|
-
if (
|
|
6168
|
-
|
|
6457
|
+
if (e.key === "Enter") {
|
|
6458
|
+
e.preventDefault();
|
|
6169
6459
|
const t = this.input.trim();
|
|
6170
6460
|
this.println(`${this.prompt} ${t}`), this.dispatchEvent(new CustomEvent("command", { detail: t })), this.input = "", this.requestUpdate();
|
|
6171
6461
|
return;
|
|
6172
6462
|
}
|
|
6173
|
-
|
|
6463
|
+
e.key.length === 1 && !e.ctrlKey && !e.metaKey && (this.input += e.key, this.requestUpdate());
|
|
6174
6464
|
}
|
|
6175
6465
|
}, this.typing = !1, this.typeQueue = [], this.outputs = ["$ SYSTEM READY _"];
|
|
6176
6466
|
}
|
|
@@ -6181,13 +6471,13 @@ let F = class extends p {
|
|
|
6181
6471
|
this.removeEventListener("click", this.handleFocus), this.removeEventListener("keydown", this.handleKeydown), super.disconnectedCallback();
|
|
6182
6472
|
}
|
|
6183
6473
|
// Public API
|
|
6184
|
-
write(
|
|
6474
|
+
write(e) {
|
|
6185
6475
|
this.outputs.length === 0 && (this.outputs = []);
|
|
6186
6476
|
const t = this.outputs[this.outputs.length - 1] || "";
|
|
6187
|
-
this.outputs[this.outputs.length - 1] = t +
|
|
6477
|
+
this.outputs[this.outputs.length - 1] = t + e, this.requestUpdate(), this.scrollToBottom();
|
|
6188
6478
|
}
|
|
6189
|
-
println(
|
|
6190
|
-
this.outputs = [...this.outputs,
|
|
6479
|
+
println(e) {
|
|
6480
|
+
this.outputs = [...this.outputs, e], this.requestUpdate(), this.scrollToBottom();
|
|
6191
6481
|
}
|
|
6192
6482
|
clear() {
|
|
6193
6483
|
this.outputs = [], this.requestUpdate();
|
|
@@ -6197,39 +6487,39 @@ let F = class extends p {
|
|
|
6197
6487
|
}
|
|
6198
6488
|
scrollToBottom() {
|
|
6199
6489
|
requestAnimationFrame(() => {
|
|
6200
|
-
const
|
|
6201
|
-
|
|
6490
|
+
const e = this.shadowRoot?.querySelector(".term");
|
|
6491
|
+
e && (e.scrollTop = e.scrollHeight);
|
|
6202
6492
|
});
|
|
6203
6493
|
}
|
|
6204
|
-
type(
|
|
6205
|
-
this.typeQueue.push({ text:
|
|
6494
|
+
type(e, t = 30) {
|
|
6495
|
+
this.typeQueue.push({ text: e, speed: t }), this.typing || this.processTypeQueue();
|
|
6206
6496
|
}
|
|
6207
6497
|
async processTypeQueue() {
|
|
6208
6498
|
if (!this.typing) {
|
|
6209
6499
|
for (this.typing = !0; this.typeQueue.length > 0; ) {
|
|
6210
|
-
const { text:
|
|
6500
|
+
const { text: e, speed: t } = this.typeQueue.shift();
|
|
6211
6501
|
await new Promise((a) => {
|
|
6212
6502
|
this.outputs = [...this.outputs, ""];
|
|
6213
|
-
let
|
|
6214
|
-
const
|
|
6215
|
-
if (
|
|
6503
|
+
let s = 0;
|
|
6504
|
+
const r = () => {
|
|
6505
|
+
if (s >= e.length) {
|
|
6216
6506
|
a();
|
|
6217
6507
|
return;
|
|
6218
6508
|
}
|
|
6219
|
-
const
|
|
6220
|
-
this.outputs[
|
|
6509
|
+
const i = this.outputs.length - 1;
|
|
6510
|
+
this.outputs[i] = (this.outputs[i] || "") + e[s++], this.requestUpdate(), this.scrollToBottom(), setTimeout(r, t);
|
|
6221
6511
|
};
|
|
6222
|
-
|
|
6512
|
+
r();
|
|
6223
6513
|
});
|
|
6224
6514
|
}
|
|
6225
6515
|
this.typing = !1;
|
|
6226
6516
|
}
|
|
6227
6517
|
}
|
|
6228
6518
|
render() {
|
|
6229
|
-
const
|
|
6230
|
-
return
|
|
6519
|
+
const e = this.outputs.slice(-this.rows);
|
|
6520
|
+
return l`
|
|
6231
6521
|
<div class="term" role="textbox" aria-label="Terminal" tabindex="0" aria-disabled="${this.disabled}">
|
|
6232
|
-
${
|
|
6522
|
+
${e.map((t) => l`<div class="line">${t}</div>`)}
|
|
6233
6523
|
<div class="line input-line">
|
|
6234
6524
|
<span class="prompt">${this.prompt}</span>
|
|
6235
6525
|
<div class="fake-input"><span class="input-text">${this.input}</span></div>
|
|
@@ -6239,9 +6529,11 @@ let F = class extends p {
|
|
|
6239
6529
|
`;
|
|
6240
6530
|
}
|
|
6241
6531
|
};
|
|
6242
|
-
|
|
6243
|
-
:host { display: block; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, 'Roboto Mono', monospace; }
|
|
6532
|
+
W.styles = d`
|
|
6533
|
+
: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; }
|
|
6244
6534
|
.term {
|
|
6535
|
+
width: 100%;
|
|
6536
|
+
max-width: none;
|
|
6245
6537
|
background: #0b0f0b;
|
|
6246
6538
|
color: #8aff8a;
|
|
6247
6539
|
padding: 12px;
|
|
@@ -6277,53 +6569,53 @@ F.styles = l`
|
|
|
6277
6569
|
.fake-input .input-text { display:inline-block; white-space:pre; }
|
|
6278
6570
|
.muted { opacity: 0.7; font-size: 0.9em; }
|
|
6279
6571
|
`;
|
|
6280
|
-
|
|
6572
|
+
gt([
|
|
6281
6573
|
n({ type: Number })
|
|
6282
|
-
],
|
|
6283
|
-
|
|
6574
|
+
], W.prototype, "rows", 2);
|
|
6575
|
+
gt([
|
|
6284
6576
|
n({ type: String })
|
|
6285
|
-
],
|
|
6286
|
-
|
|
6577
|
+
], W.prototype, "prompt", 2);
|
|
6578
|
+
gt([
|
|
6287
6579
|
n({ type: Boolean, reflect: !0 })
|
|
6288
|
-
],
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
],
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
],
|
|
6295
|
-
|
|
6296
|
-
|
|
6297
|
-
],
|
|
6298
|
-
var
|
|
6299
|
-
for (var
|
|
6300
|
-
(o =
|
|
6301
|
-
return
|
|
6580
|
+
], W.prototype, "disabled", 2);
|
|
6581
|
+
gt([
|
|
6582
|
+
m()
|
|
6583
|
+
], W.prototype, "outputs", 2);
|
|
6584
|
+
gt([
|
|
6585
|
+
m()
|
|
6586
|
+
], W.prototype, "input", 2);
|
|
6587
|
+
W = gt([
|
|
6588
|
+
v("crt-terminal")
|
|
6589
|
+
], W);
|
|
6590
|
+
var va = Object.defineProperty, ga = Object.getOwnPropertyDescriptor, Mt = (e, t, a, s) => {
|
|
6591
|
+
for (var r = s > 1 ? void 0 : s ? ga(t, a) : t, i = e.length - 1, o; i >= 0; i--)
|
|
6592
|
+
(o = e[i]) && (r = (s ? o(t, a, r) : o(r)) || r);
|
|
6593
|
+
return s && r && va(t, a, r), r;
|
|
6302
6594
|
};
|
|
6303
|
-
let
|
|
6595
|
+
let at = class extends h {
|
|
6304
6596
|
constructor() {
|
|
6305
|
-
super(...arguments), this.tracks = [], this.currentIndex = 0, this.showUploadModal = !1, this.handleFilesChanged = (
|
|
6306
|
-
const a =
|
|
6307
|
-
const
|
|
6308
|
-
let
|
|
6309
|
-
if (
|
|
6310
|
-
const
|
|
6311
|
-
|
|
6597
|
+
super(...arguments), this.tracks = [], this.currentIndex = 0, this.showUploadModal = !1, this.handleFilesChanged = (e) => {
|
|
6598
|
+
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) => {
|
|
6599
|
+
const r = s.name.replace(/\.[^/.]+$/, "");
|
|
6600
|
+
let i = "UNKNOWN ARTIST", o = r.toUpperCase();
|
|
6601
|
+
if (r.includes(" - ")) {
|
|
6602
|
+
const c = r.split(" - ");
|
|
6603
|
+
i = c[0].trim().toUpperCase(), o = c.slice(1).join(" - ").trim().toUpperCase();
|
|
6312
6604
|
}
|
|
6313
6605
|
return {
|
|
6314
6606
|
title: o,
|
|
6315
|
-
artist:
|
|
6316
|
-
url: URL.createObjectURL(
|
|
6607
|
+
artist: i,
|
|
6608
|
+
url: URL.createObjectURL(s)
|
|
6317
6609
|
};
|
|
6318
6610
|
});
|
|
6319
6611
|
this.tracks = [...this.tracks, ...a];
|
|
6320
|
-
}, this.handleTrackSelect = (
|
|
6321
|
-
this.currentIndex =
|
|
6322
|
-
}, this.handleTrackRemove = (
|
|
6323
|
-
const t =
|
|
6324
|
-
URL.revokeObjectURL(a.url), this.tracks = this.tracks.filter((
|
|
6325
|
-
}, this.handleTrackChange = (
|
|
6326
|
-
this.currentIndex =
|
|
6612
|
+
}, this.handleTrackSelect = (e) => {
|
|
6613
|
+
this.currentIndex = e.detail.index;
|
|
6614
|
+
}, this.handleTrackRemove = (e) => {
|
|
6615
|
+
const t = e.detail.index, a = this.tracks[t];
|
|
6616
|
+
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));
|
|
6617
|
+
}, this.handleTrackChange = (e) => {
|
|
6618
|
+
this.currentIndex = e.detail.index;
|
|
6327
6619
|
}, this.openUploadModal = () => {
|
|
6328
6620
|
this.showUploadModal = !0;
|
|
6329
6621
|
}, this.closeUploadModal = () => {
|
|
@@ -6333,7 +6625,7 @@ let W = class extends p {
|
|
|
6333
6625
|
};
|
|
6334
6626
|
}
|
|
6335
6627
|
render() {
|
|
6336
|
-
return
|
|
6628
|
+
return l`
|
|
6337
6629
|
<div class="station">
|
|
6338
6630
|
<!-- Header -->
|
|
6339
6631
|
<div class="station-header">
|
|
@@ -6388,7 +6680,7 @@ let W = class extends p {
|
|
|
6388
6680
|
`;
|
|
6389
6681
|
}
|
|
6390
6682
|
};
|
|
6391
|
-
|
|
6683
|
+
at.styles = d`
|
|
6392
6684
|
:host {
|
|
6393
6685
|
display: block;
|
|
6394
6686
|
font-family: var(--crt-font-family);
|
|
@@ -6461,61 +6753,61 @@ W.styles = l`
|
|
|
6461
6753
|
padding-top: var(--crt-spacing-md);
|
|
6462
6754
|
}
|
|
6463
6755
|
`;
|
|
6464
|
-
|
|
6465
|
-
|
|
6466
|
-
],
|
|
6467
|
-
|
|
6468
|
-
|
|
6469
|
-
],
|
|
6470
|
-
|
|
6471
|
-
|
|
6472
|
-
],
|
|
6473
|
-
|
|
6474
|
-
|
|
6475
|
-
],
|
|
6476
|
-
|
|
6477
|
-
|
|
6478
|
-
],
|
|
6756
|
+
Mt([
|
|
6757
|
+
m()
|
|
6758
|
+
], at.prototype, "tracks", 2);
|
|
6759
|
+
Mt([
|
|
6760
|
+
m()
|
|
6761
|
+
], at.prototype, "currentIndex", 2);
|
|
6762
|
+
Mt([
|
|
6763
|
+
m()
|
|
6764
|
+
], at.prototype, "showUploadModal", 2);
|
|
6765
|
+
Mt([
|
|
6766
|
+
ee("crt-file-upload")
|
|
6767
|
+
], at.prototype, "fileUpload", 2);
|
|
6768
|
+
at = Mt([
|
|
6769
|
+
v("crt-music-station")
|
|
6770
|
+
], at);
|
|
6479
6771
|
export {
|
|
6480
|
-
|
|
6481
|
-
|
|
6482
|
-
|
|
6483
|
-
|
|
6484
|
-
|
|
6485
|
-
|
|
6486
|
-
|
|
6487
|
-
|
|
6488
|
-
|
|
6489
|
-
|
|
6490
|
-
|
|
6491
|
-
|
|
6492
|
-
|
|
6493
|
-
|
|
6494
|
-
|
|
6495
|
-
|
|
6496
|
-
|
|
6497
|
-
|
|
6498
|
-
|
|
6499
|
-
|
|
6500
|
-
|
|
6501
|
-
|
|
6502
|
-
|
|
6503
|
-
|
|
6504
|
-
|
|
6505
|
-
|
|
6506
|
-
|
|
6507
|
-
|
|
6508
|
-
|
|
6509
|
-
|
|
6510
|
-
|
|
6511
|
-
|
|
6512
|
-
|
|
6513
|
-
|
|
6514
|
-
|
|
6515
|
-
|
|
6516
|
-
|
|
6517
|
-
|
|
6518
|
-
|
|
6519
|
-
|
|
6520
|
-
|
|
6772
|
+
Yt as Accordion,
|
|
6773
|
+
Ct as AccordionItem,
|
|
6774
|
+
$ as Alert,
|
|
6775
|
+
T as Avatar,
|
|
6776
|
+
Rt as AvatarGroup,
|
|
6777
|
+
Bt as Badge,
|
|
6778
|
+
kt as Breadcrumb,
|
|
6779
|
+
z as Button,
|
|
6780
|
+
x as Calendar,
|
|
6781
|
+
Qt as Card,
|
|
6782
|
+
H as Checkbox,
|
|
6783
|
+
q as CodeExample,
|
|
6784
|
+
E as FileUpload,
|
|
6785
|
+
zt as Grid,
|
|
6786
|
+
Nt as Heading,
|
|
6787
|
+
xt as Icon,
|
|
6788
|
+
Q as Input,
|
|
6789
|
+
F as Link,
|
|
6790
|
+
dt as Modal,
|
|
6791
|
+
_ as MusicPlayer,
|
|
6792
|
+
at as MusicStation,
|
|
6793
|
+
et as Pagination,
|
|
6794
|
+
Ot as Playlist,
|
|
6795
|
+
w as Progress,
|
|
6796
|
+
Y as Radio,
|
|
6797
|
+
pt as RadioGroup,
|
|
6798
|
+
M as Select,
|
|
6799
|
+
V as Skeleton,
|
|
6800
|
+
Ht as SkeletonCard,
|
|
6801
|
+
Ft as SkeletonText,
|
|
6802
|
+
k as Slider,
|
|
6803
|
+
$t as Spinner,
|
|
6804
|
+
_t as Table,
|
|
6805
|
+
wt as Tabs,
|
|
6806
|
+
W as Terminal,
|
|
6807
|
+
Ut as Text,
|
|
6808
|
+
J as Textarea,
|
|
6809
|
+
j as Toast,
|
|
6810
|
+
D as Toggle,
|
|
6811
|
+
tt as Tooltip,
|
|
6812
|
+
rt as Visualizer
|
|
6521
6813
|
};
|