import { jsx as v, jsxs as Re } from "react/jsx-runtime";
import * as x from "react";
import { createElement as Ht } from "react";
import { g as ge, e as he, f as st, H as Yt, q as Qt, h as Zt, J as en, u as fe, s as U, j as Me, l as be, t as tt, n as lt, P as o, K as at, w as Ne, B as me, L as tn, C as ct, M as nn, D as oe, A as on, i as ee, N as nt, _ as C, O as te, x as Q, o as rn, z as sn, p as ln, Q as ze, r as se, y as ot, F as an, S as cn, G as dn, I as un } from "./Stack-CdVfRhco.js";
import { u as pn, a as fn, b as mn, w as Se, c as pe, d as In } from "./warning-VmSVedfJ.js";
function gn(e) {
  return ge("MuiCollapse", e);
}
he("MuiCollapse", ["root", "horizontal", "vertical", "entered", "hidden", "wrapper", "wrapperInner"]);
const hn = (e) => {
  const {
    orientation: t,
    classes: n
  } = e, r = {
    root: ["root", `${t}`],
    entered: ["entered"],
    hidden: ["hidden"],
    wrapper: ["wrapper", `${t}`],
    wrapperInner: ["wrapperInner", `${t}`]
  };
  return be(r, gn, n);
}, bn = U("div", {
  name: "MuiCollapse",
  slot: "Root",
  overridesResolver: (e, t) => {
    const {
      ownerState: n
    } = e;
    return [t.root, t[n.orientation], n.state === "entered" && t.entered, n.state === "exited" && !n.in && n.collapsedSize === "0px" && t.hidden];
  }
})(lt(({
  theme: e
}) => ({
  height: 0,
  overflow: "hidden",
  transition: e.transitions.create("height"),
  variants: [{
    props: {
      orientation: "horizontal"
    },
    style: {
      height: "auto",
      width: 0,
      transition: e.transitions.create("width")
    }
  }, {
    props: {
      state: "entered"
    },
    style: {
      height: "auto",
      overflow: "visible"
    }
  }, {
    props: {
      state: "entered",
      orientation: "horizontal"
    },
    style: {
      width: "auto"
    }
  }, {
    props: ({
      ownerState: t
    }) => t.state === "exited" && !t.in && t.collapsedSize === "0px",
    style: {
      visibility: "hidden"
    }
  }]
}))), yn = U("div", {
  name: "MuiCollapse",
  slot: "Wrapper",
  overridesResolver: (e, t) => t.wrapper
})({
  // Hack to get children with a negative margin to not falsify the height computation.
  display: "flex",
  width: "100%",
  variants: [{
    props: {
      orientation: "horizontal"
    },
    style: {
      width: "auto",
      height: "100%"
    }
  }]
}), xn = U("div", {
  name: "MuiCollapse",
  slot: "WrapperInner",
  overridesResolver: (e, t) => t.wrapperInner
})({
  width: "100%",
  variants: [{
    props: {
      orientation: "horizontal"
    },
    style: {
      width: "auto",
      height: "100%"
    }
  }]
}), Pe = /* @__PURE__ */ x.forwardRef(function(t, n) {
  const r = st({
    props: t,
    name: "MuiCollapse"
  }), {
    addEndListener: l,
    children: I,
    className: c,
    collapsedSize: s = "0px",
    component: d,
    easing: f,
    in: i,
    onEnter: a,
    onEntered: u,
    onEntering: g,
    onExit: b,
    onExited: m,
    onExiting: p,
    orientation: h = "vertical",
    style: y,
    timeout: w = Yt.standard,
    // eslint-disable-next-line react/prop-types
    TransitionComponent: R = Qt,
    ...T
  } = r, S = {
    ...r,
    orientation: h,
    collapsedSize: s
  }, M = hn(S), z = Zt(), W = en(), D = x.useRef(null), j = x.useRef(), V = typeof s == "number" ? `${s}px` : s, B = h === "horizontal", N = B ? "width" : "height", K = x.useRef(null), q = fe(n, K), _ = (E) => (O) => {
    if (E) {
      const L = K.current;
      O === void 0 ? E(L) : E(L, O);
    }
  }, X = () => D.current ? D.current[B ? "clientWidth" : "clientHeight"] : 0, A = _((E, O) => {
    D.current && B && (D.current.style.position = "absolute"), E.style[N] = V, a && a(E, O);
  }), J = _((E, O) => {
    const L = X();
    D.current && B && (D.current.style.position = "");
    const {
      duration: G,
      easing: F
    } = tt({
      style: y,
      timeout: w,
      easing: f
    }, {
      mode: "enter"
    });
    if (w === "auto") {
      const de = z.transitions.getAutoHeightDuration(L);
      E.style.transitionDuration = `${de}ms`, j.current = de;
    } else
      E.style.transitionDuration = typeof G == "string" ? G : `${G}ms`;
    E.style[N] = `${L}px`, E.style.transitionTimingFunction = F, g && g(E, O);
  }), $ = _((E, O) => {
    E.style[N] = "auto", u && u(E, O);
  }), Y = _((E) => {
    E.style[N] = `${X()}px`, b && b(E);
  }), re = _(m), ce = _((E) => {
    const O = X(), {
      duration: L,
      easing: G
    } = tt({
      style: y,
      timeout: w,
      easing: f
    }, {
      mode: "exit"
    });
    if (w === "auto") {
      const F = z.transitions.getAutoHeightDuration(O);
      E.style.transitionDuration = `${F}ms`, j.current = F;
    } else
      E.style.transitionDuration = typeof L == "string" ? L : `${L}ms`;
    E.style[N] = V, E.style.transitionTimingFunction = G, p && p(E);
  });
  return /* @__PURE__ */ v(R, {
    in: i,
    onEnter: A,
    onEntered: $,
    onEntering: J,
    onExit: Y,
    onExited: re,
    onExiting: ce,
    addEndListener: (E) => {
      w === "auto" && W.start(j.current || 0, E), l && l(K.current, E);
    },
    nodeRef: K,
    timeout: w === "auto" ? null : w,
    ...T,
    children: (E, {
      ownerState: O,
      ...L
    }) => /* @__PURE__ */ v(bn, {
      as: d,
      className: Me(M.root, c, {
        entered: M.entered,
        exited: !i && V === "0px" && M.hidden
      }[E]),
      style: {
        [B ? "minWidth" : "minHeight"]: V,
        ...y
      },
      ref: q,
      ownerState: {
        ...S,
        state: E
      },
      ...L,
      children: /* @__PURE__ */ v(yn, {
        ownerState: {
          ...S,
          state: E
        },
        className: M.wrapper,
        ref: D,
        children: /* @__PURE__ */ v(xn, {
          ownerState: {
            ...S,
            state: E
          },
          className: M.wrapperInner,
          children: I
        })
      })
    })
  });
});
process.env.NODE_ENV !== "production" && (Pe.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: o.func,
  /**
   * The content node to be collapsed.
   */
  children: o.node,
  /**
   * Override or extend the styles applied to the component.
   */
  classes: o.object,
  /**
   * @ignore
   */
  className: o.string,
  /**
   * The width (horizontal) or height (vertical) of the container when collapsed.
   * @default '0px'
   */
  collapsedSize: o.oneOfType([o.number, o.string]),
  /**
   * The component used for the root node.
   * Either a string to use a HTML element or a component.
   */
  component: at,
  /**
   * The transition timing function.
   * You may specify a single easing or a object containing enter and exit values.
   */
  easing: o.oneOfType([o.shape({
    enter: o.string,
    exit: o.string
  }), o.string]),
  /**
   * If `true`, the component will transition in.
   */
  in: o.bool,
  /**
   * @ignore
   */
  onEnter: o.func,
  /**
   * @ignore
   */
  onEntered: o.func,
  /**
   * @ignore
   */
  onEntering: o.func,
  /**
   * @ignore
   */
  onExit: o.func,
  /**
   * @ignore
   */
  onExited: o.func,
  /**
   * @ignore
   */
  onExiting: o.func,
  /**
   * The transition orientation.
   * @default 'vertical'
   */
  orientation: o.oneOf(["horizontal", "vertical"]),
  /**
   * @ignore
   */
  style: o.object,
  /**
   * The system prop that allows defining system overrides as well as additional CSS styles.
   */
  sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object]),
  /**
   * The duration for the transition, in milliseconds.
   * You may specify a single timeout for all transitions, or individually with an object.
   *
   * Set to 'auto' to automatically calculate transition time based on height.
   * @default duration.standard
   */
  timeout: o.oneOfType([o.oneOf(["auto"]), o.number, o.shape({
    appear: o.number,
    enter: o.number,
    exit: o.number
  })])
});
Pe && (Pe.muiSupportAuto = !0);
function wn(e) {
  return ge("PrivateSwitchBase", e);
}
he("PrivateSwitchBase", ["root", "checked", "disabled", "input", "edgeStart", "edgeEnd"]);
const Cn = (e) => {
  const {
    classes: t,
    checked: n,
    disabled: r,
    edge: l
  } = e, I = {
    root: ["root", n && "checked", r && "disabled", l && `edge${me(l)}`],
    input: ["input"]
  };
  return be(I, wn, t);
}, Tn = U(tn)({
  padding: 9,
  borderRadius: "50%",
  variants: [{
    props: {
      edge: "start",
      size: "small"
    },
    style: {
      marginLeft: -3
    }
  }, {
    props: ({
      edge: e,
      ownerState: t
    }) => e === "start" && t.size !== "small",
    style: {
      marginLeft: -12
    }
  }, {
    props: {
      edge: "end",
      size: "small"
    },
    style: {
      marginRight: -3
    }
  }, {
    props: ({
      edge: e,
      ownerState: t
    }) => e === "end" && t.size !== "small",
    style: {
      marginRight: -12
    }
  }]
}), En = U("input", {
  shouldForwardProp: ct
})({
  cursor: "inherit",
  position: "absolute",
  opacity: 0,
  width: "100%",
  height: "100%",
  top: 0,
  left: 0,
  margin: 0,
  padding: 0,
  zIndex: 1
}), dt = /* @__PURE__ */ x.forwardRef(function(t, n) {
  const {
    autoFocus: r,
    checked: l,
    checkedIcon: I,
    defaultChecked: c,
    disabled: s,
    disableFocusRipple: d = !1,
    edge: f = !1,
    icon: i,
    id: a,
    inputProps: u,
    inputRef: g,
    name: b,
    onBlur: m,
    onChange: p,
    onFocus: h,
    readOnly: y,
    required: w = !1,
    tabIndex: R,
    type: T,
    value: S,
    slots: M = {},
    slotProps: z = {},
    ...W
  } = t, [D, j] = pn({
    controlled: l,
    default: !!c,
    name: "SwitchBase",
    state: "checked"
  }), V = fn(), B = (k) => {
    h && h(k), V && V.onFocus && V.onFocus(k);
  }, N = (k) => {
    m && m(k), V && V.onBlur && V.onBlur(k);
  }, K = (k) => {
    if (k.nativeEvent.defaultPrevented)
      return;
    const E = k.target.checked;
    j(E), p && p(k, E);
  };
  let q = s;
  V && typeof q > "u" && (q = V.disabled);
  const _ = T === "checkbox" || T === "radio", X = {
    ...t,
    checked: D,
    disabled: q,
    disableFocusRipple: d,
    edge: f
  }, A = Cn(X), J = {
    slots: M,
    slotProps: {
      input: u,
      ...z
    }
  }, [$, Y] = Ne("root", {
    ref: n,
    elementType: Tn,
    className: A.root,
    shouldForwardComponentProp: !0,
    externalForwardedProps: {
      ...J,
      component: "span",
      ...W
    },
    getSlotProps: (k) => ({
      ...k,
      onFocus: (E) => {
        var O;
        (O = k.onFocus) == null || O.call(k, E), B(E);
      },
      onBlur: (E) => {
        var O;
        (O = k.onBlur) == null || O.call(k, E), N(E);
      }
    }),
    ownerState: X,
    additionalProps: {
      centerRipple: !0,
      focusRipple: !d,
      disabled: q,
      role: void 0,
      tabIndex: null
    }
  }), [re, ce] = Ne("input", {
    ref: g,
    elementType: En,
    className: A.input,
    externalForwardedProps: J,
    getSlotProps: (k) => ({
      ...k,
      onChange: (E) => {
        var O;
        (O = k.onChange) == null || O.call(k, E), K(E);
      }
    }),
    ownerState: X,
    additionalProps: {
      autoFocus: r,
      checked: l,
      defaultChecked: c,
      disabled: q,
      id: _ ? a : void 0,
      name: b,
      readOnly: y,
      required: w,
      tabIndex: R,
      type: T,
      ...T === "checkbox" && S === void 0 ? {} : {
        value: S
      }
    }
  });
  return /* @__PURE__ */ Re($, {
    ...Y,
    children: [/* @__PURE__ */ v(re, {
      ...ce
    }), D ? I : i]
  });
});
process.env.NODE_ENV !== "production" && (dt.propTypes = {
  /**
   * If `true`, the `input` element is focused during the first mount.
   */
  autoFocus: o.bool,
  /**
   * If `true`, the component is checked.
   */
  checked: o.bool,
  /**
   * The icon to display when the component is checked.
   */
  checkedIcon: o.node.isRequired,
  /**
   * Override or extend the styles applied to the component.
   */
  classes: o.object,
  /**
   * @ignore
   */
  className: o.string,
  /**
   * @ignore
   */
  defaultChecked: o.bool,
  /**
   * If `true`, the component is disabled.
   */
  disabled: o.bool,
  /**
   * If `true`, the  keyboard focus ripple is disabled.
   * @default false
   */
  disableFocusRipple: o.bool,
  /**
   * If given, uses a negative margin to counteract the padding on one
   * side (this is often helpful for aligning the left or right
   * side of the icon with content above or below, without ruining the border
   * size and shape).
   * @default false
   */
  edge: o.oneOf(["end", "start", !1]),
  /**
   * The icon to display when the component is unchecked.
   */
  icon: o.node.isRequired,
  /**
   * The id of the `input` element.
   */
  id: o.string,
  /**
   * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
   */
  inputProps: o.object,
  /**
   * Pass a ref to the `input` element.
   */
  inputRef: nn,
  /*
   * @ignore
   */
  name: o.string,
  /**
   * @ignore
   */
  onBlur: o.func,
  /**
   * Callback fired when the state is changed.
   *
   * @param {object} event The event source of the callback.
   * You can pull out the new checked state by accessing `event.target.checked` (boolean).
   */
  onChange: o.func,
  /**
   * @ignore
   */
  onFocus: o.func,
  /**
   * It prevents the user from changing the value of the field
   * (not from interacting with the field).
   */
  readOnly: o.bool,
  /**
   * If `true`, the `input` element is required.
   */
  required: o.bool,
  /**
   * The props used for each slot inside.
   * @default {}
   */
  slotProps: o.shape({
    input: o.oneOfType([o.func, o.object]),
    root: o.oneOfType([o.func, o.object])
  }),
  /**
   * The components used for each slot inside.
   * @default {}
   */
  slots: o.shape({
    input: o.elementType,
    root: o.elementType
  }),
  /**
   * The system prop that allows defining system overrides as well as additional CSS styles.
   */
  sx: o.object,
  /**
   * @ignore
   */
  tabIndex: o.oneOfType([o.number, o.string]),
  /**
   * The input component prop `type`.
   */
  type: o.string.isRequired,
  /**
   * The value of the component.
   */
  value: o.any
});
const vn = oe(/* @__PURE__ */ v("path", {
  d: "M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
}), "CheckBoxOutlineBlank"), Sn = oe(/* @__PURE__ */ v("path", {
  d: "M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"
}), "CheckBox"), Pn = oe(/* @__PURE__ */ v("path", {
  d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"
}), "IndeterminateCheckBox");
function Rn(e) {
  return ge("MuiCheckbox", e);
}
const $e = he("MuiCheckbox", ["root", "checked", "disabled", "indeterminate", "colorPrimary", "colorSecondary", "sizeSmall", "sizeMedium"]), Mn = (e) => {
  const {
    classes: t,
    indeterminate: n,
    color: r,
    size: l
  } = e, I = {
    root: ["root", n && "indeterminate", `color${me(r)}`, `size${me(l)}`]
  }, c = be(I, Rn, t);
  return {
    ...t,
    // forward the disabled and checked classes to the SwitchBase
    ...c
  };
}, kn = U(dt, {
  shouldForwardProp: (e) => ct(e) || e === "classes",
  name: "MuiCheckbox",
  slot: "Root",
  overridesResolver: (e, t) => {
    const {
      ownerState: n
    } = e;
    return [t.root, n.indeterminate && t.indeterminate, t[`size${me(n.size)}`], n.color !== "default" && t[`color${me(n.color)}`]];
  }
})(lt(({
  theme: e
}) => ({
  color: (e.vars || e).palette.text.secondary,
  variants: [{
    props: {
      color: "default",
      disableRipple: !1
    },
    style: {
      "&:hover": {
        backgroundColor: e.vars ? `rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})` : ee(e.palette.action.active, e.palette.action.hoverOpacity)
      }
    }
  }, ...Object.entries(e.palette).filter(nt()).map(([t]) => ({
    props: {
      color: t,
      disableRipple: !1
    },
    style: {
      "&:hover": {
        backgroundColor: e.vars ? `rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})` : ee(e.palette[t].main, e.palette.action.hoverOpacity)
      }
    }
  })), ...Object.entries(e.palette).filter(nt()).map(([t]) => ({
    props: {
      color: t
    },
    style: {
      [`&.${$e.checked}, &.${$e.indeterminate}`]: {
        color: (e.vars || e).palette[t].main
      },
      [`&.${$e.disabled}`]: {
        color: (e.vars || e).palette.action.disabled
      }
    }
  })), {
    // Should be last to override other colors
    props: {
      disableRipple: !1
    },
    style: {
      // Reset on touch devices, it doesn't add specificity
      "&:hover": {
        "@media (hover: none)": {
          backgroundColor: "transparent"
        }
      }
    }
  }]
}))), On = /* @__PURE__ */ v(Sn, {}), Dn = /* @__PURE__ */ v(vn, {}), Vn = /* @__PURE__ */ v(Pn, {}), ut = /* @__PURE__ */ x.forwardRef(function(t, n) {
  const r = st({
    props: t,
    name: "MuiCheckbox"
  }), {
    checkedIcon: l = On,
    color: I = "primary",
    icon: c = Dn,
    indeterminate: s = !1,
    indeterminateIcon: d = Vn,
    inputProps: f,
    size: i = "medium",
    disableRipple: a = !1,
    className: u,
    slots: g = {},
    slotProps: b = {},
    ...m
  } = r, p = s ? d : c, h = s ? d : l, y = {
    ...r,
    disableRipple: a,
    color: I,
    indeterminate: s,
    size: i
  }, w = Mn(y), R = b.input ?? f, [T, S] = Ne("root", {
    ref: n,
    elementType: kn,
    className: Me(w.root, u),
    shouldForwardComponentProp: !0,
    externalForwardedProps: {
      slots: g,
      slotProps: b,
      ...m
    },
    ownerState: y,
    additionalProps: {
      type: "checkbox",
      icon: /* @__PURE__ */ x.cloneElement(p, {
        fontSize: p.props.fontSize ?? i
      }),
      checkedIcon: /* @__PURE__ */ x.cloneElement(h, {
        fontSize: h.props.fontSize ?? i
      }),
      disableRipple: a,
      slots: g,
      slotProps: {
        input: on(typeof R == "function" ? R(y) : R, {
          "data-indeterminate": s
        })
      }
    }
  });
  return /* @__PURE__ */ v(T, {
    ...S,
    classes: w
  });
});
process.env.NODE_ENV !== "production" && (ut.propTypes = {
  // ┌────────────────────────────── Warning ──────────────────────────────┐
  // │ These PropTypes are generated from the TypeScript type definitions. │
  // │    To update them, edit the d.ts file and run `pnpm proptypes`.     │
  // └─────────────────────────────────────────────────────────────────────┘
  /**
   * If `true`, the component is checked.
   */
  checked: o.bool,
  /**
   * The icon to display when the component is checked.
   * @default <CheckBoxIcon />
   */
  checkedIcon: o.node,
  /**
   * Override or extend the styles applied to the component.
   */
  classes: o.object,
  /**
   * @ignore
   */
  className: o.string,
  /**
   * The color of the component.
   * It supports both default and custom theme colors, which can be added as shown in the
   * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
   * @default 'primary'
   */
  color: o.oneOfType([o.oneOf(["default", "primary", "secondary", "error", "info", "success", "warning"]), o.string]),
  /**
   * The default checked state. Use when the component is not controlled.
   */
  defaultChecked: o.bool,
  /**
   * If `true`, the component is disabled.
   * @default false
   */
  disabled: o.bool,
  /**
   * If `true`, the ripple effect is disabled.
   * @default false
   */
  disableRipple: o.bool,
  /**
   * The icon to display when the component is unchecked.
   * @default <CheckBoxOutlineBlankIcon />
   */
  icon: o.node,
  /**
   * The id of the `input` element.
   */
  id: o.string,
  /**
   * If `true`, the component appears indeterminate.
   * This does not set the native input element to indeterminate due
   * to inconsistent behavior across browsers.
   * However, we set a `data-indeterminate` attribute on the `input`.
   * @default false
   */
  indeterminate: o.bool,
  /**
   * The icon to display when the component is indeterminate.
   * @default <IndeterminateCheckBoxIcon />
   */
  indeterminateIcon: o.node,
  /**
   * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
   * @deprecated Use `slotProps.input` 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.
   */
  inputProps: o.object,
  /**
   * Callback fired when the state is changed.
   *
   * @param {React.ChangeEvent<HTMLInputElement>} event The event source of the callback.
   * You can pull out the new checked state by accessing `event.target.checked` (boolean).
   */
  onChange: o.func,
  /**
   * If `true`, the `input` element is required.
   * @default false
   */
  required: o.bool,
  /**
   * The size of the component.
   * `small` is equivalent to the dense checkbox styling.
   * @default 'medium'
   */
  size: o.oneOfType([o.oneOf(["medium", "small"]), o.string]),
  /**
   * The props used for each slot inside.
   * @default {}
   */
  slotProps: o.shape({
    input: o.oneOfType([o.func, o.object]),
    root: o.oneOfType([o.func, o.object])
  }),
  /**
   * The components used for each slot inside.
   * @default {}
   */
  slots: o.shape({
    input: o.elementType,
    root: o.elementType
  }),
  /**
   * The system prop that allows defining system overrides as well as additional CSS styles.
   */
  sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object]),
  /**
   * The value of the component. The DOM API casts this to a string.
   * The browser uses "on" as the default value.
   */
  value: o.any
});
const Fn = oe(/* @__PURE__ */ v("path", {
  d: "M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"
}), "Visibility"), An = oe(/* @__PURE__ */ v("path", {
  d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"
}), "VisibilityOff");
function pt(e) {
  return mn;
}
function $n(e) {
  return ge("MuiSimpleTreeView", e);
}
he("MuiSimpleTreeView", ["root"]);
const Ln = (e, t) => {
  const n = x.useRef({}), [r, l] = x.useState(() => {
    const c = {};
    return e.forEach((s) => {
      s.models && Object.entries(s.models).forEach(([d, f]) => {
        n.current[d] = {
          isControlled: t[d] !== void 0,
          getDefaultValue: f.getDefaultValue
        }, c[d] = f.getDefaultValue(t);
      });
    }), c;
  }), I = Object.fromEntries(Object.entries(n.current).map(([c, s]) => {
    const d = t[c] ?? r[c];
    return [c, {
      value: d,
      setControlledValue: (f) => {
        s.isControlled || l((i) => C({}, i, {
          [c]: f
        }));
      }
    }];
  }));
  return process.env.NODE_ENV !== "production" && Object.entries(n.current).forEach(([c, s]) => {
    const d = t[c], f = s.getDefaultValue(t);
    x.useEffect(() => {
      s.isControlled !== (d !== void 0) && console.error([`MUI X: A component is changing the ${s.isControlled ? "" : "un"}controlled ${c} state of TreeView to be ${s.isControlled ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${c} element for the lifetime of the component.`, "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join(`
`));
    }, [d]);
    const {
      current: i
    } = x.useRef(f);
    x.useEffect(() => {
      !s.isControlled && i !== f && console.error([`MUI X: A component is changing the default ${c} state of an uncontrolled TreeView after being initialized. To suppress this warning opt to use a controlled TreeView.`].join(`
`));
    }, [JSON.stringify(f)]);
  }), I;
};
class Nn {
  constructor() {
    this.maxListeners = 20, this.warnOnce = !1, this.events = {};
  }
  on(t, n, r = {}) {
    let l = this.events[t];
    if (l || (l = {
      highPriority: /* @__PURE__ */ new Map(),
      regular: /* @__PURE__ */ new Map()
    }, this.events[t] = l), r.isFirst ? l.highPriority.set(n, !0) : l.regular.set(n, !0), process.env.NODE_ENV !== "production") {
      const I = l.highPriority.size + l.regular.size;
      I > this.maxListeners && !this.warnOnce && (this.warnOnce = !0, console.warn([`Possible EventEmitter memory leak detected. ${I} ${t} listeners added.`].join(`
`)));
    }
  }
  removeListener(t, n) {
    this.events[t] && (this.events[t].regular.delete(n), this.events[t].highPriority.delete(n));
  }
  removeAllListeners() {
    this.events = {};
  }
  emit(t, ...n) {
    const r = this.events[t];
    if (!r)
      return;
    const l = Array.from(r.highPriority.keys()), I = Array.from(r.regular.keys());
    for (let c = l.length - 1; c >= 0; c -= 1) {
      const s = l[c];
      r.highPriority.has(s) && s.apply(this, n);
    }
    for (let c = 0; c < I.length; c += 1) {
      const s = I[c];
      r.regular.has(s) && s.apply(this, n);
    }
  }
  once(t, n) {
    const r = this;
    this.on(t, function l(...I) {
      r.removeListener(t, l), n.apply(r, I);
    });
  }
}
const jn = (e) => e.isPropagationStopped !== void 0, ft = () => {
  const [e] = x.useState(() => new Nn()), t = x.useCallback((...r) => {
    const [l, I, c = {}] = r;
    c.defaultMuiPrevented = !1, !(jn(c) && c.isPropagationStopped()) && e.emit(l, I, c);
  }, [e]), n = x.useCallback((r, l) => (e.on(r, l), () => {
    e.removeListener(r, l);
  }), [e]);
  return {
    instance: {
      $$publishEvent: t,
      $$subscribeEvent: n
    }
  };
};
ft.params = {};
const mt = ({
  plugins: e
}) => {
  const t = new Set(e);
  return {
    instance: {
      getAvailablePlugins: () => t
    }
  };
};
mt.params = {};
let rt = 0;
const zn = () => (rt += 1, `mui-tree-view-${rt}`), ke = ({
  id: e,
  treeId: t = "",
  itemId: n
}) => e ?? `${t}-${n}`, Be = ({
  params: e,
  state: t,
  setState: n
}) => {
  x.useEffect(() => {
    n((l) => l.id.treeId === e.id && l.id.treeId !== void 0 ? l : C({}, l, {
      id: C({}, l.id, {
        treeId: e.id ?? zn()
      })
    }));
  }, [n, e.id]);
  const r = e.id ?? t.id.treeId;
  return {
    getRootProps: () => ({
      id: r
    }),
    contextValue: {
      treeId: r
    }
  };
};
Be.params = {
  id: !0
};
Be.getInitialState = ({
  id: e
}) => ({
  id: {
    treeId: e ?? void 0
  }
});
const Bn = [ft, mt, Be], _n = ["slots", "slotProps", "apiRef", "experimentalFeatures"], Un = (e) => {
  let {
    props: {
      slots: t,
      slotProps: n,
      apiRef: r,
      experimentalFeatures: l
    },
    plugins: I
  } = e, c = te(e.props, _n);
  const s = {};
  I.forEach((u) => {
    Object.assign(s, u.params);
  });
  const d = {}, f = {};
  Object.keys(c).forEach((u) => {
    const g = c[u];
    s[u] ? d[u] = g : f[u] = g;
  });
  const i = l ?? {}, a = I.reduce((u, g) => g.getDefaultizedParams ? g.getDefaultizedParams({
    params: u,
    experimentalFeatures: i
  }) : u, d);
  return {
    apiRef: r,
    forwardedProps: f,
    pluginParams: a,
    slots: t ?? {},
    slotProps: n ?? {},
    experimentalFeatures: i
  };
}, Kn = ({
  plugins: e,
  instance: t,
  publicAPI: n,
  rootRef: r
}) => ({
  runItemPlugins: (s) => {
    let d = null, f = null;
    const i = [], a = {};
    e.forEach((b) => {
      if (!b.itemPlugin)
        return;
      const m = b.itemPlugin({
        props: s,
        rootRef: d,
        contentRef: f
      });
      m != null && m.rootRef && (d = m.rootRef), m != null && m.contentRef && (f = m.contentRef), m != null && m.propsEnhancers && (i.push(m.propsEnhancers), Object.keys(m.propsEnhancers).forEach((p) => {
        a[p] = !0;
      }));
    });
    const u = (b) => (m) => {
      const p = {};
      return i.forEach((h) => {
        const y = h[b];
        y != null && Object.assign(p, y(m));
      }), p;
    }, g = Object.fromEntries(Object.keys(a).map((b) => [b, u(b)]));
    return {
      contentRef: f,
      rootRef: d,
      propsEnhancers: g
    };
  },
  wrapItem: ({
    itemId: s,
    children: d
  }) => {
    let f = d;
    for (let i = e.length - 1; i >= 0; i -= 1) {
      const a = e[i];
      a.wrapItem && (f = a.wrapItem({
        itemId: s,
        children: f,
        instance: t
      }));
    }
    return f;
  },
  wrapRoot: ({
    children: s
  }) => {
    let d = s;
    for (let f = e.length - 1; f >= 0; f -= 1) {
      const i = e[f];
      i.wrapRoot && (d = i.wrapRoot({
        children: d,
        instance: t
      }));
    }
    return d;
  },
  instance: t,
  rootRef: r,
  publicAPI: n
});
function qn(e) {
  const t = x.useRef({});
  return e ? (e.current == null && (e.current = {}), e.current) : t.current;
}
const Xn = ({
  plugins: e,
  rootRef: t,
  props: n
}) => {
  const r = [...Bn, ...e], {
    pluginParams: l,
    forwardedProps: I,
    apiRef: c,
    experimentalFeatures: s,
    slots: d,
    slotProps: f
  } = Un({
    plugins: r,
    props: n
  }), i = Ln(r, l), u = x.useRef({}).current, g = qn(c), b = x.useRef(null), m = fe(b, t), p = Kn({
    plugins: r,
    instance: u,
    publicAPI: g,
    rootRef: b
  }), [h, y] = x.useState(() => {
    const S = {};
    return r.forEach((M) => {
      M.getInitialState && Object.assign(S, M.getInitialState(l));
    }), S;
  }), w = [], R = (S) => {
    const M = S({
      instance: u,
      params: l,
      slots: d,
      slotProps: f,
      experimentalFeatures: s,
      state: h,
      setState: y,
      rootRef: b,
      models: i,
      plugins: r
    });
    M.getRootProps && w.push(M.getRootProps), M.publicAPI && Object.assign(g, M.publicAPI), M.instance && Object.assign(u, M.instance), M.contextValue && Object.assign(p, M.contextValue);
  };
  return r.forEach(R), {
    getRootProps: (S = {}) => {
      const M = C({
        role: "tree"
      }, I, S, {
        ref: m
      });
      return w.forEach((z) => {
        Object.assign(M, z(S));
      }), M;
    },
    rootRef: m,
    contextValue: p,
    instance: u
  };
}, _e = /* @__PURE__ */ x.createContext(null);
process.env.NODE_ENV !== "production" && (_e.displayName = "TreeViewContext");
function Wn(e) {
  const {
    value: t,
    children: n
  } = e;
  return /* @__PURE__ */ v(_e.Provider, {
    value: t,
    children: t.wrapRoot({
      children: n,
      instance: t.instance
    })
  });
}
const ae = () => {
  const e = x.useContext(_e);
  if (e == null)
    throw new Error(["MUI X: Could not find the Tree View context.", "It looks like you rendered your component outside of a SimpleTreeView or RichTreeView parent component.", "This can also happen if you are bundling multiple versions of the Tree View."].join(`
`));
  return e;
}, It = (e, t, n) => {
  e.$$publishEvent(t, n);
}, ne = "__TREE_VIEW_ROOT_PARENT_ID__", gt = (e) => {
  const t = {};
  return e.forEach((n, r) => {
    t[n] = r;
  }), t;
}, le = /* @__PURE__ */ x.createContext(() => -1);
process.env.NODE_ENV !== "production" && (le.displayName = "TreeViewItemDepthContext");
const Jn = ["children"], ht = ({
  items: e,
  isItemDisabled: t,
  getItemLabel: n,
  getItemId: r
}) => {
  const l = {}, I = {}, c = {
    [ne]: []
  }, s = (f, i, a) => {
    var m, p;
    const u = r ? r(f) : f.id;
    if (u == null)
      throw new Error(["MUI X: The Tree View component requires all items to have a unique `id` property.", "Alternatively, you can use the `getItemId` prop to specify a custom id for each item.", "An item was provided without id in the `items` prop:", JSON.stringify(f)].join(`
`));
    if (l[u] != null)
      throw new Error(["MUI X: The Tree View component requires all items to have a unique `id` property.", "Alternatively, you can use the `getItemId` prop to specify a custom id for each item.", `Two items were provided with the same id in the \`items\` prop: "${u}"`].join(`
`));
    const g = n ? n(f) : f.label;
    if (g == null)
      throw new Error(["MUI X: The Tree View component requires all items to have a `label` property.", "Alternatively, you can use the `getItemLabel` prop to specify a custom label for each item.", "An item was provided without label in the `items` prop:", JSON.stringify(f)].join(`
`));
    l[u] = {
      id: u,
      label: g,
      parentId: a,
      idAttribute: void 0,
      expandable: !!((m = f.children) != null && m.length),
      disabled: t ? t(f) : !1,
      depth: i
    }, I[u] = f;
    const b = a ?? ne;
    c[b] || (c[b] = []), c[b].push(u), (p = f.children) == null || p.forEach((h) => s(h, i + 1, u));
  };
  e.forEach((f) => s(f, 0, null));
  const d = {};
  return Object.keys(c).forEach((f) => {
    d[f] = gt(c[f]);
  }), {
    itemMetaMap: l,
    itemMap: I,
    itemOrderedChildrenIds: c,
    itemChildrenIndexes: d
  };
}, ye = ({
  instance: e,
  params: t,
  state: n,
  setState: r,
  experimentalFeatures: l
}) => {
  const I = x.useCallback((h) => n.items.itemMetaMap[h], [n.items.itemMetaMap]), c = x.useCallback((h) => n.items.itemMap[h], [n.items.itemMap]), s = x.useCallback(() => {
    const h = (y) => {
      const w = n.items.itemMap[y], R = te(w, Jn), T = n.items.itemOrderedChildrenIds[y];
      return T && (R.children = T.map(h)), R;
    };
    return n.items.itemOrderedChildrenIds[ne].map(h);
  }, [n.items.itemMap, n.items.itemOrderedChildrenIds]), d = x.useCallback((h) => {
    if (h == null)
      return !1;
    let y = e.getItemMeta(h);
    if (!y)
      return !1;
    if (y.disabled)
      return !0;
    for (; y.parentId != null; )
      if (y = e.getItemMeta(y.parentId), y.disabled)
        return !0;
    return !1;
  }, [e]), f = x.useCallback((h) => {
    const y = e.getItemMeta(h).parentId ?? ne;
    return n.items.itemChildrenIndexes[y][h];
  }, [e, n.items.itemChildrenIndexes]), i = x.useCallback((h) => n.items.itemOrderedChildrenIds[h ?? ne] ?? [], [n.items.itemOrderedChildrenIds]), a = (h) => {
    const y = e.getItemMeta(h);
    return y == null ? null : document.getElementById(ke({
      treeId: n.id.treeId,
      itemId: h,
      id: y.idAttribute
    }));
  }, u = (h) => t.disabledItemsFocusable ? !0 : !e.isItemDisabled(h), g = x.useRef(!1), b = x.useCallback(() => {
    g.current = !0;
  }, []), m = x.useCallback(() => g.current, []);
  return x.useEffect(() => {
    e.areItemUpdatesPrevented() || r((h) => {
      const y = ht({
        items: t.items,
        isItemDisabled: t.isItemDisabled,
        getItemId: t.getItemId,
        getItemLabel: t.getItemLabel
      });
      return Object.values(h.items.itemMetaMap).forEach((w) => {
        y.itemMetaMap[w.id] || It(e, "removeItem", {
          id: w.id
        });
      }), C({}, h, {
        items: y
      });
    });
  }, [e, r, t.items, t.isItemDisabled, t.getItemId, t.getItemLabel]), {
    getRootProps: () => ({
      style: {
        "--TreeView-itemChildrenIndentation": typeof t.itemChildrenIndentation == "number" ? `${t.itemChildrenIndentation}px` : t.itemChildrenIndentation
      }
    }),
    publicAPI: {
      getItem: c,
      getItemDOMElement: a,
      getItemTree: s,
      getItemOrderedChildrenIds: i
    },
    instance: {
      getItemMeta: I,
      getItem: c,
      getItemTree: s,
      getItemsToRender: () => {
        const h = (y) => {
          var R;
          const w = n.items.itemMetaMap[y];
          return {
            label: w.label,
            itemId: w.id,
            id: w.idAttribute,
            children: (R = n.items.itemOrderedChildrenIds[y]) == null ? void 0 : R.map(h)
          };
        };
        return n.items.itemOrderedChildrenIds[ne].map(h);
      },
      getItemIndex: f,
      getItemDOMElement: a,
      getItemOrderedChildrenIds: i,
      isItemDisabled: d,
      isItemNavigable: u,
      preventItemUpdates: b,
      areItemUpdatesPrevented: m
    },
    contextValue: {
      items: {
        onItemClick: t.onItemClick,
        disabledItemsFocusable: t.disabledItemsFocusable,
        indentationAtItemLevel: l.indentationAtItemLevel ?? !1
      }
    }
  };
};
ye.getInitialState = (e) => ({
  items: ht({
    items: e.items,
    isItemDisabled: e.isItemDisabled,
    getItemId: e.getItemId,
    getItemLabel: e.getItemLabel
  })
});
ye.getDefaultizedParams = ({
  params: e
}) => C({}, e, {
  disabledItemsFocusable: e.disabledItemsFocusable ?? !1,
  itemChildrenIndentation: e.itemChildrenIndentation ?? "12px"
});
ye.wrapRoot = ({
  children: e,
  instance: t
}) => /* @__PURE__ */ v(le.Provider, {
  value: (n) => {
    var r;
    return ((r = t.getItemMeta(n)) == null ? void 0 : r.depth) ?? 0;
  },
  children: e
});
ye.params = {
  disabledItemsFocusable: !0,
  items: !0,
  isItemDisabled: !0,
  getItemLabel: !0,
  getItemId: !0,
  onItemClick: !0,
  itemChildrenIndentation: !0
};
const Oe = ({
  instance: e,
  params: t,
  models: n
}) => {
  const r = x.useMemo(() => {
    const a = /* @__PURE__ */ new Map();
    return n.expandedItems.value.forEach((u) => {
      a.set(u, !0);
    }), a;
  }, [n.expandedItems.value]), l = (a, u) => {
    var g;
    (g = t.onExpandedItemsChange) == null || g.call(t, a, u), n.expandedItems.setControlledValue(u);
  }, I = x.useCallback((a) => r.has(a), [r]), c = x.useCallback((a) => {
    var u;
    return !!((u = e.getItemMeta(a)) != null && u.expandable);
  }, [e]), s = Q((a, u) => {
    const g = e.isItemExpanded(u);
    e.setItemExpansion(a, u, !g);
  }), d = Q((a, u, g) => {
    if (e.isItemExpanded(u) === g)
      return;
    let m;
    g ? m = [u].concat(n.expandedItems.value) : m = n.expandedItems.value.filter((p) => p !== u), t.onItemExpansionToggle && t.onItemExpansionToggle(a, u, g), l(a, m);
  }), f = (a, u) => {
    const g = e.getItemMeta(u), m = e.getItemOrderedChildrenIds(g.parentId).filter((h) => e.isItemExpandable(h) && !e.isItemExpanded(h)), p = n.expandedItems.value.concat(m);
    m.length > 0 && (t.onItemExpansionToggle && m.forEach((h) => {
      t.onItemExpansionToggle(a, h, !0);
    }), l(a, p));
  }, i = x.useMemo(() => t.expansionTrigger ? t.expansionTrigger : e.isTreeViewEditable ? "iconContainer" : "content", [t.expansionTrigger, e.isTreeViewEditable]);
  return {
    publicAPI: {
      setItemExpansion: d
    },
    instance: {
      isItemExpanded: I,
      isItemExpandable: c,
      setItemExpansion: d,
      toggleItemExpansion: s,
      expandAllSiblings: f
    },
    contextValue: {
      expansion: {
        expansionTrigger: i
      }
    }
  };
};
Oe.models = {
  expandedItems: {
    getDefaultValue: (e) => e.defaultExpandedItems
  }
};
const Gn = [];
Oe.getDefaultizedParams = ({
  params: e
}) => C({}, e, {
  defaultExpandedItems: e.defaultExpandedItems ?? Gn
});
Oe.params = {
  expandedItems: !0,
  defaultExpandedItems: !0,
  onExpandedItemsChange: !0,
  onItemExpansionToggle: !0,
  expansionTrigger: !0
};
const bt = (e, t) => {
  let n = t.length - 1;
  for (; n >= 0 && !e.isItemNavigable(t[n]); )
    n -= 1;
  if (n !== -1)
    return t[n];
}, yt = (e, t) => {
  const n = e.getItemMeta(t), r = e.getItemOrderedChildrenIds(n.parentId), l = e.getItemIndex(t);
  if (l === 0)
    return n.parentId;
  let I = l - 1;
  for (; !e.isItemNavigable(r[I]) && I >= 0; )
    I -= 1;
  if (I === -1)
    return n.parentId == null ? null : yt(e, n.parentId);
  let c = r[I], s = bt(e, e.getItemOrderedChildrenIds(c));
  for (; e.isItemExpanded(c) && s != null; )
    c = s, s = e.getItemOrderedChildrenIds(c).find(e.isItemNavigable);
  return c;
}, Te = (e, t) => {
  if (e.isItemExpanded(t)) {
    const r = e.getItemOrderedChildrenIds(t).find(e.isItemNavigable);
    if (r != null)
      return r;
  }
  let n = e.getItemMeta(t);
  for (; n != null; ) {
    const r = e.getItemOrderedChildrenIds(n.parentId), l = e.getItemIndex(n.id);
    if (l < r.length - 1) {
      let I = l + 1;
      for (; !e.isItemNavigable(r[I]) && I < r.length - 1; )
        I += 1;
      if (e.isItemNavigable(r[I]))
        return r[I];
    }
    n = e.getItemMeta(n.parentId);
  }
  return null;
}, xt = (e) => {
  let t = null;
  for (; t == null || e.isItemExpanded(t); ) {
    const n = e.getItemOrderedChildrenIds(t), r = bt(e, n);
    if (r == null)
      return t;
    t = r;
  }
  return t;
}, Ie = (e) => e.getItemOrderedChildrenIds(null).find(e.isItemNavigable), wt = (e, t, n) => {
  if (t === n)
    return [t, n];
  const r = e.getItemMeta(t), l = e.getItemMeta(n);
  if (r.parentId === l.id || l.parentId === r.id)
    return l.parentId === r.id ? [r.id, l.id] : [l.id, r.id];
  const I = [r.id], c = [l.id];
  let s = r.parentId, d = l.parentId, f = c.indexOf(s) !== -1, i = I.indexOf(d) !== -1, a = !0, u = !0;
  for (; !i && !f; )
    a && (I.push(s), f = c.indexOf(s) !== -1, a = s !== null, !f && a && (s = e.getItemMeta(s).parentId)), u && !f && (c.push(d), i = I.indexOf(d) !== -1, u = d !== null, !i && u && (d = e.getItemMeta(d).parentId));
  const g = f ? s : d, b = e.getItemOrderedChildrenIds(g), m = I[I.indexOf(g) - 1], p = c[c.indexOf(g) - 1];
  return b.indexOf(m) < b.indexOf(p) ? [t, n] : [n, t];
}, Hn = (e, t, n) => {
  const r = (d) => {
    if (e.isItemExpandable(d) && e.isItemExpanded(d))
      return e.getItemOrderedChildrenIds(d)[0];
    let f = e.getItemMeta(d);
    for (; f != null; ) {
      const i = e.getItemOrderedChildrenIds(f.parentId), a = e.getItemIndex(f.id);
      if (a < i.length - 1)
        return i[a + 1];
      f = e.getItemMeta(f.parentId);
    }
    throw new Error("Invalid range");
  }, [l, I] = wt(e, t, n), c = [l];
  let s = l;
  for (; s !== I; )
    s = r(s), e.isItemDisabled(s) || c.push(s);
  return c;
}, Yn = (e) => {
  let t = Ie(e);
  const n = [];
  for (; t != null; )
    n.push(t), t = Te(e, t);
  return n;
}, je = (e, t) => t !== e.closest('*[role="treeitem"]'), Ee = (e) => Array.isArray(e) ? e : e != null ? [e] : [], Le = (e) => {
  const t = {};
  return e.forEach((n) => {
    t[n] = !0;
  }), t;
}, De = ({
  instance: e,
  params: t,
  models: n
}) => {
  const r = x.useRef(null), l = x.useRef({}), I = x.useMemo(() => {
    const m = /* @__PURE__ */ new Map();
    return Array.isArray(n.selectedItems.value) ? n.selectedItems.value.forEach((p) => {
      m.set(p, !0);
    }) : n.selectedItems.value != null && m.set(n.selectedItems.value, !0), m;
  }, [n.selectedItems.value]), c = (m, p) => {
    if (t.onItemSelectionToggle)
      if (t.multiSelect) {
        const h = p.filter((w) => !e.isItemSelected(w)), y = n.selectedItems.value.filter((w) => !p.includes(w));
        h.forEach((w) => {
          t.onItemSelectionToggle(m, w, !0);
        }), y.forEach((w) => {
          t.onItemSelectionToggle(m, w, !1);
        });
      } else p !== n.selectedItems.value && (n.selectedItems.value != null && t.onItemSelectionToggle(m, n.selectedItems.value, !1), p != null && t.onItemSelectionToggle(m, p, !0));
    t.onSelectedItemsChange && t.onSelectedItemsChange(m, p), n.selectedItems.setControlledValue(p);
  }, s = (m) => I.has(m), d = ({
    event: m,
    itemId: p,
    keepExistingSelection: h = !1,
    shouldBeSelected: y
  }) => {
    if (t.disableSelection)
      return;
    let w;
    if (h) {
      const R = Ee(n.selectedItems.value), T = e.isItemSelected(p);
      T && (y === !1 || y == null) ? w = R.filter((S) => S !== p) : !T && (y === !0 || y == null) ? w = [p].concat(R) : w = R;
    } else
      y === !1 || y == null && e.isItemSelected(p) ? w = t.multiSelect ? [] : null : w = t.multiSelect ? [p] : p;
    c(m, w), r.current = p, l.current = {};
  }, f = (m, [p, h]) => {
    if (t.disableSelection || !t.multiSelect)
      return;
    let y = Ee(n.selectedItems.value).slice();
    Object.keys(l.current).length > 0 && (y = y.filter((S) => !l.current[S]));
    const w = Le(y), R = Hn(e, p, h), T = R.filter((S) => !w[S]);
    y = y.concat(T), c(m, y), l.current = Le(R);
  };
  return {
    getRootProps: () => ({
      "aria-multiselectable": t.multiSelect
    }),
    publicAPI: {
      selectItem: d
    },
    instance: {
      isItemSelected: s,
      selectItem: d,
      selectAllNavigableItems: (m) => {
        if (t.disableSelection || !t.multiSelect)
          return;
        const p = Yn(e);
        c(m, p), l.current = Le(p);
      },
      expandSelectionRange: (m, p) => {
        if (r.current != null) {
          const [h, y] = wt(e, p, r.current);
          f(m, [h, y]);
        }
      },
      selectRangeFromStartToItem: (m, p) => {
        f(m, [Ie(e), p]);
      },
      selectRangeFromItemToEnd: (m, p) => {
        f(m, [p, xt(e)]);
      },
      selectItemFromArrowNavigation: (m, p, h) => {
        if (t.disableSelection || !t.multiSelect)
          return;
        let y = Ee(n.selectedItems.value).slice();
        Object.keys(l.current).length === 0 ? (y.push(h), l.current = {
          [p]: !0,
          [h]: !0
        }) : (l.current[p] || (l.current = {}), l.current[h] ? (y = y.filter((w) => w !== p), delete l.current[p]) : (y.push(h), l.current[h] = !0)), c(m, y);
      }
    },
    contextValue: {
      selection: {
        multiSelect: t.multiSelect,
        checkboxSelection: t.checkboxSelection,
        disableSelection: t.disableSelection
      }
    }
  };
};
De.models = {
  selectedItems: {
    getDefaultValue: (e) => e.defaultSelectedItems
  }
};
const Qn = [];
De.getDefaultizedParams = ({
  params: e
}) => C({}, e, {
  disableSelection: e.disableSelection ?? !1,
  multiSelect: e.multiSelect ?? !1,
  checkboxSelection: e.checkboxSelection ?? !1,
  defaultSelectedItems: e.defaultSelectedItems ?? (e.multiSelect ? Qn : null)
});
De.params = {
  disableSelection: !0,
  multiSelect: !0,
  checkboxSelection: !0,
  defaultSelectedItems: !0,
  selectedItems: !0,
  onSelectedItemsChange: !0,
  onItemSelectionToggle: !0
};
const it = 1e3;
class Zn {
  constructor(t = it) {
    this.timeouts = /* @__PURE__ */ new Map(), this.cleanupTimeout = it, this.cleanupTimeout = t;
  }
  register(t, n, r) {
    this.timeouts || (this.timeouts = /* @__PURE__ */ new Map());
    const l = setTimeout(() => {
      typeof n == "function" && n(), this.timeouts.delete(r.cleanupToken);
    }, this.cleanupTimeout);
    this.timeouts.set(r.cleanupToken, l);
  }
  unregister(t) {
    const n = this.timeouts.get(t.cleanupToken);
    n && (this.timeouts.delete(t.cleanupToken), clearTimeout(n));
  }
  reset() {
    this.timeouts && (this.timeouts.forEach((t, n) => {
      this.unregister({
        cleanupToken: n
      });
    }), this.timeouts = void 0);
  }
}
class eo {
  constructor() {
    this.registry = new FinalizationRegistry((t) => {
      typeof t == "function" && t();
    });
  }
  register(t, n, r) {
    this.registry.register(t, n, r);
  }
  unregister(t) {
    this.registry.unregister(t);
  }
  // eslint-disable-next-line class-methods-use-this
  reset() {
  }
}
class to {
}
function no(e) {
  let t = 0;
  return function(r, l, I) {
    e.registry === null && (e.registry = typeof FinalizationRegistry < "u" ? new eo() : new Zn());
    const [c] = x.useState(new to()), s = x.useRef(null), d = x.useRef(void 0);
    d.current = I;
    const f = x.useRef(null);
    if (!s.current && d.current) {
      const i = (a, u) => {
        var g;
        u.defaultMuiPrevented || (g = d.current) == null || g.call(d, a, u);
      };
      s.current = r.$$subscribeEvent(l, i), t += 1, f.current = {
        cleanupToken: t
      }, e.registry.register(
        c,
        // The callback below will be called once this reference stops being retained
        () => {
          var a;
          (a = s.current) == null || a.call(s), s.current = null, f.current = null;
        },
        f.current
      );
    } else !d.current && s.current && (s.current(), s.current = null, f.current && (e.registry.unregister(f.current), f.current = null));
    x.useEffect(() => {
      if (!s.current && d.current) {
        const i = (a, u) => {
          var g;
          u.defaultMuiPrevented || (g = d.current) == null || g.call(d, a, u);
        };
        s.current = r.$$subscribeEvent(l, i);
      }
      return f.current && e.registry && (e.registry.unregister(f.current), f.current = null), () => {
        var i;
        (i = s.current) == null || i.call(s), s.current = null;
      };
    }, [r, l]);
  };
}
const oo = {
  registry: null
}, ro = no(oo), Ct = (e = document) => {
  const t = e.activeElement;
  return t ? t.shadowRoot ? Ct(t.shadowRoot) : t : null;
};
function io(e) {
  return e.replace(/["\\]/g, "\\$&");
}
const so = (e, t) => {
  let n = Ee(t).find((r) => {
    if (!e.isItemNavigable(r))
      return !1;
    const l = e.getItemMeta(r);
    return l && (l.parentId == null || e.isItemExpanded(l.parentId));
  });
  return n == null && (n = Ie(e)), n;
}, Ue = ({
  instance: e,
  params: t,
  state: n,
  setState: r,
  models: l,
  rootRef: I
}) => {
  const c = so(e, l.selectedItems.value), s = Q((p) => {
    const h = typeof p == "function" ? p(n.focusedItemId) : p;
    n.focusedItemId !== h && r((y) => C({}, y, {
      focusedItemId: h
    }));
  }), d = x.useCallback(() => !!I.current && I.current.contains(Ct(rn(I.current))), [I]), f = x.useCallback((p) => n.focusedItemId === p && d(), [n.focusedItemId, d]), i = (p) => {
    const h = e.getItemMeta(p);
    return h && (h.parentId == null || e.isItemExpanded(h.parentId));
  }, a = (p, h) => {
    const y = e.getItemDOMElement(h);
    y && y.focus(), s(h), t.onItemFocus && t.onItemFocus(p, h);
  }, u = Q((p, h) => {
    i(h) && a(p, h);
  }), g = Q(() => {
    if (n.focusedItemId == null)
      return;
    if (e.getItemMeta(n.focusedItemId)) {
      const h = e.getItemDOMElement(n.focusedItemId);
      h && h.blur();
    }
    s(null);
  }), b = (p) => p === c;
  ro(e, "removeItem", ({
    id: p
  }) => {
    n.focusedItemId === p && a(null, c);
  });
  const m = (p) => (h) => {
    var y;
    (y = p.onFocus) == null || y.call(p, h), !h.defaultMuiPrevented && h.target === h.currentTarget && a(h, c);
  };
  return {
    getRootProps: (p) => ({
      onFocus: m(p)
    }),
    publicAPI: {
      focusItem: u
    },
    instance: {
      isItemFocused: f,
      canItemBeTabbed: b,
      focusItem: u,
      removeFocusedItem: g
    }
  };
};
Ue.getInitialState = () => ({
  focusedItemId: null
});
Ue.params = {
  onItemFocus: !0
};
const ve = (e, t) => e.getAvailablePlugins().has(t), lo = ({
  props: e
}) => {
  const {
    instance: t
  } = ae(), {
    label: n,
    itemId: r
  } = e, [l, I] = x.useState(n), c = t.isItemBeingEdited(r);
  return x.useEffect(() => {
    c || I(n);
  }, [c, n]), {
    propsEnhancers: {
      labelInput: ({
        externalEventHandlers: s,
        interactions: d
      }) => t.isItemEditable(r) ? {
        value: l ?? "",
        "data-element": "labelInput",
        onChange: (g) => {
          var b;
          (b = s.onChange) == null || b.call(s, g), I(g.target.value);
        },
        onKeyDown: (g) => {
          var m;
          if ((m = s.onKeyDown) == null || m.call(s, g), g.defaultMuiPrevented)
            return;
          const b = g.target;
          g.key === "Enter" && b.value ? d.handleSaveItemLabel(g, b.value) : g.key === "Escape" && d.handleCancelItemLabelEditing(g);
        },
        onBlur: (g) => {
          var b;
          (b = s.onBlur) == null || b.call(s, g), !g.defaultMuiPrevented && g.target.value && d.handleSaveItemLabel(g, g.target.value);
        },
        autoFocus: !0,
        type: "text"
      } : {}
    }
  };
}, Z = ({
  instance: e,
  state: t,
  setState: n,
  params: r
}) => {
  const l = x.useRef(t.editedItemId), I = (a) => l.current === a, c = (a) => {
    n((u) => C({}, u, {
      editedItemId: a
    })), l.current = a;
  }, s = (a) => a === t.editedItemId, d = !!r.isItemEditable, f = (a) => {
    if (a == null || !d)
      return !1;
    const u = e.getItem(a);
    return u ? typeof r.isItemEditable == "function" ? r.isItemEditable(u) : !!r.isItemEditable : !1;
  }, i = (a, u) => {
    if (!u)
      throw new Error(["MUI X: The Tree View component requires all items to have a `label` property.", "The label of an item cannot be empty.", a].join(`
`));
    n((g) => {
      const b = g.items.itemMetaMap[a];
      return b.label !== u ? C({}, g, {
        items: C({}, g.items, {
          itemMetaMap: C({}, g.items.itemMetaMap, {
            [a]: C({}, b, {
              label: u
            })
          })
        })
      }) : g;
    }), r.onItemLabelChange && r.onItemLabelChange(a, u);
  };
  return {
    instance: {
      setEditedItemId: c,
      isItemBeingEdited: s,
      updateItemLabel: i,
      isItemEditable: f,
      isTreeViewEditable: d,
      isItemBeingEditedRef: I
    },
    publicAPI: {
      updateItemLabel: i
    }
  };
};
Z.itemPlugin = lo;
Z.getDefaultizedParams = ({
  params: e,
  experimentalFeatures: t
}) => {
  const n = t == null ? void 0 : t.labelEditing;
  return process.env.NODE_ENV !== "production" && e.isItemEditable && !n && Se(["MUI X: The label editing feature requires the `labelEditing` experimental feature to be enabled.", "You can do it by passing `experimentalFeatures={{ labelEditing: true}}` to the Rich Tree View Pro component.", "Check the documentation for more details: https://mui.com/x/react-tree-view/rich-tree-view/editing/"]), C({}, e, {
    isItemEditable: n ? e.isItemEditable ?? !1 : !1
  });
};
Z.getInitialState = () => ({
  editedItemId: null
});
Z.params = {
  onItemLabelChange: !0,
  isItemEditable: !0
};
function ao(e) {
  return !!e && e.length === 1 && !!e.match(/\S/);
}
const Tt = ({
  instance: e,
  params: t,
  state: n
}) => {
  const r = sn(), l = x.useRef({}), I = Q((i) => {
    l.current = i(l.current);
  });
  x.useEffect(() => {
    if (e.areItemUpdatesPrevented())
      return;
    const i = {}, a = (u) => {
      i[u.id] = u.label.substring(0, 1).toLowerCase();
    };
    Object.values(n.items.itemMetaMap).forEach(a), l.current = i;
  }, [n.items.itemMetaMap, t.getItemId, e]);
  const c = (i, a) => {
    const u = a.toLowerCase(), g = (h) => {
      const y = Te(e, h);
      return y === null ? Ie(e) : y;
    };
    let b = null, m = g(i);
    const p = {};
    for (; b == null && !p[m]; )
      l.current[m] === u ? b = m : (p[m] = !0, m = g(m));
    return b;
  }, s = (i) => !t.disableSelection && !e.isItemDisabled(i), d = (i) => !e.isItemDisabled(i) && e.isItemExpandable(i);
  return {
    instance: {
      updateFirstCharMap: I,
      handleItemKeyDown: (i, a) => {
        if (i.defaultMuiPrevented || i.altKey || je(i.target, i.currentTarget))
          return;
        const u = i.ctrlKey || i.metaKey, g = i.key;
        switch (!0) {
          // Select the item when pressing "Space"
          case (g === " " && s(a)): {
            i.preventDefault(), t.multiSelect && i.shiftKey ? e.expandSelectionRange(i, a) : e.selectItem({
              event: i,
              itemId: a,
              keepExistingSelection: t.multiSelect,
              shouldBeSelected: t.multiSelect ? void 0 : !0
            });
            break;
          }
          // If the focused item has children, we expand it.
          // If the focused item has no children, we select it.
          case g === "Enter": {
            ve(e, Z) && e.isItemEditable(a) && !e.isItemBeingEdited(a) ? e.setEditedItemId(a) : d(a) ? (e.toggleItemExpansion(i, a), i.preventDefault()) : s(a) && (t.multiSelect ? (i.preventDefault(), e.selectItem({
              event: i,
              itemId: a,
              keepExistingSelection: !0
            })) : e.isItemSelected(a) || (e.selectItem({
              event: i,
              itemId: a
            }), i.preventDefault()));
            break;
          }
          // Focus the next focusable item
          case g === "ArrowDown": {
            const b = Te(e, a);
            b && (i.preventDefault(), e.focusItem(i, b), t.multiSelect && i.shiftKey && s(b) && e.selectItemFromArrowNavigation(i, a, b));
            break;
          }
          // Focuses the previous focusable item
          case g === "ArrowUp": {
            const b = yt(e, a);
            b && (i.preventDefault(), e.focusItem(i, b), t.multiSelect && i.shiftKey && s(b) && e.selectItemFromArrowNavigation(i, a, b));
            break;
          }
          // If the focused item is expanded, we move the focus to its first child
          // If the focused item is collapsed and has children, we expand it
          case (g === "ArrowRight" && !r || g === "ArrowLeft" && r): {
            if (u)
              return;
            if (e.isItemExpanded(a)) {
              const b = Te(e, a);
              b && (e.focusItem(i, b), i.preventDefault());
            } else d(a) && (e.toggleItemExpansion(i, a), i.preventDefault());
            break;
          }
          // If the focused item is expanded, we collapse it
          // If the focused item is collapsed and has a parent, we move the focus to this parent
          case (g === "ArrowLeft" && !r || g === "ArrowRight" && r): {
            if (u)
              return;
            if (d(a) && e.isItemExpanded(a))
              e.toggleItemExpansion(i, a), i.preventDefault();
            else {
              const b = e.getItemMeta(a).parentId;
              b && (e.focusItem(i, b), i.preventDefault());
            }
            break;
          }
          // Focuses the first item in the tree
          case g === "Home": {
            s(a) && t.multiSelect && u && i.shiftKey ? e.selectRangeFromStartToItem(i, a) : e.focusItem(i, Ie(e)), i.preventDefault();
            break;
          }
          // Focuses the last item in the tree
          case g === "End": {
            s(a) && t.multiSelect && u && i.shiftKey ? e.selectRangeFromItemToEnd(i, a) : e.focusItem(i, xt(e)), i.preventDefault();
            break;
          }
          // Expand all siblings that are at the same level as the focused item
          case g === "*": {
            e.expandAllSiblings(i, a), i.preventDefault();
            break;
          }
          // Multi select behavior when pressing Ctrl + a
          // Selects all the items
          case (String.fromCharCode(i.keyCode) === "A" && u && t.multiSelect && !t.disableSelection): {
            e.selectAllNavigableItems(i), i.preventDefault();
            break;
          }
          // Type-ahead
          // TODO: Support typing multiple characters
          case (!u && !i.shiftKey && ao(g)): {
            const b = c(a, g);
            b != null && (e.focusItem(i, b), i.preventDefault());
            break;
          }
        }
      }
    }
  };
};
Tt.params = {};
const Et = ({
  slots: e,
  slotProps: t
}) => ({
  contextValue: {
    icons: {
      slots: {
        collapseIcon: e.collapseIcon,
        expandIcon: e.expandIcon,
        endIcon: e.endIcon
      },
      slotProps: {
        collapseIcon: t.collapseIcon,
        expandIcon: t.expandIcon,
        endIcon: t.endIcon
      }
    }
  }
});
Et.params = {};
const Ke = /* @__PURE__ */ x.createContext(null);
process.env.NODE_ENV !== "production" && (Ke.displayName = "TreeViewChildrenItemContext");
function qe(e) {
  const {
    children: t,
    itemId: n = null
  } = e, {
    instance: r,
    treeId: l,
    rootRef: I
  } = ae(), c = x.useRef(/* @__PURE__ */ new Map());
  x.useEffect(() => {
    if (!I.current)
      return;
    let d = null;
    if (n == null)
      d = I.current.id;
    else {
      const b = r.getItemMeta(n);
      b !== void 0 && (d = ke({
        itemId: n,
        treeId: l,
        id: b.idAttribute
      }));
    }
    if (d == null)
      return;
    const f = r.getItemOrderedChildrenIds(n ?? null) ?? [], i = io(d), a = I.current.querySelectorAll(`${n == null ? "" : `*[id="${i}"] `}[role="treeitem"]:not(*[id="${i}"] [role="treeitem"] [role="treeitem"])`), u = Array.from(a).map((b) => c.current.get(b.id));
    (u.length !== f.length || u.some((b, m) => b !== f[m])) && r.setJSXItemsOrderedChildrenIds(n ?? null, u);
  });
  const s = x.useMemo(() => ({
    registerChild: (d, f) => c.current.set(d, f),
    unregisterChild: (d) => c.current.delete(d),
    parentId: n
  }), [n]);
  return /* @__PURE__ */ v(Ke.Provider, {
    value: s,
    children: t
  });
}
process.env.NODE_ENV !== "production" && (qe.propTypes = {
  children: o.node,
  id: o.string
});
const xe = ({
  instance: e,
  setState: t
}) => {
  e.preventItemUpdates();
  const n = Q((I) => (t((c) => {
    if (c.items.itemMetaMap[I.id] != null)
      throw new Error(["MUI X: The Tree View component requires all items to have a unique `id` property.", "Alternatively, you can use the `getItemId` prop to specify a custom id for each item.", `Two items were provided with the same id in the \`items\` prop: "${I.id}"`].join(`
`));
    return C({}, c, {
      items: C({}, c.items, {
        itemMetaMap: C({}, c.items.itemMetaMap, {
          [I.id]: I
        }),
        // For Simple Tree View, we don't have a proper `item` object, so we create a very basic one.
        itemMap: C({}, c.items.itemMap, {
          [I.id]: {
            id: I.id,
            label: I.label
          }
        })
      })
    });
  }), () => {
    t((c) => {
      const s = C({}, c.items.itemMetaMap), d = C({}, c.items.itemMap);
      return delete s[I.id], delete d[I.id], C({}, c, {
        items: C({}, c.items, {
          itemMetaMap: s,
          itemMap: d
        })
      });
    }), It(e, "removeItem", {
      id: I.id
    });
  })), r = (I, c) => {
    const s = I ?? ne;
    t((d) => C({}, d, {
      items: C({}, d.items, {
        itemOrderedChildrenIds: C({}, d.items.itemOrderedChildrenIds, {
          [s]: c
        }),
        itemChildrenIndexes: C({}, d.items.itemChildrenIndexes, {
          [s]: gt(c)
        })
      })
    }));
  }, l = Q((I, c) => (e.updateFirstCharMap((s) => (s[I] = c, s)), () => {
    e.updateFirstCharMap((s) => {
      const d = C({}, s);
      return delete d[I], d;
    });
  }));
  return {
    instance: {
      insertJSXItem: n,
      setJSXItemsOrderedChildrenIds: r,
      mapFirstCharFromJSX: l
    }
  };
}, vt = (e) => Array.isArray(e) ? e.length > 0 && e.some(vt) : !!e, co = ({
  props: e,
  rootRef: t,
  contentRef: n
}) => {
  const {
    instance: r,
    treeId: l
  } = ae(), {
    children: I,
    disabled: c = !1,
    label: s,
    itemId: d,
    id: f
  } = e, i = x.useContext(Ke);
  if (i == null)
    throw new Error(["MUI X: Could not find the Tree View Children Item context.", "It looks like you rendered your component outside of a SimpleTreeView parent component.", "This can also happen if you are bundling multiple versions of the Tree View."].join(`
`));
  const {
    registerChild: a,
    unregisterChild: u,
    parentId: g
  } = i, b = vt(I), m = x.useRef(null), p = fe(m, n);
  return ln(() => {
    const h = ke({
      itemId: d,
      treeId: l,
      id: f
    });
    return a(h, d), () => {
      u(h);
    };
  }, [a, u, d, f, l]), x.useEffect(() => r.insertJSXItem({
    id: d,
    idAttribute: f,
    parentId: g,
    expandable: b,
    disabled: c
  }), [r, g, d, b, c, f]), x.useEffect(() => {
    var h;
    if (s)
      return r.mapFirstCharFromJSX(d, (((h = m.current) == null ? void 0 : h.textContent) ?? "").substring(0, 1).toLowerCase());
  }, [r, d, s]), {
    contentRef: p,
    rootRef: t
  };
};
xe.itemPlugin = co;
xe.wrapItem = ({
  children: e,
  itemId: t
}) => {
  const n = x.useContext(le);
  return /* @__PURE__ */ v(qe, {
    itemId: t,
    children: /* @__PURE__ */ v(le.Provider, {
      value: n + 1,
      children: e
    })
  });
};
xe.wrapRoot = ({
  children: e
}) => /* @__PURE__ */ v(qe, {
  children: /* @__PURE__ */ v(le.Provider, {
    value: 0,
    children: e
  })
});
xe.params = {};
const uo = [ye, Oe, De, Ue, Tt, Et, xe], po = pt(), fo = (e) => {
  const {
    classes: t
  } = e;
  return be({
    root: ["root"]
  }, $n, t);
}, mo = U("ul", {
  name: "MuiSimpleTreeView",
  slot: "Root",
  overridesResolver: (e, t) => t.root
})({
  padding: 0,
  margin: 0,
  listStyle: "none",
  outline: 0,
  position: "relative"
}), Io = [], St = /* @__PURE__ */ x.forwardRef(function(t, n) {
  const r = po({
    props: t,
    name: "MuiSimpleTreeView"
  }), l = r;
  process.env.NODE_ENV !== "production" && r.items != null && Se(["MUI X: The Simple Tree View component does not support the `items` prop.", "If you want to add items, you need to pass them as JSX children.", "Check the documentation for more details: https://mui.com/x/react-tree-view/simple-tree-view/items/."]);
  const {
    getRootProps: I,
    contextValue: c
  } = Xn({
    plugins: uo,
    rootRef: n,
    props: C({}, r, {
      items: Io
    })
  }), {
    slots: s,
    slotProps: d
  } = r, f = fo(r), i = (s == null ? void 0 : s.root) ?? mo, a = pe({
    elementType: i,
    externalSlotProps: d == null ? void 0 : d.root,
    className: f.root,
    getSlotProps: I,
    ownerState: l
  });
  return /* @__PURE__ */ v(Wn, {
    value: c,
    children: /* @__PURE__ */ v(i, C({}, a))
  });
});
process.env.NODE_ENV !== "production" && (St.propTypes = {
  // ----------------------------- Warning --------------------------------
  // | These PropTypes are generated from the TypeScript type definitions |
  // | To update them edit the TypeScript types and run "pnpm proptypes"  |
  // ----------------------------------------------------------------------
  /**
   * The ref object that allows Tree View manipulation. Can be instantiated with `useTreeViewApiRef()`.
   */
  apiRef: o.shape({
    current: o.shape({
      focusItem: o.func.isRequired,
      getItem: o.func.isRequired,
      getItemDOMElement: o.func.isRequired,
      getItemOrderedChildrenIds: o.func.isRequired,
      getItemTree: o.func.isRequired,
      selectItem: o.func.isRequired,
      setItemExpansion: o.func.isRequired
    })
  }),
  /**
   * If `true`, the Tree View renders a checkbox at the left of its label that allows selecting it.
   * @default false
   */
  checkboxSelection: o.bool,
  /**
   * The content of the component.
   */
  children: o.node,
  /**
   * Override or extend the styles applied to the component.
   */
  classes: o.object,
  className: o.string,
  /**
   * Expanded item ids.
   * Used when the item's expansion is not controlled.
   * @default []
   */
  defaultExpandedItems: o.arrayOf(o.string),
  /**
   * Selected item ids. (Uncontrolled)
   * When `multiSelect` is true this takes an array of strings; when false (default) a string.
   * @default []
   */
  defaultSelectedItems: o.any,
  /**
   * If `true`, will allow focus on disabled items.
   * @default false
   */
  disabledItemsFocusable: o.bool,
  /**
   * If `true` selection is disabled.
   * @default false
   */
  disableSelection: o.bool,
  /**
   * Expanded item ids.
   * Used when the item's expansion is controlled.
   */
  expandedItems: o.arrayOf(o.string),
  /**
   * The slot that triggers the item's expansion when clicked.
   * @default 'content'
   */
  expansionTrigger: o.oneOf(["content", "iconContainer"]),
  /**
   * Unstable features, breaking changes might be introduced.
   * For each feature, if the flag is not explicitly set to `true`,
   * the feature will be fully disabled and any property / method call will not have any effect.
   */
  experimentalFeatures: o.shape({
    indentationAtItemLevel: o.bool
  }),
  /**
   * This prop is used to help implement the accessibility logic.
   * If you don't provide this prop. It falls back to a randomly generated id.
   */
  id: o.string,
  /**
   * Horizontal indentation between an item and its children.
   * Examples: 24, "24px", "2rem", "2em".
   * @default 12px
   */
  itemChildrenIndentation: o.oneOfType([o.number, o.string]),
  /**
   * If `true`, `ctrl` and `shift` will trigger multiselect.
   * @default false
   */
  multiSelect: o.bool,
  /**
   * Callback fired when Tree Items are expanded/collapsed.
   * @param {React.SyntheticEvent} event The DOM event that triggered the change.
   * @param {array} itemIds The ids of the expanded items.
   */
  onExpandedItemsChange: o.func,
  /**
   * Callback fired when the `content` slot of a given Tree Item is clicked.
   * @param {React.MouseEvent} event The DOM event that triggered the change.
   * @param {string} itemId The id of the focused item.
   */
  onItemClick: o.func,
  /**
   * Callback fired when a Tree Item is expanded or collapsed.
   * @param {React.SyntheticEvent} event The DOM event that triggered the change.
   * @param {array} itemId The itemId of the modified item.
   * @param {array} isExpanded `true` if the item has just been expanded, `false` if it has just been collapsed.
   */
  onItemExpansionToggle: o.func,
  /**
   * Callback fired when a given Tree Item is focused.
   * @param {React.SyntheticEvent | null} event The DOM event that triggered the change. **Warning**: This is a generic event not a focus event.
   * @param {string} itemId The id of the focused item.
   */
  onItemFocus: o.func,
  /**
   * Callback fired when a Tree Item is selected or deselected.
   * @param {React.SyntheticEvent} event The DOM event that triggered the change.
   * @param {array} itemId The itemId of the modified item.
   * @param {array} isSelected `true` if the item has just been selected, `false` if it has just been deselected.
   */
  onItemSelectionToggle: o.func,
  /**
   * Callback fired when Tree Items are selected/deselected.
   * @param {React.SyntheticEvent} event The DOM event that triggered the change.
   * @param {string[] | string} itemIds The ids of the selected items.
   * When `multiSelect` is `true`, this is an array of strings; when false (default) a string.
   */
  onSelectedItemsChange: o.func,
  /**
   * Selected item ids. (Controlled)
   * When `multiSelect` is true this takes an array of strings; when false (default) a string.
   */
  selectedItems: o.any,
  /**
   * The props used for each component slot.
   */
  slotProps: o.object,
  /**
   * Overridable component slots.
   */
  slots: o.object,
  /**
   * The system prop that allows defining system overrides as well as additional CSS styles.
   */
  sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object])
});
function Pt(e) {
  const {
    instance: t,
    items: {
      onItemClick: n
    },
    selection: {
      multiSelect: r,
      checkboxSelection: l,
      disableSelection: I
    },
    expansion: {
      expansionTrigger: c
    }
  } = ae(), s = t.isItemExpandable(e), d = t.isItemExpanded(e), f = t.isItemFocused(e), i = t.isItemSelected(e), a = t.isItemDisabled(e), u = t != null && t.isItemBeingEdited ? t == null ? void 0 : t.isItemBeingEdited(e) : !1, g = t.isItemEditable ? t.isItemEditable(e) : !1, b = (T) => {
    if (!a) {
      f || t.focusItem(T, e);
      const S = r && (T.shiftKey || T.ctrlKey || T.metaKey);
      s && !(S && t.isItemExpanded(e)) && t.toggleItemExpansion(T, e);
    }
  }, m = (T) => {
    a || (!f && !u && t.focusItem(T, e), r && (T.shiftKey || T.ctrlKey || T.metaKey) ? T.shiftKey ? t.expandSelectionRange(T, e) : t.selectItem({
      event: T,
      itemId: e,
      keepExistingSelection: !0
    }) : t.selectItem({
      event: T,
      itemId: e,
      shouldBeSelected: !0
    }));
  }, p = (T) => {
    if (I || a)
      return;
    const S = T.nativeEvent.shiftKey;
    r && S ? t.expandSelectionRange(T, e) : t.selectItem({
      event: T,
      itemId: e,
      keepExistingSelection: r,
      shouldBeSelected: T.target.checked
    });
  }, h = (T) => {
    (T.shiftKey || T.ctrlKey || T.metaKey || a) && T.preventDefault();
  }, y = () => {
    ve(t, Z) && t.isItemEditable(e) && (t.isItemBeingEdited(e) ? t.setEditedItemId(null) : t.setEditedItemId(e));
  };
  return {
    disabled: a,
    expanded: d,
    selected: i,
    focused: f,
    editable: g,
    editing: u,
    disableSelection: I,
    checkboxSelection: l,
    handleExpansion: b,
    handleSelection: m,
    handleCheckboxSelection: p,
    handleContentClick: n,
    preventSelection: h,
    expansionTrigger: c,
    toggleItemEditing: y,
    handleSaveItemLabel: (T, S) => {
      ve(t, Z) && t.isItemBeingEditedRef(e) && (t.updateItemLabel(e, S), y(), t.focusItem(T, e));
    },
    handleCancelItemLabelEditing: (T) => {
      ve(t, Z) && t.isItemBeingEditedRef(e) && (y(), t.focusItem(T, e));
    }
  };
}
const go = U("div", {
  name: "MuiTreeItem2DragAndDropOverlay",
  slot: "Root",
  overridesResolver: (e, t) => t.root,
  shouldForwardProp: (e) => ze(e) && e !== "action"
})(({
  theme: e
}) => ({
  position: "absolute",
  left: 0,
  display: "flex",
  top: 0,
  bottom: 0,
  right: 0,
  pointerEvents: "none",
  variants: [{
    props: {
      action: "make-child"
    },
    style: {
      marginLeft: "calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",
      borderRadius: e.shape.borderRadius,
      backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.darkChannel} / ${e.vars.palette.action.focusOpacity})` : ee(e.palette.primary.dark, e.palette.action.focusOpacity)
    }
  }, {
    props: {
      action: "reorder-above"
    },
    style: {
      marginLeft: "calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",
      borderTop: `1px solid ${(e.vars || e).palette.action.active}`
    }
  }, {
    props: {
      action: "reorder-below"
    },
    style: {
      marginLeft: "calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",
      borderBottom: `1px solid ${(e.vars || e).palette.action.active}`
    }
  }, {
    props: {
      action: "move-to-parent"
    },
    style: {
      marginLeft: "calc(var(--TreeView-indentMultiplier) * calc(var(--TreeView-itemDepth) - 1))",
      borderBottom: `1px solid ${(e.vars || e).palette.action.active}`
    }
  }]
}));
function Rt(e) {
  return e.action == null ? null : /* @__PURE__ */ v(go, C({}, e));
}
process.env.NODE_ENV !== "production" && (Rt.propTypes = {
  // ----------------------------- Warning --------------------------------
  // | These PropTypes are generated from the TypeScript type definitions |
  // | To update them edit the TypeScript types and run "pnpm proptypes"  |
  // ----------------------------------------------------------------------
  action: o.oneOf(["make-child", "move-to-parent", "reorder-above", "reorder-below"]),
  style: o.object
});
const ho = U("input", {
  name: "MuiTreeItem2",
  slot: "LabelInput",
  overridesResolver: (e, t) => t.labelInput
})(({
  theme: e
}) => C({}, e.typography.body1, {
  width: "100%",
  backgroundColor: e.palette.background.paper,
  borderRadius: e.shape.borderRadius,
  border: "none",
  padding: "0 2px",
  boxSizing: "border-box",
  "&:focus": {
    outline: `1px solid ${e.palette.primary.main}`
  }
})), bo = ["classes", "className", "displayIcon", "expansionIcon", "icon", "label", "itemId", "onClick", "onMouseDown", "dragAndDropOverlayProps", "labelInputProps"], Xe = /* @__PURE__ */ x.forwardRef(function(t, n) {
  const {
    classes: r,
    className: l,
    displayIcon: I,
    expansionIcon: c,
    icon: s,
    label: d,
    itemId: f,
    onClick: i,
    onMouseDown: a,
    dragAndDropOverlayProps: u,
    labelInputProps: g
  } = t, b = te(t, bo), {
    disabled: m,
    expanded: p,
    selected: h,
    focused: y,
    editing: w,
    editable: R,
    disableSelection: T,
    checkboxSelection: S,
    handleExpansion: M,
    handleSelection: z,
    handleCheckboxSelection: W,
    handleContentClick: D,
    preventSelection: j,
    expansionTrigger: V,
    toggleItemEditing: B
  } = Pt(f), N = s || c || I, K = x.useRef(null), q = (A) => {
    j(A), a && a(A);
  }, _ = (A) => {
    var J;
    D == null || D(A, f), !((J = K.current) != null && J.contains(A.target)) && (V === "content" && M(A), S || z(A), i && i(A));
  }, X = (A) => {
    A.defaultMuiPrevented || B();
  };
  return (
    /* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions -- Key event is handled by the TreeView */
    /* @__PURE__ */ Re("div", C({}, b, {
      className: Me(r.root, l, p && r.expanded, h && r.selected, y && r.focused, m && r.disabled, w && r.editing, R && r.editable),
      onClick: _,
      onMouseDown: q,
      ref: n,
      children: [/* @__PURE__ */ v("div", {
        className: r.iconContainer,
        children: N
      }), S && /* @__PURE__ */ v(ut, {
        className: r.checkbox,
        checked: h,
        onChange: W,
        disabled: m || T,
        ref: K,
        tabIndex: -1
      }), w ? /* @__PURE__ */ v(ho, C({}, g, {
        className: r.labelInput
      })) : /* @__PURE__ */ v("div", C({
        className: r.label
      }, R && {
        onDoubleClick: X
      }, {
        children: d
      })), u && /* @__PURE__ */ v(Rt, C({}, u))]
    }))
  );
});
process.env.NODE_ENV !== "production" && (Xe.propTypes = {
  // ----------------------------- Warning --------------------------------
  // | These PropTypes are generated from the TypeScript type definitions |
  // | To update them edit the TypeScript types and run "pnpm proptypes"  |
  // ----------------------------------------------------------------------
  /**
   * Override or extend the styles applied to the component.
   */
  classes: o.object.isRequired,
  className: o.string,
  /**
   * The icon to display next to the Tree Item's label. Either a parent or end icon.
   */
  displayIcon: o.node,
  dragAndDropOverlayProps: o.shape({
    action: o.oneOf(["make-child", "move-to-parent", "reorder-above", "reorder-below"]),
    style: o.object
  }),
  /**
   * The icon to display next to the Tree Item's label. Either an expansion or collapse icon.
   */
  expansionIcon: o.node,
  /**
   * The icon to display next to the Tree Item's label.
   */
  icon: o.node,
  /**
   * The id of the item.
   */
  itemId: o.string.isRequired,
  /**
   * The Tree Item label.
   */
  label: o.node,
  labelInputProps: o.shape({
    autoFocus: o.oneOf([!0]),
    "data-element": o.oneOf(["labelInput"]),
    onBlur: o.func,
    onChange: o.func,
    onKeyDown: o.func,
    type: o.oneOf(["text"]),
    value: o.string
  })
});
function yo(e) {
  return ge("MuiTreeItem", e);
}
const H = he("MuiTreeItem", ["root", "groupTransition", "content", "expanded", "selected", "focused", "disabled", "iconContainer", "label", "checkbox", "labelInput", "editable", "editing", "dragAndDropOverlay"]), xo = oe(/* @__PURE__ */ v("path", {
  d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"
}), "TreeViewExpandIcon"), wo = oe(/* @__PURE__ */ v("path", {
  d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"
}), "TreeViewCollapseIcon");
function Mt(e) {
  const {
    children: t,
    itemId: n
  } = e, {
    wrapItem: r,
    instance: l
  } = ae();
  return r({
    children: t,
    itemId: n,
    instance: l
  });
}
Mt.propTypes = {
  // ----------------------------- Warning --------------------------------
  // | These PropTypes are generated from the TypeScript type definitions |
  // | To update them edit the TypeScript types and run "pnpm proptypes"  |
  // ----------------------------------------------------------------------
  children: o.node,
  itemId: o.string.isRequired
};
const Co = ["children", "className", "slots", "slotProps", "ContentComponent", "ContentProps", "itemId", "id", "label", "onClick", "onMouseDown", "onFocus", "onBlur", "onKeyDown"], To = ["ownerState"], Eo = ["ownerState"], vo = ["ownerState"], So = pt(), Po = (e) => {
  const {
    classes: t
  } = e;
  return be({
    root: ["root"],
    content: ["content"],
    expanded: ["expanded"],
    selected: ["selected"],
    focused: ["focused"],
    disabled: ["disabled"],
    iconContainer: ["iconContainer"],
    checkbox: ["checkbox"],
    label: ["label"],
    labelInput: ["labelInput"],
    editing: ["editing"],
    editable: ["editable"],
    groupTransition: ["groupTransition"]
  }, yo, t);
}, Ro = U("li", {
  name: "MuiTreeItem",
  slot: "Root",
  overridesResolver: (e, t) => t.root
})({
  listStyle: "none",
  margin: 0,
  padding: 0,
  outline: 0
}), Mo = U(Xe, {
  name: "MuiTreeItem",
  slot: "Content",
  overridesResolver: (e, t) => [t.content, t.iconContainer && {
    [`& .${H.iconContainer}`]: t.iconContainer
  }, t.label && {
    [`& .${H.label}`]: t.label
  }],
  shouldForwardProp: (e) => ze(e) && e !== "indentationAtItemLevel"
})(({
  theme: e
}) => ({
  padding: e.spacing(0.5, 1),
  borderRadius: e.shape.borderRadius,
  width: "100%",
  boxSizing: "border-box",
  // prevent width + padding to overflow
  position: "relative",
  display: "flex",
  alignItems: "center",
  gap: e.spacing(1),
  cursor: "pointer",
  WebkitTapHighlightColor: "transparent",
  "&:hover": {
    backgroundColor: (e.vars || e).palette.action.hover,
    // Reset on touch devices, it doesn't add specificity
    "@media (hover: none)": {
      backgroundColor: "transparent"
    }
  },
  [`&.${H.disabled}`]: {
    opacity: (e.vars || e).palette.action.disabledOpacity,
    backgroundColor: "transparent"
  },
  [`&.${H.focused}`]: {
    backgroundColor: (e.vars || e).palette.action.focus
  },
  [`&.${H.selected}`]: {
    backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` : ee(e.palette.primary.main, e.palette.action.selectedOpacity),
    "&:hover": {
      backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))` : ee(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.hoverOpacity),
      // Reset on touch devices, it doesn't add specificity
      "@media (hover: none)": {
        backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` : ee(e.palette.primary.main, e.palette.action.selectedOpacity)
      }
    },
    [`&.${H.focused}`]: {
      backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))` : ee(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.focusOpacity)
    }
  },
  [`& .${H.iconContainer}`]: {
    width: 16,
    display: "flex",
    flexShrink: 0,
    justifyContent: "center",
    "& svg": {
      fontSize: 18
    }
  },
  [`& .${H.label}`]: C({
    width: "100%",
    boxSizing: "border-box",
    // prevent width + padding to overflow
    // fixes overflow - see https://github.com/mui/material-ui/issues/27372
    minWidth: 0,
    position: "relative"
  }, e.typography.body1),
  [`& .${H.checkbox}`]: {
    padding: 0
  },
  variants: [{
    props: {
      indentationAtItemLevel: !0
    },
    style: {
      paddingLeft: `calc(${e.spacing(1)} + var(--TreeView-itemChildrenIndentation) * var(--TreeView-itemDepth))`
    }
  }]
})), ko = U(Pe, {
  name: "MuiTreeItem",
  slot: "GroupTransition",
  overridesResolver: (e, t) => t.groupTransition,
  shouldForwardProp: (e) => ze(e) && e !== "indentationAtItemLevel"
})({
  margin: 0,
  padding: 0,
  paddingLeft: "var(--TreeView-itemChildrenIndentation)",
  variants: [{
    props: {
      indentationAtItemLevel: !0
    },
    style: {
      paddingLeft: 0
    }
  }]
}), kt = /* @__PURE__ */ x.forwardRef(function(t, n) {
  var Ge, He, Ye, Qe;
  const {
    icons: r,
    runItemPlugins: l,
    items: {
      disabledItemsFocusable: I,
      indentationAtItemLevel: c
    },
    selection: {
      disableSelection: s
    },
    expansion: {
      expansionTrigger: d
    },
    treeId: f,
    instance: i
  } = ae(), a = x.useContext(le), u = So({
    props: t,
    name: "MuiTreeItem"
  }), {
    children: g,
    className: b,
    slots: m,
    slotProps: p,
    ContentComponent: h = Xe,
    ContentProps: y,
    itemId: w,
    id: R,
    label: T,
    onClick: S,
    onMouseDown: M,
    onBlur: z,
    onKeyDown: W
  } = u, D = te(u, Co), {
    expanded: j,
    focused: V,
    selected: B,
    disabled: N,
    editing: K,
    handleExpansion: q,
    handleCancelItemLabelEditing: _,
    handleSaveItemLabel: X
  } = Pt(w);
  process.env.NODE_ENV !== "production" && (u.ContentComponent && Se(["MUI X: The ContentComponent prop of the TreeItem component is deprecated and will be removed in the next major release.", "You can use the new TreeItem2 component or the new useTreeItem2 hook to customize the rendering of the content.", "For more detail, see https://mui.com/x/react-tree-view/tree-item-customization/."]), u.ContentProps && Se(["MUI X: The ContentProps prop of the TreeItem component is deprecated and will be removed in the next major release.", "You can use the new TreeItem2 component or the new useTreeItem2 hook to customize the rendering of the content.", "For more detail, see https://mui.com/x/react-tree-view/tree-item-customization/."]));
  const {
    contentRef: A,
    rootRef: J,
    propsEnhancers: $
  } = l(u), Y = x.useRef(null), re = x.useRef(null), ce = fe(n, J, Y), k = fe(y == null ? void 0 : y.ref, A, re), E = {
    expandIcon: (m == null ? void 0 : m.expandIcon) ?? r.slots.expandIcon ?? xo,
    collapseIcon: (m == null ? void 0 : m.collapseIcon) ?? r.slots.collapseIcon ?? wo,
    endIcon: (m == null ? void 0 : m.endIcon) ?? r.slots.endIcon,
    icon: m == null ? void 0 : m.icon,
    groupTransition: m == null ? void 0 : m.groupTransition
  }, O = (P) => Array.isArray(P) ? P.length > 0 && P.some(O) : !!P, L = O(g), G = C({}, u, {
    expanded: j,
    focused: V,
    selected: B,
    disabled: N,
    indentationAtItemLevel: c
  }), F = Po(G), de = E.groupTransition ?? void 0, Dt = pe({
    elementType: de,
    ownerState: {},
    externalSlotProps: p == null ? void 0 : p.groupTransition,
    additionalProps: C({
      unmountOnExit: !0,
      in: j,
      component: "ul",
      role: "group"
    }, c ? {
      indentationAtItemLevel: !0
    } : {}),
    className: F.groupTransition
  }), Vt = (P) => {
    d === "iconContainer" && q(P);
  }, Ve = j ? E.collapseIcon : E.expandIcon, Ft = pe({
    elementType: Ve,
    ownerState: {},
    externalSlotProps: (P) => j ? C({}, se(r.slotProps.collapseIcon, P), se(p == null ? void 0 : p.collapseIcon, P)) : C({}, se(r.slotProps.expandIcon, P), se(p == null ? void 0 : p.expandIcon, P)),
    additionalProps: {
      onClick: Vt
    }
  }), At = te(Ft, To), $t = L && Ve ? /* @__PURE__ */ v(Ve, C({}, At)) : null, Fe = L ? void 0 : E.endIcon, Lt = pe({
    elementType: Fe,
    ownerState: {},
    externalSlotProps: (P) => L ? {} : C({}, se(r.slotProps.endIcon, P), se(p == null ? void 0 : p.endIcon, P))
  }), Nt = te(Lt, Eo), jt = Fe ? /* @__PURE__ */ v(Fe, C({}, Nt)) : null, Ae = E.icon, zt = pe({
    elementType: Ae,
    ownerState: {},
    externalSlotProps: p == null ? void 0 : p.icon
  }), Bt = te(zt, vo), _t = Ae ? /* @__PURE__ */ v(Ae, C({}, Bt)) : null;
  let we;
  B ? we = !0 : s || N ? we = void 0 : we = !1;
  function Ut(P) {
    !V && (!N || I) && P.currentTarget === P.target && i.focusItem(P, w);
  }
  function Kt(P) {
    var ie, ue, Ze, et;
    z == null || z(P), !(K || // we can exit the editing state by clicking outside the input (within the Tree Item) or by pressing Enter or Escape -> we don't want to remove the focused item from the state in these cases
    // we can also exit the editing state by clicking on the root itself -> want to remove the focused item from the state in this case
    P.relatedTarget && je(P.relatedTarget, Y.current) && (P.target && ((ue = (ie = P.target) == null ? void 0 : ie.dataset) == null ? void 0 : ue.element) === "labelInput" && je(P.target, Y.current) || ((et = (Ze = P.relatedTarget) == null ? void 0 : Ze.dataset) == null ? void 0 : et.element) === "labelInput")) && i.removeFocusedItem();
  }
  const qt = (P) => {
    var ie, ue;
    W == null || W(P), ((ue = (ie = P.target) == null ? void 0 : ie.dataset) == null ? void 0 : ue.element) !== "labelInput" && i.handleItemKeyDown(P, w);
  }, Xt = ke({
    itemId: w,
    treeId: f,
    id: R
  }), Wt = i.canItemBeTabbed(w) ? 0 : -1, Ce = {
    rootRefObject: Y,
    contentRefObject: re,
    interactions: {
      handleSaveItemLabel: X,
      handleCancelItemLabelEditing: _
    }
  }, Jt = ((Ge = $.root) == null ? void 0 : Ge.call($, C({}, Ce, {
    externalEventHandlers: ot(D)
  }))) ?? {}, Gt = ((He = $.content) == null ? void 0 : He.call($, C({}, Ce, {
    externalEventHandlers: ot(y)
  }))) ?? {}, We = ((Ye = $.dragAndDropOverlay) == null ? void 0 : Ye.call($, C({}, Ce, {
    externalEventHandlers: {}
  }))) ?? {}, Je = ((Qe = $.labelInput) == null ? void 0 : Qe.call($, C({}, Ce, {
    externalEventHandlers: {}
  }))) ?? {};
  return /* @__PURE__ */ v(Mt, {
    itemId: w,
    children: /* @__PURE__ */ Re(Ro, C({
      className: Me(F.root, b),
      role: "treeitem",
      "aria-expanded": L ? j : void 0,
      "aria-selected": we,
      "aria-disabled": N || void 0,
      id: Xt,
      tabIndex: Wt
    }, D, {
      ownerState: G,
      onFocus: Ut,
      onBlur: Kt,
      onKeyDown: qt,
      ref: ce,
      style: c ? C({}, D.style, {
        "--TreeView-itemDepth": typeof a == "function" ? a(w) : a
      }) : D.style
    }, Jt, {
      children: [/* @__PURE__ */ v(Mo, C({
        as: h,
        classes: {
          root: F.content,
          expanded: F.expanded,
          selected: F.selected,
          focused: F.focused,
          disabled: F.disabled,
          editable: F.editable,
          editing: F.editing,
          iconContainer: F.iconContainer,
          label: F.label,
          labelInput: F.labelInput,
          checkbox: F.checkbox
        },
        label: T,
        itemId: w,
        onClick: S,
        onMouseDown: M,
        icon: _t,
        expansionIcon: $t,
        displayIcon: jt,
        ownerState: G
      }, y, Gt, We.action == null ? {} : {
        dragAndDropOverlayProps: We
      }, Je.value == null ? {} : {
        labelInputProps: Je
      }, {
        ref: k
      })), g && /* @__PURE__ */ v(ko, C({
        as: de
      }, Dt, {
        children: g
      }))]
    }))
  });
});
process.env.NODE_ENV !== "production" && (kt.propTypes = {
  // ----------------------------- Warning --------------------------------
  // | These PropTypes are generated from the TypeScript type definitions |
  // | To update them edit the TypeScript types and run "pnpm proptypes"  |
  // ----------------------------------------------------------------------
  /**
   * The content of the component.
   */
  children: o.node,
  /**
   * Override or extend the styles applied to the component.
   */
  classes: o.object,
  className: o.string,
  /**
   * The component used to render the content of the item.
   * @deprecated Consider using the `<TreeItem2 />` component or the `useTreeItem2` hook instead. For more details, see https://mui.com/x/react-tree-view/tree-item-customization/.
   * @default TreeItemContent
   */
  ContentComponent: at,
  /**
   * Props applied to ContentComponent.
   * @deprecated Consider using the `<TreeItem2 />` component or the `useTreeItem2` hook instead. For more details, see https://mui.com/x/react-tree-view/tree-item-customization/.
   */
  ContentProps: o.object,
  /**
   * If `true`, the item is disabled.
   * @default false
   */
  disabled: o.bool,
  /**
   * The id of the item.
   */
  itemId: o.string.isRequired,
  /**
   * The Tree Item label.
   */
  label: o.node,
  /**
   * This prop isn't supported.
   * Use the `onItemFocus` callback on the tree if you need to monitor a item's focus.
   */
  onFocus: In,
  /**
   * Callback fired when a key of the keyboard is pressed on the item.
   */
  onKeyDown: o.func,
  /**
   * The props used for each component slot.
   * @default {}
   */
  slotProps: o.object,
  /**
   * Overridable component slots.
   * @default {}
   */
  slots: o.object,
  /**
   * The system prop that allows defining system overrides as well as additional CSS styles.
   */
  sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object])
});
const $o = ({
  items: e,
  handleCheck: t,
  width: n = "250px",
  height: r = "350px",
  expanded: l
}) => /* @__PURE__ */ v(an, { width: n, height: r, children: /* @__PURE__ */ v(St, { expandedItems: l, children: Ot(e, t) }) }), Ot = (e, t) => e.map((n) => /* @__PURE__ */ Ht(Oo, { ...n, key: n.id, handleCheck: t })), Oo = ({
  id: e,
  checked: t,
  children: n,
  label: r,
  handleCheck: l
}) => /* @__PURE__ */ v(
  kt,
  {
    itemId: e,
    label: /* @__PURE__ */ Re(cn, { flexDirection: "row", alignItems: "center", children: [
      /* @__PURE__ */ v(dn, { children: r }),
      l && /* @__PURE__ */ v(
        un,
        {
          disableRipple: !0,
          sx: { marginLeft: "auto" },
          onClick: (I) => {
            I.stopPropagation(), l(e, !t);
          },
          "data-testid": `toggle-visibility-${e}`,
          children: t ? /* @__PURE__ */ v(Fn, { "data-testid": `visibility-icon-${e}` }) : /* @__PURE__ */ v(An, { "data-testid": `visibility-off-icon-${e}` })
        }
      )
    ] }),
    children: n.length > 0 && Ot(n, l)
  }
);
export {
  Pe as C,
  $o as T,
  ut as a
};
