import t from "./index-getParentNode.js";
import e from "./index-isScrollParent.js";
import o from "./index-getNodeName.js";
import { isHTMLElement as m } from "./index-instanceOf.js";
function i(r) {
  return ["html", "body", "#document"].indexOf(o(r)) >= 0 ? r.ownerDocument.body : m(r) && e(r) ? r : i(t(r));
}
export {
  i as default
};
