/**
 * @license
 * Copyright 2019 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */
const H = window, W = H.ShadowRoot && (H.ShadyCSS === void 0 || H.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, ae = Symbol(), q = /* @__PURE__ */ new WeakMap();
let me = class {
  constructor(e, t, i) {
    if (this._$cssResult$ = !0, i !== ae)
      throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
    this.cssText = e, this.t = t;
  }
  get styleSheet() {
    let e = this.o;
    const t = this.t;
    if (W && e === void 0) {
      const i = t !== void 0 && t.length === 1;
      i && (e = q.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), i && q.set(t, e));
    }
    return e;
  }
  toString() {
    return this.cssText;
  }
};
const Ae = (s) => new me(typeof s == "string" ? s : s + "", void 0, ae), _e = (s, e) => {
  W ? s.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet) : e.forEach((t) => {
    const i = document.createElement("style"), r = H.litNonce;
    r !== void 0 && i.setAttribute("nonce", r), i.textContent = t.cssText, s.appendChild(i);
  });
}, F = W ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((e) => {
  let t = "";
  for (const i of e.cssRules)
    t += i.cssText;
  return Ae(t);
})(s) : s;
/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */
var L;
const M = window, Q = M.trustedTypes, ye = Q ? Q.emptyScript : "", X = M.reactiveElementPolyfillSupport, Z = { toAttribute(s, e) {
  switch (e) {
    case Boolean:
      s = s ? ye : null;
      break;
    case Object:
    case Array:
      s = s == null ? s : JSON.stringify(s);
  }
  return s;
}, fromAttribute(s, e) {
  let t = s;
  switch (e) {
    case Boolean:
      t = s !== null;
      break;
    case Number:
      t = s === null ? null : Number(s);
      break;
    case Object:
    case Array:
      try {
        t = JSON.parse(s);
      } catch {
        t = null;
      }
  }
  return t;
} }, he = (s, e) => e !== s && (e == e || s == s), D = { attribute: !0, type: String, converter: Z, reflect: !1, hasChanged: he };
let y = class extends HTMLElement {
  constructor() {
    super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this.u();
  }
  static addInitializer(e) {
    var t;
    this.finalize(), ((t = this.h) !== null && t !== void 0 ? t : this.h = []).push(e);
  }
  static get observedAttributes() {
    this.finalize();
    const e = [];
    return this.elementProperties.forEach((t, i) => {
      const r = this._$Ep(i, t);
      r !== void 0 && (this._$Ev.set(r, i), e.push(r));
    }), e;
  }
  static createProperty(e, t = D) {
    if (t.state && (t.attribute = !1), this.finalize(), this.elementProperties.set(e, t), !t.noAccessor && !this.prototype.hasOwnProperty(e)) {
      const i = typeof e == "symbol" ? Symbol() : "__" + e, r = this.getPropertyDescriptor(e, i, t);
      r !== void 0 && Object.defineProperty(this.prototype, e, r);
    }
  }
  static getPropertyDescriptor(e, t, i) {
    return { get() {
      return this[t];
    }, set(r) {
      const n = this[e];
      this[t] = r, this.requestUpdate(e, n, i);
    }, configurable: !0, enumerable: !0 };
  }
  static getPropertyOptions(e) {
    return this.elementProperties.get(e) || D;
  }
  static finalize() {
    if (this.hasOwnProperty("finalized"))
      return !1;
    this.finalized = !0;
    const e = Object.getPrototypeOf(this);
    if (e.finalize(), e.h !== void 0 && (this.h = [...e.h]), this.elementProperties = new Map(e.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) {
      const t = this.properties, i = [...Object.getOwnPropertyNames(t), ...Object.getOwnPropertySymbols(t)];
      for (const r of i)
        this.createProperty(r, t[r]);
    }
    return this.elementStyles = this.finalizeStyles(this.styles), !0;
  }
  static finalizeStyles(e) {
    const t = [];
    if (Array.isArray(e)) {
      const i = new Set(e.flat(1 / 0).reverse());
      for (const r of i)
        t.unshift(F(r));
    } else
      e !== void 0 && t.push(F(e));
    return t;
  }
  static _$Ep(e, t) {
    const i = t.attribute;
    return i === !1 ? void 0 : typeof i == "string" ? i : typeof e == "string" ? e.toLowerCase() : void 0;
  }
  u() {
    var e;
    this._$E_ = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$Eg(), this.requestUpdate(), (e = this.constructor.h) === null || e === void 0 || e.forEach((t) => t(this));
  }
  addController(e) {
    var t, i;
    ((t = this._$ES) !== null && t !== void 0 ? t : this._$ES = []).push(e), this.renderRoot !== void 0 && this.isConnected && ((i = e.hostConnected) === null || i === void 0 || i.call(e));
  }
  removeController(e) {
    var t;
    (t = this._$ES) === null || t === void 0 || t.splice(this._$ES.indexOf(e) >>> 0, 1);
  }
  _$Eg() {
    this.constructor.elementProperties.forEach((e, t) => {
      this.hasOwnProperty(t) && (this._$Ei.set(t, this[t]), delete this[t]);
    });
  }
  createRenderRoot() {
    var e;
    const t = (e = this.shadowRoot) !== null && e !== void 0 ? e : this.attachShadow(this.constructor.shadowRootOptions);
    return _e(t, this.constructor.elementStyles), t;
  }
  connectedCallback() {
    var e;
    this.renderRoot === void 0 && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (e = this._$ES) === null || e === void 0 || e.forEach((t) => {
      var i;
      return (i = t.hostConnected) === null || i === void 0 ? void 0 : i.call(t);
    });
  }
  enableUpdating(e) {
  }
  disconnectedCallback() {
    var e;
    (e = this._$ES) === null || e === void 0 || e.forEach((t) => {
      var i;
      return (i = t.hostDisconnected) === null || i === void 0 ? void 0 : i.call(t);
    });
  }
  attributeChangedCallback(e, t, i) {
    this._$AK(e, i);
  }
  _$EO(e, t, i = D) {
    var r;
    const n = this.constructor._$Ep(e, i);
    if (n !== void 0 && i.reflect === !0) {
      const o = (((r = i.converter) === null || r === void 0 ? void 0 : r.toAttribute) !== void 0 ? i.converter : Z).toAttribute(t, i.type);
      this._$El = e, o == null ? this.removeAttribute(n) : this.setAttribute(n, o), this._$El = null;
    }
  }
  _$AK(e, t) {
    var i;
    const r = this.constructor, n = r._$Ev.get(e);
    if (n !== void 0 && this._$El !== n) {
      const o = r.getPropertyOptions(n), h = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((i = o.converter) === null || i === void 0 ? void 0 : i.fromAttribute) !== void 0 ? o.converter : Z;
      this._$El = n, this[n] = h.fromAttribute(t, o.type), this._$El = null;
    }
  }
  requestUpdate(e, t, i) {
    let r = !0;
    e !== void 0 && (((i = i || this.constructor.getPropertyOptions(e)).hasChanged || he)(this[e], t) ? (this._$AL.has(e) || this._$AL.set(e, t), i.reflect === !0 && this._$El !== e && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(e, i))) : r = !1), !this.isUpdatePending && r && (this._$E_ = this._$Ej());
  }
  async _$Ej() {
    this.isUpdatePending = !0;
    try {
      await this._$E_;
    } catch (t) {
      Promise.reject(t);
    }
    const e = this.scheduleUpdate();
    return e != null && await e, !this.isUpdatePending;
  }
  scheduleUpdate() {
    return this.performUpdate();
  }
  performUpdate() {
    var e;
    if (!this.isUpdatePending)
      return;
    this.hasUpdated, this._$Ei && (this._$Ei.forEach((r, n) => this[n] = r), this._$Ei = void 0);
    let t = !1;
    const i = this._$AL;
    try {
      t = this.shouldUpdate(i), t ? (this.willUpdate(i), (e = this._$ES) === null || e === void 0 || e.forEach((r) => {
        var n;
        return (n = r.hostUpdate) === null || n === void 0 ? void 0 : n.call(r);
      }), this.update(i)) : this._$Ek();
    } catch (r) {
      throw t = !1, this._$Ek(), r;
    }
    t && this._$AE(i);
  }
  willUpdate(e) {
  }
  _$AE(e) {
    var t;
    (t = this._$ES) === null || t === void 0 || t.forEach((i) => {
      var r;
      return (r = i.hostUpdated) === null || r === void 0 ? void 0 : r.call(i);
    }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
  }
  _$Ek() {
    this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
  }
  get updateComplete() {
    return this.getUpdateComplete();
  }
  getUpdateComplete() {
    return this._$E_;
  }
  shouldUpdate(e) {
    return !0;
  }
  update(e) {
    this._$EC !== void 0 && (this._$EC.forEach((t, i) => this._$EO(i, this[i], t)), this._$EC = void 0), this._$Ek();
  }
  updated(e) {
  }
  firstUpdated(e) {
  }
};
y.finalized = !0, y.elementProperties = /* @__PURE__ */ new Map(), y.elementStyles = [], y.shadowRootOptions = { mode: "open" }, X == null || X({ ReactiveElement: y }), ((L = M.reactiveElementVersions) !== null && L !== void 0 ? L : M.reactiveElementVersions = []).push("1.5.0");
/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */
var V;
const I = window, b = I.trustedTypes, ee = b ? b.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, m = `lit$${(Math.random() + "").slice(9)}$`, ce = "?" + m, ge = `<${ce}>`, E = document, R = (s = "") => E.createComment(s), T = (s) => s === null || typeof s != "object" && typeof s != "function", de = Array.isArray, be = (s) => de(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", x = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, te = /-->/g, se = />/g, A = RegExp(`>|[ 	
\f\r](?:([^\\s"'>=/]+)([ 	
\f\r]*=[ 	
\f\r]*(?:[^ 	
\f\r"'\`<>=]|("|')|))|$)`, "g"), ie = /'/g, re = /"/g, ue = /^(?:script|style|textarea|title)$/i, Ee = (s) => (e, ...t) => ({ _$litType$: s, strings: e, values: t }), Je = Ee(1), S = Symbol.for("lit-noChange"), u = Symbol.for("lit-nothing"), ne = /* @__PURE__ */ new WeakMap(), g = E.createTreeWalker(E, 129, null, !1), Se = (s, e) => {
  const t = s.length - 1, i = [];
  let r, n = e === 2 ? "<svg>" : "", o = x;
  for (let l = 0; l < t; l++) {
    const a = s[l];
    let f, c, d = -1, p = 0;
    for (; p < a.length && (o.lastIndex = p, c = o.exec(a), c !== null); )
      p = o.lastIndex, o === x ? c[1] === "!--" ? o = te : c[1] !== void 0 ? o = se : c[2] !== void 0 ? (ue.test(c[2]) && (r = RegExp("</" + c[2], "g")), o = A) : c[3] !== void 0 && (o = A) : o === A ? c[0] === ">" ? (o = r ?? x, d = -1) : c[1] === void 0 ? d = -2 : (d = o.lastIndex - c[2].length, f = c[1], o = c[3] === void 0 ? A : c[3] === '"' ? re : ie) : o === re || o === ie ? o = A : o === te || o === se ? o = x : (o = A, r = void 0);
    const P = o === A && s[l + 1].startsWith("/>") ? " " : "";
    n += o === x ? a + ge : d >= 0 ? (i.push(f), a.slice(0, d) + "$lit$" + a.slice(d) + m + P) : a + m + (d === -2 ? (i.push(void 0), l) : P);
  }
  const h = n + (s[t] || "<?>") + (e === 2 ? "</svg>" : "");
  if (!Array.isArray(s) || !s.hasOwnProperty("raw"))
    throw Error("invalid template strings array");
  return [ee !== void 0 ? ee.createHTML(h) : h, i];
};
class N {
  constructor({ strings: e, _$litType$: t }, i) {
    let r;
    this.parts = [];
    let n = 0, o = 0;
    const h = e.length - 1, l = this.parts, [a, f] = Se(e, t);
    if (this.el = N.createElement(a, i), g.currentNode = this.el.content, t === 2) {
      const c = this.el.content, d = c.firstChild;
      d.remove(), c.append(...d.childNodes);
    }
    for (; (r = g.nextNode()) !== null && l.length < h; ) {
      if (r.nodeType === 1) {
        if (r.hasAttributes()) {
          const c = [];
          for (const d of r.getAttributeNames())
            if (d.endsWith("$lit$") || d.startsWith(m)) {
              const p = f[o++];
              if (c.push(d), p !== void 0) {
                const P = r.getAttribute(p.toLowerCase() + "$lit$").split(m), j = /([.?@])?(.*)/.exec(p);
                l.push({ type: 1, index: n, name: j[2], strings: P, ctor: j[1] === "." ? Ce : j[1] === "?" ? xe : j[1] === "@" ? Re : B });
              } else
                l.push({ type: 6, index: n });
            }
          for (const d of c)
            r.removeAttribute(d);
        }
        if (ue.test(r.tagName)) {
          const c = r.textContent.split(m), d = c.length - 1;
          if (d > 0) {
            r.textContent = b ? b.emptyScript : "";
            for (let p = 0; p < d; p++)
              r.append(c[p], R()), g.nextNode(), l.push({ type: 2, index: ++n });
            r.append(c[d], R());
          }
        }
      } else if (r.nodeType === 8)
        if (r.data === ce)
          l.push({ type: 2, index: n });
        else {
          let c = -1;
          for (; (c = r.data.indexOf(m, c + 1)) !== -1; )
            l.push({ type: 7, index: n }), c += m.length - 1;
        }
      n++;
    }
  }
  static createElement(e, t) {
    const i = E.createElement("template");
    return i.innerHTML = e, i;
  }
}
function w(s, e, t = s, i) {
  var r, n, o, h;
  if (e === S)
    return e;
  let l = i !== void 0 ? (r = t._$Co) === null || r === void 0 ? void 0 : r[i] : t._$Cl;
  const a = T(e) ? void 0 : e._$litDirective$;
  return (l == null ? void 0 : l.constructor) !== a && ((n = l == null ? void 0 : l._$AO) === null || n === void 0 || n.call(l, !1), a === void 0 ? l = void 0 : (l = new a(s), l._$AT(s, t, i)), i !== void 0 ? ((o = (h = t)._$Co) !== null && o !== void 0 ? o : h._$Co = [])[i] = l : t._$Cl = l), l !== void 0 && (e = w(s, l._$AS(s, e.values), l, i)), e;
}
class we {
  constructor(e, t) {
    this.u = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
  }
  get parentNode() {
    return this._$AM.parentNode;
  }
  get _$AU() {
    return this._$AM._$AU;
  }
  v(e) {
    var t;
    const { el: { content: i }, parts: r } = this._$AD, n = ((t = e == null ? void 0 : e.creationScope) !== null && t !== void 0 ? t : E).importNode(i, !0);
    g.currentNode = n;
    let o = g.nextNode(), h = 0, l = 0, a = r[0];
    for (; a !== void 0; ) {
      if (h === a.index) {
        let f;
        a.type === 2 ? f = new U(o, o.nextSibling, this, e) : a.type === 1 ? f = new a.ctor(o, a.name, a.strings, this, e) : a.type === 6 && (f = new Te(o, this, e)), this.u.push(f), a = r[++l];
      }
      h !== (a == null ? void 0 : a.index) && (o = g.nextNode(), h++);
    }
    return n;
  }
  p(e) {
    let t = 0;
    for (const i of this.u)
      i !== void 0 && (i.strings !== void 0 ? (i._$AI(e, i, t), t += i.strings.length - 2) : i._$AI(e[t])), t++;
  }
}
class U {
  constructor(e, t, i, r) {
    var n;
    this.type = 2, this._$AH = u, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = i, this.options = r, this._$Cm = (n = r == null ? void 0 : r.isConnected) === null || n === void 0 || n;
  }
  get _$AU() {
    var e, t;
    return (t = (e = this._$AM) === null || e === void 0 ? void 0 : e._$AU) !== null && t !== void 0 ? t : this._$Cm;
  }
  get parentNode() {
    let e = this._$AA.parentNode;
    const t = this._$AM;
    return t !== void 0 && e.nodeType === 11 && (e = t.parentNode), e;
  }
  get startNode() {
    return this._$AA;
  }
  get endNode() {
    return this._$AB;
  }
  _$AI(e, t = this) {
    e = w(this, e, t), T(e) ? e === u || e == null || e === "" ? (this._$AH !== u && this._$AR(), this._$AH = u) : e !== this._$AH && e !== S && this.g(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : be(e) ? this.k(e) : this.g(e);
  }
  O(e, t = this._$AB) {
    return this._$AA.parentNode.insertBefore(e, t);
  }
  T(e) {
    this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
  }
  g(e) {
    this._$AH !== u && T(this._$AH) ? this._$AA.nextSibling.data = e : this.T(E.createTextNode(e)), this._$AH = e;
  }
  $(e) {
    var t;
    const { values: i, _$litType$: r } = e, n = typeof r == "number" ? this._$AC(e) : (r.el === void 0 && (r.el = N.createElement(r.h, this.options)), r);
    if (((t = this._$AH) === null || t === void 0 ? void 0 : t._$AD) === n)
      this._$AH.p(i);
    else {
      const o = new we(n, this), h = o.v(this.options);
      o.p(i), this.T(h), this._$AH = o;
    }
  }
  _$AC(e) {
    let t = ne.get(e.strings);
    return t === void 0 && ne.set(e.strings, t = new N(e)), t;
  }
  k(e) {
    de(this._$AH) || (this._$AH = [], this._$AR());
    const t = this._$AH;
    let i, r = 0;
    for (const n of e)
      r === t.length ? t.push(i = new U(this.O(R()), this.O(R()), this, this.options)) : i = t[r], i._$AI(n), r++;
    r < t.length && (this._$AR(i && i._$AB.nextSibling, r), t.length = r);
  }
  _$AR(e = this._$AA.nextSibling, t) {
    var i;
    for ((i = this._$AP) === null || i === void 0 || i.call(this, !1, !0, t); e && e !== this._$AB; ) {
      const r = e.nextSibling;
      e.remove(), e = r;
    }
  }
  setConnected(e) {
    var t;
    this._$AM === void 0 && (this._$Cm = e, (t = this._$AP) === null || t === void 0 || t.call(this, e));
  }
}
class B {
  constructor(e, t, i, r, n) {
    this.type = 1, this._$AH = u, this._$AN = void 0, this.element = e, this.name = t, this._$AM = r, this.options = n, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = u;
  }
  get tagName() {
    return this.element.tagName;
  }
  get _$AU() {
    return this._$AM._$AU;
  }
  _$AI(e, t = this, i, r) {
    const n = this.strings;
    let o = !1;
    if (n === void 0)
      e = w(this, e, t, 0), o = !T(e) || e !== this._$AH && e !== S, o && (this._$AH = e);
    else {
      const h = e;
      let l, a;
      for (e = n[0], l = 0; l < n.length - 1; l++)
        a = w(this, h[i + l], t, l), a === S && (a = this._$AH[l]), o || (o = !T(a) || a !== this._$AH[l]), a === u ? e = u : e !== u && (e += (a ?? "") + n[l + 1]), this._$AH[l] = a;
    }
    o && !r && this.j(e);
  }
  j(e) {
    e === u ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
  }
}
class Ce extends B {
  constructor() {
    super(...arguments), this.type = 3;
  }
  j(e) {
    this.element[this.name] = e === u ? void 0 : e;
  }
}
const Oe = b ? b.emptyScript : "";
class xe extends B {
  constructor() {
    super(...arguments), this.type = 4;
  }
  j(e) {
    e && e !== u ? this.element.setAttribute(this.name, Oe) : this.element.removeAttribute(this.name);
  }
}
class Re extends B {
  constructor(e, t, i, r, n) {
    super(e, t, i, r, n), this.type = 5;
  }
  _$AI(e, t = this) {
    var i;
    if ((e = (i = w(this, e, t, 0)) !== null && i !== void 0 ? i : u) === S)
      return;
    const r = this._$AH, n = e === u && r !== u || e.capture !== r.capture || e.once !== r.once || e.passive !== r.passive, o = e !== u && (r === u || n);
    n && this.element.removeEventListener(this.name, this, r), o && this.element.addEventListener(this.name, this, e), this._$AH = e;
  }
  handleEvent(e) {
    var t, i;
    typeof this._$AH == "function" ? this._$AH.call((i = (t = this.options) === null || t === void 0 ? void 0 : t.host) !== null && i !== void 0 ? i : this.element, e) : this._$AH.handleEvent(e);
  }
}
class Te {
  constructor(e, t, i) {
    this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = i;
  }
  get _$AU() {
    return this._$AM._$AU;
  }
  _$AI(e) {
    w(this, e);
  }
}
const oe = I.litHtmlPolyfillSupport;
oe == null || oe(N, U), ((V = I.litHtmlVersions) !== null && V !== void 0 ? V : I.litHtmlVersions = []).push("2.5.0");
const Ne = (s, e, t) => {
  var i, r;
  const n = (i = t == null ? void 0 : t.renderBefore) !== null && i !== void 0 ? i : e;
  let o = n._$litPart$;
  if (o === void 0) {
    const h = (r = t == null ? void 0 : t.renderBefore) !== null && r !== void 0 ? r : null;
    n._$litPart$ = o = new U(e.insertBefore(R(), h), h, void 0, t ?? {});
  }
  return o._$AI(s), o;
};
/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */
var Y, G;
class k extends y {
  constructor() {
    super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
  }
  createRenderRoot() {
    var e, t;
    const i = super.createRenderRoot();
    return (e = (t = this.renderOptions).renderBefore) !== null && e !== void 0 || (t.renderBefore = i.firstChild), i;
  }
  update(e) {
    const t = this.render();
    this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = Ne(t, this.renderRoot, this.renderOptions);
  }
  connectedCallback() {
    var e;
    super.connectedCallback(), (e = this._$Do) === null || e === void 0 || e.setConnected(!0);
  }
  disconnectedCallback() {
    var e;
    super.disconnectedCallback(), (e = this._$Do) === null || e === void 0 || e.setConnected(!1);
  }
  render() {
    return S;
  }
}
k.finalized = !0, k._$litElement$ = !0, (Y = globalThis.litElementHydrateSupport) === null || Y === void 0 || Y.call(globalThis, { LitElement: k });
const le = globalThis.litElementPolyfillSupport;
le == null || le({ LitElement: k });
((G = globalThis.litElementVersions) !== null && G !== void 0 ? G : globalThis.litElementVersions = []).push("3.2.2");
/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */
const qe = (s) => (e) => typeof e == "function" ? ((t, i) => (customElements.define(t, i), i))(s, e) : ((t, i) => {
  const { kind: r, elements: n } = i;
  return { kind: r, elements: n, finisher(o) {
    customElements.define(t, o);
  } };
})(s, e);
/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */
const Ue = (s, e) => e.kind === "method" && e.descriptor && !("value" in e.descriptor) ? { ...e, finisher(t) {
  t.createProperty(e.key, s);
} } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: e.key, initializer() {
  typeof e.initializer == "function" && (this[e.key] = e.initializer.call(this));
}, finisher(t) {
  t.createProperty(e.key, s);
} };
function Fe(s) {
  return (e, t) => t !== void 0 ? ((i, r, n) => {
    r.constructor.createProperty(n, i);
  })(s, e, t) : Ue(s, e);
}
/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */
var K;
((K = window.HTMLSlotElement) === null || K === void 0 ? void 0 : K.prototype.assignedElements) != null;
const Pe = (s = "") => {
  if (!s)
    return "";
  const e = s.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g);
  return e ? e.map((t) => t.toLowerCase()).join("-") : "";
}, pe = (s) => typeof s == "object" && Array.isArray(s), J = (s) => {
  if (pe(s)) {
    let e = !0;
    return s.forEach((t) => {
      typeof t != "string" && (e = !1);
    }), e;
  } else
    return !1;
}, C = (s) => typeof s == "string", fe = (s) => [
  ...new Set(s.map((e) => e && typeof e == "string" && e.includes(" ") ? fe(e.split(" ")) : (e && typeof e == "string" ? e.trim() : null) || "").flat().filter((e) => e !== ""))
], je = (s) => s == null ? !0 : s !== void 0 ? !!s : !1, z = {
  ARRAY: "array",
  STRING: "string",
  AUTO: "auto"
}, v = {
  STRING: "string",
  ARRAY: "array",
  OBJECT: "object",
  NONE: "none"
}, He = (s) => C(s) ? s : "", ke = (s) => C(s) || J(s) ? s : "", Me = (s) => {
  if (typeof s != "object" && !Array.isArray(s) && s !== null)
    return !1;
  const e = [
    "b",
    "block",
    "e",
    "element",
    "m",
    "modifier",
    "s",
    "show"
  ];
  return ![
    ...new Set(Object.keys(s).find((i) => !e.includes(i)))
  ].length;
}, Ie = (s) => !!(pe(s) && C(s[0]) && (J(s[1]) || C(s[1]))), Be = (s) => !C(s) && s[2] !== void 0 && !s[2], ze = (s, e, t = {}) => {
  const i = [];
  return O(s, He(e[0]), ke(e[1]), Object.assign(Object.assign({}, t), { return: z.ARRAY })).forEach((n) => {
    i.push(n);
  }), i;
}, Le = (s, e, t = {}) => {
  const i = {
    block: s,
    element: "",
    modifier: ""
  };
  return e.includes(":") ? (i.element = e.split(":")[0], i.modifier = e.split(":")[1]) : i.element = e, O(i.block, i.element, i.modifier, Object.assign(Object.assign({}, t), { return: z.ARRAY }));
}, De = (s, e, t = {}) => {
  if (e.show !== void 0 && !e.show || e.s !== void 0 && !e.s)
    return [];
  const i = (e == null ? void 0 : e.block) || e.b || s, r = {
    element: e.element || e.e || "",
    modifier: e.modifier || e.m || ""
  };
  return O(i, r, "", Object.assign(Object.assign({}, t), { return: z.ARRAY }));
}, Ve = (s) => s == null ? v.NONE : C(s) && s !== "" ? v.STRING : J(s) && s.length < 4 || Ie(s) ? Be(s) ? v.NONE : v.ARRAY : Me(s) ? v.OBJECT : v.NONE, Ye = (s, e = {}) => (...i) => {
  const r = typeof s == "string" ? [s] : s;
  let n = [];
  return r.forEach((o) => {
    (i.length == 0 || i[0] == null || i[0] == "") && n.push(O(o, "", "", { return: z.STRING })), i.forEach((h) => {
      switch (Ve(h)) {
        case v.STRING:
          n.push(...Le(o, h, e));
          break;
        case v.ARRAY:
          n.push(...ze(o, h, e));
          break;
        case v.OBJECT:
          n.push(...De(o, h, e));
          break;
      }
    });
  }), ve(fe(n), e);
}, _ = {
  ARRAY: "array",
  STRING: "string",
  AUTO: "auto"
}, Ge = (s, e, t) => typeof s == "string" && e == "string" ? {
  element: s,
  modifier: e,
  show: t.show
} : typeof s == "object" && (s != null && s.element) && (s != null && s.modifier) ? {
  element: s.element,
  modifier: s.modifier,
  show: s.show
} : {
  element: t.element,
  modifier: t.modifier,
  show: t.show
}, $e = (s) => {
  let e = Object.assign({ modifier: "--", element: "__" }, s.prefix);
  return Object.assign(Object.assign({ toKebabCase: !0, return: _.AUTO }, s), { prefix: e });
}, ve = (s, e) => {
  switch (e.return) {
    case _.STRING:
      return s.join(" ");
    case _.ARRAY:
      return s;
    default:
    case _.AUTO:
      return s.length == 1 ? s[0] : s;
  }
}, O = (s, e = "", t = "", i) => {
  var r, n;
  if (s == "")
    return "";
  const { element: o, modifier: h } = Ge(e, t, {
    element: typeof e == "string" || e == null ? e : e.element,
    modifier: typeof e == "string" || e == null ? t : e.modifier
  }), l = $e(i), a = (d) => (l.toKebabCase && (d = Pe(d)), d), f = `${a(s)}${o ? `${(r = l.prefix) === null || r === void 0 ? void 0 : r.element}${a(o)}` : ""}`, c = [];
  if (typeof h == "object")
    h.forEach((d) => {
      var p;
      c.push(a(d).length ? `${f}${(p = l.prefix) === null || p === void 0 ? void 0 : p.modifier}${a(d)}` : `${f}`);
    });
  else {
    let d = `${f}${h ? `${(n = l.prefix) === null || n === void 0 ? void 0 : n.modifier}${a(h)}` : ""}`;
    c.push(d);
  }
  return ve(c, l);
}, Qe = (s, e = {}) => {
  const t = (i = "", r = "", n = {}) => {
    const o = $e(Object.assign(Object.assign({}, e), n));
    if (typeof i != "string" && i !== null && !je(i.show))
      return "";
    let h = [];
    switch (typeof s == "string" ? h = O(s, i, r, Object.assign(Object.assign({}, o), { return: "array" })) : s.forEach((l) => {
      h = [
        ...h,
        ...O(l, i, r, Object.assign(Object.assign({}, o), { return: "array" }))
      ];
    }), o.return) {
      case _.STRING:
        return h.join(" ");
      case _.ARRAY:
        return h;
      default:
      case _.AUTO:
        return h.length == 1 ? h[0] : h;
    }
  };
  return t.bemm = t, t.classes = Ye(s, e), t;
}, $ = {
  prefix: "sil"
}, Ke = {
  text: `${$.prefix}-text`,
  email: `${$.prefix}-email`,
  textarea: `${$.prefix}-textarea`,
  stack: `${$.prefix}-stack`,
  radio: `${$.prefix}-radio`,
  checkbox: `${$.prefix}-checkbox`,
  number: `${$.prefix}-number`,
  select: `${$.prefix}-select`,
  switch: `${$.prefix}-switch`
}, Xe = (s) => Ke[s], et = {
  required: "Vul in dan gvd"
};
export {
  et as D,
  qe as a,
  Fe as e,
  Xe as g,
  Ae as r,
  k as s,
  Qe as u,
  Je as y
};
