@florid-kit/components 0.3.10 → 0.3.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/components/rating.d.ts +15 -0
- package/components/wishlist-button.d.ts +1 -0
- package/index.js +94 -41
- package/index.mjs +343 -241
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
|
-
const
|
|
7
|
-
let
|
|
6
|
+
const F = globalThis, ot = F.ShadowRoot && (F.ShadyCSS === void 0 || F.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, nt = Symbol(), dt = /* @__PURE__ */ new WeakMap();
|
|
7
|
+
let At = class {
|
|
8
8
|
constructor(t, e, s) {
|
|
9
|
-
if (this._$cssResult$ = !0, s !==
|
|
9
|
+
if (this._$cssResult$ = !0, s !== nt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
10
10
|
this.cssText = t, this.t = e;
|
|
11
11
|
}
|
|
12
12
|
get styleSheet() {
|
|
13
13
|
let t = this.o;
|
|
14
14
|
const e = this.t;
|
|
15
|
-
if (
|
|
15
|
+
if (ot && t === void 0) {
|
|
16
16
|
const s = e !== void 0 && e.length === 1;
|
|
17
|
-
s && (t =
|
|
17
|
+
s && (t = dt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && dt.set(e, t));
|
|
18
18
|
}
|
|
19
19
|
return t;
|
|
20
20
|
}
|
|
@@ -22,33 +22,33 @@ let mt = class {
|
|
|
22
22
|
return this.cssText;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
const
|
|
25
|
+
const xt = (i) => new At(typeof i == "string" ? i : i + "", void 0, nt), O = (i, ...t) => {
|
|
26
26
|
const e = i.length === 1 ? i[0] : t.reduce((s, r, n) => s + ((o) => {
|
|
27
27
|
if (o._$cssResult$ === !0) return o.cssText;
|
|
28
28
|
if (typeof o == "number") return o;
|
|
29
29
|
throw Error("Value passed to 'css' function must be a 'css' function result: " + o + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
30
30
|
})(r) + i[n + 1], i[0]);
|
|
31
|
-
return new
|
|
32
|
-
},
|
|
33
|
-
if (
|
|
31
|
+
return new At(e, i, nt);
|
|
32
|
+
}, Pt = (i, t) => {
|
|
33
|
+
if (ot) i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
34
34
|
else for (const e of t) {
|
|
35
|
-
const s = document.createElement("style"), r =
|
|
35
|
+
const s = document.createElement("style"), r = F.litNonce;
|
|
36
36
|
r !== void 0 && s.setAttribute("nonce", r), s.textContent = e.cssText, i.appendChild(s);
|
|
37
37
|
}
|
|
38
|
-
},
|
|
38
|
+
}, pt = ot ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
|
|
39
39
|
let e = "";
|
|
40
40
|
for (const s of t.cssRules) e += s.cssText;
|
|
41
|
-
return
|
|
41
|
+
return xt(e);
|
|
42
42
|
})(i) : i;
|
|
43
43
|
/**
|
|
44
44
|
* @license
|
|
45
45
|
* Copyright 2017 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
47
|
*/
|
|
48
|
-
const { is:
|
|
48
|
+
const { is: Ot, defineProperty: Ht, getOwnPropertyDescriptor: kt, getOwnPropertyNames: Mt, getOwnPropertySymbols: Ut, getPrototypeOf: Bt } = Object, w = globalThis, ut = w.trustedTypes, Tt = ut ? ut.emptyScript : "", Q = w.reactiveElementPolyfillSupport, I = (i, t) => i, q = { toAttribute(i, t) {
|
|
49
49
|
switch (t) {
|
|
50
50
|
case Boolean:
|
|
51
|
-
i = i ?
|
|
51
|
+
i = i ? Tt : null;
|
|
52
52
|
break;
|
|
53
53
|
case Object:
|
|
54
54
|
case Array:
|
|
@@ -73,19 +73,19 @@ const { is: Pt, defineProperty: Ot, getOwnPropertyDescriptor: kt, getOwnProperty
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
return e;
|
|
76
|
-
} },
|
|
77
|
-
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")),
|
|
78
|
-
let
|
|
76
|
+
} }, at = (i, t) => !Ot(i, t), gt = { attribute: !0, type: String, converter: q, reflect: !1, useDefault: !1, hasChanged: at };
|
|
77
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), w.litPropertyMetadata ?? (w.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
78
|
+
let k = class extends HTMLElement {
|
|
79
79
|
static addInitializer(t) {
|
|
80
80
|
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
|
81
81
|
}
|
|
82
82
|
static get observedAttributes() {
|
|
83
83
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
84
84
|
}
|
|
85
|
-
static createProperty(t, e =
|
|
85
|
+
static createProperty(t, e = gt) {
|
|
86
86
|
if (e.state && (e.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((e = Object.create(e)).wrapped = !0), this.elementProperties.set(t, e), !e.noAccessor) {
|
|
87
87
|
const s = Symbol(), r = this.getPropertyDescriptor(t, s, e);
|
|
88
|
-
r !== void 0 &&
|
|
88
|
+
r !== void 0 && Ht(this.prototype, t, r);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
static getPropertyDescriptor(t, e, s) {
|
|
@@ -100,17 +100,17 @@ let U = class extends HTMLElement {
|
|
|
100
100
|
}, configurable: !0, enumerable: !0 };
|
|
101
101
|
}
|
|
102
102
|
static getPropertyOptions(t) {
|
|
103
|
-
return this.elementProperties.get(t) ??
|
|
103
|
+
return this.elementProperties.get(t) ?? gt;
|
|
104
104
|
}
|
|
105
105
|
static _$Ei() {
|
|
106
|
-
if (this.hasOwnProperty(
|
|
107
|
-
const t =
|
|
106
|
+
if (this.hasOwnProperty(I("elementProperties"))) return;
|
|
107
|
+
const t = Bt(this);
|
|
108
108
|
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
109
109
|
}
|
|
110
110
|
static finalize() {
|
|
111
|
-
if (this.hasOwnProperty(
|
|
112
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
|
113
|
-
const e = this.properties, s = [...
|
|
111
|
+
if (this.hasOwnProperty(I("finalized"))) return;
|
|
112
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(I("properties"))) {
|
|
113
|
+
const e = this.properties, s = [...Mt(e), ...Ut(e)];
|
|
114
114
|
for (const r of s) this.createProperty(r, e[r]);
|
|
115
115
|
}
|
|
116
116
|
const t = this[Symbol.metadata];
|
|
@@ -129,8 +129,8 @@ let U = class extends HTMLElement {
|
|
|
129
129
|
const e = [];
|
|
130
130
|
if (Array.isArray(t)) {
|
|
131
131
|
const s = new Set(t.flat(1 / 0).reverse());
|
|
132
|
-
for (const r of s) e.unshift(
|
|
133
|
-
} else t !== void 0 && e.push(
|
|
132
|
+
for (const r of s) e.unshift(pt(r));
|
|
133
|
+
} else t !== void 0 && e.push(pt(t));
|
|
134
134
|
return e;
|
|
135
135
|
}
|
|
136
136
|
static _$Eu(t, e) {
|
|
@@ -159,7 +159,7 @@ let U = class extends HTMLElement {
|
|
|
159
159
|
}
|
|
160
160
|
createRenderRoot() {
|
|
161
161
|
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
162
|
-
return
|
|
162
|
+
return Pt(t, this.constructor.elementStyles), t;
|
|
163
163
|
}
|
|
164
164
|
connectedCallback() {
|
|
165
165
|
var t;
|
|
@@ -200,7 +200,7 @@ let U = class extends HTMLElement {
|
|
|
200
200
|
var r;
|
|
201
201
|
if (t !== void 0) {
|
|
202
202
|
const n = this.constructor, o = this[t];
|
|
203
|
-
if (s ?? (s = n.getPropertyOptions(t)), !((s.hasChanged ??
|
|
203
|
+
if (s ?? (s = n.getPropertyOptions(t)), !((s.hasChanged ?? at)(o, e) || s.useDefault && s.reflect && o === ((r = this._$Ej) == null ? void 0 : r.get(t)) && !this.hasAttribute(n._$Eu(t, s)))) return;
|
|
204
204
|
this.C(t, e, s);
|
|
205
205
|
}
|
|
206
206
|
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
@@ -276,76 +276,76 @@ let U = class extends HTMLElement {
|
|
|
276
276
|
firstUpdated(t) {
|
|
277
277
|
}
|
|
278
278
|
};
|
|
279
|
-
|
|
279
|
+
k.elementStyles = [], k.shadowRootOptions = { mode: "open" }, k[I("elementProperties")] = /* @__PURE__ */ new Map(), k[I("finalized")] = /* @__PURE__ */ new Map(), Q == null || Q({ ReactiveElement: k }), (w.reactiveElementVersions ?? (w.reactiveElementVersions = [])).push("2.1.0");
|
|
280
280
|
/**
|
|
281
281
|
* @license
|
|
282
282
|
* Copyright 2017 Google LLC
|
|
283
283
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
284
284
|
*/
|
|
285
|
-
const
|
|
286
|
-
\f\r]`,
|
|
287
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
288
|
-
function
|
|
289
|
-
if (!
|
|
290
|
-
return
|
|
285
|
+
const z = globalThis, W = z.trustedTypes, ft = W ? W.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, Et = "$lit$", _ = `lit$${Math.random().toFixed(9).slice(2)}$`, St = "?" + _, It = `<${St}>`, C = document, N = () => C.createComment(""), D = (i) => i === null || typeof i != "object" && typeof i != "function", lt = Array.isArray, zt = (i) => lt(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", Y = `[
|
|
286
|
+
\f\r]`, T = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, vt = /-->/g, bt = />/g, E = RegExp(`>|${Y}(?:([^\\s"'>=/]+)(${Y}*=${Y}*(?:[^
|
|
287
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), $t = /'/g, yt = /"/g, Lt = /^(?:script|style|textarea|title)$/i, Nt = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), g = Nt(1), P = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), mt = /* @__PURE__ */ new WeakMap(), S = C.createTreeWalker(C, 129);
|
|
288
|
+
function Ct(i, t) {
|
|
289
|
+
if (!lt(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
290
|
+
return ft !== void 0 ? ft.createHTML(t) : t;
|
|
291
291
|
}
|
|
292
|
-
const
|
|
292
|
+
const Dt = (i, t) => {
|
|
293
293
|
const e = i.length - 1, s = [];
|
|
294
|
-
let r, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o =
|
|
294
|
+
let r, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = T;
|
|
295
295
|
for (let l = 0; l < e; l++) {
|
|
296
296
|
const a = i[l];
|
|
297
|
-
let
|
|
298
|
-
for (;
|
|
299
|
-
const
|
|
300
|
-
n += o ===
|
|
297
|
+
let p, u, c = -1, b = 0;
|
|
298
|
+
for (; b < a.length && (o.lastIndex = b, u = o.exec(a), u !== null); ) b = o.lastIndex, o === T ? u[1] === "!--" ? o = vt : u[1] !== void 0 ? o = bt : u[2] !== void 0 ? (Lt.test(u[2]) && (r = RegExp("</" + u[2], "g")), o = E) : u[3] !== void 0 && (o = E) : o === E ? u[0] === ">" ? (o = r ?? T, c = -1) : u[1] === void 0 ? c = -2 : (c = o.lastIndex - u[2].length, p = u[1], o = u[3] === void 0 ? E : u[3] === '"' ? yt : $t) : o === yt || o === $t ? o = E : o === vt || o === bt ? o = T : (o = E, r = void 0);
|
|
299
|
+
const m = o === E && i[l + 1].startsWith("/>") ? " " : "";
|
|
300
|
+
n += o === T ? a + It : c >= 0 ? (s.push(p), a.slice(0, c) + Et + a.slice(c) + _ + m) : a + _ + (c === -2 ? l : m);
|
|
301
301
|
}
|
|
302
|
-
return [
|
|
302
|
+
return [Ct(i, n + (i[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
|
|
303
303
|
};
|
|
304
|
-
class
|
|
304
|
+
class R {
|
|
305
305
|
constructor({ strings: t, _$litType$: e }, s) {
|
|
306
306
|
let r;
|
|
307
307
|
this.parts = [];
|
|
308
308
|
let n = 0, o = 0;
|
|
309
|
-
const l = t.length - 1, a = this.parts, [
|
|
310
|
-
if (this.el =
|
|
311
|
-
const
|
|
312
|
-
|
|
309
|
+
const l = t.length - 1, a = this.parts, [p, u] = Dt(t, e);
|
|
310
|
+
if (this.el = R.createElement(p, s), S.currentNode = this.el.content, e === 2 || e === 3) {
|
|
311
|
+
const c = this.el.content.firstChild;
|
|
312
|
+
c.replaceWith(...c.childNodes);
|
|
313
313
|
}
|
|
314
314
|
for (; (r = S.nextNode()) !== null && a.length < l; ) {
|
|
315
315
|
if (r.nodeType === 1) {
|
|
316
|
-
if (r.hasAttributes()) for (const
|
|
317
|
-
const
|
|
318
|
-
a.push({ type: 1, index: n, name:
|
|
319
|
-
} else
|
|
320
|
-
if (
|
|
321
|
-
const
|
|
322
|
-
if (
|
|
316
|
+
if (r.hasAttributes()) for (const c of r.getAttributeNames()) if (c.endsWith(Et)) {
|
|
317
|
+
const b = u[o++], m = r.getAttribute(c).split(_), Z = /([.?@])?(.*)/.exec(b);
|
|
318
|
+
a.push({ type: 1, index: n, name: Z[2], strings: m, ctor: Z[1] === "." ? jt : Z[1] === "?" ? Vt : Z[1] === "@" ? Zt : J }), r.removeAttribute(c);
|
|
319
|
+
} else c.startsWith(_) && (a.push({ type: 6, index: n }), r.removeAttribute(c));
|
|
320
|
+
if (Lt.test(r.tagName)) {
|
|
321
|
+
const c = r.textContent.split(_), b = c.length - 1;
|
|
322
|
+
if (b > 0) {
|
|
323
323
|
r.textContent = W ? W.emptyScript : "";
|
|
324
|
-
for (let
|
|
325
|
-
r.append(
|
|
324
|
+
for (let m = 0; m < b; m++) r.append(c[m], N()), S.nextNode(), a.push({ type: 2, index: ++n });
|
|
325
|
+
r.append(c[b], N());
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
|
-
} else if (r.nodeType === 8) if (r.data ===
|
|
328
|
+
} else if (r.nodeType === 8) if (r.data === St) a.push({ type: 2, index: n });
|
|
329
329
|
else {
|
|
330
|
-
let
|
|
331
|
-
for (; (
|
|
330
|
+
let c = -1;
|
|
331
|
+
for (; (c = r.data.indexOf(_, c + 1)) !== -1; ) a.push({ type: 7, index: n }), c += _.length - 1;
|
|
332
332
|
}
|
|
333
333
|
n++;
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
336
|
static createElement(t, e) {
|
|
337
|
-
const s =
|
|
337
|
+
const s = C.createElement("template");
|
|
338
338
|
return s.innerHTML = t, s;
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
341
|
function M(i, t, e = i, s) {
|
|
342
342
|
var o, l;
|
|
343
|
-
if (t ===
|
|
343
|
+
if (t === P) return t;
|
|
344
344
|
let r = s !== void 0 ? (o = e._$Co) == null ? void 0 : o[s] : e._$Cl;
|
|
345
|
-
const n =
|
|
345
|
+
const n = D(t) ? void 0 : t._$litDirective$;
|
|
346
346
|
return (r == null ? void 0 : r.constructor) !== n && ((l = r == null ? void 0 : r._$AO) == null || l.call(r, !1), n === void 0 ? r = void 0 : (r = new n(i), r._$AT(i, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = r : e._$Cl = r), r !== void 0 && (t = M(i, r._$AS(i, t.values), r, s)), t;
|
|
347
347
|
}
|
|
348
|
-
class
|
|
348
|
+
class Rt {
|
|
349
349
|
constructor(t, e) {
|
|
350
350
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
351
351
|
}
|
|
@@ -356,24 +356,24 @@ class Nt {
|
|
|
356
356
|
return this._$AM._$AU;
|
|
357
357
|
}
|
|
358
358
|
u(t) {
|
|
359
|
-
const { el: { content: e }, parts: s } = this._$AD, r = ((t == null ? void 0 : t.creationScope) ??
|
|
359
|
+
const { el: { content: e }, parts: s } = this._$AD, r = ((t == null ? void 0 : t.creationScope) ?? C).importNode(e, !0);
|
|
360
360
|
S.currentNode = r;
|
|
361
361
|
let n = S.nextNode(), o = 0, l = 0, a = s[0];
|
|
362
362
|
for (; a !== void 0; ) {
|
|
363
363
|
if (o === a.index) {
|
|
364
|
-
let
|
|
365
|
-
a.type === 2 ?
|
|
364
|
+
let p;
|
|
365
|
+
a.type === 2 ? p = new j(n, n.nextSibling, this, t) : a.type === 1 ? p = new a.ctor(n, a.name, a.strings, this, t) : a.type === 6 && (p = new Ft(n, this, t)), this._$AV.push(p), a = s[++l];
|
|
366
366
|
}
|
|
367
367
|
o !== (a == null ? void 0 : a.index) && (n = S.nextNode(), o++);
|
|
368
368
|
}
|
|
369
|
-
return S.currentNode =
|
|
369
|
+
return S.currentNode = C, r;
|
|
370
370
|
}
|
|
371
371
|
p(t) {
|
|
372
372
|
let e = 0;
|
|
373
373
|
for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++;
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
|
-
class
|
|
376
|
+
class j {
|
|
377
377
|
get _$AU() {
|
|
378
378
|
var t;
|
|
379
379
|
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
|
@@ -393,7 +393,7 @@ class R {
|
|
|
393
393
|
return this._$AB;
|
|
394
394
|
}
|
|
395
395
|
_$AI(t, e = this) {
|
|
396
|
-
t = M(this, t, e),
|
|
396
|
+
t = M(this, t, e), D(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !== P && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : zt(t) ? this.k(t) : this._(t);
|
|
397
397
|
}
|
|
398
398
|
O(t) {
|
|
399
399
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -402,26 +402,26 @@ class R {
|
|
|
402
402
|
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
403
403
|
}
|
|
404
404
|
_(t) {
|
|
405
|
-
this._$AH !== d &&
|
|
405
|
+
this._$AH !== d && D(this._$AH) ? this._$AA.nextSibling.data = t : this.T(C.createTextNode(t)), this._$AH = t;
|
|
406
406
|
}
|
|
407
407
|
$(t) {
|
|
408
408
|
var n;
|
|
409
|
-
const { values: e, _$litType$: s } = t, r = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el =
|
|
409
|
+
const { values: e, _$litType$: s } = t, r = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = R.createElement(Ct(s.h, s.h[0]), this.options)), s);
|
|
410
410
|
if (((n = this._$AH) == null ? void 0 : n._$AD) === r) this._$AH.p(e);
|
|
411
411
|
else {
|
|
412
|
-
const o = new
|
|
412
|
+
const o = new Rt(r, this), l = o.u(this.options);
|
|
413
413
|
o.p(e), this.T(l), this._$AH = o;
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
416
|
_$AC(t) {
|
|
417
|
-
let e =
|
|
418
|
-
return e === void 0 &&
|
|
417
|
+
let e = mt.get(t.strings);
|
|
418
|
+
return e === void 0 && mt.set(t.strings, e = new R(t)), e;
|
|
419
419
|
}
|
|
420
420
|
k(t) {
|
|
421
|
-
|
|
421
|
+
lt(this._$AH) || (this._$AH = [], this._$AR());
|
|
422
422
|
const e = this._$AH;
|
|
423
423
|
let s, r = 0;
|
|
424
|
-
for (const n of t) r === e.length ? e.push(s = new
|
|
424
|
+
for (const n of t) r === e.length ? e.push(s = new j(this.O(N()), this.O(N()), this, this.options)) : s = e[r], s._$AI(n), r++;
|
|
425
425
|
r < e.length && (this._$AR(s && s._$AB.nextSibling, r), e.length = r);
|
|
426
426
|
}
|
|
427
427
|
_$AR(t = this._$AA.nextSibling, e) {
|
|
@@ -436,7 +436,7 @@ class R {
|
|
|
436
436
|
this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
|
|
437
437
|
}
|
|
438
438
|
}
|
|
439
|
-
class
|
|
439
|
+
class J {
|
|
440
440
|
get tagName() {
|
|
441
441
|
return this.element.tagName;
|
|
442
442
|
}
|
|
@@ -449,11 +449,11 @@ class F {
|
|
|
449
449
|
_$AI(t, e = this, s, r) {
|
|
450
450
|
const n = this.strings;
|
|
451
451
|
let o = !1;
|
|
452
|
-
if (n === void 0) t = M(this, t, e, 0), o = !
|
|
452
|
+
if (n === void 0) t = M(this, t, e, 0), o = !D(t) || t !== this._$AH && t !== P, o && (this._$AH = t);
|
|
453
453
|
else {
|
|
454
454
|
const l = t;
|
|
455
|
-
let a,
|
|
456
|
-
for (t = n[0], a = 0; a < n.length - 1; a++)
|
|
455
|
+
let a, p;
|
|
456
|
+
for (t = n[0], a = 0; a < n.length - 1; a++) p = M(this, l[s + a], e, a), p === P && (p = this._$AH[a]), o || (o = !D(p) || p !== this._$AH[a]), p === d ? t = d : t !== d && (t += (p ?? "") + n[a + 1]), this._$AH[a] = p;
|
|
457
457
|
}
|
|
458
458
|
o && !r && this.j(t);
|
|
459
459
|
}
|
|
@@ -461,7 +461,7 @@ class F {
|
|
|
461
461
|
t === d ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
|
-
class
|
|
464
|
+
class jt extends J {
|
|
465
465
|
constructor() {
|
|
466
466
|
super(...arguments), this.type = 3;
|
|
467
467
|
}
|
|
@@ -469,7 +469,7 @@ class Dt extends F {
|
|
|
469
469
|
this.element[this.name] = t === d ? void 0 : t;
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
|
-
class
|
|
472
|
+
class Vt extends J {
|
|
473
473
|
constructor() {
|
|
474
474
|
super(...arguments), this.type = 4;
|
|
475
475
|
}
|
|
@@ -477,12 +477,12 @@ class Rt extends F {
|
|
|
477
477
|
this.element.toggleAttribute(this.name, !!t && t !== d);
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
|
-
class
|
|
480
|
+
class Zt extends J {
|
|
481
481
|
constructor(t, e, s, r, n) {
|
|
482
482
|
super(t, e, s, r, n), this.type = 5;
|
|
483
483
|
}
|
|
484
484
|
_$AI(t, e = this) {
|
|
485
|
-
if ((t = M(this, t, e, 0) ?? d) ===
|
|
485
|
+
if ((t = M(this, t, e, 0) ?? d) === P) return;
|
|
486
486
|
const s = this._$AH, r = t === d && s !== d || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, n = t !== d && (s === d || r);
|
|
487
487
|
r && this.element.removeEventListener(this.name, this, s), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
488
488
|
}
|
|
@@ -491,7 +491,7 @@ class jt extends F {
|
|
|
491
491
|
typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
|
-
class
|
|
494
|
+
class Ft {
|
|
495
495
|
constructor(t, e, s) {
|
|
496
496
|
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
|
|
497
497
|
}
|
|
@@ -502,14 +502,14 @@ class Vt {
|
|
|
502
502
|
M(this, t);
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
|
-
const
|
|
506
|
-
|
|
505
|
+
const tt = z.litHtmlPolyfillSupport;
|
|
506
|
+
tt == null || tt(R, j), (z.litHtmlVersions ?? (z.litHtmlVersions = [])).push("3.3.0");
|
|
507
507
|
const qt = (i, t, e) => {
|
|
508
508
|
const s = (e == null ? void 0 : e.renderBefore) ?? t;
|
|
509
509
|
let r = s._$litPart$;
|
|
510
510
|
if (r === void 0) {
|
|
511
511
|
const n = (e == null ? void 0 : e.renderBefore) ?? null;
|
|
512
|
-
s._$litPart$ = r = new
|
|
512
|
+
s._$litPart$ = r = new j(t.insertBefore(N(), n), n, void 0, e ?? {});
|
|
513
513
|
}
|
|
514
514
|
return r._$AI(i), r;
|
|
515
515
|
};
|
|
@@ -518,8 +518,8 @@ const qt = (i, t, e) => {
|
|
|
518
518
|
* Copyright 2017 Google LLC
|
|
519
519
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
520
520
|
*/
|
|
521
|
-
const
|
|
522
|
-
let
|
|
521
|
+
const L = globalThis;
|
|
522
|
+
let $ = class extends k {
|
|
523
523
|
constructor() {
|
|
524
524
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
525
525
|
}
|
|
@@ -541,20 +541,20 @@ let w = class extends U {
|
|
|
541
541
|
super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
|
|
542
542
|
}
|
|
543
543
|
render() {
|
|
544
|
-
return
|
|
544
|
+
return P;
|
|
545
545
|
}
|
|
546
546
|
};
|
|
547
|
-
var
|
|
548
|
-
|
|
549
|
-
const
|
|
550
|
-
|
|
551
|
-
(
|
|
547
|
+
var wt;
|
|
548
|
+
$._$litElement$ = !0, $.finalized = !0, (wt = L.litElementHydrateSupport) == null || wt.call(L, { LitElement: $ });
|
|
549
|
+
const et = L.litElementPolyfillSupport;
|
|
550
|
+
et == null || et({ LitElement: $ });
|
|
551
|
+
(L.litElementVersions ?? (L.litElementVersions = [])).push("4.2.0");
|
|
552
552
|
/**
|
|
553
553
|
* @license
|
|
554
554
|
* Copyright 2017 Google LLC
|
|
555
555
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
556
556
|
*/
|
|
557
|
-
const
|
|
557
|
+
const V = (i) => (t, e) => {
|
|
558
558
|
e !== void 0 ? e.addInitializer(() => {
|
|
559
559
|
customElements.define(i, t);
|
|
560
560
|
}) : customElements.define(i, t);
|
|
@@ -564,7 +564,7 @@ const Z = (i) => (t, e) => {
|
|
|
564
564
|
* Copyright 2017 Google LLC
|
|
565
565
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
566
566
|
*/
|
|
567
|
-
const Wt = { attribute: !0, type: String, converter: q, reflect: !1, hasChanged:
|
|
567
|
+
const Wt = { attribute: !0, type: String, converter: q, reflect: !1, hasChanged: at }, Kt = (i = Wt, t, e) => {
|
|
568
568
|
const { kind: s, metadata: r } = e;
|
|
569
569
|
let n = globalThis.litPropertyMetadata.get(r);
|
|
570
570
|
if (n === void 0 && globalThis.litPropertyMetadata.set(r, n = /* @__PURE__ */ new Map()), s === "setter" && ((i = Object.create(i)).wrapped = !0), n.set(e.name, i), s === "accessor") {
|
|
@@ -585,18 +585,18 @@ const Wt = { attribute: !0, type: String, converter: q, reflect: !1, hasChanged:
|
|
|
585
585
|
}
|
|
586
586
|
throw Error("Unsupported decorator location: " + s);
|
|
587
587
|
};
|
|
588
|
-
function
|
|
589
|
-
return (t, e) => typeof e == "object" ?
|
|
588
|
+
function h(i) {
|
|
589
|
+
return (t, e) => typeof e == "object" ? Kt(i, t, e) : ((s, r, n) => {
|
|
590
590
|
const o = r.hasOwnProperty(n);
|
|
591
591
|
return r.constructor.createProperty(n, s), o ? Object.getOwnPropertyDescriptor(r, n) : void 0;
|
|
592
592
|
})(i, t, e);
|
|
593
593
|
}
|
|
594
|
-
const
|
|
594
|
+
const Jt = O`
|
|
595
595
|
outline: 1px dashed var(--button-border-color);
|
|
596
596
|
outline-offset: 2px;
|
|
597
597
|
outline: dashed black;
|
|
598
598
|
`;
|
|
599
|
-
|
|
599
|
+
O`
|
|
600
600
|
:host * {
|
|
601
601
|
box-sizing: border-box;
|
|
602
602
|
}
|
|
@@ -606,12 +606,12 @@ I`
|
|
|
606
606
|
* Copyright 2023 Google LLC
|
|
607
607
|
* SPDX-License-Identifier: Apache-2.0
|
|
608
608
|
*/
|
|
609
|
-
const
|
|
610
|
-
function
|
|
609
|
+
const ht = Symbol("internals"), st = Symbol("privateInternals");
|
|
610
|
+
function Xt(i) {
|
|
611
611
|
var t;
|
|
612
612
|
class e extends i {
|
|
613
|
-
get [(t =
|
|
614
|
-
return this[
|
|
613
|
+
get [(t = ht, t)]() {
|
|
614
|
+
return this[st] || (this[st] = this.attachInternals()), this[st];
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
617
|
return e;
|
|
@@ -621,11 +621,11 @@ function Jt(i) {
|
|
|
621
621
|
* Copyright 2023 Google LLC
|
|
622
622
|
* SPDX-License-Identifier: Apache-2.0
|
|
623
623
|
*/
|
|
624
|
-
function
|
|
624
|
+
function Gt(i) {
|
|
625
625
|
i.addInitializer((t) => {
|
|
626
626
|
const e = t;
|
|
627
627
|
e.addEventListener("click", async (s) => {
|
|
628
|
-
const { type: r, [
|
|
628
|
+
const { type: r, [ht]: n } = e, { form: o } = n;
|
|
629
629
|
if (!(!o || r === "button") && (await new Promise((l) => {
|
|
630
630
|
setTimeout(l);
|
|
631
631
|
}), !s.defaultPrevented)) {
|
|
@@ -648,12 +648,12 @@ function Kt(i) {
|
|
|
648
648
|
});
|
|
649
649
|
});
|
|
650
650
|
}
|
|
651
|
-
var
|
|
652
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
651
|
+
var Qt = Object.defineProperty, Yt = Object.getOwnPropertyDescriptor, A = (i, t, e, s) => {
|
|
652
|
+
for (var r = s > 1 ? void 0 : s ? Yt(t, e) : t, n = i.length - 1, o; n >= 0; n--)
|
|
653
653
|
(o = i[n]) && (r = (s ? o(t, e, r) : o(r)) || r);
|
|
654
|
-
return s && r &&
|
|
654
|
+
return s && r && Qt(t, e, r), r;
|
|
655
655
|
};
|
|
656
|
-
const
|
|
656
|
+
const te = Xt($), _t = (i) => {
|
|
657
657
|
const t = `
|
|
658
658
|
--button-bg-disabled: var(--color-container-disabled);
|
|
659
659
|
--button-bg-pressed: var(--color-container-action-${i}-pressed);
|
|
@@ -668,9 +668,9 @@ const Qt = Jt(w), $t = (i) => {
|
|
|
668
668
|
--button-text-hover: var(--color-content-action-${i});
|
|
669
669
|
--button-text: var(--color-content-action-${i});
|
|
670
670
|
`;
|
|
671
|
-
return
|
|
672
|
-
},
|
|
673
|
-
let
|
|
671
|
+
return xt(t);
|
|
672
|
+
}, ee = ["primary", "secondary"];
|
|
673
|
+
let f = class extends te {
|
|
674
674
|
constructor() {
|
|
675
675
|
super(...arguments), this.type = "submit", this.value = "", this.variant = "primary", this.customclass = "", this.disabled = !1, this.href = "", this.target = "";
|
|
676
676
|
}
|
|
@@ -684,13 +684,13 @@ let b = class extends Qt {
|
|
|
684
684
|
* The associated form element with which this element's value will submit.
|
|
685
685
|
*/
|
|
686
686
|
get form() {
|
|
687
|
-
return this[
|
|
687
|
+
return this[ht].form;
|
|
688
688
|
}
|
|
689
689
|
// TODO: Add aria attributes support
|
|
690
690
|
// Adapt from: https://github.dev/material-components/material-web
|
|
691
691
|
willUpdate() {
|
|
692
692
|
const i = getComputedStyle(this).getPropertyValue("--button-variant");
|
|
693
|
-
i &&
|
|
693
|
+
i && ee.some((t) => t === i) && (this.variant = i);
|
|
694
694
|
}
|
|
695
695
|
updated() {
|
|
696
696
|
if (this.customclass) {
|
|
@@ -700,26 +700,26 @@ let b = class extends Qt {
|
|
|
700
700
|
}
|
|
701
701
|
render() {
|
|
702
702
|
const i = this.href ? this.renderLink() : this.renderButton();
|
|
703
|
-
return
|
|
703
|
+
return g`${i}`;
|
|
704
704
|
}
|
|
705
705
|
renderLink() {
|
|
706
|
-
return
|
|
706
|
+
return g`<a href=${this.href} target=${this.target || d} class="button" ?disabled=${this.disabled}>
|
|
707
707
|
<slot />
|
|
708
708
|
</a>`;
|
|
709
709
|
}
|
|
710
710
|
renderButton() {
|
|
711
|
-
return
|
|
711
|
+
return g`<button class="button" ?disabled=${this.disabled}>
|
|
712
712
|
<slot />
|
|
713
713
|
</button>`;
|
|
714
714
|
}
|
|
715
715
|
};
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
716
|
+
Gt(f);
|
|
717
|
+
f.formAssociated = !0;
|
|
718
|
+
f.styles = O`
|
|
719
719
|
:host {
|
|
720
720
|
display: inline-flex;
|
|
721
721
|
cursor: pointer;
|
|
722
|
-
${
|
|
722
|
+
${_t("primary")};
|
|
723
723
|
--button-border: transparent;
|
|
724
724
|
}
|
|
725
725
|
|
|
@@ -728,7 +728,7 @@ b.styles = I`
|
|
|
728
728
|
}
|
|
729
729
|
|
|
730
730
|
:host([variant="secondary"]) {
|
|
731
|
-
${
|
|
731
|
+
${_t("secondary")};
|
|
732
732
|
}
|
|
733
733
|
|
|
734
734
|
:host([disabled]), :host([aria-disabled="true"]), :host([aria-disabled="true"]):hover {
|
|
@@ -795,44 +795,44 @@ b.styles = I`
|
|
|
795
795
|
}
|
|
796
796
|
|
|
797
797
|
.button:focus-visible {
|
|
798
|
-
${
|
|
798
|
+
${Jt};
|
|
799
799
|
}
|
|
800
800
|
`;
|
|
801
801
|
A([
|
|
802
|
-
|
|
803
|
-
],
|
|
802
|
+
h()
|
|
803
|
+
], f.prototype, "type", 2);
|
|
804
804
|
A([
|
|
805
|
-
|
|
806
|
-
],
|
|
805
|
+
h({ reflect: !0 })
|
|
806
|
+
], f.prototype, "value", 2);
|
|
807
807
|
A([
|
|
808
|
-
|
|
809
|
-
],
|
|
808
|
+
h({ reflect: !0 })
|
|
809
|
+
], f.prototype, "variant", 2);
|
|
810
810
|
A([
|
|
811
|
-
|
|
812
|
-
],
|
|
811
|
+
h({ type: String })
|
|
812
|
+
], f.prototype, "customclass", 2);
|
|
813
813
|
A([
|
|
814
|
-
|
|
814
|
+
h({
|
|
815
815
|
converter: {
|
|
816
816
|
fromAttribute: (i) => i === "" || i === "true"
|
|
817
817
|
}
|
|
818
818
|
})
|
|
819
|
-
],
|
|
819
|
+
], f.prototype, "disabled", 2);
|
|
820
820
|
A([
|
|
821
|
-
|
|
822
|
-
],
|
|
821
|
+
h()
|
|
822
|
+
], f.prototype, "href", 2);
|
|
823
823
|
A([
|
|
824
|
-
|
|
825
|
-
],
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
],
|
|
824
|
+
h()
|
|
825
|
+
], f.prototype, "target", 2);
|
|
826
|
+
f = A([
|
|
827
|
+
V("o-button")
|
|
828
|
+
], f);
|
|
829
829
|
/**
|
|
830
830
|
* @license
|
|
831
831
|
* Copyright 2017 Google LLC
|
|
832
832
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
833
833
|
*/
|
|
834
|
-
const
|
|
835
|
-
class
|
|
834
|
+
const se = { CHILD: 2 }, re = (i) => (...t) => ({ _$litDirective$: i, values: t });
|
|
835
|
+
class ie {
|
|
836
836
|
constructor(t) {
|
|
837
837
|
}
|
|
838
838
|
get _$AU() {
|
|
@@ -853,13 +853,13 @@ class se {
|
|
|
853
853
|
* Copyright 2017 Google LLC
|
|
854
854
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
855
855
|
*/
|
|
856
|
-
class
|
|
856
|
+
class rt extends ie {
|
|
857
857
|
constructor(t) {
|
|
858
|
-
if (super(t), this.it = d, t.type !==
|
|
858
|
+
if (super(t), this.it = d, t.type !== se.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
859
859
|
}
|
|
860
860
|
render(t) {
|
|
861
861
|
if (t === d || t == null) return this._t = void 0, this.it = t;
|
|
862
|
-
if (t ===
|
|
862
|
+
if (t === P) return t;
|
|
863
863
|
if (typeof t != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
|
|
864
864
|
if (t === this.it) return this._t;
|
|
865
865
|
this.it = t;
|
|
@@ -867,61 +867,85 @@ class tt extends se {
|
|
|
867
867
|
return e.raw = e, this._t = { _$litType$: this.constructor.resultType, strings: e, values: [] };
|
|
868
868
|
}
|
|
869
869
|
}
|
|
870
|
-
|
|
870
|
+
rt.directiveName = "unsafeHTML", rt.resultType = 1;
|
|
871
871
|
/**
|
|
872
872
|
* @license
|
|
873
873
|
* Copyright 2017 Google LLC
|
|
874
874
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
875
875
|
*/
|
|
876
|
-
class
|
|
876
|
+
class it extends rt {
|
|
877
877
|
}
|
|
878
|
-
|
|
879
|
-
const
|
|
878
|
+
it.directiveName = "unsafeSVG", it.resultType = 2;
|
|
879
|
+
const K = re(it), oe = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
880
880
|
<path d="M8 3.6275C7.06799 0.971489 3.25399 -0.0226278 1.67414 2.30983C0.0877404 4.65197 1.67414 6.99412 2.62598 8.33249C3.0147 8.87905 8 14 8 14C8 14 12.9853 8.87905 13.374 8.33249C14.3259 6.99412 15.9123 4.65197 14.3259 2.30983C12.746 -0.0226277 8.97167 0.971489 8 3.6275Z" stroke="#3F2B2E" stroke-linecap="round"/>
|
|
881
881
|
</svg>
|
|
882
|
-
`,
|
|
882
|
+
`, ne = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
883
883
|
<path d="M16 8L4 0V16L16 8Z" fill="#3F2B2E"/>
|
|
884
884
|
</svg>
|
|
885
|
-
`,
|
|
885
|
+
`, ae = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
886
886
|
<path d="M12.2266 8.16162C11.0953 9.26599 8.72489 11.8788 5.11546 16L4.63062 15.7172C5.78886 13.4007 7.17607 10.8283 8.79223 8C7.17607 5.17172 5.78886 2.59933 4.63062 0.282827L5.11546 0C8.72489 4.12121 11.0953 6.73401 12.2266 7.83838V8.16162Z" fill="#3F2B2E"/>
|
|
887
887
|
</svg>
|
|
888
|
-
`,
|
|
888
|
+
`, le = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
889
889
|
<path d="M5 7.83838C6.02128 6.73401 8.16109 4.12121 11.4195 0L11.8571 0.282829C10.8116 2.59933 9.55927 5.17172 8.1003 8C9.55927 10.8283 10.8115 13.4007 11.8571 15.7172L11.4195 16C8.16109 11.8788 6.02128 9.266 5 8.16162L5 7.83838Z" fill="#3F2B2E"/>
|
|
890
890
|
</svg>
|
|
891
|
-
`,
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
891
|
+
`, he = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
892
|
+
<path d="M12.2834 14.4585L7.98873 11.3928L3.69404 14.4585L5.33977 9.4972L1 6.39639H6.36554L8 1.4585L9.63446 6.39639H15L10.6602 9.4972L12.306 14.4585H12.2834ZM7.98873 10.328L10.6602 12.2353L9.64573 9.15787L12.2721 7.28568H9.02576L8 4.17317L6.97424 7.28568H3.72786L6.35427 9.15787L5.33977 12.2353L8.01127 10.328H7.98873Z" fill="#3F2B2E"/>
|
|
893
|
+
</svg>
|
|
894
|
+
`, ce = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
895
|
+
<path d="M15 6.43789H9.63446L8 1.5L6.36554 6.43789H1L5.33977 9.5387L3.69404 14.5L7.98873 11.4343L12.2834 14.5H12.306L10.6602 9.5387L15 6.43789ZM6.36554 11.5396V7.32718H6.97424L8 4.21467L9.02576 7.32718H12.2721L9.64573 9.19937L10.6602 12.2768L8 10.3812L6.36554 11.5513V11.5396Z" fill="#3F2B2E"/>
|
|
896
|
+
</svg>
|
|
897
|
+
`, de = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
898
|
+
<path d="M15 6.39639H9.63446L8 1.4585L6.36554 6.39639H1L5.33977 9.4972L3.69404 14.4585L7.98873 11.3928L12.2834 14.4585L10.6377 9.4972L14.9775 6.39639H15ZM10.6715 12.2353L8.05636 10.3631V4.32528L9.03704 7.27398H12.2834L9.65701 9.14616L10.6715 12.2236V12.2353Z" fill="#3F2B2E"/>
|
|
899
|
+
</svg>
|
|
900
|
+
`, pe = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
901
|
+
<path d="M15 6.43789H9.63446L8 1.5L6.36554 6.43789H1L5.33977 9.5387L3.69404 14.5L7.98873 11.4343L9.46538 12.4874L12.2834 14.5H12.306L10.6602 9.5387L15 6.43789ZM9.46538 11.4226V7.32718H12.2721L9.64573 9.19937L10.6602 12.2768L9.46538 11.4226Z" fill="#3F2B2E"/>
|
|
902
|
+
</svg>
|
|
903
|
+
`, ue = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
904
|
+
<path d="M12.2834 14.4585L7.98873 11.3928L3.69404 14.4585L5.33977 9.4972L1 6.39639H6.36554L8 1.4585L9.63446 6.39639H15L10.6602 9.4972L12.306 14.4585H12.2834Z" fill="#3F2B2E"/>
|
|
905
|
+
</svg>
|
|
906
|
+
`, ct = {
|
|
907
|
+
wishlist: oe,
|
|
908
|
+
playerv: ne,
|
|
909
|
+
chevronRight: ae,
|
|
910
|
+
chevronLeft: le,
|
|
911
|
+
"star-0": he,
|
|
912
|
+
"star-25": ce,
|
|
913
|
+
"star-50": de,
|
|
914
|
+
"star-75": pe,
|
|
915
|
+
"star-100": ue
|
|
896
916
|
};
|
|
897
|
-
var
|
|
898
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
917
|
+
var ge = Object.defineProperty, fe = Object.getOwnPropertyDescriptor, X = (i, t, e, s) => {
|
|
918
|
+
for (var r = s > 1 ? void 0 : s ? fe(t, e) : t, n = i.length - 1, o; n >= 0; n--)
|
|
899
919
|
(o = i[n]) && (r = (s ? o(t, e, r) : o(r)) || r);
|
|
900
|
-
return s && r &&
|
|
920
|
+
return s && r && ge(t, e, r), r;
|
|
901
921
|
};
|
|
902
|
-
let
|
|
922
|
+
let U = class extends $ {
|
|
903
923
|
constructor() {
|
|
904
924
|
super(...arguments), this.status = "empty", this.ariaDescribedBy = "a-product-name", this.label = "Add to wishlist";
|
|
905
925
|
}
|
|
906
926
|
render() {
|
|
907
|
-
const i =
|
|
927
|
+
const i = ct.wishlist.replace(
|
|
908
928
|
"<svg",
|
|
909
929
|
'<svg aria-hidden="true" focusable="false" part="svg"'
|
|
910
930
|
);
|
|
911
|
-
return
|
|
931
|
+
return g`
|
|
912
932
|
<button
|
|
913
933
|
type="button"
|
|
914
|
-
aria-label="${this.label}"
|
|
915
934
|
aria-describedby="${this.ariaDescribedBy}"
|
|
916
|
-
aria-pressed="${this.status == "filled" ? "true" : "false"}"
|
|
917
935
|
class="wishlist-button"
|
|
918
|
-
@click="${this.
|
|
936
|
+
@click="${this.handleClick}"
|
|
919
937
|
>
|
|
920
938
|
<span class="sr-only">${this.label}</span>
|
|
921
|
-
${
|
|
939
|
+
${K(i)}
|
|
922
940
|
</button>
|
|
923
941
|
`;
|
|
924
942
|
}
|
|
943
|
+
handleClick(i) {
|
|
944
|
+
this.toggleStatus(), this.dispatchEvent(new MouseEvent("click", {
|
|
945
|
+
bubbles: !0,
|
|
946
|
+
composed: !0
|
|
947
|
+
}));
|
|
948
|
+
}
|
|
925
949
|
toggleStatus() {
|
|
926
950
|
this.status = this.status == "empty" ? "filled" : "empty";
|
|
927
951
|
}
|
|
@@ -935,7 +959,7 @@ let T = class extends w {
|
|
|
935
959
|
this.label = i, this.requestUpdate();
|
|
936
960
|
}
|
|
937
961
|
};
|
|
938
|
-
|
|
962
|
+
U.styles = O`
|
|
939
963
|
:host {
|
|
940
964
|
display: inline-flex;
|
|
941
965
|
justify-content: center;
|
|
@@ -990,24 +1014,24 @@ T.styles = I`
|
|
|
990
1014
|
fill: var(--color-alpha-light-strong);
|
|
991
1015
|
}
|
|
992
1016
|
`;
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
],
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
],
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
],
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
],
|
|
1005
|
-
var
|
|
1006
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
1017
|
+
X([
|
|
1018
|
+
h({ type: String, reflect: !0 })
|
|
1019
|
+
], U.prototype, "status", 2);
|
|
1020
|
+
X([
|
|
1021
|
+
h({ type: String, reflect: !0 })
|
|
1022
|
+
], U.prototype, "ariaDescribedBy", 2);
|
|
1023
|
+
X([
|
|
1024
|
+
h({ type: String, reflect: !0 })
|
|
1025
|
+
], U.prototype, "label", 2);
|
|
1026
|
+
U = X([
|
|
1027
|
+
V("o-wishlist-button")
|
|
1028
|
+
], U);
|
|
1029
|
+
var ve = Object.defineProperty, be = Object.getOwnPropertyDescriptor, x = (i, t, e, s) => {
|
|
1030
|
+
for (var r = s > 1 ? void 0 : s ? be(t, e) : t, n = i.length - 1, o; n >= 0; n--)
|
|
1007
1031
|
(o = i[n]) && (r = (s ? o(t, e, r) : o(r)) || r);
|
|
1008
|
-
return s && r &&
|
|
1032
|
+
return s && r && ve(t, e, r), r;
|
|
1009
1033
|
};
|
|
1010
|
-
let
|
|
1034
|
+
let v = class extends $ {
|
|
1011
1035
|
constructor() {
|
|
1012
1036
|
super(...arguments), this.bgstyle = "background-light", this.size = "medium", this.status = "empty", this.type = "button", this.strokewidth = "1", this.icon = "wishlist", this.disabled = !1;
|
|
1013
1037
|
}
|
|
@@ -1015,29 +1039,29 @@ let g = class extends w {
|
|
|
1015
1039
|
super.updated(i), this.style.setProperty("--icon-stroke-width", this.strokewidth);
|
|
1016
1040
|
}
|
|
1017
1041
|
render() {
|
|
1018
|
-
const i =
|
|
1042
|
+
const i = ct[this.icon] ?? "", t = `icon-${this.icon}`, e = i.replace(
|
|
1019
1043
|
"<svg",
|
|
1020
1044
|
'<svg aria-hidden="true" focusable="false" part="svg"'
|
|
1021
1045
|
);
|
|
1022
|
-
return
|
|
1023
|
-
${this.type === "span" ?
|
|
1046
|
+
return g`
|
|
1047
|
+
${this.type === "span" ? g`
|
|
1024
1048
|
<span class="icon icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}" ?disabled="${this.disabled}">
|
|
1025
|
-
${
|
|
1049
|
+
${K(e)}
|
|
1026
1050
|
</span>
|
|
1027
|
-
` :
|
|
1051
|
+
` : g`
|
|
1028
1052
|
<button
|
|
1029
1053
|
type="button"
|
|
1030
1054
|
aria-label="icon"
|
|
1031
1055
|
class="icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}"
|
|
1032
1056
|
?disabled="${this.disabled}"
|
|
1033
1057
|
>
|
|
1034
|
-
${
|
|
1058
|
+
${K(e)}
|
|
1035
1059
|
</button>
|
|
1036
1060
|
`}
|
|
1037
1061
|
`;
|
|
1038
1062
|
}
|
|
1039
1063
|
};
|
|
1040
|
-
|
|
1064
|
+
v.styles = O`
|
|
1041
1065
|
:host {
|
|
1042
1066
|
display: inline-flex;
|
|
1043
1067
|
justify-content: center;
|
|
@@ -1196,42 +1220,42 @@ g.styles = I`
|
|
|
1196
1220
|
}
|
|
1197
1221
|
`;
|
|
1198
1222
|
x([
|
|
1199
|
-
|
|
1200
|
-
],
|
|
1223
|
+
h({ type: String, reflect: !0 })
|
|
1224
|
+
], v.prototype, "bgstyle", 2);
|
|
1201
1225
|
x([
|
|
1202
|
-
|
|
1203
|
-
],
|
|
1226
|
+
h({ type: String, reflect: !0 })
|
|
1227
|
+
], v.prototype, "size", 2);
|
|
1204
1228
|
x([
|
|
1205
|
-
|
|
1206
|
-
],
|
|
1229
|
+
h({ type: String, reflect: !0 })
|
|
1230
|
+
], v.prototype, "status", 2);
|
|
1207
1231
|
x([
|
|
1208
|
-
|
|
1209
|
-
],
|
|
1232
|
+
h({ type: String, reflect: !0 })
|
|
1233
|
+
], v.prototype, "type", 2);
|
|
1210
1234
|
x([
|
|
1211
|
-
|
|
1212
|
-
],
|
|
1235
|
+
h({ type: String })
|
|
1236
|
+
], v.prototype, "strokewidth", 2);
|
|
1213
1237
|
x([
|
|
1214
|
-
|
|
1215
|
-
],
|
|
1238
|
+
h({ type: String })
|
|
1239
|
+
], v.prototype, "icon", 2);
|
|
1216
1240
|
x([
|
|
1217
|
-
|
|
1218
|
-
],
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
],
|
|
1222
|
-
var
|
|
1223
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
1241
|
+
h({ type: Boolean, reflect: !0 })
|
|
1242
|
+
], v.prototype, "disabled", 2);
|
|
1243
|
+
v = x([
|
|
1244
|
+
V("o-icon-button")
|
|
1245
|
+
], v);
|
|
1246
|
+
var $e = Object.defineProperty, ye = Object.getOwnPropertyDescriptor, H = (i, t, e, s) => {
|
|
1247
|
+
for (var r = s > 1 ? void 0 : s ? ye(t, e) : t, n = i.length - 1, o; n >= 0; n--)
|
|
1224
1248
|
(o = i[n]) && (r = (s ? o(t, e, r) : o(r)) || r);
|
|
1225
|
-
return s && r &&
|
|
1249
|
+
return s && r && $e(t, e, r), r;
|
|
1226
1250
|
};
|
|
1227
|
-
let
|
|
1251
|
+
let y = class extends $ {
|
|
1228
1252
|
constructor() {
|
|
1229
1253
|
super(...arguments), this.href = "", this.target = "", this.template = "standard", this.inverse = !1, this.endIcon = !1, this.reverseEndIcon = !1;
|
|
1230
1254
|
}
|
|
1231
1255
|
render() {
|
|
1232
|
-
return
|
|
1256
|
+
return g`
|
|
1233
1257
|
<a href="${this.href}" target="${this.target}">
|
|
1234
|
-
${this.endIcon && this.reverseEndIcon ?
|
|
1258
|
+
${this.endIcon && this.reverseEndIcon ? g`
|
|
1235
1259
|
<o-icon-button
|
|
1236
1260
|
icon="chevronLeft"
|
|
1237
1261
|
bgstyle="${this.inverse ? "none-light" : "none-contrast"}"
|
|
@@ -1241,7 +1265,7 @@ let $ = class extends w {
|
|
|
1241
1265
|
></o-icon-button>
|
|
1242
1266
|
` : null}
|
|
1243
1267
|
<span class="link-text"><slot></slot></span>
|
|
1244
|
-
${this.endIcon && !this.reverseEndIcon ?
|
|
1268
|
+
${this.endIcon && !this.reverseEndIcon ? g`
|
|
1245
1269
|
<o-icon-button
|
|
1246
1270
|
icon="chevronRight"
|
|
1247
1271
|
bgstyle="${this.inverse ? "none-light" : "none-contrast"}"
|
|
@@ -1254,7 +1278,7 @@ let $ = class extends w {
|
|
|
1254
1278
|
`;
|
|
1255
1279
|
}
|
|
1256
1280
|
};
|
|
1257
|
-
|
|
1281
|
+
y.styles = O`
|
|
1258
1282
|
:host([template="standard"]) a {
|
|
1259
1283
|
color: var(--color-content-action-secondary);
|
|
1260
1284
|
font-size: var(--font-size-200);
|
|
@@ -1352,24 +1376,102 @@ $.styles = I`
|
|
|
1352
1376
|
}
|
|
1353
1377
|
/* End of underline effect */
|
|
1354
1378
|
`;
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
],
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
],
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
],
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
],
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
],
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
],
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
],
|
|
1379
|
+
H([
|
|
1380
|
+
h({ type: String })
|
|
1381
|
+
], y.prototype, "href", 2);
|
|
1382
|
+
H([
|
|
1383
|
+
h({ type: String })
|
|
1384
|
+
], y.prototype, "target", 2);
|
|
1385
|
+
H([
|
|
1386
|
+
h({ type: String, reflect: !0 })
|
|
1387
|
+
], y.prototype, "template", 2);
|
|
1388
|
+
H([
|
|
1389
|
+
h({ type: Boolean, reflect: !0 })
|
|
1390
|
+
], y.prototype, "inverse", 2);
|
|
1391
|
+
H([
|
|
1392
|
+
h({ type: Boolean, reflect: !0 })
|
|
1393
|
+
], y.prototype, "endIcon", 2);
|
|
1394
|
+
H([
|
|
1395
|
+
h({ type: Boolean, reflect: !0 })
|
|
1396
|
+
], y.prototype, "reverseEndIcon", 2);
|
|
1397
|
+
y = H([
|
|
1398
|
+
V("o-link")
|
|
1399
|
+
], y);
|
|
1400
|
+
var me = Object.defineProperty, _e = Object.getOwnPropertyDescriptor, G = (i, t, e, s) => {
|
|
1401
|
+
for (var r = s > 1 ? void 0 : s ? _e(t, e) : t, n = i.length - 1, o; n >= 0; n--)
|
|
1402
|
+
(o = i[n]) && (r = (s ? o(t, e, r) : o(r)) || r);
|
|
1403
|
+
return s && r && me(t, e, r), r;
|
|
1404
|
+
};
|
|
1405
|
+
let B = class extends $ {
|
|
1406
|
+
constructor() {
|
|
1407
|
+
super(...arguments), this.rating = 0;
|
|
1408
|
+
}
|
|
1409
|
+
getStarKeys() {
|
|
1410
|
+
const i = [];
|
|
1411
|
+
for (let t = 0; t < 5; t++) {
|
|
1412
|
+
const e = this.rating - t;
|
|
1413
|
+
let s;
|
|
1414
|
+
e >= 1 ? s = 100 : e <= 0 ? s = 0 : s = Math.round(e * 100 / 25) * 25, i.push(`star-${s}`);
|
|
1415
|
+
}
|
|
1416
|
+
return i;
|
|
1417
|
+
}
|
|
1418
|
+
render() {
|
|
1419
|
+
const i = this.getStarKeys();
|
|
1420
|
+
return g`
|
|
1421
|
+
<div class="rating">
|
|
1422
|
+
<div class="stars">
|
|
1423
|
+
${i.map(
|
|
1424
|
+
(t) => g`<span class="star">${K(ct[t] ?? "")}</span>`
|
|
1425
|
+
)}
|
|
1426
|
+
</div>
|
|
1427
|
+
${this.reviewCount != null && this.href != null ? g`<o-link template="review" href="${this.href}">${this.reviewCount}</o-link>` : null}
|
|
1428
|
+
</div>
|
|
1429
|
+
`;
|
|
1430
|
+
}
|
|
1431
|
+
};
|
|
1432
|
+
B.styles = O`
|
|
1433
|
+
svg {
|
|
1434
|
+
width: 12px;
|
|
1435
|
+
height: 12px;
|
|
1436
|
+
}
|
|
1437
|
+
.rating {
|
|
1438
|
+
display: flex;
|
|
1439
|
+
align-items: center;
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
.stars {
|
|
1443
|
+
display: flex;
|
|
1444
|
+
gap: 2px;
|
|
1445
|
+
}
|
|
1446
|
+
|
|
1447
|
+
.star {
|
|
1448
|
+
display: block;
|
|
1449
|
+
}
|
|
1450
|
+
|
|
1451
|
+
o-link {
|
|
1452
|
+
margin-left: 6px;
|
|
1453
|
+
font-family: var(--font-family-loccitane-sans);
|
|
1454
|
+
font-weight: var(--font-weight-500);
|
|
1455
|
+
font-size: var(--font-size-100);
|
|
1456
|
+
line-height: var(--line-height-160);
|
|
1457
|
+
letter-spacing: var(--letter-spacing-400);
|
|
1458
|
+
color: var(--color-content-action-secondary);
|
|
1459
|
+
}
|
|
1460
|
+
|
|
1461
|
+
.review-link {
|
|
1462
|
+
text-decoration: underline;
|
|
1463
|
+
cursor: pointer;
|
|
1464
|
+
}
|
|
1465
|
+
`;
|
|
1466
|
+
G([
|
|
1467
|
+
h({ type: Number })
|
|
1468
|
+
], B.prototype, "rating", 2);
|
|
1469
|
+
G([
|
|
1470
|
+
h({ type: String })
|
|
1471
|
+
], B.prototype, "reviewCount", 2);
|
|
1472
|
+
G([
|
|
1473
|
+
h({ type: String })
|
|
1474
|
+
], B.prototype, "href", 2);
|
|
1475
|
+
B = G([
|
|
1476
|
+
V("o-rating")
|
|
1477
|
+
], B);
|