import { isClient as f } from "@vueuse/core";
import { isUndefined as l } from "lodash-unified";
import { unref as s, markRaw as d } from "vue";
import { isDef as E } from "./is.mjs";
function w(t) {
  return t?.parentNode ?? document.body;
}
function h(t) {
  const e = {};
  return Object.keys(t).map((n) => {
    e[n] = s(t[n]);
  }), e;
}
function g(t, e = [], n) {
  const o = Object.assign({}, t), r = Object.keys(o);
  for (let u = 0; u < r.length; u += 1) {
    const i = r[u];
    (e.includes(i) || n?.(i, o[i])) && delete o[i];
  }
  return o;
}
function b(t) {
  return /^[A-Z][A-Za-z]*$/.test(t);
}
function c(t) {
  if (Array.isArray(t))
    return t.map((e) => c(e));
  if (typeof t == "object" && t !== null) {
    const e = {};
    for (const n in t)
      e[n] = c(t[n]);
    return d(e);
  }
  return t;
}
function v(t) {
  const e = { ...t };
  for (const n of Object.keys(e))
    l(e[n]) && delete e[n];
  return e;
}
function x(t, ...e) {
  return typeof t == "function" ? t(...e) : t;
}
function A() {
  const t = "history";
  return typeof window > "u" ? t : window.location.href.includes("#/") ? "hash" : t;
}
function k() {
  if (!f)
    return 15;
  const t = document.createElement("div");
  t.style.width = "100px", t.style.height = "100px", t.style.overflow = "scroll", t.style.position = "absolute", t.style.top = "-9999px", document.body.appendChild(t);
  const e = t.offsetHeight - t.clientHeight;
  return document.body.removeChild(t), e;
}
function C() {
  return (window.top !== window ? window.top : window) ?? window;
}
const a = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
function R(t = 16, e = a) {
  let n = "", o = t;
  const r = e.length;
  for (; o--; ) n += e[Math.random() * r | 0];
  return n;
}
function O(t) {
  return t === void 0 || typeof t == "number" ? t : Number(t.replace(/px/g, ""));
}
function H(t, ...e) {
  t && (Array.isArray(t) && t.forEach((n) => n(...e)), t(...e));
}
export {
  c as convertReactiveToRaw,
  h as getDynamicProps,
  O as getNumberPx,
  w as getPopupContainer,
  A as getRouteType,
  k as getScrollbarSize,
  C as getTopWindow,
  E as isDef,
  b as isPascalCase,
  v as omitUndefined,
  g as omitWhen,
  R as randomStr,
  H as runEventHandler,
  x as runFunction
};
