import { jsx as w, jsxs as Le } from "react/jsx-runtime";
import * as v from "react";
import { createContext as re, useMemo as z, createElement as p, useContext as ye, useCallback as G, useLayoutEffect as Dt, useRef as x, useEffect as P, useState as V, Fragment as ke, forwardRef as D, Children as U, isValidElement as oe, cloneElement as Ee, useReducer as _t } from "react";
import St, { flushSync as We } from "react-dom";
import At from "../Icons.js";
import { cn as F } from "../../utils/functions.js";
import { RenderIf as xt } from "../../utils/components/RenderIf.js";
import { alertDialogContentVariants as Pt, alertDialogHeaderVariants as Nt, alertDialogFooterVariants as Ot } from "./variants.js";
import "../../clsx-7d8NmkQq.js";
import "../../index-xVF7D3FM.js";
function g() {
  return g = Object.assign ? Object.assign.bind() : function(e) {
    for (var t = 1; t < arguments.length; t++) {
      var n = arguments[t];
      for (var r in n)
        Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
    }
    return e;
  }, g.apply(this, arguments);
}
function wt(e, t) {
  const n = /* @__PURE__ */ re(t);
  function r(a) {
    const { children: i, ...c } = a, u = z(
      () => c,
      Object.values(c)
    );
    return /* @__PURE__ */ p(n.Provider, {
      value: u
    }, i);
  }
  function o(a) {
    const i = ye(n);
    if (i)
      return i;
    if (t !== void 0)
      return t;
    throw new Error(`\`${a}\` must be used within \`${e}\``);
  }
  return r.displayName = e + "Provider", [
    r,
    o
  ];
}
function Ue(e, t = []) {
  let n = [];
  function r(a, i) {
    const c = /* @__PURE__ */ re(i), u = n.length;
    n = [
      ...n,
      i
    ];
    function d(l) {
      const { scope: b, children: $, ..._ } = l, s = (b == null ? void 0 : b[e][u]) || c, m = z(
        () => _,
        Object.values(_)
      );
      return /* @__PURE__ */ p(s.Provider, {
        value: m
      }, $);
    }
    function f(l, b) {
      const $ = (b == null ? void 0 : b[e][u]) || c, _ = ye($);
      if (_)
        return _;
      if (i !== void 0)
        return i;
      throw new Error(`\`${l}\` must be used within \`${a}\``);
    }
    return d.displayName = a + "Provider", [
      d,
      f
    ];
  }
  const o = () => {
    const a = n.map((i) => /* @__PURE__ */ re(i));
    return function(c) {
      const u = (c == null ? void 0 : c[e]) || a;
      return z(
        () => ({
          [`__scope${e}`]: {
            ...c,
            [e]: u
          }
        }),
        [
          c,
          u
        ]
      );
    };
  };
  return o.scopeName = e, [
    r,
    Tt(o, ...t)
  ];
}
function Tt(...e) {
  const t = e[0];
  if (e.length === 1)
    return t;
  const n = () => {
    const r = e.map(
      (o) => ({
        useScope: o(),
        scopeName: o.scopeName
      })
    );
    return function(a) {
      const i = r.reduce((c, { useScope: u, scopeName: d }) => {
        const l = u(a)[`__scope${d}`];
        return {
          ...c,
          ...l
        };
      }, {});
      return z(
        () => ({
          [`__scope${t.scopeName}`]: i
        }),
        [
          i
        ]
      );
    };
  };
  return n.scopeName = t.scopeName, n;
}
function Rt(e, t) {
  typeof e == "function" ? e(t) : e != null && (e.current = t);
}
function Be(...e) {
  return (t) => e.forEach(
    (n) => Rt(n, t)
  );
}
function L(...e) {
  return G(Be(...e), e);
}
function T(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
  return function(o) {
    if (e == null || e(o), n === !1 || !o.defaultPrevented)
      return t == null ? void 0 : t(o);
  };
}
const $e = globalThis != null && globalThis.document ? Dt : () => {
}, It = v.useId || (() => {
});
let Mt = 0;
function se(e) {
  const [t, n] = v.useState(It());
  return $e(() => {
    e || n(
      (r) => r ?? String(Mt++)
    );
  }, [
    e
  ]), e || (t ? `radix-${t}` : "");
}
function B(e) {
  const t = x(e);
  return P(() => {
    t.current = e;
  }), z(
    () => (...n) => {
      var r;
      return (r = t.current) === null || r === void 0 ? void 0 : r.call(t, ...n);
    },
    []
  );
}
function Ft({ prop: e, defaultProp: t, onChange: n = () => {
} }) {
  const [r, o] = Lt({
    defaultProp: t,
    onChange: n
  }), a = e !== void 0, i = a ? e : r, c = B(n), u = G((d) => {
    if (a) {
      const l = typeof d == "function" ? d(e) : d;
      l !== e && c(l);
    } else
      o(d);
  }, [
    a,
    e,
    o,
    c
  ]);
  return [
    i,
    u
  ];
}
function Lt({ defaultProp: e, onChange: t }) {
  const n = V(e), [r] = n, o = x(r), a = B(t);
  return P(() => {
    o.current !== r && (a(r), o.current = r);
  }, [
    r,
    o,
    a
  ]), n;
}
const Ce = /* @__PURE__ */ D((e, t) => {
  const { children: n, ...r } = e, o = U.toArray(n), a = o.find(kt);
  if (a) {
    const i = a.props.children, c = o.map((u) => u === a ? U.count(i) > 1 ? U.only(null) : /* @__PURE__ */ oe(i) ? i.props.children : null : u);
    return /* @__PURE__ */ p(me, g({}, r, {
      ref: t
    }), /* @__PURE__ */ oe(i) ? /* @__PURE__ */ Ee(i, void 0, c) : null);
  }
  return /* @__PURE__ */ p(me, g({}, r, {
    ref: t
  }), n);
});
Ce.displayName = "Slot";
const me = /* @__PURE__ */ D((e, t) => {
  const { children: n, ...r } = e;
  return /* @__PURE__ */ oe(n) ? /* @__PURE__ */ Ee(n, {
    ...Wt(r, n.props),
    ref: t ? Be(t, n.ref) : n.ref
  }) : U.count(n) > 1 ? U.only(null) : null;
});
me.displayName = "SlotClone";
const je = ({ children: e }) => /* @__PURE__ */ p(ke, null, e);
function kt(e) {
  return /* @__PURE__ */ oe(e) && e.type === je;
}
function Wt(e, t) {
  const n = {
    ...t
  };
  for (const r in t) {
    const o = e[r], a = t[r];
    /^on[A-Z]/.test(r) ? o && a ? n[r] = (...c) => {
      a(...c), o(...c);
    } : o && (n[r] = o) : r === "style" ? n[r] = {
      ...o,
      ...a
    } : r === "className" && (n[r] = [
      o,
      a
    ].filter(Boolean).join(" "));
  }
  return {
    ...e,
    ...n
  };
}
const Ut = [
  "a",
  "button",
  "div",
  "form",
  "h2",
  "h3",
  "img",
  "input",
  "label",
  "li",
  "nav",
  "ol",
  "p",
  "span",
  "svg",
  "ul"
], k = Ut.reduce((e, t) => {
  const n = /* @__PURE__ */ D((r, o) => {
    const { asChild: a, ...i } = r, c = a ? Ce : t;
    return P(() => {
      window[Symbol.for("radix-ui")] = !0;
    }, []), /* @__PURE__ */ p(c, g({}, i, {
      ref: o
    }));
  });
  return n.displayName = `Primitive.${t}`, {
    ...e,
    [t]: n
  };
}, {});
function Bt(e, t) {
  e && We(
    () => e.dispatchEvent(t)
  );
}
function jt(e, t = globalThis == null ? void 0 : globalThis.document) {
  const n = B(e);
  P(() => {
    const r = (o) => {
      o.key === "Escape" && n(o);
    };
    return t.addEventListener("keydown", r), () => t.removeEventListener("keydown", r);
  }, [
    n,
    t
  ]);
}
const be = "dismissableLayer.update", Ht = "dismissableLayer.pointerDownOutside", Kt = "dismissableLayer.focusOutside";
let Ae;
const Vt = /* @__PURE__ */ re({
  layers: /* @__PURE__ */ new Set(),
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
  branches: /* @__PURE__ */ new Set()
}), Xt = /* @__PURE__ */ D((e, t) => {
  var n;
  const { disableOutsidePointerEvents: r = !1, onEscapeKeyDown: o, onPointerDownOutside: a, onFocusOutside: i, onInteractOutside: c, onDismiss: u, ...d } = e, f = ye(Vt), [l, b] = V(null), $ = (n = l == null ? void 0 : l.ownerDocument) !== null && n !== void 0 ? n : globalThis == null ? void 0 : globalThis.document, [, _] = V({}), s = L(
    t,
    (C) => b(C)
  ), m = Array.from(f.layers), [h] = [
    ...f.layersWithOutsidePointerEventsDisabled
  ].slice(-1), A = m.indexOf(h), y = l ? m.indexOf(l) : -1, E = f.layersWithOutsidePointerEventsDisabled.size > 0, S = y >= A, Y = Yt((C) => {
    const W = C.target, Se = [
      ...f.branches
    ].some(
      (ie) => ie.contains(W)
    );
    !S || Se || (a == null || a(C), c == null || c(C), C.defaultPrevented || u == null || u());
  }, $), I = zt((C) => {
    const W = C.target;
    [
      ...f.branches
    ].some(
      (ie) => ie.contains(W)
    ) || (i == null || i(C), c == null || c(C), C.defaultPrevented || u == null || u());
  }, $);
  return jt((C) => {
    y === f.layers.size - 1 && (o == null || o(C), !C.defaultPrevented && u && (C.preventDefault(), u()));
  }, $), P(() => {
    if (l)
      return r && (f.layersWithOutsidePointerEventsDisabled.size === 0 && (Ae = $.body.style.pointerEvents, $.body.style.pointerEvents = "none"), f.layersWithOutsidePointerEventsDisabled.add(l)), f.layers.add(l), xe(), () => {
        r && f.layersWithOutsidePointerEventsDisabled.size === 1 && ($.body.style.pointerEvents = Ae);
      };
  }, [
    l,
    $,
    r,
    f
  ]), P(() => () => {
    l && (f.layers.delete(l), f.layersWithOutsidePointerEventsDisabled.delete(l), xe());
  }, [
    l,
    f
  ]), P(() => {
    const C = () => _({});
    return document.addEventListener(be, C), () => document.removeEventListener(be, C);
  }, []), /* @__PURE__ */ p(k.div, g({}, d, {
    ref: s,
    style: {
      pointerEvents: E ? S ? "auto" : "none" : void 0,
      ...e.style
    },
    onFocusCapture: T(e.onFocusCapture, I.onFocusCapture),
    onBlurCapture: T(e.onBlurCapture, I.onBlurCapture),
    onPointerDownCapture: T(e.onPointerDownCapture, Y.onPointerDownCapture)
  }));
});
function Yt(e, t = globalThis == null ? void 0 : globalThis.document) {
  const n = B(e), r = x(!1), o = x(() => {
  });
  return P(() => {
    const a = (c) => {
      if (c.target && !r.current) {
        let d = function() {
          He(Ht, n, u, {
            discrete: !0
          });
        };
        const u = {
          originalEvent: c
        };
        c.pointerType === "touch" ? (t.removeEventListener("click", o.current), o.current = d, t.addEventListener("click", o.current, {
          once: !0
        })) : d();
      } else
        t.removeEventListener("click", o.current);
      r.current = !1;
    }, i = window.setTimeout(() => {
      t.addEventListener("pointerdown", a);
    }, 0);
    return () => {
      window.clearTimeout(i), t.removeEventListener("pointerdown", a), t.removeEventListener("click", o.current);
    };
  }, [
    t,
    n
  ]), {
    // ensures we check React component tree (not just DOM tree)
    onPointerDownCapture: () => r.current = !0
  };
}
function zt(e, t = globalThis == null ? void 0 : globalThis.document) {
  const n = B(e), r = x(!1);
  return P(() => {
    const o = (a) => {
      a.target && !r.current && He(Kt, n, {
        originalEvent: a
      }, {
        discrete: !1
      });
    };
    return t.addEventListener("focusin", o), () => t.removeEventListener("focusin", o);
  }, [
    t,
    n
  ]), {
    onFocusCapture: () => r.current = !0,
    onBlurCapture: () => r.current = !1
  };
}
function xe() {
  const e = new CustomEvent(be);
  document.dispatchEvent(e);
}
function He(e, t, n, { discrete: r }) {
  const o = n.originalEvent.target, a = new CustomEvent(e, {
    bubbles: !1,
    cancelable: !0,
    detail: n
  });
  t && o.addEventListener(e, t, {
    once: !0
  }), r ? Bt(o, a) : o.dispatchEvent(a);
}
const le = "focusScope.autoFocusOnMount", ue = "focusScope.autoFocusOnUnmount", Pe = {
  bubbles: !1,
  cancelable: !0
}, Gt = /* @__PURE__ */ D((e, t) => {
  const { loop: n = !1, trapped: r = !1, onMountAutoFocus: o, onUnmountAutoFocus: a, ...i } = e, [c, u] = V(null), d = B(o), f = B(a), l = x(null), b = L(
    t,
    (s) => u(s)
  ), $ = x({
    paused: !1,
    pause() {
      this.paused = !0;
    },
    resume() {
      this.paused = !1;
    }
  }).current;
  P(() => {
    if (r) {
      let s = function(y) {
        if ($.paused || !c)
          return;
        const E = y.target;
        c.contains(E) ? l.current = E : M(l.current, {
          select: !0
        });
      }, m = function(y) {
        if ($.paused || !c)
          return;
        const E = y.relatedTarget;
        E !== null && (c.contains(E) || M(l.current, {
          select: !0
        }));
      }, h = function(y) {
        if (document.activeElement === document.body)
          for (const S of y)
            S.removedNodes.length > 0 && M(c);
      };
      document.addEventListener("focusin", s), document.addEventListener("focusout", m);
      const A = new MutationObserver(h);
      return c && A.observe(c, {
        childList: !0,
        subtree: !0
      }), () => {
        document.removeEventListener("focusin", s), document.removeEventListener("focusout", m), A.disconnect();
      };
    }
  }, [
    r,
    c,
    $.paused
  ]), P(() => {
    if (c) {
      Oe.add($);
      const s = document.activeElement;
      if (!c.contains(s)) {
        const h = new CustomEvent(le, Pe);
        c.addEventListener(le, d), c.dispatchEvent(h), h.defaultPrevented || (Zt(tn(Ke(c)), {
          select: !0
        }), document.activeElement === s && M(c));
      }
      return () => {
        c.removeEventListener(le, d), setTimeout(() => {
          const h = new CustomEvent(ue, Pe);
          c.addEventListener(ue, f), c.dispatchEvent(h), h.defaultPrevented || M(s ?? document.body, {
            select: !0
          }), c.removeEventListener(ue, f), Oe.remove($);
        }, 0);
      };
    }
  }, [
    c,
    d,
    f,
    $
  ]);
  const _ = G((s) => {
    if (!n && !r || $.paused)
      return;
    const m = s.key === "Tab" && !s.altKey && !s.ctrlKey && !s.metaKey, h = document.activeElement;
    if (m && h) {
      const A = s.currentTarget, [y, E] = qt(A);
      y && E ? !s.shiftKey && h === E ? (s.preventDefault(), n && M(y, {
        select: !0
      })) : s.shiftKey && h === y && (s.preventDefault(), n && M(E, {
        select: !0
      })) : h === A && s.preventDefault();
    }
  }, [
    n,
    r,
    $.paused
  ]);
  return /* @__PURE__ */ p(k.div, g({
    tabIndex: -1
  }, i, {
    ref: b,
    onKeyDown: _
  }));
});
function Zt(e, { select: t = !1 } = {}) {
  const n = document.activeElement;
  for (const r of e)
    if (M(r, {
      select: t
    }), document.activeElement !== n)
      return;
}
function qt(e) {
  const t = Ke(e), n = Ne(t, e), r = Ne(t.reverse(), e);
  return [
    n,
    r
  ];
}
function Ke(e) {
  const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
    acceptNode: (r) => {
      const o = r.tagName === "INPUT" && r.type === "hidden";
      return r.disabled || r.hidden || o ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
    }
  });
  for (; n.nextNode(); )
    t.push(n.currentNode);
  return t;
}
function Ne(e, t) {
  for (const n of e)
    if (!Qt(n, {
      upTo: t
    }))
      return n;
}
function Qt(e, { upTo: t }) {
  if (getComputedStyle(e).visibility === "hidden")
    return !0;
  for (; e; ) {
    if (t !== void 0 && e === t)
      return !1;
    if (getComputedStyle(e).display === "none")
      return !0;
    e = e.parentElement;
  }
  return !1;
}
function Jt(e) {
  return e instanceof HTMLInputElement && "select" in e;
}
function M(e, { select: t = !1 } = {}) {
  if (e && e.focus) {
    const n = document.activeElement;
    e.focus({
      preventScroll: !0
    }), e !== n && Jt(e) && t && e.select();
  }
}
const Oe = en();
function en() {
  let e = [];
  return {
    add(t) {
      const n = e[0];
      t !== n && (n == null || n.pause()), e = we(e, t), e.unshift(t);
    },
    remove(t) {
      var n;
      e = we(e, t), (n = e[0]) === null || n === void 0 || n.resume();
    }
  };
}
function we(e, t) {
  const n = [
    ...e
  ], r = n.indexOf(t);
  return r !== -1 && n.splice(r, 1), n;
}
function tn(e) {
  return e.filter(
    (t) => t.tagName !== "A"
  );
}
const nn = /* @__PURE__ */ D((e, t) => {
  var n;
  const { container: r = globalThis == null || (n = globalThis.document) === null || n === void 0 ? void 0 : n.body, ...o } = e;
  return r ? /* @__PURE__ */ St.createPortal(/* @__PURE__ */ p(k.div, g({}, o, {
    ref: t
  })), r) : null;
});
function rn(e, t) {
  return _t((n, r) => {
    const o = t[n][r];
    return o ?? n;
  }, e);
}
const ae = (e) => {
  const { present: t, children: n } = e, r = on(t), o = typeof n == "function" ? n({
    present: r.isPresent
  }) : U.only(n), a = L(r.ref, o.ref);
  return typeof n == "function" || r.isPresent ? /* @__PURE__ */ Ee(o, {
    ref: a
  }) : null;
};
ae.displayName = "Presence";
function on(e) {
  const [t, n] = V(), r = x({}), o = x(e), a = x("none"), i = e ? "mounted" : "unmounted", [c, u] = rn(i, {
    mounted: {
      UNMOUNT: "unmounted",
      ANIMATION_OUT: "unmountSuspended"
    },
    unmountSuspended: {
      MOUNT: "mounted",
      ANIMATION_END: "unmounted"
    },
    unmounted: {
      MOUNT: "mounted"
    }
  });
  return P(() => {
    const d = Z(r.current);
    a.current = c === "mounted" ? d : "none";
  }, [
    c
  ]), $e(() => {
    const d = r.current, f = o.current;
    if (f !== e) {
      const b = a.current, $ = Z(d);
      e ? u("MOUNT") : $ === "none" || (d == null ? void 0 : d.display) === "none" ? u("UNMOUNT") : u(f && b !== $ ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
    }
  }, [
    e,
    u
  ]), $e(() => {
    if (t) {
      const d = (l) => {
        const $ = Z(r.current).includes(l.animationName);
        l.target === t && $ && We(
          () => u("ANIMATION_END")
        );
      }, f = (l) => {
        l.target === t && (a.current = Z(r.current));
      };
      return t.addEventListener("animationstart", f), t.addEventListener("animationcancel", d), t.addEventListener("animationend", d), () => {
        t.removeEventListener("animationstart", f), t.removeEventListener("animationcancel", d), t.removeEventListener("animationend", d);
      };
    } else
      u("ANIMATION_END");
  }, [
    t,
    u
  ]), {
    isPresent: [
      "mounted",
      "unmountSuspended"
    ].includes(c),
    ref: G((d) => {
      d && (r.current = getComputedStyle(d)), n(d);
    }, [])
  };
}
function Z(e) {
  return (e == null ? void 0 : e.animationName) || "none";
}
let de = 0;
function an() {
  P(() => {
    var e, t;
    const n = document.querySelectorAll("[data-radix-focus-guard]");
    return document.body.insertAdjacentElement("afterbegin", (e = n[0]) !== null && e !== void 0 ? e : Te()), document.body.insertAdjacentElement("beforeend", (t = n[1]) !== null && t !== void 0 ? t : Te()), de++, () => {
      de === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach(
        (r) => r.remove()
      ), de--;
    };
  }, []);
}
function Te() {
  const e = document.createElement("span");
  return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.cssText = "outline: none; opacity: 0; position: fixed; pointer-events: none", e;
}
var O = function() {
  return O = Object.assign || function(t) {
    for (var n, r = 1, o = arguments.length; r < o; r++) {
      n = arguments[r];
      for (var a in n)
        Object.prototype.hasOwnProperty.call(n, a) && (t[a] = n[a]);
    }
    return t;
  }, O.apply(this, arguments);
};
function Ve(e, t) {
  var n = {};
  for (var r in e)
    Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var o = 0, r = Object.getOwnPropertySymbols(e); o < r.length; o++)
      t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
  return n;
}
function cn(e, t, n) {
  if (n || arguments.length === 2)
    for (var r = 0, o = t.length, a; r < o; r++)
      (a || !(r in t)) && (a || (a = Array.prototype.slice.call(t, 0, r)), a[r] = t[r]);
  return e.concat(a || Array.prototype.slice.call(t));
}
var te = "right-scroll-bar-position", ne = "width-before-scroll-bar", sn = "with-scroll-bars-hidden", ln = "--removed-body-scroll-bar-size";
function un(e, t) {
  return typeof e == "function" ? e(t) : e && (e.current = t), e;
}
function dn(e, t) {
  var n = V(function() {
    return {
      // value
      value: e,
      // last callback
      callback: t,
      // "memoized" public interface
      facade: {
        get current() {
          return n.value;
        },
        set current(r) {
          var o = n.value;
          o !== r && (n.value = r, n.callback(r, o));
        }
      }
    };
  })[0];
  return n.callback = t, n.facade;
}
function fn(e, t) {
  return dn(t || null, function(n) {
    return e.forEach(function(r) {
      return un(r, n);
    });
  });
}
function vn(e) {
  return e;
}
function pn(e, t) {
  t === void 0 && (t = vn);
  var n = [], r = !1, o = {
    read: function() {
      if (r)
        throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
      return n.length ? n[n.length - 1] : e;
    },
    useMedium: function(a) {
      var i = t(a, r);
      return n.push(i), function() {
        n = n.filter(function(c) {
          return c !== i;
        });
      };
    },
    assignSyncMedium: function(a) {
      for (r = !0; n.length; ) {
        var i = n;
        n = [], i.forEach(a);
      }
      n = {
        push: function(c) {
          return a(c);
        },
        filter: function() {
          return n;
        }
      };
    },
    assignMedium: function(a) {
      r = !0;
      var i = [];
      if (n.length) {
        var c = n;
        n = [], c.forEach(a), i = n;
      }
      var u = function() {
        var f = i;
        i = [], f.forEach(a);
      }, d = function() {
        return Promise.resolve().then(u);
      };
      d(), n = {
        push: function(f) {
          i.push(f), d();
        },
        filter: function(f) {
          return i = i.filter(f), n;
        }
      };
    }
  };
  return o;
}
function $n(e) {
  e === void 0 && (e = {});
  var t = pn(null);
  return t.options = O({ async: !0, ssr: !1 }, e), t;
}
var Xe = function(e) {
  var t = e.sideCar, n = Ve(e, ["sideCar"]);
  if (!t)
    throw new Error("Sidecar: please provide `sideCar` property to import the right car");
  var r = t.read();
  if (!r)
    throw new Error("Sidecar medium not found");
  return v.createElement(r, O({}, n));
};
Xe.isSideCarExport = !0;
function mn(e, t) {
  return e.useMedium(t), Xe;
}
var Ye = $n(), fe = function() {
}, ce = v.forwardRef(function(e, t) {
  var n = v.useRef(null), r = v.useState({
    onScrollCapture: fe,
    onWheelCapture: fe,
    onTouchMoveCapture: fe
  }), o = r[0], a = r[1], i = e.forwardProps, c = e.children, u = e.className, d = e.removeScrollBar, f = e.enabled, l = e.shards, b = e.sideCar, $ = e.noIsolation, _ = e.inert, s = e.allowPinchZoom, m = e.as, h = m === void 0 ? "div" : m, A = Ve(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as"]), y = b, E = fn([n, t]), S = O(O({}, A), o);
  return v.createElement(
    v.Fragment,
    null,
    f && v.createElement(y, { sideCar: Ye, removeScrollBar: d, shards: l, noIsolation: $, inert: _, setCallbacks: a, allowPinchZoom: !!s, lockRef: n }),
    i ? v.cloneElement(v.Children.only(c), O(O({}, S), { ref: E })) : v.createElement(h, O({}, S, { className: u, ref: E }), c)
  );
});
ce.defaultProps = {
  enabled: !0,
  removeScrollBar: !0,
  inert: !1
};
ce.classNames = {
  fullWidth: ne,
  zeroRight: te
};
var Re, bn = function() {
  if (Re)
    return Re;
  if (typeof __webpack_nonce__ < "u")
    return __webpack_nonce__;
};
function gn() {
  if (!document)
    return null;
  var e = document.createElement("style");
  e.type = "text/css";
  var t = bn();
  return t && e.setAttribute("nonce", t), e;
}
function hn(e, t) {
  e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
}
function yn(e) {
  var t = document.head || document.getElementsByTagName("head")[0];
  t.appendChild(e);
}
var En = function() {
  var e = 0, t = null;
  return {
    add: function(n) {
      e == 0 && (t = gn()) && (hn(t, n), yn(t)), e++;
    },
    remove: function() {
      e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
    }
  };
}, Cn = function() {
  var e = En();
  return function(t, n) {
    v.useEffect(function() {
      return e.add(t), function() {
        e.remove();
      };
    }, [t && n]);
  };
}, ze = function() {
  var e = Cn(), t = function(n) {
    var r = n.styles, o = n.dynamic;
    return e(r, o), null;
  };
  return t;
}, Dn = {
  left: 0,
  top: 0,
  right: 0,
  gap: 0
}, ve = function(e) {
  return parseInt(e || "", 10) || 0;
}, _n = function(e) {
  var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], o = t[e === "padding" ? "paddingRight" : "marginRight"];
  return [ve(n), ve(r), ve(o)];
}, Sn = function(e) {
  if (e === void 0 && (e = "margin"), typeof window > "u")
    return Dn;
  var t = _n(e), n = document.documentElement.clientWidth, r = window.innerWidth;
  return {
    left: t[0],
    top: t[1],
    right: t[2],
    gap: Math.max(0, r - n + t[2] - t[0])
  };
}, An = ze(), xn = function(e, t, n, r) {
  var o = e.left, a = e.top, i = e.right, c = e.gap;
  return n === void 0 && (n = "margin"), `
  .`.concat(sn, ` {
   overflow: hidden `).concat(r, `;
   padding-right: `).concat(c, "px ").concat(r, `;
  }
  body {
    overflow: hidden `).concat(r, `;
    overscroll-behavior: contain;
    `).concat([
    t && "position: relative ".concat(r, ";"),
    n === "margin" && `
    padding-left: `.concat(o, `px;
    padding-top: `).concat(a, `px;
    padding-right: `).concat(i, `px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(c, "px ").concat(r, `;
    `),
    n === "padding" && "padding-right: ".concat(c, "px ").concat(r, ";")
  ].filter(Boolean).join(""), `
  }
  
  .`).concat(te, ` {
    right: `).concat(c, "px ").concat(r, `;
  }
  
  .`).concat(ne, ` {
    margin-right: `).concat(c, "px ").concat(r, `;
  }
  
  .`).concat(te, " .").concat(te, ` {
    right: 0 `).concat(r, `;
  }
  
  .`).concat(ne, " .").concat(ne, ` {
    margin-right: 0 `).concat(r, `;
  }
  
  body {
    `).concat(ln, ": ").concat(c, `px;
  }
`);
}, Pn = function(e) {
  var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r, a = v.useMemo(function() {
    return Sn(o);
  }, [o]);
  return v.createElement(An, { styles: xn(a, !t, o, n ? "" : "!important") });
}, ge = !1;
if (typeof window < "u")
  try {
    var q = Object.defineProperty({}, "passive", {
      get: function() {
        return ge = !0, !0;
      }
    });
    window.addEventListener("test", q, q), window.removeEventListener("test", q, q);
  } catch {
    ge = !1;
  }
var j = ge ? { passive: !1 } : !1, Nn = function(e) {
  return e.tagName === "TEXTAREA";
}, Ge = function(e, t) {
  var n = window.getComputedStyle(e);
  return (
    // not-not-scrollable
    n[t] !== "hidden" && // contains scroll inside self
    !(n.overflowY === n.overflowX && !Nn(e) && n[t] === "visible")
  );
}, On = function(e) {
  return Ge(e, "overflowY");
}, wn = function(e) {
  return Ge(e, "overflowX");
}, Ie = function(e, t) {
  var n = t;
  do {
    typeof ShadowRoot < "u" && n instanceof ShadowRoot && (n = n.host);
    var r = Ze(e, n);
    if (r) {
      var o = qe(e, n), a = o[1], i = o[2];
      if (a > i)
        return !0;
    }
    n = n.parentNode;
  } while (n && n !== document.body);
  return !1;
}, Tn = function(e) {
  var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
  return [
    t,
    n,
    r
  ];
}, Rn = function(e) {
  var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
  return [
    t,
    n,
    r
  ];
}, Ze = function(e, t) {
  return e === "v" ? On(t) : wn(t);
}, qe = function(e, t) {
  return e === "v" ? Tn(t) : Rn(t);
}, In = function(e, t) {
  return e === "h" && t === "rtl" ? -1 : 1;
}, Mn = function(e, t, n, r, o) {
  var a = In(e, window.getComputedStyle(t).direction), i = a * r, c = n.target, u = t.contains(c), d = !1, f = i > 0, l = 0, b = 0;
  do {
    var $ = qe(e, c), _ = $[0], s = $[1], m = $[2], h = s - m - a * _;
    (_ || h) && Ze(e, c) && (l += h, b += _), c = c.parentNode;
  } while (
    // portaled content
    !u && c !== document.body || // self content
    u && (t.contains(c) || t === c)
  );
  return (f && (o && l === 0 || !o && i > l) || !f && (o && b === 0 || !o && -i > b)) && (d = !0), d;
}, Q = function(e) {
  return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
}, Me = function(e) {
  return [e.deltaX, e.deltaY];
}, Fe = function(e) {
  return e && "current" in e ? e.current : e;
}, Fn = function(e, t) {
  return e[0] === t[0] && e[1] === t[1];
}, Ln = function(e) {
  return `
  .block-interactivity-`.concat(e, ` {pointer-events: none;}
  .allow-interactivity-`).concat(e, ` {pointer-events: all;}
`);
}, kn = 0, H = [];
function Wn(e) {
  var t = v.useRef([]), n = v.useRef([0, 0]), r = v.useRef(), o = v.useState(kn++)[0], a = v.useState(function() {
    return ze();
  })[0], i = v.useRef(e);
  v.useEffect(function() {
    i.current = e;
  }, [e]), v.useEffect(function() {
    if (e.inert) {
      document.body.classList.add("block-interactivity-".concat(o));
      var s = cn([e.lockRef.current], (e.shards || []).map(Fe), !0).filter(Boolean);
      return s.forEach(function(m) {
        return m.classList.add("allow-interactivity-".concat(o));
      }), function() {
        document.body.classList.remove("block-interactivity-".concat(o)), s.forEach(function(m) {
          return m.classList.remove("allow-interactivity-".concat(o));
        });
      };
    }
  }, [e.inert, e.lockRef.current, e.shards]);
  var c = v.useCallback(function(s, m) {
    if ("touches" in s && s.touches.length === 2)
      return !i.current.allowPinchZoom;
    var h = Q(s), A = n.current, y = "deltaX" in s ? s.deltaX : A[0] - h[0], E = "deltaY" in s ? s.deltaY : A[1] - h[1], S, Y = s.target, I = Math.abs(y) > Math.abs(E) ? "h" : "v";
    if ("touches" in s && I === "h" && Y.type === "range")
      return !1;
    var C = Ie(I, Y);
    if (!C)
      return !0;
    if (C ? S = I : (S = I === "v" ? "h" : "v", C = Ie(I, Y)), !C)
      return !1;
    if (!r.current && "changedTouches" in s && (y || E) && (r.current = S), !S)
      return !0;
    var W = r.current || S;
    return Mn(W, m, s, W === "h" ? y : E, !0);
  }, []), u = v.useCallback(function(s) {
    var m = s;
    if (!(!H.length || H[H.length - 1] !== a)) {
      var h = "deltaY" in m ? Me(m) : Q(m), A = t.current.filter(function(S) {
        return S.name === m.type && S.target === m.target && Fn(S.delta, h);
      })[0];
      if (A && A.should) {
        m.cancelable && m.preventDefault();
        return;
      }
      if (!A) {
        var y = (i.current.shards || []).map(Fe).filter(Boolean).filter(function(S) {
          return S.contains(m.target);
        }), E = y.length > 0 ? c(m, y[0]) : !i.current.noIsolation;
        E && m.cancelable && m.preventDefault();
      }
    }
  }, []), d = v.useCallback(function(s, m, h, A) {
    var y = { name: s, delta: m, target: h, should: A };
    t.current.push(y), setTimeout(function() {
      t.current = t.current.filter(function(E) {
        return E !== y;
      });
    }, 1);
  }, []), f = v.useCallback(function(s) {
    n.current = Q(s), r.current = void 0;
  }, []), l = v.useCallback(function(s) {
    d(s.type, Me(s), s.target, c(s, e.lockRef.current));
  }, []), b = v.useCallback(function(s) {
    d(s.type, Q(s), s.target, c(s, e.lockRef.current));
  }, []);
  v.useEffect(function() {
    return H.push(a), e.setCallbacks({
      onScrollCapture: l,
      onWheelCapture: l,
      onTouchMoveCapture: b
    }), document.addEventListener("wheel", u, j), document.addEventListener("touchmove", u, j), document.addEventListener("touchstart", f, j), function() {
      H = H.filter(function(s) {
        return s !== a;
      }), document.removeEventListener("wheel", u, j), document.removeEventListener("touchmove", u, j), document.removeEventListener("touchstart", f, j);
    };
  }, []);
  var $ = e.removeScrollBar, _ = e.inert;
  return v.createElement(
    v.Fragment,
    null,
    _ ? v.createElement(a, { styles: Ln(o) }) : null,
    $ ? v.createElement(Pn, { gapMode: "margin" }) : null
  );
}
const Un = mn(Ye, Wn);
var Qe = v.forwardRef(function(e, t) {
  return v.createElement(ce, O({}, e, { ref: t, sideCar: Un }));
});
Qe.classNames = ce.classNames;
const Bn = Qe;
var jn = function(e) {
  if (typeof document > "u")
    return null;
  var t = Array.isArray(e) ? e[0] : e;
  return t.ownerDocument.body;
}, K = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakMap(), ee = {}, pe = 0, Je = function(e) {
  return e && (e.host || Je(e.parentNode));
}, Hn = function(e, t) {
  return t.map(function(n) {
    if (e.contains(n))
      return n;
    var r = Je(n);
    return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
  }).filter(function(n) {
    return !!n;
  });
}, Kn = function(e, t, n, r) {
  var o = Hn(t, Array.isArray(e) ? e : [e]);
  ee[n] || (ee[n] = /* @__PURE__ */ new WeakMap());
  var a = ee[n], i = [], c = /* @__PURE__ */ new Set(), u = new Set(o), d = function(l) {
    !l || c.has(l) || (c.add(l), d(l.parentNode));
  };
  o.forEach(d);
  var f = function(l) {
    !l || u.has(l) || Array.prototype.forEach.call(l.children, function(b) {
      if (c.has(b))
        f(b);
      else {
        var $ = b.getAttribute(r), _ = $ !== null && $ !== "false", s = (K.get(b) || 0) + 1, m = (a.get(b) || 0) + 1;
        K.set(b, s), a.set(b, m), i.push(b), s === 1 && _ && J.set(b, !0), m === 1 && b.setAttribute(n, "true"), _ || b.setAttribute(r, "true");
      }
    });
  };
  return f(t), c.clear(), pe++, function() {
    i.forEach(function(l) {
      var b = K.get(l) - 1, $ = a.get(l) - 1;
      K.set(l, b), a.set(l, $), b || (J.has(l) || l.removeAttribute(r), J.delete(l)), $ || l.removeAttribute(n);
    }), pe--, pe || (K = /* @__PURE__ */ new WeakMap(), K = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakMap(), ee = {});
  };
}, Vn = function(e, t, n) {
  n === void 0 && (n = "data-aria-hidden");
  var r = Array.from(Array.isArray(e) ? e : [e]), o = t || jn(e);
  return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live]"))), Kn(r, o, n, "aria-hidden")) : function() {
    return null;
  };
};
const et = "Dialog", [tt, nt] = Ue(et), [Xn, N] = tt(et), Yn = (e) => {
  const { __scopeDialog: t, children: n, open: r, defaultOpen: o, onOpenChange: a, modal: i = !0 } = e, c = x(null), u = x(null), [d = !1, f] = Ft({
    prop: r,
    defaultProp: o,
    onChange: a
  });
  return /* @__PURE__ */ p(Xn, {
    scope: t,
    triggerRef: c,
    contentRef: u,
    contentId: se(),
    titleId: se(),
    descriptionId: se(),
    open: d,
    onOpenChange: f,
    onOpenToggle: G(
      () => f(
        (l) => !l
      ),
      [
        f
      ]
    ),
    modal: i
  }, n);
}, zn = "DialogTrigger", Gn = /* @__PURE__ */ D((e, t) => {
  const { __scopeDialog: n, ...r } = e, o = N(zn, n), a = L(t, o.triggerRef);
  return /* @__PURE__ */ p(k.button, g({
    type: "button",
    "aria-haspopup": "dialog",
    "aria-expanded": o.open,
    "aria-controls": o.contentId,
    "data-state": De(o.open)
  }, r, {
    ref: a,
    onClick: T(e.onClick, o.onOpenToggle)
  }));
}), rt = "DialogPortal", [Zn, ot] = tt(rt, {
  forceMount: void 0
}), qn = (e) => {
  const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, a = N(rt, t);
  return /* @__PURE__ */ p(Zn, {
    scope: t,
    forceMount: n
  }, U.map(
    r,
    (i) => /* @__PURE__ */ p(ae, {
      present: n || a.open
    }, /* @__PURE__ */ p(nn, {
      asChild: !0,
      container: o
    }, i))
  ));
}, he = "DialogOverlay", Qn = /* @__PURE__ */ D((e, t) => {
  const n = ot(he, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, a = N(he, e.__scopeDialog);
  return a.modal ? /* @__PURE__ */ p(ae, {
    present: r || a.open
  }, /* @__PURE__ */ p(Jn, g({}, o, {
    ref: t
  }))) : null;
}), Jn = /* @__PURE__ */ D((e, t) => {
  const { __scopeDialog: n, ...r } = e, o = N(he, n);
  return (
    // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
    // ie. when `Overlay` and `Content` are siblings
    /* @__PURE__ */ p(Bn, {
      as: Ce,
      allowPinchZoom: !0,
      shards: [
        o.contentRef
      ]
    }, /* @__PURE__ */ p(k.div, g({
      "data-state": De(o.open)
    }, r, {
      ref: t,
      style: {
        pointerEvents: "auto",
        ...r.style
      }
    })))
  );
}), X = "DialogContent", er = /* @__PURE__ */ D((e, t) => {
  const n = ot(X, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, a = N(X, e.__scopeDialog);
  return /* @__PURE__ */ p(ae, {
    present: r || a.open
  }, a.modal ? /* @__PURE__ */ p(tr, g({}, o, {
    ref: t
  })) : /* @__PURE__ */ p(nr, g({}, o, {
    ref: t
  })));
}), tr = /* @__PURE__ */ D((e, t) => {
  const n = N(X, e.__scopeDialog), r = x(null), o = L(t, n.contentRef, r);
  return P(() => {
    const a = r.current;
    if (a)
      return Vn(a);
  }, []), /* @__PURE__ */ p(at, g({}, e, {
    ref: o,
    trapFocus: n.open,
    disableOutsidePointerEvents: !0,
    onCloseAutoFocus: T(e.onCloseAutoFocus, (a) => {
      var i;
      a.preventDefault(), (i = n.triggerRef.current) === null || i === void 0 || i.focus();
    }),
    onPointerDownOutside: T(e.onPointerDownOutside, (a) => {
      const i = a.detail.originalEvent, c = i.button === 0 && i.ctrlKey === !0;
      (i.button === 2 || c) && a.preventDefault();
    }),
    onFocusOutside: T(
      e.onFocusOutside,
      (a) => a.preventDefault()
    )
  }));
}), nr = /* @__PURE__ */ D((e, t) => {
  const n = N(X, e.__scopeDialog), r = x(!1), o = x(!1);
  return /* @__PURE__ */ p(at, g({}, e, {
    ref: t,
    trapFocus: !1,
    disableOutsidePointerEvents: !1,
    onCloseAutoFocus: (a) => {
      var i;
      if ((i = e.onCloseAutoFocus) === null || i === void 0 || i.call(e, a), !a.defaultPrevented) {
        var c;
        r.current || (c = n.triggerRef.current) === null || c === void 0 || c.focus(), a.preventDefault();
      }
      r.current = !1, o.current = !1;
    },
    onInteractOutside: (a) => {
      var i, c;
      (i = e.onInteractOutside) === null || i === void 0 || i.call(e, a), a.defaultPrevented || (r.current = !0, a.detail.originalEvent.type === "pointerdown" && (o.current = !0));
      const u = a.target;
      ((c = n.triggerRef.current) === null || c === void 0 ? void 0 : c.contains(u)) && a.preventDefault(), a.detail.originalEvent.type === "focusin" && o.current && a.preventDefault();
    }
  }));
}), at = /* @__PURE__ */ D((e, t) => {
  const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: a, ...i } = e, c = N(X, n), u = x(null), d = L(t, u);
  return an(), /* @__PURE__ */ p(ke, null, /* @__PURE__ */ p(Gt, {
    asChild: !0,
    loop: !0,
    trapped: r,
    onMountAutoFocus: o,
    onUnmountAutoFocus: a
  }, /* @__PURE__ */ p(Xt, g({
    role: "dialog",
    id: c.contentId,
    "aria-describedby": c.descriptionId,
    "aria-labelledby": c.titleId,
    "data-state": De(c.open)
  }, i, {
    ref: d,
    onDismiss: () => c.onOpenChange(!1)
  }))), !1);
}), ct = "DialogTitle", rr = /* @__PURE__ */ D((e, t) => {
  const { __scopeDialog: n, ...r } = e, o = N(ct, n);
  return /* @__PURE__ */ p(k.h2, g({
    id: o.titleId
  }, r, {
    ref: t
  }));
}), or = "DialogDescription", ar = /* @__PURE__ */ D((e, t) => {
  const { __scopeDialog: n, ...r } = e, o = N(or, n);
  return /* @__PURE__ */ p(k.p, g({
    id: o.descriptionId
  }, r, {
    ref: t
  }));
}), cr = "DialogClose", ir = /* @__PURE__ */ D((e, t) => {
  const { __scopeDialog: n, ...r } = e, o = N(cr, n);
  return /* @__PURE__ */ p(k.button, g({
    type: "button"
  }, r, {
    ref: t,
    onClick: T(
      e.onClick,
      () => o.onOpenChange(!1)
    )
  }));
});
function De(e) {
  return e ? "open" : "closed";
}
const sr = "DialogTitleWarning", [lr, Xr] = wt(sr, {
  contentName: X,
  titleName: ct,
  docsSlug: "dialog"
}), ur = Yn, dr = Gn, fr = qn, vr = Qn, pr = er, $r = rr, mr = ar, it = ir, br = "AlertDialog", [gr, Yr] = Ue(br, [
  nt
]), R = nt(), hr = (e) => {
  const { __scopeAlertDialog: t, ...n } = e, r = R(t);
  return /* @__PURE__ */ p(ur, g({}, r, n, {
    modal: !0
  }));
}, yr = /* @__PURE__ */ D((e, t) => {
  const { __scopeAlertDialog: n, ...r } = e, o = R(n);
  return /* @__PURE__ */ p(dr, g({}, o, r, {
    ref: t
  }));
}), Er = (e) => {
  const { __scopeAlertDialog: t, ...n } = e, r = R(t);
  return /* @__PURE__ */ p(fr, g({}, r, n));
}, Cr = /* @__PURE__ */ D((e, t) => {
  const { __scopeAlertDialog: n, ...r } = e, o = R(n);
  return /* @__PURE__ */ p(vr, g({}, o, r, {
    ref: t
  }));
}), st = "AlertDialogContent", [Dr, _r] = gr(st), Sr = /* @__PURE__ */ D((e, t) => {
  const { __scopeAlertDialog: n, children: r, ...o } = e, a = R(n), i = x(null), c = L(t, i), u = x(null);
  return /* @__PURE__ */ p(lr, {
    contentName: st,
    titleName: Ar,
    docsSlug: "alert-dialog"
  }, /* @__PURE__ */ p(Dr, {
    scope: n,
    cancelRef: u
  }, /* @__PURE__ */ p(pr, g({
    role: "alertdialog"
  }, a, o, {
    ref: c,
    onOpenAutoFocus: T(o.onOpenAutoFocus, (d) => {
      var f;
      d.preventDefault(), (f = u.current) === null || f === void 0 || f.focus({
        preventScroll: !0
      });
    }),
    onPointerDownOutside: (d) => d.preventDefault(),
    onInteractOutside: (d) => d.preventDefault()
  }), /* @__PURE__ */ p(je, null, r), !1)));
}), Ar = "AlertDialogTitle", xr = /* @__PURE__ */ D((e, t) => {
  const { __scopeAlertDialog: n, ...r } = e, o = R(n);
  return /* @__PURE__ */ p($r, g({}, o, r, {
    ref: t
  }));
}), Pr = /* @__PURE__ */ D((e, t) => {
  const { __scopeAlertDialog: n, ...r } = e, o = R(n);
  return /* @__PURE__ */ p(mr, g({}, o, r, {
    ref: t
  }));
}), Nr = /* @__PURE__ */ D((e, t) => {
  const { __scopeAlertDialog: n, ...r } = e, o = R(n);
  return /* @__PURE__ */ p(it, g({}, o, r, {
    ref: t
  }));
}), Or = "AlertDialogCancel", wr = /* @__PURE__ */ D((e, t) => {
  const { __scopeAlertDialog: n, ...r } = e, { cancelRef: o } = _r(Or, n), a = R(n), i = L(t, o);
  return /* @__PURE__ */ p(it, g({}, a, r, {
    ref: i
  }));
}), Tr = hr, Rr = yr, Ir = Er, lt = Cr, ut = Sr, dt = Nr, ft = wr, vt = xr, pt = Pr, Mr = Tr, Fr = Rr, $t = Ir, _e = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w(
  lt,
  {
    className: F(
      "_fixed _inset-0 _z-50 _bg-[#0000004f] _backdrop-blur-sm data-[state=open]:_animate-in data-[state=closed]:_animate-out data-[state=closed]:_fade-out-0 data-[state=open]:_fade-in-0",
      e
    ),
    ...t,
    ref: n
  }
));
_e.displayName = lt.displayName;
const mt = v.forwardRef(({ className: e, variant: t = { variant: "govco" }, ...n }, r) => /* @__PURE__ */ Le($t, { children: [
  /* @__PURE__ */ w(_e, {}),
  /* @__PURE__ */ w(ut, { ref: r, className: F(Pt(t), e), ...n })
] }));
mt.displayName = ut.displayName;
const bt = ({ className: e, children: t, variants: n, showCloseIcon: r = !0, closeModal: o, ...a }) => /* @__PURE__ */ Le("div", { className: F(Nt(n), e), ...a, children: [
  t,
  /* @__PURE__ */ w(xt, { condition: r, children: /* @__PURE__ */ w(At.ModalCloseIcon, { className: "_cursor-pointer", onClick: o }) })
] });
bt.displayName = "AlertDialogHeader";
const gt = ({ className: e, variants: t, ...n }) => /* @__PURE__ */ w("div", { className: F(Ot(t), e), ...n });
gt.displayName = "AlertDialogFooter";
const ht = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w(vt, { ref: n, className: F("_text-lg _font-semibold", e), ...t }));
ht.displayName = vt.displayName;
const yt = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w(pt, { ref: n, className: F("_text-sm _text-muted-foreground", e), ...t }));
yt.displayName = pt.displayName;
const Et = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w(dt, { ref: n, className: F(e), ...t }));
Et.displayName = dt.displayName;
const Ct = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w(ft, { ref: n, className: F("_mt-2 sm:_mt-0", e), ...t }));
Ct.displayName = ft.displayName;
const zr = {
  AlertDialog: Mr,
  AlertDialogPortal: $t,
  AlertDialogOverlay: _e,
  AlertDialogTrigger: Fr,
  AlertDialogContent: mt,
  AlertDialogHeader: bt,
  AlertDialogFooter: gt,
  AlertDialogTitle: ht,
  AlertDialogDescription: yt,
  AlertDialogAction: Et,
  AlertDialogCancel: Ct
};
export {
  zr as default
};
