import * as c from "react";
import A, { useState as lt } from "react";
import { c as he, u as O, g as Se, P as W, b as L, a as it, i as st } from "./index.D1n9HtNk.js";
import { f as M, u as ut, e as Ne, P as ee } from "./theme.BwnlJUJD.js";
import { jsx as E, jsxs as dt, Fragment as ft } from "react/jsx-runtime";
function vt(e) {
  const t = e + "CollectionProvider", [r, n] = he(t), [o, l] = r(
    t,
    { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
  ), i = (s) => {
    const { scope: v, children: b } = s, w = A.useRef(null), g = A.useRef(/* @__PURE__ */ new Map()).current;
    return /* @__PURE__ */ E(o, { scope: v, itemMap: g, collectionRef: w, children: b });
  };
  i.displayName = t;
  const a = e + "CollectionSlot", f = Se(a), h = A.forwardRef(
    (s, v) => {
      const { scope: b, children: w } = s, g = l(a, b), S = O(v, g.collectionRef);
      return /* @__PURE__ */ E(f, { ref: S, children: w });
    }
  );
  h.displayName = a;
  const u = e + "CollectionItemSlot", m = "data-radix-collection-item", d = Se(u), p = A.forwardRef(
    (s, v) => {
      const { scope: b, children: w, ...g } = s, S = A.useRef(null), y = O(v, S), P = l(u, b);
      return A.useEffect(() => (P.itemMap.set(S, { ref: S, ...g }), () => void P.itemMap.delete(S))), /* @__PURE__ */ E(d, { [m]: "", ref: y, children: w });
    }
  );
  p.displayName = u;
  function C(s) {
    const v = l(e + "CollectionConsumer", s);
    return A.useCallback(() => {
      const w = v.collectionRef.current;
      if (!w) return [];
      const g = Array.from(w.querySelectorAll(`[${m}]`));
      return Array.from(v.itemMap.values()).sort(
        (P, I) => g.indexOf(P.ref.current) - g.indexOf(I.ref.current)
      );
    }, [v.collectionRef, v.itemMap]);
  }
  return [
    { Provider: i, Slot: h, ItemSlot: p },
    C,
    n
  ];
}
var oe = "focusScope.autoFocusOnMount", ae = "focusScope.autoFocusOnUnmount", we = { bubbles: !1, cancelable: !0 }, ht = "FocusScope", mt = c.forwardRef((e, t) => {
  const {
    loop: r = !1,
    trapped: n = !1,
    onMountAutoFocus: o,
    onUnmountAutoFocus: l,
    ...i
  } = e, [a, f] = c.useState(null), h = M(o), u = M(l), m = c.useRef(null), d = O(t, (s) => f(s)), p = c.useRef({
    paused: !1,
    pause() {
      this.paused = !0;
    },
    resume() {
      this.paused = !1;
    }
  }).current;
  c.useEffect(() => {
    if (n) {
      let s = function(g) {
        if (p.paused || !a) return;
        const S = g.target;
        a.contains(S) ? m.current = S : k(m.current, { select: !0 });
      }, v = function(g) {
        if (p.paused || !a) return;
        const S = g.relatedTarget;
        S !== null && (a.contains(S) || k(m.current, { select: !0 }));
      }, b = function(g) {
        if (document.activeElement === document.body)
          for (const y of g)
            y.removedNodes.length > 0 && k(a);
      };
      document.addEventListener("focusin", s), document.addEventListener("focusout", v);
      const w = new MutationObserver(b);
      return a && w.observe(a, { childList: !0, subtree: !0 }), () => {
        document.removeEventListener("focusin", s), document.removeEventListener("focusout", v), w.disconnect();
      };
    }
  }, [n, a, p.paused]), c.useEffect(() => {
    if (a) {
      Ce.add(p);
      const s = document.activeElement;
      if (!a.contains(s)) {
        const b = new CustomEvent(oe, we);
        a.addEventListener(oe, h), a.dispatchEvent(b), b.defaultPrevented || (pt(Et(Fe(a)), { select: !0 }), document.activeElement === s && k(a));
      }
      return () => {
        a.removeEventListener(oe, h), setTimeout(() => {
          const b = new CustomEvent(ae, we);
          a.addEventListener(ae, u), a.dispatchEvent(b), b.defaultPrevented || k(s ?? document.body, { select: !0 }), a.removeEventListener(ae, u), Ce.remove(p);
        }, 0);
      };
    }
  }, [a, h, u, p]);
  const C = c.useCallback(
    (s) => {
      if (!r && !n || p.paused) return;
      const v = s.key === "Tab" && !s.altKey && !s.ctrlKey && !s.metaKey, b = document.activeElement;
      if (v && b) {
        const w = s.currentTarget, [g, S] = bt(w);
        g && S ? !s.shiftKey && b === S ? (s.preventDefault(), r && k(g, { select: !0 })) : s.shiftKey && b === g && (s.preventDefault(), r && k(S, { select: !0 })) : b === w && s.preventDefault();
      }
    },
    [r, n, p.paused]
  );
  return /* @__PURE__ */ E(W.div, { tabIndex: -1, ...i, ref: d, onKeyDown: C });
});
mt.displayName = ht;
function pt(e, { select: t = !1 } = {}) {
  const r = document.activeElement;
  for (const n of e)
    if (k(n, { select: t }), document.activeElement !== r) return;
}
function bt(e) {
  const t = Fe(e), r = Ee(t, e), n = Ee(t.reverse(), e);
  return [r, n];
}
function Fe(e) {
  const t = [], r = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
    acceptNode: (n) => {
      const o = n.tagName === "INPUT" && n.type === "hidden";
      return n.disabled || n.hidden || o ? NodeFilter.FILTER_SKIP : n.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
    }
  });
  for (; r.nextNode(); ) t.push(r.currentNode);
  return t;
}
function Ee(e, t) {
  for (const r of e)
    if (!gt(r, { upTo: t })) return r;
}
function gt(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 St(e) {
  return e instanceof HTMLInputElement && "select" in e;
}
function k(e, { select: t = !1 } = {}) {
  if (e && e.focus) {
    const r = document.activeElement;
    e.focus({ preventScroll: !0 }), e !== r && St(e) && t && e.select();
  }
}
var Ce = wt();
function wt() {
  let e = [];
  return {
    add(t) {
      const r = e[0];
      t !== r && r?.pause(), e = ye(e, t), e.unshift(t);
    },
    remove(t) {
      e = ye(e, t), e[0]?.resume();
    }
  };
}
function ye(e, t) {
  const r = [...e], n = r.indexOf(t);
  return n !== -1 && r.splice(n, 1), r;
}
function Et(e) {
  return e.filter((t) => t.tagName !== "A");
}
var ce = 0;
function Br() {
  c.useEffect(() => {
    const e = document.querySelectorAll("[data-radix-focus-guard]");
    return document.body.insertAdjacentElement("afterbegin", e[0] ?? Re()), document.body.insertAdjacentElement("beforeend", e[1] ?? Re()), ce++, () => {
      ce === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), ce--;
    };
  }, []);
}
function Re() {
  const e = document.createElement("span");
  return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
}
var _ = function() {
  return _ = Object.assign || function(t) {
    for (var r, n = 1, o = arguments.length; n < o; n++) {
      r = arguments[n];
      for (var l in r) Object.prototype.hasOwnProperty.call(r, l) && (t[l] = r[l]);
    }
    return t;
  }, _.apply(this, arguments);
};
function Me(e, t) {
  var r = {};
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
      t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (r[n[o]] = e[n[o]]);
  return r;
}
function Ct(e, t, r) {
  if (r || arguments.length === 2) for (var n = 0, o = t.length, l; n < o; n++)
    (l || !(n in t)) && (l || (l = Array.prototype.slice.call(t, 0, n)), l[n] = t[n]);
  return e.concat(l || Array.prototype.slice.call(t));
}
var $ = "right-scroll-bar-position", q = "width-before-scroll-bar", yt = "with-scroll-bars-hidden", Rt = "--removed-body-scroll-bar-size";
function le(e, t) {
  return typeof e == "function" ? e(t) : e && (e.current = t), e;
}
function Tt(e, t) {
  var r = lt(function() {
    return {
      // value
      value: e,
      // last callback
      callback: t,
      // "memoized" public interface
      facade: {
        get current() {
          return r.value;
        },
        set current(n) {
          var o = r.value;
          o !== n && (r.value = n, r.callback(n, o));
        }
      }
    };
  })[0];
  return r.callback = t, r.facade;
}
var Pt = typeof window < "u" ? c.useLayoutEffect : c.useEffect, Te = /* @__PURE__ */ new WeakMap();
function At(e, t) {
  var r = Tt(null, function(n) {
    return e.forEach(function(o) {
      return le(o, n);
    });
  });
  return Pt(function() {
    var n = Te.get(r);
    if (n) {
      var o = new Set(n), l = new Set(e), i = r.current;
      o.forEach(function(a) {
        l.has(a) || le(a, null);
      }), l.forEach(function(a) {
        o.has(a) || le(a, i);
      });
    }
    Te.set(r, e);
  }, [e]), r;
}
function It(e) {
  return e;
}
function xt(e, t) {
  t === void 0 && (t = It);
  var r = [], n = !1, o = {
    read: function() {
      if (n)
        throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
      return r.length ? r[r.length - 1] : e;
    },
    useMedium: function(l) {
      var i = t(l, n);
      return r.push(i), function() {
        r = r.filter(function(a) {
          return a !== i;
        });
      };
    },
    assignSyncMedium: function(l) {
      for (n = !0; r.length; ) {
        var i = r;
        r = [], i.forEach(l);
      }
      r = {
        push: function(a) {
          return l(a);
        },
        filter: function() {
          return r;
        }
      };
    },
    assignMedium: function(l) {
      n = !0;
      var i = [];
      if (r.length) {
        var a = r;
        r = [], a.forEach(l), i = r;
      }
      var f = function() {
        var u = i;
        i = [], u.forEach(l);
      }, h = function() {
        return Promise.resolve().then(f);
      };
      h(), r = {
        push: function(u) {
          i.push(u), h();
        },
        filter: function(u) {
          return i = i.filter(u), r;
        }
      };
    }
  };
  return o;
}
function Lt(e) {
  e === void 0 && (e = {});
  var t = xt(null);
  return t.options = _({ async: !0, ssr: !1 }, e), t;
}
var _e = function(e) {
  var t = e.sideCar, r = Me(e, ["sideCar"]);
  if (!t)
    throw new Error("Sidecar: please provide `sideCar` property to import the right car");
  var n = t.read();
  if (!n)
    throw new Error("Sidecar medium not found");
  return c.createElement(n, _({}, r));
};
_e.isSideCarExport = !0;
function Nt(e, t) {
  return e.useMedium(t), _e;
}
var Oe = Lt(), ie = function() {
}, te = c.forwardRef(function(e, t) {
  var r = c.useRef(null), n = c.useState({
    onScrollCapture: ie,
    onWheelCapture: ie,
    onTouchMoveCapture: ie
  }), o = n[0], l = n[1], i = e.forwardProps, a = e.children, f = e.className, h = e.removeScrollBar, u = e.enabled, m = e.shards, d = e.sideCar, p = e.noRelative, C = e.noIsolation, s = e.inert, v = e.allowPinchZoom, b = e.as, w = b === void 0 ? "div" : b, g = e.gapMode, S = Me(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), y = d, P = At([r, t]), I = _(_({}, S), o);
  return c.createElement(
    c.Fragment,
    null,
    u && c.createElement(y, { sideCar: Oe, removeScrollBar: h, shards: m, noRelative: p, noIsolation: C, inert: s, setCallbacks: l, allowPinchZoom: !!v, lockRef: r, gapMode: g }),
    i ? c.cloneElement(c.Children.only(a), _(_({}, I), { ref: P })) : c.createElement(w, _({}, I, { className: f, ref: P }), a)
  );
});
te.defaultProps = {
  enabled: !0,
  removeScrollBar: !0,
  inert: !1
};
te.classNames = {
  fullWidth: q,
  zeroRight: $
};
var Ft = function() {
  if (typeof __webpack_nonce__ < "u")
    return __webpack_nonce__;
};
function Mt() {
  if (!document)
    return null;
  var e = document.createElement("style");
  e.type = "text/css";
  var t = Ft();
  return t && e.setAttribute("nonce", t), e;
}
function _t(e, t) {
  e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
}
function Ot(e) {
  var t = document.head || document.getElementsByTagName("head")[0];
  t.appendChild(e);
}
var Dt = function() {
  var e = 0, t = null;
  return {
    add: function(r) {
      e == 0 && (t = Mt()) && (_t(t, r), Ot(t)), e++;
    },
    remove: function() {
      e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
    }
  };
}, kt = function() {
  var e = Dt();
  return function(t, r) {
    c.useEffect(function() {
      return e.add(t), function() {
        e.remove();
      };
    }, [t && r]);
  };
}, De = function() {
  var e = kt(), t = function(r) {
    var n = r.styles, o = r.dynamic;
    return e(n, o), null;
  };
  return t;
}, Wt = {
  left: 0,
  top: 0,
  right: 0,
  gap: 0
}, se = function(e) {
  return parseInt(e || "", 10) || 0;
}, Bt = function(e) {
  var t = window.getComputedStyle(document.body), r = t[e === "padding" ? "paddingLeft" : "marginLeft"], n = t[e === "padding" ? "paddingTop" : "marginTop"], o = t[e === "padding" ? "paddingRight" : "marginRight"];
  return [se(r), se(n), se(o)];
}, Ht = function(e) {
  if (e === void 0 && (e = "margin"), typeof window > "u")
    return Wt;
  var t = Bt(e), r = document.documentElement.clientWidth, n = window.innerWidth;
  return {
    left: t[0],
    top: t[1],
    right: t[2],
    gap: Math.max(0, n - r + t[2] - t[0])
  };
}, Ut = De(), z = "data-scroll-locked", Yt = function(e, t, r, n) {
  var o = e.left, l = e.top, i = e.right, a = e.gap;
  return r === void 0 && (r = "margin"), `
  .`.concat(yt, ` {
   overflow: hidden `).concat(n, `;
   padding-right: `).concat(a, "px ").concat(n, `;
  }
  body[`).concat(z, `] {
    overflow: hidden `).concat(n, `;
    overscroll-behavior: contain;
    `).concat([
    t && "position: relative ".concat(n, ";"),
    r === "margin" && `
    padding-left: `.concat(o, `px;
    padding-top: `).concat(l, `px;
    padding-right: `).concat(i, `px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(a, "px ").concat(n, `;
    `),
    r === "padding" && "padding-right: ".concat(a, "px ").concat(n, ";")
  ].filter(Boolean).join(""), `
  }
  
  .`).concat($, ` {
    right: `).concat(a, "px ").concat(n, `;
  }
  
  .`).concat(q, ` {
    margin-right: `).concat(a, "px ").concat(n, `;
  }
  
  .`).concat($, " .").concat($, ` {
    right: 0 `).concat(n, `;
  }
  
  .`).concat(q, " .").concat(q, ` {
    margin-right: 0 `).concat(n, `;
  }
  
  body[`).concat(z, `] {
    `).concat(Rt, ": ").concat(a, `px;
  }
`);
}, Pe = function() {
  var e = parseInt(document.body.getAttribute(z) || "0", 10);
  return isFinite(e) ? e : 0;
}, zt = function() {
  c.useEffect(function() {
    return document.body.setAttribute(z, (Pe() + 1).toString()), function() {
      var e = Pe() - 1;
      e <= 0 ? document.body.removeAttribute(z) : document.body.setAttribute(z, e.toString());
    };
  }, []);
}, Vt = function(e) {
  var t = e.noRelative, r = e.noImportant, n = e.gapMode, o = n === void 0 ? "margin" : n;
  zt();
  var l = c.useMemo(function() {
    return Ht(o);
  }, [o]);
  return c.createElement(Ut, { styles: Yt(l, !t, o, r ? "" : "!important") });
}, fe = !1;
if (typeof window < "u")
  try {
    var K = Object.defineProperty({}, "passive", {
      get: function() {
        return fe = !0, !0;
      }
    });
    window.addEventListener("test", K, K), window.removeEventListener("test", K, K);
  } catch {
    fe = !1;
  }
var H = fe ? { passive: !1 } : !1, Xt = function(e) {
  return e.tagName === "TEXTAREA";
}, ke = function(e, t) {
  if (!(e instanceof Element))
    return !1;
  var r = window.getComputedStyle(e);
  return (
    // not-not-scrollable
    r[t] !== "hidden" && // contains scroll inside self
    !(r.overflowY === r.overflowX && !Xt(e) && r[t] === "visible")
  );
}, Kt = function(e) {
  return ke(e, "overflowY");
}, Gt = function(e) {
  return ke(e, "overflowX");
}, Ae = function(e, t) {
  var r = t.ownerDocument, n = t;
  do {
    typeof ShadowRoot < "u" && n instanceof ShadowRoot && (n = n.host);
    var o = We(e, n);
    if (o) {
      var l = Be(e, n), i = l[1], a = l[2];
      if (i > a)
        return !0;
    }
    n = n.parentNode;
  } while (n && n !== r.body);
  return !1;
}, jt = function(e) {
  var t = e.scrollTop, r = e.scrollHeight, n = e.clientHeight;
  return [
    t,
    r,
    n
  ];
}, Zt = function(e) {
  var t = e.scrollLeft, r = e.scrollWidth, n = e.clientWidth;
  return [
    t,
    r,
    n
  ];
}, We = function(e, t) {
  return e === "v" ? Kt(t) : Gt(t);
}, Be = function(e, t) {
  return e === "v" ? jt(t) : Zt(t);
}, $t = function(e, t) {
  return e === "h" && t === "rtl" ? -1 : 1;
}, qt = function(e, t, r, n, o) {
  var l = $t(e, window.getComputedStyle(t).direction), i = l * n, a = r.target, f = t.contains(a), h = !1, u = i > 0, m = 0, d = 0;
  do {
    if (!a)
      break;
    var p = Be(e, a), C = p[0], s = p[1], v = p[2], b = s - v - l * C;
    (C || b) && We(e, a) && (m += b, d += C);
    var w = a.parentNode;
    a = w && w.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? w.host : w;
  } while (
    // portaled content
    !f && a !== document.body || // self content
    f && (t.contains(a) || t === a)
  );
  return (u && Math.abs(m) < 1 || !u && Math.abs(d) < 1) && (h = !0), h;
}, G = function(e) {
  return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
}, Ie = function(e) {
  return [e.deltaX, e.deltaY];
}, xe = function(e) {
  return e && "current" in e ? e.current : e;
}, Qt = function(e, t) {
  return e[0] === t[0] && e[1] === t[1];
}, Jt = function(e) {
  return `
  .block-interactivity-`.concat(e, ` {pointer-events: none;}
  .allow-interactivity-`).concat(e, ` {pointer-events: all;}
`);
}, er = 0, U = [];
function tr(e) {
  var t = c.useRef([]), r = c.useRef([0, 0]), n = c.useRef(), o = c.useState(er++)[0], l = c.useState(De)[0], i = c.useRef(e);
  c.useEffect(function() {
    i.current = e;
  }, [e]), c.useEffect(function() {
    if (e.inert) {
      document.body.classList.add("block-interactivity-".concat(o));
      var s = Ct([e.lockRef.current], (e.shards || []).map(xe), !0).filter(Boolean);
      return s.forEach(function(v) {
        return v.classList.add("allow-interactivity-".concat(o));
      }), function() {
        document.body.classList.remove("block-interactivity-".concat(o)), s.forEach(function(v) {
          return v.classList.remove("allow-interactivity-".concat(o));
        });
      };
    }
  }, [e.inert, e.lockRef.current, e.shards]);
  var a = c.useCallback(function(s, v) {
    if ("touches" in s && s.touches.length === 2 || s.type === "wheel" && s.ctrlKey)
      return !i.current.allowPinchZoom;
    var b = G(s), w = r.current, g = "deltaX" in s ? s.deltaX : w[0] - b[0], S = "deltaY" in s ? s.deltaY : w[1] - b[1], y, P = s.target, I = Math.abs(g) > Math.abs(S) ? "h" : "v";
    if ("touches" in s && I === "h" && P.type === "range")
      return !1;
    var R = Ae(I, P);
    if (!R)
      return !0;
    if (R ? y = I : (y = I === "v" ? "h" : "v", R = Ae(I, P)), !R)
      return !1;
    if (!n.current && "changedTouches" in s && (g || S) && (n.current = y), !y)
      return !0;
    var T = n.current || y;
    return qt(T, v, s, T === "h" ? g : S);
  }, []), f = c.useCallback(function(s) {
    var v = s;
    if (!(!U.length || U[U.length - 1] !== l)) {
      var b = "deltaY" in v ? Ie(v) : G(v), w = t.current.filter(function(y) {
        return y.name === v.type && (y.target === v.target || v.target === y.shadowParent) && Qt(y.delta, b);
      })[0];
      if (w && w.should) {
        v.cancelable && v.preventDefault();
        return;
      }
      if (!w) {
        var g = (i.current.shards || []).map(xe).filter(Boolean).filter(function(y) {
          return y.contains(v.target);
        }), S = g.length > 0 ? a(v, g[0]) : !i.current.noIsolation;
        S && v.cancelable && v.preventDefault();
      }
    }
  }, []), h = c.useCallback(function(s, v, b, w) {
    var g = { name: s, delta: v, target: b, should: w, shadowParent: rr(b) };
    t.current.push(g), setTimeout(function() {
      t.current = t.current.filter(function(S) {
        return S !== g;
      });
    }, 1);
  }, []), u = c.useCallback(function(s) {
    r.current = G(s), n.current = void 0;
  }, []), m = c.useCallback(function(s) {
    h(s.type, Ie(s), s.target, a(s, e.lockRef.current));
  }, []), d = c.useCallback(function(s) {
    h(s.type, G(s), s.target, a(s, e.lockRef.current));
  }, []);
  c.useEffect(function() {
    return U.push(l), e.setCallbacks({
      onScrollCapture: m,
      onWheelCapture: m,
      onTouchMoveCapture: d
    }), document.addEventListener("wheel", f, H), document.addEventListener("touchmove", f, H), document.addEventListener("touchstart", u, H), function() {
      U = U.filter(function(s) {
        return s !== l;
      }), document.removeEventListener("wheel", f, H), document.removeEventListener("touchmove", f, H), document.removeEventListener("touchstart", u, H);
    };
  }, []);
  var p = e.removeScrollBar, C = e.inert;
  return c.createElement(
    c.Fragment,
    null,
    C ? c.createElement(l, { styles: Jt(o) }) : null,
    p ? c.createElement(Vt, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
  );
}
function rr(e) {
  for (var t = null; e !== null; )
    e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
  return t;
}
const nr = Nt(Oe, tr);
var or = c.forwardRef(function(e, t) {
  return c.createElement(te, _({}, e, { ref: t, sideCar: nr }));
});
or.classNames = te.classNames;
var ar = function(e) {
  if (typeof document > "u")
    return null;
  var t = Array.isArray(e) ? e[0] : e;
  return t.ownerDocument.body;
}, Y = /* @__PURE__ */ new WeakMap(), j = /* @__PURE__ */ new WeakMap(), Z = {}, ue = 0, He = function(e) {
  return e && (e.host || He(e.parentNode));
}, cr = function(e, t) {
  return t.map(function(r) {
    if (e.contains(r))
      return r;
    var n = He(r);
    return n && e.contains(n) ? n : (console.error("aria-hidden", r, "in not contained inside", e, ". Doing nothing"), null);
  }).filter(function(r) {
    return !!r;
  });
}, lr = function(e, t, r, n) {
  var o = cr(t, Array.isArray(e) ? e : [e]);
  Z[r] || (Z[r] = /* @__PURE__ */ new WeakMap());
  var l = Z[r], i = [], a = /* @__PURE__ */ new Set(), f = new Set(o), h = function(m) {
    !m || a.has(m) || (a.add(m), h(m.parentNode));
  };
  o.forEach(h);
  var u = function(m) {
    !m || f.has(m) || Array.prototype.forEach.call(m.children, function(d) {
      if (a.has(d))
        u(d);
      else
        try {
          var p = d.getAttribute(n), C = p !== null && p !== "false", s = (Y.get(d) || 0) + 1, v = (l.get(d) || 0) + 1;
          Y.set(d, s), l.set(d, v), i.push(d), s === 1 && C && j.set(d, !0), v === 1 && d.setAttribute(r, "true"), C || d.setAttribute(n, "true");
        } catch (b) {
          console.error("aria-hidden: cannot operate on ", d, b);
        }
    });
  };
  return u(t), a.clear(), ue++, function() {
    i.forEach(function(m) {
      var d = Y.get(m) - 1, p = l.get(m) - 1;
      Y.set(m, d), l.set(m, p), d || (j.has(m) || m.removeAttribute(n), j.delete(m)), p || m.removeAttribute(r);
    }), ue--, ue || (Y = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakMap(), j = /* @__PURE__ */ new WeakMap(), Z = {});
  };
}, Hr = function(e, t, r) {
  r === void 0 && (r = "data-aria-hidden");
  var n = Array.from(Array.isArray(e) ? e : [e]), o = ar(e);
  return o ? (n.push.apply(n, Array.from(o.querySelectorAll("[aria-live], script"))), lr(n, o, r, "aria-hidden")) : function() {
    return null;
  };
}, de = "rovingFocusGroup.onEntryFocus", ir = { bubbles: !1, cancelable: !0 }, X = "RovingFocusGroup", [ve, Ue, sr] = vt(X), [ur, Ur] = he(
  X,
  [sr]
), [dr, fr] = ur(X), Ye = c.forwardRef(
  (e, t) => /* @__PURE__ */ E(ve.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ E(ve.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ E(vr, { ...e, ref: t }) }) })
);
Ye.displayName = X;
var vr = c.forwardRef((e, t) => {
  const {
    __scopeRovingFocusGroup: r,
    orientation: n,
    loop: o = !1,
    dir: l,
    currentTabStopId: i,
    defaultCurrentTabStopId: a,
    onCurrentTabStopIdChange: f,
    onEntryFocus: h,
    preventScrollOnEntryFocus: u = !1,
    ...m
  } = e, d = c.useRef(null), p = O(t, d), C = Ne(l), [s, v] = it({
    prop: i,
    defaultProp: a ?? null,
    onChange: f,
    caller: X
  }), [b, w] = c.useState(!1), g = M(h), S = Ue(r), y = c.useRef(!1), [P, I] = c.useState(0);
  return c.useEffect(() => {
    const R = d.current;
    if (R)
      return R.addEventListener(de, g), () => R.removeEventListener(de, g);
  }, [g]), /* @__PURE__ */ E(
    dr,
    {
      scope: r,
      orientation: n,
      dir: C,
      loop: o,
      currentTabStopId: s,
      onItemFocus: c.useCallback(
        (R) => v(R),
        [v]
      ),
      onItemShiftTab: c.useCallback(() => w(!0), []),
      onFocusableItemAdd: c.useCallback(
        () => I((R) => R + 1),
        []
      ),
      onFocusableItemRemove: c.useCallback(
        () => I((R) => R - 1),
        []
      ),
      children: /* @__PURE__ */ E(
        W.div,
        {
          tabIndex: b || P === 0 ? -1 : 0,
          "data-orientation": n,
          ...m,
          ref: p,
          style: { outline: "none", ...e.style },
          onMouseDown: L(e.onMouseDown, () => {
            y.current = !0;
          }),
          onFocus: L(e.onFocus, (R) => {
            const T = !y.current;
            if (R.target === R.currentTarget && T && !b) {
              const x = new CustomEvent(de, ir);
              if (R.currentTarget.dispatchEvent(x), !x.defaultPrevented) {
                const F = S().filter((B) => B.focusable), ge = F.find((B) => B.active), at = F.find((B) => B.id === s), ct = [ge, at, ...F].filter(
                  Boolean
                ).map((B) => B.ref.current);
                Xe(ct, u);
              }
            }
            y.current = !1;
          }),
          onBlur: L(e.onBlur, () => w(!1))
        }
      )
    }
  );
}), ze = "RovingFocusGroupItem", Ve = c.forwardRef(
  (e, t) => {
    const {
      __scopeRovingFocusGroup: r,
      focusable: n = !0,
      active: o = !1,
      tabStopId: l,
      children: i,
      ...a
    } = e, f = ut(), h = l || f, u = fr(ze, r), m = u.currentTabStopId === h, d = Ue(r), { onFocusableItemAdd: p, onFocusableItemRemove: C, currentTabStopId: s } = u;
    return c.useEffect(() => {
      if (n)
        return p(), () => C();
    }, [n, p, C]), /* @__PURE__ */ E(
      ve.ItemSlot,
      {
        scope: r,
        id: h,
        focusable: n,
        active: o,
        children: /* @__PURE__ */ E(
          W.span,
          {
            tabIndex: m ? 0 : -1,
            "data-orientation": u.orientation,
            ...a,
            ref: t,
            onMouseDown: L(e.onMouseDown, (v) => {
              n ? u.onItemFocus(h) : v.preventDefault();
            }),
            onFocus: L(e.onFocus, () => u.onItemFocus(h)),
            onKeyDown: L(e.onKeyDown, (v) => {
              if (v.key === "Tab" && v.shiftKey) {
                u.onItemShiftTab();
                return;
              }
              if (v.target !== v.currentTarget) return;
              const b = pr(v, u.orientation, u.dir);
              if (b !== void 0) {
                if (v.metaKey || v.ctrlKey || v.altKey || v.shiftKey) return;
                v.preventDefault();
                let g = d().filter((S) => S.focusable).map((S) => S.ref.current);
                if (b === "last") g.reverse();
                else if (b === "prev" || b === "next") {
                  b === "prev" && g.reverse();
                  const S = g.indexOf(v.currentTarget);
                  g = u.loop ? br(g, S + 1) : g.slice(S + 1);
                }
                setTimeout(() => Xe(g));
              }
            }),
            children: typeof i == "function" ? i({ isCurrentTabStop: m, hasTabStop: s != null }) : i
          }
        )
      }
    );
  }
);
Ve.displayName = ze;
var hr = {
  ArrowLeft: "prev",
  ArrowUp: "prev",
  ArrowRight: "next",
  ArrowDown: "next",
  PageUp: "first",
  Home: "first",
  PageDown: "last",
  End: "last"
};
function mr(e, t) {
  return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
}
function pr(e, t, r) {
  const n = mr(e.key, r);
  if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(n)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(n)))
    return hr[n];
}
function Xe(e, t = !1) {
  const r = document.activeElement;
  for (const n of e)
    if (n === r || (n.focus({ preventScroll: t }), document.activeElement !== r)) return;
}
function br(e, t) {
  return e.map((r, n) => e[(t + n) % e.length]);
}
var Yr = Ye, zr = Ve;
function gr(e, [t, r]) {
  return Math.min(r, Math.max(t, e));
}
function Sr(e, t) {
  return c.useReducer((r, n) => t[r][n] ?? r, e);
}
var me = "ScrollArea", [Ke] = he(me), [wr, N] = Ke(me), Ge = c.forwardRef(
  (e, t) => {
    const {
      __scopeScrollArea: r,
      type: n = "hover",
      dir: o,
      scrollHideDelay: l = 600,
      ...i
    } = e, [a, f] = c.useState(null), [h, u] = c.useState(null), [m, d] = c.useState(null), [p, C] = c.useState(null), [s, v] = c.useState(null), [b, w] = c.useState(0), [g, S] = c.useState(0), [y, P] = c.useState(!1), [I, R] = c.useState(!1), T = O(t, (F) => f(F)), x = Ne(o);
    return /* @__PURE__ */ E(
      wr,
      {
        scope: r,
        type: n,
        dir: x,
        scrollHideDelay: l,
        scrollArea: a,
        viewport: h,
        onViewportChange: u,
        content: m,
        onContentChange: d,
        scrollbarX: p,
        onScrollbarXChange: C,
        scrollbarXEnabled: y,
        onScrollbarXEnabledChange: P,
        scrollbarY: s,
        onScrollbarYChange: v,
        scrollbarYEnabled: I,
        onScrollbarYEnabledChange: R,
        onCornerWidthChange: w,
        onCornerHeightChange: S,
        children: /* @__PURE__ */ E(
          W.div,
          {
            dir: x,
            ...i,
            ref: T,
            style: {
              position: "relative",
              // Pass corner sizes as CSS vars to reduce re-renders of context consumers
              "--radix-scroll-area-corner-width": b + "px",
              "--radix-scroll-area-corner-height": g + "px",
              ...e.style
            }
          }
        )
      }
    );
  }
);
Ge.displayName = me;
var je = "ScrollAreaViewport", Ze = c.forwardRef(
  (e, t) => {
    const { __scopeScrollArea: r, children: n, nonce: o, ...l } = e, i = N(je, r), a = c.useRef(null), f = O(t, a, i.onViewportChange);
    return /* @__PURE__ */ dt(ft, { children: [
      /* @__PURE__ */ E(
        "style",
        {
          dangerouslySetInnerHTML: {
            __html: "[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"
          },
          nonce: o
        }
      ),
      /* @__PURE__ */ E(
        W.div,
        {
          "data-radix-scroll-area-viewport": "",
          ...l,
          ref: f,
          style: {
            /**
             * We don't support `visible` because the intention is to have at least one scrollbar
             * if this component is used and `visible` will behave like `auto` in that case
             * https://developer.mozilla.org/en-US/docs/Web/CSS/overflow#description
             *
             * We don't handle `auto` because the intention is for the native implementation
             * to be hidden if using this component. We just want to ensure the node is scrollable
             * so could have used either `scroll` or `auto` here. We picked `scroll` to prevent
             * the browser from having to work out whether to render native scrollbars or not,
             * we tell it to with the intention of hiding them in CSS.
             */
            overflowX: i.scrollbarXEnabled ? "scroll" : "hidden",
            overflowY: i.scrollbarYEnabled ? "scroll" : "hidden",
            ...e.style
          },
          children: /* @__PURE__ */ E("div", { ref: i.onContentChange, style: { minWidth: "100%", display: "table" }, children: n })
        }
      )
    ] });
  }
);
Ze.displayName = je;
var D = "ScrollAreaScrollbar", $e = c.forwardRef(
  (e, t) => {
    const { forceMount: r, ...n } = e, o = N(D, e.__scopeScrollArea), { onScrollbarXEnabledChange: l, onScrollbarYEnabledChange: i } = o, a = e.orientation === "horizontal";
    return c.useEffect(() => (a ? l(!0) : i(!0), () => {
      a ? l(!1) : i(!1);
    }), [a, l, i]), o.type === "hover" ? /* @__PURE__ */ E(Er, { ...n, ref: t, forceMount: r }) : o.type === "scroll" ? /* @__PURE__ */ E(Cr, { ...n, ref: t, forceMount: r }) : o.type === "auto" ? /* @__PURE__ */ E(qe, { ...n, ref: t, forceMount: r }) : o.type === "always" ? /* @__PURE__ */ E(pe, { ...n, ref: t }) : null;
  }
);
$e.displayName = D;
var Er = c.forwardRef((e, t) => {
  const { forceMount: r, ...n } = e, o = N(D, e.__scopeScrollArea), [l, i] = c.useState(!1);
  return c.useEffect(() => {
    const a = o.scrollArea;
    let f = 0;
    if (a) {
      const h = () => {
        window.clearTimeout(f), i(!0);
      }, u = () => {
        f = window.setTimeout(() => i(!1), o.scrollHideDelay);
      };
      return a.addEventListener("pointerenter", h), a.addEventListener("pointerleave", u), () => {
        window.clearTimeout(f), a.removeEventListener("pointerenter", h), a.removeEventListener("pointerleave", u);
      };
    }
  }, [o.scrollArea, o.scrollHideDelay]), /* @__PURE__ */ E(ee, { present: r || l, children: /* @__PURE__ */ E(
    qe,
    {
      "data-state": l ? "visible" : "hidden",
      ...n,
      ref: t
    }
  ) });
}), Cr = c.forwardRef((e, t) => {
  const { forceMount: r, ...n } = e, o = N(D, e.__scopeScrollArea), l = e.orientation === "horizontal", i = ne(() => f("SCROLL_END"), 100), [a, f] = Sr("hidden", {
    hidden: {
      SCROLL: "scrolling"
    },
    scrolling: {
      SCROLL_END: "idle",
      POINTER_ENTER: "interacting"
    },
    interacting: {
      SCROLL: "interacting",
      POINTER_LEAVE: "idle"
    },
    idle: {
      HIDE: "hidden",
      SCROLL: "scrolling",
      POINTER_ENTER: "interacting"
    }
  });
  return c.useEffect(() => {
    if (a === "idle") {
      const h = window.setTimeout(() => f("HIDE"), o.scrollHideDelay);
      return () => window.clearTimeout(h);
    }
  }, [a, o.scrollHideDelay, f]), c.useEffect(() => {
    const h = o.viewport, u = l ? "scrollLeft" : "scrollTop";
    if (h) {
      let m = h[u];
      const d = () => {
        const p = h[u];
        m !== p && (f("SCROLL"), i()), m = p;
      };
      return h.addEventListener("scroll", d), () => h.removeEventListener("scroll", d);
    }
  }, [o.viewport, l, f, i]), /* @__PURE__ */ E(ee, { present: r || a !== "hidden", children: /* @__PURE__ */ E(
    pe,
    {
      "data-state": a === "hidden" ? "hidden" : "visible",
      ...n,
      ref: t,
      onPointerEnter: L(e.onPointerEnter, () => f("POINTER_ENTER")),
      onPointerLeave: L(e.onPointerLeave, () => f("POINTER_LEAVE"))
    }
  ) });
}), qe = c.forwardRef((e, t) => {
  const r = N(D, e.__scopeScrollArea), { forceMount: n, ...o } = e, [l, i] = c.useState(!1), a = e.orientation === "horizontal", f = ne(() => {
    if (r.viewport) {
      const h = r.viewport.offsetWidth < r.viewport.scrollWidth, u = r.viewport.offsetHeight < r.viewport.scrollHeight;
      i(a ? h : u);
    }
  }, 10);
  return V(r.viewport, f), V(r.content, f), /* @__PURE__ */ E(ee, { present: n || l, children: /* @__PURE__ */ E(
    pe,
    {
      "data-state": l ? "visible" : "hidden",
      ...o,
      ref: t
    }
  ) });
}), pe = c.forwardRef((e, t) => {
  const { orientation: r = "vertical", ...n } = e, o = N(D, e.__scopeScrollArea), l = c.useRef(null), i = c.useRef(0), [a, f] = c.useState({
    content: 0,
    viewport: 0,
    scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
  }), h = rt(a.viewport, a.content), u = {
    ...n,
    sizes: a,
    onSizesChange: f,
    hasThumb: h > 0 && h < 1,
    onThumbChange: (d) => l.current = d,
    onThumbPointerUp: () => i.current = 0,
    onThumbPointerDown: (d) => i.current = d
  };
  function m(d, p) {
    return Ir(d, i.current, a, p);
  }
  return r === "horizontal" ? /* @__PURE__ */ E(
    yr,
    {
      ...u,
      ref: t,
      onThumbPositionChange: () => {
        if (o.viewport && l.current) {
          const d = o.viewport.scrollLeft, p = Le(d, a, o.dir);
          l.current.style.transform = `translate3d(${p}px, 0, 0)`;
        }
      },
      onWheelScroll: (d) => {
        o.viewport && (o.viewport.scrollLeft = d);
      },
      onDragScroll: (d) => {
        o.viewport && (o.viewport.scrollLeft = m(d, o.dir));
      }
    }
  ) : r === "vertical" ? /* @__PURE__ */ E(
    Rr,
    {
      ...u,
      ref: t,
      onThumbPositionChange: () => {
        if (o.viewport && l.current) {
          const d = o.viewport.scrollTop, p = Le(d, a);
          l.current.style.transform = `translate3d(0, ${p}px, 0)`;
        }
      },
      onWheelScroll: (d) => {
        o.viewport && (o.viewport.scrollTop = d);
      },
      onDragScroll: (d) => {
        o.viewport && (o.viewport.scrollTop = m(d));
      }
    }
  ) : null;
}), yr = c.forwardRef((e, t) => {
  const { sizes: r, onSizesChange: n, ...o } = e, l = N(D, e.__scopeScrollArea), [i, a] = c.useState(), f = c.useRef(null), h = O(t, f, l.onScrollbarXChange);
  return c.useEffect(() => {
    f.current && a(getComputedStyle(f.current));
  }, [f]), /* @__PURE__ */ E(
    Je,
    {
      "data-orientation": "horizontal",
      ...o,
      ref: h,
      sizes: r,
      style: {
        bottom: 0,
        left: l.dir === "rtl" ? "var(--radix-scroll-area-corner-width)" : 0,
        right: l.dir === "ltr" ? "var(--radix-scroll-area-corner-width)" : 0,
        "--radix-scroll-area-thumb-width": re(r) + "px",
        ...e.style
      },
      onThumbPointerDown: (u) => e.onThumbPointerDown(u.x),
      onDragScroll: (u) => e.onDragScroll(u.x),
      onWheelScroll: (u, m) => {
        if (l.viewport) {
          const d = l.viewport.scrollLeft + u.deltaX;
          e.onWheelScroll(d), ot(d, m) && u.preventDefault();
        }
      },
      onResize: () => {
        f.current && l.viewport && i && n({
          content: l.viewport.scrollWidth,
          viewport: l.viewport.offsetWidth,
          scrollbar: {
            size: f.current.clientWidth,
            paddingStart: J(i.paddingLeft),
            paddingEnd: J(i.paddingRight)
          }
        });
      }
    }
  );
}), Rr = c.forwardRef((e, t) => {
  const { sizes: r, onSizesChange: n, ...o } = e, l = N(D, e.__scopeScrollArea), [i, a] = c.useState(), f = c.useRef(null), h = O(t, f, l.onScrollbarYChange);
  return c.useEffect(() => {
    f.current && a(getComputedStyle(f.current));
  }, [f]), /* @__PURE__ */ E(
    Je,
    {
      "data-orientation": "vertical",
      ...o,
      ref: h,
      sizes: r,
      style: {
        top: 0,
        right: l.dir === "ltr" ? 0 : void 0,
        left: l.dir === "rtl" ? 0 : void 0,
        bottom: "var(--radix-scroll-area-corner-height)",
        "--radix-scroll-area-thumb-height": re(r) + "px",
        ...e.style
      },
      onThumbPointerDown: (u) => e.onThumbPointerDown(u.y),
      onDragScroll: (u) => e.onDragScroll(u.y),
      onWheelScroll: (u, m) => {
        if (l.viewport) {
          const d = l.viewport.scrollTop + u.deltaY;
          e.onWheelScroll(d), ot(d, m) && u.preventDefault();
        }
      },
      onResize: () => {
        f.current && l.viewport && i && n({
          content: l.viewport.scrollHeight,
          viewport: l.viewport.offsetHeight,
          scrollbar: {
            size: f.current.clientHeight,
            paddingStart: J(i.paddingTop),
            paddingEnd: J(i.paddingBottom)
          }
        });
      }
    }
  );
}), [Tr, Qe] = Ke(D), Je = c.forwardRef((e, t) => {
  const {
    __scopeScrollArea: r,
    sizes: n,
    hasThumb: o,
    onThumbChange: l,
    onThumbPointerUp: i,
    onThumbPointerDown: a,
    onThumbPositionChange: f,
    onDragScroll: h,
    onWheelScroll: u,
    onResize: m,
    ...d
  } = e, p = N(D, r), [C, s] = c.useState(null), v = O(t, (T) => s(T)), b = c.useRef(null), w = c.useRef(""), g = p.viewport, S = n.content - n.viewport, y = M(u), P = M(f), I = ne(m, 10);
  function R(T) {
    if (b.current) {
      const x = T.clientX - b.current.left, F = T.clientY - b.current.top;
      h({ x, y: F });
    }
  }
  return c.useEffect(() => {
    const T = (x) => {
      const F = x.target;
      C?.contains(F) && y(x, S);
    };
    return document.addEventListener("wheel", T, { passive: !1 }), () => document.removeEventListener("wheel", T, { passive: !1 });
  }, [g, C, S, y]), c.useEffect(P, [n, P]), V(C, I), V(p.content, I), /* @__PURE__ */ E(
    Tr,
    {
      scope: r,
      scrollbar: C,
      hasThumb: o,
      onThumbChange: M(l),
      onThumbPointerUp: M(i),
      onThumbPositionChange: P,
      onThumbPointerDown: M(a),
      children: /* @__PURE__ */ E(
        W.div,
        {
          ...d,
          ref: v,
          style: { position: "absolute", ...d.style },
          onPointerDown: L(e.onPointerDown, (T) => {
            T.button === 0 && (T.target.setPointerCapture(T.pointerId), b.current = C.getBoundingClientRect(), w.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", p.viewport && (p.viewport.style.scrollBehavior = "auto"), R(T));
          }),
          onPointerMove: L(e.onPointerMove, R),
          onPointerUp: L(e.onPointerUp, (T) => {
            const x = T.target;
            x.hasPointerCapture(T.pointerId) && x.releasePointerCapture(T.pointerId), document.body.style.webkitUserSelect = w.current, p.viewport && (p.viewport.style.scrollBehavior = ""), b.current = null;
          })
        }
      )
    }
  );
}), Q = "ScrollAreaThumb", et = c.forwardRef(
  (e, t) => {
    const { forceMount: r, ...n } = e, o = Qe(Q, e.__scopeScrollArea);
    return /* @__PURE__ */ E(ee, { present: r || o.hasThumb, children: /* @__PURE__ */ E(Pr, { ref: t, ...n }) });
  }
), Pr = c.forwardRef(
  (e, t) => {
    const { __scopeScrollArea: r, style: n, ...o } = e, l = N(Q, r), i = Qe(Q, r), { onThumbPositionChange: a } = i, f = O(
      t,
      (m) => i.onThumbChange(m)
    ), h = c.useRef(void 0), u = ne(() => {
      h.current && (h.current(), h.current = void 0);
    }, 100);
    return c.useEffect(() => {
      const m = l.viewport;
      if (m) {
        const d = () => {
          if (u(), !h.current) {
            const p = xr(m, a);
            h.current = p, a();
          }
        };
        return a(), m.addEventListener("scroll", d), () => m.removeEventListener("scroll", d);
      }
    }, [l.viewport, u, a]), /* @__PURE__ */ E(
      W.div,
      {
        "data-state": i.hasThumb ? "visible" : "hidden",
        ...o,
        ref: f,
        style: {
          width: "var(--radix-scroll-area-thumb-width)",
          height: "var(--radix-scroll-area-thumb-height)",
          ...n
        },
        onPointerDownCapture: L(e.onPointerDownCapture, (m) => {
          const p = m.target.getBoundingClientRect(), C = m.clientX - p.left, s = m.clientY - p.top;
          i.onThumbPointerDown({ x: C, y: s });
        }),
        onPointerUp: L(e.onPointerUp, i.onThumbPointerUp)
      }
    );
  }
);
et.displayName = Q;
var be = "ScrollAreaCorner", tt = c.forwardRef(
  (e, t) => {
    const r = N(be, e.__scopeScrollArea), n = !!(r.scrollbarX && r.scrollbarY);
    return r.type !== "scroll" && n ? /* @__PURE__ */ E(Ar, { ...e, ref: t }) : null;
  }
);
tt.displayName = be;
var Ar = c.forwardRef((e, t) => {
  const { __scopeScrollArea: r, ...n } = e, o = N(be, r), [l, i] = c.useState(0), [a, f] = c.useState(0), h = !!(l && a);
  return V(o.scrollbarX, () => {
    const u = o.scrollbarX?.offsetHeight || 0;
    o.onCornerHeightChange(u), f(u);
  }), V(o.scrollbarY, () => {
    const u = o.scrollbarY?.offsetWidth || 0;
    o.onCornerWidthChange(u), i(u);
  }), h ? /* @__PURE__ */ E(
    W.div,
    {
      ...n,
      ref: t,
      style: {
        width: l,
        height: a,
        position: "absolute",
        right: o.dir === "ltr" ? 0 : void 0,
        left: o.dir === "rtl" ? 0 : void 0,
        bottom: 0,
        ...e.style
      }
    }
  ) : null;
});
function J(e) {
  return e ? parseInt(e, 10) : 0;
}
function rt(e, t) {
  const r = e / t;
  return isNaN(r) ? 0 : r;
}
function re(e) {
  const t = rt(e.viewport, e.content), r = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, n = (e.scrollbar.size - r) * t;
  return Math.max(n, 18);
}
function Ir(e, t, r, n = "ltr") {
  const o = re(r), l = o / 2, i = t || l, a = o - i, f = r.scrollbar.paddingStart + i, h = r.scrollbar.size - r.scrollbar.paddingEnd - a, u = r.content - r.viewport, m = n === "ltr" ? [0, u] : [u * -1, 0];
  return nt([f, h], m)(e);
}
function Le(e, t, r = "ltr") {
  const n = re(t), o = t.scrollbar.paddingStart + t.scrollbar.paddingEnd, l = t.scrollbar.size - o, i = t.content - t.viewport, a = l - n, f = r === "ltr" ? [0, i] : [i * -1, 0], h = gr(e, f);
  return nt([0, i], [0, a])(h);
}
function nt(e, t) {
  return (r) => {
    if (e[0] === e[1] || t[0] === t[1]) return t[0];
    const n = (t[1] - t[0]) / (e[1] - e[0]);
    return t[0] + n * (r - e[0]);
  };
}
function ot(e, t) {
  return e > 0 && e < t;
}
var xr = (e, t = () => {
}) => {
  let r = { left: e.scrollLeft, top: e.scrollTop }, n = 0;
  return (function o() {
    const l = { left: e.scrollLeft, top: e.scrollTop }, i = r.left !== l.left, a = r.top !== l.top;
    (i || a) && t(), r = l, n = window.requestAnimationFrame(o);
  })(), () => window.cancelAnimationFrame(n);
};
function ne(e, t) {
  const r = M(e), n = c.useRef(0);
  return c.useEffect(() => () => window.clearTimeout(n.current), []), c.useCallback(() => {
    window.clearTimeout(n.current), n.current = window.setTimeout(r, t);
  }, [r, t]);
}
function V(e, t) {
  const r = M(t);
  st(() => {
    let n = 0;
    if (e) {
      const o = new ResizeObserver(() => {
        cancelAnimationFrame(n), n = window.requestAnimationFrame(r);
      });
      return o.observe(e), () => {
        window.cancelAnimationFrame(n), o.unobserve(e);
      };
    }
  }, [e, r]);
}
var Vr = Ge, Xr = Ze, Kr = $e, Gr = et, jr = tt;
const Zr = (e) => {
  if (!c.isValidElement(e)) throw Error(`Expected a single React Element child, but got: ${c.Children.toArray(e).map((t) => typeof t == "object" && "type" in t && typeof t.type == "string" ? t.type : typeof t).join(", ")}`);
  return e;
}, Lr = A.forwardRef((e, t) => A.createElement("svg", { width: "9", height: "9", viewBox: "0 0 9 9", fill: "currentcolor", xmlns: "http://www.w3.org/2000/svg", ...e, ref: t }, A.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0.75 4.5C0.75 4.08579 1.08579 3.75 1.5 3.75H7.5C7.91421 3.75 8.25 4.08579 8.25 4.5C8.25 4.91421 7.91421 5.25 7.5 5.25H1.5C1.08579 5.25 0.75 4.91421 0.75 4.5Z" })));
Lr.displayName = "ThickDividerHorizontalIcon";
const Nr = A.forwardRef((e, t) => A.createElement("svg", { width: "9", height: "9", viewBox: "0 0 9 9", fill: "currentcolor", xmlns: "http://www.w3.org/2000/svg", ...e, ref: t }, A.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8.53547 0.62293C8.88226 0.849446 8.97976 1.3142 8.75325 1.66099L4.5083 8.1599C4.38833 8.34356 4.19397 8.4655 3.9764 8.49358C3.75883 8.52167 3.53987 8.45309 3.3772 8.30591L0.616113 5.80777C0.308959 5.52987 0.285246 5.05559 0.563148 4.74844C0.84105 4.44128 1.31533 4.41757 1.62249 4.69547L3.73256 6.60459L7.49741 0.840706C7.72393 0.493916 8.18868 0.396414 8.53547 0.62293Z" })));
Nr.displayName = "ThickCheckIcon";
const Fr = A.forwardRef((e, t) => A.createElement("svg", { width: "9", height: "9", viewBox: "0 0 9 9", fill: "currentcolor", xmlns: "http://www.w3.org/2000/svg", ...e, ref: t }, A.createElement("path", { d: "M0.135232 3.15803C0.324102 2.95657 0.640521 2.94637 0.841971 3.13523L4.5 6.56464L8.158 3.13523C8.3595 2.94637 8.6759 2.95657 8.8648 3.15803C9.0536 3.35949 9.0434 3.67591 8.842 3.86477L4.84197 7.6148C4.64964 7.7951 4.35036 7.7951 4.15803 7.6148L0.158031 3.86477C-0.0434285 3.67591 -0.0536285 3.35949 0.135232 3.15803Z" })));
Fr.displayName = "ChevronDownIcon";
const Mr = A.forwardRef((e, t) => A.createElement("svg", { width: "9", height: "9", viewBox: "0 0 9 9", fill: "currentcolor", xmlns: "http://www.w3.org/2000/svg", ...e, ref: t }, A.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M3.23826 0.201711C3.54108 -0.0809141 4.01567 -0.0645489 4.29829 0.238264L7.79829 3.98826C8.06724 4.27642 8.06724 4.72359 7.79829 5.01174L4.29829 8.76174C4.01567 9.06455 3.54108 9.08092 3.23826 8.79829C2.93545 8.51567 2.91909 8.04108 3.20171 7.73826L6.22409 4.5L3.20171 1.26174C2.91909 0.958928 2.93545 0.484337 3.23826 0.201711Z" })));
Mr.displayName = "ThickChevronRightIcon";
export {
  jr as C,
  mt as F,
  zr as I,
  or as R,
  Kr as S,
  Gr as T,
  Xr as V,
  Zr as a,
  gr as b,
  vt as c,
  Ur as d,
  Yr as e,
  Vr as f,
  Hr as h,
  Fr as i,
  Mr as l,
  Nr as t,
  Br as u
};
