const y = () => {
  const t = window.navigator && window.navigator.userAgent || "";
  return /Firefox/i.test(t);
}, w = () => navigator.userAgent.indexOf("Chrome") > -1, l = () => {
  const t = window.navigator && window.navigator.userAgent || "";
  return w() ? !1 : t.indexOf("Safari") > -1;
}, C = !l() && "VideoEncoder" in window, A = "showPopover" in document.createElement("div");
function c(t) {
  if (t.assignedSlot)
    return t.assignedSlot;
  if (t.parentElement)
    return t.parentElement;
  const o = t.getRootNode();
  return o instanceof ShadowRoot ? o.host : null;
}
function u(t, o) {
  if (!t)
    return null;
  let n = c(t);
  if (!n)
    return null;
  for (; n; ) {
    if (n === document.body)
      return;
    if (o(n))
      return n;
    n = c(n);
  }
  return n;
}
function b(t) {
  return u(t, (o) => {
    const n = window.getComputedStyle(o), e = n.clipPath !== "none" && n.clipPath !== "", i = o.hasAttribute(
      "data-overlayscrollbars-viewport"
    ), s = n.transform !== "none", a = ["auto", "scroll", "hidden"].includes(
      n.overflow
    );
    return !!(e || i || s && a);
  });
}
const m = [
  "transform",
  "translate",
  "scale",
  "rotate",
  "perspective"
], S = [
  "transform",
  "translate",
  "scale",
  "rotate",
  "perspective",
  "filter"
], v = ["paint", "layout", "strict", "content"];
function E(t) {
  return u(
    t,
    (n) => {
      const e = window.getComputedStyle(n), i = m.some(
        (r) => e[r] ? e[r] !== "none" : !1
      ), s = e.backdropFilter, a = !!s && s !== "none", f = e.filter !== "none", d = e.containerType !== "normal", g = S.some(
        (r) => (e.willChange || "").includes(r)
      ), p = v.some(
        (r) => (e.contain || "").includes(r)
      ), h = e.contentVisibility === "auto";
      return l() && d ? !0 : i || g || p || a || h || f;
    }
  );
}
function P() {
  return /iPad|iPhone|iPod/.test(navigator.userAgent);
}
export {
  E as a,
  y as b,
  P as c,
  w as d,
  u as e,
  b as f,
  c as g,
  l as i,
  A as p,
  C as s
};
