@florid-kit/components 0.3.17 → 0.3.19
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/aria.d.ts +1 -1
- package/components/wishlist-button.d.ts +4 -2
- package/index.js +100 -76
- package/index.mjs +365 -333
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -5,16 +5,16 @@
|
|
|
5
5
|
*/
|
|
6
6
|
const W = globalThis, at = W.ShadowRoot && (W.ShadyCSS === void 0 || W.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, lt = Symbol(), ut = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
let At = class {
|
|
8
|
-
constructor(t, e,
|
|
9
|
-
if (this._$cssResult$ = !0,
|
|
8
|
+
constructor(t, e, s) {
|
|
9
|
+
if (this._$cssResult$ = !0, s !== lt) 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
15
|
if (at && t === void 0) {
|
|
16
|
-
const
|
|
17
|
-
|
|
16
|
+
const s = e !== void 0 && e.length === 1;
|
|
17
|
+
s && (t = ut.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && ut.set(e, t));
|
|
18
18
|
}
|
|
19
19
|
return t;
|
|
20
20
|
}
|
|
@@ -22,59 +22,59 @@ let At = class {
|
|
|
22
22
|
return this.cssText;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
const Pt = (
|
|
26
|
-
const e =
|
|
25
|
+
const Pt = (o) => new At(typeof o == "string" ? o : o + "", void 0, lt), E = (o, ...t) => {
|
|
26
|
+
const e = o.length === 1 ? o[0] : t.reduce((s, n, r) => s + ((i) => {
|
|
27
27
|
if (i._$cssResult$ === !0) return i.cssText;
|
|
28
28
|
if (typeof i == "number") return i;
|
|
29
29
|
throw Error("Value passed to 'css' function must be a 'css' function result: " + i + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
30
|
-
})(
|
|
31
|
-
return new At(e,
|
|
32
|
-
},
|
|
33
|
-
if (at)
|
|
30
|
+
})(n) + o[r + 1], o[0]);
|
|
31
|
+
return new At(e, o, lt);
|
|
32
|
+
}, kt = (o, t) => {
|
|
33
|
+
if (at) o.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
34
34
|
else for (const e of t) {
|
|
35
|
-
const
|
|
36
|
-
|
|
35
|
+
const s = document.createElement("style"), n = W.litNonce;
|
|
36
|
+
n !== void 0 && s.setAttribute("nonce", n), s.textContent = e.cssText, o.appendChild(s);
|
|
37
37
|
}
|
|
38
|
-
}, ft = at ? (
|
|
38
|
+
}, ft = at ? (o) => o : (o) => o instanceof CSSStyleSheet ? ((t) => {
|
|
39
39
|
let e = "";
|
|
40
|
-
for (const
|
|
40
|
+
for (const s of t.cssRules) e += s.cssText;
|
|
41
41
|
return Pt(e);
|
|
42
|
-
})(
|
|
42
|
+
})(o) : o;
|
|
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: Bt, defineProperty: Ot, getOwnPropertyDescriptor: Ht, getOwnPropertyNames: Mt, getOwnPropertySymbols: It, getPrototypeOf: zt } = Object, S = globalThis, gt = S.trustedTypes, Ut = gt ? gt.emptyScript : "", tt = S.reactiveElementPolyfillSupport, N = (o, t) => o, K = { toAttribute(o, t) {
|
|
49
49
|
switch (t) {
|
|
50
50
|
case Boolean:
|
|
51
|
-
|
|
51
|
+
o = o ? Ut : null;
|
|
52
52
|
break;
|
|
53
53
|
case Object:
|
|
54
54
|
case Array:
|
|
55
|
-
|
|
55
|
+
o = o == null ? o : JSON.stringify(o);
|
|
56
56
|
}
|
|
57
|
-
return
|
|
58
|
-
}, fromAttribute(
|
|
59
|
-
let e =
|
|
57
|
+
return o;
|
|
58
|
+
}, fromAttribute(o, t) {
|
|
59
|
+
let e = o;
|
|
60
60
|
switch (t) {
|
|
61
61
|
case Boolean:
|
|
62
|
-
e =
|
|
62
|
+
e = o !== null;
|
|
63
63
|
break;
|
|
64
64
|
case Number:
|
|
65
|
-
e =
|
|
65
|
+
e = o === null ? null : Number(o);
|
|
66
66
|
break;
|
|
67
67
|
case Object:
|
|
68
68
|
case Array:
|
|
69
69
|
try {
|
|
70
|
-
e = JSON.parse(
|
|
70
|
+
e = JSON.parse(o);
|
|
71
71
|
} catch {
|
|
72
72
|
e = null;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
return e;
|
|
76
|
-
} }, ct = (
|
|
77
|
-
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")),
|
|
76
|
+
} }, ct = (o, t) => !Bt(o, t), vt = { attribute: !0, type: String, converter: K, reflect: !1, useDefault: !1, hasChanged: ct };
|
|
77
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), S.litPropertyMetadata ?? (S.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
78
78
|
let M = class extends HTMLElement {
|
|
79
79
|
static addInitializer(t) {
|
|
80
80
|
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
|
@@ -84,19 +84,19 @@ let M = class extends HTMLElement {
|
|
|
84
84
|
}
|
|
85
85
|
static createProperty(t, e = vt) {
|
|
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
|
-
const
|
|
88
|
-
|
|
87
|
+
const s = Symbol(), n = this.getPropertyDescriptor(t, s, e);
|
|
88
|
+
n !== void 0 && Ot(this.prototype, t, n);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
static getPropertyDescriptor(t, e,
|
|
92
|
-
const { get:
|
|
91
|
+
static getPropertyDescriptor(t, e, s) {
|
|
92
|
+
const { get: n, set: r } = Ht(this.prototype, t) ?? { get() {
|
|
93
93
|
return this[e];
|
|
94
94
|
}, set(i) {
|
|
95
95
|
this[e] = i;
|
|
96
96
|
} };
|
|
97
|
-
return { get:
|
|
98
|
-
const c =
|
|
99
|
-
r == null || r.call(this, i), this.requestUpdate(t, c,
|
|
97
|
+
return { get: n, set(i) {
|
|
98
|
+
const c = n == null ? void 0 : n.call(this);
|
|
99
|
+
r == null || r.call(this, i), this.requestUpdate(t, c, s);
|
|
100
100
|
}, configurable: !0, enumerable: !0 };
|
|
101
101
|
}
|
|
102
102
|
static getPropertyOptions(t) {
|
|
@@ -104,38 +104,38 @@ let M = class extends HTMLElement {
|
|
|
104
104
|
}
|
|
105
105
|
static _$Ei() {
|
|
106
106
|
if (this.hasOwnProperty(N("elementProperties"))) return;
|
|
107
|
-
const t =
|
|
107
|
+
const t = zt(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
111
|
if (this.hasOwnProperty(N("finalized"))) return;
|
|
112
112
|
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(N("properties"))) {
|
|
113
|
-
const e = this.properties,
|
|
114
|
-
for (const
|
|
113
|
+
const e = this.properties, s = [...Mt(e), ...It(e)];
|
|
114
|
+
for (const n of s) this.createProperty(n, e[n]);
|
|
115
115
|
}
|
|
116
116
|
const t = this[Symbol.metadata];
|
|
117
117
|
if (t !== null) {
|
|
118
118
|
const e = litPropertyMetadata.get(t);
|
|
119
|
-
if (e !== void 0) for (const [
|
|
119
|
+
if (e !== void 0) for (const [s, n] of e) this.elementProperties.set(s, n);
|
|
120
120
|
}
|
|
121
121
|
this._$Eh = /* @__PURE__ */ new Map();
|
|
122
|
-
for (const [e,
|
|
123
|
-
const
|
|
124
|
-
|
|
122
|
+
for (const [e, s] of this.elementProperties) {
|
|
123
|
+
const n = this._$Eu(e, s);
|
|
124
|
+
n !== void 0 && this._$Eh.set(n, e);
|
|
125
125
|
}
|
|
126
126
|
this.elementStyles = this.finalizeStyles(this.styles);
|
|
127
127
|
}
|
|
128
128
|
static finalizeStyles(t) {
|
|
129
129
|
const e = [];
|
|
130
130
|
if (Array.isArray(t)) {
|
|
131
|
-
const
|
|
132
|
-
for (const
|
|
131
|
+
const s = new Set(t.flat(1 / 0).reverse());
|
|
132
|
+
for (const n of s) e.unshift(ft(n));
|
|
133
133
|
} else t !== void 0 && e.push(ft(t));
|
|
134
134
|
return e;
|
|
135
135
|
}
|
|
136
136
|
static _$Eu(t, e) {
|
|
137
|
-
const
|
|
138
|
-
return
|
|
137
|
+
const s = e.attribute;
|
|
138
|
+
return s === !1 ? void 0 : typeof s == "string" ? s : typeof t == "string" ? t.toLowerCase() : void 0;
|
|
139
139
|
}
|
|
140
140
|
constructor() {
|
|
141
141
|
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
@@ -154,18 +154,18 @@ let M = class extends HTMLElement {
|
|
|
154
154
|
}
|
|
155
155
|
_$E_() {
|
|
156
156
|
const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
|
|
157
|
-
for (const
|
|
157
|
+
for (const s of e.keys()) this.hasOwnProperty(s) && (t.set(s, this[s]), delete this[s]);
|
|
158
158
|
t.size > 0 && (this._$Ep = t);
|
|
159
159
|
}
|
|
160
160
|
createRenderRoot() {
|
|
161
161
|
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
162
|
-
return
|
|
162
|
+
return kt(t, this.constructor.elementStyles), t;
|
|
163
163
|
}
|
|
164
164
|
connectedCallback() {
|
|
165
165
|
var t;
|
|
166
166
|
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$EO) == null || t.forEach((e) => {
|
|
167
|
-
var
|
|
168
|
-
return (
|
|
167
|
+
var s;
|
|
168
|
+
return (s = e.hostConnected) == null ? void 0 : s.call(e);
|
|
169
169
|
});
|
|
170
170
|
}
|
|
171
171
|
enableUpdating(t) {
|
|
@@ -173,40 +173,40 @@ let M = class extends HTMLElement {
|
|
|
173
173
|
disconnectedCallback() {
|
|
174
174
|
var t;
|
|
175
175
|
(t = this._$EO) == null || t.forEach((e) => {
|
|
176
|
-
var
|
|
177
|
-
return (
|
|
176
|
+
var s;
|
|
177
|
+
return (s = e.hostDisconnected) == null ? void 0 : s.call(e);
|
|
178
178
|
});
|
|
179
179
|
}
|
|
180
|
-
attributeChangedCallback(t, e,
|
|
181
|
-
this._$AK(t,
|
|
180
|
+
attributeChangedCallback(t, e, s) {
|
|
181
|
+
this._$AK(t, s);
|
|
182
182
|
}
|
|
183
183
|
_$ET(t, e) {
|
|
184
184
|
var r;
|
|
185
|
-
const
|
|
186
|
-
if (
|
|
187
|
-
const i = (((r =
|
|
188
|
-
this._$Em = t, i == null ? this.removeAttribute(
|
|
185
|
+
const s = this.constructor.elementProperties.get(t), n = this.constructor._$Eu(t, s);
|
|
186
|
+
if (n !== void 0 && s.reflect === !0) {
|
|
187
|
+
const i = (((r = s.converter) == null ? void 0 : r.toAttribute) !== void 0 ? s.converter : K).toAttribute(e, s.type);
|
|
188
|
+
this._$Em = t, i == null ? this.removeAttribute(n) : this.setAttribute(n, i), this._$Em = null;
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
_$AK(t, e) {
|
|
192
192
|
var r, i;
|
|
193
|
-
const
|
|
194
|
-
if (
|
|
195
|
-
const c =
|
|
196
|
-
this._$Em =
|
|
193
|
+
const s = this.constructor, n = s._$Eh.get(t);
|
|
194
|
+
if (n !== void 0 && this._$Em !== n) {
|
|
195
|
+
const c = s.getPropertyOptions(n), a = typeof c.converter == "function" ? { fromAttribute: c.converter } : ((r = c.converter) == null ? void 0 : r.fromAttribute) !== void 0 ? c.converter : K;
|
|
196
|
+
this._$Em = n, this[n] = a.fromAttribute(e, c.type) ?? ((i = this._$Ej) == null ? void 0 : i.get(n)) ?? null, this._$Em = null;
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
|
-
requestUpdate(t, e,
|
|
200
|
-
var
|
|
199
|
+
requestUpdate(t, e, s) {
|
|
200
|
+
var n;
|
|
201
201
|
if (t !== void 0) {
|
|
202
202
|
const r = this.constructor, i = this[t];
|
|
203
|
-
if (
|
|
204
|
-
this.C(t, e,
|
|
203
|
+
if (s ?? (s = r.getPropertyOptions(t)), !((s.hasChanged ?? ct)(i, e) || s.useDefault && s.reflect && i === ((n = this._$Ej) == null ? void 0 : n.get(t)) && !this.hasAttribute(r._$Eu(t, s)))) return;
|
|
204
|
+
this.C(t, e, s);
|
|
205
205
|
}
|
|
206
206
|
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
207
207
|
}
|
|
208
|
-
C(t, e, { useDefault:
|
|
209
|
-
|
|
208
|
+
C(t, e, { useDefault: s, reflect: n, wrapped: r }, i) {
|
|
209
|
+
s && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(t) && (this._$Ej.set(t, i ?? e ?? this[t]), r !== !0 || i !== void 0) || (this._$AL.has(t) || (this.hasUpdated || s || (e = void 0), this._$AL.set(t, e)), n === !0 && this._$Em !== t && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(t));
|
|
210
210
|
}
|
|
211
211
|
async _$EP() {
|
|
212
212
|
this.isUpdatePending = !0;
|
|
@@ -222,15 +222,15 @@ let M = class extends HTMLElement {
|
|
|
222
222
|
return this.performUpdate();
|
|
223
223
|
}
|
|
224
224
|
performUpdate() {
|
|
225
|
-
var
|
|
225
|
+
var s;
|
|
226
226
|
if (!this.isUpdatePending) return;
|
|
227
227
|
if (!this.hasUpdated) {
|
|
228
228
|
if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
|
|
229
229
|
for (const [r, i] of this._$Ep) this[r] = i;
|
|
230
230
|
this._$Ep = void 0;
|
|
231
231
|
}
|
|
232
|
-
const
|
|
233
|
-
if (
|
|
232
|
+
const n = this.constructor.elementProperties;
|
|
233
|
+
if (n.size > 0) for (const [r, i] of n) {
|
|
234
234
|
const { wrapped: c } = i, a = this[r];
|
|
235
235
|
c !== !0 || this._$AL.has(r) || a === void 0 || this.C(r, void 0, i, a);
|
|
236
236
|
}
|
|
@@ -238,12 +238,12 @@ let M = class extends HTMLElement {
|
|
|
238
238
|
let t = !1;
|
|
239
239
|
const e = this._$AL;
|
|
240
240
|
try {
|
|
241
|
-
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (
|
|
241
|
+
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (s = this._$EO) == null || s.forEach((n) => {
|
|
242
242
|
var r;
|
|
243
|
-
return (r =
|
|
243
|
+
return (r = n.hostUpdate) == null ? void 0 : r.call(n);
|
|
244
244
|
}), this.update(e)) : this._$EM();
|
|
245
|
-
} catch (
|
|
246
|
-
throw t = !1, this._$EM(),
|
|
245
|
+
} catch (n) {
|
|
246
|
+
throw t = !1, this._$EM(), n;
|
|
247
247
|
}
|
|
248
248
|
t && this._$AE(e);
|
|
249
249
|
}
|
|
@@ -251,9 +251,9 @@ let M = class extends HTMLElement {
|
|
|
251
251
|
}
|
|
252
252
|
_$AE(t) {
|
|
253
253
|
var e;
|
|
254
|
-
(e = this._$EO) == null || e.forEach((
|
|
255
|
-
var
|
|
256
|
-
return (
|
|
254
|
+
(e = this._$EO) == null || e.forEach((s) => {
|
|
255
|
+
var n;
|
|
256
|
+
return (n = s.hostUpdated) == null ? void 0 : n.call(s);
|
|
257
257
|
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
258
258
|
}
|
|
259
259
|
_$EM() {
|
|
@@ -276,74 +276,74 @@ let M = class extends HTMLElement {
|
|
|
276
276
|
firstUpdated(t) {
|
|
277
277
|
}
|
|
278
278
|
};
|
|
279
|
-
M.elementStyles = [], M.shadowRootOptions = { mode: "open" }, M[N("elementProperties")] = /* @__PURE__ */ new Map(), M[N("finalized")] = /* @__PURE__ */ new Map(), tt == null || tt({ ReactiveElement: M }), (
|
|
279
|
+
M.elementStyles = [], M.shadowRootOptions = { mode: "open" }, M[N("elementProperties")] = /* @__PURE__ */ new Map(), M[N("finalized")] = /* @__PURE__ */ new Map(), tt == null || tt({ ReactiveElement: M }), (S.reactiveElementVersions ?? (S.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 j = globalThis,
|
|
285
|
+
const j = globalThis, G = j.trustedTypes, bt = G ? G.createPolicy("lit-html", { createHTML: (o) => o }) : void 0, St = "$lit$", A = `lit$${Math.random().toFixed(9).slice(2)}$`, Et = "?" + A, Tt = `<${Et}>`, B = document, R = () => B.createComment(""), F = (o) => o === null || typeof o != "object" && typeof o != "function", ht = Array.isArray, Dt = (o) => ht(o) || typeof (o == null ? void 0 : o[Symbol.iterator]) == "function", et = `[
|
|
286
286
|
\f\r]`, D = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, yt = /-->/g, $t = />/g, L = RegExp(`>|${et}(?:([^\\s"'>=/]+)(${et}*=${et}*(?:[^
|
|
287
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), mt = /'/g, wt = /"/g, Ct = /^(?:script|style|textarea|title)$/i, Nt = (
|
|
288
|
-
function Lt(
|
|
289
|
-
if (!ht(
|
|
287
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), mt = /'/g, wt = /"/g, Ct = /^(?:script|style|textarea|title)$/i, Nt = (o) => (t, ...e) => ({ _$litType$: o, strings: t, values: e }), d = Nt(1), O = Symbol.for("lit-noChange"), h = Symbol.for("lit-nothing"), _t = /* @__PURE__ */ new WeakMap(), P = B.createTreeWalker(B, 129);
|
|
288
|
+
function Lt(o, t) {
|
|
289
|
+
if (!ht(o) || !o.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
290
290
|
return bt !== void 0 ? bt.createHTML(t) : t;
|
|
291
291
|
}
|
|
292
|
-
const jt = (
|
|
293
|
-
const e =
|
|
294
|
-
let
|
|
292
|
+
const jt = (o, t) => {
|
|
293
|
+
const e = o.length - 1, s = [];
|
|
294
|
+
let n, r = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", i = D;
|
|
295
295
|
for (let c = 0; c < e; c++) {
|
|
296
|
-
const a =
|
|
296
|
+
const a = o[c];
|
|
297
297
|
let f, g, p = -1, w = 0;
|
|
298
|
-
for (; w < a.length && (i.lastIndex = w, g = i.exec(a), g !== null); ) w = i.lastIndex, i === D ? g[1] === "!--" ? i = yt : g[1] !== void 0 ? i = $t : g[2] !== void 0 ? (Ct.test(g[2]) && (
|
|
299
|
-
const x = i === L &&
|
|
300
|
-
r += i === D ? a + Tt : p >= 0 ? (
|
|
298
|
+
for (; w < a.length && (i.lastIndex = w, g = i.exec(a), g !== null); ) w = i.lastIndex, i === D ? g[1] === "!--" ? i = yt : g[1] !== void 0 ? i = $t : g[2] !== void 0 ? (Ct.test(g[2]) && (n = RegExp("</" + g[2], "g")), i = L) : g[3] !== void 0 && (i = L) : i === L ? g[0] === ">" ? (i = n ?? D, p = -1) : g[1] === void 0 ? p = -2 : (p = i.lastIndex - g[2].length, f = g[1], i = g[3] === void 0 ? L : g[3] === '"' ? wt : mt) : i === wt || i === mt ? i = L : i === yt || i === $t ? i = D : (i = L, n = void 0);
|
|
299
|
+
const x = i === L && o[c + 1].startsWith("/>") ? " " : "";
|
|
300
|
+
r += i === D ? a + Tt : p >= 0 ? (s.push(f), a.slice(0, p) + St + a.slice(p) + A + x) : a + A + (p === -2 ? c : x);
|
|
301
301
|
}
|
|
302
|
-
return [Lt(
|
|
302
|
+
return [Lt(o, r + (o[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
|
|
303
303
|
};
|
|
304
304
|
class V {
|
|
305
|
-
constructor({ strings: t, _$litType$: e },
|
|
306
|
-
let
|
|
305
|
+
constructor({ strings: t, _$litType$: e }, s) {
|
|
306
|
+
let n;
|
|
307
307
|
this.parts = [];
|
|
308
308
|
let r = 0, i = 0;
|
|
309
309
|
const c = t.length - 1, a = this.parts, [f, g] = jt(t, e);
|
|
310
|
-
if (this.el = V.createElement(f,
|
|
310
|
+
if (this.el = V.createElement(f, s), P.currentNode = this.el.content, e === 2 || e === 3) {
|
|
311
311
|
const p = this.el.content.firstChild;
|
|
312
312
|
p.replaceWith(...p.childNodes);
|
|
313
313
|
}
|
|
314
|
-
for (; (
|
|
315
|
-
if (
|
|
316
|
-
if (
|
|
317
|
-
const w = g[i++], x =
|
|
318
|
-
a.push({ type: 1, index: r, name: q[2], strings: x, ctor: q[1] === "." ? Ft : q[1] === "?" ? Vt : q[1] === "@" ? Zt :
|
|
319
|
-
} else p.startsWith(A) && (a.push({ type: 6, index: r }),
|
|
320
|
-
if (Ct.test(
|
|
321
|
-
const p =
|
|
314
|
+
for (; (n = P.nextNode()) !== null && a.length < c; ) {
|
|
315
|
+
if (n.nodeType === 1) {
|
|
316
|
+
if (n.hasAttributes()) for (const p of n.getAttributeNames()) if (p.endsWith(St)) {
|
|
317
|
+
const w = g[i++], x = n.getAttribute(p).split(A), q = /([.?@])?(.*)/.exec(w);
|
|
318
|
+
a.push({ type: 1, index: r, name: q[2], strings: x, ctor: q[1] === "." ? Ft : q[1] === "?" ? Vt : q[1] === "@" ? Zt : J }), n.removeAttribute(p);
|
|
319
|
+
} else p.startsWith(A) && (a.push({ type: 6, index: r }), n.removeAttribute(p));
|
|
320
|
+
if (Ct.test(n.tagName)) {
|
|
321
|
+
const p = n.textContent.split(A), w = p.length - 1;
|
|
322
322
|
if (w > 0) {
|
|
323
|
-
|
|
324
|
-
for (let x = 0; x < w; x++)
|
|
325
|
-
|
|
323
|
+
n.textContent = G ? G.emptyScript : "";
|
|
324
|
+
for (let x = 0; x < w; x++) n.append(p[x], R()), P.nextNode(), a.push({ type: 2, index: ++r });
|
|
325
|
+
n.append(p[w], R());
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
|
-
} else if (
|
|
328
|
+
} else if (n.nodeType === 8) if (n.data === Et) a.push({ type: 2, index: r });
|
|
329
329
|
else {
|
|
330
330
|
let p = -1;
|
|
331
|
-
for (; (p =
|
|
331
|
+
for (; (p = n.data.indexOf(A, p + 1)) !== -1; ) a.push({ type: 7, index: r }), p += A.length - 1;
|
|
332
332
|
}
|
|
333
333
|
r++;
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
336
|
static createElement(t, e) {
|
|
337
|
-
const
|
|
338
|
-
return
|
|
337
|
+
const s = B.createElement("template");
|
|
338
|
+
return s.innerHTML = t, s;
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
|
-
function I(
|
|
341
|
+
function I(o, t, e = o, s) {
|
|
342
342
|
var i, c;
|
|
343
343
|
if (t === O) return t;
|
|
344
|
-
let
|
|
344
|
+
let n = s !== void 0 ? (i = e._$Co) == null ? void 0 : i[s] : e._$Cl;
|
|
345
345
|
const r = F(t) ? void 0 : t._$litDirective$;
|
|
346
|
-
return (
|
|
346
|
+
return (n == null ? void 0 : n.constructor) !== r && ((c = n == null ? void 0 : n._$AO) == null || c.call(n, !1), r === void 0 ? n = void 0 : (n = new r(o), n._$AT(o, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = n : e._$Cl = n), n !== void 0 && (t = I(o, n._$AS(o, t.values), n, s)), t;
|
|
347
347
|
}
|
|
348
348
|
class Rt {
|
|
349
349
|
constructor(t, e) {
|
|
@@ -356,21 +356,21 @@ class Rt {
|
|
|
356
356
|
return this._$AM._$AU;
|
|
357
357
|
}
|
|
358
358
|
u(t) {
|
|
359
|
-
const { el: { content: e }, parts:
|
|
360
|
-
P.currentNode =
|
|
361
|
-
let r = P.nextNode(), i = 0, c = 0, a =
|
|
359
|
+
const { el: { content: e }, parts: s } = this._$AD, n = ((t == null ? void 0 : t.creationScope) ?? B).importNode(e, !0);
|
|
360
|
+
P.currentNode = n;
|
|
361
|
+
let r = P.nextNode(), i = 0, c = 0, a = s[0];
|
|
362
362
|
for (; a !== void 0; ) {
|
|
363
363
|
if (i === a.index) {
|
|
364
364
|
let f;
|
|
365
|
-
a.type === 2 ? f = new Z(r, r.nextSibling, this, t) : a.type === 1 ? f = new a.ctor(r, a.name, a.strings, this, t) : a.type === 6 && (f = new qt(r, this, t)), this._$AV.push(f), a =
|
|
365
|
+
a.type === 2 ? f = new Z(r, r.nextSibling, this, t) : a.type === 1 ? f = new a.ctor(r, a.name, a.strings, this, t) : a.type === 6 && (f = new qt(r, this, t)), this._$AV.push(f), a = s[++c];
|
|
366
366
|
}
|
|
367
367
|
i !== (a == null ? void 0 : a.index) && (r = P.nextNode(), i++);
|
|
368
368
|
}
|
|
369
|
-
return P.currentNode =
|
|
369
|
+
return P.currentNode = B, n;
|
|
370
370
|
}
|
|
371
371
|
p(t) {
|
|
372
372
|
let e = 0;
|
|
373
|
-
for (const
|
|
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
376
|
class Z {
|
|
@@ -378,8 +378,8 @@ class Z {
|
|
|
378
378
|
var t;
|
|
379
379
|
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
|
380
380
|
}
|
|
381
|
-
constructor(t, e,
|
|
382
|
-
this.type = 2, this._$AH = h, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM =
|
|
381
|
+
constructor(t, e, s, n) {
|
|
382
|
+
this.type = 2, this._$AH = h, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = n, this._$Cv = (n == null ? void 0 : n.isConnected) ?? !0;
|
|
383
383
|
}
|
|
384
384
|
get parentNode() {
|
|
385
385
|
let t = this._$AA.parentNode;
|
|
@@ -402,14 +402,14 @@ class Z {
|
|
|
402
402
|
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
403
403
|
}
|
|
404
404
|
_(t) {
|
|
405
|
-
this._$AH !== h && F(this._$AH) ? this._$AA.nextSibling.data = t : this.T(
|
|
405
|
+
this._$AH !== h && F(this._$AH) ? this._$AA.nextSibling.data = t : this.T(B.createTextNode(t)), this._$AH = t;
|
|
406
406
|
}
|
|
407
407
|
$(t) {
|
|
408
408
|
var r;
|
|
409
|
-
const { values: e, _$litType$:
|
|
410
|
-
if (((r = this._$AH) == null ? void 0 : r._$AD) ===
|
|
409
|
+
const { values: e, _$litType$: s } = t, n = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = V.createElement(Lt(s.h, s.h[0]), this.options)), s);
|
|
410
|
+
if (((r = this._$AH) == null ? void 0 : r._$AD) === n) this._$AH.p(e);
|
|
411
411
|
else {
|
|
412
|
-
const i = new Rt(
|
|
412
|
+
const i = new Rt(n, this), c = i.u(this.options);
|
|
413
413
|
i.p(e), this.T(c), this._$AH = i;
|
|
414
414
|
}
|
|
415
415
|
}
|
|
@@ -420,15 +420,15 @@ class Z {
|
|
|
420
420
|
k(t) {
|
|
421
421
|
ht(this._$AH) || (this._$AH = [], this._$AR());
|
|
422
422
|
const e = this._$AH;
|
|
423
|
-
let
|
|
424
|
-
for (const r of t)
|
|
425
|
-
|
|
423
|
+
let s, n = 0;
|
|
424
|
+
for (const r of t) n === e.length ? e.push(s = new Z(this.O(R()), this.O(R()), this, this.options)) : s = e[n], s._$AI(r), n++;
|
|
425
|
+
n < e.length && (this._$AR(s && s._$AB.nextSibling, n), e.length = n);
|
|
426
426
|
}
|
|
427
427
|
_$AR(t = this._$AA.nextSibling, e) {
|
|
428
|
-
var
|
|
429
|
-
for ((
|
|
430
|
-
const
|
|
431
|
-
t.remove(), t =
|
|
428
|
+
var s;
|
|
429
|
+
for ((s = this._$AP) == null ? void 0 : s.call(this, !1, !0, e); t && t !== this._$AB; ) {
|
|
430
|
+
const n = t.nextSibling;
|
|
431
|
+
t.remove(), t = n;
|
|
432
432
|
}
|
|
433
433
|
}
|
|
434
434
|
setConnected(t) {
|
|
@@ -436,32 +436,32 @@ class Z {
|
|
|
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
|
}
|
|
443
443
|
get _$AU() {
|
|
444
444
|
return this._$AM._$AU;
|
|
445
445
|
}
|
|
446
|
-
constructor(t, e,
|
|
447
|
-
this.type = 1, this._$AH = h, this._$AN = void 0, this.element = t, this.name = e, this._$AM =
|
|
446
|
+
constructor(t, e, s, n, r) {
|
|
447
|
+
this.type = 1, this._$AH = h, this._$AN = void 0, this.element = t, this.name = e, this._$AM = n, this.options = r, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = h;
|
|
448
448
|
}
|
|
449
|
-
_$AI(t, e = this,
|
|
449
|
+
_$AI(t, e = this, s, n) {
|
|
450
450
|
const r = this.strings;
|
|
451
451
|
let i = !1;
|
|
452
452
|
if (r === void 0) t = I(this, t, e, 0), i = !F(t) || t !== this._$AH && t !== O, i && (this._$AH = t);
|
|
453
453
|
else {
|
|
454
454
|
const c = t;
|
|
455
455
|
let a, f;
|
|
456
|
-
for (t = r[0], a = 0; a < r.length - 1; a++) f = I(this, c[
|
|
456
|
+
for (t = r[0], a = 0; a < r.length - 1; a++) f = I(this, c[s + a], e, a), f === O && (f = this._$AH[a]), i || (i = !F(f) || f !== this._$AH[a]), f === h ? t = h : t !== h && (t += (f ?? "") + r[a + 1]), this._$AH[a] = f;
|
|
457
457
|
}
|
|
458
|
-
i && !
|
|
458
|
+
i && !n && this.j(t);
|
|
459
459
|
}
|
|
460
460
|
j(t) {
|
|
461
461
|
t === h ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
|
-
class Ft extends
|
|
464
|
+
class Ft extends J {
|
|
465
465
|
constructor() {
|
|
466
466
|
super(...arguments), this.type = 3;
|
|
467
467
|
}
|
|
@@ -469,7 +469,7 @@ class Ft extends G {
|
|
|
469
469
|
this.element[this.name] = t === h ? void 0 : t;
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
|
-
class Vt extends
|
|
472
|
+
class Vt extends J {
|
|
473
473
|
constructor() {
|
|
474
474
|
super(...arguments), this.type = 4;
|
|
475
475
|
}
|
|
@@ -477,14 +477,14 @@ class Vt extends G {
|
|
|
477
477
|
this.element.toggleAttribute(this.name, !!t && t !== h);
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
|
-
class Zt extends
|
|
481
|
-
constructor(t, e,
|
|
482
|
-
super(t, e,
|
|
480
|
+
class Zt extends J {
|
|
481
|
+
constructor(t, e, s, n, r) {
|
|
482
|
+
super(t, e, s, n, r), this.type = 5;
|
|
483
483
|
}
|
|
484
484
|
_$AI(t, e = this) {
|
|
485
485
|
if ((t = I(this, t, e, 0) ?? h) === O) return;
|
|
486
|
-
const
|
|
487
|
-
|
|
486
|
+
const s = this._$AH, n = t === h && s !== h || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, r = t !== h && (s === h || n);
|
|
487
|
+
n && this.element.removeEventListener(this.name, this, s), r && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
488
488
|
}
|
|
489
489
|
handleEvent(t) {
|
|
490
490
|
var e;
|
|
@@ -492,8 +492,8 @@ class Zt extends G {
|
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
494
|
class qt {
|
|
495
|
-
constructor(t, e,
|
|
496
|
-
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options =
|
|
495
|
+
constructor(t, e, s) {
|
|
496
|
+
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
|
|
497
497
|
}
|
|
498
498
|
get _$AU() {
|
|
499
499
|
return this._$AM._$AU;
|
|
@@ -502,23 +502,23 @@ class qt {
|
|
|
502
502
|
I(this, t);
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
|
-
const
|
|
506
|
-
|
|
507
|
-
const Wt = (
|
|
508
|
-
const
|
|
509
|
-
let
|
|
510
|
-
if (
|
|
505
|
+
const st = j.litHtmlPolyfillSupport;
|
|
506
|
+
st == null || st(V, Z), (j.litHtmlVersions ?? (j.litHtmlVersions = [])).push("3.3.0");
|
|
507
|
+
const Wt = (o, t, e) => {
|
|
508
|
+
const s = (e == null ? void 0 : e.renderBefore) ?? t;
|
|
509
|
+
let n = s._$litPart$;
|
|
510
|
+
if (n === void 0) {
|
|
511
511
|
const r = (e == null ? void 0 : e.renderBefore) ?? null;
|
|
512
|
-
|
|
512
|
+
s._$litPart$ = n = new Z(t.insertBefore(R(), r), r, void 0, e ?? {});
|
|
513
513
|
}
|
|
514
|
-
return
|
|
514
|
+
return n._$AI(o), n;
|
|
515
515
|
};
|
|
516
516
|
/**
|
|
517
517
|
* @license
|
|
518
518
|
* Copyright 2017 Google LLC
|
|
519
519
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
520
520
|
*/
|
|
521
|
-
const
|
|
521
|
+
const k = globalThis;
|
|
522
522
|
let $ = class extends M {
|
|
523
523
|
constructor() {
|
|
524
524
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
@@ -545,58 +545,58 @@ let $ = class extends M {
|
|
|
545
545
|
}
|
|
546
546
|
};
|
|
547
547
|
var xt;
|
|
548
|
-
$._$litElement$ = !0, $.finalized = !0, (xt =
|
|
549
|
-
const
|
|
550
|
-
|
|
551
|
-
(
|
|
548
|
+
$._$litElement$ = !0, $.finalized = !0, (xt = k.litElementHydrateSupport) == null || xt.call(k, { LitElement: $ });
|
|
549
|
+
const nt = k.litElementPolyfillSupport;
|
|
550
|
+
nt == null || nt({ LitElement: $ });
|
|
551
|
+
(k.litElementVersions ?? (k.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 T = (
|
|
557
|
+
const T = (o) => (t, e) => {
|
|
558
558
|
e !== void 0 ? e.addInitializer(() => {
|
|
559
|
-
customElements.define(
|
|
560
|
-
}) : customElements.define(
|
|
559
|
+
customElements.define(o, t);
|
|
560
|
+
}) : customElements.define(o, t);
|
|
561
561
|
};
|
|
562
562
|
/**
|
|
563
563
|
* @license
|
|
564
564
|
* Copyright 2017 Google LLC
|
|
565
565
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
566
566
|
*/
|
|
567
|
-
const Kt = { attribute: !0, type: String, converter: K, reflect: !1, hasChanged: ct },
|
|
568
|
-
const { kind:
|
|
569
|
-
let r = globalThis.litPropertyMetadata.get(
|
|
570
|
-
if (r === void 0 && globalThis.litPropertyMetadata.set(
|
|
567
|
+
const Kt = { attribute: !0, type: String, converter: K, reflect: !1, hasChanged: ct }, Gt = (o = Kt, t, e) => {
|
|
568
|
+
const { kind: s, metadata: n } = e;
|
|
569
|
+
let r = globalThis.litPropertyMetadata.get(n);
|
|
570
|
+
if (r === void 0 && globalThis.litPropertyMetadata.set(n, r = /* @__PURE__ */ new Map()), s === "setter" && ((o = Object.create(o)).wrapped = !0), r.set(e.name, o), s === "accessor") {
|
|
571
571
|
const { name: i } = e;
|
|
572
572
|
return { set(c) {
|
|
573
573
|
const a = t.get.call(this);
|
|
574
|
-
t.set.call(this, c), this.requestUpdate(i, a,
|
|
574
|
+
t.set.call(this, c), this.requestUpdate(i, a, o);
|
|
575
575
|
}, init(c) {
|
|
576
|
-
return c !== void 0 && this.C(i, void 0,
|
|
576
|
+
return c !== void 0 && this.C(i, void 0, o, c), c;
|
|
577
577
|
} };
|
|
578
578
|
}
|
|
579
|
-
if (
|
|
579
|
+
if (s === "setter") {
|
|
580
580
|
const { name: i } = e;
|
|
581
581
|
return function(c) {
|
|
582
582
|
const a = this[i];
|
|
583
|
-
t.call(this, c), this.requestUpdate(i, a,
|
|
583
|
+
t.call(this, c), this.requestUpdate(i, a, o);
|
|
584
584
|
};
|
|
585
585
|
}
|
|
586
|
-
throw Error("Unsupported decorator location: " +
|
|
586
|
+
throw Error("Unsupported decorator location: " + s);
|
|
587
587
|
};
|
|
588
|
-
function l(
|
|
589
|
-
return (t, e) => typeof e == "object" ?
|
|
590
|
-
const i =
|
|
591
|
-
return
|
|
592
|
-
})(
|
|
588
|
+
function l(o) {
|
|
589
|
+
return (t, e) => typeof e == "object" ? Gt(o, t, e) : ((s, n, r) => {
|
|
590
|
+
const i = n.hasOwnProperty(r);
|
|
591
|
+
return n.constructor.createProperty(r, s), i ? Object.getOwnPropertyDescriptor(n, r) : void 0;
|
|
592
|
+
})(o, t, e);
|
|
593
593
|
}
|
|
594
|
-
const
|
|
594
|
+
const Xt = E`
|
|
595
595
|
outline: 1px dashed var(--button-border-color);
|
|
596
596
|
outline-offset: 2px;
|
|
597
597
|
outline: dashed black;
|
|
598
598
|
`;
|
|
599
|
-
|
|
599
|
+
E`
|
|
600
600
|
:host * {
|
|
601
601
|
box-sizing: border-box;
|
|
602
602
|
}
|
|
@@ -606,12 +606,12 @@ S`
|
|
|
606
606
|
* Copyright 2023 Google LLC
|
|
607
607
|
* SPDX-License-Identifier: Apache-2.0
|
|
608
608
|
*/
|
|
609
|
-
const dt = Symbol("internals"),
|
|
610
|
-
function
|
|
609
|
+
const dt = Symbol("internals"), ot = Symbol("privateInternals");
|
|
610
|
+
function Jt(o) {
|
|
611
611
|
var t;
|
|
612
|
-
class e extends
|
|
612
|
+
class e extends o {
|
|
613
613
|
get [(t = dt, t)]() {
|
|
614
|
-
return this[
|
|
614
|
+
return this[ot] || (this[ot] = this.attachInternals()), this[ot];
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
617
|
return e;
|
|
@@ -621,15 +621,15 @@ function Gt(n) {
|
|
|
621
621
|
* Copyright 2023 Google LLC
|
|
622
622
|
* SPDX-License-Identifier: Apache-2.0
|
|
623
623
|
*/
|
|
624
|
-
function Qt(
|
|
625
|
-
|
|
624
|
+
function Qt(o) {
|
|
625
|
+
o.addInitializer((t) => {
|
|
626
626
|
const e = t;
|
|
627
|
-
e.addEventListener("click", async (
|
|
628
|
-
const { type:
|
|
629
|
-
if (!(!i ||
|
|
627
|
+
e.addEventListener("click", async (s) => {
|
|
628
|
+
const { type: n, [dt]: r } = e, { form: i } = r;
|
|
629
|
+
if (!(!i || n === "button") && (await new Promise((c) => {
|
|
630
630
|
setTimeout(c);
|
|
631
|
-
}), !
|
|
632
|
-
if (
|
|
631
|
+
}), !s.defaultPrevented)) {
|
|
632
|
+
if (n === "reset") {
|
|
633
633
|
i.reset();
|
|
634
634
|
return;
|
|
635
635
|
}
|
|
@@ -653,15 +653,15 @@ function Qt(n) {
|
|
|
653
653
|
* Copyright 2017 Google LLC
|
|
654
654
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
655
655
|
*/
|
|
656
|
-
const Yt = { CHILD: 2 }, te = (
|
|
656
|
+
const Yt = { CHILD: 2 }, te = (o) => (...t) => ({ _$litDirective$: o, values: t });
|
|
657
657
|
class ee {
|
|
658
658
|
constructor(t) {
|
|
659
659
|
}
|
|
660
660
|
get _$AU() {
|
|
661
661
|
return this._$AM._$AU;
|
|
662
662
|
}
|
|
663
|
-
_$AT(t, e,
|
|
664
|
-
this._$Ct = t, this._$AM = e, this._$Ci =
|
|
663
|
+
_$AT(t, e, s) {
|
|
664
|
+
this._$Ct = t, this._$AM = e, this._$Ci = s;
|
|
665
665
|
}
|
|
666
666
|
_$AS(t, e) {
|
|
667
667
|
return this.update(t, e);
|
|
@@ -698,13 +698,13 @@ it.directiveName = "unsafeHTML", it.resultType = 1;
|
|
|
698
698
|
class rt extends it {
|
|
699
699
|
}
|
|
700
700
|
rt.directiveName = "unsafeSVG", rt.resultType = 2;
|
|
701
|
-
const
|
|
701
|
+
const X = te(rt), se = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
702
702
|
<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"/>
|
|
703
703
|
</svg>
|
|
704
|
-
`,
|
|
704
|
+
`, ne = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
705
705
|
<path d="M16 8L4 0V16L16 8Z" fill="#3F2B2E"/>
|
|
706
706
|
</svg>
|
|
707
|
-
`,
|
|
707
|
+
`, oe = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
708
708
|
<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"/>
|
|
709
709
|
</svg>
|
|
710
710
|
`, ie = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -732,11 +732,32 @@ const J = te(rt), oe = `<svg width="16" height="16" viewBox="0 0 16 16" fill="no
|
|
|
732
732
|
`, pe = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
733
733
|
<path d="M7.12506 1C10.5018 1 13.2509 3.74834 13.251 7.125C13.2511 8.59738 12.7172 10.0206 11.7491 11.1299L14.8731 14.2539C15.0433 14.4253 15.0435 14.7018 14.8731 14.873C14.7913 14.9555 14.6797 15.002 14.5635 15.002C14.4475 15.0019 14.3357 14.9554 14.254 14.873L11.1309 11.749C10.0555 12.6818 8.6564 13.251 7.12506 13.251C3.7484 13.2508 1.00006 10.5017 1.00006 7.125C1.00025 3.74846 3.74852 1.00019 7.12506 1ZM7.12506 1.875C4.22971 1.87522 1.87506 4.23058 1.87506 7.12598C1.87532 10.0212 4.22987 12.3758 7.12506 12.376C10.0204 12.376 12.3758 10.0213 12.376 7.12598C12.376 4.23044 10.0206 1.875 7.12506 1.875Z" fill="#3F2B2E"/>
|
|
734
734
|
</svg>
|
|
735
|
+
`, ue = `<?xml version="1.0" encoding="utf-8"?>
|
|
736
|
+
<!-- Generator: $$$/GeneralStr/196=Adobe Illustrator 27.6.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
737
|
+
<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
738
|
+
viewBox="0 0 40 40" style="enable-background:new 0 0 40 40;" xml:space="preserve">
|
|
739
|
+
<style type="text/css">
|
|
740
|
+
.st0{fill:#001022;}
|
|
741
|
+
</style>
|
|
742
|
+
<path class="st0" d="M27.3,19.3h-6.7v-6.7c0-0.4-0.3-0.7-0.7-0.7s-0.7,0.3-0.7,0.7v6.7h-6.7c-0.4,0-0.7,0.3-0.7,0.7s0.3,0.7,0.7,0.7
|
|
743
|
+
h6.7v6.7c0,0.4,0.3,0.7,0.7,0.7s0.7-0.3,0.7-0.7v-6.7h6.7c0.4,0,0.7-0.3,0.7-0.7S27.7,19.3,27.3,19.3z"/>
|
|
744
|
+
</svg>
|
|
745
|
+
`, fe = `<?xml version="1.0" encoding="utf-8"?>
|
|
746
|
+
<!-- Generator: $$$/GeneralStr/196=Adobe Illustrator 27.6.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
747
|
+
<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
748
|
+
viewBox="0 0 40 40" style="enable-background:new 0 0 40 40;" xml:space="preserve">
|
|
749
|
+
<style type="text/css">
|
|
750
|
+
.st0{fill:#001022;}
|
|
751
|
+
</style>
|
|
752
|
+
<path class="st0" d="M27.3,20.7H12.7c-0.4,0-0.7-0.3-0.7-0.7s0.3-0.7,0.7-0.7h14.7c0.4,0,0.7,0.3,0.7,0.7S27.7,20.7,27.3,20.7z"/>
|
|
753
|
+
</svg>
|
|
735
754
|
`, pt = {
|
|
736
|
-
wishlist:
|
|
737
|
-
playerv:
|
|
738
|
-
chevronRight:
|
|
755
|
+
wishlist: se,
|
|
756
|
+
playerv: ne,
|
|
757
|
+
chevronRight: oe,
|
|
739
758
|
chevronLeft: ie,
|
|
759
|
+
icoPlus: ue,
|
|
760
|
+
icoMinus: fe,
|
|
740
761
|
"star-0": re,
|
|
741
762
|
"star-25": ae,
|
|
742
763
|
"star-50": le,
|
|
@@ -745,27 +766,27 @@ const J = te(rt), oe = `<svg width="16" height="16" viewBox="0 0 16 16" fill="no
|
|
|
745
766
|
cross: de,
|
|
746
767
|
search: pe
|
|
747
768
|
};
|
|
748
|
-
var
|
|
749
|
-
for (var
|
|
750
|
-
(i =
|
|
751
|
-
return
|
|
769
|
+
var ge = Object.defineProperty, ve = Object.getOwnPropertyDescriptor, C = (o, t, e, s) => {
|
|
770
|
+
for (var n = s > 1 ? void 0 : s ? ve(t, e) : t, r = o.length - 1, i; r >= 0; r--)
|
|
771
|
+
(i = o[r]) && (n = (s ? i(t, e, n) : i(n)) || n);
|
|
772
|
+
return s && n && ge(t, e, n), n;
|
|
752
773
|
};
|
|
753
774
|
let m = class extends $ {
|
|
754
775
|
constructor() {
|
|
755
776
|
super(...arguments), this.bgstyle = "background-light", this.size = "medium", this.status = "empty", this.type = "button", this.strokewidth = "1", this.icon = "wishlist", this.disabled = !1;
|
|
756
777
|
}
|
|
757
|
-
updated(
|
|
758
|
-
super.updated(
|
|
778
|
+
updated(o) {
|
|
779
|
+
super.updated(o), this.style.setProperty("--icon-stroke-width", this.strokewidth);
|
|
759
780
|
}
|
|
760
781
|
render() {
|
|
761
|
-
const
|
|
782
|
+
const o = pt[this.icon] ?? "", t = `icon-${this.icon}`, e = o.replace(
|
|
762
783
|
"<svg",
|
|
763
784
|
'<svg aria-hidden="true" focusable="false" part="svg"'
|
|
764
785
|
);
|
|
765
786
|
return d`
|
|
766
787
|
${this.type === "span" ? d`
|
|
767
788
|
<span class="icon icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}" ?disabled="${this.disabled}">
|
|
768
|
-
${
|
|
789
|
+
${X(e)}
|
|
769
790
|
</span>
|
|
770
791
|
` : d`
|
|
771
792
|
<button
|
|
@@ -774,13 +795,13 @@ let m = class extends $ {
|
|
|
774
795
|
class="icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}"
|
|
775
796
|
?disabled="${this.disabled}"
|
|
776
797
|
>
|
|
777
|
-
${
|
|
798
|
+
${X(e)}
|
|
778
799
|
</button>
|
|
779
800
|
`}
|
|
780
801
|
`;
|
|
781
802
|
}
|
|
782
803
|
};
|
|
783
|
-
m.styles =
|
|
804
|
+
m.styles = E`
|
|
784
805
|
:host {
|
|
785
806
|
display: inline-flex;
|
|
786
807
|
justify-content: center;
|
|
@@ -962,21 +983,21 @@ C([
|
|
|
962
983
|
m = C([
|
|
963
984
|
T("o-icon-button")
|
|
964
985
|
], m);
|
|
965
|
-
var
|
|
966
|
-
for (var
|
|
967
|
-
(i =
|
|
968
|
-
return
|
|
986
|
+
var be = Object.defineProperty, ye = Object.getOwnPropertyDescriptor, v = (o, t, e, s) => {
|
|
987
|
+
for (var n = s > 1 ? void 0 : s ? ye(t, e) : t, r = o.length - 1, i; r >= 0; r--)
|
|
988
|
+
(i = o[r]) && (n = (s ? i(t, e, n) : i(n)) || n);
|
|
989
|
+
return s && n && be(t, e, n), n;
|
|
969
990
|
};
|
|
970
|
-
const
|
|
971
|
-
let u = class extends
|
|
991
|
+
const $e = Jt($);
|
|
992
|
+
let u = class extends $e {
|
|
972
993
|
constructor() {
|
|
973
994
|
super(...arguments), this.type = "submit", this.value = "", this.variant = "primary", this.text = "", this.textsecond = "", this.fullwidth = !1, this.disabled = !1, this.iconstrokewidth = "1", this.startIcon = !1, this.endIcon = !1, this.iconSize = "small", this.icon = "", this.href = "", this.target = "";
|
|
974
995
|
}
|
|
975
996
|
get name() {
|
|
976
997
|
return this.getAttribute("name") ?? "";
|
|
977
998
|
}
|
|
978
|
-
set name(
|
|
979
|
-
this.setAttribute("name",
|
|
999
|
+
set name(o) {
|
|
1000
|
+
this.setAttribute("name", o);
|
|
980
1001
|
}
|
|
981
1002
|
get form() {
|
|
982
1003
|
return this[dt].form;
|
|
@@ -984,9 +1005,9 @@ let u = class extends be {
|
|
|
984
1005
|
render() {
|
|
985
1006
|
return this.href ? this.renderLink() : this.renderButton();
|
|
986
1007
|
}
|
|
987
|
-
renderIcon(
|
|
1008
|
+
renderIcon(o) {
|
|
988
1009
|
return this.icon ? d`<o-icon-button
|
|
989
|
-
class=${
|
|
1010
|
+
class=${o === "start" ? "icon-start" : "icon-end"}
|
|
990
1011
|
icon=${this.icon}
|
|
991
1012
|
bgstyle="${this.variant === "primary" ? "none-light" : "none-contrast"}"
|
|
992
1013
|
size="${this.iconSize}"
|
|
@@ -997,11 +1018,11 @@ let u = class extends be {
|
|
|
997
1018
|
></o-icon-button>` : h;
|
|
998
1019
|
}
|
|
999
1020
|
renderButton() {
|
|
1000
|
-
const
|
|
1021
|
+
const o = this.text || this.textsecond;
|
|
1001
1022
|
return d`
|
|
1002
1023
|
<button class="button" ?disabled=${this.disabled}>
|
|
1003
1024
|
${this.startIcon ? this.renderIcon("start") : h}
|
|
1004
|
-
${
|
|
1025
|
+
${o ? d`
|
|
1005
1026
|
${this.text ? d`<span>${this.text}</span>` : h}
|
|
1006
1027
|
${this.textsecond ? d`<span>${this.textsecond}</span>` : h}
|
|
1007
1028
|
` : d`<slot></slot>`}
|
|
@@ -1010,7 +1031,7 @@ let u = class extends be {
|
|
|
1010
1031
|
`;
|
|
1011
1032
|
}
|
|
1012
1033
|
renderLink() {
|
|
1013
|
-
const
|
|
1034
|
+
const o = this.text || this.textsecond;
|
|
1014
1035
|
return d`
|
|
1015
1036
|
<a
|
|
1016
1037
|
href=${this.href}
|
|
@@ -1019,7 +1040,7 @@ let u = class extends be {
|
|
|
1019
1040
|
?disabled=${this.disabled}
|
|
1020
1041
|
>
|
|
1021
1042
|
${this.startIcon ? this.renderIcon("start") : h}
|
|
1022
|
-
${
|
|
1043
|
+
${o ? d`
|
|
1023
1044
|
${this.text ? d`<span>${this.text}</span>` : h}
|
|
1024
1045
|
${this.textsecond ? d`<span>${this.textsecond}</span>` : h}
|
|
1025
1046
|
` : d`<slot></slot>`}
|
|
@@ -1030,7 +1051,7 @@ let u = class extends be {
|
|
|
1030
1051
|
};
|
|
1031
1052
|
Qt(u);
|
|
1032
1053
|
u.formAssociated = !0;
|
|
1033
|
-
u.styles =
|
|
1054
|
+
u.styles = E`
|
|
1034
1055
|
:host {
|
|
1035
1056
|
--button-border: transparent;
|
|
1036
1057
|
cursor: pointer;
|
|
@@ -1127,7 +1148,7 @@ u.styles = S`
|
|
|
1127
1148
|
}
|
|
1128
1149
|
|
|
1129
1150
|
.button:focus-visible {
|
|
1130
|
-
${
|
|
1151
|
+
${Xt};
|
|
1131
1152
|
}
|
|
1132
1153
|
|
|
1133
1154
|
span + span::before {
|
|
@@ -1205,93 +1226,90 @@ v([
|
|
|
1205
1226
|
u = v([
|
|
1206
1227
|
T("o-button")
|
|
1207
1228
|
], u);
|
|
1208
|
-
var
|
|
1209
|
-
for (var
|
|
1210
|
-
(i =
|
|
1211
|
-
return
|
|
1229
|
+
var me = Object.defineProperty, we = Object.getOwnPropertyDescriptor, Q = (o, t, e, s) => {
|
|
1230
|
+
for (var n = s > 1 ? void 0 : s ? we(t, e) : t, r = o.length - 1, i; r >= 0; r--)
|
|
1231
|
+
(i = o[r]) && (n = (s ? i(t, e, n) : i(n)) || n);
|
|
1232
|
+
return s && n && me(t, e, n), n;
|
|
1212
1233
|
};
|
|
1213
|
-
let
|
|
1234
|
+
let z = class extends $ {
|
|
1214
1235
|
constructor() {
|
|
1215
|
-
super(...arguments), this.status = "empty", this.ariaDescribedBy = "a-product-name", this.label = "Add to wishlist"
|
|
1236
|
+
super(...arguments), this.status = "empty", this.ariaDescribedBy = "a-product-name", this.label = "Add to wishlist", this.toggleStatus = () => {
|
|
1237
|
+
this.status = this.status === "empty" ? "filled" : "empty", this.setAttribute("aria-pressed", String(this.status === "filled")), this.dispatchEvent(new CustomEvent("wishlist-toggle", {
|
|
1238
|
+
detail: { status: this.status },
|
|
1239
|
+
bubbles: !0,
|
|
1240
|
+
composed: !0
|
|
1241
|
+
}));
|
|
1242
|
+
};
|
|
1243
|
+
}
|
|
1244
|
+
connectedCallback() {
|
|
1245
|
+
super.connectedCallback(), this.setAttribute("tabindex", "0"), this.setAttribute("role", "button"), this.setAttribute("aria-pressed", String(this.status === "filled"));
|
|
1246
|
+
}
|
|
1247
|
+
firstUpdated() {
|
|
1248
|
+
this.addEventListener("click", this.toggleStatus), this.addEventListener("keydown", this.handleKeydown);
|
|
1249
|
+
}
|
|
1250
|
+
handleKeydown(o) {
|
|
1251
|
+
(o.key === "Enter" || o.key === " ") && (o.preventDefault(), this.toggleStatus());
|
|
1216
1252
|
}
|
|
1217
1253
|
render() {
|
|
1218
|
-
const
|
|
1254
|
+
const o = pt.wishlist.replace(
|
|
1219
1255
|
"<svg",
|
|
1220
1256
|
'<svg aria-hidden="true" focusable="false" part="svg"'
|
|
1221
1257
|
);
|
|
1222
1258
|
return d`
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
}
|
|
1234
|
-
handleClick(n) {
|
|
1235
|
-
this.toggleStatus(), this.dispatchEvent(new MouseEvent("click", {
|
|
1236
|
-
bubbles: !0,
|
|
1237
|
-
composed: !0
|
|
1238
|
-
}));
|
|
1239
|
-
}
|
|
1240
|
-
toggleStatus() {
|
|
1241
|
-
this.status = this.status == "empty" ? "filled" : "empty";
|
|
1259
|
+
<button
|
|
1260
|
+
type="button"
|
|
1261
|
+
aria-describedby="${this.ariaDescribedBy}"
|
|
1262
|
+
class="wishlist-button"
|
|
1263
|
+
tabindex="-1"
|
|
1264
|
+
>
|
|
1265
|
+
<span class="sr-only">${this.label}</span>
|
|
1266
|
+
${X(o)}
|
|
1267
|
+
</button>
|
|
1268
|
+
`;
|
|
1242
1269
|
}
|
|
1243
|
-
setStatus(
|
|
1244
|
-
this.status =
|
|
1270
|
+
setStatus(o) {
|
|
1271
|
+
this.status = o, this.setAttribute("aria-pressed", String(this.status === "filled")), this.requestUpdate();
|
|
1245
1272
|
}
|
|
1246
|
-
setAriaDescribedBy(
|
|
1247
|
-
this.ariaDescribedBy =
|
|
1273
|
+
setAriaDescribedBy(o) {
|
|
1274
|
+
this.ariaDescribedBy = o, this.requestUpdate();
|
|
1248
1275
|
}
|
|
1249
|
-
setLabel(
|
|
1250
|
-
this.label =
|
|
1276
|
+
setLabel(o) {
|
|
1277
|
+
this.label = o, this.requestUpdate();
|
|
1251
1278
|
}
|
|
1252
1279
|
};
|
|
1253
|
-
|
|
1254
|
-
|
|
1280
|
+
z.styles = E`
|
|
1281
|
+
:host {
|
|
1255
1282
|
display: inline-flex;
|
|
1256
1283
|
justify-content: center;
|
|
1257
1284
|
align-items: center;
|
|
1258
|
-
|
|
1259
|
-
|
|
1285
|
+
outline: none;
|
|
1286
|
+
}
|
|
1260
1287
|
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
width: 40px;
|
|
1266
|
-
height: 40px;
|
|
1267
|
-
border: transparent;
|
|
1268
|
-
border-radius: var(--radius-full);
|
|
1269
|
-
background-color: var(--color-alpha-light-strong);
|
|
1270
|
-
position: relative;
|
|
1271
|
-
cursor: pointer;
|
|
1272
|
-
}
|
|
1288
|
+
:host(:focus-visible) {
|
|
1289
|
+
outline: 1px dashed var(--color-content-action-secondary);
|
|
1290
|
+
outline-offset: 1px;
|
|
1291
|
+
}
|
|
1273
1292
|
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
-
|
|
1278
|
-
|
|
1279
|
-
height:
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
position:
|
|
1284
|
-
|
|
1285
|
-
white-space: nowrap !important;
|
|
1293
|
+
.wishlist-button {
|
|
1294
|
+
display: flex;
|
|
1295
|
+
justify-content: center;
|
|
1296
|
+
align-items: center;
|
|
1297
|
+
width: 40px;
|
|
1298
|
+
height: 40px;
|
|
1299
|
+
border: transparent;
|
|
1300
|
+
border-radius: var(--radius-full);
|
|
1301
|
+
background-color: var(--color-alpha-light-strong);
|
|
1302
|
+
position: relative;
|
|
1303
|
+
cursor: pointer;
|
|
1286
1304
|
}
|
|
1287
1305
|
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1306
|
+
.wishlist-button:hover {
|
|
1307
|
+
background-color: var(--color-alpha-light-stronger);
|
|
1308
|
+
}
|
|
1291
1309
|
|
|
1292
1310
|
:host([status="filled"]) .wishlist-button {
|
|
1293
|
-
|
|
1294
|
-
|
|
1311
|
+
background-color: var(--color-alpha-light-strongest);
|
|
1312
|
+
}
|
|
1295
1313
|
|
|
1296
1314
|
.wishlist-button:hover svg path {
|
|
1297
1315
|
fill: var(--color-content-action-secondary);
|
|
@@ -1304,23 +1322,37 @@ U.styles = S`
|
|
|
1304
1322
|
:host([status="filled"]) .wishlist-button:hover svg path {
|
|
1305
1323
|
fill: var(--color-alpha-light-strong);
|
|
1306
1324
|
}
|
|
1307
|
-
|
|
1325
|
+
|
|
1326
|
+
.sr-only {
|
|
1327
|
+
border: 0 !important;
|
|
1328
|
+
clip: rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;
|
|
1329
|
+
-webkit-clip-path: inset(50%) !important;
|
|
1330
|
+
clip-path: inset(50%) !important;
|
|
1331
|
+
height: 0.1rem !important;
|
|
1332
|
+
margin: -0.1rem !important;
|
|
1333
|
+
overflow: hidden !important;
|
|
1334
|
+
padding: 0 !important;
|
|
1335
|
+
position: absolute !important;
|
|
1336
|
+
width: 0.1rem !important;
|
|
1337
|
+
white-space: nowrap !important;
|
|
1338
|
+
}
|
|
1339
|
+
`;
|
|
1308
1340
|
Q([
|
|
1309
1341
|
l({ type: String, reflect: !0 })
|
|
1310
|
-
],
|
|
1342
|
+
], z.prototype, "status", 2);
|
|
1311
1343
|
Q([
|
|
1312
1344
|
l({ type: String, reflect: !0 })
|
|
1313
|
-
],
|
|
1345
|
+
], z.prototype, "ariaDescribedBy", 2);
|
|
1314
1346
|
Q([
|
|
1315
1347
|
l({ type: String, reflect: !0 })
|
|
1316
|
-
],
|
|
1317
|
-
|
|
1348
|
+
], z.prototype, "label", 2);
|
|
1349
|
+
z = Q([
|
|
1318
1350
|
T("o-wishlist-button")
|
|
1319
|
-
],
|
|
1320
|
-
var
|
|
1321
|
-
for (var
|
|
1322
|
-
(i =
|
|
1323
|
-
return
|
|
1351
|
+
], z);
|
|
1352
|
+
var _e = Object.defineProperty, xe = Object.getOwnPropertyDescriptor, H = (o, t, e, s) => {
|
|
1353
|
+
for (var n = s > 1 ? void 0 : s ? xe(t, e) : t, r = o.length - 1, i; r >= 0; r--)
|
|
1354
|
+
(i = o[r]) && (n = (s ? i(t, e, n) : i(n)) || n);
|
|
1355
|
+
return s && n && _e(t, e, n), n;
|
|
1324
1356
|
};
|
|
1325
1357
|
let _ = class extends $ {
|
|
1326
1358
|
constructor() {
|
|
@@ -1352,7 +1384,7 @@ let _ = class extends $ {
|
|
|
1352
1384
|
`;
|
|
1353
1385
|
}
|
|
1354
1386
|
};
|
|
1355
|
-
_.styles =
|
|
1387
|
+
_.styles = E`
|
|
1356
1388
|
:host([template="standard"]) a {
|
|
1357
1389
|
color: var(--color-content-action-secondary);
|
|
1358
1390
|
font-size: var(--font-size-200);
|
|
@@ -1461,31 +1493,31 @@ H([
|
|
|
1461
1493
|
_ = H([
|
|
1462
1494
|
T("o-link")
|
|
1463
1495
|
], _);
|
|
1464
|
-
var
|
|
1465
|
-
for (var
|
|
1466
|
-
(i =
|
|
1467
|
-
return
|
|
1496
|
+
var Ae = Object.defineProperty, Se = Object.getOwnPropertyDescriptor, Y = (o, t, e, s) => {
|
|
1497
|
+
for (var n = s > 1 ? void 0 : s ? Se(t, e) : t, r = o.length - 1, i; r >= 0; r--)
|
|
1498
|
+
(i = o[r]) && (n = (s ? i(t, e, n) : i(n)) || n);
|
|
1499
|
+
return s && n && Ae(t, e, n), n;
|
|
1468
1500
|
};
|
|
1469
|
-
let
|
|
1501
|
+
let U = class extends $ {
|
|
1470
1502
|
constructor() {
|
|
1471
1503
|
super(...arguments), this.rating = 0;
|
|
1472
1504
|
}
|
|
1473
1505
|
getStarKeys() {
|
|
1474
|
-
const
|
|
1506
|
+
const o = [];
|
|
1475
1507
|
for (let t = 0; t < 5; t++) {
|
|
1476
1508
|
const e = this.rating - t;
|
|
1477
|
-
let
|
|
1478
|
-
e >= 1 ?
|
|
1509
|
+
let s;
|
|
1510
|
+
e >= 1 ? s = 100 : e <= 0 ? s = 0 : s = Math.round(e * 100 / 25) * 25, o.push(`star-${s}`);
|
|
1479
1511
|
}
|
|
1480
|
-
return
|
|
1512
|
+
return o;
|
|
1481
1513
|
}
|
|
1482
1514
|
render() {
|
|
1483
|
-
const
|
|
1515
|
+
const o = this.getStarKeys();
|
|
1484
1516
|
return d`
|
|
1485
1517
|
<div class="rating">
|
|
1486
1518
|
<div class="stars">
|
|
1487
|
-
${
|
|
1488
|
-
(t) => d`<span class="star">${
|
|
1519
|
+
${o.map(
|
|
1520
|
+
(t) => d`<span class="star">${X(pt[t] ?? "")}</span>`
|
|
1489
1521
|
)}
|
|
1490
1522
|
</div>
|
|
1491
1523
|
${this.reviewCount != null && this.href != null ? d`<o-link template="review" href="${this.href}">${this.reviewCount}</o-link>` : null}
|
|
@@ -1493,7 +1525,7 @@ let z = class extends $ {
|
|
|
1493
1525
|
`;
|
|
1494
1526
|
}
|
|
1495
1527
|
};
|
|
1496
|
-
|
|
1528
|
+
U.styles = E`
|
|
1497
1529
|
svg {
|
|
1498
1530
|
width: 12px;
|
|
1499
1531
|
height: 12px;
|
|
@@ -1529,25 +1561,25 @@ z.styles = S`
|
|
|
1529
1561
|
`;
|
|
1530
1562
|
Y([
|
|
1531
1563
|
l({ type: Number })
|
|
1532
|
-
],
|
|
1564
|
+
], U.prototype, "rating", 2);
|
|
1533
1565
|
Y([
|
|
1534
1566
|
l({ type: String })
|
|
1535
|
-
],
|
|
1567
|
+
], U.prototype, "reviewCount", 2);
|
|
1536
1568
|
Y([
|
|
1537
1569
|
l({ type: String })
|
|
1538
|
-
],
|
|
1539
|
-
|
|
1570
|
+
], U.prototype, "href", 2);
|
|
1571
|
+
U = Y([
|
|
1540
1572
|
T("o-rating")
|
|
1541
|
-
],
|
|
1542
|
-
var
|
|
1543
|
-
for (var
|
|
1544
|
-
(i =
|
|
1545
|
-
return
|
|
1573
|
+
], U);
|
|
1574
|
+
var Ee = Object.defineProperty, Ce = Object.getOwnPropertyDescriptor, y = (o, t, e, s) => {
|
|
1575
|
+
for (var n = s > 1 ? void 0 : s ? Ce(t, e) : t, r = o.length - 1, i; r >= 0; r--)
|
|
1576
|
+
(i = o[r]) && (n = (s ? i(t, e, n) : i(n)) || n);
|
|
1577
|
+
return s && n && Ee(t, e, n), n;
|
|
1546
1578
|
};
|
|
1547
1579
|
let b = class extends $ {
|
|
1548
1580
|
constructor() {
|
|
1549
|
-
super(...arguments), this.open = !1, this.showHeader = !0, this.showFooter = !0, this.headerTitle = "", this.closeButtonLabel = "Close the modal", this.firstButtonLabel = "First Button", this.firstButtonVariant = "primary", this.secondaryButtonLabel = "Second Button", this.secondaryButtonVariant = "primary", this.previousFocusedElement = null, this.handleKeyDown = (
|
|
1550
|
-
this.open && (
|
|
1581
|
+
super(...arguments), this.open = !1, this.showHeader = !0, this.showFooter = !0, this.headerTitle = "", this.closeButtonLabel = "Close the modal", this.firstButtonLabel = "First Button", this.firstButtonVariant = "primary", this.secondaryButtonLabel = "Second Button", this.secondaryButtonVariant = "primary", this.previousFocusedElement = null, this.handleKeyDown = (o) => {
|
|
1582
|
+
this.open && (o.key === "Escape" ? this.closePanel() : o.key === "Tab" && this.trapFocus(o));
|
|
1551
1583
|
};
|
|
1552
1584
|
}
|
|
1553
1585
|
connectedCallback() {
|
|
@@ -1556,29 +1588,29 @@ let b = class extends $ {
|
|
|
1556
1588
|
disconnectedCallback() {
|
|
1557
1589
|
window.removeEventListener("keydown", this.handleKeyDown), super.disconnectedCallback();
|
|
1558
1590
|
}
|
|
1559
|
-
trapFocus(
|
|
1591
|
+
trapFocus(o) {
|
|
1560
1592
|
const t = this.getFocusableElements();
|
|
1561
1593
|
if (t.length === 0) return;
|
|
1562
|
-
const e = t[0],
|
|
1563
|
-
|
|
1594
|
+
const e = t[0], s = t[t.length - 1];
|
|
1595
|
+
o.shiftKey && document.activeElement === e ? (o.preventDefault(), s.focus()) : !o.shiftKey && document.activeElement === s && (o.preventDefault(), e.focus());
|
|
1564
1596
|
}
|
|
1565
1597
|
getFocusableElements() {
|
|
1566
|
-
const
|
|
1567
|
-
return
|
|
1568
|
-
|
|
1598
|
+
const o = this.renderRoot.querySelector(".panel");
|
|
1599
|
+
return o ? Array.from(
|
|
1600
|
+
o.querySelectorAll(
|
|
1569
1601
|
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
1570
1602
|
)
|
|
1571
1603
|
).filter((t) => !t.hasAttribute("disabled")) : [];
|
|
1572
1604
|
}
|
|
1573
1605
|
openPanel() {
|
|
1574
1606
|
this.previousFocusedElement = document.activeElement, this.open = !0, this.updateComplete.then(() => {
|
|
1575
|
-
const
|
|
1576
|
-
|
|
1607
|
+
const o = this.getFocusableElements()[0];
|
|
1608
|
+
o == null || o.focus();
|
|
1577
1609
|
});
|
|
1578
1610
|
}
|
|
1579
1611
|
closePanel() {
|
|
1580
|
-
var
|
|
1581
|
-
this.open = !1, (
|
|
1612
|
+
var o;
|
|
1613
|
+
this.open = !1, (o = this.previousFocusedElement) == null || o.focus(), this.dispatchEvent(
|
|
1582
1614
|
new CustomEvent("close", { bubbles: !0, composed: !0 })
|
|
1583
1615
|
);
|
|
1584
1616
|
}
|
|
@@ -1636,7 +1668,7 @@ let b = class extends $ {
|
|
|
1636
1668
|
`;
|
|
1637
1669
|
}
|
|
1638
1670
|
};
|
|
1639
|
-
b.styles =
|
|
1671
|
+
b.styles = E`
|
|
1640
1672
|
:host {
|
|
1641
1673
|
position: fixed;
|
|
1642
1674
|
top: 0;
|