@florid-kit/components 0.2.1 → 0.3.0

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/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 R = globalThis, q = R.ShadowRoot && (R.ShadyCSS === void 0 || R.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, F = Symbol(), Q = /* @__PURE__ */ new WeakMap();
7
- let lt = class {
6
+ const I = globalThis, Q = I.ShadowRoot && (I.ShadyCSS === void 0 || I.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, X = Symbol(), rt = /* @__PURE__ */ new WeakMap();
7
+ let gt = class {
8
8
  constructor(t, e, s) {
9
- if (this._$cssResult$ = !0, s !== F) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
9
+ if (this._$cssResult$ = !0, s !== X) 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 (q && t === void 0) {
15
+ if (Q && t === void 0) {
16
16
  const s = e !== void 0 && e.length === 1;
17
- s && (t = Q.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && Q.set(e, t));
17
+ s && (t = rt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && rt.set(e, t));
18
18
  }
19
19
  return t;
20
20
  }
@@ -22,33 +22,33 @@ let lt = class {
22
22
  return this.cssText;
23
23
  }
24
24
  };
25
- const ct = (i) => new lt(typeof i == "string" ? i : i + "", void 0, F), J = (i, ...t) => {
26
- const e = i.length === 1 ? i[0] : t.reduce((s, r, o) => s + ((n) => {
27
- if (n._$cssResult$ === !0) return n.cssText;
28
- if (typeof n == "number") return n;
29
- throw Error("Value passed to 'css' function must be a 'css' function result: " + n + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
30
- })(r) + i[o + 1], i[0]);
31
- return new lt(e, i, F);
32
- }, ft = (i, t) => {
33
- if (q) i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
25
+ const ft = (i) => new gt(typeof i == "string" ? i : i + "", void 0, X), R = (i, ...t) => {
26
+ const e = i.length === 1 ? i[0] : t.reduce((s, r, n) => s + ((o) => {
27
+ if (o._$cssResult$ === !0) return o.cssText;
28
+ if (typeof o == "number") return o;
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
+ })(r) + i[n + 1], i[0]);
31
+ return new gt(e, i, X);
32
+ }, St = (i, t) => {
33
+ if (Q) 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 = R.litNonce;
35
+ const s = document.createElement("style"), r = I.litNonce;
36
36
  r !== void 0 && s.setAttribute("nonce", r), s.textContent = e.cssText, i.appendChild(s);
37
37
  }
38
- }, X = q ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
38
+ }, it = Q ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
39
39
  let e = "";
40
40
  for (const s of t.cssRules) e += s.cssText;
41
- return ct(e);
41
+ return ft(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: bt, defineProperty: _t, getOwnPropertyDescriptor: mt, getOwnPropertyNames: gt, getOwnPropertySymbols: vt, getPrototypeOf: yt } = Object, _ = globalThis, Y = _.trustedTypes, At = Y ? Y.emptyScript : "", L = _.reactiveElementPolyfillSupport, P = (i, t) => i, k = { toAttribute(i, t) {
48
+ const { is: xt, defineProperty: Et, getOwnPropertyDescriptor: Pt, getOwnPropertyNames: Ct, getOwnPropertySymbols: Ot, getPrototypeOf: Ut } = Object, v = globalThis, ot = v.trustedTypes, Tt = ot ? ot.emptyScript : "", W = v.reactiveElementPolyfillSupport, U = (i, t) => i, L = { toAttribute(i, t) {
49
49
  switch (t) {
50
50
  case Boolean:
51
- i = i ? At : null;
51
+ i = i ? Tt : null;
52
52
  break;
53
53
  case Object:
54
54
  case Array:
@@ -73,46 +73,46 @@ const { is: bt, defineProperty: _t, getOwnPropertyDescriptor: mt, getOwnProperty
73
73
  }
74
74
  }
75
75
  return e;
76
- } }, K = (i, t) => !bt(i, t), tt = { attribute: !0, type: String, converter: k, reflect: !1, hasChanged: K };
77
- Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), _.litPropertyMetadata ?? (_.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
78
- class A extends HTMLElement {
76
+ } }, Y = (i, t) => !xt(i, t), nt = { attribute: !0, type: String, converter: L, reflect: !1, hasChanged: Y };
77
+ Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), v.litPropertyMetadata ?? (v.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
78
+ class E 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 = tt) {
85
+ static createProperty(t, e = nt) {
86
86
  if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
87
87
  const s = Symbol(), r = this.getPropertyDescriptor(t, s, e);
88
- r !== void 0 && _t(this.prototype, t, r);
88
+ r !== void 0 && Et(this.prototype, t, r);
89
89
  }
90
90
  }
91
91
  static getPropertyDescriptor(t, e, s) {
92
- const { get: r, set: o } = mt(this.prototype, t) ?? { get() {
92
+ const { get: r, set: n } = Pt(this.prototype, t) ?? { get() {
93
93
  return this[e];
94
- }, set(n) {
95
- this[e] = n;
94
+ }, set(o) {
95
+ this[e] = o;
96
96
  } };
97
97
  return { get() {
98
98
  return r == null ? void 0 : r.call(this);
99
- }, set(n) {
100
- const h = r == null ? void 0 : r.call(this);
101
- o.call(this, n), this.requestUpdate(t, h, s);
99
+ }, set(o) {
100
+ const l = r == null ? void 0 : r.call(this);
101
+ n.call(this, o), this.requestUpdate(t, l, s);
102
102
  }, configurable: !0, enumerable: !0 };
103
103
  }
104
104
  static getPropertyOptions(t) {
105
- return this.elementProperties.get(t) ?? tt;
105
+ return this.elementProperties.get(t) ?? nt;
106
106
  }
107
107
  static _$Ei() {
108
- if (this.hasOwnProperty(P("elementProperties"))) return;
109
- const t = yt(this);
108
+ if (this.hasOwnProperty(U("elementProperties"))) return;
109
+ const t = Ut(this);
110
110
  t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
111
111
  }
112
112
  static finalize() {
113
- if (this.hasOwnProperty(P("finalized"))) return;
114
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(P("properties"))) {
115
- const e = this.properties, s = [...gt(e), ...vt(e)];
113
+ if (this.hasOwnProperty(U("finalized"))) return;
114
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(U("properties"))) {
115
+ const e = this.properties, s = [...Ct(e), ...Ot(e)];
116
116
  for (const r of s) this.createProperty(r, e[r]);
117
117
  }
118
118
  const t = this[Symbol.metadata];
@@ -131,8 +131,8 @@ class A extends HTMLElement {
131
131
  const e = [];
132
132
  if (Array.isArray(t)) {
133
133
  const s = new Set(t.flat(1 / 0).reverse());
134
- for (const r of s) e.unshift(X(r));
135
- } else t !== void 0 && e.push(X(t));
134
+ for (const r of s) e.unshift(it(r));
135
+ } else t !== void 0 && e.push(it(t));
136
136
  return e;
137
137
  }
138
138
  static _$Eu(t, e) {
@@ -161,7 +161,7 @@ class A extends HTMLElement {
161
161
  }
162
162
  createRenderRoot() {
163
163
  const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
164
- return ft(t, this.constructor.elementStyles), t;
164
+ return St(t, this.constructor.elementStyles), t;
165
165
  }
166
166
  connectedCallback() {
167
167
  var t;
@@ -183,24 +183,24 @@ class A extends HTMLElement {
183
183
  this._$AK(t, s);
184
184
  }
185
185
  _$EC(t, e) {
186
- var o;
186
+ var n;
187
187
  const s = this.constructor.elementProperties.get(t), r = this.constructor._$Eu(t, s);
188
188
  if (r !== void 0 && s.reflect === !0) {
189
- const n = (((o = s.converter) == null ? void 0 : o.toAttribute) !== void 0 ? s.converter : k).toAttribute(e, s.type);
190
- this._$Em = t, n == null ? this.removeAttribute(r) : this.setAttribute(r, n), this._$Em = null;
189
+ const o = (((n = s.converter) == null ? void 0 : n.toAttribute) !== void 0 ? s.converter : L).toAttribute(e, s.type);
190
+ this._$Em = t, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$Em = null;
191
191
  }
192
192
  }
193
193
  _$AK(t, e) {
194
- var o;
194
+ var n;
195
195
  const s = this.constructor, r = s._$Eh.get(t);
196
196
  if (r !== void 0 && this._$Em !== r) {
197
- const n = s.getPropertyOptions(r), h = typeof n.converter == "function" ? { fromAttribute: n.converter } : ((o = n.converter) == null ? void 0 : o.fromAttribute) !== void 0 ? n.converter : k;
198
- this._$Em = r, this[r] = h.fromAttribute(e, n.type), this._$Em = null;
197
+ const o = s.getPropertyOptions(r), l = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((n = o.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? o.converter : L;
198
+ this._$Em = r, this[r] = l.fromAttribute(e, o.type), this._$Em = null;
199
199
  }
200
200
  }
201
201
  requestUpdate(t, e, s) {
202
202
  if (t !== void 0) {
203
- if (s ?? (s = this.constructor.getPropertyOptions(t)), !(s.hasChanged ?? K)(this[t], e)) return;
203
+ if (s ?? (s = this.constructor.getPropertyOptions(t)), !(s.hasChanged ?? Y)(this[t], e)) return;
204
204
  this.P(t, e, s);
205
205
  }
206
206
  this.isUpdatePending === !1 && (this._$ES = this._$ET());
@@ -226,18 +226,18 @@ class A extends HTMLElement {
226
226
  if (!this.isUpdatePending) return;
227
227
  if (!this.hasUpdated) {
228
228
  if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
229
- for (const [o, n] of this._$Ep) this[o] = n;
229
+ for (const [n, o] of this._$Ep) this[n] = o;
230
230
  this._$Ep = void 0;
231
231
  }
232
232
  const r = this.constructor.elementProperties;
233
- if (r.size > 0) for (const [o, n] of r) n.wrapped !== !0 || this._$AL.has(o) || this[o] === void 0 || this.P(o, this[o], n);
233
+ if (r.size > 0) for (const [n, o] of r) o.wrapped !== !0 || this._$AL.has(n) || this[n] === void 0 || this.P(n, this[n], o);
234
234
  }
235
235
  let t = !1;
236
236
  const e = this._$AL;
237
237
  try {
238
238
  t = this.shouldUpdate(e), t ? (this.willUpdate(e), (s = this._$EO) == null || s.forEach((r) => {
239
- var o;
240
- return (o = r.hostUpdate) == null ? void 0 : o.call(r);
239
+ var n;
240
+ return (n = r.hostUpdate) == null ? void 0 : n.call(r);
241
241
  }), this.update(e)) : this._$EU();
242
242
  } catch (r) {
243
243
  throw t = !1, this._$EU(), r;
@@ -273,76 +273,76 @@ class A extends HTMLElement {
273
273
  firstUpdated(t) {
274
274
  }
275
275
  }
276
- A.elementStyles = [], A.shadowRootOptions = { mode: "open" }, A[P("elementProperties")] = /* @__PURE__ */ new Map(), A[P("finalized")] = /* @__PURE__ */ new Map(), L == null || L({ ReactiveElement: A }), (_.reactiveElementVersions ?? (_.reactiveElementVersions = [])).push("2.0.4");
276
+ E.elementStyles = [], E.shadowRootOptions = { mode: "open" }, E[U("elementProperties")] = /* @__PURE__ */ new Map(), E[U("finalized")] = /* @__PURE__ */ new Map(), W == null || W({ ReactiveElement: E }), (v.reactiveElementVersions ?? (v.reactiveElementVersions = [])).push("2.0.4");
277
277
  /**
278
278
  * @license
279
279
  * Copyright 2017 Google LLC
280
280
  * SPDX-License-Identifier: BSD-3-Clause
281
281
  */
282
- const C = globalThis, z = C.trustedTypes, et = z ? z.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, dt = "$lit$", b = `lit$${Math.random().toFixed(9).slice(2)}$`, ut = "?" + b, Et = `<${ut}>`, v = document, O = () => v.createComment(""), T = (i) => i === null || typeof i != "object" && typeof i != "function", Z = Array.isArray, St = (i) => Z(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", j = `[
283
- \f\r]`, x = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, st = /-->/g, rt = />/g, m = RegExp(`>|${j}(?:([^\\s"'>=/]+)(${j}*=${j}*(?:[^
284
- \f\r"'\`<>=]|("|')|))|$)`, "g"), it = /'/g, nt = /"/g, pt = /^(?:script|style|textarea|title)$/i, wt = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), B = wt(1), E = Symbol.for("lit-noChange"), c = Symbol.for("lit-nothing"), ot = /* @__PURE__ */ new WeakMap(), g = v.createTreeWalker(v, 129);
285
- function $t(i, t) {
286
- if (!Z(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array");
287
- return et !== void 0 ? et.createHTML(t) : t;
282
+ const T = globalThis, D = T.trustedTypes, at = D ? D.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, $t = "$lit$", $ = `lit$${Math.random().toFixed(9).slice(2)}$`, vt = "?" + $, kt = `<${vt}>`, w = document, H = () => w.createComment(""), M = (i) => i === null || typeof i != "object" && typeof i != "function", tt = Array.isArray, Ht = (i) => tt(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", q = `[
283
+ \f\r]`, O = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, lt = /-->/g, ht = />/g, y = RegExp(`>|${q}(?:([^\\s"'>=/]+)(${q}*=${q}*(?:[^
284
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), ct = /'/g, dt = /"/g, _t = /^(?:script|style|textarea|title)$/i, Mt = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), k = Mt(1), S = Symbol.for("lit-noChange"), c = Symbol.for("lit-nothing"), ut = /* @__PURE__ */ new WeakMap(), m = w.createTreeWalker(w, 129);
285
+ function yt(i, t) {
286
+ if (!tt(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array");
287
+ return at !== void 0 ? at.createHTML(t) : t;
288
288
  }
289
- const xt = (i, t) => {
289
+ const Nt = (i, t) => {
290
290
  const e = i.length - 1, s = [];
291
- let r, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", n = x;
292
- for (let h = 0; h < e; h++) {
293
- const a = i[h];
294
- let d, u, l = -1, $ = 0;
295
- for (; $ < a.length && (n.lastIndex = $, u = n.exec(a), u !== null); ) $ = n.lastIndex, n === x ? u[1] === "!--" ? n = st : u[1] !== void 0 ? n = rt : u[2] !== void 0 ? (pt.test(u[2]) && (r = RegExp("</" + u[2], "g")), n = m) : u[3] !== void 0 && (n = m) : n === m ? u[0] === ">" ? (n = r ?? x, l = -1) : u[1] === void 0 ? l = -2 : (l = n.lastIndex - u[2].length, d = u[1], n = u[3] === void 0 ? m : u[3] === '"' ? nt : it) : n === nt || n === it ? n = m : n === st || n === rt ? n = x : (n = m, r = void 0);
296
- const f = n === m && i[h + 1].startsWith("/>") ? " " : "";
297
- o += n === x ? a + Et : l >= 0 ? (s.push(d), a.slice(0, l) + dt + a.slice(l) + b + f) : a + b + (l === -2 ? h : f);
298
- }
299
- return [$t(i, o + (i[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
291
+ let r, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = O;
292
+ for (let l = 0; l < e; l++) {
293
+ const a = i[l];
294
+ let d, u, h = -1, g = 0;
295
+ for (; g < a.length && (o.lastIndex = g, u = o.exec(a), u !== null); ) g = o.lastIndex, o === O ? u[1] === "!--" ? o = lt : u[1] !== void 0 ? o = ht : u[2] !== void 0 ? (_t.test(u[2]) && (r = RegExp("</" + u[2], "g")), o = y) : u[3] !== void 0 && (o = y) : o === y ? u[0] === ">" ? (o = r ?? O, h = -1) : u[1] === void 0 ? h = -2 : (h = o.lastIndex - u[2].length, d = u[1], o = u[3] === void 0 ? y : u[3] === '"' ? dt : ct) : o === dt || o === ct ? o = y : o === lt || o === ht ? o = O : (o = y, r = void 0);
296
+ const f = o === y && i[l + 1].startsWith("/>") ? " " : "";
297
+ n += o === O ? a + kt : h >= 0 ? (s.push(d), a.slice(0, h) + $t + a.slice(h) + $ + f) : a + $ + (h === -2 ? l : f);
298
+ }
299
+ return [yt(i, n + (i[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
300
300
  };
301
- class H {
301
+ class N {
302
302
  constructor({ strings: t, _$litType$: e }, s) {
303
303
  let r;
304
304
  this.parts = [];
305
- let o = 0, n = 0;
306
- const h = t.length - 1, a = this.parts, [d, u] = xt(t, e);
307
- if (this.el = H.createElement(d, s), g.currentNode = this.el.content, e === 2 || e === 3) {
308
- const l = this.el.content.firstChild;
309
- l.replaceWith(...l.childNodes);
305
+ let n = 0, o = 0;
306
+ const l = t.length - 1, a = this.parts, [d, u] = Nt(t, e);
307
+ if (this.el = N.createElement(d, s), m.currentNode = this.el.content, e === 2 || e === 3) {
308
+ const h = this.el.content.firstChild;
309
+ h.replaceWith(...h.childNodes);
310
310
  }
311
- for (; (r = g.nextNode()) !== null && a.length < h; ) {
311
+ for (; (r = m.nextNode()) !== null && a.length < l; ) {
312
312
  if (r.nodeType === 1) {
313
- if (r.hasAttributes()) for (const l of r.getAttributeNames()) if (l.endsWith(dt)) {
314
- const $ = u[n++], f = r.getAttribute(l).split(b), N = /([.?@])?(.*)/.exec($);
315
- a.push({ type: 1, index: o, name: N[2], strings: f, ctor: N[1] === "." ? Ct : N[1] === "?" ? Ut : N[1] === "@" ? Ot : I }), r.removeAttribute(l);
316
- } else l.startsWith(b) && (a.push({ type: 6, index: o }), r.removeAttribute(l));
317
- if (pt.test(r.tagName)) {
318
- const l = r.textContent.split(b), $ = l.length - 1;
319
- if ($ > 0) {
320
- r.textContent = z ? z.emptyScript : "";
321
- for (let f = 0; f < $; f++) r.append(l[f], O()), g.nextNode(), a.push({ type: 2, index: ++o });
322
- r.append(l[$], O());
313
+ if (r.hasAttributes()) for (const h of r.getAttributeNames()) if (h.endsWith($t)) {
314
+ const g = u[o++], f = r.getAttribute(h).split($), z = /([.?@])?(.*)/.exec(g);
315
+ a.push({ type: 1, index: n, name: z[2], strings: f, ctor: z[1] === "." ? jt : z[1] === "?" ? zt : z[1] === "@" ? It : V }), r.removeAttribute(h);
316
+ } else h.startsWith($) && (a.push({ type: 6, index: n }), r.removeAttribute(h));
317
+ if (_t.test(r.tagName)) {
318
+ const h = r.textContent.split($), g = h.length - 1;
319
+ if (g > 0) {
320
+ r.textContent = D ? D.emptyScript : "";
321
+ for (let f = 0; f < g; f++) r.append(h[f], H()), m.nextNode(), a.push({ type: 2, index: ++n });
322
+ r.append(h[g], H());
323
323
  }
324
324
  }
325
- } else if (r.nodeType === 8) if (r.data === ut) a.push({ type: 2, index: o });
325
+ } else if (r.nodeType === 8) if (r.data === vt) a.push({ type: 2, index: n });
326
326
  else {
327
- let l = -1;
328
- for (; (l = r.data.indexOf(b, l + 1)) !== -1; ) a.push({ type: 7, index: o }), l += b.length - 1;
327
+ let h = -1;
328
+ for (; (h = r.data.indexOf($, h + 1)) !== -1; ) a.push({ type: 7, index: n }), h += $.length - 1;
329
329
  }
330
- o++;
330
+ n++;
331
331
  }
332
332
  }
333
333
  static createElement(t, e) {
334
- const s = v.createElement("template");
334
+ const s = w.createElement("template");
335
335
  return s.innerHTML = t, s;
336
336
  }
337
337
  }
338
- function S(i, t, e = i, s) {
339
- var n, h;
340
- if (t === E) return t;
341
- let r = s !== void 0 ? (n = e._$Co) == null ? void 0 : n[s] : e._$Cl;
342
- const o = T(t) ? void 0 : t._$litDirective$;
343
- return (r == null ? void 0 : r.constructor) !== o && ((h = r == null ? void 0 : r._$AO) == null || h.call(r, !1), o === void 0 ? r = void 0 : (r = new o(i), r._$AT(i, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = r : e._$Cl = r), r !== void 0 && (t = S(i, r._$AS(i, t.values), r, s)), t;
338
+ function P(i, t, e = i, s) {
339
+ var o, l;
340
+ if (t === S) return t;
341
+ let r = s !== void 0 ? (o = e._$Co) == null ? void 0 : o[s] : e._$Cl;
342
+ const n = M(t) ? void 0 : t._$litDirective$;
343
+ 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 = P(i, r._$AS(i, t.values), r, s)), t;
344
344
  }
345
- class Pt {
345
+ class Rt {
346
346
  constructor(t, e) {
347
347
  this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
348
348
  }
@@ -353,24 +353,24 @@ class Pt {
353
353
  return this._$AM._$AU;
354
354
  }
355
355
  u(t) {
356
- const { el: { content: e }, parts: s } = this._$AD, r = ((t == null ? void 0 : t.creationScope) ?? v).importNode(e, !0);
357
- g.currentNode = r;
358
- let o = g.nextNode(), n = 0, h = 0, a = s[0];
356
+ const { el: { content: e }, parts: s } = this._$AD, r = ((t == null ? void 0 : t.creationScope) ?? w).importNode(e, !0);
357
+ m.currentNode = r;
358
+ let n = m.nextNode(), o = 0, l = 0, a = s[0];
359
359
  for (; a !== void 0; ) {
360
- if (n === a.index) {
360
+ if (o === a.index) {
361
361
  let d;
362
- a.type === 2 ? d = new M(o, o.nextSibling, this, t) : a.type === 1 ? d = new a.ctor(o, a.name, a.strings, this, t) : a.type === 6 && (d = new Tt(o, this, t)), this._$AV.push(d), a = s[++h];
362
+ a.type === 2 ? d = new j(n, n.nextSibling, this, t) : a.type === 1 ? d = new a.ctor(n, a.name, a.strings, this, t) : a.type === 6 && (d = new Lt(n, this, t)), this._$AV.push(d), a = s[++l];
363
363
  }
364
- n !== (a == null ? void 0 : a.index) && (o = g.nextNode(), n++);
364
+ o !== (a == null ? void 0 : a.index) && (n = m.nextNode(), o++);
365
365
  }
366
- return g.currentNode = v, r;
366
+ return m.currentNode = w, r;
367
367
  }
368
368
  p(t) {
369
369
  let e = 0;
370
370
  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++;
371
371
  }
372
372
  }
373
- class M {
373
+ class j {
374
374
  get _$AU() {
375
375
  var t;
376
376
  return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
@@ -390,7 +390,7 @@ class M {
390
390
  return this._$AB;
391
391
  }
392
392
  _$AI(t, e = this) {
393
- t = S(this, t, e), T(t) ? t === c || t == null || t === "" ? (this._$AH !== c && this._$AR(), this._$AH = c) : t !== this._$AH && t !== E && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : St(t) ? this.k(t) : this._(t);
393
+ t = P(this, t, e), M(t) ? t === c || t == null || t === "" ? (this._$AH !== c && this._$AR(), this._$AH = c) : t !== this._$AH && t !== S && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Ht(t) ? this.k(t) : this._(t);
394
394
  }
395
395
  O(t) {
396
396
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -399,26 +399,26 @@ class M {
399
399
  this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
400
400
  }
401
401
  _(t) {
402
- this._$AH !== c && T(this._$AH) ? this._$AA.nextSibling.data = t : this.T(v.createTextNode(t)), this._$AH = t;
402
+ this._$AH !== c && M(this._$AH) ? this._$AA.nextSibling.data = t : this.T(w.createTextNode(t)), this._$AH = t;
403
403
  }
404
404
  $(t) {
405
- var o;
406
- const { values: e, _$litType$: s } = t, r = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = H.createElement($t(s.h, s.h[0]), this.options)), s);
407
- if (((o = this._$AH) == null ? void 0 : o._$AD) === r) this._$AH.p(e);
405
+ var n;
406
+ const { values: e, _$litType$: s } = t, r = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = N.createElement(yt(s.h, s.h[0]), this.options)), s);
407
+ if (((n = this._$AH) == null ? void 0 : n._$AD) === r) this._$AH.p(e);
408
408
  else {
409
- const n = new Pt(r, this), h = n.u(this.options);
410
- n.p(e), this.T(h), this._$AH = n;
409
+ const o = new Rt(r, this), l = o.u(this.options);
410
+ o.p(e), this.T(l), this._$AH = o;
411
411
  }
412
412
  }
413
413
  _$AC(t) {
414
- let e = ot.get(t.strings);
415
- return e === void 0 && ot.set(t.strings, e = new H(t)), e;
414
+ let e = ut.get(t.strings);
415
+ return e === void 0 && ut.set(t.strings, e = new N(t)), e;
416
416
  }
417
417
  k(t) {
418
- Z(this._$AH) || (this._$AH = [], this._$AR());
418
+ tt(this._$AH) || (this._$AH = [], this._$AR());
419
419
  const e = this._$AH;
420
420
  let s, r = 0;
421
- for (const o of t) r === e.length ? e.push(s = new M(this.O(O()), this.O(O()), this, this.options)) : s = e[r], s._$AI(o), r++;
421
+ for (const n of t) r === e.length ? e.push(s = new j(this.O(H()), this.O(H()), this, this.options)) : s = e[r], s._$AI(n), r++;
422
422
  r < e.length && (this._$AR(s && s._$AB.nextSibling, r), e.length = r);
423
423
  }
424
424
  _$AR(t = this._$AA.nextSibling, e) {
@@ -433,32 +433,32 @@ class M {
433
433
  this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
434
434
  }
435
435
  }
436
- class I {
436
+ class V {
437
437
  get tagName() {
438
438
  return this.element.tagName;
439
439
  }
440
440
  get _$AU() {
441
441
  return this._$AM._$AU;
442
442
  }
443
- constructor(t, e, s, r, o) {
444
- this.type = 1, this._$AH = c, this._$AN = void 0, this.element = t, this.name = e, this._$AM = r, this.options = o, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = c;
443
+ constructor(t, e, s, r, n) {
444
+ this.type = 1, this._$AH = c, this._$AN = void 0, this.element = t, this.name = e, this._$AM = r, this.options = n, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = c;
445
445
  }
446
446
  _$AI(t, e = this, s, r) {
447
- const o = this.strings;
448
- let n = !1;
449
- if (o === void 0) t = S(this, t, e, 0), n = !T(t) || t !== this._$AH && t !== E, n && (this._$AH = t);
447
+ const n = this.strings;
448
+ let o = !1;
449
+ if (n === void 0) t = P(this, t, e, 0), o = !M(t) || t !== this._$AH && t !== S, o && (this._$AH = t);
450
450
  else {
451
- const h = t;
451
+ const l = t;
452
452
  let a, d;
453
- for (t = o[0], a = 0; a < o.length - 1; a++) d = S(this, h[s + a], e, a), d === E && (d = this._$AH[a]), n || (n = !T(d) || d !== this._$AH[a]), d === c ? t = c : t !== c && (t += (d ?? "") + o[a + 1]), this._$AH[a] = d;
453
+ for (t = n[0], a = 0; a < n.length - 1; a++) d = P(this, l[s + a], e, a), d === S && (d = this._$AH[a]), o || (o = !M(d) || d !== this._$AH[a]), d === c ? t = c : t !== c && (t += (d ?? "") + n[a + 1]), this._$AH[a] = d;
454
454
  }
455
- n && !r && this.j(t);
455
+ o && !r && this.j(t);
456
456
  }
457
457
  j(t) {
458
458
  t === c ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
459
459
  }
460
460
  }
461
- class Ct extends I {
461
+ class jt extends V {
462
462
  constructor() {
463
463
  super(...arguments), this.type = 3;
464
464
  }
@@ -466,7 +466,7 @@ class Ct extends I {
466
466
  this.element[this.name] = t === c ? void 0 : t;
467
467
  }
468
468
  }
469
- class Ut extends I {
469
+ class zt extends V {
470
470
  constructor() {
471
471
  super(...arguments), this.type = 4;
472
472
  }
@@ -474,21 +474,21 @@ class Ut extends I {
474
474
  this.element.toggleAttribute(this.name, !!t && t !== c);
475
475
  }
476
476
  }
477
- class Ot extends I {
478
- constructor(t, e, s, r, o) {
479
- super(t, e, s, r, o), this.type = 5;
477
+ class It extends V {
478
+ constructor(t, e, s, r, n) {
479
+ super(t, e, s, r, n), this.type = 5;
480
480
  }
481
481
  _$AI(t, e = this) {
482
- if ((t = S(this, t, e, 0) ?? c) === E) return;
483
- const s = this._$AH, r = t === c && s !== c || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, o = t !== c && (s === c || r);
484
- r && this.element.removeEventListener(this.name, this, s), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
482
+ if ((t = P(this, t, e, 0) ?? c) === S) return;
483
+ const s = this._$AH, r = t === c && s !== c || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, n = t !== c && (s === c || r);
484
+ r && this.element.removeEventListener(this.name, this, s), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
485
485
  }
486
486
  handleEvent(t) {
487
487
  var e;
488
488
  typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
489
489
  }
490
490
  }
491
- class Tt {
491
+ class Lt {
492
492
  constructor(t, e, s) {
493
493
  this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
494
494
  }
@@ -496,17 +496,17 @@ class Tt {
496
496
  return this._$AM._$AU;
497
497
  }
498
498
  _$AI(t) {
499
- S(this, t);
499
+ P(this, t);
500
500
  }
501
501
  }
502
- const D = C.litHtmlPolyfillSupport;
503
- D == null || D(H, M), (C.litHtmlVersions ?? (C.litHtmlVersions = [])).push("3.2.1");
504
- const Ht = (i, t, e) => {
502
+ const F = T.litHtmlPolyfillSupport;
503
+ F == null || F(N, j), (T.litHtmlVersions ?? (T.litHtmlVersions = [])).push("3.2.1");
504
+ const Dt = (i, t, e) => {
505
505
  const s = (e == null ? void 0 : e.renderBefore) ?? t;
506
506
  let r = s._$litPart$;
507
507
  if (r === void 0) {
508
- const o = (e == null ? void 0 : e.renderBefore) ?? null;
509
- s._$litPart$ = r = new M(t.insertBefore(O(), o), o, void 0, e ?? {});
508
+ const n = (e == null ? void 0 : e.renderBefore) ?? null;
509
+ s._$litPart$ = r = new j(t.insertBefore(H(), n), n, void 0, e ?? {});
510
510
  }
511
511
  return r._$AI(i), r;
512
512
  };
@@ -515,7 +515,7 @@ const Ht = (i, t, e) => {
515
515
  * Copyright 2017 Google LLC
516
516
  * SPDX-License-Identifier: BSD-3-Clause
517
517
  */
518
- let U = class extends A {
518
+ let A = class extends E {
519
519
  constructor() {
520
520
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
521
521
  }
@@ -526,7 +526,7 @@ let U = class extends A {
526
526
  }
527
527
  update(t) {
528
528
  const e = this.render();
529
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Ht(e, this.renderRoot, this.renderOptions);
529
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Dt(e, this.renderRoot, this.renderOptions);
530
530
  }
531
531
  connectedCallback() {
532
532
  var t;
@@ -537,20 +537,20 @@ let U = class extends A {
537
537
  super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
538
538
  }
539
539
  render() {
540
- return E;
540
+ return S;
541
541
  }
542
542
  };
543
- var ht;
544
- U._$litElement$ = !0, U.finalized = !0, (ht = globalThis.litElementHydrateSupport) == null || ht.call(globalThis, { LitElement: U });
545
- const V = globalThis.litElementPolyfillSupport;
546
- V == null || V({ LitElement: U });
543
+ var bt;
544
+ A._$litElement$ = !0, A.finalized = !0, (bt = globalThis.litElementHydrateSupport) == null || bt.call(globalThis, { LitElement: A });
545
+ const Z = globalThis.litElementPolyfillSupport;
546
+ Z == null || Z({ LitElement: A });
547
547
  (globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.1.1");
548
548
  /**
549
549
  * @license
550
550
  * Copyright 2017 Google LLC
551
551
  * SPDX-License-Identifier: BSD-3-Clause
552
552
  */
553
- const Mt = (i) => (t, e) => {
553
+ const et = (i) => (t, e) => {
554
554
  e !== void 0 ? e.addInitializer(() => {
555
555
  customElements.define(i, t);
556
556
  }) : customElements.define(i, t);
@@ -560,39 +560,39 @@ const Mt = (i) => (t, e) => {
560
560
  * Copyright 2017 Google LLC
561
561
  * SPDX-License-Identifier: BSD-3-Clause
562
562
  */
563
- const Nt = { attribute: !0, type: String, converter: k, reflect: !1, hasChanged: K }, Rt = (i = Nt, t, e) => {
563
+ const Bt = { attribute: !0, type: String, converter: L, reflect: !1, hasChanged: Y }, Vt = (i = Bt, t, e) => {
564
564
  const { kind: s, metadata: r } = e;
565
- let o = globalThis.litPropertyMetadata.get(r);
566
- if (o === void 0 && globalThis.litPropertyMetadata.set(r, o = /* @__PURE__ */ new Map()), o.set(e.name, i), s === "accessor") {
567
- const { name: n } = e;
568
- return { set(h) {
565
+ let n = globalThis.litPropertyMetadata.get(r);
566
+ if (n === void 0 && globalThis.litPropertyMetadata.set(r, n = /* @__PURE__ */ new Map()), n.set(e.name, i), s === "accessor") {
567
+ const { name: o } = e;
568
+ return { set(l) {
569
569
  const a = t.get.call(this);
570
- t.set.call(this, h), this.requestUpdate(n, a, i);
571
- }, init(h) {
572
- return h !== void 0 && this.P(n, void 0, i), h;
570
+ t.set.call(this, l), this.requestUpdate(o, a, i);
571
+ }, init(l) {
572
+ return l !== void 0 && this.P(o, void 0, i), l;
573
573
  } };
574
574
  }
575
575
  if (s === "setter") {
576
- const { name: n } = e;
577
- return function(h) {
578
- const a = this[n];
579
- t.call(this, h), this.requestUpdate(n, a, i);
576
+ const { name: o } = e;
577
+ return function(l) {
578
+ const a = this[o];
579
+ t.call(this, l), this.requestUpdate(o, a, i);
580
580
  };
581
581
  }
582
582
  throw Error("Unsupported decorator location: " + s);
583
583
  };
584
- function w(i) {
585
- return (t, e) => typeof e == "object" ? Rt(i, t, e) : ((s, r, o) => {
586
- const n = r.hasOwnProperty(o);
587
- return r.constructor.createProperty(o, n ? { ...s, wrapped: !0 } : s), n ? Object.getOwnPropertyDescriptor(r, o) : void 0;
584
+ function p(i) {
585
+ return (t, e) => typeof e == "object" ? Vt(i, t, e) : ((s, r, n) => {
586
+ const o = r.hasOwnProperty(n);
587
+ return r.constructor.createProperty(n, o ? { ...s, wrapped: !0 } : s), o ? Object.getOwnPropertyDescriptor(r, n) : void 0;
588
588
  })(i, t, e);
589
589
  }
590
- const kt = J`
590
+ const Wt = R`
591
591
  outline: 1px dashed var(--button-border-color);
592
592
  outline-offset: 2px;
593
593
  outline: dashed black;
594
594
  `;
595
- J`
595
+ R`
596
596
  :host * {
597
597
  box-sizing: border-box;
598
598
  }
@@ -602,12 +602,12 @@ J`
602
602
  * Copyright 2023 Google LLC
603
603
  * SPDX-License-Identifier: Apache-2.0
604
604
  */
605
- const G = Symbol("internals"), W = Symbol("privateInternals");
606
- function zt(i) {
605
+ const st = Symbol("internals"), J = Symbol("privateInternals");
606
+ function qt(i) {
607
607
  var t;
608
608
  class e extends i {
609
- get [(t = G, t)]() {
610
- return this[W] || (this[W] = this.attachInternals()), this[W];
609
+ get [(t = st, t)]() {
610
+ return this[J] || (this[J] = this.attachInternals()), this[J];
611
611
  }
612
612
  }
613
613
  return e;
@@ -617,39 +617,39 @@ function zt(i) {
617
617
  * Copyright 2023 Google LLC
618
618
  * SPDX-License-Identifier: Apache-2.0
619
619
  */
620
- function It(i) {
620
+ function Ft(i) {
621
621
  i.addInitializer((t) => {
622
622
  const e = t;
623
623
  e.addEventListener("click", async (s) => {
624
- const { type: r, [G]: o } = e, { form: n } = o;
625
- if (!(!n || r === "button") && (await new Promise((h) => {
626
- setTimeout(h);
624
+ const { type: r, [st]: n } = e, { form: o } = n;
625
+ if (!(!o || r === "button") && (await new Promise((l) => {
626
+ setTimeout(l);
627
627
  }), !s.defaultPrevented)) {
628
628
  if (r === "reset") {
629
- n.reset();
629
+ o.reset();
630
630
  return;
631
631
  }
632
- n.addEventListener(
632
+ o.addEventListener(
633
633
  "submit",
634
- (h) => {
635
- Object.defineProperty(h, "submitter", {
634
+ (l) => {
635
+ Object.defineProperty(l, "submitter", {
636
636
  configurable: !0,
637
637
  enumerable: !0,
638
638
  get: () => e
639
639
  });
640
640
  },
641
641
  { capture: !0, once: !0 }
642
- ), o.setFormValue(e.value), n.requestSubmit();
642
+ ), n.setFormValue(e.value), o.requestSubmit();
643
643
  }
644
644
  });
645
645
  });
646
646
  }
647
- var Lt = Object.defineProperty, jt = Object.getOwnPropertyDescriptor, y = (i, t, e, s) => {
648
- for (var r = s > 1 ? void 0 : s ? jt(t, e) : t, o = i.length - 1, n; o >= 0; o--)
649
- (n = i[o]) && (r = (s ? n(t, e, r) : n(r)) || r);
650
- return s && r && Lt(t, e, r), r;
647
+ var Zt = Object.defineProperty, Jt = Object.getOwnPropertyDescriptor, x = (i, t, e, s) => {
648
+ for (var r = s > 1 ? void 0 : s ? Jt(t, e) : t, n = i.length - 1, o; n >= 0; n--)
649
+ (o = i[n]) && (r = (s ? o(t, e, r) : o(r)) || r);
650
+ return s && r && Zt(t, e, r), r;
651
651
  };
652
- const Bt = zt(U), at = (i) => {
652
+ const Kt = qt(A), pt = (i) => {
653
653
  const t = `
654
654
  --button-bg-disabled: var(--color-container-disabled);
655
655
  --button-bg-pressed: var(--color-container-action-${i}-pressed);
@@ -664,9 +664,9 @@ const Bt = zt(U), at = (i) => {
664
664
  --button-text-hover: var(--color-content-action-${i});
665
665
  --button-text: var(--color-content-action-${i});
666
666
  `;
667
- return ct(t);
668
- }, Dt = ["primary", "secondary"];
669
- let p = class extends Bt {
667
+ return ft(t);
668
+ }, Gt = ["primary", "secondary"];
669
+ let b = class extends Kt {
670
670
  constructor() {
671
671
  super(...arguments), this.type = "submit", this.value = "", this.variant = "primary", this.disabled = !1, this.href = "", this.target = "";
672
672
  }
@@ -680,41 +680,41 @@ let p = class extends Bt {
680
680
  * The associated form element with which this element's value will submit.
681
681
  */
682
682
  get form() {
683
- return this[G].form;
683
+ return this[st].form;
684
684
  }
685
685
  // TODO: Add aria attributes support
686
686
  // Adapt from: https://github.dev/material-components/material-web
687
687
  willUpdate() {
688
688
  const i = getComputedStyle(this).getPropertyValue("--button-variant");
689
- i && Dt.some((t) => t === i) && (this.variant = i);
689
+ i && Gt.some((t) => t === i) && (this.variant = i);
690
690
  }
691
691
  render() {
692
692
  const i = this.href ? this.renderLink() : this.renderButton();
693
- return B`${i}`;
693
+ return k`${i}`;
694
694
  }
695
695
  renderLink() {
696
- return B`<a href=${this.href} target=${this.target || c} class="button" ?disabled=${this.disabled}>
696
+ return k`<a href=${this.href} target=${this.target || c} class="button" ?disabled=${this.disabled}>
697
697
  <slot />
698
698
  </a>`;
699
699
  }
700
700
  renderButton() {
701
- return B`<button class="button" ?disabled=${this.disabled}>
701
+ return k`<button class="button" ?disabled=${this.disabled}>
702
702
  <slot />
703
703
  </button>`;
704
704
  }
705
705
  };
706
- It(p);
707
- p.formAssociated = !0;
708
- p.styles = J`
706
+ Ft(b);
707
+ b.formAssociated = !0;
708
+ b.styles = R`
709
709
  :host {
710
710
  display: inline-flex;
711
711
  cursor: pointer;
712
- ${at("primary")};
712
+ ${pt("primary")};
713
713
  --button-border: transparent;
714
714
  }
715
715
 
716
716
  :host([variant="secondary"]) {
717
- ${at("secondary")};
717
+ ${pt("secondary")};
718
718
  }
719
719
 
720
720
  :host([disabled]) {
@@ -775,31 +775,365 @@ p.styles = J`
775
775
  }
776
776
 
777
777
  .button:focus-visible {
778
- ${kt};
778
+ ${Wt};
779
779
  }
780
780
  `;
781
- y([
782
- w()
783
- ], p.prototype, "type", 2);
784
- y([
785
- w({ reflect: !0 })
786
- ], p.prototype, "value", 2);
787
- y([
788
- w({ reflect: !0 })
789
- ], p.prototype, "variant", 2);
790
- y([
791
- w({
781
+ x([
782
+ p()
783
+ ], b.prototype, "type", 2);
784
+ x([
785
+ p({ reflect: !0 })
786
+ ], b.prototype, "value", 2);
787
+ x([
788
+ p({ reflect: !0 })
789
+ ], b.prototype, "variant", 2);
790
+ x([
791
+ p({
792
792
  converter: {
793
793
  fromAttribute: (i) => i === "" || i === "true"
794
794
  }
795
795
  })
796
- ], p.prototype, "disabled", 2);
797
- y([
798
- w()
799
- ], p.prototype, "href", 2);
800
- y([
801
- w()
802
- ], p.prototype, "target", 2);
803
- p = y([
804
- Mt("o-button")
805
- ], p);
796
+ ], b.prototype, "disabled", 2);
797
+ x([
798
+ p()
799
+ ], b.prototype, "href", 2);
800
+ x([
801
+ p()
802
+ ], b.prototype, "target", 2);
803
+ b = x([
804
+ et("o-button")
805
+ ], b);
806
+ /**
807
+ * @license
808
+ * Copyright 2017 Google LLC
809
+ * SPDX-License-Identifier: BSD-3-Clause
810
+ */
811
+ const Qt = { CHILD: 2 }, Xt = (i) => (...t) => ({ _$litDirective$: i, values: t });
812
+ class Yt {
813
+ constructor(t) {
814
+ }
815
+ get _$AU() {
816
+ return this._$AM._$AU;
817
+ }
818
+ _$AT(t, e, s) {
819
+ this._$Ct = t, this._$AM = e, this._$Ci = s;
820
+ }
821
+ _$AS(t, e) {
822
+ return this.update(t, e);
823
+ }
824
+ update(t, e) {
825
+ return this.render(...e);
826
+ }
827
+ }
828
+ /**
829
+ * @license
830
+ * Copyright 2017 Google LLC
831
+ * SPDX-License-Identifier: BSD-3-Clause
832
+ */
833
+ class K extends Yt {
834
+ constructor(t) {
835
+ if (super(t), this.it = c, t.type !== Qt.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
836
+ }
837
+ render(t) {
838
+ if (t === c || t == null) return this._t = void 0, this.it = t;
839
+ if (t === S) return t;
840
+ if (typeof t != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
841
+ if (t === this.it) return this._t;
842
+ this.it = t;
843
+ const e = [t];
844
+ return e.raw = e, this._t = { _$litType$: this.constructor.resultType, strings: e, values: [] };
845
+ }
846
+ }
847
+ K.directiveName = "unsafeHTML", K.resultType = 1;
848
+ /**
849
+ * @license
850
+ * Copyright 2017 Google LLC
851
+ * SPDX-License-Identifier: BSD-3-Clause
852
+ */
853
+ class G extends K {
854
+ }
855
+ G.directiveName = "unsafeSVG", G.resultType = 2;
856
+ const mt = Xt(G), te = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
857
+ <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"/>
858
+ </svg>
859
+ `, At = {
860
+ wishlist: te
861
+ };
862
+ var ee = Object.defineProperty, se = Object.getOwnPropertyDescriptor, wt = (i, t, e, s) => {
863
+ for (var r = s > 1 ? void 0 : s ? se(t, e) : t, n = i.length - 1, o; n >= 0; n--)
864
+ (o = i[n]) && (r = (s ? o(t, e, r) : o(r)) || r);
865
+ return s && r && ee(t, e, r), r;
866
+ };
867
+ let B = class extends A {
868
+ constructor() {
869
+ super(...arguments), this.status = "empty";
870
+ }
871
+ render() {
872
+ const i = At.wishlist.replace(
873
+ "<svg",
874
+ '<svg aria-hidden="true" focusable="false" part="svg"'
875
+ );
876
+ return k`
877
+ <button
878
+ type="button"
879
+ aria-label="Add to wishlist"
880
+ aria-pressed="${this.status == "filled" ? "true" : "false"}"
881
+ class="wishlist-button"
882
+ @click="${this.toggleStatus}"
883
+ >
884
+ ${mt(i)}
885
+ </button>
886
+ `;
887
+ }
888
+ toggleStatus() {
889
+ this.status = this.status == "empty" ? "filled" : "empty";
890
+ }
891
+ setStatus(i) {
892
+ this.status = i, this.requestUpdate();
893
+ }
894
+ };
895
+ B.styles = R`
896
+ :host {
897
+ display: inline-flex;
898
+ justify-content: center;
899
+ align-items: center;
900
+ cursor: pointer;
901
+ }
902
+
903
+ .wishlist-button {
904
+ display: flex;
905
+ justify-content: center;
906
+ align-items: center;
907
+ width: 32px;
908
+ height: 32px;
909
+ border: transparent;
910
+ border-radius: var(--radius-full);
911
+ background-color: var(--color-alpha-light-strong);
912
+ position: relative;
913
+ }
914
+
915
+ .wishlist-button:hover {
916
+ background-color: var(--color-alpha-light-stronger);
917
+ }
918
+
919
+ :host([status="filled"]) .wishlist-button {
920
+ background-color: var(--color-alpha-light-strongest);
921
+ }
922
+
923
+ .wishlist-button:hover svg path {
924
+ fill: var(--color-content-action-secondary);
925
+ }
926
+
927
+ :host([status="filled"]) .wishlist-button svg path {
928
+ fill: var(--color-content-action-secondary);
929
+ }
930
+
931
+ :host([status="filled"]) .wishlist-button:hover svg path {
932
+ fill: var(--color-alpha-light-strong);
933
+ }
934
+ `;
935
+ wt([
936
+ p({ type: String, reflect: !0 })
937
+ ], B.prototype, "status", 2);
938
+ B = wt([
939
+ et("o-wishlist-button")
940
+ ], B);
941
+ var re = Object.defineProperty, ie = Object.getOwnPropertyDescriptor, C = (i, t, e, s) => {
942
+ for (var r = s > 1 ? void 0 : s ? ie(t, e) : t, n = i.length - 1, o; n >= 0; n--)
943
+ (o = i[n]) && (r = (s ? o(t, e, r) : o(r)) || r);
944
+ return s && r && re(t, e, r), r;
945
+ };
946
+ let _ = class extends A {
947
+ constructor() {
948
+ super(...arguments), this.bgstyle = "background-light", this.size = "medium", this.status = "empty", this.icon = "wishlist", this.disabled = !1;
949
+ }
950
+ render() {
951
+ const t = (At[this.icon] ?? "").replace(
952
+ "<svg",
953
+ '<svg aria-hidden="true" focusable="false" part="svg"'
954
+ );
955
+ return k`
956
+ <button
957
+ type="button"
958
+ aria-label="icon"
959
+ class="icon-button ${this.size} ${this.bgstyle} ${this.status}"
960
+ ?disabled="${this.disabled}"
961
+ >
962
+ ${mt(t)}
963
+ </button>
964
+ `;
965
+ }
966
+ };
967
+ _.styles = R`
968
+ :host {
969
+ display: inline-flex;
970
+ justify-content: center;
971
+ align-items: center;
972
+ }
973
+
974
+ .icon-button {
975
+ display: flex;
976
+ justify-content: center;
977
+ align-items: center;
978
+ width: 32px;
979
+ height: 32px;
980
+ border: transparent;
981
+ border-radius: var(--radius-full);
982
+ cursor: pointer;
983
+ position: relative;
984
+
985
+ svg {
986
+ path {
987
+ stroke: var(--color-content-action-secondary);
988
+ }
989
+ }
990
+ }
991
+
992
+ .icon-button.filled svg {
993
+ fill: var(--color-content-action-secondary);
994
+ }
995
+
996
+ .icon-button.small {
997
+ width: 20px;
998
+ height: 20px;
999
+ }
1000
+
1001
+ .icon-button.medium {
1002
+ width: 32px;
1003
+ height: 32px;
1004
+ }
1005
+
1006
+ .icon-button.large {
1007
+ width: 40px;
1008
+ height: 40px;
1009
+ }
1010
+
1011
+ .icon-button.none-light, .icon-button.none-contrast {
1012
+ background-color: transparent;
1013
+ width: auto;
1014
+ height: auto;
1015
+
1016
+ &.small {
1017
+ svg {
1018
+ width: 8px;
1019
+ height: 8px;
1020
+ }
1021
+ }
1022
+
1023
+ &.medium {
1024
+ svg {
1025
+ width: 16px;
1026
+ height: 16px;
1027
+ }
1028
+ }
1029
+
1030
+ &.large {
1031
+ svg {
1032
+ width: 24px;
1033
+ height: 24px;
1034
+ }
1035
+ }
1036
+
1037
+ &:disabled {
1038
+ background-color: transparent;
1039
+ }
1040
+ }
1041
+
1042
+ .icon-button.none-light {
1043
+ svg {
1044
+ path {
1045
+ stroke: var(--color-content-action-primary);
1046
+ }
1047
+ }
1048
+ }
1049
+
1050
+ .icon-button.background-light {
1051
+ background-color: var(--color-alpha-light-strong);
1052
+
1053
+ &:hover:not(:disabled) {
1054
+ background-color: var(--color-alpha-light-stronger);
1055
+ }
1056
+
1057
+ &:active:not(:disabled) {
1058
+ background-color: var(--color-alpha-light-strongest);
1059
+ }
1060
+ }
1061
+
1062
+ .icon-button.background-contrast {
1063
+ background-color: var(--color-container-action-tertiary-default);
1064
+
1065
+ &:hover:not(:disabled) {
1066
+ background-color: var(--color-container-action-tertiary-hover);
1067
+ }
1068
+
1069
+ &:active:not(:disabled) {
1070
+ background-color: var(--color-container-action-tertiary-pressed);
1071
+ }
1072
+ }
1073
+
1074
+ .icon-button.ghost-light {
1075
+ background-color: transparent;
1076
+ /* &.filled {
1077
+ svg {
1078
+ fill: var(--color-content-action-primary);
1079
+ }
1080
+ } */
1081
+
1082
+ svg {
1083
+ path {
1084
+ stroke: var(--color-content-action-primary);
1085
+ }
1086
+ }
1087
+
1088
+ &:hover:not(:disabled) {
1089
+ background-color: var(--color-alpha-light-lightest);
1090
+ }
1091
+
1092
+ &:active:not(:disabled) {
1093
+ background-color: var(--color-alpha-light-light);
1094
+ }
1095
+ }
1096
+
1097
+ .icon-button.ghost-contrast {
1098
+ background-color: transparent;
1099
+
1100
+ &:hover:not(:disabled) {
1101
+ background-color: var(--color-alpha-light-medium);
1102
+ }
1103
+
1104
+ &:active:not(:disabled) {
1105
+ background-color: var(--color-alpha-light-strongest);
1106
+ }
1107
+ }
1108
+
1109
+ .icon-button:disabled {
1110
+ background-color: var(--color-container-disabled);
1111
+
1112
+ svg {
1113
+ fill: var(--color-content-disabled);
1114
+
1115
+ path {
1116
+ stroke: var(--color-content-disabled);
1117
+ }
1118
+ }
1119
+
1120
+ }
1121
+ `;
1122
+ C([
1123
+ p({ type: String, reflect: !0 })
1124
+ ], _.prototype, "bgstyle", 2);
1125
+ C([
1126
+ p({ type: String, reflect: !0 })
1127
+ ], _.prototype, "size", 2);
1128
+ C([
1129
+ p({ type: String, reflect: !0 })
1130
+ ], _.prototype, "status", 2);
1131
+ C([
1132
+ p({ type: String })
1133
+ ], _.prototype, "icon", 2);
1134
+ C([
1135
+ p({ type: Boolean, reflect: !0 })
1136
+ ], _.prototype, "disabled", 2);
1137
+ _ = C([
1138
+ et("o-icon-button")
1139
+ ], _);