UNPKG

@linkurious/ogma-ui-kit

Version:
1,302 lines (1,286 loc) 234 kB
import * as q from "react"; /** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ const ce = globalThis, Xe = ce.ShadowRoot && (ce.ShadyCSS === void 0 || ce.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Ze = Symbol(), ho = /* @__PURE__ */ new WeakMap(); let Fo = class { constructor(e, o, i) { if (this._$cssResult$ = !0, i !== Ze) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead."); this.cssText = e, this.t = o; } get styleSheet() { let e = this.o; const o = this.t; if (Xe && e === void 0) { const i = o !== void 0 && o.length === 1; i && (e = ho.get(o)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), i && ho.set(o, e)); } return e; } toString() { return this.cssText; } }; const fi = (t) => new Fo(typeof t == "string" ? t : t + "", void 0, Ze), B = (t, ...e) => { const o = t.length === 1 ? t[0] : e.reduce(((i, s, r) => i + ((n) => { if (n._$cssResult$ === !0) return n.cssText; if (typeof n == "number") return n; 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."); })(s) + t[r + 1]), t[0]); return new Fo(o, t, Ze); }, bi = (t, e) => { if (Xe) t.adoptedStyleSheets = e.map(((o) => o instanceof CSSStyleSheet ? o : o.styleSheet)); else for (const o of e) { const i = document.createElement("style"), s = ce.litNonce; s !== void 0 && i.setAttribute("nonce", s), i.textContent = o.cssText, t.appendChild(i); } }, po = Xe ? (t) => t : (t) => t instanceof CSSStyleSheet ? ((e) => { let o = ""; for (const i of e.cssRules) o += i.cssText; return fi(o); })(t) : t; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ const { is: mi, defineProperty: gi, getOwnPropertyDescriptor: vi, getOwnPropertyNames: yi, getOwnPropertySymbols: wi, getPrototypeOf: _i } = Object, yt = globalThis, fo = yt.trustedTypes, xi = fo ? fo.emptyScript : "", Le = yt.reactiveElementPolyfillSupport, Yt = (t, e) => t, Nt = { toAttribute(t, e) { switch (e) { case Boolean: t = t ? xi : null; break; case Object: case Array: t = t == null ? t : JSON.stringify(t); } return t; }, fromAttribute(t, e) { let o = t; switch (e) { case Boolean: o = t !== null; break; case Number: o = t === null ? null : Number(t); break; case Object: case Array: try { o = JSON.parse(t); } catch { o = null; } } return o; } }, Ge = (t, e) => !mi(t, e), bo = { attribute: !0, type: String, converter: Nt, reflect: !1, useDefault: !1, hasChanged: Ge }; Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), yt.litPropertyMetadata ?? (yt.litPropertyMetadata = /* @__PURE__ */ new WeakMap()); let Dt = class extends HTMLElement { static addInitializer(e) { this._$Ei(), (this.l ?? (this.l = [])).push(e); } static get observedAttributes() { return this.finalize(), this._$Eh && [...this._$Eh.keys()]; } static createProperty(e, o = bo) { if (o.state && (o.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((o = Object.create(o)).wrapped = !0), this.elementProperties.set(e, o), !o.noAccessor) { const i = Symbol(), s = this.getPropertyDescriptor(e, i, o); s !== void 0 && gi(this.prototype, e, s); } } static getPropertyDescriptor(e, o, i) { const { get: s, set: r } = vi(this.prototype, e) ?? { get() { return this[o]; }, set(n) { this[o] = n; } }; return { get: s, set(n) { const a = s == null ? void 0 : s.call(this); r == null || r.call(this, n), this.requestUpdate(e, a, i); }, configurable: !0, enumerable: !0 }; } static getPropertyOptions(e) { return this.elementProperties.get(e) ?? bo; } static _$Ei() { if (this.hasOwnProperty(Yt("elementProperties"))) return; const e = _i(this); e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties); } static finalize() { if (this.hasOwnProperty(Yt("finalized"))) return; if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(Yt("properties"))) { const o = this.properties, i = [...yi(o), ...wi(o)]; for (const s of i) this.createProperty(s, o[s]); } const e = this[Symbol.metadata]; if (e !== null) { const o = litPropertyMetadata.get(e); if (o !== void 0) for (const [i, s] of o) this.elementProperties.set(i, s); } this._$Eh = /* @__PURE__ */ new Map(); for (const [o, i] of this.elementProperties) { const s = this._$Eu(o, i); s !== void 0 && this._$Eh.set(s, o); } this.elementStyles = this.finalizeStyles(this.styles); } static finalizeStyles(e) { const o = []; if (Array.isArray(e)) { const i = new Set(e.flat(1 / 0).reverse()); for (const s of i) o.unshift(po(s)); } else e !== void 0 && o.push(po(e)); return o; } static _$Eu(e, o) { const i = o.attribute; return i === !1 ? void 0 : typeof i == "string" ? i : typeof e == "string" ? e.toLowerCase() : void 0; } constructor() { super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev(); } _$Ev() { var e; this._$ES = new Promise(((o) => this.enableUpdating = o)), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (e = this.constructor.l) == null || e.forEach(((o) => o(this))); } addController(e) { var o; (this._$EO ?? (this._$EO = /* @__PURE__ */ new Set())).add(e), this.renderRoot !== void 0 && this.isConnected && ((o = e.hostConnected) == null || o.call(e)); } removeController(e) { var o; (o = this._$EO) == null || o.delete(e); } _$E_() { const e = /* @__PURE__ */ new Map(), o = this.constructor.elementProperties; for (const i of o.keys()) this.hasOwnProperty(i) && (e.set(i, this[i]), delete this[i]); e.size > 0 && (this._$Ep = e); } createRenderRoot() { const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions); return bi(e, this.constructor.elementStyles), e; } connectedCallback() { var e; this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (e = this._$EO) == null || e.forEach(((o) => { var i; return (i = o.hostConnected) == null ? void 0 : i.call(o); })); } enableUpdating(e) { } disconnectedCallback() { var e; (e = this._$EO) == null || e.forEach(((o) => { var i; return (i = o.hostDisconnected) == null ? void 0 : i.call(o); })); } attributeChangedCallback(e, o, i) { this._$AK(e, i); } _$ET(e, o) { var r; const i = this.constructor.elementProperties.get(e), s = this.constructor._$Eu(e, i); if (s !== void 0 && i.reflect === !0) { const n = (((r = i.converter) == null ? void 0 : r.toAttribute) !== void 0 ? i.converter : Nt).toAttribute(o, i.type); this._$Em = e, n == null ? this.removeAttribute(s) : this.setAttribute(s, n), this._$Em = null; } } _$AK(e, o) { var r, n; const i = this.constructor, s = i._$Eh.get(e); if (s !== void 0 && this._$Em !== s) { const a = i.getPropertyOptions(s), u = typeof a.converter == "function" ? { fromAttribute: a.converter } : ((r = a.converter) == null ? void 0 : r.fromAttribute) !== void 0 ? a.converter : Nt; this._$Em = s; const d = u.fromAttribute(o, a.type); this[s] = d ?? ((n = this._$Ej) == null ? void 0 : n.get(s)) ?? d, this._$Em = null; } } requestUpdate(e, o, i) { var s; if (e !== void 0) { const r = this.constructor, n = this[e]; if (i ?? (i = r.getPropertyOptions(e)), !((i.hasChanged ?? Ge)(n, o) || i.useDefault && i.reflect && n === ((s = this._$Ej) == null ? void 0 : s.get(e)) && !this.hasAttribute(r._$Eu(e, i)))) return; this.C(e, o, i); } this.isUpdatePending === !1 && (this._$ES = this._$EP()); } C(e, o, { useDefault: i, reflect: s, wrapped: r }, n) { i && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(e) && (this._$Ej.set(e, n ?? o ?? this[e]), r !== !0 || n !== void 0) || (this._$AL.has(e) || (this.hasUpdated || i || (o = void 0), this._$AL.set(e, o)), s === !0 && this._$Em !== e && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(e)); } async _$EP() { this.isUpdatePending = !0; try { await this._$ES; } catch (o) { Promise.reject(o); } const e = this.scheduleUpdate(); return e != null && await e, !this.isUpdatePending; } scheduleUpdate() { return this.performUpdate(); } performUpdate() { var i; if (!this.isUpdatePending) return; if (!this.hasUpdated) { if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) { for (const [r, n] of this._$Ep) this[r] = n; this._$Ep = void 0; } const s = this.constructor.elementProperties; if (s.size > 0) for (const [r, n] of s) { const { wrapped: a } = n, u = this[r]; a !== !0 || this._$AL.has(r) || u === void 0 || this.C(r, void 0, n, u); } } let e = !1; const o = this._$AL; try { e = this.shouldUpdate(o), e ? (this.willUpdate(o), (i = this._$EO) == null || i.forEach(((s) => { var r; return (r = s.hostUpdate) == null ? void 0 : r.call(s); })), this.update(o)) : this._$EM(); } catch (s) { throw e = !1, this._$EM(), s; } e && this._$AE(o); } willUpdate(e) { } _$AE(e) { var o; (o = this._$EO) == null || o.forEach(((i) => { var s; return (s = i.hostUpdated) == null ? void 0 : s.call(i); })), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e); } _$EM() { this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1; } get updateComplete() { return this.getUpdateComplete(); } getUpdateComplete() { return this._$ES; } shouldUpdate(e) { return !0; } update(e) { this._$Eq && (this._$Eq = this._$Eq.forEach(((o) => this._$ET(o, this[o])))), this._$EM(); } updated(e) { } firstUpdated(e) { } }; Dt.elementStyles = [], Dt.shadowRootOptions = { mode: "open" }, Dt[Yt("elementProperties")] = /* @__PURE__ */ new Map(), Dt[Yt("finalized")] = /* @__PURE__ */ new Map(), Le == null || Le({ ReactiveElement: Dt }), (yt.reactiveElementVersions ?? (yt.reactiveElementVersions = [])).push("2.1.1"); /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ const Xt = globalThis, he = Xt.trustedTypes, mo = he ? he.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, Ho = "$lit$", vt = `lit$${Math.random().toFixed(9).slice(2)}$`, Uo = "?" + vt, ki = `<${Uo}>`, Et = document, Jt = () => Et.createComment(""), Qt = (t) => t === null || typeof t != "object" && typeof t != "function", Je = Array.isArray, $i = (t) => Je(t) || typeof (t == null ? void 0 : t[Symbol.iterator]) == "function", Pe = `[ \f\r]`, Ut = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, go = /-->/g, vo = />/g, $t = RegExp(`>|${Pe}(?:([^\\s"'>=/]+)(${Pe}*=${Pe}*(?:[^ \f\r"'\`<>=]|("|')|))|$)`, "g"), yo = /'/g, wo = /"/g, Wo = /^(?:script|style|textarea|title)$/i, Ci = (t) => (e, ...o) => ({ _$litType$: t, strings: e, values: o }), $ = Ci(1), G = Symbol.for("lit-noChange"), z = Symbol.for("lit-nothing"), _o = /* @__PURE__ */ new WeakMap(), St = Et.createTreeWalker(Et, 129); function qo(t, e) { if (!Je(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array"); return mo !== void 0 ? mo.createHTML(e) : e; } const Si = (t, e) => { const o = t.length - 1, i = []; let s, r = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", n = Ut; for (let a = 0; a < o; a++) { const u = t[a]; let d, h, p = -1, m = 0; for (; m < u.length && (n.lastIndex = m, h = n.exec(u), h !== null); ) m = n.lastIndex, n === Ut ? h[1] === "!--" ? n = go : h[1] !== void 0 ? n = vo : h[2] !== void 0 ? (Wo.test(h[2]) && (s = RegExp("</" + h[2], "g")), n = $t) : h[3] !== void 0 && (n = $t) : n === $t ? h[0] === ">" ? (n = s ?? Ut, p = -1) : h[1] === void 0 ? p = -2 : (p = n.lastIndex - h[2].length, d = h[1], n = h[3] === void 0 ? $t : h[3] === '"' ? wo : yo) : n === wo || n === yo ? n = $t : n === go || n === vo ? n = Ut : (n = $t, s = void 0); const f = n === $t && t[a + 1].startsWith("/>") ? " " : ""; r += n === Ut ? u + ki : p >= 0 ? (i.push(d), u.slice(0, p) + Ho + u.slice(p) + vt + f) : u + vt + (p === -2 ? a : f); } return [qo(t, r + (t[o] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), i]; }; class te { constructor({ strings: e, _$litType$: o }, i) { let s; this.parts = []; let r = 0, n = 0; const a = e.length - 1, u = this.parts, [d, h] = Si(e, o); if (this.el = te.createElement(d, i), St.currentNode = this.el.content, o === 2 || o === 3) { const p = this.el.content.firstChild; p.replaceWith(...p.childNodes); } for (; (s = St.nextNode()) !== null && u.length < a; ) { if (s.nodeType === 1) { if (s.hasAttributes()) for (const p of s.getAttributeNames()) if (p.endsWith(Ho)) { const m = h[n++], f = s.getAttribute(p).split(vt), b = /([.?@])?(.*)/.exec(m); u.push({ type: 1, index: r, name: b[2], strings: f, ctor: b[1] === "." ? Ei : b[1] === "?" ? zi : b[1] === "@" ? Oi : xe }), s.removeAttribute(p); } else p.startsWith(vt) && (u.push({ type: 6, index: r }), s.removeAttribute(p)); if (Wo.test(s.tagName)) { const p = s.textContent.split(vt), m = p.length - 1; if (m > 0) { s.textContent = he ? he.emptyScript : ""; for (let f = 0; f < m; f++) s.append(p[f], Jt()), St.nextNode(), u.push({ type: 2, index: ++r }); s.append(p[m], Jt()); } } } else if (s.nodeType === 8) if (s.data === Uo) u.push({ type: 2, index: r }); else { let p = -1; for (; (p = s.data.indexOf(vt, p + 1)) !== -1; ) u.push({ type: 7, index: r }), p += vt.length - 1; } r++; } } static createElement(e, o) { const i = Et.createElement("template"); return i.innerHTML = e, i; } } function Vt(t, e, o = t, i) { var n, a; if (e === G) return e; let s = i !== void 0 ? (n = o._$Co) == null ? void 0 : n[i] : o._$Cl; const r = Qt(e) ? void 0 : e._$litDirective$; return (s == null ? void 0 : s.constructor) !== r && ((a = s == null ? void 0 : s._$AO) == null || a.call(s, !1), r === void 0 ? s = void 0 : (s = new r(t), s._$AT(t, o, i)), i !== void 0 ? (o._$Co ?? (o._$Co = []))[i] = s : o._$Cl = s), s !== void 0 && (e = Vt(t, s._$AS(t, e.values), s, i)), e; } class Ai { constructor(e, o) { this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = o; } get parentNode() { return this._$AM.parentNode; } get _$AU() { return this._$AM._$AU; } u(e) { const { el: { content: o }, parts: i } = this._$AD, s = ((e == null ? void 0 : e.creationScope) ?? Et).importNode(o, !0); St.currentNode = s; let r = St.nextNode(), n = 0, a = 0, u = i[0]; for (; u !== void 0; ) { if (n === u.index) { let d; u.type === 2 ? d = new oe(r, r.nextSibling, this, e) : u.type === 1 ? d = new u.ctor(r, u.name, u.strings, this, e) : u.type === 6 && (d = new Ti(r, this, e)), this._$AV.push(d), u = i[++a]; } n !== (u == null ? void 0 : u.index) && (r = St.nextNode(), n++); } return St.currentNode = Et, s; } p(e) { let o = 0; for (const i of this._$AV) i !== void 0 && (i.strings !== void 0 ? (i._$AI(e, i, o), o += i.strings.length - 2) : i._$AI(e[o])), o++; } } class oe { get _$AU() { var e; return ((e = this._$AM) == null ? void 0 : e._$AU) ?? this._$Cv; } constructor(e, o, i, s) { this.type = 2, this._$AH = z, this._$AN = void 0, this._$AA = e, this._$AB = o, this._$AM = i, this.options = s, this._$Cv = (s == null ? void 0 : s.isConnected) ?? !0; } get parentNode() { let e = this._$AA.parentNode; const o = this._$AM; return o !== void 0 && (e == null ? void 0 : e.nodeType) === 11 && (e = o.parentNode), e; } get startNode() { return this._$AA; } get endNode() { return this._$AB; } _$AI(e, o = this) { e = Vt(this, e, o), Qt(e) ? e === z || e == null || e === "" ? (this._$AH !== z && this._$AR(), this._$AH = z) : e !== this._$AH && e !== G && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : $i(e) ? this.k(e) : this._(e); } O(e) { return this._$AA.parentNode.insertBefore(e, this._$AB); } T(e) { this._$AH !== e && (this._$AR(), this._$AH = this.O(e)); } _(e) { this._$AH !== z && Qt(this._$AH) ? this._$AA.nextSibling.data = e : this.T(Et.createTextNode(e)), this._$AH = e; } $(e) { var r; const { values: o, _$litType$: i } = e, s = typeof i == "number" ? this._$AC(e) : (i.el === void 0 && (i.el = te.createElement(qo(i.h, i.h[0]), this.options)), i); if (((r = this._$AH) == null ? void 0 : r._$AD) === s) this._$AH.p(o); else { const n = new Ai(s, this), a = n.u(this.options); n.p(o), this.T(a), this._$AH = n; } } _$AC(e) { let o = _o.get(e.strings); return o === void 0 && _o.set(e.strings, o = new te(e)), o; } k(e) { Je(this._$AH) || (this._$AH = [], this._$AR()); const o = this._$AH; let i, s = 0; for (const r of e) s === o.length ? o.push(i = new oe(this.O(Jt()), this.O(Jt()), this, this.options)) : i = o[s], i._$AI(r), s++; s < o.length && (this._$AR(i && i._$AB.nextSibling, s), o.length = s); } _$AR(e = this._$AA.nextSibling, o) { var i; for ((i = this._$AP) == null ? void 0 : i.call(this, !1, !0, o); e !== this._$AB; ) { const s = e.nextSibling; e.remove(), e = s; } } setConnected(e) { var o; this._$AM === void 0 && (this._$Cv = e, (o = this._$AP) == null || o.call(this, e)); } } class xe { get tagName() { return this.element.tagName; } get _$AU() { return this._$AM._$AU; } constructor(e, o, i, s, r) { this.type = 1, this._$AH = z, this._$AN = void 0, this.element = e, this.name = o, this._$AM = s, this.options = r, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = z; } _$AI(e, o = this, i, s) { const r = this.strings; let n = !1; if (r === void 0) e = Vt(this, e, o, 0), n = !Qt(e) || e !== this._$AH && e !== G, n && (this._$AH = e); else { const a = e; let u, d; for (e = r[0], u = 0; u < r.length - 1; u++) d = Vt(this, a[i + u], o, u), d === G && (d = this._$AH[u]), n || (n = !Qt(d) || d !== this._$AH[u]), d === z ? e = z : e !== z && (e += (d ?? "") + r[u + 1]), this._$AH[u] = d; } n && !s && this.j(e); } j(e) { e === z ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? ""); } } class Ei extends xe { constructor() { super(...arguments), this.type = 3; } j(e) { this.element[this.name] = e === z ? void 0 : e; } } class zi extends xe { constructor() { super(...arguments), this.type = 4; } j(e) { this.element.toggleAttribute(this.name, !!e && e !== z); } } class Oi extends xe { constructor(e, o, i, s, r) { super(e, o, i, s, r), this.type = 5; } _$AI(e, o = this) { if ((e = Vt(this, e, o, 0) ?? z) === G) return; const i = this._$AH, s = e === z && i !== z || e.capture !== i.capture || e.once !== i.once || e.passive !== i.passive, r = e !== z && (i === z || s); s && this.element.removeEventListener(this.name, this, i), r && this.element.addEventListener(this.name, this, e), this._$AH = e; } handleEvent(e) { var o; typeof this._$AH == "function" ? this._$AH.call(((o = this.options) == null ? void 0 : o.host) ?? this.element, e) : this._$AH.handleEvent(e); } } class Ti { constructor(e, o, i) { this.element = e, this.type = 6, this._$AN = void 0, this._$AM = o, this.options = i; } get _$AU() { return this._$AM._$AU; } _$AI(e) { Vt(this, e); } } const De = Xt.litHtmlPolyfillSupport; De == null || De(te, oe), (Xt.litHtmlVersions ?? (Xt.litHtmlVersions = [])).push("3.3.1"); const Li = (t, e, o) => { const i = (o == null ? void 0 : o.renderBefore) ?? e; let s = i._$litPart$; if (s === void 0) { const r = (o == null ? void 0 : o.renderBefore) ?? null; i._$litPart$ = s = new oe(e.insertBefore(Jt(), r), r, void 0, o ?? {}); } return s._$AI(t), s; }; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ const At = globalThis; let Zt = class extends Dt { constructor() { super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0; } createRenderRoot() { var o; const e = super.createRenderRoot(); return (o = this.renderOptions).renderBefore ?? (o.renderBefore = e.firstChild), e; } update(e) { const o = this.render(); this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = Li(o, this.renderRoot, this.renderOptions); } connectedCallback() { var e; super.connectedCallback(), (e = this._$Do) == null || e.setConnected(!0); } disconnectedCallback() { var e; super.disconnectedCallback(), (e = this._$Do) == null || e.setConnected(!1); } render() { return G; } }; var Mo; Zt._$litElement$ = !0, Zt.finalized = !0, (Mo = At.litElementHydrateSupport) == null || Mo.call(At, { LitElement: Zt }); const Be = At.litElementPolyfillSupport; Be == null || Be({ LitElement: Zt }); (At.litElementVersions ?? (At.litElementVersions = [])).push("4.2.1"); var Pi = B` .breadcrumb { display: flex; align-items: center; flex-wrap: wrap; } `; const He = /* @__PURE__ */ new Set(), Bt = /* @__PURE__ */ new Map(); let Ct, Qe = "ltr", to = "en"; const jo = typeof MutationObserver < "u" && typeof document < "u" && typeof document.documentElement < "u"; if (jo) { const t = new MutationObserver(Yo); Qe = document.documentElement.dir || "ltr", to = document.documentElement.lang || navigator.language, t.observe(document.documentElement, { attributes: !0, attributeFilter: ["dir", "lang"] }); } function Ko(...t) { t.map((e) => { const o = e.$code.toLowerCase(); Bt.has(o) ? Bt.set(o, Object.assign(Object.assign({}, Bt.get(o)), e)) : Bt.set(o, e), Ct || (Ct = e); }), Yo(); } function Yo() { jo && (Qe = document.documentElement.dir || "ltr", to = document.documentElement.lang || navigator.language), [...He.keys()].map((t) => { typeof t.requestUpdate == "function" && t.requestUpdate(); }); } let Di = class { constructor(e) { this.host = e, this.host.addController(this); } hostConnected() { He.add(this.host); } hostDisconnected() { He.delete(this.host); } dir() { return `${this.host.dir || Qe}`.toLowerCase(); } lang() { return `${this.host.lang || to}`.toLowerCase(); } getTranslationData(e) { var o, i; const s = new Intl.Locale(e.replace(/_/g, "-")), r = s == null ? void 0 : s.language.toLowerCase(), n = (i = (o = s == null ? void 0 : s.region) === null || o === void 0 ? void 0 : o.toLowerCase()) !== null && i !== void 0 ? i : "", a = Bt.get(`${r}-${n}`), u = Bt.get(r); return { locale: s, language: r, region: n, primary: a, secondary: u }; } exists(e, o) { var i; const { primary: s, secondary: r } = this.getTranslationData((i = o.lang) !== null && i !== void 0 ? i : this.lang()); return o = Object.assign({ includeFallback: !1 }, o), !!(s && s[e] || r && r[e] || o.includeFallback && Ct && Ct[e]); } term(e, ...o) { const { primary: i, secondary: s } = this.getTranslationData(this.lang()); let r; if (i && i[e]) r = i[e]; else if (s && s[e]) r = s[e]; else if (Ct && Ct[e]) r = Ct[e]; else return console.error(`No translation found for: ${String(e)}`), String(e); return typeof r == "function" ? r(...o) : r; } date(e, o) { return e = new Date(e), new Intl.DateTimeFormat(this.lang(), o).format(e); } number(e, o) { return e = Number(e), isNaN(e) ? "" : new Intl.NumberFormat(this.lang(), o).format(e); } relativeTime(e, o, i) { return new Intl.RelativeTimeFormat(this.lang(), i).format(e, o); } }; var Xo = { $code: "en", $name: "English", $dir: "ltr", carousel: "Carousel", clearEntry: "Clear entry", close: "Close", copied: "Copied", copy: "Copy", currentValue: "Current value", error: "Error", goToSlide: (t, e) => `Go to slide ${t} of ${e}`, hidePassword: "Hide password", loading: "Loading", nextSlide: "Next slide", numOptionsSelected: (t) => t === 0 ? "No options selected" : t === 1 ? "1 option selected" : `${t} options selected`, previousSlide: "Previous slide", progress: "Progress", remove: "Remove", resize: "Resize", scrollToEnd: "Scroll to end", scrollToStart: "Scroll to start", selectAColorFromTheScreen: "Select a color from the screen", showPassword: "Show password", slideNum: (t) => `Slide ${t}`, toggleColorFormat: "Toggle color format" }; Ko(Xo); var Bi = Xo, ht = class extends Di { }; Ko(Bi); var Ue = ""; function xo(t) { Ue = t; } function Ri(t = "") { if (!Ue) { const e = [...document.getElementsByTagName("script")], o = e.find((i) => i.hasAttribute("data-shoelace")); if (o) xo(o.getAttribute("data-shoelace")); else { const i = e.find((r) => /shoelace(\.min)?\.js($|\?)/.test(r.src) || /shoelace-autoloader(\.min)?\.js($|\?)/.test(r.src)); let s = ""; i && (s = i.getAttribute("src")), xo(s.split("/").slice(0, -1).join("/")); } } return Ue.replace(/\/$/, "") + (t ? `/${t.replace(/^\//, "")}` : ""); } var Ni = { name: "default", resolver: (t) => Ri(`assets/icons/${t}.svg`) }, Vi = Ni, ko = { caret: ` <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <polyline points="6 9 12 15 18 9"></polyline> </svg> `, check: ` <svg part="checked-icon" class="checkbox__icon" viewBox="0 0 16 16"> <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round"> <g stroke="currentColor"> <g transform="translate(3.428571, 3.428571)"> <path d="M0,5.71428571 L3.42857143,9.14285714"></path> <path d="M9.14285714,0 L3.42857143,9.14285714"></path> </g> </g> </g> </svg> `, "chevron-down": ` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-down" viewBox="0 0 16 16"> <path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"/> </svg> `, "chevron-left": ` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-left" viewBox="0 0 16 16"> <path fill-rule="evenodd" d="M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z"/> </svg> `, "chevron-right": ` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-right" viewBox="0 0 16 16"> <path fill-rule="evenodd" d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"/> </svg> `, copy: ` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-copy" viewBox="0 0 16 16"> <path fill-rule="evenodd" d="M4 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V2Zm2-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1H6ZM2 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-1h1v1a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h1v1H2Z"/> </svg> `, eye: ` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye" viewBox="0 0 16 16"> <path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/> <path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/> </svg> `, "eye-slash": ` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye-slash" viewBox="0 0 16 16"> <path d="M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755-.165.165-.337.328-.517.486l.708.709z"/> <path d="M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"/> <path d="M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884-12-12 .708-.708 12 12-.708.708z"/> </svg> `, eyedropper: ` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eyedropper" viewBox="0 0 16 16"> <path d="M13.354.646a1.207 1.207 0 0 0-1.708 0L8.5 3.793l-.646-.647a.5.5 0 1 0-.708.708L8.293 5l-7.147 7.146A.5.5 0 0 0 1 12.5v1.793l-.854.853a.5.5 0 1 0 .708.707L1.707 15H3.5a.5.5 0 0 0 .354-.146L11 7.707l1.146 1.147a.5.5 0 0 0 .708-.708l-.647-.646 3.147-3.146a1.207 1.207 0 0 0 0-1.708l-2-2zM2 12.707l7-7L10.293 7l-7 7H2v-1.293z"></path> </svg> `, "grip-vertical": ` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-grip-vertical" viewBox="0 0 16 16"> <path d="M7 2a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zM7 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zM7 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"></path> </svg> `, indeterminate: ` <svg part="indeterminate-icon" class="checkbox__icon" viewBox="0 0 16 16"> <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round"> <g stroke="currentColor" stroke-width="2"> <g transform="translate(2.285714, 6.857143)"> <path d="M10.2857143,1.14285714 L1.14285714,1.14285714"></path> </g> </g> </g> </svg> `, "person-fill": ` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-person-fill" viewBox="0 0 16 16"> <path d="M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"/> </svg> `, "play-fill": ` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-play-fill" viewBox="0 0 16 16"> <path d="m11.596 8.697-6.363 3.692c-.54.313-1.233-.066-1.233-.697V4.308c0-.63.692-1.01 1.233-.696l6.363 3.692a.802.802 0 0 1 0 1.393z"></path> </svg> `, "pause-fill": ` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-pause-fill" viewBox="0 0 16 16"> <path d="M5.5 3.5A1.5 1.5 0 0 1 7 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5zm5 0A1.5 1.5 0 0 1 12 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5z"></path> </svg> `, radio: ` <svg part="checked-icon" class="radio__icon" viewBox="0 0 16 16"> <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g fill="currentColor"> <circle cx="8" cy="8" r="3.42857143"></circle> </g> </g> </svg> `, "star-fill": ` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-star-fill" viewBox="0 0 16 16"> <path d="M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z"/> </svg> `, "x-lg": ` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-lg" viewBox="0 0 16 16"> <path d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z"/> </svg> `, "x-circle-fill": ` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-circle-fill" viewBox="0 0 16 16"> <path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.354 4.646a.5.5 0 1 0-.708.708L7.293 8l-2.647 2.646a.5.5 0 0 0 .708.708L8 8.707l2.646 2.647a.5.5 0 0 0 .708-.708L8.707 8l2.647-2.646a.5.5 0 0 0-.708-.708L8 7.293 5.354 4.646z"></path> </svg> ` }, Ii = { name: "system", resolver: (t) => t in ko ? `data:image/svg+xml,${encodeURIComponent(ko[t])}` : "" }, Mi = Ii, Fi = [Vi, Mi], We = []; function Hi(t) { We.push(t); } function Ui(t) { We = We.filter((e) => e !== t); } function $o(t) { return Fi.find((e) => e.name === t); } var Wi = B` :host { display: inline-block; width: 1em; height: 1em; box-sizing: content-box !important; } svg { display: block; height: 100%; width: 100%; } `, Zo = Object.defineProperty, qi = Object.defineProperties, ji = Object.getOwnPropertyDescriptor, Ki = Object.getOwnPropertyDescriptors, Co = Object.getOwnPropertySymbols, Yi = Object.prototype.hasOwnProperty, Xi = Object.prototype.propertyIsEnumerable, Re = (t, e) => (e = Symbol[t]) ? e : Symbol.for("Symbol." + t), eo = (t) => { throw TypeError(t); }, So = (t, e, o) => e in t ? Zo(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o, Ot = (t, e) => { for (var o in e || (e = {})) Yi.call(e, o) && So(t, o, e[o]); if (Co) for (var o of Co(e)) Xi.call(e, o) && So(t, o, e[o]); return t; }, ke = (t, e) => qi(t, Ki(e)), l = (t, e, o, i) => { for (var s = i > 1 ? void 0 : i ? ji(e, o) : e, r = t.length - 1, n; r >= 0; r--) (n = t[r]) && (s = (i ? n(e, o, s) : n(s)) || s); return i && s && Zo(e, o, s), s; }, Go = (t, e, o) => e.has(t) || eo("Cannot " + o), Zi = (t, e, o) => (Go(t, e, "read from private field"), e.get(t)), Gi = (t, e, o) => e.has(t) ? eo("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, o), Ji = (t, e, o, i) => (Go(t, e, "write to private field"), e.set(t, o), o), Qi = function(t, e) { this[0] = t, this[1] = e; }, ts = (t) => { var e = t[Re("asyncIterator")], o = !1, i, s = {}; return e == null ? (e = t[Re("iterator")](), i = (r) => s[r] = (n) => e[r](n)) : (e = e.call(t), i = (r) => s[r] = (n) => { if (o) { if (o = !1, r === "throw") throw n; return n; } return o = !0, { done: !1, value: new Qi(new Promise((a) => { var u = e[r](n); u instanceof Object || eo("Object expected"), a(u); }), 1) }; }), s[Re("iterator")] = () => s, i("next"), "throw" in e ? i("throw") : s.throw = (r) => { throw r; }, "return" in e && i("return"), s; }; function T(t, e) { const o = Ot({ waitUntilFirstUpdate: !1 }, e); return (i, s) => { const { update: r } = i, n = Array.isArray(t) ? t : [t]; i.update = function(a) { n.forEach((u) => { const d = u; if (a.has(d)) { const h = a.get(d), p = this[d]; h !== p && (!o.waitUntilFirstUpdate || this.hasUpdated) && this[s](h, p); } }), r.call(this, a); }; }; } var H = B` :host { box-sizing: border-box; } :host *, :host *::before, :host *::after { box-sizing: inherit; } [hidden] { display: none !important; } `; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ const es = { attribute: !0, type: String, converter: Nt, reflect: !1, hasChanged: Ge }, os = (t = es, e, o) => { const { kind: i, metadata: s } = o; let r = globalThis.litPropertyMetadata.get(s); if (r === void 0 && globalThis.litPropertyMetadata.set(s, r = /* @__PURE__ */ new Map()), i === "setter" && ((t = Object.create(t)).wrapped = !0), r.set(o.name, t), i === "accessor") { const { name: n } = o; return { set(a) { const u = e.get.call(this); e.set.call(this, a), this.requestUpdate(n, u, t); }, init(a) { return a !== void 0 && this.C(n, void 0, t, a), a; } }; } if (i === "setter") { const { name: n } = o; return function(a) { const u = this[n]; e.call(this, a), this.requestUpdate(n, u, t); }; } throw Error("Unsupported decorator location: " + i); }; function c(t) { return (e, o) => typeof o == "object" ? os(t, e, o) : ((i, s, r) => { const n = s.hasOwnProperty(r); return s.constructor.createProperty(r, i), n ? Object.getOwnPropertyDescriptor(s, r) : void 0; })(t, e, o); } /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ function R(t) { return c({ ...t, state: !0, attribute: !1 }); } /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ const is = (t, e, o) => (o.configurable = !0, o.enumerable = !0, Reflect.decorate && typeof e != "object" && Object.defineProperty(t, e, o), o); /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ function O(t, e) { return (o, i, s) => { const r = (n) => { var a; return ((a = n.renderRoot) == null ? void 0 : a.querySelector(t)) ?? null; }; return is(o, i, { get() { return r(this); } }); }; } var ue, L = class extends Zt { constructor() { super(), Gi(this, ue, !1), this.initialReflectedProperties = /* @__PURE__ */ new Map(), Object.entries(this.constructor.dependencies).forEach(([t, e]) => { this.constructor.define(t, e); }); } emit(t, e) { const o = new CustomEvent(t, Ot({ bubbles: !0, cancelable: !1, composed: !0, detail: {} }, e)); return this.dispatchEvent(o), o; } /* eslint-enable */ static define(t, e = this, o = {}) { const i = customElements.get(t); if (!i) { try { customElements.define(t, e, o); } catch { customElements.define(t, class extends e { }, o); } return; } let s = " (unknown version)", r = s; "version" in e && e.version && (s = " v" + e.version), "version" in i && i.version && (r = " v" + i.version), !(s && r && s === r) && console.warn( `Attempted to register <${t}>${s}, but <${t}>${r} has already been registered.` ); } attributeChangedCallback(t, e, o) { Zi(this, ue) || (this.constructor.elementProperties.forEach( (i, s) => { i.reflect && this[s] != null && this.initialReflectedProperties.set(s, this[s]); } ), Ji(this, ue, !0)), super.attributeChangedCallback(t, e, o); } willUpdate(t) { super.willUpdate(t), this.initialReflectedProperties.forEach((e, o) => { t.has(o) && this[o] == null && (this[o] = e); }); } }; ue = /* @__PURE__ */ new WeakMap(); L.version = "2.20.1"; L.dependencies = {}; l([ c() ], L.prototype, "dir", 2); l([ c() ], L.prototype, "lang", 2); /** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ const ss = (t, e) => (t == null ? void 0 : t._$litType$) !== void 0, rs = (t) => t.strings === void 0, ns = {}, ls = (t, e = ns) => t._$AH = e; var Wt = Symbol(), ne = Symbol(), Ne, Ve = /* @__PURE__ */ new Map(), V = class extends L { constructor() { super(...arguments), this.initialRender = !1, this.svg = null, this.label = "", this.library = "default"; } /** Given a URL, this function returns the resulting SVG element or an appropriate error symbol. */ async resolveIcon(t, e) { var o; let i; if (e != null && e.spriteSheet) return this.svg = $`<svg part="svg"> <use part="use" href="${t}"></use> </svg>`, this.svg; try { if (i = await fetch(t, { mode: "cors" }), !i.ok) return i.status === 410 ? Wt : ne; } catch { return ne; } try { const s = document.createElement("div"); s.innerHTML = await i.text(); const r = s.firstElementChild; if (((o = r == null ? void 0 : r.tagName) == null ? void 0 : o.toLowerCase()) !== "svg") return Wt; Ne || (Ne = new DOMParser()); const a = Ne.parseFromString(r.outerHTML, "text/html").body.querySelector("svg"); return a ? (a.part.add("svg"), document.adoptNode(a)) : Wt; } catch { return Wt; } } connectedCallback() { super.connectedCallback(), Hi(this); } firstUpdated() { this.initialRender = !0, this.setIcon(); } disconnectedCallback() { super.disconnectedCallback(), Ui(this); } getIconSource() { const t = $o(this.library); return this.name && t ? { url: t.resolver(this.name), fromLibrary: !0 } : { url: this.src, fromLibrary: !1 }; } handleLabelChange() { typeof this.label == "string" && this.label.length > 0 ? (this.setAttribute("role", "img"), this.setAttribute("aria-label", this.label), this.removeAttribute("aria-hidden")) : (this.removeAttribute("role"), this.removeAttribute("aria-label"), this.setAttribute("aria-hidden", "true")); } async setIcon() { var t; const { url: e, fromLibrary: o } = this.getIconSource(), i = o ? $o(this.library) : void 0; if (!e) { this.svg = null; return; } let s = Ve.get(e); if (s || (s = this.resolveIcon(e, i), Ve.set(e, s)), !this.initialRender) return; const r = await s; if (r === ne && Ve.delete(e), e === this.getIconSource().url) { if (ss(r)) { if (this.svg = r, i) { await this.updateComplete; const n = this.shadowRoot.querySelector("[part='svg']"); typeof i.mutator == "function" && n && i.mutator(n); } return; } switch (r) { case ne: case Wt: this.svg = null, this.emit("sl-error"); break; default: this.svg = r.cloneNode(!0), (t = i == null ? void 0 : i.mutator) == null || t.call(i, this.svg), this.emit("sl-load"); } } } render() { return this.svg; } }; V.styles = [H, Wi]; l([ R() ], V.prototype, "svg", 2); l([ c({ reflect: !0 }) ], V.prototype, "name", 2); l([ c() ], V.prototype, "src", 2); l([ c() ], V.prototype, "label", 2); l([ c({ reflect: !0 }) ], V.prototype, "library", 2); l([ T("label") ], V.prototype, "handleLabelChange", 1); l([ T(["name", "src", "library"]) ], V.prototype, "setIcon", 1); var Tt = class extends L { constructor() { super(...arguments), this.localize = new ht(this), this.separatorDir = this.localize.dir(), this.label = ""; } // Generates a clone of the separator element to use for each breadcrumb item getSeparator() { const e = this.separatorSlot.assignedElements({ flatten: !0 })[0].cloneNode(!0); return [e, ...e.querySelectorAll("[id]")].forEach((o) => o.removeAttribute("id")), e.setAttribute("data-default", ""), e.slot = "separator", e; } handleSlotChange() { const t = [...this.defaultSlot.assignedElements({ flatten: !0 })].filter( (e) => e.tagName.toLowerCase() === "sl-breadcrumb-item" ); t.forEach((e, o) => { const i = e.querySelector('[slot="separator"]'); i === null ? e.append(this.getSeparator()) : i.hasAttribute("data-default") && i.replaceWith(this.getSeparator()), o === t.length - 1 ? e.setAttribute("aria-current", "page") : e.removeAttribute("aria-current"); }); } render() { return this.separatorDir !== this.localize.dir() && (this.separatorDir = this.localize.dir(), this.updateComplete.then(() => this.handleSlotChange())), $` <nav part="base" class="breadcrumb" aria-label=${this.label}> <slot @slotchange=${this.handleSlotChange}></slot> </nav> <span hidden aria-hidden="true"> <slot name="separator"> <sl-icon name=${this.localize.dir() === "rtl" ? "chevron-left" : "chevron-right"} library="system"></sl-icon> </slot> </span> `; } }; Tt.styles = [H, Pi]; Tt.dependencies = { "sl-icon": V }; l([ O("slot") ], Tt.prototype, "defaultSlot", 2); l([ O('slot[name="separator"]') ], Tt.prototype, "separatorSlot", 2); l([ c() ], Tt.prototype, "label", 2); /** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ const as = /* @__PURE__ */ new Set(["children", "localName", "ref", "style", "className"]), Ao = /* @__PURE__ */ new WeakMap(), Eo = (t, e, o, i, s) => { const r = s == null ? void 0 : s[e]; r === void 0 ? (t[e] = o, o == null && e in HTMLElement.prototype && t.removeAttribute(e)) : o !== i && ((n, a, u) => { let d = Ao.get(n); d === void 0 && Ao.set(n, d = /* @__PURE__ */ new Map()); let h = d.get(a); u !== void 0 ? h === void 0 ? (d.set(a, h = { handleEvent: u }), n.addEventListener(a, h)) : h.handleEvent = u : h !== void 0 && (d.delete(a), n.removeEventListener(a, h)); })(t, r, o); }, j = ({ react: t, tagName: e, elementClass: o, events: i, displayName: s }) => { const r = new Set(Object.keys(i ?? {})), n = t.forwardRef(((a, u) => { const d = t.useRef(/* @__PURE__ */ new Map()), h = t.useRef(null), p = {}, m = {}; for (const [f, b] of Object.entries(a)) as.has(f) ? p[f === "className" ? "class" : f] = b : r.has(f) || f in o.prototype ? m[f] = b : p[f] = b; return t.useLayoutEffect((() => { if (h.current === null) return; const f = /* @__PURE__ */ new Map(); for (const b in m) Eo(h.current, b, a[b], d.current.get(b), i), d.current.delete(b), f.set(b, a[b]); for (const [b, v] of d.current) Eo(h.current, b, void 0, v, i); d.current = f; })), t.useLayoutEffect((() => { var f; (f = h.current) == null || f.removeAttribute("defer-hydration"); }), []), p.suppressHydrationWarning = !0, t.createElement(e, { ...p, ref: t.useCallback(((f) => { h.current = f, typeof u == "function" ? u(f) : u !== null && (u.current = f); }), [u]) }); })); return n.displayName = s ?? o.name, n; }; var cs = "sl-breadcrumb"; Tt.define("sl-breadcrumb"); var us = j({ tagName: cs, elementClass: Tt, react: q, events: {}, displayName: "SlBreadcrumb" }), pn = us, ds = B` :host { display: inline-flex; } .breadcrumb-item { display: inline-flex; align-items: center; font-family: var(--sl-font-sans); font-size: var(--sl-font-size-small); font-weight: var(--sl-font-weight-semibold); color: var(--sl-color-neutral-600); line-height: var(--sl-line-height-normal); white-space: nowrap; } .breadcrumb-item__label { display: inline-block; font-family: inherit; font-size: inherit; font-weight: inherit; line-height: inherit; text-decoration: none; color: inherit; background: none; border: none; border-radius: var(--sl-border-radius-medium); padding: 0; margin: 0; cursor: pointer; transition: var(--sl-transition-fast) --color; } :host(:not(:last-of-type)) .breadcrumb-item__label { color: var(--sl-color-primary-600); } :host(:not(:last-of-type)) .breadcrumb-item__label:hover { color: var(--sl-color-primary-500); } :host(:not(:last-of-type)) .breadcrumb-item__label:active { color: var(--sl-color-primary-600); } .breadcrumb-item__label:focus { outline: none; } .breadcrumb-item__label:focus-visible { outline: var(--sl-focus-ring); outline-offset: var(--sl-focus-ring-offset); } .breadcrumb-item__prefix, .breadcrumb-item__suffix { display: none; flex: 0 0 auto; display: flex; align-items: center; } .breadcrumb-item--has-prefix .breadcrumb-item__prefix { display: inline-flex; margin-inline-end: var(--sl-spacing-x-small); } .breadcrumb-item--has-suffix .breadcrumb-item__suffix { display: inline-flex; margin-inline-start: var(--sl-spacing-x-small); } :host(:last-of-type) .breadcrumb-item__separator { display: none; } .breadcrumb-item__separator { display: inline-flex; align-items: center; margin: 0 var(--sl-spacing-x-small); user-select: none; -webkit-user-select: none; } `, Lt = class { constructor(t, ...e) { this.slotNames = [], this.handleSlotChange = (o) => { const i = o.target; (this.slotNames.includes("[default]") && !i.name || i.name && this.slotNames.includes(i.name)) && this.host.requestUpdate(); }, (this.host = t).addController(this), this.slotNames = e; } hasDefaultSlot() { return [...this.host.childNodes].some((t) => { if (t.nodeType === t.TEXT_NODE && t.textContent.trim() !== "") return !0; if (t.nodeType === t.ELEMENT_NODE) { const e = t; if (e.tagName.toLowerCase() === "sl-visually-hidden") return !1; if (!e.hasAttribute("slot")) return !0; } return !1; }); } hasNamedSlot(t) { return this.host.querySelector(`:scope > [slot="${t}"]`) !== nul