import { cssua as i } from "./cssuseragent.js";
document?.documentElement && i(document.documentElement, navigator.userAgent, navigator.standalone);
const o = (t) => t != null, r = () => {
  if (window.PointerEvent && o(navigator.maxTouchPoints)) {
    if (navigator.maxTouchPoints > 0)
      return !0;
  } else {
    if (window.matchMedia?.("(any-pointer:coarse)").matches)
      return !0;
    if (window.TouchEvent || o(window.ontouchstart))
      return !0;
  }
  return !1;
}, s = 480, u = 768, m = 992, d = 1200, l = 1700, E = () => window.matchMedia(`(max-width: ${s}px)`).matches, c = () => document?.documentElement.classList.contains("ua-mobile"), w = () => document?.documentElement.classList.contains("ua-desktop"), f = () => document?.documentElement.classList.contains("ua-desktop-macintosh"), h = () => window.devicePixelRatio > 1, p = () => {
  try {
    return window.self !== window.top;
  } catch {
    return !0;
  }
}, e = "user-scalable=0 maximum-scale=1", S = () => {
  if (!document)
    return;
  const t = document.head.querySelector('[name="viewport"]');
  if (!t)
    return;
  const n = t.content.includes(e);
  if (c() && !n) {
    t.content += ` ${e}`;
    return;
  }
  if (!c() && n) {
    t.content = t.content.replace(e, "").trim();
    return;
  }
};
export {
  s as MOBILE_SCREEN,
  d as SCREEN_LG,
  m as SCREEN_MD,
  u as SCREEN_SM,
  l as SCREEN_XL,
  r as hasTouch,
  p as inIframe,
  w as isDesktop,
  f as isMac,
  c as isMobile,
  E as isMobileScreen,
  h as isRetinaDevice,
  S as toggleZoomOnMobile
};
//# sourceMappingURL=deviceUtils.js.map
