import { jsx as R, jsxs as se } from "react/jsx-runtime";
import * as d from "react";
import { t as ie, P as e, v as W, g as ae, c as ce, e as le, i as de, s as K, w as xe, k as _, x as Pe, l as ue, o as pe, u as J, y as Re, h as De, n as ne, z as Ie, A as U, B as we, C as Ge, D as Je, E as Qe, F as X, G as Ze, q as et, H as tt, I as nt, S as ye, J as ot, K as rt } from "./Stack-Bsa5WF4E.js";
import * as st from "react-dom";
function it(t) {
  const {
    prototype: n = {}
  } = t;
  return !!n.isReactComponent;
}
function Me(t, n, r, o, s) {
  const i = t[n], a = s || n;
  if (i == null || // When server-side rendering React doesn't warn either.
  // This is not an accurate check for SSR.
  // This is only in place for Emotion compat.
  // TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
  typeof window > "u")
    return null;
  let c;
  const l = i.type;
  return typeof l == "function" && !it(l) && (c = "Did you accidentally use a plain function component for an element instead?"), c !== void 0 ? new Error(`Invalid ${o} \`${a}\` supplied to \`${r}\`. Expected an element that can hold a ref. ${c} For more information see https://mui.com/r/caveat-with-refs-guide`) : null;
}
const Q = ie(e.element, Me);
Q.isRequired = ie(e.element.isRequired, Me);
const at = "exact-prop: ​";
function Fe(t) {
  return process.env.NODE_ENV === "production" ? t : {
    ...t,
    [at]: (n) => {
      const r = Object.keys(n).filter((o) => !t.hasOwnProperty(o));
      return r.length > 0 ? new Error(`The following props are not supported: ${r.map((o) => `\`${o}\``).join(", ")}. Please remove them.`) : null;
    }
  };
}
function ge(t, n, r, o, s) {
  if (process.env.NODE_ENV === "production")
    return null;
  const i = t[n], a = s || n;
  return i == null ? null : i && i.nodeType !== 1 ? new Error(`Invalid ${o} \`${a}\` supplied to \`${r}\`. Expected an HTMLElement.`) : null;
}
function ke(...t) {
  return t.reduce((n, r) => r == null ? n : function(...s) {
    n.apply(this, s), r.apply(this, s);
  }, () => {
  });
}
function ct(t, n = 166) {
  let r;
  function o(...s) {
    const i = () => {
      t.apply(this, s);
    };
    clearTimeout(r), r = setTimeout(i, n);
  }
  return o.clear = () => {
    clearTimeout(r);
  }, o;
}
function Y(t) {
  return W(t).defaultView || window;
}
function Ne(t, n) {
  typeof t == "function" ? t(n) : t && (t.current = n);
}
function lt(t = window) {
  const n = t.document.documentElement.clientWidth;
  return t.innerWidth - n;
}
function dt(t) {
  const n = typeof t;
  switch (n) {
    case "number":
      return Number.isNaN(t) ? "NaN" : Number.isFinite(t) ? t !== Math.floor(t) ? "float" : "number" : "Infinity";
    case "object":
      return t === null ? "null" : t.constructor.name;
    default:
      return n;
  }
}
function $e(t, n, r, o) {
  const s = t[n];
  if (s == null || !Number.isInteger(s)) {
    const i = dt(s);
    return new RangeError(`Invalid ${o} \`${n}\` of type \`${i}\` supplied to \`${r}\`, expected \`integer\`.`);
  }
  return null;
}
function Ae(t, n, ...r) {
  return t[n] === void 0 ? null : $e(t, n, ...r);
}
function be() {
  return null;
}
Ae.isRequired = $e;
be.isRequired = be;
const je = process.env.NODE_ENV === "production" ? be : Ae;
function fe(t) {
  var n;
  return parseInt(d.version, 10) >= 19 ? ((n = t == null ? void 0 : t.props) == null ? void 0 : n.ref) || null : (t == null ? void 0 : t.ref) || null;
}
function ut(t) {
  return ae("MuiPaper", t);
}
ce("MuiPaper", ["root", "rounded", "outlined", "elevation", "elevation0", "elevation1", "elevation2", "elevation3", "elevation4", "elevation5", "elevation6", "elevation7", "elevation8", "elevation9", "elevation10", "elevation11", "elevation12", "elevation13", "elevation14", "elevation15", "elevation16", "elevation17", "elevation18", "elevation19", "elevation20", "elevation21", "elevation22", "elevation23", "elevation24"]);
const pt = (t) => {
  const {
    square: n,
    elevation: r,
    variant: o,
    classes: s
  } = t, i = {
    root: ["root", o, !n && "rounded", o === "elevation" && `elevation${r}`]
  };
  return ue(i, ut, s);
}, ft = K("div", {
  name: "MuiPaper",
  slot: "Root",
  overridesResolver: (t, n) => {
    const {
      ownerState: r
    } = t;
    return [n.root, n[r.variant], !r.square && n.rounded, r.variant === "elevation" && n[`elevation${r.elevation}`]];
  }
})(pe(({
  theme: t
}) => ({
  backgroundColor: (t.vars || t).palette.background.paper,
  color: (t.vars || t).palette.text.primary,
  transition: t.transitions.create("box-shadow"),
  variants: [{
    props: ({
      ownerState: n
    }) => !n.square,
    style: {
      borderRadius: t.shape.borderRadius
    }
  }, {
    props: {
      variant: "outlined"
    },
    style: {
      border: `1px solid ${(t.vars || t).palette.divider}`
    }
  }, {
    props: {
      variant: "elevation"
    },
    style: {
      boxShadow: "var(--Paper-shadow)",
      backgroundImage: "var(--Paper-overlay)"
    }
  }]
}))), Be = /* @__PURE__ */ d.forwardRef(function(n, r) {
  var v;
  const o = le({
    props: n,
    name: "MuiPaper"
  }), s = de(), {
    className: i,
    component: a = "div",
    elevation: c = 1,
    square: l = !1,
    variant: u = "elevation",
    ...g
  } = o, T = {
    ...o,
    component: a,
    elevation: c,
    square: l,
    variant: u
  }, P = pt(T);
  return process.env.NODE_ENV !== "production" && s.shadows[c] === void 0 && console.error([`MUI: The elevation provided <Paper elevation={${c}}> is not available in the theme.`, `Please make sure that \`theme.shadows[${c}]\` is defined.`].join(`
`)), /* @__PURE__ */ R(ft, {
    as: a,
    ownerState: T,
    className: _(P.root, i),
    ref: r,
    ...g,
    style: {
      ...u === "elevation" && {
        "--Paper-shadow": (s.vars || s).shadows[c],
        ...s.vars && {
          "--Paper-overlay": (v = s.vars.overlays) == null ? void 0 : v[c]
        },
        ...!s.vars && s.palette.mode === "dark" && {
          "--Paper-overlay": `linear-gradient(${xe("#fff", Pe(c))}, ${xe("#fff", Pe(c))})`
        }
      },
      ...g.style
    }
  });
});
process.env.NODE_ENV !== "production" && (Be.propTypes = {
  // ┌────────────────────────────── Warning ──────────────────────────────┐
  // │ These PropTypes are generated from the TypeScript type definitions. │
  // │    To update them, edit the d.ts file and run `pnpm proptypes`.     │
  // └─────────────────────────────────────────────────────────────────────┘
  /**
   * The content of the component.
   */
  children: e.node,
  /**
   * Override or extend the styles applied to the component.
   */
  classes: e.object,
  /**
   * @ignore
   */
  className: e.string,
  /**
   * The component used for the root node.
   * Either a string to use a HTML element or a component.
   */
  component: e.elementType,
  /**
   * Shadow depth, corresponds to `dp` in the spec.
   * It accepts values between 0 and 24 inclusive.
   * @default 1
   */
  elevation: ie(je, (t) => {
    const {
      elevation: n,
      variant: r
    } = t;
    return n > 0 && r === "outlined" ? new Error(`MUI: Combining \`elevation={${n}}\` with \`variant="${r}"\` has no effect. Either use \`elevation={0}\` or use a different \`variant\`.`) : null;
  }),
  /**
   * If `true`, rounded corners are disabled.
   * @default false
   */
  square: e.bool,
  /**
   * @ignore
   */
  style: e.object,
  /**
   * The system prop that allows defining system overrides as well as additional CSS styles.
   */
  sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
  /**
   * The variant to use.
   * @default 'elevation'
   */
  variant: e.oneOfType([e.oneOf(["elevation", "outlined"]), e.string])
});
function ht(t) {
  return typeof t == "function" ? t() : t;
}
const oe = /* @__PURE__ */ d.forwardRef(function(n, r) {
  const {
    children: o,
    container: s,
    disablePortal: i = !1
  } = n, [a, c] = d.useState(null), l = J(/* @__PURE__ */ d.isValidElement(o) ? fe(o) : null, r);
  if (Re(() => {
    i || c(ht(s) || document.body);
  }, [s, i]), Re(() => {
    if (a && !i)
      return Ne(r, a), () => {
        Ne(r, null);
      };
  }, [r, a, i]), i) {
    if (/* @__PURE__ */ d.isValidElement(o)) {
      const u = {
        ref: l
      };
      return /* @__PURE__ */ d.cloneElement(o, u);
    }
    return o;
  }
  return a && /* @__PURE__ */ st.createPortal(o, a);
});
process.env.NODE_ENV !== "production" && (oe.propTypes = {
  // ┌────────────────────────────── Warning ──────────────────────────────┐
  // │ These PropTypes are generated from the TypeScript type definitions. │
  // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
  // └─────────────────────────────────────────────────────────────────────┘
  /**
   * The children to render into the `container`.
   */
  children: e.node,
  /**
   * An HTML element or function that returns one.
   * The `container` will have the portal children appended to it.
   *
   * You can also provide a callback, which is called in a React layout effect.
   * This lets you set the container from a ref, and also makes server-side rendering possible.
   *
   * By default, it uses the body of the top-level document object,
   * so it's simply `document.body` most of the time.
   */
  container: e.oneOfType([ge, e.func]),
  /**
   * The `children` will be under the DOM hierarchy of the parent component.
   * @default false
   */
  disablePortal: e.bool
});
process.env.NODE_ENV !== "production" && (oe.propTypes = Fe(oe.propTypes));
const mt = {
  entering: {
    opacity: 1
  },
  entered: {
    opacity: 1
  }
}, Le = /* @__PURE__ */ d.forwardRef(function(n, r) {
  const o = de(), s = {
    enter: o.transitions.duration.enteringScreen,
    exit: o.transitions.duration.leavingScreen
  }, {
    addEndListener: i,
    appear: a = !0,
    children: c,
    easing: l,
    in: u,
    onEnter: g,
    onEntered: T,
    onEntering: P,
    onExit: v,
    onExited: x,
    onExiting: M,
    style: w,
    timeout: N = s,
    // eslint-disable-next-line react/prop-types
    TransitionComponent: O = De,
    ...p
  } = n, E = d.useRef(null), C = J(E, fe(c), r), S = (y) => (h) => {
    if (y) {
      const m = E.current;
      h === void 0 ? y(m) : y(m, h);
    }
  }, b = S(P), D = S((y, h) => {
    Ie(y);
    const m = ne({
      style: w,
      timeout: N,
      easing: l
    }, {
      mode: "enter"
    });
    y.style.webkitTransition = o.transitions.create("opacity", m), y.style.transition = o.transitions.create("opacity", m), g && g(y, h);
  }), k = S(T), j = S(M), L = S((y) => {
    const h = ne({
      style: w,
      timeout: N,
      easing: l
    }, {
      mode: "exit"
    });
    y.style.webkitTransition = o.transitions.create("opacity", h), y.style.transition = o.transitions.create("opacity", h), v && v(y);
  }), $ = S(x);
  return /* @__PURE__ */ R(O, {
    appear: a,
    in: u,
    nodeRef: E,
    onEnter: D,
    onEntered: k,
    onEntering: b,
    onExit: L,
    onExited: $,
    onExiting: j,
    addEndListener: (y) => {
      i && i(E.current, y);
    },
    timeout: N,
    ...p,
    children: (y, {
      ownerState: h,
      ...m
    }) => /* @__PURE__ */ d.cloneElement(c, {
      style: {
        opacity: 0,
        visibility: y === "exited" && !u ? "hidden" : void 0,
        ...mt[y],
        ...w,
        ...c.props.style
      },
      ref: C,
      ...m
    })
  });
});
process.env.NODE_ENV !== "production" && (Le.propTypes = {
  // ┌────────────────────────────── Warning ──────────────────────────────┐
  // │ These PropTypes are generated from the TypeScript type definitions. │
  // │    To update them, edit the d.ts file and run `pnpm proptypes`.     │
  // └─────────────────────────────────────────────────────────────────────┘
  /**
   * Add a custom transition end trigger. Called with the transitioning DOM
   * node and a done callback. Allows for more fine grained transition end
   * logic. Note: Timeouts are still used as a fallback if provided.
   */
  addEndListener: e.func,
  /**
   * Perform the enter transition when it first mounts if `in` is also `true`.
   * Set this to `false` to disable this behavior.
   * @default true
   */
  appear: e.bool,
  /**
   * A single child content element.
   */
  children: Q.isRequired,
  /**
   * The transition timing function.
   * You may specify a single easing or a object containing enter and exit values.
   */
  easing: e.oneOfType([e.shape({
    enter: e.string,
    exit: e.string
  }), e.string]),
  /**
   * If `true`, the component will transition in.
   */
  in: e.bool,
  /**
   * @ignore
   */
  onEnter: e.func,
  /**
   * @ignore
   */
  onEntered: e.func,
  /**
   * @ignore
   */
  onEntering: e.func,
  /**
   * @ignore
   */
  onExit: e.func,
  /**
   * @ignore
   */
  onExited: e.func,
  /**
   * @ignore
   */
  onExiting: e.func,
  /**
   * @ignore
   */
  style: e.object,
  /**
   * The duration for the transition, in milliseconds.
   * You may specify a single timeout for all transitions, or individually with an object.
   * @default {
   *   enter: theme.transitions.duration.enteringScreen,
   *   exit: theme.transitions.duration.leavingScreen,
   * }
   */
  timeout: e.oneOfType([e.number, e.shape({
    appear: e.number,
    enter: e.number,
    exit: e.number
  })])
});
function bt(t) {
  return ae("MuiBackdrop", t);
}
ce("MuiBackdrop", ["root", "invisible"]);
const yt = (t) => {
  const {
    classes: n,
    invisible: r
  } = t;
  return ue({
    root: ["root", r && "invisible"]
  }, bt, n);
}, gt = K("div", {
  name: "MuiBackdrop",
  slot: "Root",
  overridesResolver: (t, n) => {
    const {
      ownerState: r
    } = t;
    return [n.root, r.invisible && n.invisible];
  }
})({
  position: "fixed",
  display: "flex",
  alignItems: "center",
  justifyContent: "center",
  right: 0,
  bottom: 0,
  top: 0,
  left: 0,
  backgroundColor: "rgba(0, 0, 0, 0.5)",
  WebkitTapHighlightColor: "transparent",
  variants: [{
    props: {
      invisible: !0
    },
    style: {
      backgroundColor: "transparent"
    }
  }]
}), ve = /* @__PURE__ */ d.forwardRef(function(n, r) {
  const o = le({
    props: n,
    name: "MuiBackdrop"
  }), {
    children: s,
    className: i,
    component: a = "div",
    invisible: c = !1,
    open: l,
    components: u = {},
    componentsProps: g = {},
    slotProps: T = {},
    slots: P = {},
    TransitionComponent: v,
    transitionDuration: x,
    ...M
  } = o, w = {
    ...o,
    component: a,
    invisible: c
  }, N = yt(w), O = {
    transition: v,
    root: u.Root,
    ...P
  }, p = {
    ...g,
    ...T
  }, E = {
    slots: O,
    slotProps: p
  }, [C, S] = U("root", {
    elementType: gt,
    externalForwardedProps: E,
    className: _(N.root, i),
    ownerState: w
  }), [b, D] = U("transition", {
    elementType: Le,
    externalForwardedProps: E,
    ownerState: w
  });
  return /* @__PURE__ */ R(b, {
    in: l,
    timeout: x,
    ...M,
    ...D,
    children: /* @__PURE__ */ R(C, {
      "aria-hidden": !0,
      ...S,
      classes: N,
      ref: r,
      children: s
    })
  });
});
process.env.NODE_ENV !== "production" && (ve.propTypes = {
  // ┌────────────────────────────── Warning ──────────────────────────────┐
  // │ These PropTypes are generated from the TypeScript type definitions. │
  // │    To update them, edit the d.ts file and run `pnpm proptypes`.     │
  // └─────────────────────────────────────────────────────────────────────┘
  /**
   * The content of the component.
   */
  children: e.node,
  /**
   * Override or extend the styles applied to the component.
   */
  classes: e.object,
  /**
   * @ignore
   */
  className: e.string,
  /**
   * The component used for the root node.
   * Either a string to use a HTML element or a component.
   */
  component: e.elementType,
  /**
   * The components used for each slot inside.
   *
   * @deprecated Use the `slots` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
   *
   * @default {}
   */
  components: e.shape({
    Root: e.elementType
  }),
  /**
   * The extra props for the slot components.
   * You can override the existing props or add new ones.
   *
   * @deprecated Use the `slotProps` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
   *
   * @default {}
   */
  componentsProps: e.shape({
    root: e.object
  }),
  /**
   * If `true`, the backdrop is invisible.
   * It can be used when rendering a popover or a custom select component.
   * @default false
   */
  invisible: e.bool,
  /**
   * If `true`, the component is shown.
   */
  open: e.bool.isRequired,
  /**
   * The props used for each slot inside.
   * @default {}
   */
  slotProps: e.shape({
    root: e.oneOfType([e.func, e.object]),
    transition: e.oneOfType([e.func, e.object])
  }),
  /**
   * The components used for each slot inside.
   * @default {}
   */
  slots: e.shape({
    root: e.elementType,
    transition: e.elementType
  }),
  /**
   * The system prop that allows defining system overrides as well as additional CSS styles.
   */
  sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
  /**
   * The component used for the transition.
   * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
   * @default Fade
   * @deprecated Use `slots.transition` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
   */
  TransitionComponent: e.elementType,
  /**
   * The duration for the transition, in milliseconds.
   * You may specify a single timeout for all transitions, or individually with an object.
   */
  transitionDuration: e.oneOfType([e.number, e.shape({
    appear: e.number,
    enter: e.number,
    exit: e.number
  })])
});
function vt(t) {
  const n = W(t);
  return n.body === t ? Y(t).innerWidth > n.documentElement.clientWidth : t.scrollHeight > t.clientHeight;
}
function G(t, n) {
  n ? t.setAttribute("aria-hidden", "true") : t.removeAttribute("aria-hidden");
}
function Ce(t) {
  return parseInt(Y(t).getComputedStyle(t).paddingRight, 10) || 0;
}
function Et(t) {
  const r = ["TEMPLATE", "SCRIPT", "STYLE", "LINK", "MAP", "META", "NOSCRIPT", "PICTURE", "COL", "COLGROUP", "PARAM", "SLOT", "SOURCE", "TRACK"].includes(t.tagName), o = t.tagName === "INPUT" && t.getAttribute("type") === "hidden";
  return r || o;
}
function Oe(t, n, r, o, s) {
  const i = [n, r, ...o];
  [].forEach.call(t.children, (a) => {
    const c = !i.includes(a), l = !Et(a);
    c && l && G(a, s);
  });
}
function me(t, n) {
  let r = -1;
  return t.some((o, s) => n(o) ? (r = s, !0) : !1), r;
}
function Tt(t, n) {
  const r = [], o = t.container;
  if (!n.disableScrollLock) {
    if (vt(o)) {
      const a = lt(Y(o));
      r.push({
        value: o.style.paddingRight,
        property: "padding-right",
        el: o
      }), o.style.paddingRight = `${Ce(o) + a}px`;
      const c = W(o).querySelectorAll(".mui-fixed");
      [].forEach.call(c, (l) => {
        r.push({
          value: l.style.paddingRight,
          property: "padding-right",
          el: l
        }), l.style.paddingRight = `${Ce(l) + a}px`;
      });
    }
    let i;
    if (o.parentNode instanceof DocumentFragment)
      i = W(o).body;
    else {
      const a = o.parentElement, c = Y(o);
      i = (a == null ? void 0 : a.nodeName) === "HTML" && c.getComputedStyle(a).overflowY === "scroll" ? a : o;
    }
    r.push({
      value: i.style.overflow,
      property: "overflow",
      el: i
    }, {
      value: i.style.overflowX,
      property: "overflow-x",
      el: i
    }, {
      value: i.style.overflowY,
      property: "overflow-y",
      el: i
    }), i.style.overflow = "hidden";
  }
  return () => {
    r.forEach(({
      value: i,
      el: a,
      property: c
    }) => {
      i ? a.style.setProperty(c, i) : a.style.removeProperty(c);
    });
  };
}
function xt(t) {
  const n = [];
  return [].forEach.call(t.children, (r) => {
    r.getAttribute("aria-hidden") === "true" && n.push(r);
  }), n;
}
class Pt {
  constructor() {
    this.modals = [], this.containers = [];
  }
  add(n, r) {
    let o = this.modals.indexOf(n);
    if (o !== -1)
      return o;
    o = this.modals.length, this.modals.push(n), n.modalRef && G(n.modalRef, !1);
    const s = xt(r);
    Oe(r, n.mount, n.modalRef, s, !0);
    const i = me(this.containers, (a) => a.container === r);
    return i !== -1 ? (this.containers[i].modals.push(n), o) : (this.containers.push({
      modals: [n],
      container: r,
      restore: null,
      hiddenSiblings: s
    }), o);
  }
  mount(n, r) {
    const o = me(this.containers, (i) => i.modals.includes(n)), s = this.containers[o];
    s.restore || (s.restore = Tt(s, r));
  }
  remove(n, r = !0) {
    const o = this.modals.indexOf(n);
    if (o === -1)
      return o;
    const s = me(this.containers, (a) => a.modals.includes(n)), i = this.containers[s];
    if (i.modals.splice(i.modals.indexOf(n), 1), this.modals.splice(o, 1), i.modals.length === 0)
      i.restore && i.restore(), n.modalRef && G(n.modalRef, r), Oe(i.container, n.mount, n.modalRef, i.hiddenSiblings, !1), this.containers.splice(s, 1);
    else {
      const a = i.modals[i.modals.length - 1];
      a.modalRef && G(a.modalRef, !1);
    }
    return o;
  }
  isTopModal(n) {
    return this.modals.length > 0 && this.modals[this.modals.length - 1] === n;
  }
}
const Rt = ["input", "select", "textarea", "a[href]", "button", "[tabindex]", "audio[controls]", "video[controls]", '[contenteditable]:not([contenteditable="false"])'].join(",");
function wt(t) {
  const n = parseInt(t.getAttribute("tabindex") || "", 10);
  return Number.isNaN(n) ? t.contentEditable === "true" || (t.nodeName === "AUDIO" || t.nodeName === "VIDEO" || t.nodeName === "DETAILS") && t.getAttribute("tabindex") === null ? 0 : t.tabIndex : n;
}
function kt(t) {
  if (t.tagName !== "INPUT" || t.type !== "radio" || !t.name)
    return !1;
  const n = (o) => t.ownerDocument.querySelector(`input[type="radio"]${o}`);
  let r = n(`[name="${t.name}"]:checked`);
  return r || (r = n(`[name="${t.name}"]`)), r !== t;
}
function Nt(t) {
  return !(t.disabled || t.tagName === "INPUT" && t.type === "hidden" || kt(t));
}
function Ct(t) {
  const n = [], r = [];
  return Array.from(t.querySelectorAll(Rt)).forEach((o, s) => {
    const i = wt(o);
    i === -1 || !Nt(o) || (i === 0 ? n.push(o) : r.push({
      documentOrder: s,
      tabIndex: i,
      node: o
    }));
  }), r.sort((o, s) => o.tabIndex === s.tabIndex ? o.documentOrder - s.documentOrder : o.tabIndex - s.tabIndex).map((o) => o.node).concat(n);
}
function Ot() {
  return !0;
}
function re(t) {
  const {
    children: n,
    disableAutoFocus: r = !1,
    disableEnforceFocus: o = !1,
    disableRestoreFocus: s = !1,
    getTabbable: i = Ct,
    isEnabled: a = Ot,
    open: c
  } = t, l = d.useRef(!1), u = d.useRef(null), g = d.useRef(null), T = d.useRef(null), P = d.useRef(null), v = d.useRef(!1), x = d.useRef(null), M = J(fe(n), x), w = d.useRef(null);
  d.useEffect(() => {
    !c || !x.current || (v.current = !r);
  }, [r, c]), d.useEffect(() => {
    if (!c || !x.current)
      return;
    const p = W(x.current);
    return x.current.contains(p.activeElement) || (x.current.hasAttribute("tabIndex") || (process.env.NODE_ENV !== "production" && console.error(["MUI: The modal content node does not accept focus.", 'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".'].join(`
`)), x.current.setAttribute("tabIndex", "-1")), v.current && x.current.focus()), () => {
      s || (T.current && T.current.focus && (l.current = !0, T.current.focus()), T.current = null);
    };
  }, [c]), d.useEffect(() => {
    if (!c || !x.current)
      return;
    const p = W(x.current), E = (b) => {
      w.current = b, !(o || !a() || b.key !== "Tab") && p.activeElement === x.current && b.shiftKey && (l.current = !0, g.current && g.current.focus());
    }, C = () => {
      var k, j;
      const b = x.current;
      if (b === null)
        return;
      if (!p.hasFocus() || !a() || l.current) {
        l.current = !1;
        return;
      }
      if (b.contains(p.activeElement) || o && p.activeElement !== u.current && p.activeElement !== g.current)
        return;
      if (p.activeElement !== P.current)
        P.current = null;
      else if (P.current !== null)
        return;
      if (!v.current)
        return;
      let D = [];
      if ((p.activeElement === u.current || p.activeElement === g.current) && (D = i(x.current)), D.length > 0) {
        const L = !!((k = w.current) != null && k.shiftKey && ((j = w.current) == null ? void 0 : j.key) === "Tab"), $ = D[0], A = D[D.length - 1];
        typeof $ != "string" && typeof A != "string" && (L ? A.focus() : $.focus());
      } else
        b.focus();
    };
    p.addEventListener("focusin", C), p.addEventListener("keydown", E, !0);
    const S = setInterval(() => {
      p.activeElement && p.activeElement.tagName === "BODY" && C();
    }, 50);
    return () => {
      clearInterval(S), p.removeEventListener("focusin", C), p.removeEventListener("keydown", E, !0);
    };
  }, [r, o, s, a, c, i]);
  const N = (p) => {
    T.current === null && (T.current = p.relatedTarget), v.current = !0, P.current = p.target;
    const E = n.props.onFocus;
    E && E(p);
  }, O = (p) => {
    T.current === null && (T.current = p.relatedTarget), v.current = !0;
  };
  return /* @__PURE__ */ se(d.Fragment, {
    children: [/* @__PURE__ */ R("div", {
      tabIndex: c ? 0 : -1,
      onFocus: O,
      ref: u,
      "data-testid": "sentinelStart"
    }), /* @__PURE__ */ d.cloneElement(n, {
      ref: M,
      onFocus: N
    }), /* @__PURE__ */ R("div", {
      tabIndex: c ? 0 : -1,
      onFocus: O,
      ref: g,
      "data-testid": "sentinelEnd"
    })]
  });
}
process.env.NODE_ENV !== "production" && (re.propTypes = {
  // ┌────────────────────────────── Warning ──────────────────────────────┐
  // │ These PropTypes are generated from the TypeScript type definitions. │
  // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
  // └─────────────────────────────────────────────────────────────────────┘
  /**
   * A single child content element.
   */
  children: Q,
  /**
   * If `true`, the focus trap will not automatically shift focus to itself when it opens, and
   * replace it to the last focused element when it closes.
   * This also works correctly with any focus trap children that have the `disableAutoFocus` prop.
   *
   * Generally this should never be set to `true` as it makes the focus trap less
   * accessible to assistive technologies, like screen readers.
   * @default false
   */
  disableAutoFocus: e.bool,
  /**
   * If `true`, the focus trap will not prevent focus from leaving the focus trap while open.
   *
   * Generally this should never be set to `true` as it makes the focus trap less
   * accessible to assistive technologies, like screen readers.
   * @default false
   */
  disableEnforceFocus: e.bool,
  /**
   * If `true`, the focus trap will not restore focus to previously focused element once
   * focus trap is hidden or unmounted.
   * @default false
   */
  disableRestoreFocus: e.bool,
  /**
   * Returns an array of ordered tabbable nodes (i.e. in tab order) within the root.
   * For instance, you can provide the "tabbable" npm dependency.
   * @param {HTMLElement} root
   */
  getTabbable: e.func,
  /**
   * This prop extends the `open` prop.
   * It allows to toggle the open state without having to wait for a rerender when changing the `open` prop.
   * This prop should be memoized.
   * It can be used to support multiple focus trap mounted at the same time.
   * @default function defaultIsEnabled(): boolean {
   *   return true;
   * }
   */
  isEnabled: e.func,
  /**
   * If `true`, focus is locked.
   */
  open: e.bool.isRequired
});
process.env.NODE_ENV !== "production" && (re.propTypes = Fe(re.propTypes));
function St(t) {
  return typeof t == "function" ? t() : t;
}
function Dt(t) {
  return t ? t.props.hasOwnProperty("in") : !1;
}
const Se = () => {
}, ee = new Pt();
function It(t) {
  const {
    container: n,
    disableEscapeKeyDown: r = !1,
    disableScrollLock: o = !1,
    closeAfterTransition: s = !1,
    onTransitionEnter: i,
    onTransitionExited: a,
    children: c,
    onClose: l,
    open: u,
    rootRef: g
  } = t, T = d.useRef({}), P = d.useRef(null), v = d.useRef(null), x = J(v, g), [M, w] = d.useState(!u), N = Dt(c);
  let O = !0;
  (t["aria-hidden"] === "false" || t["aria-hidden"] === !1) && (O = !1);
  const p = () => W(P.current), E = () => (T.current.modalRef = v.current, T.current.mount = P.current, T.current), C = () => {
    ee.mount(E(), {
      disableScrollLock: o
    }), v.current && (v.current.scrollTop = 0);
  }, S = we(() => {
    const h = St(n) || p().body;
    ee.add(E(), h), v.current && C();
  }), b = () => ee.isTopModal(E()), D = we((h) => {
    P.current = h, h && (u && b() ? C() : v.current && G(v.current, O));
  }), k = d.useCallback(() => {
    ee.remove(E(), O);
  }, [O]);
  d.useEffect(() => () => {
    k();
  }, [k]), d.useEffect(() => {
    u ? S() : (!N || !s) && k();
  }, [u, k, N, s, S]);
  const j = (h) => (m) => {
    var F;
    (F = h.onKeyDown) == null || F.call(h, m), !(m.key !== "Escape" || m.which === 229 || // Wait until IME is settled.
    !b()) && (r || (m.stopPropagation(), l && l(m, "escapeKeyDown")));
  }, L = (h) => (m) => {
    var F;
    (F = h.onClick) == null || F.call(h, m), m.target === m.currentTarget && l && l(m, "backdropClick");
  };
  return {
    getRootProps: (h = {}) => {
      const m = Ge(t);
      delete m.onTransitionEnter, delete m.onTransitionExited;
      const F = {
        ...m,
        ...h
      };
      return {
        /*
         * Marking an element with the role presentation indicates to assistive technology
         * that this element should be ignored; it exists to support the web application and
         * is not meant for humans to interact with directly.
         * https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md
         */
        role: "presentation",
        ...F,
        onKeyDown: j(F),
        ref: x
      };
    },
    getBackdropProps: (h = {}) => {
      const m = h;
      return {
        "aria-hidden": !0,
        ...m,
        onClick: L(m),
        open: u
      };
    },
    getTransitionProps: () => {
      const h = () => {
        w(!1), i && i();
      }, m = () => {
        w(!0), a && a(), s && k();
      };
      return {
        onEnter: ke(h, (c == null ? void 0 : c.props.onEnter) ?? Se),
        onExited: ke(m, (c == null ? void 0 : c.props.onExited) ?? Se)
      };
    },
    rootRef: x,
    portalRef: D,
    isTopModal: b,
    exited: M,
    hasTransition: N
  };
}
function Mt(t) {
  return ae("MuiModal", t);
}
ce("MuiModal", ["root", "hidden", "backdrop"]);
const Ft = (t) => {
  const {
    open: n,
    exited: r,
    classes: o
  } = t;
  return ue({
    root: ["root", !n && r && "hidden"],
    backdrop: ["backdrop"]
  }, Mt, o);
}, $t = K("div", {
  name: "MuiModal",
  slot: "Root",
  overridesResolver: (t, n) => {
    const {
      ownerState: r
    } = t;
    return [n.root, !r.open && r.exited && n.hidden];
  }
})(pe(({
  theme: t
}) => ({
  position: "fixed",
  zIndex: (t.vars || t).zIndex.modal,
  right: 0,
  bottom: 0,
  top: 0,
  left: 0,
  variants: [{
    props: ({
      ownerState: n
    }) => !n.open && n.exited,
    style: {
      visibility: "hidden"
    }
  }]
}))), At = K(ve, {
  name: "MuiModal",
  slot: "Backdrop",
  overridesResolver: (t, n) => n.backdrop
})({
  zIndex: -1
}), Ve = /* @__PURE__ */ d.forwardRef(function(n, r) {
  const o = le({
    name: "MuiModal",
    props: n
  }), {
    BackdropComponent: s = At,
    BackdropProps: i,
    classes: a,
    className: c,
    closeAfterTransition: l = !1,
    children: u,
    container: g,
    component: T,
    components: P = {},
    componentsProps: v = {},
    disableAutoFocus: x = !1,
    disableEnforceFocus: M = !1,
    disableEscapeKeyDown: w = !1,
    disablePortal: N = !1,
    disableRestoreFocus: O = !1,
    disableScrollLock: p = !1,
    hideBackdrop: E = !1,
    keepMounted: C = !1,
    onClose: S,
    onTransitionEnter: b,
    onTransitionExited: D,
    open: k,
    slotProps: j = {},
    slots: L = {},
    // eslint-disable-next-line react/prop-types
    theme: $,
    ...A
  } = o, y = {
    ...o,
    closeAfterTransition: l,
    disableAutoFocus: x,
    disableEnforceFocus: M,
    disableEscapeKeyDown: w,
    disablePortal: N,
    disableRestoreFocus: O,
    disableScrollLock: p,
    hideBackdrop: E,
    keepMounted: C
  }, {
    getRootProps: h,
    getBackdropProps: m,
    getTransitionProps: F,
    portalRef: f,
    isTopModal: I,
    exited: V,
    hasTransition: Z
  } = It({
    ...y,
    rootRef: r
  }), q = {
    ...y,
    exited: V
  }, B = Ft(q), z = {};
  if (u.props.tabIndex === void 0 && (z.tabIndex = "-1"), Z) {
    const {
      onEnter: H,
      onExited: he
    } = F();
    z.onEnter = H, z.onExited = he;
  }
  const Te = {
    slots: {
      root: P.Root,
      backdrop: P.Backdrop,
      ...L
    },
    slotProps: {
      ...v,
      ...j
    }
  }, [We, Ke] = U("root", {
    ref: r,
    elementType: $t,
    externalForwardedProps: {
      ...Te,
      ...A,
      component: T
    },
    getSlotProps: h,
    ownerState: q,
    className: _(c, B == null ? void 0 : B.root, !q.open && q.exited && (B == null ? void 0 : B.hidden))
  }), [Ye, Xe] = U("backdrop", {
    ref: i == null ? void 0 : i.ref,
    elementType: s,
    externalForwardedProps: Te,
    shouldForwardComponentProp: !0,
    additionalProps: i,
    getSlotProps: (H) => m({
      ...H,
      onClick: (he) => {
        H != null && H.onClick && H.onClick(he);
      }
    }),
    className: _(i == null ? void 0 : i.className, B == null ? void 0 : B.backdrop),
    ownerState: q
  });
  return !C && !k && (!Z || V) ? null : /* @__PURE__ */ R(oe, {
    ref: f,
    container: g,
    disablePortal: N,
    children: /* @__PURE__ */ se(We, {
      ...Ke,
      children: [!E && s ? /* @__PURE__ */ R(Ye, {
        ...Xe
      }) : null, /* @__PURE__ */ R(re, {
        disableEnforceFocus: M,
        disableAutoFocus: x,
        disableRestoreFocus: O,
        isEnabled: I,
        open: k,
        children: /* @__PURE__ */ d.cloneElement(u, z)
      })]
    })
  });
});
process.env.NODE_ENV !== "production" && (Ve.propTypes = {
  // ┌────────────────────────────── Warning ──────────────────────────────┐
  // │ These PropTypes are generated from the TypeScript type definitions. │
  // │    To update them, edit the d.ts file and run `pnpm proptypes`.     │
  // └─────────────────────────────────────────────────────────────────────┘
  /**
   * A backdrop component. This prop enables custom backdrop rendering.
   * @deprecated Use `slots.backdrop` instead. While this prop currently works, it will be removed in the next major version.
   * Use the `slots.backdrop` prop to make your application ready for the next version of Material UI.
   * @default styled(Backdrop, {
   *   name: 'MuiModal',
   *   slot: 'Backdrop',
   *   overridesResolver: (props, styles) => {
   *     return styles.backdrop;
   *   },
   * })({
   *   zIndex: -1,
   * })
   */
  BackdropComponent: e.elementType,
  /**
   * Props applied to the [`Backdrop`](https://mui.com/material-ui/api/backdrop/) element.
   * @deprecated Use `slotProps.backdrop` instead.
   */
  BackdropProps: e.object,
  /**
   * A single child content element.
   */
  children: Q.isRequired,
  /**
   * Override or extend the styles applied to the component.
   */
  classes: e.object,
  /**
   * @ignore
   */
  className: e.string,
  /**
   * When set to true the Modal waits until a nested Transition is completed before closing.
   * @default false
   */
  closeAfterTransition: e.bool,
  /**
   * The component used for the root node.
   * Either a string to use a HTML element or a component.
   */
  component: e.elementType,
  /**
   * The components used for each slot inside.
   *
   * @deprecated Use the `slots` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
   *
   * @default {}
   */
  components: e.shape({
    Backdrop: e.elementType,
    Root: e.elementType
  }),
  /**
   * The extra props for the slot components.
   * You can override the existing props or add new ones.
   *
   * @deprecated Use the `slotProps` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
   *
   * @default {}
   */
  componentsProps: e.shape({
    backdrop: e.oneOfType([e.func, e.object]),
    root: e.oneOfType([e.func, e.object])
  }),
  /**
   * An HTML element or function that returns one.
   * The `container` will have the portal children appended to it.
   *
   * You can also provide a callback, which is called in a React layout effect.
   * This lets you set the container from a ref, and also makes server-side rendering possible.
   *
   * By default, it uses the body of the top-level document object,
   * so it's simply `document.body` most of the time.
   */
  container: e.oneOfType([ge, e.func]),
  /**
   * If `true`, the modal will not automatically shift focus to itself when it opens, and
   * replace it to the last focused element when it closes.
   * This also works correctly with any modal children that have the `disableAutoFocus` prop.
   *
   * Generally this should never be set to `true` as it makes the modal less
   * accessible to assistive technologies, like screen readers.
   * @default false
   */
  disableAutoFocus: e.bool,
  /**
   * If `true`, the modal will not prevent focus from leaving the modal while open.
   *
   * Generally this should never be set to `true` as it makes the modal less
   * accessible to assistive technologies, like screen readers.
   * @default false
   */
  disableEnforceFocus: e.bool,
  /**
   * If `true`, hitting escape will not fire the `onClose` callback.
   * @default false
   */
  disableEscapeKeyDown: e.bool,
  /**
   * The `children` will be under the DOM hierarchy of the parent component.
   * @default false
   */
  disablePortal: e.bool,
  /**
   * If `true`, the modal will not restore focus to previously focused element once
   * modal is hidden or unmounted.
   * @default false
   */
  disableRestoreFocus: e.bool,
  /**
   * Disable the scroll lock behavior.
   * @default false
   */
  disableScrollLock: e.bool,
  /**
   * If `true`, the backdrop is not rendered.
   * @default false
   */
  hideBackdrop: e.bool,
  /**
   * Always keep the children in the DOM.
   * This prop can be useful in SEO situation or
   * when you want to maximize the responsiveness of the Modal.
   * @default false
   */
  keepMounted: e.bool,
  /**
   * Callback fired when the component requests to be closed.
   * The `reason` parameter can optionally be used to control the response to `onClose`.
   *
   * @param {object} event The event source of the callback.
   * @param {string} reason Can be: `"escapeKeyDown"`, `"backdropClick"`.
   */
  onClose: e.func,
  /**
   * A function called when a transition enters.
   */
  onTransitionEnter: e.func,
  /**
   * A function called when a transition has exited.
   */
  onTransitionExited: e.func,
  /**
   * If `true`, the component is shown.
   */
  open: e.bool.isRequired,
  /**
   * The props used for each slot inside the Modal.
   * @default {}
   */
  slotProps: e.shape({
    backdrop: e.oneOfType([e.func, e.object]),
    root: e.oneOfType([e.func, e.object])
  }),
  /**
   * The components used for each slot inside the Modal.
   * Either a string to use a HTML element or a component.
   * @default {}
   */
  slots: e.shape({
    backdrop: e.elementType,
    root: e.elementType
  }),
  /**
   * The system prop that allows defining system overrides as well as additional CSS styles.
   */
  sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
});
function jt(t, n, r) {
  const o = n.getBoundingClientRect(), s = r && r.getBoundingClientRect(), i = Y(n);
  let a;
  if (n.fakeTransform)
    a = n.fakeTransform;
  else {
    const u = i.getComputedStyle(n);
    a = u.getPropertyValue("-webkit-transform") || u.getPropertyValue("transform");
  }
  let c = 0, l = 0;
  if (a && a !== "none" && typeof a == "string") {
    const u = a.split("(")[1].split(")")[0].split(",");
    c = parseInt(u[4], 10), l = parseInt(u[5], 10);
  }
  return t === "left" ? s ? `translateX(${s.right + c - o.left}px)` : `translateX(${i.innerWidth + c - o.left}px)` : t === "right" ? s ? `translateX(-${o.right - s.left - c}px)` : `translateX(-${o.left + o.width - c}px)` : t === "up" ? s ? `translateY(${s.bottom + l - o.top}px)` : `translateY(${i.innerHeight + l - o.top}px)` : s ? `translateY(-${o.top - s.top + o.height - l}px)` : `translateY(-${o.top + o.height - l}px)`;
}
function Ue(t) {
  return typeof t == "function" ? t() : t;
}
function te(t, n, r) {
  const o = Ue(r), s = jt(t, n, o);
  s && (n.style.webkitTransform = s, n.style.transform = s);
}
const qe = /* @__PURE__ */ d.forwardRef(function(n, r) {
  const o = de(), s = {
    enter: o.transitions.easing.easeOut,
    exit: o.transitions.easing.sharp
  }, i = {
    enter: o.transitions.duration.enteringScreen,
    exit: o.transitions.duration.leavingScreen
  }, {
    addEndListener: a,
    appear: c = !0,
    children: l,
    container: u,
    direction: g = "down",
    easing: T = s,
    in: P,
    onEnter: v,
    onEntered: x,
    onEntering: M,
    onExit: w,
    onExited: N,
    onExiting: O,
    style: p,
    timeout: E = i,
    // eslint-disable-next-line react/prop-types
    TransitionComponent: C = De,
    ...S
  } = n, b = d.useRef(null), D = J(fe(l), b, r), k = (f) => (I) => {
    f && (I === void 0 ? f(b.current) : f(b.current, I));
  }, j = k((f, I) => {
    te(g, f, u), Ie(f), v && v(f, I);
  }), L = k((f, I) => {
    const V = ne({
      timeout: E,
      style: p,
      easing: T
    }, {
      mode: "enter"
    });
    f.style.webkitTransition = o.transitions.create("-webkit-transform", {
      ...V
    }), f.style.transition = o.transitions.create("transform", {
      ...V
    }), f.style.webkitTransform = "none", f.style.transform = "none", M && M(f, I);
  }), $ = k(x), A = k(O), y = k((f) => {
    const I = ne({
      timeout: E,
      style: p,
      easing: T
    }, {
      mode: "exit"
    });
    f.style.webkitTransition = o.transitions.create("-webkit-transform", I), f.style.transition = o.transitions.create("transform", I), te(g, f, u), w && w(f);
  }), h = k((f) => {
    f.style.webkitTransition = "", f.style.transition = "", N && N(f);
  }), m = (f) => {
    a && a(b.current, f);
  }, F = d.useCallback(() => {
    b.current && te(g, b.current, u);
  }, [g, u]);
  return d.useEffect(() => {
    if (P || g === "down" || g === "right")
      return;
    const f = ct(() => {
      b.current && te(g, b.current, u);
    }), I = Y(b.current);
    return I.addEventListener("resize", f), () => {
      f.clear(), I.removeEventListener("resize", f);
    };
  }, [g, P, u]), d.useEffect(() => {
    P || F();
  }, [P, F]), /* @__PURE__ */ R(C, {
    nodeRef: b,
    onEnter: j,
    onEntered: $,
    onEntering: L,
    onExit: y,
    onExited: h,
    onExiting: A,
    addEndListener: m,
    appear: c,
    in: P,
    timeout: E,
    ...S,
    children: (f, {
      ownerState: I,
      ...V
    }) => /* @__PURE__ */ d.cloneElement(l, {
      ref: D,
      style: {
        visibility: f === "exited" && !P ? "hidden" : void 0,
        ...p,
        ...l.props.style
      },
      ...V
    })
  });
});
process.env.NODE_ENV !== "production" && (qe.propTypes = {
  // ┌────────────────────────────── Warning ──────────────────────────────┐
  // │ These PropTypes are generated from the TypeScript type definitions. │
  // │    To update them, edit the d.ts file and run `pnpm proptypes`.     │
  // └─────────────────────────────────────────────────────────────────────┘
  /**
   * Add a custom transition end trigger. Called with the transitioning DOM
   * node and a done callback. Allows for more fine grained transition end
   * logic. Note: Timeouts are still used as a fallback if provided.
   */
  addEndListener: e.func,
  /**
   * Perform the enter transition when it first mounts if `in` is also `true`.
   * Set this to `false` to disable this behavior.
   * @default true
   */
  appear: e.bool,
  /**
   * A single child content element.
   */
  children: Q.isRequired,
  /**
   * An HTML element, or a function that returns one.
   * It's used to set the container the Slide is transitioning from.
   */
  container: ie(e.oneOfType([ge, e.func]), (t) => {
    if (t.open) {
      const n = Ue(t.container);
      if (n && n.nodeType === 1) {
        const r = n.getBoundingClientRect();
        if (process.env.NODE_ENV !== "test" && r.top === 0 && r.left === 0 && r.right === 0 && r.bottom === 0)
          return new Error(["MUI: The `container` prop provided to the component is invalid.", "The anchor element should be part of the document layout.", "Make sure the element is present in the document or that it's not display none."].join(`
`));
      } else if (!n || typeof n.getBoundingClientRect != "function" || n.contextElement != null && n.contextElement.nodeType !== 1)
        return new Error(["MUI: The `container` prop provided to the component is invalid.", "It should be an HTML element instance."].join(`
`));
    }
    return null;
  }),
  /**
   * Direction the child node will enter from.
   * @default 'down'
   */
  direction: e.oneOf(["down", "left", "right", "up"]),
  /**
   * The transition timing function.
   * You may specify a single easing or a object containing enter and exit values.
   * @default {
   *   enter: theme.transitions.easing.easeOut,
   *   exit: theme.transitions.easing.sharp,
   * }
   */
  easing: e.oneOfType([e.shape({
    enter: e.string,
    exit: e.string
  }), e.string]),
  /**
   * If `true`, the component will transition in.
   */
  in: e.bool,
  /**
   * @ignore
   */
  onEnter: e.func,
  /**
   * @ignore
   */
  onEntered: e.func,
  /**
   * @ignore
   */
  onEntering: e.func,
  /**
   * @ignore
   */
  onExit: e.func,
  /**
   * @ignore
   */
  onExited: e.func,
  /**
   * @ignore
   */
  onExiting: e.func,
  /**
   * @ignore
   */
  style: e.object,
  /**
   * The duration for the transition, in milliseconds.
   * You may specify a single timeout for all transitions, or individually with an object.
   * @default {
   *   enter: theme.transitions.duration.enteringScreen,
   *   exit: theme.transitions.duration.leavingScreen,
   * }
   */
  timeout: e.oneOfType([e.number, e.shape({
    appear: e.number,
    enter: e.number,
    exit: e.number
  })])
});
function Bt(t) {
  return ae("MuiDrawer", t);
}
ce("MuiDrawer", ["root", "docked", "paper", "anchorLeft", "anchorRight", "anchorTop", "anchorBottom", "paperAnchorLeft", "paperAnchorRight", "paperAnchorTop", "paperAnchorBottom", "paperAnchorDockedLeft", "paperAnchorDockedRight", "paperAnchorDockedTop", "paperAnchorDockedBottom", "modal"]);
const ze = (t, n) => {
  const {
    ownerState: r
  } = t;
  return [n.root, (r.variant === "permanent" || r.variant === "persistent") && n.docked, n.modal];
}, Lt = (t) => {
  const {
    classes: n,
    anchor: r,
    variant: o
  } = t, s = {
    root: ["root", `anchor${X(r)}`],
    docked: [(o === "permanent" || o === "persistent") && "docked"],
    modal: ["modal"],
    paper: ["paper", `paperAnchor${X(r)}`, o !== "temporary" && `paperAnchorDocked${X(r)}`]
  };
  return ue(s, Bt, n);
}, Vt = K(Ve, {
  name: "MuiDrawer",
  slot: "Root",
  overridesResolver: ze
})(pe(({
  theme: t
}) => ({
  zIndex: (t.vars || t).zIndex.drawer
}))), Ut = K("div", {
  shouldForwardProp: Ze,
  name: "MuiDrawer",
  slot: "Docked",
  skipVariantsResolver: !1,
  overridesResolver: ze
})({
  flex: "0 0 auto"
}), qt = K(Be, {
  name: "MuiDrawer",
  slot: "Paper",
  overridesResolver: (t, n) => {
    const {
      ownerState: r
    } = t;
    return [n.paper, n[`paperAnchor${X(r.anchor)}`], r.variant !== "temporary" && n[`paperAnchorDocked${X(r.anchor)}`]];
  }
})(pe(({
  theme: t
}) => ({
  overflowY: "auto",
  display: "flex",
  flexDirection: "column",
  height: "100%",
  flex: "1 0 auto",
  zIndex: (t.vars || t).zIndex.drawer,
  // Add iOS momentum scrolling for iOS < 13.0
  WebkitOverflowScrolling: "touch",
  // temporary style
  position: "fixed",
  top: 0,
  // We disable the focus ring for mouse, touch and keyboard users.
  // At some point, it would be better to keep it for keyboard users.
  // :focus-ring CSS pseudo-class will help.
  outline: 0,
  variants: [{
    props: {
      anchor: "left"
    },
    style: {
      left: 0
    }
  }, {
    props: {
      anchor: "top"
    },
    style: {
      top: 0,
      left: 0,
      right: 0,
      height: "auto",
      maxHeight: "100%"
    }
  }, {
    props: {
      anchor: "right"
    },
    style: {
      right: 0
    }
  }, {
    props: {
      anchor: "bottom"
    },
    style: {
      top: "auto",
      left: 0,
      bottom: 0,
      right: 0,
      height: "auto",
      maxHeight: "100%"
    }
  }, {
    props: ({
      ownerState: n
    }) => n.anchor === "left" && n.variant !== "temporary",
    style: {
      borderRight: `1px solid ${(t.vars || t).palette.divider}`
    }
  }, {
    props: ({
      ownerState: n
    }) => n.anchor === "top" && n.variant !== "temporary",
    style: {
      borderBottom: `1px solid ${(t.vars || t).palette.divider}`
    }
  }, {
    props: ({
      ownerState: n
    }) => n.anchor === "right" && n.variant !== "temporary",
    style: {
      borderLeft: `1px solid ${(t.vars || t).palette.divider}`
    }
  }, {
    props: ({
      ownerState: n
    }) => n.anchor === "bottom" && n.variant !== "temporary",
    style: {
      borderTop: `1px solid ${(t.vars || t).palette.divider}`
    }
  }]
}))), He = {
  left: "right",
  right: "left",
  top: "down",
  bottom: "up"
};
function zt(t) {
  return ["left", "right"].includes(t);
}
function Ht({
  direction: t
}, n) {
  return t === "rtl" && zt(n) ? He[n] : n;
}
const _e = /* @__PURE__ */ d.forwardRef(function(n, r) {
  const o = le({
    props: n,
    name: "MuiDrawer"
  }), s = de(), i = Je(), a = {
    enter: s.transitions.duration.enteringScreen,
    exit: s.transitions.duration.leavingScreen
  }, {
    anchor: c = "left",
    BackdropProps: l,
    children: u,
    className: g,
    elevation: T = 16,
    hideBackdrop: P = !1,
    ModalProps: {
      BackdropProps: v,
      ...x
    } = {},
    onClose: M,
    open: w = !1,
    PaperProps: N = {},
    SlideProps: O,
    // eslint-disable-next-line react/prop-types
    TransitionComponent: p,
    transitionDuration: E = a,
    variant: C = "temporary",
    slots: S = {},
    slotProps: b = {},
    ...D
  } = o, k = d.useRef(!1);
  d.useEffect(() => {
    k.current = !0;
  }, []);
  const j = Ht({
    direction: i ? "rtl" : "ltr"
  }, c), $ = {
    ...o,
    anchor: c,
    elevation: T,
    open: w,
    variant: C,
    ...D
  }, A = Lt($), y = {
    slots: {
      transition: p,
      ...S
    },
    slotProps: {
      paper: N,
      transition: O,
      ...b,
      backdrop: Qe(b.backdrop || {
        ...l,
        ...v
      }, {
        transitionDuration: E
      })
    }
  }, [h, m] = U("root", {
    ref: r,
    elementType: Vt,
    className: _(A.root, A.modal, g),
    shouldForwardComponentProp: !0,
    ownerState: $,
    externalForwardedProps: {
      ...y,
      ...D,
      ...x
    },
    additionalProps: {
      open: w,
      onClose: M,
      hideBackdrop: P,
      slots: {
        backdrop: y.slots.backdrop
      },
      slotProps: {
        backdrop: y.slotProps.backdrop
      }
    }
  }), [F, f] = U("paper", {
    elementType: qt,
    shouldForwardComponentProp: !0,
    className: _(A.paper, N.className),
    ownerState: $,
    externalForwardedProps: y,
    additionalProps: {
      elevation: C === "temporary" ? T : 0,
      square: !0
    }
  }), [I, V] = U("docked", {
    elementType: Ut,
    ref: r,
    className: _(A.root, A.docked, g),
    ownerState: $,
    externalForwardedProps: y,
    additionalProps: D
    // pass `other` here because `DockedSlot` is also a root slot for some variants
  }), [Z, q] = U("transition", {
    elementType: qe,
    ownerState: $,
    externalForwardedProps: y,
    additionalProps: {
      in: w,
      direction: He[j],
      timeout: E,
      appear: k.current
    }
  }), B = /* @__PURE__ */ R(F, {
    ...f,
    children: u
  });
  if (C === "permanent")
    return /* @__PURE__ */ R(I, {
      ...V,
      children: B
    });
  const z = /* @__PURE__ */ R(Z, {
    ...q,
    children: B
  });
  return C === "persistent" ? /* @__PURE__ */ R(I, {
    ...V,
    children: z
  }) : /* @__PURE__ */ R(h, {
    ...m,
    children: z
  });
});
process.env.NODE_ENV !== "production" && (_e.propTypes = {
  // ┌────────────────────────────── Warning ──────────────────────────────┐
  // │ These PropTypes are generated from the TypeScript type definitions. │
  // │    To update them, edit the d.ts file and run `pnpm proptypes`.     │
  // └─────────────────────────────────────────────────────────────────────┘
  /**
   * Side from which the drawer will appear.
   * @default 'left'
   */
  anchor: e.oneOf(["bottom", "left", "right", "top"]),
  /**
   * @ignore
   */
  BackdropProps: e.object,
  /**
   * The content of the component.
   */
  children: e.node,
  /**
   * Override or extend the styles applied to the component.
   */
  classes: e.object,
  /**
   * @ignore
   */
  className: e.string,
  /**
   * The elevation of the drawer.
   * @default 16
   */
  elevation: je,
  /**
   * If `true`, the backdrop is not rendered.
   * @default false
   */
  hideBackdrop: e.bool,
  /**
   * Props applied to the [`Modal`](https://mui.com/material-ui/api/modal/) element.
   * @default {}
   */
  ModalProps: e.object,
  /**
   * Callback fired when the component requests to be closed.
   * The `reason` parameter can optionally be used to control the response to `onClose`.
   *
   * @param {object} event The event source of the callback.
   * @param {string} reason Can be: `"escapeKeyDown"`, `"backdropClick"`.
   */
  onClose: e.func,
  /**
   * If `true`, the component is shown.
   * @default false
   */
  open: e.bool,
  /**
   * Props applied to the [`Paper`](https://mui.com/material-ui/api/paper/) element.
   * @deprecated use the `slotProps.paper` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
   * @default {}
   */
  PaperProps: e.object,
  /**
   * Props applied to the [`Slide`](https://mui.com/material-ui/api/slide/) element.
   * @deprecated use the `slotProps.transition` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
   */
  SlideProps: e.object,
  /**
   * The props used for each slot inside.
   * @default {}
   */
  slotProps: e.shape({
    backdrop: e.oneOfType([e.func, e.object]),
    docked: e.oneOfType([e.func, e.object]),
    paper: e.oneOfType([e.func, e.object]),
    root: e.oneOfType([e.func, e.object]),
    transition: e.oneOfType([e.func, e.object])
  }),
  /**
   * The components used for each slot inside.
   * @default {}
   */
  slots: e.shape({
    backdrop: e.elementType,
    docked: e.elementType,
    paper: e.elementType,
    root: e.elementType,
    transition: e.elementType
  }),
  /**
   * The system prop that allows defining system overrides as well as additional CSS styles.
   */
  sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
  /**
   * The duration for the transition, in milliseconds.
   * You may specify a single timeout for all transitions, or individually with an object.
   * @default {
   *   enter: theme.transitions.duration.enteringScreen,
   *   exit: theme.transitions.duration.leavingScreen,
   * }
   */
  transitionDuration: e.oneOfType([e.number, e.shape({
    appear: e.number,
    enter: e.number,
    exit: e.number
  })]),
  /**
   * The variant to use.
   * @default 'temporary'
   */
  variant: e.oneOf(["permanent", "persistent", "temporary"])
});
const _t = et(/* @__PURE__ */ R("path", {
  d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
}), "Close"), Wt = ({
  size: t = 36,
  ...n
}) => /* @__PURE__ */ R(
  ve,
  {
    ...n,
    sx: { position: "absolute", backgroundColor: "rgba(0, 0, 0, 0.3)" },
    "data-testid": "loading-backdrop",
    children: /* @__PURE__ */ R(tt, { color: "secondary", size: t })
  }
), Kt = ({ children: t }) => /* @__PURE__ */ R(nt, { flex: 1, children: t }), Yt = ({ children: t }) => /* @__PURE__ */ R(ye, { direction: "row", justifyContent: "end", columnGap: 1, pb: 2, children: t }), Xt = ({ children: t, onClose: n }) => /* @__PURE__ */ se(
  ye,
  {
    direction: "row",
    justifyContent: "space-between",
    alignItems: "center",
    pb: 2,
    children: [
      /* @__PURE__ */ R(ot, { fontSize: 16, fontWeight: "bold", children: t }),
      /* @__PURE__ */ R(rt, { size: "small", onClick: n, "data-testid": "drawer-close", children: /* @__PURE__ */ R(_t, { fontSize: "inherit" }) })
    ]
  }
), Ee = ({
  anchor: t = "right",
  children: n,
  width: r,
  loading: o = !1,
  ...s
}) => /* @__PURE__ */ R(_e, { anchor: t, "data-testid": "drawer", ...s, children: /* @__PURE__ */ se(ye, { height: "100%", p: 2, width: r, position: "relative", children: [
  n,
  /* @__PURE__ */ R(Wt, { open: o })
] }) });
Ee.Header = Xt;
Ee.Content = Kt;
Ee.Footer = Yt;
export {
  ve as B,
  _t as C,
  Ee as D,
  Le as F,
  ge as H,
  Wt as L,
  Ve as M,
  Be as P,
  oe as a,
  Q as b,
  lt as c,
  ct as d,
  Fe as e,
  re as f,
  fe as g,
  je as i,
  Y as o,
  Ne as s
};
