import { isShadowRoot as r } from "../../../../../@floating-ui_utils@0.2.9/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js";
function i(t) {
  let e = t.activeElement;
  for (; ((o = e) == null || (o = o.shadowRoot) == null ? void 0 : o.activeElement) != null; ) {
    var o;
    e = e.shadowRoot.activeElement;
  }
  return e;
}
function s(t, e) {
  if (!t || !e)
    return !1;
  const o = e.getRootNode == null ? void 0 : e.getRootNode();
  if (t.contains(e))
    return !0;
  if (o && r(o)) {
    let n = e;
    for (; n; ) {
      if (t === n)
        return !0;
      n = n.parentNode || n.host;
    }
  }
  return !1;
}
function a() {
  return /apple/i.test(navigator.vendor);
}
function l(t, e) {
  const o = ["mouse", "pen"];
  return o.push("", void 0), o.includes(t);
}
function f(t) {
  return t?.ownerDocument || document;
}
function c(t) {
  return "composedPath" in t ? t.composedPath()[0] : t.target;
}
export {
  i as activeElement,
  s as contains,
  f as getDocument,
  c as getTarget,
  l as isMouseLikePointerType,
  a as isSafari
};
//# sourceMappingURL=floating-ui.react.utils.js.map
