import { _ as u, P as e, c as So, s as Go, u as Io, b as Mo, e as ko, d as so, f as V, i as Do, g as re, h as io, k as lo, l as ve, m as ao, n as Lo, o as po, p as co, q as Vo, r as Ao, t as ye, v as Bo, w as Wo, x as Ze, y as Fo, z as Uo, G as eo, A as Te, B as zo, T as qo, D as Ho, E as Ko, j as F, F as Yo, a as oo, H as Xo, C as Jo } from "./index-b203ecbb.js";
import * as f from "react";
import { useRef as Qo, useEffect as to, useMemo as Zo, useCallback as Ie } from "react";
import { R as et } from "./index-a124d83e.js";
import { P as uo } from "./Popper-2776137d.js";
import "react-dom";
const ot = (t, o) => t.filter((n) => o.includes(n)), z = (t, o, n) => {
  const r = t.keys[0];
  Array.isArray(o) ? o.forEach((a, i) => {
    n((d, b) => {
      i <= t.keys.length - 1 && (i === 0 ? Object.assign(d, b) : d[t.up(t.keys[i])] = b);
    }, a);
  }) : o && typeof o == "object" ? (Object.keys(o).length > t.keys.length ? t.keys : ot(t.keys, Object.keys(o))).forEach((i) => {
    if (t.keys.indexOf(i) !== -1) {
      const d = o[i];
      d !== void 0 && n((b, h) => {
        r === i ? Object.assign(b, h) : b[t.up(i)] = h;
      }, d);
    }
  }) : (typeof o == "number" || typeof o == "string") && n((a, i) => {
    Object.assign(a, i);
  }, o);
};
function M(t) {
  return t ? `Level${t}` : "";
}
function se(t) {
  return t.unstable_level > 0 && t.container;
}
function fo(t) {
  return function(n) {
    return `var(--Grid-${n}Spacing${M(t.unstable_level)})`;
  };
}
function Me(t) {
  return function(n) {
    return t.unstable_level === 0 ? `var(--Grid-${n}Spacing)` : `var(--Grid-${n}Spacing${M(t.unstable_level - 1)})`;
  };
}
function ke(t) {
  return t.unstable_level === 0 ? "var(--Grid-columns)" : `var(--Grid-columns${M(t.unstable_level - 1)})`;
}
const tt = ({
  theme: t,
  ownerState: o
}) => {
  const n = fo(o), r = {};
  return z(t.breakpoints, o.gridSize, (a, i) => {
    let d = {};
    i === !0 && (d = {
      flexBasis: 0,
      flexGrow: 1,
      maxWidth: "100%"
    }), i === "auto" && (d = {
      flexBasis: "auto",
      flexGrow: 0,
      flexShrink: 0,
      maxWidth: "none",
      width: "auto"
    }), typeof i == "number" && (d = {
      flexGrow: 0,
      flexBasis: "auto",
      width: `calc(100% * ${i} / ${ke(o)}${se(o) ? ` + ${n("column")}` : ""})`
    }), a(r, d);
  }), r;
}, nt = ({
  theme: t,
  ownerState: o
}) => {
  const n = {};
  return z(t.breakpoints, o.gridOffset, (r, a) => {
    let i = {};
    a === "auto" && (i = {
      marginLeft: "auto"
    }), typeof a == "number" && (i = {
      marginLeft: a === 0 ? "0px" : `calc(100% * ${a} / ${ke(o)})`
    }), r(n, i);
  }), n;
}, rt = ({
  theme: t,
  ownerState: o
}) => {
  if (!o.container)
    return {};
  const n = se(o) ? {
    [`--Grid-columns${M(o.unstable_level)}`]: ke(o)
  } : {
    "--Grid-columns": 12
  };
  return z(t.breakpoints, o.columns, (r, a) => {
    r(n, {
      [`--Grid-columns${M(o.unstable_level)}`]: a
    });
  }), n;
}, st = ({
  theme: t,
  ownerState: o
}) => {
  if (!o.container)
    return {};
  const n = Me(o), r = se(o) ? {
    // Set the default spacing as its parent spacing.
    // It will be overridden if spacing props are provided
    [`--Grid-rowSpacing${M(o.unstable_level)}`]: n("row")
  } : {};
  return z(t.breakpoints, o.rowSpacing, (a, i) => {
    var d;
    a(r, {
      [`--Grid-rowSpacing${M(o.unstable_level)}`]: typeof i == "string" ? i : (d = t.spacing) == null ? void 0 : d.call(t, i)
    });
  }), r;
}, it = ({
  theme: t,
  ownerState: o
}) => {
  if (!o.container)
    return {};
  const n = Me(o), r = se(o) ? {
    // Set the default spacing as its parent spacing.
    // It will be overridden if spacing props are provided
    [`--Grid-columnSpacing${M(o.unstable_level)}`]: n("column")
  } : {};
  return z(t.breakpoints, o.columnSpacing, (a, i) => {
    var d;
    a(r, {
      [`--Grid-columnSpacing${M(o.unstable_level)}`]: typeof i == "string" ? i : (d = t.spacing) == null ? void 0 : d.call(t, i)
    });
  }), r;
}, lt = ({
  theme: t,
  ownerState: o
}) => {
  if (!o.container)
    return {};
  const n = {};
  return z(t.breakpoints, o.direction, (r, a) => {
    r(n, {
      flexDirection: a
    });
  }), n;
}, at = ({
  ownerState: t
}) => {
  const o = fo(t), n = Me(t);
  return u({
    minWidth: 0,
    boxSizing: "border-box"
  }, t.container && u({
    display: "flex",
    flexWrap: "wrap"
  }, t.wrap && t.wrap !== "wrap" && {
    flexWrap: t.wrap
  }, {
    margin: `calc(${o("row")} / -2) calc(${o("column")} / -2)`
  }, t.disableEqualOverflow && {
    margin: `calc(${o("row")} * -1) 0px 0px calc(${o("column")} * -1)`
  }), (!t.container || se(t)) && u({
    padding: `calc(${n("row")} / 2) calc(${n("column")} / 2)`
  }, (t.disableEqualOverflow || t.parentDisableEqualOverflow) && {
    padding: `${n("row")} 0px 0px ${n("column")}`
  }));
}, pt = (t) => {
  const o = [];
  return Object.entries(t).forEach(([n, r]) => {
    r !== !1 && r !== void 0 && o.push(`grid-${n}-${String(r)}`);
  }), o;
}, ct = (t, o = "xs") => {
  function n(r) {
    return r === void 0 ? !1 : typeof r == "string" && !Number.isNaN(Number(r)) || typeof r == "number" && r > 0;
  }
  if (n(t))
    return [`spacing-${o}-${String(t)}`];
  if (typeof t == "object" && !Array.isArray(t)) {
    const r = [];
    return Object.entries(t).forEach(([a, i]) => {
      n(i) && r.push(`spacing-${a}-${String(i)}`);
    }), r;
  }
  return [];
}, ut = (t) => t === void 0 ? [] : typeof t == "object" ? Object.entries(t).map(([o, n]) => `direction-${o}-${n}`) : [`direction-xs-${String(t)}`], dt = ["className", "children", "columns", "container", "component", "direction", "wrap", "spacing", "rowSpacing", "columnSpacing", "disableEqualOverflow", "unstable_level"], ft = So(), mt = Go("div", {
  name: "MuiGrid",
  slot: "Root",
  overridesResolver: (t, o) => o.root
});
function gt(t) {
  return Io({
    props: t,
    name: "MuiGrid",
    defaultTheme: ft
  });
}
function bt(t = {}) {
  const {
    // This will allow adding custom styled fn (for example for custom sx style function)
    createStyledComponent: o = mt,
    useThemeProps: n = gt,
    componentName: r = "MuiGrid"
  } = t, a = /* @__PURE__ */ f.createContext(void 0);
  process.env.NODE_ENV !== "production" && (a.displayName = "GridOverflowContext");
  const i = (h, g) => {
    const {
      container: O,
      direction: $,
      spacing: C,
      wrap: E,
      gridSize: x
    } = h, _ = {
      root: ["root", O && "container", E !== "wrap" && `wrap-xs-${String(E)}`, ...ut($), ...pt(x), ...O ? ct(C, g.breakpoints.keys[0]) : []]
    };
    return io(_, (P) => lo(r, P), {});
  }, d = o(rt, it, st, tt, lt, at, nt), b = /* @__PURE__ */ f.forwardRef(function(g, O) {
    var $, C, E, x, _, P, B, y;
    const k = Mo(), p = n(g), s = ko(p), c = f.useContext(a), {
      className: ie,
      children: q,
      columns: U = 12,
      container: R = !1,
      component: we = "div",
      direction: Ce = "row",
      wrap: le = "wrap",
      spacing: H = 0,
      rowSpacing: Pe = H,
      columnSpacing: ae = H,
      disableEqualOverflow: K,
      unstable_level: S = 0
    } = s, Y = so(s, dt);
    let W = K;
    S && K !== void 0 && (W = g.disableEqualOverflow);
    const X = {}, pe = {}, J = {};
    Object.entries(Y).forEach(([m, L]) => {
      k.breakpoints.values[m] !== void 0 ? X[m] = L : k.breakpoints.values[m.replace("Offset", "")] !== void 0 ? pe[m.replace("Offset", "")] = L : J[m] = L;
    });
    const ce = ($ = g.columns) != null ? $ : S ? void 0 : U, ue = (C = g.spacing) != null ? C : S ? void 0 : H, de = (E = (x = g.rowSpacing) != null ? x : g.spacing) != null ? E : S ? void 0 : Pe, Q = (_ = (P = g.columnSpacing) != null ? P : g.spacing) != null ? _ : S ? void 0 : ae, N = u({}, s, {
      level: S,
      columns: ce,
      container: R,
      direction: Ce,
      wrap: le,
      spacing: ue,
      rowSpacing: de,
      columnSpacing: Q,
      gridSize: X,
      gridOffset: pe,
      disableEqualOverflow: (B = (y = W) != null ? y : c) != null ? B : !1,
      // use context value if exists.
      parentDisableEqualOverflow: c
      // for nested grid
    }), G = i(N, k);
    let D = /* @__PURE__ */ V.jsx(d, u({
      ref: O,
      as: we,
      ownerState: N,
      className: re(G.root, ie)
    }, J, {
      children: f.Children.map(q, (m) => {
        if (/* @__PURE__ */ f.isValidElement(m) && Do(m, ["Grid"])) {
          var L;
          return /* @__PURE__ */ f.cloneElement(m, {
            unstable_level: (L = m.props.unstable_level) != null ? L : S + 1
          });
        }
        return m;
      })
    }));
    return W !== void 0 && W !== (c ?? !1) && (D = /* @__PURE__ */ V.jsx(a.Provider, {
      value: W,
      children: D
    })), D;
  });
  return process.env.NODE_ENV !== "production" && (b.propTypes = {
    children: e.node,
    className: e.string,
    columns: e.oneOfType([e.arrayOf(e.number), e.number, e.object]),
    columnSpacing: e.oneOfType([e.arrayOf(e.oneOfType([e.number, e.string])), e.number, e.object, e.string]),
    component: e.elementType,
    container: e.bool,
    direction: e.oneOfType([e.oneOf(["column-reverse", "column", "row-reverse", "row"]), e.arrayOf(e.oneOf(["column-reverse", "column", "row-reverse", "row"])), e.object]),
    disableEqualOverflow: e.bool,
    lg: e.oneOfType([e.oneOf(["auto"]), e.number, e.bool]),
    lgOffset: e.oneOfType([e.oneOf(["auto"]), e.number]),
    md: e.oneOfType([e.oneOf(["auto"]), e.number, e.bool]),
    mdOffset: e.oneOfType([e.oneOf(["auto"]), e.number]),
    rowSpacing: e.oneOfType([e.arrayOf(e.oneOfType([e.number, e.string])), e.number, e.object, e.string]),
    sm: e.oneOfType([e.oneOf(["auto"]), e.number, e.bool]),
    smOffset: e.oneOfType([e.oneOf(["auto"]), e.number]),
    spacing: e.oneOfType([e.arrayOf(e.oneOfType([e.number, e.string])), e.number, e.object, e.string]),
    sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
    wrap: e.oneOf(["nowrap", "wrap-reverse", "wrap"]),
    xl: e.oneOfType([e.oneOf(["auto"]), e.number, e.bool]),
    xlOffset: e.oneOfType([e.oneOf(["auto"]), e.number]),
    xs: e.oneOfType([e.oneOf(["auto"]), e.number, e.bool]),
    xsOffset: e.oneOfType([e.oneOf(["auto"]), e.number])
  }), b.muiName = "Grid", b;
}
const mo = bt({
  createStyledComponent: ve("div", {
    name: "MuiGrid2",
    slot: "Root",
    overridesResolver: (t, o) => o.root
  }),
  componentName: "MuiGrid2",
  useThemeProps: (t) => ao({
    props: t,
    name: "MuiGrid2"
  })
});
process.env.NODE_ENV !== "production" && (mo.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: e.node,
  /**
   * @ignore
   */
  sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
});
const no = mo;
function ht(t) {
  return lo("MuiTooltip", t);
}
const yt = Lo("MuiTooltip", ["popper", "popperInteractive", "popperArrow", "popperClose", "tooltip", "tooltipArrow", "touch", "tooltipPlacementLeft", "tooltipPlacementRight", "tooltipPlacementTop", "tooltipPlacementBottom", "arrow"]), A = yt, Tt = ["arrow", "children", "classes", "components", "componentsProps", "describeChild", "disableFocusListener", "disableHoverListener", "disableInteractive", "disableTouchListener", "enterDelay", "enterNextDelay", "enterTouchDelay", "followCursor", "id", "leaveDelay", "leaveTouchDelay", "onClose", "onOpen", "open", "placement", "PopperComponent", "PopperProps", "slotProps", "slots", "title", "TransitionComponent", "TransitionProps"];
function Ot(t) {
  return Math.round(t * 1e5) / 1e5;
}
const xt = (t) => {
  const {
    classes: o,
    disableInteractive: n,
    arrow: r,
    touch: a,
    placement: i
  } = t, d = {
    popper: ["popper", !n && "popperInteractive", r && "popperArrow"],
    tooltip: ["tooltip", r && "tooltipArrow", a && "touch", `tooltipPlacement${po(i.split("-")[0])}`],
    arrow: ["arrow"]
  };
  return io(d, ht, o);
}, vt = ve(uo, {
  name: "MuiTooltip",
  slot: "Popper",
  overridesResolver: (t, o) => {
    const {
      ownerState: n
    } = t;
    return [o.popper, !n.disableInteractive && o.popperInteractive, n.arrow && o.popperArrow, !n.open && o.popperClose];
  }
})(({
  theme: t,
  ownerState: o,
  open: n
}) => u({
  zIndex: (t.vars || t).zIndex.tooltip,
  pointerEvents: "none"
}, !o.disableInteractive && {
  pointerEvents: "auto"
}, !n && {
  pointerEvents: "none"
}, o.arrow && {
  [`&[data-popper-placement*="bottom"] .${A.arrow}`]: {
    top: 0,
    marginTop: "-0.71em",
    "&::before": {
      transformOrigin: "0 100%"
    }
  },
  [`&[data-popper-placement*="top"] .${A.arrow}`]: {
    bottom: 0,
    marginBottom: "-0.71em",
    "&::before": {
      transformOrigin: "100% 0"
    }
  },
  [`&[data-popper-placement*="right"] .${A.arrow}`]: u({}, o.isRtl ? {
    right: 0,
    marginRight: "-0.71em"
  } : {
    left: 0,
    marginLeft: "-0.71em"
  }, {
    height: "1em",
    width: "0.71em",
    "&::before": {
      transformOrigin: "100% 100%"
    }
  }),
  [`&[data-popper-placement*="left"] .${A.arrow}`]: u({}, o.isRtl ? {
    left: 0,
    marginLeft: "-0.71em"
  } : {
    right: 0,
    marginRight: "-0.71em"
  }, {
    height: "1em",
    width: "0.71em",
    "&::before": {
      transformOrigin: "0 0"
    }
  })
})), wt = ve("div", {
  name: "MuiTooltip",
  slot: "Tooltip",
  overridesResolver: (t, o) => {
    const {
      ownerState: n
    } = t;
    return [o.tooltip, n.touch && o.touch, n.arrow && o.tooltipArrow, o[`tooltipPlacement${po(n.placement.split("-")[0])}`]];
  }
})(({
  theme: t,
  ownerState: o
}) => u({
  backgroundColor: t.vars ? t.vars.palette.Tooltip.bg : co(t.palette.grey[700], 0.92),
  borderRadius: (t.vars || t).shape.borderRadius,
  color: (t.vars || t).palette.common.white,
  fontFamily: t.typography.fontFamily,
  padding: "4px 8px",
  fontSize: t.typography.pxToRem(11),
  maxWidth: 300,
  margin: 2,
  wordWrap: "break-word",
  fontWeight: t.typography.fontWeightMedium
}, o.arrow && {
  position: "relative",
  margin: 0
}, o.touch && {
  padding: "8px 16px",
  fontSize: t.typography.pxToRem(14),
  lineHeight: `${Ot(16 / 14)}em`,
  fontWeight: t.typography.fontWeightRegular
}, {
  [`.${A.popper}[data-popper-placement*="left"] &`]: u({
    transformOrigin: "right center"
  }, o.isRtl ? u({
    marginLeft: "14px"
  }, o.touch && {
    marginLeft: "24px"
  }) : u({
    marginRight: "14px"
  }, o.touch && {
    marginRight: "24px"
  })),
  [`.${A.popper}[data-popper-placement*="right"] &`]: u({
    transformOrigin: "left center"
  }, o.isRtl ? u({
    marginRight: "14px"
  }, o.touch && {
    marginRight: "24px"
  }) : u({
    marginLeft: "14px"
  }, o.touch && {
    marginLeft: "24px"
  })),
  [`.${A.popper}[data-popper-placement*="top"] &`]: u({
    transformOrigin: "center bottom",
    marginBottom: "14px"
  }, o.touch && {
    marginBottom: "24px"
  }),
  [`.${A.popper}[data-popper-placement*="bottom"] &`]: u({
    transformOrigin: "center top",
    marginTop: "14px"
  }, o.touch && {
    marginTop: "24px"
  })
})), Ct = ve("span", {
  name: "MuiTooltip",
  slot: "Arrow",
  overridesResolver: (t, o) => o.arrow
})(({
  theme: t
}) => ({
  overflow: "hidden",
  position: "absolute",
  width: "1em",
  height: "0.71em",
  boxSizing: "border-box",
  color: t.vars ? t.vars.palette.Tooltip.bg : co(t.palette.grey[700], 0.9),
  "&::before": {
    content: '""',
    margin: "auto",
    display: "block",
    width: "100%",
    height: "100%",
    backgroundColor: "currentColor",
    transform: "rotate(45deg)"
  }
}));
let Oe = !1;
const ro = new qo();
let ne = {
  x: 0,
  y: 0
};
function xe(t, o) {
  return (n, ...r) => {
    o && o(n, ...r), t(n, ...r);
  };
}
const go = /* @__PURE__ */ f.forwardRef(function(o, n) {
  var r, a, i, d, b, h, g, O, $, C, E, x, _, P, B, y, k, p, s;
  const c = ao({
    props: o,
    name: "MuiTooltip"
  }), {
    arrow: ie = !1,
    children: q,
    components: U = {},
    componentsProps: R = {},
    describeChild: we = !1,
    disableFocusListener: Ce = !1,
    disableHoverListener: le = !1,
    disableInteractive: H = !1,
    disableTouchListener: Pe = !1,
    enterDelay: ae = 100,
    enterNextDelay: K = 0,
    enterTouchDelay: S = 700,
    followCursor: Y = !1,
    id: W,
    leaveDelay: X = 0,
    leaveTouchDelay: pe = 1500,
    onClose: J,
    onOpen: ce,
    open: ue,
    placement: de = "bottom",
    PopperComponent: Q,
    PopperProps: N = {},
    slotProps: G = {},
    slots: D = {},
    title: m,
    TransitionComponent: L = eo,
    TransitionProps: bo
  } = c, De = so(c, Tt), j = /* @__PURE__ */ f.isValidElement(q) ? q : /* @__PURE__ */ V.jsx("span", {
    children: q
  }), Le = Vo(), ho = Ao(), [v, Ve] = f.useState(), [$e, yo] = f.useState(null), fe = f.useRef(!1), Ee = H || Y, Ae = ye(), _e = ye(), me = ye(), Be = ye(), [To, We] = Bo({
    controlled: ue,
    default: !1,
    name: "Tooltip",
    state: "open"
  });
  let I = To;
  if (process.env.NODE_ENV !== "production") {
    const {
      current: l
    } = f.useRef(ue !== void 0);
    f.useEffect(() => {
      v && v.disabled && !l && m !== "" && v.tagName.toLowerCase() === "button" && console.error(["MUI: You are providing a disabled `button` child to the Tooltip component.", "A disabled element does not fire events.", "Tooltip needs to listen to the child element's events to display the title.", "", "Add a simple wrapper element, such as a `span`."].join(`
`));
    }, [m, v, l]);
  }
  const Ne = Wo(W), Z = f.useRef(), ge = Ze(() => {
    Z.current !== void 0 && (document.body.style.WebkitUserSelect = Z.current, Z.current = void 0), Be.clear();
  });
  f.useEffect(() => ge, [ge]);
  const Fe = (l) => {
    ro.clear(), Oe = !0, We(!0), ce && !I && ce(l);
  }, be = Ze(
    /**
     * @param {React.SyntheticEvent | Event} event
     */
    (l) => {
      ro.start(800 + X, () => {
        Oe = !1;
      }), We(!1), J && I && J(l), Ae.start(Le.transitions.duration.shortest, () => {
        fe.current = !1;
      });
    }
  ), he = (l) => {
    fe.current && l.type !== "touchstart" || (v && v.removeAttribute("title"), _e.clear(), me.clear(), ae || Oe && K ? _e.start(Oe ? K : ae, () => {
      Fe(l);
    }) : Fe(l));
  }, je = (l) => {
    _e.clear(), me.start(X, () => {
      be(l);
    });
  }, {
    isFocusVisibleRef: Ue,
    onBlur: Oo,
    onFocus: xo,
    ref: vo
  } = Fo(), [, ze] = f.useState(!1), qe = (l) => {
    Oo(l), Ue.current === !1 && (ze(!1), je(l));
  }, He = (l) => {
    v || Ve(l.currentTarget), xo(l), Ue.current === !0 && (ze(!0), he(l));
  }, Ke = (l) => {
    fe.current = !0;
    const T = j.props;
    T.onTouchStart && T.onTouchStart(l);
  }, wo = (l) => {
    Ke(l), me.clear(), Ae.clear(), ge(), Z.current = document.body.style.WebkitUserSelect, document.body.style.WebkitUserSelect = "none", Be.start(S, () => {
      document.body.style.WebkitUserSelect = Z.current, he(l);
    });
  }, Co = (l) => {
    j.props.onTouchEnd && j.props.onTouchEnd(l), ge(), me.start(pe, () => {
      be(l);
    });
  };
  f.useEffect(() => {
    if (!I)
      return;
    function l(T) {
      (T.key === "Escape" || T.key === "Esc") && be(T);
    }
    return document.addEventListener("keydown", l), () => {
      document.removeEventListener("keydown", l);
    };
  }, [be, I]);
  const Po = Uo(j.ref, vo, Ve, n);
  !m && m !== 0 && (I = !1);
  const Re = f.useRef(), $o = (l) => {
    const T = j.props;
    T.onMouseMove && T.onMouseMove(l), ne = {
      x: l.clientX,
      y: l.clientY
    }, Re.current && Re.current.update();
  }, ee = {}, Se = typeof m == "string";
  we ? (ee.title = !I && Se && !le ? m : null, ee["aria-describedby"] = I ? Ne : null) : (ee["aria-label"] = Se ? m : null, ee["aria-labelledby"] = I && !Se ? Ne : null);
  const w = u({}, ee, De, j.props, {
    className: re(De.className, j.props.className),
    onTouchStart: Ke,
    ref: Po
  }, Y ? {
    onMouseMove: $o
  } : {});
  process.env.NODE_ENV !== "production" && (w["data-mui-internal-clone-element"] = !0, f.useEffect(() => {
    v && !v.getAttribute("data-mui-internal-clone-element") && console.error(["MUI: The `children` component of the Tooltip is not forwarding its props correctly.", "Please make sure that props are spread on the same element that the ref is applied to."].join(`
`));
  }, [v]));
  const oe = {};
  Pe || (w.onTouchStart = wo, w.onTouchEnd = Co), le || (w.onMouseOver = xe(he, w.onMouseOver), w.onMouseLeave = xe(je, w.onMouseLeave), Ee || (oe.onMouseOver = he, oe.onMouseLeave = je)), Ce || (w.onFocus = xe(He, w.onFocus), w.onBlur = xe(qe, w.onBlur), Ee || (oe.onFocus = He, oe.onBlur = qe)), process.env.NODE_ENV !== "production" && j.props.title && console.error(["MUI: You have provided a `title` prop to the child of <Tooltip />.", `Remove this title prop \`${j.props.title}\` or the Tooltip component.`].join(`
`));
  const Eo = f.useMemo(() => {
    var l;
    let T = [{
      name: "arrow",
      enabled: !!$e,
      options: {
        element: $e,
        padding: 4
      }
    }];
    return (l = N.popperOptions) != null && l.modifiers && (T = T.concat(N.popperOptions.modifiers)), u({}, N.popperOptions, {
      modifiers: T
    });
  }, [$e, N]), te = u({}, c, {
    isRtl: ho,
    arrow: ie,
    disableInteractive: Ee,
    placement: de,
    PopperComponentProp: Q,
    touch: fe.current
  }), Ge = xt(te), Ye = (r = (a = D.popper) != null ? a : U.Popper) != null ? r : vt, Xe = (i = (d = (b = D.transition) != null ? b : U.Transition) != null ? d : L) != null ? i : eo, Je = (h = (g = D.tooltip) != null ? g : U.Tooltip) != null ? h : wt, Qe = (O = ($ = D.arrow) != null ? $ : U.Arrow) != null ? O : Ct, _o = Te(Ye, u({}, N, (C = G.popper) != null ? C : R.popper, {
    className: re(Ge.popper, N == null ? void 0 : N.className, (E = (x = G.popper) != null ? x : R.popper) == null ? void 0 : E.className)
  }), te), No = Te(Xe, u({}, bo, (_ = G.transition) != null ? _ : R.transition), te), jo = Te(Je, u({}, (P = G.tooltip) != null ? P : R.tooltip, {
    className: re(Ge.tooltip, (B = (y = G.tooltip) != null ? y : R.tooltip) == null ? void 0 : B.className)
  }), te), Ro = Te(Qe, u({}, (k = G.arrow) != null ? k : R.arrow, {
    className: re(Ge.arrow, (p = (s = G.arrow) != null ? s : R.arrow) == null ? void 0 : p.className)
  }), te);
  return /* @__PURE__ */ V.jsxs(f.Fragment, {
    children: [/* @__PURE__ */ f.cloneElement(j, w), /* @__PURE__ */ V.jsx(Ye, u({
      as: Q ?? uo,
      placement: de,
      anchorEl: Y ? {
        getBoundingClientRect: () => ({
          top: ne.y,
          left: ne.x,
          right: ne.x,
          bottom: ne.y,
          width: 0,
          height: 0
        })
      } : v,
      popperRef: Re,
      open: v ? I : !1,
      id: Ne,
      transition: !0
    }, oe, _o, {
      popperOptions: Eo,
      children: ({
        TransitionProps: l
      }) => /* @__PURE__ */ V.jsx(Xe, u({
        timeout: Le.transitions.duration.shorter
      }, l, No, {
        children: /* @__PURE__ */ V.jsxs(Je, u({}, jo, {
          children: [m, ie ? /* @__PURE__ */ V.jsx(Qe, u({}, Ro, {
            ref: yo
          })) : null]
        }))
      }))
    }))]
  });
});
process.env.NODE_ENV !== "production" && (go.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`, adds an arrow to the tooltip.
   * @default false
   */
  arrow: e.bool,
  /**
   * Tooltip reference element.
   */
  children: zo.isRequired,
  /**
   * Override or extend the styles applied to the component.
   */
  classes: e.object,
  /**
   * @ignore
   */
  className: e.string,
  /**
   * The components used for each slot inside.
   *
   * This prop is an alias for the `slots` prop.
   * It's recommended to use the `slots` prop instead.
   *
   * @default {}
   */
  components: e.shape({
    Arrow: e.elementType,
    Popper: e.elementType,
    Tooltip: e.elementType,
    Transition: e.elementType
  }),
  /**
   * The extra props for the slot components.
   * You can override the existing props or add new ones.
   *
   * This prop is an alias for the `slotProps` prop.
   * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
   *
   * @default {}
   */
  componentsProps: e.shape({
    arrow: e.object,
    popper: e.object,
    tooltip: e.object,
    transition: e.object
  }),
  /**
   * Set to `true` if the `title` acts as an accessible description.
   * By default the `title` acts as an accessible label for the child.
   * @default false
   */
  describeChild: e.bool,
  /**
   * Do not respond to focus-visible events.
   * @default false
   */
  disableFocusListener: e.bool,
  /**
   * Do not respond to hover events.
   * @default false
   */
  disableHoverListener: e.bool,
  /**
   * Makes a tooltip not interactive, i.e. it will close when the user
   * hovers over the tooltip before the `leaveDelay` is expired.
   * @default false
   */
  disableInteractive: e.bool,
  /**
   * Do not respond to long press touch events.
   * @default false
   */
  disableTouchListener: e.bool,
  /**
   * The number of milliseconds to wait before showing the tooltip.
   * This prop won't impact the enter touch delay (`enterTouchDelay`).
   * @default 100
   */
  enterDelay: e.number,
  /**
   * The number of milliseconds to wait before showing the tooltip when one was already recently opened.
   * @default 0
   */
  enterNextDelay: e.number,
  /**
   * The number of milliseconds a user must touch the element before showing the tooltip.
   * @default 700
   */
  enterTouchDelay: e.number,
  /**
   * If `true`, the tooltip follow the cursor over the wrapped element.
   * @default false
   */
  followCursor: e.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: e.string,
  /**
   * The number of milliseconds to wait before hiding the tooltip.
   * This prop won't impact the leave touch delay (`leaveTouchDelay`).
   * @default 0
   */
  leaveDelay: e.number,
  /**
   * The number of milliseconds after the user stops touching an element before hiding the tooltip.
   * @default 1500
   */
  leaveTouchDelay: e.number,
  /**
   * Callback fired when the component requests to be closed.
   *
   * @param {React.SyntheticEvent} event The event source of the callback.
   */
  onClose: e.func,
  /**
   * Callback fired when the component requests to be open.
   *
   * @param {React.SyntheticEvent} event The event source of the callback.
   */
  onOpen: e.func,
  /**
   * If `true`, the component is shown.
   */
  open: e.bool,
  /**
   * Tooltip placement.
   * @default 'bottom'
   */
  placement: e.oneOf(["bottom-end", "bottom-start", "bottom", "left-end", "left-start", "left", "right-end", "right-start", "right", "top-end", "top-start", "top"]),
  /**
   * The component used for the popper.
   * @default Popper
   */
  PopperComponent: e.elementType,
  /**
   * Props applied to the [`Popper`](/material-ui/api/popper/) element.
   * @default {}
   */
  PopperProps: e.object,
  /**
   * The extra props for the slot components.
   * You can override the existing props or add new ones.
   *
   * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
   *
   * @default {}
   */
  slotProps: e.shape({
    arrow: e.object,
    popper: e.object,
    tooltip: e.object,
    transition: e.object
  }),
  /**
   * The components used for each slot inside.
   *
   * This prop is an alias for the `components` prop, which will be deprecated in the future.
   *
   * @default {}
   */
  slots: e.shape({
    arrow: e.elementType,
    popper: e.elementType,
    tooltip: e.elementType,
    transition: e.elementType
  }),
  /**
   * The system prop that allows defining system overrides as well as additional CSS styles.
   */
  sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
  /**
   * Tooltip title. Zero-length titles string, undefined, null and false are never displayed.
   */
  title: e.node,
  /**
   * The component used for the transition.
   * [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
   * @default Grow
   */
  TransitionComponent: e.elementType,
  /**
   * Props applied to the transition element.
   * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
   */
  TransitionProps: e.object
});
const Pt = go, Rt = (t) => {
  const {
    currentIndex: o,
    updateComponentRuntimeProps: n,
    // deleteComponentRuntimeProps,
    viewList: r,
    tooltipText: a,
    childrenNode: i,
    columnNumber: d,
    dynamicHeight: b = "auto",
    triggerEventHandler: h,
    updateComponentHeight: g,
    linkWidgetDisplayName: O,
    // padding,
    displayName: $,
    handleUpdateMultiExecutionResult: C,
    justifyContent: E
  } = t, x = Qo(o), _ = Ho(Ko);
  to(() => {
    typeof x.current != "number" && (x.current = o), x.current !== o && (h("change"), x.current = o);
  }, [o, h]);
  const P = Zo(() => {
    switch (b) {
      case "auto":
        return !0;
      case "limited":
        return !0;
      case "fixed":
      default:
        return !1;
    }
  }, [b]), B = Ie(
    (p) => {
      !g || !P || g(p + 2);
    },
    [P, g]
  ), y = Ie(
    // eslint-disable-next-line @typescript-eslint/no-explicit-any
    (p) => {
      if (C([
        {
          displayName: $,
          value: p
        }
      ]), O && O.length > 0) {
        const s = O.map((c) => ({
          displayName: c,
          value: p
        }));
        C(s);
      }
    },
    [$, C, O]
  );
  to(() => {
    n == null || n({
      setCurrentViewKey: (p) => {
        const s = r.findIndex((c) => c.key === p);
        s !== -1 && y({
          currentIndex: s,
          currentKey: p
        });
      },
      setCurrentViewIndex: (p) => {
        const s = parseInt(p), c = r[s];
        c && y({
          currentIndex: s,
          currentKey: c.key
        });
      },
      showNextView: (p) => {
        let s = o + 1;
        if (s >= r.length) {
          if (!p)
            return;
          s = 0;
        }
        const c = r[s];
        y({
          currentIndex: s,
          currentKey: c.key
        });
      },
      showNextVisibleView: (p) => {
        let s = o + 1;
        if (s >= r.length) {
          if (!p)
            return;
          s = 0;
        }
        let c = r[s];
        for (; c.hidden || c.disabled; )
          if (s++, c = r[s], s >= r.length) {
            if (!p)
              return;
            s = 0;
          }
        y({
          currentIndex: s,
          currentKey: c.key
        });
      },
      showPreviousView: (p) => {
        let s = o - 1;
        if (s < 0) {
          if (!p)
            return;
          s = r.length - 1;
        }
        const c = r[s];
        y({
          currentIndex: s,
          currentKey: c.key
        });
      },
      showPreviousVisibleView: (p) => {
        let s = o - 1;
        if (s < 0) {
          if (!p)
            return;
          s = r.length - 1;
        }
        let c = r[s];
        for (; c.hidden || c.disabled; )
          if (s--, c = r[s], s < 0) {
            if (!p)
              return;
            s = r.length - 1;
          }
        y({
          currentIndex: s,
          currentKey: c.key
        });
      }
    });
  }, [
    // deleteComponentRuntimeProps,
    n,
    y,
    r,
    o
  ]);
  const k = Ie(() => {
    h("click");
  }, [h]);
  return /* @__PURE__ */ F(Pt, { title: a, children: /* @__PURE__ */ F(no, { container: !0, justifyContent: E || "center", xs: 12, children: r.map((p, s) => /* @__PURE__ */ F(Yo, { children: /* @__PURE__ */ F(
    no,
    {
      xs: p.xs,
      sm: p.sm,
      md: p.md,
      lg: p.lg,
      sx: { position: "relative", border: _ ? "1px dotted gray" : "none" },
      justifyContent: "center",
      css: oo,
      children: /* @__PURE__ */ Xo("div", { css: oo, onClick: k, children: [
        _ && /* @__PURE__ */ F(
          "div",
          {
            style: {
              position: "absolute",
              top: 2,
              zIndex: "10",
              borderRadius: "5px",
              right: 0,
              fontSize: "10px",
              background: "#654aec",
              color: "white",
              padding: "2px 5px"
            },
            children: i[s]
          }
        ),
        Array.isArray(i) && o < i.length ? /* @__PURE__ */ F(
          et,
          {
            displayName: i[s],
            columnNumber: d,
            handleUpdateHeight: B,
            canResizeCanvas: P,
            containerPadding: "0px"
          }
        ) : /* @__PURE__ */ F(Jo, {})
      ] })
    },
    p.id
  ) })) }) });
};
export {
  Rt as default
};
//# sourceMappingURL=GridContainer-8c18a3ca.js.map
