var T = (e, t, n) => new Promise((s, r) => {
  var l = (o) => {
    try {
      a(n.next(o));
    } catch (c) {
      r(c);
    }
  }, i = (o) => {
    try {
      a(n.throw(o));
    } catch (c) {
      r(c);
    }
  }, a = (o) => o.done ? s(o.value) : Promise.resolve(o.value).then(l, i);
  a((n = n.apply(e, t)).next());
});
const ce = "ui-image", fe = (
  /* ui-image */
  { hydratedSelectorName: "hydrated" }
);
var ue = Object.defineProperty, de = (e, t) => {
  for (var n in t)
    ue(e, n, { get: t[n], enumerable: !0 });
}, B = /* @__PURE__ */ new WeakMap(), b = (e) => B.get(e), Ve = (e, t) => B.set(t.$lazyInstance$ = e, t), ve = (e, t) => {
  const n = {
    $flags$: 0,
    $hostElement$: e,
    $cmpMeta$: t,
    $instanceValues$: /* @__PURE__ */ new Map()
  };
  return n.$onReadyPromise$ = new Promise((s) => n.$onReadyResolve$ = s), e["s-p"] = [], e["s-rc"] = [], B.set(e, n);
}, pe = (e, t) => t in e, E = (e, t) => (0, console.error)(e, t), j = /* @__PURE__ */ new Map(), ge = (e, t, n) => {
  const s = e.$tagName$.replace(/-/g, "_"), r = e.$lazyBundleId$;
  if (!r)
    return;
  const l = j.get(r);
  if (l)
    return l[s];
  {
    const i = (a) => (j.set(r, a), a[s]);
    switch (r) {
      case "ui-image":
        return import(
          /* webpackMode: "lazy" */
          "./ui-image-CPH6BqjQ.js"
        ).then(i, E);
    }
  }
  return import(
    /* @vite-ignore */
    /* webpackInclude: /\.entry\.js$/ */
    /* webpackExclude: /\.system\.entry\.js$/ */
    /* webpackMode: "lazy" */
    `./${r}.entry.js`
  ).then((i) => (j.set(r, i), i[s]), E);
}, A = /* @__PURE__ */ new Map(), he = "{visibility:hidden}.hydrated{visibility:inherit}", K = "slot-fb{display:contents}slot-fb[hidden]{display:none}", z = typeof window != "undefined" ? window : {}, y = z.document || { head: {} }, g = {
  $flags$: 0,
  $resourcesUrl$: "",
  jmp: (e) => e(),
  raf: (e) => requestAnimationFrame(e),
  ael: (e, t, n, s) => e.addEventListener(t, n, s),
  rel: (e, t, n, s) => e.removeEventListener(t, n, s),
  ce: (e, t) => new CustomEvent(e, t)
}, me = (e) => Promise.resolve(e), ye = /* @__PURE__ */ (() => {
  try {
    return new CSSStyleSheet(), typeof new CSSStyleSheet().replaceSync == "function";
  } catch (e) {
  }
  return !1;
})(), O = !1, M = [], Q = [], Se = (e, t) => (n) => {
  e.push(n), O || (O = !0, g.$flags$ & 4 ? q(I) : g.raf(I));
}, W = (e) => {
  for (let t = 0; t < e.length; t++)
    try {
      e[t](performance.now());
    } catch (n) {
      E(n);
    }
  e.length = 0;
}, I = () => {
  W(M), W(Q), (O = M.length > 0) && g.raf(I);
}, q = (e) => me().then(e), be = /* @__PURE__ */ Se(Q), F = {}, C = (e) => (e = typeof e, e === "object" || e === "function");
function X(e) {
  var t, n, s;
  return (s = (n = (t = e.head) == null ? void 0 : t.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : n.getAttribute("content")) != null ? s : void 0;
}
var Ee = {};
de(Ee, {
  err: () => Z,
  map: () => ke,
  ok: () => H,
  unwrap: () => Pe,
  unwrapErr: () => Te
});
var H = (e) => ({
  isOk: !0,
  isErr: !1,
  value: e
}), Z = (e) => ({
  isOk: !1,
  isErr: !0,
  value: e
});
function ke(e, t) {
  if (e.isOk) {
    const n = t(e.value);
    return n instanceof Promise ? n.then((s) => H(s)) : H(n);
  }
  if (e.isErr) {
    const n = e.value;
    return Z(n);
  }
  throw "should never get here";
}
var Pe = (e) => {
  if (e.isOk)
    return e.value;
  throw e.value;
}, Te = (e) => {
  if (e.isErr)
    return e.value;
  throw e.value;
}, S = (e, t = "") => () => {
}, we = (e, t) => () => {
}, xe = (e, t, ...n) => {
  let s = null, r = null, l = !1, i = !1;
  const a = [], o = ($) => {
    for (let f = 0; f < $.length; f++)
      s = $[f], Array.isArray(s) ? o(s) : s != null && typeof s != "boolean" && ((l = typeof e != "function" && !C(s)) && (s = String(s)), l && i ? a[a.length - 1].$text$ += s : a.push(l ? U(null, s) : s), i = l);
  };
  if (o(n), t) {
    t.key && (r = t.key);
    {
      const $ = t.className || t.class;
      $ && (t.class = typeof $ != "object" ? $ : Object.keys($).filter((f) => $[f]).join(" "));
    }
  }
  const c = U(e, null);
  return c.$attrs$ = t, a.length > 0 && (c.$children$ = a), c.$key$ = r, c;
}, U = (e, t) => {
  const n = {
    $flags$: 0,
    $tag$: e,
    $text$: t,
    $elm$: null,
    $children$: null
  };
  return n.$attrs$ = null, n.$key$ = null, n;
}, Ae = {}, Le = (e) => e && e.$tag$ === Ae, _e = (e, t) => e != null && !C(e) && t & 1 ? String(e) : e, et = (e) => b(e).$hostElement$, je = (e, t, n) => {
  const s = g.ce(t, n);
  return e.dispatchEvent(s), s;
}, N = /* @__PURE__ */ new WeakMap(), Oe = (e, t, n) => {
  let s = A.get(e);
  ye && n ? (s = s || new CSSStyleSheet(), typeof s == "string" ? s = t : s.replaceSync(t)) : s = t, A.set(e, s);
}, Ie = (e, t, n) => {
  var s;
  const r = R(t), l = A.get(r);
  if (e = e.nodeType === 11 ? e : y, l)
    if (typeof l == "string") {
      e = e.head || e;
      let i = N.get(e), a;
      if (i || N.set(e, i = /* @__PURE__ */ new Set()), !i.has(r)) {
        {
          a = y.createElement("style"), a.innerHTML = l;
          const o = (s = g.$nonce$) != null ? s : X(y);
          o != null && a.setAttribute("nonce", o), e.insertBefore(a, e.querySelector("link"));
        }
        t.$flags$ & 4 && (a.innerHTML += K), i && i.add(r);
      }
    } else
      e.adoptedStyleSheets.includes(l) || (e.adoptedStyleSheets = [...e.adoptedStyleSheets, l]);
  return r;
}, He = (e) => {
  const t = e.$cmpMeta$, n = e.$hostElement$, s = S("attachStyles", t.$tagName$);
  Ie(
    n.getRootNode(),
    t
  ), s();
}, R = (e, t) => "sc-" + e.$tagName$, Y = (e, t, n, s, r, l) => {
  if (n !== s) {
    let i = pe(e, t);
    if (t.toLowerCase(), t === "class") {
      const a = e.classList, o = G(n), c = G(s);
      a.remove(...o.filter(($) => $ && !c.includes($))), a.add(...c.filter(($) => $ && !o.includes($)));
    } else if (t === "style") {
      for (const a in n)
        (!s || s[a] == null) && (a.includes("-") ? e.style.removeProperty(a) : e.style[a] = "");
      for (const a in s)
        (!n || s[a] !== n[a]) && (a.includes("-") ? e.style.setProperty(a, s[a]) : e.style[a] = s[a]);
    } else if (t !== "key")
      if (t === "ref")
        s && s(e);
      else {
        const a = C(s);
        if (i || a && s !== null)
          try {
            if (e.tagName.includes("-"))
              e[t] = s;
            else {
              const o = s == null ? "" : s;
              t === "list" ? i = !1 : (n == null || e[t] != o) && (e[t] = o);
            }
          } catch (o) {
          }
        s == null || s === !1 ? (s !== !1 || e.getAttribute(t) === "") && e.removeAttribute(t) : (!i || l & 4 || r) && !a && (s = s === !0 ? "" : s, e.setAttribute(t, s));
      }
  }
}, Ue = /\s/, G = (e) => e ? e.split(Ue) : [], V = (e, t, n) => {
  const s = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, r = e && e.$attrs$ || F, l = t.$attrs$ || F;
  for (const i of J(Object.keys(r)))
    i in l || Y(s, i, r[i], void 0, n, t.$flags$);
  for (const i of J(Object.keys(l)))
    Y(s, i, r[i], l[i], n, t.$flags$);
};
function J(e) {
  return e.includes("ref") ? (
    // we need to sort these to ensure that `'ref'` is the last attr
    [...e.filter((t) => t !== "ref"), "ref"]
  ) : (
    // no need to sort, return the original array
    e
  );
}
var ee, te = !1, L = (e, t, n, s) => {
  const r = t.$children$[n];
  let l = 0, i, a;
  if (i = r.$elm$ = y.createElement(
    r.$tag$
  ), V(null, r, te), r.$children$)
    for (l = 0; l < r.$children$.length; ++l)
      a = L(e, r, l), a && i.appendChild(a);
  return i["s-hn"] = ee, i;
}, se = (e, t, n, s, r, l) => {
  let i = e, a;
  for (; r <= l; ++r)
    s[r] && (a = L(null, n, r), a && (s[r].$elm$ = a, x(i, a, t)));
}, ne = (e, t, n) => {
  for (let s = t; s <= n; ++s) {
    const r = e[s];
    if (r) {
      const l = r.$elm$;
      re(r), l && l.remove();
    }
  }
}, Be = (e, t, n, s, r = !1) => {
  let l = 0, i = 0, a = 0, o = 0, c = t.length - 1, $ = t[0], f = t[c], u = s.length - 1, d = s[0], v = s[u], p, h;
  for (; l <= c && i <= u; )
    if ($ == null)
      $ = t[++l];
    else if (f == null)
      f = t[--c];
    else if (d == null)
      d = s[++i];
    else if (v == null)
      v = s[--u];
    else if (w($, d, r))
      k($, d, r), $ = t[++l], d = s[++i];
    else if (w(f, v, r))
      k(f, v, r), f = t[--c], v = s[--u];
    else if (w($, v, r))
      k($, v, r), x(e, $.$elm$, f.$elm$.nextSibling), $ = t[++l], v = s[--u];
    else if (w(f, d, r))
      k(f, d, r), x(e, f.$elm$, $.$elm$), f = t[--c], d = s[++i];
    else {
      for (a = -1, o = l; o <= c; ++o)
        if (t[o] && t[o].$key$ !== null && t[o].$key$ === d.$key$) {
          a = o;
          break;
        }
      a >= 0 ? (h = t[a], h.$tag$ !== d.$tag$ ? p = L(t && t[i], n, a) : (k(h, d, r), t[a] = void 0, p = h.$elm$), d = s[++i]) : (p = L(t && t[i], n, i), d = s[++i]), p && x($.$elm$.parentNode, p, $.$elm$);
    }
  l > c ? se(
    e,
    s[u + 1] == null ? null : s[u + 1].$elm$,
    n,
    s,
    i,
    u
  ) : i > u && ne(t, l, c);
}, w = (e, t, n = !1) => e.$tag$ === t.$tag$ ? n ? !0 : e.$key$ === t.$key$ : !1, k = (e, t, n = !1) => {
  const s = t.$elm$ = e.$elm$, r = e.$children$, l = t.$children$;
  V(e, t, te), r !== null && l !== null ? Be(s, r, t, l, n) : l !== null ? se(s, null, t, l, 0, l.length - 1) : r !== null && ne(r, 0, r.length - 1);
}, re = (e) => {
  e.$attrs$ && e.$attrs$.ref && e.$attrs$.ref(null), e.$children$ && e.$children$.map(re);
}, x = (e, t, n) => e == null ? void 0 : e.insertBefore(t, n), ze = (e, t, n = !1) => {
  const s = e.$hostElement$, r = e.$vnode$ || U(null, null), l = Le(t) ? t : xe(null, null, t);
  if (ee = s.tagName, n && l.$attrs$)
    for (const i of Object.keys(l.$attrs$))
      s.hasAttribute(i) && !["key", "ref", "style", "class"].includes(i) && (l.$attrs$[i] = s[i]);
  l.$tag$ = null, l.$flags$ |= 4, e.$vnode$ = l, l.$elm$ = r.$elm$ = s, k(r, l, n);
}, le = (e, t) => {
  t && !e.$onRenderResolve$ && t["s-p"] && t["s-p"].push(new Promise((n) => e.$onRenderResolve$ = n));
}, D = (e, t) => {
  if (e.$flags$ |= 16, e.$flags$ & 4) {
    e.$flags$ |= 512;
    return;
  }
  return le(e, e.$ancestorComponent$), be(() => qe(e, t));
}, qe = (e, t) => {
  const n = e.$hostElement$, s = S("scheduleUpdate", e.$cmpMeta$.$tagName$), r = e.$lazyInstance$;
  if (!r)
    throw new Error(
      `Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`
    );
  let l;
  return s(), Ce(l, () => Me(e, r, t));
}, Ce = (e, t) => De(e) ? e.then(t).catch((n) => {
  console.error(n), t();
}) : t(), De = (e) => e instanceof Promise || e && e.then && typeof e.then == "function", Me = (e, t, n) => T(void 0, null, function* () {
  var s;
  const r = e.$hostElement$, l = S("update", e.$cmpMeta$.$tagName$), i = r["s-rc"];
  n && He(e);
  const a = S("render", e.$cmpMeta$.$tagName$);
  We(e, t, r, n), i && (i.map((o) => o()), r["s-rc"] = void 0), a(), l();
  {
    const o = (s = r["s-p"]) != null ? s : [], c = () => Fe(e);
    o.length === 0 ? c() : (Promise.all(o).then(c), e.$flags$ |= 4, o.length = 0);
  }
}), We = (e, t, n, s) => {
  try {
    t = t.render(), e.$flags$ &= -17, e.$flags$ |= 2, ze(e, t, s);
  } catch (r) {
    E(r, e.$hostElement$);
  }
  return null;
}, Fe = (e) => {
  const t = e.$cmpMeta$.$tagName$, n = e.$hostElement$, s = S("postUpdate", t), r = e.$lazyInstance$, l = e.$ancestorComponent$;
  e.$flags$ & 64 ? s() : (e.$flags$ |= 64, ie(n), Ne(r, "componentDidLoad"), s(), e.$onReadyResolve$(n), l || ae()), e.$onRenderResolve$ && (e.$onRenderResolve$(), e.$onRenderResolve$ = void 0), e.$flags$ & 512 && q(() => D(e, !1)), e.$flags$ &= -517;
}, ae = (e) => {
  ie(y.documentElement), q(() => je(z, "appload", { detail: { namespace: ce } }));
}, Ne = (e, t, n) => {
  if (e && e[t])
    try {
      return e[t](n);
    } catch (s) {
      E(s);
    }
}, ie = (e) => {
  var t;
  return e.classList.add((t = fe.hydratedSelectorName) != null ? t : "hydrated");
}, Ye = (e, t) => b(e).$instanceValues$.get(t), Ge = (e, t, n, s) => {
  const r = b(e);
  if (!r)
    throw new Error(
      `Couldn't find host element for "${s.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`
    );
  const l = r.$hostElement$, i = r.$instanceValues$.get(t), a = r.$flags$, o = r.$lazyInstance$;
  n = _e(n, s.$members$[t][0]);
  const c = Number.isNaN(i) && Number.isNaN(n), $ = n !== i && !c;
  if ((!(a & 8) || i === void 0) && $ && (r.$instanceValues$.set(t, n), o)) {
    if (s.$watchers$ && a & 128) {
      const f = s.$watchers$[t];
      f && f.map((u) => {
        try {
          o[u](n, i, t);
        } catch (d) {
          E(d, l);
        }
      });
    }
    (a & 18) === 2 && D(r, !1);
  }
}, oe = (e, t, n) => {
  var s, r;
  const l = e.prototype;
  if (t.$members$ || t.$watchers$ || e.watchers) {
    e.watchers && !t.$watchers$ && (t.$watchers$ = e.watchers);
    const i = Object.entries((s = t.$members$) != null ? s : {});
    if (i.map(([a, [o]]) => {
      (o & 31 || n & 2 && o & 32) && Object.defineProperty(l, a, {
        get() {
          return Ye(this, a);
        },
        set(c) {
          Ge(this, a, c, t);
        },
        configurable: !0,
        enumerable: !0
      });
    }), n & 1) {
      const a = /* @__PURE__ */ new Map();
      l.attributeChangedCallback = function(o, c, $) {
        g.jmp(() => {
          var f;
          const u = a.get(o);
          if (this.hasOwnProperty(u))
            $ = this[u], delete this[u];
          else {
            if (l.hasOwnProperty(u) && typeof this[u] == "number" && this[u] == $)
              return;
            if (u == null) {
              const d = b(this), v = d == null ? void 0 : d.$flags$;
              if (v && !(v & 8) && v & 128 && $ !== c) {
                const p = d.$lazyInstance$, h = (f = t.$watchers$) == null ? void 0 : f[o];
                h == null || h.forEach((m) => {
                  p[m] != null && p[m].call(p, $, c, o);
                });
              }
              return;
            }
          }
          this[u] = $ === null && typeof this[u] == "boolean" ? !1 : $;
        });
      }, e.observedAttributes = Array.from(
        /* @__PURE__ */ new Set([
          ...Object.keys((r = t.$watchers$) != null ? r : {}),
          ...i.filter(
            ([o, c]) => c[0] & 15
            /* HasAttribute */
          ).map(([o, c]) => {
            const $ = c[1] || o;
            return a.set($, o), $;
          })
        ])
      );
    }
  }
  return e;
}, Je = (e, t, n, s) => T(void 0, null, function* () {
  let r;
  if (!(t.$flags$ & 32)) {
    if (t.$flags$ |= 32, n.$lazyBundleId$) {
      const o = ge(n);
      if (o && "then" in o) {
        const $ = we();
        r = yield o, $();
      } else
        r = o;
      if (!r)
        throw new Error(`Constructor for "${n.$tagName$}#${t.$modeName$}" was not found`);
      r.isProxied || (n.$watchers$ = r.watchers, oe(
        r,
        n,
        2
        /* proxyState */
      ), r.isProxied = !0);
      const c = S("createInstance", n.$tagName$);
      t.$flags$ |= 8;
      try {
        new r(t);
      } catch ($) {
        E($);
      }
      t.$flags$ &= -9, t.$flags$ |= 128, c();
    } else {
      r = e.constructor;
      const o = e.localName;
      customElements.whenDefined(o).then(
        () => t.$flags$ |= 128
        /* isWatchReady */
      );
    }
    if (r && r.style) {
      let o;
      typeof r.style == "string" && (o = r.style);
      const c = R(n);
      if (!A.has(c)) {
        const $ = S("registerStyles", n.$tagName$);
        Oe(c, o, !!(n.$flags$ & 1)), $();
      }
    }
  }
  const l = t.$ancestorComponent$, i = () => D(t, !0);
  l && l["s-rc"] ? l["s-rc"].push(i) : i();
}), Ke = (e) => {
}, Qe = (e) => {
  if (!(g.$flags$ & 1)) {
    const t = b(e), n = t.$cmpMeta$, s = S("connectedCallback", n.$tagName$);
    if (t.$flags$ & 1)
      t != null && t.$lazyInstance$ || t != null && t.$onReadyPromise$ && t.$onReadyPromise$.then(() => Ke());
    else {
      t.$flags$ |= 1;
      {
        let r = e;
        for (; r = r.parentNode || r.host; )
          if (r["s-p"]) {
            le(t, t.$ancestorComponent$ = r);
            break;
          }
      }
      n.$members$ && Object.entries(n.$members$).map(([r, [l]]) => {
        if (l & 31 && e.hasOwnProperty(r)) {
          const i = e[r];
          delete e[r], e[r] = i;
        }
      }), Je(e, t, n);
    }
    s();
  }
}, Xe = (e) => {
}, Ze = (e) => T(void 0, null, function* () {
  if (!(g.$flags$ & 1)) {
    const t = b(e);
    t != null && t.$lazyInstance$ || t != null && t.$onReadyPromise$ && t.$onReadyPromise$.then(() => Xe());
  }
}), tt = (e, t = {}) => {
  var n;
  const s = S(), r = [], l = t.exclude || [], i = z.customElements, a = y.head, o = /* @__PURE__ */ a.querySelector("meta[charset]"), c = /* @__PURE__ */ y.createElement("style"), $ = [];
  let f, u = !0;
  Object.assign(g, t), g.$resourcesUrl$ = new URL(t.resourcesUrl || "./", y.baseURI).href;
  let d = !1;
  if (e.map((v) => {
    v[1].map((p) => {
      var h;
      const m = {
        $flags$: p[0],
        $tagName$: p[1],
        $members$: p[2],
        $listeners$: p[3]
      };
      m.$flags$ & 4 && (d = !0), m.$members$ = p[2], m.$watchers$ = (h = p[4]) != null ? h : {};
      const P = m.$tagName$, $e = class extends HTMLElement {
        // StencilLazyHost
        constructor(_) {
          super(_), this.hasRegisteredEventListeners = !1, _ = this, ve(_, m);
        }
        connectedCallback() {
          b(this), this.hasRegisteredEventListeners || (this.hasRegisteredEventListeners = !0), f && (clearTimeout(f), f = null), u ? $.push(this) : g.jmp(() => Qe(this));
        }
        disconnectedCallback() {
          g.jmp(() => Ze(this));
        }
        componentOnReady() {
          return b(this).$onReadyPromise$;
        }
      };
      m.$lazyBundleId$ = v[0], !l.includes(P) && !i.get(P) && (r.push(P), i.define(
        P,
        oe(
          $e,
          m,
          1
          /* isElementConstructor */
        )
      ));
    });
  }), r.length > 0 && (d && (c.textContent += K), c.textContent += r.sort() + he, c.innerHTML.length)) {
    c.setAttribute("data-styles", "");
    const v = (n = g.$nonce$) != null ? n : X(y);
    v != null && c.setAttribute("nonce", v), a.insertBefore(c, o ? o.nextSibling : a.firstChild);
  }
  u = !1, $.length ? $.map((v) => v.connectedCallback()) : g.jmp(() => f = setTimeout(ae, 30)), s();
};
export {
  tt as b,
  et as g,
  xe as h,
  me as p,
  Ve as r
};
